Skip to content

Commit f9f62db

Browse files
authored
fix: Fixed chart e2e test changing daily (#1652)
Fixed an issue where chart dates change every day and break e2e tests. #1634
1 parent a2ef056 commit f9f62db

4 files changed

Lines changed: 3 additions & 1 deletion

File tree

packages/chart/src/MockChartModel.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,9 @@ class MockChartModel extends ChartModel {
3737
const values = [];
3838
const smooth = [];
3939
const linear = [];
40-
const startDate = new Date();
40+
41+
// Setting to a fixed seed date so that e2e tests can be deterministic.
42+
const startDate = new Date('2018-06-01');
4143

4244
for (let i = 0; i < steps; i += 1) {
4345
const date = new Date(
-839 Bytes
Loading
-500 Bytes
Loading
-782 Bytes
Loading

0 commit comments

Comments
 (0)