This commit is contained in:
A.K.M. Adib
2026-03-05 17:31:54 -05:00
parent 05b50f45a3
commit f5c02538b2
2 changed files with 13 additions and 7 deletions
@@ -268,8 +268,8 @@ describe('AskUserDialog', () => {
expect(lastFrame()).not.toContain('▼'); expect(lastFrame()).not.toContain('▼');
} }
await waitUntilReady(); await waitUntilReady();
expect(lastFrame()).toMatchSnapshot();
}); });
expect(lastFrame()).toMatchSnapshot();
}); });
}, },
); );
@@ -569,8 +569,9 @@ describe('AskUserDialog', () => {
await waitFor(async () => { await waitFor(async () => {
await waitUntilReady(); await waitUntilReady();
expect(lastFrame()).toMatchSnapshot(); expect(lastFrame()).toContain('Review your answers:');
}); });
expect(lastFrame()).toMatchSnapshot();
writeKey(stdin, '\x1b[D'); // Left arrow back writeKey(stdin, '\x1b[D'); // Left arrow back
@@ -614,8 +615,9 @@ describe('AskUserDialog', () => {
await waitFor(async () => { await waitFor(async () => {
await waitUntilReady(); await waitUntilReady();
expect(lastFrame()).toMatchSnapshot(); expect(lastFrame()).toContain('Review your answers:');
}); });
expect(lastFrame()).toMatchSnapshot();
}); });
it('submits with unanswered questions when user confirms on Review', async () => { it('submits with unanswered questions when user confirms on Review', async () => {
@@ -1309,8 +1311,9 @@ describe('AskUserDialog', () => {
await waitFor(async () => { await waitFor(async () => {
await waitUntilReady(); await waitUntilReady();
expect(lastFrame()).toMatchSnapshot(); expect(lastFrame()).toContain('Type another language...');
}); });
expect(lastFrame()).toMatchSnapshot();
}); });
it('uses default placeholder when not provided', async () => { it('uses default placeholder when not provided', async () => {
@@ -1343,8 +1346,9 @@ describe('AskUserDialog', () => {
await waitFor(async () => { await waitFor(async () => {
await waitUntilReady(); await waitUntilReady();
expect(lastFrame()).toMatchSnapshot(); expect(lastFrame()).toContain('Enter a custom value');
}); });
expect(lastFrame()).toMatchSnapshot();
}); });
}); });
}); });
@@ -251,8 +251,9 @@ Implement a comprehensive authentication system with multiple providers.
} }
await waitFor(() => { await waitFor(() => {
expect(lastFrame()).toMatchSnapshot(); expect(lastFrame()).toContain('Add tests');
}); });
expect(lastFrame()).toMatchSnapshot();
writeKey(stdin, '\r'); writeKey(stdin, '\r');
@@ -469,8 +470,9 @@ Implement a comprehensive authentication system with multiple providers.
writeKey(stdin, '\x03'); // Ctrl+C writeKey(stdin, '\x03'); // Ctrl+C
await waitFor(() => { await waitFor(() => {
expect(lastFrame()).toMatchSnapshot(); expect(lastFrame()).toContain('Type your feedback...');
}); });
expect(lastFrame()).toMatchSnapshot();
expect(onBubbledQuit).not.toHaveBeenCalled(); expect(onBubbledQuit).not.toHaveBeenCalled();
// Second Ctrl+C to exit (should bubble) // Second Ctrl+C to exit (should bubble)