@@ -63,27 +63,11 @@ function cleanUp(catalogItemToDelete) {
6363 textArray : [ catalogItemToDelete ] ,
6464 } ) ;
6565 cy . toolbar ( CONFIG_TOOLBAR_BUTTON , DELETE_CATALOG_ITEMS_CONFIG_OPTION ) ;
66- // TODO: Replace with expect_modal once #9653 is merged
67- cy . contains (
68- '.bx--modal-container .bx--modal-header' ,
69- REMOVE_CATALOG_MODAL_HEADER_TEXT
70- ) ;
71- cy . contains (
72- '.bx--modal-container .bx--modal-content' ,
73- catalogItemToDelete
74- ) ;
75- cy . contains (
76- '.bx--modal-container .bx--modal-footer button' ,
77- DELETE_BUTTON_TEXT
78- ) . click ( ) ;
79- // cy.expect_modal({
80- // modalHeaderText: REMOVE_CATALOG_MODAL_HEADER_TEXT,
81- // modalContentExpectedTexts: [
82- // 'delete',
83- // catalogItemToDelete,
84- // ],
85- // targetFooterButtonText: DELETE_BUTTON_TEXT,
86- // });
66+ cy . expect_modal ( {
67+ modalHeaderText : REMOVE_CATALOG_MODAL_HEADER_TEXT ,
68+ modalContentExpectedTexts : [ 'delete' , catalogItemToDelete ] ,
69+ targetFooterButtonText : DELETE_BUTTON_TEXT ,
70+ } ) ;
8771 } ) ;
8872}
8973
@@ -158,36 +142,32 @@ describe('Automate Catalog form operations: Services > Catalogs > Catalogs > Con
158142 it ( 'Validate error messages for blank or already-used names' , ( ) => {
159143 // Blank name
160144 cy . getFormInputFieldByIdAndType ( { inputId : 'name' } ) . clear ( ) ;
161- // TODO: Replace with expect_inline_field_errors once #9653 is merged
162- cy . contains ( '#name-error-msg' , 'blank' ) ;
163- // cy.expect_inline_field_errors({ containsText: 'blank' });
145+ cy . expect_inline_field_errors ( { containsText : 'blank' } ) ;
164146 // Duplicate name
165147 cy . getFormInputFieldByIdAndType ( { inputId : 'name' } )
166148 . clear ( )
167149 . type ( CATALOG_ITEM_NAME ) ;
168- // TODO: Replace with expect_inline_field_errors once #9653 is merged
169- cy . contains ( '#name-error-msg' , 'taken' ) ;
170- // cy.expect_inline_field_errors({ containsText: 'taken' });
150+ cy . expect_inline_field_errors ( { containsText : 'taken' } ) ;
171151 } ) ;
172152 } ) ;
173153
174- describe ( 'Validate copy functionality' , ( ) => {
175- it ( 'Verify add operation from copy catalog form' , ( ) => {
176- cy . getFormLabelByForAttribute ( {
177- forValue : 'copy_tags' ,
178- } ) . click ( ) ;
179- cy . getFormFooterButtonByTypeWithText ( {
180- buttonText : ADD_BUTTON_TEXT ,
181- buttonType : 'submit' ,
182- } ) . click ( ) ;
183- cy . expect_flash ( flashClassMap . success , FLASH_MESSAGE_SAVED ) ;
184- } ) ;
154+ describe ( 'Validate copy functionality' , ( ) => {
155+ it ( 'Verify add operation from copy catalog form' , ( ) => {
156+ cy . getFormLabelByForAttribute ( {
157+ forValue : 'copy_tags' ,
158+ } ) . click ( ) ;
159+ cy . getFormFooterButtonByTypeWithText ( {
160+ buttonText : ADD_BUTTON_TEXT ,
161+ buttonType : 'submit' ,
162+ } ) . click ( ) ;
163+ cy . expect_flash ( flashClassMap . success , FLASH_MESSAGE_SAVED ) ;
164+ } ) ;
185165
186- afterEach ( ( ) => {
187- // TODO: Replace with better cleanup approach
188- cleanUp ( COPIED_CATALOG_ITEM_NAME ) ;
189- } ) ;
166+ afterEach ( ( ) => {
167+ // TODO: Replace with better cleanup approach
168+ cleanUp ( COPIED_CATALOG_ITEM_NAME ) ;
190169 } ) ;
170+ } ) ;
191171
192172 afterEach ( ( ) => {
193173 // TODO: Replace with better cleanup approach
0 commit comments