mirror of
https://github.com/Ark0N/Codeman.git
synced 2026-12-03 09:09:33 +01:00
fix(story-mode): no celebration when the turn is not a clean finish
From review round 8: "Mission complete!" with confetti and cheering helpers sat over balloons saying the page will not work as opened, a helper's tests have not run, or a problem is left. The final panel is now calm (no confetti, a neutral robot) whenever work was still out at the turn's end, nothing worked, or Claude's last words name an open problem (`page.openNote`: a key point about something wrong, not done, not checked or not fixed); the last of these reads "Done, with a catch". Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
This commit is contained in:
1 parent
faca7571e2
commit
88040c997d
17 files changed
+80
-7
No files matched your search
@@ -851,6 +851,21 @@ describe('story-mode.js overlay', () => {
|
||||
expect($$('.story-ln--add').map((l) => l.textContent)).toEqual(['+more']);
|
||||
});
|
||||
|
||||
it('a turn whose last words name an open problem ends "Done, with a catch", not "Mission complete!"', async () => {
|
||||
const words = [
|
||||
'I built the pomodoro timer and its tests, and all of them pass.',
|
||||
'It keeps the time in memory and redraws the clock every second while it runs. '.repeat(3),
|
||||
"Opening the page: it won't work if you double-click index.html.",
|
||||
].join(' ');
|
||||
boot(storyOf([prompt('build it'), ...edit('e1', '/work/demo-shop/t.js', ['+x']), said(words), end(1000)]));
|
||||
app.openStoryMode(SID);
|
||||
await settle();
|
||||
expect($('.story-panel[data-kind="complete"] .story-splash-title')!.textContent).toBe('Done, with a catch');
|
||||
expect($('.story-panel[data-kind="complete"] .story-balloon-text')!.textContent).toMatch(
|
||||
/won't work if you double-click/
|
||||
);
|
||||
});
|
||||
|
||||
it('the final panel counts the commits of the whole turn, and says when the work was uploaded', async () => {
|
||||
boot(
|
||||
storyOf([
|
||||
|
||||
Reference in new issue
Block a user