-
Notifications
You must be signed in to change notification settings - Fork 79
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-458-FE-Consent-reporting-page-initial-UI #5839
Merged
Merged
Changes from 47 commits
Commits
Show all changes
49 commits
Select commit
Hold shift + click to select a range
618fc1a
Add consent reporting table and new endpoint
lucanovera 1fef851
Improve code
lucanovera 48b4514
WIP
lucanovera e3f2130
Merge branch 'main' of github.com:ethyca/fides into LJ-458-FE-Consent…
lucanovera 5298895
Refactor report download
lucanovera 5dc81a0
Add refresh button
lucanovera ee585f8
Update text
lucanovera fa0ef42
Add consent lookup modal
lucanovera bdde4c7
Add privacy preference lookup functionality
lucanovera fd26ce0
Add modal for consent report download
lucanovera 1e97a41
Remove uneeded text
lucanovera a1065c6
Add link styles
lucanovera 4031b0c
User geography column
lucanovera a6962e3
Update preference column
lucanovera e7273ab
Method labels
lucanovera 9435817
Add request origin labels
lucanovera e2fa9a5
Adjust columns
lucanovera 03b5c85
use relative timestamp
lucanovera 60fe685
Update columns and date filters
lucanovera e81d3d8
adjust table size
lucanovera 376da7a
adjust column tag
lucanovera 59d1e7e
remove wrong type
lucanovera c97b79f
fix ts issue
lucanovera 49ed385
fix consent reporting dates
lucanovera eabd4b9
Add custom range date selector
lucanovera 7ebe932
improve no results message
lucanovera 232affe
update badge colors and label name
lucanovera 10af0bb
Adjust input label styles
lucanovera 5f4c1fc
Adjust modal style
lucanovera 434b8b9
uppercase for tcf
lucanovera d784a87
Add success toast
lucanovera 0669376
Fix test
lucanovera 53cf287
Add tests
lucanovera 27742d2
Fix timezone issues with date picker
lucanovera 331c0bd
Update modal
lucanovera 589a4a1
Change layout to fixed
lucanovera 78c1a69
Update tooltip
lucanovera 2bd3a8e
Remove only
lucanovera eddbbb7
Add support for tcf
lucanovera f600e0e
reset navigation on refresh
lucanovera 751df88
document hoc
lucanovera 86f22a8
close modal after download starts
lucanovera a81021a
improve types
lucanovera 7078d0a
Merge branch 'main' of github.com:ethyca/fides into LJ-458-FE-Consent…
lucanovera 22cc6c2
fix type issue
lucanovera 5528aa2
update link
lucanovera 5efed09
Update changelog
lucanovera 43a9771
update changelog to patch release
lucanovera e7d1c59
removed extra blank space
lucanovera File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -40,7 +40,7 @@ describe("Consent reporting", () => { | |
}); | ||
}); | ||
|
||
describe("downloading reports", () => { | ||
describe("results view and download report", () => { | ||
beforeEach(() => { | ||
stubPlus(true, { | ||
core_fides_version: "1.9.6", | ||
|
@@ -70,10 +70,80 @@ describe("Consent reporting", () => { | |
url: "/api/v1/plus/consent_reporting*", | ||
method: "GET", | ||
}).as("getConsentReport"); | ||
cy.getByTestId("input-from-date").type("2023-11-01"); | ||
cy.getByTestId("input-to-date").type("2023-11-07"); | ||
cy.getByTestId("input-date-range").first().type("2023-11-01"); | ||
cy.getByTestId("input-date-range").last().type("2023-11-07"); | ||
cy.getByTestId("download-btn").click(); | ||
cy.getByTestId("download-report-btn").click(); | ||
cy.wait("@getConsentReport"); | ||
}); | ||
it("can lookup specific consent preferences", () => { | ||
cy.intercept({ | ||
url: "/api/v1/current-privacy-preferences*", | ||
method: "GET", | ||
}).as("lookupConsentPreferences"); | ||
cy.getByTestId("consent-reporting-dropdown-btn").click(); | ||
cy.getByTestId("consent-preference-lookup-btn").click(); | ||
cy.getByTestId("subject-search-input").type("[email protected]{enter}"); | ||
cy.wait("@lookupConsentPreferences").then((interception) => { | ||
const { url: requestUrl } = interception.request; | ||
let url = new URL(requestUrl); | ||
let params = new URLSearchParams(url.search); | ||
expect(params.get("email")).to.equal("[email protected]"); | ||
expect(params.get("phone_number")).to.equal("[email protected]"); | ||
expect(params.get("fides_user_device_id")).to.equal("[email protected]"); | ||
expect(params.get("external_id")).to.equal("[email protected]"); | ||
}); | ||
}); | ||
it("loads the consent report table without date filters", () => { | ||
cy.intercept( | ||
{ | ||
url: "/api/v1/historical-privacy-preferences*", | ||
method: "GET", | ||
}, | ||
{ | ||
fixture: "consent-reporting/historical-privacy-preferences.json", | ||
}, | ||
).as("getConsentReport"); | ||
|
||
cy.wait("@getConsentReport").then((interception) => { | ||
const { url: requestUrl } = interception.request; | ||
let url = new URL(requestUrl); | ||
let params = new URLSearchParams(url.search); | ||
expect(params.get("request_timestamp_gt")).to.be.null; | ||
expect(params.get("request_timestamp_lt")).to.be.null; | ||
}); | ||
|
||
cy.getByTestId("fidesTable-body").children().should("have.length", 22); | ||
}); | ||
it("loads the consent report table with date filters", () => { | ||
cy.intercept( | ||
{ | ||
url: "/api/v1/historical-privacy-preferences*", | ||
method: "GET", | ||
}, | ||
{ | ||
fixture: "consent-reporting/historical-privacy-preferences.json", | ||
}, | ||
).as("getConsentReport"); | ||
|
||
cy.wait("@getConsentReport"); | ||
|
||
cy.getByTestId("input-date-range").first().type("2023-11-01"); | ||
cy.getByTestId("input-date-range").last().type("2023-11-07{enter}"); | ||
|
||
cy.wait("@getConsentReport").then((interception) => { | ||
const { url: requestUrl } = interception.request; | ||
let url = new URL(requestUrl); | ||
let params = new URLSearchParams(url.search); | ||
expect(params.get("request_timestamp_gt")).to.equal( | ||
"2023-11-01T00:00:00.000Z", | ||
); | ||
expect(params.get("request_timestamp_lt")).to.equal( | ||
"2023-11-07T23:59:59.999Z", | ||
); | ||
}); | ||
|
||
cy.getByTestId("fidesTable-body").children().should("have.length", 22); | ||
}); | ||
}); | ||
}); |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Isn't this getting cherry-picked to 2.56.2?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm asking adam about it, if I can make that patch release, I'll move the changelog. Thanks for the attention to details!