Added app load test for Cross Cluster Replication. (#40708) (#40799)

This commit is contained in:
John Dorlus 2019-07-10 21:54:30 +00:00 committed by GitHub
parent cd52b28019
commit f19b157ed9
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
5 changed files with 79 additions and 4 deletions

View file

@ -0,0 +1,30 @@
/*
* 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', 'crossClusterReplication']);
const log = getService('log');
describe('Home page', function() {
this.tags('smoke');
before(async () => {
await pageObjects.common.navigateToApp('crossClusterReplication');
});
it('Loads the app', async () => {
await log.debug(`Checking for app title to be Cross-Cluster Replication`);
const appTitleText = await pageObjects.crossClusterReplication.appTitleText();
expect(appTitleText).to.be('Cross-Cluster Replication');
const followerIndexButton = await pageObjects.crossClusterReplication.createFollowerIndexButton();
expect(await followerIndexButton.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('Cross Cluster Replication app', function() {
this.tags('ciGroup4');
loadTestFile(require.resolve('./home_page'));
});
};

View file

@ -30,7 +30,8 @@ import {
LicenseManagementPageProvider,
IndexManagementPageProvider,
IndexLifecycleManagementPageProvider,
SnapshotRestorePageProvider
SnapshotRestorePageProvider,
CrossClusterReplicationPageProvider
} from './page_objects';
import {
@ -117,7 +118,8 @@ export default async function ({ readConfigFile }) {
resolve(__dirname, './apps/license_management'),
resolve(__dirname, './apps/index_management'),
resolve(__dirname, './apps/index_lifecycle_management'),
resolve(__dirname, './apps/snapshot_restore')
resolve(__dirname, './apps/snapshot_restore'),
resolve(__dirname, './apps/cross_cluster_replication'),
],
// define the name and providers for services that should be
@ -185,9 +187,10 @@ export default async function ({ readConfigFile }) {
uptime: UptimePageProvider,
rollup: RollupPageProvider,
licenseManagement: LicenseManagementPageProvider,
snapshotRestore: SnapshotRestorePageProvider,
indexLifecycleManagement: IndexLifecycleManagementPageProvider,
indexManagement: IndexManagementPageProvider,
indexLifecycleManagement: IndexLifecycleManagementPageProvider,
snapshotRestore: SnapshotRestorePageProvider,
crossClusterReplication: CrossClusterReplicationPageProvider
},
servers: kibanaFunctionalConfig.get('servers'),
@ -302,6 +305,10 @@ export default async function ({ readConfigFile }) {
pathname: '/app/kibana',
hash: '/management/elasticsearch/snapshot_restore',
},
crossClusterReplication: {
pathname: '/app/kibana',
hash: '/management/elasticsearch/cross_cluster_replication',
},
apm: {
pathname: '/app/apm',
},

View file

@ -0,0 +1,22 @@
/*
* 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 CrossClusterReplicationPageProvider = ({
getService,
}: KibanaFunctionalTestDefaultProviders) => {
const testSubjects = getService('testSubjects');
return {
async appTitleText() {
return await testSubjects.getVisibleText('appTitle');
},
async createFollowerIndexButton() {
return await testSubjects.find('createFollowerIndexButton');
},
};
};

View file

@ -26,3 +26,4 @@ export { LicenseManagementPageProvider } from './license_management_page';
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';