Remove excluded test (#6096)

* remove excluded test part1

* remove fit

* fix

* fix lint

* fix

* fix

* fix

* fix

* fix lint

* fix lint

* fixes

* update protractor due incompatibility with new node versions

* increase timeout pdf when system is busy
This commit is contained in:
Eugenio Romano 2020-09-08 14:39:22 +01:00 committed by GitHub
parent 8d6baf2536
commit c57253ff54
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
22 changed files with 238 additions and 143 deletions

View File

@ -136,6 +136,9 @@ describe('Edit folder directive', () => {
await editFolderDialog.checkCreateUpdateBtnIsEnabled(); await editFolderDialog.checkCreateUpdateBtnIsEnabled();
await editFolderDialog.clickOnCreateUpdateButton(); await editFolderDialog.clickOnCreateUpdateButton();
await editFolderDialog.checkFolderDialogIsDisplayed(); await editFolderDialog.checkFolderDialogIsDisplayed();
await browser.sleep(3000); // The error needs time to come back
await notificationHistoryPage.checkNotifyContains('There\'s already a folder with this name. Try a different name.'); await notificationHistoryPage.checkNotifyContains('There\'s already a folder with this name. Try a different name.');
}); });
@ -228,6 +231,7 @@ describe('Edit folder directive', () => {
describe('Edit Folder - no permission', () => { describe('Edit Folder - no permission', () => {
beforeEach(async () => { beforeEach(async () => {
await navigationBarPage.clickLogoutButton();
await loginPage.login(anotherAcsUser.email, anotherAcsUser.password); await loginPage.login(anotherAcsUser.email, anotherAcsUser.password);
await BrowserActions.getUrl(browser.baseUrl + '/files/' + editFolder.entry.id); await BrowserActions.getUrl(browser.baseUrl + '/files/' + editFolder.entry.id);
await contentServicesPage.getDocumentList().dataTablePage().waitTillContentLoaded(); await contentServicesPage.getDocumentList().dataTablePage().waitTillContentLoaded();

View File

@ -105,7 +105,7 @@ describe('Document List - Pagination', () => {
beforeEach(async () => { beforeEach(async () => {
await contentServicesPage.goToDocumentList(); await contentServicesPage.goToDocumentList();
await contentServicesPage.checkDocumentListElementsAreDisplayed(); await contentServicesPage.contentList.dataTablePage().waitTillContentLoaded();
}); });
it('[C260062] Should use default pagination settings', async () => { it('[C260062] Should use default pagination settings', async () => {
@ -122,7 +122,7 @@ describe('Document List - Pagination', () => {
it('[C274713] Should be able to set Items per page to 20', async () => { it('[C274713] Should be able to set Items per page to 20', async () => {
await contentServicesPage.openFolder(newFolderModel.name); await contentServicesPage.openFolder(newFolderModel.name);
await paginationPage.selectItemsPerPage(itemsPerPage.twenty); await paginationPage.selectItemsPerPage(itemsPerPage.twenty);
await contentServicesPage.checkDocumentListElementsAreDisplayed(); await contentServicesPage.contentList.dataTablePage().waitTillContentLoaded();
await expect(await paginationPage.getCurrentItemsPerPage()).toEqual(itemsPerPage.twenty); await expect(await paginationPage.getCurrentItemsPerPage()).toEqual(itemsPerPage.twenty);
await expect(await paginationPage.getPaginationRange()).toEqual(`Showing 1-${nrOfFiles} of ${nrOfFiles}`); await expect(await paginationPage.getPaginationRange()).toEqual(`Showing 1-${nrOfFiles} of ${nrOfFiles}`);
@ -134,9 +134,11 @@ describe('Document List - Pagination', () => {
await navigationBarPage.clickLogoutButton(); await navigationBarPage.clickLogoutButton();
await loginPage.login(acsUser.email, acsUser.password); await loginPage.login(acsUser.email, acsUser.password);
await contentServicesPage.goToDocumentList(); await contentServicesPage.goToDocumentList();
await contentServicesPage.checkDocumentListElementsAreDisplayed(); await contentServicesPage.contentList.dataTablePage().waitTillContentLoaded();
await expect(await paginationPage.getCurrentItemsPerPage()).toEqual(itemsPerPage.twenty); await expect(await paginationPage.getCurrentItemsPerPage()).toEqual(itemsPerPage.twenty);
await navigationBarPage.clickLogoutButton(); await navigationBarPage.clickLogoutButton();
await loginPage.login(acsUser.email, acsUser.password); await loginPage.login(acsUser.email, acsUser.password);
}); });
@ -144,7 +146,7 @@ describe('Document List - Pagination', () => {
it('[C260069] Should be able to set Items per page to 5', async () => { it('[C260069] Should be able to set Items per page to 5', async () => {
await contentServicesPage.openFolder(newFolderModel.name); await contentServicesPage.openFolder(newFolderModel.name);
await paginationPage.selectItemsPerPage(itemsPerPage.five); await paginationPage.selectItemsPerPage(itemsPerPage.five);
await contentServicesPage.checkDocumentListElementsAreDisplayed(); await contentServicesPage.contentList.dataTablePage().waitTillContentLoaded();
await expect(await paginationPage.getCurrentItemsPerPage()).toEqual(itemsPerPage.five); await expect(await paginationPage.getCurrentItemsPerPage()).toEqual(itemsPerPage.five);
await expect(await paginationPage.getPaginationRange()).toEqual(`Showing 1-${itemsPerPage.fiveValue * currentPage} of ${nrOfFiles}`); await expect(await paginationPage.getPaginationRange()).toEqual(`Showing 1-${itemsPerPage.fiveValue * currentPage} of ${nrOfFiles}`);
@ -153,7 +155,7 @@ describe('Document List - Pagination', () => {
await expect(ArrayUtil.arrayContainsArray(list, fileNames.slice(0, 5))).toEqual(true); await expect(ArrayUtil.arrayContainsArray(list, fileNames.slice(0, 5))).toEqual(true);
await paginationPage.clickOnNextPage(); await paginationPage.clickOnNextPage();
currentPage++; currentPage++;
await contentServicesPage.checkDocumentListElementsAreDisplayed(); await contentServicesPage.contentList.dataTablePage().waitTillContentLoaded();
await expect(await paginationPage.getCurrentItemsPerPage()).toEqual(itemsPerPage.five); await expect(await paginationPage.getCurrentItemsPerPage()).toEqual(itemsPerPage.five);
await expect(await paginationPage.getPaginationRange()).toEqual(`Showing 6-${itemsPerPage.fiveValue * currentPage} of ${nrOfFiles}`); await expect(await paginationPage.getPaginationRange()).toEqual(`Showing 6-${itemsPerPage.fiveValue * currentPage} of ${nrOfFiles}`);
await expect(await contentServicesPage.numberOfResultsDisplayed()).toBe(itemsPerPage.fiveValue); await expect(await contentServicesPage.numberOfResultsDisplayed()).toBe(itemsPerPage.fiveValue);
@ -161,7 +163,7 @@ describe('Document List - Pagination', () => {
await expect(ArrayUtil.arrayContainsArray(list, fileNames.slice(5, 10))).toEqual(true); await expect(ArrayUtil.arrayContainsArray(list, fileNames.slice(5, 10))).toEqual(true);
await paginationPage.clickOnNextPage(); await paginationPage.clickOnNextPage();
currentPage++; currentPage++;
await contentServicesPage.checkDocumentListElementsAreDisplayed(); await contentServicesPage.contentList.dataTablePage().waitTillContentLoaded();
await expect(await paginationPage.getCurrentItemsPerPage()).toEqual(itemsPerPage.five); await expect(await paginationPage.getCurrentItemsPerPage()).toEqual(itemsPerPage.five);
await expect(await paginationPage.getPaginationRange()).toEqual(`Showing 11-${itemsPerPage.fiveValue * currentPage} of ${nrOfFiles}`); await expect(await paginationPage.getPaginationRange()).toEqual(`Showing 11-${itemsPerPage.fiveValue * currentPage} of ${nrOfFiles}`);
await expect(await contentServicesPage.numberOfResultsDisplayed()).toBe(itemsPerPage.fiveValue); await expect(await contentServicesPage.numberOfResultsDisplayed()).toBe(itemsPerPage.fiveValue);
@ -169,7 +171,7 @@ describe('Document List - Pagination', () => {
await expect(ArrayUtil.arrayContainsArray(list, fileNames.slice(10, 15))).toEqual(true); await expect(ArrayUtil.arrayContainsArray(list, fileNames.slice(10, 15))).toEqual(true);
await paginationPage.clickOnNextPage(); await paginationPage.clickOnNextPage();
currentPage++; currentPage++;
await contentServicesPage.checkDocumentListElementsAreDisplayed(); await contentServicesPage.contentList.dataTablePage().waitTillContentLoaded();
await expect(await paginationPage.getCurrentItemsPerPage()).toEqual(itemsPerPage.five); await expect(await paginationPage.getCurrentItemsPerPage()).toEqual(itemsPerPage.five);
await expect(await paginationPage.getPaginationRange()).toEqual(`Showing 16-${itemsPerPage.fiveValue * currentPage} of ${nrOfFiles}`); await expect(await paginationPage.getPaginationRange()).toEqual(`Showing 16-${itemsPerPage.fiveValue * currentPage} of ${nrOfFiles}`);
await expect(await contentServicesPage.numberOfResultsDisplayed()).toBe(itemsPerPage.fiveValue); await expect(await contentServicesPage.numberOfResultsDisplayed()).toBe(itemsPerPage.fiveValue);
@ -177,7 +179,7 @@ describe('Document List - Pagination', () => {
await expect(ArrayUtil.arrayContainsArray(list, fileNames.slice(15, 20))).toEqual(true); await expect(ArrayUtil.arrayContainsArray(list, fileNames.slice(15, 20))).toEqual(true);
await browser.refresh(); await browser.refresh();
await contentServicesPage.checkDocumentListElementsAreDisplayed(); await contentServicesPage.contentList.dataTablePage().waitTillContentLoaded();
await expect(await paginationPage.getCurrentItemsPerPage()).toEqual(itemsPerPage.five); await expect(await paginationPage.getCurrentItemsPerPage()).toEqual(itemsPerPage.five);
await navigationBarPage.clickLogoutButton(); await navigationBarPage.clickLogoutButton();
await loginPage.login(acsUser.email, acsUser.password); await loginPage.login(acsUser.email, acsUser.password);
@ -187,7 +189,7 @@ describe('Document List - Pagination', () => {
currentPage = 1; currentPage = 1;
await contentServicesPage.openFolder(newFolderModel.name); await contentServicesPage.openFolder(newFolderModel.name);
await paginationPage.selectItemsPerPage(itemsPerPage.ten); await paginationPage.selectItemsPerPage(itemsPerPage.ten);
await contentServicesPage.checkDocumentListElementsAreDisplayed(); await contentServicesPage.contentList.dataTablePage().waitTillContentLoaded();
await expect(await paginationPage.getCurrentItemsPerPage()).toEqual(itemsPerPage.ten); await expect(await paginationPage.getCurrentItemsPerPage()).toEqual(itemsPerPage.ten);
await expect(await paginationPage.getPaginationRange()).toEqual(`Showing 1-${itemsPerPage.tenValue * currentPage} of ${nrOfFiles}`); await expect(await paginationPage.getPaginationRange()).toEqual(`Showing 1-${itemsPerPage.tenValue * currentPage} of ${nrOfFiles}`);
@ -196,7 +198,7 @@ describe('Document List - Pagination', () => {
await expect(ArrayUtil.arrayContainsArray(list, fileNames.slice(0, 10))).toEqual(true); await expect(ArrayUtil.arrayContainsArray(list, fileNames.slice(0, 10))).toEqual(true);
await paginationPage.clickOnNextPage(); await paginationPage.clickOnNextPage();
currentPage++; currentPage++;
await contentServicesPage.checkDocumentListElementsAreDisplayed(); await contentServicesPage.contentList.dataTablePage().waitTillContentLoaded();
await expect(await paginationPage.getCurrentItemsPerPage()).toEqual(itemsPerPage.ten); await expect(await paginationPage.getCurrentItemsPerPage()).toEqual(itemsPerPage.ten);
await expect(await paginationPage.getPaginationRange()).toEqual(`Showing 11-${itemsPerPage.tenValue * currentPage} of ${nrOfFiles}`); await expect(await paginationPage.getPaginationRange()).toEqual(`Showing 11-${itemsPerPage.tenValue * currentPage} of ${nrOfFiles}`);
await expect(await contentServicesPage.numberOfResultsDisplayed()).toBe(itemsPerPage.tenValue); await expect(await contentServicesPage.numberOfResultsDisplayed()).toBe(itemsPerPage.tenValue);
@ -216,7 +218,7 @@ describe('Document List - Pagination', () => {
await contentServicesPage.openFolder(newFolderModel.name); await contentServicesPage.openFolder(newFolderModel.name);
await expect(await contentServicesPage.getActiveBreadcrumb()).toEqual(newFolderModel.name); await expect(await contentServicesPage.getActiveBreadcrumb()).toEqual(newFolderModel.name);
await paginationPage.selectItemsPerPage(itemsPerPage.fifteen); await paginationPage.selectItemsPerPage(itemsPerPage.fifteen);
await contentServicesPage.checkDocumentListElementsAreDisplayed(); await contentServicesPage.contentList.dataTablePage().waitTillContentLoaded();
await expect(await paginationPage.getCurrentItemsPerPage()).toEqual(itemsPerPage.fifteen); await expect(await paginationPage.getCurrentItemsPerPage()).toEqual(itemsPerPage.fifteen);
await expect(await paginationPage.getPaginationRange()).toEqual(`Showing 1-${itemsPerPage.fifteenValue * currentPage} of ${nrOfFiles}`); await expect(await paginationPage.getPaginationRange()).toEqual(`Showing 1-${itemsPerPage.fifteenValue * currentPage} of ${nrOfFiles}`);
@ -225,7 +227,7 @@ describe('Document List - Pagination', () => {
await expect(ArrayUtil.arrayContainsArray(list, fileNames.slice(0, 15))).toEqual(true); await expect(ArrayUtil.arrayContainsArray(list, fileNames.slice(0, 15))).toEqual(true);
currentPage++; currentPage++;
await paginationPage.clickOnNextPage(); await paginationPage.clickOnNextPage();
await contentServicesPage.checkDocumentListElementsAreDisplayed(); await contentServicesPage.contentList.dataTablePage().waitTillContentLoaded();
await expect(await paginationPage.getCurrentItemsPerPage()).toEqual(itemsPerPage.fifteen); await expect(await paginationPage.getCurrentItemsPerPage()).toEqual(itemsPerPage.fifteen);
await expect(await paginationPage.getPaginationRange()).toEqual(`Showing 16-${nrOfFiles} of ${nrOfFiles}`); await expect(await paginationPage.getPaginationRange()).toEqual(`Showing 16-${nrOfFiles} of ${nrOfFiles}`);
@ -241,8 +243,9 @@ describe('Document List - Pagination', () => {
it('[C91320] Pagination should preserve sorting', async () => { it('[C91320] Pagination should preserve sorting', async () => {
await contentServicesPage.openFolder(newFolderModel.name); await contentServicesPage.openFolder(newFolderModel.name);
await expect(await contentServicesPage.getActiveBreadcrumb()).toEqual(newFolderModel.name); await expect(await contentServicesPage.getActiveBreadcrumb()).toEqual(newFolderModel.name);
await paginationPage.selectItemsPerPage(itemsPerPage.twenty); await paginationPage.selectItemsPerPage(itemsPerPage.twenty);
await contentServicesPage.checkDocumentListElementsAreDisplayed(); await contentServicesPage.contentList.dataTablePage().waitTillContentLoaded();
await expect(await contentServicesPage.getDocumentList().dataTablePage().checkListIsSorted('ASC', 'Display name')); await expect(await contentServicesPage.getDocumentList().dataTablePage().checkListIsSorted('ASC', 'Display name'));
@ -250,28 +253,36 @@ describe('Document List - Pagination', () => {
await expect(await contentServicesPage.getDocumentList().dataTablePage().checkListIsSorted('DESC', 'Display name')); await expect(await contentServicesPage.getDocumentList().dataTablePage().checkListIsSorted('DESC', 'Display name'));
await paginationPage.selectItemsPerPage(itemsPerPage.five); await paginationPage.selectItemsPerPage(itemsPerPage.five);
await contentServicesPage.checkDocumentListElementsAreDisplayed(); await contentServicesPage.contentList.dataTablePage().waitTillContentLoaded();
await expect(await contentServicesPage.getDocumentList().dataTablePage().checkListIsSorted('DESC', 'Display name')); await expect(await contentServicesPage.getDocumentList().dataTablePage().checkListIsSorted('DESC', 'Display name'));
await paginationPage.clickOnNextPage(); await paginationPage.clickOnNextPage();
await contentServicesPage.checkDocumentListElementsAreDisplayed(); await contentServicesPage.contentList.dataTablePage().waitTillContentLoaded();
await expect(await contentServicesPage.getDocumentList().dataTablePage().checkListIsSorted('DESC', 'Display name')); await expect(await contentServicesPage.getDocumentList().dataTablePage().checkListIsSorted('DESC', 'Display name'));
await paginationPage.selectItemsPerPage(itemsPerPage.ten); await paginationPage.selectItemsPerPage(itemsPerPage.ten);
await contentServicesPage.checkDocumentListElementsAreDisplayed(); await contentServicesPage.contentList.dataTablePage().waitTillContentLoaded();
await expect(await contentServicesPage.getDocumentList().dataTablePage().checkListIsSorted('DESC', 'Display name')); await expect(await contentServicesPage.getDocumentList().dataTablePage().checkListIsSorted('DESC', 'Display name'));
}); });
it('[C260107] Should not display pagination bar when a folder is empty', async () => { it('[C260107] Should not display pagination bar when a folder is empty', async () => {
await paginationPage.selectItemsPerPage(itemsPerPage.five); await paginationPage.selectItemsPerPage(itemsPerPage.five);
await contentServicesPage.contentList.dataTablePage().waitTillContentLoaded();
await expect(await paginationPage.getCurrentItemsPerPage()).toEqual(itemsPerPage.five); await expect(await paginationPage.getCurrentItemsPerPage()).toEqual(itemsPerPage.five);
await contentServicesPage.openFolder(newFolderModel.name); await contentServicesPage.openFolder(newFolderModel.name);
await expect(await contentServicesPage.getActiveBreadcrumb()).toEqual(newFolderModel.name); await expect(await contentServicesPage.getActiveBreadcrumb()).toEqual(newFolderModel.name);
await expect(await paginationPage.getCurrentItemsPerPage()).toEqual(itemsPerPage.five); await expect(await paginationPage.getCurrentItemsPerPage()).toEqual(itemsPerPage.five);
await contentServicesPage.createAndOpenNewFolder(folderTwoModel.name);
await contentServicesPage.checkPaginationIsNotDisplayed();
await contentServicesPage.createAndOpenNewFolder(folderTwoModel.name);
await contentServicesPage.checkPaginationIsNotDisplayed();
await contentServicesPage.deleteSubFolderUnderRoot(newFolderModel.name, folderTwoModel.name); await contentServicesPage.deleteSubFolderUnderRoot(newFolderModel.name, folderTwoModel.name);
}); });
it('[C260071] Should be able to change pagination when having 25 files', async () => { it('[C260071] Should be able to change pagination when having 25 files', async () => {
@ -279,7 +290,7 @@ describe('Document List - Pagination', () => {
await contentServicesPage.openFolder(folderThreeModel.name); await contentServicesPage.openFolder(folderThreeModel.name);
await expect(await contentServicesPage.getActiveBreadcrumb()).toEqual(folderThreeModel.name); await expect(await contentServicesPage.getActiveBreadcrumb()).toEqual(folderThreeModel.name);
await paginationPage.selectItemsPerPage(itemsPerPage.fifteen); await paginationPage.selectItemsPerPage(itemsPerPage.fifteen);
await contentServicesPage.checkDocumentListElementsAreDisplayed(); await contentServicesPage.contentList.dataTablePage().waitTillContentLoaded();
await expect(await paginationPage.getCurrentItemsPerPage()).toEqual(itemsPerPage.fifteen); await expect(await paginationPage.getCurrentItemsPerPage()).toEqual(itemsPerPage.fifteen);
await expect(await paginationPage.getPaginationRange()).toEqual(`Showing 1-${itemsPerPage.fifteenValue * currentPage} of ${secondSetNumber}`); await expect(await paginationPage.getPaginationRange()).toEqual(`Showing 1-${itemsPerPage.fifteenValue * currentPage} of ${secondSetNumber}`);
@ -289,7 +300,7 @@ describe('Document List - Pagination', () => {
currentPage++; currentPage++;
await paginationPage.clickOnNextPage(); await paginationPage.clickOnNextPage();
await contentServicesPage.checkDocumentListElementsAreDisplayed(); await contentServicesPage.contentList.dataTablePage().waitTillContentLoaded();
await expect(await paginationPage.getCurrentItemsPerPage()).toEqual(itemsPerPage.fifteen); await expect(await paginationPage.getCurrentItemsPerPage()).toEqual(itemsPerPage.fifteen);
await expect(await paginationPage.getPaginationRange()).toEqual(`Showing 16-${secondSetNumber} of ${secondSetNumber}`); await expect(await paginationPage.getPaginationRange()).toEqual(`Showing 16-${secondSetNumber} of ${secondSetNumber}`);
await expect(await contentServicesPage.numberOfResultsDisplayed()).toBe(secondSetNumber - itemsPerPage.fifteenValue); await expect(await contentServicesPage.numberOfResultsDisplayed()).toBe(secondSetNumber - itemsPerPage.fifteenValue);
@ -298,7 +309,7 @@ describe('Document List - Pagination', () => {
currentPage = 1; currentPage = 1;
await paginationPage.selectItemsPerPage(itemsPerPage.twenty); await paginationPage.selectItemsPerPage(itemsPerPage.twenty);
await contentServicesPage.checkDocumentListElementsAreDisplayed(); await contentServicesPage.contentList.dataTablePage().waitTillContentLoaded();
await expect(await paginationPage.getCurrentItemsPerPage()).toEqual(itemsPerPage.twenty); await expect(await paginationPage.getCurrentItemsPerPage()).toEqual(itemsPerPage.twenty);
await expect(await paginationPage.getPaginationRange()).toEqual(`Showing 1-${itemsPerPage.twentyValue * currentPage} of ${secondSetNumber}`); await expect(await paginationPage.getPaginationRange()).toEqual(`Showing 1-${itemsPerPage.twentyValue * currentPage} of ${secondSetNumber}`);
await expect(await contentServicesPage.numberOfResultsDisplayed()).toBe(itemsPerPage.twentyValue); await expect(await contentServicesPage.numberOfResultsDisplayed()).toBe(itemsPerPage.twentyValue);
@ -307,7 +318,7 @@ describe('Document List - Pagination', () => {
currentPage++; currentPage++;
await paginationPage.clickOnNextPage(); await paginationPage.clickOnNextPage();
await contentServicesPage.checkDocumentListElementsAreDisplayed(); await contentServicesPage.contentList.dataTablePage().waitTillContentLoaded();
await expect(await paginationPage.getCurrentItemsPerPage()).toEqual(itemsPerPage.twenty); await expect(await paginationPage.getCurrentItemsPerPage()).toEqual(itemsPerPage.twenty);
await expect(await paginationPage.getPaginationRange()).toEqual(`Showing 21-${secondSetNumber} of ${secondSetNumber}`); await expect(await paginationPage.getPaginationRange()).toEqual(`Showing 21-${secondSetNumber} of ${secondSetNumber}`);
await expect(await contentServicesPage.numberOfResultsDisplayed()).toBe(secondSetNumber - itemsPerPage.twentyValue); await expect(await contentServicesPage.numberOfResultsDisplayed()).toBe(secondSetNumber - itemsPerPage.twentyValue);
@ -317,6 +328,8 @@ describe('Document List - Pagination', () => {
it('[C216321] Should be able to modify the supported page size value', async () => { it('[C216321] Should be able to modify the supported page size value', async () => {
await paginationPage.clickItemsPerPageDropdown(); await paginationPage.clickItemsPerPageDropdown();
await contentServicesPage.contentList.dataTablePage().waitTillContentLoaded();
await expect(await paginationPage.getItemsPerPageDropdownOptions()).toEqual(['5', '10', '15', '20']); await expect(await paginationPage.getItemsPerPageDropdownOptions()).toEqual(['5', '10', '15', '20']);
await LocalStorageUtil.setUserPreference('supportedPageSizes', JSON.stringify([5, 10, 15, 21])); await LocalStorageUtil.setUserPreference('supportedPageSizes', JSON.stringify([5, 10, 15, 21]));
@ -328,11 +341,18 @@ describe('Document List - Pagination', () => {
await contentServicesPage.checkContentIsDisplayed(docxFileModel.name); await contentServicesPage.checkContentIsDisplayed(docxFileModel.name);
await uploadDialog.clickOnCloseButton(); await uploadDialog.clickOnCloseButton();
await uploadDialog.dialogIsNotDisplayed(); await uploadDialog.dialogIsNotDisplayed();
await paginationPage.clickItemsPerPageDropdown(); await paginationPage.clickItemsPerPageDropdown();
await contentServicesPage.contentList.dataTablePage().waitTillContentLoaded();
await expect(await paginationPage.getItemsPerPageDropdownOptions()).toEqual(['5', '10', '15', '21']); await expect(await paginationPage.getItemsPerPageDropdownOptions()).toEqual(['5', '10', '15', '21']);
await paginationPage.clickItemsPerPageDropdown(); await paginationPage.clickItemsPerPageDropdown();
await contentServicesPage.contentList.dataTablePage().waitTillContentLoaded();
await paginationPage.selectItemsPerPage(itemsPerPage.twentyOne); await paginationPage.selectItemsPerPage(itemsPerPage.twentyOne);
await contentServicesPage.contentList.dataTablePage().waitTillContentLoaded();
await expect(await paginationPage.getCurrentItemsPerPage()).toEqual(itemsPerPage.twentyOne); await expect(await paginationPage.getCurrentItemsPerPage()).toEqual(itemsPerPage.twentyOne);
await browser.refresh(); await browser.refresh();
await expect(await paginationPage.getPaginationRange()).toEqual(`Showing 1-${itemsPerPage.twentyOneValue} of ${numberOfFilesAfterUpload}`); await expect(await paginationPage.getPaginationRange()).toEqual(`Showing 1-${itemsPerPage.twentyOneValue} of ${numberOfFilesAfterUpload}`);
@ -341,11 +361,15 @@ describe('Document List - Pagination', () => {
await LocalStorageUtil.setUserPreference('supportedPageSizes', JSON.stringify([5, 10, 15, 20])); await LocalStorageUtil.setUserPreference('supportedPageSizes', JSON.stringify([5, 10, 15, 20]));
await browser.refresh(); await browser.refresh();
await paginationPage.clickItemsPerPageDropdown(); await paginationPage.clickItemsPerPageDropdown();
await contentServicesPage.contentList.dataTablePage().waitTillContentLoaded();
await expect(await paginationPage.getItemsPerPageDropdownOptions()).toEqual(['5', '10', '15', '20']); await expect(await paginationPage.getItemsPerPageDropdownOptions()).toEqual(['5', '10', '15', '20']);
}); });
it('[C272767] Should propagate the option chosen regarding displaying items per page to files/folders inside a folder', async () => { it('[C272767] Should propagate the option chosen regarding displaying items per page to files/folders inside a folder', async () => {
await paginationPage.selectItemsPerPage(itemsPerPage.five); await paginationPage.selectItemsPerPage(itemsPerPage.five);
await contentServicesPage.contentList.dataTablePage().waitTillContentLoaded();
await contentServicesPage.openFolder(newFolderModel.name); await contentServicesPage.openFolder(newFolderModel.name);
await expect(await contentServicesPage.getActiveBreadcrumb()).toEqual(newFolderModel.name); await expect(await contentServicesPage.getActiveBreadcrumb()).toEqual(newFolderModel.name);
await expect(await paginationPage.getCurrentItemsPerPage()).toEqual(itemsPerPage.five); await expect(await paginationPage.getCurrentItemsPerPage()).toEqual(itemsPerPage.five);
@ -380,14 +404,16 @@ describe('Document List - Pagination', () => {
it('[C260064] Should download only the last selection when changing pages in Single mode', async () => { it('[C260064] Should download only the last selection when changing pages in Single mode', async () => {
await paginationPage.selectItemsPerPage(itemsPerPage.five); await paginationPage.selectItemsPerPage(itemsPerPage.five);
await contentServicesPage.contentList.dataTablePage().waitTillContentLoaded();
await contentServicesPage.openFolder(newFolderModel.name); await contentServicesPage.openFolder(newFolderModel.name);
await expect(await paginationPage.getCurrentItemsPerPage()).toEqual(itemsPerPage.five); await expect(await paginationPage.getCurrentItemsPerPage()).toEqual(itemsPerPage.five);
await apiService.getInstance().login(acsUser.email, acsUser.password);
await contentServicesPage.createNewFolder(folderTwoModel.name); await contentServicesPage.createNewFolder(folderTwoModel.name);
const nodeIdSubFolderTwo = await contentServicesPage.getAttributeValueForElement(folderTwoModel.name, 'Node id'); const nodeIdSubFolderTwo = await contentServicesPage.getAttributeValueForElement(folderTwoModel.name, 'Node id');
await contentServicesPage.openFolder(folderTwoModel.name); await contentServicesPage.openFolder(folderTwoModel.name);
await apiService.getInstance().login(acsUser.email, acsUser.password);
for (let i = 0; i < numberOfSubFolders; i++) { for (let i = 0; i < numberOfSubFolders; i++) {
await uploadActions.createFolder('subfolder' + (i + 1), nodeIdSubFolderTwo); await uploadActions.createFolder('subfolder' + (i + 1), nodeIdSubFolderTwo);
} }

View File

@ -121,9 +121,12 @@ describe('Enable infinite scrolling', () => {
await contentServicesPage.doubleClickRow(folderModel.name); await contentServicesPage.doubleClickRow(folderModel.name);
await contentServicesPage.enableInfiniteScrolling(); await contentServicesPage.enableInfiniteScrolling();
await contentServicesPage.contentList.dataTablePage().waitTillContentLoaded();
await expect(await contentServicesPage.numberOfResultsDisplayed()).toBe(pageSize); await expect(await contentServicesPage.numberOfResultsDisplayed()).toBe(pageSize);
await infinitePaginationPage.clickLoadMoreButton(); await infinitePaginationPage.clickLoadMoreButton();
await contentServicesPage.contentList.dataTablePage().waitTillContentLoaded();
await expect(await contentServicesPage.numberOfResultsDisplayed()).toBe(nrOfFiles); await expect(await contentServicesPage.numberOfResultsDisplayed()).toBe(nrOfFiles);
await infinitePaginationPage.checkLoadMoreButtonIsNotDisplayed(); await infinitePaginationPage.checkLoadMoreButtonIsNotDisplayed();

View File

@ -345,6 +345,7 @@ export class ContentServicesPage {
async doubleClickRow(nodeName): Promise<void> { async doubleClickRow(nodeName): Promise<void> {
await this.contentList.doubleClickRow(nodeName); await this.contentList.doubleClickRow(nodeName);
await this.contentList.dataTablePage().waitTillContentLoaded();
} }
async selectRow(nodeName): Promise<void> { async selectRow(nodeName): Promise<void> {
@ -394,7 +395,6 @@ export class ContentServicesPage {
async openFolder(folderName: string): Promise<void> { async openFolder(folderName: string): Promise<void> {
await this.doubleClickRow(folderName); await this.doubleClickRow(folderName);
await this.checkDocumentListElementsAreDisplayed();
} }
async checkContentIsDisplayed(content): Promise<void> { async checkContentIsDisplayed(content): Promise<void> {

View File

@ -112,7 +112,7 @@ describe('Pagination - returns to previous page when current is empty', () => {
await paginationPage.clickOnNextPage(); await paginationPage.clickOnNextPage();
await contentServicesPage.checkDocumentListElementsAreDisplayed(); await contentServicesPage.contentList.dataTablePage().waitTillContentLoaded();
await expect(await paginationPage.getCurrentItemsPerPage()).toEqual(itemsPerPage.five); await expect(await paginationPage.getCurrentItemsPerPage()).toEqual(itemsPerPage.five);

View File

@ -93,7 +93,6 @@ describe('Viewer', () => {
}); });
it('[C362242] Should the Viewer be able to view a previous version of a file', async () => { it('[C362242] Should the Viewer be able to view a previous version of a file', async () => {
await viewerPage.clickCloseButton();
await contentServicesPage.versionManagerContent(txtFileInfo.name); await contentServicesPage.versionManagerContent(txtFileInfo.name);
await BrowserActions.click(versionManagePage.showNewVersionButton); await BrowserActions.click(versionManagePage.showNewVersionButton);
await versionManagePage.uploadNewVersionFile(fileModelVersionTwo.location); await versionManagePage.uploadNewVersionFile(fileModelVersionTwo.location);

View File

@ -16,7 +16,7 @@
*/ */
import { BrowserActions, BrowserVisibility, DropdownPage, TabsPage } from '@alfresco/adf-testing'; import { BrowserActions, BrowserVisibility, DropdownPage, TabsPage } from '@alfresco/adf-testing';
import { Locator, browser, by, element, Key } from 'protractor'; import { browser, by, element, Key } from 'protractor';
import { AppSettingsTogglesPage } from './dialog/app-settings-toggles.page'; import { AppSettingsTogglesPage } from './dialog/app-settings-toggles.page';
export class TaskDetailsPage { export class TaskDetailsPage {
@ -45,7 +45,6 @@ export class TaskDetailsPage {
involvePeopleButton = element(by.css('div[class*="add-people"]')); involvePeopleButton = element(by.css('div[class*="add-people"]'));
addPeopleField = element(by.css('input[data-automation-id="adf-people-search-input"]')); addPeopleField = element(by.css('input[data-automation-id="adf-people-search-input"]'));
addInvolvedUserButton = element(by.css('button[id="add-people"]')); addInvolvedUserButton = element(by.css('button[id="add-people"]'));
emailInvolvedUser: Locator = by.css('[data-automation-id="adf-people-email"]');
taskDetailsInfoDrawer = element(by.tagName('adf-info-drawer')); taskDetailsInfoDrawer = element(by.tagName('adf-info-drawer'));
taskDetailsSection = element(by.css('div[data-automation-id="app-tasks-details"]')); taskDetailsSection = element(by.css('div[data-automation-id="app-tasks-details"]'));
taskDetailsEmptySection = element(by.css('div[data-automation-id="adf-tasks-details--empty"]')); taskDetailsEmptySection = element(by.css('div[data-automation-id="adf-tasks-details--empty"]'));
@ -294,6 +293,7 @@ export class TaskDetailsPage {
async checkUserIsSelected(user: string): Promise<void> { async checkUserIsSelected(user: string): Promise<void> {
const row = this.getRowsUser(user); const row = this.getRowsUser(user);
await BrowserVisibility.waitUntilElementIsVisible(row); await BrowserVisibility.waitUntilElementIsVisible(row);
await browser.sleep(2000);
} }
async clickAddInvolvedUserButton(): Promise<void> { async clickAddInvolvedUserButton(): Promise<void> {
@ -313,9 +313,7 @@ export class TaskDetailsPage {
} }
async getInvolvedUserEmail(user): Promise<string> { async getInvolvedUserEmail(user): Promise<string> {
const row = this.getRowsUser(user); return BrowserActions.getText(element(by.css(`div[data-automation-id="adf-people-email-${user.replace(' ', '-')}"]`)));
const email = row.element(this.emailInvolvedUser);
return BrowserActions.getText(email);
} }
async clickAuditLogButton(): Promise<void> { async clickAuditLogButton(): Promise<void> {

View File

@ -158,6 +158,7 @@ describe('People component', () => {
await expect(await taskPage.taskDetails().getInvolvedUserEmail(assigneeUserModel.firstName + ' ' + assigneeUserModel.lastName)) await expect(await taskPage.taskDetails().getInvolvedUserEmail(assigneeUserModel.firstName + ' ' + assigneeUserModel.lastName))
.toEqual(assigneeUserModel.email); .toEqual(assigneeUserModel.email);
await navigationBarPage.clickLogoutButton();
await loginPage.login(assigneeUserModel.email, assigneeUserModel.password); await loginPage.login(assigneeUserModel.email, assigneeUserModel.password);
await (await (await navigationBarPage.navigateToProcessServicesPage()).goToTaskApp()).clickTasksButton(); await (await (await navigationBarPage.navigateToProcessServicesPage()).goToTaskApp()).clickTasksButton();
await taskPage.filtersPage().goToFilter(CONSTANTS.TASK_FILTERS.INV_TASKS); await taskPage.filtersPage().goToFilter(CONSTANTS.TASK_FILTERS.INV_TASKS);
@ -216,6 +217,7 @@ describe('People component', () => {
await expect(await taskPage.taskDetails().getInvolvedUserEmail(assigneeUserModel.firstName + ' ' + assigneeUserModel.lastName)) await expect(await taskPage.taskDetails().getInvolvedUserEmail(assigneeUserModel.firstName + ' ' + assigneeUserModel.lastName))
.toEqual(assigneeUserModel.email); .toEqual(assigneeUserModel.email);
await navigationBarPage.clickLogoutButton();
await loginPage.login(assigneeUserModel.email, assigneeUserModel.password); await loginPage.login(assigneeUserModel.email, assigneeUserModel.password);
await (await (await navigationBarPage.navigateToProcessServicesPage()).goToTaskApp()).clickTasksButton(); await (await (await navigationBarPage.navigateToProcessServicesPage()).goToTaskApp()).clickTasksButton();
await taskPage.filtersPage().goToFilter(CONSTANTS.TASK_FILTERS.COMPLETED_TASKS); await taskPage.filtersPage().goToFilter(CONSTANTS.TASK_FILTERS.COMPLETED_TASKS);

View File

@ -186,6 +186,7 @@ describe('Process List Test', () => {
await expect(JSON.stringify(processList) === JSON.stringify(sortedProcessListNamesAsc)).toBe(true); await expect(JSON.stringify(processList) === JSON.stringify(sortedProcessListNamesAsc)).toBe(true);
await processListDemoPage.selectSorting('desc'); await processListDemoPage.selectSorting('desc');
await processListDemoPage.dataTable.waitTillContentLoaded();
const sortedProcessListNamesDesc = await processListDemoPage.getDisplayedProcessesNames(); const sortedProcessListNamesDesc = await processListDemoPage.getDisplayedProcessesNames();
await expect(JSON.stringify(processList.reverse()) === JSON.stringify(sortedProcessListNamesDesc)).toBe(true); await expect(JSON.stringify(processList.reverse()) === JSON.stringify(sortedProcessListNamesDesc)).toBe(true);

View File

@ -80,6 +80,7 @@ describe('Start Task - Custom App', () => {
await taskDetails.clickInvolvePeopleButton(); await taskDetails.clickInvolvePeopleButton();
await taskDetails.typeUser(assigneeUserModel.firstName + ' ' + assigneeUserModel.lastName); await taskDetails.typeUser(assigneeUserModel.firstName + ' ' + assigneeUserModel.lastName);
await taskDetails.selectUserToInvolve(assigneeUserModel.firstName + ' ' + assigneeUserModel.lastName); await taskDetails.selectUserToInvolve(assigneeUserModel.firstName + ' ' + assigneeUserModel.lastName);
await taskDetails.checkUserIsSelected(assigneeUserModel.firstName + ' ' + assigneeUserModel.lastName); await taskDetails.checkUserIsSelected(assigneeUserModel.firstName + ' ' + assigneeUserModel.lastName);

View File

@ -259,7 +259,6 @@ describe('Task Details - Form', () => {
}); });
it('[C315193] Should be able to complete a standalone task with invisible tab with invalid value for field', async () => { it('[C315193] Should be able to complete a standalone task with invisible tab with invalid value for field', async () => {
// ACTIVITI-3746
await tasksListPage.selectRow(newTask.name); await tasksListPage.selectRow(newTask.name);
await widget.tab().checkTabIsDisplayedByLabel(tab.tabWithFields); await widget.tab().checkTabIsDisplayedByLabel(tab.tabWithFields);
await widget.tab().checkTabIsDisplayedByLabel(tab.tabFieldField); await widget.tab().checkTabIsDisplayedByLabel(tab.tabFieldField);

View File

@ -1,8 +1,6 @@
{ {
"C362240": "Include once ADF starts using ACS 7 , https://issues.alfresco.com/jira/browse/ADF-5182", "C362240": "Include once ADF starts using ACS 7 , https://issues.alfresco.com/jira/browse/ADF-5182",
"C362241": "Include once ADF starts using ACS 7, https://issues.alfresco.com/jira/browse/ADF-5182", "C362241": "Include once ADF starts using ACS 7, https://issues.alfresco.com/jira/browse/ADF-5182",
"C362242": "Include once ADF starts using ACS 7, https://issues.alfresco.com/jira/browse/ADF-5182",
"C362265": "Include once ADF starts using ACS 7, https://issues.alfresco.com/jira/browse/ADF-5182",
"C291980": "Facet not working", "C291980": "Facet not working",
"C291981": "Facet not working", "C291981": "Facet not working",
"C299200": "Facet not working", "C299200": "Facet not working",
@ -15,21 +13,10 @@
"C279932": "login problem APS not basic", "C279932": "login problem APS not basic",
"C279931": "login problem APS not basic", "C279931": "login problem APS not basic",
"C279930": "login problem APS not basic", "C279930": "login problem APS not basic",
"C282010": "Select user or Select form issue", "C315268": "Attach file issue",
"C263942": "Select user or Select form issue", "C246522": "Attach file issue",
"C263947": "Select user or Select form issue", "C299040": "Attach file issue",
"C260383": "Select user or Select form issue", "C286516": "Attach file issue",
"C260422": "Select user or Select form issue",
"C212922": "Select user or Select form issue",
"C315268": "Select user or Select form issue",
"C246522": "Select user or Select form issue",
"C299040": "Select user or Select form issue",
"C286516": "Select user or Select form issue",
"C261030": "Select user or Select form issue",
"C280013": "Select user or Select form issue",
"C261031": "Select user or Select form issue",
"C280014": "Select user or Select form issue",
"C279990": "Select user or Select form issue",
"C246534": "Attach file issue", "C246534": "Attach file issue",
"C279886": "Attach file issue", "C279886": "Attach file issue",
"C291893": "flaky test" "C291893": "flaky test"

View File

@ -24,7 +24,7 @@
</data-column> </data-column>
<data-column key="email" class="adf-full-width"> <data-column key="email" class="adf-full-width">
<ng-template let-entry="$implicit"> <ng-template let-entry="$implicit">
<div data-automation-id="adf-people-full-name" class="adf-people-full-name">{{ getDisplayUser(entry.row.obj.firstName, entry.row.obj.lastName, ' ') }}</div> <div [attr.data-automation-id]="'adf-people-full-name-'+ getDisplayUser(entry.row.obj.firstName, entry.row.obj.lastName, '-')" class="adf-people-full-name">{{ getDisplayUser(entry.row.obj.firstName, entry.row.obj.lastName, ' ') }}</div>
</ng-template> </ng-template>
</data-column> </data-column>
</data-columns> </data-columns>

View File

@ -41,8 +41,8 @@
<data-column key="email" class="adf-full-width"> <data-column key="email" class="adf-full-width">
<ng-template let-entry="$implicit"> <ng-template let-entry="$implicit">
<div class="adf-people-user-info"> <div class="adf-people-user-info">
<div data-automation-id="adf-people-full-name" class="adf-people-full-name">{{ getDisplayUser(entry.row.obj.firstName, entry.row.obj.lastName, ' ') }}</div> <div [attr.data-automation-id]="'adf-people-full-name-'+ getDisplayUser(entry.row.obj.firstName, entry.row.obj.lastName, '-')" class="adf-people-full-name">{{ getDisplayUser(entry.row.obj.firstName, entry.row.obj.lastName, ' ') }}</div>
<div data-automation-id="adf-people-email" class="adf-people-email">{{ entry.row.obj.email }}</div> <div [attr.data-automation-id]="'adf-people-email-'+ getDisplayUser(entry.row.obj.firstName, entry.row.obj.lastName, '-')" class="adf-people-email">{{ entry.row.obj.email }}</div>
</div> </div>
</ng-template> </ng-template>
</data-column> </data-column>

View File

@ -288,18 +288,25 @@ export class DataTableComponentPage {
async waitTillContentLoaded(): Promise<void> { async waitTillContentLoaded(): Promise<void> {
await browser.sleep(500); await browser.sleep(500);
Logger.log('wait datatable loading');
if (element(by.tagName('mat-spinner')).isPresent()) { if (element(by.tagName('mat-spinner')).isPresent()) {
Logger.log('wait datatable loading spinner disappear');
await BrowserVisibility.waitUntilElementIsNotPresent(element(by.tagName('mat-spinner'))); await BrowserVisibility.waitUntilElementIsNotPresent(element(by.tagName('mat-spinner')));
} else { } else {
try { try {
await BrowserVisibility.waitUntilElementIsPresent(element(by.tagName('mat-spinner')), 500); Logger.log('wait datatable loading spinner is present');
await BrowserVisibility.waitUntilElementIsPresent(element(by.tagName('mat-spinner')));
} catch (error) { } catch (error) {
} }
} }
await BrowserVisibility.waitUntilElementIsVisible(this.contents.first()); try {
Logger.log('wait first element is present');
await BrowserVisibility.waitUntilElementIsVisible(this.contents.first(), 1000);
} catch (error) {
Logger.log('Possible empty page');
}
} }
async checkColumnIsDisplayed(column: string): Promise<void> { async checkColumnIsDisplayed(column: string): Promise<void> {
@ -423,7 +430,7 @@ export class DataTableComponentPage {
} }
async waitForEmptyState(): Promise<void> { async waitForEmptyState(): Promise<void> {
await BrowserVisibility.waitUntilElementIsPresent(this.tableBody.element(this.emptyList)); await BrowserVisibility.waitUntilElementIsPresent(this.emptyList);
} }
async getEmptyStateTitle(): Promise<string> { async getEmptyStateTitle(): Promise<string> {

View File

@ -15,7 +15,7 @@
* limitations under the License. * limitations under the License.
*/ */
import { Locator, by, element, ElementFinder } from 'protractor'; import { browser, Locator, by, element, ElementFinder } from 'protractor';
import { BrowserVisibility, BrowserActions } from '../../utils/public-api'; import { BrowserVisibility, BrowserActions } from '../../utils/public-api';
import { DropdownPage } from '../material/dropdown.page'; import { DropdownPage } from '../material/dropdown.page';
@ -67,7 +67,7 @@ export class FormFields {
const valueWidget = await (await this.getWidget(fieldId)).element(valueLocatorParam || this.valueLocator); const valueWidget = await (await this.getWidget(fieldId)).element(valueLocatorParam || this.valueLocator);
await BrowserVisibility.waitUntilElementIsVisible(valueWidget); await BrowserVisibility.waitUntilElementIsVisible(valueWidget);
return valueWidget.getAttribute('value'); return BrowserActions.getInputValue(valueWidget);
} }
async getFieldLabel(fieldId: string, labelLocatorParam?: any) { async getFieldLabel(fieldId: string, labelLocatorParam?: any) {
@ -98,6 +98,7 @@ export class FormFields {
async refreshForm(): Promise<void> { async refreshForm(): Promise<void> {
await BrowserActions.click(this.refreshButton); await BrowserActions.click(this.refreshButton);
await browser.sleep(500);
} }
async saveForm(): Promise<void> { async saveForm(): Promise<void> {

View File

@ -18,6 +18,7 @@
import { Locator, by, element } from 'protractor'; import { Locator, by, element } from 'protractor';
import { BrowserVisibility } from '../utils/browser-visibility'; import { BrowserVisibility } from '../utils/browser-visibility';
import { BrowserActions } from '../utils/browser-actions'; import { BrowserActions } from '../utils/browser-actions';
import { Logger } from '../utils/logger';
export class PaginationPage { export class PaginationPage {
@ -45,6 +46,7 @@ export class PaginationPage {
await BrowserVisibility.waitUntilElementIsPresent(itemsPerPage); await BrowserVisibility.waitUntilElementIsPresent(itemsPerPage);
await BrowserActions.click(itemsPerPage); await BrowserActions.click(itemsPerPage);
await BrowserVisibility.waitUntilElementIsNotVisible(this.pageSelectorDropDown); await BrowserVisibility.waitUntilElementIsNotVisible(this.pageSelectorDropDown);
Logger.log('Select page size ', numberOfItem);
} }
async checkPageSelectorIsNotDisplayed(): Promise<void> { async checkPageSelectorIsNotDisplayed(): Promise<void> {
@ -81,10 +83,12 @@ export class PaginationPage {
async clickOnNextPage(): Promise<void> { async clickOnNextPage(): Promise<void> {
return BrowserActions.click(this.nextPageButton); return BrowserActions.click(this.nextPageButton);
Logger.log('Next page');
} }
async clickOnPageDropdown(): Promise<void> { async clickOnPageDropdown(): Promise<void> {
await BrowserActions.click(this.pageDropDown); await BrowserActions.click(this.pageDropDown);
Logger.log('Click page dropdown');
} }
async clickOnPageDropdownOption(numberOfItemPerPage: string): Promise<void> { async clickOnPageDropdownOption(numberOfItemPerPage: string): Promise<void> {

View File

@ -113,7 +113,7 @@ export class ViewerPage {
} }
async clearPageNumber(): Promise<void> { async clearPageNumber(): Promise<void> {
await BrowserActions.clearSendKeys(this.pageSelectorInput, protractor.Key.ENTER); await BrowserActions.clearSendKeys(this.pageSelectorInput);
} }
async getZoom(): Promise<string> { async getZoom(): Promise<string> {
@ -143,7 +143,7 @@ export class ViewerPage {
} }
async checkFileIsLoaded(fileName?: string): Promise<void> { async checkFileIsLoaded(fileName?: string): Promise<void> {
await BrowserVisibility.waitUntilElementIsVisible(this.pdfPageLoaded, 30000, `${fileName} not loaded`); await BrowserVisibility.waitUntilElementIsVisible(this.pdfPageLoaded, 60000, `${fileName} not loaded`);
} }
async clickClosePasswordDialog(): Promise<void> { async clickClosePasswordDialog(): Promise<void> {
@ -230,9 +230,9 @@ export class ViewerPage {
await BrowserVisibility.waitUntilElementIsVisible(this.fileThumbnail); await BrowserVisibility.waitUntilElementIsVisible(this.fileThumbnail);
} }
async checkFileNameIsDisplayed(file): Promise<void> { async checkFileNameIsDisplayed(filename: string): Promise<void> {
await BrowserVisibility.waitUntilElementIsVisible(this.fileName); await BrowserVisibility.waitUntilElementIsVisible(this.fileName);
await expect(await BrowserActions.getText(this.fileName)).toEqual(file); await BrowserVisibility.waitUntilElementHasText(this.fileName, filename);
} }
async checkPreviousPageButtonIsDisplayed() { async checkPreviousPageButtonIsDisplayed() {

View File

@ -127,7 +127,7 @@ export class BrowserActions {
} }
} }
static async clearSendKeys(elementFinder: ElementFinder, text: string, sleepTime: number = 0): Promise<void> { static async clearSendKeys(elementFinder: ElementFinder, text: string = '', sleepTime: number = 0): Promise<void> {
Logger.info(`Clear and sendKeys text:${text} locator:${elementFinder.locator().toString()}`); Logger.info(`Clear and sendKeys text:${text} locator:${elementFinder.locator().toString()}`);
await this.click(elementFinder); await this.click(elementFinder);
@ -143,6 +143,13 @@ export class BrowserActions {
} }
} }
try {
if (text !== protractor.Key.SPACE && text !== protractor.Key.ENTER) {
await BrowserVisibility.waitUntilElementHasValue(elementFinder, text, 1000);
}
} catch (e) {
Logger.info(`Set value different from the input`);
}
} }
static async checkIsDisabled(elementFinder: ElementFinder): Promise<void> { static async checkIsDisabled(elementFinder: ElementFinder): Promise<void> {

214
package-lock.json generated
View File

@ -18920,9 +18920,9 @@
} }
}, },
"protractor": { "protractor": {
"version": "5.4.4", "version": "7.0.0",
"resolved": "https://registry.npmjs.org/protractor/-/protractor-5.4.4.tgz", "resolved": "https://registry.npmjs.org/protractor/-/protractor-7.0.0.tgz",
"integrity": "sha512-BaL4vePgu3Vfa/whvTUAlgaCAId4uNSGxIFSCXMgj7LMYENPWLp85h5RBi9pdpX/bWQ8SF6flP7afmi2TC4eHw==", "integrity": "sha512-UqkFjivi4GcvUQYzqGYNe0mLzfn5jiLmO8w9nMhQoJRLhy2grJonpga2IWhI6yJO30LibWXJJtA4MOIZD2GgZw==",
"dev": true, "dev": true,
"requires": { "requires": {
"@types/q": "^0.0.32", "@types/q": "^0.0.32",
@ -18938,8 +18938,8 @@
"selenium-webdriver": "3.6.0", "selenium-webdriver": "3.6.0",
"source-map-support": "~0.4.0", "source-map-support": "~0.4.0",
"webdriver-js-extender": "2.1.0", "webdriver-js-extender": "2.1.0",
"webdriver-manager": "^12.0.6", "webdriver-manager": "^12.1.7",
"yargs": "^12.0.5" "yargs": "^15.3.1"
}, },
"dependencies": { "dependencies": {
"@types/q": { "@types/q": {
@ -18995,33 +18995,42 @@
} }
}, },
"cliui": { "cliui": {
"version": "4.1.0", "version": "6.0.0",
"resolved": "https://registry.npmjs.org/cliui/-/cliui-4.1.0.tgz", "resolved": "https://registry.npmjs.org/cliui/-/cliui-6.0.0.tgz",
"integrity": "sha512-4FG+RSG9DL7uEwRUZXZn3SS34DiDPfzP0VOiEwtUWlE+AR2EIg+hSyvrIgUUfhdgR/UkAeW2QHgeP+hWrXs7jQ==", "integrity": "sha512-t6wbgtoCXvAzst7QgXxJYqPt0usEfbgQdftEPbLL/cvv6HPE5VgvqCuAIDR0NgU52ds6rFwqrgakNLrHEjCbrQ==",
"dev": true, "dev": true,
"requires": { "requires": {
"string-width": "^2.1.1", "string-width": "^4.2.0",
"strip-ansi": "^4.0.0", "strip-ansi": "^6.0.0",
"wrap-ansi": "^2.0.0" "wrap-ansi": "^6.2.0"
}, },
"dependencies": { "dependencies": {
"ansi-regex": { "ansi-regex": {
"version": "3.0.0", "version": "5.0.0",
"resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-3.0.0.tgz", "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.0.tgz",
"integrity": "sha1-7QMXwyIGT3lGbAKWa922Bas32Zg=", "integrity": "sha512-bY6fj56OUQ0hU1KjFNDQuJFezqKdrAyFdIevADiqrWHwSlbmBNMHp5ak2f40Pm8JTFyM2mqxkG6ngkHO11f/lg==",
"dev": true "dev": true
}, },
"strip-ansi": { "strip-ansi": {
"version": "4.0.0", "version": "6.0.0",
"resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-4.0.0.tgz", "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.0.tgz",
"integrity": "sha1-qEeQIusaw2iocTibY1JixQXuNo8=", "integrity": "sha512-AuvKTrTfQNYNIctbR1K/YGTR1756GycPsg7b9bdV9Duqur4gv6aKqHXah67Z8ImS7WEz5QVcOtlfW2rZEugt6w==",
"dev": true, "dev": true,
"requires": { "requires": {
"ansi-regex": "^3.0.0" "ansi-regex": "^5.0.0"
} }
} }
} }
}, },
"color-convert": {
"version": "2.0.1",
"resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz",
"integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==",
"dev": true,
"requires": {
"color-name": "~1.1.4"
}
},
"del": { "del": {
"version": "2.2.2", "version": "2.2.2",
"resolved": "https://registry.npmjs.org/del/-/del-2.2.2.tgz", "resolved": "https://registry.npmjs.org/del/-/del-2.2.2.tgz",
@ -19037,12 +19046,22 @@
"rimraf": "^2.2.8" "rimraf": "^2.2.8"
} }
}, },
"get-caller-file": { "emoji-regex": {
"version": "1.0.3", "version": "8.0.0",
"resolved": "https://registry.npmjs.org/get-caller-file/-/get-caller-file-1.0.3.tgz", "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-8.0.0.tgz",
"integrity": "sha512-3t6rVToeoZfYSGd8YoLFR2DJkiQrIiUrGcjvFX2mDw3bn6k2OtwHN0TNCLbBO+w8qTvimhDkv+LSscbJY1vE6w==", "integrity": "sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==",
"dev": true "dev": true
}, },
"find-up": {
"version": "4.1.0",
"resolved": "https://registry.npmjs.org/find-up/-/find-up-4.1.0.tgz",
"integrity": "sha512-PpOwAdQ/YlXQ2vj8a3h8IipDuYRi3wceVQQGYWxNINccq40Anw7BlsEXCMbt1Zt+OLA6Fq9suIpIWD0OsnISlw==",
"dev": true,
"requires": {
"locate-path": "^5.0.0",
"path-exists": "^4.0.0"
}
},
"globby": { "globby": {
"version": "5.0.0", "version": "5.0.0",
"resolved": "https://registry.npmjs.org/globby/-/globby-5.0.0.tgz", "resolved": "https://registry.npmjs.org/globby/-/globby-5.0.0.tgz",
@ -19057,20 +19076,11 @@
"pinkie-promise": "^2.0.0" "pinkie-promise": "^2.0.0"
} }
}, },
"invert-kv": {
"version": "2.0.0",
"resolved": "https://registry.npmjs.org/invert-kv/-/invert-kv-2.0.0.tgz",
"integrity": "sha512-wPVv/y/QQ/Uiirj/vh3oP+1Ww+AWehmi1g5fFWGPF6IpCBCDVrhgHRMvrLfdYcwDh3QJbGXDW4JAuzxElLSqKA==",
"dev": true
},
"is-fullwidth-code-point": { "is-fullwidth-code-point": {
"version": "1.0.0", "version": "3.0.0",
"resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-1.0.0.tgz", "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-3.0.0.tgz",
"integrity": "sha1-754xOG8DGn8NZDr4L95QxFfvAMs=", "integrity": "sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg==",
"dev": true, "dev": true
"requires": {
"number-is-nan": "^1.0.0"
}
}, },
"is-path-cwd": { "is-path-cwd": {
"version": "1.0.0", "version": "1.0.0",
@ -19096,26 +19106,30 @@
"path-is-inside": "^1.0.1" "path-is-inside": "^1.0.1"
} }
}, },
"lcid": { "locate-path": {
"version": "2.0.0", "version": "5.0.0",
"resolved": "https://registry.npmjs.org/lcid/-/lcid-2.0.0.tgz", "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-5.0.0.tgz",
"integrity": "sha512-avPEb8P8EGnwXKClwsNUgryVjllcRqtMYa49NTsbQagYuT1DcXnl1915oxWjoyGrXR6zH/Y0Zc96xWsPcoDKeA==", "integrity": "sha512-t7hw9pI+WvuwNJXwk5zVHpyhIqzg2qTlklJOf0mVxGSbe3Fp2VieZcduNYjaLDoy6p9uGpQEGWG87WpMKlNq8g==",
"dev": true, "dev": true,
"requires": { "requires": {
"invert-kv": "^2.0.0" "p-locate": "^4.1.0"
} }
}, },
"os-locale": { "p-locate": {
"version": "3.1.0", "version": "4.1.0",
"resolved": "https://registry.npmjs.org/os-locale/-/os-locale-3.1.0.tgz", "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-4.1.0.tgz",
"integrity": "sha512-Z8l3R4wYWM40/52Z+S265okfFj8Kt2cC2MKY+xNi3kFs+XGI7WXu/I309QQQYbRW4ijiZ+yxs9pqEhJh0DqW3Q==", "integrity": "sha512-R79ZZ/0wAxKGu3oYMlz8jy/kbhsNrS7SKZ7PxEHBgJ5+F2mtFW2fK2cOtBh1cHYkQsbzFV7I+EoRKe6Yt0oK7A==",
"dev": true, "dev": true,
"requires": { "requires": {
"execa": "^1.0.0", "p-limit": "^2.2.0"
"lcid": "^2.0.0",
"mem": "^4.0.0"
} }
}, },
"path-exists": {
"version": "4.0.0",
"resolved": "https://registry.npmjs.org/path-exists/-/path-exists-4.0.0.tgz",
"integrity": "sha512-ak9Qy5Q7jYb2Wwcey5Fpvg2KoAc/ZIhLSLOSBmRmygPsGwkVVt0fZa0qrtMz+m6tJTAHfZQ8FnmB4MG4LWy7/w==",
"dev": true
},
"pify": { "pify": {
"version": "2.3.0", "version": "2.3.0",
"resolved": "https://registry.npmjs.org/pify/-/pify-2.3.0.tgz", "resolved": "https://registry.npmjs.org/pify/-/pify-2.3.0.tgz",
@ -19128,12 +19142,6 @@
"integrity": "sha1-VXBbzZPF82c1MMLCy8DCs63cKG4=", "integrity": "sha1-VXBbzZPF82c1MMLCy8DCs63cKG4=",
"dev": true "dev": true
}, },
"require-main-filename": {
"version": "1.0.1",
"resolved": "https://registry.npmjs.org/require-main-filename/-/require-main-filename-1.0.1.tgz",
"integrity": "sha1-l/cXtp1IeE9fUmpsWqj/3aBVpNE=",
"dev": true
},
"rimraf": { "rimraf": {
"version": "2.7.1", "version": "2.7.1",
"resolved": "https://registry.npmjs.org/rimraf/-/rimraf-2.7.1.tgz", "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-2.7.1.tgz",
@ -19170,6 +19178,34 @@
"source-map": "^0.5.6" "source-map": "^0.5.6"
} }
}, },
"string-width": {
"version": "4.2.0",
"resolved": "https://registry.npmjs.org/string-width/-/string-width-4.2.0.tgz",
"integrity": "sha512-zUz5JD+tgqtuDjMhwIg5uFVV3dtqZ9yQJlZVfq4I01/K5Paj5UHj7VyrQOJvzawSVlKpObApbfD0Ed6yJc+1eg==",
"dev": true,
"requires": {
"emoji-regex": "^8.0.0",
"is-fullwidth-code-point": "^3.0.0",
"strip-ansi": "^6.0.0"
},
"dependencies": {
"ansi-regex": {
"version": "5.0.0",
"resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.0.tgz",
"integrity": "sha512-bY6fj56OUQ0hU1KjFNDQuJFezqKdrAyFdIevADiqrWHwSlbmBNMHp5ak2f40Pm8JTFyM2mqxkG6ngkHO11f/lg==",
"dev": true
},
"strip-ansi": {
"version": "6.0.0",
"resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.0.tgz",
"integrity": "sha512-AuvKTrTfQNYNIctbR1K/YGTR1756GycPsg7b9bdV9Duqur4gv6aKqHXah67Z8ImS7WEz5QVcOtlfW2rZEugt6w==",
"dev": true,
"requires": {
"ansi-regex": "^5.0.0"
}
}
}
},
"strip-ansi": { "strip-ansi": {
"version": "3.0.1", "version": "3.0.1",
"resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-3.0.1.tgz", "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-3.0.1.tgz",
@ -19214,52 +19250,72 @@
} }
}, },
"wrap-ansi": { "wrap-ansi": {
"version": "2.1.0", "version": "6.2.0",
"resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-2.1.0.tgz", "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-6.2.0.tgz",
"integrity": "sha1-2Pw9KE3QV5T+hJc8rs3Rz4JP3YU=", "integrity": "sha512-r6lPcBGxZXlIcymEu7InxDMhdW0KDxpLgoFLcguasxCaJ/SOIZwINatK9KY/tf+ZrlywOKU0UDj3ATXUBfxJXA==",
"dev": true, "dev": true,
"requires": { "requires": {
"string-width": "^1.0.1", "ansi-styles": "^4.0.0",
"strip-ansi": "^3.0.1" "string-width": "^4.1.0",
"strip-ansi": "^6.0.0"
}, },
"dependencies": { "dependencies": {
"string-width": { "ansi-regex": {
"version": "1.0.2", "version": "5.0.0",
"resolved": "https://registry.npmjs.org/string-width/-/string-width-1.0.2.tgz", "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.0.tgz",
"integrity": "sha1-EYvfW4zcUaKn5w0hHgfisLmxB9M=", "integrity": "sha512-bY6fj56OUQ0hU1KjFNDQuJFezqKdrAyFdIevADiqrWHwSlbmBNMHp5ak2f40Pm8JTFyM2mqxkG6ngkHO11f/lg==",
"dev": true
},
"ansi-styles": {
"version": "4.2.1",
"resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.2.1.tgz",
"integrity": "sha512-9VGjrMsG1vePxcSweQsN20KY/c4zN0h9fLjqAbwbPfahM3t+NL+M9HC8xeXG2I8pX5NoamTGNuomEUFI7fcUjA==",
"dev": true, "dev": true,
"requires": { "requires": {
"code-point-at": "^1.0.0", "@types/color-name": "^1.1.1",
"is-fullwidth-code-point": "^1.0.0", "color-convert": "^2.0.1"
"strip-ansi": "^3.0.0" }
},
"strip-ansi": {
"version": "6.0.0",
"resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.0.tgz",
"integrity": "sha512-AuvKTrTfQNYNIctbR1K/YGTR1756GycPsg7b9bdV9Duqur4gv6aKqHXah67Z8ImS7WEz5QVcOtlfW2rZEugt6w==",
"dev": true,
"requires": {
"ansi-regex": "^5.0.0"
} }
} }
} }
}, },
"y18n": {
"version": "4.0.0",
"resolved": "https://registry.npmjs.org/y18n/-/y18n-4.0.0.tgz",
"integrity": "sha512-r9S/ZyXu/Xu9q1tYlpsLIsa3EeLXXk0VwlxqTcFRfg9EhMW+17kbt9G0NrgCmhGb5vT2hyhJZLfDGx+7+5Uj/w==",
"dev": true
},
"yargs": { "yargs": {
"version": "12.0.5", "version": "15.4.1",
"resolved": "https://registry.npmjs.org/yargs/-/yargs-12.0.5.tgz", "resolved": "https://registry.npmjs.org/yargs/-/yargs-15.4.1.tgz",
"integrity": "sha512-Lhz8TLaYnxq/2ObqHDql8dX8CJi97oHxrjUcYtzKbbykPtVW9WB+poxI+NM2UIzsMgNCZTIf0AQwsjK5yMAqZw==", "integrity": "sha512-aePbxDmcYW++PaqBsJ+HYUFwCdv4LVvdnhBy78E57PIor8/OVvhMrADFFEDh8DHDFRv/O9i3lPhsENjO7QX0+A==",
"dev": true, "dev": true,
"requires": { "requires": {
"cliui": "^4.0.0", "cliui": "^6.0.0",
"decamelize": "^1.2.0", "decamelize": "^1.2.0",
"find-up": "^3.0.0", "find-up": "^4.1.0",
"get-caller-file": "^1.0.1", "get-caller-file": "^2.0.1",
"os-locale": "^3.0.0",
"require-directory": "^2.1.1", "require-directory": "^2.1.1",
"require-main-filename": "^1.0.1", "require-main-filename": "^2.0.0",
"set-blocking": "^2.0.0", "set-blocking": "^2.0.0",
"string-width": "^2.0.0", "string-width": "^4.2.0",
"which-module": "^2.0.0", "which-module": "^2.0.0",
"y18n": "^3.2.1 || ^4.0.0", "y18n": "^4.0.0",
"yargs-parser": "^11.1.1" "yargs-parser": "^18.1.2"
} }
}, },
"yargs-parser": { "yargs-parser": {
"version": "11.1.1", "version": "18.1.3",
"resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-11.1.1.tgz", "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-18.1.3.tgz",
"integrity": "sha512-C6kB/WJDiaxONLJQnF8ccx9SEeoTTLek8RVbaOIsrAUS8VrBEXfmeSnCZxygc+XC2sNMBIwOOnfcxiynjHsVSQ==", "integrity": "sha512-o50j0JeToy/4K6OZcaQmW6lyXXKhq7csREXcDwk2omFPJEwUNOVtJKvmDr9EI1fAJZUyZcRF7kxGBWmRXudrCQ==",
"dev": true, "dev": true,
"requires": { "requires": {
"camelcase": "^5.0.0", "camelcase": "^5.0.0",

View File

@ -157,7 +157,7 @@
"nconf": "^0.10.0", "nconf": "^0.10.0",
"ng-packagr": "^10.0.4", "ng-packagr": "^10.0.4",
"optimize-css-assets-webpack-plugin": "^5.0.3", "optimize-css-assets-webpack-plugin": "^5.0.3",
"protractor": "^5.4.2", "protractor": "^7.0.0",
"protractor-retry": "^1.2.9", "protractor-retry": "^1.2.9",
"protractor-smartrunner": "^0.1.1", "protractor-smartrunner": "^0.1.1",
"protractor-screenshoter-plugin": "0.10.3", "protractor-screenshoter-plugin": "0.10.3",