Skip to content

Commit

Permalink
Merge branch 'feature/2567-kickoff-mc-ads-account-creation' into upda…
Browse files Browse the repository at this point in the history
…te/2582-claim-ads-account
  • Loading branch information
ankitrox committed Oct 25, 2024
2 parents d9a7a86 + 8d381c4 commit c5c0187
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 6 deletions.
7 changes: 1 addition & 6 deletions tests/e2e/specs/setup-mc/step-1-accounts.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -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();
} );
Expand Down
8 changes: 8 additions & 0 deletions tests/e2e/utils/mock-requests.js
Original file line number Diff line number Diff line change
Expand Up @@ -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 ) {
Expand Down Expand Up @@ -148,6 +154,7 @@ export default class MockRequests {
* Fulfill the MC connection request.
*
* @param {Object} payload
* @return {Promise<void>}
*/
async fulfillMCConnection( payload ) {
await this.fulfillRequest( /\/wc\/gla\/mc\/connection\b/, payload );
Expand Down Expand Up @@ -207,6 +214,7 @@ export default class MockRequests {
* Fulfill the Ads Connection request.
*
* @param {Object} payload
* @return {Promise<void>}
*/
async fulfillAdsConnection( payload ) {
await this.fulfillRequest( /\/wc\/gla\/ads\/connection\b/, payload );
Expand Down

0 comments on commit c5c0187

Please sign in to comment.