Skip to content

Commit b46697a

Browse files
Copilothotlong
andcommitted
Address code review comments: improve test assertions
- Made "In Progress" count assertion more specific (toBeGreaterThanOrEqual(2)) - Removed redundant badge check - Changed vague regex /1/ to specific exact match "1 / 3" - All tests still passing - CodeQL security scan: 0 vulnerabilities Co-authored-by: hotlong <50353452+hotlong@users.noreply.github.com>
1 parent bc0af35 commit b46697a

File tree

1 file changed

+3
-9
lines changed

1 file changed

+3
-9
lines changed

apps/console/src/__tests__/BrowserSimulation.test.tsx

Lines changed: 3 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -295,7 +295,7 @@ describe('Kanban Integration', () => {
295295

296296
// Use getAllByText for "In Progress" since it appears in both header and badge
297297
const inProgressElements = screen.getAllByText('In Progress');
298-
expect(inProgressElements.length).toBeGreaterThan(0);
298+
expect(inProgressElements.length).toBeGreaterThanOrEqual(2); // Column header + badge
299299

300300
expect(screen.getByText('Done')).toBeInTheDocument();
301301

@@ -312,16 +312,10 @@ describe('Kanban Integration', () => {
312312
// Verify badges
313313
expect(screen.getByText('High Priority')).toBeInTheDocument();
314314
expect(screen.getByText('Bug')).toBeInTheDocument();
315-
316-
// "In Progress" appears in both header and badge, check length
317-
const inProgressBadges = screen.getAllByText('In Progress');
318-
expect(inProgressBadges.length).toBeGreaterThanOrEqual(1);
319-
320315
expect(screen.getByText('Completed')).toBeInTheDocument();
321316

322-
// Verify column count display (shows "1" for task count in In Progress column)
323-
const countElements = screen.getAllByText(/1/);
324-
expect(countElements.length).toBeGreaterThan(0);
317+
// Verify column count display - In Progress column shows "1 / 3" (1 card out of limit of 3)
318+
expect(screen.getByText('1 / 3')).toBeInTheDocument();
325319
});
326320

327321
it('Scenario B: Metadata-Driven Hydration (Server Test)', async () => {

0 commit comments

Comments
 (0)