Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,6 @@ export type TestSubjects =
| 'ilmPolicyLink'
| 'includeStatsSwitch'
| 'includeManagedSwitch'
| 'indexActionsContextMenuButton'
| 'indexContextMenu'
| 'indexManagementHeaderContent'
| 'indexTable'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,6 @@ export const setup = async (overridingDependencies: any = {}): Promise<IndicesTe
/**
* User Actions
*/

const clickContextMenuOption = async (optionDataTestSubject: string) => {
const { find, component } = testBed;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -171,11 +171,22 @@ describe('<IndexManagementHome />', () => {
httpRequestsMockHelpers.setReloadIndicesResponse({ indexNames: [indexName] });

testBed = await setup();
const { find, component } = testBed;
const { component, find } = testBed;

component.update();

find('indexTableIndexNameLink').at(0).simulate('click');
});
test('should be able to close an open index', async () => {
const { actions } = testBed;

await actions.clickManageContextMenuButton();
await actions.clickContextMenuOption('closeIndexMenuButton');

// A refresh call was added after closing an index so we need to check the second to last request.
const latestRequest = server.requests[server.requests.length - 2];
expect(latestRequest.url).toBe(`${API_BASE_PATH}/indices/close`);
});

test('should be able to flush index', async () => {
const { actions } = testBed;
Expand Down