Skip to content

Commit

Permalink
Merge branch 'main' into CON-206-responsys-access-and-erasure
Browse files Browse the repository at this point in the history
  • Loading branch information
RobertKeyser authored Feb 29, 2024
2 parents 2f445d3 + c00494c commit 0f93bbf
Show file tree
Hide file tree
Showing 46 changed files with 1,130 additions and 64 deletions.
14 changes: 14 additions & 0 deletions .fides/db_dataset.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2024,3 +2024,17 @@ dataset:
data_categories: [system.operations]
- name: updated_at
data_categories: [system.operations]
- name: plus_property
fields:
- name: id
data_categories: [system.operations]
- name: key
data_categories: [system.operations]
- name: name
data_categories: [system.operations]
- name: type
data_categories: [system.operations]
- name: created_at
data_categories: [system.operations]
- name: updated_at
data_categories: [system.operations]
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,10 @@ The types of changes are:
### Added
- Add Great Britain as a consent option [#4628](https://github.com/ethyca/fides/pull/4628)
- Access and Erasure support for Oracle Responsys [#4618](https://github.com/ethyca/fides/pull/4628)
- Navbar update and new properties page [#4633](https://github.com/ethyca/fides/pull/4633)

### Changed
- Update when GPP API reports signal status: ready [#4635](https://github.com/ethyca/fides/pull/4635)

## [2.30.1](https://github.com/ethyca/fides/compare/2.30.0...2.30.1)

Expand Down
5 changes: 4 additions & 1 deletion clients/admin-ui/cypress/e2e/config-wizard-plus.cy.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,11 @@ 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+.
*
* Skipping for now, these tests need to be refactored
* https://ethyca.atlassian.net/browse/PROD-1737
*/
describe("Config wizard with plus settings", () => {
describe.skip("Config wizard with plus settings", () => {
beforeEach(() => {
cy.login();
cy.intercept("GET", "/api/v1/organization/*", {
Expand Down
12 changes: 6 additions & 6 deletions clients/admin-ui/cypress/e2e/nav-bar.cy.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@ describe("Nav Bar", () => {
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("Data inventory-nav-group").within(() => {
cy.getByTestId("Systems & vendors-nav-link");
cy.getByTestId("Add systems-nav-link");
cy.getByTestId("Manage datasets-nav-link");
});
Expand All @@ -36,18 +36,18 @@ describe("Nav Bar", () => {
cy.getByTestId("Home-nav-link")
.should("have.css", "background-color")
.should("eql", ACTIVE_COLOR);
cy.getByTestId("View systems-nav-link")
cy.getByTestId("Systems & vendors-nav-link")
.should("have.css", "background-color")
.should("not.eql", ACTIVE_COLOR);

// Navigate by clicking a nav link.
cy.getByTestId("View systems-nav-link").click();
cy.getByTestId("Systems & vendors-nav-link").click();

// The nav should update which page is active.
cy.getByTestId("Home-nav-link")
.should("have.css", "background-color")
.should("not.eql", ACTIVE_COLOR);
cy.getByTestId("View systems-nav-link")
cy.getByTestId("Systems & vendors-nav-link")
.should("have.css", "background-color")
.should("eql", ACTIVE_COLOR);
});
Expand All @@ -61,7 +61,7 @@ describe("Nav Bar", () => {
cy.getByTestId("Request manager-nav-link").should("not.be.visible");

// Move to another page
cy.getByTestId("View systems-nav-link").click();
cy.getByTestId("Systems & vendors-nav-link").click();
cy.getByTestId("Request manager-nav-link").should("not.be.visible");
});
});
25 changes: 25 additions & 0 deletions clients/admin-ui/cypress/e2e/properties.cy.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
import { stubPlus } from "cypress/support/stubs";

import { PROPERTIES_ROUTE } from "~/features/common/nav/v2/routes";

describe("Properties page", () => {
beforeEach(() => {
cy.login();
stubPlus(true);
cy.visit(PROPERTIES_ROUTE);
});

it("Should render properties table", () => {
cy.intercept("GET", "/api/v1/plus/properties*", {
fixture: "properties/properties.json",
}).as("getProperties");
cy.visit(PROPERTIES_ROUTE);
cy.getByTestId("fidesTable").should("be.visible");
cy.getByTestId("fidesTable-body").find("tr").should("have.length", 2);
});

it("Should show empty table notice if there are no properties", () => {
cy.getByTestId("fidesTable").should("be.visible");
cy.getByTestId("no-results-notice").should("be.visible");
});
});
2 changes: 1 addition & 1 deletion clients/admin-ui/cypress/e2e/systems-classify.cy.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { stubPlus, stubTaxonomyEntities } from "cypress/support/stubs";

describe("Classify systems page", () => {
describe.skip("Classify systems page", () => {
beforeEach(() => {
cy.login();
cy.intercept("GET", "/api/v1/system", {
Expand Down
2 changes: 1 addition & 1 deletion clients/admin-ui/cypress/e2e/systems.cy.ts
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ describe("System management page", () => {

it("Can navigate to the system management page", () => {
cy.visit("/");
cy.getByTestId("View systems-nav-link").click();
cy.getByTestId("Systems & vendors-nav-link").click();
cy.wait("@getSystems");
cy.getByTestId("system-management");
});
Expand Down
17 changes: 17 additions & 0 deletions clients/admin-ui/cypress/fixtures/properties/properties.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
{
"items": [
{
"name": "Property A",
"type": "Website",
"key": "property_a"
},
{
"name": "Property B",
"type": "Other",
"key": "property_b"
}
],
"total": 2,
"page": 1,
"size": 50
}
4 changes: 4 additions & 0 deletions clients/admin-ui/cypress/fixtures/scopes/roles-to-scopes.json
Original file line number Diff line number Diff line change
Expand Up @@ -105,6 +105,8 @@
"privacy-request:transfer",
"privacy-request:upload_data",
"privacy-request:view_data",
"property:create",
"property:read",
"rule:create_or_update",
"rule:delete",
"rule:read",
Expand Down Expand Up @@ -334,6 +336,8 @@
"privacy-request:transfer",
"privacy-request:upload_data",
"privacy-request:view_data",
"property:create",
"property:read",
"rule:create_or_update",
"rule:delete",
"rule:read",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -108,6 +108,8 @@
"privacy-request:transfer",
"privacy-request:upload_data",
"privacy-request:view_data",
"property:create",
"property:read",
"rule:create_or_update",
"rule:delete",
"rule:read",
Expand Down
3 changes: 2 additions & 1 deletion clients/admin-ui/src/features/common/Icon/Copy.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,9 @@ export const CopyIcon = createIcon({
viewBox: "0 0 18 18",
path: (
<path
id="Vector"
d="M2.8125 15.7031H10.0312C10.3148 15.7031 10.5469 15.4711 10.5469 15.1875V13.125H12.0938V15.1875C12.0938 16.3251 11.1688 17.25 10.0312 17.25H2.8125C1.6749 17.25 0.75 16.3251 0.75 15.1875V7.96875C0.75 6.83115 1.6749 5.90625 2.8125 5.90625H4.875V7.45312H2.8125C2.52891 7.45312 2.29688 7.68516 2.29688 7.96875V15.1875C2.29688 15.4711 2.52891 15.7031 2.8125 15.7031ZM7.96875 10.5469H15.1875C15.4711 10.5469 15.7031 10.3148 15.7031 10.0312V2.8125C15.7031 2.52891 15.4711 2.29688 15.1875 2.29688H7.96875C7.68516 2.29688 7.45312 2.52891 7.45312 2.8125V10.0312C7.45312 10.3148 7.68516 10.5469 7.96875 10.5469ZM5.90625 10.0312V2.8125C5.90625 1.6749 6.83115 0.75 7.96875 0.75H15.1875C16.3251 0.75 17.25 1.6749 17.25 2.8125V10.0312C17.25 11.1688 16.3251 12.0938 15.1875 12.0938H7.96875C6.83115 12.0938 5.90625 11.1688 5.90625 10.0312Z"
fill="currentColor"
d="M15 3.75V0H10.625C9.58945 0 8.75 0.839453 8.75 1.875V13.125C8.75 14.1605 9.58945 15 10.625 15H18.125C19.1605 15 20 14.1605 20 13.125V5H16.2852C15.5625 5 15 4.4375 15 3.75ZM16.25 0V3.75H20L16.25 0ZM7.5 13.75V5H1.875C0.839453 5 0 5.83945 0 6.875V18.125C0 19.1605 0.839453 20 1.875 20H9.375C10.4105 20 11.25 19.1605 11.25 18.125V16.25H10C8.62109 16.25 7.5 15.1289 7.5 13.75Z"
/>
),
});
12 changes: 12 additions & 0 deletions clients/admin-ui/src/features/common/Icon/TrashCanOutlineIcon.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
import { createIcon } from "@fidesui/react";

export const TrashCanOutlineIcon = createIcon({
displayName: "TrashCanOutlineIcon",
viewBox: "0 0 11 12",
path: (
<path
d="M4.5166 1.60859L4.1084 2.21875H7.22363L6.81543 1.60859C6.7832 1.56133 6.72949 1.53125 6.67148 1.53125H4.6584C4.60039 1.53125 4.54668 1.55918 4.51445 1.60859H4.5166ZM7.6748 1.03711L8.46328 2.21875H8.75977H9.79102H9.96289C10.2486 2.21875 10.4785 2.44863 10.4785 2.73438C10.4785 3.02012 10.2486 3.25 9.96289 3.25H9.79102V9.78125C9.79102 10.7309 9.02188 11.5 8.07227 11.5H3.25977C2.31016 11.5 1.54102 10.7309 1.54102 9.78125V3.25H1.36914C1.0834 3.25 0.853516 3.02012 0.853516 2.73438C0.853516 2.44863 1.0834 2.21875 1.36914 2.21875H1.54102H2.57227H2.86875L3.65723 1.03496C3.88066 0.701953 4.25664 0.5 4.6584 0.5H6.67148C7.07324 0.5 7.44922 0.701953 7.67266 1.03496L7.6748 1.03711ZM2.57227 3.25V9.78125C2.57227 10.1615 2.87949 10.4688 3.25977 10.4688H8.07227C8.45254 10.4688 8.75977 10.1615 8.75977 9.78125V3.25H2.57227ZM4.29102 4.625V9.09375C4.29102 9.28281 4.13633 9.4375 3.94727 9.4375C3.7582 9.4375 3.60352 9.28281 3.60352 9.09375V4.625C3.60352 4.43594 3.7582 4.28125 3.94727 4.28125C4.13633 4.28125 4.29102 4.43594 4.29102 4.625ZM6.00977 4.625V9.09375C6.00977 9.28281 5.85508 9.4375 5.66602 9.4375C5.47695 9.4375 5.32227 9.28281 5.32227 9.09375V4.625C5.32227 4.43594 5.47695 4.28125 5.66602 4.28125C5.85508 4.28125 6.00977 4.43594 6.00977 4.625ZM7.72852 4.625V9.09375C7.72852 9.28281 7.57383 9.4375 7.38477 9.4375C7.1957 9.4375 7.04102 9.28281 7.04102 9.09375V4.625C7.04102 4.43594 7.1957 4.28125 7.38477 4.28125C7.57383 4.28125 7.72852 4.43594 7.72852 4.625Z"
fill="currentColor"
/>
),
});
1 change: 1 addition & 0 deletions clients/admin-ui/src/features/common/api.slice.ts
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@ export const baseApi = createApi({
"Plus",
"Privacy Experience Configs",
"Privacy Notices",
"Property",
"Purpose",
"System",
"System History",
Expand Down
64 changes: 64 additions & 0 deletions clients/admin-ui/src/features/common/form/inputs.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
import {
Box,
Checkbox,
Code,
EyeIcon,
Flex,
FormControl,
Expand Down Expand Up @@ -54,6 +55,7 @@ import React, {
useState,
} from "react";

import ClipboardButton from "~/features/common/ClipboardButton";
import QuestionTooltip from "~/features/common/QuestionTooltip";

type Variant = "inline" | "stacked" | "block";
Expand Down Expand Up @@ -1190,3 +1192,65 @@ export const CustomCheckbox = ({
</FormControl>
);
};

interface CustomClipboardCopyProps {
label?: string;
tooltip?: string;
variant?: Variant;
}

export const CustomClipboardCopy = ({
label,
tooltip,
variant = "inline",
...props
}: CustomClipboardCopyProps & StringField) => {
const [initialField] = useField(props);
const field = { ...initialField, value: initialField.value ?? "" };

const innerInput = (
<Code
display="flex"
justifyContent="space-between"
alignItems="center"
p={0}
width="100%"
>
<Text px={4}>{field.value}</Text>
<ClipboardButton copyText={field.value} />
</Code>
);

if (variant === "inline") {
return (
<FormControl>
<Grid templateColumns="1fr 3fr">
{label ? (
<Label htmlFor={props.id || props.name}>{label}</Label>
) : null}
<Flex alignItems="center">
<Flex flexDir="column" flexGrow={1} mr="2">
{innerInput}
</Flex>
{tooltip ? <QuestionTooltip label={tooltip} /> : null}
</Flex>
</Grid>
</FormControl>
);
}
return (
<FormControl>
<VStack alignItems="start">
{label ? (
<Flex alignItems="center">
<Label htmlFor={props.id || props.name} fontSize="xs" my={0} mr={1}>
{label}
</Label>
{tooltip ? <QuestionTooltip label={tooltip} /> : null}
</Flex>
) : null}
{innerInput}
</VStack>
</FormControl>
);
};
4 changes: 1 addition & 3 deletions clients/admin-ui/src/features/common/nav/v2/BackButton.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,7 @@ const BackButton = ({
backPath,
...props
}: { backPath: string } & FlexProps) => (
// In general Layout provides a default top padding. But on pages with
// Back buttons, we want the Back button to be higher and for the page to be less top-padded
<Flex alignItems="center" mt={-4} mb={3} {...props}>
<Flex alignItems="center" mb={6} {...props}>
<NextLink href={backPath} passHref>
<IconButton
aria-label="Back"
Expand Down
28 changes: 14 additions & 14 deletions clients/admin-ui/src/features/common/nav/v2/nav-config.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ const ALL_SCOPES = [
ScopeRegistryEnum.ORGANIZATION_UPDATE,
ScopeRegistryEnum.PRIVACY_NOTICE_READ,
ScopeRegistryEnum.PRIVACY_EXPERIENCE_READ,
ScopeRegistryEnum.PROPERTY_READ,
ScopeRegistryEnum.FIDES_CLOUD_CONFIG_READ,
ScopeRegistryEnum.CONFIG_READ,
ScopeRegistryEnum.CONFIG_UPDATE,
Expand All @@ -41,9 +42,9 @@ describe("configureNavGroups", () => {

// NOTE: the data map should _not_ include the Plus routes (/plus/datamap, /classify-systems, etc.)
expect(navGroups[1]).toMatchObject({
title: "Data map",
title: "Data inventory",
children: [
{ title: "View systems", path: routes.SYSTEM_ROUTE },
{ title: "Systems & vendors", path: routes.SYSTEM_ROUTE },
{ title: "Add systems", path: routes.ADD_SYSTEMS_ROUTE },
{ title: "Manage datasets", path: routes.DATASET_ROUTE },
],
Expand Down Expand Up @@ -78,14 +79,13 @@ describe("configureNavGroups", () => {

// The data map _should_ include the actual "/plus/datamap".
expect(navGroups[1]).toMatchObject({
title: "Data map",
title: "Data inventory",
children: [
{ title: "Reporting", path: routes.REPORTING_DATAMAP_ROUTE },
{ title: "View map", path: routes.DATAMAP_ROUTE },
{ title: "View systems", path: routes.SYSTEM_ROUTE },
{ title: "Data lineage", path: routes.DATAMAP_ROUTE },
{ title: "Systems & vendors", path: routes.SYSTEM_ROUTE },
{ title: "Add systems", path: routes.ADD_SYSTEMS_ROUTE },
{ title: "Manage datasets", path: routes.DATASET_ROUTE },
{ title: "Classify systems", path: routes.CLASSIFY_SYSTEMS_ROUTE },
{ title: "Reporting", path: routes.REPORTING_DATAMAP_ROUTE },
],
});
});
Expand All @@ -103,8 +103,8 @@ describe("configureNavGroups", () => {
});

expect(navGroups[1]).toMatchObject({
title: "Data map",
children: [{ title: "View systems", path: routes.SYSTEM_ROUTE }],
title: "Data inventory",
children: [{ title: "Systems & vendors", path: routes.SYSTEM_ROUTE }],
});
});

Expand Down Expand Up @@ -147,9 +147,9 @@ describe("configureNavGroups", () => {

// The data map should _not_ include the actual "/plus/datamap".
expect(navGroups[1]).toMatchObject({
title: "Data map",
title: "Data inventory",
children: [
{ title: "View systems", path: routes.SYSTEM_ROUTE },
{ title: "Systems & vendors", path: routes.SYSTEM_ROUTE },
{ title: "Add systems", path: routes.ADD_SYSTEMS_ROUTE },
{ title: "Manage datasets", path: routes.DATASET_ROUTE },
],
Expand Down Expand Up @@ -318,21 +318,21 @@ describe("findActiveNav", () => {
{
path: routes.SYSTEM_ROUTE,
expected: {
title: "Data map",
title: "Data inventory",
path: routes.SYSTEM_ROUTE,
},
},
{
path: routes.DATAMAP_ROUTE,
expected: {
title: "Data map",
title: "Data inventory",
path: routes.DATAMAP_ROUTE,
},
},
{
path: routes.ADD_SYSTEMS_ROUTE,
expected: {
title: "Data map",
title: "Data inventory",
path: routes.ADD_SYSTEMS_ROUTE,
},
},
Expand Down
Loading

0 comments on commit 0f93bbf

Please sign in to comment.