feat: simplify ask UI copy and note shortcuts
This commit is contained in:
@@ -103,3 +103,22 @@ test("ctrl+c dismisses the flow from both navigation and editing modes", () => {
|
||||
kind: "dismiss",
|
||||
});
|
||||
});
|
||||
|
||||
test("note shortcuts use n for option notes and Shift+N for question notes", () => {
|
||||
const navigation = createInitialState({
|
||||
questions: [
|
||||
{
|
||||
id: "q1",
|
||||
prompt: "Question?",
|
||||
options: [{ value: "a", label: "A" }],
|
||||
},
|
||||
],
|
||||
});
|
||||
|
||||
assert.deepEqual(getInputCommand(navigation, "n"), {
|
||||
kind: "openOptionNote",
|
||||
});
|
||||
assert.deepEqual(getInputCommand(navigation, "N"), {
|
||||
kind: "openQuestionNote",
|
||||
});
|
||||
});
|
||||
|
||||
@@ -74,6 +74,6 @@ test("renderEditorBlock reapplies background after editor reset sequences", () =
|
||||
});
|
||||
|
||||
test("editing footers do not advertise tab navigation", () => {
|
||||
assert.equal(renderFooterText("input"), " Enter submit · Esc save and close");
|
||||
assert.equal(renderFooterText("note"), " Enter save · Esc save and close");
|
||||
assert.equal(renderFooterText("input"), " Enter submit · Esc close");
|
||||
assert.equal(renderFooterText("note"), " Enter save · Esc close");
|
||||
});
|
||||
|
||||
@@ -80,7 +80,7 @@ test("selected custom option keeps its label and renders editor below", () => {
|
||||
});
|
||||
|
||||
assert(lines.some((line) => line.includes("Type your own")));
|
||||
assert(lines.some((line) => line.includes("Type your answer...")));
|
||||
assert(lines.some((line) => line.includes("Type answer...")));
|
||||
});
|
||||
|
||||
test("selected multiline custom option renders full editor block", () => {
|
||||
|
||||
Reference in New Issue
Block a user