Revert timeout back and split test

This commit is contained in:
Veljko 2021-04-08 10:09:12 +02:00
parent ca4d690c5c
commit 615bb66d41
2 changed files with 1 additions and 28 deletions

View File

@ -114,33 +114,6 @@ const runCartCalculateShippingTest = () => {
await uiUnblocked();
await expect(page).toMatchElement('.order-total .amount', {text: `$${fourProductPriceWithFlatRate}`});
});
it('should show correct total cart price with 2 products and flat rate', async () => {
await shopper.goToShop();
await shopper.addToCartFromShopPage(secondProductName);
await shopper.goToCart();
await shopper.setCartQuantity(firstProductName, 1);
await expect(page).toClick('button', {text: 'Update cart'});
await uiUnblocked();
await page.waitForSelector('.order-total');
await expect(page).toMatchElement('.shipping .amount', {text: '$5.00'});
await expect(page).toMatchElement('.order-total .amount', {text: `$${twoProductsPriceWithFlatRate}`});
});
it('should show correct total cart price with 2 products without flat rate', async () => {
await page.reload();
// Set shipping country to Spain
await expect(page).toClick('a.shipping-calculator-button');
await expect(page).toClick('#select2-calc_shipping_country-container');
await selectOptionInSelect2('Spain');
await expect(page).toClick('button[name="calc_shipping"]');
// Verify shipping costs
await page.waitForSelector('.order-total');
await expect(page).toMatchElement('.order-total .amount', {text: `$${twoProductsPrice}`});
});
});
};

View File

@ -40,7 +40,7 @@ let testEnvVars = {
NODE_ENV: 'test-e2e',
NODE_CONFIG_DIR: nodeConfigDirs.join( ':' ),
node_config_dev: program.dev ? 'yes' : 'no',
jest_test_timeout: program.dev ? 120000 : 45000,
jest_test_timeout: program.dev ? 120000 : 30000,
};
if ( ! JEST_PUPPETEER_CONFIG ) {