Skip to content

Commit 3f6fd05

Browse files
committed
Testing: Correct truthy test of immediately saveable demo
Previously assumed the selector would throw if not found, but in-fact returns `null`. See: https://github.com/GoogleChrome/puppeteer/blob/master/docs/api.md#pageselector
1 parent f20c453 commit 3f6fd05

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

test/e2e/specs/demo.test.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,6 @@ describe( 'new editor state', () => {
4040
} );
4141

4242
it( 'should be immediately saveable', async () => {
43-
await page.$( 'button.editor-post-save-draft' );
43+
expect( await page.$( 'button.editor-post-save-draft' ) ).toBeTruthy();
4444
} );
4545
} );

0 commit comments

Comments
 (0)