Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

delete staticFilters propertie because its deprecated #296

Merged
merged 1 commit into from
Apr 3, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
2 changes: 0 additions & 2 deletions lib/deprecation-validators/index.js
Original file line number Diff line number Diff line change
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
Original file line number Diff line number Diff line change
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
Original file line number Diff line number Diff line change
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
Original file line number Diff line number Diff line change
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
Original file line number Diff line number Diff line change
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);
});

});