Critical flows: Shopper → Checkout → Can view empty checkout message (https://github.com/woocommerce/woocommerce-blocks/pull/6042)

* Added new test case for Critical flows: Shopper → Checkout → Can view empty checkout message
This commit is contained in:
Tarun Vijwani 2022-03-23 11:17:48 +00:00 committed by GitHub
parent 512ae84b09
commit 532952dd31
1 changed files with 25 additions and 0 deletions

View File

@ -0,0 +1,25 @@
/**
* Internal dependencies
*/
import { shopper } from '../../../utils';
if ( process.env.WOOCOMMERCE_BLOCKS_PHASE < 2 )
// eslint-disable-next-line jest/no-focused-tests
test.only( `Skipping checkout tests`, () => {} );
describe( 'Shopper → Checkout → Can view empty checkout message', () => {
beforeAll( async () => {
await shopper.block.emptyCart();
} );
it( 'Shopper can view empty cart message on the checkout page', async () => {
await shopper.block.goToCheckout();
// Verify cart is empty'
await expect( page ).toMatchElement(
'strong.wc-block-checkout-empty__title',
{
text: 'Your cart is empty!',
}
);
} );
} );