fix skipped test test/accessibility/apps/dashboard·ts - Dashboard create dashboard button #111233 (#112872)

* 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>
This commit is contained in:
Lee Drengenberg 2021-09-28 13:50:22 -05:00 committed by GitHub
parent 3dcfd447d2
commit 200d0353d1
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 14 additions and 7 deletions

View file

@ -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';

View file

@ -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,

View file

@ -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);
});
}
}