Skip to content

Commit

Permalink
Try using switchUserToAdmin() before trashAllPosts().
Browse files Browse the repository at this point in the history
  • Loading branch information
costdev committed Jul 11, 2023
1 parent 9beb9aa commit e33677e
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 0 deletions.
2 changes: 2 additions & 0 deletions tests/e2e/specs/dashboard.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,12 @@ import {
pressKeyTimes,
trashAllPosts,
visitAdminPage,
switchUserToAdmin
} from '@wordpress/e2e-test-utils';

describe( 'Quick Draft', () => {
beforeEach( async () => {
await switchUserToAdmin();
await trashAllPosts();
} );

Expand Down
2 changes: 2 additions & 0 deletions tests/e2e/specs/gutenberg-plugin.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,12 @@ import {
deactivatePlugin,
installPlugin,
uninstallPlugin,
switchUserToAdmin
} from '@wordpress/e2e-test-utils';

describe( 'Gutenberg plugin', () => {
beforeAll( async () => {
await switchUserToAdmin();
await installPlugin( 'gutenberg' );
} );

Expand Down

0 comments on commit e33677e

Please sign in to comment.