-
Notifications
You must be signed in to change notification settings - Fork 4.2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Migrate Adding Patterns Test to Playwright (#50083)
* Migrate Adding Patterns Test to Playwright * Remove previous snapshot file * Address feedbacks
- Loading branch information
1 parent
e7ce202
commit c9874e4
Showing
3 changed files
with
30 additions
and
33 deletions.
There are no files selected for viewing
11 changes: 0 additions & 11 deletions
11
packages/e2e-tests/specs/editor/various/__snapshots__/adding-patterns.test.js.snap
This file was deleted.
Oops, something went wrong.
22 changes: 0 additions & 22 deletions
22
packages/e2e-tests/specs/editor/various/adding-patterns.test.js
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
/** | ||
* WordPress dependencies | ||
*/ | ||
const { test, expect } = require( '@wordpress/e2e-test-utils-playwright' ); | ||
|
||
test.describe( 'adding patterns', () => { | ||
test.beforeEach( async ( { admin } ) => { | ||
await admin.createNewPost(); | ||
} ); | ||
|
||
test( 'should insert a block pattern', async ( { page, editor } ) => { | ||
await page.click( | ||
'role=region[name="Editor top bar"i] >> role=button[name="Toggle block inserter"i]' | ||
); | ||
|
||
await page.fill( | ||
'role=region[name="Block Library"i] >> role=searchbox[name="Search for blocks and patterns"i]', | ||
'Social links with a shared background color' | ||
); | ||
|
||
await page.click( | ||
'role=option[name="Social links with a shared background color"i]' | ||
); | ||
await expect.poll( editor.getBlocks ).toMatchObject( [ | ||
{ | ||
name: 'core/social-links', | ||
}, | ||
] ); | ||
} ); | ||
} ); |
c9874e4
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Flaky tests detected in c9874e4.
Some tests passed with failed attempts. The failures may not be related to this commit but are still reported for visibility. See the documentation for more information.
🔍 Workflow run URL: https://github.com/WordPress/gutenberg/actions/runs/4810324778
📝 Reported issues:
specs/editor/various/autosave.test.js