feat(06-04): Playwright E2E test suite execution

This commit is contained in:
2026-03-03 09:05:46 +01:00
parent 99ff53250d
commit 0ff29a5d3b
6 changed files with 160 additions and 71 deletions
+23
View File
@@ -0,0 +1,23 @@
import { test, expect } from "@playwright/test";
test.describe("Gravl API Tests", () => {
const BASE_URL = process.env.STAGING_URL || "http://localhost:5173";
test("homepage loads successfully", async ({ request }) => {
const response = await request.get(`${BASE_URL}/`);
expect(response.status()).toBe(200);
const html = await response.text();
expect(html).toContain("Gravl");
});
test("login page is accessible", async ({ request }) => {
const response = await request.get(`${BASE_URL}/login`);
expect([200, 301, 302]).toContain(response.status());
});
test("API connectivity check", async ({ request }) => {
// Check if backend API is accessible
const response = await request.get(`${BASE_URL}/`);
expect(response.status()).toBeLessThan(500);
});
});