Skip to content

Commit

Permalink
[WIP] Uplaod binary fix
Browse files Browse the repository at this point in the history
Signed-off-by: Karishma Punwatkar <[email protected]>

	modified:   cypress/e2e/tests/migration/applicationinventory/analysis/upload_binary_analysis.test.ts

	modified:   cypress/e2e/models/migration/applicationinventory/analysis.ts
	modified:   cypress/e2e/tests/migration/applicationinventory/analysis/upload_binary_analysis.test.ts

	modified:   cypress/e2e/models/migration/applicationinventory/analysis.ts
	modified:   cypress/e2e/tests/migration/applicationinventory/analysis/upload_binary_analysis.test.ts
	modified:   cypress/utils/utils.ts

	modified:   cypress/utils/utils.ts

	modified:   cypress/e2e/tests/migration/applicationinventory/analysis/upload_binary_analysis.test.ts

	modified:   cypress/utils/utils.ts

	modified:   cypress/e2e/tests/migration/applicationinventory/analysis/upload_binary_analysis.test.ts

	modified:   cypress/e2e/tests/migration/applicationinventory/analysis/upload_binary_analysis.test.ts

	modified:   cypress/e2e/tests/migration/applicationinventory/analysis/upload_binary_analysis.test.ts

	modified:   cypress/e2e/tests/migration/applicationinventory/analysis/upload_binary_analysis.test.ts

	modified:   cypress/e2e/tests/migration/applicationinventory/analysis/upload_binary_analysis.test.ts
  • Loading branch information
kpunwatk committed Mar 6, 2024
1 parent c164b40 commit c5e65a7
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -182,6 +182,7 @@ export class Analysis extends Application {
}

protected uploadBinary() {
cy.wait(2 * SEC);
this.binary.forEach((binaryList) => {
uploadApplications(binaryList);
cy.get("span.pf-v5-c-progress__measure", { timeout: 5000 * SEC }).should(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ import {
} from "../../../../../utils/utils";
import { Analysis } from "../../../../models/migration/applicationinventory/analysis";
import { Application } from "../../../../models/migration/applicationinventory/application";
import { AnalysisStatuses } from "../../../../types/constants";
import {AnalysisStatuses, SEC} from "../../../../types/constants";

const applicationsList: Analysis[] = [];
describe(["@tier1"], "Upload Binary Analysis", () => {
Expand Down Expand Up @@ -128,6 +128,7 @@ describe(["@tier1"], "Upload Binary Analysis", () => {

afterEach("Persist session", function () {
Application.open(true);
cy.wait(10*SEC);
});

after("Perform test data clean up", function () {
Expand Down
5 changes: 3 additions & 2 deletions cypress/utils/utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -733,11 +733,12 @@ export function uploadXml(fileName: string, selector = 'input[type="file"]'): vo
}

export function uploadApplications(fileName: string): void {
cy.get('input[type="file"]', { timeout: 5 * SEC }).attachFile(
cy.wait(2 * SEC);
cy.get('input[type="file"]', { timeout: 10 * SEC }).attachFile(
{ filePath: fileName, encoding: "binary" },
{ subjectType: "drag-n-drop" }
);
cy.wait(2000);
cy.wait(20 * SEC);
}

export function uploadFile(fileName: string): void {
Expand Down

0 comments on commit c5e65a7

Please sign in to comment.