Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bump fideslang to 1.3.0 #1102

Closed
wants to merge 16 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
23 changes: 23 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,29 @@ The types of changes are:

## [Unreleased](https://github.com/ethyca/fides/compare/1.8.4...main)

### Added

* Dataset generation enhancements using Fides Classify for Plus users:
* Added toggle for enabling classify during generation. [#1057](https://github.com/ethyca/fides/pull/1057)
* Initial implementation of API request to kick off classify, with confirmation modal. [#1069](https://github.com/ethyca/fides/pull/1069)
* Initial Classification & Review status for generated datasets. [#1074](https://github.com/ethyca/fides/pull/1074)
* System management UI:
* New page to add a system via yaml [#1062](https://github.com/ethyca/fides/pull/1062)
* Skeleton of page to add a system manually [#1068](https://github.com/ethyca/fides/pull/1068)
* Refactor config wizard system forms to be reused for system management [#1072](https://github.com/ethyca/fides/pull/1072)
* Add additional optional fields to system management forms [#1082](https://github.com/ethyca/fides/pull/1082)
* Delete a system through the UI [#1085](https://github.com/ethyca/fides/pull/1085)

### Changed

* Changed behavior of `load_default_taxonomy` to append instead of upsert [#1040](https://github.com/ethyca/fides/pull/1040)
* Changed behavior of adding privacy declarations to decouple the actions of the "add" and "next" buttons [#1086](https://github.com/ethyca/fides/pull/1086)
* Moved system related UI components from the `config-wizard` directory to the `system` directory [#1097](https://github.com/ethyca/fides/pull/1097)
* Update fideslang to v1.3.0 [#1102](https://github.com/ethyca/fides/pull/1102)

### Fixed

* Fixed the "help" link in the UI header [#1078](https://github.com/ethyca/fides/pull/1078)

## [1.8.4](https://github.com/ethyca/fides/compare/1.8.3...1.8.4) - 2022-09-09

Expand Down
19 changes: 0 additions & 19 deletions clients/ctl/admin-ui/__tests__/features/system.slice.test.tsx

This file was deleted.

98 changes: 98 additions & 0 deletions clients/ctl/admin-ui/cypress/e2e/datasets-classify.cy.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,98 @@
/**
* This test suite is a parallel of datasets.cy.ts for testing Dataset features when the user has
* access to the Fidescls API. This suite should cover the behavior that is different when a
* dataset is classified.
*/
describe("Datasets with Fides Classify", () => {
beforeEach(() => {
cy.intercept("GET", "/api/v1/plus/health", {
statusCode: 200,
body: {
status: "healthy",
core_fidesctl_version: "1.8",
},
}).as("getPlusHealth");
});

describe("Creating datasets", () => {
it("Shows the classify switch", () => {
cy.visit("/dataset/new");
cy.getByTestId("connect-db-btn").click();

cy.getByTestId("input-classify").find("input").should("be.checked");
cy.getByTestId("input-classify").click();
cy.getByTestId("input-classify").find("input").should("not.be.checked");
});

it("Classifies the dataset after generating it", () => {
// Fill out the form.
cy.visit("/dataset/new");
cy.getByTestId("connect-db-btn").click();
cy.getByTestId("input-url").type(
"postgresql://postgres:fidesctl@fidesctl-db:5432/fidesctl_test"
);
cy.getByTestId("create-dataset-btn").click();

// A modal opens to confirm the classify request.
cy.getByTestId("confirmation-modal");

// Confirmation will kick off the chain of API calls.
cy.intercept("POST", "/api/v1/generate", {
fixture: "generate/dataset.json",
}).as("postGenerate");
cy.intercept("POST", "/api/v1/dataset", { fixture: "dataset.json" }).as(
"postDataset"
);
cy.intercept("POST", "/api/v1/plus/classification", {
fixture: "classification/create.json",
}).as("postClassification");
cy.intercept("GET", "/api/v1/dataset", { fixture: "datasets.json" }).as(
"getDatasets"
);

// Confirm the request.
cy.getByTestId("confirmation-modal").getByTestId("continue-btn").click();

cy.wait("@postGenerate");
cy.wait("@postDataset");
cy.wait("@postClassification");
cy.wait("@getDatasets");

cy.url().should("match", /dataset$/);

// The combination of Next routing and a toast message makes Cypress get weird
// when re-running this test case. Introducing a delay fixes it.
// eslint-disable-next-line cypress/no-unnecessary-waiting
cy.wait(100);
cy.getByTestId("toast-success-msg");
});
});

describe("List of datasets with classifications", () => {
beforeEach(() => {
cy.intercept("GET", "/api/v1/dataset", { fixture: "datasets.json" }).as(
"getDatasets"
);
cy.intercept("GET", "/api/v1/plus/classification", {
fixture: "classification/list.json",
}).as("getClassificationList");
});

it("Shows the each dataset's classification status", () => {
cy.visit("/dataset");
cy.wait("@getDatasets");
cy.wait("@getClassificationList");
cy.getByTestId("dataset-table");
cy.getByTestId("dataset-status-demo_users_dataset").contains("Unknown");
cy.getByTestId("dataset-status-demo_users_dataset_2").contains(
"Processing"
);
cy.getByTestId("dataset-status-demo_users_dataset_3").contains(
"Awaiting Review"
);
cy.getByTestId("dataset-status-demo_users_dataset_4").contains(
"Classified"
);
});
});
});
32 changes: 15 additions & 17 deletions clients/ctl/admin-ui/cypress/e2e/datasets.cy.ts
Original file line number Diff line number Diff line change
Expand Up @@ -283,14 +283,14 @@ describe("Dataset", () => {
const datasetAsString = JSON.stringify(dataset);
// Cypress doesn't have a native "paste" command, so instead do change the value directly
// (.type() is too slow, even with 0 delay)
cy.getByTestId("input-datasetYaml")
cy.getByTestId("input-yaml")
.click()
.invoke("val", datasetAsString)
.trigger("change");
// type just one space character to make sure the text field triggers Formik's handlers
cy.getByTestId("input-datasetYaml").type(" ");
cy.getByTestId("input-yaml").type(" ");

cy.getByTestId("create-dataset-btn").click();
cy.getByTestId("submit-yaml-btn").click();
cy.wait("@postDataset").then((interception) => {
const { body } = interception.request;
expect(body).to.eql(dataset);
Expand Down Expand Up @@ -323,16 +323,16 @@ describe("Dataset", () => {
cy.visit("/dataset/new");
cy.getByTestId("upload-yaml-btn").click();
// type something that isn't yaml
cy.getByTestId("input-datasetYaml").type("invalid: invalid: invalid");
cy.getByTestId("create-dataset-btn").click();
cy.getByTestId("error-datasetYaml").should("contain", "Could not parse");
cy.getByTestId("input-yaml").type("invalid: invalid: invalid");
cy.getByTestId("submit-yaml-btn").click();
cy.getByTestId("error-yaml").should("contain", "Could not parse");

// type something that is valid yaml and let backend render an error
cy.getByTestId("input-datasetYaml")
cy.getByTestId("input-yaml")
.clear()
.type("valid yaml that is not a dataset");
cy.getByTestId("create-dataset-btn").click();
cy.getByTestId("error-datasetYaml").should("contain", "field required");
cy.getByTestId("submit-yaml-btn").click();
cy.getByTestId("error-yaml").should("contain", "field required");
});

it("Can create a dataset by connecting to a database", () => {
Expand Down Expand Up @@ -383,13 +383,13 @@ describe("Dataset", () => {
cy.getByTestId("create-dataset-btn").click();
cy.getByTestId("error-url").should("contain", "required");

// first try generate with error payload but POST with valid payload
cy.getByTestId("input-url").type("invalid url");
// First ensure that a Generate error shows the error toast
cy.getByTestId("input-url").type("mock-url");
cy.getByTestId("create-dataset-btn").click();
cy.wait("@postGenerate");
cy.getByTestId("error-url").should("contain", "error");
cy.getByTestId("toast-error-msg");

// now switch to good generate payload but bad POST payload
// Then ensure a Dataset Create error shows the error toast
cy.intercept("POST", "/api/v1/generate", {
fixture: "generate/dataset.json",
}).as("postGenerate");
Expand All @@ -410,13 +410,11 @@ describe("Dataset", () => {
],
},
}).as("postDataset");
cy.getByTestId("input-url").type(
"valid url that will cause post to fail"
);
cy.getByTestId("input-url").type("mock-url");
cy.getByTestId("create-dataset-btn").click();
cy.wait("@postGenerate");
cy.wait("@postDataset");
cy.getByTestId("error-url").should("contain", "field required");
cy.getByTestId("toast-error-msg");
});
});

Expand Down
5 changes: 0 additions & 5 deletions clients/ctl/admin-ui/cypress/e2e/nav-bar.cy.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,6 @@ describe("Nav Bar", () => {
cy.getByTestId("nav-link-Taxonomy");
cy.getByTestId("nav-link-Systems");

// Disabled links

cy.getByTestId("nav-link-Policies").should("have.attr", "disabled");
cy.getByTestId("nav-link-User Management").should("have.attr", "disabled");
cy.getByTestId("nav-link-More").should("have.attr", "disabled");
});

it("Renders the active page based on the current route", () => {
Expand Down
Loading