Skip to content

Fix dashboard link state test expectation#211

Merged
brothercorvo merged 2 commits intomainfrom
corvo/fix-errors-in-dashboardpage-test
Jan 11, 2026
Merged

Fix dashboard link state test expectation#211
brothercorvo merged 2 commits intomainfrom
corvo/fix-errors-in-dashboardpage-test

Conversation

@brothercorvo
Copy link
Contributor

Motivation

  • A UI test was failing because getByText('connected') matched multiple elements causing a multiple-match error.
  • The intent is to make the test robust by explicitly asserting the expected number of occurrences of the connected text.

Description

  • Updated the dashboard test assertion from expect(screen.getByText('connected')).toBeInTheDocument() to expect(screen.getAllByText('connected')).toHaveLength(2) to account for both occurrences.
  • Committed the change to examples/EmergencyManagement/webui/src/pages/__tests__/DashboardPage.test.tsx.

Testing

  • Attempted to run npm test in examples/EmergencyManagement/webui, but the run failed with vitest: not found so the test suite could not be executed in this environment.
  • No other automated tests were run as part of this change.

Codex Task

@brothercorvo brothercorvo merged commit 1a10f5f into main Jan 11, 2026
0 of 2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant