mirror of
https://github.com/Alfresco/alfresco-ng2-components.git
synced 2026-09-09 18:03:21 +00:00
[ACS-5041] update license headers to reflect hyland copyright guidelines (#8472)
* ACS-5041 Changed json to js * ACS-5041 Corrected paths * ACS-5041 Changed json to js * ACS-5041 Updated eslintrc * ACS-5041 Small correction * ACS-5041 Small correction * ACS-5041 Updated license headers * ACS-5041 Updated license headers * ACS-5041 Replaced references to alfresco * ACS-5041 Added Hyland to known words * ACS-5041 Fixed coverage issue * ACS-5041 Fixed duplication issue * ACS-5041 Fixed duplications issue * ACS-5041 Fixed duplications issue * ACS-5041 Fixed duplications issue * ACS-5041 Fixed duplications issue * ACS-5041 Fixed duplications issue * ACS-5041 Fixed duplications issue * ACS-5041 Fixed duplications issue * ACS-5041 Fixed duplications issue * ACS-5041 Fixed test * ACS-5041 Fixed test * ACS-5041 Reverted one change * ACS-5041 Added missing license to files after rebase
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
/*!
|
||||
* @license
|
||||
* Copyright 2019 Alfresco Software, Ltd.
|
||||
* Copyright © 2005-2023 Hyland Software, Inc. and its affiliates. All rights reserved.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
@@ -44,16 +44,16 @@ describe('Search Sorting Picker', () => {
|
||||
const acsUser = new UserModel();
|
||||
|
||||
const pngAModel = {
|
||||
'name': browser.params.resources.Files.ADF_DOCUMENTS.PNG.file_name,
|
||||
'location': browser.params.resources.Files.ADF_DOCUMENTS.PNG.file_path
|
||||
name: browser.params.resources.Files.ADF_DOCUMENTS.PNG.file_name,
|
||||
location: browser.params.resources.Files.ADF_DOCUMENTS.PNG.file_path
|
||||
};
|
||||
|
||||
const pngDModel = {
|
||||
'name': browser.params.resources.Files.ADF_DOCUMENTS.PNG_D.file_name,
|
||||
'location': browser.params.resources.Files.ADF_DOCUMENTS.PNG_D.file_path
|
||||
name: browser.params.resources.Files.ADF_DOCUMENTS.PNG_D.file_name,
|
||||
location: browser.params.resources.Files.ADF_DOCUMENTS.PNG_D.file_path
|
||||
};
|
||||
|
||||
let pngA, pngD;
|
||||
let pngA; let pngD;
|
||||
const apiService = createApiService();
|
||||
|
||||
const uploadActions = new UploadActions(apiService);
|
||||
@@ -63,6 +63,26 @@ describe('Search Sorting Picker', () => {
|
||||
const search = '_png_file.png';
|
||||
let jsonFile;
|
||||
|
||||
const checkSortingDropdownIsDisplayed = async (key = 'Modifier', label = 'Modifier') => {
|
||||
await navigationBarPage.navigateToContentServices();
|
||||
jsonFile = SearchConfiguration.getConfiguration();
|
||||
jsonFile.sorting.options.push({
|
||||
key,
|
||||
label,
|
||||
type: 'FIELD',
|
||||
field: 'cm:modifier',
|
||||
ascending: true
|
||||
});
|
||||
await LocalStorageUtil.setConfigField('search', JSON.stringify(jsonFile));
|
||||
|
||||
await searchBarPage.checkSearchIconIsVisible();
|
||||
await searchBarPage.clickOnSearchIcon();
|
||||
await searchBarPage.enterTextAndPressEnter(search);
|
||||
await searchResults.dataTable.waitTillContentLoaded();
|
||||
|
||||
await searchSortingPicker.checkSortingDropdownIsDisplayed();
|
||||
};
|
||||
|
||||
beforeAll(async () => {
|
||||
await apiService.loginWithProfile('admin');
|
||||
await usersActions.createUser(acsUser);
|
||||
@@ -102,23 +122,7 @@ describe('Search Sorting Picker', () => {
|
||||
});
|
||||
|
||||
it('[C277271] Should be able to add a custom search sorter in the "sort by" option', async () => {
|
||||
await navigationBarPage.navigateToContentServices();
|
||||
jsonFile = SearchConfiguration.getConfiguration();
|
||||
jsonFile.sorting.options.push({
|
||||
'key': 'Modifier',
|
||||
'label': 'Modifier',
|
||||
'type': 'FIELD',
|
||||
'field': 'cm:modifier',
|
||||
'ascending': true
|
||||
});
|
||||
await LocalStorageUtil.setConfigField('search', JSON.stringify(jsonFile));
|
||||
|
||||
await searchBarPage.checkSearchIconIsVisible();
|
||||
await searchBarPage.clickOnSearchIcon();
|
||||
await searchBarPage.enterTextAndPressEnter(search);
|
||||
await searchResults.dataTable.waitTillContentLoaded();
|
||||
|
||||
await searchSortingPicker.checkSortingDropdownIsDisplayed();
|
||||
await checkSortingDropdownIsDisplayed();
|
||||
await searchSortingPicker.clickSortingDropdown();
|
||||
await searchSortingPicker.checkOptionsDropdownIsDisplayed();
|
||||
await searchSortingPicker.checkOptionIsDisplayed('Modifier');
|
||||
@@ -147,11 +151,11 @@ describe('Search Sorting Picker', () => {
|
||||
jsonFile = SearchConfiguration.getConfiguration();
|
||||
jsonFile.sorting.options[0].ascending = false;
|
||||
jsonFile.sorting.defaults[0] = {
|
||||
'key': 'Size',
|
||||
'label': 'Size',
|
||||
'type': 'FIELD',
|
||||
'field': 'content.size',
|
||||
'ascending': true
|
||||
key: 'Size',
|
||||
label: 'Size',
|
||||
type: 'FIELD',
|
||||
field: 'content.size',
|
||||
ascending: true
|
||||
};
|
||||
|
||||
await LocalStorageUtil.setConfigField('search', JSON.stringify(jsonFile));
|
||||
@@ -196,24 +200,7 @@ describe('Search Sorting Picker', () => {
|
||||
});
|
||||
|
||||
it('[C277288] Should be able to sort the search results by "Modified Date" ASC', async () => {
|
||||
await navigationBarPage.navigateToContentServices();
|
||||
|
||||
jsonFile = SearchConfiguration.getConfiguration();
|
||||
jsonFile.sorting.options.push({
|
||||
'key': 'Modified Date',
|
||||
'label': 'Modified Date',
|
||||
'type': 'FIELD',
|
||||
'field': 'cm:modified',
|
||||
'ascending': true
|
||||
});
|
||||
await LocalStorageUtil.setConfigField('search', JSON.stringify(jsonFile));
|
||||
|
||||
await searchBarPage.checkSearchIconIsVisible();
|
||||
await searchBarPage.clickOnSearchIcon();
|
||||
await searchBarPage.enterTextAndPressEnter(search);
|
||||
await searchResults.dataTable.waitTillContentLoaded();
|
||||
|
||||
await searchSortingPicker.checkSortingDropdownIsDisplayed();
|
||||
await checkSortingDropdownIsDisplayed('Modified Date', 'Modified Date');
|
||||
await searchSortingPicker.sortBy('ASC', 'Modified Date');
|
||||
|
||||
const idList = await contentServices.getElementsDisplayedId();
|
||||
@@ -229,7 +216,7 @@ describe('Search Sorting Picker', () => {
|
||||
await expect(contentServices.checkElementsDateSortedAsc(modifiedDateList)).toBe(true);
|
||||
});
|
||||
|
||||
const getNodesDisplayed = async function (numberOfElements: number, idList: string[]) {
|
||||
const getNodesDisplayed = async function(numberOfElements: number, idList: string[]) {
|
||||
const promises = [];
|
||||
let nodeList;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user