Conversation
|
👋 Jules, reporting for duty! I'm here to lend a hand with this pull request. When you start a review, I'll add a 👀 emoji to each comment to let you know I've read it. I'll focus on feedback directed at me and will do my best to stay out of conversations between you and other bots or reviewers to keep the noise down. I'll push a commit with your requested changes shortly after. Please note there might be a delay between these steps, but rest assured I'm on the job! For more direct control, you can switch me to Reactive Mode. When this mode is on, I will only act on comments where you specifically mention me with New to Jules? Learn more at jules.google/docs. For security, I will only act on instructions from the user who triggered this task. |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 367364d835
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| const newPage = await context.newPage(); | ||
|
|
||
| // Login as editor | ||
| await newPage.goto( '/wp-login.php' ); |
There was a problem hiding this comment.
Use a fresh browser context before role-specific login
Using context.newPage() here reuses the test context's existing auth state, and this suite is configured to preload storage-states/admin.json in tests/e2e/playwright.config.js, so the page is already logged in as admin before the editor/author/subscriber login flow starts. In that state, visiting /wp-login.php does not provide the normal login form, so filling #user_login/#user_pass can fail (or keep the admin session), which makes the role-based scope assertions unreliable. Create an isolated browser context (or explicitly clear/logout auth) before attempting each non-admin login.
Useful? React with 👍 / 👎.
367364d to
8f2dec2
Compare
8f2dec2 to
e0424d9
Compare
e0424d9 to
351a0d5
Compare
Codecov Report✅ All modified and coverable lines are covered by tests. 📢 Thoughts on this report? Let us know! |
Co-authored-by: erseco <1876752+erseco@users.noreply.github.com>
351a0d5 to
45cbcf1
Compare
Added a Playwright E2E test file (
tests/e2e/specs/documentate-roles-scope.spec.js) to verify theDocumentate_Scope_Filterfunctionality logic and WordPress role capabilities mappings work well together.The test ensures:
documentate_scope_term_idand subcategories.documentate_scope_term_id(this confirms author capabilities correctly mesh with scope filter).The script runs automated data setup for categories, users with specific scopes and posts using wp-env integration. All tests run locally via Playwright logic mimicking admin UI usage.
PR created automatically by Jules for task 8632494155142451783 started by @erseco