sr-npm 1.7.371 → 1.7.372
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -42,7 +42,7 @@ async function fetchPositionsFromSRAPI() {
|
|
|
42
42
|
page++;
|
|
43
43
|
|
|
44
44
|
// Build the API path - first request has no page parameter, subsequent use nextPageId
|
|
45
|
-
const apiPath = `/v1/companies/${companyId
|
|
45
|
+
const apiPath = `/v1/companies/${companyId}/postings?offset=${offset}`;
|
|
46
46
|
|
|
47
47
|
console.log(`Fetching page ${page} with path: ${apiPath}`);
|
|
48
48
|
const response = await makeSmartRecruitersRequest(apiPath);
|
package/package.json
CHANGED
|
@@ -7,7 +7,6 @@ describe('Job details fetch from SR API Tests', () => {
|
|
|
7
7
|
const requestBody = `fetchPositionsFromSRAPI();`;
|
|
8
8
|
const fetchJobsResponse = await executeApiRequest(requestBody);
|
|
9
9
|
const randomPosition = getRandomPosition(fetchJobsResponse.data.result.content);
|
|
10
|
-
console.log("randomPosition: ", randomPosition);
|
|
11
10
|
expect(fetchJobsResponse.data.result.totalFound).toBeGreaterThan(0);
|
|
12
11
|
expect(fetchJobsResponse.data.result.content.length).toBeGreaterThan(0);
|
|
13
12
|
expect(randomPosition.id.length).toBeGreaterThan(0);
|
|
@@ -23,7 +22,6 @@ describe('Job details fetch from SR API Tests', () => {
|
|
|
23
22
|
const randomPosition = getRandomPosition(positions.data.result.content);
|
|
24
23
|
const fetchJobDescriptionRequestBody = `fetchJobDescription(${randomPosition.id});`;
|
|
25
24
|
const jobFetchResponse = await executeApiRequest(fetchJobDescriptionRequestBody);
|
|
26
|
-
console.log("jobFetchResponse: ", jobFetchResponse.data.result);
|
|
27
25
|
expect(jobFetchResponse.data.result.id).toBe(randomPosition.id);
|
|
28
26
|
expect(jobFetchResponse.data.result.jobAd.sections.jobDescription).toBeDefined();
|
|
29
27
|
expect(jobFetchResponse.data.result.jobAd.sections.jobDescription.text.length).toBeGreaterThan(0);
|