kibana/x-pack/test/functional_enterprise_search/cypress.config.ts
Constance 3ffd6af7c5
[Enterprise Search] Set up basic scaffolding for Cypress tests in Kibana (#108560)
* Set up tsconfigs

- Required if we're going to have several different Cypress suites (one for each plugin/product essentially) in order for global cy.() commands and it()/describe() to register as expected

@see https://docs.cypress.io/guides/tooling/typescript-support#Clashing-types-with-Jest

* Set up shared commands and routes

NOTE: Unlike ent-search, shared/ will *not* have its own set of tests - rather, shared/cypress is a resource/set of helpers for other test suites to extend/import/etc.

* Create basic Enterprise Search Overview E2E tests

- For happy path testing, we _likely_ shouldn't need more than these tests going forward

- If we ever want to add an error connecting test however, this is likely where it should go (or alternatively, use Kibana's FTR with Enterprise Search host set but not spun up)

* Set up App Search Cypress test scaffolding

- placeholder/hello world test only

* Set up Workplace Search Cypress test scaffolding

- placeholder/hello world test only

* Add helper script and update README

* Add config setup & documentation for potentially running Cypress against Kibana functional server

* PR feedback: Fix typescript project names

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2021-08-16 16:30:46 -04:00

39 lines
1.2 KiB
TypeScript

/*
* 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; you may not use this file except in compliance with the Elastic License
* 2.0.
*/
import { FtrConfigProviderContext } from '@kbn/test';
// TODO: If Kibana CI doesn't end up using this (e.g., uses Dockerized containers
// instead of the functional test server), we can opt to delete this file later.
export default async function ({ readConfigFile }: FtrConfigProviderContext) {
const baseConfig = await readConfigFile(require.resolve('./base_config'));
return {
// default to the xpack functional config
...baseConfig.getAll(),
esTestCluster: {
...baseConfig.get('esTestCluster'),
serverArgs: [
...baseConfig.get('esTestCluster.serverArgs'),
'xpack.security.enabled=true',
'xpack.security.authc.api_key.enabled=true',
],
},
kbnTestServer: {
...baseConfig.get('kbnTestServer'),
serverArgs: [
...baseConfig.get('kbnTestServer.serverArgs'),
'--csp.strict=false',
'--csp.warnLegacyBrowsers=false',
'--enterpriseSearch.host=http://localhost:3002',
],
},
};
}