Skip to content

Commit

Permalink
Can only be inserted once test excludes the mini-cart template button
Browse files Browse the repository at this point in the history
  • Loading branch information
ralucaStan committed Apr 11, 2024
1 parent 4ba72b2 commit 47afebb
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -54,10 +54,9 @@ test.describe( 'Merchant → Mini Cart', () => {
.getByLabel( 'Search for blocks and patterns' )
.fill( blockData.slug );

const miniCartButton = editorUtils.page.getByRole( 'option', {
name: blockData.name,
exact: true,
} );
const miniCartButton = editorUtils.page
.getByLabel( 'WooCommerce', { exact: true } )
.getByRole( 'option', { name: blockData.name } );

await expect( miniCartButton ).toHaveAttribute(

Check failure on line 61 in plugins/woocommerce-blocks/tests/e2e/tests/mini-cart/mini-cart-block.merchant.block_theme.side_effects.spec.ts

View workflow job for this annotation

GitHub Actions / Side Effects [2/5]

[blockThemeWithGlobalSideEffects] › mini-cart/mini-cart-block.merchant.block_theme.side_effects.spec.ts:45:7 › Merchant → Mini Cart › in FSE editor › can only be inserted once

1) [blockThemeWithGlobalSideEffects] › mini-cart/mini-cart-block.merchant.block_theme.side_effects.spec.ts:45:7 › Merchant → Mini Cart › in FSE editor › can only be inserted once Error: Timed out 5000ms waiting for expect(locator).toHaveAttribute(expected) Locator: getByLabel('WooCommerce', { exact: true }).getByRole('option', { name: 'Mini-Cart' }) Expected string: "true" Received string: "" Call log: - expect.toHaveAttribute with timeout 5000ms - waiting for getByLabel('WooCommerce', { exact: true }).getByRole('option', { name: 'Mini-Cart' }) 59 | .getByRole( 'option', { name: blockData.name } ); 60 | > 61 | await expect( miniCartButton ).toHaveAttribute( | ^ 62 | 'aria-disabled', 63 | 'true' 64 | ); at /home/runner/work/woocommerce/woocommerce/plugins/woocommerce-blocks/tests/e2e/tests/mini-cart/mini-cart-block.merchant.block_theme.side_effects.spec.ts:61:35

Check failure on line 61 in plugins/woocommerce-blocks/tests/e2e/tests/mini-cart/mini-cart-block.merchant.block_theme.side_effects.spec.ts

View workflow job for this annotation

GitHub Actions / Side Effects [2/5]

[blockThemeWithGlobalSideEffects] › mini-cart/mini-cart-block.merchant.block_theme.side_effects.spec.ts:45:7 › Merchant → Mini Cart › in FSE editor › can only be inserted once

1) [blockThemeWithGlobalSideEffects] › mini-cart/mini-cart-block.merchant.block_theme.side_effects.spec.ts:45:7 › Merchant → Mini Cart › in FSE editor › can only be inserted once Retry #1 ─────────────────────────────────────────────────────────────────────────────────────── Error: Timed out 5000ms waiting for expect(locator).toHaveAttribute(expected) Locator: getByLabel('WooCommerce', { exact: true }).getByRole('option', { name: 'Mini-Cart' }) Expected string: "true" Received string: "" Call log: - expect.toHaveAttribute with timeout 5000ms - waiting for getByLabel('WooCommerce', { exact: true }).getByRole('option', { name: 'Mini-Cart' }) 59 | .getByRole( 'option', { name: blockData.name } ); 60 | > 61 | await expect( miniCartButton ).toHaveAttribute( | ^ 62 | 'aria-disabled', 63 | 'true' 64 | ); at /home/runner/work/woocommerce/woocommerce/plugins/woocommerce-blocks/tests/e2e/tests/mini-cart/mini-cart-block.merchant.block_theme.side_effects.spec.ts:61:35

Check failure on line 61 in plugins/woocommerce-blocks/tests/e2e/tests/mini-cart/mini-cart-block.merchant.block_theme.side_effects.spec.ts

View workflow job for this annotation

GitHub Actions / Side Effects [2/5]

[blockThemeWithGlobalSideEffects] › mini-cart/mini-cart-block.merchant.block_theme.side_effects.spec.ts:45:7 › Merchant → Mini Cart › in FSE editor › can only be inserted once

1) [blockThemeWithGlobalSideEffects] › mini-cart/mini-cart-block.merchant.block_theme.side_effects.spec.ts:45:7 › Merchant → Mini Cart › in FSE editor › can only be inserted once Retry #2 ─────────────────────────────────────────────────────────────────────────────────────── Error: Timed out 5000ms waiting for expect(locator).toHaveAttribute(expected) Locator: getByLabel('WooCommerce', { exact: true }).getByRole('option', { name: 'Mini-Cart' }) Expected string: "true" Received string: "" Call log: - expect.toHaveAttribute with timeout 5000ms - waiting for getByLabel('WooCommerce', { exact: true }).getByRole('option', { name: 'Mini-Cart' }) 59 | .getByRole( 'option', { name: blockData.name } ); 60 | > 61 | await expect( miniCartButton ).toHaveAttribute( | ^ 62 | 'aria-disabled', 63 | 'true' 64 | ); at /home/runner/work/woocommerce/woocommerce/plugins/woocommerce-blocks/tests/e2e/tests/mini-cart/mini-cart-block.merchant.block_theme.side_effects.spec.ts:61:35
'aria-disabled',
Expand Down
4 changes: 4 additions & 0 deletions plugins/woocommerce/changelog/fix-mini-cart-test
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
Significance: patch
Type: fix

can only be inserted once excludes the mini-cart template button

0 comments on commit 47afebb

Please sign in to comment.