Skip to content

Commit

Permalink
add functional test
Browse files Browse the repository at this point in the history
  • Loading branch information
mattkime committed May 21, 2022
1 parent 2316d84 commit 916ddad
Showing 1 changed file with 35 additions and 0 deletions.
35 changes: 35 additions & 0 deletions test/functional/apps/management/_data_view_relationships.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
/*
* 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 expect from '@kbn/expect';
import { FtrProviderContext } from '../../ftr_provider_context';

export default function ({ getService, getPageObjects }: FtrProviderContext) {
const kibanaServer = getService('kibanaServer');
const browser = getService('browser');
const PageObjects = getPageObjects(['common', 'home', 'settings', 'discover', 'header']);

describe('data view relationships', function describeIndexTests() {
before(async function () {
await browser.setWindowSize(1200, 800);
await kibanaServer.importExport.load('test/functional/fixtures/kbn_archiver/discover');
});

after(async () => {
await kibanaServer.importExport.unload('test/functional/fixtures/kbn_archiver/discover');
});

it('Render relationships tab and verify count', async function () {
await PageObjects.settings.navigateTo();
await PageObjects.settings.clickKibanaIndexPatterns();
await PageObjects.settings.clickIndexPatternLogstash();
await PageObjects.settings.clickRelationshipsTab();
expect(parseInt(await PageObjects.settings.getRelationshipsTabCount(), 10)).to.be(1);
});
});
}

0 comments on commit 916ddad

Please sign in to comment.