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

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

Merged
merged 11 commits into from
Sep 28, 2021
2 changes: 1 addition & 1 deletion test/accessibility/apps/dashboard.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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';

Expand Down
12 changes: 8 additions & 4 deletions test/accessibility/config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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')
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

NOTE: I started going down the path to create an index file with a before and after to load/unload the sample data for this group of tests but the last test kibana_overview appears to have tests for both states where there is and isn't data. I need to talk to @bhavyarm about refactoring these. But I'd like to get the test unskipped in any case.

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,
Expand Down
7 changes: 5 additions & 2 deletions test/functional/page_objects/home_page.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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);
});
}
}

Expand Down