Skip to content

Improve WooCommerce Test Reliability#1123

Open
n7studios wants to merge 4 commits into
mainfrom
tests-improve-wc-reliability
Open

Improve WooCommerce Test Reliability#1123
n7studios wants to merge 4 commits into
mainfrom
tests-improve-wc-reliability

Conversation

@n7studios

Copy link
Copy Markdown
Contributor

Summary

Improves reliability of WooCommerce tests by:

  • waiting for the success notice to display before interacting with it,
  • removing the "Your store does not appear to be using a secure connection" notice, which shifts the DOM, resulting in the mouseOver event hovering over the wrong row in a table.

Testing

Existing tests pass.

Checklist

@n7studios n7studios self-assigned this Jun 29, 2026
@github-actions

Copy link
Copy Markdown

WordPress Playground

🚀 Your PR has been built and is ready for testing in WordPress Playground!

Click here to test your changes in WordPress Playground

@Kit Kit deleted a comment from github-actions Bot Jun 29, 2026
@n7studios n7studios requested review from a team, ciccio-kit and noelherrick and removed request for a team June 29, 2026 04:32
@n7studios n7studios marked this pull request as ready for review June 29, 2026 04:32
// Click Quick Edit link.
// Display all row actions by adding the `visible` class, as
// moveMouseOver() is flaky.
$I->executeJS(

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.

This is a bit problematic as it could hide a regression. What are your thoughts on wrapping this in a retry instead? It looks like Codeception has some built in "retry" logic (at least 4.x does).

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

The retry logic is still flaky at times, which is why I went for this method. I don't think it'll hide a regression - it just ensures that the row actions are displayed automatically, rather than being displayed on mouse over.

We're not testing the row actions themselves - they're built in to WordPress. This is so we can reliably get WordPress' Quick Edit form to display. What's being tested is that the Quick Edit form's values are saved after changing, which follows this line.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants