This commit is contained in:
gili8420 2026-08-14 00:01:49 +09:00
commit b43955e0d9
162 changed files with 15425 additions and 0 deletions

View file

@ -0,0 +1,22 @@
import { test, expect } from '@playwright/test';
test('a visitor can register and lands in the app', async ({ page }) => {
await page.goto('/register/');
await page.fill('#rg-username', 'newbie');
await page.fill('#rg-email', 'newbie@example.com');
await page.fill('#rg-password', 's3curePass!');
await page.fill('#rg-password2', 's3curePass!');
await page.click('button[type=submit]');
await page.getByTestId('nav-menu').click();
await expect(page.getByTestId('app-heading')).toContainText('newbie');
});
test('duplicate username shows an inline error', async ({ page }) => {
await page.goto('/register/');
await page.fill('#rg-username', 'demo'); // seeded in the mock
await page.fill('#rg-email', 'dupe@example.com');
await page.fill('#rg-password', 's3curePass!');
await page.fill('#rg-password2', 's3curePass!');
await page.click('button[type=submit]');
await expect(page.getByTestId('register-error')).toBeVisible();
});