Fixed flaky test checkout coupons
This commit is contained in:
parent
54edb576d5
commit
5897027080
|
@ -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