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 e006aec
Showing 1 changed file with 24 additions and 8 deletions.
32 changes: 24 additions & 8 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:${argument}`],
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 Down

0 comments on commit e006aec

Please sign in to comment.