Skip to content

Commit

Permalink
[7.x] Fix test/functional/apps/management/_index_patterns_empty.ts fo…
Browse files Browse the repository at this point in the history
…r Cloud & X-Pack (elastic#82736) (elastic#83118)

Co-authored-by: Rashmi Kulkarni <rashmi.kulkarni@elastic.co>
Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
  • Loading branch information
3 people authored Nov 10, 2020
1 parent 2b58655 commit ac04243
Showing 1 changed file with 18 additions and 5 deletions.
23 changes: 18 additions & 5 deletions test/functional/apps/management/_index_patterns_empty.ts
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ import { FtrProviderContext } from '../../ftr_provider_context';
export default function ({ getPageObjects, getService }: FtrProviderContext) {
const esArchiver = getService('esArchiver');
const kibanaServer = getService('kibanaServer');
const log = getService('log');
const PageObjects = getPageObjects(['common', 'settings']);
const testSubjects = getService('testSubjects');
const globalNav = getService('globalNav');
Expand All @@ -30,23 +31,35 @@ export default function ({ getPageObjects, getService }: FtrProviderContext) {
describe('index pattern empty view', () => {
before(async () => {
await esArchiver.load('empty_kibana');
await esArchiver.unload('logstash_functional');
await esArchiver.unload('makelogs');
await kibanaServer.uiSettings.replace({});
await PageObjects.settings.navigateTo();
});

after(async () => {
await esArchiver.unload('empty_kibana');
await esArchiver.loadIfNeeded('makelogs');
});

// create index pattern and return to verify list
it(`shows empty views`, async () => {
// @ts-expect-error
await es.transport.request({
path: '/_all',
path: '/logstash-a',
method: 'DELETE',
});
});

// create index pattern and return to verify list
it(`shows empty views`, async () => {
await PageObjects.settings.clickKibanaIndexPatterns();
log.debug(
`\n\nNOTE: If this test fails make sure there aren't any non-system indices in the _cat/indices output (use esArchiver.unload on them)`
);
log.debug(
// @ts-expect-error
await es.transport.request({
path: '/_cat/indices',
method: 'GET',
})
);
await testSubjects.existOrFail('createAnyway');
// @ts-expect-error
await es.transport.request({
Expand Down

0 comments on commit ac04243

Please sign in to comment.