Skip to content

Commit

Permalink
Addressing test failures with a11y tests on management (#65758) (#66044)
Browse files Browse the repository at this point in the history
fixing test failure #60470
  • Loading branch information
bhavyarm authored May 18, 2020
1 parent abe68c9 commit e3a94a5
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 20 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -49,14 +49,18 @@ interface TabsProps extends Pick<RouteComponentProps, 'history' | 'location'> {
};
}

const searchAriaLabel = i18n.translate('kbn.management.editIndexPattern.fields.searchAria', {
defaultMessage: 'Search fields',
});

const filterAriaLabel = i18n.translate('kbn.management.editIndexPattern.fields.filterAria', {
defaultMessage: 'Filter',
defaultMessage: 'Filter field types',
});

const filterPlaceholder = i18n.translate(
'kbn.management.editIndexPattern.fields.filterPlaceholder',
{
defaultMessage: 'Filter',
defaultMessage: 'Search',
}
);

Expand Down Expand Up @@ -108,7 +112,7 @@ export function Tabs({ config, indexPattern, fields, services, history, location
value={fieldFilter}
onChange={e => setFieldFilter(e.target.value)}
data-test-subj="indexPatternFieldFilter"
aria-label={filterAriaLabel}
aria-label={searchAriaLabel}
/>
</EuiFlexItem>
{type === TAB_INDEXED_FIELDS && indexedFieldTypes.length > 0 && (
Expand All @@ -118,6 +122,7 @@ export function Tabs({ config, indexPattern, fields, services, history, location
value={indexedFieldTypeFilter}
onChange={e => setIndexedFieldTypeFilter(e.target.value)}
data-test-subj="indexedFieldTypeFilterDropdown"
aria-label={filterAriaLabel}
/>
</EuiFlexItem>
)}
Expand Down
25 changes: 8 additions & 17 deletions test/accessibility/apps/management.ts
Original file line number Diff line number Diff line change
Expand Up @@ -20,23 +20,12 @@
import { FtrProviderContext } from '../ftr_provider_context';

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

// describe('Management', () => {
// before(async () => {
// await esArchiver.loadIfNeeded('logstash_functional');
// await kibanaServer.uiSettings.update({
// defaultIndex: 'logstash-*',
// });
// await PageObjects.common.navigateToApp('settings');
// });

// FLAKY: https://github.com/elastic/kibana/issues/60470
describe.skip('Management', () => {
describe('Management', () => {
before(async () => {
await esArchiver.load('discover');
await esArchiver.loadIfNeeded('logstash_functional');
Expand All @@ -57,23 +46,25 @@ export default function({ getService, getPageObjects }: FtrProviderContext) {

it('Single indexpattern view', async () => {
await PageObjects.settings.clickIndexPatternLogstash();
await PageObjects.header.waitUntilLoadingHasFinished();
await a11y.testAppSnapshot();
});

it('Create Index pattern wizard', async () => {
it('Open create index pattern wizard', async () => {
await PageObjects.settings.clickKibanaIndexPatterns();
await (await testSubjects.find('createIndexPatternButton')).click();
await PageObjects.settings.clickAddNewIndexPatternButton();
await PageObjects.header.waitUntilLoadingHasFinished();
await a11y.testAppSnapshot();
});

// index patterns page
// We are navigating back to index pattern page to test field formatters
it('Navigate back to logstash index page', async () => {
await PageObjects.settings.clickKibanaIndexPatterns();
await PageObjects.settings.clickIndexPatternLogstash();
await a11y.testAppSnapshot();
});

// Issue: https://github.com/elastic/kibana/issues/60030
// Will be enabling this and field formatters after this issue is addressed: https://github.com/elastic/kibana/issues/60030
it.skip('Edit field type', async () => {
await PageObjects.settings.clickEditFieldFormat();
await a11y.testAppSnapshot();
Expand Down

0 comments on commit e3a94a5

Please sign in to comment.