Skip to content

Commit

Permalink
Merge branch 'master' into clusters_heatmap2
Browse files Browse the repository at this point in the history
  • Loading branch information
elasticmachine authored Apr 2, 2020
2 parents 0d4390f + 325f8e0 commit 8f1e608
Show file tree
Hide file tree
Showing 4 changed files with 81 additions and 1 deletion.
File renamed without changes.
79 changes: 79 additions & 0 deletions test/accessibility/apps/dashboard_panel.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,79 @@
/*
* Licensed to Elasticsearch B.V. under one or more contributor
* license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright
* ownership. Elasticsearch B.V. licenses this file to you under
* the Apache License, Version 2.0 (the "License"); you may
* not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
*/

import { FtrProviderContext } from '../ftr_provider_context';

export default function({ getService, getPageObjects }: FtrProviderContext) {
const PageObjects = getPageObjects(['common', 'dashboard', 'header', 'home', 'settings']);
const a11y = getService('a11y');
const dashboardPanelActions = getService('dashboardPanelActions');
const testSubjects = getService('testSubjects');
const inspector = getService('inspector');

describe('Dashboard Panel', () => {
before(async () => {
await PageObjects.common.navigateToUrl('home', 'tutorial_directory/sampleData');
await PageObjects.home.addSampleDataSet('flights');
await PageObjects.common.navigateToApp('dashboard');
await testSubjects.click('dashboardListingTitleLink-[Flights]-Global-Flight-Dashboard');
});

it('dashboard panel open ', async () => {
const header = await dashboardPanelActions.getPanelHeading('[Flights] Airline Carrier');
await dashboardPanelActions.toggleContextMenu(header);
await a11y.testAppSnapshot();
// doing this again will close the Context Menu, so that next snapshot can start clean.
await dashboardPanelActions.toggleContextMenu(header);
});

it('dashboard panel inspect', async () => {
await dashboardPanelActions.openInspectorByTitle('[Flights] Airline Carrier');
await a11y.testAppSnapshot();
});

it('dashboard panel inspector view chooser ', async () => {
await testSubjects.click('inspectorViewChooser');
await a11y.testAppSnapshot();
await testSubjects.click('inspectorViewChooser');
});

it('dashboard panel inspector request statistics ', async () => {
await inspector.openInspectorRequestsView();
await a11y.testAppSnapshot();
});

it('dashboard panel inspector request', async () => {
await testSubjects.click('inspectorRequestDetailRequest');
await a11y.testAppSnapshot();
});

it('dashboard panel inspector response', async () => {
await testSubjects.click('inspectorRequestDetailResponse');
await a11y.testAppSnapshot();
await inspector.close();
});

it('dashboard panel full screen', async () => {
const header = await dashboardPanelActions.getPanelHeading('[Flights] Airline Carrier');
await dashboardPanelActions.toggleContextMenu(header);
await testSubjects.click('embeddablePanelAction-togglePanel');
await a11y.testAppSnapshot();
});
});
}
1 change: 1 addition & 0 deletions test/accessibility/config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ export default async function({ readConfigFile }: FtrConfigProviderContext) {
testFiles: [
require.resolve('./apps/discover'),
require.resolve('./apps/dashboard'),
require.resolve('./apps/dashboard_panel'),
require.resolve('./apps/visualize'),
require.resolve('./apps/management'),
require.resolve('./apps/console'),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ export const enhancedEsSearchStrategyProvider: TSearchStrategyProvider<typeof ES
};
request.params = params;

const asyncOptions: IAsyncSearchOptions = { pollInterval: 1000, ...options };
const asyncOptions: IAsyncSearchOptions = { pollInterval: 0, ...options };

return asyncSearch(
{ ...request, serverStrategy: ES_SEARCH_STRATEGY },
Expand Down

0 comments on commit 8f1e608

Please sign in to comment.