We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 3b9bff9 commit 89ed45aCopy full SHA for 89ed45a
1 file changed
test/integration/auth.setup.ts
@@ -1,6 +1,5 @@
1
import { test as setup } from '@playwright/test';
2
import path from 'path';
3
-import { BASE_URL } from './utils';
4
5
const authFile = path.join(__dirname, './.auth/user.json');
6
@@ -9,9 +8,11 @@ setup.describe('setup', () => {
9
8
await page.goto('/wp-login.php');
10
await page.fill('#user_login', 'admin');
11
await page.fill('#user_pass', 'password');
12
- await page.getByRole('button', { name: 'Log In' }).click();
13
14
- await page.waitForURL(`${BASE_URL}/wp-admin`);
+ await Promise.all([
+ page.waitForURL('**/wp-admin/**', { timeout: 15000 }),
+ page.getByRole('button', { name: 'Log In' }).click(),
15
+ ]);
16
17
await page.context().storageState({ path: authFile });
18
});
0 commit comments