-
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 register block test case to playwright (#43170)
* Migrate register block test case to playwright * Addressed feedback Co-authored-by: pavanpatil1 <=>
- Loading branch information
1 parent
dcfff3a
commit 9bde7eb
Showing
2 changed files
with
29 additions
and
32 deletions.
There are no files selected for viewing
32 changes: 0 additions & 32 deletions
32
packages/e2e-tests/specs/editor/plugins/register-block-type-hooks.test.js
This file was deleted.
Oops, something went wrong.
29 changes: 29 additions & 0 deletions
29
test/e2e/specs/editor/plugins/register-block-type-hooks.spec.js
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,29 @@ | ||
/** | ||
* WordPress dependencies | ||
*/ | ||
const { test, expect } = require( '@wordpress/e2e-test-utils-playwright' ); | ||
|
||
test.describe( 'Register block type hooks', () => { | ||
test.beforeEach( async ( { requestUtils, admin } ) => { | ||
await requestUtils.activatePlugin( | ||
'gutenberg-test-register-block-type-hooks' | ||
); | ||
await admin.createNewPost(); | ||
} ); | ||
|
||
test.afterEach( async ( { requestUtils } ) => { | ||
await requestUtils.deactivatePlugin( | ||
'gutenberg-test-register-block-type-hooks' | ||
); | ||
} ); | ||
|
||
test( 'has a custom category for Paragraph block', async ( { page } ) => { | ||
await page.click( 'role=button[name="Toggle block inserter"i]' ); | ||
|
||
expect( | ||
page.locator( | ||
'role=listbox[name="Widgets"i] >> role=option[name="Paragraph"i]' | ||
) | ||
).toBeDefined(); | ||
} ); | ||
} ); |