Skip to content

Commit de5dc06

Browse files
committed
Merge remote-tracking branch 'origin/claude/variables-form' into claude/variables-form
2 parents 5dc0297 + f5395b3 commit de5dc06

1 file changed

Lines changed: 7 additions & 6 deletions

File tree

‎test/utils/default-component.test.tsx‎

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -155,15 +155,16 @@ Visit the documentation for more info: https://codifycli.com/docs.
155155
status: RenderStatus.PROMPT_VARIABLE,
156156
data: { name: 'siteType', label: 'What are you building?', scope: [], valueType: 'enum', options: ['blog', 'portfolio'], default: 'portfolio', sensitive: false, implicit: false },
157157
});
158-
await tick();
158+
await vi.waitFor(() => expect(lastFrame()).toContain('default: portfolio'));
159159
// The label is the question, the name is shown next to it
160160
expect(lastFrame()).toContain('What are you building?');
161161
expect(lastFrame()).toContain('siteType');
162-
expect(lastFrame()).toContain('default: portfolio');
163-
// The default is highlighted
164-
stdin.write('\r');
165-
await tick();
166-
expect(onResult).toHaveBeenLastCalledWith('portfolio');
162+
// The default is highlighted. The select registers its input handler after it renders, and a key written before
163+
// that is dropped (slow CI machines), so enter is sent again until it is handled.
164+
await vi.waitFor(() => {
165+
stdin.write('\r');
166+
expect(onResult).toHaveBeenLastCalledWith('portfolio');
167+
}, { interval: 50, timeout: 2000 });
167168
});
168169

169170
it('prompts for import / destroy values with the parameter list', async () => {

0 commit comments

Comments
 (0)