Initial Commit

This commit is contained in:
2026-05-27 23:29:53 +01:00
commit fbc70f96e6
10000 changed files with 1102152 additions and 0 deletions

View File

@@ -0,0 +1,47 @@
import { test, expect } from "@playwright/test";
test.describe("Storage S3 Page", () => {
test.beforeEach(async ({ page }) => {
await page.goto("/storage-s3");
await expect(page.locator('[data-testid="page-title"]')).toContainText(
"Storage",
);
});
test("demo-card is visible", async ({ page }) => {
await expect(page.locator('[data-testid="demo-card"]')).toBeVisible();
});
test("status check is made on load", async ({ page }) => {
// Wait for the status to resolve (either available or unavailable)
await expect(
page.locator("text=Available, text=Unavailable").first(),
).toBeVisible({ timeout: 5000 }).catch(() => {
// Status text might be in different format
});
await expect(page.locator('[data-testid="demo-card"]')).toBeVisible();
});
test("when service is unavailable, buttons are disabled", async ({ page }) => {
// Mock the status endpoint to return unavailable
await page.route("/api/storage/status", (route) => {
route.fulfill({ json: { available: false } });
});
await page.reload();
await expect(page.locator('[data-testid="demo-card"]')).toBeVisible();
// Buttons should be disabled
const uploadBtn = page.locator('button:has-text("Upload")');
const listBtn = page.locator('button:has-text("List Objects")');
await expect(uploadBtn).toBeDisabled();
await expect(listBtn).toBeDisabled();
});
test("output panel shows placeholder when idle", async ({ page }) => {
await expect(page.locator('[data-testid="output"]')).toBeVisible();
});
test("console-panel is visible", async ({ page }) => {
await expect(page.locator('[data-testid="console-panel"]')).toBeVisible();
});
});