Add page reload and split simple product page test

This commit is contained in:
Greg 2021-08-26 13:23:42 -06:00
parent 05e43a9711
commit a26951b6c6
1 changed files with 7 additions and 0 deletions

View File

@ -55,7 +55,9 @@ const runAddSimpleProductTest = () => {
await verifyAndPublish();
await merchant.logout();
});
it('can have a shopper add the simple virtual product to the cart', async () => {
// See product in the shop and add it to the cart
await shopper.goToShop();
await shopper.addToCartFromShopPage(VirtualProductName);
@ -80,9 +82,14 @@ const runAddSimpleProductTest = () => {
await verifyAndPublish();
await merchant.logout();
});
it('can have a shopper add the simple non-virtual product to the cart', async () => {
// See product in the shop and add it to the cart
await shopper.goToShop();
await page.reload({ waitUntil: ['networkidle0', 'domcontentloaded'] });
await shopper.addToCartFromShopPage(NonVirtualProductName);
await shopper.goToCart();
await shopper.productIsInCart(NonVirtualProductName);