[ACS-6107] Updated default configuration for date-range component to be compatible with the new advanced search date range component (#3532)

* [ACS-6107] Updated default configuraiton for date-range component in extensions to match the required config for the new date range component

* [ACS-6107] Updated E2Es to remove references to old date-range component

* [ACS-6107] Restored missing column key
This commit is contained in:
swapnil-verma-gl 2023-12-26 11:14:33 +05:30 committed by GitHub
parent 373a41bd16
commit 339dc60d6d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
6 changed files with 17 additions and 44 deletions

View File

@ -1037,8 +1037,11 @@
"selector": "date-range", "selector": "date-range",
"settings": { "settings": {
"field": "cm:created", "field": "cm:created",
"dateFormat": "DD-MMM-YY", "dateFormat": "dd-MMM-yy",
"maxDate": "today" "maxDate": "today",
"displayedLabelsByField": {
"cm:created": "SEARCH.SEARCH_HEADER.FILTERS.DATE.TITLE"
}
} }
} }
} }

View File

@ -73,7 +73,6 @@ describe('Search filters', () => {
const { dataTable, filters, toolbar } = page; const { dataTable, filters, toolbar } = page;
const fileTypeFilter = filters.fileType; const fileTypeFilter = filters.fileType;
const createdDateFilter = filters.createdDate;
const peopleFilter = filters.people; const peopleFilter = filters.people;
const locationFilter = filters.location; const locationFilter = filters.location;
const modifiedDateFilter = filters.modifiedDate; const modifiedDateFilter = filters.modifiedDate;
@ -111,7 +110,6 @@ describe('Search filters', () => {
}); });
it('[C279186] Filters are displayed', async () => { it('[C279186] Filters are displayed', async () => {
expect(await createdDateFilter.isDisplayed()).toBe(true, 'Created date filter panel not displayed');
expect(await fileTypeFilter.isDisplayed()).toBe(true, 'File type filter panel not displayed'); expect(await fileTypeFilter.isDisplayed()).toBe(true, 'File type filter panel not displayed');
expect(await peopleFilter.isDisplayed()).toBe(true, 'People filter panel not displayed'); expect(await peopleFilter.isDisplayed()).toBe(true, 'People filter panel not displayed');
expect(await locationFilter.isDisplayed()).toBe(true, 'Location filter panel not displayed'); expect(await locationFilter.isDisplayed()).toBe(true, 'Location filter panel not displayed');

View File

@ -1459,7 +1459,7 @@
"name": "SEARCH.CATEGORIES.DATE", "name": "SEARCH.CATEGORIES.DATE",
"enabled": true, "enabled": true,
"component": { "component": {
"selector": "date-range-advanced", "selector": "date-range",
"settings": { "settings": {
"field": "cm:created,cm:modified", "field": "cm:created,cm:modified",
"dateFormat": "dd-MMM-yy", "dateFormat": "dd-MMM-yy",
@ -1649,7 +1649,7 @@
"name": "SEARCH.CATEGORIES.DATE", "name": "SEARCH.CATEGORIES.DATE",
"enabled": true, "enabled": true,
"component": { "component": {
"selector": "date-range-advanced", "selector": "date-range",
"settings": { "settings": {
"field": "cm:created", "field": "cm:created",
"dateFormat": "dd-MMM-yy", "dateFormat": "dd-MMM-yy",
@ -1786,7 +1786,7 @@
"name": "SEARCH.CATEGORIES.DATE", "name": "SEARCH.CATEGORIES.DATE",
"enabled": true, "enabled": true,
"component": { "component": {
"selector": "date-range-advanced", "selector": "date-range",
"settings": { "settings": {
"allowUpdateOnChange": false, "allowUpdateOnChange": false,
"hideDefaultAction": true, "hideDefaultAction": true,
@ -1810,12 +1810,15 @@
"allowUpdateOnChange": false, "allowUpdateOnChange": false,
"hideDefaultAction": true, "hideDefaultAction": true,
"field": "cm:from", "field": "cm:from",
"dateFormat": "DD-MMM-YY" "dateFormat": "dd-MMM-yy",
"displayedLabelsByField": {
"cm:created": "SEARCH.CATEGORIES.EFFECTIVITY_FROM"
}
} }
} }
}, },
{ {
"id": "createdDateRange", "id": "effectivnessTo",
"name": "SEARCH.CATEGORIES.EFFECTIVITY_TO", "name": "SEARCH.CATEGORIES.EFFECTIVITY_TO",
"enabled": true, "enabled": true,
"component": { "component": {
@ -1824,7 +1827,10 @@
"allowUpdateOnChange": false, "allowUpdateOnChange": false,
"hideDefaultAction": true, "hideDefaultAction": true,
"field": "cm:to", "field": "cm:to",
"dateFormat": "DD-MMM-YY" "dateFormat": "dd-MMM-yy",
"displayedLabelsByField": {
"cm:created": "SEARCH.CATEGORIES.EFFECTIVITY_FROM"
}
} }
} }
} }

View File

@ -1,31 +0,0 @@
/*!
* Copyright © 2005-2023 Hyland Software, Inc. and its affiliates. All rights reserved.
*
* Alfresco Example Content Application
*
* This file is part of the Alfresco Example Content Application.
* If the software was purchased under a paid Alfresco license, the terms of
* the paid license agreement will prevail. Otherwise, the software is
* provided under the following open source license terms:
*
* The Alfresco Example Content Application is free software: you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* The Alfresco Example Content Application is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public License
* along with Alfresco. If not, see <http://www.gnu.org/licenses/>.
*/
import { GenericFilter } from './generic-filter';
export class CreatedDateFilter extends GenericFilter {
constructor() {
super('Created date');
}
}

View File

@ -23,7 +23,6 @@
*/ */
export * from './filters/autocomplete-chips-filter'; export * from './filters/autocomplete-chips-filter';
export * from './filters/created-date-filter';
export * from './filters/facet-filter'; export * from './filters/facet-filter';
export * from './filters/generic-filter'; export * from './filters/generic-filter';
export * from './filters/properties-filter'; export * from './filters/properties-filter';

View File

@ -24,7 +24,6 @@
import { by, browser } from 'protractor'; import { by, browser } from 'protractor';
import { Component } from '../component'; import { Component } from '../component';
import { CreatedDateFilter } from './filters/created-date-filter';
import { FacetFilter } from './filters/facet-filter'; import { FacetFilter } from './filters/facet-filter';
import { AutocompleteChipsFilter } from './filters/autocomplete-chips-filter'; import { AutocompleteChipsFilter } from './filters/autocomplete-chips-filter';
import { PropertiesFilter } from './filters/properties-filter'; import { PropertiesFilter } from './filters/properties-filter';
@ -33,7 +32,6 @@ import { FacetTabbedFilter } from './filters/facet-tabbed-filter';
export class SearchFilters extends Component { export class SearchFilters extends Component {
resetAllButton = browser.element(by.css('button[adf-reset-search]')); resetAllButton = browser.element(by.css('button[adf-reset-search]'));
createdDate = new CreatedDateFilter();
fileType = new PropertiesFilter(); fileType = new PropertiesFilter();
people = new FacetTabbedFilter('People'); people = new FacetTabbedFilter('People');
location = new AutocompleteChipsFilter('Location'); location = new AutocompleteChipsFilter('Location');