Fill a lesson's Reword boxes with the words Ask for suggestions sends

AI Assisted
This commit is contained in:
jparkerweb committed 2026-11-29 10:49:42 -08:00
1 parent e0f82cc36b
commit 834b71e82d
7 files changed
+143 -7

No files matched your search

+8
View File
@@ -1700,6 +1700,14 @@ test("validate: a lessons item takes rows each with a type and its own choices,
refused({ rows: [row()], suggested: ["Keep"] }, "suggested: must be");
refused({ rows: [row()], suggested: { w9: "Keep" } }, 'suggested "w9"');
refused({ rows: [row()], suggested: { w1: "Apply" } }, 'suggested "w1"');
// A Reword suggestion may carry the words its boxes start on.
assert.deepEqual(one({ rows: [row()], suggested: { w1: { choice: "Reword", text: "New words.", why: "A reason." } } }), [], "words with a Reword");
assert.deepEqual(one({ rows: [row()], suggested: { w1: { choice: "Keep" } } }), [], "the object form without words");
refused({ rows: [row()], suggested: { w1: { choice: "Keep", why: "A reason." } } }, 'suggested "w1" why');
refused({ rows: [row()], suggested: { w1: { choice: "Reword", why: "" } } }, 'suggested "w1" why');
refused({ rows: [row()], suggested: { w1: { choice: "Reword", text: 3 } } }, 'suggested "w1" text');
refused({ rows: [row()], suggested: { w1: { choice: "Reword", note: "x" } } }, 'suggested "w1" note');
refused({ rows: [row()], suggested: { w1: { text: "New words." } } }, 'suggested "w1"');
const two = validate({ items: [item({ rows: [row()] }), item({ id: "lessons-2", rows: [row()] })] });
assert.ok(two.some((p) => p.includes("2 lessons cards are open at once")), two.join(" | "));