Update test
This commit is contained in:
parent
70ed073231
commit
88cdb83a55
|
@ -24,10 +24,8 @@ const runOrderSearchingTest = () => {
|
||||||
// Create new order for testing
|
// Create new order for testing
|
||||||
await merchant.openNewOrder(),
|
await merchant.openNewOrder(),
|
||||||
await page.waitForSelector('#order_status'),
|
await page.waitForSelector('#order_status'),
|
||||||
await page.select('#order_status', 'Pending payment'),
|
|
||||||
await page.waitForSelector('#customer_user'),
|
|
||||||
await page.click('#customer_user'),
|
await page.click('#customer_user'),
|
||||||
await selectOptionInSelect2('Customer', 'input.select2-search__field'),
|
await selectOptionInSelect2('Customer'),
|
||||||
]);
|
]);
|
||||||
|
|
||||||
await Promise.all([
|
await Promise.all([
|
||||||
|
@ -43,7 +41,7 @@ const runOrderSearchingTest = () => {
|
||||||
await page.keyboard.press('Tab'),
|
await page.keyboard.press('Tab'),
|
||||||
await page.keyboard.press('Tab'),
|
await page.keyboard.press('Tab'),
|
||||||
await page.keyboard.press('Enter'),
|
await page.keyboard.press('Enter'),
|
||||||
await selectOptionInSelect2('New York', 'input.select2-search__field'),
|
await selectOptionInSelect2('New York'),
|
||||||
]);
|
]);
|
||||||
|
|
||||||
// Get the post id
|
// Get the post id
|
||||||
|
|
|
@ -206,7 +206,7 @@ const evalAndClick = async ( selector ) => {
|
||||||
const selectOptionInSelect2 = async ( value, selector = 'input.select2-search__field' ) => {
|
const selectOptionInSelect2 = async ( value, selector = 'input.select2-search__field' ) => {
|
||||||
await page.waitForSelector(selector);
|
await page.waitForSelector(selector);
|
||||||
await page.type(selector, value);
|
await page.type(selector, value);
|
||||||
await page.waitFor(2000); // to avoid flakyness, must wait before pressing Enter
|
await page.waitFor(3000); // to avoid flakyness, must wait before pressing Enter
|
||||||
await page.keyboard.press('Enter');
|
await page.keyboard.press('Enter');
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue