Repository navigation
Tests: Cover export and erase personal data request flows in admin E2E - #15688
shail-mehta wants to merge 4 commits into
Conversation
There was a problem hiding this comment.
🟢 Approval recommended
No active review issues are reported for the added export-personal-data request creation and search coverage.
No open issues 🎉
What changed in this PR
Adds Playwright coverage for creating and finding an Export Personal Data request in WordPress admin, supporting ticket #52895 without triggering a file download.
Changes:
- Creates a temporary subscriber and submits a request by username with confirmation email disabled.
- Verifies the success notice and requester email link before and after searching.
- Cleans up the request and temporary user afterward.
| File | Description |
|---|---|
tests/e2e/specs/export-personal-data.test.js |
Adds the export request creation and search test, including setup and cleanup. |
Review effort: Balanced
|
The following accounts have interacted with this PR and/or linked issues. I will continue to update these lists as activity occurs. Core Committers: Use this line as a base for the props when committing in SVN: To understand the WordPress project's expectations around crediting contributors, please review the Contributor Attribution page in the Core Handbook. Props Bot commandsYou can trigger Props Bot actions by commenting on this PR:
|
lancewillett
left a comment
There was a problem hiding this comment.
Thanks @shail-mehta. Adding a request from the form is not covered yet, and creating your own user keeps it safe in parallel.
This spec and #15668 (erase) are the same test on two screens: the same setup, cleanup, steps and checks, apart from the screen, the checkbox label and the username prefix. Please combine them into one spec that loops over both screens, the way taxonomies.test.js loops over categories and tags, and close the other PR. That halves the code to maintain.
AI review · claude-opus-5-5
Loop over both privacy request screens in one spec, matching the taxonomies pattern, so export and erase stay in sync.
|
Thanks @lancewillett — updated. Combined Export and Erase into one looped spec ( |
lancewillett
left a comment
There was a problem hiding this comment.
Approved at f2639d1. Combining export and erase into one looped spec works well, and it covers something nothing else does: no PHPUnit or E2E test exercises the Tools screens' "Send Request" form handler. The locators follow the r65275 pattern, and cleanup removes only the request and user the test created.
CI is green: parallel 39 and 38 passed, serial 72 and 72. The one retry was in general-settings-invalid-timezone.test.js, not this spec; #15750 addresses that one.
AI review · claude-opus-5-5
|
One small fix before this lands: Prettier wants the AI review · |
|
Thanks! Addressed in 6bc3cb6 |
lancewillett
left a comment
There was a problem hiding this comment.
Re-checked at 6bc3cb6. The new commit only reformats the afterEach line, Prettier passes, and E2E is green in all four jobs. Ready to land.
AI review · claude-opus-5-5
Add a requester by username on the Export Personal Data and Erase Personal Data screens, and check for the success notice and the requester in the list, including after a search. The two screens share one looped spec. Developed in: #15688 Props shailu25. See #52895. git-svn-id: https://develop.svn.wordpress.org/trunk@65330 602fd350-edb4-49c9-b593-d223f7449a82
Add a requester by username on the Export Personal Data and Erase Personal Data screens, and check for the success notice and the requester in the list, including after a search. The two screens share one looped spec. Developed in: WordPress/wordpress-develop#15688 Props shailu25. See #52895. Built from https://develop.svn.wordpress.org/trunk@65330 git-svn-id: http://core.svn.wordpress.org/trunk@64470 1a063a9b-81f0-0310-95a4-ce76da25c4cd
|
PR #15688 landed in https://core.trac.wordpress.org/changeset/65330 |
Trac Ticket: #52895
Adds admin e2e coverage for Export and Erase Personal Data request creation from ticket #52895.
What
export-personal-data.phpanderase-personal-data.phpWhy
Ticket #52895 covers both Export and Erase Personal Data. The flows are the same aside from screen, checkbox label, and username prefix, so one looped spec (like
taxonomies.test.js) keeps them in sync. Supersedes #15668.How
New Playwright spec:
tests/e2e/specs/personal-data-requests.test.js, looping over both screens.Testing instructions
npm run env:startnpm run test:e2e -- tests/e2e/specs/personal-data-requests.test.jsUse of AI Tools