Skip to content

Commit

Permalink
delete staticFilters propertie because its deprecated
Browse files Browse the repository at this point in the history
  • Loading branch information
dgiannico19 authored and Fernando Colom committed Apr 3, 2024
1 parent c03cb8f commit 5a647ce
Show file tree
Hide file tree
Showing 8 changed files with 4 additions and 966 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Expand Up @@ -7,6 +7,10 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.

## [Unreleased]

### Removed

- staticFilter deprecated

## [2.124.0] - 2024-03-14

### Changed
Expand Down
2 changes: 0 additions & 2 deletions lib/deprecation-validators/index.js
Expand Up @@ -2,15 +2,13 @@

const title = require('./title-deprecation');
const titleComponents = require('./title-components-deprecation');
const staticFilters = require('./static-filters-deprecation');
const pathQuery = require('./path-query-deprecation');
// const remoteAction = require('./remoteActions-deprecation');
const attributes = require('./attributes-deprecation');

module.exports = {
title,
titleComponents,
staticFilters,
pathQuery,
attributes
// remoteAction
Expand Down
18 changes: 0 additions & 18 deletions lib/deprecation-validators/static-filters-deprecation.js

This file was deleted.

1 change: 0 additions & 1 deletion lib/schemas/common-sections/sections/orderItemsSection.js
Expand Up @@ -14,7 +14,6 @@ module.exports = {
rootComponent: { type: 'string', const: orderItemsSection },
source: { $ref: 'schemaDefinitions#/definitions/endpoint' },
sourceField: { type: 'string' },
staticFilters: { $ref: 'schemaDefinitions#/definitions/endpointParameters' },
endpointParameters: { $ref: 'schemaDefinitions#/definitions/endpointParameters' },
showPickingSessions: { type: 'boolean' },
showPurchasedItems: { type: 'boolean' },
Expand Down
1 change: 0 additions & 1 deletion lib/schemas/common/browseBase/browseBase.js
Expand Up @@ -28,7 +28,6 @@ const getBrowseBaseSchema = (isPage = false) => {
autoRefresh: { $ref: 'schemaDefinitions#/definitions/autoRefresh' },
graphs: { $ref: 'schemaDefinitions#/definitions/graphs' },
massiveActions: massiveActions(isPage),
staticFilters: getEndpointParameters(isPage),
endpointParameters: getEndpointParameters(isPage),
canExport: makeExportImportSchema(),
canImport: makeExportImportSchema(false),
Expand Down
1 change: 0 additions & 1 deletion lib/schemas/edit-new/modules/components/asyncWrapper.js
Expand Up @@ -13,7 +13,6 @@ module.exports = makeComponent({
dataMapping,
targetField,
endpointParameters,
staticFilters: endpointParameters,
source: { $ref: 'schemaDefinitions#/definitions/endpoint' },
field: { $ref: 'schemaDefinitions#/definitions/editNewField' }
},
Expand Down
10 changes: 0 additions & 10 deletions tests/deprecation-validator.js
Expand Up @@ -11,13 +11,11 @@ const titleIdentifier = fs.readFileSync(process.cwd() + '/tests/mocks/schemas/de
const titleBeforeId = fs.readFileSync(process.cwd() + '/tests/mocks/schemas/deprecated/edit-with-deprecated-title-before-id.yml');
const titleAfterId = fs.readFileSync(process.cwd() + '/tests/mocks/schemas/deprecated/edit-with-deprecated-title-after-id.yml');
const titleComponents = fs.readFileSync(process.cwd() + '/tests/mocks/schemas/deprecated/edit-with-deprecated-title-components.yml');
const staticFilters = fs.readFileSync(process.cwd() + '/tests/mocks/schemas/deprecated/edit-with-deprecated-static-filters.yml');

const deprecatedSchemaIdentifier = ymljs.parse(titleIdentifier.toString());
const deprecatedSchemaBeforeId = ymljs.parse(titleBeforeId.toString());
const deprecatedSchemaAfterId = ymljs.parse(titleAfterId.toString());
const deprecatedSchemaTitleComponents = ymljs.parse(titleComponents.toString());
const deprecatedSchemaStaticFilters = ymljs.parse(staticFilters.toString());

describe('deprecation-validator', () => {

Expand Down Expand Up @@ -72,13 +70,5 @@ describe('deprecation-validator', () => {
assert(executeSpy.calledOnce);
});

it('should find a deprecated property staticFilters', async () => {

const executeSpy = sinon.spy(deprecationValidator, 'execute');

deprecationValidator.execute(deprecatedSchemaStaticFilters);

assert(executeSpy.calledOnce);
});

});

0 comments on commit 5a647ce

Please sign in to comment.