Skip to content

Commit

Permalink
Add date filtering functional test
Browse files Browse the repository at this point in the history
  • Loading branch information
tbidne committed Jan 20, 2025
1 parent e8f5f6d commit 7c02512
Show file tree
Hide file tree
Showing 2 changed files with 95 additions and 0 deletions.
5 changes: 5 additions & 0 deletions test/functional/data/testFilterPreds/chart-requests.toml
Original file line number Diff line number Diff line change
Expand Up @@ -22,3 +22,8 @@ filters = ['duration > 40m', 'duration < 3h']
title = 'Specific duration runs using and'
y-axis = 'duration'
filters = ['and (duration > 40m) (duration < 3h)']

[[charts]]
title = 'Runs within date range'
y-axis = 'distance'
filters = ['and (date >= 2024-10-17) (date < 2024-10-19)']
90 changes: 90 additions & 0 deletions test/functional/goldens/testFilterPreds.golden
Original file line number Diff line number Diff line change
Expand Up @@ -446,6 +446,96 @@
}
}
}
},
{
"datasets": {
"xAxis": [
"2024-10-17",
"2024-10-18"
],
"yAxes": [
{
"data": [
10,
30
],
"fill": false,
"label": "distance",
"pointHoverRadius": 20,
"tension": 0,
"yAxisID": "y"
}
]
},
"extra": {},
"options": {
"maintainAspectRatio": false,
"plugins": {
"legend": {
"labels": {
"color": "#c3c3c3"
}
},
"title": {
"align": "center",
"color": "#c3c3c3",
"display": true,
"font": {
"size": 24
},
"text": "Runs within date range"
},
"tooltip": {
"backgroundColor": "rgba(204, 204, 204, 0.75)",
"bodyColor": "black",
"titleColor": "black"
}
},
"pointHitRadius": 20,
"responsive": true,
"scales": {
"x": {
"grid": {
"color": "#393939"
},
"ticks": {
"color": "#c3c3c3"
},
"time": {
"displayFormats": {
"day": "dd MMM yy"
},
"unit": "day"
},
"title": {
"color": "#c3c3c3",
"display": true,
"font": {
"size": 16
},
"text": "datetime"
},
"type": "timeseries"
},
"y": {
"grid": {
"color": "#393939"
},
"position": "left",
"ticks": {
"color": "#c3c3c3"
},
"title": {
"color": "#c3c3c3",
"display": true,
"font": {
"size": 16
},
"text": "km"
}
}
}
}
}
]

0 comments on commit 7c02512

Please sign in to comment.