sr-npm 1.7.797 → 1.7.799

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.797",
3
+ "version": "1.7.799",
4
4
  "description": "",
5
5
  "main": "index.js",
6
6
  "scripts": {
@@ -1,7 +1,7 @@
1
1
  const { COLLECTIONS,CUSTOM_VALUES_COLLECTION_FIELDS,JOBS_COLLECTION_FIELDS } = require('../backend/collectionConsts');
2
2
  const { queryParams} = require('wix-location-frontend');
3
3
  const { location } = require("@wix/site-location");
4
- const {CAREERS_MULTI_BOXES_PAGE_CONSTS,FiltersIds,fieldTitlesInCMS,CATEGORY_CUSTOM_FIELD_ID_IN_CMS} = require('../backend/careersMultiBoxesPageIds');
4
+ const {CAREERS_MULTI_BOXES_PAGE_CONSTS,FiltersIds,fieldTitlesInCMS} = require('../backend/careersMultiBoxesPageIds');
5
5
  const { groupValuesByField, debounce, getAllRecords, getFieldById, getFieldByTitle,getCorrectOption,getOptionIndexFromCheckBox,loadPrimarySearchRepeater,bindPrimarySearch,primarySearch } = require('./pagesUtils');
6
6
 
7
7
  let dontUpdateThisCheckBox;
@@ -1,6 +1,7 @@
1
1
  const { items: wixData } = require('@wix/data');
2
2
  const { JOBS_COLLECTION_FIELDS } = require('../backend/collectionConsts');
3
- const { CAREERS_MULTI_BOXES_PAGE_CONSTS } = require('../backend/careersMultiBoxesPageIds');
3
+ const { CAREERS_MULTI_BOXES_PAGE_CONSTS,CATEGORY_CUSTOM_FIELD_ID_IN_CMS } = require('../backend/careersMultiBoxesPageIds');
4
+ const { location } = require("@wix/site-location");
4
5
 
5
6
  function groupValuesByField(values, refKey) {
6
7
  const map = new Map();
@@ -28,13 +28,14 @@ Module.prototype.require = function(id) {
28
28
  };
29
29
 
30
30
  const careersMultiBoxesPage = rewire('../pages/careersMultiBoxesPage');
31
+ const pagesUtils = rewire('../pages/pagesUtils');
31
32
 
32
33
  // Restore original require
33
34
  Module.prototype.require = originalRequire;
34
35
 
35
36
  const secondarySearch = careersMultiBoxesPage.__get__('secondarySearch');
36
- const primarySearch = careersMultiBoxesPage.__get__('primarySearch');
37
- const loadCategoriesListPrimarySearch = careersMultiBoxesPage.__get__('loadCategoriesListPrimarySearch');
37
+ const primarySearch = pagesUtils.__get__('primarySearch');
38
+ const loadCategoriesListPrimarySearch = pagesUtils.__get__('loadCategoriesListPrimarySearch');
38
39
 
39
40
 
40
41
 
@@ -165,7 +166,7 @@ describe('primarySearch function tests', () => {
165
166
  });
166
167
  careersMultiBoxesPage.__set__('alljobs', mockJobs);
167
168
 
168
- await primarySearch(mockW, 'product');
169
+ await primarySearch(mockW, 'product',mockJobs);
169
170
 
170
171
  expect(mockprimarySearchMultiBox.changeState).toHaveBeenCalledWith('jobResults');
171
172
  expect(mockprimarySearcJobResult.data).toHaveLength(11);
@@ -178,7 +179,7 @@ describe('primarySearch function tests', () => {
178
179
  });
179
180
  careersMultiBoxesPage.__set__('alljobs', mockJobs);
180
181
 
181
- await primarySearch(mockW, 'unicorn hunter');
182
+ await primarySearch(mockW, 'unicorn hunter',mockJobs);
182
183
 
183
184
  expect(mockprimarySearchMultiBox.changeState).toHaveBeenCalledWith('noResults');
184
185
  expect(mockprimarySearcJobResult.data).toBeNull();
@@ -193,7 +194,7 @@ describe('primarySearch function tests', () => {
193
194
 
194
195
  careersMultiBoxesPage.__set__('allvaluesobjects', mockCategoryValues);
195
196
 
196
- await loadCategoriesListPrimarySearch(mockW);
197
+ await loadCategoriesListPrimarySearch(mockW,mockCategoryValues);
197
198
 
198
199
  expect(mockprimarySearchMultiBox.changeState).toHaveBeenCalledWith('categoryResults');
199
200
  expect(mockCategoryResultsRepeater.data).toHaveLength(3);