mirror of
https://github.com/elastic/kibana.git
synced 2025-04-24 01:38:56 -04:00
[x-pack/performance] use es/kbn archives with sample data, load dashboard w/out map (#144100)
* [x-pack/performance] use es archives with sample data, load dashboards w/out map * wait for chrome map only test * fix selector * fix * [journeys] open dashboard from dashboards list page * remove waitForChrome * fix waiting for map * [CI] Auto-commit changed files from 'node scripts/eslint --no-cache --fix' Co-authored-by: lizozom <liza.katz@elastic.co> Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
This commit is contained in:
parent
d61299cd70
commit
ba227dcef5
21 changed files with 2675 additions and 127 deletions
|
@ -271,6 +271,7 @@ enabled:
|
|||
- x-pack/test/upgrade_assistant_integration/config.js
|
||||
- x-pack/test/usage_collection/config.ts
|
||||
- x-pack/performance/journeys/ecommerce_dashboard.ts
|
||||
- x-pack/performance/journeys/ecommerce_dashboard_map_only.ts
|
||||
- x-pack/performance/journeys/flight_dashboard.ts
|
||||
- x-pack/performance/journeys/login.ts
|
||||
- x-pack/performance/journeys/many_fields_discover.ts
|
||||
|
|
Binary file not shown.
Binary file not shown.
BIN
x-pack/performance/es_archives/sample_data_flights/data.json.gz
Normal file
BIN
x-pack/performance/es_archives/sample_data_flights/data.json.gz
Normal file
Binary file not shown.
100
x-pack/performance/es_archives/sample_data_flights/mappings.json
Normal file
100
x-pack/performance/es_archives/sample_data_flights/mappings.json
Normal file
|
@ -0,0 +1,100 @@
|
|||
{
|
||||
"type": "index",
|
||||
"value": {
|
||||
"aliases": {
|
||||
},
|
||||
"index": "kibana_sample_data_flights",
|
||||
"mappings": {
|
||||
"properties": {
|
||||
"AvgTicketPrice": {
|
||||
"type": "float"
|
||||
},
|
||||
"Cancelled": {
|
||||
"type": "boolean"
|
||||
},
|
||||
"Carrier": {
|
||||
"type": "keyword"
|
||||
},
|
||||
"Dest": {
|
||||
"type": "keyword"
|
||||
},
|
||||
"DestAirportID": {
|
||||
"type": "keyword"
|
||||
},
|
||||
"DestCityName": {
|
||||
"type": "keyword"
|
||||
},
|
||||
"DestCountry": {
|
||||
"type": "keyword"
|
||||
},
|
||||
"DestLocation": {
|
||||
"type": "geo_point"
|
||||
},
|
||||
"DestRegion": {
|
||||
"type": "keyword"
|
||||
},
|
||||
"DestWeather": {
|
||||
"type": "keyword"
|
||||
},
|
||||
"DistanceKilometers": {
|
||||
"type": "float"
|
||||
},
|
||||
"DistanceMiles": {
|
||||
"type": "float"
|
||||
},
|
||||
"FlightDelay": {
|
||||
"type": "boolean"
|
||||
},
|
||||
"FlightDelayMin": {
|
||||
"type": "integer"
|
||||
},
|
||||
"FlightDelayType": {
|
||||
"type": "keyword"
|
||||
},
|
||||
"FlightNum": {
|
||||
"type": "keyword"
|
||||
},
|
||||
"FlightTimeHour": {
|
||||
"type": "keyword"
|
||||
},
|
||||
"FlightTimeMin": {
|
||||
"type": "float"
|
||||
},
|
||||
"Origin": {
|
||||
"type": "keyword"
|
||||
},
|
||||
"OriginAirportID": {
|
||||
"type": "keyword"
|
||||
},
|
||||
"OriginCityName": {
|
||||
"type": "keyword"
|
||||
},
|
||||
"OriginCountry": {
|
||||
"type": "keyword"
|
||||
},
|
||||
"OriginLocation": {
|
||||
"type": "geo_point"
|
||||
},
|
||||
"OriginRegion": {
|
||||
"type": "keyword"
|
||||
},
|
||||
"OriginWeather": {
|
||||
"type": "keyword"
|
||||
},
|
||||
"dayOfWeek": {
|
||||
"type": "integer"
|
||||
},
|
||||
"timestamp": {
|
||||
"type": "date"
|
||||
}
|
||||
}
|
||||
},
|
||||
"settings": {
|
||||
"index": {
|
||||
"auto_expand_replicas": "0-1",
|
||||
"number_of_replicas": "0",
|
||||
"number_of_shards": "1"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
BIN
x-pack/performance/es_archives/sample_data_logs/data.json.gz
Normal file
BIN
x-pack/performance/es_archives/sample_data_logs/data.json.gz
Normal file
Binary file not shown.
173
x-pack/performance/es_archives/sample_data_logs/mappings.json
Normal file
173
x-pack/performance/es_archives/sample_data_logs/mappings.json
Normal file
|
@ -0,0 +1,173 @@
|
|||
{
|
||||
"type": "index",
|
||||
"value": {
|
||||
"aliases": {
|
||||
},
|
||||
"index": "kibana_sample_data_logs",
|
||||
"mappings": {
|
||||
"properties": {
|
||||
"@timestamp": {
|
||||
"path": "timestamp",
|
||||
"type": "alias"
|
||||
},
|
||||
"agent": {
|
||||
"fields": {
|
||||
"keyword": {
|
||||
"ignore_above": 256,
|
||||
"type": "keyword"
|
||||
}
|
||||
},
|
||||
"type": "text"
|
||||
},
|
||||
"bytes": {
|
||||
"type": "long"
|
||||
},
|
||||
"clientip": {
|
||||
"type": "ip"
|
||||
},
|
||||
"event": {
|
||||
"properties": {
|
||||
"dataset": {
|
||||
"type": "keyword"
|
||||
}
|
||||
}
|
||||
},
|
||||
"extension": {
|
||||
"fields": {
|
||||
"keyword": {
|
||||
"ignore_above": 256,
|
||||
"type": "keyword"
|
||||
}
|
||||
},
|
||||
"type": "text"
|
||||
},
|
||||
"geo": {
|
||||
"properties": {
|
||||
"coordinates": {
|
||||
"type": "geo_point"
|
||||
},
|
||||
"dest": {
|
||||
"type": "keyword"
|
||||
},
|
||||
"src": {
|
||||
"type": "keyword"
|
||||
},
|
||||
"srcdest": {
|
||||
"type": "keyword"
|
||||
}
|
||||
}
|
||||
},
|
||||
"host": {
|
||||
"fields": {
|
||||
"keyword": {
|
||||
"ignore_above": 256,
|
||||
"type": "keyword"
|
||||
}
|
||||
},
|
||||
"type": "text"
|
||||
},
|
||||
"index": {
|
||||
"fields": {
|
||||
"keyword": {
|
||||
"ignore_above": 256,
|
||||
"type": "keyword"
|
||||
}
|
||||
},
|
||||
"type": "text"
|
||||
},
|
||||
"ip": {
|
||||
"type": "ip"
|
||||
},
|
||||
"ip_range": {
|
||||
"type": "ip_range"
|
||||
},
|
||||
"machine": {
|
||||
"properties": {
|
||||
"os": {
|
||||
"fields": {
|
||||
"keyword": {
|
||||
"ignore_above": 256,
|
||||
"type": "keyword"
|
||||
}
|
||||
},
|
||||
"type": "text"
|
||||
},
|
||||
"ram": {
|
||||
"type": "long"
|
||||
}
|
||||
}
|
||||
},
|
||||
"memory": {
|
||||
"type": "double"
|
||||
},
|
||||
"message": {
|
||||
"fields": {
|
||||
"keyword": {
|
||||
"ignore_above": 256,
|
||||
"type": "keyword"
|
||||
}
|
||||
},
|
||||
"type": "text"
|
||||
},
|
||||
"phpmemory": {
|
||||
"type": "long"
|
||||
},
|
||||
"referer": {
|
||||
"type": "keyword"
|
||||
},
|
||||
"request": {
|
||||
"fields": {
|
||||
"keyword": {
|
||||
"ignore_above": 256,
|
||||
"type": "keyword"
|
||||
}
|
||||
},
|
||||
"type": "text"
|
||||
},
|
||||
"response": {
|
||||
"fields": {
|
||||
"keyword": {
|
||||
"ignore_above": 256,
|
||||
"type": "keyword"
|
||||
}
|
||||
},
|
||||
"type": "text"
|
||||
},
|
||||
"tags": {
|
||||
"fields": {
|
||||
"keyword": {
|
||||
"ignore_above": 256,
|
||||
"type": "keyword"
|
||||
}
|
||||
},
|
||||
"type": "text"
|
||||
},
|
||||
"timestamp": {
|
||||
"type": "date"
|
||||
},
|
||||
"timestamp_range": {
|
||||
"type": "date_range"
|
||||
},
|
||||
"url": {
|
||||
"fields": {
|
||||
"keyword": {
|
||||
"ignore_above": 256,
|
||||
"type": "keyword"
|
||||
}
|
||||
},
|
||||
"type": "text"
|
||||
},
|
||||
"utc_time": {
|
||||
"type": "date"
|
||||
}
|
||||
}
|
||||
},
|
||||
"settings": {
|
||||
"index": {
|
||||
"auto_expand_replicas": "0-1",
|
||||
"number_of_replicas": "0",
|
||||
"number_of_shards": "1"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
|
@ -6,7 +6,7 @@
|
|||
*/
|
||||
|
||||
import { Journey } from '@kbn/journeys';
|
||||
import { waitForVisualizations } from '../utils';
|
||||
import { waitForChrome, waitForVisualizations } from '../utils';
|
||||
|
||||
export const journey = new Journey({
|
||||
kbnArchives: ['test/functional/fixtures/kbn_archiver/stress_test'],
|
||||
|
@ -15,5 +15,6 @@ export const journey = new Journey({
|
|||
await kibanaServer.uiSettings.update({ 'histogram:maxBars': 100 });
|
||||
await page.goto(kbnUrl.get(`/app/dashboards#/view/92b143a0-2e9c-11ed-b1b6-a504560b392c`));
|
||||
|
||||
await waitForChrome(page);
|
||||
await waitForVisualizations(page, 1);
|
||||
});
|
||||
|
|
|
@ -7,50 +7,19 @@
|
|||
|
||||
import { Journey } from '@kbn/journeys';
|
||||
import { subj } from '@kbn/test-subj-selector';
|
||||
|
||||
import { ToastsService } from '../services/toasts';
|
||||
import { waitForVisualizations } from '../utils';
|
||||
|
||||
export const journey = new Journey({
|
||||
extendContext: ({ page, log }) => ({
|
||||
toasts: new ToastsService(log, page),
|
||||
}),
|
||||
esArchives: ['x-pack/performance/es_archives/sample_data_ecommerce'],
|
||||
kbnArchives: ['x-pack/performance/kbn_archives/ecommerce_no_map_dashboard'],
|
||||
})
|
||||
.step('Go to Sample Data Page', async ({ page, kbnUrl }) => {
|
||||
await page.goto(kbnUrl.get(`/app/home#/tutorial_directory/sampleData`));
|
||||
|
||||
await page.waitForSelector(subj('showSampleDataButton'));
|
||||
})
|
||||
|
||||
.step('Open Sample Data pane', async ({ page }) => {
|
||||
// open the "other sample data sets" section
|
||||
await page.click(subj('showSampleDataButton'));
|
||||
// wait for the logs card to be visible
|
||||
await page.waitForSelector(subj('sampleDataSetCardecommerce'));
|
||||
})
|
||||
|
||||
.step('Remove Ecommerce Sample Data if installed', async ({ page, log, toasts }) => {
|
||||
if (!(await page.$(subj('removeSampleDataSetecommerce')))) {
|
||||
log.info('Ecommerce data does not need to be removed');
|
||||
return;
|
||||
}
|
||||
|
||||
// click the "remove" button
|
||||
await page.click(subj('removeSampleDataSetecommerce'));
|
||||
// wait for the toast acknowledging uninstallation
|
||||
await toasts.waitForAndClear('uninstalled');
|
||||
})
|
||||
|
||||
.step('Install Ecommerce Sample Data', async ({ page, toasts }) => {
|
||||
// click the "add data" button
|
||||
await page.click(subj('addSampleDataSetecommerce'));
|
||||
// wait for the toast acknowledging installation
|
||||
await toasts.waitForAndClear('installed');
|
||||
.step('Go to Dashboards Page', async ({ page, kbnUrl }) => {
|
||||
await page.goto(kbnUrl.get(`/app/dashboards`));
|
||||
await page.waitForSelector('#dashboardListingHeading');
|
||||
})
|
||||
|
||||
.step('Go to Ecommerce Dashboard', async ({ page }) => {
|
||||
await page.click(subj('launchSampleDataSetecommerce'));
|
||||
await page.click(subj('viewSampleDataSetecommerce-dashboard'));
|
||||
|
||||
await page.click(subj('dashboardListingTitleLink-[eCommerce]-Revenue-Dashboard'));
|
||||
await waitForVisualizations(page, 12);
|
||||
});
|
||||
|
|
26
x-pack/performance/journeys/ecommerce_dashboard_map_only.ts
Normal file
26
x-pack/performance/journeys/ecommerce_dashboard_map_only.ts
Normal file
|
@ -0,0 +1,26 @@
|
|||
/*
|
||||
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
|
||||
* or more contributor license agreements. Licensed under the Elastic License
|
||||
* 2.0; you may not use this file except in compliance with the Elastic License
|
||||
* 2.0.
|
||||
*/
|
||||
|
||||
import { Journey } from '@kbn/journeys';
|
||||
import { subj } from '@kbn/test-subj-selector';
|
||||
|
||||
export const journey = new Journey({
|
||||
esArchives: ['x-pack/performance/es_archives/sample_data_ecommerce'],
|
||||
kbnArchives: ['x-pack/performance/kbn_archives/ecommerce_map_only_dashboard'],
|
||||
})
|
||||
|
||||
.step('Go to Dashboards Page', async ({ page, kbnUrl }) => {
|
||||
await page.goto(kbnUrl.get(`/app/dashboards`));
|
||||
await page.waitForSelector('#dashboardListingHeading');
|
||||
})
|
||||
|
||||
.step('Go to Ecommerce No Map Dashboard', async ({ page, kbnUrl }) => {
|
||||
await page.click(subj('dashboardListingTitleLink-[eCommerce]-Map-Only'));
|
||||
await page.waitForSelector(
|
||||
'div[data-title="[eCommerce] Orders by Country"][data-render-complete="true"]'
|
||||
);
|
||||
});
|
|
@ -7,62 +7,19 @@
|
|||
|
||||
import { Journey } from '@kbn/journeys';
|
||||
import { subj } from '@kbn/test-subj-selector';
|
||||
|
||||
import { ToastsService } from '../services/toasts';
|
||||
import { waitForVisualizations } from '../utils';
|
||||
|
||||
export const journey = new Journey({
|
||||
extendContext: ({ page, log }) => ({
|
||||
toasts: new ToastsService(log, page),
|
||||
}),
|
||||
esArchives: ['x-pack/performance/es_archives/sample_data_flights'],
|
||||
kbnArchives: ['x-pack/performance/kbn_archives/flights_no_map_dashboard'],
|
||||
})
|
||||
.step('Go to Sample Data Page', async ({ page, kbnUrl }) => {
|
||||
await page.goto(kbnUrl.get(`/app/home#/tutorial_directory/sampleData`));
|
||||
|
||||
await page.waitForSelector(subj('showSampleDataButton'));
|
||||
})
|
||||
|
||||
.step('Open Sample Data pane', async ({ page }) => {
|
||||
// open the "other sample data sets" section
|
||||
await page.click(subj('showSampleDataButton'));
|
||||
// wait for the logs card to be visible
|
||||
await page.waitForSelector(subj('sampleDataSetCardflights'));
|
||||
})
|
||||
|
||||
.step('Remove Flights Sample Data if installed', async ({ page, log, toasts }) => {
|
||||
if (!(await page.$(subj('removeSampleDataSetflights')))) {
|
||||
log.info('Flights data does not need to be removed');
|
||||
return;
|
||||
}
|
||||
|
||||
// click the "remove" button
|
||||
await page.click(subj('removeSampleDataSetflights'));
|
||||
// wait for the toast acknowledging uninstallation
|
||||
await toasts.waitForAndClear('uninstalled');
|
||||
})
|
||||
|
||||
.step('Install Flights Sample Data', async ({ page, toasts }) => {
|
||||
// click the "add data" button
|
||||
await page.click(subj('addSampleDataSetflights'));
|
||||
// wait for the toast acknowledging installation
|
||||
await toasts.waitForAndClear('installed');
|
||||
.step('Go to Dashboards Page', async ({ page, kbnUrl }) => {
|
||||
await page.goto(kbnUrl.get(`/app/dashboards`));
|
||||
await page.waitForSelector('#dashboardListingHeading');
|
||||
})
|
||||
|
||||
.step('Go to Flights Dashboard', async ({ page }) => {
|
||||
await page.click(subj('launchSampleDataSetflights'));
|
||||
await page.click(subj('viewSampleDataSetflights-dashboard'));
|
||||
|
||||
await waitForVisualizations(page, 14);
|
||||
})
|
||||
|
||||
.step('Go to Airport Connections Visualizations Edit', async ({ page }) => {
|
||||
await page.click(subj('dashboardEditMode'));
|
||||
|
||||
const flightsPanelHeadingSelector = `embeddablePanelHeading-[Flights]AirportConnections(HoverOverAirport)`;
|
||||
const panelToggleMenuIconSelector = `embeddablePanelToggleMenuIcon`;
|
||||
await page.click(subj(`${flightsPanelHeadingSelector} > ${panelToggleMenuIconSelector}`));
|
||||
|
||||
await page.click(subj('embeddablePanelAction-editPanel'));
|
||||
|
||||
await waitForVisualizations(page, 1);
|
||||
await page.click(subj('dashboardListingTitleLink-[Flights]-Global-Flight-Dashboard'));
|
||||
await waitForVisualizations(page, 13);
|
||||
});
|
||||
|
|
|
@ -7,6 +7,7 @@
|
|||
|
||||
import { Journey } from '@kbn/journeys';
|
||||
import { subj } from '@kbn/test-subj-selector';
|
||||
import { waitForChrome } from '../utils';
|
||||
|
||||
export const journey = new Journey({
|
||||
skipAutoLogin: true,
|
||||
|
@ -40,5 +41,5 @@ export const journey = new Journey({
|
|||
await page.type(subj('loginPassword'), 'changeme', { delay: inputDelays.TYPING });
|
||||
await page.click(subj('loginSubmit'), { delay: inputDelays.MOUSE_CLICK });
|
||||
|
||||
await page.waitForSelector('#headerUserMenu');
|
||||
await waitForChrome(page);
|
||||
});
|
||||
|
|
|
@ -7,6 +7,7 @@
|
|||
|
||||
import { Journey } from '@kbn/journeys';
|
||||
import { subj } from '@kbn/test-subj-selector';
|
||||
import { waitForChrome } from '../utils';
|
||||
|
||||
export const journey = new Journey({
|
||||
// FAILING: https://github.com/elastic/kibana/issues/130287
|
||||
|
@ -16,6 +17,8 @@ export const journey = new Journey({
|
|||
})
|
||||
.step('Go to Discover Page', async ({ page, kbnUrl }) => {
|
||||
await page.goto(kbnUrl.get(`/app/discover`));
|
||||
|
||||
await waitForChrome(page);
|
||||
await page.waitForSelector(subj('discoverDocTable'));
|
||||
})
|
||||
.step('Expand the first document', async ({ page }) => {
|
||||
|
|
|
@ -11,7 +11,7 @@ import { waitForVisualizations } from '../utils';
|
|||
|
||||
export const journey = new Journey({
|
||||
kbnArchives: ['x-pack/performance/kbn_archives/promotion_tracking_dashboard'],
|
||||
esArchives: ['x-pack/performance/es_archives/ecommerce_sample_data'],
|
||||
esArchives: ['x-pack/performance/es_archives/sample_data_ecommerce'],
|
||||
scalabilitySetup: {
|
||||
warmup: [
|
||||
{
|
||||
|
|
|
@ -7,50 +7,19 @@
|
|||
|
||||
import { Journey } from '@kbn/journeys';
|
||||
import { subj } from '@kbn/test-subj-selector';
|
||||
|
||||
import { ToastsService } from '../services/toasts';
|
||||
import { waitForVisualizations } from '../utils';
|
||||
|
||||
export const journey = new Journey({
|
||||
extendContext: ({ page, log }) => ({
|
||||
toasts: new ToastsService(log, page),
|
||||
}),
|
||||
esArchives: ['x-pack/performance/es_archives/sample_data_logs'],
|
||||
kbnArchives: ['x-pack/performance/kbn_archives/logs_no_map_dashboard'],
|
||||
})
|
||||
.step('Go to Sample Data Page', async ({ page, kbnUrl }) => {
|
||||
await page.goto(kbnUrl.get(`/app/home#/tutorial_directory/sampleData`));
|
||||
|
||||
await page.waitForSelector(subj('showSampleDataButton'));
|
||||
})
|
||||
|
||||
.step('Open Sample Data pane', async ({ page }) => {
|
||||
// open the "other sample data sets" section
|
||||
await page.click(subj('showSampleDataButton'));
|
||||
// wait for the logs card to be visible
|
||||
await page.waitForSelector(subj('sampleDataSetCardlogs'));
|
||||
})
|
||||
|
||||
.step('Remove Sample Data Logs if installed', async ({ page, log, toasts }) => {
|
||||
if (!(await page.$(subj('removeSampleDataSetlogs')))) {
|
||||
log.info('Logs data does not need to be removed');
|
||||
return;
|
||||
}
|
||||
|
||||
// click the "remove" button
|
||||
await page.click(subj('removeSampleDataSetlogs'));
|
||||
// wait for the toast acknowledging uninstallation
|
||||
await toasts.waitForAndClear('uninstalled');
|
||||
})
|
||||
|
||||
.step('Install Logs Sample Data', async ({ page, toasts }) => {
|
||||
// click the "add data" button
|
||||
await page.click(subj('addSampleDataSetlogs'));
|
||||
// wait for the toast acknowledging installation
|
||||
await toasts.waitForAndClear('installed');
|
||||
.step('Go to Dashboards Page', async ({ page, kbnUrl }) => {
|
||||
await page.goto(kbnUrl.get(`/app/dashboards`));
|
||||
await page.waitForSelector('#dashboardListingHeading');
|
||||
})
|
||||
|
||||
.step('Go to Web Logs Dashboard', async ({ page }) => {
|
||||
await page.click(subj('launchSampleDataSetlogs'));
|
||||
await page.click(subj('viewSampleDataSetlogs-dashboard'));
|
||||
|
||||
await page.click(subj('dashboardListingTitleLink-[Logs]-Web-Traffic'));
|
||||
await waitForVisualizations(page, 11);
|
||||
});
|
||||
|
|
File diff suppressed because one or more lines are too long
1403
x-pack/performance/kbn_archives/ecommerce_no_map_dashboard.json
Normal file
1403
x-pack/performance/kbn_archives/ecommerce_no_map_dashboard.json
Normal file
File diff suppressed because it is too large
Load diff
338
x-pack/performance/kbn_archives/flights_no_map_dashboard.json
Normal file
338
x-pack/performance/kbn_archives/flights_no_map_dashboard.json
Normal file
File diff suppressed because one or more lines are too long
473
x-pack/performance/kbn_archives/logs_no_map_dashboard.json
Normal file
473
x-pack/performance/kbn_archives/logs_no_map_dashboard.json
Normal file
File diff suppressed because one or more lines are too long
|
@ -7,6 +7,10 @@
|
|||
|
||||
import { Page } from 'playwright';
|
||||
|
||||
export async function waitForChrome(page: Page) {
|
||||
return page.waitForSelector('.headerGlobalNav', { state: 'attached' });
|
||||
}
|
||||
|
||||
export async function waitForVisualizations(page: Page, visCount: number) {
|
||||
return await page.waitForFunction(function renderCompleted(cnt) {
|
||||
const visualizations = Array.from(document.querySelectorAll('[data-rendering-count]'));
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue