File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -178,7 +178,7 @@ import path from 'path';
178178 method : 'DELETE' ,
179179 headers : { 'Authorization' : `Bearer ${ token } ` }
180180 } ) ;
181- return delRes . status === 204 ? 'success' : 'failed' ;
181+ return ( delRes . status === 204 || delRes . status === 200 ) ? 'success' : 'failed' ;
182182 } , uniqueSerial ) ;
183183 console . log ( ` Result: ${ maintDeleted } ` ) ;
184184
@@ -195,7 +195,7 @@ import path from 'path';
195195 method : 'DELETE' ,
196196 headers : { 'Authorization' : `Bearer ${ token } ` }
197197 } ) ;
198- return delRes . status === 204 ? 'success' : 'failed' ;
198+ return ( delRes . status === 204 || delRes . status === 200 ) ? 'success' : 'failed' ;
199199 } , uniqueSerial ) ;
200200 console . log ( ` Result: ${ resDeleted } ` ) ;
201201
@@ -214,6 +214,10 @@ import path from 'path';
214214 console . log ( '15. Deleting the asset...' ) ;
215215 await page . click ( 'button:has-text("Delete")' ) ;
216216
217+ // Click the Confirm button in the Shadcn dialog
218+ await page . waitForSelector ( 'button:has-text("Confirm")' ) ;
219+ await page . click ( 'button:has-text("Confirm")' ) ;
220+
217221 // Wait for the asset to be removed from the list
218222 await page . waitForSelector ( `text=${ uniqueSerial } ` , { state : 'detached' } ) ;
219223 await page . screenshot ( { path : path . join ( artifactDir , 'global_17_asset_deleted.png' ) } ) ;
You can’t perform that action at this time.
0 commit comments