mirror of
https://github.com/lichess-org/lila.git
synced 2026-05-26 13:51:00 +00:00
cleanup
This commit is contained in:
committed by
Thibault Duplessis
parent
4f39deb3c3
commit
dfc6abf799
@@ -0,0 +1,9 @@
|
||||
import { type Page } from '@playwright/test';
|
||||
|
||||
export async function loginAs(page: Page, username: string) {
|
||||
await page.goto('/login');
|
||||
await page.getByTestId('username').fill(username);
|
||||
await page.getByTestId('password').fill('password');
|
||||
await page.getByTestId('login-submit').click();
|
||||
await page.waitForLoadState('networkidle');
|
||||
}
|
||||
+2
-9
@@ -1,12 +1,5 @@
|
||||
import { test, expect, Page } from '@playwright/test';
|
||||
|
||||
async function loginAs(page: Page, username: string) {
|
||||
await page.goto('/login');
|
||||
await page.getByTestId('username').fill(username);
|
||||
await page.getByTestId('password').fill('password');
|
||||
await page.getByTestId('login-submit').click();
|
||||
await page.waitForLoadState('networkidle');
|
||||
}
|
||||
import { test, expect } from '@playwright/test';
|
||||
import { loginAs } from './helpers';
|
||||
|
||||
test.beforeEach(async ({ page }) => {
|
||||
await loginAs(page, 'student1');
|
||||
|
||||
@@ -1,12 +1,5 @@
|
||||
import { test, expect, Page } from '@playwright/test';
|
||||
|
||||
async function loginAs(page: Page, username: string) {
|
||||
await page.goto('/login');
|
||||
await page.getByTestId('username').fill(username);
|
||||
await page.getByTestId('password').fill('password');
|
||||
await page.getByTestId('login-submit').click();
|
||||
await page.waitForLoadState('networkidle');
|
||||
}
|
||||
import { test, expect } from '@playwright/test';
|
||||
import { loginAs } from './helpers';
|
||||
|
||||
test.beforeEach(async ({ page }) => {
|
||||
await loginAs(page, 'teacher');
|
||||
|
||||
Reference in New Issue
Block a user