Merge pull request #30590 from woocommerce/fix/e2e-simple-product-page-test

Add page reload and split simple product page test
This commit is contained in:
Ron Rennick 2021-08-26 17:42:28 -03:00 committed by GitHub
commit ead815eea4
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
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);