[e2e tests] Don't catch api errors in fixtures (#51265)

This commit is contained in:
Adrian Moldovan 2024-09-10 18:32:41 +01:00 committed by GitHub
parent 9c81006156
commit d409d6db99
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
3 changed files with 6 additions and 18 deletions

View File

@ -0,0 +1,4 @@
Significance: patch
Type: dev

View File

@ -35,15 +35,7 @@ const test = baseTest.extend( {
coupon: async ( { api }, use ) => {
const coupon = {};
await use( coupon );
await api
.delete( `coupons/${ coupon.id }`, { force: true } )
.then( ( response ) => {
console.log( 'Delete successful:', response.data );
} )
.catch( ( error ) => {
console.log( 'Error response data:', error.response.data );
throw new Error( error.response.data );
} );
await api.delete( `coupons/${ coupon.id }`, { force: true } );
},
} );

View File

@ -74,15 +74,7 @@ const test = baseTest.extend( {
coupon: async ( { api }, use ) => {
const coupon = {};
await use( coupon );
await api
.delete( `coupons/${ coupon.id }`, { force: true } )
.then( ( response ) => {
console.log( 'Delete successful:', response.data );
} )
.catch( ( error ) => {
console.log( 'Error response data:', error.response.data );
throw new Error( error.response.data );
} );
await api.delete( `coupons/${ coupon.id }`, { force: true } );
},
product: async ( { api }, use ) => {