restoring index table test (#29368)

* restoring index table test

* restoring policy table test
This commit is contained in:
Bill McConaghy 2019-01-25 15:38:24 -05:00 committed by GitHub
parent 93fe5b7b2f
commit 7cd0d0faa4
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 8 additions and 11 deletions

View file

@ -108,17 +108,16 @@ describe('policy table', () => {
rendered.update();
snapshot(namesText(rendered));
});
// TODO fix test with a non-brittal selector
/*test('should show more when per page value is increased', () => {
test('should show more when per page value is increased', () => {
const rendered = mountWithIntl(component);
const perPageButton = rendered.find('span[children="Rows per page: 10"]');
const perPageButton = rendered.find('#customizablePagination').find('button');
perPageButton.simulate('click');
rendered.update();
const fiftyButton = rendered.find('span[children="50 rows"]');
const fiftyButton = rendered.find('.euiContextMenuItem').at(1);
fiftyButton.simulate('click');
rendered.update();
expect(namesText(rendered).length).toBe(50);
});*/
});
test('should filter based on content of search input', () => {
const rendered = mountWithIntl(component);
const searchInput = rendered.find('.euiFieldSearch').first();

View file

@ -157,18 +157,16 @@ describe('index table', () => {
rendered.update();
snapshot(namesText(rendered));
});
// TODO fix test with a non-brittal selector
/*test('should show more when per page value is increased', () => {
test('should show more when per page value is increased', () => {
const rendered = mountWithIntl(component);
const perPageButton = rendered.find('span[children="Rows per page: 10"]');
const perPageButton = rendered.find('#customizablePagination').find('button');
perPageButton.simulate('click');
rendered.update();
const fiftyButton = rendered.find('#customizablePagination');
const fiftyButton = rendered.find('.euiContextMenuItem').at(1);
fiftyButton.simulate('click');
rendered.update();
expect(namesText(rendered).length).toBe(50);
});*/
});
test('should show the Actions menu button only when at least one row is selected', () => {
const rendered = mountWithIntl(component);
let button = findTestSubject(rendered, 'indexTableContextMenuButton');