From 200d0353d129ae3467b7ef70b09891849e685a99 Mon Sep 17 00:00:00 2001 From: Lee Drengenberg Date: Tue, 28 Sep 2021 13:50:22 -0500 Subject: [PATCH] =?UTF-8?q?fix=20skipped=20test=20test/accessibility/apps/?= =?UTF-8?q?dashboard=C2=B7ts=20-=20Dashboard=20create=20dashboard=20button?= =?UTF-8?q?=20#111233=20(#112872)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * test if 2s sleep fixes flakey test * switch from sleep to retry.waitFor * remove .only, add comments to config file about sample data add/remove Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com> --- test/accessibility/apps/dashboard.ts | 2 +- test/accessibility/config.ts | 12 ++++++++---- test/functional/page_objects/home_page.ts | 7 +++++-- 3 files changed, 14 insertions(+), 7 deletions(-) diff --git a/test/accessibility/apps/dashboard.ts b/test/accessibility/apps/dashboard.ts index c8a7ac566b55c..5a3ec9d8fc869 100644 --- a/test/accessibility/apps/dashboard.ts +++ b/test/accessibility/apps/dashboard.ts @@ -15,7 +15,7 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) { const testSubjects = getService('testSubjects'); const listingTable = getService('listingTable'); - describe.skip('Dashboard', () => { + describe('Dashboard', () => { const dashboardName = 'Dashboard Listing A11y'; const clonedDashboardName = 'Dashboard Listing A11y Copy'; diff --git a/test/accessibility/config.ts b/test/accessibility/config.ts index 2643ed8ab2a78..81c89a253165d 100644 --- a/test/accessibility/config.ts +++ b/test/accessibility/config.ts @@ -17,15 +17,19 @@ export default async function ({ readConfigFile }: FtrConfigProviderContext) { ...functionalConfig.getAll(), testFiles: [ - require.resolve('./apps/discover'), + // these 5 tests all load addSampleDataSet('flights') + // only the last test does removeSampleDataSet('flights') require.resolve('./apps/dashboard'), require.resolve('./apps/dashboard_panel'), + require.resolve('./apps/filter_panel'), + require.resolve('./apps/home'), + require.resolve('./apps/kibana_overview'), + + // next tests don't use sample data + require.resolve('./apps/discover'), require.resolve('./apps/visualize'), require.resolve('./apps/management'), require.resolve('./apps/console'), - require.resolve('./apps/home'), - require.resolve('./apps/filter_panel'), - require.resolve('./apps/kibana_overview'), ], pageObjects, services, diff --git a/test/functional/page_objects/home_page.ts b/test/functional/page_objects/home_page.ts index 8929026a28122..29fdd1453b0e0 100644 --- a/test/functional/page_objects/home_page.ts +++ b/test/functional/page_objects/home_page.ts @@ -45,8 +45,11 @@ export class HomePageObject extends FtrService { async addSampleDataSet(id: string) { const isInstalled = await this.isSampleDataSetInstalled(id); if (!isInstalled) { - await this.testSubjects.click(`addSampleDataSet${id}`); - await this._waitForSampleDataLoadingAction(id); + await this.retry.waitFor('wait until sample data is installed', async () => { + await this.testSubjects.click(`addSampleDataSet${id}`); + await this._waitForSampleDataLoadingAction(id); + return await this.isSampleDataSetInstalled(id); + }); } }