sr-npm 1.7.374 → 1.7.376

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.
package/backend/data.js CHANGED
@@ -340,6 +340,7 @@ async function referenceJobs() {
340
340
 
341
341
  async function syncJobsFast() {
342
342
  console.log("Syncing jobs fast");
343
+ console.log("creating company id collection and filling it with the company ID");
343
344
  await createCompanyIdCollectionAndFillIt();
344
345
  await createCollections();
345
346
  await clearCollections();
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "sr-npm",
3
- "version": "1.7.374",
3
+ "version": "1.7.376",
4
4
  "description": "",
5
5
  "main": "index.js",
6
6
  "scripts": {
@@ -2,13 +2,17 @@ const { executeApiRequest } = require('tests-utils');
2
2
  const { getRandomPosition } = require('./testsUtils');
3
3
 
4
4
  describe('Job details fetch from SR API Tests', () => {
5
+
6
+ let positions;
7
+ beforeAll(async () => {
8
+ const requestBody = `fetchPositionsFromSRAPI();`;
9
+ positions = await executeApiRequest(requestBody);
10
+ });
5
11
 
6
12
  test('should successfully fetch job details from SR API', async () => {
7
- const requestBody = `fetchPositionsFromSRAPI();`;
8
- const fetchJobsResponse = await executeApiRequest(requestBody);
9
- const randomPosition = getRandomPosition(fetchJobsResponse.data.result.content);
10
- expect(fetchJobsResponse.data.result.totalFound).toBeGreaterThan(0);
11
- expect(fetchJobsResponse.data.result.content.length).toBeGreaterThan(0);
13
+ const randomPosition = getRandomPosition(positions.data.result.content);
14
+ expect(positions.data.result.totalFound).toBeGreaterThan(0);
15
+ expect(positions.data.result.content.length).toBeGreaterThan(0);
12
16
  expect(randomPosition.id.length).toBeGreaterThan(0);
13
17
  expect(randomPosition.name.length).toBeGreaterThan(0);
14
18
  expect(randomPosition.jobAdId.length).toBeGreaterThan(0);
@@ -17,8 +21,6 @@ describe('Job details fetch from SR API Tests', () => {
17
21
  });
18
22
 
19
23
  test('should successfully fetch job description from SR API', async () => {
20
- const fetchPositionsRequestBody = `fetchPositionsFromSRAPI();`;
21
- const positions = await executeApiRequest(fetchPositionsRequestBody);
22
24
  const randomPosition = getRandomPosition(positions.data.result.content);
23
25
  const fetchJobDescriptionRequestBody = `fetchJobDescription(${randomPosition.id});`;
24
26
  const jobFetchResponse = await executeApiRequest(fetchJobDescriptionRequestBody);