From 339dc60d6d64e13f8cf56408f5472e4baed7a77a Mon Sep 17 00:00:00 2001 From: swapnil-verma-gl <92505353+swapnil-verma-gl@users.noreply.github.com> Date: Tue, 26 Dec 2023 11:14:33 +0530 Subject: [PATCH] [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 --- app/src/app.config.json | 7 +++-- .../suites/search/search-filters.test.ts | 2 -- .../aca-content/assets/app.extensions.json | 18 +++++++---- .../search/filters/created-date-filter.ts | 31 ------------------- .../src/components/search/index.ts | 1 - .../src/components/search/search-filters.ts | 2 -- 6 files changed, 17 insertions(+), 44 deletions(-) diff --git a/app/src/app.config.json b/app/src/app.config.json index c28817d8e8..a81a4f88e5 100644 --- a/app/src/app.config.json +++ b/app/src/app.config.json @@ -1037,8 +1037,11 @@ "selector": "date-range", "settings": { "field": "cm:created", - "dateFormat": "DD-MMM-YY", - "maxDate": "today" + "dateFormat": "dd-MMM-yy", + "maxDate": "today", + "displayedLabelsByField": { + "cm:created": "SEARCH.SEARCH_HEADER.FILTERS.DATE.TITLE" + } } } } diff --git a/e2e/protractor/suites/search/search-filters.test.ts b/e2e/protractor/suites/search/search-filters.test.ts index 06516a33cb..ee1725dc5e 100644 --- a/e2e/protractor/suites/search/search-filters.test.ts +++ b/e2e/protractor/suites/search/search-filters.test.ts @@ -73,7 +73,6 @@ describe('Search filters', () => { const { dataTable, filters, toolbar } = page; const fileTypeFilter = filters.fileType; - const createdDateFilter = filters.createdDate; const peopleFilter = filters.people; const locationFilter = filters.location; const modifiedDateFilter = filters.modifiedDate; @@ -111,7 +110,6 @@ describe('Search filters', () => { }); 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 peopleFilter.isDisplayed()).toBe(true, 'People filter panel not displayed'); expect(await locationFilter.isDisplayed()).toBe(true, 'Location filter panel not displayed'); diff --git a/projects/aca-content/assets/app.extensions.json b/projects/aca-content/assets/app.extensions.json index 6469d51f20..2dabdbafa4 100644 --- a/projects/aca-content/assets/app.extensions.json +++ b/projects/aca-content/assets/app.extensions.json @@ -1459,7 +1459,7 @@ "name": "SEARCH.CATEGORIES.DATE", "enabled": true, "component": { - "selector": "date-range-advanced", + "selector": "date-range", "settings": { "field": "cm:created,cm:modified", "dateFormat": "dd-MMM-yy", @@ -1649,7 +1649,7 @@ "name": "SEARCH.CATEGORIES.DATE", "enabled": true, "component": { - "selector": "date-range-advanced", + "selector": "date-range", "settings": { "field": "cm:created", "dateFormat": "dd-MMM-yy", @@ -1786,7 +1786,7 @@ "name": "SEARCH.CATEGORIES.DATE", "enabled": true, "component": { - "selector": "date-range-advanced", + "selector": "date-range", "settings": { "allowUpdateOnChange": false, "hideDefaultAction": true, @@ -1810,12 +1810,15 @@ "allowUpdateOnChange": false, "hideDefaultAction": true, "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", "enabled": true, "component": { @@ -1824,7 +1827,10 @@ "allowUpdateOnChange": false, "hideDefaultAction": true, "field": "cm:to", - "dateFormat": "DD-MMM-YY" + "dateFormat": "dd-MMM-yy", + "displayedLabelsByField": { + "cm:created": "SEARCH.CATEGORIES.EFFECTIVITY_FROM" + } } } } diff --git a/projects/aca-testing-shared/src/components/search/filters/created-date-filter.ts b/projects/aca-testing-shared/src/components/search/filters/created-date-filter.ts index 44ca03409c..e69de29bb2 100755 --- a/projects/aca-testing-shared/src/components/search/filters/created-date-filter.ts +++ b/projects/aca-testing-shared/src/components/search/filters/created-date-filter.ts @@ -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 . - */ - -import { GenericFilter } from './generic-filter'; - -export class CreatedDateFilter extends GenericFilter { - constructor() { - super('Created date'); - } -} diff --git a/projects/aca-testing-shared/src/components/search/index.ts b/projects/aca-testing-shared/src/components/search/index.ts index ac60627bf2..23b64e49f8 100644 --- a/projects/aca-testing-shared/src/components/search/index.ts +++ b/projects/aca-testing-shared/src/components/search/index.ts @@ -23,7 +23,6 @@ */ export * from './filters/autocomplete-chips-filter'; -export * from './filters/created-date-filter'; export * from './filters/facet-filter'; export * from './filters/generic-filter'; export * from './filters/properties-filter'; diff --git a/projects/aca-testing-shared/src/components/search/search-filters.ts b/projects/aca-testing-shared/src/components/search/search-filters.ts index 7ea60a9091..e43ec7db98 100755 --- a/projects/aca-testing-shared/src/components/search/search-filters.ts +++ b/projects/aca-testing-shared/src/components/search/search-filters.ts @@ -24,7 +24,6 @@ import { by, browser } from 'protractor'; import { Component } from '../component'; -import { CreatedDateFilter } from './filters/created-date-filter'; import { FacetFilter } from './filters/facet-filter'; import { AutocompleteChipsFilter } from './filters/autocomplete-chips-filter'; import { PropertiesFilter } from './filters/properties-filter'; @@ -33,7 +32,6 @@ import { FacetTabbedFilter } from './filters/facet-tabbed-filter'; export class SearchFilters extends Component { resetAllButton = browser.element(by.css('button[adf-reset-search]')); - createdDate = new CreatedDateFilter(); fileType = new PropertiesFilter(); people = new FacetTabbedFilter('People'); location = new AutocompleteChipsFilter('Location');