mirror of
https://github.com/mauriceboe/TREK.git
synced 2026-12-01 17:03:15 +00:00
test(transit): find mode icons on the line badge
The search test must look for the icon beside the label inside the shared badge.
This commit is contained in:
@@ -616,7 +616,7 @@ describe('TransitSearchPanel', () => {
|
||||
await pickFromAndTo(user)
|
||||
await user.click(screen.getByRole('button', { name: /^Search$/ }))
|
||||
await screen.findByText('B1')
|
||||
const icon = (text: string) => screen.getAllByText(text)[0].closest('span')?.querySelector('svg')?.getAttribute('class')
|
||||
const icon = (text: string) => screen.getAllByText(text)[0].parentElement?.querySelector('svg')?.getAttribute('class')
|
||||
expect(icon('B1')).toContain('lucide-bus')
|
||||
expect(icon('M4')).toContain('lucide-tram-front')
|
||||
expect(icon('F10')).toContain('lucide-sailboat')
|
||||
|
||||
Reference in New Issue
Block a user