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

PROD-1950 Display all custom fields on privacy request form #5029

Merged
Show file tree
Hide file tree
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
Expand Up @@ -31,6 +31,7 @@ The types of changes are:
- Replaces typescript-cookie with js-cookie [#5022](https://github.com/ethyca/fides/pull/5022)
- Updated pymongo version to 4.7.3 [#5019](https://github.com/ethyca/fides/pull/5019)
- Upgraded Datamap instance of `react-table` to v8 [#5024](https://github.com/ethyca/fides/pull/5024)
- Updated create privacy request modal from admin-ui to include all custom fields [#5029](https://github.com/ethyca/fides/pull/5029)
- Update name of Ingress/Egress columns in Datamap Report to Sources/Destinations [#5045](https://github.com/ethyca/fides/pull/5045)

### Fixed
Expand Down
5 changes: 4 additions & 1 deletion clients/admin-ui/cypress/e2e/privacy-requests.cy.ts
Original file line number Diff line number Diff line change
Expand Up @@ -230,7 +230,7 @@ describe("Privacy Requests", () => {
).should("exist");
cy.getByTestId(
"input-custom_privacy_request_fields.hidden_field.value"
).should("not.exist");
).should("exist");
cy.getByTestId(
"input-custom_privacy_request_fields.field_with_default_value.value"
).should("have.value", "The default value");
Expand All @@ -245,6 +245,9 @@ describe("Privacy Requests", () => {
cy.getByTestId(
"input-custom_privacy_request_fields.required_field.value"
).type("A value for the required field");
cy.getByTestId(
"input-custom_privacy_request_fields.hidden_field.value"
).type("A value for the hidden but required field");
cy.getByTestId("input-is_verified").click();
cy.intercept("POST", "/api/v1/privacy-request/authenticated", {
statusCode: 200,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,11 @@ const SubmitPrivacyRequestModal = ({
return (
<Modal isOpen={isOpen} onClose={onClose} size="2xl" isCentered>
<ModalOverlay />
<ModalContent data-testid="submit-request-modal">
<ModalContent
data-testid="submit-request-modal"
maxHeight="80%"
overflowY="auto"
>
<ModalHeader>Create privacy request</ModalHeader>
<ModalBody>
<Stack spacing={4}>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -73,17 +73,15 @@ const CustomFields = ({
const allInputs = Object.entries(customFieldInputs);
return (
<>
{allInputs.map(([fieldName, fieldInfo]) =>
!fieldInfo.hidden ? (
<CustomTextInput
name={`custom_privacy_request_fields.${fieldName}.value`}
key={fieldName}
label={fieldInfo.label}
isRequired={fieldInfo.required}
variant="stacked"
/>
) : null
)}
{allInputs.map(([fieldName, fieldInfo]) => (
<CustomTextInput
name={`custom_privacy_request_fields.${fieldName}.value`}
key={fieldName}
label={fieldInfo.label}
isRequired={fieldInfo.required}
variant="stacked"
/>
))}
</>
);
};
Expand Down
Loading