Skip to content

Commit

Permalink
Merge branch 'main' into invite-users-via-email
Browse files Browse the repository at this point in the history
  • Loading branch information
allisonking committed Jan 11, 2024
2 parents d45dc93 + 7efe458 commit 2d2ceee
Show file tree
Hide file tree
Showing 96 changed files with 952 additions and 1,626 deletions.
8 changes: 8 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,10 +20,18 @@ The types of changes are:
### Added
- Erasure support for AppsFlyer [#4512](https://github.com/ethyca/fides/pull/4512)
- Invite users via email flow [#4539](https://github.com/ethyca/fides/pull/4539)
- Consent support for Klaviyo [#4513](https://github.com/ethyca/fides/pull/4513)

### Changed
- Redesigned nav bar for the admin UI [#4548](https://github.com/ethyca/fides/pull/4548)

### Fixed
- Fixed an issue blocking Salesforce sandbox accounts from refreshing tokens [#4547](https://github.com/ethyca/fides/pull/4547)
- Fixed DSR zip packages to be unzippable on Windows [#4549](https://github.com/ethyca/fides/pull/4549)

### Changed
- No longer generate the `vendors_disclosed` section of the TC string in `fides.js` [#4553](https://github.com/ethyca/fides/pull/4553)


## [2.27.0](https://github.com/ethyca/fides/compare/2.26.0...2.27.0)

Expand Down
83 changes: 83 additions & 0 deletions clients/admin-ui/cypress/components/MainSideNav.cy.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,83 @@
import * as React from "react";

import { UnconnectedMainSideNav } from "~/features/common/nav/v2/MainSideNav";
import {
configureNavGroups,
findActiveNav,
NavConfigGroup,
} from "~/features/common/nav/v2/nav-config";

const ACTIVE_BACKGROUND_COLOR = "rgb(119, 69, 240)";
const INACTIVE_BACKGROUND_COLOR = "rgba(0, 0, 0, 0)";

const selectLinkColor = (title: string) =>
cy.contains("a", title).should("have.css", "background-color");

const verifyActiveState = ({
active,
inactive,
}: {
active: string[];
inactive: string[];
}) => {
active.forEach((title) => {
selectLinkColor(title).should("eql", ACTIVE_BACKGROUND_COLOR);
});
inactive.forEach((title) => {
selectLinkColor(title).should("eql", INACTIVE_BACKGROUND_COLOR);
});
};

describe("UnconnectedMainSideNav", () => {
it("renders children nav links", () => {
const config: NavConfigGroup[] = [
{
title: "Consent",
routes: [
{
title: "Privacy notices",
path: "/consent/privacy-notices",
scopes: [],
},
{
title: "Privacy experiences",
path: "/consent/privacy-experiences",
scopes: [],
},
],
},
{
title: "Management",
routes: [
{
title: "Users",
path: "/users",
scopes: [],
},
],
},
];
const navGroups = configureNavGroups({
config,
userScopes: [],
});
const path = "/consent/privacy-notices";
const activeNav = findActiveNav({ navGroups, path });

// First check if the active path is /consent/privacy-notices
cy.mount(<UnconnectedMainSideNav groups={navGroups} active={activeNav} />);

// Renders groups as buttons (for accordion)
cy.contains("nav button", "Consent");

// Renders links as links
cy.contains("nav a", "Privacy notices");
cy.contains("nav a", "Privacy experiences");
cy.contains("nav a", "Users");

verifyActiveState({
active: ["Privacy notices"],
inactive: ["Privacy experiences", "Users"],
});
});
});
126 changes: 0 additions & 126 deletions clients/admin-ui/cypress/components/NavSideBar.cy.tsx

This file was deleted.

3 changes: 1 addition & 2 deletions clients/admin-ui/cypress/e2e/datasets.cy.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,7 @@ describe("Dataset", () => {
describe("List of datasets view", () => {
it("Can navigate to the datasets list view", () => {
cy.visit("/");
cy.contains("nav a", "Data map").click();
cy.contains("nav a", "Manage datasets").click();
cy.getByTestId("Manage datasets-nav-link").click();
cy.wait("@getFilteredDatasets");
cy.getByTestId("dataset-table");
cy.getByTestId("dataset-row-demo_users_dataset_4");
Expand Down
50 changes: 39 additions & 11 deletions clients/admin-ui/cypress/e2e/nav-bar.cy.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,37 +3,65 @@ describe("Nav Bar", () => {
cy.login();
});

it("renders all navigation links", () => {
it("renders all navigation groups with links inside", () => {
cy.visit("/");

cy.get("nav a").should("have.length", 3);
cy.contains("nav a", "Home");
cy.contains("nav a", "Data map");
cy.contains("nav a", "Privacy requests");
cy.get("nav button").should("have.length", 4);
cy.getByTestId("Overview-nav-group").within(() => {
cy.getByTestId("Home-nav-link");
});
cy.getByTestId("Data map-nav-group").within(() => {
cy.getByTestId("View systems-nav-link");
cy.getByTestId("Add systems-nav-link");
cy.getByTestId("Manage datasets-nav-link");
});
cy.getByTestId("Privacy requests-nav-group").within(() => {
cy.getByTestId("Request manager-nav-link");
cy.getByTestId("Connection manager-nav-link");
});
cy.getByTestId("Management-nav-group").within(() => {
cy.getByTestId("Users-nav-link");
cy.getByTestId("Organization-nav-link");
cy.getByTestId("Taxonomy-nav-link");
cy.getByTestId("About Fides-nav-link");
});
});

it("styles the active navigation link based on the current route", () => {
const ACTIVE_COLOR = "rgb(17, 20, 57)";
const ACTIVE_COLOR = "rgb(119, 69, 240)";
// Start on the Home page
cy.visit("/");

// The nav should reflect the active page.
cy.contains("nav a", "Home")
cy.getByTestId("Home-nav-link")
.should("have.css", "background-color")
.should("eql", ACTIVE_COLOR);
cy.contains("nav a", "Data map")
cy.getByTestId("View systems-nav-link")
.should("have.css", "background-color")
.should("not.eql", ACTIVE_COLOR);

// Navigate by clicking a nav link.
cy.contains("nav a", "Data map").click();
cy.getByTestId("View systems-nav-link").click();

// The nav should update which page is active.
cy.contains("nav a", "Home")
cy.getByTestId("Home-nav-link")
.should("have.css", "background-color")
.should("not.eql", ACTIVE_COLOR);
cy.contains("nav a", "Data map")
cy.getByTestId("View systems-nav-link")
.should("have.css", "background-color")
.should("eql", ACTIVE_COLOR);
});

it("can collapse nav groups and persist across page views", () => {
cy.visit("/");
cy.getByTestId("Request manager-nav-link").should("be.visible");
cy.getByTestId("Privacy requests-nav-group").within(() => {
cy.get("button").click();
});
cy.getByTestId("Request manager-nav-link").should("not.be.visible");

// Move to another page
cy.getByTestId("View systems-nav-link").click();
cy.getByTestId("Request manager-nav-link").should("not.be.visible");
});
});
3 changes: 1 addition & 2 deletions clients/admin-ui/cypress/e2e/organization.cy.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,7 @@ describe("Organization page", () => {

it("can navigate to the Organization page", () => {
cy.visit("/");
cy.getByTestId("management-btn").click();
cy.contains("nav a", "Organization").click();
cy.getByTestId("Organization-nav-link").click();
cy.getByTestId("organization-management");
});

Expand Down
3 changes: 1 addition & 2 deletions clients/admin-ui/cypress/e2e/systems.cy.ts
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,7 @@ describe("System management page", () => {

it("Can navigate to the system management page", () => {
cy.visit("/");
cy.contains("nav a", "Data map").click();
cy.contains("nav a", "View systems").click();
cy.getByTestId("View systems-nav-link").click();
cy.wait("@getSystems");
cy.getByTestId("system-management");
});
Expand Down
3 changes: 1 addition & 2 deletions clients/admin-ui/cypress/e2e/taxonomy.cy.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,7 @@ describe("Taxonomy management page", () => {

it("Can navigate to the taxonomy page", () => {
cy.visit("/");
cy.getByTestId("management-btn").click();
cy.contains("nav a", "Taxonomy").click();
cy.getByTestId("Taxonomy-nav-link").click();
cy.getByTestId("taxonomy-tabs");
cy.getByTestId("tab-Data Categories");
cy.getByTestId("tab-Data Uses");
Expand Down
16 changes: 16 additions & 0 deletions clients/admin-ui/public/logo-white.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading

0 comments on commit 2d2ceee

Please sign in to comment.