Skip to content

Add E2E tests for Usage API.#1066

Open
rahulsprajapati wants to merge 5 commits into
developfrom
feature/api-usage-e2e
Open

Add E2E tests for Usage API.#1066
rahulsprajapati wants to merge 5 commits into
developfrom
feature/api-usage-e2e

Conversation

@rahulsprajapati

@rahulsprajapati rahulsprajapati commented Mar 20, 2026

Copy link
Copy Markdown
Contributor

Description of the Change

E2E Tests for PR #1060

TODO Tests:

  • "Usage Tracking" Feature UI exists and verify admin user role is selected by default.
  • Verify "AI Usage Tracking" settings exists within "Usage Tracking" nav menu.
  • Can save "AI Usage Tracking" settings
  • Verify we can see Dashboard Widget in default stats.
  • Run cron job and verify usage data updated from mock data.
  • Verify widget data shows correct data, from mock data.
  • Verify force refresh button works.
  • Enable soft/hard limit and confirm notice.
  • Verify tts feature can't be used when hard limit reached.

TODO Docs:

Closes #

How to test the Change

Changelog Entry

Added - Add E2E test cases for Usage Tracking Feature

Credits

Props @rahulsprajapati , ...

Checklist:

Open WordPress Playground Preview

@github-actions github-actions Bot added this to the 3.8.0 milestone Mar 20, 2026
@github-actions

Copy link
Copy Markdown

✅ WordPress Plugin Check Report

✅ Status: Passed

📊 Report

All checks passed! No errors or warnings found.


🤖 Generated by WordPress Plugin Check Action • Learn more about Plugin Check

@dkotter dkotter modified the milestones: 3.8.0, 3.9.0 Mar 20, 2026
@dkotter

dkotter commented Jun 1, 2026

Copy link
Copy Markdown
Collaborator

@rahulsprajapati Just following up on this. Is there more you were wanting to get to here or is this ready for review?

@rahulsprajapati

Copy link
Copy Markdown
Contributor Author

@rahulsprajapati Just following up on this. Is there more you were wanting to get to here or is this ready for review?

yes, need to add E2E test for all unchecked todo in description. All checked todo test case are working fine, so if you like we can split this PR in two and you can review this PR for E2E test cases. For remaining ones, we can have another issue/PR which anyone can pickup, If I can't get to it.

@jeffpaul jeffpaul moved this to In Progress in Open Source Practice Jun 2, 2026
@github-actions github-actions Bot added the needs:refresh This requires a refreshed PR to resolve. label Jun 5, 2026
@dkotter dkotter modified the milestones: 3.9.0, 4.0.0 Jun 9, 2026
@github-actions github-actions Bot removed the needs:refresh This requires a refreshed PR to resolve. label Jul 15, 2026
@ivan-ivanic-cm

Copy link
Copy Markdown
Contributor

Remaining e2e test added. Docs added.

@jeffpaul
jeffpaul marked this pull request as ready for review July 15, 2026 15:46
@jeffpaul
jeffpaul requested review from a team, dkotter and jeffpaul as code owners July 15, 2026 15:46
@jeffpaul jeffpaul moved this from In Progress to Code Review in Open Source Practice Jul 15, 2026
@github-actions github-actions Bot added the needs:code-review This requires code review. label Jul 15, 2026

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Since this PR was opened we've switched from Cypress to Playwright so this file will need migrating to Playwright

Comment thread eslint.config.mjs

export default [
// Global ignores — these directories and config files are skipped entirely.
// Global ignores — must be a standalone object with only `ignores` to apply globally.

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Curious on the changes here, was there a bug with this config file?

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Yeah, it was breaking lint lint:fix in local environment.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Might actually be about "we've switched from Cypress to Playwright" I'll check when I work on update.

@github-project-automation github-project-automation Bot moved this from Code Review to In Progress in Open Source Practice Jul 15, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

needs:code-review This requires code review.

Projects

Status: In Progress

Development

Successfully merging this pull request may close these issues.

4 participants