Added app load test for Remote Clusters. (#40932) (#41261)

This commit is contained in:
John Dorlus 2019-07-17 17:06:50 +00:00 committed by GitHub
parent c089139f55
commit dc1e750daf
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
5 changed files with 69 additions and 2 deletions

View file

@ -0,0 +1,25 @@
/*
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
* or more contributor license agreements. Licensed under the Elastic License;
* you may not use this file except in compliance with the Elastic License.
*/
import expect from '@kbn/expect';
import { KibanaFunctionalTestDefaultProviders } from '../../../types/providers';
// eslint-disable-next-line import/no-default-export
export default ({ getPageObjects, getService }: KibanaFunctionalTestDefaultProviders) => {
const pageObjects = getPageObjects(['common', 'remoteClusters']);
describe('Home page', function() {
this.tags('smoke');
before(async () => {
await pageObjects.common.navigateToApp('remoteClusters');
});
it('Loads the app', async () => {
const remoteClusterButton = await pageObjects.remoteClusters.remoteClusterCreateButton();
expect(await remoteClusterButton.isDisplayed()).to.be(true);
});
});
};

View file

@ -0,0 +1,15 @@
/*
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
* or more contributor license agreements. Licensed under the Elastic License;
* you may not use this file except in compliance with the Elastic License.
*/
import { KibanaFunctionalTestDefaultProviders } from '../../../types/providers';
// eslint-disable-next-line import/no-default-export
export default ({ loadTestFile }: KibanaFunctionalTestDefaultProviders) => {
describe('Remote Clusters app', function() {
this.tags('ciGroup4');
loadTestFile(require.resolve('./home_page'));
});
};

View file

@ -31,7 +31,8 @@ import {
IndexManagementPageProvider,
IndexLifecycleManagementPageProvider,
SnapshotRestorePageProvider,
CrossClusterReplicationPageProvider
CrossClusterReplicationPageProvider,
RemoteClustersPageProvider,
} from './page_objects';
import {
@ -120,6 +121,7 @@ export default async function ({ readConfigFile }) {
resolve(__dirname, './apps/index_lifecycle_management'),
resolve(__dirname, './apps/snapshot_restore'),
resolve(__dirname, './apps/cross_cluster_replication'),
resolve(__dirname, './apps/remote_clusters'),
],
// define the name and providers for services that should be
@ -190,7 +192,8 @@ export default async function ({ readConfigFile }) {
indexManagement: IndexManagementPageProvider,
indexLifecycleManagement: IndexLifecycleManagementPageProvider,
snapshotRestore: SnapshotRestorePageProvider,
crossClusterReplication: CrossClusterReplicationPageProvider
crossClusterReplication: CrossClusterReplicationPageProvider,
remoteClusters: RemoteClustersPageProvider
},
servers: kibanaFunctionalConfig.get('servers'),
@ -308,6 +311,10 @@ export default async function ({ readConfigFile }) {
pathname: '/app/kibana',
hash: '/management/elasticsearch/cross_cluster_replication',
},
remoteClusters: {
pathname: '/app/kibana',
hash: '/management/elasticsearch/remote_clusters',
},
apm: {
pathname: '/app/apm',
},

View file

@ -27,3 +27,4 @@ export { IndexManagementPageProvider } from './index_management_page';
export { IndexLifecycleManagementPageProvider } from './index_lifecycle_management_page';
export { SnapshotRestorePageProvider } from './snapshot_restore_page';
export { CrossClusterReplicationPageProvider } from './cross_cluster_replication_page';
export { RemoteClustersPageProvider } from './remote_clusters_page';

View file

@ -0,0 +1,19 @@
/*
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
* or more contributor license agreements. Licensed under the Elastic License;
* you may not use this file except in compliance with the Elastic License.
*/
import { KibanaFunctionalTestDefaultProviders } from '../../types/providers';
export const RemoteClustersPageProvider = ({
getService,
}: KibanaFunctionalTestDefaultProviders) => {
const testSubjects = getService('testSubjects');
return {
async remoteClusterCreateButton() {
return await testSubjects.find('remoteClusterEmptyPromptCreateButton');
},
};
};