sr-npm 1.7.440 → 1.7.442
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/package.json
CHANGED
|
@@ -4,24 +4,21 @@ const { getRandomPosition, executeRequestAndTest } = require('./testsUtils');
|
|
|
4
4
|
describe('Job details fetch from SR API Tests', async () => {
|
|
5
5
|
|
|
6
6
|
const templateTypes = [
|
|
7
|
-
{
|
|
8
|
-
{
|
|
7
|
+
{ templatename: 'External', templateType: 'PUBLIC'},
|
|
8
|
+
{ templatename: 'Internal', templateType: 'INTERNAL'}
|
|
9
9
|
];
|
|
10
10
|
|
|
11
|
-
templateTypes.forEach(({ templateType }) => {
|
|
12
|
-
describe(`Job details fetch from SR API Tests - ${
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
await executeApiRequest(markTemplateAsRequestBody);
|
|
16
|
-
}
|
|
17
|
-
catch(error){
|
|
18
|
-
console.error(`Error marking template as ${templateType}:`, error);
|
|
19
|
-
throw error;
|
|
20
|
-
}
|
|
21
|
-
const fetchPositionsFromSRAPIRequestBody = `fetchPositionsFromSRAPI();`;
|
|
22
|
-
const positions = await executeApiRequest(fetchPositionsFromSRAPIRequestBody);
|
|
11
|
+
templateTypes.forEach(({ templateType ,templatename}) => {
|
|
12
|
+
describe(`Job details fetch from SR API Tests - ${templatename}`, () => {
|
|
13
|
+
let positions;
|
|
14
|
+
beforeAll(async () => {
|
|
23
15
|
|
|
24
|
-
|
|
16
|
+
const fetchPositionsFromSRAPIRequestBody = `fetchPositionsFromSRAPI({companyId:'WixTest',templateType: '${templateType}'});`;
|
|
17
|
+
positions = await executeApiRequest(fetchPositionsFromSRAPIRequestBody);
|
|
18
|
+
});
|
|
19
|
+
|
|
20
|
+
|
|
21
|
+
test(`should successfully fetch job details from SR API (${templatename})`, async () => {
|
|
25
22
|
const randomPosition = getRandomPosition(positions.data.result.content);
|
|
26
23
|
expect(positions.data.result.totalFound).toBeGreaterThan(0);
|
|
27
24
|
expect(positions.data.result.content.length).toBeGreaterThan(0);
|
|
@@ -32,7 +29,7 @@ describe('Job details fetch from SR API Tests', async () => {
|
|
|
32
29
|
expect(randomPosition.department).toBeDefined();
|
|
33
30
|
});
|
|
34
31
|
|
|
35
|
-
test(`should successfully fetch job description from SR API (${
|
|
32
|
+
test(`should successfully fetch job description from SR API (${templatename})`, async () => {
|
|
36
33
|
const randomPosition = getRandomPosition(positions.data.result.content);
|
|
37
34
|
const fetchJobDescriptionRequestBody = `fetchJobDescription(${randomPosition.id});`;
|
|
38
35
|
const jobFetchResponse = await executeApiRequest(fetchJobDescriptionRequestBody);
|