Skip to content

Commit

Permalink
[RFR] [JF] Update application.removeBusinessService() method (#689)
Browse files Browse the repository at this point in the history
* Update a few methods in assessment class

Signed-off-by: Nandini Chandra <[email protected]>

* Update a few methods in assessment class

Signed-off-by: Nandini Chandra <[email protected]>

* Update selectors for business service in application creation modal

Signed-off-by: Nandini Chandra <[email protected]>

* Update selectors for business service in application creation modal

Signed-off-by: Nandini Chandra <[email protected]>

* Update test

Signed-off-by: Nandini Chandra <[email protected]>

* Relocate selector

Signed-off-by: Nandini Chandra <[email protected]>

---------

Signed-off-by: Nandini Chandra <[email protected]>
  • Loading branch information
nachandr authored Aug 23, 2023
1 parent 61a1da0 commit 7262b19
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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();
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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();
Expand All @@ -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,
Expand All @@ -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 () {
Expand Down
1 change: 1 addition & 0 deletions cypress/e2e/views/common.view.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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";

0 comments on commit 7262b19

Please sign in to comment.