@@ -11,7 +11,7 @@ import { withProcRunner } from '@kbn/dev-utils';
1111
1212import { FtrProviderContext } from './ftr_provider_context' ;
1313
14- export async function SiemCypressTestRunner ( { getService } : FtrProviderContext ) {
14+ export async function SecuritySolutionCypressCliTestRunner ( { getService } : FtrProviderContext ) {
1515 const log = getService ( 'log' ) ;
1616 const config = getService ( 'config' ) ;
1717 const esArchiver = getService ( 'esArchiver' ) ;
@@ -37,3 +37,30 @@ export async function SiemCypressTestRunner({ getService }: FtrProviderContext)
3737 } ) ;
3838 } ) ;
3939}
40+
41+ export async function SecuritySolutionCypressVisualTestRunner ( { getService } : FtrProviderContext ) {
42+ const log = getService ( 'log' ) ;
43+ const config = getService ( 'config' ) ;
44+ const esArchiver = getService ( 'esArchiver' ) ;
45+
46+ await esArchiver . load ( 'empty_kibana' ) ;
47+ await esArchiver . load ( 'auditbeat' ) ;
48+
49+ await withProcRunner ( log , async ( procs ) => {
50+ await procs . run ( 'cypress' , {
51+ cmd : 'yarn' ,
52+ args : [ 'cypress:open' ] ,
53+ cwd : resolve ( __dirname , '../../plugins/security_solution' ) ,
54+ env : {
55+ FORCE_COLOR : '1' ,
56+ // eslint-disable-next-line @typescript-eslint/naming-convention
57+ CYPRESS_baseUrl : Url . format ( config . get ( 'servers.kibana' ) ) ,
58+ CYPRESS_ELASTICSEARCH_URL : Url . format ( config . get ( 'servers.elasticsearch' ) ) ,
59+ CYPRESS_ELASTICSEARCH_USERNAME : config . get ( 'servers.elasticsearch.username' ) ,
60+ CYPRESS_ELASTICSEARCH_PASSWORD : config . get ( 'servers.elasticsearch.password' ) ,
61+ ...process . env ,
62+ } ,
63+ wait : true ,
64+ } ) ;
65+ } ) ;
66+ }
0 commit comments