Initial curated EventLens source from 0d80d3b38dfb817285481665b9e71e4b8a0656a0
This commit is contained in:
commit
663ea8c829
85 files changed
+12395
No files matched your search
@@ -0,0 +1,28 @@
|
||||
import { expect, test } from "@playwright/test";
|
||||
|
||||
const assets = [
|
||||
["favicon.svg", /image\/svg\+xml/i],
|
||||
["favicon.ico", /image\/(x-icon|vnd\.microsoft\.icon)/i],
|
||||
["apple-touch-icon.png", /image\/png/i],
|
||||
["eventlens-icon-192.png", /image\/png/i],
|
||||
["eventlens-icon-512.png", /image\/png/i],
|
||||
["site.webmanifest", /(manifest|json)/i],
|
||||
] as const;
|
||||
|
||||
test("canonical EventLens branding and icon package are locally served", async ({ page, request }) => {
|
||||
await page.goto("/#analysis");
|
||||
await expect(page).toHaveTitle("EventLens — Windows Incident Reconstruction");
|
||||
await expect(page.locator('meta[name="application-name"]')).toHaveAttribute("content", "EventLens");
|
||||
await expect(page.locator('link[rel="manifest"]')).toHaveAttribute("href", "/site.webmanifest");
|
||||
await expect(page.locator(".event-logo svg")).toBeVisible();
|
||||
|
||||
for (const [asset, contentType] of assets) {
|
||||
const response = await request.get(`/${asset}`);
|
||||
expect(response.status(), `${asset} should be served`).toBe(200);
|
||||
expect(response.headers()["content-type"] ?? "", `${asset} MIME type`).toMatch(contentType);
|
||||
}
|
||||
|
||||
for (const workspace of ["Analysis", "Timeline", "Hunting", "Reports", "Settings"]) {
|
||||
await expect(page.getByRole("button", { name: workspace, exact: false }).first().locator("svg")).toHaveCount(1);
|
||||
}
|
||||
});
|
||||
Reference in new issue
Block a user