mirror of
https://github.com/elastic/kibana.git
synced 2025-04-24 01:38:56 -04:00
[UA] Enable a11y tests (#216599)
This commit is contained in:
parent
56c022371e
commit
78472d3709
1 changed files with 14 additions and 49 deletions
|
@ -10,41 +10,8 @@
|
|||
* valid deprecations
|
||||
*/
|
||||
|
||||
import type { IndicesCreateRequest } from '@elastic/elasticsearch/lib/api/types';
|
||||
import { FtrProviderContext } from '../../ftr_provider_context';
|
||||
|
||||
const translogSettingsIndexDeprecation: IndicesCreateRequest = {
|
||||
index: 'deprecated_settings',
|
||||
settings: {
|
||||
'translog.retention.size': '1b',
|
||||
'translog.retention.age': '5m',
|
||||
'index.soft_deletes.enabled': true,
|
||||
},
|
||||
};
|
||||
|
||||
const multiFieldsIndexDeprecation: IndicesCreateRequest = {
|
||||
index: 'nested_multi_fields',
|
||||
mappings: {
|
||||
properties: {
|
||||
text: {
|
||||
type: 'text',
|
||||
fields: {
|
||||
english: {
|
||||
type: 'text',
|
||||
analyzer: 'english',
|
||||
fields: {
|
||||
english: {
|
||||
type: 'text',
|
||||
analyzer: 'english',
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
};
|
||||
|
||||
export default function ({ getService, getPageObjects }: FtrProviderContext) {
|
||||
const PageObjects = getPageObjects(['upgradeAssistant', 'common']);
|
||||
const a11y = getService('a11y');
|
||||
|
@ -53,14 +20,22 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) {
|
|||
const es = getService('es');
|
||||
const log = getService('log');
|
||||
|
||||
describe.skip('Upgrade Assistant Accessibility', () => {
|
||||
describe('Upgrade Assistant Accessibility', () => {
|
||||
before(async () => {
|
||||
await PageObjects.upgradeAssistant.navigateToPage();
|
||||
|
||||
try {
|
||||
// Create two indices that will trigger deprecation warnings to test the ES deprecations page
|
||||
await es.indices.create(multiFieldsIndexDeprecation);
|
||||
await es.indices.create(translogSettingsIndexDeprecation);
|
||||
// Create an ES deprecation
|
||||
await es.cluster.putComponentTemplate({
|
||||
name: 'deprecated_template',
|
||||
template: {
|
||||
mappings: {
|
||||
_source: {
|
||||
mode: 'stored',
|
||||
},
|
||||
},
|
||||
},
|
||||
});
|
||||
} catch (e) {
|
||||
log.debug('[Setup error] Error creating indices');
|
||||
throw e;
|
||||
|
@ -69,8 +44,8 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) {
|
|||
|
||||
after(async () => {
|
||||
try {
|
||||
await es.indices.delete({
|
||||
index: [multiFieldsIndexDeprecation.index, translogSettingsIndexDeprecation.index],
|
||||
await es.cluster.deleteComponentTemplate({
|
||||
name: 'deprecated_template',
|
||||
});
|
||||
} catch (e) {
|
||||
log.debug('[Cleanup error] Error deleting indices');
|
||||
|
@ -143,16 +118,6 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) {
|
|||
await a11y.testAppSnapshot();
|
||||
});
|
||||
|
||||
it('Index settings deprecation flyout', async () => {
|
||||
await PageObjects.upgradeAssistant.clickEsDeprecation(
|
||||
'indexSettings' // An index setting deprecation was added in the before() hook so should be guaranteed
|
||||
);
|
||||
await retry.waitFor('ES index settings deprecation flyout to be visible', async () => {
|
||||
return testSubjects.exists('indexSettingsDetails');
|
||||
});
|
||||
await a11y.testAppSnapshot();
|
||||
});
|
||||
|
||||
it('Default deprecation flyout', async () => {
|
||||
await PageObjects.upgradeAssistant.clickEsDeprecation(
|
||||
'default' // A default deprecation was added in the before() hook so should be guaranteed
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue