Skip to content

Commit 15589ba

Browse files
committed
test(ui): a step left by Back before Next is not completed
Claude-Session: https://claude.ai/code/session_01JQwxbZ31aDwuL2615F85BS Co-authored-by: Claude <noreply@anthropic.com>
1 parent 1853dac commit 15589ba

1 file changed

Lines changed: 7 additions & 1 deletion

File tree

‎ui/apps/console/src/components/FormPage.wizardSteps-27224.test.tsx‎

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -147,9 +147,15 @@ describe('FormPage draws a wizard form view as steps (#27224)', () => {
147147
expect(step('main')!.getAttribute('data-state')).toBe('complete');
148148
await userEvent.click(button('Back')!);
149149
expect(isCurrent('main')).toBe(true);
150-
// A completed step stays open from the indicator.
150+
// A step left by Back before its Next passed is not completed, so it does
151+
// not open from the indicator (the app's wizard rule); a completed one does.
152+
expect(step('more')!.disabled).toBe(true);
153+
await userEvent.click(button('Next')!);
154+
await userEvent.click(button('Next')!);
155+
await userEvent.click(step('main')!);
151156
expect(step('more')!.disabled).toBe(false);
152157
await userEvent.click(step('more')!);
158+
expect(isCurrent('more')).toBe(true);
153159
await userEvent.click(button('Next')!);
154160
expect(isCurrent('routing')).toBe(true);
155161
expect(button('Next')).toBeNull();

0 commit comments

Comments
 (0)