sr-npm 1.7.360 → 1.7.362

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
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "sr-npm",
3
- "version": "1.7.360",
3
+ "version": "1.7.362",
4
4
  "description": "",
5
5
  "main": "index.js",
6
6
  "scripts": {
@@ -22,7 +22,9 @@
22
22
  "@wix/essentials": "^0.1.24",
23
23
  "@wix/secrets": "^1.0.53",
24
24
  "@wix/site-location": "^1.0.0",
25
- "@wix/site-window": "^1.0.0"
25
+ "@wix/site-window": "^1.0.0",
26
+ "jest": "^30.0.5",
27
+ "tests-utils": "^1.0.7"
26
28
  },
27
29
  "devDependencies": {
28
30
  "prettier": "^3.6.2"
@@ -330,7 +330,7 @@ async function resetFilters(_$w) {
330
330
 
331
331
  _$w('#resetFiltersButton').disable();
332
332
 
333
- queryParams.remove(["keyWord", "department","page","location"]);
333
+ queryParams.remove(["keyWord", "department","page","location","jobType"]);
334
334
 
335
335
 
336
336
  await updateCount(_$w);
@@ -0,0 +1,51 @@
1
+ const { generateUniqueId, generateBatchIds } = require('tests-utils');
2
+ const { stringifyWithFunctions, executeApiRequest } = require('tests-utils');
3
+
4
+
5
+ describe('Job details fetch from SR API Tests', () => {
6
+
7
+ beforeEach(async () => {
8
+ await cleanCollection();
9
+ });
10
+
11
+ describe('fetching job details from SR API', () => {
12
+ test('should successfully fetch job details from SR API', async () => {
13
+ const requestBody = `await fetchPositionsFromSRAPI();`;
14
+ const wixDataResponse = await executeApiRequest(requestBody);
15
+ console.log("wixDataResponse: ", wixDataResponse);
16
+
17
+ // const uniqueId = generateUniqueId();
18
+
19
+ // const items = await scheduleTask({uniqueId: uniqueId});
20
+ // expect(items.length).toBe(1);
21
+
22
+ // const taskData = items[0];
23
+ // expect(taskData.data.uniqueId).toBe(uniqueId);
24
+ // expect(taskData.type).toBe(TASK_TYPE.SCHEDULED);
25
+ // expect(taskData.status).toBe(TASK_STATUS.PENDING);
26
+ // expect(taskData.amountOfRetries).toBe(0);
27
+ // expect(taskData.parentTaskId).toBeUndefined();
28
+ // expect(taskData.name).toBe(TASKS.TEST_TASK.name);
29
+ });
30
+
31
+ // test('should return 500 error when scheduling task with invalid data', async () => {
32
+ // try {
33
+ // const response = await scheduleTask("");
34
+ // expect(response.status).not.toBe(200);
35
+
36
+ // } catch (error) {
37
+ // // Check if it's an HTTP error (from Axios) or an assertion error (from Jest)
38
+ // if (error.response) {
39
+ // // HTTP error from server
40
+ // expect(error.response.status).toBe(500);
41
+ // expect(error.response.data.message).toBe('[insertNewTask] Failed for Task TestTask with error [insertNewTask] Invalid params: {\"name\":\"TestTask\",\"data\":\"\",\"type\":\"scheduled\"}');
42
+ // } else {
43
+ // // Re-throw assertion errors or other unexpected errors
44
+ // throw error;
45
+ // }
46
+ // }
47
+ // });
48
+ });
49
+
50
+
51
+ });