Skip to content

Commit

Permalink
Fix more pie related tests
Browse files Browse the repository at this point in the history
  • Loading branch information
stratoula committed May 9, 2022
1 parent fce585f commit 21d45ba
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 2 deletions.
4 changes: 4 additions & 0 deletions test/functional/apps/dashboard/group1/legacy_urls.ts
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) {
const listingTable = getService('listingTable');
const kibanaServer = getService('kibanaServer');
const security = getService('security');
const elasticChart = getService('elasticChart');

let kibanaLegacyBaseUrl: string;
let kibanaVisualizeBaseUrl: string;
Expand Down Expand Up @@ -63,6 +64,7 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) {
const url = `${kibanaLegacyBaseUrl}#/dashboard/${testDashboardId}`;
await browser.get(url, true);
await PageObjects.header.waitUntilLoadingHasFinished();
await elasticChart.setNewChartUiDebugFlag(true);
await PageObjects.timePicker.setDefaultDataRange();

await PageObjects.dashboard.waitForRenderComplete();
Expand All @@ -72,6 +74,7 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) {
it('redirects from legacy hash in wrong app', async () => {
const url = `${kibanaVisualizeBaseUrl}#/dashboard/${testDashboardId}`;
await browser.get(url, true);
await elasticChart.setNewChartUiDebugFlag(true);
await PageObjects.header.waitUntilLoadingHasFinished();
await PageObjects.timePicker.setDefaultDataRange();

Expand Down Expand Up @@ -111,6 +114,7 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) {
await dashboardAddPanel.addVisualization('legacy url markdown');
(await find.byLinkText('abc')).click();
await PageObjects.header.waitUntilLoadingHasFinished();
await elasticChart.setNewChartUiDebugFlag(true);
await PageObjects.timePicker.setDefaultDataRange();

await PageObjects.dashboard.waitForRenderComplete();
Expand Down
8 changes: 6 additions & 2 deletions test/functional/apps/dashboard/group2/dashboard_filtering.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) {
const dashboardExpect = getService('dashboardExpect');
const pieChart = getService('pieChart');
const queryBar = getService('queryBar');
const elasticChart = getService('elasticChart');
const dashboardAddPanel = getService('dashboardAddPanel');
const renderable = getService('renderable');
const testSubjects = getService('testSubjects');
Expand Down Expand Up @@ -47,6 +48,7 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) {
await queryBar.clickQuerySubmitButton();
await PageObjects.header.waitUntilLoadingHasFinished();
await PageObjects.dashboard.waitForRenderComplete();
await elasticChart.setNewChartUiDebugFlag(true);
};

before(async () => {
Expand Down Expand Up @@ -85,7 +87,7 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) {
});

it('filters on pie charts', async () => {
await pieChart.expectPieSliceCount(0);
await pieChart.expectEmptyPieChart();
});

it('area, bar and heatmap charts filtered', async () => {
Expand Down Expand Up @@ -150,7 +152,7 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) {
});

it('filters on pie charts', async () => {
await pieChart.expectPieSliceCount(0);
await pieChart.expectEmptyPieChart();
});

it('area, bar and heatmap charts filtered', async () => {
Expand Down Expand Up @@ -253,6 +255,7 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) {
describe('nested filtering', () => {
before(async () => {
await PageObjects.dashboard.gotoDashboardLandingPage();
await elasticChart.setNewChartUiDebugFlag(true);
});

it('visualization saved with a query filters data', async () => {
Expand Down Expand Up @@ -323,6 +326,7 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) {
await dashboardAddPanel.addVisualization(
'Filter Test: animals: linked to search with filter'
);
await elasticChart.setNewChartUiDebugFlag(true);
await pieChart.expectPieSliceCount(7);
});

Expand Down
2 changes: 2 additions & 0 deletions test/functional/apps/dashboard/group3/bwc_shared_urls.ts
Original file line number Diff line number Diff line change
Expand Up @@ -119,6 +119,7 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) {
await elasticChart.setNewChartUiDebugFlag(true);

const query = await queryBar.getQueryString();
await queryBar.submitQuery();
expect(query).to.equal('memory:>220000');

await pieChart.expectPieSliceCount(5);
Expand All @@ -137,6 +138,7 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) {
await PageObjects.header.waitUntilLoadingHasFinished();

const query = await queryBar.getQueryString();
await queryBar.submitQuery();
expect(query).to.equal('boop');

await dashboardExpect.panelCount(2);
Expand Down

0 comments on commit 21d45ba

Please sign in to comment.