Skip to content

Commit

Permalink
Dump some functions into the test.
Browse files Browse the repository at this point in the history
  • Loading branch information
costdev committed Jul 11, 2023
1 parent e33677e commit 15e3dfc
Showing 1 changed file with 14 additions and 2 deletions.
16 changes: 14 additions & 2 deletions tests/e2e/specs/dashboard.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,24 @@ import {
pressKeyTimes,
trashAllPosts,
visitAdminPage,
switchUserToAdmin
getCurrentUser,
switchUserToAdmin,
createURL,
pressKeyWithModifier
} from '@wordpress/e2e-test-utils';

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

await page.goto(createURL('wp-login.php'));
await page.focus('#user_login');
await pressKeyWithModifier('primary', 'a');
await page.type('#user_login', username);
await page.focus('#user_pass');
await pressKeyWithModifier('primary', 'a');
await page.type('#user_pass', password);
await Promise.all([page.waitForNavigation(), page.click('#wp-submit')]);
//await switchUserToAdmin();
await trashAllPosts();
} );

Expand Down

0 comments on commit 15e3dfc

Please sign in to comment.