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 2221afa commit ed025b0
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 5 deletions.
22 changes: 18 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,15 +472,22 @@ export class Assessment extends Application {
Assessment.open();
selectItemsPerPage(items);
cy.wait(2 * SEC);
performRowActionByIcon(this.name, kebabMenu);
cy.get(tdTag)
.contains(this.name)
.closest(trTag)
.within(() => {
click(actionButton);
cy.wait(500);
clickByText(button, action);
});
clickByText(button, action);
cy.get("div.pf-v5-c-modal-box").within(() => {
selectItemsPerPage(items);
});
}

selectItemsPerPage(items: number): void {
cy.get("div.pf-v5-c-modal-box").within(() => {
cy.get("div.pf-c-modal-box").within(() => {
selectItemsPerPage(items);
});
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,8 @@ 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("tbody[class='pf-v5-c-table__tbody']")
.eq(1)
.contains(applicationList[0].name)
.parent(trTag)
.within(() => {
Expand Down

0 comments on commit ed025b0

Please sign in to comment.