Skip to content

Commit

Permalink
Use function for testing disabled state
Browse files Browse the repository at this point in the history
  • Loading branch information
ralucaStan committed Apr 15, 2024
1 parent fcb7f2c commit 00b270c
Showing 1 changed file with 1 addition and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -58,10 +58,7 @@ test.describe( 'Merchant → Mini Cart', () => {
.getByLabel( 'WooCommerce', { exact: true } )
.getByRole( 'option', { name: blockData.name } );

await expect( miniCartButton ).toHaveAttribute(
'aria-disabled',
'true'
);
await expect( miniCartButton ).toBeDisabled();

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

4) [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).toBeDisabled() Locator: getByLabel('WooCommerce', { exact: true }).getByRole('option', { name: 'Mini-Cart' }) Expected: disabled Received: enabled Call log: - expect.toBeDisabled 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 ).toBeDisabled(); | ^ 62 | } ); 63 | } ); 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
} );
} );
} );

0 comments on commit 00b270c

Please sign in to comment.