test: add open login modal test

This commit is contained in:
tzhangchi
2022-12-23 18:08:30 +08:00
parent 490dbb4a60
commit 2d52e49b3a
4 changed files with 24 additions and 4 deletions
+17
View File
@@ -0,0 +1,17 @@
import { test, expect, type Page } from '@playwright/test';
import { loadPage } from './libs/load-page';
loadPage();
test.describe('Login Flow', () => {
test('Open Login Modal', async ({ page }) => {
await page.getByTestId('current-workspace').click();
await page.waitForTimeout(800);
// why don't we use waitForSelector, It seems that waitForSelector not stable?
await page.getByTestId('open-login-modal').click();
await page.waitForTimeout(800);
await page
.getByRole('heading', { name: 'Currently not logged in' })
.click();
});
});