Skip to content

Commit

Permalink
Cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
kertal committed Apr 14, 2021
1 parent 1c34b81 commit 0277c8d
Show file tree
Hide file tree
Showing 6 changed files with 27 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ export const gridStyle = {
rowHover: 'none',
};

export const pageSizeArr = [25, 50, 100, 250, 500];
export const pageSizeArr = [25, 50, 100];
export const defaultPageSize = 25;
export const toolbarVisibility = {
showColumnSelector: {
Expand Down
24 changes: 24 additions & 0 deletions test/functional/apps/dashboard/dashboard_filter_bar.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ import expect from '@kbn/expect';
import { FtrProviderContext } from '../../ftr_provider_context';

export default function ({ getService, getPageObjects }: FtrProviderContext) {
const dataGrid = getService('dataGrid');
const dashboardExpect = getService('dashboardExpect');
const dashboardAddPanel = getService('dashboardAddPanel');
const testSubjects = getService('testSubjects');
Expand Down Expand Up @@ -162,6 +163,29 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) {
});
});

describe('saved search filtering', function () {
before(async () => {
await filterBar.ensureFieldEditorModalIsClosed();
await PageObjects.dashboard.gotoDashboardLandingPage();
await PageObjects.dashboard.clickNewDashboard();
await PageObjects.timePicker.setDefaultDataRange();
});

it('are added when a cell magnifying glass is clicked', async function () {
await dashboardAddPanel.addSavedSearch('Rendering-Test:-saved-search');
await PageObjects.dashboard.waitForRenderComplete();
const documentCell = await dataGrid.getCellElement(1, 3);
await documentCell.click();
const expandCellContentButton = await documentCell.findByClassName(
'euiDataGridRowCell__expandButtonIcon'
);
await expandCellContentButton.click();
await testSubjects.click('filterForButton');
const filterCount = await filterBar.getFilterCount();
expect(filterCount).to.equal(1);
});
});

describe('bad filters are loaded properly', function () {
before(async () => {
await filterBar.ensureFieldEditorModalIsClosed();
Expand Down
1 change: 0 additions & 1 deletion test/functional/apps/discover/_discover.ts
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,6 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) {
expect(time.end).to.be(PageObjects.timePicker.defaultEndTime);
const rowData = await PageObjects.discover.getDocTableIndex(1);
log.debug('check the newest doc timestamp in UTC (check diff timezone in last test)');
log.debug(rowData);
expect(rowData).to.contain('Sep 22, 2015 @ 23:50:13.253');
});

Expand Down
2 changes: 1 addition & 1 deletion test/functional/apps/discover/_doc_navigation.ts
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) {
});

// no longer relevant as null field won't be returned in the Fields API response
it('add filter should create an exists filter if value is null (#7189)', async function () {
xit('add filter should create an exists filter if value is null (#7189)', async function () {
await PageObjects.discover.waitUntilSearchingHasFinished();
// Filter special document
await filterBar.addFilter('agent', 'is', 'Missing/Fields');
Expand Down
2 changes: 1 addition & 1 deletion test/functional/apps/discover/_doc_table.ts
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) {
await PageObjects.common.navigateToApp('discover');
});

it('should show the records by default', async function () {
it('should show records by default', async function () {
// with the default range the number of hits is ~14000
const rows = await PageObjects.discover.getDocTableRows();
expect(rows.length).to.be.greaterThan(0);
Expand Down
1 change: 0 additions & 1 deletion test/functional/page_objects/discover_page.ts
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,6 @@ export function DiscoverPageProvider({ getService, getPageObjects }: FtrProvider

public async getColumnHeaders() {
return await dataGrid.getHeaderFields();
// return await docTable.getHeaderFields('embeddedSavedSearchDocTable');
}

public async openLoadSavedSearchPanel() {
Expand Down

0 comments on commit 0277c8d

Please sign in to comment.