Skip to content

Commit

Permalink
Changes after review
Browse files Browse the repository at this point in the history
Signed-off-by: Maayan Hadasi <[email protected]>
  • Loading branch information
mguetta1 committed Dec 12, 2024
1 parent 5a52d66 commit 9673717
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
8 changes: 4 additions & 4 deletions cypress/e2e/models/migration/applicationinventory/analysis.ts
Original file line number Diff line number Diff line change
Expand Up @@ -364,13 +364,13 @@ export class Analysis extends Application {
doesExistSelector(analyzeAppButton, rbacRules["Analyze"]);
}

verifyAnalysisStatus(status: string) {
verifyAnalysisStatus(status: string, timeout?: number) {
cy.log(`Verifying analysis status, expecting ${status}`);
cy.get(tdTag, { log: false })
.contains(this.name, { log: false })
.closest(trTag, { log: false })
.within(() => {
Analysis.verifyStatus(cy.get(analysisColumn, { log: false }), status);
Analysis.verifyStatus(cy.get(analysisColumn, { log: false }), status, timeout);
});
this.selectApplication();
}
Expand All @@ -391,9 +391,9 @@ export class Analysis extends Application {
});
}

public static verifyStatus(element: Cypress.Chainable, status: string) {
public static verifyStatus(element: Cypress.Chainable, status: string, timeout = 10 * MIN) {
element
.find("div > div:nth-child(2)", { timeout: 10 * MIN, log: false })
.find("div > div:nth-child(2)", { timeout: timeout, log: false })
.should("not.have.text", AnalysisStatuses.notStarted)
.and("not.have.text", AnalysisStatuses.scheduled)
.and("not.have.text", AnalysisStatuses.inProgress)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ import {
deleteApplicationTableRows,
} from "../../../../../utils/utils";
import { Analysis } from "../../../../models/migration/applicationinventory/analysis";
import { AnalysisStatuses, SEC } from "../../../../types/constants";
import { AnalysisStatuses, MIN, SEC } from "../../../../types/constants";
import { Application } from "../../../../models/migration/applicationinventory/application";
import { CustomMigrationTarget } from "../../../../models/administration/custom-migration-targets/custom-migration-target";
import * as data from "../../../../../utils/data_utils";
Expand Down Expand Up @@ -93,7 +93,7 @@ describe(["@tier2"], "Source Analysis of big applications", () => {
cy.wait("@getApplication");
cy.wait(2 * SEC);
application.analyze();
application.verifyAnalysisStatus(AnalysisStatuses.completed);
application.verifyAnalysisStatus(AnalysisStatuses.completed, 60 * MIN);
});

it("Source Analysis on OpenMRS app", function () {
Expand All @@ -108,7 +108,7 @@ describe(["@tier2"], "Source Analysis of big applications", () => {
cy.wait("@getApplication");
cy.wait(2 * SEC);
application.analyze();
application.verifyAnalysisStatus(AnalysisStatuses.completed);
application.verifyAnalysisStatus(AnalysisStatuses.completed, 30 * MIN);
});

after("Test data clean up", function () {
Expand Down

0 comments on commit 9673717

Please sign in to comment.