Skip to content

Commit aaf9869

Browse files
committed
test(plugin-chatbot): assert the missing approve button before the question
The done-when assertion goes first, so an ablation of the question face fails on the Build it button it brings back. Claude-Session: https://claude.ai/code/session_01Utp6Ca9ZbSdPg2iuzBYA3d Co-authored-by: Claude <noreply@anthropic.com>
1 parent 75f8603 commit aaf9869

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

‎ui/packages/plugin-chatbot/src/__tests__/ChatbotEnhanced.iterateOrNew-27480.test.tsx‎

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,11 +65,12 @@ afterEach(cleanup);
6565
describe('the iterate_or_new plan asks extend-or-new instead of offering Build it (objectstack#27480)', () => {
6666
it('renders the question naming the existing app, and no approve button', () => {
6767
render(<ChatbotEnhanced messages={messagesOf(proposal(ITERATE_OR_NEW))} onSendMessage={vi.fn()} />);
68-
expect(screen.getByTestId('proposed-plan-iterate-or-new-question').textContent).toContain('图书馆');
68+
// The card's done-when first: no approval gate of any kind.
6969
expect(screen.queryByTestId('proposed-plan-approve')).toBeNull();
7070
expect(screen.queryByTestId('proposed-plan-adjust')).toBeNull();
7171
expect(screen.queryByTestId('proposed-plan-fallback')).toBeNull();
7272
expect(screen.queryByText('Build it')).toBeNull();
73+
expect(screen.getByTestId('proposed-plan-iterate-or-new-question').textContent).toContain('图书馆');
7374
// The plan's own rows stay, so the user sees what would be built either way.
7475
expect(screen.getByTestId('proposed-plan')).toBeInTheDocument();
7576
});

0 commit comments

Comments
 (0)