major features update

This commit is contained in:
Robert Perce 2025-11-27 13:45:21 -06:00
parent 519fb49901
commit 4e2fab67c5
48 changed files with 3925 additions and 208 deletions

37
e2e/pages/index.spec.ts Normal file
View file

@ -0,0 +1,37 @@
import { test, expect } from '@playwright/test';
test('has title', async ({ page }) => {
await page.goto('/');
await expect(page).toHaveTitle(/Mascarpone/);
});
test('disbles submit button with empty fields', async ({ page }) => {
await page.goto('/');
// Submit button should require both fields
// to be non-empty
await expect(page.getByRole("button")).toBeDisabled();
await page.getByLabel("Username").fill("bogus");
await expect(page.getByRole("button")).toBeDisabled();
await page.getByLabel("Username").clear();
await page.getByLabel("Password").fill("bogus");
await expect(page.getByRole("button")).toBeDisabled();
await page.getByLabel("Username").fill("bogus");
await expect(page.getByRole("button")).not.toBeDisabled();
});
test('has error message for invalid login', async ({ page }) => {
await page.goto('/');
await page.getByLabel("Username").fill("bogus");
await page.getByLabel("Password").fill("bogus");
await page.getByRole("button").click();
await expect(page.getByText(/do not match/i)).toBeVisible();
});