Skip to content

Commit

Permalink
make sure to use a block theme, clear posts after testing
Browse files Browse the repository at this point in the history
  • Loading branch information
MaggieCabrera committed Dec 21, 2022
1 parent 22647c9 commit 9027a6c
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 0 deletions.
3 changes: 3 additions & 0 deletions test/e2e/playwright.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,9 @@ const config: PlaywrightTestConfig = {
trace: 'retain-on-failure',
screenshot: 'only-on-failure',
video: 'on-first-retry',
launchOptions: {
slowMo: 1000,
},
},
webServer: {
command: 'npm run wp-env start',
Expand Down
12 changes: 12 additions & 0 deletions test/e2e/specs/editor/blocks/navigation.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,22 @@ const { test, expect } = require( '@wordpress/e2e-test-utils-playwright' );
test.describe(
'As a user I want the navigation block to fallback to the best possible default',
() => {
test.beforeAll( async ( { requestUtils } ) => {
await requestUtils.activateTheme( 'emptytheme' );
} );

test.beforeEach( async ( { admin } ) => {
await admin.createNewPost();
} );

test.afterAll( async ( { requestUtils } ) => {
await requestUtils.activateTheme( 'twentytwentyone' );
} );

test.afterEach( async ( { requestUtils } ) => {
await requestUtils.deleteAllPosts();
} );

test( 'default to a list of pages if there are no menus', async ( {
editor,
} ) => {
Expand Down

0 comments on commit 9027a6c

Please sign in to comment.