[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 ) => {
|
coupon: async ( { api }, use ) => {
|
||||||
const coupon = {};
|
const coupon = {};
|
||||||
await use( coupon );
|
await use( coupon );
|
||||||
await api
|
await api.delete( `coupons/${ coupon.id }`, { force: true } );
|
||||||
.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 );
|
|
||||||
} );
|
|
||||||
},
|
},
|
||||||
} );
|
} );
|
||||||
|
|
||||||
|
|
|
@ -74,15 +74,7 @@ const test = baseTest.extend( {
|
||||||
coupon: async ( { api }, use ) => {
|
coupon: async ( { api }, use ) => {
|
||||||
const coupon = {};
|
const coupon = {};
|
||||||
await use( coupon );
|
await use( coupon );
|
||||||
await api
|
await api.delete( `coupons/${ coupon.id }`, { force: true } );
|
||||||
.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 );
|
|
||||||
} );
|
|
||||||
},
|
},
|
||||||
|
|
||||||
product: async ( { api }, use ) => {
|
product: async ( { api }, use ) => {
|
||||||
|
|
Loading…
Reference in New Issue