-
Notifications
You must be signed in to change notification settings - Fork 113
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore: added component test cases for desitnations part3 (#2927)
* chore: added component test cases for desitnations * chore: added component test cases for wootric
- Loading branch information
Showing
30 changed files
with
12,323 additions
and
10,231 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -14,13 +14,8 @@ const gainsightRequestHandler = require("./gainsight.mock"); | |
const mailchimpGetRequestHandler = require("./mailchimp.mock"); | ||
const yahooDspPostRequestHandler = require("./yahoo_dsp.mock"); | ||
const { gainsightPXGetRequestHandler } = require("./gainsight_px.mock"); | ||
const { hsGetRequestHandler, hsPostRequestHandler } = require("./hs.mock"); | ||
const profitwellGetRequestHandler = require("./profitwell.mock"); | ||
const cannyPostRequestHandler = require("./canny.mock"); | ||
const { | ||
wootricGetRequestHandler, | ||
wootricPostRequestHandler | ||
} = require("./wootric.mock"); | ||
const { userGetRequestHandler, userPutRequestHandler } = require("./user.mock"); | ||
const { mixpanelPostRequestHandler } = require("./mixpanel.mock"); | ||
const { mondayPostRequestHandler } = require("./monday.mock"); | ||
|
@@ -29,7 +24,6 @@ const { sendinblueGetRequestHandler } = require("./sendinblue.mock"); | |
const { courierGetRequestHandler } = require("./courier.mock"); | ||
|
||
const urlDirectoryMap = { | ||
"api.hubapi.com": "hs", | ||
"zendesk.com": "zendesk", | ||
"salesforce.com": "salesforce", | ||
"mktorest.com": "marketo", | ||
|
@@ -94,16 +88,22 @@ function get(url, options) { | |
if (url.includes("https://a.klaviyo.com/api/v2/people/search")) { | ||
return klaviyoGetRequestHandler(getParamEncodedUrl(url, options)); | ||
} | ||
if (url.includes("https://api.hubapi.com")) { | ||
return hsGetRequestHandler(url, mockData); | ||
} | ||
if (url.includes("https://api.profitwell.com")) { | ||
return profitwellGetRequestHandler(url, mockData); | ||
} | ||
if (url.includes("https://api.wootric.com")) { | ||
return new Promise((resolve, reject) => { | ||
resolve(wootricGetRequestHandler(url)); | ||
}); | ||
if ( | ||
url.includes( | ||
"https://api.getdrip.com/v2/1809802/subscribers/[email protected]" | ||
) | ||
) { | ||
return Promise.resolve({ status: 200 }); | ||
} | ||
if ( | ||
url.includes( | ||
"https://api.getdrip.com/v2/1809802/subscribers/[email protected]" | ||
) | ||
) { | ||
return Promise.reject({ status: 404 }); | ||
} | ||
if (url.includes("https://commander.user.com")) { | ||
return new Promise((resolve, reject) => { | ||
|
@@ -164,14 +164,6 @@ function post(url, payload) { | |
resolve(cannyPostRequestHandler(url)); | ||
}); | ||
} | ||
if (url.includes("https://api.hubapi.com")) { | ||
return hsPostRequestHandler(payload, mockData); | ||
} | ||
if (url.includes("https://api.wootric.com")) { | ||
return new Promise((resolve, reject) => { | ||
resolve(wootricPostRequestHandler(url, payload)); | ||
}); | ||
} | ||
if ( | ||
url.includes("https://api.mixpanel.com/engage/") || | ||
url.includes("https://api-eu.mixpanel.com/engage/") | ||
|
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.