[ACS-9482] [E2E] included XAT-17700 and XAT-17702 (#4543)

This commit is contained in:
Adam Świderski 2025-04-28 14:42:11 +02:00 committed by GitHub
parent e7732d82dd
commit 8e019a1295
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 122 additions and 97 deletions

View File

@ -3,7 +3,5 @@
"XAT-5600": "https://hyland.atlassian.net/browse/ACS-6928", "XAT-5600": "https://hyland.atlassian.net/browse/ACS-6928",
"XAT-17697": "https://hyland.atlassian.net/browse/ACS-7464", "XAT-17697": "https://hyland.atlassian.net/browse/ACS-7464",
"XAT-5580": "https://hyland.atlassian.net/browse/ACS-7682", "XAT-5580": "https://hyland.atlassian.net/browse/ACS-7682",
"XAT-5571": "https://hyland.atlassian.net/browse/ACS-9192", "XAT-5571": "https://hyland.atlassian.net/browse/ACS-9192"
"XAT-17700": "https://hyland.atlassian.net/browse/ACS-9482",
"XAT-17702": "https://hyland.atlassian.net/browse/ACS-9482"
} }

View File

@ -31,14 +31,15 @@ test.describe('Search - Filters - Date', () => {
const randomId = Utils.random(); const randomId = Utils.random();
const username = `user-${randomId}`; const username = `user-${randomId}`;
const fileNamePdfKb = `${randomId}-fileNamePdf.pdf`;
const fileNameJpgMb = `${randomId}-fileNameJpg.jpg`;
const currentAndPreviousDay = Utils.getCurrentAndPreviousDay();
test.beforeEach(async ({ loginPage }) => { test.beforeEach(async ({ loginPage }) => {
await Utils.tryLoginUser(loginPage, username, username, 'beforeEach failed'); await Utils.tryLoginUser(loginPage, username, username, 'beforeEach failed');
}); });
test.describe('Search - Filters - Date - General', () => {
const fileNamePdfKb = `${randomId}-fileNamePdf.pdf`;
const fileNameJpgMb = `${randomId}-fileNameJpg.jpg`;
test.beforeAll(async () => { test.beforeAll(async () => {
try { try {
const apiClientFactory = new ApiClientFactory(); const apiClientFactory = new ApiClientFactory();
@ -119,17 +120,42 @@ test.describe('Search - Filters - Date', () => {
inTheLastInputValue: '1' inTheLastInputValue: '1'
}); });
}); });
});
test.describe('Search - Filters - Date - Modified/Created', () => {
const currentAndPreviousDay = Utils.getCurrentAndPreviousDay();
const searchPhrase = `Project Contract`;
const fileNamePng = `${randomId}-${searchPhrase}.png`;
const dateForSearch = '01-Jan-21';
test.beforeAll(async () => {
try {
const apiClientFactory = new ApiClientFactory();
await apiClientFactory.setUpAcaBackend('admin');
await apiClientFactory.createUser({ username });
trashcanApi = await TrashcanApi.initialize(username, username);
nodesApi = await NodesApi.initialize(username, username);
const fileActionsApi = await FileActionsApi.initialize(username, username);
await fileActionsApi.uploadFileWithRename(TEST_FILES.PNG_FILE.path, fileNamePng, '-my-');
} catch (error) {
console.error(`beforeAll failed: ${error}`);
}
});
test.afterAll(async () => {
await Utils.deleteNodesSitesEmptyTrashcan(nodesApi, trashcanApi, 'afterAll failed');
});
test('[XAT-17700] Should able to filter search result with Created date under Date Facet - Created between', async ({ searchPage }) => { test('[XAT-17700] Should able to filter search result with Created date under Date Facet - Created between', async ({ searchPage }) => {
await searchPage.searchFiltersDate.filterFilesByDate({ await searchPage.searchFiltersDate.filterFilesByDate({
searchPage, searchPage,
filterType: 'between', filterType: 'between',
dateFilterTab: 'Created', dateFilterTab: 'Created',
searchPhrase: randomId, searchPhrase: searchPhrase,
searchType: 'files', searchType: 'files',
expectSearchResults: 2, expectSearchResults: 1,
inTheLastInputValue: '1', inTheLastInputValue: '1',
startDay: currentAndPreviousDay.previousDate, startDay: dateForSearch,
endDay: currentAndPreviousDay.currentDate endDay: currentAndPreviousDay.currentDate
}); });
}); });
@ -139,12 +165,13 @@ test.describe('Search - Filters - Date', () => {
searchPage, searchPage,
filterType: 'between', filterType: 'between',
dateFilterTab: 'Modified', dateFilterTab: 'Modified',
searchPhrase: randomId, searchPhrase: searchPhrase,
searchType: 'files', searchType: 'files',
expectSearchResults: 2, expectSearchResults: 1,
inTheLastInputValue: '1', inTheLastInputValue: '1',
startDay: currentAndPreviousDay.previousDate, startDay: dateForSearch,
endDay: currentAndPreviousDay.currentDate endDay: currentAndPreviousDay.currentDate
}); });
}); });
});
}); });