Skip to content

Commit

Permalink
Update selectors related to copy assessment
Browse files Browse the repository at this point in the history
Signed-off-by: Nandini Chandra <[email protected]>
  • Loading branch information
nachandr committed Aug 14, 2023
1 parent 22012e3 commit 6732a08
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 5 deletions.
21 changes: 17 additions & 4 deletions cypress/e2e/models/migration/applicationinventory/assessment.ts
Original file line number Diff line number Diff line change
Expand Up @@ -392,8 +392,15 @@ export class Assessment extends Application {
Assessment.open();
selectItemsPerPage(100);
cy.wait(2 * SEC);
performRowActionByIcon(this.name, kebabMenu);
cy.get("ul > li").find(button).should("not.contain", "Copy assessment");
cy.get(tdTag)
.contains(this.name)
.parent(tdTag)
.parent(trTag)
.within(() => {
click(actionButton);
cy.wait(500);
cy.get("ul > li").find(button).should("not.contain", "Copy assessment");
});
}

copy_assessment(applicationList: Array<Application>, cancel = false): void {
Expand Down Expand Up @@ -465,8 +472,14 @@ export class Assessment extends Application {
Assessment.open();
selectItemsPerPage(items);
cy.wait(2 * SEC);
performRowActionByIcon(this.name, kebabMenu);
clickByText(button, action);
cy.get(tdTag)
.contains(this.name)
.closest(trTag)
.within(() => {
click(actionButton);
cy.wait(500);
clickByText(button, action);
});
cy.get("div.pf-v5-c-modal-box").within(() => {
selectItemsPerPage(items);
});
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ describe(["@tier2"], "Copy assessment and review tests", () => {
it("Copy assessment to self", function () {
// Copy assessment to self, checkbox should be disabled
applicationList[0].openCopyAssessmentModel();
cy.get("[id^=pf-modal-part-]")
cy.get(".pf-m-compact> tbody > tr > td")
.contains(applicationList[0].name)
.parent(trTag)
.within(() => {
Expand Down

0 comments on commit 6732a08

Please sign in to comment.