Skip to content

Commit

Permalink
[WIP] Fix Source Analysis without credentials
Browse files Browse the repository at this point in the history
Signed-off-by: Karishma Punwatkar <[email protected]>

	modified:   cypress/e2e/models/migration/dynamic-report/issues/issues.ts

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

	modified:   cypress/e2e/tests/migration/applicationinventory/analysis/source_analysis.test.ts
  • Loading branch information
kpunwatk committed Aug 9, 2024
1 parent a74dbf8 commit 975d09a
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 0 deletions.
18 changes: 18 additions & 0 deletions cypress/e2e/models/migration/dynamic-report/issues/issues.ts
Original file line number Diff line number Diff line change
Expand Up @@ -195,9 +195,27 @@ export class Issues {
.within(() => {
if (Array.isArray(content)) {
content.forEach((item) => cy.contains(contentSelector, item));
Issues.closeDropdownIfOpen();
} else {
cy.contains(contentSelector, content);
Issues.closeDropdownIfOpen();
}
});
}
private static closeDropdownIfOpen(): void {
cy.wait(2000); // Increase the wait time to ensure the element is present
cy.get("[id^='expandable']", { timeout: 30000 }).then(($item) => {
if ($item.length > 0) {
$item.each((index, item) => {
cy.wrap(item)
// .should('be.visible')
.click({ force: true });
});
}

// if (!$item.hasClass("pf-m-expanded")) {
// $item.trigger("click");
// }
});
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -236,6 +236,7 @@ describe(["@tier1"], "Source Analysis", () => {
}),
getRandomAnalysisData(this.analysisData["analysis_on_example-1-app"])
);
cy.wait(2 * SEC);
Application.open();
application.create();
applicationsList.push(application);
Expand Down

0 comments on commit 975d09a

Please sign in to comment.