[ADF-3658][ADF-3660][ADF-3661] Revisiting automated tests and test cases (#3869)

* [ADF-3658] Revisiting Content Services automated tests and test cases

* [ADF-3661] Revisiting automated tests and test cases for Core and Insights folders

* [ADF-3660] Revisiting automated tests and test cases for Process Services

* Fixing lint errors
This commit is contained in:
Marouan Bentaleb
2018-10-13 11:19:15 +01:00
committed by Eugenio Romano
parent 04d42e2535
commit 094e1dab91
45 changed files with 267 additions and 387 deletions

View File

@@ -127,7 +127,7 @@ describe('Create folder directive', function () {
expect(metadataViewPage.getPropertyText('properties.cm:description')).toEqual('this is the description'); expect(metadataViewPage.getPropertyText('properties.cm:description')).toEqual('this is the description');
}); });
it('[C260159] Should not be possible create a folder with banned carachter', () => { it('[C260159] Should not be possible create a folder with banned character', () => {
let bannedChar = ['* ', '<', '>', '\\', '/', '?', ':', '|']; let bannedChar = ['* ', '<', '>', '\\', '/', '?', ':', '|'];
contentServicesPage.clickOnCreateNewFolder(); contentServicesPage.clickOnCreateNewFolder();

View File

@@ -87,7 +87,7 @@ describe('Document List Component - Actions', () => {
done(); done();
}); });
it('[C213257] - Copy File', () => { it('[C213257] Should be able to copy a file', () => {
browser.driver.sleep(12000); browser.driver.sleep(12000);
contentListPage.rightClickOnRowNamed(pdfUploadedNode.entry.name); contentListPage.rightClickOnRowNamed(pdfUploadedNode.entry.name);
@@ -102,13 +102,13 @@ describe('Document List Component - Actions', () => {
contentServicesPage.checkContentIsDisplayed(pdfFileModel.name); contentServicesPage.checkContentIsDisplayed(pdfFileModel.name);
}); });
it('[C280561] - Delete File', () => { it('[C280561] Should be able to delete a file via dropdown menu', () => {
contentListPage.deleteContent(pdfFileModel.name); contentListPage.deleteContent(pdfFileModel.name);
contentListPage.checkContentIsNotDisplayed(pdfFileModel.name); contentListPage.checkContentIsNotDisplayed(pdfFileModel.name);
pdfUploadedNode = null; pdfUploadedNode = null;
}); });
it('[C280562] - Multiple Files Delete - Dropdown Menu', () => { it('[C280562] Should be able to delete multiple files via dropdown menu', () => {
contentListPage.clickRowToSelect(pdfFileModel.name); contentListPage.clickRowToSelect(pdfFileModel.name);
contentListPage.clickRowToSelect(testFileModel.name); contentListPage.clickRowToSelect(testFileModel.name);
contentListPage.deleteContent(pdfFileModel.name); contentListPage.deleteContent(pdfFileModel.name);
@@ -116,14 +116,14 @@ describe('Document List Component - Actions', () => {
contentListPage.checkContentIsDisplayed(testFileModel.name); contentListPage.checkContentIsDisplayed(testFileModel.name);
}); });
it('[C280565] - Delete - Right Click', () => { it('[C280565] Should be able to delete a file using context menu', () => {
contentListPage.rightClickOnRowNamed(pdfFileModel.name); contentListPage.rightClickOnRowNamed(pdfFileModel.name);
contentListPage.pressContextMenuActionNamed('Delete'); contentListPage.pressContextMenuActionNamed('Delete');
contentListPage.checkContentIsNotDisplayed(pdfFileModel.name); contentListPage.checkContentIsNotDisplayed(pdfFileModel.name);
pdfUploadedNode = null; pdfUploadedNode = null;
}); });
it('[C280566] - Context Menu - Actions for file', () => { it('[C280566] Should be able to open context menu with right click', () => {
contentListPage.rightClickOnRowNamed(pdfFileModel.name); contentListPage.rightClickOnRowNamed(pdfFileModel.name);
contentListPage.checkContextActionIsVisible('Download'); contentListPage.checkContextActionIsVisible('Download');
contentListPage.checkContextActionIsVisible('Copy'); contentListPage.checkContextActionIsVisible('Copy');
@@ -135,7 +135,7 @@ describe('Document List Component - Actions', () => {
contentListPage.checkContextActionIsVisible('Lock'); contentListPage.checkContextActionIsVisible('Lock');
}); });
it('[C280567] - Delete - Right click after multiselection of files', () => { it('[C280567] Should be able to delete multiple files using context menu', () => {
contentListPage.clickRowToSelect(pdfFileModel.name); contentListPage.clickRowToSelect(pdfFileModel.name);
contentListPage.clickRowToSelect(testFileModel.name); contentListPage.clickRowToSelect(testFileModel.name);
contentListPage.rightClickOnRowNamed(pdfFileModel.name); contentListPage.rightClickOnRowNamed(pdfFileModel.name);
@@ -166,13 +166,13 @@ describe('Document List Component - Actions', () => {
done(); done();
}); });
it('[C260123] - Delete - Dropdown Menu', () => { it('[C260123] Should be able to delete a folder using context menu', () => {
contentListPage.deleteContent(folderName); contentListPage.deleteContent(folderName);
contentListPage.checkContentIsNotDisplayed(folderName); contentListPage.checkContentIsNotDisplayed(folderName);
uploadedFolder = null; uploadedFolder = null;
}); });
it('[C280566] - Context Menu - Actions for folder', () => { it('[C280568] Should be able to open context menu with right click', () => {
contentListPage.rightClickOnRowNamed(folderName); contentListPage.rightClickOnRowNamed(folderName);
contentListPage.checkContextActionIsVisible('Download'); contentListPage.checkContextActionIsVisible('Download');
contentListPage.checkContextActionIsVisible('Copy'); contentListPage.checkContextActionIsVisible('Copy');
@@ -182,7 +182,7 @@ describe('Document List Component - Actions', () => {
contentListPage.checkContextActionIsVisible('Permission'); contentListPage.checkContextActionIsVisible('Permission');
}); });
it('[C260138] - Copy - folder', () => { it('[C260138] Should be able to copy a folder', () => {
browser.driver.sleep(12000); browser.driver.sleep(12000);
contentListPage.copyContent(folderName); contentListPage.copyContent(folderName);

View File

@@ -93,14 +93,14 @@ describe('Document List Component', () => {
done(); done();
}); });
it('[C217334] - Error message displayed without permissions', () => { it('[C217334] Should display a message when accessing file without permissions', () => {
loginPage.loginToContentServicesUsingUserModel(acsUser); loginPage.loginToContentServicesUsingUserModel(acsUser);
browser.get(TestConfig.adf.url + '/files/' + privateSite.entry.guid); browser.get(TestConfig.adf.url + '/files/' + privateSite.entry.guid);
expect(errorPage.getErrorCode()).toBe('403'); expect(errorPage.getErrorCode()).toBe('403');
expect(errorPage.getErrorDescription()).toBe('You\'re not allowed access to this resource on the server.'); expect(errorPage.getErrorDescription()).toBe('You\'re not allowed access to this resource on the server.');
}); });
it('[C279924] - Custom error message is displayed', () => { it('[C279924] Should display custom message when accessing a file without permissions', () => {
loginPage.loginToContentServicesUsingUserModel(acsUser); loginPage.loginToContentServicesUsingUserModel(acsUser);
contentServicesPage.goToDocumentList(); contentServicesPage.goToDocumentList();
contentServicesPage.enableCustomPermissionMessage(); contentServicesPage.enableCustomPermissionMessage();
@@ -108,7 +108,7 @@ describe('Document List Component', () => {
expect(errorPage.getErrorCode()).toBe('403'); expect(errorPage.getErrorCode()).toBe('403');
}); });
it('[C279925] - Message is translated', () => { it('[C279925] Should display translated message when accessing a file without permissions if language is changed', () => {
loginPage.loginToContentServicesUsingUserModel(acsUser); loginPage.loginToContentServicesUsingUserModel(acsUser);
navBar.openLanguageMenu(); navBar.openLanguageMenu();
navBar.chooseLanguage('Italian'); navBar.chooseLanguage('Italian');
@@ -176,7 +176,7 @@ describe('Document List Component', () => {
done(); done();
}); });
it('[C279926] - Checks that only the files and folders of the users are showed', () => { it('[C279926] Should only display the user\'s files and folders', () => {
loginPage.loginToContentServicesUsingUserModel(acsUser); loginPage.loginToContentServicesUsingUserModel(acsUser);
contentServicesPage.goToDocumentList(); contentServicesPage.goToDocumentList();
contentServicesPage.checkContentIsDisplayed(folderName); contentServicesPage.checkContentIsDisplayed(folderName);
@@ -185,7 +185,7 @@ describe('Document List Component', () => {
expect(contentServicesPage.getDocumentListRowNumber()).toBe(4); expect(contentServicesPage.getDocumentListRowNumber()).toBe(4);
}); });
it('[C279927] - All columns are showed', () => { it('[C279927] Should display default columns', () => {
loginPage.loginToContentServicesUsingUserModel(acsUser); loginPage.loginToContentServicesUsingUserModel(acsUser);
contentServicesPage.goToDocumentList(); contentServicesPage.goToDocumentList();
contentServicesPage.checkColumnNameHeader(); contentServicesPage.checkColumnNameHeader();
@@ -194,7 +194,7 @@ describe('Document List Component', () => {
contentServicesPage.checkColumnCreatedHeader(); contentServicesPage.checkColumnCreatedHeader();
}); });
it('[C279928] - The date is showed with timeAgo', async (done) => { it('[C279928] Should be able to display date with timeAgo', async (done) => {
await this.alfrescoJsApi.login(acsUser.id, acsUser.password); await this.alfrescoJsApi.login(acsUser.id, acsUser.password);
timeAgoUploadedNode = await uploadActions.uploadFile(this.alfrescoJsApi, timeAgoFileModel.location, timeAgoFileModel.name, '-my-'); timeAgoUploadedNode = await uploadActions.uploadFile(this.alfrescoJsApi, timeAgoFileModel.location, timeAgoFileModel.name, '-my-');
loginPage.loginToContentServicesUsingUserModel(acsUser); loginPage.loginToContentServicesUsingUserModel(acsUser);
@@ -204,7 +204,7 @@ describe('Document List Component', () => {
done(); done();
}); });
it('[C279929] - The date is showed with date type', async (done) => { it('[C279929] Should be able to display the date with date type', async (done) => {
await this.alfrescoJsApi.login(acsUser.id, acsUser.password); await this.alfrescoJsApi.login(acsUser.id, acsUser.password);
mediumDateUploadedNode = await uploadActions.uploadFile(this.alfrescoJsApi, mediumFileModel.location, mediumFileModel.name, '-my-'); mediumDateUploadedNode = await uploadActions.uploadFile(this.alfrescoJsApi, mediumFileModel.location, mediumFileModel.name, '-my-');
let createdDate = moment(mediumDateUploadedNode.createdAt).format('ll'); let createdDate = moment(mediumDateUploadedNode.createdAt).format('ll');
@@ -265,44 +265,44 @@ describe('Document List Component', () => {
done(); done();
}); });
it('[C260112] - Sorting ascending by name', () => { it('[C260112] Should be able to sort by name (Ascending)', () => {
loginPage.loginToContentServicesUsingUserModel(acsUser); loginPage.loginToContentServicesUsingUserModel(acsUser);
contentServicesPage.goToDocumentList(); contentServicesPage.goToDocumentList();
contentServicesPage.sortAndCheckListIsOrderedByName('asc'); contentServicesPage.sortAndCheckListIsOrderedByName('asc');
}); });
it('[C272770] - Sorting descending by name', () => { it('[C272770] Should be able to sort by name (Descending)', () => {
loginPage.loginToContentServicesUsingUserModel(acsUser); loginPage.loginToContentServicesUsingUserModel(acsUser);
contentServicesPage.goToDocumentList(); contentServicesPage.goToDocumentList();
contentServicesPage.sortAndCheckListIsOrderedByName('desc'); contentServicesPage.sortAndCheckListIsOrderedByName('desc');
}); });
it('[C272771] - Sorting ascending by author', () => { it('[C272771] Should be able to sort by author (Ascending)', () => {
loginPage.loginToContentServicesUsingUserModel(acsUser); loginPage.loginToContentServicesUsingUserModel(acsUser);
contentServicesPage.goToDocumentList(); contentServicesPage.goToDocumentList();
contentServicesPage.sortAndCheckListIsOrderedByAuthor('asc'); contentServicesPage.sortAndCheckListIsOrderedByAuthor('asc');
}); });
it('[C272772] - Sorting descending by author', () => { it('[C272772] Should be able to sort by author (Descending)', () => {
loginPage.loginToContentServicesUsingUserModel(acsUser); loginPage.loginToContentServicesUsingUserModel(acsUser);
contentServicesPage.goToDocumentList(); contentServicesPage.goToDocumentList();
contentServicesPage.sortAndCheckListIsOrderedByAuthor('desc'); contentServicesPage.sortAndCheckListIsOrderedByAuthor('desc');
}); });
it('[C272773] - Sorting ascending by created date', () => { it('[C272773] Should be able to sort by date (Ascending)', () => {
loginPage.loginToContentServicesUsingUserModel(acsUser); loginPage.loginToContentServicesUsingUserModel(acsUser);
contentServicesPage.goToDocumentList(); contentServicesPage.goToDocumentList();
contentServicesPage.sortAndCheckListIsOrderedByCreated('asc'); contentServicesPage.sortAndCheckListIsOrderedByCreated('asc');
}); });
it('[C272774] - Sorting descending by created date', () => { it('[C272774] Should be able to sort by date (Descending)', () => {
loginPage.loginToContentServicesUsingUserModel(acsUser); loginPage.loginToContentServicesUsingUserModel(acsUser);
contentServicesPage.goToDocumentList(); contentServicesPage.goToDocumentList();
contentServicesPage.sortAndCheckListIsOrderedByCreated('desc'); contentServicesPage.sortAndCheckListIsOrderedByCreated('desc');
}); });
}); });
it('[C260121] - should show the spinner on loading', async (done) => { it('[C260121] Should show the spinner on content loading', async (done) => {
acsUser = new AcsUserModel(); acsUser = new AcsUserModel();
await this.alfrescoJsApi.login(TestConfig.adf.adminEmail, TestConfig.adf.adminPassword); await this.alfrescoJsApi.login(TestConfig.adf.adminEmail, TestConfig.adf.adminPassword);
await this.alfrescoJsApi.core.peopleApi.addPerson(acsUser); await this.alfrescoJsApi.core.peopleApi.addPerson(acsUser);
@@ -312,7 +312,7 @@ describe('Document List Component', () => {
done(); done();
}); });
it('[C279959] - Empty Folder state is displayed for new folders', async (done) => { it('[C279959] Should display empty folder state for new folders', async (done) => {
acsUser = new AcsUserModel(); acsUser = new AcsUserModel();
let folderName = 'BANANA'; let folderName = 'BANANA';
@@ -327,7 +327,7 @@ describe('Document List Component', () => {
done(); done();
}); });
it('[C272775] - File can be uploaded in a new created folder', async (done) => { it('[C272775] Should be able to upload a file in new folder', async (done) => {
let testFile = new FileModel({ let testFile = new FileModel({
'name': resources.Files.ADF_DOCUMENTS.TEST.file_name, 'name': resources.Files.ADF_DOCUMENTS.TEST.file_name,
'location': resources.Files.ADF_DOCUMENTS.TEST.file_location 'location': resources.Files.ADF_DOCUMENTS.TEST.file_location
@@ -347,7 +347,7 @@ describe('Document List Component', () => {
done(); done();
}); });
it('[C261997] - Recent Files empty', async (done) => { it('[C261997] Should be able to clean Recent Files history', async (done) => {
acsUser = new AcsUserModel(); acsUser = new AcsUserModel();
await this.alfrescoJsApi.login(TestConfig.adf.adminEmail, TestConfig.adf.adminPassword); await this.alfrescoJsApi.login(TestConfig.adf.adminEmail, TestConfig.adf.adminPassword);
await this.alfrescoJsApi.core.peopleApi.addPerson(acsUser); await this.alfrescoJsApi.core.peopleApi.addPerson(acsUser);
@@ -362,7 +362,7 @@ describe('Document List Component', () => {
done(); done();
}); });
it('[C268119] - "ygj" letters rendering in document list', async (done) => { it('[C268119] "ygj" letters should be rendered properly', async (done) => {
acsUser = new AcsUserModel(); acsUser = new AcsUserModel();
let folderName = 'ggggggjjjjjjjjjjjjyyyyyy'; let folderName = 'ggggggjjjjjjjjjjjjyyyyyy';
await this.alfrescoJsApi.login(TestConfig.adf.adminEmail, TestConfig.adf.adminPassword); await this.alfrescoJsApi.login(TestConfig.adf.adminEmail, TestConfig.adf.adminPassword);
@@ -378,7 +378,7 @@ describe('Document List Component', () => {
done(); done();
}); });
it('[C279970] - Custom column - isLocked field is showed for folders', async (done) => { it('[C279970] Should display "Islocked" field for folders', async (done) => {
acsUser = new AcsUserModel(); acsUser = new AcsUserModel();
let folderNameA = `MEESEEKS_${Util.generateRandomString(5)}_LOOK_AT_ME`; let folderNameA = `MEESEEKS_${Util.generateRandomString(5)}_LOOK_AT_ME`;
let folderNameB = `MEESEEKS_${Util.generateRandomString(5)}_LOOK_AT_ME`; let folderNameB = `MEESEEKS_${Util.generateRandomString(5)}_LOOK_AT_ME`;
@@ -396,7 +396,7 @@ describe('Document List Component', () => {
done(); done();
}); });
it('[C269086] - Custom column - IsLocked field is showed for files', async (done) => { it('[C269086] Should display "Islocked" field for files', async (done) => {
let testFileA = new FileModel({ let testFileA = new FileModel({
'name': resources.Files.ADF_DOCUMENTS.TEST.file_name, 'name': resources.Files.ADF_DOCUMENTS.TEST.file_name,
'location': resources.Files.ADF_DOCUMENTS.TEST.file_location 'location': resources.Files.ADF_DOCUMENTS.TEST.file_location
@@ -448,7 +448,7 @@ describe('Document List Component', () => {
); );
}); });
it('[C277093] - Sorting files with Items per page set to default', async (done) => { it('[C277093] Should sort files with Items per page set to default', async (done) => {
loginPage.loginToContentServicesUsingUserModel(acsUser); loginPage.loginToContentServicesUsingUserModel(acsUser);
contentServicesPage.goToDocumentList(); contentServicesPage.goToDocumentList();
contentServicesPage.checkListIsSortedByNameColumn('asc'); contentServicesPage.checkListIsSortedByNameColumn('asc');
@@ -513,39 +513,39 @@ describe('Document List Component', () => {
contentServicesPage.goToDocumentList(); contentServicesPage.goToDocumentList();
}); });
it('[C260108] - File tooltip', () => { it('[C260108] Should display tooltip for file\'s name', () => {
expect(contentServicesPage.getTooltip(pdfFile.name)).toEqual(pdfFile.name); expect(contentServicesPage.getTooltip(pdfFile.name)).toEqual(pdfFile.name);
}); });
it('[C260109] - Folder tooltip', () => { it('[C260109] Should display tooltip for folder\'s name', () => {
expect(contentServicesPage.getTooltip(folderName)).toEqual(folderName); expect(contentServicesPage.getTooltip(folderName)).toEqual(folderName);
}); });
it('[C260119] - Thumbnail - Disabled - folder', async (done) => { it('[C260119] Should have a specific thumbnail for folders', async (done) => {
let folderIconUrl = await contentServicesPage.getRowIconImageUrl(folderName); let folderIconUrl = await contentServicesPage.getRowIconImageUrl(folderName);
expect(folderIconUrl).toContain('/assets/images/ft_ic_folder.svg'); expect(folderIconUrl).toContain('/assets/images/ft_ic_folder.svg');
done(); done();
}); });
it('[C280066] - Thumbnail - Disabled - pdf file', async (done) => { it('[C280066] Should have a specific thumbnail PDF files', async (done) => {
let fileIconUrl = await contentServicesPage.getRowIconImageUrl(pdfFile.name); let fileIconUrl = await contentServicesPage.getRowIconImageUrl(pdfFile.name);
expect(fileIconUrl).toContain('/assets/images/ft_ic_pdf.svg'); expect(fileIconUrl).toContain('/assets/images/ft_ic_pdf.svg');
done(); done();
}); });
it('[C280067] - Thumbnail - Disabled - docx file', async (done) => { it('[C280067] Should have a specific thumbnail DOCX files', async (done) => {
let fileIconUrl = await contentServicesPage.getRowIconImageUrl(docxFile.name); let fileIconUrl = await contentServicesPage.getRowIconImageUrl(docxFile.name);
expect(fileIconUrl).toContain('/assets/images/ft_ic_ms_word.svg'); expect(fileIconUrl).toContain('/assets/images/ft_ic_ms_word.svg');
done(); done();
}); });
it('[C280068] - Thumbnail - Disabled - test file', async (done) => { it('[C280068] Should have a specific thumbnail files', async (done) => {
let fileIconUrl = await contentServicesPage.getRowIconImageUrl(testFile.name); let fileIconUrl = await contentServicesPage.getRowIconImageUrl(testFile.name);
expect(fileIconUrl).toContain('/assets/images/ft_ic_document.svg'); expect(fileIconUrl).toContain('/assets/images/ft_ic_document.svg');
done(); done();
}); });
it('[C274701] - Thumbnails - Enabled', async (done) => { it('[C274701] Should be able to enable thumbnails', async (done) => {
contentServicesPage.enableThumbnails(); contentServicesPage.enableThumbnails();
contentServicesPage.checkAcsContainer(); contentServicesPage.checkAcsContainer();
let fileIconUrl = await contentServicesPage.getRowIconImageUrl(pdfFile.name); let fileIconUrl = await contentServicesPage.getRowIconImageUrl(pdfFile.name);
@@ -604,11 +604,11 @@ describe('Document List Component', () => {
contentServicesPage.checkCardViewContainerIsDisplayed(); contentServicesPage.checkCardViewContainerIsDisplayed();
}); });
it('[C280016] - Gallery view is showed', () => { it('[C280016] Should be able to choose Gallery View', () => {
expect(contentServicesPage.getCardElementShowedInPage()).toBe(4); expect(contentServicesPage.getCardElementShowedInPage()).toBe(4);
}); });
it('[C280023] - Gallery Card show details', () => { it('[C280023] Gallery Card should show details', () => {
expect(contentServicesPage.getDocumentCardIconForElement(folderName)).toContain('/assets/images/ft_ic_folder.svg'); expect(contentServicesPage.getDocumentCardIconForElement(folderName)).toContain('/assets/images/ft_ic_folder.svg');
expect(contentServicesPage.getDocumentCardIconForElement(pdfFile.name)).toContain('/assets/images/ft_ic_pdf.svg'); expect(contentServicesPage.getDocumentCardIconForElement(pdfFile.name)).toContain('/assets/images/ft_ic_pdf.svg');
expect(contentServicesPage.getDocumentCardIconForElement(docxFile.name)).toContain('/assets/images/ft_ic_ms_word.svg'); expect(contentServicesPage.getDocumentCardIconForElement(docxFile.name)).toContain('/assets/images/ft_ic_ms_word.svg');
@@ -619,7 +619,7 @@ describe('Document List Component', () => {
contentServicesPage.checkMenuIsShowedForElementIndex(3); contentServicesPage.checkMenuIsShowedForElementIndex(3);
}); });
it('[C280069] - Gallery Card show details - attributes', () => { it('[C280069] Gallery Card should show attributes', () => {
contentServicesPage.checkDocumentCardPropertyIsShowed(folderName, cardProperties.DISPLAY_NAME); contentServicesPage.checkDocumentCardPropertyIsShowed(folderName, cardProperties.DISPLAY_NAME);
contentServicesPage.checkDocumentCardPropertyIsShowed(folderName, cardProperties.SIZE); contentServicesPage.checkDocumentCardPropertyIsShowed(folderName, cardProperties.SIZE);
contentServicesPage.checkDocumentCardPropertyIsShowed(folderName, cardProperties.CREATED_BY); contentServicesPage.checkDocumentCardPropertyIsShowed(folderName, cardProperties.CREATED_BY);
@@ -649,35 +649,35 @@ describe('Document List Component', () => {
expect(contentServicesPage.getAttributeValueForElement(testFile.name, cardProperties.CREATED)).toContain('ago'); expect(contentServicesPage.getAttributeValueForElement(testFile.name, cardProperties.CREATED)).toContain('ago');
}); });
it('[C280129] - Gallery Card show details - subfolder gallery displayed', () => { it('[C280129] Should keep Gallery View when accessing a folder', () => {
contentServicesPage.navigateToCardFolder(folderName); contentServicesPage.navigateToCardFolder(folderName);
expect(contentServicesPage.getCardElementShowedInPage()).toBe(1); expect(contentServicesPage.getCardElementShowedInPage()).toBe(1);
expect(contentServicesPage.getDocumentCardIconForElement(pdfFile.name)).toContain('/assets/images/ft_ic_pdf.svg'); expect(contentServicesPage.getDocumentCardIconForElement(pdfFile.name)).toContain('/assets/images/ft_ic_pdf.svg');
}); });
it('[C280130] - Gallery Card show details - back to list view', () => { it('[C280130] Should be able to go back to List View', () => {
contentServicesPage.clickGridViewButton(); contentServicesPage.clickGridViewButton();
contentServicesPage.checkAcsContainer(); contentServicesPage.checkAcsContainer();
contentServicesPage.navigateToFolder(folderName); contentServicesPage.navigateToFolder(folderName);
contentServicesPage.checkRowIsDisplayed(pdfFile.name); contentServicesPage.checkRowIsDisplayed(pdfFile.name);
}); });
it('[C261993] - Sort by Display name', () => { it('[C261993] Should be able to sort Gallery Cards by display name', () => {
contentServicesPage.selectGridSortingFromDropdown(cardProperties.DISPLAY_NAME); contentServicesPage.selectGridSortingFromDropdown(cardProperties.DISPLAY_NAME);
contentServicesPage.checkListIsSortedByNameColumn('asc'); contentServicesPage.checkListIsSortedByNameColumn('asc');
}); });
it('[C261994] - Sort by Size', () => { it('[C261994] Should be able to sort Gallery Cards by size', () => {
contentServicesPage.selectGridSortingFromDropdown(cardProperties.SIZE); contentServicesPage.selectGridSortingFromDropdown(cardProperties.SIZE);
contentServicesPage.checkListIsSortedBySizeColumn('asc'); contentServicesPage.checkListIsSortedBySizeColumn('asc');
}); });
it('[C261995] - Sort by Author', () => { it('[C261995] Should be able to sort Gallery Cards by author', () => {
contentServicesPage.selectGridSortingFromDropdown(cardProperties.CREATED_BY); contentServicesPage.selectGridSortingFromDropdown(cardProperties.CREATED_BY);
contentServicesPage.checkListIsSortedByAuthorColumn('asc'); contentServicesPage.checkListIsSortedByAuthorColumn('asc');
}); });
it('[C261996] - Sort by Created', () => { it('[C261996] Should be able to sort Gallery Cards by created date', () => {
contentServicesPage.selectGridSortingFromDropdown(cardProperties.CREATED); contentServicesPage.selectGridSortingFromDropdown(cardProperties.CREATED);
contentServicesPage.checkListIsSortedByCreatedColumn('asc'); contentServicesPage.checkListIsSortedByCreatedColumn('asc');
}); });

View File

@@ -88,7 +88,7 @@ describe('Document List - Pagination', function () {
done(); done();
}); });
it('[C260062] Default pagination settings', function () { it('[C260062] Should use default pagination settings', function () {
contentServicesPage.goToDocumentList(); contentServicesPage.goToDocumentList();
contentServicesPage.navigateToFolder(newFolderModel.name); contentServicesPage.navigateToFolder(newFolderModel.name);
contentServicesPage.checkAcsContainer(); contentServicesPage.checkAcsContainer();
@@ -103,7 +103,7 @@ describe('Document List - Pagination', function () {
paginationPage.checkPreviousPageButtonIsDisabled(); paginationPage.checkPreviousPageButtonIsDisabled();
}); });
it('[C274713] 20 Items per page', function () { it('[C274713] Should be able to set Items per page to 20', function () {
contentServicesPage.goToDocumentList(); contentServicesPage.goToDocumentList();
contentServicesPage.navigateToFolder(newFolderModel.name); contentServicesPage.navigateToFolder(newFolderModel.name);
contentServicesPage.checkAcsContainer(); contentServicesPage.checkAcsContainer();
@@ -130,7 +130,7 @@ describe('Document List - Pagination', function () {
loginPage.loginToContentServicesUsingUserModel(acsUser); loginPage.loginToContentServicesUsingUserModel(acsUser);
}); });
it('[C260069] 5 Items per page', function () { it('[C260069] Should be able to set Items per page to 5', function () {
contentServicesPage.goToDocumentList(); contentServicesPage.goToDocumentList();
contentServicesPage.navigateToFolder(newFolderModel.name); contentServicesPage.navigateToFolder(newFolderModel.name);
contentServicesPage.checkAcsContainer(); contentServicesPage.checkAcsContainer();
@@ -185,7 +185,7 @@ describe('Document List - Pagination', function () {
loginPage.loginToContentServicesUsingUserModel(acsUser); loginPage.loginToContentServicesUsingUserModel(acsUser);
}); });
it('[C260067] 10 Items per page', function () { it('[C260067] Should be able to set Items per page to 10', function () {
currentPage = 1; currentPage = 1;
contentServicesPage.goToDocumentList(); contentServicesPage.goToDocumentList();
contentServicesPage.navigateToFolder(newFolderModel.name); contentServicesPage.navigateToFolder(newFolderModel.name);
@@ -222,7 +222,7 @@ describe('Document List - Pagination', function () {
currentPage = 1; currentPage = 1;
}); });
it('[C260065] 15 Items per page', function () { it('[C260065] Should be able to set Items per page to 15', function () {
currentPage = 1; currentPage = 1;
contentServicesPage.goToDocumentList(); contentServicesPage.goToDocumentList();
contentServicesPage.navigateToFolder(newFolderModel.name); contentServicesPage.navigateToFolder(newFolderModel.name);
@@ -256,7 +256,7 @@ describe('Document List - Pagination', function () {
expect(paginationPage.getCurrentItemsPerPage()).toEqual(itemsPerPage.fifteen); expect(paginationPage.getCurrentItemsPerPage()).toEqual(itemsPerPage.fifteen);
}); });
xit('[C91320] Pagination when the content is sorted', function () { xit('[C91320] Pagination should preserve sorting', function () {
contentServicesPage.goToDocumentList(); contentServicesPage.goToDocumentList();
contentServicesPage.navigateToFolder(newFolderModel.name); contentServicesPage.navigateToFolder(newFolderModel.name);
contentServicesPage.checkAcsContainer(); contentServicesPage.checkAcsContainer();
@@ -296,7 +296,7 @@ describe('Document List - Pagination', function () {
}); });
}); });
it('[C260107] Pagination in an empty folder', function () { it('[C260107] Should not display pagination bar when a folder is empty', function () {
contentServicesPage.goToDocumentList(); contentServicesPage.goToDocumentList();
paginationPage.selectItemsPerPage(itemsPerPage.five); paginationPage.selectItemsPerPage(itemsPerPage.five);
contentServicesPage.checkAcsContainer(); contentServicesPage.checkAcsContainer();

View File

@@ -112,26 +112,26 @@ describe('Search component - Search Bar', () => {
done(); done();
}); });
it('[C272798] Search bar is visible', () => { it('[C272798] Search bar should be visible', () => {
searchDialog.checkSearchBarIsNotVisible().checkSearchIconIsVisible(); searchDialog.checkSearchBarIsNotVisible().checkSearchIconIsVisible();
searchDialog.clickOnSearchIcon().checkSearchBarIsVisible().checkSearchIconIsVisible(); searchDialog.clickOnSearchIcon().checkSearchBarIsVisible().checkSearchIconIsVisible();
searchDialog.clickOnSearchIcon().checkSearchBarIsNotVisible().checkSearchIconIsVisible(); searchDialog.clickOnSearchIcon().checkSearchBarIsNotVisible().checkSearchIconIsVisible();
}); });
it('[C272799] Add input and close', () => { it('[C272799] Should be possible to hide search bar after input', () => {
searchDialog.checkSearchIconIsVisible().clickOnSearchIcon().enterText(firstFolderModel.shortName); searchDialog.checkSearchIconIsVisible().clickOnSearchIcon().enterText(firstFolderModel.shortName);
searchDialog.clickOnSearchIcon().checkSearchBarIsNotVisible().checkSearchIconIsVisible(); searchDialog.clickOnSearchIcon().checkSearchBarIsNotVisible().checkSearchIconIsVisible();
contentServicesPage.checkAcsContainer(); contentServicesPage.checkAcsContainer();
}); });
it('[C260255] Search for content that does not exist', () => { it('[C260255] Should display message when searching for an inexistent file', () => {
searchDialog.checkSearchBarIsNotVisible().clickOnSearchIcon().checkNoResultMessageIsNotDisplayed() searchDialog.checkSearchBarIsNotVisible().clickOnSearchIcon().checkNoResultMessageIsNotDisplayed()
.enterText(search.inactive.name).checkNoResultMessageIsDisplayed(); .enterText(search.inactive.name).checkNoResultMessageIsDisplayed();
searchDialog.clearText(); searchDialog.clearText();
searchDialog.checkSearchBarIsNotVisible(); searchDialog.checkSearchBarIsNotVisible();
}); });
it('[C260256] Existing folder and file are displayed in search suggestion when typing the first 4 letters', () => { it('[C260256] Should display file/folder in search suggestion when typing first characters', () => {
contentServicesPage.goToDocumentList(); contentServicesPage.goToDocumentList();
searchDialog.clickOnSearchIcon().checkSearchBarIsVisible().enterText(firstFolderModel.shortName); searchDialog.clickOnSearchIcon().checkSearchBarIsVisible().enterText(firstFolderModel.shortName);
@@ -156,7 +156,7 @@ describe('Search component - Search Bar', () => {
searchDialog.checkSearchBarIsNotVisible(); searchDialog.checkSearchBarIsNotVisible();
}); });
it('[C272800] Existing folder and file are displayed in search suggestion', () => { it('[C272800] Should display file/folder in search suggestion when typing name', () => {
contentServicesPage.goToDocumentList(); contentServicesPage.goToDocumentList();
searchDialog.clickOnSearchIcon().checkSearchBarIsVisible().enterText(firstFolderModel.name); searchDialog.clickOnSearchIcon().checkSearchBarIsVisible().enterText(firstFolderModel.name);
searchDialog.resultTableContainsRow(firstFolderModel.name); searchDialog.resultTableContainsRow(firstFolderModel.name);
@@ -179,7 +179,7 @@ describe('Search component - Search Bar', () => {
searchDialog.checkSearchBarIsNotVisible(); searchDialog.checkSearchBarIsNotVisible();
}); });
it('[C260257] Folder content is displayed when clicking on existing folder', () => { it('[C260257] Should display content when clicking on folder from search suggestions', () => {
searchDialog.clickOnSearchIcon().enterText(firstFolderModel.shortName); searchDialog.clickOnSearchIcon().enterText(firstFolderModel.shortName);
searchDialog.resultTableContainsRow(firstFolderModel.name); searchDialog.resultTableContainsRow(firstFolderModel.name);
searchDialog.clickOnSpecificRow(firstFolderModel.name); searchDialog.clickOnSpecificRow(firstFolderModel.name);
@@ -197,21 +197,21 @@ describe('Search component - Search Bar', () => {
filePreviewPage.closePreviewWithButton(); filePreviewPage.closePreviewWithButton();
}); });
it('[C272801] Non-existent folder is not displayed in search page', () => { it('[C272801] Should display message when searching for non-existent folder', () => {
searchDialog.checkSearchIconIsVisible().clickOnSearchIcon(); searchDialog.checkSearchIconIsVisible().clickOnSearchIcon();
searchDialog.enterTextAndPressEnter(search.inactive.name); searchDialog.enterTextAndPressEnter(search.inactive.name);
searchResultPage.checkNoResultMessageIsDisplayed(); searchResultPage.checkNoResultMessageIsDisplayed();
contentServicesPage.goToDocumentList(); contentServicesPage.goToDocumentList();
}); });
it('[C272802] Existing folder is displayed in search page', () => { it('[C272802] Should be able to find an existent folder in search results', () => {
searchDialog.clickOnSearchIcon(); searchDialog.clickOnSearchIcon();
browser.driver.sleep(1000); browser.driver.sleep(1000);
searchDialog.enterTextAndPressEnter(firstFolderModel.name); searchDialog.enterTextAndPressEnter(firstFolderModel.name);
searchResultPage.checkContentIsDisplayed(firstFolderModel.name); searchResultPage.checkContentIsDisplayed(firstFolderModel.name);
}); });
it('[C260258] Existing file is displayed in search page', () => { it('[C260258] Should be able to find an existent file in search results', () => {
contentServicesPage.goToDocumentList(); contentServicesPage.goToDocumentList();
searchDialog.clickOnSearchIcon(); searchDialog.clickOnSearchIcon();
searchDialog.enterTextAndPressEnter(firstFileModel.name); searchDialog.enterTextAndPressEnter(firstFileModel.name);
@@ -230,7 +230,7 @@ describe('Search component - Search Bar', () => {
expect(contentServicesPage.currentFolderName()).toEqual(secondFolder.name); expect(contentServicesPage.currentFolderName()).toEqual(secondFolder.name);
}); });
it('[C260254] The search bar gets closed when clicking on another browser tab', () => { it('[C260254] Search bar should get closed when changing browser tab', () => {
contentServicesPage.goToDocumentList(); contentServicesPage.goToDocumentList();
searchDialog searchDialog

View File

@@ -88,7 +88,7 @@ describe('Search Filters', () => {
searchFiltersPage.checkCreatorChipIsNotDisplayed(acsUser.firstName, acsUser.lastName); searchFiltersPage.checkCreatorChipIsNotDisplayed(acsUser.firstName, acsUser.lastName);
}); });
it('[C277146] Show more/less buttons are hidden when inactive', () => { it('[C277146] Should Show more/less buttons be hidden when inactive', () => {
browser.get(TestConfig.adf.url + '/search;q=*'); browser.get(TestConfig.adf.url + '/search;q=*');
searchFiltersPage.checkShowLessButtonIsNotDisplayed(); searchFiltersPage.checkShowLessButtonIsNotDisplayed();

View File

@@ -107,7 +107,7 @@ describe('Search Component - Multi-Select Facet', () => {
done(); done();
}); });
it('[C280054] Multiple items can be selected from a search facet filter', () => { it('[C280054] Should be able to select multiple items from a search facet filter', () => {
searchFiltersPage.filterByFileType('Plain Text'); searchFiltersPage.filterByFileType('Plain Text');
expect(searchResultsPage.numberOfResultsDisplayed()).toBe(2); expect(searchResultsPage.numberOfResultsDisplayed()).toBe(2);
@@ -186,7 +186,7 @@ describe('Search Component - Multi-Select Facet', () => {
done(); done();
}); });
it('[C280056] Multiple items can be selected from multiple search facets', () => { it('[C280056] Should be able to select multiple items from multiple search facet filters', () => {
searchFiltersPage.checkSearchFiltersIsDisplayed(); searchFiltersPage.checkSearchFiltersIsDisplayed();
searchFiltersPage.filterByCreator(userUploadingTxt.firstName, userUploadingTxt.lastName); searchFiltersPage.filterByCreator(userUploadingTxt.firstName, userUploadingTxt.lastName);
@@ -245,7 +245,7 @@ describe('Search Component - Multi-Select Facet', () => {
done(); done();
}); });
it('[C280058] The filter facets items number is updated when another filter facet item is selected', () => { it('[C280058] Should update filter facets items number when another filter facet item is selected', () => {
searchFiltersPage.filterByFileType('Plain Text'); searchFiltersPage.filterByFileType('Plain Text');
searchFiltersPage.filterByCreator(acsUser.firstName, acsUser.lastName); searchFiltersPage.filterByCreator(acsUser.firstName, acsUser.lastName);

View File

@@ -105,7 +105,7 @@ describe('Search component - Search Page', () => {
done(); done();
}); });
it('[C260264] \'No results found searching for\' message is displayed on Search Page', () => { it('[C260264] Should display message when no results are found', () => {
let notExistentFileName = Util.generateRandomString(); let notExistentFileName = Util.generateRandomString();
contentServicesPage.goToDocumentList(); contentServicesPage.goToDocumentList();
searchDialog.checkSearchBarIsNotVisible().checkSearchIconIsVisible().clickOnSearchIcon() searchDialog.checkSearchBarIsNotVisible().checkSearchIconIsVisible().clickOnSearchIcon()
@@ -113,7 +113,7 @@ describe('Search component - Search Page', () => {
searchResultPage.checkNoResultMessageIsDisplayed(); searchResultPage.checkNoResultMessageIsDisplayed();
}); });
it('[C260265] File previewer is displayed', () => { it('[C260265] Should display file previewer when opening a file from search results', () => {
contentServicesPage.goToDocumentList(); contentServicesPage.goToDocumentList();
searchDialog searchDialog
@@ -130,7 +130,7 @@ describe('Search component - Search Page', () => {
filePreviewPage.closePreviewWithButton(); filePreviewPage.closePreviewWithButton();
}); });
it('[C272810] Only the searched file is displayed', () => { it('[C272810] Should display only files corresponding to search', () => {
contentServicesPage.goToDocumentList(); contentServicesPage.goToDocumentList();
searchDialog searchDialog
@@ -143,7 +143,7 @@ describe('Search component - Search Page', () => {
expect(searchResultPage.numberOfResultsDisplayed()).toBe(1); expect(searchResultPage.numberOfResultsDisplayed()).toBe(1);
}); });
it('[C260267] Folder content is displayed', () => { it('[C260267] Should display content when opening a folder from search results', () => {
contentServicesPage.goToDocumentList(); contentServicesPage.goToDocumentList();
searchDialog.checkSearchBarIsNotVisible() searchDialog.checkSearchBarIsNotVisible()
@@ -159,7 +159,7 @@ describe('Search component - Search Page', () => {
}); });
}); });
it('[C260261] Delete a file from the Search Results Page', () => { it('[C260261] Should be able to delete a file from search results', () => {
contentServicesPage.goToDocumentList(); contentServicesPage.goToDocumentList();
searchDialog searchDialog
@@ -181,7 +181,7 @@ describe('Search component - Search Page', () => {
searchResultPage.checkNoResultMessageIsDisplayed(); searchResultPage.checkNoResultMessageIsDisplayed();
}); });
it('[C272809] Delete a folder from the Search Results Page', () => { it('[C272809] Should be able to delete a folder from search results', () => {
searchDialog.checkSearchBarIsNotVisible() searchDialog.checkSearchBarIsNotVisible()
.checkSearchIconIsVisible() .checkSearchIconIsVisible()
.clickOnSearchIcon() .clickOnSearchIcon()
@@ -198,7 +198,7 @@ describe('Search component - Search Page', () => {
searchResultPage.checkNoResultMessageIsDisplayed(); searchResultPage.checkNoResultMessageIsDisplayed();
}); });
it('[C272803] Sort content ascending by name.', () => { it('[C272803] Should be able to sort results by name (Ascending)', () => {
contentServicesPage.goToDocumentList(); contentServicesPage.goToDocumentList();
searchDialog searchDialog
@@ -212,7 +212,7 @@ describe('Search component - Search Page', () => {
}); });
}); });
it('[C272804] Sort content descending by name.', () => { it('[C272804] Should be able to sort results by name (Descending)', () => {
contentServicesPage.goToDocumentList(); contentServicesPage.goToDocumentList();
searchDialog.checkSearchBarIsNotVisible() searchDialog.checkSearchBarIsNotVisible()
@@ -226,7 +226,7 @@ describe('Search component - Search Page', () => {
}); });
}); });
it('[C272805] Sort content ascending by author.', () => { it('[C272805] Should be able to sort results by author (Ascending)', () => {
contentServicesPage.goToDocumentList(); contentServicesPage.goToDocumentList();
searchDialog.checkSearchBarIsNotVisible().checkSearchIconIsVisible().clickOnSearchIcon() searchDialog.checkSearchBarIsNotVisible().checkSearchIconIsVisible().clickOnSearchIcon()
.enterTextAndPressEnter(search.active.base); .enterTextAndPressEnter(search.active.base);
@@ -236,7 +236,7 @@ describe('Search component - Search Page', () => {
}); });
}); });
it('[C272806] Sort content descending by author.', () => { it('[C272806] Should be able to sort results by author (Descending)', () => {
contentServicesPage.goToDocumentList(); contentServicesPage.goToDocumentList();
searchDialog.checkSearchBarIsNotVisible().checkSearchIconIsVisible().clickOnSearchIcon() searchDialog.checkSearchBarIsNotVisible().checkSearchIconIsVisible().clickOnSearchIcon()
.enterTextAndPressEnter(search.active.base); .enterTextAndPressEnter(search.active.base);
@@ -246,7 +246,7 @@ describe('Search component - Search Page', () => {
}); });
}); });
it('[C272807] Sort content ascending by created date.', () => { it('[C272807] Should be able to sort results by date (Ascending)', () => {
contentServicesPage.goToDocumentList(); contentServicesPage.goToDocumentList();
searchDialog.checkSearchBarIsNotVisible().checkSearchIconIsVisible().clickOnSearchIcon() searchDialog.checkSearchBarIsNotVisible().checkSearchIconIsVisible().clickOnSearchIcon()
.enterTextAndPressEnter(search.active.base); .enterTextAndPressEnter(search.active.base);
@@ -256,7 +256,7 @@ describe('Search component - Search Page', () => {
}); });
}); });
it('[C260260] Sort content descending by created date.', () => { it('[C260260] Should be able to sort results by date (Descending)', () => {
contentServicesPage.goToDocumentList(); contentServicesPage.goToDocumentList();
searchDialog.checkSearchBarIsNotVisible().checkSearchIconIsVisible().clickOnSearchIcon() searchDialog.checkSearchBarIsNotVisible().checkSearchIconIsVisible().clickOnSearchIcon()
.enterTextAndPressEnter(search.active.base); .enterTextAndPressEnter(search.active.base);
@@ -266,7 +266,7 @@ describe('Search component - Search Page', () => {
}); });
}); });
it('[C260262] Try to delete a file without rights from the Search Results Page', () => { it('[C260262] Shouldn\'t be able to delete a file from search results without rights', () => {
contentServicesPage.goToDocumentList(); contentServicesPage.goToDocumentList();
searchDialog.checkSearchBarIsNotVisible().checkSearchIconIsVisible().clickOnSearchIcon() searchDialog.checkSearchBarIsNotVisible().checkSearchIconIsVisible().clickOnSearchIcon()
.enterTextAndPressEnter(search.no_permission.noPermFile); .enterTextAndPressEnter(search.no_permission.noPermFile);
@@ -279,7 +279,7 @@ describe('Search component - Search Page', () => {
searchResultPage.checkContentIsDisplayed(search.no_permission.noPermFile); searchResultPage.checkContentIsDisplayed(search.no_permission.noPermFile);
}); });
it('[C272808] Try to delete a folder without rights from the Search Results Page', () => { it('[C272808] Shouldn\'t be able to delete a folder from search results without rights', () => {
contentServicesPage.goToDocumentList(); contentServicesPage.goToDocumentList();
searchDialog.checkSearchBarIsNotVisible(); searchDialog.checkSearchBarIsNotVisible();
searchDialog.checkSearchIconIsVisible(); searchDialog.checkSearchIconIsVisible();

View File

@@ -99,7 +99,7 @@ describe('Tag component', () => {
done(); done();
}); });
it('[C260374] Tag node ID', () => { it('[C260374] Should NOT be possible to add a new tag without Node ID', () => {
expect(tagPage.getNodeId()).toEqual(''); expect(tagPage.getNodeId()).toEqual('');
expect(tagPage.getNewTagPlaceholder()).toEqual('New Tag'); expect(tagPage.getNewTagPlaceholder()).toEqual('New Tag');
expect(tagPage.addTagButtonIsEnabled()).toEqual(false); expect(tagPage.addTagButtonIsEnabled()).toEqual(false);
@@ -109,7 +109,7 @@ describe('Tag component', () => {
expect(tagPage.getNewTagInput()).toEqual('a'); expect(tagPage.getNewTagInput()).toEqual('a');
}); });
it('[C268151] New tag for specific Node ID', () => { it('[C268151] Should be possible to add a new tag to a Node', () => {
tagPage.insertNodeId(pdfFileModel.id); tagPage.insertNodeId(pdfFileModel.id);
tagPage.addTag(tagList[0]); tagPage.addTag(tagList[0]);
@@ -117,7 +117,7 @@ describe('Tag component', () => {
tagPage.checkTagIsDisplayedInTagListByNodeId(tagList[0]); tagPage.checkTagIsDisplayedInTagListByNodeId(tagList[0]);
}); });
it('[C260377] Tag name already exists', () => { it('[C260377] Should NOT be possible to add a tag that already exists', () => {
tagPage.insertNodeId(pdfFileModel.id); tagPage.insertNodeId(pdfFileModel.id);
tagPage.addTag(sameTag); tagPage.addTag(sameTag);
tagPage.checkTagIsDisplayedInTagList(sameTag); tagPage.checkTagIsDisplayedInTagList(sameTag);
@@ -125,7 +125,7 @@ describe('Tag component', () => {
expect(tagPage.getErrorMessage()).toEqual('Tag already exists'); expect(tagPage.getErrorMessage()).toEqual('Tag already exists');
}); });
it('[C260378] Multiple tags', () => { it('[C260378] Should be possible to add multiple tags', () => {
tagPage.insertNodeId(pdfFileModel.id); tagPage.insertNodeId(pdfFileModel.id);
tagPage.addTag(tagList[2]); tagPage.addTag(tagList[2]);
@@ -136,7 +136,7 @@ describe('Tag component', () => {
tagPage.checkTagListContentServicesIsOrderedAscending(); tagPage.checkTagListContentServicesIsOrderedAscending();
}); });
it('[C91326] Tag text field', () => { it('[C91326] Should be possible to create a tag with different characters', () => {
tagPage.insertNodeId(pdfFileModel.id); tagPage.insertNodeId(pdfFileModel.id);
tagPage.addTag(uppercaseTag); tagPage.addTag(uppercaseTag);
@@ -159,7 +159,7 @@ describe('Tag component', () => {
tagPage.checkTagIsDisplayedInTagListByNodeId(nonLatinTag); tagPage.checkTagIsDisplayedInTagListByNodeId(nonLatinTag);
}); });
it('[C260375] Delete tag', () => { it('[C260375] Should be possible to delete a tag', () => {
let deleteTag = Util.generateRandomStringToUpperCase(); let deleteTag = Util.generateRandomStringToUpperCase();
tagPage.insertNodeId(deleteFile.id); tagPage.insertNodeId(deleteFile.id);

View File

@@ -88,7 +88,7 @@ describe('Trashcan - Pagination', () => {
done(); done();
}); });
it('[C272811] 20 Items per page', () => { it('[C272811] Should be able to set Items per page to 20', () => {
navigationBarPage.clickTrashcanButton(); navigationBarPage.clickTrashcanButton();
trashcanPage.waitForTableBody(); trashcanPage.waitForTableBody();
@@ -106,7 +106,7 @@ describe('Trashcan - Pagination', () => {
paginationPage.checkPreviousPageButtonIsDisabled(); paginationPage.checkPreviousPageButtonIsDisabled();
}); });
it('[C276742] 15 Items per page', () => { it('[C276742] Should be able to set Items per page to 15', () => {
navigationBarPage.clickTrashcanButton(); navigationBarPage.clickTrashcanButton();
trashcanPage.waitForTableBody(); trashcanPage.waitForTableBody();
paginationPage.selectItemsPerPage(itemsPerPage.fifteen); paginationPage.selectItemsPerPage(itemsPerPage.fifteen);
@@ -119,7 +119,7 @@ describe('Trashcan - Pagination', () => {
paginationPage.checkPreviousPageButtonIsDisabled(); paginationPage.checkPreviousPageButtonIsDisabled();
}); });
it('[C276743] 10 Items per page', () => { it('[C276743] Should be able to set Items per page to 10', () => {
navigationBarPage.clickTrashcanButton(); navigationBarPage.clickTrashcanButton();
trashcanPage.waitForTableBody(); trashcanPage.waitForTableBody();
paginationPage.selectItemsPerPage(itemsPerPage.ten); paginationPage.selectItemsPerPage(itemsPerPage.ten);
@@ -132,7 +132,7 @@ describe('Trashcan - Pagination', () => {
paginationPage.checkPreviousPageButtonIsDisabled(); paginationPage.checkPreviousPageButtonIsDisabled();
}); });
it('[C276744] 5 Items per page', () => { it('[C276744] Should be able to set Items per page to 5', () => {
navigationBarPage.clickTrashcanButton(); navigationBarPage.clickTrashcanButton();
trashcanPage.waitForTableBody(); trashcanPage.waitForTableBody();
paginationPage.selectItemsPerPage(itemsPerPage.five); paginationPage.selectItemsPerPage(itemsPerPage.five);

View File

@@ -118,8 +118,7 @@ describe('Upload component - Excluded Files', () => {
browser.refresh(); browser.refresh();
navigationBarPage.clickConfigEditorButton(); navigationBarPage.clickConfigEditorButton();
configEditorPage.clickFileConfiguration();
configEditorPage.clickFileConfiguration('adf-file-conf');
configEditorPage.clickClearButton(); configEditorPage.clickClearButton();
@@ -149,7 +148,7 @@ describe('Upload component - Excluded Files', () => {
navigationBarPage.clickConfigEditorButton(); navigationBarPage.clickConfigEditorButton();
configEditorPage.clickFileConfiguration('adf-file-conf'); configEditorPage.clickFileConfiguration();
configEditorPage.clickClearButton(); configEditorPage.clickClearButton();

View File

@@ -15,7 +15,6 @@
* limitations under the License. * limitations under the License.
*/ */
/* tslint:disable */
import { element, by, browser } from 'protractor'; import { element, by, browser } from 'protractor';
import { LoginPage } from '../../pages/adf/loginPage'; import { LoginPage } from '../../pages/adf/loginPage';
@@ -125,7 +124,7 @@ describe('Upload component', () => {
done(); done();
}); });
it('[C272788] Upload Button is visible on the page', () => { it('[C272788] Should display upload button', () => {
expect(contentServicesPage.getSingleFileButtonTooltip()).toEqual('Custom tooltip'); expect(contentServicesPage.getSingleFileButtonTooltip()).toEqual('Custom tooltip');
contentServicesPage contentServicesPage
@@ -133,7 +132,7 @@ describe('Upload component', () => {
.checkContentIsDisplayed(firstPdfFileModel.name); .checkContentIsDisplayed(firstPdfFileModel.name);
}); });
it('[C260173] Enable folder upload', () => { it('[C260173] Should be able to upload folder when enabled', () => {
uploadToggles.enableFolderUpload(); uploadToggles.enableFolderUpload();
contentServicesPage.uploadFolder(folderOne.location); contentServicesPage.uploadFolder(folderOne.location);
@@ -146,7 +145,7 @@ describe('Upload component', () => {
uploadToggles.disableFolderUpload(); uploadToggles.disableFolderUpload();
}); });
it('[C272789] Upload a pdf file', () => { it('[C272789] Should be able to upload PDF file', () => {
contentServicesPage contentServicesPage
.uploadFile(pdfFileModel.location) .uploadFile(pdfFileModel.location)
.checkContentIsDisplayed(pdfFileModel.name); .checkContentIsDisplayed(pdfFileModel.name);
@@ -156,7 +155,7 @@ describe('Upload component', () => {
uploadDialog.clickOnCloseButton().dialogIsNotDisplayed(); uploadDialog.clickOnCloseButton().dialogIsNotDisplayed();
}); });
it('[C272790] Upload a text file', () => { it('[C272790] Should be able to upload text file', () => {
contentServicesPage contentServicesPage
.uploadFile(docxFileModel.location) .uploadFile(docxFileModel.location)
.checkContentIsDisplayed(docxFileModel.name); .checkContentIsDisplayed(docxFileModel.name);
@@ -165,7 +164,7 @@ describe('Upload component', () => {
uploadDialog.clickOnCloseButton().dialogIsNotDisplayed(); uploadDialog.clickOnCloseButton().dialogIsNotDisplayed();
}); });
it('[C260141] Upload a png file', () => { it('[C260141] Should be possible to upload PNG file', () => {
contentServicesPage contentServicesPage
.uploadFile(pngFileModel.location) .uploadFile(pngFileModel.location)
.checkContentIsDisplayed(pngFileModel.name); .checkContentIsDisplayed(pngFileModel.name);
@@ -174,7 +173,7 @@ describe('Upload component', () => {
uploadDialog.clickOnCloseButton().dialogIsNotDisplayed(); uploadDialog.clickOnCloseButton().dialogIsNotDisplayed();
}); });
it('[C260143] Minimize and maximize the upload dialog box', () => { it('[C260143] Should be possible to maximize/minimize the upload dialog', () => {
contentServicesPage contentServicesPage
.uploadFile(docxFileModel.location) .uploadFile(docxFileModel.location)
.checkContentIsDisplayed(docxFileModel.name); .checkContentIsDisplayed(docxFileModel.name);
@@ -194,7 +193,7 @@ describe('Upload component', () => {
uploadDialog.checkCloseButtonIsDisplayed().clickOnCloseButton().dialogIsNotDisplayed(); uploadDialog.checkCloseButtonIsDisplayed().clickOnCloseButton().dialogIsNotDisplayed();
}); });
it('[C260168] Cancel the uploaded file through the upload dialog icon', () => { it('[C260168] Should be possible to cancel upload using dialog icon', () => {
contentServicesPage.uploadFile(pdfFileModel.location) contentServicesPage.uploadFile(pdfFileModel.location)
.checkContentIsDisplayed(pdfFileModel.name); .checkContentIsDisplayed(pdfFileModel.name);
uploadDialog.removeUploadedFile(pdfFileModel.name).fileIsCancelled(pdfFileModel.name); uploadDialog.removeUploadedFile(pdfFileModel.name).fileIsCancelled(pdfFileModel.name);
@@ -203,7 +202,7 @@ describe('Upload component', () => {
contentServicesPage.checkContentIsNotDisplayed(pdfFileModel.name); contentServicesPage.checkContentIsNotDisplayed(pdfFileModel.name);
}); });
xit('[C272792] Cancel a big file through the upload dialog icon before the upload to be done', () => { xit('[C272792] Should be possible to cancel upload of a big file using dialog icon', () => {
browser.executeScript(' setTimeout(() => {document.querySelector("#adf-upload-dialog-cancel-all").click();' + browser.executeScript(' setTimeout(() => {document.querySelector("#adf-upload-dialog-cancel-all").click();' +
'document.querySelector("#adf-upload-dialog-cancel").click(); }, 3000)'); 'document.querySelector("#adf-upload-dialog-cancel").click(); }, 3000)');
@@ -214,7 +213,7 @@ describe('Upload component', () => {
contentServicesPage.checkContentIsNotDisplayed(largeFile.name); contentServicesPage.checkContentIsNotDisplayed(largeFile.name);
}); });
xit('[C260169] Cancel a big file through the cancel uploads button', () => { xit('[C260169] Should be possible to cancel upload of a big file through the cancel uploads button', () => {
contentServicesPage.uploadFile(largeFile.location); contentServicesPage.uploadFile(largeFile.location);
expect(uploadDialog.getTitleText()).toEqual('Uploading 0 / 1'); expect(uploadDialog.getTitleText()).toEqual('Uploading 0 / 1');
expect(uploadDialog.getConfirmationDialogTitleText()).toEqual('Cancel Upload'); expect(uploadDialog.getConfirmationDialogTitleText()).toEqual('Cancel Upload');
@@ -225,7 +224,7 @@ describe('Upload component', () => {
contentServicesPage.checkContentIsNotDisplayed(largeFile.name); contentServicesPage.checkContentIsNotDisplayed(largeFile.name);
}); });
xit('[C272793] Cancel uploading multiple files', () => { xit('[C272793] Should be able to cancel multiple files upload', () => {
uploadToggles.enableMultipleFileUpload(); uploadToggles.enableMultipleFileUpload();
contentServicesPage.uploadMultipleFile([pngFileModel.location, largeFile.location]); contentServicesPage.uploadMultipleFile([pngFileModel.location, largeFile.location]);
uploadDialog.cancelUploads(); uploadDialog.cancelUploads();
@@ -238,7 +237,7 @@ describe('Upload component', () => {
uploadToggles.disableMultipleFileUpload(); uploadToggles.disableMultipleFileUpload();
}); });
it('[C272794] Tooltip of uploading multiple files button', () => { it('[C272794] Should display tooltip for uploading files', () => {
uploadToggles.enableMultipleFileUpload(); uploadToggles.enableMultipleFileUpload();
browser.driver.sleep(1000); browser.driver.sleep(1000);
expect(contentServicesPage.getMultipleFileButtonTooltip()).toEqual('Custom tooltip'); expect(contentServicesPage.getMultipleFileButtonTooltip()).toEqual('Custom tooltip');
@@ -277,7 +276,7 @@ describe('Upload component', () => {
uploadToggles.disableExtensionFilter(); uploadToggles.disableExtensionFilter();
}); });
it('[C279920] Upload same file twice', () => { it('[C279920] Should rename a file uploaded twice', () => {
contentServicesPage contentServicesPage
.uploadFile(pdfFileModel.location) .uploadFile(pdfFileModel.location)
.checkContentIsDisplayed(pdfFileModel.name); .checkContentIsDisplayed(pdfFileModel.name);
@@ -295,7 +294,7 @@ describe('Upload component', () => {
pdfFileModel.setVersion(''); pdfFileModel.setVersion('');
}); });
it('[C260172] Enable versioning', () => { it('[C260172] Should be possible to enable versioning', () => {
uploadToggles.enableVersioning(); uploadToggles.enableVersioning();
contentServicesPage contentServicesPage
@@ -322,7 +321,7 @@ describe('Upload component', () => {
uploadToggles.disableVersioning(); uploadToggles.disableVersioning();
}); });
it('[C260176] The files uploaded before closing the upload dialog box are not displayed anymore in the upload box', () => { it('[C260176] Should remove files from upload dialog box when closed', () => {
contentServicesPage.uploadFile(pngFileModelTwo.location).checkContentIsDisplayed(pngFileModelTwo.name); contentServicesPage.uploadFile(pngFileModelTwo.location).checkContentIsDisplayed(pngFileModelTwo.name);
uploadDialog.fileIsUploaded(pngFileModelTwo.name); uploadDialog.fileIsUploaded(pngFileModelTwo.name);
@@ -338,7 +337,7 @@ describe('Upload component', () => {
uploadDialog.clickOnCloseButton().dialogIsNotDisplayed(); uploadDialog.clickOnCloseButton().dialogIsNotDisplayed();
}); });
it('[C260170] Upload files on the same time', () => { it('[C260170] Should be possible to upload multiple files', () => {
contentServicesPage.goToDocumentList(); contentServicesPage.goToDocumentList();
contentServicesPage.checkAcsContainer(); contentServicesPage.checkAcsContainer();
@@ -355,7 +354,7 @@ describe('Upload component', () => {
uploadToggles.disableMultipleFileUpload(); uploadToggles.disableMultipleFileUpload();
}); });
it('[C260174] Enable max size and set it to 400', () => { it('[C260174] Should be possible to set a max size', () => {
contentServicesPage.goToDocumentList(); contentServicesPage.goToDocumentList();
contentServicesPage.checkAcsContainer(); contentServicesPage.checkAcsContainer();
uploadToggles.enableMaxSize(); uploadToggles.enableMaxSize();
@@ -376,12 +375,12 @@ describe('Upload component', () => {
uploadToggles.disableMaxSize(); uploadToggles.disableMaxSize();
}); });
it('[C272796] Enable max size and set it to 0', () => { it('[C272796] Should be possible to set max size to 0', () => {
contentServicesPage.goToDocumentList(); contentServicesPage.goToDocumentList();
uploadToggles.enableMaxSize(); uploadToggles.enableMaxSize();
uploadToggles.addMaxSize('0'); uploadToggles.addMaxSize('0');
contentServicesPage.uploadFile(fileWithSpecificSize.location); contentServicesPage.uploadFile(fileWithSpecificSize.location);
//expect(contentServicesPage.getErrorMessage()).toEqual('File ' + fileWithSpecificSize.name + ' is larger than the allowed file size'); // expect(contentServicesPage.getErrorMessage()).toEqual('File ' + fileWithSpecificSize.name + ' is larger than the allowed file size');
uploadDialog.fileIsNotDisplayedInDialog(fileWithSpecificSize.name); uploadDialog.fileIsNotDisplayedInDialog(fileWithSpecificSize.name);
contentServicesPage.uploadFile(emptyFile.location).checkContentIsDisplayed(emptyFile.name); contentServicesPage.uploadFile(emptyFile.location).checkContentIsDisplayed(emptyFile.name);
@@ -390,7 +389,7 @@ describe('Upload component', () => {
uploadToggles.disableMaxSize(); uploadToggles.disableMaxSize();
}); });
it('[C272797] Set max size to 1 and disable it', () => { it('[C272797] Should be possible to set max size to 1', () => {
uploadToggles.enableMaxSize(); uploadToggles.enableMaxSize();
browser.driver.sleep(1000); browser.driver.sleep(1000);
uploadToggles.addMaxSize('1'); uploadToggles.addMaxSize('1');

View File

@@ -15,7 +15,7 @@
* limitations under the License. * limitations under the License.
*/ */
import { element, by } from 'protractor'; import { element, by, browser } from 'protractor';
import Util = require('../../util/util'); import Util = require('../../util/util');
@@ -47,7 +47,6 @@ describe('Upload - User permission', () => {
let acsUserTwo; let acsUserTwo;
let navigationBarPage = new NavigationBarPage(); let navigationBarPage = new NavigationBarPage();
let notificationPage = new NotificationPage(); let notificationPage = new NotificationPage();
let consumerSite, managerSite;
let emptyFile = new FileModel({ let emptyFile = new FileModel({
'name': resources.Files.ADF_DOCUMENTS.TXT_0B.file_name, 'name': resources.Files.ADF_DOCUMENTS.TXT_0B.file_name,

View File

@@ -94,7 +94,7 @@ describe('Metadata component', () => {
contentServicesPage.navigateToDocumentList(); contentServicesPage.navigateToDocumentList();
}); });
it('[C245652] Properties', () => { it('[C245652] Should be possible to display a file\'s properties', () => {
viewerPage.viewFile(pngFileModel.name); viewerPage.viewFile(pngFileModel.name);
viewerPage.clickInfoButton(); viewerPage.clickInfoButton();
@@ -120,7 +120,7 @@ describe('Metadata component', () => {
viewerPage.clickCloseButton(); viewerPage.clickCloseButton();
}); });
it('[C272769] Information button', () => { it('[C272769] Should be possible to display more details when clicking on More Information button', () => {
viewerPage.viewFile(pngFileModel.name); viewerPage.viewFile(pngFileModel.name);
viewerPage.clickInfoButton(); viewerPage.clickInfoButton();
viewerPage.checkInfoSideBarIsDisplayed(); viewerPage.checkInfoSideBarIsDisplayed();
@@ -133,7 +133,7 @@ describe('Metadata component', () => {
viewerPage.clickCloseButton(); viewerPage.clickCloseButton();
}); });
it('[C270952] Info icon', () => { it('[C270952] Should be possible to open/close properties using info icon', () => {
viewerPage.viewFile(pngFileModel.name); viewerPage.viewFile(pngFileModel.name);
viewerPage.clickInfoButton(); viewerPage.clickInfoButton();
viewerPage.checkInfoSideBarIsDisplayed(); viewerPage.checkInfoSideBarIsDisplayed();

View File

@@ -70,7 +70,7 @@ describe('Enable infinite scrolling', () => {
done(); done();
}); });
it('Enable infinite scrolling', () => { it('[C260484] Should be possible to enable infinite scrolling', () => {
contentServicesPage.navigateToFolder(folderModel.name); contentServicesPage.navigateToFolder(folderModel.name);
contentServicesPage.enableInfiniteScrolling(); contentServicesPage.enableInfiniteScrolling();
contentServicesPage.clickLoadMoreButton(); contentServicesPage.clickLoadMoreButton();

View File

@@ -70,7 +70,7 @@ describe('Login component', () => {
done(); done();
}); });
it('[C260036] Username Required', () => { it('[C260036] Should require username', () => {
loginPage.goToLoginPage(); loginPage.goToLoginPage();
loginPage.checkUsernameInactive(); loginPage.checkUsernameInactive();
loginPage.checkSignInButtonIsDisabled(); loginPage.checkSignInButtonIsDisabled();
@@ -82,7 +82,7 @@ describe('Login component', () => {
loginPage.checkSignInButtonIsDisabled(); loginPage.checkSignInButtonIsDisabled();
}); });
it('[C260043] Enter Password to sign in', () => { it('[C260043] Should require password', () => {
loginPage.goToLoginPage(); loginPage.goToLoginPage();
loginPage.checkPasswordInactive(); loginPage.checkPasswordInactive();
loginPage.checkSignInButtonIsDisabled(); loginPage.checkSignInButtonIsDisabled();
@@ -94,7 +94,7 @@ describe('Login component', () => {
loginPage.checkSignInButtonIsDisabled(); loginPage.checkSignInButtonIsDisabled();
}); });
it('[C260044] Username must be at least 2 characters long', () => { it('[C260044] Username should be at least 2 characters long', () => {
loginPage.goToLoginPage(); loginPage.goToLoginPage();
loginPage.checkSignInButtonIsDisabled(); loginPage.checkSignInButtonIsDisabled();
loginPage.enterUsername('A'); loginPage.enterUsername('A');
@@ -105,7 +105,7 @@ describe('Login component', () => {
loginPage.clearUsername(); loginPage.clearUsername();
}); });
it('[C260045] Login button is enabled', () => { it('[C260045] Should enable login button after entering a valid username and a password', () => {
loginPage.goToLoginPage(); loginPage.goToLoginPage();
loginPage.enterUsername(adminUserModel.id); loginPage.enterUsername(adminUserModel.id);
loginPage.checkSignInButtonIsDisabled(); loginPage.checkSignInButtonIsDisabled();
@@ -115,7 +115,7 @@ describe('Login component', () => {
loginPage.clearPassword(); loginPage.clearPassword();
}); });
it('[C260046] You have entered an invalid username or password', () => { it('[C260046] Should NOT be possible to login with an invalid username/password', () => {
loginPage.goToLoginPage(); loginPage.goToLoginPage();
loginPage.checkSignInButtonIsDisabled(); loginPage.checkSignInButtonIsDisabled();
loginPage.enterUsername('test'); loginPage.enterUsername('test');
@@ -127,7 +127,7 @@ describe('Login component', () => {
loginPage.clearPassword(); loginPage.clearPassword();
}); });
it('[C260047] Password field is crypted', () => { it('[C260047] Password should be crypted', () => {
loginPage.goToLoginPage(); loginPage.goToLoginPage();
loginPage.checkSignInButtonIsDisabled(); loginPage.checkSignInButtonIsDisabled();
loginPage.enterPassword('test'); loginPage.enterPassword('test');
@@ -138,7 +138,7 @@ describe('Login component', () => {
loginPage.clearPassword(); loginPage.clearPassword();
}); });
it('[C260048] Remember Need Help? and Register are displayed and hidden', () => { it('[C260048] Should be possible to enable/disable login footer', () => {
loginPage.goToLoginPage(); loginPage.goToLoginPage();
loginPage.enableFooter(); loginPage.enableFooter();
loginPage.checkRememberIsDisplayed(); loginPage.checkRememberIsDisplayed();
@@ -150,7 +150,7 @@ describe('Login component', () => {
loginPage.checkRegisterIsNotDisplayed(); loginPage.checkRegisterIsNotDisplayed();
}); });
it('[C260049] Login to Process Services with Content Services disabled', () => { it('[C260049] Should be possible to login to Process Services with Content Services disabled', () => {
loginPage.goToLoginPage(); loginPage.goToLoginPage();
loginPage.checkSignInButtonIsDisabled(); loginPage.checkSignInButtonIsDisabled();
settingsPage.setProviderBpm(); settingsPage.setProviderBpm();
@@ -161,7 +161,7 @@ describe('Login component', () => {
loginPage.waitForElements(); loginPage.waitForElements();
}); });
it('[C260050] Login to Content Services with Process Services disabled', () => { it('[C260050] Should be possible to login to Content Services with Process Services disabled', () => {
loginPage.goToLoginPage(); loginPage.goToLoginPage();
loginPage.checkSignInButtonIsDisabled(); loginPage.checkSignInButtonIsDisabled();
settingsPage.setProviderEcm(); settingsPage.setProviderEcm();
@@ -172,7 +172,7 @@ describe('Login component', () => {
loginPage.waitForElements(); loginPage.waitForElements();
}); });
it('[C260051] Able to login to both Content Services and Process Services', () => { it('[C260051] Should be able to login to both Content Services and Process Services', () => {
settingsPage.setProviderEcmBpm(); settingsPage.setProviderEcmBpm();
loginPage.checkSignInButtonIsDisabled(); loginPage.checkSignInButtonIsDisabled();
settingsPage.setProviderEcmBpm(); settingsPage.setProviderEcmBpm();
@@ -230,7 +230,7 @@ describe('Login component', () => {
}); });
}); });
it('[C276746] Login with two different users', () => { it('[C276746] Should display the right information in user-info when a different users logs in', () => {
loginPage.loginToContentServicesUsingUserModel(userA); loginPage.loginToContentServicesUsingUserModel(userA);
navigationBarPage.clickUserProfile(); navigationBarPage.clickUserProfile();
expect(userInfoDialog.getContentHeaderTitle()).toEqual(userA.firstName + ' ' + userA.lastName); expect(userInfoDialog.getContentHeaderTitle()).toEqual(userA.firstName + ' ' + userA.lastName);

View File

@@ -77,7 +77,7 @@ describe('Pagination - returns to previous page when current is empty', () => {
done(); done();
}); });
it('[C274710] returns to previous page when current is empty', () => { it('[C274710] Should redirect to previous page when current is emptied', () => {
contentServicesPage.navigateToFolder(folderModel.name); contentServicesPage.navigateToFolder(folderModel.name);
contentServicesPage.checkAcsContainer(); contentServicesPage.checkAcsContainer();
contentServicesPage.waitForTableBody(); contentServicesPage.waitForTableBody();

View File

@@ -47,7 +47,7 @@ describe('Theming component', () => {
done(); done();
}); });
xit('Theming component', () => { xit('Should display "Show password" icon in high contrast when a dark theme is selected', () => {
expect(loginPage.getShowPasswordIconColor()).toEqual(CONSTANTS.THEMING.DEFAULT_PASSWORD_ICON_COLOR); expect(loginPage.getShowPasswordIconColor()).toEqual(CONSTANTS.THEMING.DEFAULT_PASSWORD_ICON_COLOR);
expect(loginPage.getSignInButtonColor()).toEqual(CONSTANTS.THEMING.DEFAULT_LOGIN_BUTTON_COLOR); expect(loginPage.getSignInButtonColor()).toEqual(CONSTANTS.THEMING.DEFAULT_LOGIN_BUTTON_COLOR);
expect(loginPage.getBackgroundColor()).toEqual(CONSTANTS.THEMING.DEFAULT_BACKGROUND_COLOR); expect(loginPage.getBackgroundColor()).toEqual(CONSTANTS.THEMING.DEFAULT_BACKGROUND_COLOR);

View File

@@ -30,6 +30,7 @@ import resources = require('../util/resources');
import AlfrescoApi = require('alfresco-js-api-node'); import AlfrescoApi = require('alfresco-js-api-node');
import { UsersActions } from '../actions/users.actions'; import { UsersActions } from '../actions/users.actions';
import { browser } from 'protractor';
describe('User Info component', () => { describe('User Info component', () => {
@@ -73,7 +74,7 @@ describe('User Info component', () => {
done(); done();
}); });
it('[C260111] Enable Process Services and Content Services ', () => { it('[C260111] Should display UserInfo when Process Services and Content Services are enabled', () => {
loginPage.goToLoginPage(); loginPage.goToLoginPage();
settingsPage.setProviderEcmBpm(); settingsPage.setProviderEcmBpm();
loginPage.login(contentUserModel.id, contentUserModel.password); loginPage.login(contentUserModel.id, contentUserModel.password);
@@ -109,7 +110,7 @@ describe('User Info component', () => {
userInfoDialog.closeUserProfile(); userInfoDialog.closeUserProfile();
}); });
it('[C260113] Enable Content Services and disable Process Services ', () => { it('[C260113] Should display UserInfo when Content Services is enabled and Process Services is disabled', () => {
loginPage.goToLoginPage(); loginPage.goToLoginPage();
settingsPage.setProviderEcm(); settingsPage.setProviderEcm();
loginPage.login(contentUserModel.id, contentUserModel.password); loginPage.login(contentUserModel.id, contentUserModel.password);
@@ -128,7 +129,7 @@ describe('User Info component', () => {
userInfoDialog.closeUserProfile(); userInfoDialog.closeUserProfile();
}); });
it('[C260115] Enable Process Services and disable Content Services ', () => { it('[C260115] Should display UserInfo when Process Services is enabled and Content Services is disabled', () => {
loginPage.goToLoginPage(); loginPage.goToLoginPage();
settingsPage.setProviderBpm(); settingsPage.setProviderBpm();
loginPage.login(processUserModel.email, processUserModel.password); loginPage.login(processUserModel.email, processUserModel.password);
@@ -147,7 +148,7 @@ describe('User Info component', () => {
userInfoDialog.closeUserProfile(); userInfoDialog.closeUserProfile();
}); });
it('[C260117] Enable Process Services and Content Services ', async(done) => { it('[C260117] Should display UserInfo with profile image uploaded in ACS', async(done) => {
browser.controlFlow().execute(async() => { browser.controlFlow().execute(async() => {
await PeopleAPI.updateAvatarViaAPI(contentUserModel, acsAvatarFileModel, '-me-'); await PeopleAPI.updateAvatarViaAPI(contentUserModel, acsAvatarFileModel, '-me-');
await PeopleAPI.getAvatarViaAPI(4, contentUserModel, '-me-', function (result) {}); await PeopleAPI.getAvatarViaAPI(4, contentUserModel, '-me-', function (result) {});
@@ -165,7 +166,7 @@ describe('User Info component', () => {
done(); done();
}); });
it('[C260118] The profile picture is changed from APS', async () => { it('[C260118] Should display UserInfo with profile image uploaded in APS', async () => {
let users = new UsersActions(); let users = new UsersActions();
await this.alfrescoJsApi.login(contentUserModel.email, contentUserModel.password); await this.alfrescoJsApi.login(contentUserModel.email, contentUserModel.password);
await users.changeProfilePictureAps(this.alfrescoJsApi, apsAvatarFileModel.getLocation()); await users.changeProfilePictureAps(this.alfrescoJsApi, apsAvatarFileModel.getLocation());
@@ -181,7 +182,7 @@ describe('User Info component', () => {
userInfoDialog.closeUserProfile(); userInfoDialog.closeUserProfile();
}); });
it('[C260120] Delete the profile picture from ACS', () => { it('[C260120] Should not display profile image in UserInfo when deleted in ACS', () => {
PeopleAPI.deleteAvatarViaAPI(contentUserModel, '-me-'); PeopleAPI.deleteAvatarViaAPI(contentUserModel, '-me-');
loginPage.goToLoginPage(); loginPage.goToLoginPage();

View File

@@ -61,7 +61,7 @@ describe('Analytics Smoke Test', () => {
done(); done();
}); });
it('Change name from Process Definition Heat Map', () => { it('[C260346] Should be able to change title of a report', () => {
navigationBarPage.clickProcessServicesButton(); navigationBarPage.clickProcessServicesButton();
processServicesPage.checkApsContainer(); processServicesPage.checkApsContainer();
processServicesPage.goToApp('Task App'); processServicesPage.goToApp('Task App');

View File

@@ -28,8 +28,8 @@ export class HeaderPage {
hexColorInput = element(by.css('input[placeholder="hex color code"]')); hexColorInput = element(by.css('input[placeholder="hex color code"]'));
logoHyperlinkInput = element(by.css('input[placeholder="Redirect URL"]')); logoHyperlinkInput = element(by.css('input[placeholder="Redirect URL"]'));
logoTooltipInput = element(by.css('input[placeholder="Tooltip text"]')); logoTooltipInput = element(by.css('input[placeholder="Tooltip text"]'));
positionStart = element(by.css('mat-radio-button[value="start"]')); positionStart = element.all(by.css('mat-radio-button[value="start"]')).first();
positionEnd = element(by.css('mat-radio-button[value="end"]')); positionEnd = element.all(by.css('mat-radio-button[value="end"]')).first();
sideBarPositionRight = element(by.css('mat-sidenav.mat-drawer.mat-sidenav.mat-drawer-end')); sideBarPositionRight = element(by.css('mat-sidenav.mat-drawer.mat-sidenav.mat-drawer-end'));
sideBarPositionLeft = element(by.css('mat-sidenav.mat-drawer.mat-sidenav')); sideBarPositionLeft = element(by.css('mat-sidenav.mat-drawer.mat-sidenav'));
@@ -98,18 +98,24 @@ export class HeaderPage {
addHexCodeColor(hexCode) { addHexCodeColor(hexCode) {
Util.waitUntilElementIsVisible(this.hexColorInput); Util.waitUntilElementIsVisible(this.hexColorInput);
return this.hexColorInput.click().sendKeys(hexCode).sendKeys(protractor.Key.ENTER); this.hexColorInput.click();
this.hexColorInput.sendKeys(hexCode);
return this.hexColorInput.sendKeys(protractor.Key.ENTER);
} }
addLogoHyperlink(hyperlink) { addLogoHyperlink(hyperlink) {
Util.waitUntilElementIsVisible(this.logoHyperlinkInput); Util.waitUntilElementIsVisible(this.logoHyperlinkInput);
Util.waitUntilElementIsClickable(this.logoHyperlinkInput); Util.waitUntilElementIsClickable(this.logoHyperlinkInput);
return this.logoHyperlinkInput.click().sendKeys(hyperlink).sendKeys(protractor.Key.ENTER); this.logoHyperlinkInput.click();
this.logoHyperlinkInput.sendKeys(hyperlink);
return this.logoHyperlinkInput.sendKeys(protractor.Key.ENTER);
} }
addLogoTooltip(tooltip) { addLogoTooltip(tooltip) {
Util.waitUntilElementIsVisible(this.logoTooltipInput); Util.waitUntilElementIsVisible(this.logoTooltipInput);
return this.logoTooltipInput.click().sendKeys(tooltip).sendKeys(protractor.Key.ENTER); this.logoTooltipInput.click();
this.logoTooltipInput.sendKeys(tooltip);
return this.logoTooltipInput.sendKeys(protractor.Key.ENTER);
} }
sideBarPositionStart() { sideBarPositionStart() {

View File

@@ -16,6 +16,7 @@
*/ */
import Util = require('../../../util/util'); import Util = require('../../../util/util');
import { element, by } from 'protractor';
export class AttachFormPage { export class AttachFormPage {

View File

@@ -43,7 +43,7 @@ export class AttachmentListPage {
} }
checkFileIsAttached(name) { checkFileIsAttached(name) {
let fileAttached = element(by.css('div[filename="' + name + '"]')); let fileAttached = element.all(by.css('div[filename="' + name + '"]')).first();
Util.waitUntilElementIsVisible(fileAttached); Util.waitUntilElementIsVisible(fileAttached);
} }
@@ -52,8 +52,8 @@ export class AttachmentListPage {
} }
viewFile(name) { viewFile(name) {
Util.waitUntilElementIsVisible(element(by.css('div[filename="' + name + '"]'))); Util.waitUntilElementIsVisible(element.all(by.css('div[filename="' + name + '"]')).first());
element(by.css('div[filename="' + name + '"]')).click(); element.all(by.css('div[filename="' + name + '"]')).first().click();
Util.waitUntilElementIsVisible(this.buttonMenu); Util.waitUntilElementIsVisible(this.buttonMenu);
this.buttonMenu.click(); this.buttonMenu.click();
Util.waitUntilElementIsVisible(this.viewButton); Util.waitUntilElementIsVisible(this.viewButton);
@@ -64,8 +64,8 @@ export class AttachmentListPage {
} }
removeFile(name) { removeFile(name) {
Util.waitUntilElementIsVisible(element(by.css('div[filename="' + name + '"]'))); Util.waitUntilElementIsVisible(element.all(by.css('div[filename="' + name + '"]')).first());
element(by.css('div[filename="' + name + '"]')).click(); element.all(by.css('div[filename="' + name + '"]')).first().click();
Util.waitUntilElementIsVisible(this.buttonMenu); Util.waitUntilElementIsVisible(this.buttonMenu);
this.buttonMenu.click(); this.buttonMenu.click();
Util.waitUntilElementIsVisible(this.removeButton); Util.waitUntilElementIsVisible(this.removeButton);
@@ -76,8 +76,8 @@ export class AttachmentListPage {
} }
downloadFile(name) { downloadFile(name) {
Util.waitUntilElementIsVisible(element(by.css('div[filename="' + name + '"]'))); Util.waitUntilElementIsVisible(element.all(by.css('div[filename="' + name + '"]')).first());
element(by.css('div[filename="' + name + '"]')).click(); element.all(by.css('div[filename="' + name + '"]')).first().click();
Util.waitUntilElementIsVisible(this.buttonMenu); Util.waitUntilElementIsVisible(this.buttonMenu);
this.buttonMenu.click(); this.buttonMenu.click();
Util.waitUntilElementIsVisible(this.downloadButton); Util.waitUntilElementIsVisible(this.downloadButton);
@@ -87,8 +87,8 @@ export class AttachmentListPage {
} }
doubleClickFile(name) { doubleClickFile(name) {
Util.waitUntilElementIsVisible(element(by.css('div[filename="' + name + '"]'))); Util.waitUntilElementIsVisible(element.all(by.css('div[filename="' + name + '"]')).first());
let fileAttached = element(by.css('div[filename="' + name + '"]')); let fileAttached = element.all(by.css('div[filename="' + name + '"]')).first();
Util.waitUntilElementIsVisible(fileAttached); Util.waitUntilElementIsVisible(fileAttached);
Util.waitUntilElementIsClickable(fileAttached); Util.waitUntilElementIsClickable(fileAttached);
fileAttached.click(); fileAttached.click();
@@ -96,7 +96,7 @@ export class AttachmentListPage {
} }
checkFileIsRemoved(name) { checkFileIsRemoved(name) {
let fileAttached = element(by.css('div[filename="' + name + '"]')); let fileAttached = element.all(by.css('div[filename="' + name + '"]')).first();
Util.waitUntilElementIsNotVisible(fileAttached); Util.waitUntilElementIsNotVisible(fileAttached);
return this; return this;
} }

View File

@@ -27,7 +27,7 @@ var FormFields = function () {
var noFormMessage = element(by.css("span[id*='no-form-message']")); var noFormMessage = element(by.css("span[id*='no-form-message']"));
var completedTaskNoFormMessage = element(by.css("div[id*='completed-form-message'] p")); var completedTaskNoFormMessage = element(by.css("div[id*='completed-form-message'] p"));
var attachFormButton = element(by.id("adf-no-form-attach-form-button")); var attachFormButton = element(by.id("adf-no-form-attach-form-button"));
var selectFormDropDownArrow = element(by.css("adf-attach-form div[class*='mat-select-arrow']")); var selectFormDropDownArrow = element.all(by.css("adf-attach-form div[class*='mat-select-arrow']")).first();
var selectFormContent = element(by.css("div[class*='mat-select-content']")); var selectFormContent = element(by.css("div[class*='mat-select-content']"));
var completeButton = element(by.id('adf-form-complete')); var completeButton = element(by.id('adf-form-complete'));
@@ -55,7 +55,7 @@ var FormFields = function () {
}; };
this.getFieldText = function (fieldId, labelLocatorParam) { this.getFieldText = function (fieldId, labelLocatorParam) {
var label = this.getWidget(fieldId).element(labelLocatorParam || labelLocator); var label = this.getWidget(fieldId).all(labelLocatorParam || labelLocator).first();
Util.waitUntilElementIsVisible(label); Util.waitUntilElementIsVisible(label);
return label.getText(); return label.getText();
}; };

View File

@@ -81,7 +81,7 @@ var ProcessFiltersPage = function () {
}; };
this.selectFromProcessList = function (title) { this.selectFromProcessList = function (title) {
var processName = element(by.css('div[data-automation-id="text_' + title + '"]')); var processName = element.all(by.css('div[data-automation-id="text_' + title + '"]')).first();
Util.waitUntilElementIsVisible(processName); Util.waitUntilElementIsVisible(processName);
processName.click(); processName.click();
}; };

View File

@@ -17,6 +17,7 @@
import { AppSettingsToggles } from './dialog/appSettingsToggles'; import { AppSettingsToggles } from './dialog/appSettingsToggles';
import { TabsPage } from '../material/tabsPage'; import { TabsPage } from '../material/tabsPage';
import { element, by, browser, protractor } from 'protractor';
import Util = require('../../../util/util'); import Util = require('../../../util/util');
export class TaskDetailsPage { export class TaskDetailsPage {

View File

@@ -39,7 +39,7 @@ var TasksListPage = function () {
this.checkTaskIsDisplayedInTasksList = function(taskName) { this.checkTaskIsDisplayedInTasksList = function(taskName) {
var row = by.cssContainingText("span", taskName); var row = by.cssContainingText("span", taskName);
Util.waitUntilElementIsVisible(taskList.element(row)); Util.waitUntilElementIsVisible(taskList.all(row).first());
return this; return this;
}; };

View File

@@ -19,6 +19,7 @@ import Util = require('../../util/util');
import { TabsPage } from './material/tabsPage'; import { TabsPage } from './material/tabsPage';
import { FormControllersPage } from './material/formControllersPage'; import { FormControllersPage } from './material/formControllersPage';
import { element, by, browser, protractor } from 'protractor';
export class ViewerPage { export class ViewerPage {
@@ -34,12 +35,10 @@ export class ViewerPage {
zoomInButton = element(by.id('viewer-zoom-in-button')); zoomInButton = element(by.id('viewer-zoom-in-button'));
zoomOutButton = element(by.id('viewer-zoom-out-button')); zoomOutButton = element(by.id('viewer-zoom-out-button'));
scalePageButton = element(by.id('viewer-scale-page-button')); scalePageButton = element(by.id('viewer-scale-page-button'));
pdfContainer = element(by.id('viewer-pdf-container'));
fullScreenButton = element(by.css('button[data-automation-id="adf-toolbar-fullscreen"]')); fullScreenButton = element(by.css('button[data-automation-id="adf-toolbar-fullscreen"]'));
rotateLeft = element(by.css('button[id="viewer-rotate-left-button"]')); rotateLeft = element(by.css('button[id="viewer-rotate-left-button"]'));
rotateRight = element(by.css('button[id="viewer-rotate-right-button"]')); rotateRight = element(by.css('button[id="viewer-rotate-right-button"]'));
scaleImg = element(by.css('button[id="viewer-reset-button"]')); scaleImg = element(by.css('button[id="viewer-reset-button"]'));
customBtn = element(by.css('data-automation-id="adf-toolbar-custom-btn"'));
fileThumbnail = element(by.css('img[data-automation-id="adf-file-thumbnail"]')); fileThumbnail = element(by.css('img[data-automation-id="adf-file-thumbnail"]'));
pageSelectorInput = element(by.css('input[data-automation-id="adf-page-selector"]')); pageSelectorInput = element(by.css('input[data-automation-id="adf-page-selector"]'));
imgContainer = element(by.css('div[data-automation-id="adf-image-container"]')); imgContainer = element(by.css('div[data-automation-id="adf-image-container"]'));
@@ -57,7 +56,6 @@ export class ViewerPage {
passwordError = element(by.css('mat-error[data-automation-id="adf-password-dialog-error"]')); passwordError = element(by.css('mat-error[data-automation-id="adf-password-dialog-error"]'));
infoSideBar = element(by.id('adf-right-sidebar')); infoSideBar = element(by.id('adf-right-sidebar'));
leftSideBar = element(by.id('adf-left-sidebar')); leftSideBar = element(by.id('adf-left-sidebar'));
unsupportedFileContainer = element(by.cssContainingText('.label', 'Document preview could not be loaded'));
pageCanvas = element.all(by.css('div[class="canvasWrapper"]')).first(); pageCanvas = element.all(by.css('div[class="canvasWrapper"]')).first();
viewer = element(by.css('adf-viewer')); viewer = element(by.css('adf-viewer'));
pdfViewer = element(by.css('adf-pdf-viewer')); pdfViewer = element(by.css('adf-pdf-viewer'));
@@ -267,10 +265,6 @@ export class ViewerPage {
Util.waitUntilElementIsVisible(this.imgContainer); Util.waitUntilElementIsVisible(this.imgContainer);
} }
checkPdfContainerIsDisplayed() {
Util.waitUntilElementIsVisible(this.pdfContainer);
}
checkMediaPlayerContainerIsDisplayed() { checkMediaPlayerContainerIsDisplayed() {
Util.waitUntilElementIsVisible(this.mediaContainer); Util.waitUntilElementIsVisible(this.mediaContainer);
} }
@@ -315,10 +309,6 @@ export class ViewerPage {
Util.waitUntilElementIsVisible(this.rotateRight); Util.waitUntilElementIsVisible(this.rotateRight);
} }
checkScaled(zoom) {
expect(this.percentage.getText()).toEqual(zoom);
}
checkScaleImgButtonIsDisplayed() { checkScaleImgButtonIsDisplayed() {
Util.waitUntilElementIsVisible(this.scaleImg); Util.waitUntilElementIsVisible(this.scaleImg);
} }
@@ -328,14 +318,6 @@ export class ViewerPage {
expect(rotation).toEqual(text); expect(rotation).toEqual(text);
} }
checkCustomBtnDisplayed() {
Util.waitUntilElementIsVisible(this.customBtn);
}
checkUnsupportedFileContainerIsDisplayed() {
Util.waitUntilElementIsVisible(this.unsupportedFileContainer);
}
checkInfoSideBarIsNotDisplayed() { checkInfoSideBarIsNotDisplayed() {
Util.waitUntilElementIsNotVisible(this.infoSideBar); Util.waitUntilElementIsNotVisible(this.infoSideBar);
} }
@@ -344,10 +326,6 @@ export class ViewerPage {
Util.waitUntilElementIsVisible(this.infoSideBar); Util.waitUntilElementIsVisible(this.infoSideBar);
} }
checkInfoSideBarIsNotDisplayed() {
Util.waitUntilElementIsNotOnPage(this.infoSideBar);
}
checkLeftSideBarButtonIsNotDisplayed() { checkLeftSideBarButtonIsNotDisplayed() {
Util.waitUntilElementIsNotOnPage(this.leftSideBarButton); Util.waitUntilElementIsNotOnPage(this.leftSideBarButton);
} }
@@ -405,11 +383,6 @@ export class ViewerPage {
return this.scaleImg.click(); return this.scaleImg.click();
} }
clickScalePdfButton() {
Util.waitUntilElementIsClickable(this.scalePageButton);
return this.scalePageButton.click();
}
clickDownloadButton() { clickDownloadButton() {
Util.waitUntilElementIsVisible(this.downloadButton); Util.waitUntilElementIsVisible(this.downloadButton);
return this.downloadButton.click(); return this.downloadButton.click();
@@ -440,11 +413,6 @@ export class ViewerPage {
return this.zoomOutButton.click(); return this.zoomOutButton.click();
} }
clickScalePageButton() {
Util.waitUntilElementIsVisible(this.scalePageButton);
this.scalePageButton.click();
}
clickFullScreenButton() { clickFullScreenButton() {
Util.waitUntilElementIsClickable(this.fullScreenButton); Util.waitUntilElementIsClickable(this.fullScreenButton);
return this.fullScreenButton.click(); return this.fullScreenButton.click();
@@ -654,7 +622,8 @@ export class ViewerPage {
const textField = element(by.css('input[data-automation-id="adf-text-custom-name"]')); const textField = element(by.css('input[data-automation-id="adf-text-custom-name"]'));
Util.waitUntilElementIsVisible(textField); Util.waitUntilElementIsVisible(textField);
textField.sendKeys(''); textField.sendKeys('');
textField.clear().sendKeys(text); textField.clear();
textField.sendKeys(text);
return this; return this;
} }
} }

View File

@@ -81,7 +81,7 @@ describe('Start Task - Task App', () => {
done(); done();
}); });
it('[C274690] Task List attachment - View file', () => { it('[C274690] Should be able to open a file attached to a start form', () => {
processServicesPage.goToProcessServices().goToTaskApp().clickTasksButton(); processServicesPage.goToProcessServices().goToTaskApp().clickTasksButton();
taskPage.filtersPage().goToFilter(CONSTANTS.TASKFILTERS.MY_TASKS); taskPage.filtersPage().goToFilter(CONSTANTS.TASKFILTERS.MY_TASKS);

View File

@@ -29,6 +29,7 @@ import resources = require('../util/resources');
import AlfrescoApi = require('alfresco-js-api-node'); import AlfrescoApi = require('alfresco-js-api-node');
import { UsersActions } from '../actions/users.actions'; import { UsersActions } from '../actions/users.actions';
import { AppsActions } from '../actions/APS/apps.actions'; import { AppsActions } from '../actions/APS/apps.actions';
import { by } from 'protractor';
describe('Attach Form Component', () => { describe('Attach Form Component', () => {

View File

@@ -1,91 +0,0 @@
/*!
* @license
* Copyright 2016 Alfresco Software, Ltd.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
import { LoginPage } from '../pages/adf/loginPage';
import { ProcessServicesPage } from '../pages/adf/process_services/processServicesPage';
import ProcessFiltersPage = require('../pages/adf/process_services/processFiltersPage');
import FileModel = require('../models/ACS/fileModel');
import { AttachmentListPage } from '../pages/adf/process_services/attachmentListPage';
import TestConfig = require('../test.config');
import resources = require('../util/resources');
import AlfrescoApi = require('alfresco-js-api-node');
import { UsersActions } from '../actions/users.actions';
import { AppsActions } from '../actions/APS/apps.actions';
describe('Attachment list', () => {
let loginPage = new LoginPage();
let processServicesPage = new ProcessServicesPage();
let attachmentListPage = new AttachmentListPage();
let processFiltersPage = new ProcessFiltersPage();
let processUserModel;
let app = resources.Files.APP_WITH_PROCESSES;
let pngFile = new FileModel({
'location': resources.Files.ADF_DOCUMENTS.PNG.file_location,
'name': resources.Files.ADF_DOCUMENTS.PNG.file_name
});
let pdfFile = new FileModel({ 'name': resources.Files.ADF_DOCUMENTS.PDF.file_name });
beforeAll(async(done) => {
let users = new UsersActions();
let apps = new AppsActions();
this.alfrescoJsApi = new AlfrescoApi({
provider: 'BPM',
hostBpm: TestConfig.adf.url
});
await this.alfrescoJsApi.login(TestConfig.adf.adminEmail, TestConfig.adf.adminPassword);
processUserModel = await users.createTenantAndUser(this.alfrescoJsApi);
await this.alfrescoJsApi.login(processUserModel.email, processUserModel.password);
await apps.importPublishDeployApp(this.alfrescoJsApi, app.file_location);
loginPage.loginToProcessServicesUsingUserModel(processUserModel);
done();
});
it('[C277296] Attach a file to task app - process list', function () {
processServicesPage.goToProcessServices().goToTaskApp().clickProcessButton();
processFiltersPage.startProcess().selectFromProcessDropdown(app.process_se_name).clickFormStartProcessButton();
processFiltersPage.clickRunningFilterButton();
processFiltersPage.selectFromProcessList('My Default Name');
attachmentListPage.clickAttachFileButton(pngFile.location);
attachmentListPage.checkFileIsAttached(pngFile.name);
attachmentListPage.clickAttachFileButton(pdfFile.location);
attachmentListPage.checkFileIsAttached(pngFile.name);
attachmentListPage.checkFileIsAttached(pdfFile.name);
});
it('[C277299] Attach a file to custom app - process list', function () {
processServicesPage.goToProcessServices().goToApp(app.title).clickProcessButton();
processFiltersPage.startProcess().selectFromProcessDropdown(app.process_se_name).clickFormStartProcessButton();
processFiltersPage.clickRunningFilterButton();
processFiltersPage.selectFromProcessList('My Default Name');
attachmentListPage.clickAttachFileButton(pngFile.location);
attachmentListPage.checkFileIsAttached(pngFile.name);
attachmentListPage.clickAttachFileButton(pdfFile.location);
attachmentListPage.checkFileIsAttached(pngFile.name);
attachmentListPage.checkFileIsAttached(pdfFile.name);
});
});

View File

@@ -76,7 +76,7 @@ describe('Form widgets', () => {
done(); done();
}); });
it('[C272778] Check text, multiline widgets - label, value and displayed', () => { it('[C272778] Should display text and multi-line in form', () => {
loginPage.loginToProcessServicesUsingUserModel(processUserModel); loginPage.loginToProcessServicesUsingUserModel(processUserModel);
processServicesPage.goToProcessServices().goToApp(appModel.name) processServicesPage.goToProcessServices().goToApp(appModel.name)
.clickTasksButton(); .clickTasksButton();
@@ -112,7 +112,7 @@ describe('Form widgets', () => {
}); });
it('[C272779] Check number, amount widgets - label, value and displayed', () => { it('[C272779] Should display number and amount in form', () => {
expect(taskPage.formFields().getFieldValue(appFields.number_id)) expect(taskPage.formFields().getFieldValue(appFields.number_id))
.toEqual(formInstance.getWidgetBy('id', appFields.number_id).value || ''); .toEqual(formInstance.getWidgetBy('id', appFields.number_id).value || '');
@@ -125,7 +125,7 @@ describe('Form widgets', () => {
.toEqual(formInstance.getWidgetBy('id', appFields.amount_id).name); .toEqual(formInstance.getWidgetBy('id', appFields.amount_id).name);
}); });
it('[C272780] Check attachfolder, attachfile widgets - label and displayed', () => { it('[C272780] Should display attach file and attach folder in form', () => {
expect(taskPage.formFields().getFieldLabel(appFields.attachfolder_id)) expect(taskPage.formFields().getFieldLabel(appFields.attachfolder_id))
.toEqual(formInstance.getWidgetBy('id', appFields.attachfolder_id).name); .toEqual(formInstance.getWidgetBy('id', appFields.attachfolder_id).name);
@@ -133,7 +133,7 @@ describe('Form widgets', () => {
.toEqual(formInstance.getWidgetBy('id', appFields.attachfile_id).name); .toEqual(formInstance.getWidgetBy('id', appFields.attachfile_id).name);
}); });
it('[C272781] Check date, date & time widgets - label, value and displayed', () => { it('[C272781] Should display date and date & time in form', () => {
expect(taskPage.formFields().getFieldLabel(appFields.date_id)) expect(taskPage.formFields().getFieldLabel(appFields.date_id))
.toContain(formInstance.getWidgetBy('id', appFields.date_id).name); .toContain(formInstance.getWidgetBy('id', appFields.date_id).name);
@@ -146,7 +146,7 @@ describe('Form widgets', () => {
.toEqual(formInstance.getWidgetBy('id', appFields.dateTime_id).value || ''); .toEqual(formInstance.getWidgetBy('id', appFields.dateTime_id).value || '');
}); });
it('[C272782] Check people, group widgets - label, value and displayed', () => { it('[C272782] Should display people and group in form', () => {
expect(taskPage.formFields().getFieldValue(appFields.people_id)) expect(taskPage.formFields().getFieldValue(appFields.people_id))
.toEqual(formInstance.getWidgetBy('id', appFields.people_id).value || ''); .toEqual(formInstance.getWidgetBy('id', appFields.people_id).value || '');
@@ -159,7 +159,7 @@ describe('Form widgets', () => {
.toEqual(formInstance.getWidgetBy('id', appFields.group_id).name); .toEqual(formInstance.getWidgetBy('id', appFields.group_id).name);
}); });
it('[C272783] Check displayText, displayValue widgets - value and displayed', () => { it('[C272783] Should display displayText and displayValue in form', () => {
expect(widget.displayTextWidget().getFieldLabel(appFields.displaytext_id)) expect(widget.displayTextWidget().getFieldLabel(appFields.displaytext_id))
.toEqual(formInstance.getWidgetBy('id', appFields.displaytext_id).value); .toEqual(formInstance.getWidgetBy('id', appFields.displaytext_id).value);
@@ -167,7 +167,7 @@ describe('Form widgets', () => {
.toEqual(formInstance.getWidgetBy('id', appFields.displayvalue_id).value || 'Unknown type: readonly'); .toEqual(formInstance.getWidgetBy('id', appFields.displayvalue_id).value || 'Unknown type: readonly');
}); });
it('[C272784] Check typeahead, header widgets - label, value and displayed', () => { it('[C272784] Should display typeahead and header in form', () => {
expect(widget.headerWidget().getFieldLabel(appFields.header_id)) expect(widget.headerWidget().getFieldLabel(appFields.header_id))
.toEqual(formInstance.getWidgetBy('id', appFields.header_id).name); .toEqual(formInstance.getWidgetBy('id', appFields.header_id).name);
@@ -178,7 +178,7 @@ describe('Form widgets', () => {
.toEqual(formInstance.getWidgetBy('id', appFields.typeahead_id).name); .toEqual(formInstance.getWidgetBy('id', appFields.typeahead_id).name);
}); });
it('[C272785] Check checkbox, radiobuttons widgets - label, value and displayed', () => { it('[C272785] Should display checkbox and radio button in form', () => {
let radioOption = 1; let radioOption = 1;
expect(taskPage.formFields().getFieldLabel(appFields.checkbox_id)) expect(taskPage.formFields().getFieldLabel(appFields.checkbox_id))
@@ -190,7 +190,7 @@ describe('Form widgets', () => {
.toContain(formInstance.getWidgetBy('id', appFields.radiobuttons_id).options[radioOption - 1].name); .toContain(formInstance.getWidgetBy('id', appFields.radiobuttons_id).options[radioOption - 1].name);
}); });
it('[C268149] Check hyperlink, dropdown, dynamictable widgets - label, value and displayed', () => { it('[C268149] Should display hyperlink, dropdown and dynamic table in form', () => {
expect(widget.hyperlink().getFieldText(appFields.hyperlink_id)) expect(widget.hyperlink().getFieldText(appFields.hyperlink_id))
.toEqual(formInstance.getWidgetBy('id', appFields.hyperlink_id).hyperlinkUrl || ''); .toEqual(formInstance.getWidgetBy('id', appFields.hyperlink_id).hyperlinkUrl || '');

View File

@@ -27,6 +27,7 @@ import resources = require('../util/resources');
import AlfrescoApi = require('alfresco-js-api-node'); import AlfrescoApi = require('alfresco-js-api-node');
import { AppsActions } from '../actions/APS/apps.actions'; import { AppsActions } from '../actions/APS/apps.actions';
import { UsersActions } from '../actions/users.actions'; import { UsersActions } from '../actions/users.actions';
import { browser } from 'protractor';
describe('Process List - Pagination when adding processes', () => { describe('Process List - Pagination when adding processes', () => {
@@ -45,9 +46,11 @@ describe('Process List - Pagination when adding processes', () => {
let app = resources.Files.SIMPLE_APP_WITH_USER_FORM; let app = resources.Files.SIMPLE_APP_WITH_USER_FORM;
let nrOfProcesses = 25; let nrOfProcesses = 25;
let page, totalPages; let page, totalPages;
let i;
let apps = new AppsActions();
let resultApp;
beforeAll(async (done) => { beforeAll(async (done) => {
let apps = new AppsActions();
let users = new UsersActions(); let users = new UsersActions();
this.alfrescoJsApi = new AlfrescoApi({ this.alfrescoJsApi = new AlfrescoApi({
@@ -61,34 +64,43 @@ describe('Process List - Pagination when adding processes', () => {
await this.alfrescoJsApi.login(processUserModel.email, processUserModel.password); await this.alfrescoJsApi.login(processUserModel.email, processUserModel.password);
let resultApp = await apps.importPublishDeployApp(this.alfrescoJsApi, app.file_location); resultApp = await apps.importPublishDeployApp(this.alfrescoJsApi, app.file_location);
for (let i = 0; i < nrOfProcesses; i++) { for (i = 0; i < (nrOfProcesses - 5); i++) {
await apps.startProcess(this.alfrescoJsApi, resultApp); await apps.startProcess(this.alfrescoJsApi, resultApp);
} }
loginPage.loginToProcessServicesUsingUserModel(processUserModel); loginPage.loginToProcessServicesUsingUserModel(processUserModel);
done();
});
it('[C261046] Items per page set to 15 and adding of processes', () => {
totalPages = 2;
page = 1;
processServicesPage.goToProcessServices().goToTaskApp().clickProcessButton(); processServicesPage.goToProcessServices().goToTaskApp().clickProcessButton();
processDetailsPage.checkProcessTitleIsDisplayed(); processDetailsPage.checkProcessTitleIsDisplayed();
processFiltersPage.waitForTableBody(); processFiltersPage.waitForTableBody();
done();
});
it('[C261046] Should keep Items per page after adding processes', () => {
totalPages = 2;
page = 1;
paginationPage.selectItemsPerPage(itemsPerPage.fifteen); paginationPage.selectItemsPerPage(itemsPerPage.fifteen);
processDetailsPage.checkProcessTitleIsDisplayed(); processDetailsPage.checkProcessTitleIsDisplayed();
processFiltersPage.waitForTableBody(); processFiltersPage.waitForTableBody();
expect(paginationPage.getCurrentPage()).toEqual('Page ' + page); expect(paginationPage.getCurrentPage()).toEqual('Page ' + page);
expect(paginationPage.getTotalPages()).toEqual('of ' + totalPages); expect(paginationPage.getTotalPages()).toEqual('of ' + totalPages);
expect(paginationPage.getCurrentItemsPerPage()).toEqual(itemsPerPage.fifteen); expect(paginationPage.getCurrentItemsPerPage()).toEqual(itemsPerPage.fifteen);
expect(paginationPage.getPaginationRange()).toEqual('Showing 1-' + itemsPerPage.fifteenValue * page + ' of ' + nrOfProcesses); expect(paginationPage.getPaginationRange()).toEqual('Showing 1-' + itemsPerPage.fifteenValue * page + ' of ' + (nrOfProcesses - 5));
expect(processFiltersPage.numberOfProcessRows()).toBe(itemsPerPage.fifteenValue); expect(processFiltersPage.numberOfProcessRows()).toBe(itemsPerPage.fifteenValue);
paginationPage.checkNextPageButtonIsEnabled(); paginationPage.checkNextPageButtonIsEnabled();
paginationPage.checkPreviousPageButtonIsDisabled(); paginationPage.checkPreviousPageButtonIsDisabled();
browser.controlFlow().execute(async () => {
for (i; i < nrOfProcesses; i++) {
await apps.startProcess(this.alfrescoJsApi, resultApp);
}
});
page++; page++;
paginationPage.clickOnNextPage(); paginationPage.clickOnNextPage();
processDetailsPage.checkProcessTitleIsDisplayed(); processDetailsPage.checkProcessTitleIsDisplayed();

View File

@@ -28,6 +28,7 @@ import { UsersActions } from '../actions/users.actions';
import TestConfig = require('../test.config'); import TestConfig = require('../test.config');
import resources = require('../util/resources'); import resources = require('../util/resources');
import { browser } from 'protractor';
describe('Items per page set to 15 and adding of tasks', () => { describe('Items per page set to 15 and adding of tasks', () => {
@@ -38,7 +39,9 @@ describe('Items per page set to 15 and adding of tasks', () => {
let processUserModel; let processUserModel;
let app = resources.Files.SIMPLE_APP_WITH_USER_FORM; let app = resources.Files.SIMPLE_APP_WITH_USER_FORM;
let currentPage = 1, nrOfTasks = 25, totalPages = 2; let currentPage = 1, nrOfTasks = 25, totalPages = 2, i, resultApp;
let apps = new AppsActions();
let itemsPerPage = { let itemsPerPage = {
fifteen: '15', fifteen: '15',
@@ -46,7 +49,6 @@ describe('Items per page set to 15 and adding of tasks', () => {
}; };
beforeAll(async (done) => { beforeAll(async (done) => {
let apps = new AppsActions();
let users = new UsersActions(); let users = new UsersActions();
this.alfrescoJsApi = new AlfrescoApi({ this.alfrescoJsApi = new AlfrescoApi({
@@ -60,9 +62,9 @@ describe('Items per page set to 15 and adding of tasks', () => {
await this.alfrescoJsApi.login(processUserModel.email, processUserModel.password); await this.alfrescoJsApi.login(processUserModel.email, processUserModel.password);
let resultApp = await apps.importPublishDeployApp(this.alfrescoJsApi, app.file_location); resultApp = await apps.importPublishDeployApp(this.alfrescoJsApi, app.file_location);
for (let i = 0; i < nrOfTasks; i++) { for (i = 0; i < (nrOfTasks - 5); i++) {
await apps.startProcess(this.alfrescoJsApi, resultApp); await apps.startProcess(this.alfrescoJsApi, resultApp);
} }
@@ -78,11 +80,17 @@ describe('Items per page set to 15 and adding of tasks', () => {
expect(paginationPage.getCurrentItemsPerPage()).toEqual(itemsPerPage.fifteen); expect(paginationPage.getCurrentItemsPerPage()).toEqual(itemsPerPage.fifteen);
expect(paginationPage.getCurrentPage()).toEqual('Page ' + currentPage); expect(paginationPage.getCurrentPage()).toEqual('Page ' + currentPage);
expect(paginationPage.getTotalPages()).toEqual('of ' + totalPages); expect(paginationPage.getTotalPages()).toEqual('of ' + totalPages);
expect(paginationPage.getPaginationRange()).toEqual('Showing 1-' + itemsPerPage.fifteenValue + ' of ' + nrOfTasks); expect(paginationPage.getPaginationRange()).toEqual('Showing 1-' + itemsPerPage.fifteenValue + ' of ' + (nrOfTasks - 5));
expect(taskPage.getAllDisplayedRows()).toBe(itemsPerPage.fifteenValue); expect(taskPage.getAllDisplayedRows()).toBe(itemsPerPage.fifteenValue);
browser.controlFlow().execute(async () => {
for (i; i < nrOfTasks; i++) {
await apps.startProcess(this.alfrescoJsApi, resultApp);
}
});
currentPage++; currentPage++;
paginationPage.clickOnNextPage(); paginationPage.clickOnNextPage();
expect(paginationPage.getCurrentItemsPerPage()).toEqual(itemsPerPage.fifteen); expect(paginationPage.getCurrentItemsPerPage()).toEqual(itemsPerPage.fifteen);
expect(paginationPage.getCurrentPage()).toEqual('Page ' + currentPage); expect(paginationPage.getCurrentPage()).toEqual('Page ' + currentPage);
expect(paginationPage.getTotalPages()).toEqual('of ' + totalPages); expect(paginationPage.getTotalPages()).toEqual('of ' + totalPages);

View File

@@ -32,7 +32,7 @@ import AlfrescoApi = require('alfresco-js-api-node');
import { UsersActions } from '../actions/users.actions'; import { UsersActions } from '../actions/users.actions';
import { AppsActions } from '../actions/APS/apps.actions'; import { AppsActions } from '../actions/APS/apps.actions';
import FileModel = require('../models/ACS/fileModel'); import FileModel = require('../models/ACS/fileModel');
import { browser } from '../../node_modules/protractor'; import { browser } from 'protractor';
describe('Attachment list action menu for processes', () => { describe('Attachment list action menu for processes', () => {
@@ -96,7 +96,7 @@ describe('Attachment list action menu for processes', () => {
done(); done();
}); });
it('[C260228] Option menu functionality - Active Process', () => { it('[C260228] Should be able to access options of a file attached to an active process', () => {
processServicesPage.goToProcessServices().goToApp(app.title).clickProcessButton(); processServicesPage.goToProcessServices().goToApp(app.title).clickProcessButton();
processFiltersPage.selectFromProcessList(processName.active); processFiltersPage.selectFromProcessList(processName.active);
@@ -130,7 +130,7 @@ describe('Attachment list action menu for processes', () => {
attachmentListPage.checkFileIsRemoved(pngFile.name); attachmentListPage.checkFileIsRemoved(pngFile.name);
}); });
it('[C279886] Option menu functionality - Completed Process', () => { it('[C279886] Should be able to access options of a file attached to a completed process', () => {
processServicesPage.goToProcessServices().goToApp(app.title).clickProcessButton(); processServicesPage.goToProcessServices().goToApp(app.title).clickProcessButton();
processFiltersPage.clickRunningFilterButton(); processFiltersPage.clickRunningFilterButton();
@@ -164,7 +164,7 @@ describe('Attachment list action menu for processes', () => {
attachmentListPage.checkFileIsRemoved(pngFile.name); attachmentListPage.checkFileIsRemoved(pngFile.name);
}); });
it('[C277296] Upload file - ProcessList - Task APP', () => { it('[C277296] Should allow upload file when clicking on \'add\' icon', () => {
processServicesPage.goToProcessServices().goToTaskApp().clickProcessButton(); processServicesPage.goToProcessServices().goToTaskApp().clickProcessButton();
processFiltersPage.clickRunningFilterButton(); processFiltersPage.clickRunningFilterButton();
@@ -176,7 +176,7 @@ describe('Attachment list action menu for processes', () => {
attachmentListPage.checkFileIsAttached(pngFile.name); attachmentListPage.checkFileIsAttached(pngFile.name);
}); });
it('[C260235] Empty list component', () => { it('[C260235] Should empty list component be displayed when no file is attached', () => {
processServicesPage.goToProcessServices().goToTaskApp().clickProcessButton(); processServicesPage.goToProcessServices().goToTaskApp().clickProcessButton();
processFiltersPage.clickRunningFilterButton(); processFiltersPage.clickRunningFilterButton();

View File

@@ -79,7 +79,7 @@ describe('Process List - Pagination', function () {
describe('Empty processes', function () { describe('Empty processes', function () {
it('[C261042] Should show empty content message an no pagination when no process are present', function () { it('[C280015] Should show empty content message an no pagination when no process are present', function () {
processServicesPage.goToProcessServices().goToTaskApp().clickProcessButton(); processServicesPage.goToProcessServices().goToTaskApp().clickProcessButton();
processFiltersPage.checkNoContentMessage(); processFiltersPage.checkNoContentMessage();
paginationPage.checkPaginationIsNotDisplayed(); paginationPage.checkPaginationIsNotDisplayed();
@@ -105,7 +105,7 @@ describe('Process List - Pagination', function () {
done(); done();
}); });
it('[C261042] Default pagination', function () { it('[C261042] Should display default pagination', function () {
processServicesPage.goToProcessServices().goToTaskApp().clickProcessButton(); processServicesPage.goToProcessServices().goToTaskApp().clickProcessButton();
page = 1; page = 1;
@@ -125,7 +125,7 @@ describe('Process List - Pagination', function () {
paginationPage.checkPreviousPageButtonIsDisabled(); paginationPage.checkPreviousPageButtonIsDisabled();
}); });
it('[C261043] Items per page set to 15', function () { it('[C261043] Should be possible to Items per page to 15', function () {
page = 1; page = 1;
totalPages = 2; totalPages = 2;
processServicesPage.goToProcessServices().goToTaskApp().clickProcessButton(); processServicesPage.goToProcessServices().goToTaskApp().clickProcessButton();
@@ -167,7 +167,7 @@ describe('Process List - Pagination', function () {
expect(paginationPage.getCurrentItemsPerPage()).toEqual(itemsPerPage.fifteen); expect(paginationPage.getCurrentItemsPerPage()).toEqual(itemsPerPage.fifteen);
}); });
it('[C261044] Items per page set to 10', function () { it('[C261044] Should be possible to Items per page to 10', function () {
page = 1; page = 1;
totalPages = 2; totalPages = 2;
processServicesPage.goToProcessServices().goToTaskApp().clickProcessButton(); processServicesPage.goToProcessServices().goToTaskApp().clickProcessButton();
@@ -209,7 +209,7 @@ describe('Process List - Pagination', function () {
expect(paginationPage.getCurrentItemsPerPage()).toEqual(itemsPerPage.ten); expect(paginationPage.getCurrentItemsPerPage()).toEqual(itemsPerPage.ten);
}); });
it('[C261047] Items per page set to 20', function () { it('[C261047] Should be possible to Items per page to 20', function () {
page = 1; page = 1;
totalPages = 1; totalPages = 1;
processServicesPage.goToProcessServices().goToTaskApp().clickProcessButton(); processServicesPage.goToProcessServices().goToTaskApp().clickProcessButton();
@@ -238,7 +238,7 @@ describe('Process List - Pagination', function () {
expect(paginationPage.getCurrentItemsPerPage()).toEqual(itemsPerPage.twenty); expect(paginationPage.getCurrentItemsPerPage()).toEqual(itemsPerPage.twenty);
}); });
it('[C261045] 5 Items per page', function () { it('[C261045] Should be possible to Items per page to 5', function () {
let showing; let showing;
page = 1; page = 1;
totalPages = 4; totalPages = 4;
@@ -313,7 +313,7 @@ describe('Process List - Pagination', function () {
expect(paginationPage.getCurrentItemsPerPage()).toEqual(itemsPerPage.five); expect(paginationPage.getCurrentItemsPerPage()).toEqual(itemsPerPage.five);
}); });
it('[C261049] Page number dropdown', function () { it('[C261049] Should be possible to open page number dropdown', function () {
let showing; let showing;
page = 1; page = 1;
totalPages = 2; totalPages = 2;
@@ -367,7 +367,7 @@ describe('Process List - Pagination', function () {
paginationPage.checkPreviousPageButtonIsDisabled(); paginationPage.checkPreviousPageButtonIsDisabled();
}); });
it('[C261048] Sorting by Name', function () { it('[C261048] Should be possible to sort processes by name', function () {
processServicesPage.goToProcessServices().goToTaskApp().clickProcessButton(); processServicesPage.goToProcessServices().goToTaskApp().clickProcessButton();
processFiltersPage.clickRunningFilterButton(); processFiltersPage.clickRunningFilterButton();
processFiltersPage.checkFilterIsHighlighted(processFilterRunning); processFiltersPage.checkFilterIsHighlighted(processFilterRunning);
@@ -387,7 +387,7 @@ describe('Process List - Pagination', function () {
processFiltersPage.checkProcessesSortedByNameDesc(); processFiltersPage.checkProcessesSortedByNameDesc();
}); });
it('[C286260] Sorting chosen should remain when changing \'Items per page\'', function () { it('[C286260] Should keep sorting when changing \'Items per page\'', function () {
processServicesPage.goToProcessServices().goToTaskApp().clickProcessButton(); processServicesPage.goToProcessServices().goToTaskApp().clickProcessButton();
processFiltersPage.clickRunningFilterButton(); processFiltersPage.clickRunningFilterButton();
processFiltersPage.checkFilterIsHighlighted(processFilterRunning); processFiltersPage.checkFilterIsHighlighted(processFilterRunning);

View File

@@ -77,7 +77,7 @@ describe('Task List Pagination - Sorting', () => {
done(); done();
}); });
it('[C260308] Sorting by Name', () => { it('[C260308] Should be possible to sort tasks by name', () => {
processServicesPage.goToProcessServices().goToTaskApp(); processServicesPage.goToProcessServices().goToTaskApp();
taskPage.filtersPage().goToFilter(CONSTANTS.TASKFILTERS.INV_TASKS); taskPage.filtersPage().goToFilter(CONSTANTS.TASKFILTERS.INV_TASKS);
taskPage.tasksListPage().waitForTableBody(); taskPage.tasksListPage().waitForTableBody();

View File

@@ -33,7 +33,6 @@ import AlfrescoApi = require('alfresco-js-api-node');
import { UsersActions } from '../actions/users.actions'; import { UsersActions } from '../actions/users.actions';
import fs = require('fs'); import fs = require('fs');
import path = require('path'); import path = require('path');
import Util = require('..ro/util/util');
describe('Start Task - Task App', () => { describe('Start Task - Task App', () => {

View File

@@ -28,6 +28,7 @@ import { AppNavigationBarPage } from '../pages/adf/process_services/appNavigatio
import ProcessDetailsPage = require('../pages/adf/process_services/processDetailsPage'); import ProcessDetailsPage = require('../pages/adf/process_services/processDetailsPage');
import { AttachmentListPage } from '../pages/adf/process_services/attachmentListPage'; import { AttachmentListPage } from '../pages/adf/process_services/attachmentListPage';
import { AppsActions } from '../actions/APS/apps.actions'; import { AppsActions } from '../actions/APS/apps.actions';
import { browser } from 'protractor';
import User = require('../models/APS/User'); import User = require('../models/APS/User');
import Tenant = require('../models/APS/Tenant'); import Tenant = require('../models/APS/Tenant');
@@ -100,10 +101,6 @@ describe('Start Process Component', () => {
await this.alfrescoJsApiUserTwo.activiti.modelsApi.deleteModel(simpleAppCreated.id); await this.alfrescoJsApiUserTwo.activiti.modelsApi.deleteModel(simpleAppCreated.id);
// await this.alfrescoJsApiUserTwo.activiti.modelsApi.deleteModel(secondModelId);
//
// await this.alfrescoJsApiUserTwo.activiti.modelsApi.deleteModel(modelId);
await this.alfrescoJsApi.activiti.adminTenantsApi.deleteTenant(tenantId); await this.alfrescoJsApi.activiti.adminTenantsApi.deleteTenant(tenantId);
done(); done();
@@ -117,7 +114,7 @@ describe('Start Process Component', () => {
processServicesPage.checkApsContainer(); processServicesPage.checkApsContainer();
}); });
it('[C260458] Check start a process without a process model included', () => { it('[C260458] Should NOT be able to start a process without process model', () => {
processServicesPage.goToApp('Task App'); processServicesPage.goToApp('Task App');
appNavigationBarPage.clickProcessButton(); appNavigationBarPage.clickProcessButton();
processFiltersPage.clickCreateProcessButton(); processFiltersPage.clickCreateProcessButton();
@@ -134,7 +131,7 @@ describe('Start Process Component', () => {
processServicesPage.checkApsContainer(); processServicesPage.checkApsContainer();
}); });
it('[C260441] Check Start Process within Task App', () => { it('[C260441] Should display start process form and default name when creating a new process', () => {
processServicesPage.goToApp('Task App'); processServicesPage.goToApp('Task App');
appNavigationBarPage.clickProcessButton(); appNavigationBarPage.clickProcessButton();
processFiltersPage.clickCreateProcessButton(); processFiltersPage.clickCreateProcessButton();
@@ -142,7 +139,7 @@ describe('Start Process Component', () => {
expect(startProcessPage.getDefaultName()).toEqual('My Default Name'); expect(startProcessPage.getDefaultName()).toEqual('My Default Name');
}); });
it('[C260445] Process Definition is required and cancel button is clicked', () => { it('[C260445] Should require process definition and be possible to click cancel button', () => {
processServicesPage.goToApp('Task App'); processServicesPage.goToApp('Task App');
appNavigationBarPage.clickProcessButton(); appNavigationBarPage.clickProcessButton();
processFiltersPage.clickCreateProcessButton(); processFiltersPage.clickCreateProcessButton();
@@ -154,7 +151,7 @@ describe('Start Process Component', () => {
processFiltersPage.checkNoContentMessage(); processFiltersPage.checkNoContentMessage();
}); });
it('[C260444] Name of the process is required', () => { it('[C260444] Should require process name', () => {
processServicesPage.goToApp(app.title); processServicesPage.goToApp(app.title);
appNavigationBarPage.clickProcessButton(); appNavigationBarPage.clickProcessButton();
processFiltersPage.clickCreateProcessButton(); processFiltersPage.clickCreateProcessButton();
@@ -164,7 +161,7 @@ describe('Start Process Component', () => {
startProcessPage.checkStartProcessButtonIsDisabled(); startProcessPage.checkStartProcessButtonIsDisabled();
}); });
it('[C260443] Check Start Process within an app without a start event', () => { it('[C260443] Should be possible to start a process without start event', () => {
processServicesPage.goToApp(app.title); processServicesPage.goToApp(app.title);
appNavigationBarPage.clickProcessButton(); appNavigationBarPage.clickProcessButton();
processFiltersPage.clickCreateProcessButton(); processFiltersPage.clickCreateProcessButton();
@@ -174,7 +171,7 @@ describe('Start Process Component', () => {
startProcessPage.checkStartProcessButtonIsEnabled(); startProcessPage.checkStartProcessButtonIsEnabled();
}); });
xit('[C260449] Start a process within an app with a start event', () => { xit('[C260449] Should be possible to start a process with start event', () => {
processServicesPage.goToApp(app.title); processServicesPage.goToApp(app.title);
appNavigationBarPage.clickProcessButton(); appNavigationBarPage.clickProcessButton();
processFiltersPage.clickCreateProcessButton(); processFiltersPage.clickCreateProcessButton();
@@ -201,7 +198,7 @@ describe('Start Process Component', () => {
}); });
}); });
it('[C286503] No options are displayed when typing a process that does not exist', () => { it('[C286503] Should NOT display any process definition when typing a non-existent one', () => {
processServicesPage.goToApp(app.title); processServicesPage.goToApp(app.title);
appNavigationBarPage.clickProcessButton(); appNavigationBarPage.clickProcessButton();
processFiltersPage.clickCreateProcessButton(); processFiltersPage.clickCreateProcessButton();
@@ -211,7 +208,7 @@ describe('Start Process Component', () => {
startProcessPage.checkStartProcessButtonIsDisabled(); startProcessPage.checkStartProcessButtonIsDisabled();
}); });
it('[C286504] Proper options are displayed when typing a part of existent process definitions', () => { it('[C286504] Should display proper options when typing a part of existent process definitions', () => {
processServicesPage.goToApp(app.title); processServicesPage.goToApp(app.title);
appNavigationBarPage.clickProcessButton(); appNavigationBarPage.clickProcessButton();
processFiltersPage.clickCreateProcessButton(); processFiltersPage.clickCreateProcessButton();
@@ -223,7 +220,7 @@ describe('Start Process Component', () => {
startProcessPage.checkStartProcessButtonIsEnabled(); startProcessPage.checkStartProcessButtonIsEnabled();
}); });
it('[C286508] Only one option is displayed when typing an existent process definition', () => { it('[C286508] Should display only one option when typing an existent process definition', () => {
processServicesPage.goToApp(app.title); processServicesPage.goToApp(app.title);
appNavigationBarPage.clickProcessButton(); appNavigationBarPage.clickProcessButton();
processFiltersPage.clickCreateProcessButton(); processFiltersPage.clickCreateProcessButton();
@@ -283,7 +280,7 @@ describe('Start Process Component', () => {
expect(startProcessPage.getProcessDefinitionValue()).toBe(''); expect(startProcessPage.getProcessDefinitionValue()).toBe('');
}); });
it('[C260453] Add a comment on an active process', () => { it('[C260453] Should be possible to add a comment on an active process', () => {
processServicesPage.goToApp(app.title); processServicesPage.goToApp(app.title);
appNavigationBarPage.clickProcessButton(); appNavigationBarPage.clickProcessButton();
processFiltersPage.clickCreateProcessButton(); processFiltersPage.clickCreateProcessButton();
@@ -297,7 +294,7 @@ describe('Start Process Component', () => {
processDetailsPage.checkCommentIsDisplayed('comment1'); processDetailsPage.checkCommentIsDisplayed('comment1');
}); });
it('[C260454] Click Audit Log button', () => { it('[C260454] Should be possible to download audit log file', () => {
processServicesPage.goToApp(app.title); processServicesPage.goToApp(app.title);
appNavigationBarPage.clickProcessButton(); appNavigationBarPage.clickProcessButton();
processFiltersPage.clickCreateProcessButton(); processFiltersPage.clickCreateProcessButton();
@@ -312,7 +309,7 @@ describe('Start Process Component', () => {
expect(Util.fileExists(auditLogFile, 15)).toBe(true); expect(Util.fileExists(auditLogFile, 15)).toBe(true);
}); });
it('Add a file in the attachment list using the button', () => { it('Should be able to attach a file using the button', () => {
processServicesPage.goToApp(app.title); processServicesPage.goToApp(app.title);
appNavigationBarPage.clickProcessButton(); appNavigationBarPage.clickProcessButton();
@@ -331,7 +328,7 @@ describe('Start Process Component', () => {
attachmentListPage.checkFileIsAttached(jpgFile.name); attachmentListPage.checkFileIsAttached(jpgFile.name);
}); });
it('[C260451] Click Show Diagram', () => { it('[C260451] Should be possible to display process diagram', () => {
processServicesPage.goToApp(app.title); processServicesPage.goToApp(app.title);
appNavigationBarPage.clickProcessButton(); appNavigationBarPage.clickProcessButton();
@@ -349,7 +346,7 @@ describe('Start Process Component', () => {
processDetailsPage.clickShowDiagram(); processDetailsPage.clickShowDiagram();
}); });
it('[C260452] Click on an active task', () => { it('[C260452] Should redirect user when clicking on active/completed task', () => {
processServicesPage.goToApp(app.title); processServicesPage.goToApp(app.title);
appNavigationBarPage.clickProcessButton(); appNavigationBarPage.clickProcessButton();
processFiltersPage.clickCreateProcessButton(); processFiltersPage.clickCreateProcessButton();
@@ -363,7 +360,7 @@ describe('Start Process Component', () => {
processDetailsPage.checkActiveTaskTitleIsDisplayed(app.task_name); processDetailsPage.checkActiveTaskTitleIsDisplayed(app.task_name);
}); });
it('[C260457] Click Cancel process button', () => { it('[C260457] Should display process in Completed when cancelled', () => {
loginPage.loginToProcessServicesUsingUserModel(secondProcUserModel); loginPage.loginToProcessServicesUsingUserModel(secondProcUserModel);
navigationBarPage.clickProcessServicesButton(); navigationBarPage.clickProcessServicesButton();
processServicesPage.checkApsContainer(); processServicesPage.checkApsContainer();
@@ -382,7 +379,7 @@ describe('Start Process Component', () => {
processDetailsPage.checkShowDiagramIsDisabled(); processDetailsPage.checkShowDiagramIsDisabled();
}); });
it('[C260461] Add a comment on a complete process', () => { it('[C260461] Should be possible to add a comment on a completed/canceled process', () => {
processServicesPage.goToApp(app.title); processServicesPage.goToApp(app.title);
appNavigationBarPage.clickProcessButton(); appNavigationBarPage.clickProcessButton();
processFiltersPage.clickCreateProcessButton(); processFiltersPage.clickCreateProcessButton();
@@ -399,7 +396,7 @@ describe('Start Process Component', () => {
processDetailsPage.checkCommentIsDisplayed('goodbye'); processDetailsPage.checkCommentIsDisplayed('goodbye');
}); });
it('[C260467] Cannot attach a file on a completed process', () => { it('[C260467] Should NOT be possible to attach a file on a completed process', () => {
processServicesPage.goToApp(app.title); processServicesPage.goToApp(app.title);
appNavigationBarPage.clickProcessButton(); appNavigationBarPage.clickProcessButton();
processFiltersPage.clickCreateProcessButton(); processFiltersPage.clickCreateProcessButton();

View File

@@ -90,7 +90,7 @@ describe('Start Task - Custom App', () => {
done(); done();
}); });
it('[C263942] Modifying task', () => { it('[C263942] Should be possible to modify a task', () => {
processServicesPage processServicesPage
.goToProcessServices() .goToProcessServices()
.goToApp(appModel.name) .goToApp(appModel.name)
@@ -142,7 +142,7 @@ describe('Start Task - Custom App', () => {
}); });
}); });
it('[C263946] Information box', () => { it('[C263946] Should display information box for started task', () => {
processServicesPage.goToProcessServices().goToApp(appModel.name).clickTasksButton(); processServicesPage.goToProcessServices().goToApp(appModel.name).clickTasksButton();
taskPage.filtersPage().goToFilter(CONSTANTS.TASKFILTERS.MY_TASKS); taskPage.filtersPage().goToFilter(CONSTANTS.TASKFILTERS.MY_TASKS);
taskPage.createNewTask().addName(tasks[1]).addDescription('Description') taskPage.createNewTask().addName(tasks[1]).addDescription('Description')
@@ -178,7 +178,7 @@ describe('Start Task - Custom App', () => {
}); });
}); });
it('[C263947] Start task with no form', () => { it('[C263947] Should be able to start a task without form', () => {
processServicesPage processServicesPage
.goToProcessServices() .goToProcessServices()
.goToApp(appModel.name) .goToApp(appModel.name)
@@ -204,7 +204,7 @@ describe('Start Task - Custom App', () => {
expect(taskPage.taskDetails().getFormName()).toEqual(CONSTANTS.TASKDETAILS.NO_FORM); expect(taskPage.taskDetails().getFormName()).toEqual(CONSTANTS.TASKDETAILS.NO_FORM);
}); });
it('[C263948] Start task buttons', () => { it('[C263948] Should be possible to cancel a task', () => {
processServicesPage.goToProcessServices() processServicesPage.goToProcessServices()
.goToApp(appModel.name) .goToApp(appModel.name)
.clickTasksButton(); .clickTasksButton();
@@ -226,7 +226,7 @@ describe('Start Task - Custom App', () => {
expect(taskPage.filtersPage().getActiveFilter()).toEqual(CONSTANTS.TASKFILTERS.MY_TASKS); expect(taskPage.filtersPage().getActiveFilter()).toEqual(CONSTANTS.TASKFILTERS.MY_TASKS);
}); });
it('[C263949] Refreshing the form', () => { it('[C263949] Should be possible to save filled form', () => {
processServicesPage.goToProcessServices().goToApp(appModel.name).clickTasksButton(); processServicesPage.goToProcessServices().goToApp(appModel.name).clickTasksButton();
taskPage.filtersPage() taskPage.filtersPage()
.goToFilter(CONSTANTS.TASKFILTERS.MY_TASKS); .goToFilter(CONSTANTS.TASKFILTERS.MY_TASKS);
@@ -264,7 +264,7 @@ describe('Start Task - Custom App', () => {
.checkFieldValue(by.id, formTextField, formFieldValue); .checkFieldValue(by.id, formTextField, formFieldValue);
}); });
it('[C263951] Assign User', () => { it('[C263951] Should be possible to assign a user', () => {
processServicesPage.goToProcessServices().goToApp(appModel.name).clickTasksButton(); processServicesPage.goToProcessServices().goToApp(appModel.name).clickTasksButton();
taskPage taskPage
.filtersPage() .filtersPage()

View File

@@ -94,7 +94,7 @@ describe('Start Task - Task App', () => {
done(); done();
}); });
it('[C260383] Modifying task', () => { it('[C260383] Should be possible to modify a task', () => {
processServicesPage.goToProcessServices().goToTaskApp().clickTasksButton(); processServicesPage.goToProcessServices().goToTaskApp().clickTasksButton();
taskPage.filtersPage().goToFilter(CONSTANTS.TASKFILTERS.MY_TASKS); taskPage.filtersPage().goToFilter(CONSTANTS.TASKFILTERS.MY_TASKS);
taskPage.createNewTask().addName(tasks[0]) taskPage.createNewTask().addName(tasks[0])
@@ -116,7 +116,7 @@ describe('Start Task - Task App', () => {
}); });
}); });
it('[C260506] Information box', () => { it('[C260506] Should display information box for started task', () => {
processServicesPage.goToProcessServices().goToTaskApp().clickTasksButton(); processServicesPage.goToProcessServices().goToTaskApp().clickTasksButton();
taskPage.filtersPage().goToFilter(CONSTANTS.TASKFILTERS.MY_TASKS); taskPage.filtersPage().goToFilter(CONSTANTS.TASKFILTERS.MY_TASKS);
taskPage.createNewTask().addName(tasks[1]).addDescription('Description') taskPage.createNewTask().addName(tasks[1]).addDescription('Description')
@@ -161,7 +161,7 @@ describe('Start Task - Task App', () => {
}); });
}); });
it('[C260422] Start task buttons', () => { it('[C260422] Should be possible to cancel a task', () => {
processServicesPage.goToProcessServices().goToTaskApp().clickTasksButton(); processServicesPage.goToProcessServices().goToTaskApp().clickTasksButton();
taskPage.filtersPage().goToFilter(CONSTANTS.TASKFILTERS.MY_TASKS); taskPage.filtersPage().goToFilter(CONSTANTS.TASKFILTERS.MY_TASKS);
taskPage.createNewTask().checkStartButtonIsDisabled().addName(tasks[3]) taskPage.createNewTask().checkStartButtonIsDisabled().addName(tasks[3])
@@ -172,7 +172,7 @@ describe('Start Task - Task App', () => {
}); });
}); });
it('[C260423] Refreshing the form', () => { it('[C260423] Should be possible to save filled form', () => {
processServicesPage.goToProcessServices().goToTaskApp().clickTasksButton(); processServicesPage.goToProcessServices().goToTaskApp().clickTasksButton();
taskPage.filtersPage().goToFilter(CONSTANTS.TASKFILTERS.MY_TASKS); taskPage.filtersPage().goToFilter(CONSTANTS.TASKFILTERS.MY_TASKS);
taskPage.createNewTask() taskPage.createNewTask()
@@ -189,7 +189,7 @@ describe('Start Task - Task App', () => {
}); });
}); });
it('[C260425] Assign User', () => { it('[C260425] Should be possible to assign a user', () => {
processServicesPage.goToProcessServices().goToTaskApp().clickTasksButton(); processServicesPage.goToProcessServices().goToTaskApp().clickTasksButton();
taskPage.filtersPage().goToFilter(CONSTANTS.TASKFILTERS.MY_TASKS); taskPage.filtersPage().goToFilter(CONSTANTS.TASKFILTERS.MY_TASKS);
taskPage.createNewTask().addName(tasks[5]) taskPage.createNewTask().addName(tasks[5])

View File

@@ -33,7 +33,7 @@ import { AppsActions } from '../actions/APS/apps.actions';
import path = require('path'); import path = require('path');
import Util = require('../util/util'); import Util = require('../util/util');
describe('Start Task - Task App', () => { describe('Task Audit', () => {
let loginPage = new LoginPage(); let loginPage = new LoginPage();
let processServicesPage = new ProcessServicesPage(); let processServicesPage = new ProcessServicesPage();

View File

@@ -223,14 +223,10 @@ describe('Task', () => {
let loginPage = new LoginPage(); let loginPage = new LoginPage();
let navigationBarPage = new NavigationBarPage(); let navigationBarPage = new NavigationBarPage();
let processServicesPage = new ProcessServicesPage(); let processServicesPage = new ProcessServicesPage();
let tasksPage = new TasksPage();
let tasksListPage = new TasksListPage();
let taskFiltersPage = new TaskFiltersPage(); let taskFiltersPage = new TaskFiltersPage();
let taskDetailsPage = new TaskDetailsPage();
let appNavigationBarPage = new AppNavigationBarPage(); let appNavigationBarPage = new AppNavigationBarPage();
let appSettingsToggles = new AppSettingsToggles(); let appSettingsToggles = new AppSettingsToggles();
let tenantId;
let user; let user;
let appId; let appId;
let importedApp; let importedApp;
@@ -251,7 +247,6 @@ describe('Task', () => {
await this.alfrescoJsApi.login(TestConfig.adf.adminEmail, TestConfig.adf.adminPassword); await this.alfrescoJsApi.login(TestConfig.adf.adminEmail, TestConfig.adf.adminPassword);
user = await users.createTenantAndUser(this.alfrescoJsApi); user = await users.createTenantAndUser(this.alfrescoJsApi);
tenantId = user.tenantId;
await this.alfrescoJsApi.login(user.email, user.password); await this.alfrescoJsApi.login(user.email, user.password);
@@ -269,10 +264,6 @@ describe('Task', () => {
}); });
// afterAll(async(done) => {
// await this.alfrescoJsApi.activiti.adminTenantsApi.deleteTenant(tenantId);
// done();
// });
beforeEach(async () => { beforeEach(async () => {
navigationBarPage.clickProcessServicesButton(); navigationBarPage.clickProcessServicesButton();
processServicesPage.checkApsContainer(); processServicesPage.checkApsContainer();

View File

@@ -40,13 +40,10 @@ describe('Task Filters Sorting', () => {
let taskFiltersPage = new TaskFiltersPage(); let taskFiltersPage = new TaskFiltersPage();
let taskDetailsPage = new TaskDetailsPage(); let taskDetailsPage = new TaskDetailsPage();
let tenantId;
let user; let user;
let appId; let appId;
let importedApp; let importedApp;
let taskFilterId;
let app = resources.Files.APP_WITH_PROCESSES; let app = resources.Files.APP_WITH_PROCESSES;
let tasks = [ let tasks = [
@@ -69,7 +66,6 @@ describe('Task Filters Sorting', () => {
await this.alfrescoJsApi.login(TestConfig.adf.adminEmail, TestConfig.adf.adminPassword); await this.alfrescoJsApi.login(TestConfig.adf.adminEmail, TestConfig.adf.adminPassword);
user = await users.createTenantAndUser(this.alfrescoJsApi); user = await users.createTenantAndUser(this.alfrescoJsApi);
tenantId = user.tenantId;
await this.alfrescoJsApi.login(user.email, user.password); await this.alfrescoJsApi.login(user.email, user.password);
@@ -118,7 +114,6 @@ describe('Task Filters Sorting', () => {
let result = await this.alfrescoJsApi.activiti.userFiltersApi.createUserTaskFilter(newFilter); let result = await this.alfrescoJsApi.activiti.userFiltersApi.createUserTaskFilter(newFilter);
taskFilterId = result.id;
return result; return result;
}); });
@@ -142,7 +137,6 @@ describe('Task Filters Sorting', () => {
let result = await this.alfrescoJsApi.activiti.userFiltersApi.createUserTaskFilter(newFilter); let result = await this.alfrescoJsApi.activiti.userFiltersApi.createUserTaskFilter(newFilter);
taskFilterId = result.id;
return result; return result;
}); });
@@ -165,7 +159,6 @@ describe('Task Filters Sorting', () => {
let result = await this.alfrescoJsApi.activiti.userFiltersApi.createUserTaskFilter(newFilter); let result = await this.alfrescoJsApi.activiti.userFiltersApi.createUserTaskFilter(newFilter);
taskFilterId = result.id;
return result; return result;
}); });
@@ -188,7 +181,6 @@ describe('Task Filters Sorting', () => {
let result = await this.alfrescoJsApi.activiti.userFiltersApi.createUserTaskFilter(newFilter); let result = await this.alfrescoJsApi.activiti.userFiltersApi.createUserTaskFilter(newFilter);
taskFilterId = result.id;
return result; return result;
}); });
@@ -211,7 +203,6 @@ describe('Task Filters Sorting', () => {
let result = await this.alfrescoJsApi.activiti.userFiltersApi.createUserTaskFilter(newFilter); let result = await this.alfrescoJsApi.activiti.userFiltersApi.createUserTaskFilter(newFilter);
taskFilterId = result.id;
return result; return result;
}); });
@@ -234,7 +225,6 @@ describe('Task Filters Sorting', () => {
let result = await this.alfrescoJsApi.activiti.userFiltersApi.createUserTaskFilter(newFilter); let result = await this.alfrescoJsApi.activiti.userFiltersApi.createUserTaskFilter(newFilter);
taskFilterId = result.id;
return result; return result;
}); });
@@ -257,7 +247,6 @@ describe('Task Filters Sorting', () => {
let result = await this.alfrescoJsApi.activiti.userFiltersApi.createUserTaskFilter(newFilter); let result = await this.alfrescoJsApi.activiti.userFiltersApi.createUserTaskFilter(newFilter);
taskFilterId = result.id;
return result; return result;
}); });
@@ -280,7 +269,6 @@ describe('Task Filters Sorting', () => {
let result = await this.alfrescoJsApi.activiti.userFiltersApi.createUserTaskFilter(newFilter); let result = await this.alfrescoJsApi.activiti.userFiltersApi.createUserTaskFilter(newFilter);
taskFilterId = result.id;
return result; return result;
}); });

View File

@@ -79,7 +79,7 @@ describe('Task List Pagination', () => {
done(); done();
}); });
it('[C260301] Pagination at first 20 started tasks', () => { it('[C260301] Should display default pagination', () => {
processServicesPage.goToProcessServices().goToTaskApp(); processServicesPage.goToProcessServices().goToTaskApp();
expect(paginationPage.getCurrentItemsPerPage()).toEqual(itemsPerPage.default); expect(paginationPage.getCurrentItemsPerPage()).toEqual(itemsPerPage.default);
expect(paginationPage.getPaginationRange()).toEqual('Showing 1-' + nrOfTasks + ' of ' + nrOfTasks); expect(paginationPage.getPaginationRange()).toEqual('Showing 1-' + nrOfTasks + ' of ' + nrOfTasks);
@@ -91,7 +91,7 @@ describe('Task List Pagination', () => {
expect(paginationPage.getPaginationRange()).toEqual('Showing 1-' + nrOfTasks + ' of ' + nrOfTasks); expect(paginationPage.getPaginationRange()).toEqual('Showing 1-' + nrOfTasks + ' of ' + nrOfTasks);
}); });
it('[C260304] Items per page set to 5', () => { it('[C260304] Should be possible to set Items per page to 5', () => {
processServicesPage.goToProcessServices().goToTaskApp(); processServicesPage.goToProcessServices().goToTaskApp();
taskPage.filtersPage().goToFilter(CONSTANTS.TASKFILTERS.INV_TASKS); taskPage.filtersPage().goToFilter(CONSTANTS.TASKFILTERS.INV_TASKS);
paginationPage.selectItemsPerPage(itemsPerPage.five); paginationPage.selectItemsPerPage(itemsPerPage.five);
@@ -119,7 +119,7 @@ describe('Task List Pagination', () => {
expect(paginationPage.getCurrentItemsPerPage()).toEqual(itemsPerPage.five); expect(paginationPage.getCurrentItemsPerPage()).toEqual(itemsPerPage.five);
}); });
it('[C260303] Items per page set to 10', () => { it('[C260303] Should be possible to set Items per page to 10', () => {
processServicesPage.goToProcessServices().goToTaskApp(); processServicesPage.goToProcessServices().goToTaskApp();
taskPage.filtersPage().goToFilter(CONSTANTS.TASKFILTERS.INV_TASKS); taskPage.filtersPage().goToFilter(CONSTANTS.TASKFILTERS.INV_TASKS);
paginationPage.selectItemsPerPage(itemsPerPage.ten); paginationPage.selectItemsPerPage(itemsPerPage.ten);
@@ -136,7 +136,7 @@ describe('Task List Pagination', () => {
expect(paginationPage.getCurrentItemsPerPage()).toEqual(itemsPerPage.ten); expect(paginationPage.getCurrentItemsPerPage()).toEqual(itemsPerPage.ten);
}); });
it('[C260302] Items per page set to 15', () => { it('[C260302] Should be possible to set Items per page to 15', () => {
processServicesPage.goToProcessServices().goToTaskApp(); processServicesPage.goToProcessServices().goToTaskApp();
taskPage.filtersPage().goToFilter(CONSTANTS.TASKFILTERS.INV_TASKS); taskPage.filtersPage().goToFilter(CONSTANTS.TASKFILTERS.INV_TASKS);
paginationPage.selectItemsPerPage(itemsPerPage.fifteen); paginationPage.selectItemsPerPage(itemsPerPage.fifteen);
@@ -153,7 +153,7 @@ describe('Task List Pagination', () => {
expect(paginationPage.getCurrentItemsPerPage()).toEqual(itemsPerPage.fifteen); expect(paginationPage.getCurrentItemsPerPage()).toEqual(itemsPerPage.fifteen);
}); });
it('[C261006] Page number dropdown', () => { it('[C261006] Should be possible to navigate to a page with page number dropdown', () => {
currentPage = 1; currentPage = 1;
totalPages = 2; totalPages = 2;
processServicesPage.goToProcessServices().goToTaskApp(); processServicesPage.goToProcessServices().goToTaskApp();