kibana/test/functional/apps/discover/_date_nested.ts
Matthias Wilhelm 1fe4135ab6
[Discover][Main] Fix missing error message when building search query throws exceptions (#103923)
* Fix missing error message when building search fails

* Fix test

* Update _date_nested.ts

* Lint config.js

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2021-07-14 12:18:21 +02:00

36 lines
1.5 KiB
TypeScript

/*
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
* or more contributor license agreements. Licensed under the Elastic License
* 2.0 and the Server Side Public License, v 1; you may not use this file except
* in compliance with, at your election, the Elastic License 2.0 or the Server
* Side Public License, v 1.
*/
import { FtrProviderContext } from '../../ftr_provider_context';
export default function ({ getService, getPageObjects }: FtrProviderContext) {
const esArchiver = getService('esArchiver');
const testSubjects = getService('testSubjects');
const PageObjects = getPageObjects(['common', 'timePicker', 'discover']);
const security = getService('security');
describe('timefield is a date in a nested field', function () {
before(async function () {
await esArchiver.loadIfNeeded('test/functional/fixtures/es_archiver/date_nested');
await security.testUser.setRoles(['kibana_admin', 'kibana_date_nested']);
await PageObjects.common.navigateToApp('discover');
});
after(async function unloadMakelogs() {
await security.testUser.restoreDefaults();
await esArchiver.unload('test/functional/fixtures/es_archiver/date_nested');
});
it('should show an error message', async function () {
await PageObjects.discover.selectIndexPattern('date-nested');
await PageObjects.discover.waitUntilSearchingHasFinished();
await testSubjects.existOrFail('discoverNoResultsError');
});
});
}