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

Feat/export wins review cookie page #7008

Merged
merged 11 commits into from
Aug 9, 2024
Merged

Conversation

peterhudec
Copy link
Contributor

@peterhudec peterhudec commented Jul 24, 2024

Description of change

  • Adds a cookie banner to the very top of all /exportwins/review/* pages, but only if the user has not set a cookie preference before
  • Adds the /exportwins/review/cookies page where users can manage their cookie preference, which if set, is preserved in local storage.

This PR includes cherry picked commits from #6965 and #7003 so ideally they should be merged before this PR is reviewed.

Test instructions

No previous preference set

Screenshot 2024-08-08 at 13 28 00 User accepts Screenshot 2024-08-08 at 13 48 37

User rejects
Screenshot 2024-08-08 at 13 47 44

  1. Ensure that your browser doesn't have the cookie-preference key set on the local storage for the host on which you are testing this feature
  2. Navigate to following URLs
    • /exportwins/review/<token>
    • /exportwins/review/thankyou
    • /exportwins/review/accesibility-statement
    • /exportwins/review/cookies
  3. Each of the above pages should render a cookie banner on the very top of the page with two buttons Accept analytics cookies and Reject analytics cookies and a "View cookies" link to /exportwins/review/cookies
  4. Click on one of the two buttons
  5. The cookie banner should disappear immediately
  6. A confirmation message in a green box reflecting the chosen preference should appear in the page's header
  7. Navigate to /exportwins/review/cookies (you should be able to do so by clicking on the "Cookies" footer link)
  8. The chosen preference should be reflected in the Do you want to accept analytics cookies? radio button group
  9. Repeat steps 4 to 7 but this time click the other button in the cookie banner (you need to clear the cookie-preference key from the local storage in Developer Tools -> Application -> Local storage)

Existing preference set in the local storage

  1. Ensure that your browser does have the cookie-preference key set on the local storage for the host on which you are testing this feature (you can do so by following the steps above)
  2. Navigate to following URLs
    • /exportwins/review/<token>
    • /exportwins/review/thankyou
    • /exportwins/review/accesibility-statement
    • /exportwins/review/cookies
  3. None of the above pages should show the cookie banner

The Cookie page

  1. Ensure that your browser doesn't have the cookie-preference key set on the local storage for the host on which you are testing this feature
  2. Navigate to /exportwins/review/cookies
  3. The cookie banner should appear on top of the page
  4. None of the radio buttons of the Do you want to accept analytics cookies? group should be selected
  5. Select one of the radio buttons
  6. Click the Save cookie settings button or hit enter
  7. The cookie banner should disappear immediately
  8. A confirmation message in a green box should appear in the page's header reflecting the chosen preference
  9. Repeat from step 1, but this time check the other radio button
  10. Repeat from step 1 to step 4
  11. Now instead of the radio buttons, choose the preference by clicking on one of the buttons in the cookie banner
  12. The radio button corresponding to the chosen preference should be immediately checked
  13. Continue with steps 7 and 8
  14. Repeat steps 1 to 4 and 12 to 14 but this time selecting the other preference throght the cookie banner
Screenshot 2024-08-08 at 13 54 19

Checklist

  • Has the branch been rebased to main?
  • Automated tests (Any of the following when applicable: Unit, Functional or End-to-End)
  • Manual compatibility testing (Browsers: Chrome, Firefox, Edge, Safari)

@peterhudec peterhudec force-pushed the feat/export-wins-review-cookie-page branch from 640e74f to f7ad686 Compare July 25, 2024 14:11
Copy link

cypress bot commented Jul 25, 2024



Test summary

15 0 0 0


Run details

Project data-hub-frontend
Status Passed
Commit 55e6d06
Started Aug 8, 2024 2:55 PM
Ended Aug 8, 2024 2:57 PM
Duration 01:44 💡
OS Linux Debian -
Browser Chrome 121

View run in Cypress Cloud ➡️


This comment has been generated by cypress-bot as a result of this project's GitHub integration settings. You can manage this integration in this project's settings in the Cypress Cloud

@paulgain paulgain force-pushed the feat/export-wins-review-cookie-page branch from ac36552 to 55c9ae6 Compare August 7, 2024 09:06
@paulgain paulgain force-pushed the feat/export-wins-review-cookie-page branch from 55c9ae6 to 799fc23 Compare August 7, 2024 12:08
@paulgain paulgain marked this pull request as ready for review August 8, 2024 12:55
@paulgain paulgain requested a review from a team as a code owner August 8, 2024 12:55
Copy link
Contributor

@cgsunkel cgsunkel left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I have a few small comments

src/client/modules/ExportWins/Review/CookiePage/saga.js Outdated Show resolved Hide resolved
src/client/modules/ExportWins/Review/Layout.jsx Outdated Show resolved Hide resolved
test/component/cypress/specs/Task/RecentResult.cy.jsx Outdated Show resolved Hide resolved
src/client/modules/ExportWins/Review/Layout.jsx Outdated Show resolved Hide resolved
test/functional/cypress/specs/export-win/dashboard-spec.js Outdated Show resolved Hide resolved
@paulgain
Copy link
Contributor

paulgain commented Aug 8, 2024

I have a few small comments

Thanks Chris 👍

@paulgain paulgain merged commit 3955d1d into main Aug 9, 2024
14 checks passed
@paulgain paulgain deleted the feat/export-wins-review-cookie-page branch August 9, 2024 05:52
chopkinsmade pushed a commit that referenced this pull request Aug 9, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants