Make ticket pages open in T3 Code's file viewer, and show plans, mocks and progress inline in the thread
This commit is contained in:
1 parent
e21a4c24f0
commit
4e39be860c
9 files changed
+235
-42
No files matched your search
@@ -67,7 +67,10 @@ describe("the CLI, end to end", () => {
|
||||
expect(cli("init", "KACP-1", "--issue", issuePath).status).toBe(0);
|
||||
for (const f of ["index.html", "ticket.data.js"]) expect(existsSync(join(dir, f))).toBe(true);
|
||||
expect(existsSync(join(docs, "KACP-9", "index.html"))).toBe(true);
|
||||
expect(readFileSync(join(dir, "index.html"), "utf8")).toMatch(/href="..\/..\/_site\/site.css\?v=[0-9a-f]{10}"/);
|
||||
// Self-contained: T3 Code's file viewer serves nothing from above the page's own folder.
|
||||
const page = readFileSync(join(dir, "index.html"), "utf8");
|
||||
expect(page).toContain(readFileSync(join(import.meta.dir, "../templates/site/site.js"), "utf8"));
|
||||
expect(page).not.toMatch(/(src|href)="\.\./);
|
||||
expect(epic().stories.map(s => [s.key, s.status])).toEqual([["KACP-1", "todo"]]);
|
||||
});
|
||||
|
||||
@@ -85,6 +88,15 @@ describe("the CLI, end to end", () => {
|
||||
expect(epic().stories[0]).toMatchObject({ status: "building", progress: { steps: [1, 2] } });
|
||||
});
|
||||
|
||||
test("view prints a thread snapshot of the plan's progress, and refuses an unknown view", () => {
|
||||
const out = cli("view", "KACP-1", "progress");
|
||||
expect(out.status).toBe(0);
|
||||
expect(out.stdout).toMatch(/^<!doctype html>/);
|
||||
expect(out.stdout).toContain("<code>abc1234</code>");
|
||||
expect(cli("view", "KACP-1", "mocks").status).not.toBe(0);
|
||||
expect(cli("view", "KACP-1", "everything").status).toBe(2);
|
||||
});
|
||||
|
||||
test("text proof is embedded, because a file:// page cannot fetch it", () => {
|
||||
mkdirSync(join(dir, "proof"), { recursive: true });
|
||||
writeFileSync(join(dir, "proof", "counts.txt"), "70 of 70 codes stored");
|
||||
|
||||
Reference in new issue
Block a user