Skip to content

Commit

Permalink
fixes typecheck error
Browse files Browse the repository at this point in the history
  • Loading branch information
MadameSheema committed Aug 27, 2020
1 parent 9273642 commit 57bf0aa
Showing 1 changed file with 25 additions and 9 deletions.
34 changes: 25 additions & 9 deletions x-pack/test/security_solution_cypress/runner.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,17 +12,33 @@ import { withProcRunner } from '@kbn/dev-utils';
import { FtrProviderContext } from './ftr_provider_context';

export async function SecuritySolutionCypressCliTestRunner({ getService }: FtrProviderContext) {
await SecuritySolutionCypressTestRunner('run', { getService });
}
const log = getService('log');
const config = getService('config');
const esArchiver = getService('esArchiver');

export async function SecuritySolutionCypressVisualTestRunner({ getService }: FtrProviderContext) {
await SecuritySolutionCypressTestRunner('open', { getService });
await esArchiver.load('empty_kibana');
await esArchiver.load('auditbeat');

await withProcRunner(log, async (procs) => {
await procs.run('cypress', {
cmd: 'yarn',
args: ['cypress:run'],
cwd: resolve(__dirname, '../../plugins/security_solution'),
env: {
FORCE_COLOR: '1',
// eslint-disable-next-line @typescript-eslint/naming-convention
CYPRESS_baseUrl: Url.format(config.get('servers.kibana')),
CYPRESS_ELASTICSEARCH_URL: Url.format(config.get('servers.elasticsearch')),
CYPRESS_ELASTICSEARCH_USERNAME: config.get('servers.elasticsearch.username'),
CYPRESS_ELASTICSEARCH_PASSWORD: config.get('servers.elasticsearch.password'),
...process.env,
},
wait: true,
});
});
}

export async function SecuritySolutionCypressTestRunner(
argument: string,
{ getService }: FtrProviderContext
) {
export async function SecuritySolutionCypressVisualTestRunner({ getService }: FtrProviderContext) {
const log = getService('log');
const config = getService('config');
const esArchiver = getService('esArchiver');
Expand All @@ -33,7 +49,7 @@ export async function SecuritySolutionCypressTestRunner(
await withProcRunner(log, async (procs) => {
await procs.run('cypress', {
cmd: 'yarn',
args: [`cypress:${argument}`],
args: ['cypress:open'],
cwd: resolve(__dirname, '../../plugins/security_solution'),
env: {
FORCE_COLOR: '1',
Expand Down

0 comments on commit 57bf0aa

Please sign in to comment.