forked from elastic/kibana
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Accessibility dashboard edit panel tests (elastic#77829)
* accessibility tests for dashboard panel * added back the skipped test as it is still required to pass through th ea11ySnapshot * wip dashboard panel tests * wip- accessibility * wip -accessibility * wip accessibility * accessibility tests for dashboard edit panel * accessibility tests * removed the unused variables Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
- Loading branch information
1 parent
1ff605f
commit 19f8439
Showing
3 changed files
with
120 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,118 @@ | ||
/* | ||
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one | ||
* or more contributor license agreements. Licensed under the Elastic License; | ||
* you may not use this file except in compliance with the Elastic License. | ||
*/ | ||
|
||
import { FtrProviderContext } from '../ftr_provider_context'; | ||
|
||
export default function ({ getService, getPageObjects }: FtrProviderContext) { | ||
const { dashboard } = getPageObjects(['dashboard']); | ||
const a11y = getService('a11y'); | ||
const dashboardPanelActions = getService('dashboardPanelActions'); | ||
const testSubjects = getService('testSubjects'); | ||
const esArchiver = getService('esArchiver'); | ||
const drilldowns = getService('dashboardDrilldownsManage'); | ||
const kibanaServer = getService('kibanaServer'); | ||
const PageObjects = getPageObjects(['security', 'common']); | ||
const toasts = getService('toasts'); | ||
|
||
describe('Dashboard Edit Panel', () => { | ||
before(async () => { | ||
await esArchiver.load('dashboard/drilldowns'); | ||
await esArchiver.loadIfNeeded('logstash_functional'); | ||
await kibanaServer.uiSettings.replace({ defaultIndex: 'logstash-*' }); | ||
await PageObjects.common.navigateToApp('dashboard'); | ||
await dashboard.loadSavedDashboard(drilldowns.DASHBOARD_WITH_PIE_CHART_NAME); | ||
await testSubjects.click('dashboardEditMode'); | ||
}); | ||
|
||
after(async () => { | ||
await esArchiver.unload('dashboard/drilldowns'); | ||
}); | ||
|
||
// embeddable edit panel | ||
it(' A11y test on dashboard edit panel menu options', async () => { | ||
await testSubjects.click('embeddablePanelToggleMenuIcon'); | ||
await a11y.testAppSnapshot(); | ||
}); | ||
|
||
// clone panel | ||
it(' A11y test on dashboard embeddable clone panel', async () => { | ||
await testSubjects.click('embeddablePanelAction-clonePanel'); | ||
await a11y.testAppSnapshot(); | ||
await toasts.dismissAllToasts(); | ||
await dashboardPanelActions.removePanelByTitle('Visualization PieChart (copy)'); | ||
}); | ||
|
||
// edit dashboard title | ||
it(' A11y test on dashboard embeddable edit dashboard title', async () => { | ||
await testSubjects.click('embeddablePanelToggleMenuIcon'); | ||
await testSubjects.click('embeddablePanelAction-ACTION_CUSTOMIZE_PANEL'); | ||
await a11y.testAppSnapshot(); | ||
await testSubjects.click('customizePanelHideTitle'); | ||
await a11y.testAppSnapshot(); | ||
await testSubjects.click('saveNewTitleButton'); | ||
}); | ||
|
||
// https://github.com/elastic/kibana/issues/77931 | ||
it.skip('A11y test for edit visualization and save', async () => { | ||
await testSubjects.click('embeddablePanelToggleMenuIcon'); | ||
await testSubjects.click('embeddablePanelAction-editPanel'); | ||
await testSubjects.click('visualizesaveAndReturnButton'); | ||
await a11y.testAppSnapshot(); | ||
}); | ||
|
||
// https://github.com/elastic/kibana/issues/77422 | ||
it.skip('A11y test on dashboard embeddable custom time range', async () => { | ||
await testSubjects.click('embeddablePanelToggleMenuIcon'); | ||
await testSubjects.click('embeddablePanelAction-CUSTOM_TIME_RANGE'); | ||
await a11y.testAppSnapshot(); | ||
}); | ||
|
||
// inspector panel | ||
it('A11y test on dashboard embeddable open inspector', async () => { | ||
await testSubjects.click('embeddablePanelToggleMenuIcon'); | ||
await testSubjects.click('embeddablePanelAction-openInspector'); | ||
await a11y.testAppSnapshot(); | ||
await testSubjects.click('euiFlyoutCloseButton'); | ||
}); | ||
|
||
// create drilldown | ||
it('A11y test on dashboard embeddable open flyout and drilldown', async () => { | ||
await testSubjects.click('embeddablePanelToggleMenuIcon'); | ||
await testSubjects.click('embeddablePanelAction-OPEN_FLYOUT_ADD_DRILLDOWN'); | ||
await a11y.testAppSnapshot(); | ||
await testSubjects.click('flyoutCloseButton'); | ||
}); | ||
|
||
// fullscreen | ||
it('A11y test on dashboard embeddable fullscreen', async () => { | ||
await testSubjects.click('embeddablePanelToggleMenuIcon'); | ||
await testSubjects.click('embeddablePanelAction-togglePanel'); | ||
await a11y.testAppSnapshot(); | ||
}); | ||
|
||
// minimize fullscreen panel | ||
it('A11y test on dashboard embeddable fullscreen minimize ', async () => { | ||
await testSubjects.click('embeddablePanelToggleMenuIcon'); | ||
await testSubjects.click('embeddablePanelAction-togglePanel'); | ||
await a11y.testAppSnapshot(); | ||
}); | ||
|
||
// replace panel | ||
it('A11y test on dashboard embeddable replace panel', async () => { | ||
await testSubjects.click('embeddablePanelToggleMenuIcon'); | ||
await testSubjects.click('embeddablePanelAction-replacePanel'); | ||
await a11y.testAppSnapshot(); | ||
await testSubjects.click('euiFlyoutCloseButton'); | ||
}); | ||
|
||
// delete from dashboard | ||
it('A11y test on dashboard embeddable delete panel', async () => { | ||
await testSubjects.click('embeddablePanelToggleMenuIcon'); | ||
await testSubjects.click('embeddablePanelAction-deletePanel'); | ||
await a11y.testAppSnapshot(); | ||
}); | ||
}); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters