File tree Expand file tree Collapse file tree 1 file changed +7
-15
lines changed Expand file tree Collapse file tree 1 file changed +7
-15
lines changed Original file line number Diff line number Diff line change 11/// <reference types="cypress" />
22
33import * as c from '../../support/const' ;
4-
5- let useMocks = false
4+ import data from './../../../../mocks/loki/flow_records.json' ;
65
76describe ( 'netflow-table' , ( ) => {
87 function reload ( clearCache = true ) {
9- cy . intercept ( {
10- method : 'GET' ,
11- url : c . url + '/api/frontend-config' ,
12- } ) . as ( 'frontend-config' )
8+ // this test bench only work with mocks
9+ cy . intercept ( 'GET' , c . url + '/api/loki/flow/records?*' , ( req ) => {
10+ req . continue ( ( res ) => {
11+ res . body = data ;
12+ } )
13+ } ) ;
1314
1415 cy . openNetflowTrafficPage ( clearCache ) ;
1516
16- cy . wait ( '@frontend-config' ) . then ( ( interception ) => {
17- useMocks = interception ?. response . body . lokiMocks || false ;
18- } )
19-
2017 //move to table view
2118 cy . get ( '.tableTabButton' ) . click ( ) ;
2219 //clear default app filters
@@ -30,11 +27,6 @@ describe('netflow-table', () => {
3027 } ) ;
3128
3229 it ( 'display content correctly' , ( ) => {
33- if ( ! useMocks ) {
34- it . skip ( "Skipping test since not using mocks" ) ;
35- return
36- }
37-
3830 // select first row
3931 cy . get ( '#netflow-table-row-0' ) . click ( )
4032 // check for side panel content
You can’t perform that action at this time.
0 commit comments