Skip to content
Merged
Show file tree
Hide file tree
Changes from all 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
12 changes: 8 additions & 4 deletions x-pack/performance/journeys_e2e/data_stress_test_lens.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,15 @@
* 2.0.
*/

import { createDashboardJourney } from '../utils/dashboard_journey';
import { Journey } from '@kbn/journeys';
import { setupDashboardJourney } from '../utils/dashboard_journey';

export const journey = createDashboardJourney({
esArchives: ['src/platform/test/functional/fixtures/es_archiver/stress_test'],
kbnArchives: ['src/platform/test/functional/fixtures/kbn_archiver/stress_test'],
export const journey = setupDashboardJourney({
// call the journey constructor in this file so the name is set correctly
journey: new Journey({
esArchives: ['src/platform/test/functional/fixtures/es_archiver/stress_test'],
kbnArchives: ['src/platform/test/functional/fixtures/kbn_archiver/stress_test'],
}),
dashboardName: 'Stress Test Dashboard',
dashboardLinkSubj: 'dashboardListingTitleLink-Stresstest',
visualizationCount: 1,
Expand Down
12 changes: 8 additions & 4 deletions x-pack/performance/journeys_e2e/data_stress_test_lens_esql.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,15 @@
* 2.0.
*/

import { createDashboardJourney } from '../utils/dashboard_journey';
import { Journey } from '@kbn/journeys';
import { setupDashboardJourney } from '../utils/dashboard_journey';

export const journey = createDashboardJourney({
esArchives: ['src/platform/test/functional/fixtures/es_archiver/stress_test'],
kbnArchives: ['src/platform/test/functional/fixtures/kbn_archiver/stress_test_esql'],
export const journey = setupDashboardJourney({
// call the journey constructor in this file so the name is set correctly
journey: new Journey({
esArchives: ['src/platform/test/functional/fixtures/es_archiver/stress_test'],
kbnArchives: ['src/platform/test/functional/fixtures/kbn_archiver/stress_test_esql'],
}),
dashboardName: 'Stress Test Dashboard',
dashboardLinkSubj: 'dashboardListingTitleLink-Stresstest-(ES|QL)',
visualizationCount: 1,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,15 @@
* 2.0.
*/

import { createDashboardJourney } from '../utils/dashboard_journey';
import { Journey } from '@kbn/journeys';
import { setupDashboardJourney } from '../utils/dashboard_journey';

export const journey = createDashboardJourney({
esArchives: ['x-pack/performance/es_archives/sample_data_ecommerce_many_fields'],
kbnArchives: ['x-pack/performance/kbn_archives/ecommerce_map_only_dashboard'],
export const journey = setupDashboardJourney({
// call the journey constructor in this file so the name is set correctly
journey: new Journey({
esArchives: ['x-pack/performance/es_archives/sample_data_ecommerce_many_fields'],
kbnArchives: ['x-pack/performance/kbn_archives/ecommerce_map_only_dashboard'],
}),
dashboardName: 'Ecommerce Dashboard with Map only',
dashboardLinkSubj: 'dashboardListingTitleLink-[eCommerce]-Map-Only',
loadCompleteAwaiter: async (page, kibanaPage) => {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,15 @@
* 2.0.
*/

import { createDashboardJourney } from '../utils/dashboard_journey';
import { Journey } from '@kbn/journeys';
import { setupDashboardJourney } from '../utils/dashboard_journey';

export const journey = createDashboardJourney({
esArchives: ['x-pack/performance/es_archives/sample_data_ecommerce_many_fields'],
kbnArchives: ['x-pack/performance/kbn_archives/ecommerce_saved_search_only_dashboard'],
export const journey = setupDashboardJourney({
// call the journey constructor in this file so the name is set correctly
journey: new Journey({
esArchives: ['x-pack/performance/es_archives/sample_data_ecommerce_many_fields'],
kbnArchives: ['x-pack/performance/kbn_archives/ecommerce_saved_search_only_dashboard'],
}),
dashboardName: 'Ecommerce Dashboard with Saved Search only',
dashboardLinkSubj: 'dashboardListingTitleLink-[eCommerce]-Saved-Search-Dashboard',
visualizationCount: 1,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,15 @@
* 2.0.
*/

import { createDashboardJourney } from '../utils/dashboard_journey';
import { Journey } from '@kbn/journeys';
import { setupDashboardJourney } from '../utils/dashboard_journey';

export const journey = createDashboardJourney({
esArchives: ['x-pack/performance/es_archives/sample_data_ecommerce_many_fields'],
kbnArchives: ['x-pack/performance/kbn_archives/ecommerce_tsvb_gauge_only_dashboard'],
export const journey = setupDashboardJourney({
// call the journey constructor in this file so the name is set correctly
journey: new Journey({
esArchives: ['x-pack/performance/es_archives/sample_data_ecommerce_many_fields'],
kbnArchives: ['x-pack/performance/kbn_archives/ecommerce_tsvb_gauge_only_dashboard'],
}),
dashboardName: 'Ecommerce Dashboard with TSVB Gauge only',
dashboardLinkSubj: 'dashboardListingTitleLink-[eCommerce]-TSVB-Gauge-Only-Dashboard',
visualizationCount: 1,
Expand Down
12 changes: 8 additions & 4 deletions x-pack/performance/journeys_e2e/flight_dashboard.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,15 @@
* 2.0.
*/

import { createDashboardJourney } from '../utils/dashboard_journey';
import { Journey } from '@kbn/journeys';
import { setupDashboardJourney } from '../utils/dashboard_journey';

export const journey = createDashboardJourney({
esArchives: ['x-pack/performance/es_archives/sample_data_flights_many_fields'],
kbnArchives: ['x-pack/performance/kbn_archives/flights_no_map_dashboard'],
export const journey = setupDashboardJourney({
// call the journey constructor in this file so the name is set correctly
journey: new Journey({
esArchives: ['x-pack/performance/es_archives/sample_data_flights_many_fields'],
kbnArchives: ['x-pack/performance/kbn_archives/flights_no_map_dashboard'],
}),
dashboardName: 'Flights Dashboard',
dashboardLinkSubj: 'dashboardListingTitleLink-[Flights]-Global-Flight-Dashboard',
visualizationCount: 14,
Expand Down
12 changes: 8 additions & 4 deletions x-pack/performance/journeys_e2e/web_logs_dashboard.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,15 @@
* 2.0.
*/

import { createDashboardJourney } from '../utils/dashboard_journey';
import { Journey } from '@kbn/journeys';
import { setupDashboardJourney } from '../utils/dashboard_journey';

export const journey = createDashboardJourney({
esArchives: ['x-pack/performance/es_archives/sample_data_logs_many_fields'],
kbnArchives: ['x-pack/performance/kbn_archives/logs_no_map_dashboard'],
export const journey = setupDashboardJourney({
// call the journey constructor in this file so the name is set correctly
journey: new Journey({
esArchives: ['x-pack/performance/es_archives/sample_data_logs_many_fields'],
kbnArchives: ['x-pack/performance/kbn_archives/logs_no_map_dashboard'],
}),
dashboardName: 'Web Logs Dashboard',
dashboardLinkSubj: 'dashboardListingTitleLink-[Logs]-Web-Traffic',
visualizationCount: 11,
Expand Down
12 changes: 8 additions & 4 deletions x-pack/performance/journeys_e2e/web_logs_dashboard_esql.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,15 @@
* 2.0.
*/

import { createDashboardJourney } from '../utils/dashboard_journey';
import { Journey } from '@kbn/journeys';
import { setupDashboardJourney } from '../utils/dashboard_journey';

export const journey = createDashboardJourney({
esArchives: ['x-pack/performance/es_archives/sample_data_logs_many_fields'],
kbnArchives: ['x-pack/performance/kbn_archives/logs_no_map_dashboard_esql'],
export const journey = setupDashboardJourney({
// call the journey constructor in this file so the name is set correctly
journey: new Journey({
esArchives: ['x-pack/performance/es_archives/sample_data_logs_many_fields'],
kbnArchives: ['x-pack/performance/kbn_archives/logs_no_map_dashboard_esql'],
}),
dashboardName: 'Web Logs Dashboard',
dashboardLinkSubj: 'dashboardListingTitleLink-Logs-dashboard-with-ES|QL',
visualizationCount: 11,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,15 @@
* 2.0.
*/

import { createDashboardJourney } from '../utils/dashboard_journey';
import { Journey } from '@kbn/journeys';
import { setupDashboardJourney } from '../utils/dashboard_journey';

export const journey = createDashboardJourney({
esArchives: ['x-pack/performance/es_archives/sample_data_logs_many_fields'],
kbnArchives: ['x-pack/performance/kbn_archives/logs_no_map_dashboard_esql_long_running'],
export const journey = setupDashboardJourney({
// call the journey constructor in this file so the name is set correctly
journey: new Journey({
esArchives: ['x-pack/performance/es_archives/sample_data_logs_many_fields'],
kbnArchives: ['x-pack/performance/kbn_archives/logs_no_map_dashboard_esql_long_running'],
}),
dashboardName: 'Web Logs Dashboard',
dashboardLinkSubj: 'dashboardListingTitleLink-Logs-dashboard-with-ES|QL',
visualizationCount: 11,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,15 @@
* 2.0.
*/

import { createDashboardJourney } from '../utils/dashboard_journey';
import { Journey } from '@kbn/journeys';
import { setupDashboardJourney } from '../utils/dashboard_journey';

export const journey = createDashboardJourney({
esArchives: ['x-pack/performance/es_archives/sample_data_logs_many_fields'],
kbnArchives: ['x-pack/performance/kbn_archives/logs_no_map_dashboard_long_running'],
export const journey = setupDashboardJourney({
// call the journey constructor in this file so the name is set correctly
journey: new Journey({
esArchives: ['x-pack/performance/es_archives/sample_data_logs_many_fields'],
kbnArchives: ['x-pack/performance/kbn_archives/logs_no_map_dashboard_long_running'],
}),
dashboardName: 'Web Logs Dashboard',
dashboardLinkSubj: 'dashboardListingTitleLink-[Logs]-Web-Traffic',
visualizationCount: 11,
Expand Down
16 changes: 5 additions & 11 deletions x-pack/performance/utils/dashboard_journey.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,22 +6,21 @@
*/

import type { KibanaServer } from '@kbn/ftr-common-functional-services';
import { Journey } from '@kbn/journeys';
import type { Journey } from '@kbn/journeys';
import type { KibanaPage } from '@kbn/journeys/services/page/kibana_page';
import { subj } from '@kbn/test-subj-selector';
import type { Page } from 'playwright';

interface DashboardJourneyConfig {
esArchives: string[];
kbnArchives: string[];
journey: Journey<{}>;
dashboardName: string;
dashboardLinkSubj: string;
setup?: (kibanaServer: KibanaServer) => Promise<void>;
visualizationCount?: number;
loadCompleteAwaiter?: (page: Page, kibanaPage: KibanaPage) => Promise<void>;
}

export function createDashboardJourney(config: DashboardJourneyConfig): Journey<{}> {
export function setupDashboardJourney(config: DashboardJourneyConfig): Journey<{}> {
const waitForDashboardLoad = async (page: Page, kibanaPage: KibanaPage) => {
if (config.visualizationCount) {
await kibanaPage.waitForVisualizations({ count: config.visualizationCount });
Expand All @@ -34,18 +33,13 @@ export function createDashboardJourney(config: DashboardJourneyConfig): Journey<
}
};

const journey = new Journey({
esArchives: config.esArchives,
kbnArchives: config.kbnArchives,
});

if (config.setup) {
journey.step('Setup', async ({ kibanaServer }) => {
config.journey.step('Setup', async ({ kibanaServer }) => {
await config.setup!(kibanaServer);
});
}

return journey
return config.journey
.step('Go to Dashboards Page', async ({ page, kbnUrl, kibanaPage }) => {
await page.goto(kbnUrl.get(`/app/dashboards`));
await kibanaPage.waitForListViewTable();
Expand Down
Loading