Skip to content

Commit

Permalink
Fix test errors in deactivating status label
Browse files Browse the repository at this point in the history
  • Loading branch information
geodem127 committed Jan 3, 2025
2 parents f434075 + 78bb88b commit 3ec6c2b
Showing 1 changed file with 0 additions and 8 deletions.
8 changes: 0 additions & 8 deletions cypress/e2e/settings/workflows.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -374,9 +374,6 @@ describe("Workflow Status Labels: Authorized User", () => {
.contains("Deactivate Status")
.click();

// cy.intercept("DELETE", `${ENDPOINTS?.statusLabels}/**`).as(
// "deactivateStatusLabel"
// );
cy.intercept(ENDPOINTS.allStatusLabels).as("getAllStatusLabels");

cy.wait("@getAllStatusLabels");
Expand Down Expand Up @@ -567,17 +564,12 @@ Cypress.Commands.add("deactivateStatusLabel", (labelName) => {
.find("button")
.click()
.then(() => {
// Click the "Deactivate Status" option in the menu
cy.get('ul li[role="menuitem"]').contains("Deactivate Status").click();

// Confirm the deactivation action by clicking the "Deactivate Status" button
cy.get("button").contains("Deactivate Status").click();

// Wait for both the DELETE request (deactivating the status) and the GET request (reloading the status labels)
return cy
.wait(["@deactivateStatusLabel", "@getAllStatusLabels"])
.spread((deactivateStatusLabel, getAllStatusLabels) => {
// Return both responses as an object
return {
deactivatedStatusLabel: deactivateStatusLabel?.response?.body?.data,
statusLabels: parseStatusLabels(
Expand Down

0 comments on commit 3ec6c2b

Please sign in to comment.