feat: improve ask flow elaboration and validation

This commit is contained in:
Erik Kotsiuba
2026-04-24 19:13:10 +02:00
parent 0ee2d11ec9
commit b7c7301f97
16 changed files with 1270 additions and 134 deletions
+13
View File
@@ -237,6 +237,19 @@ test("submit can complete even when some questions are unanswered", () => {
assert.equal(state.completed, true);
assert.equal(state.cancelled, false);
assert.equal(state.mode, "submit");
});
test("submit tab can complete in elaborate mode", () => {
let state = createInitialState(sampleParams());
state = moveTab(state, -1);
state = moveOption(state, 1);
assert.equal(state.activeSubmitActionIndex, 1);
state = confirmCurrentSelection(state);
assert.equal(state.completed, true);
assert.equal(state.cancelled, false);
assert.equal(state.mode, "elaborate");
});
test("selecting other enters input mode and custom submit stores typed answer", () => {