[e2e tests] External sites - update products/block-editor folder (#50960)

* Include products/block-editor into default-pressable set of tests

* Wait for `Block: Product attributes` before proceeding

* Add changefile(s) from automation for the following project(s): woocommerce

* Put comment on why to wait for the element

* Fix issue caught by Lint - @woocommerce/plugin-woocommerce

* Fix linting error

---------

Co-authored-by: github-actions <github-actions@github.com>
This commit is contained in:
Ivan Stojadinov 2024-08-27 15:56:14 +02:00 committed by GitHub
parent 7d8cd500b5
commit 1364adb690
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
3 changed files with 12 additions and 0 deletions

View File

@ -0,0 +1,4 @@
Significance: patch
Type: update
Update `products/block-editor` e2e tests, so they are passing against Pressable env.

View File

@ -10,6 +10,7 @@ config = {
testMatch: [ testMatch: [
'**/basic.spec.js', '**/basic.spec.js',
'**/activate-and-setup/**/*.spec.js', '**/activate-and-setup/**/*.spec.js',
'**/merchant/products/block-editor/**/*.spec.js',
], ],
grepInvert: /@skip-on-default-pressable/, grepInvert: /@skip-on-default-pressable/,
}, },

View File

@ -373,6 +373,13 @@ test(
await expect( await expect(
async () => { async () => {
await page.reload(); await page.reload();
// Waiting for the "Block: Product attributes" will ensure
// that test will pass against the Pressable environment
await expect(
page.locator(
`[aria-label="Block: Product attributes"]`
)
).toBeVisible();
await page.getByRole( 'button', { name: 'Edit' } ).click(); await page.getByRole( 'button', { name: 'Edit' } ).click();
await expect( await expect(
page.locator( page.locator(