[e2e tests] Don't catch api errors in fixtures (#51265)
This commit is contained in:
parent
9c81006156
commit
d409d6db99
|
@ -0,0 +1,4 @@
|
|||
Significance: patch
|
||||
Type: dev
|
||||
|
||||
|
|
@ -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 } );
|
||||
},
|
||||
} );
|
||||
|
||||
|
|
|
@ -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 ) => {
|
||||
|
|
Loading…
Reference in New Issue