Skip to content

Commit

Permalink
test: log page urls
Browse files Browse the repository at this point in the history
  • Loading branch information
algoORgoal committed Apr 4, 2024
1 parent fecf9ae commit 1655990
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions tests/auth.setup.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ const authFile = 'playwright/.auth/user.json';
setup('authenticate', async ({ page }) => {
await page.goto('/signin');
await page.getByRole('button', { name: /카카오/ }).click();
console.log(await page.url());

// real-world application workflow
// await page.waitForURL(/https:\/\/accounts.kakao.com\/login/);
Expand All @@ -25,8 +26,11 @@ setup('authenticate', async ({ page }) => {
// await page.waitForURL('http://localhost:3000/home');

await page.reload();
console.log(await page.url());
await page.waitForURL(/http:\/\/localhost:3000\/callback/);
console.log(await page.url());
await page.waitForURL(/http:\/\/localhost:3000\/home/);
console.log(await page.url());

await page.context().storageState({ path: authFile });
});

0 comments on commit 1655990

Please sign in to comment.