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

[Sample data] replace legacy control visualizations with dashboard controls #141824

Merged
merged 10 commits into from
Oct 4, 2022
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
Expand Up @@ -200,7 +200,7 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) {
);

expect(event.properties.key2).to.be('num_of_panels');
expect(event.properties.value2).to.be(17);
expect(event.properties.value2).to.be(16);
});

/**
Expand Down
8 changes: 4 additions & 4 deletions test/functional/apps/home/_sample_data.ts
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) {
await PageObjects.header.waitUntilLoadingHasFinished();
await renderable.waitForRender();
const panelCount = await PageObjects.dashboard.getPanelCount();
expect(panelCount).to.be(17);
expect(panelCount).to.be(16);
});

it('should render visualizations', async () => {
Expand All @@ -107,7 +107,7 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) {
log.debug('Checking saved searches rendered');
await dashboardExpect.savedSearchRowCount(10);
log.debug('Checking input controls rendered');
await dashboardExpect.inputControlItemCount(3);
await dashboardExpect.controlCount(3);
log.debug('Checking tag cloud rendered');
await dashboardExpect.tagCloudWithValuesFound(['Sunny', 'Rain', 'Clear', 'Cloudy', 'Hail']);
log.debug('Checking vega chart rendered');
Expand All @@ -119,15 +119,15 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) {
await PageObjects.header.waitUntilLoadingHasFinished();
await renderable.waitForRender();
const panelCount = await PageObjects.dashboard.getPanelCount();
expect(panelCount).to.be(13);
expect(panelCount).to.be(12);
});

it('should launch sample ecommerce data set dashboard', async () => {
await PageObjects.home.launchSampleDashboard('ecommerce');
await PageObjects.header.waitUntilLoadingHasFinished();
await renderable.waitForRender();
const panelCount = await PageObjects.dashboard.getPanelCount();
expect(panelCount).to.be(15);
expect(panelCount).to.be(14);
});
});

Expand Down
9 changes: 9 additions & 0 deletions test/functional/services/dashboard/expectations.ts
Original file line number Diff line number Diff line change
Expand Up @@ -281,6 +281,7 @@ export class DashboardExpectService extends FtrService {
});
}

// legacy controls visualization
async inputControlItemCount(expectedCount: number) {
this.log.debug(`DashboardExpect.inputControlItemCount(${expectedCount})`);
await this.retry.try(async () => {
Expand All @@ -289,6 +290,14 @@ export class DashboardExpectService extends FtrService {
});
}

async controlCount(expectedCount: number) {
this.log.debug(`DashboardExpect.controlCount(${expectedCount})`);
await this.retry.try(async () => {
const controls = await this.testSubjects.findAll('control-frame');
expect(controls.length).to.be(expectedCount);
});
}

async lineChartPointsCount(expectedCount: number) {
this.log.debug(`DashboardExpect.lineChartPointsCount(${expectedCount})`);
await this.retry.try(async () => {
Expand Down
2 changes: 1 addition & 1 deletion x-pack/performance/journeys/ecommerce_dashboard.ts
Original file line number Diff line number Diff line change
Expand Up @@ -52,5 +52,5 @@ export const journey = new Journey({
await page.click(subj('launchSampleDataSetecommerce'));
await page.click(subj('viewSampleDataSetecommerce-dashboard'));

await waitForVisualizations(page, 13);
await waitForVisualizations(page, 12);
});
2 changes: 1 addition & 1 deletion x-pack/performance/journeys/flight_dashboard.ts
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ export const journey = new Journey({
await page.click(subj('launchSampleDataSetflights'));
await page.click(subj('viewSampleDataSetflights-dashboard'));

await waitForVisualizations(page, 15);
await waitForVisualizations(page, 14);
})

.step('Go to Airport Connections Visualizations Edit', async ({ page }) => {
Expand Down
2 changes: 1 addition & 1 deletion x-pack/performance/journeys/web_logs_dashboard.ts
Original file line number Diff line number Diff line change
Expand Up @@ -52,5 +52,5 @@ export const journey = new Journey({
await page.click(subj('launchSampleDataSetlogs'));
await page.click(subj('viewSampleDataSetlogs-dashboard'));

await waitForVisualizations(page, 12);
await waitForVisualizations(page, 11);
});
Original file line number Diff line number Diff line change
Expand Up @@ -179,7 +179,7 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) {
log.debug('Checking saved searches rendered');
await dashboardExpect.savedSearchRowCount(10);
log.debug('Checking input controls rendered');
await dashboardExpect.inputControlItemCount(3);
await dashboardExpect.controlCount(3);
log.debug('Checking tag cloud rendered');
await dashboardExpect.tagCloudWithValuesFound(['Sunny', 'Rain', 'Clear', 'Cloudy', 'Hail']);
log.debug('Checking vega chart rendered');
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) {
log.debug('Checking saved searches rendered');
await dashboardExpect.savedSearchRowCount(11);
log.debug('Checking input controls rendered');
await dashboardExpect.inputControlItemCount(3);
await dashboardExpect.controlCount(3);
log.debug('Checking tag cloud rendered');
await dashboardExpect.tagCloudWithValuesFound(['Sunny', 'Rain', 'Clear', 'Cloudy', 'Hail']);
log.debug('Checking vega chart rendered');
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ export default function ({ getPageObjects, getService }: FtrProviderContext) {
log.debug('Checking saved searches rendered');
await dashboardExpect.savedSearchRowCount(49);
log.debug('Checking input controls rendered');
await dashboardExpect.inputControlItemCount(3);
await dashboardExpect.controlCount(3);
log.debug('Checking tag cloud rendered');
await dashboardExpect.tagCloudWithValuesFound([
'Sunny',
Expand Down