Add ifStuck/stop to frames and captured date to sequences (Refs #23)
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This commit is contained in:
@@ -345,3 +345,20 @@ test('clearSecrets erases secret fields and frames, keeps the rest, returns the
|
||||
assert.deepEqual(validate(doc), []);
|
||||
assert.equal(clearSecrets(doc), 0);
|
||||
});
|
||||
|
||||
test('addCapture adds a frame and stamps the sequence captured date; clearSecrets clears ifStuck on secret steps', async () => {
|
||||
const { addCapture, clearSecrets, addSequence } = await import('../src/ops.js');
|
||||
const doc = emptyDocument('x');
|
||||
const s = addSection(doc, 'records', 'Banking');
|
||||
const q = addSequence(doc, s);
|
||||
assert.equal(q.captured, undefined);
|
||||
const f = addCapture(q, '');
|
||||
assert.equal(q.frames.length, 1);
|
||||
assert.equal(f.layout, 'under');
|
||||
assert.match(q.captured, /^\d{4}-\d{2}-\d{2}$/);
|
||||
f.secret = true; f.ifStuck = 'call 555-0100'; f.stop = true;
|
||||
assert.equal(clearSecrets(doc), 1);
|
||||
assert.equal(f.ifStuck, '');
|
||||
assert.equal(f.stop, true);
|
||||
assert.deepEqual(validate(doc), []);
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user