Skip to content
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

Merged
merged 9 commits into from Jan 26, 2024

Conversation

adimoldovan
Copy link
Contributor

@adimoldovan adimoldovan commented Jan 24, 2024

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

  • Automatically create a changelog entry from the details below.

Significance

  • Patch
  • Minor
  • Major

Type

  • Fix - Fixes an existing bug
  • Add - Adds functionality
  • Update - Update existing functionality
  • Dev - Development related task
  • Tweak - A minor adjustment to the codebase
  • Performance - Address performance issues
  • Enhancement - Improvement to existing functionality

Message

Comment

@adimoldovan adimoldovan self-assigned this Jan 24, 2024
@github-actions github-actions bot added focus: e2e tests Issues related to e2e tests plugin: woocommerce Issues related to the WooCommerce Core plugin. labels Jan 24, 2024
Copy link
Contributor

github-actions bot commented Jan 24, 2024

Test Results Summary

Commit SHA: 6d0bdf0

Test 🧪Passed ✅Failed 🚨Broken 🚧Skipped ⏭️Unknown ❔Total 📊Duration ⏱️
API Tests25900202610m 37s
E2E Tests29000702976m 32s

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.

@adimoldovan adimoldovan marked this pull request as ready for review January 25, 2024 17:50
@adimoldovan adimoldovan requested review from a team January 25, 2024 17:54
Copy link
Contributor

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:
https://github.com/woocommerce/woocommerce/wiki/Writing-high-quality-testing-instructions

} );

await test.step( 'publish the updated product', async () => {
await page.locator( '#publish' ).click();
Copy link
Contributor

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.

Copy link
Contributor Author

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"]' )
Copy link
Contributor

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?

Copy link
Contributor Author

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.

@lanej0
Copy link
Contributor

lanej0 commented Jan 25, 2024

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!

@adimoldovan adimoldovan merged commit 4bcb62d into trunk Jan 26, 2024
31 checks passed
@adimoldovan adimoldovan deleted the e2e/add/bulk-edit-products branch January 26, 2024 08:53
@github-actions github-actions bot added this to the 8.7.0 milestone Jan 26, 2024
@github-actions github-actions bot added the needs: analysis Indicates if the PR requires a PR testing scrub session. label Jan 26, 2024
@veljkho veljkho added status: analysis complete Indicates if a PR has been analysed by Solaris and removed needs: analysis Indicates if the PR requires a PR testing scrub session. labels Jan 26, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
focus: e2e tests Issues related to e2e tests plugin: woocommerce Issues related to the WooCommerce Core plugin. status: analysis complete Indicates if a PR has been analysed by Solaris
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants