mirror of
https://github.com/jparkerweb/plan2code.git
synced 2026-11-16 04:45:33 -08:00
Let Diagnose start from a Notebook tab
AI Assisted
This commit is contained in:
1 parent
9a23b15fc9
commit
92d4d880bf
8 files changed
+18
-9
No files matched your search
@@ -2416,6 +2416,9 @@ test("noteSwitchShows: Pathfinder, Plan and Quick Task on Start fresh, Revise pl
|
||||
assert.equal(noteSwitchShows(entry(skill), scan, sel("exploring")), false, `${skill} on a picked spec`);
|
||||
assert.equal(noteSwitchShows(entry(skill), scan, sel("exploring", { planChange: true })), false, `${skill} on a picked spec with a brief`);
|
||||
}
|
||||
const diagnose = entry("plan2code-diagnose");
|
||||
assert.equal(noteSwitchShows(diagnose, scan, null), true, "Diagnose on Start fresh");
|
||||
assert.equal(noteSwitchShows(diagnose, scan, sel("documented")), true, "Diagnose launches untargeted, so a picked spec does not hide it");
|
||||
const revise = entry("plan2code-1b-revise-plan");
|
||||
assert.equal(noteSwitchShows(revise, scan, null), false, "Revise plan is grayed on Start fresh");
|
||||
for (const state of ["documented", "building", "built"]) {
|
||||
|
||||
@@ -973,6 +973,8 @@ test("POST /notepad/tab/sent answers 200, 400 and 404, and GET /notepad carries
|
||||
assert.equal(ok.body.ok, true);
|
||||
assert.equal(ok.body.sent.workflow, "quick-task");
|
||||
assert.deepEqual((await getJson(s, "/notepad")).body.tabs, [{ id, name: "Idea", sent: ok.body.sent }]);
|
||||
assert.equal((await post({ id, workflow: "diagnose" })).status, 200, "Diagnose can be sent from a tab");
|
||||
assert.equal((await post({ id, workflow: "quick-task" })).status, 200);
|
||||
assert.deepEqual(await post({ id, workflow: "document" }), { status: 400, body: { error: "bad-sent" } });
|
||||
assert.deepEqual(await post({ id, workflow: "revise-plan", spec: "../x" }), { status: 400, body: { error: "bad-sent" } });
|
||||
assert.deepEqual(await post({ id: "ffffffffffff", workflow: "plan" }), { status: 404, body: { error: "no-such-tab" } });
|
||||
|
||||
@@ -581,6 +581,8 @@ test("the Notebook switch shows on Start fresh for Pathfinder, Plan and Quick Ta
|
||||
assert.equal(await offersNote(main, "paused", "/plan2code-1b-revise-plan"), false, "Revise plan with a brief waiting");
|
||||
assert.equal(await offersNote(main, "ready", "/plan2code-3-implement"), false, "Implement never");
|
||||
assert.equal(await offersNote(main, "Start from scratch", "/plan2code-xray"), false, "a utility never");
|
||||
assert.equal(await offersNote(main, "Start from scratch", "/plan2code-diagnose"), true, "Diagnose on Start fresh");
|
||||
assert.equal(await offersNote(main, "ready", "/plan2code-diagnose"), true, "Diagnose on a picked spec");
|
||||
});
|
||||
|
||||
test("the switch lists the Notebook's tabs beside a preview: an empty tab grayed, five ticks at most, a Long tab note, and + note: on the command", async (t) => {
|
||||
|
||||
Reference in new issue
Block a user