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
  • Loading branch information
kpunwatk committed Mar 1, 2024
1 parent c164b40 commit e3fd24c
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 2 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
3 changes: 2 additions & 1 deletion 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.wait(2 * SEC);
cy.get('input[type="file"]', { timeout: 5 * SEC }).attachFile(
{ filePath: fileName, encoding: "binary" },
{ subjectType: "drag-n-drop" }
);
cy.wait(2000);
cy.wait(5 * SEC);
}

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

0 comments on commit e3fd24c

Please sign in to comment.