mirror of
https://github.com/profullstack/logicsrc.git
synced 2026-10-02 04:43:58 +00:00
Add OpenSkill descriptions for human capabilities and OpenProfile discovery
This commit is contained in:
parent
ba69f58243
commit
25e18f0766
31 changed files with 878 additions and 3 deletions
22
apps/logicsrc-web/e2e/openskill.spec.ts
Normal file
22
apps/logicsrc-web/e2e/openskill.spec.ts
Normal file
|
|
@ -0,0 +1,22 @@
|
|||
import { expect, test } from "@playwright/test";
|
||||
|
||||
test("human capabilities are discoverable and their Markdown can travel independently", async ({ page, request }) => {
|
||||
await page.goto("/openprofile/skills");
|
||||
await expect(page).toHaveURL(/\/openskill$/);
|
||||
await expect(page.getByRole("heading", { name: "OpenSkill", exact: true })).toBeVisible();
|
||||
expect(await page.evaluate(() => document.documentElement.scrollWidth <= innerWidth)).toBe(true);
|
||||
|
||||
await page.getByRole("link", { name: "Logo design", exact: true }).click();
|
||||
await expect(page.getByRole("heading", { name: "Logo design", exact: true })).toBeVisible();
|
||||
const sourceLink = page.getByRole("link", { name: "Markdown source", exact: true });
|
||||
const source = await request.get((await sourceLink.getAttribute("href"))!);
|
||||
expect(source.status()).toBe(200);
|
||||
expect(source.headers()["content-type"]).toBe("text/markdown; charset=utf-8");
|
||||
expect(await source.text()).toContain("# Logo design");
|
||||
expect(await source.text()).toContain("**Kind**: skill");
|
||||
|
||||
const index = await request.get("/openskill/catalog.md");
|
||||
expect(index.status()).toBe(200);
|
||||
expect(index.headers()["content-type"]).toBe("text/markdown; charset=utf-8");
|
||||
expect(await index.text()).toContain("/openskill/accountant/openskill.md");
|
||||
});
|
||||
Loading…
Add table
Add a link
Reference in a new issue