Fix code to be according to standards
This commit is contained in:
parent
cbda8b17bb
commit
22d7497d6a
|
@ -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');
|
||||
});
|
||||
|
|
|
@ -13,7 +13,8 @@
|
|||
},
|
||||
"products": {
|
||||
"simple": {
|
||||
"name": "Simple product"
|
||||
"name": "Simple product",
|
||||
"price": "9.99"
|
||||
},
|
||||
"variable": {
|
||||
"name": "Variable Product with Three Variations"
|
||||
|
|
Loading…
Reference in New Issue