@@ -2,15 +2,15 @@ class LoadPage {
22
33 //Load tile list view page objects
44 /**
5- * @param type - accepts `table` for list-view or `th-large` for card-view
6- */
5+ * @param type - accepts `table` for list-view or `th-large` for card-view
6+ */
77 loadView ( type : string ) {
88 return cy . get ( `[data-icon="${ type } "]` ) ;
99 }
1010
1111 /**
12- * @param type - accepts `list` or `card`
13- */
12+ * @param type - accepts `list` or `card`
13+ */
1414 addNewButton ( type : string ) {
1515 return cy . findByLabelText ( `add-new-${ type } ` ) ;
1616 }
@@ -44,15 +44,15 @@ class LoadPage {
4444 }
4545
4646 /**
47- * add to flow icon in load table view
48- * @param stepName
49- */
47+ * add to flow icon in load table view
48+ * @param stepName
49+ */
5050 addToFlow ( stepName : string ) {
51- return cy . findByLabelText ( `${ stepName } -add-icon ` ) ;
51+ return cy . findByLabelText ( `${ stepName } -run ` ) ;
5252 }
5353
5454 addToFlowDisabled ( stepName : string ) {
55- return cy . findByLabelText ( `${ stepName } -disabled-add-icon ` ) ;
55+ return cy . findByTestId ( `${ stepName } -disabled-run ` ) ;
5656 }
5757
5858 switchEditAdvanced ( ) {
@@ -114,8 +114,8 @@ class LoadPage {
114114 }
115115
116116 /**
117- * @param text - a string that matches any button by its label
118- */
117+ * @param text - a string that matches any button by its label
118+ */
119119 findByButtonText ( text : string ) {
120120 return cy . findByLabelText ( text ) ;
121121 }
@@ -168,17 +168,17 @@ class LoadPage {
168168 }
169169
170170 /**
171- * Clicks on a database option
172- * @param db - accepts `STAGING` or `FINAL`
173- */
171+ * Clicks on a database option
172+ * @param db - accepts `STAGING` or `FINAL`
173+ */
174174 selectTargetDB ( db : string ) {
175175 cy . waitUntil ( ( ) => cy . findByLabelText ( "targetDatabase-select" ) ) . click ( ) ;
176176 cy . waitUntil ( ( ) => cy . findByTestId ( `targetDbOptions-data-hub-${ db } ` ) ) . click ( { force : true } ) ;
177177 }
178178
179179 /**
180- * This input field takes multiple values with special character sequences for keyboard events
181- */
180+ * This input field takes multiple values with special character sequences for keyboard events
181+ */
182182 targetCollectionInput ( ) {
183183 return cy . findByLabelText ( "additionalColl-select" ) ;
184184 }
@@ -188,19 +188,19 @@ class LoadPage {
188188 }
189189
190190 /**
191- * Overwrite the existing default permissions
192- * @param permissions - accepts a comma separated text of roles and capabilities alternately
193- * @example role1,cap1,role2,cap2
194- */
191+ * Overwrite the existing default permissions
192+ * @param permissions - accepts a comma separated text of roles and capabilities alternately
193+ * @example role1,cap1,role2,cap2
194+ */
195195 setTargetPermissions ( permissions : string ) {
196196 return cy . get ( "#targetPermissions" ) . clear ( ) . type ( permissions ) ;
197197 }
198198
199199 /**
200- * Add to the existing default permissions
201- * @param permissions - accepts a comma separated text of roles and capabilities alternately
202- * @example role1,cap1,role2,cap2
203- */
200+ * Add to the existing default permissions
201+ * @param permissions - accepts a comma separated text of roles and capabilities alternately
202+ * @example role1,cap1,role2,cap2
203+ */
204204 appendTargetPermissions ( permissions : string ) {
205205 return cy . get ( "#targetPermissions" ) . type ( `,${ permissions } ` ) ;
206206 }
@@ -215,21 +215,21 @@ class LoadPage {
215215 }
216216
217217 /**
218- * Textarea that takes a file path in fixtures and pastes the json object {} in the text area
219- * @param fixturePath - file path to headerContent json config file
220- * @see https://docs.cypress.io/api/commands/type.html#Key-Combinations
221- */
218+ * Textarea that takes a file path in fixtures and pastes the json object {} in the text area
219+ * @param fixturePath - file path to headerContent json config file
220+ * @see https://docs.cypress.io/api/commands/type.html#Key-Combinations
221+ */
222222 setHeaderContent ( fixturePath : string ) {
223223 cy . fixture ( fixturePath ) . then ( content => {
224224 cy . get ( "#headers" ) . clear ( ) . type ( JSON . stringify ( content ) , { parseSpecialCharSequences : false } ) ;
225225 } ) ;
226226 }
227227
228228 /**
229- * Textarea that takes a file path in fixtures and pastes the json array object [] in the text area
230- * @param fixturePath - file path to stepInterceptor json config file
231- * @see https://docs.cypress.io/api/commands/type.html#Key-Combinations
232- */
229+ * Textarea that takes a file path in fixtures and pastes the json array object [] in the text area
230+ * @param fixturePath - file path to stepInterceptor json config file
231+ * @see https://docs.cypress.io/api/commands/type.html#Key-Combinations
232+ */
233233 setStepInterceptor ( fixturePath : string ) {
234234 cy . findByText ( "Interceptors" ) . click ( ) ;
235235 if ( fixturePath === "" ) { return cy . get ( "#interceptors" ) . clear ( ) ; } else {
@@ -240,10 +240,10 @@ class LoadPage {
240240 }
241241
242242 /**
243- * Textarea that takes a file path in fixtures and pastes the json object {} in the text area
244- * @param fixturePath - file path to customHook json config file
245- * @see https://docs.cypress.io/api/commands/type.html#Key-Combinations
246- */
243+ * Textarea that takes a file path in fixtures and pastes the json object {} in the text area
244+ * @param fixturePath - file path to customHook json config file
245+ * @see https://docs.cypress.io/api/commands/type.html#Key-Combinations
246+ */
247247 setCustomHook ( fixturePath : string ) {
248248 cy . findByText ( "Custom Hook" ) . click ( ) ;
249249 if ( fixturePath === "" ) { return cy . get ( "#customHook" ) . clear ( ) ; } else {
@@ -296,8 +296,8 @@ class LoadPage {
296296 }
297297
298298 addStepToNewFlowListView ( stepName : string ) {
299- cy . findByLabelText ( `${ stepName } -add-icon ` ) . click ( ) ;
300- this . addToNewFlow ( stepName ) . click ( { force : true } ) ;
299+ cy . findByTestId ( `${ stepName } -run ` ) . click ( ) ;
300+ this . runInNewFlow ( stepName ) . click ( { force : true } ) ;
301301 cy . waitForAsyncRequest ( ) ;
302302 }
303303
@@ -314,4 +314,4 @@ class LoadPage {
314314}
315315
316316const loadPage = new LoadPage ( ) ;
317- export default loadPage ;
317+ export default loadPage ;
0 commit comments