[ACS-5183] properties facet file size and file type (#3347)

* ACS-5183 Started updating configuration for file type and size

* ACS-5183 Corrected file extensions

* ACS-5183 Added more file extensions

* ACS-5183 Corrected configuration

* ACS-5183 Fix e2e

* ACS-5183 Added translation key

* ACS-5183 Changed jira for excluded e2es

* ACS-5183 Corrected import

* ACS-5183 Added license header
This commit is contained in:
AleksanderSklorz 2023-07-20 08:38:34 +02:00 committed by GitHub
parent 9a585c1642
commit d3be553fd6
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
24 changed files with 183 additions and 329 deletions

View File

@ -6,14 +6,8 @@
"C286252": "temp, see https://alfresco.atlassian.net/browse/ACS-5189",
"C284666": "temp, see https://alfresco.atlassian.net/browse/ACS-5189",
"C286269": "temp, see https://alfresco.atlassian.net/browse/ACS-5189",
"C279191": "temp, will be fixed in https://alfresco.atlassian.net/browse/ACS-5183",
"C279192": "temp, will be fixed in https://alfresco.atlassian.net/browse/ACS-5183",
"C279193": "temp, will be fixed in https://alfresco.atlassian.net/browse/ACS-5183",
"C279195": "temp, will be fixed in https://alfresco.atlassian.net/browse/ACS-5183",
"C280051": "temp, will be fixed in https://alfresco.atlassian.net/browse/ACS-5183",
"C280052": "temp, will be fixed in https://alfresco.atlassian.net/browse/ACS-5183",
"C279188": "temp, will be fixed in https://alfresco.atlassian.net/browse/ACS-5183",
"C308042": "temp, will be fixed in https://alfresco.atlassian.net/browse/ACS-5183",
"C280051": "temp, will be fixed in https://alfresco.atlassian.net/browse/ACS-5632",
"C308042": "temp, will be fixed in https://alfresco.atlassian.net/browse/ACS-5632",
"C279186": "temp, will be fixed in https://alfresco.atlassian.net/browse/ACS-4985",
"C279219": "temp, will be fixed in https://alfresco.atlassian.net/browse/ACS-4985",
"C279221": "temp, will be fixed in https://alfresco.atlassian.net/browse/ACS-4985",

View File

@ -31,7 +31,7 @@ import {
FILES,
SITE_VISIBILITY,
SITE_ROLES,
SizeOptions
SizeOperator
} from '@alfresco/aca-testing-shared';
import { BrowserActions } from '@alfresco/adf-testing';
@ -62,7 +62,7 @@ describe('Search filters', () => {
source: FILES.pdfFile
};
const expectedFileTypes = ['Adobe PDF Document (1)', 'JPEG Image (1)'];
const expectedFileTypes = ['pdf', 'wpd'];
const expectedCreators = [`${user1} ${user1} (1)`, `${user2} ${user2} (1)`];
const expectedModifiers = [`${user1} ${user1} (1)`, `${user2} ${user2} (1)`];
const expectedLocations = ['_REPOSITORY_ (1)', `${site} (1)`];
@ -77,7 +77,6 @@ describe('Search filters', () => {
const { searchInput } = page.pageLayoutHeader;
const { dataTable, filters, toolbar } = page;
const sizeFilter = filters.size;
const fileTypeFilter = filters.fileType;
const createdDateFilter = filters.createdDate;
const creatorFilter = filters.creator;
@ -118,7 +117,6 @@ describe('Search filters', () => {
});
it('[C279186] Filters are displayed', async () => {
expect(await sizeFilter.isDisplayed()).toBe(true, 'Size filter panel not displayed');
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 creatorFilter.isDisplayed()).toBe(true, 'Creator filter panel not displayed');
@ -129,64 +127,42 @@ describe('Search filters', () => {
describe('Filter by Size', () => {
afterEach(async () => {
await sizeFilter.resetPanel();
await fileTypeFilter.openDialog();
await fileTypeFilter.clickResetButton();
});
it('[C279197] Expand / Collapse the Size filter panel', async () => {
expect(await sizeFilter.isDialogPresent()).toBe(false, 'Size filter panel is expanded');
await sizeFilter.openDialog();
expect(await sizeFilter.isDialogPresent()).toBe(true, 'Size filter panel not expanded');
const expectedSizes = ['Small', 'Medium', 'Large', 'Huge'];
expect(await sizeFilter.getFiltersValues()).toEqual(expectedSizes, 'Incorrect Size filters facets');
await sizeFilter.closeDialog();
expect(await sizeFilter.isDialogPresent()).toBe(false, 'Size filter panel is expanded');
});
it('[C279199] Filter by Small', async () => {
await sizeFilter.openDialog();
await sizeFilter.getSizeCheckboxOption(SizeOptions.Small).click();
await sizeFilter.clickApplyButton();
it('[C279199] Filter existing', async () => {
await fileTypeFilter.openDialog();
await fileTypeFilter.typeFileSize('1024');
await fileTypeFilter.selectFileSizeOperator(SizeOperator.AT_MOST);
await fileTypeFilter.clickApplyButton();
expect(await dataTable.isItemPresent(fileJpgUser1.name)).toBe(true, `${fileJpgUser1.name} not in the list`);
expect(await dataTable.isItemPresent(filePdfUser2.name)).toBe(true, `${filePdfUser2.name} not in the list`);
});
it('[C279202] Filter by Huge', async () => {
await sizeFilter.openDialog();
await sizeFilter.getSizeCheckboxOption(SizeOptions.Huge).click();
await sizeFilter.clickApplyButton();
it('[C279199] Filter non existing', async () => {
await fileTypeFilter.openDialog();
await fileTypeFilter.typeFileSize('512000');
await fileTypeFilter.clickApplyButton();
expect(await dataTable.isEmpty()).toBe(true, 'list is not empty');
});
it('[C279203] Filter by multiple size categories', async () => {
await sizeFilter.openDialog();
await sizeFilter.getSizeCheckboxOption(SizeOptions.Small).click();
await sizeFilter.getSizeCheckboxOption(SizeOptions.Medium).click();
await sizeFilter.getSizeCheckboxOption(SizeOptions.Large).click();
await sizeFilter.clickApplyButton();
expect(await dataTable.isItemPresent(fileJpgUser1.name)).toBe(true, `${fileJpgUser1.name} not in the list`);
expect(await dataTable.isItemPresent(filePdfUser2.name)).toBe(true, `${filePdfUser2.name} not in the list`);
});
it('[C279198] Clear the Size filter options', async () => {
await sizeFilter.openDialog();
await sizeFilter.getSizeCheckboxOption(SizeOptions.Small).click();
await sizeFilter.getSizeCheckboxOption(SizeOptions.Medium).click();
await sizeFilter.clickApplyButton();
await fileTypeFilter.openDialog();
await fileTypeFilter.typeFileSize('1024');
await fileTypeFilter.selectFileSizeOperator(SizeOperator.AT_MOST);
await fileTypeFilter.clickApplyButton();
await sizeFilter.openDialog();
expect(await sizeFilter.getFiltersCheckedValues()).toEqual(['Small', 'Medium'], 'Incorrect checked Size filters');
await sizeFilter.clickResetButton();
await sizeFilter.openDialog();
expect(await sizeFilter.getFiltersCheckedValues()).toEqual([], 'Size filters not cleared');
await fileTypeFilter.openDialog();
expect(await fileTypeFilter.getFileSizeValue()).toEqual('1024', 'Incorrect file size');
expect(await fileTypeFilter.getFileSizeOperatorValue()).toEqual(SizeOperator.AT_MOST, 'Incorrect file size operator');
await fileTypeFilter.clickResetButton();
await fileTypeFilter.closeDialog();
await fileTypeFilter.openDialog();
expect(await fileTypeFilter.getFileSizeValue()).toEqual('', 'Incorrect file size');
expect(await fileTypeFilter.getFileSizeOperatorValue()).toEqual(SizeOperator.AT_LEAST, 'Incorrect file size operator');
});
});
@ -300,8 +276,7 @@ describe('Search filters', () => {
it('[C279191] Expand / Collapse the File type filter panel', async () => {
await fileTypeFilter.openDialog();
expect(await fileTypeFilter.isDialogPresent()).toBe(true, 'File type filter panel not expanded');
expect(await fileTypeFilter.getFiltersValues()).toEqual(expectedFileTypes, 'Incorrect File type filters facets');
expect(await fileTypeFilter.isFilterCategoryInputDisplayed()).toBe(true, 'File type filter categories not displayed');
expect(await fileTypeFilter.getFileTypesValues('pd')).toEqual(expectedFileTypes, 'Incorrect File type filters facets');
await fileTypeFilter.closeDialog();
expect(await fileTypeFilter.isDialogPresent()).toBe(false, 'File type filter panel is expanded');
@ -309,45 +284,41 @@ describe('Search filters', () => {
it('[C279192] Results are filtered by File type', async () => {
await fileTypeFilter.openDialog();
await fileTypeFilter.checkCategory('Adobe PDF Document');
await fileTypeFilter.selectFileType('pdf');
await fileTypeFilter.clickApplyButton();
expect(await fileTypeFilter.getChipTitle()).toEqual('Adobe PDF Document');
expect(await fileTypeFilter.getChipTitle()).toEqual('pdf');
expect(await dataTable.isItemPresent(filePdfUser2.name)).toBe(true, 'PDF file not displayed');
expect(await dataTable.isItemPresent(fileJpgUser1.name)).toBe(false, 'JPG file is displayed');
await fileTypeFilter.openDialog();
await fileTypeFilter.checkCategory('JPEG Image');
await fileTypeFilter.selectFileType('jpg');
await fileTypeFilter.clickApplyButton();
expect(await dataTable.isItemPresent(filePdfUser2.name)).toBe(true, 'PDF file not displayed');
expect(await dataTable.isItemPresent(fileJpgUser1.name)).toBe(true, 'JPG file not displayed');
expect(await fileTypeFilter.getChipTitle()).toEqual(['Adobe PDF Document', 'JPEG Image'].join(', '));
expect(await fileTypeFilter.getChipTitle()).toEqual(['pdf', 'jpg'].join(', '));
});
it('[C279193] Clear the File type filter options', async () => {
await fileTypeFilter.openDialog();
await fileTypeFilter.checkCategory('Adobe PDF Document');
await fileTypeFilter.selectFileType('pdf');
await fileTypeFilter.clickApplyButton();
expect(await dataTable.isItemPresent(filePdfUser2.name)).toBe(true, 'PDF file not displayed');
expect(await dataTable.isItemPresent(fileJpgUser1.name)).toBe(false, 'JPG file is displayed');
await fileTypeFilter.openDialog();
expect(await fileTypeFilter.getFiltersCheckedValues()).toEqual(['Adobe PDF Document (1)']);
expect(await fileTypeFilter.getSelectedFileTypeOptions()).toEqual(['pdf']);
await fileTypeFilter.clickResetButton();
await fileTypeFilter.closeDialog();
await fileTypeFilter.openDialog();
await fileTypeFilter.clickApplyButton();
expect(await dataTable.isItemPresent(filePdfUser2.name)).toBe(true, 'PDF file not displayed');
expect(await dataTable.isItemPresent(fileJpgUser1.name)).toBe(true, 'JPG file not displayed');
expect(await fileTypeFilter.getChipTitle()).toEqual('');
});
it('[C279195] Search for a specific file type', async () => {
await fileTypeFilter.openDialog();
expect(await fileTypeFilter.getFiltersValues()).toEqual(expectedFileTypes, 'Incorrect File type filters facets');
await fileTypeFilter.filterCategoriesBy('PDF');
expect(await fileTypeFilter.getFiltersValues()).toEqual(['Adobe PDF Document (1)'], 'Incorrect File type filters facets');
});
});
describe('Filter by Creator', () => {
@ -607,12 +578,10 @@ describe('Search filters', () => {
});
it('[C280051] Multiple filters can be applied', async () => {
await sizeFilter.openDialog();
await sizeFilter.getSizeCheckboxOption(SizeOptions.Small).click();
await sizeFilter.clickApplyButton();
await fileTypeFilter.openDialog();
await fileTypeFilter.checkCategory('JPEG Image');
await fileTypeFilter.typeFileSize('1024');
await fileTypeFilter.selectFileSizeOperator(SizeOperator.AT_MOST);
await fileTypeFilter.selectFileType('jpg');
await fileTypeFilter.clickApplyButton();
await creatorFilter.openDialog();
@ -625,7 +594,7 @@ describe('Search filters', () => {
expect(await dataTable.isItemPresent(filePdfUser2.name)).toBe(false, 'PDF file is displayed');
expect(await dataTable.isItemPresent(fileJpgUser1.name)).toBe(true, 'JPG file not displayed');
expect(await fileTypeFilter.getChipTitle()).toEqual('JPEG Image');
expect(await fileTypeFilter.getChipTitle()).toEqual(`${SizeOperator.AT_MOST} 1024 KB, jpg`);
expect(await creatorFilter.getChipTitle()).toEqual(`${user1} ${user1}`);
expect(await locationFilter.getChipTitle()).toEqual(site);
@ -637,7 +606,7 @@ describe('Search filters', () => {
it('[C280052] Total results is updated correctly', async () => {
await fileTypeFilter.openDialog();
await fileTypeFilter.checkCategory('JPEG Image');
await fileTypeFilter.selectFileType('jpg');
await fileTypeFilter.clickApplyButton();
await creatorFilter.openDialog();
@ -653,7 +622,7 @@ describe('Search filters', () => {
it('[C279188] Pagination is correct when search results are filtered', async () => {
await fileTypeFilter.openDialog();
await fileTypeFilter.checkCategory('JPEG Image');
await fileTypeFilter.selectFileType('jpg');
await fileTypeFilter.clickApplyButton();
await creatorFilter.openDialog();
@ -668,10 +637,6 @@ describe('Search filters', () => {
});
it('[C308042] The filter facets display is updated when making a new query', async () => {
await fileTypeFilter.openDialog();
expect(await fileTypeFilter.getFiltersValues()).toEqual(expectedFileTypes);
await fileTypeFilter.closeDialog();
await creatorFilter.openDialog();
expect(await creatorFilter.getFiltersValues()).toEqual(expectedCreators);
await creatorFilter.closeDialog();
@ -688,10 +653,6 @@ describe('Search filters', () => {
await searchInput.searchFor(fileJpgUser1.name);
await dataTable.waitForBody();
await fileTypeFilter.openDialog();
expect(await fileTypeFilter.getFiltersValues()).toEqual(['JPEG Image (1)']);
await fileTypeFilter.closeDialog();
await creatorFilter.openDialog();
expect(await creatorFilter.getFiltersValues()).toEqual([`${user1} ${user1} (1)`]);
await creatorFilter.closeDialog();

View File

@ -1428,31 +1428,25 @@
}
},
{
"id": "size",
"name": "SEARCH.CATEGORIES.SIZE",
"id": "properties",
"name": "SEARCH.CATEGORIES.PROPERTIES",
"enabled": true,
"component": {
"selector": "check-list",
"selector": "properties",
"settings": {
"allowUpdateOnChange": false,
"hideDefaultAction": true,
"options": [
{
"name": "SEARCH.CATEGORIES.SIZE_OPTIONS.SMALL",
"value": "content.size:[0 TO 1048576>"
},
{
"name": "SEARCH.CATEGORIES.SIZE_OPTIONS.MEDIUM",
"value": "content.size:[1048576 TO 52428800]"
},
{
"name": "SEARCH.CATEGORIES.SIZE_OPTIONS.LARGE",
"value": "content.size:<52428800 TO 524288000]"
},
{
"name": "SEARCH.CATEGORIES.SIZE_OPTIONS.HUGE",
"value": "content.size:<524288000 TO MAX]"
}
"field": "content.size,cm:name",
"fileExtensions": [
"3g2", "3gp", "acp", "aep", "ai", "aiff", "apk", "arw", "avi", "bin", "bmp", "cgm", "class", "cr2",
"css", "csv", "dita", "dng", "doc", "docm", "docx", "dotm","dwg", "dwt", "eps", "flac", "flv", "fm",
"fodg", "gif", "gtar", "gz", "htm", "html", "icns", "ics", "ief", "indd", "jar", "java", "jp2", "jpeg",
"jpg", "js", "json", "jsp", "m4v", "man", "md", "mov", "mp3", "mp4", "mpeg", "mpp", "mrw", "msg", "nef",
"numbers", "odb", "odf", "odg", "odi", "odm", "odp", "ods", "odt", "oga", "ogg", "ogv", "ogx", "orf",
"ott", "pages", "pbm", "pdf", "pef", "pgm", "pmd", "png", "pnm", "pot", "potx", "ppam", "ppj", "pps",
"ppsm", "ppt", "pptm", "pptx", "ps", "psd", "rad", "raf", "rar", "rgb", "rss", "rtf", "rw2", "rwl",
"sda", "sdc", "sdd", "sdp", "sds", "sdw", "sgi", "sgl", "sgml", "sh", "sldm", "smf", "stw", "svg",
"swf", "sxi", "tar", "tex", "texi", "tif", "tiff", "ts", "tsv", "txt", "vsd", "vsdm", "vsdx", "vssm",
"vstm", "vstx", "wav", "webm", "wma", "wmv", "wpd", "wrl", "x3f", "xdp", "xhtml", "xla", "xlam", "xls",
"xlsb", "xlsm", "xlsx", "xltm", "xml", "xpm", "xwd", "z", "zip"
]
}
}
@ -1487,18 +1481,6 @@
}
}
},
{
"id": "fileType",
"name": "SEARCH.FACET_FIELDS.FILE_TYPE",
"component": {
"selector": "",
"settings": {
"allowUpdateOnChange": false,
"hideDefaultAction": true,
"field": "content.mimetype"
}
}
},
{
"id": "location",
"name": "SEARCH.FACET_FIELDS.LOCATION",

View File

@ -526,7 +526,6 @@
"CREATE_DATE": "تاريخ الإنشاء"
},
"FACET_FIELDS": {
"FILE_TYPE": "نوع الملف",
"CREATOR": "المنشئ",
"MODIFIER": "المعدل",
"LOCATION": "مكان",
@ -534,13 +533,6 @@
},
"CATEGORIES": {
"MODIFIED_DATE": "تاريخ التعديل",
"SIZE": "الحجم",
"SIZE_OPTIONS": {
"SMALL": "صغير",
"MEDIUM": "متوسط",
"LARGE": "كبير",
"HUGE": "ضخم"
},
"CREATED_DATE": "تاريخ الإنشاء",
"EFFECTIVITY_FROM": "فعالية من",
"EFFECTIVITY_TO": "فعالية ل",
@ -614,3 +606,4 @@
}
}
}

View File

@ -526,7 +526,6 @@
"CREATE_DATE": "Datum vytvoření"
},
"FACET_FIELDS": {
"FILE_TYPE": "Typ souboru",
"CREATOR": "Autor",
"MODIFIER": "Upravující",
"LOCATION": "Umístění",
@ -534,13 +533,6 @@
},
"CATEGORIES": {
"MODIFIED_DATE": "Datum úpravy",
"SIZE": "Velikost",
"SIZE_OPTIONS": {
"SMALL": "Malá",
"MEDIUM": "Střední",
"LARGE": "Velká",
"HUGE": "Obrovská"
},
"CREATED_DATE": "Datum vytvoření",
"EFFECTIVITY_FROM": "Platnost od",
"EFFECTIVITY_TO": "Platnost do",
@ -614,3 +606,4 @@
}
}
}

View File

@ -526,7 +526,6 @@
"CREATE_DATE": "Oprettelsesdato"
},
"FACET_FIELDS": {
"FILE_TYPE": "Filtype",
"CREATOR": "Oprettet af",
"MODIFIER": "Ændret af",
"LOCATION": "Placering",
@ -534,13 +533,6 @@
},
"CATEGORIES": {
"MODIFIED_DATE": "Ændringsdato",
"SIZE": "Størrelse",
"SIZE_OPTIONS": {
"SMALL": "Lille",
"MEDIUM": "Medium",
"LARGE": "Stor",
"HUGE": "Meget stor"
},
"CREATED_DATE": "Oprettelsesdato",
"EFFECTIVITY_FROM": "Gældende periode fra",
"EFFECTIVITY_TO": "Gældende periode til",
@ -614,3 +606,4 @@
}
}
}

View File

@ -526,7 +526,6 @@
"CREATE_DATE": "Datum der Erstellung"
},
"FACET_FIELDS": {
"FILE_TYPE": "Dateityp",
"CREATOR": "Ersteller",
"MODIFIER": "Bearbeiter",
"LOCATION": "Speicherort",
@ -534,13 +533,6 @@
},
"CATEGORIES": {
"MODIFIED_DATE": "Datum der Änderung",
"SIZE": "Größe",
"SIZE_OPTIONS": {
"SMALL": "Klein",
"MEDIUM": "Mittel",
"LARGE": "Groß",
"HUGE": "Riesig"
},
"CREATED_DATE": "Datum der Erstellung",
"EFFECTIVITY_FROM": "Effektiv ab",
"EFFECTIVITY_TO": "Effektiv bis",
@ -614,3 +606,4 @@
}
}
}

View File

@ -526,7 +526,6 @@
"CREATE_DATE": "Created date"
},
"FACET_FIELDS": {
"FILE_TYPE": "File type",
"CREATOR": "Creator",
"MODIFIER": "Modifier",
"LOCATION": "Location",
@ -534,17 +533,11 @@
},
"CATEGORIES": {
"MODIFIED_DATE": "Modified date",
"SIZE": "Size",
"SIZE_OPTIONS": {
"SMALL": "Small",
"MEDIUM": "Medium",
"LARGE": "Large",
"HUGE": "Huge"
},
"CREATED_DATE": "Created date",
"EFFECTIVITY_FROM": "Effectivity from",
"EFFECTIVITY_TO": "Effectivity to",
"LOGIC": "Logic"
"LOGIC": "Logic",
"PROPERTIES": "Properties"
},
"SEARCH_HEADER" : {
"TITLE":"Filter",

View File

@ -526,7 +526,6 @@
"CREATE_DATE": "Fecha de creación"
},
"FACET_FIELDS": {
"FILE_TYPE": "Tipo de fichero",
"CREATOR": "Creador",
"MODIFIER": "Modificador",
"LOCATION": "Ubicación",
@ -534,13 +533,6 @@
},
"CATEGORIES": {
"MODIFIED_DATE": "Fecha de modificación",
"SIZE": "Tamaño",
"SIZE_OPTIONS": {
"SMALL": "Pequeño",
"MEDIUM": "Mediano",
"LARGE": "Grande",
"HUGE": "Enorme"
},
"CREATED_DATE": "Fecha de creación",
"EFFECTIVITY_FROM": "Válido desde",
"EFFECTIVITY_TO": "Válido hasta",
@ -614,3 +606,4 @@
}
}
}

View File

@ -526,7 +526,6 @@
"CREATE_DATE": "Luontipäivämäärä"
},
"FACET_FIELDS": {
"FILE_TYPE": "Tiedostotyyppi",
"CREATOR": "Tekijä",
"MODIFIER": "Muokkaaja",
"LOCATION": "Sijainti",
@ -534,13 +533,6 @@
},
"CATEGORIES": {
"MODIFIED_DATE": "Muokkauspäivämäärä",
"SIZE": "Koko",
"SIZE_OPTIONS": {
"SMALL": "Pieni",
"MEDIUM": "Keskikokoinen",
"LARGE": "Suuri",
"HUGE": "Valtava"
},
"CREATED_DATE": "Luontipäivämäärä",
"EFFECTIVITY_FROM": "Voimassaolon alku",
"EFFECTIVITY_TO": "Voimassaolon loppu",
@ -614,3 +606,4 @@
}
}
}

View File

@ -526,7 +526,6 @@
"CREATE_DATE": "Date de création"
},
"FACET_FIELDS": {
"FILE_TYPE": "Type de fichier",
"CREATOR": "Créateur",
"MODIFIER": "Modificateur",
"LOCATION": "Emplacement",
@ -534,13 +533,6 @@
},
"CATEGORIES": {
"MODIFIED_DATE": "Date de modification",
"SIZE": "Taille",
"SIZE_OPTIONS": {
"SMALL": "Petite",
"MEDIUM": "Moyenne",
"LARGE": "Grande",
"HUGE": "Enorme"
},
"CREATED_DATE": "Date de création",
"EFFECTIVITY_FROM": "Date de début d'effectivité",
"EFFECTIVITY_TO": "Date de fin d'effectivité",
@ -614,3 +606,4 @@
}
}
}

View File

@ -526,7 +526,6 @@
"CREATE_DATE": "Data di creazione"
},
"FACET_FIELDS": {
"FILE_TYPE": "Tipo di file",
"CREATOR": "Creatore",
"MODIFIER": "Modificatore",
"LOCATION": "Posizione",
@ -534,13 +533,6 @@
},
"CATEGORIES": {
"MODIFIED_DATE": "Data di modifica",
"SIZE": "Dimensione",
"SIZE_OPTIONS": {
"SMALL": "Piccola",
"MEDIUM": "Media",
"LARGE": "Grande",
"HUGE": "Enorme"
},
"CREATED_DATE": "Data di creazione",
"EFFECTIVITY_FROM": "Inizio validità",
"EFFECTIVITY_TO": "Fine validità",
@ -614,3 +606,4 @@
}
}
}

View File

@ -526,7 +526,6 @@
"CREATE_DATE": "作成日"
},
"FACET_FIELDS": {
"FILE_TYPE": "ファイルのタイプ",
"CREATOR": "作成者",
"MODIFIER": "変更者",
"LOCATION": "場所",
@ -534,13 +533,6 @@
},
"CATEGORIES": {
"MODIFIED_DATE": "変更日",
"SIZE": "サイズ",
"SIZE_OPTIONS": {
"SMALL": "小",
"MEDIUM": "中",
"LARGE": "大",
"HUGE": "特大"
},
"CREATED_DATE": "作成日",
"EFFECTIVITY_FROM": "有効性の開始",
"EFFECTIVITY_TO": "有効性の終了",
@ -614,3 +606,4 @@
}
}
}

View File

@ -526,7 +526,6 @@
"CREATE_DATE": "Opprettelsesdato"
},
"FACET_FIELDS": {
"FILE_TYPE": "Filtype",
"CREATOR": "Oppretter",
"MODIFIER": "Modifikator",
"LOCATION": "Sted",
@ -534,13 +533,6 @@
},
"CATEGORIES": {
"MODIFIED_DATE": "Endringsdato",
"SIZE": "Størrelse",
"SIZE_OPTIONS": {
"SMALL": "Liten",
"MEDIUM": "Middels",
"LARGE": "Stor",
"HUGE": "Enorm"
},
"CREATED_DATE": "Opprettelsesdato",
"EFFECTIVITY_FROM": "Effektivitet fra",
"EFFECTIVITY_TO": "Effektivitet til",
@ -614,3 +606,4 @@
}
}
}

View File

@ -526,7 +526,6 @@
"CREATE_DATE": "Datum gemaakt"
},
"FACET_FIELDS": {
"FILE_TYPE": "Bestandstype",
"CREATOR": "Maker",
"MODIFIER": "Gewijzigd door",
"LOCATION": "Locatie",
@ -534,13 +533,6 @@
},
"CATEGORIES": {
"MODIFIED_DATE": "Datum gewijzigd",
"SIZE": "Grootte",
"SIZE_OPTIONS": {
"SMALL": "Klein",
"MEDIUM": "Gemiddeld",
"LARGE": "Groot",
"HUGE": "Zeer groot"
},
"CREATED_DATE": "Datum gemaakt",
"EFFECTIVITY_FROM": "Effectiviteit vanaf",
"EFFECTIVITY_TO": "Effectiviteit tot",
@ -614,3 +606,4 @@
}
}
}

View File

@ -526,7 +526,6 @@
"CREATE_DATE": "Data utworzenia"
},
"FACET_FIELDS": {
"FILE_TYPE": "Typ pliku",
"CREATOR": "Twórca",
"MODIFIER": "Modyfikator",
"LOCATION": "Lokalizacja",
@ -534,13 +533,6 @@
},
"CATEGORIES": {
"MODIFIED_DATE": "Data modyfikacji",
"SIZE": "Rozmiar",
"SIZE_OPTIONS": {
"SMALL": "Mały",
"MEDIUM": "Średni",
"LARGE": "Duży",
"HUGE": "Ogromny"
},
"CREATED_DATE": "Data utworzenia",
"EFFECTIVITY_FROM": "Data początku obowiązywania",
"EFFECTIVITY_TO": "Data końca obowiązywania",
@ -614,3 +606,4 @@
}
}
}

View File

@ -526,7 +526,6 @@
"CREATE_DATE": "Data de criação"
},
"FACET_FIELDS": {
"FILE_TYPE": "Tipo de arquivo",
"CREATOR": "Criador",
"MODIFIER": "Modificador",
"LOCATION": "Localização",
@ -534,13 +533,6 @@
},
"CATEGORIES": {
"MODIFIED_DATE": "Data de modificação",
"SIZE": "Tamanho",
"SIZE_OPTIONS": {
"SMALL": "Pequeno",
"MEDIUM": "Médio",
"LARGE": "Grande",
"HUGE": "Enorme"
},
"CREATED_DATE": "Data de criação",
"EFFECTIVITY_FROM": "Eficácia de",
"EFFECTIVITY_TO": "Eficácia para",
@ -614,3 +606,4 @@
}
}
}

View File

@ -526,7 +526,6 @@
"CREATE_DATE": "Дата создания"
},
"FACET_FIELDS": {
"FILE_TYPE": "Тип файла",
"CREATOR": "Создатель",
"MODIFIER": "Редактор",
"LOCATION": "Местоположение",
@ -534,13 +533,6 @@
},
"CATEGORIES": {
"MODIFIED_DATE": "Дата изменения",
"SIZE": "Размер",
"SIZE_OPTIONS": {
"SMALL": "Маленький",
"MEDIUM": "Средний",
"LARGE": "Большой",
"HUGE": "Огромный"
},
"CREATED_DATE": "Дата создания",
"EFFECTIVITY_FROM": "Действует с",
"EFFECTIVITY_TO": "Действует до",
@ -614,3 +606,4 @@
}
}
}

View File

@ -526,7 +526,6 @@
"CREATE_DATE": "Skapad datum"
},
"FACET_FIELDS": {
"FILE_TYPE": "Filtyp",
"CREATOR": "Skapad av",
"MODIFIER": "Ändrad av",
"LOCATION": "Plats",
@ -534,13 +533,6 @@
},
"CATEGORIES": {
"MODIFIED_DATE": "Modifierad datum",
"SIZE": "Storlek",
"SIZE_OPTIONS": {
"SMALL": "Litet",
"MEDIUM": "Medium",
"LARGE": "Stort",
"HUGE": "Jättestort"
},
"CREATED_DATE": "Skapad datum",
"EFFECTIVITY_FROM": "Giltighet från",
"EFFECTIVITY_TO": "Giltighet till",
@ -614,3 +606,4 @@
}
}
}

View File

@ -526,7 +526,6 @@
"CREATE_DATE": "创建日期"
},
"FACET_FIELDS": {
"FILE_TYPE": "文件类型",
"CREATOR": "创建者",
"MODIFIER": "修改者",
"LOCATION": "位置",
@ -534,13 +533,6 @@
},
"CATEGORIES": {
"MODIFIED_DATE": "修改日期",
"SIZE": "大小",
"SIZE_OPTIONS": {
"SMALL": "小",
"MEDIUM": "中",
"LARGE": "大",
"HUGE": "特大"
},
"CREATED_DATE": "创建日期",
"EFFECTIVITY_FROM": "有效开始",
"EFFECTIVITY_TO": "有效结束",
@ -614,3 +606,4 @@
}
}
}

View File

@ -0,0 +1,103 @@
/*!
* 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';
import { by, element, ElementArrayFinder, ElementFinder } from 'protractor';
export enum SizeOperator {
AT_LEAST = 'At Least',
AT_MOST = 'At Most',
EXACTLY = 'Exactly'
}
export class PropertiesFilter extends GenericFilter {
private readonly locators = {
fileSizeOperatorSelect: '[data-automation-id=adf-search-properties-file-size-operator-select]',
fileSizeOperatorOption: '.mat-option-text',
selectedFileSizeOperatorOption: '.mat-select-min-line',
fileSizeInput: '[data-automation-id=adf-search-properties-file-size-input]',
fileTypeInput: '[data-automation-id=adf-search-chip-autocomplete-input]',
fileTypeOption: '.mat-option-text',
selectedFileTypeOption: 'adf-search-chip-autocomplete-input .mat-chip span'
};
constructor() {
super('Properties');
}
get fileTypeInput(): ElementFinder {
return this.filterDialogOpened.element(by.css(this.locators.fileTypeInput));
}
get fileTypeOptions(): ElementArrayFinder {
return element.all(by.css(this.locators.fileTypeOption));
}
get fileSizeInput(): ElementFinder {
return this.filterDialogOpened.element(by.css(this.locators.fileSizeInput));
}
get fileSizeOperatorSelect(): ElementFinder {
return this.filterDialogOpened.element(by.css(this.locators.fileSizeOperatorSelect));
}
get fileTypeOperatorOptions(): ElementArrayFinder {
return element.all(by.css(this.locators.fileSizeOperatorOption));
}
get selectedFileTypeOperatorOption(): ElementFinder {
return this.filterDialogOpened.element(by.css(this.locators.selectedFileSizeOperatorOption));
}
async getFileTypesValues(filterValue: string): Promise<string[]> {
await this.fileTypeInput.sendKeys(filterValue);
return this.fileTypeOptions.map((option) => option.getText());
}
async selectFileType(option: string): Promise<void> {
await this.fileTypeInput.sendKeys(option);
return this.fileTypeOptions.filter(async (element) => (await element.getText()) === option).click();
}
async getSelectedFileTypeOptions(): Promise<string[]> {
return this.filterDialogOpened.all(by.css(this.locators.selectedFileTypeOption)).map((option) => option.getText());
}
async typeFileSize(fileSize: string): Promise<void> {
await this.fileSizeInput.sendKeys(fileSize);
}
async selectFileSizeOperator(option: string): Promise<void> {
await this.fileSizeOperatorSelect.click();
await this.fileTypeOperatorOptions.filter(async (element) => (await element.getText() === option)).click();
}
async getFileSizeOperatorValue(): Promise<string> {
return this.selectedFileTypeOperatorOption.getText();
}
async getFileSizeValue(): Promise<string> {
return this.fileSizeInput.getAttribute('value');
}
}

View File

@ -1,66 +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 { by, ElementArrayFinder } from 'protractor';
import { GenericFilter } from './generic-filter';
import { BrowserActions, TestElement } from '@alfresco/adf-testing';
export enum SizeOptions {
Small = 'SMALL',
Medium = 'MEDIUM',
Large = 'LARGE',
Huge = 'HUGE'
}
export class SizeFilter extends GenericFilter {
constructor() {
super('Size');
}
facets: ElementArrayFinder = this.filterDialogOpened.all(by.css('.mat-checkbox'));
selectedFacets: ElementArrayFinder = this.filterDialogOpened.all(by.css('.mat-checkbox.mat-checkbox-checked'));
public getSizeCheckboxOption = (sizeOption: SizeOptions) =>
TestElement.byCss(`[data-automation-id="checkbox-SEARCH.CATEGORIES.SIZE_OPTIONS.${sizeOption}"] [type="checkbox"]`);
async getFiltersValues(): Promise<string[]> {
return this.facets.map((option) => {
return option.getText();
});
}
async getFiltersCheckedValues(): Promise<string[]> {
return this.selectedFacets.map((option) => {
return option.getText();
});
}
async resetPanel(): Promise<void> {
if ((await this.selectedFacets.count()) > 0) {
await this.openDialog();
await this.selectedFacets.each(async (elem) => {
await BrowserActions.click(elem);
});
}
await this.closeDialog();
}
}

View File

@ -26,7 +26,7 @@ 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/size-filter';
export * from './filters/properties-filter';
export * from './search-filters';
export * from './search-input';
export * from './search-sorting-picker';

View File

@ -24,17 +24,16 @@
import { by, browser } from 'protractor';
import { Component } from '../component';
import { SizeFilter } from './filters/size-filter';
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';
export class SearchFilters extends Component {
resetAllButton = browser.element(by.css('button[adf-reset-search]'));
size = new SizeFilter();
createdDate = new CreatedDateFilter();
fileType = new FacetFilter('File type');
fileType = new PropertiesFilter();
creator = new FacetFilter('Creator');
modifier = new FacetFilter('Modifier');
location = new AutocompleteChipsFilter('Location');