@@ -57,8 +57,14 @@ test.describe('Postgres DB Connection', {
57
57
await test . step ( 'Open periodic table connection' , async ( ) => {
58
58
const connectionName = app . code . driver . page . locator ( '.connections-details' , { hasText : 'public' } ) ;
59
59
await connectionName . locator ( '..' ) . locator ( '.expand-collapse-area .codicon-chevron-right' ) . click ( ) ;
60
- await app . code . driver . page . locator ( '.codicon-positron-table-connection' ) . click ( ) ;
61
- await app . workbench . editors . verifyTab ( 'Data: periodic_table' , { isVisible : true } ) ;
60
+ await app . code . driver . page . locator ( '.codicon-positron-table-connection' ) . first ( ) . click ( ) ;
61
+
62
+ // hack to allow for different beahavior based on how db was imported
63
+ try {
64
+ await app . workbench . editors . verifyTab ( 'Data: elements' , { isVisible : true } ) ;
65
+ } catch {
66
+ await app . workbench . editors . verifyTab ( 'Data: periodic_table' , { isVisible : true } ) ;
67
+ }
62
68
} ) ;
63
69
64
70
await test . step ( 'Verify connection data from periodic table' , async ( ) => {
@@ -67,7 +73,12 @@ test.describe('Postgres DB Connection', {
67
73
await expect ( async ( ) => {
68
74
const tableData = await app . workbench . dataExplorer . getDataExplorerTableData ( ) ;
69
75
70
- expect ( tableData [ 0 ] [ 'Element' ] ) . toBe ( 'Hydrogen' ) ;
76
+ // hack to allow for different beahavior based on how db was imported
77
+ try {
78
+ expect ( tableData [ 0 ] [ 'name' ] ) . toBe ( 'Hydrogen' ) ;
79
+ } catch {
80
+ expect ( tableData [ 0 ] [ 'Element' ] ) . toBe ( 'Hydrogen' ) ;
81
+ }
71
82
72
83
} ) . toPass ( { timeout : 60000 } ) ;
73
84
} ) ;
@@ -120,8 +131,14 @@ test.describe('Postgres DB Connection', {
120
131
const publicNode = app . code . driver . page . locator ( '.connections-details' , { hasText : 'public' } ) ;
121
132
await publicNode . locator ( '..' ) . locator ( '.expand-collapse-area .codicon-chevron-right' ) . click ( ) ;
122
133
123
- await app . code . driver . page . locator ( '.codicon-positron-table-connection' ) . click ( ) ;
124
- await app . workbench . editors . verifyTab ( 'Data: periodic_table' , { isVisible : true } ) ;
134
+ await app . code . driver . page . locator ( '.codicon-positron-table-connection' ) . first ( ) . click ( ) ;
135
+
136
+ // hack to allow for different beahavior based on how db was imported
137
+ try {
138
+ await app . workbench . editors . verifyTab ( 'Data: elements' , { isVisible : true } ) ;
139
+ } catch {
140
+ await app . workbench . editors . verifyTab ( 'Data: periodic_table' , { isVisible : true } ) ;
141
+ }
125
142
} ) ;
126
143
127
144
await test . step ( 'Verify connection data from periodic table' , async ( ) => {
@@ -130,7 +147,12 @@ test.describe('Postgres DB Connection', {
130
147
await expect ( async ( ) => {
131
148
const tableData = await app . workbench . dataExplorer . getDataExplorerTableData ( ) ;
132
149
133
- expect ( tableData [ 0 ] [ 'Element' ] ) . toBe ( 'Hydrogen' ) ;
150
+ // hack to allow for different beahavior based on how db was imported
151
+ try {
152
+ expect ( tableData [ 0 ] [ 'name' ] ) . toBe ( 'Hydrogen' ) ;
153
+ } catch {
154
+ expect ( tableData [ 0 ] [ 'Element' ] ) . toBe ( 'Hydrogen' ) ;
155
+ }
134
156
135
157
} ) . toPass ( { timeout : 60000 } ) ;
136
158
} ) ;
0 commit comments