22 lines
780 B
TypeScript
22 lines
780 B
TypeScript
import { readFileSync } from "node:fs";
|
|
import { expect, test } from "@playwright/test";
|
|
|
|
// 소스의 사본만 확인하면 public 파일이 배포에서 빠진 경우를 놓친다.
|
|
// 실제 production preview가 원문 크레딧과 notice 전문을 제공하는지 확인한다.
|
|
test("릴리스는 사용자 크레딧과 런타임 MIT notice 전문을 제공한다", async ({
|
|
page,
|
|
request,
|
|
}) => {
|
|
await page.goto("/");
|
|
await expect
|
|
.soft(
|
|
page.getByText("Designed by OZ at Heat-T Medical Inc.", { exact: true }),
|
|
)
|
|
.toBeVisible({ timeout: 1000 });
|
|
const response = await request.get("/THIRD_PARTY_NOTICES.md");
|
|
expect(response.ok()).toBe(true);
|
|
expect(await response.text()).toBe(
|
|
readFileSync("THIRD_PARTY_NOTICES.md", "utf8"),
|
|
);
|
|
});
|