Files

20 lines
1.1 KiB
TypeScript

import { existsSync } from "node:fs";
import { expect, test } from "@playwright/test";
const fixture = process.env.EVENTLENS_EVTX_FIXTURE;
test("pinned real EVTX fixture survives the browser upload path", async ({ page }) => {
test.skip(!fixture || !existsSync(fixture), "CI supplies the hash-verified public EVTX fixture");
await page.goto("/#analysis");
await page.locator('input[type="file"]').setInputFiles(fixture!);
await expect(page.locator(".metric-card").first()).toContainText("7", { timeout: 30_000 });
await expect(page.getByText("events parsed", { exact: true })).toBeVisible();
await page.getByRole("button", { name: "Timeline", exact: false }).click();
await page.getByLabel("Hide informational noise").uncheck();
await expect(page.locator(".event-row").first()).toBeVisible();
await expect(page.getByRole("button", { name: /4625/ })).toBeVisible();
await page.getByRole("button", { name: "Reports", exact: false }).click();
await expect(page.getByRole("heading", { name: "Export report", exact: true })).toBeVisible();
await page.getByRole("button", { name: /Export JSON/ }).click();
});