diff --git a/tests/e2e/specs/setup-mc/step-1-accounts.test.js b/tests/e2e/specs/setup-mc/step-1-accounts.test.js index c5ed3565c0..3b7b71ecf2 100644 --- a/tests/e2e/specs/setup-mc/step-1-accounts.test.js +++ b/tests/e2e/specs/setup-mc/step-1-accounts.test.js @@ -415,12 +415,7 @@ test.describe( 'Set up accounts', () => { test.beforeAll( async () => { await setUpAccountsPage.mockAdsAccountConnected(); await setUpAccountsPage.mockMCConnected(); - - await setUpAccountsPage.fulfillAdsAccountStatus( { - has_access: true, - invite_link: '', - step: 'link_merchant', - } ); + await setUpAccountsPage.mockAdsAccountConnected(); await setUpAccountsPage.goto(); } ); diff --git a/tests/e2e/utils/mock-requests.js b/tests/e2e/utils/mock-requests.js index 9dc2e1192e..b58da25a60 100644 --- a/tests/e2e/utils/mock-requests.js +++ b/tests/e2e/utils/mock-requests.js @@ -11,6 +11,12 @@ export default class MockRequests { this.page = page; } + /** + * Fulfill a request multiple times. + * + * @param {number} times The number of times to fulfill the request. + * @return {Proxy} A proxy object to modify the behavior of the `fulfillRequest` method. + */ fulfillTimes( times ) { return new Proxy( this, { get( target, property ) { @@ -148,6 +154,7 @@ export default class MockRequests { * Fulfill the MC connection request. * * @param {Object} payload + * @return {Promise} */ async fulfillMCConnection( payload ) { await this.fulfillRequest( /\/wc\/gla\/mc\/connection\b/, payload ); @@ -207,6 +214,7 @@ export default class MockRequests { * Fulfill the Ads Connection request. * * @param {Object} payload + * @return {Promise} */ async fulfillAdsConnection( payload ) { await this.fulfillRequest( /\/wc\/gla\/ads\/connection\b/, payload );