2 files changed +4
-8
lines changed Original file line number Diff line number Diff line change @@ -290,10 +290,9 @@ Cypress.Commands.add("refreshSchema", () => {
290
290
} ) ;
291
291
292
292
Cypress . Commands . add ( "expandTables" , ( ) => {
293
- // Only try to click if the expand button exists
294
- cy . getByDataHook ( "expand-tables" , { exist : false } ) . then ( ( $el ) => {
295
- if ( $el . length > 0 ) {
296
- cy . wrap ( $el ) . click ( ) ;
293
+ cy . get ( "body" ) . then ( ( body ) => {
294
+ if ( body . find ( '[data-hook="expand-tables"]' ) . length > 0 ) {
295
+ cy . get ( '[data-hook="expand-tables"]' ) . click ( ) ;
297
296
}
298
297
} ) ;
299
298
} ) ;
Original file line number Diff line number Diff line change @@ -30,7 +30,6 @@ describe("questdb schema with working tables", () => {
30
30
31
31
it ( "should filter the table with input field" , ( ) => {
32
32
// Table name search
33
- cy . expandTables ( ) ;
34
33
cy . get ( 'input[name="table_filter"]' ) . type ( "btc_trades" ) ;
35
34
cy . getByDataHook ( "schema-search-clear-button" ) . should ( "exist" ) ;
36
35
cy . getByDataHook ( "schema-table-title" ) . should ( "contain" , "btc_trades" ) ;
@@ -62,7 +61,6 @@ describe("questdb schema with suspended tables with Linux OS error codes", () =>
62
61
tables . forEach ( ( table ) => {
63
62
cy . createTable ( table ) ;
64
63
} ) ;
65
- cy . expandTables ( ) ;
66
64
cy . refreshSchema ( ) ;
67
65
cy . typeQuery (
68
66
"ALTER TABLE btc_trades SUSPEND WAL WITH 24, 'Too many open files';"
@@ -81,7 +79,7 @@ describe("questdb schema with suspended tables with Linux OS error codes", () =>
81
79
cy . expandTables ( ) ;
82
80
} ) ;
83
81
84
- it . only ( "should work with 2 suspended tables, btc_trades and ecommerce_stats" , ( ) => {
82
+ it ( "should work with 2 suspended tables, btc_trades and ecommerce_stats" , ( ) => {
85
83
cy . getByDataHook ( "schema-filter-suspended-button" ) . should (
86
84
"not.be.disabled"
87
85
) ;
@@ -144,7 +142,6 @@ describe("table select UI", () => {
144
142
tables . forEach ( ( table ) => {
145
143
cy . createTable ( table ) ;
146
144
} ) ;
147
- cy . expandTables ( ) ;
148
145
cy . refreshSchema ( ) ;
149
146
} ) ;
150
147
beforeEach ( ( ) => {
0 commit comments