mirror of
https://github.com/Alfresco/alfresco-ng2-components.git
synced 2025-07-24 17:32:15 +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.
|
||||
@@ -58,7 +58,7 @@ describe('Search Checklist Component', () => {
|
||||
folder: `${randomName}Folder`
|
||||
};
|
||||
|
||||
let createdFile, createdFolder;
|
||||
let createdFile; let createdFolder;
|
||||
|
||||
beforeAll(async () => {
|
||||
await apiService.loginWithProfile('admin');
|
||||
@@ -152,8 +152,8 @@ describe('Search Checklist Component', () => {
|
||||
|
||||
for (let numberOfOptions = 0; numberOfOptions < 8; numberOfOptions++) {
|
||||
jsonFile.categories[1].component.settings.options.push({
|
||||
'name': 'Folder',
|
||||
'value': "TYPE:'cm:folder'"
|
||||
name: 'Folder',
|
||||
value: 'TYPE:\'cm:folder\''
|
||||
});
|
||||
}
|
||||
|
||||
@@ -192,8 +192,8 @@ describe('Search Checklist Component', () => {
|
||||
|
||||
for (let numberOfOptions = 0; numberOfOptions < 8; numberOfOptions++) {
|
||||
jsonFile.categories[1].component.settings.options.push({
|
||||
'name': 'Folder',
|
||||
'value': "TYPE:'cm:folder'"
|
||||
name: 'Folder',
|
||||
value: 'TYPE:\'cm:folder\''
|
||||
});
|
||||
}
|
||||
|
||||
@@ -249,8 +249,8 @@ describe('Search Checklist Component', () => {
|
||||
|
||||
for (let numberOfOptions = 0; numberOfOptions < 8; numberOfOptions++) {
|
||||
jsonFile.categories[1].component.settings.options.push({
|
||||
'name': 'Folder',
|
||||
'value': "TYPE:'cm:folder'"
|
||||
name: 'Folder',
|
||||
value: 'TYPE:\'cm:folder\''
|
||||
});
|
||||
}
|
||||
|
||||
@@ -339,8 +339,8 @@ describe('Search Checklist Component', () => {
|
||||
|
||||
it('[C277019] Should be able to add new properties with different types', async () => {
|
||||
jsonFile.categories[1].component.settings.options.push({
|
||||
'name': filterType.custom,
|
||||
'value': "TYPE:'cm:auditable'"
|
||||
name: filterType.custom,
|
||||
value: 'TYPE:\'cm:auditable\''
|
||||
});
|
||||
|
||||
await LocalStorageUtil.setConfigField('search', JSON.stringify(jsonFile));
|
||||
|
@@ -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.
|
||||
|
@@ -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.
|
||||
@@ -45,16 +45,16 @@ describe('Search Number Range Filter', () => {
|
||||
const acsUser = new UserModel();
|
||||
|
||||
const file2BytesModel = new FileModel({
|
||||
'name': browser.params.resources.Files.ADF_DOCUMENTS.UNSUPPORTED.file_name,
|
||||
'location': browser.params.resources.Files.ADF_DOCUMENTS.UNSUPPORTED.file_path
|
||||
name: browser.params.resources.Files.ADF_DOCUMENTS.UNSUPPORTED.file_name,
|
||||
location: browser.params.resources.Files.ADF_DOCUMENTS.UNSUPPORTED.file_path
|
||||
});
|
||||
|
||||
const file0BytesModel = new FileModel({
|
||||
'name': browser.params.resources.Files.ADF_DOCUMENTS.TXT_0B.file_name,
|
||||
'location': browser.params.resources.Files.ADF_DOCUMENTS.TXT_0B.file_path
|
||||
name: browser.params.resources.Files.ADF_DOCUMENTS.TXT_0B.file_name,
|
||||
location: browser.params.resources.Files.ADF_DOCUMENTS.TXT_0B.file_path
|
||||
});
|
||||
|
||||
let file2Bytes, file0Bytes;
|
||||
let file2Bytes; let file0Bytes;
|
||||
const apiService = createApiService();
|
||||
const usersActions = new UsersActions(apiService);
|
||||
|
||||
|
@@ -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.
|
||||
@@ -60,7 +60,7 @@ describe('Search Radio Component', () => {
|
||||
folder: `${randomName}Folder`
|
||||
};
|
||||
|
||||
let createdFile, createdFolder;
|
||||
let createdFile; let createdFolder;
|
||||
|
||||
beforeAll(async () => {
|
||||
await apiService.loginWithProfile('admin');
|
||||
@@ -141,8 +141,8 @@ describe('Search Radio Component', () => {
|
||||
|
||||
for (let numberOfOptions = 0; numberOfOptions < 6; numberOfOptions++) {
|
||||
jsonFile.categories[5].component.settings.options.push({
|
||||
'name': 'APP.SEARCH.RADIO.FOLDER',
|
||||
'value': "TYPE:'cm:folder'"
|
||||
name: 'APP.SEARCH.RADIO.FOLDER',
|
||||
value: 'TYPE:\'cm:folder\''
|
||||
});
|
||||
}
|
||||
|
||||
@@ -199,8 +199,8 @@ describe('Search Radio Component', () => {
|
||||
|
||||
for (let numberOfOptions = 0; numberOfOptions < 6; numberOfOptions++) {
|
||||
jsonFile.categories[5].component.settings.options.push({
|
||||
'name': 'APP.SEARCH.RADIO.FOLDER',
|
||||
'value': "TYPE:'cm:folder'"
|
||||
name: 'APP.SEARCH.RADIO.FOLDER',
|
||||
value: 'TYPE:\'cm:folder\''
|
||||
});
|
||||
}
|
||||
|
||||
@@ -281,8 +281,8 @@ describe('Search Radio Component', () => {
|
||||
await navigationBarPage.navigateToContentServices();
|
||||
|
||||
jsonFile.categories[5].component.settings.options.push({
|
||||
'name': filterType.custom,
|
||||
'value': "TYPE:'cm:content'"
|
||||
name: filterType.custom,
|
||||
value: 'TYPE:\'cm:content\''
|
||||
});
|
||||
|
||||
await LocalStorageUtil.setConfigField('search', JSON.stringify(jsonFile));
|
||||
|
@@ -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,8 +44,8 @@ describe('Search Slider Filter', () => {
|
||||
const acsUser = new UserModel();
|
||||
|
||||
const file2BytesModel = new FileModel({
|
||||
'name': browser.params.resources.Files.ADF_DOCUMENTS.UNSUPPORTED.file_name,
|
||||
'location': browser.params.resources.Files.ADF_DOCUMENTS.UNSUPPORTED.file_path
|
||||
name: browser.params.resources.Files.ADF_DOCUMENTS.UNSUPPORTED.file_name,
|
||||
location: browser.params.resources.Files.ADF_DOCUMENTS.UNSUPPORTED.file_path
|
||||
});
|
||||
|
||||
let file2Bytes;
|
||||
|
@@ -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;
|
||||
|
||||
|
@@ -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.
|
||||
@@ -48,7 +48,7 @@ describe('Search component - Text widget', () => {
|
||||
const nodesApi = new NodesApi(apiService.getInstance());
|
||||
|
||||
const acsUser = new UserModel();
|
||||
const newFolderModel = new FolderModel({ 'description': 'newDescription' });
|
||||
const newFolderModel = new FolderModel({ description: 'newDescription' });
|
||||
|
||||
beforeAll(async () => {
|
||||
await apiService.loginWithProfile('admin');
|
||||
@@ -58,9 +58,9 @@ describe('Search component - Text widget', () => {
|
||||
await apiService.login(acsUser.username, acsUser.password);
|
||||
|
||||
await nodesApi.createNode('-my-', {
|
||||
'name': newFolderModel.name,
|
||||
'nodeType': 'cm:folder',
|
||||
'properties':
|
||||
name: newFolderModel.name,
|
||||
nodeType: 'cm:folder',
|
||||
properties:
|
||||
{
|
||||
'cm:description': newFolderModel.description
|
||||
}
|
||||
|
@@ -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.
|
||||
|
@@ -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.
|
||||
|
@@ -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.
|
||||
|
@@ -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.
|
||||
@@ -68,17 +68,17 @@ describe('Search component - Search Bar', () => {
|
||||
const filesToDelete = [];
|
||||
|
||||
const firstFileModel = new FileModel({
|
||||
'name': filename, 'shortName': filename.substring(0, 8)
|
||||
name: filename, shortName: filename.substring(0, 8)
|
||||
});
|
||||
|
||||
const firstFolderModel = new FolderModel({
|
||||
'name': firstFolderName, 'shortName': firstFolderName.substring(0, 8)
|
||||
name: firstFolderName, shortName: firstFolderName.substring(0, 8)
|
||||
});
|
||||
const secondFolder = new FolderModel({
|
||||
'name': secondFolderName, 'shortName': secondFolderName.substring(0, 8)
|
||||
name: secondFolderName, shortName: secondFolderName.substring(0, 8)
|
||||
});
|
||||
const thirdFolder = new FolderModel({
|
||||
'name': thirdFolderName, 'shortName': thirdFolderName.substring(0, 8)
|
||||
name: thirdFolderName, shortName: thirdFolderName.substring(0, 8)
|
||||
});
|
||||
|
||||
const term = 'Zoizo';
|
||||
@@ -94,9 +94,9 @@ describe('Search component - Search Bar', () => {
|
||||
Object.assign(firstFileModel, firstFileUploaded.entry);
|
||||
|
||||
fileHighlightUploaded = await nodesApi.createNode('-my-', {
|
||||
'name': StringUtil.generateRandomString(16),
|
||||
'nodeType': 'cm:content',
|
||||
'properties': {
|
||||
name: StringUtil.generateRandomString(16),
|
||||
nodeType: 'cm:content',
|
||||
properties: {
|
||||
'cm:title': term,
|
||||
'cm:description': 'Jadore les ' + term
|
||||
}
|
||||
|
@@ -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.
|
||||
@@ -59,30 +59,30 @@ describe('Search Filters', () => {
|
||||
const uniqueFileName3 = fileNamePrefix + StringUtil.generateRandomString(5);
|
||||
|
||||
const fileModel = new FileModel({
|
||||
'name': filename, 'shortName': filename.substring(0, 8)
|
||||
name: filename, shortName: filename.substring(0, 8)
|
||||
});
|
||||
|
||||
const pngFileModel = new FileModel({
|
||||
'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 txtFileModel1 = new FileModel({
|
||||
'location': browser.params.resources.Files.ADF_DOCUMENTS.TXT_0B.file_path,
|
||||
'name': `${uniqueFileName1}.txt`
|
||||
location: browser.params.resources.Files.ADF_DOCUMENTS.TXT_0B.file_path,
|
||||
name: `${uniqueFileName1}.txt`
|
||||
});
|
||||
|
||||
const jpgFileModel = new FileModel({
|
||||
'location': browser.params.resources.Files.ADF_DOCUMENTS.JPG.file_path,
|
||||
'name': `${uniqueFileName2}.jpg`
|
||||
location: browser.params.resources.Files.ADF_DOCUMENTS.JPG.file_path,
|
||||
name: `${uniqueFileName2}.jpg`
|
||||
});
|
||||
|
||||
const txtFileModel2 = new FileModel({
|
||||
'location': browser.params.resources.Files.ADF_DOCUMENTS.TXT_0B.file_path,
|
||||
'name': `${uniqueFileName3}.txt`
|
||||
location: browser.params.resources.Files.ADF_DOCUMENTS.TXT_0B.file_path,
|
||||
name: `${uniqueFileName3}.txt`
|
||||
});
|
||||
|
||||
let fileUploaded, fileTypePng, fileTypeTxt1, fileTypeJpg, fileTypeTxt2;
|
||||
let fileUploaded; let fileTypePng; let fileTypeTxt1; let fileTypeJpg; let fileTypeTxt2;
|
||||
|
||||
const filter = { type: 'TYPE-PNG Image' };
|
||||
|
||||
@@ -126,18 +126,18 @@ describe('Search Filters', () => {
|
||||
const currentYear = moment().year();
|
||||
|
||||
jsonFile.facetQueries.queries[0] = {
|
||||
'query': `created:${currentYear}`,
|
||||
'label': 'SEARCH.FACET_QUERIES.CREATED_THIS_YEAR'
|
||||
query: `created:${currentYear}`,
|
||||
label: 'SEARCH.FACET_QUERIES.CREATED_THIS_YEAR'
|
||||
};
|
||||
jsonFile.facetQueries.queries[1] = {
|
||||
'query': `content.mimetype:text/html`,
|
||||
'label': 'SEARCH.FACET_QUERIES.MIMETYPE',
|
||||
'group': 'Type facet queries'
|
||||
query: `content.mimetype:text/html`,
|
||||
label: 'SEARCH.FACET_QUERIES.MIMETYPE',
|
||||
group: 'Type facet queries'
|
||||
};
|
||||
jsonFile.facetQueries.queries[2] = {
|
||||
'query': `content.size:[0 TO 10240]`,
|
||||
'label': 'SEARCH.FACET_QUERIES.XTRASMALL',
|
||||
'group': 'Size facet queries'
|
||||
query: `content.size:[0 TO 10240]`,
|
||||
label: 'SEARCH.FACET_QUERIES.XTRASMALL',
|
||||
group: 'Size facet queries'
|
||||
};
|
||||
|
||||
|
||||
|
@@ -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.
|
||||
@@ -36,34 +36,35 @@ describe('Search Component - Multi-Select Facet', () => {
|
||||
const uploadActions = new UploadActions(apiService);
|
||||
const usersActions = new UsersActions(apiService);
|
||||
|
||||
let site, userOption;
|
||||
const createSite = async (user: UserModel) => {
|
||||
await apiService.loginWithProfile('admin');
|
||||
await usersActions.createUser(user);
|
||||
await apiService.login(user.username, user.password);
|
||||
const sitesApi = new SitesApi(apiService.getInstance());
|
||||
site = await sitesApi.createSite({
|
||||
title: StringUtil.generateRandomString(8),
|
||||
visibility: 'PUBLIC'
|
||||
});
|
||||
};
|
||||
const randomName = StringUtil.generateRandomString();
|
||||
const txtFileInfo = new FileModel({
|
||||
location: browser.params.resources.Files.ADF_DOCUMENTS.TXT_0B.file_path,
|
||||
name: `${randomName}.txt`
|
||||
});
|
||||
|
||||
let site; let userOption;
|
||||
|
||||
describe('', () => {
|
||||
let jpgFile, jpgFileSite, txtFile, txtFileSite;
|
||||
let jpgFile; let jpgFileSite; let txtFile; let txtFileSite;
|
||||
const acsUser = new UserModel();
|
||||
|
||||
const randomName = StringUtil.generateRandomString();
|
||||
const jpgFileInfo = new FileModel({
|
||||
'location': browser.params.resources.Files.ADF_DOCUMENTS.JPG.file_path,
|
||||
'name': `${randomName}.jpg`
|
||||
});
|
||||
const txtFileInfo = new FileModel({
|
||||
'location': browser.params.resources.Files.ADF_DOCUMENTS.TXT_0B.file_path,
|
||||
'name': `${randomName}.txt`
|
||||
location: browser.params.resources.Files.ADF_DOCUMENTS.JPG.file_path,
|
||||
name: `${randomName}.jpg`
|
||||
});
|
||||
|
||||
beforeAll(async () => {
|
||||
await apiService.loginWithProfile('admin');
|
||||
|
||||
await usersActions.createUser(acsUser);
|
||||
|
||||
await apiService.login(acsUser.username, acsUser.password);
|
||||
|
||||
const sitesApi = new SitesApi(apiService.getInstance());
|
||||
site = await sitesApi.createSite({
|
||||
title: StringUtil.generateRandomString(8),
|
||||
visibility: 'PUBLIC'
|
||||
});
|
||||
await createSite(acsUser);
|
||||
|
||||
jpgFile = await uploadActions.uploadFile(jpgFileInfo.location, jpgFileInfo.name, '-my-');
|
||||
|
||||
@@ -131,18 +132,13 @@ describe('Search Component - Multi-Select Facet', () => {
|
||||
});
|
||||
|
||||
describe('', () => {
|
||||
let jpgFile, txtFile;
|
||||
let jpgFile; let txtFile;
|
||||
const userUploadingTxt = new UserModel();
|
||||
const userUploadingImg = new UserModel();
|
||||
|
||||
const randomName = StringUtil.generateRandomString();
|
||||
const jpgFileInfo = new FileModel({
|
||||
'location': browser.params.resources.Files.ADF_DOCUMENTS.JPG.file_path,
|
||||
'name': `${randomName}.jpg`
|
||||
});
|
||||
const txtFileInfo = new FileModel({
|
||||
'location': browser.params.resources.Files.ADF_DOCUMENTS.TXT_0B.file_path,
|
||||
'name': `${randomName}.txt`
|
||||
location: browser.params.resources.Files.ADF_DOCUMENTS.JPG.file_path,
|
||||
name: `${randomName}.jpg`
|
||||
});
|
||||
|
||||
beforeAll(async () => {
|
||||
@@ -202,23 +198,8 @@ describe('Search Component - Multi-Select Facet', () => {
|
||||
let txtFile;
|
||||
const acsUser = new UserModel();
|
||||
|
||||
const randomName = StringUtil.generateRandomString();
|
||||
const txtFileInfo = new FileModel({
|
||||
'location': browser.params.resources.Files.ADF_DOCUMENTS.TXT_0B.file_path,
|
||||
'name': `${randomName}.txt`
|
||||
});
|
||||
|
||||
beforeAll(async () => {
|
||||
await apiService.loginWithProfile('admin');
|
||||
|
||||
await usersActions.createUser(acsUser);
|
||||
|
||||
await apiService.login(acsUser.username, acsUser.password);
|
||||
const sitesApi = new SitesApi(apiService.getInstance());
|
||||
site = await sitesApi.createSite({
|
||||
title: StringUtil.generateRandomString(8),
|
||||
visibility: 'PUBLIC'
|
||||
});
|
||||
await createSite(acsUser);
|
||||
|
||||
txtFile = await uploadActions.uploadFile(txtFileInfo.location, txtFileInfo.name, '-my-');
|
||||
await browser.sleep(browser.params.testConfig.timeouts.index_search);
|
||||
|
@@ -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.
|
||||
@@ -51,7 +51,7 @@ describe('Search component - Search Page', () => {
|
||||
const usersActions = new UsersActions(apiService);
|
||||
|
||||
const acsUser = new UserModel();
|
||||
const emptyFolderModel = new FolderModel({ 'name': 'search' + StringUtil.generateRandomString() });
|
||||
const emptyFolderModel = new FolderModel({ name: 'search' + StringUtil.generateRandomString() });
|
||||
let firstFileModel;
|
||||
const newFolderModel = new FolderModel();
|
||||
let fileNames = [];
|
||||
@@ -66,8 +66,8 @@ describe('Search component - Search Page', () => {
|
||||
fileNames.splice(0, 1);
|
||||
|
||||
firstFileModel = new FileModel({
|
||||
'name': search.active.firstFile,
|
||||
'location': browser.params.resources.Files.ADF_DOCUMENTS.TXT.file_path
|
||||
name: search.active.firstFile,
|
||||
location: browser.params.resources.Files.ADF_DOCUMENTS.TXT.file_path
|
||||
});
|
||||
|
||||
await apiService.loginWithProfile('admin');
|
||||
@@ -95,7 +95,7 @@ describe('Search component - Search Page', () => {
|
||||
await navigationBarPage.clickLogoutButton();
|
||||
});
|
||||
|
||||
it('[C260264] Should display message when no results are found', async() => {
|
||||
it('[C260264] Should display message when no results are found', async () => {
|
||||
const notExistentFileName = StringUtil.generateRandomString();
|
||||
await searchBarPage.checkSearchBarIsNotVisible();
|
||||
await searchBarPage.checkSearchIconIsVisible();
|
||||
|
@@ -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.
|
||||
@@ -30,166 +30,166 @@ export class SearchConfiguration {
|
||||
'TEXT',
|
||||
'TAG'
|
||||
],
|
||||
'include': ['path', 'allowableOperations'],
|
||||
'sorting': {
|
||||
'options': [
|
||||
{'key': 'name', 'label': 'Name', 'type': 'FIELD', 'field': 'cm:name', 'ascending': true},
|
||||
include: ['path', 'allowableOperations'],
|
||||
sorting: {
|
||||
options: [
|
||||
{key: 'name', label: 'Name', type: 'FIELD', field: 'cm:name', ascending: true},
|
||||
{
|
||||
'key': 'content.sizeInBytes',
|
||||
'label': 'Size',
|
||||
'type': 'FIELD',
|
||||
'field': 'content.size',
|
||||
'ascending': true
|
||||
key: 'content.sizeInBytes',
|
||||
label: 'Size',
|
||||
type: 'FIELD',
|
||||
field: 'content.size',
|
||||
ascending: true
|
||||
},
|
||||
{
|
||||
'key': 'description',
|
||||
'label': 'Description',
|
||||
'type': 'FIELD',
|
||||
'field': 'cm:description',
|
||||
'ascending': true
|
||||
key: 'description',
|
||||
label: 'Description',
|
||||
type: 'FIELD',
|
||||
field: 'cm:description',
|
||||
ascending: true
|
||||
},
|
||||
{
|
||||
'key': 'createdByUser',
|
||||
'label': 'Author',
|
||||
'type': 'FIELD',
|
||||
'field': 'cm:creator',
|
||||
'ascending': true
|
||||
key: 'createdByUser',
|
||||
label: 'Author',
|
||||
type: 'FIELD',
|
||||
field: 'cm:creator',
|
||||
ascending: true
|
||||
},
|
||||
{'key': 'createdAt', 'label': 'Created', 'type': 'FIELD', 'field': 'cm:created', 'ascending': true}
|
||||
{key: 'createdAt', label: 'Created', type: 'FIELD', field: 'cm:created', ascending: true}
|
||||
],
|
||||
'defaults': [
|
||||
{'key': 'name', 'type': 'FIELD', 'field': 'cm:name', 'ascending': true}
|
||||
defaults: [
|
||||
{key: 'name', type: 'FIELD', field: 'cm:name', ascending: true}
|
||||
]
|
||||
},
|
||||
'filterQueries': [
|
||||
{'query': "TYPE:'cm:folder' OR TYPE:'cm:content'"},
|
||||
{'query': 'NOT cm:creator:System'}
|
||||
filterQueries: [
|
||||
{query: 'TYPE:\'cm:folder\' OR TYPE:\'cm:content\''},
|
||||
{query: 'NOT cm:creator:System'}
|
||||
],
|
||||
'facetFields': {
|
||||
'expanded': true,
|
||||
'fields': [
|
||||
{'field': 'content.mimetype', 'mincount': 1, 'label': 'SEARCH.FACET_FIELDS.TYPE'},
|
||||
{'field': 'content.size', 'mincount': 1, 'label': 'SEARCH.FACET_FIELDS.SIZE'},
|
||||
{'field': 'creator', 'mincount': 1, 'label': 'SEARCH.FACET_FIELDS.CREATOR'},
|
||||
{'field': 'modifier', 'mincount': 1, 'label': 'SEARCH.FACET_FIELDS.MODIFIER'},
|
||||
{'field': 'created', 'mincount': 1, 'label': 'SEARCH.FACET_FIELDS.CREATED'}
|
||||
facetFields: {
|
||||
expanded: true,
|
||||
fields: [
|
||||
{field: 'content.mimetype', mincount: 1, label: 'SEARCH.FACET_FIELDS.TYPE'},
|
||||
{field: 'content.size', mincount: 1, label: 'SEARCH.FACET_FIELDS.SIZE'},
|
||||
{field: 'creator', mincount: 1, label: 'SEARCH.FACET_FIELDS.CREATOR'},
|
||||
{field: 'modifier', mincount: 1, label: 'SEARCH.FACET_FIELDS.MODIFIER'},
|
||||
{field: 'created', mincount: 1, label: 'SEARCH.FACET_FIELDS.CREATED'}
|
||||
]
|
||||
},
|
||||
'facetQueries': {
|
||||
'label': 'My facet queries',
|
||||
'pageSize': 5,
|
||||
'queries': [
|
||||
{'query': 'created:2018', 'label': '1.Created This Year'},
|
||||
{'query': 'content.mimetype:text/html', 'label': '2.Type: HTML'},
|
||||
{'query': 'content.size:[0 TO 10240]', 'label': '3.Size: xtra small'},
|
||||
{'query': 'content.size:[10240 TO 102400]', 'label': '4.Size: small'},
|
||||
{'query': 'content.size:[102400 TO 1048576]', 'label': '5.Size: medium'},
|
||||
{'query': 'content.size:[1048576 TO 16777216]', 'label': '6.Size: large'},
|
||||
{'query': 'content.size:[16777216 TO 134217728]', 'label': '7.Size: xtra large'},
|
||||
{'query': 'content.size:[134217728 TO MAX]', 'label': '8.Size: XX large'}
|
||||
facetQueries: {
|
||||
label: 'My facet queries',
|
||||
pageSize: 5,
|
||||
queries: [
|
||||
{query: 'created:2018', label: '1.Created This Year'},
|
||||
{query: 'content.mimetype:text/html', label: '2.Type: HTML'},
|
||||
{query: 'content.size:[0 TO 10240]', label: '3.Size: xtra small'},
|
||||
{query: 'content.size:[10240 TO 102400]', label: '4.Size: small'},
|
||||
{query: 'content.size:[102400 TO 1048576]', label: '5.Size: medium'},
|
||||
{query: 'content.size:[1048576 TO 16777216]', label: '6.Size: large'},
|
||||
{query: 'content.size:[16777216 TO 134217728]', label: '7.Size: xtra large'},
|
||||
{query: 'content.size:[134217728 TO MAX]', label: '8.Size: XX large'}
|
||||
]
|
||||
},
|
||||
'categories': [
|
||||
categories: [
|
||||
{
|
||||
'id': 'queryName',
|
||||
'name': 'Name',
|
||||
'enabled': true,
|
||||
'expanded': true,
|
||||
'component': {
|
||||
'selector': 'text',
|
||||
'settings': {
|
||||
'pattern': "cm:name:'(.*?)'",
|
||||
'field': 'cm:name',
|
||||
'placeholder': 'Enter the name'
|
||||
id: 'queryName',
|
||||
name: 'Name',
|
||||
enabled: true,
|
||||
expanded: true,
|
||||
component: {
|
||||
selector: 'text',
|
||||
settings: {
|
||||
pattern: 'cm:name:\'(.*?)\'',
|
||||
field: 'cm:name',
|
||||
placeholder: 'Enter the name'
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
'id': 'checkList',
|
||||
'name': 'Check List',
|
||||
'enabled': true,
|
||||
'component': {
|
||||
'selector': 'check-list',
|
||||
'settings': {
|
||||
'pageSize': 5,
|
||||
'operator': 'OR',
|
||||
'options': [
|
||||
{'name': 'Folder', 'value': "TYPE:'cm:folder'"},
|
||||
{'name': 'Document', 'value': "TYPE:'cm:content'"}
|
||||
id: 'checkList',
|
||||
name: 'Check List',
|
||||
enabled: true,
|
||||
component: {
|
||||
selector: 'check-list',
|
||||
settings: {
|
||||
pageSize: 5,
|
||||
operator: 'OR',
|
||||
options: [
|
||||
{name: 'Folder', value: 'TYPE:\'cm:folder\''},
|
||||
{name: 'Document', value: 'TYPE:\'cm:content\''}
|
||||
]
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
'id': 'contentSize',
|
||||
'name': 'Content Size',
|
||||
'enabled': true,
|
||||
'component': {
|
||||
'selector': 'slider',
|
||||
'settings': {
|
||||
'field': 'cm:content.size',
|
||||
'min': 0,
|
||||
'max': 18,
|
||||
'step': 1,
|
||||
'thumbLabel': true
|
||||
id: 'contentSize',
|
||||
name: 'Content Size',
|
||||
enabled: true,
|
||||
component: {
|
||||
selector: 'slider',
|
||||
settings: {
|
||||
field: 'cm:content.size',
|
||||
min: 0,
|
||||
max: 18,
|
||||
step: 1,
|
||||
thumbLabel: true
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
'id': 'contentSizeRange',
|
||||
'name': 'Content Size (range)',
|
||||
'enabled': true,
|
||||
'component': {
|
||||
'selector': 'number-range',
|
||||
'settings': {
|
||||
'field': 'cm:content.size',
|
||||
'format': '[{FROM} TO {TO}]'
|
||||
id: 'contentSizeRange',
|
||||
name: 'Content Size (range)',
|
||||
enabled: true,
|
||||
component: {
|
||||
selector: 'number-range',
|
||||
settings: {
|
||||
field: 'cm:content.size',
|
||||
format: '[{FROM} TO {TO}]'
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
'id': 'createdDateRange',
|
||||
'name': 'Created Date (range)',
|
||||
'enabled': true,
|
||||
'component': {
|
||||
'selector': 'date-range',
|
||||
'settings': {
|
||||
'field': 'cm:created',
|
||||
'dateFormat': 'DD-MMM-YY'
|
||||
id: 'createdDateRange',
|
||||
name: 'Created Date (range)',
|
||||
enabled: true,
|
||||
component: {
|
||||
selector: 'date-range',
|
||||
settings: {
|
||||
field: 'cm:created',
|
||||
dateFormat: 'DD-MMM-YY'
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
'id': 'queryType',
|
||||
'name': 'Type',
|
||||
'enabled': true,
|
||||
'component': {
|
||||
'selector': 'radio',
|
||||
'settings': {
|
||||
'field': null,
|
||||
'pageSize': 5,
|
||||
'options': [
|
||||
{'name': 'APP.SEARCH.RADIO.NONE', 'value': '', 'default': true},
|
||||
{'name': 'APP.SEARCH.RADIO.ALL', 'value': "TYPE:'cm:folder' OR TYPE:'cm:content'"},
|
||||
{'name': 'APP.SEARCH.RADIO.FOLDER', 'value': "TYPE:'cm:folder'"},
|
||||
{'name': 'APP.SEARCH.RADIO.DOCUMENT', 'value': "TYPE:'cm:content'"}
|
||||
id: 'queryType',
|
||||
name: 'Type',
|
||||
enabled: true,
|
||||
component: {
|
||||
selector: 'radio',
|
||||
settings: {
|
||||
field: null,
|
||||
pageSize: 5,
|
||||
options: [
|
||||
{name: 'APP.SEARCH.RADIO.NONE', value: '', default: true},
|
||||
{name: 'APP.SEARCH.RADIO.ALL', value: 'TYPE:\'cm:folder\' OR TYPE:\'cm:content\''},
|
||||
{name: 'APP.SEARCH.RADIO.FOLDER', value: 'TYPE:\'cm:folder\''},
|
||||
{name: 'APP.SEARCH.RADIO.DOCUMENT', value: 'TYPE:\'cm:content\''}
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
],
|
||||
'highlight': {
|
||||
'prefix': '¿',
|
||||
'postfix': '?',
|
||||
'mergeContiguous': true,
|
||||
'fields': [
|
||||
highlight: {
|
||||
prefix: '¿',
|
||||
postfix: '?',
|
||||
mergeContiguous: true,
|
||||
fields: [
|
||||
{
|
||||
'field': 'cm:title'
|
||||
field: 'cm:title'
|
||||
},
|
||||
{
|
||||
'field': 'description',
|
||||
'prefix': '(',
|
||||
'postfix': ')'
|
||||
field: 'description',
|
||||
prefix: '(',
|
||||
postfix: ')'
|
||||
}
|
||||
]
|
||||
}
|
||||
|
Reference in New Issue
Block a user