-
Notifications
You must be signed in to change notification settings - Fork 21
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix e2e tests failed with WC 9.1 #2457
Conversation
Because of the change in woocommerce/woocommerce#47860
Because of the change woocommerce/woocommerce#48192
There were more options added in `options` query parameter, so adding a `.*` for the URL matching pattern
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## develop #2457 +/- ##
=======================================
Coverage 63.4% 63.4%
=======================================
Files 321 321
Lines 5027 5027
Branches 1219 1219
=======================================
Hits 3188 3188
Misses 1672 1672
Partials 167 167
Flags with carried forward coverage won't be shown. Click here to find out more. |
Not sure if related but I see this error when running E2E tests in GH https://github.com/woocommerce/google-listings-and-ads/actions/runs/9857791848/job/27217640650#step:10:219 |
In my local test when I didn't update WP and WC I got this fail:
When I did the upgrade I got this one:
|
Thanks for testing @puntope.
I think this is expected, like I said in the description in WC 9.1.0 the tabs ( In WC < 9.1
That's weird as I tried to run e2e again in my local and all the tests passed. I also ran the E2E workflow with this branch and updated WP/WC, all tests passed as well. |
Seems to be a flaky test: When I've run. 4 were success and 2 not success
Maybe a race condition not sure. I will open a new issue |
Then I assume we should wait til WC/WP gets released to release this? Otherwise our E2E will fail |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
✅ Approved (left some advice about releasing this before WP and WC get released)
Thanks for testing again @puntope. WP 6.6 doesn't affect those E2E, so I will merge the PR after WC 9.1 is released. |
WC 9.1 has been released so I'm merging this PR. |
Changes proposed in this Pull Request:
Closes #2453.
This PR fixes three part of the E2E tests:
The first one is related to woocommerce/woocommerce#47860, where the tabs (
<button>
elements) on the product edit block has been addedrole="tab"
attribute. So we should rewrite the Playwright query fromgetByRole( 'button' )
togetByRole( 'tab' )
.The second one is related to woocommerce/woocommerce#48192, where the error messages of the failure notice on the product edit block has been modified from always showing
Failed to save product
to different messages based on the error type. E.g.Date error:
.Multipack error:
.Also, the behaviour of dismissing the error notice has been changed. Instead of clicking anywhere on the notice to dismiss it, now we need to click a specific
X
button.The third one is not related to the compatibility of WC 9.1. It's in the onboarding step 2 when we want to overwrite the default WC country by fulfilling the request
/wc-admin/options?options=woocommerce_default_country
. Now that there are more options being added into theoptions
query parameter, so we need to rewrite the URL matching pattern from/wc-admin\/options\?options=woocommerce_default_country\b/
to/wc-admin\/options\?options=.*woocommerce_default_country\b/
.Detailed test instructions:
npm run test:e2e
Additional details:
Changelog entry