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

LJ-309: allow privacy notices to be assigned to TCF components #5730

Merged
merged 6 commits into from
Feb 6, 2025
Merged
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
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -28,6 +28,7 @@ Changes can also be flagged with a GitHub label for tracking purposes. The URL o
- Added frequency field to DataHubSchema integration config [#5716](https://github.com/ethyca/fides/pull/5716)
- Added glossary_node field to DataHubSchema integration config [#5734](https://github.com/ethyca/fides/pull/5734)
- Added initial support for upcoming "headless" CMP experience type [#5731](https://github.com/ethyca/fides/pull/5731)
- Exposes privacy notice picker for TCF components [#5730](https://github.com/ethyca/fides/pull/5730)

### Fixed
- Fixed `fides annotate dataset` command enters incorrect value on the `direction` field. [#5727](https://github.com/ethyca/fides/pull/5727)
10 changes: 9 additions & 1 deletion clients/admin-ui/cypress/e2e/privacy-experiences.cy.ts
Original file line number Diff line number Diff line change
@@ -266,7 +266,7 @@ describe("Privacy experiences", () => {
});

it("shows option to display privacy notices in banner and updates preview when clicked", () => {
cy.getByTestId("input-show_layer1_notices").should("not.be.visible");
cy.getByTestId("input-show_layer1_notices").should("not.exist");
cy.getByTestId("controlled-select-component").antSelect(
"Banner and modal",
);
@@ -279,6 +279,14 @@ describe("Privacy experiences", () => {
.contains("Essential");
});

it("does not show option to display privacy notices in modal preview when clicked", () => {
cy.getByTestId("input-show_layer1_notices").should("not.exist");
cy.getByTestId("controlled-select-component").antSelect("Modal");
cy.getByTestId("add-privacy-notice").click();
cy.getByTestId("select-privacy-notice").antSelect(0);
cy.getByTestId("input-show_layer1_notices").should("not.exist");
});

it("allows editing experience text and shows updated text in the preview", () => {
cy.getByTestId("controlled-select-component").antSelect(
"Banner and modal",
Original file line number Diff line number Diff line change
@@ -229,22 +229,22 @@ export const PrivacyExperienceForm = ({
baseTestId="property"
/>
<Divider />
{values.component !== ComponentType.TCF_OVERLAY ? (
<Heading fontSize="md" fontWeight="semibold">
Privacy notices
</Heading>
<ScrollableList
addButtonLabel="Add privacy notice"
allItems={filterNoticesForOnlyParentNotices().map((n) => n.id)}
values={values.privacy_notice_ids ?? []}
setValues={(newValues) =>
setFieldValue("privacy_notice_ids", newValues)
}
getItemLabel={getPrivacyNoticeName}
draggable
baseTestId="privacy-notice"
/>
{values.component === ComponentType.BANNER_AND_MODAL ? (
<>
<Heading fontSize="md" fontWeight="semibold">
Privacy notices
</Heading>
<ScrollableList
addButtonLabel="Add privacy notice"
allItems={filterNoticesForOnlyParentNotices().map((n) => n.id)}
values={values.privacy_notice_ids ?? []}
setValues={(newValues) =>
setFieldValue("privacy_notice_ids", newValues)
}
getItemLabel={getPrivacyNoticeName}
draggable
baseTestId="privacy-notice"
/>
<Collapse in={!!values.privacy_notice_ids?.length} animateOpacity>
<Box p="1px">
<CustomSwitch