diff --git a/cypress/e2e/models/migration/applicationinventory/application.ts b/cypress/e2e/models/migration/applicationinventory/application.ts index 757d52e50..5ba998c00 100644 --- a/cypress/e2e/models/migration/applicationinventory/application.ts +++ b/cypress/e2e/models/migration/applicationinventory/application.ts @@ -248,10 +248,10 @@ export class Application { cy.wait(2000); performRowActionByIcon(this.name, editButton); cy.get(applicationBusinessServiceSelect) - .parent("div") + .closest("div") .next("button") .then(($a) => { - if ($a.hasClass("pf-c-select__toggle-clear")) $a.click(); + if ($a.hasClass(commonView.dropdownClearSelection)) $a.click(); }); submitForm(); } diff --git a/cypress/e2e/tests/migration/applicationinventory/assessment/interlinked.test.ts b/cypress/e2e/tests/migration/applicationinventory/assessment/interlinked.test.ts index 70bebaa0d..ee3a0d720 100644 --- a/cypress/e2e/tests/migration/applicationinventory/assessment/interlinked.test.ts +++ b/cypress/e2e/tests/migration/applicationinventory/assessment/interlinked.test.ts @@ -79,7 +79,10 @@ describe(["@tier3"], "Applications interlinked to tags and business service", () cy.get("@getApplication"); cy.wait(2 * SEC); + application.applicationDetailsTab("Tags"); application.tagAndCategoryExists(tagList[0].name); + application.closeApplicationDetails(); + // Remove the BS and tags application.removeBusinessService(); tagList[0].delete(); @@ -95,7 +98,9 @@ describe(["@tier3"], "Applications interlinked to tags and business service", () cy.wait(100); // Assert that deleted tag is removed + application.applicationDetailsTab("Tags"); application.tagAndCategoryExists(""); + application.closeApplicationDetails(); application.edit({ business: businessServicesList[1].name, @@ -108,7 +113,9 @@ describe(["@tier3"], "Applications interlinked to tags and business service", () cy.wait(SEC); // Assert that created tag exists + application.applicationDetailsTab("Tags"); application.tagAndCategoryExists(tagList[1].name); + application.closeApplicationDetails(); }); it("Stakeholder and stakeholder group delete dependency on application", function () { diff --git a/cypress/e2e/views/common.view.ts b/cypress/e2e/views/common.view.ts index c2f7665bc..3946aab60 100644 --- a/cypress/e2e/views/common.view.ts +++ b/cypress/e2e/views/common.view.ts @@ -55,3 +55,4 @@ export const nameHelperBusiness = "#business-service-name-helper"; export const nameHelperStakeholderGroup = "#-helper"; export const kebabMenuItem = "a.pf-c-dropdown__menu-item"; export const commonTable = "table[aria-label='main-table']"; +export const dropdownClearSelection = "pf-v5-c-select__toggle-clear";