diff --git a/tests/e2e/specs/dashboard/edit-free-listings.test.js b/tests/e2e/specs/dashboard/edit-free-listings.test.js index 03f275b94d..4fe1d473a3 100644 --- a/tests/e2e/specs/dashboard/edit-free-listings.test.js +++ b/tests/e2e/specs/dashboard/edit-free-listings.test.js @@ -36,6 +36,11 @@ test.describe( 'Edit Free Listings', () => { page = await browser.newPage(); dashboardPage = new DashboardPage( page ); editFreeListingsPage = new EditFreeListingsPage( page ); + + await editFreeListingsPage.fulfillSettings( { + shipping_rate: 'flat', + tax_rate: 'destination', + } ); await setOnboardedMerchant(); await dashboardPage.mockRequests(); await dashboardPage.goto(); diff --git a/tests/e2e/specs/setup-mc/step-2-product-listings.test.js b/tests/e2e/specs/setup-mc/step-2-product-listings.test.js index 4e47b3c32c..bd6cf1fc45 100644 --- a/tests/e2e/specs/setup-mc/step-2-product-listings.test.js +++ b/tests/e2e/specs/setup-mc/step-2-product-listings.test.js @@ -61,14 +61,10 @@ test.describe( 'Configure product listings', () => { } ), // Mock MC settings - productListingsPage.fulfillSettings( - { - shipping_rate: 'automatic', - tax_rate: 'destination', - }, - 200, - [ 'GET' ] - ), + productListingsPage.fulfillSettings( { + shipping_rate: 'automatic', + tax_rate: 'destination', + } ), ] ); await productListingsPage.goto(); diff --git a/tests/e2e/utils/mock-requests.js b/tests/e2e/utils/mock-requests.js index 08ccb467c0..f223ad4e05 100644 --- a/tests/e2e/utils/mock-requests.js +++ b/tests/e2e/utils/mock-requests.js @@ -237,11 +237,11 @@ export default class MockRequests { * Fulfill the Settings request. * * @param {Object} payload - * @param {number} status - * @param {Array} methods + * @param {number} [status=200] + * @param {Array} [methods=['GET']] * @return {Promise} */ - async fulfillSettings( payload, status = 200, methods = [] ) { + async fulfillSettings( payload, status = 200, methods = [ 'GET' ] ) { await this.fulfillRequest( /\/wc\/gla\/mc\/settings\b/, payload,