66
77import { KQL_INPUT } from '../screens/siem_header' ;
88
9- import { loginAndWaitForPageUrlState } from '../tasks/login' ;
9+ import { loginAndWaitForPageWithoutDateRange } from '../tasks/login' ;
1010
1111import {
1212 mlHostMultiHostKqlQuery ,
@@ -26,7 +26,7 @@ import {
2626
2727describe ( 'ml conditional links' , ( ) => {
2828 it ( 'sets the KQL from a single IP with a value for the query' , ( ) => {
29- loginAndWaitForPageUrlState ( mlNetworkSingleIpKqlQuery ) ;
29+ loginAndWaitForPageWithoutDateRange ( mlNetworkSingleIpKqlQuery ) ;
3030 cy . get ( KQL_INPUT ) . should (
3131 'have.attr' ,
3232 'value' ,
@@ -35,7 +35,7 @@ describe('ml conditional links', () => {
3535 } ) ;
3636
3737 it ( 'sets the KQL from a multiple IPs with a null for the query' , ( ) => {
38- loginAndWaitForPageUrlState ( mlNetworkMultipleIpNullKqlQuery ) ;
38+ loginAndWaitForPageWithoutDateRange ( mlNetworkMultipleIpNullKqlQuery ) ;
3939 cy . get ( KQL_INPUT ) . should (
4040 'have.attr' ,
4141 'value' ,
@@ -44,7 +44,7 @@ describe('ml conditional links', () => {
4444 } ) ;
4545
4646 it ( 'sets the KQL from a multiple IPs with a value for the query' , ( ) => {
47- loginAndWaitForPageUrlState ( mlNetworkMultipleIpKqlQuery ) ;
47+ loginAndWaitForPageWithoutDateRange ( mlNetworkMultipleIpKqlQuery ) ;
4848 cy . get ( KQL_INPUT ) . should (
4949 'have.attr' ,
5050 'value' ,
@@ -53,7 +53,7 @@ describe('ml conditional links', () => {
5353 } ) ;
5454
5555 it ( 'sets the KQL from a $ip$ with a value for the query' , ( ) => {
56- loginAndWaitForPageUrlState ( mlNetworkKqlQuery ) ;
56+ loginAndWaitForPageWithoutDateRange ( mlNetworkKqlQuery ) ;
5757 cy . get ( KQL_INPUT ) . should (
5858 'have.attr' ,
5959 'value' ,
@@ -62,7 +62,7 @@ describe('ml conditional links', () => {
6262 } ) ;
6363
6464 it ( 'sets the KQL from a single host name with a value for query' , ( ) => {
65- loginAndWaitForPageUrlState ( mlHostSingleHostKqlQuery ) ;
65+ loginAndWaitForPageWithoutDateRange ( mlHostSingleHostKqlQuery ) ;
6666 cy . get ( KQL_INPUT ) . should (
6767 'have.attr' ,
6868 'value' ,
@@ -71,7 +71,7 @@ describe('ml conditional links', () => {
7171 } ) ;
7272
7373 it ( 'sets the KQL from a multiple host names with null for query' , ( ) => {
74- loginAndWaitForPageUrlState ( mlHostMultiHostNullKqlQuery ) ;
74+ loginAndWaitForPageWithoutDateRange ( mlHostMultiHostNullKqlQuery ) ;
7575 cy . get ( KQL_INPUT ) . should (
7676 'have.attr' ,
7777 'value' ,
@@ -80,7 +80,7 @@ describe('ml conditional links', () => {
8080 } ) ;
8181
8282 it ( 'sets the KQL from a multiple host names with a value for query' , ( ) => {
83- loginAndWaitForPageUrlState ( mlHostMultiHostKqlQuery ) ;
83+ loginAndWaitForPageWithoutDateRange ( mlHostMultiHostKqlQuery ) ;
8484 cy . get ( KQL_INPUT ) . should (
8585 'have.attr' ,
8686 'value' ,
@@ -89,7 +89,7 @@ describe('ml conditional links', () => {
8989 } ) ;
9090
9191 it ( 'sets the KQL from a undefined/null host name but with a value for query' , ( ) => {
92- loginAndWaitForPageUrlState ( mlHostVariableHostKqlQuery ) ;
92+ loginAndWaitForPageWithoutDateRange ( mlHostVariableHostKqlQuery ) ;
9393 cy . get ( KQL_INPUT ) . should (
9494 'have.attr' ,
9595 'value' ,
@@ -98,103 +98,103 @@ describe('ml conditional links', () => {
9898 } ) ;
9999
100100 it ( 'redirects from a single IP with a null for the query' , ( ) => {
101- loginAndWaitForPageUrlState ( mlNetworkSingleIpNullKqlQuery ) ;
101+ loginAndWaitForPageWithoutDateRange ( mlNetworkSingleIpNullKqlQuery ) ;
102102 cy . url ( ) . should (
103103 'include' ,
104104 '/app/siem#/network/ip/127.0.0.1/source?timerange=(global:(linkTo:!(timeline),timerange:(from:1566990000000,kind:absolute,to:1567000799999)),timeline:(linkTo:!(global),timerange:(from:1566990000000,kind:absolute,to:1567000799999)))'
105105 ) ;
106106 } ) ;
107107
108108 it ( 'redirects from a single IP with a value for the query' , ( ) => {
109- loginAndWaitForPageUrlState ( mlNetworkSingleIpKqlQuery ) ;
109+ loginAndWaitForPageWithoutDateRange ( mlNetworkSingleIpKqlQuery ) ;
110110 cy . url ( ) . should (
111111 'include' ,
112112 "/app/siem#/network/ip/127.0.0.1/source?query=(language:kuery,query:'(process.name:%20%22conhost.exe%22%20or%20process.name:%20%22sc.exe%22)')&timerange=(global:(linkTo:!(timeline),timerange:(from:1566990000000,kind:absolute,to:1567000799999)),timeline:(linkTo:!(global),timerange:(from:1566990000000,kind:absolute,to:1567000799999)))"
113113 ) ;
114114 } ) ;
115115
116116 it ( 'redirects from a multiple IPs with a null for the query' , ( ) => {
117- loginAndWaitForPageUrlState ( mlNetworkMultipleIpNullKqlQuery ) ;
117+ loginAndWaitForPageWithoutDateRange ( mlNetworkMultipleIpNullKqlQuery ) ;
118118 cy . url ( ) . should (
119119 'include' ,
120120 "app/siem#/network/flows?query=(language:kuery,query:'((source.ip:%20%22127.0.0.1%22%20or%20destination.ip:%20%22127.0.0.1%22)%20or%20(source.ip:%20%22127.0.0.2%22%20or%20destination.ip:%20%22127.0.0.2%22))')&timerange=(global:(linkTo:!(timeline),timerange:(from:1566990000000,kind:absolute,to:1567000799999)),timeline:(linkTo:!(global),timerange:(from:1566990000000,kind:absolute,to:1567000799999))"
121121 ) ;
122122 } ) ;
123123
124124 it ( 'redirects from a multiple IPs with a value for the query' , ( ) => {
125- loginAndWaitForPageUrlState ( mlNetworkMultipleIpKqlQuery ) ;
125+ loginAndWaitForPageWithoutDateRange ( mlNetworkMultipleIpKqlQuery ) ;
126126 cy . url ( ) . should (
127127 'include' ,
128128 "/app/siem#/network/flows?query=(language:kuery,query:'((source.ip:%20%22127.0.0.1%22%20or%20destination.ip:%20%22127.0.0.1%22)%20or%20(source.ip:%20%22127.0.0.2%22%20or%20destination.ip:%20%22127.0.0.2%22))%20and%20((process.name:%20%22conhost.exe%22%20or%20process.name:%20%22sc.exe%22))')&timerange=(global:(linkTo:!(timeline),timerange:(from:1566990000000,kind:absolute,to:1567000799999)),timeline:(linkTo:!(global),timerange:(from:1566990000000,kind:absolute,to:1567000799999)))"
129129 ) ;
130130 } ) ;
131131
132132 it ( 'redirects from a $ip$ with a null query' , ( ) => {
133- loginAndWaitForPageUrlState ( mlNetworkNullKqlQuery ) ;
133+ loginAndWaitForPageWithoutDateRange ( mlNetworkNullKqlQuery ) ;
134134 cy . url ( ) . should (
135135 'include' ,
136136 '/app/siem#/network/flows?timerange=(global:(linkTo:!(timeline),timerange:(from:1566990000000,kind:absolute,to:1567000799999)),timeline:(linkTo:!(global),timerange:(from:1566990000000,kind:absolute,to:1567000799999)))'
137137 ) ;
138138 } ) ;
139139
140140 it ( 'redirects from a $ip$ with a value for the query' , ( ) => {
141- loginAndWaitForPageUrlState ( mlNetworkKqlQuery ) ;
141+ loginAndWaitForPageWithoutDateRange ( mlNetworkKqlQuery ) ;
142142 cy . url ( ) . should (
143143 'include' ,
144144 "/app/siem#/network/flows?query=(language:kuery,query:'(process.name:%20%22conhost.exe%22%20or%20process.name:%20%22sc.exe%22)')&timerange=(global:(linkTo:!(timeline),timerange:(from:1566990000000,kind:absolute,to:1567000799999)),timeline:(linkTo:!(global),timerange:(from:1566990000000,kind:absolute,to:1567000799999)))"
145145 ) ;
146146 } ) ;
147147
148148 it ( 'redirects from a single host name with a null for the query' , ( ) => {
149- loginAndWaitForPageUrlState ( mlHostSingleHostNullKqlQuery ) ;
149+ loginAndWaitForPageWithoutDateRange ( mlHostSingleHostNullKqlQuery ) ;
150150 cy . url ( ) . should (
151151 'include' ,
152152 '/app/siem#/hosts/siem-windows/anomalies?timerange=(global:(linkTo:!(timeline),timerange:(from:1559800800000,kind:absolute,to:1559887199999)),timeline:(linkTo:!(global),timerange:(from:1559800800000,kind:absolute,to:1559887199999)))'
153153 ) ;
154154 } ) ;
155155
156156 it ( 'redirects from a host name with a variable in the query' , ( ) => {
157- loginAndWaitForPageUrlState ( mlHostSingleHostKqlQueryVariable ) ;
157+ loginAndWaitForPageWithoutDateRange ( mlHostSingleHostKqlQueryVariable ) ;
158158 cy . url ( ) . should (
159159 'include' ,
160160 '/app/siem#/hosts/siem-windows/anomalies?timerange=(global:(linkTo:!(timeline),timerange:(from:1559800800000,kind:absolute,to:1559887199999)),timeline:(linkTo:!(global),timerange:(from:1559800800000,kind:absolute,to:1559887199999)))'
161161 ) ;
162162 } ) ;
163163
164164 it ( 'redirects from a single host name with a value for query' , ( ) => {
165- loginAndWaitForPageUrlState ( mlHostSingleHostKqlQuery ) ;
165+ loginAndWaitForPageWithoutDateRange ( mlHostSingleHostKqlQuery ) ;
166166 cy . url ( ) . should (
167167 'include' ,
168168 "/app/siem#/hosts/siem-windows/anomalies?query=(language:kuery,query:'(process.name:%20%22conhost.exe%22%20or%20process.name:%20%22sc.exe%22)')&timerange=(global:(linkTo:!(timeline),timerange:(from:1559800800000,kind:absolute,to:1559887199999)),timeline:(linkTo:!(global),timerange:(from:1559800800000,kind:absolute,to:1559887199999)))"
169169 ) ;
170170 } ) ;
171171
172172 it ( 'redirects from a multiple host names with null for query' , ( ) => {
173- loginAndWaitForPageUrlState ( mlHostMultiHostNullKqlQuery ) ;
173+ loginAndWaitForPageWithoutDateRange ( mlHostMultiHostNullKqlQuery ) ;
174174 cy . url ( ) . should (
175175 'include' ,
176176 "/app/siem#/hosts/anomalies?query=(language:kuery,query:'(host.name:%20%22siem-windows%22%20or%20host.name:%20%22siem-suricata%22)')&timerange=(global:(linkTo:!(timeline),timerange:(from:1559800800000,kind:absolute,to:1559887199999)),timeline:(linkTo:!(global),timerange:(from:1559800800000,kind:absolute,to:1559887199999)))"
177177 ) ;
178178 } ) ;
179179
180180 it ( 'redirects from a multiple host names with a value for query' , ( ) => {
181- loginAndWaitForPageUrlState ( mlHostMultiHostKqlQuery ) ;
181+ loginAndWaitForPageWithoutDateRange ( mlHostMultiHostKqlQuery ) ;
182182 cy . url ( ) . should (
183183 'include' ,
184184 "/app/siem#/hosts/anomalies?query=(language:kuery,query:'(host.name:%20%22siem-windows%22%20or%20host.name:%20%22siem-suricata%22)%20and%20((process.name:%20%22conhost.exe%22%20or%20process.name:%20%22sc.exe%22))')&timerange=(global:(linkTo:!(timeline),timerange:(from:1559800800000,kind:absolute,to:1559887199999)),timeline:(linkTo:!(global),timerange:(from:1559800800000,kind:absolute,to:1559887199999)))"
185185 ) ;
186186 } ) ;
187187
188188 it ( 'redirects from a undefined/null host name with a null for the KQL' , ( ) => {
189- loginAndWaitForPageUrlState ( mlHostVariableHostNullKqlQuery ) ;
189+ loginAndWaitForPageWithoutDateRange ( mlHostVariableHostNullKqlQuery ) ;
190190 cy . url ( ) . should (
191191 'include' ,
192192 '/app/siem#/hosts/anomalies?timerange=(global:(linkTo:!(timeline),timerange:(from:1559800800000,kind:absolute,to:1559887199999)),timeline:(linkTo:!(global),timerange:(from:1559800800000,kind:absolute,to:1559887199999)))'
193193 ) ;
194194 } ) ;
195195
196196 it ( 'redirects from a undefined/null host name but with a value for query' , ( ) => {
197- loginAndWaitForPageUrlState ( mlHostVariableHostKqlQuery ) ;
197+ loginAndWaitForPageWithoutDateRange ( mlHostVariableHostKqlQuery ) ;
198198 cy . url ( ) . should (
199199 'include' ,
200200 "/app/siem#/hosts/anomalies?query=(language:kuery,query:'(process.name:%20%22conhost.exe%22%20or%20process.name:%20%22sc.exe%22)')&timerange=(global:(linkTo:!(timeline),timerange:(from:1559800800000,kind:absolute,to:1559887199999)),timeline:(linkTo:!(global),timerange:(from:1559800800000,kind:absolute,to:1559887199999)))"
0 commit comments