-
Notifications
You must be signed in to change notification settings - Fork 8.2k
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
[Lens] Add a11y test suite #88623
[Lens] Add a11y test suite #88623
Changes from 1 commit
b46aa28
8c3dd13
d0e2b4b
2fc57b0
8fda415
48ce5ee
f7faa34
c92d5d3
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change | ||
---|---|---|---|---|
|
@@ -171,7 +171,11 @@ export function ReorderProvider({ | |||
<EuiPortal> | ||||
<EuiScreenReaderOnly> | ||||
<div> | ||||
<p id="lnsDragDrop-reorderAnnouncement" aria-live="assertive" aria-atomic={true}> | ||||
<p | ||||
id={`lnsDragDrop-reorderAnnouncement-${id}`} | ||||
aria-live="assertive" | ||||
aria-atomic={true} | ||||
> | ||||
{state.keyboardReorderMessage} | ||||
</p> | ||||
<p id={`lnsDragDrop-reorderInstructions-${id}`}> | ||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. We can't merge this because this id is referenced from the buttons:
We need it to tie the message and the button together There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Sorry, I thought I searched for it, but maybe I was wrong with the other one. Will reintroduce it back! 👍 |
||||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,98 @@ | ||
/* | ||
* 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 PageObjects = getPageObjects(['common', 'visualize', 'header', 'home', 'settings', 'lens']); | ||
const a11y = getService('a11y'); | ||
const testSubjects = getService('testSubjects'); | ||
const listingTable = getService('listingTable'); | ||
|
||
describe('Lens', () => { | ||
const lensChartName = 'MyLensChart'; | ||
before(async () => { | ||
await PageObjects.common.navigateToUrl('home', '/tutorial_directory/sampleData', { | ||
useActualUrl: true, | ||
}); | ||
await PageObjects.home.addSampleDataSet('flights'); | ||
}); | ||
|
||
after(async () => { | ||
await PageObjects.common.navigateToApp('visualize'); | ||
await listingTable.searchForItemWithName(lensChartName); | ||
await listingTable.checkListingSelectAllCheckbox(); | ||
await listingTable.clickDeleteSelected(); | ||
await PageObjects.common.clickConfirmOnModal(); | ||
}); | ||
|
||
it('lens', async () => { | ||
await PageObjects.visualize.navigateToNewVisualization(); | ||
await PageObjects.visualize.clickVisType('lens'); | ||
await a11y.testAppSnapshot(); | ||
}); | ||
|
||
it('lens chart', async () => { | ||
await PageObjects.visualize.navigateToNewVisualization(); | ||
await PageObjects.visualize.clickVisType('lens'); | ||
|
||
await PageObjects.lens.configureDimension({ | ||
dimension: 'lnsXY_xDimensionPanel > lns-empty-dimension', | ||
operation: 'date_histogram', | ||
field: 'timestamp', | ||
}); | ||
|
||
await PageObjects.lens.configureDimension({ | ||
dimension: 'lnsXY_yDimensionPanel > lns-empty-dimension', | ||
operation: 'avg', | ||
field: 'AvgTicketPrice', | ||
}); | ||
|
||
await a11y.testAppSnapshot(); | ||
}); | ||
|
||
it('dimension configuration panel', async () => { | ||
await PageObjects.visualize.navigateToNewVisualization(); | ||
await PageObjects.visualize.clickVisType('lens'); | ||
|
||
await PageObjects.lens.openDimensionEditor('lnsXY_xDimensionPanel > lns-empty-dimension'); | ||
await a11y.testAppSnapshot(); | ||
|
||
await PageObjects.lens.closeDimensionEditor(); | ||
await PageObjects.lens.openDimensionEditor('lnsXY_yDimensionPanel > lns-empty-dimension'); | ||
await a11y.testAppSnapshot(); | ||
|
||
await PageObjects.lens.closeDimensionEditor(); | ||
}); | ||
|
||
it('change chart type', async () => { | ||
await PageObjects.lens.switchToVisualization('line'); | ||
await a11y.testAppSnapshot(); | ||
}); | ||
|
||
it('change chart type via suggestions', async () => { | ||
await PageObjects.lens.configureDimension({ | ||
dimension: 'lnsXY_xDimensionPanel > lns-empty-dimension', | ||
operation: 'date_histogram', | ||
field: 'timestamp', | ||
}); | ||
|
||
await PageObjects.lens.configureDimension({ | ||
dimension: 'lnsXY_yDimensionPanel > lns-empty-dimension', | ||
operation: 'avg', | ||
field: 'AvgTicketPrice', | ||
}); | ||
|
||
await testSubjects.click('lnsSuggestion-barChart > lnsSuggestion'); | ||
await a11y.testAppSnapshot(); | ||
}); | ||
|
||
it('saves lens chart', async () => { | ||
await PageObjects.lens.save(lensChartName); | ||
await a11y.testAppSnapshot(); | ||
}); | ||
}); | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
2 things here:
kibana/x-pack/plugins/lens/public/editor_frame_service/editor_frame/config_panel/layer_panel.tsx
Line 225 in 898385c
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looking at the debug page for the failure, there's effectively a duplication of
div
s, hence the id duplication.Removing the
id
from thediv
will certainly fix the test, but there's still a problem with having twice as much divs with the same content on the page. I'll try to fix this as well.