Merge pull request #28635 from woocommerce/packages/core-tests/setup-shipping

use xpath to find onboarding set up shipping task
This commit is contained in:
Vedanshu Jain 2020-12-21 01:05:46 +05:30 committed by GitHub
commit d2c5fc0750
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 1 deletions

View File

@ -35,9 +35,10 @@ const runTaskListTest = () => {
const taskListItems = await page.$$('.woocommerce-list__item-title');
expect(taskListItems).toHaveLength(6);
const [ setupTaskListItem ] = await page.$x( '//div[contains(text(),"Set up shipping")]' );
await Promise.all([
// Click on "Set up shipping" task to move to the next step
taskListItems[3].click(),
setupTaskListItem.click(),
// Wait for shipping setup section to load
page.waitForNavigation({waitUntil: 'networkidle0'}),