[Index Management] Remove a11y test that is no longer applicable (#163113)

This commit is contained in:
Alison Goryachev 2023-08-04 09:09:18 -04:00 committed by GitHub
parent 509f151f02
commit f90c800c5f
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 4 additions and 47 deletions

View file

@ -8,12 +8,7 @@
import { act } from 'react-dom/test-utils';
import { expectToBeAccessible } from '@kbn/test-jest-helpers';
import { IndicesTestBed, setup } from '../client_integration/home/indices_tab.helpers';
import {
indexMappings,
indexSettings,
indexStats,
setupEnvironment,
} from '../client_integration/helpers';
import { setupEnvironment } from '../client_integration/helpers';
import {
createDataStreamBackingIndex,
createNonDataStreamIndex,
@ -52,44 +47,4 @@ describe('A11y Indices tab', () => {
component.update();
await expectToBeAccessible(component);
});
// FLAKY: https://github.com/elastic/kibana/issues/128836
describe.skip('index details flyout', () => {
beforeEach(async () => {
httpRequestsMockHelpers.setLoadIndicesResponse([
createNonDataStreamIndex('non-data-stream-test-index'),
]);
httpRequestsMockHelpers.setLoadIndexSettingsResponse(indexSettings);
httpRequestsMockHelpers.setLoadIndexMappingResponse(indexMappings);
httpRequestsMockHelpers.setLoadIndexStatsResponse(indexStats);
await act(async () => {
testBed = await setup(httpSetup);
});
const { component, find } = testBed;
component.update();
find('indexTableIndexNameLink').at(0).simulate('click');
component.update();
});
it('summary tab', async () => {
const { component, find } = testBed;
expect(find('detailPanelTabSelected').text()).toEqual('Summary');
await expectToBeAccessible(component);
});
['settings', 'mappings', 'stats'].forEach((tab) => {
it(`${tab} tab`, async () => {
const { component, find, actions } = testBed;
await actions.selectIndexDetailsTab(tab as 'settings');
expect(find('detailPanelTabSelected').text().toLowerCase()).toEqual(tab);
await expectToBeAccessible(component);
});
});
it('edit settings tab', async () => {
const { component, find, actions } = testBed;
await actions.selectIndexDetailsTab('edit_settings');
expect(find('detailPanelTabSelected').text()).toEqual('Edit settings');
await expectToBeAccessible(component);
});
});
});

View file

@ -30,7 +30,9 @@ const testBedConfig: AsyncTestBedConfig = {
export interface IndicesTestBed extends TestBed<TestSubjects> {
actions: {
selectIndexDetailsTab: (tab: 'settings' | 'mappings' | 'stats' | 'edit_settings') => void;
selectIndexDetailsTab: (
tab: 'settings' | 'mappings' | 'stats' | 'edit_settings'
) => Promise<void>;
getIncludeHiddenIndicesToggleStatus: () => boolean;
clickIncludeHiddenIndicesToggle: () => void;
clickDataStreamAt: (index: number) => void;