Skip to content

Commit af1ddac

Browse files
aidandaly24claude
andcommitted
test(gateway): update claim form test for Enter-advances-fields behavior
The test expected Enter to immediately submit and show a validation error, but Enter now advances to the next field. Updated the test to press Enter through all fields before expecting the submission validation error. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
1 parent 3562de9 commit af1ddac

1 file changed

Lines changed: 8 additions & 2 deletions

File tree

src/cli/tui/screens/mcp/__tests__/AddGatewayJwtConfig.test.tsx

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -409,8 +409,14 @@ describe('Custom Claims Form', () => {
409409
}
410410
await delay();
411411

412-
// Press Enter without filling matchValue
413-
stdin.write(ENTER);
412+
// Enter advances through fields: claimName -> valueType -> operator -> matchValue
413+
stdin.write(ENTER); // advance to valueType
414+
await delay();
415+
stdin.write(ENTER); // advance to operator
416+
await delay();
417+
stdin.write(ENTER); // advance to matchValue
418+
await delay();
419+
stdin.write(ENTER); // submit on last field — matchValue is empty
414420
await delay();
415421

416422
expect(lastFrame()).toContain('Match value is required');

0 commit comments

Comments
 (0)