Add timeout waits in tests
This commit is contained in:
parent
fc3b342545
commit
46655e83a2
|
@ -68,7 +68,7 @@ const runAddNewShippingZoneTest = () => {
|
|||
|
||||
// Verify shipping costs
|
||||
await page.waitForSelector('.order-total');
|
||||
await expect(page).toMatchElement('.shipping .amount', {text: '$10.00'});
|
||||
await expect(page).toMatchElement('.shipping .amount', {text: '$10.00'}, 2000);
|
||||
await expect(page).toMatchElement('.order-total .amount', {text: '$19.99'});
|
||||
|
||||
await shopper.removeFromCart(simpleProductName);
|
||||
|
@ -91,7 +91,7 @@ const runAddNewShippingZoneTest = () => {
|
|||
// Verify shipping method and cost
|
||||
await page.waitForSelector('.order-total');
|
||||
await expect(page).toMatchElement('.shipping ul#shipping_method > li', {text: 'Free shipping'});
|
||||
await expect(page).toMatchElement('.order-total .amount', {text: '$9.99'});
|
||||
await expect(page).toMatchElement('.order-total .amount', {text: '$9.99'}, 2000);
|
||||
|
||||
await shopper.removeFromCart(simpleProductName);
|
||||
})
|
||||
|
@ -108,7 +108,7 @@ const runAddNewShippingZoneTest = () => {
|
|||
|
||||
// Verify shipping method and cost
|
||||
await page.waitForSelector('.order-total');
|
||||
await expect(page).toMatchElement('.shipping ul#shipping_method > li', {text: 'Local pickup'});
|
||||
await expect(page).toMatchElement('.shipping ul#shipping_method > li', {text: 'Local pickup'}, 2000);
|
||||
await expect(page).toMatchElement('.order-total .amount', {text: '$9.99'});
|
||||
|
||||
await shopper.removeFromCart(simpleProductName);
|
||||
|
|
|
@ -450,6 +450,7 @@ const addShippingZoneAndMethod = async ( zoneName, zoneLocation = 'United States
|
|||
// Fill shipping zone postcode if needed otherwise just put empty space
|
||||
await expect(page).toClick('a.wc-shipping-zone-postcodes-toggle');
|
||||
await expect(page).toFill('#zone_postcodes', zipCode);
|
||||
await expect(page).toMatchElement('#zone_postcodes', zipCode);
|
||||
await expect(page).toClick('button#submit');
|
||||
|
||||
// Add shipping zone method
|
||||
|
|
Loading…
Reference in New Issue