content: integrate approved project evidence
This commit is contained in:
@@ -1,6 +1,17 @@
|
||||
import sharp from "sharp";
|
||||
import { readFileSync } from "node:fs";
|
||||
import { resolve } from "node:path";
|
||||
import type { Locator, Page, TestInfo } from "@playwright/test";
|
||||
import { expect, test } from "../helpers/serve-dist";
|
||||
import { parsePortfolioContent } from "../../src/content/schemas";
|
||||
|
||||
const content = parsePortfolioContent(JSON.parse(
|
||||
readFileSync(resolve(process.cwd(), "content/public/portfolio-content.json"), "utf8"),
|
||||
) as unknown);
|
||||
const approvedProjectStillCount = [
|
||||
...content.projects.selected,
|
||||
...content.projects.additional,
|
||||
].flatMap((project) => project.media ?? []).filter(({ kind }) => kind !== "video").length;
|
||||
|
||||
interface VisualViewportCase {
|
||||
readonly label: string;
|
||||
@@ -301,7 +312,7 @@ test.describe("production visual composition", () => {
|
||||
expect(composition.textShadows.every((shadow) => shadow === "none")).toBe(
|
||||
true,
|
||||
);
|
||||
expect(composition.publicProjectMediaCount).toBe(0);
|
||||
expect(composition.publicProjectMediaCount).toBe(approvedProjectStillCount);
|
||||
expect(composition.fixedSurfaceOverlaps).toEqual([]);
|
||||
expect(palette.dark).toBeGreaterThan(0.58);
|
||||
expect(palette.restrainedAccent).toBeGreaterThan(0.0005);
|
||||
|
||||
Reference in New Issue
Block a user