Merge pull request #29383 from woocommerce/e2e/e2e-fix-flaky-checkout-coupons
Fixed flaky e2e test checkout coupons
This commit is contained in:
commit
b6f3c2b0be
|
@ -66,6 +66,9 @@ const runCheckoutApplyCouponsTest = () => {
|
|||
it('allows customer to apply fixed product coupon', async () => {
|
||||
await applyCoupon(couponFixedProduct);
|
||||
await expect(page).toMatchElement('.woocommerce-message', {text: 'Coupon code applied successfully.'});
|
||||
|
||||
// Verify discount applied and order total
|
||||
await page.waitForSelector('.order-total');
|
||||
await expect(page).toMatchElement('.cart-discount .amount', {text: '$5.00'});
|
||||
await expect(page).toMatchElement('.order-total .amount', {text: '$4.99'});
|
||||
await removeCoupon(couponFixedProduct);
|
||||
|
@ -84,6 +87,9 @@ const runCheckoutApplyCouponsTest = () => {
|
|||
it('allows customer to apply multiple coupons', async () => {
|
||||
await applyCoupon(couponFixedProduct);
|
||||
await expect(page).toMatchElement('.woocommerce-message', {text: 'Coupon code applied successfully.'});
|
||||
|
||||
// Verify discount applied and order total
|
||||
await page.waitForSelector('.order-total');
|
||||
await expect(page).toMatchElement('.order-total .amount', {text: '$0.00'});
|
||||
});
|
||||
|
||||
|
|
Loading…
Reference in New Issue