@@ -19,7 +19,6 @@ describe("questdb schema with working tables", () => {
19
19
tables . forEach ( ( table ) => {
20
20
cy . createTable ( table ) ;
21
21
} ) ;
22
- cy . expandTables ( ) ;
23
22
cy . refreshSchema ( ) ;
24
23
} ) ;
25
24
it ( "should show all the tables when there are no suspended" , ( ) => {
@@ -33,6 +32,7 @@ describe("questdb schema with working tables", () => {
33
32
it ( "should filter the table with input field" , ( ) => {
34
33
// Table name search
35
34
cy . get ( 'input[name="table_filter"]' ) . type ( "btc_trades" ) ;
35
+ cy . expandTables ( ) ;
36
36
cy . getByDataHook ( "schema-search-clear-button" ) . should ( "exist" ) ;
37
37
cy . getByDataHook ( "schema-table-title" ) . should ( "contain" , "btc_trades" ) ;
38
38
cy . getByDataHook ( "schema-table-title" ) . should ( "not.contain" , "ź" ) ;
@@ -237,6 +237,7 @@ describe("materialized views", () => {
237
237
} ) ;
238
238
239
239
it ( "should create materialized views" , ( ) => {
240
+ cy . collapseTables ( ) ;
240
241
cy . getByDataHook ( "expand-tables" ) . contains ( `Tables (${ tables . length } )` ) ;
241
242
cy . getByDataHook ( "expand-materialized-views" ) . contains (
242
243
`Materialized views (${ materializedViews . length } )`
@@ -251,7 +252,10 @@ describe("materialized views", () => {
251
252
it ( "should show the base table and copy DDL for a materialized view" , ( ) => {
252
253
cy . expandMatViews ( ) ;
253
254
cy . getByDataHook ( "schema-matview-title" ) . contains ( "btc_trades_mv" ) . click ( ) ;
254
- cy . getByDataHook ( "base-table-name" ) . contains ( "btc_trades" ) . should ( "exist" ) ;
255
+ cy . getByDataHook ( "schema-row" ) . contains ( "Base tables" ) . click ( ) ;
256
+ cy . getByDataHook ( "schema-detail-title" )
257
+ . contains ( "btc_trades" )
258
+ . should ( "exist" ) ;
255
259
cy . getByDataHook ( "schema-matview-title" )
256
260
. contains ( "btc_trades_mv" )
257
261
. rightclick ( ) ;
@@ -280,9 +284,11 @@ describe("materialized views", () => {
280
284
} ,
281
285
( req ) => {
282
286
req . continue ( ( res ) => {
283
- // [view_name, refresh_type, base_table_name, last_refresh_timestamp, view_sql, view_table_dir_name, invalidation_reason, view_status, base_table_txn, applied_base_table_txn]
284
- res . body . dataset [ 0 ] [ 6 ] = "this is an invalidation reason" ;
285
- res . body . dataset [ 0 ] [ 7 ] = "invalid" ;
287
+ if ( res . body && res . body . dataset && res . body . dataset . length > 0 ) {
288
+ // [view_name, refresh_type, base_table_name, last_refresh_timestamp, view_sql, view_table_dir_name, invalidation_reason, view_status, base_table_txn, applied_base_table_txn]
289
+ res . body . dataset [ 0 ] [ 6 ] = "this is an invalidation reason" ;
290
+ res . body . dataset [ 0 ] [ 7 ] = "invalid" ;
291
+ }
286
292
return res ;
287
293
} ) ;
288
294
}
0 commit comments