Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Maps] update sample data functional test to use a longer time range to ensure stable results #132744

Merged
merged 14 commits into from
Jun 6, 2022
Merged
Show file tree
Hide file tree
Changes from 10 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
59 changes: 7 additions & 52 deletions x-pack/test/functional/apps/maps/group1/sample_data.js
Original file line number Diff line number Diff line change
Expand Up @@ -29,61 +29,16 @@ export default function ({ getPageObjects, getService, updateBaselines }) {
await PageObjects.home.addSampleDataSet('ecommerce');
await PageObjects.home.addSampleDataSet('flights');
await PageObjects.home.addSampleDataSet('logs');

// Sample data is shifted to be relative to current time
// This means that a static timerange will return different documents
// Setting the time range to a window larger than the sample data set
// ensures all documents are coverered by time query so the ES results will always be the same
const SAMPLE_DATA_RANGE = `[
{
"from": "now-30d",
"to": "now+40d",
"from": "now-180d",
"to": "now+180d",
"display": "sample data range"
},
{
"from": "now/d",
"to": "now/d",
"display": "Today"
},
{
"from": "now/w",
"to": "now/w",
"display": "This week"
},
{
"from": "now-15m",
"to": "now",
"display": "Last 15 minutes"
},
{
"from": "now-30m",
"to": "now",
"display": "Last 30 minutes"
},
{
"from": "now-1h",
"to": "now",
"display": "Last 1 hour"
},
{
"from": "now-24h",
"to": "now",
"display": "Last 24 hours"
},
{
"from": "now-7d",
"to": "now",
"display": "Last 7 days"
},
{
"from": "now-30d",
"to": "now",
"display": "Last 30 days"
},
{
"from": "now-90d",
"to": "now",
"display": "Last 90 days"
},
{
"from": "now-1y",
"to": "now",
"display": "Last 1 year"
}
]`;

Expand Down
Binary file modified x-pack/test/functional/screenshots/baseline/ecommerce_map.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified x-pack/test/functional/screenshots/baseline/flights_map.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified x-pack/test/functional/screenshots/baseline/web_logs_map.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
59 changes: 7 additions & 52 deletions x-pack/test/upgrade/apps/maps/maps_smoke_tests.ts
Original file line number Diff line number Diff line change
Expand Up @@ -21,61 +21,16 @@ export default function ({
const testSubjects = getService('testSubjects');
const kibanaServer = getService('kibanaServer');
const browser = getService('browser');

// Sample data is shifted to be relative to current time
// This means that a static timerange will return different documents
// Setting the time range to a window larger than the sample data set
// ensures all documents are coverered by time query so the ES results will always be the same
const SAMPLE_DATA_RANGE = `[
{
"from": "now-30d",
"to": "now+40d",
"from": "now-180d",
"to": "now+180d",
"display": "sample data range"
},
{
"from": "now/d",
"to": "now/d",
"display": "Today"
},
{
"from": "now/w",
"to": "now/w",
"display": "This week"
},
{
"from": "now-15m",
"to": "now",
"display": "Last 15 minutes"
},
{
"from": "now-30m",
"to": "now",
"display": "Last 30 minutes"
},
{
"from": "now-1h",
"to": "now",
"display": "Last 1 hour"
},
{
"from": "now-24h",
"to": "now",
"display": "Last 24 hours"
},
{
"from": "now-7d",
"to": "now",
"display": "Last 7 days"
},
{
"from": "now-30d",
"to": "now",
"display": "Last 30 days"
},
{
"from": "now-90d",
"to": "now",
"display": "Last 90 days"
},
{
"from": "now-1y",
"to": "now",
"display": "Last 1 year"
}
]`;

Expand Down