-
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
Add E2E tests for the integration in the classic product editor #2363
Conversation
…inished onboarding
…upported product types
…fields for simple product
…le and variation products
…hiding in product catalog
…its notice, status, and issues
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.
Hey @eason9487, thanks for expanding the E2E tests to cover the classic product editor.
Tested the branch locally and confirmed tests are passing and expectations all look correct so LGTM ✅
tests/e2e/utils/product-editor.js
Outdated
return page.locator( '.gla_attributes_multipack_field input' ); | ||
}, | ||
|
||
getAllProductAttributes( locator = page ) { |
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.
I see this function is almost the same as the getProductBlockEditorUtils
version. Can we refactor it?
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.
Adjusted in 8a79933.
tests/e2e/utils/product-editor.js
Outdated
const variableId = await api.createVariableProduct(); | ||
await api.createVariationProducts( variableId ); |
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.
This can be refactored 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.
Adjusted in 8a79933.
adultContent, | ||
} = editorUtils.getAllProductAttributes( locator ); | ||
|
||
const allPairs = [ |
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.
This is duplicated with block-integration equivalent. Can we refactor it?
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.
Adjusted in f21dd78.
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.
Thanks @eason9487 for your work here.
The tests are passing and the code looking good for me.
I left some comments regarding possible refactors and preventing code duplication.
Approved in advance
…r` for reuse. Address: #2363 (comment)
…utils `product-editor` for reuse. Address: #2363 (comment)
…ub Actions." This reverts commit 253f16c.
Changes proposed in this Pull Request:
menu_order
properties to the variations data intests/e2e/config/default.json
to make them can be updated correctly via the classic product editor.📌 Checklist (@eason9487)
Detailed test instructions:
npm run dev
to build filesnpm run test:e2e
to see if the E2E test in headless mode can pass.npm run test:e2e -- --ui
to inspect the E2E test in UI mode.Changelog entry