Skip to content

Commit

Permalink
Merge branch 'main' of github.com:ethyca/fides into LA-226-finish-cha…
Browse files Browse the repository at this point in the history
…kra-color-theme-update
  • Loading branch information
lucanovera committed Jan 14, 2025
2 parents 7e5919c + de209fe commit 5a467ba
Show file tree
Hide file tree
Showing 96 changed files with 3,230 additions and 2,008 deletions.
5 changes: 5 additions & 0 deletions .github/workflows/cypress_e2e.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,11 @@ jobs:
- name: Checkout
uses: actions/checkout@v4

- name: Setup Python 3.10
uses: actions/setup-python@v5
with:
python-version: "3.10"

- name: Install Nox
run: pip install nox>=2022

Expand Down
9 changes: 9 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,18 @@ Changes can also be flagged with a GitHub label for tracking purposes. The URL o
## [Unreleased](https://github.com/ethyca/fides/compare/2.52.0...main)

### Added
- Added Action Center MVP behind new feature flag [#5622](https://github.com/ethyca/fides/pull/5622)
- Added cache-clearing methods to the `DBCache` model to allow deleting cache entries [#5629](https://github.com/ethyca/fides/pull/5629)

### Changed
- Updated brand link url [#5656](https://github.com/ethyca/fides/pull/5656)
- Changed "Reclassify" D&D button to show in an overflow menu when row actions are overcrowded [#5655](https://github.com/ethyca/fides/pull/5655)
- Removed primary key requirements for BigQuery and Postgres erasures [#5591](https://github.com/ethyca/fides/pull/5591)

### Fixed
- Fixed issue where the custom report "reset" button was not working as expected [#5649](https://github.com/ethyca/fides/pull/5649)
- Fixed column ordering issue in the Data Map report [#5649](https://github.com/ethyca/fides/pull/5649)
- Fixed issue where the Data Map report filter dialog was missing an Accordion item label [#5649](https://github.com/ethyca/fides/pull/5649)

## [2.52.0](https://github.com/ethyca/fides/compare/2.51.2...2.52.0)

Expand Down
175 changes: 175 additions & 0 deletions clients/admin-ui/cypress/e2e/action-center.cy.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,175 @@
import { stubActionCenter, stubPlus } from "cypress/support/stubs";

import {
ACTION_CENTER_ROUTE,
INTEGRATION_MANAGEMENT_ROUTE,
} from "~/features/common/nav/v2/routes";

describe("Action center", () => {
beforeEach(() => {
cy.login();
stubPlus(true);
stubActionCenter();
});

describe("disabled web monitor", () => {
beforeEach(() => {
cy.intercept("GET", "/api/v1/config*", {
body: {
detection_discovery: {
website_monitor_enabled: false,
},
},
}).as("getTranslationConfig");
cy.visit(ACTION_CENTER_ROUTE);
});
it("should display a message that the web monitor is disabled", () => {
cy.wait("@getTranslationConfig");
cy.contains("currently disabled").should("exist");
});
});

describe("empty action center", () => {
beforeEach(() => {
cy.intercept("GET", "/api/v1/plus/discovery-monitor/aggregate-results*", {
fixture: "empty-pagination.json",
}).as("getMonitorResults");
cy.visit(ACTION_CENTER_ROUTE);
});
it("should display empty state", () => {
cy.wait("@getMonitorResults");
cy.get("[data-testid='search-bar']").should("exist");
cy.get(`[class*='ant-empty'] [class*='ant-empty-image']`).should("exist");
cy.get(
`[class*='ant-empty'] a[href="${INTEGRATION_MANAGEMENT_ROUTE}"]`,
).should("exist");
});
});

describe("Action center monitor aggregate results", () => {
const webMonitorKey = "my_web_monitor_2";
const integrationMonitorKey = "My_New_BQ_Monitor";
beforeEach(() => {
cy.visit(ACTION_CENTER_ROUTE);
});
it("should render the current monitor results", () => {
cy.get("[data-testid='Action center']").should("exist");
cy.wait("@getMonitorResults");
cy.get("[data-testid*='monitor-result-']").should("have.length", 3);
cy.get("[data-testid^='monitor-result-']").each((result) => {
const monitorKey = result
.attr("data-testid")
.replace("monitor-result-", "");
// linked title
cy.wrap(result)
.contains("assets detected")
.should("have.attr", "href", `${ACTION_CENTER_ROUTE}/${monitorKey}`);
// last monitored relative date with real date in tooltip
cy.wrap(result)
.find("[data-testid='monitor-date']")
.contains(" ago")
.realHover();
cy.get(".ant-tooltip-inner").should("contain", "December");
});
// description
cy.getByTestId(`monitor-result-${webMonitorKey}`).should(
"contain",
"92 Browser Requests, 5 Cookies detected.",
);
// monitor name
cy.getByTestId(`monitor-result-${webMonitorKey}`).should(
"contain",
"my web monitor 2",
);
});
it("should have appropriate actions for web monitors", () => {
cy.wait("@getMonitorResults");
// Add button
// TODO: [HJ-337] uncomment when Add button is implemented
// cy.getByTestId(`add-button-${webMonitorKey}`).should("exist");
// Review button
cy.getByTestId(`review-button-${webMonitorKey}`).should(
"have.attr",
"href",
`${ACTION_CENTER_ROUTE}/${webMonitorKey}`,
);
});
it.skip("Should have appropriate actions for Integrations monitors", () => {
cy.wait("@getMonitorResults");
// Classify button
cy.getByTestId(`review-button-${integrationMonitorKey}`).should(
"have.attr",
"href",
`${ACTION_CENTER_ROUTE}/${integrationMonitorKey}`,
);
// Ignore button
cy.getByTestId(`ignore-button-${integrationMonitorKey}`).should("exist");
});
it.skip("Should have appropriate actions for SSO monitors", () => {
cy.wait("@getMonitorResults");
// Add button
cy.getByTestId(`add-button-${webMonitorKey}`).should("exist");
// Ignore button
cy.getByTestId(`ignore-button-${webMonitorKey}`).should("exist");
});
it.skip("Should paginate results", () => {
// TODO: mock pagination and also test skeleton loading state
});
});

describe("Action center system aggregate results", () => {
const webMonitorKey = "my_web_monitor_1";
beforeEach(() => {
cy.visit(`${ACTION_CENTER_ROUTE}/${webMonitorKey}`);
});
it("should display a breadcrumb", () => {
cy.getByTestId("page-breadcrumb").within(() => {
cy.get("a.ant-breadcrumb-link")
.should("contain", "All activity")
.should("have.attr", "href", ACTION_CENTER_ROUTE);
cy.contains("my_web_monitor_1").should("exist");
});
});
it("should render the aggregated system results in a table", () => {
cy.wait("@getSystemAggregateResults");
cy.getByTestId("column-system_name").should("exist");
cy.getByTestId("column-total_updates").should("exist");
cy.getByTestId("column-data_use").should("exist");
cy.getByTestId("column-locations").should("exist");
cy.getByTestId("column-domains").should("exist");
cy.getByTestId("column-actions").should("exist");
cy.getByTestId("search-bar").should("exist");
cy.getByTestId("pagination-btn").should("exist");
cy.getByTestId("row-0-col-system_name").within(() => {
cy.getByTestId("change-icon").should("exist"); // new result
cy.contains("Uncategorized assets").should("exist");
});
// data use column should be empty for uncategorized assets
cy.getByTestId("row-0-col-data_use").children().should("have.length", 0);
cy.getByTestId("row-1-col-system_name").within(() => {
cy.getByTestId("change-icon").should("not.exist"); // existing result
cy.contains("Google Tag Manager").should("exist");
});
// TODO: data use column should not be empty for other assets
// cy.getByTestId("row-1-col-data_use").children().should("not.have.length", 0);

// multiple locations
cy.getByTestId("row-2-col-locations").should("contain", "2 locations");
// single location
cy.getByTestId("row-3-col-locations").should("contain", "USA");

// multiple domains
cy.getByTestId("row-0-col-domains").should("contain", "29 domains");
// single domain
cy.getByTestId("row-3-col-domains").should(
"contain",
"analytics.google.com",
);
});
// it("should navigate to table view on row click", () => {
// cy.getByTestId("row-1").click();
// cy.url().should("contain", "fds.1046");
// cy.getByTestId("page-breadcrumb").should("contain", "fds.1046");
// });
});
});
44 changes: 40 additions & 4 deletions clients/admin-ui/cypress/e2e/datamap-report.cy.ts
Original file line number Diff line number Diff line change
Expand Up @@ -323,6 +323,15 @@ describe("Data map report table", () => {
it("should filter the table by making a selection", () => {
cy.getByTestId("filter-multiple-systems-btn").click();
cy.getByTestId("datamap-report-filter-modal").should("be.visible");
cy.getByTestId("filter-modal-accordion-button")
.eq(0)
.should("have.text", "Data use");
cy.getByTestId("filter-modal-accordion-button")
.eq(1)
.should("have.text", "Data categories");
cy.getByTestId("filter-modal-accordion-button")
.eq(2)
.should("have.text", "Data subject");
cy.getByTestId("filter-modal-accordion-button").eq(1).click();
cy.getByTestId("filter-modal-checkbox-tree-categories").should(
"be.visible",
Expand Down Expand Up @@ -389,14 +398,15 @@ describe("Data map report table", () => {
cy.get("#toast-datamap-report-toast")
.should("be.visible")
.should("have.attr", "data-status", "success");
cy.getByTestId("custom-reports-trigger")
.should("contain.text", "My Custom Report")
.click();
cy.getByTestId("custom-reports-trigger").should(
"contain.text",
"My Custom Report",
);
cy.getByTestId("fidesTable").within(() => {
// reordering applied to report
cy.get("thead th").eq(2).should("contain.text", "Legal name");
// column visibility applied to report
cy.get("thead th").eq(4).should("not.contain.text", "Data subject");
cy.getByTestId("column-data_subjects").should("not.exist");
});
cy.getByTestId("group-by-menu").should(
"contain.text",
Expand Down Expand Up @@ -442,10 +452,36 @@ describe("Data map report table", () => {
cy.getByTestId("custom-reports-reset-button").click();
cy.getByTestId("apply-report-button").click();
cy.getByTestId("custom-reports-popover").should("not.be.visible");

cy.getByTestId("custom-reports-trigger").should(
"contain.text",
"Reports",
);
cy.getByTestId("fidesTable").within(() => {
// reordering reverted
cy.get("thead th").eq(2).should("contain.text", "Data categories");
// column visibility restored
cy.getByTestId("column-data_subjects").should("exist");
});
cy.getByTestId("group-by-menu").should("contain.text", "Group by system");
cy.getByTestId("more-menu").click();
cy.getByTestId("edit-columns-btn").click();
cy.get("button#data_subjects").should(
"have.attr",
"aria-checked",
"true",
);
cy.getByTestId("column-settings-close-button").click();
cy.getByTestId("filter-multiple-systems-btn").click();
cy.getByTestId("datamap-report-filter-modal")
.should("be.visible")
.within(() => {
cy.getByTestId("filter-modal-accordion-button").eq(0).click();
cy.getByTestId("checkbox-Analytics").within(() => {
cy.get("[data-checked]").should("not.exist");
});
cy.getByTestId("standard-dialog-close-btn").click();
});
});
it("should allow the user cancel a report selection", () => {
cy.wait("@getCustomReportsMinimal");
Expand Down
3 changes: 2 additions & 1 deletion clients/admin-ui/cypress/e2e/discovery-detection.cy.ts
Original file line number Diff line number Diff line change
Expand Up @@ -327,7 +327,8 @@ describe("discovery and detection", () => {
cy.getByTestId(
"row-my_bigquery_monitor.prj-bigquery-418515.test_dataset_1",
).within(() => {
cy.getByTestId("action-Reclassify").click();
cy.getByTestId("actions-overflow-btn").click();
cy.getByTestId("action-reclassify").click({ force: true });
cy.wait("@confirmResource");
});
});
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
"legal_address",
"cookie_refresh",
"data_security_practices",
"DATA_SHARED_WITH_THIRD_PARTIES",
"data_shared_with_third_parties",
"data_stewards",
"declaration_name",
"does_international_transfers",
Expand All @@ -40,16 +40,13 @@
"legal_basis_for_profiling",
"legal_basis_for_transfers",
"legitimate_interest_disclosure_url",
"link_to_processor_contract",
"processes_personal_data",
"reason_for_exemption",
"requires_data_protection_assessments",
"responsibility",
"retention_period",
"shared_categories",
"special_category_legal_basis",
"system_dependencies",
"third_country_safeguards",
"third_parties",
"system_undeclared_data_categories",
"data_use_undeclared_data_categories",
Expand Down
Loading

0 comments on commit 5a467ba

Please sign in to comment.