Skip to content

Commit

Permalink
fix: arrival by day chart (#1016)
Browse files Browse the repository at this point in the history
  • Loading branch information
NoamGaash authored Jan 21, 2025
1 parent 0c84c3d commit 885e054
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,9 @@ export default function ArrivalByTimeChart({
const pointsPerOperator = arrayGroup(data, (item) => item.id).map((operatorData) => {
return allRange.map((time) => {
const current = operatorData.find(
(item) => time.includes(item.gtfs_route_date!) || time.includes(item.gtfs_route_hour!),
(item) =>
time.includes(item.gtfs_route_date!.split('T')[0]) ||
time.includes(item.gtfs_route_hour!),
)
return {
id: operatorData[0].id,
Expand Down
7 changes: 7 additions & 0 deletions tests/dashboard.spec.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import { expect } from '@playwright/test'
import { test, urlMatcher } from './utils'

test.describe('dashboard tests', () => {
Expand Down Expand Up @@ -26,4 +27,10 @@ test.describe('dashboard tests', () => {
await page.getByLabel('עבור למצב כהה').click()
await page.getByLabel('עבור למצב בהיר').click()
})

test('dashboard charts contain information', async ({ page }) => {
await expect(page.getByText('686 | קווים').first()).toBeVisible()
await expect(page.getByText('מועצה אזורית גולן').first()).toBeVisible()
await expect(page.getByRole('heading', { name: 'אגד תעבורה' })).toBeVisible()
})
})

0 comments on commit 885e054

Please sign in to comment.