Backend: - conftest with async SQLite DB, factory fixtures for all models - pytest-asyncio config in pyproject.toml - Tests: auth (JWT, dev login), RBAC (access service), audit (query, export), brand enforcement (colors, fonts, logos, contrast), retention (cleanup, purge), content intelligence (regex classifiers), slide mapping, review workflow, analytics data queries Frontend: - Cypress E2E config with baseUrl and viewport settings - Custom commands (devLogin, createPresentation) - E2E specs: login flow, wizard navigation, admin panel, review workflow - Test scripts in package.json Infrastructure: - Makefile: test-e2e and test-all targets Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
25 lines
882 B
TypeScript
25 lines
882 B
TypeScript
describe("Login Flow", () => {
|
|
it("shows login page when not authenticated", () => {
|
|
cy.visit("/dashboard");
|
|
// Should redirect to login
|
|
cy.url().should("include", "/login");
|
|
});
|
|
|
|
it("dev login succeeds and redirects to dashboard", () => {
|
|
cy.visit("/login");
|
|
cy.get('input[type="email"]').type("admin@oliver.com");
|
|
cy.get('input[type="password"]').type("devpass123");
|
|
cy.get('button[type="submit"]').click();
|
|
// Should redirect to dashboard after successful login
|
|
cy.url().should("include", "/dashboard");
|
|
});
|
|
|
|
it("dev login fails with wrong password", () => {
|
|
cy.visit("/login");
|
|
cy.get('input[type="email"]').type("admin@oliver.com");
|
|
cy.get('input[type="password"]').type("wrongpassword");
|
|
cy.get('button[type="submit"]').click();
|
|
// Should stay on login page
|
|
cy.url().should("include", "/login");
|
|
});
|
|
});
|