Skip to content

Commit

Permalink
Adding mobile location timeseries tests
Browse files Browse the repository at this point in the history
  • Loading branch information
LikeTheSalad committed Nov 3, 2023
1 parent 1f794c9 commit 5cafe2f
Showing 1 changed file with 22 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -347,6 +347,28 @@ export default function ApiTest({ getService }: FtrProviderContext) {
kuery: `service.version:"1.1" and service.environment: "production"`,
});

const timestamps = dataGenerated.timestamps;
expect(
response.currentPeriod.mostSessions.timeseries.every((item) =>
timestamps.includes(item.x) ? item.y === 1 : item.y === 0
)
).to.eql(true);
expect(
response.currentPeriod.mostRequests.timeseries.every((item) =>
timestamps.includes(item.x) ? item.y === 1 : item.y === 0
)
).to.eql(true);
expect(
response.currentPeriod.mostCrashes.timeseries.every((item) =>
timestamps.includes(item.x) ? item.y === 1 : item.y === 0
)
).to.eql(true);
expect(
response.currentPeriod.mostLaunches.timeseries.every((item) =>
timestamps.includes(item.x) ? item.y === 1 : item.y === 0
)
).to.eql(true);

expect(response.currentPeriod.mostSessions.value).to.eql(3);
expect(response.currentPeriod.mostRequests.value).to.eql(3);
expect(response.currentPeriod.mostCrashes.value).to.eql(3);
Expand Down

0 comments on commit 5cafe2f

Please sign in to comment.