Skip to content

Commit

Permalink
Merge branch 'main' into PROD-1534-hide-blocking-overlay-on-return
Browse files Browse the repository at this point in the history
  • Loading branch information
galvana committed Jan 2, 2024
2 parents 3661748 + b64133f commit 0917fc9
Show file tree
Hide file tree
Showing 57 changed files with 2,754 additions and 869 deletions.
14 changes: 14 additions & 0 deletions .fides/db_dataset.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2009,5 +2009,19 @@ dataset:
data_categories: [system.operations]
- name: required_legal_basis
data_categories: [system.operations]
- name: updated_at
data_categories: [system.operations]
- name: location_regulation_selections
fields:
- name: created_at
data_categories: [system.operations]
- name: id
data_categories: [system.operations]
- name: selected_locations
data_categories: [system.operations]
- name: selected_regulations
data_categories: [system.operations]
- name: single_row
data_categories: [system.operations]
- name: updated_at
data_categories: [system.operations]
13 changes: 10 additions & 3 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,21 +15,28 @@ The types of changes are:
- `Fixed` for any bug fixes.
- `Security` in case of vulnerabilities.

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

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

### Added
- Tooltip and styling for disabled rows in add multiple vendor view [#4498](https://github.com/ethyca/fides/pull/4498)
- Preliminary GPP support for US regions [#4498](https://github.com/ethyca/fides/pull/4504)
- Access and erasure support for Statsig Enterprise [#4429](https://github.com/ethyca/fides/pull/4429)

### Fixed
- Fixed incorrect Compass button behavior in system form [#4508](https://github.com/ethyca/fides/pull/4508)
- Omit certain fields from system payload when empty [#4508](https://github.com/ethyca/fides/pull/4525)
- Fixed issues with Compass vendor selector behavior [#4521](https://github.com/ethyca/fides/pull/4521)
- Fixed an issue where the background overlay remained visible after saving consent preferences [#4515](https://github.com/ethyca/fides/pull/4515)

### Changed
- Upgrade to use Fideslang `3.0.0` and remove associated concepts [#4502](https://github.com/ethyca/fides/pull/4502)

### Changed
- `fides.js` now sets `supportsOOB` to `false` [#4516](https://github.com/ethyca/fides/pull/4516)
- Save consent method ("accept", "reject", "save", etc.) to `fides_consent` cookie as extra metadata [#4529](https://github.com/ethyca/fides/pull/4529)
- Allow CORS for privacy center `fides.js` and `fides-ext-gpp.js` endpoints
- Replace `GPP_EXT_PATH` env var in favor of a more flexible `FIDES_JS_BASE_URL` environment variable
- Change vendor add modal on consent configuration screen to use new vendor selector [#4532](https://github.com/ethyca/fides/pull/4532)

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

Expand Down
17 changes: 6 additions & 11 deletions clients/admin-ui/cypress/e2e/consent-configuration.cy.ts
Original file line number Diff line number Diff line change
Expand Up @@ -149,7 +149,7 @@ describe("Consent configuration", () => {
cy.visit(CONFIGURE_CONSENT_ROUTE);
});

it.skip("can add a vendor without the dictionary", () => {
it("can add a vendor without the dictionary", () => {
cy.getByTestId("add-vendor-btn").click();
cy.getByTestId("input-name").type("test vendor");
cy.selectOption(
Expand Down Expand Up @@ -187,7 +187,7 @@ describe("Consent configuration", () => {
});
});

it.skip("can manually add more data uses", () => {
it("can manually add more data uses", () => {
cy.getByTestId("add-vendor-btn").click();
cy.getByTestId("add-data-use-btn").should("be.disabled");
cy.getByTestId("input-name").type("test vendor");
Expand Down Expand Up @@ -281,14 +281,9 @@ describe("Consent configuration", () => {
cy.visit(CONFIGURE_CONSENT_ROUTE);
});

it.skip("can fill in dictionary suggestions", () => {
it("can fill in dictionary suggestions", () => {
cy.getByTestId("add-vendor-btn").click();
cy.getByTestId("input-vendor_id")
.click()
.find(`.custom-creatable-select__menu-list`)
.contains("Aniview LTD")
.click();
cy.getByTestId("sparkle-btn").click();
cy.getByTestId("input-name").type("Aniview LTD{enter}");
cy.wait("@getDictionaryDeclarations");
cy.getSelectValueContainer(
"input-privacy_declarations.0.consent_use"
Expand Down Expand Up @@ -734,9 +729,9 @@ describe("Consent configuration", () => {
});
});

it.skip("can create a vendor that is not in the dictionary", () => {
it("can create a vendor that is not in the dictionary", () => {
cy.getByTestId("add-vendor-btn").click();
cy.getByTestId("input-vendor_id").type("custom vendor{enter}");
cy.getByTestId("input-name").type("custom vendor{enter}");
cy.selectOption(
"input-privacy_declarations.0.consent_use",
"analytics"
Expand Down
50 changes: 23 additions & 27 deletions clients/admin-ui/cypress/e2e/systems-plus.cy.ts
Original file line number Diff line number Diff line change
Expand Up @@ -24,42 +24,44 @@ describe("System management with Plus features", () => {
cy.intercept("GET", "/api/v1/system", {
fixture: "systems/systems.json",
}).as("getSystems");
cy.intercept({ method: "POST", url: "/api/v1/system*" }).as(
"postDictSystem"
);
});

describe("vendor list", () => {
beforeEach(() => {
stubVendorList();
cy.visit(`${SYSTEM_ROUTE}/configure/demo_analytics_system`);
cy.wait(["@getDictionaryEntries", "@getSystems", "@getSystem"]);
cy.visit(`${ADD_SYSTEMS_MANUAL_ROUTE}`);
cy.wait(["@getDictionaryEntries", "@getSystems"]);
});

it("can display the vendor list dropdown", () => {
cy.getSelectValueContainer("input-vendor_id");
cy.getSelectValueContainer("input-name");
});

it("contains type ahead dictionary entries", () => {
cy.getSelectValueContainer("input-vendor_id").type("A");
cy.get("#react-select-select-vendor_id-option-0").contains("Aniview LTD");
cy.get("#react-select-select-vendor_id-option-1").contains(
cy.getSelectValueContainer("input-name").type("A");
cy.get("#react-select-select-name-option-0").contains("Aniview LTD");
cy.get("#react-select-select-name-option-1").contains(
"Anzu Virtual Reality LTD"
);
});

it("can reset suggestions by clearing vendor input", () => {
cy.getSelectValueContainer("input-vendor_id").type("L{enter}");
cy.getSelectValueContainer("input-name").type("L{enter}");
cy.getByTestId("input-legal_name").should("have.value", "LINE");
cy.getSelectValueContainer("input-vendor_id")
.siblings(".custom-select__indicators")
.find(".custom-select__clear-indicator");
cy.getByTestId("clear-btn").click();
cy.getByTestId("input-legal_name").should("be.empty");
});

it("can't refresh suggestions immediately after populating", () => {
cy.getSelectValueContainer("input-vendor_id").type("A{enter}");
cy.getSelectValueContainer("input-name").type("A{enter}");
cy.getByTestId("refresh-suggestions-btn").should("be.disabled");
});

it("can refresh suggestions when editing a saved system", () => {
cy.getSelectValueContainer("input-vendor_id").type("A{enter}");
cy.getSelectValueContainer("input-name").type("A{enter}");
cy.fixture("systems/dictionary-system.json").then((dictSystem) => {
cy.fixture("systems/system.json").then((origSystem) => {
cy.intercept(
Expand All @@ -75,11 +77,8 @@ describe("System management with Plus features", () => {
).as("getDictSystem");
});
});
cy.intercept({ method: "PUT", url: "/api/v1/system*" }).as(
"putDictSystem"
);
cy.getByTestId("save-btn").click();
cy.wait("@putDictSystem");
cy.wait("@postDictSystem");
cy.wait("@getDictSystem");
cy.getByTestId("refresh-suggestions-btn").should("not.be.disabled");
});
Expand All @@ -88,7 +87,7 @@ describe("System management with Plus features", () => {
// the form to be mistakenly marked as dirty and the "unsaved changes"
// modal to pop up incorrectly when switching tabs
it("can switch between tabs after populating from dictionary", () => {
cy.getSelectValueContainer("input-vendor_id").type("Anzu{enter}");
cy.getSelectValueContainer("input-name").type("Anzu{enter}");
// the form fetches the system again after saving, so update the intercept with dictionary values
cy.fixture("systems/dictionary-system.json").then((dictSystem) => {
cy.fixture("systems/system.json").then((origSystem) => {
Expand All @@ -105,11 +104,8 @@ describe("System management with Plus features", () => {
).as("getDictSystem");
});
});
cy.intercept({ method: "PUT", url: "/api/v1/system*" }).as(
"putDictSystem"
);
cy.getByTestId("save-btn").click();
cy.wait("@putDictSystem");
cy.wait("@postDictSystem");
cy.wait("@getDictSystem");
cy.getByTestId("input-dpo").should("have.value", "[email protected]");
cy.getByTestId("tab-Data uses").click();
Expand All @@ -119,15 +115,15 @@ describe("System management with Plus features", () => {
});

it("locks editing for a GVL vendor when TCF is enabled", () => {
cy.getSelectValueContainer("input-vendor_id").type("Aniview{enter}");
cy.getSelectValueContainer("input-name").type("Aniview{enter}");
cy.getByTestId("locked-for-GVL-notice");
cy.getByTestId("input-description").should("be.disabled");
});

it("does not allow changes to data uses when locked", () => {
cy.getSelectValueContainer("input-vendor_id").type("Aniview{enter}");
cy.getSelectValueContainer("input-name").type("Aniview{enter}");
cy.getByTestId("save-btn").click();
cy.wait(["@putSystem", "@getSystem", "@getSystems"]);
cy.wait(["@postSystem", "@getSystem", "@getSystems"]);
cy.getByTestId("tab-Data uses").click();
cy.getByTestId("add-btn").should("not.exist");
cy.getByTestId("delete-btn").should("not.exist");
Expand All @@ -136,7 +132,7 @@ describe("System management with Plus features", () => {
});

it("does not lock editing for a non-GVL vendor", () => {
cy.getSelectValueContainer("input-vendor_id").type("L{enter}");
cy.getSelectValueContainer("input-name").type("L{enter}");
cy.getByTestId("locked-for-GVL-notice").should("not.exist");
cy.getByTestId("input-description").should("not.be.disabled");
});
Expand All @@ -156,9 +152,9 @@ describe("System management with Plus features", () => {
});

it("allows changes to data uses for non-GVL vendors", () => {
cy.getSelectValueContainer("input-vendor_id").type("L{enter}");
cy.getSelectValueContainer("input-name").type("L{enter}");
cy.getByTestId("save-btn").click();
cy.wait(["@putSystem", "@getSystem", "@getSystems"]);
cy.wait(["@postSystem", "@getSystem", "@getSystems"]);
cy.getByTestId("tab-Data uses").click();
cy.getByTestId("add-btn");
cy.getByTestId("delete-btn");
Expand Down
7 changes: 7 additions & 0 deletions clients/admin-ui/cypress/e2e/systems.cy.ts
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,13 @@ describe("System management page", () => {
}).as("getConnectionTypes");
});

it("can't create a system with the same name as an existing system", () => {
cy.visit(ADD_SYSTEMS_MANUAL_ROUTE);
cy.getByTestId("input-name").type("Demo Analytics System");
cy.getByTestId("input-description").focus();
cy.getByTestId("error-name");
});

it.skip("Can step through the flow", () => {
cy.fixture("systems/system.json").then((system) => {
cy.intercept("GET", "/api/v1/system/*", {
Expand Down
46 changes: 30 additions & 16 deletions clients/admin-ui/src/features/common/form/inputs.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,7 @@ export interface CustomInputProps {
variant?: Variant;
isRequired?: boolean;
textColor?: string;
inputRightElement?: React.ReactNode;
}

// We allow `undefined` here and leave it up to each component that uses this field
Expand All @@ -87,7 +88,17 @@ export const Label = ({
);

export const TextInput = forwardRef(
({ isPassword, ...props }: InputProps & { isPassword: boolean }, ref) => {
(
{
isPassword,
inputRightElement,
...props
}: InputProps & {
isPassword: boolean;
inputRightElement?: React.ReactNode;
},
ref
) => {
const [type, setType] = useState<"text" | "password">(
isPassword ? "password" : "text"
);
Expand All @@ -105,6 +116,9 @@ export const TextInput = forwardRef(
background="white"
focusBorderColor="primary.600"
/>
{inputRightElement ? (
<InputRightElement pr={2}>{inputRightElement}</InputRightElement>
) : null}
{isPassword ? (
<InputRightElement pr="2">
<IconButton
Expand Down Expand Up @@ -338,7 +352,7 @@ export const SelectInput = ({
...provided,
fontSize: "12px",
background: "gray.200",
color: "gray.600",
color: textColor ?? "gray.600",
fontWeight: "400",
borderRadius: "2px",
py: 1,
Expand Down Expand Up @@ -510,6 +524,7 @@ export const CustomTextInput = ({
disabled,
variant = "inline",
isRequired = false,
inputRightElement,
...props
}: CustomInputProps & StringField) => {
const [initialField, meta] = useField(props);
Expand All @@ -519,6 +534,17 @@ export const CustomTextInput = ({

const isPassword = initialType === "password";

const innerInput = (
<TextInput
{...field}
isDisabled={disabled}
data-testid={`input-${field.name}`}
placeholder={placeholder}
isPassword={isPassword}
inputRightElement={inputRightElement}
/>
);

if (variant === "inline") {
return (
<FormControl isInvalid={isInvalid} isRequired={isRequired}>
Expand All @@ -528,13 +554,7 @@ export const CustomTextInput = ({
) : null}
<Flex alignItems="center">
<Flex flexDir="column" flexGrow={1} mr="2">
<TextInput
{...field}
isDisabled={disabled}
data-testid={`input-${field.name}`}
placeholder={placeholder}
isPassword={isPassword}
/>
{innerInput}
<ErrorMessage
isInvalid={isInvalid}
message={meta.error}
Expand All @@ -558,13 +578,7 @@ export const CustomTextInput = ({
{tooltip ? <QuestionTooltip label={tooltip} /> : null}
</Flex>
) : null}
<TextInput
{...field}
isDisabled={disabled}
data-testid={`input-${field.name}`}
placeholder={placeholder}
isPassword={isPassword}
/>
{innerInput}
<ErrorMessage
isInvalid={isInvalid}
message={meta.error}
Expand Down
Loading

0 comments on commit 0917fc9

Please sign in to comment.