Attempt to check for a theme specific element when completing Theme step. (https://github.com/woocommerce/woocommerce-admin/pull/5367)

The theme selection page e2e test is intermittently failing and it
is not clear why. It could be that there is a failure going from
the last setup step to this one because the selectors for this
step are ambiguous and could refer to anything.

This specifically waits for an element that is unique to the
theme selection screen in the hope of removing ambiguity.
This commit is contained in:
Sam Seay 2020-10-14 19:10:50 +13:00 committed by GitHub
parent b6953260ab
commit 5d9664c723
1 changed files with 7 additions and 0 deletions

View File

@ -1,3 +1,4 @@
import { waitForSelector } from '../../utils/lib';
/**
* @format
*/
@ -8,5 +9,11 @@
import { clickContinue } from './utils';
export async function completeThemeSelectionSection() {
// Make sure we're on the theme selection page before clicking continue
await waitForSelector(
page,
'.woocommerce-profile-wizard__themes-tab-panel'
);
await clickContinue();
}