Initial commit: site monorepo with API, web, and infra.

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
влад
2026-07-16 10:11:54 +03:00
co-authored by Cursor
commit 016910ffb7
447 changed files with 73972 additions and 0 deletions
@@ -0,0 +1,25 @@
import { expect, test } from "@playwright/test";
import { API_URL, adminLogin } from "../helpers/api";
test.describe("§15.7 scenario 4: Admin content publish", () => {
test("admin creates content → publish → visible on /pages/:slug", async ({ page, request }) => {
const admin = await adminLogin(request);
const headers = { Authorization: `Bearer ${(await admin.json()).access_token}` };
const slug = `e2e-page-${Date.now()}`;
const created = await request.post(`${API_URL}/api/v1/content/pages`, {
headers,
data: {
slug,
title: "E2E Published Page",
body: "<p>Published by admin</p>",
status: "published"
}
});
expect(created.ok()).toBeTruthy();
await page.goto(`/pages/${slug}`);
await expect(page.getByRole("heading", { name: "E2E Published Page" })).toBeVisible();
await expect(page.getByText("Published by admin")).toBeVisible();
});
});