Fix code to be according to standards

This commit is contained in:
Veljko V 2021-01-14 19:13:16 +01:00
parent cbda8b17bb
commit 22d7497d6a
2 changed files with 6 additions and 6 deletions

View File

@ -29,20 +29,19 @@ const runMyAccountPayOrderTest = () => {
await shopper.placeOrder();
// Get order ID from the order received html element on the page
orderNum = await page.$$eval(".woocommerce-order-overview__order strong",
elements => elements.map(item => item.textContent));
orderNum = await page.$$eval(".woocommerce-order-overview__order strong", elements => elements.map(item => item.textContent));
await merchant.login();
await merchant.updateOrderStatus(orderNum, '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).toClick('a.woocommerce-button.button.pay');
await page.waitForNavigation({ waitUntil: 'networkidle0' })
await expect(page).toMatchElement('.entry-title', { text: 'Pay for order' });
await page.waitForNavigation({waitUntil: 'networkidle0'});
await expect(page).toMatchElement('.entry-title', {text: 'Pay for order'});
await shopper.placeOrder();
await expect(page).toMatch('Order received');
});

View File

@ -13,7 +13,8 @@
},
"products": {
"simple": {
"name": "Simple product"
"name": "Simple product",
"price": "9.99"
},
"variable": {
"name": "Variable Product with Three Variations"