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
[e2e tests] Add tests for product bulks edit #44039
Conversation
…dd/bulk-edit-products
Test Results SummaryCommit SHA: 6d0bdf0
To view the full API test report, click here. To view the full E2E test report, click here. To view all test reports, visit the WooCommerce Test Reports Dashboard. |
Hi , @woocommerce/solaris, @woocommerce/vortex Apart from reviewing the code changes, please make sure to review the testing instructions as well. You can follow this guide to find out what good testing instructions should look like: |
} ); | ||
|
||
await test.step( 'publish the updated product', async () => { | ||
await page.locator( '#publish' ).click(); |
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.
Could probably use a page.getByRole( )
here? Locator isn't bad, we just usually opt for user-facing.
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.
Yeah, I missed that one, good catch. Updated with 6d0bdf0
|
||
await test.step( 'update the regular price', async () => { | ||
await page | ||
.locator( 'select[name="change_regular_price"]' ) |
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.
Can we use a page.getByRole()
for some of these as well?
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.
Actually no, getByRole
was not an option in this case.
Just a couple of notes on locators. I don't know if there were other options, so approving -- but just pointing out in case there is another option! |
Submission Review Guidelines:
Changes proposed in this Pull Request:
Add a new test for product bulk edit.
Updated the existing product edit test with
getBy*
locators, test steps and extra checks.Closes https://github.com/woocommerce/woocommerce-quality/issues/613 .
How to test the changes in this Pull Request:
pnpm env:restart && pnpm test:e2e-pw ./tests/e2e-pw/tests/merchant/product-edit.spec.js
Changelog entry
Significance
Type
Message
Comment