Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added the console CCS test. #133545

Merged
merged 3 commits into from
Jun 3, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
49 changes: 49 additions & 0 deletions test/functional/apps/console/_console_ccs.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
/*
* 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 retry = getService('retry');
const log = getService('log');
const PageObjects = getPageObjects(['common', 'console']);
const remoteEsArchiver = getService('remoteEsArchiver' as 'esArchiver');

describe('Console App CCS', function describeIndexTests() {
this.tags('includeFirefox');
before(async () => {
await remoteEsArchiver.loadIfNeeded(
'test/functional/fixtures/es_archiver/logstash_functional'
);
log.debug('navigateTo console');
await PageObjects.common.navigateToApp('console');
await retry.try(async () => {
await PageObjects.console.collapseHelp();
});
});

after(async () => {
await remoteEsArchiver.unload('test/functional/fixtures/es_archiver/logstash_functional');
});

describe('Perform CCS Search in Console', () => {
before(async () => {
await PageObjects.console.clearTextArea();
});
it('it should be able to access remote data', async () => {
await PageObjects.console.enterRequest('\nGET ftr-remote:logstash-*/_search');
await PageObjects.console.clickPlay();
await retry.try(async () => {
const actualResponse = await PageObjects.console.getResponse();
expect(actualResponse).to.contain('"extension": "jpg",');
});
});
});
});
}
12 changes: 8 additions & 4 deletions test/functional/apps/console/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,14 +8,18 @@

export default function ({ getService, loadTestFile }) {
const browser = getService('browser');
const config = getService('config');

describe('console app', function () {
before(async function () {
await browser.setWindowSize(1300, 1100);
});

loadTestFile(require.resolve('./_console'));
loadTestFile(require.resolve('./_autocomplete'));
loadTestFile(require.resolve('./_vector_tile'));
if (config.get('esTestCluster.ccs')) {
loadTestFile(require.resolve('./_console_ccs'));
} else {
loadTestFile(require.resolve('./_console'));
loadTestFile(require.resolve('./_autocomplete'));
loadTestFile(require.resolve('./_vector_tile'));
}
});
}
6 changes: 5 additions & 1 deletion test/functional/config.ccs.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,11 @@ export default async function ({ readConfigFile }: FtrConfigProviderContext) {
return {
...baseConfig.getAll(),

testFiles: [require.resolve('./apps/dashboard/group3'), require.resolve('./apps/discover')],
testFiles: [
require.resolve('./apps/dashboard/group3'),
require.resolve('./apps/discover'),
require.resolve('./apps/console/_console_ccs'),
],

services: {
...baseConfig.get('services'),
Expand Down