Skip to content

Commit 90d9a16

Browse files
committed
Use different selector in E2E test
1 parent 4735819 commit 90d9a16

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

tests/e2e/config/bootstrap.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -222,7 +222,7 @@ async function setupBrowser() {
222222
*/
223223
async function createTestData() {
224224
await visitAdminPage( 'admin.php', 'page=amp-options' );
225-
await page.waitForSelector( '.amp-settings-nav' );
225+
await expect( page ).toMatchElement( 'h1', { text: 'AMP Settings' } );
226226
await page.evaluate( async () => {
227227
await Promise.all( [
228228
wp.apiFetch( { path: '/wp/v2/posts', method: 'POST', data: { title: 'Test Post 1', status: 'publish' } } ),

tests/e2e/utils/onboarding-wizard-utils.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -132,7 +132,7 @@ export async function testTitle( { text, element = 'h1' } ) {
132132
*/
133133
export async function cleanUpSettings() {
134134
await visitAdminPage( 'admin.php', 'page=amp-options' );
135-
await page.waitForSelector( '.amp-settings-nav' );
135+
await expect( page ).toMatchElement( 'h1', { text: 'AMP Settings' } );
136136
await page.evaluate( async () => {
137137
await Promise.all( [
138138
wp.apiFetch( { path: '/wp/v2/users/me', method: 'POST', data: {

0 commit comments

Comments
 (0)