Fix unhandled promise rejection in discover tests (#128806)

* Fix unhandled promise rejection

* Update methods in index.ts to be async

* Update test/functional/apps/discover/index.ts

Co-authored-by: Spencer <email@spalger.com>

* Update test/functional/apps/discover/index.ts

Co-authored-by: Spencer <email@spalger.com>

Co-authored-by: Spencer <email@spalger.com>
Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
This commit is contained in:
liza-mae 2022-03-30 09:53:01 -06:00 committed by GitHub
parent dd0a19033f
commit b9c3aec20f
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 6 additions and 6 deletions

View file

@ -33,7 +33,7 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) {
after(async () => {
await security.testUser.restoreDefaults();
esArchiver.unload('test/functional/fixtures/es_archiver/date_nanos_mixed');
await esArchiver.unload('test/functional/fixtures/es_archiver/date_nanos_mixed');
await kibanaServer.savedObjects.clean({ types: ['search', 'index-pattern'] });
});

View file

@ -29,7 +29,7 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) {
});
after(async () => {
await security.testUser.restoreDefaults();
esArchiver.unload('test/functional/fixtures/es_archiver/message_with_newline');
await esArchiver.unload('test/functional/fixtures/es_archiver/message_with_newline');
await kibanaServer.uiSettings.unset('defaultIndex');
await kibanaServer.uiSettings.unset('doc_table:legacy');
});

View file

@ -15,12 +15,12 @@ export default function ({ getService, loadTestFile }: FtrProviderContext) {
describe('discover app', function () {
this.tags('ciGroup6');
before(function () {
return browser.setWindowSize(1300, 800);
before(async function () {
await browser.setWindowSize(1300, 800);
});
after(function unloadMakelogs() {
return esArchiver.unload('test/functional/fixtures/es_archiver/logstash_functional');
after(async function unloadMakelogs() {
await esArchiver.unload('test/functional/fixtures/es_archiver/logstash_functional');
});
loadTestFile(require.resolve('./_saved_queries'));