Skip to content

Commit

Permalink
Preview tests: Wait for the post-status change (#43874)
Browse files Browse the repository at this point in the history
* Preview tests: Wait for the post-status change

* Fix

* Close dropdown if open

* Update test/e2e/specs/editor/various/preview.spec.js

Co-authored-by: Kai Hao <kevin830726@gmail.com>

* Link PR in comment

* Remove dropdown check

Co-authored-by: Kai Hao <kevin830726@gmail.com>
  • Loading branch information
Mamaduka and kevin940726 authored Sep 8, 2022
1 parent ef6ba1a commit 85b96b7
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions test/e2e/specs/editor/various/preview.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -184,6 +184,12 @@ test.describe( 'Preview', () => {
// FIXME: The confirmation dialog is not named yet.
await page.click( 'role=dialog >> role=button[name="OK"i]' );

// Wait for the status change.
// @see https://github.com/WordPress/gutenberg/pull/43933
await expect(
page.locator( 'role=button[name="Publish"i]' )
).toBeVisible();

// Change the title.
await editorPage.type( 'role=textbox[name="Add title"i]', ' Draft' );

Expand Down

0 comments on commit 85b96b7

Please sign in to comment.