534bb94eea
Test Migrations / Migrations (SQLite) (push) Has been cancelled
Build Dev Image / build-dev-image (push) Has been cancelled
Check i18n Keys / Check i18n Key Consistency (push) Has been cancelled
Lint / Ruff Lint & Format (push) Has been cancelled
Lint / Frontend Lint (push) Has been cancelled
Test Migrations / Migrations (PostgreSQL) (push) Has been cancelled
23 lines
892 B
TypeScript
23 lines
892 B
TypeScript
import { expect, test } from '@playwright/test';
|
|
|
|
import { installLangBotApiMocks } from './fixtures/langbot-api';
|
|
|
|
test('local account login reaches the authenticated home shell', async ({
|
|
page,
|
|
}) => {
|
|
await installLangBotApiMocks(page);
|
|
|
|
await page.goto('/login');
|
|
|
|
await expect(page.getByText('Welcome')).toBeVisible();
|
|
await page.getByPlaceholder('Enter email address').fill('admin@example.com');
|
|
await page.getByPlaceholder('Enter password').fill('password');
|
|
await page.getByRole('button', { name: 'Login with password' }).click();
|
|
|
|
await expect(page).toHaveURL(/\/home$/);
|
|
await expect(page.getByText('Home').first()).toBeVisible();
|
|
await expect(page.getByRole('button', { name: 'Dashboard' })).toBeVisible();
|
|
await expect(page.getByText('Total Messages').first()).toBeVisible();
|
|
await expect(page.getByText('Unable to connect to server')).toHaveCount(0);
|
|
});
|