Update scenario shopper can pay his order

This commit is contained in:
Veljko V 2021-01-14 14:22:39 +01:00
parent 98823ba8d0
commit 50d601355c
1 changed files with 8 additions and 6 deletions

View File

@ -30,15 +30,17 @@ const runMyAccountPayOrderTest = () => {
const orderId = await page.evaluate(orderElement => orderElement.textContent, orderElement);
await shopper.logout();
await merchant.login();
await merchant.updateOrderStatus(orderId, 'Pending payment');
await merchant.logout();
await merchant.updateOrderStatus(orderId, 'Pending payment');
await merchant.logout();
})
it('allows customer to pay for his order in my account', async () => {
await shopper.login();
await shopper.goToOrders();
await expect(page.url()).toMatch('my-account/orders');
await expect(page).toMatchElement('h1', {text: 'Orders'});
await shopper.login();
await shopper.goToOrders();
await expect(page).toClick('.wc_payment_method woocommerce-button button pay', {text: 'Pay'});
await expect(page).toMatchElement('.entry-title', {text: 'Pay for order'});
await shopper.placeOrder();
await expect(page).toMatch('Order received');
});
});
}