use correct coupon codes to total $0

This commit is contained in:
Ron Rennick 2021-01-27 21:04:01 -04:00
parent 1195e79c17
commit de759607d1
1 changed files with 5 additions and 5 deletions

View File

@ -49,7 +49,7 @@ const runCheckoutApplyCouponsTest = () => {
let couponPercentage;
let couponFixedProduct;
describe('Checkout applying coupons', () => {
describe('Checkout coupons', () => {
beforeAll(async () => {
await merchant.login();
await createSimpleProduct();
@ -95,14 +95,14 @@ const runCheckoutApplyCouponsTest = () => {
});
it('prevents customer applying same coupon twice', async () => {
await applyCouponToCart( couponPercentage );
await applyCouponToCart( couponFixedCart );
await expect(page).toMatchElement('.woocommerce-message', {text: 'Coupon code applied successfully.'});
await applyCouponToCart( couponPercentage );
await applyCouponToCart( couponFixedCart );
await expect(page).toMatchElement('.woocommerce-error li', { text: 'Coupon code already applied!' });
});
it('allows customer to apply multiple coupon', async () => {
await applyCouponToCart( couponFixedCart );
it('allows customer to apply multiple coupons', async () => {
await applyCouponToCart( couponFixedProduct );
await expect(page).toMatchElement('.woocommerce-message', {text: 'Coupon code applied successfully.'});
await expect(page).toMatchElement('.order-total .amount', {text: '$0.00'});
});