diff --git a/plugins/woocommerce/changelog/e2e-fix-create-product-block-editor-tests-category-link-strictness b/plugins/woocommerce/changelog/e2e-fix-create-product-block-editor-tests-category-link-strictness new file mode 100644 index 00000000000..ac8bd8bc780 --- /dev/null +++ b/plugins/woocommerce/changelog/e2e-fix-create-product-block-editor-tests-category-link-strictness @@ -0,0 +1,4 @@ +Significance: patch +Type: dev + +E2E tests: fixed flaky product create test diff --git a/plugins/woocommerce/tests/e2e-pw/tests/merchant/products/block-editor/organization-tab-product-block-editor.spec.js b/plugins/woocommerce/tests/e2e-pw/tests/merchant/products/block-editor/organization-tab-product-block-editor.spec.js index ca2de837905..c7f2643908a 100644 --- a/plugins/woocommerce/tests/e2e-pw/tests/merchant/products/block-editor/organization-tab-product-block-editor.spec.js +++ b/plugins/woocommerce/tests/e2e-pw/tests/merchant/products/block-editor/organization-tab-product-block-editor.spec.js @@ -30,7 +30,7 @@ test.describe( 'General tab', () => { 'The block product editor is not being tested' ); - test( 'can create a simple product with categories, tags and with passowrd required', async ( { + test( 'can create a simple product with categories, tags and with password required', async ( { page, } ) => { await page.goto( NEW_EDITOR_ADD_PRODUCT_URL ); @@ -143,8 +143,8 @@ test.describe( 'General tab', () => { ).toBeVisible(); await expect( - page.getByRole( 'link', { name: categoryName } ) - ).toBeVisible(); + await page.getByRole( 'link', { name: categoryName } ).count() + ).toBeGreaterThan( 0 ); await expect( page.getByRole( 'link', { name: tagName } )