Skip to content

Commit

Permalink
Reenable most cypress tests (#2189)
Browse files Browse the repository at this point in the history
  • Loading branch information
allisonking authored Jan 10, 2023
1 parent 34c3da3 commit 5e0592b
Show file tree
Hide file tree
Showing 6 changed files with 27 additions and 38 deletions.
13 changes: 7 additions & 6 deletions clients/admin-ui/cypress/e2e/auth.cy.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
import { USER_PRIVILEGES } from "~/constants";

// TODO: Update Cypress test to reflect the nav bar 2.0
describe.skip("User Authentication", () => {
describe("User Authentication", () => {
describe("when the user not logged in", () => {
it("redirects them to the login page", () => {
cy.visit("/");
Expand Down Expand Up @@ -35,7 +34,7 @@ describe.skip("User Authentication", () => {
cy.get("#email").type("cypress-user@ethyca.com");
cy.get("#password").type("FakePassword123!{Enter}");

cy.getByTestId("nav-bar");
cy.getByTestId("Home");
});
});

Expand All @@ -46,7 +45,7 @@ describe.skip("User Authentication", () => {

it("lets them navigate to protected routes", () => {
cy.visit("/");
cy.getByTestId("Privacy Requests");
cy.getByTestId("Home");

cy.visit("/user-management");
cy.getByTestId("User Management");
Expand All @@ -70,13 +69,15 @@ describe.skip("User Authentication", () => {
cy.getByTestId("Login");
});

it("/login redirects to the onboarding flow if the user has no systems", () => {
// TODO: Update Cypress test to reflect the nav bar 2.0
it.skip("/login redirects to the onboarding flow if the user has no systems", () => {
cy.intercept("GET", "/api/v1/system", { body: [] });
cy.visit("/login");
cy.getByTestId("setup");
});

it("/login redirects to the systems page if the user has systems", () => {
// TODO: Update Cypress test to reflect the nav bar 2.0
it.skip("/login redirects to the systems page if the user has systems", () => {
cy.intercept("GET", "/api/v1/system", { fixture: "systems.json" }).as(
"getSystems"
);
Expand Down
21 changes: 7 additions & 14 deletions clients/admin-ui/cypress/e2e/config-wizard-plus.cy.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,6 @@ import { ClusterHealth } from "~/types/api";
const goToDataFlowScanner = () => {
// Go through the initial config wizard steps
cy.visit("/add-systems");
cy.getByTestId("guided-setup-btn").click();
cy.wait("@getOrganization");

// Select Runtime scanner to move to scan step.
cy.getByTestId("add-system-form");
Expand All @@ -21,8 +19,7 @@ const goToDataFlowScanner = () => {
* This test suite is a parallel of config-wizard.cy.ts for testing the config wizard flow
* when the user has access to the Fides+.
*/
// TODO: Update Cypress test to reflect the nav bar 2.0
describe.skip("Config wizard with plus settings", () => {
describe("Config wizard with plus settings", () => {
beforeEach(() => {
cy.login();
cy.intercept("GET", "/api/v1/organization/*", {
Expand All @@ -37,17 +34,15 @@ describe.skip("Config wizard with plus settings", () => {
describe("Data flow scanner health", () => {
it("Disables data flow scanner button if it is not enabled", () => {
stubPlus(true, {
core_fidesctl_version: "1.9.6",
fidesctl_plus_server: "healthy",
fidescls_version: "1.0.3",
core_fides_version: "1.9.6",
fidesplus_server: "healthy",
system_scanner: {
enabled: false,
cluster_health: null,
cluster_error: null,
},
});
cy.visit("/add-systems");
cy.getByTestId("guided-setup-btn").click();
cy.getByTestId("add-system-form");

cy.wait("@getPlusHealth");
Expand All @@ -58,17 +53,15 @@ describe.skip("Config wizard with plus settings", () => {

it("Can show the scanner as unhealthy", () => {
stubPlus(true, {
core_fidesctl_version: "1.9.6",
fidesctl_plus_server: "healthy",
fidescls_version: "1.0.3",
core_fides_version: "1.9.6",
fidesplus_server: "healthy",
system_scanner: {
enabled: true,
cluster_health: ClusterHealth.UNHEALTHY,
cluster_error: null,
},
});
cy.visit("/add-systems");
cy.getByTestId("guided-setup-btn").click();
cy.getByTestId("add-system-form");

cy.wait("@getPlusHealth");
Expand All @@ -82,7 +75,6 @@ describe.skip("Config wizard with plus settings", () => {
it("Can show the scanner as enabled and healthy", () => {
stubPlus(true);
cy.visit("/add-systems");
cy.getByTestId("guided-setup-btn").click();
cy.getByTestId("add-system-form");

cy.wait("@getPlusHealth");
Expand Down Expand Up @@ -241,7 +233,8 @@ describe.skip("Config wizard with plus settings", () => {
cy.getByTestId("add-system-form");
});

it("Resets the flow when it is completed", () => {
// TODO: Update Cypress test to reflect the nav bar 2.0
it.skip("Resets the flow when it is completed", () => {
goToDataFlowScanner();
cy.wait("@putScanResults");
cy.getByTestId("scan-results");
Expand Down
12 changes: 3 additions & 9 deletions clients/admin-ui/cypress/e2e/config-wizard.cy.ts
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
import { stubSystemCrud, stubTaxonomyEntities } from "cypress/support/stubs";

// TODO: Update Cypress test to reflect the nav bar 2.0
describe.skip("Config Wizard", () => {
describe("Config Wizard", () => {
beforeEach(() => {
cy.login();
cy.intercept("GET", "/api/v1/organization/*", {
fixture: "organization.json",
}).as("getOrganization");
});

describe("Organization setup", () => {
// TODO: Update Cypress test to reflect the nav bar 2.0
describe.skip("Organization setup", () => {
beforeEach(() => {
cy.intercept("PUT", "/api/v1/organization**", {
fixture: "organization.json",
Expand Down Expand Up @@ -53,10 +53,7 @@ describe.skip("Config Wizard", () => {
stubSystemCrud();
stubTaxonomyEntities();

// Move past organization step.
cy.visit("/add-systems");
cy.getByTestId("guided-setup-btn").click();
cy.wait("@getOrganization");
// Select AWS to move to form step.
cy.getByTestId("add-system-form");
cy.getByTestId("aws-btn").click();
Expand Down Expand Up @@ -148,10 +145,7 @@ describe.skip("Config Wizard", () => {
stubSystemCrud();
stubTaxonomyEntities();

// Move past organization step.
cy.visit("/add-systems");
cy.getByTestId("guided-setup-btn").click();
cy.wait("@getOrganization");
// Select Okta to move to form step.
cy.getByTestId("add-system-form");
cy.getByTestId("okta-btn").click();
Expand Down
7 changes: 4 additions & 3 deletions clients/admin-ui/cypress/e2e/datasets-classify.cy.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@ import { ClassificationResponse, ClassificationStatus } from "~/types/api";
* access to the Fidescls API. This suite should cover the behavior that is different when a
* dataset is classified.
*/
// TODO: Update Cypress test to reflect the nav bar 2.0
describe.skip("Datasets with Fides Classify", () => {

describe("Datasets with Fides Classify", () => {
beforeEach(() => {
cy.login();
});
Expand All @@ -36,7 +36,8 @@ describe.skip("Datasets with Fides Classify", () => {
cy.getByTestId("input-classify").find("input").should("not.be.checked");
});

it("Can render the 'Status' column and classification status badges in the dataset table when plus features are enabled", () => {
// TODO: Update Cypress test to reflect the nav bar 2.0
it.skip("Can render the 'Status' column and classification status badges in the dataset table when plus features are enabled", () => {
cy.visit("/");
cy.getByTestId("nav-link-Datasets").click();
cy.wait("@getDatasets");
Expand Down
6 changes: 3 additions & 3 deletions clients/admin-ui/cypress/e2e/datasets.cy.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,7 @@ import {
stubPlus,
} from "cypress/support/stubs";

// TODO: Update Cypress test to reflect the nav bar 2.0
describe.skip("Dataset", () => {
describe("Dataset", () => {
beforeEach(() => {
cy.login();
stubDatasetCrud();
Expand All @@ -14,7 +13,8 @@ describe.skip("Dataset", () => {
});

describe("List of datasets view", () => {
it("Can navigate to the datasets list view", () => {
// TODO: Update Cypress test to reflect the nav bar 2.0
it.skip("Can navigate to the datasets list view", () => {
cy.visit("/");
cy.getByTestId("nav-link-Datasets").click();
cy.wait("@getDatasets");
Expand Down
6 changes: 3 additions & 3 deletions clients/admin-ui/cypress/e2e/taxonomy.cy.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
// TODO: Update Cypress test to reflect the nav bar 2.0
describe.skip("Taxonomy management page", () => {
describe("Taxonomy management page", () => {
beforeEach(() => {
cy.login();
cy.intercept("GET", "/api/v1/data_category", {
Expand All @@ -16,7 +15,8 @@ describe.skip("Taxonomy management page", () => {
}).as("getDataQualifiers");
});

it("Can navigate to the taxonomy page", () => {
// TODO: Update Cypress test to reflect the nav bar 2.0
it.skip("Can navigate to the taxonomy page", () => {
cy.visit("/");
cy.getByTestId("nav-link-Taxonomy").click();
cy.getByTestId("taxonomy-tabs");
Expand Down

0 comments on commit 5e0592b

Please sign in to comment.