Skip to content

Add E2E coverage for dashboard widgets#498

Merged
dkotter merged 3 commits into
WordPress:developfrom
ekamran:shifteq/add-dashboard-widgets-e2e
May 5, 2026
Merged

Add E2E coverage for dashboard widgets#498
dkotter merged 3 commits into
WordPress:developfrom
ekamran:shifteq/add-dashboard-widgets-e2e

Conversation

@ekamran
Copy link
Copy Markdown
Contributor

@ekamran ekamran commented May 3, 2026

What?

Adds end-to-end test coverage for the AI dashboard widgets in wp-admin.

Why?

The dashboard widgets are a user-facing feature, but there was no browser-level test coverage for them. Adding E2E coverage helps catch regressions in widget visibility, onboarding state, and permissions.

How?

  • Added a new E2E spec for the dashboard widgets.
  • Verified that admins can see the AI Status and AI Capabilities widgets.
  • Verified that the AI Capabilities widget shows the expected summary metrics and the provider capabilities section.
  • Verified that the AI Status widget shows the getting started checklist when setup is incomplete.
  • Verified that non-admin users do not see the widgets.

Use of AI Tools

I used AI assistance to help review the repository, draft the E2E test file, and iterate on the test assertions. I manually reviewed the implementation, validated the behavior locally, and verified the final test runs before submitting.

Testing Instructions

  1. Start the test environment.
  2. Run:
    npm run test:e2e -- tests/e2e/specs/admin/dashboard.spec.js
  3. Confirm all 4 dashboard widget E2E tests pass.
  4. Optionally verify manually in wp-admin that:
    • admins can see the AI Status and AI Capabilities widgets
    • the AI Status widget shows the onboarding checklist when setup is incomplete
    • non-admin users do not see the widgets

Testing Instructions for Keyboard

  1. Open the WordPress admin dashboard.
  2. Use keyboard navigation to move through the dashboard widgets.
  3. Confirm the AI Status and AI Capabilities widgets are reachable and visible for admin users.

Screenshots or screencast

Not applicable.

Open WordPress Playground Preview

@github-actions
Copy link
Copy Markdown

github-actions Bot commented May 3, 2026

The following accounts have interacted with this PR and/or linked issues. I will continue to update these lists as activity occurs. You can also manually ask me to refresh this list by adding the props-bot label.

If you're merging code through a pull request on GitHub, copy and paste the following into the bottom of the merge commit message.

Co-authored-by: ekamran <ekamran@git.wordpress.org>
Co-authored-by: dkotter <dkotter@git.wordpress.org>

To understand the WordPress project's expectations around crediting contributors, please review the Contributor Attribution page in the Core Handbook.

@codecov
Copy link
Copy Markdown

codecov Bot commented May 3, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 69.16%. Comparing base (3ec6c5e) to head (411e596).
⚠️ Report is 2 commits behind head on develop.

Additional details and impacted files
@@              Coverage Diff              @@
##             develop     #498      +/-   ##
=============================================
+ Coverage      69.15%   69.16%   +0.01%     
  Complexity       981      981              
=============================================
  Files             63       63              
  Lines           4649     4648       -1     
=============================================
  Hits            3215     3215              
+ Misses          1434     1433       -1     
Flag Coverage Δ
unit 69.16% <ø> (+0.01%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@dkotter dkotter modified the milestone: 0.9.0 May 4, 2026
@dkotter dkotter assigned ekamran and unassigned ekamran May 4, 2026
Comment thread tests/e2e/specs/admin/dashboard.spec.js Outdated
Comment thread tests/e2e/specs/admin/dashboard.spec.js Outdated
Comment thread tests/e2e/specs/admin/dashboard.spec.js
@dkotter dkotter merged commit 7aa7bcd into WordPress:develop May 5, 2026
18 checks passed
@ekamran ekamran deleted the shifteq/add-dashboard-widgets-e2e branch May 5, 2026 18:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Development

Successfully merging this pull request may close these issues.

3 participants