mirror of
https://github.com/Cockatrice/Cockatrice.git
synced 2026-07-06 05:23:56 -07:00
Playwright E2E suite (not working yet)
This commit is contained in:
parent
f534cd79b7
commit
68050b56bc
13 changed files with 425 additions and 16 deletions
19
webclient/e2e/specs/register-and-login.spec.ts
Normal file
19
webclient/e2e/specs/register-and-login.spec.ts
Normal file
|
|
@ -0,0 +1,19 @@
|
|||
import { test, expect } from '@playwright/test';
|
||||
import { seedLocalHostAndReload } from '../helpers/seedLocalHost';
|
||||
import { generateUniqueUser, loginViaUi, registerViaUi } from '../helpers/testUser';
|
||||
|
||||
test('a fresh user can register, then log in against local servatrice', async ({ page }) => {
|
||||
const user = generateUniqueUser();
|
||||
|
||||
// Seed IndexedDB so the Login form auto-selects our Local E2E host instead
|
||||
// of one of the production defaults. After this returns the app has been
|
||||
// reloaded; AppShell uses MemoryRouter, so the address bar never reflects
|
||||
// the active route — assert on DOM markers unique to each screen instead.
|
||||
await seedLocalHostAndReload(page);
|
||||
await expect(page.locator('.login-content')).toBeVisible();
|
||||
|
||||
await registerViaUi(page, user);
|
||||
await loginViaUi(page, user);
|
||||
|
||||
await expect(page.locator('.serverRoomWrapper')).toBeVisible();
|
||||
});
|
||||
Loading…
Add table
Add a link
Reference in a new issue