diff --git a/cypress/e2e/settings/workflows.spec.js b/cypress/e2e/settings/workflows.spec.js index 39d736c22..c8ba78c87 100644 --- a/cypress/e2e/settings/workflows.spec.js +++ b/cypress/e2e/settings/workflows.spec.js @@ -12,44 +12,25 @@ const INSTANCE_API = `${ const FOCUSED_LABEL_COLOR = "rgba(253, 133, 58, 0.1)"; const ENDPOINTS = { - instance: "**/v1/instances/**", userRoles: "**/v1/users/**/roles", - instanceRoles: "**/v1/instances/**/roles", - instanceUsers: `**/v1/instances/**/users`, instanceUserRoles: `**/v1/instances/**/users/roles`, allStatusLabels: "**/v1/env/labels?showDeleted=true", statusLabels: "**/v1/env/labels", }; -const USER_ROLES = { - restricted: { - data: [ - { - ZUID: "30-8ee88afe82-gmx631", - entityZUID: "8-f48cf3a682-7fthvk", +const RESTRICTED_USER = { + data: [ + { + ZUID: "30-8ee88afe82-gmx631", + entityZUID: "8-f48cf3a682-7fthvk", + name: "Developer", + systemRoleZUID: "31-71cfc74-d3v3l0p3r", + systemRole: { + ZUID: "31-71cfc74-d3v3l0p3r", name: "Developer", - systemRoleZUID: "31-71cfc74-d3v3l0p3r", - systemRole: { - ZUID: "31-71cfc74-d3v3l0p3r", - name: "Developer", - }, }, - ], - }, - authorized: { - data: [ - { - ZUID: "30-8ee88afe82-gmx631", - entityZUID: "8-f48cf3a682-7fthvk", - name: "Admin", - systemRoleZUID: "31-71cfc74-4dm13", - systemRole: { - ZUID: "31-71cfc74-4dm13", - name: "Admin", - }, - }, - ], - }, + }, + ], }; const LABELS = { @@ -64,6 +45,8 @@ const LABELS = { "These statuses can be re-activated at any time if you would like to add or remove them from content items", }; +const EMPTY_SEARCH_TEXT = "xx_yy_zz_00"; + const FORM_DATA = { create: { name: "Test Status Label - Create", @@ -74,16 +57,16 @@ const FORM_DATA = { allowPublish: true, }, edit: { - name: "Test Status Label - Edited", - description: "Test Status Label - Edited Description", + name: "Test Status Label - Edit", + description: "Test Status Label - Edit Description", color: "Rose", addPermissionRoles: "Admin", removePermissionRoles: "Admin", allowPublish: false, }, delete: { - name: "Test Status Label - Deleted", - description: "Test Status Label - Deleted Description", + name: "Test Status Label - Delete", + description: "Test Status Label - Delete Description", color: "Red", addPermissionRoles: [], removePermissionRoles: [], @@ -92,15 +75,10 @@ const FORM_DATA = { }; describe("Workflow Status Labels: Restricted User", () => { - before(() => { - cy.waitUntilStatusLabelsAreLoaded(); - }); it("displays restricted access message and admin profiles", () => { cy.intercept("GET", ENDPOINTS?.userRoles, { statusCode: 200, - body: { - ...USER_ROLES?.restricted, - }, + body: RESTRICTED_USER, }).as("getRestrictedUser"); cy.intercept("GET", ENDPOINTS?.instanceUserRoles).as( @@ -108,17 +86,9 @@ describe("Workflow Status Labels: Restricted User", () => { ); cy.visit("/settings/user/workflows"); + cy.get('[data-cy="workflows-restricted-page"]', { timeout: 60000 }); - cy.wait("@getRestrictedUser") - .its("response.body") - .then((body) => { - cy.wrap(body).as("userRoles"); - }); - cy.contains(LABELS?.restrictedPageHeader).should("exist"); - cy.contains(LABELS?.restrictedPageSubheader).should("exist"); - cy.get('[data-cy="restricted-image"]').should("exist"); - - cy.wait("@getInstanceUserRoles") + cy.get("@getInstanceUserRoles") .its("response.body") .then((body) => { const authorizedUsers = body?.data.filter((user) => @@ -129,6 +99,9 @@ describe("Workflow Status Labels: Restricted User", () => { .its("length") .should("eq", authorizedUsers.length); }); + cy.contains(LABELS?.restrictedPageHeader).should("exist"); + cy.contains(LABELS?.restrictedPageSubheader).should("exist"); + cy.get('[data-cy="restricted-image"]').should("exist"); }); }); @@ -140,7 +113,7 @@ describe("Workflow Status Labels: Authorized User", () => { context("Workflow Page", () => { before(() => { - cy.waitUntilStatusLabelsAreLoaded(); + cy.goToWorkflowsPage(); }); it("displays workflow page elements for authorized users", () => { cy.contains("Workflows").should("exist"); @@ -149,7 +122,7 @@ describe("Workflow Status Labels: Authorized User", () => { cy.get('input[value="deactivated"]').should("exist"); }); - it("Show Deactivated Labels: Displays active and deactivated status labels", () => { + it("Show Deactivated Labels: Displays active and deactivated sections", () => { cy.get('input[value="deactivated"]').click(); cy.contains(LABELS.activeLabelsHeader).should("exist"); cy.contains(LABELS.activeLabelsHeader).should("exist"); @@ -158,9 +131,9 @@ describe("Workflow Status Labels: Authorized User", () => { }); }); - context("Create New Status Label", () => { + context("Create New Status Label", { retries: 1 }, () => { before(() => { - cy.waitUntilStatusLabelsAreLoaded(); + cy.goToWorkflowsPage(); }); it("Form Validation: should display error message when required fields are empty", function () { @@ -172,34 +145,66 @@ describe("Workflow Status Labels: Authorized User", () => { }); it("Fills out and submits form", () => { - cy.createStatusLabel({ ...FORM_DATA.create }).then(function (data) { - const { - statusLabels: { active }, - createdStatusLabel, - } = data; - expect(createdStatusLabel.name).to.equal(FORM_DATA.create.name); - expect(createdStatusLabel.description).to.equal( - FORM_DATA.create.description - ); - expect(createdStatusLabel.color).to.equal( - colorMenu.find((color) => color?.label === FORM_DATA.create.color) - ?.value - ); - expect(createdStatusLabel.addPermissionRoles).to.have.lengthOf(1); - expect(createdStatusLabel.removePermissionRoles).to.have.lengthOf(1); - expect(createdStatusLabel.allowPublish).to.be.true; + cy.get("button").contains("Create Status").click(); + cy.intercept("POST", ENDPOINTS?.statusLabels).as("createStatusLabel"); + cy.intercept(ENDPOINTS.allStatusLabels).as("getAllStatusLabels"); + cy.get('input[name="name"]').type(FORM_DATA.create.name); + cy.get('textarea[name="description"]').type(FORM_DATA.create.description); + cy.get('input[name="color"]').parent().find("button").click(); + cy.get('ul li[role="option"]').contains(FORM_DATA.create.color).click(); + cy.get('input[name="addPermissionRoles"]') + .parent() + .find("button") + .click(); + cy.get('ul li[role="option"]') + .contains(FORM_DATA.create.addPermissionRoles) + .click(); + cy.get('form[role="dialog"]').click(); + cy.get('input[name="removePermissionRoles"]') + .parent() + .find("button") + .click(); + cy.get('ul li[role="option"]') + .contains(FORM_DATA.create.removePermissionRoles) + .click(); + cy.get('form[role="dialog"]').click(); - cy.get( - '[data-cy="active-labels-container"] [data-cy="status-label"]' - ).should("have.length", active.length); - }); + if (FORM_DATA.create.allowPublish) { + cy.get('input[name="allowPublish"]').check(); + } else { + cy.get('input[name="allowPublish"]').uncheck(); + } - cy.wait(1000); + cy.get('[data-cy="status-label-submit-button"]').click(); + + cy.wait(["@createStatusLabel", "@getAllStatusLabels"]).spread( + (createStatusLabel, getAllStatusLabels) => { + const createdStatusLabel = createStatusLabel?.response?.body?.data; + const { active } = parseStatusLabels( + getAllStatusLabels?.response?.body?.data + ); + expect(createdStatusLabel.name).to.equal(FORM_DATA.create.name); + expect(createdStatusLabel.description).to.equal( + FORM_DATA.create.description + ); + expect(createdStatusLabel.color).to.equal( + colorMenu.find((color) => color?.label === FORM_DATA.create.color) + ?.value + ); + expect(createdStatusLabel.addPermissionRoles).to.have.lengthOf(1); + expect(createdStatusLabel.removePermissionRoles).to.have.lengthOf(1); + expect(createdStatusLabel.allowPublish).to.be.true; + + cy.get( + '[data-cy="active-labels-container"] [data-cy="status-label"]' + ).should("have.length", active.length); + } + ); }); it("Highlights the newly created status label.", () => { cy.get('[data-cy="active-labels-container"] [data-cy="status-label"]') - .contains(FORM_DATA.create.name) + .contains(FORM_DATA.create.name, { timeout: 60000 }) .parents('[data-cy="status-label"]') .should("have.css", "background-color", FOCUSED_LABEL_COLOR); }); @@ -213,15 +218,12 @@ describe("Workflow Status Labels: Authorized User", () => { }); }); - context("Edit Status Label", () => { + context("Edit Status Label", { retries: 1 }, () => { before(() => { - cy.waitUntilStatusLabelsAreLoaded(); + cy.goToWorkflowsPage(); }); it("Open Status Label and Edit Details", () => { - cy.intercept("PUT", `${ENDPOINTS?.statusLabels}/**`).as( - "editStatusLabel" - ); cy.get( '[data-cy="active-labels-container"] [data-cy="status-label"]:visible' ) @@ -230,12 +232,10 @@ describe("Workflow Status Labels: Authorized User", () => { .find("button") .click(); cy.get('ul li[role="menuitem"]').contains("Edit Status").click(); - cy.get("button") .contains("Deactivate Status") .should("exist") .and("be.enabled"); - cy.get('input[name="name"]').clear().type(FORM_DATA.edit.name); cy.get('textarea[name="description"]') .clear() @@ -255,21 +255,19 @@ describe("Workflow Status Labels: Authorized User", () => { .click(); cy.get('form[role="dialog"]').click(); cy.get('input[name="allowPublish"]').uncheck(); - cy.get('[data-cy="status-label-submit-button"]').click(); - + cy.intercept("PUT", `${ENDPOINTS?.statusLabels}/**`).as( + "editStatusLabel" + ); cy.intercept(ENDPOINTS.allStatusLabels).as("getAllStatusLabels"); - cy.wait(["@editStatusLabel", "@getAllStatusLabels"]).spread( (editStatusLabel, getAllStatusLabels) => { const targetLabelZUID = editStatusLabel.response.body.data; const updatedLabel = getAllStatusLabels.response.body.data.find( (label) => label.ZUID === targetLabelZUID ); - expect(editStatusLabel.response.statusCode).to.eq(200); expect(getAllStatusLabels.response.statusCode).to.eq(200); - expect(updatedLabel).to.deep.include({ name: FORM_DATA.edit.name, color: colorMenu.find( @@ -286,10 +284,10 @@ describe("Workflow Status Labels: Authorized User", () => { context("Re-order Status Labels", () => { before(() => { - cy.waitUntilStatusLabelsAreLoaded(); + cy.goToWorkflowsPage(); }); - it("Drag status label to a new position", () => { + it("Drag status label to a new position", { retries: 1 }, () => { const dataTransfer = new DataTransfer(); cy.get(`[data-cy="status-label"]`) .find('[data-cy="status-label-drag-handle"]') @@ -297,7 +295,6 @@ describe("Workflow Status Labels: Authorized User", () => { .trigger("dragstart", { dataTransfer, }); - cy.get(`[data-cy="status-label"]`) .find('[data-cy="status-label-drag-handle"]') .eq(1) @@ -307,14 +304,12 @@ describe("Workflow Status Labels: Authorized User", () => { .trigger("drop", { dataTransfer, }); - cy.intercept("PUT", ENDPOINTS.statusLabels).as("reorderStatusLabel"); cy.intercept("GET", ENDPOINTS.allStatusLabels).as("getAllStatusLabels"); cy.wait(["@reorderStatusLabel", "@getAllStatusLabels"]).spread( (reorderStatusLabel, getAllStatusLabels) => { expect(reorderStatusLabel.response.statusCode).to.eq(200); expect(getAllStatusLabels.response.statusCode).to.eq(200); - const reorderedLabels = reorderStatusLabel?.request?.body?.data; const updatedLabel = getAllStatusLabels.response.body.data; reorderedLabels.forEach((label, index) => { @@ -330,34 +325,52 @@ describe("Workflow Status Labels: Authorized User", () => { context("Deactivate Status Label", () => { before(() => { - cy.waitUntilStatusLabelsAreLoaded().then((data) => { - cy.wrap(data).as("deactivateInitialStatusLabels"); - }); + cy.goToWorkflowsPage(); }); - it("Deactivate using menu options", function () { - cy.deactivateStatusLabel(FORM_DATA?.edit?.name).then(function (data) { - expect( - !data?.statusLabels?.active?.find( - (label) => label?.name === FORM_DATA?.edit?.name - ) - ).to.be.true; - expect( - !!data?.statusLabels?.deactivated?.find( - (label) => label?.name === FORM_DATA?.edit?.name - ) - ).to.be.true; - }); - - cy.get(".notistack-Snackbar") - .contains(`Status De-activated`) - .should("exist"); - cy.get(".notistack-Snackbar") + it("Deactivate using menu options", { retries: 1 }, function () { + cy.get( + '[data-cy="active-labels-container"] [data-cy="status-label"]:visible' + ) .contains(FORM_DATA?.edit?.name) - .should("exist"); + .parents('[data-cy="status-label"]') + .find("button") + .click() + .then(() => { + cy.get('ul li[role="menuitem"]') + .contains("Deactivate Status") + .click(); + cy.get("button").contains("Deactivate Status").click(); + cy.intercept("DELETE", `${ENDPOINTS?.statusLabels}/**`).as( + "deactivateStatusLabel" + ); + cy.intercept("GET", ENDPOINTS.allStatusLabels).as( + "getAllStatusLabels" + ); + cy.wait(["@deactivateStatusLabel", "@getAllStatusLabels"]).spread( + (deactivateStatusLabel, getAllStatusLabels) => { + const deactivatedLabel = + deactivateStatusLabel?.response?.body?.data; + const { active, deactivated } = parseStatusLabels( + getAllStatusLabels?.response?.body?.data + ); + expect( + active?.filter((label) => label.ZUID === deactivatedLabel) + ?.length + ).to.eq(0); + expect( + deactivated?.filter((label) => label.ZUID === deactivatedLabel) + .length + ).to.eq(1); + } + ); + }); + cy.get(".notistack-Snackbar", { timeout: 30000 }).contains( + new RegExp(`Status De-activated:\\s*${FORM_DATA?.edit?.name}`) + ); }); - it("Deactivate using deactivation button in edit status label form", function () { + it("Deactivate using form button", { retries: 1 }, function () { cy.get( '[data-cy="active-labels-container"] [data-cy="status-label"]:visible' ) @@ -365,38 +378,44 @@ describe("Workflow Status Labels: Authorized User", () => { .parents('[data-cy="status-label"]') .find("button") .click(); - cy.get('ul li[role="menuitem"]').contains("Edit Status").click(); - cy.get("form button").contains("Deactivate Status").click(); - cy.get('[data-cy="deactivation-dialog"] button') .contains("Deactivate Status") .click(); - - cy.intercept(ENDPOINTS.allStatusLabels).as("getAllStatusLabels"); - - cy.wait("@getAllStatusLabels"); - - cy.wait(1500); - - cy.get(".notistack-Snackbar") - .contains(`Status De-activated`) - .should("exist"); - cy.get(".notistack-Snackbar") - .contains(FORM_DATA?.delete?.name) - .should("exist"); + cy.intercept("DELETE", `${ENDPOINTS?.statusLabels}/**`).as( + "deactivateStatusLabel" + ); + cy.intercept("GET", ENDPOINTS.allStatusLabels).as("getAllStatusLabels"); + cy.wait(["@deactivateStatusLabel", "@getAllStatusLabels"]).spread( + (deactivateStatusLabel, getAllStatusLabels) => { + const deactivatedLabel = deactivateStatusLabel?.response?.body?.data; + const { active, deactivated } = parseStatusLabels( + getAllStatusLabels?.response?.body?.data + ); + expect( + active?.filter((label) => label.ZUID === deactivatedLabel)?.length + ).to.eq(0); + expect( + deactivated?.filter((label) => label.ZUID === deactivatedLabel) + .length + ).to.eq(1); + } + ); + cy.get(".notistack-Snackbar", { timeout: 30000 }).contains( + new RegExp(`Status De-activated:\\s*${FORM_DATA?.delete?.name}`) + ); }); }); context("Filter Active and Deactivated Status Labels", () => { before(() => { - cy.waitUntilStatusLabelsAreLoaded().then((data) => { + cy.getStatusLabels().then((data) => { cy.wrap(data).as("activeDeactivatedStatusLabels"); }); + cy.goToWorkflowsPage(); cy.get('input[value="deactivated"]').click(); }); - it("Displays active/deactivated status labels", function () { cy.get( '[data-cy="active-labels-container"] [data-cy="status-label"]' @@ -404,7 +423,6 @@ describe("Workflow Status Labels: Authorized User", () => { "have.length", this.activeDeactivatedStatusLabels?.active?.length ); - cy.get( '[data-cy="deactivated-labels-container"] [data-cy="status-label"]' ).should( @@ -414,22 +432,19 @@ describe("Workflow Status Labels: Authorized User", () => { }); it("Displays Error page when search results returns empty", function () { - cy.wait(1500); - cy.get('input[placeholder="Search Statuses"]').clear().type("xxxxx"); - + cy.get('input[placeholder="Search Statuses"]') + .clear() + .type(EMPTY_SEARCH_TEXT); cy.get('[data-cy="active-labels-container"]').should("not.exist"); cy.get('[data-cy="deactivated-labels-container"]').should("not.exist"); cy.get('[data-cy="no-results-page"]').should("exist"); }); it("Clears and focuses search field when clicking 'Search Again'", function () { - cy.wait(1500); cy.get("button").contains("Search Again").click(); - cy.get('[data-cy="active-labels-container"]').should("exist"); cy.get('[data-cy="deactivated-labels-container"]').should("exist"); cy.get('[data-cy="no-results-page"]').should("not.exist"); - cy.get('input[placeholder="Search Statuses"]') .should("be.empty") .and("have.focus"); @@ -437,148 +452,82 @@ describe("Workflow Status Labels: Authorized User", () => { }); }); -Cypress.Commands.add("cleanTestData", () => { - cy.intercept(ENDPOINTS.allStatusLabels).as("getAllLabels"); +Cypress.Commands.add("goToWorkflowsPage", () => { cy.visit("/settings/user/workflows"); - cy.wait("@getAllLabels") - .its("response.body.data") - .then((data) => { - const testData = data?.filter( - (label) => - !label?.deletedAt && - [ - FORM_DATA?.create?.name, - FORM_DATA?.edit?.name, - FORM_DATA?.delete?.name, - ]?.includes(label?.name) - ); + cy.get('[data-cy="workflows-authorized-page"]', { timeout: 60000 }); +}); - if (testData?.length > 0) { - cy.getCookie(Cypress.env("COOKIE_NAME")).then((cookie) => { - const token = cookie?.value; - testData.forEach((label) => { - cy.request({ - url: `${INSTANCE_API}/env/labels/${label?.ZUID}`, - method: "DELETE", - headers: { - authorization: `Bearer ${token}`, - }, - }); - }); +Cypress.Commands.add("cleanTestData", () => { + cy.apiRequest({ + url: `${INSTANCE_API}/env/labels?showDeleted=true`, + }).then((response) => { + const testData = response?.data?.filter( + (label) => + !label?.deletedAt && + [ + FORM_DATA?.create?.name, + FORM_DATA?.edit?.name, + FORM_DATA?.delete?.name, + ]?.includes(label?.name) + ); + if (testData?.length > 0) { + testData.forEach((label) => { + cy.apiRequest({ + url: `${INSTANCE_API}/env/labels/${label?.ZUID}`, + method: "DELETE", }); - } - }); + }); + } + }); }); Cypress.Commands.add("createTestData", () => { - cy.getCookie(Cypress.env("COOKIE_NAME")).then((cookie) => { - const token = cookie?.value; - cy.request({ - url: `${INSTANCE_API}/env/labels`, - method: "POST", - headers: { - authorization: `Bearer ${token}`, - }, - body: { - ...FORM_DATA?.delete, - color: colorMenu.find( - (color) => color?.label === FORM_DATA.delete.color - )?.value, - }, - }); + cy.apiRequest({ + url: `${INSTANCE_API}/env/labels`, + method: "POST", + body: { + ...FORM_DATA?.delete, + color: colorMenu.find((color) => color?.label === FORM_DATA.delete.color) + ?.value, + }, }); }); -Cypress.Commands.add("waitUntilStatusLabelsAreLoaded", () => { - cy.intercept("GET", ENDPOINTS.allStatusLabels, (req) => { - req.continue(); - }).as("getAllStatusLabels"); - cy.visit("/settings/user/workflows"); +Cypress.Commands.add("getStatusLabels", () => { return cy - .wait("@getAllStatusLabels", { timeout: 30000 }) - .then(({ response }) => { - return parseStatusLabels(response?.body?.data); + .apiRequest({ + url: `${INSTANCE_API}/env/labels?showDeleted=true`, + }) + .then((response) => { + return { + ...parseStatusLabels(response?.data), + }; }); }); Cypress.Commands.add( - "createStatusLabel", - ({ - name, - description, - color, - addPermissionRoles, - removePermissionRoles, - allowPublish, - }) => { - cy.get("button").contains("Create Status").click(); - - cy.intercept("POST", ENDPOINTS?.statusLabels).as("createStatusLabel"); - cy.intercept(ENDPOINTS.allStatusLabels).as("getAllStatusLabels"); - - cy.get('input[name="name"]').type(name); - cy.get('textarea[name="description"]').type(description); - cy.get('input[name="color"]').parent().find("button").click(); - cy.get('ul li[role="option"]').contains(color).click(); - cy.get('input[name="addPermissionRoles"]').parent().find("button").click(); - cy.get('ul li[role="option"]').contains(addPermissionRoles).click(); - cy.get('form[role="dialog"]').click(); - cy.get('input[name="removePermissionRoles"]') - .parent() - .find("button") - .click(); - cy.get('ul li[role="option"]').contains(removePermissionRoles).click(); - cy.get('form[role="dialog"]').click(); - - if (allowPublish) { - cy.get('input[name="allowPublish"]').check(); - } else { - cy.get('input[name="allowPublish"]').uncheck(); - } - - cy.get('[data-cy="status-label-submit-button"]').click(); - - return cy - .wait(["@createStatusLabel", "@getAllStatusLabels"]) - .spread((createStatusLabel, getAllStatusLabels) => { - return { - createdStatusLabel: createStatusLabel?.response?.body?.data, - statusLabels: parseStatusLabels( - getAllStatusLabels?.response?.body?.data - ), - }; - }); - } -); - -Cypress.Commands.add("deactivateStatusLabel", (labelName) => { - cy.intercept("DELETE", `${ENDPOINTS?.statusLabels}/**`).as( - "deactivateStatusLabel" - ); - cy.intercept("GET", ENDPOINTS.allStatusLabels).as("getAllStatusLabels"); - - return cy - .get('[data-cy="active-labels-container"] [data-cy="status-label"]:visible') - .contains(labelName) - .parents('[data-cy="status-label"]') - .find("button") - .click() - .then(() => { - cy.get('ul li[role="menuitem"]').contains("Deactivate Status").click(); - - cy.get("button").contains("Deactivate Status").click(); + "apiRequest", + ({ method = "GET", url = "", body = undefined }) => { + return cy.getCookie(Cypress.env("COOKIE_NAME")).then((cookie) => { + const token = cookie?.value; return cy - .wait(["@deactivateStatusLabel", "@getAllStatusLabels"]) - .spread((deactivateStatusLabel, getAllStatusLabels) => { + .request({ + url: url, + method: method, + headers: { + authorization: `Bearer ${token}`, + }, + ...(body ? { body: body } : {}), + }) + .then((response) => { return { - deactivatedStatusLabel: deactivateStatusLabel?.response?.body?.data, - statusLabels: parseStatusLabels( - getAllStatusLabels?.response?.body?.data - ), + status: !!response?.isOkStatusCode ? "success" : "error", + data: response?.body?.data, }; }); }); -}); + } +); function parseStatusLabels(statusLabels) { const { active, deactivated } = statusLabels?.reduce( @@ -592,6 +541,5 @@ function parseStatusLabels(statusLabels) { }, { active: [], deactivated: [] } ); - return { active, deactivated }; } diff --git a/src/apps/settings/src/app/views/User/Workflows/RestrictedPage.tsx b/src/apps/settings/src/app/views/User/Workflows/RestrictedPage.tsx index b03b34233..36dc57673 100644 --- a/src/apps/settings/src/app/views/User/Workflows/RestrictedPage.tsx +++ b/src/apps/settings/src/app/views/User/Workflows/RestrictedPage.tsx @@ -69,6 +69,7 @@ const RestrictedPage = () => { bgcolor="grey.50" display="flex" flexDirection="column" + data-cy="workflows-restricted-page" > { justifyContent="space-between" alignItems="baseline" flexGrow={0} + data-cy="workflows-authorized-page" > Workflows