[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
@@ -127,7 +127,7 @@ describe('Create folder directive', function () {
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 = ['* ', '<', '>', '\\', '/', '?', ':', '|'];
contentServicesPage.clickOnCreateNewFolder();
@@ -87,7 +87,7 @@ describe('Document List Component - Actions', () => {
done();
});
it('[C213257] - Copy File', () => {
it('[C213257] Should be able to copy a file', () => {
browser.driver.sleep(12000);
contentListPage.rightClickOnRowNamed(pdfUploadedNode.entry.name);
@@ -102,13 +102,13 @@ describe('Document List Component - Actions', () => {
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.checkContentIsNotDisplayed(pdfFileModel.name);
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(testFileModel.name);
contentListPage.deleteContent(pdfFileModel.name);
@@ -116,14 +116,14 @@ describe('Document List Component - Actions', () => {
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.pressContextMenuActionNamed('Delete');
contentListPage.checkContentIsNotDisplayed(pdfFileModel.name);
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.checkContextActionIsVisible('Download');
contentListPage.checkContextActionIsVisible('Copy');
@@ -135,7 +135,7 @@ describe('Document List Component - Actions', () => {
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(testFileModel.name);
contentListPage.rightClickOnRowNamed(pdfFileModel.name);
@@ -166,13 +166,13 @@ describe('Document List Component - Actions', () => {
done();
});
it('[C260123] - Delete - Dropdown Menu', () => {
it('[C260123] Should be able to delete a folder using context menu', () => {
contentListPage.deleteContent(folderName);
contentListPage.checkContentIsNotDisplayed(folderName);
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.checkContextActionIsVisible('Download');
contentListPage.checkContextActionIsVisible('Copy');
@@ -182,7 +182,7 @@ describe('Document List Component - Actions', () => {
contentListPage.checkContextActionIsVisible('Permission');
});
it('[C260138] - Copy - folder', () => {
it('[C260138] Should be able to copy a folder', () => {
browser.driver.sleep(12000);
contentListPage.copyContent(folderName);
@@ -93,14 +93,14 @@ describe('Document List Component', () => {
done();
});
it('[C217334] - Error message displayed without permissions', () => {
it('[C217334] Should display a message when accessing file without permissions', () => {
loginPage.loginToContentServicesUsingUserModel(acsUser);
browser.get(TestConfig.adf.url + '/files/' + privateSite.entry.guid);
expect(errorPage.getErrorCode()).toBe('403');
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);
contentServicesPage.goToDocumentList();
contentServicesPage.enableCustomPermissionMessage();
@@ -108,7 +108,7 @@ describe('Document List Component', () => {
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);
navBar.openLanguageMenu();
navBar.chooseLanguage('Italian');
@@ -176,7 +176,7 @@ describe('Document List Component', () => {
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);
contentServicesPage.goToDocumentList();
contentServicesPage.checkContentIsDisplayed(folderName);
@@ -185,7 +185,7 @@ describe('Document List Component', () => {
expect(contentServicesPage.getDocumentListRowNumber()).toBe(4);
});
it('[C279927] - All columns are showed', () => {
it('[C279927] Should display default columns', () => {
loginPage.loginToContentServicesUsingUserModel(acsUser);
contentServicesPage.goToDocumentList();
contentServicesPage.checkColumnNameHeader();
@@ -194,7 +194,7 @@ describe('Document List Component', () => {
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);
timeAgoUploadedNode = await uploadActions.uploadFile(this.alfrescoJsApi, timeAgoFileModel.location, timeAgoFileModel.name, '-my-');
loginPage.loginToContentServicesUsingUserModel(acsUser);
@@ -204,7 +204,7 @@ describe('Document List Component', () => {
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);
mediumDateUploadedNode = await uploadActions.uploadFile(this.alfrescoJsApi, mediumFileModel.location, mediumFileModel.name, '-my-');
let createdDate = moment(mediumDateUploadedNode.createdAt).format('ll');
@@ -265,44 +265,44 @@ describe('Document List Component', () => {
done();
});
it('[C260112] - Sorting ascending by name', () => {
it('[C260112] Should be able to sort by name (Ascending)', () => {
loginPage.loginToContentServicesUsingUserModel(acsUser);
contentServicesPage.goToDocumentList();
contentServicesPage.sortAndCheckListIsOrderedByName('asc');
});
it('[C272770] - Sorting descending by name', () => {
it('[C272770] Should be able to sort by name (Descending)', () => {
loginPage.loginToContentServicesUsingUserModel(acsUser);
contentServicesPage.goToDocumentList();
contentServicesPage.sortAndCheckListIsOrderedByName('desc');
});
it('[C272771] - Sorting ascending by author', () => {
it('[C272771] Should be able to sort by author (Ascending)', () => {
loginPage.loginToContentServicesUsingUserModel(acsUser);
contentServicesPage.goToDocumentList();
contentServicesPage.sortAndCheckListIsOrderedByAuthor('asc');
});
it('[C272772] - Sorting descending by author', () => {
it('[C272772] Should be able to sort by author (Descending)', () => {
loginPage.loginToContentServicesUsingUserModel(acsUser);
contentServicesPage.goToDocumentList();
contentServicesPage.sortAndCheckListIsOrderedByAuthor('desc');
});
it('[C272773] - Sorting ascending by created date', () => {
it('[C272773] Should be able to sort by date (Ascending)', () => {
loginPage.loginToContentServicesUsingUserModel(acsUser);
contentServicesPage.goToDocumentList();
contentServicesPage.sortAndCheckListIsOrderedByCreated('asc');
});
it('[C272774] - Sorting descending by created date', () => {
it('[C272774] Should be able to sort by date (Descending)', () => {
loginPage.loginToContentServicesUsingUserModel(acsUser);
contentServicesPage.goToDocumentList();
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();
await this.alfrescoJsApi.login(TestConfig.adf.adminEmail, TestConfig.adf.adminPassword);
await this.alfrescoJsApi.core.peopleApi.addPerson(acsUser);
@@ -312,7 +312,7 @@ describe('Document List Component', () => {
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();
let folderName = 'BANANA';
@@ -327,7 +327,7 @@ describe('Document List Component', () => {
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({
'name': resources.Files.ADF_DOCUMENTS.TEST.file_name,
'location': resources.Files.ADF_DOCUMENTS.TEST.file_location
@@ -347,7 +347,7 @@ describe('Document List Component', () => {
done();
});
it('[C261997] - Recent Files empty', async (done) => {
it('[C261997] Should be able to clean Recent Files history', async (done) => {
acsUser = new AcsUserModel();
await this.alfrescoJsApi.login(TestConfig.adf.adminEmail, TestConfig.adf.adminPassword);
await this.alfrescoJsApi.core.peopleApi.addPerson(acsUser);
@@ -362,7 +362,7 @@ describe('Document List Component', () => {
done();
});
it('[C268119] - "ygj" letters rendering in document list', async (done) => {
it('[C268119] "ygj" letters should be rendered properly', async (done) => {
acsUser = new AcsUserModel();
let folderName = 'ggggggjjjjjjjjjjjjyyyyyy';
await this.alfrescoJsApi.login(TestConfig.adf.adminEmail, TestConfig.adf.adminPassword);
@@ -378,7 +378,7 @@ describe('Document List Component', () => {
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();
let folderNameA = `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();
});
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({
'name': resources.Files.ADF_DOCUMENTS.TEST.file_name,
'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);
contentServicesPage.goToDocumentList();
contentServicesPage.checkListIsSortedByNameColumn('asc');
@@ -513,39 +513,39 @@ describe('Document List Component', () => {
contentServicesPage.goToDocumentList();
});
it('[C260108] - File tooltip', () => {
it('[C260108] Should display tooltip for file\'s 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);
});
it('[C260119] - Thumbnail - Disabled - folder', async (done) => {
it('[C260119] Should have a specific thumbnail for folders', async (done) => {
let folderIconUrl = await contentServicesPage.getRowIconImageUrl(folderName);
expect(folderIconUrl).toContain('/assets/images/ft_ic_folder.svg');
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);
expect(fileIconUrl).toContain('/assets/images/ft_ic_pdf.svg');
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);
expect(fileIconUrl).toContain('/assets/images/ft_ic_ms_word.svg');
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);
expect(fileIconUrl).toContain('/assets/images/ft_ic_document.svg');
done();
});
it('[C274701] - Thumbnails - Enabled', async (done) => {
it('[C274701] Should be able to enable thumbnails', async (done) => {
contentServicesPage.enableThumbnails();
contentServicesPage.checkAcsContainer();
let fileIconUrl = await contentServicesPage.getRowIconImageUrl(pdfFile.name);
@@ -604,11 +604,11 @@ describe('Document List Component', () => {
contentServicesPage.checkCardViewContainerIsDisplayed();
});
it('[C280016] - Gallery view is showed', () => {
it('[C280016] Should be able to choose Gallery View', () => {
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(pdfFile.name)).toContain('/assets/images/ft_ic_pdf.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);
});
it('[C280069] - Gallery Card show details - attributes', () => {
it('[C280069] Gallery Card should show attributes', () => {
contentServicesPage.checkDocumentCardPropertyIsShowed(folderName, cardProperties.DISPLAY_NAME);
contentServicesPage.checkDocumentCardPropertyIsShowed(folderName, cardProperties.SIZE);
contentServicesPage.checkDocumentCardPropertyIsShowed(folderName, cardProperties.CREATED_BY);
@@ -649,35 +649,35 @@ describe('Document List Component', () => {
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);
expect(contentServicesPage.getCardElementShowedInPage()).toBe(1);
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.checkAcsContainer();
contentServicesPage.navigateToFolder(folderName);
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.checkListIsSortedByNameColumn('asc');
});
it('[C261994] - Sort by Size', () => {
it('[C261994] Should be able to sort Gallery Cards by size', () => {
contentServicesPage.selectGridSortingFromDropdown(cardProperties.SIZE);
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.checkListIsSortedByAuthorColumn('asc');
});
it('[C261996] - Sort by Created', () => {
it('[C261996] Should be able to sort Gallery Cards by created date', () => {
contentServicesPage.selectGridSortingFromDropdown(cardProperties.CREATED);
contentServicesPage.checkListIsSortedByCreatedColumn('asc');
});
@@ -88,7 +88,7 @@ describe('Document List - Pagination', function () {
done();
});
it('[C260062] Default pagination settings', function () {
it('[C260062] Should use default pagination settings', function () {
contentServicesPage.goToDocumentList();
contentServicesPage.navigateToFolder(newFolderModel.name);
contentServicesPage.checkAcsContainer();
@@ -103,7 +103,7 @@ describe('Document List - Pagination', function () {
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.navigateToFolder(newFolderModel.name);
contentServicesPage.checkAcsContainer();
@@ -130,7 +130,7 @@ describe('Document List - Pagination', function () {
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.navigateToFolder(newFolderModel.name);
contentServicesPage.checkAcsContainer();
@@ -185,7 +185,7 @@ describe('Document List - Pagination', function () {
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;
contentServicesPage.goToDocumentList();
contentServicesPage.navigateToFolder(newFolderModel.name);
@@ -222,7 +222,7 @@ describe('Document List - Pagination', function () {
currentPage = 1;
});
it('[C260065] 15 Items per page', function () {
it('[C260065] Should be able to set Items per page to 15', function () {
currentPage = 1;
contentServicesPage.goToDocumentList();
contentServicesPage.navigateToFolder(newFolderModel.name);
@@ -256,7 +256,7 @@ describe('Document List - Pagination', function () {
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.navigateToFolder(newFolderModel.name);
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();
paginationPage.selectItemsPerPage(itemsPerPage.five);
contentServicesPage.checkAcsContainer();
@@ -112,26 +112,26 @@ describe('Search component - Search Bar', () => {
done();
});
it('[C272798] Search bar is visible', () => {
it('[C272798] Search bar should be visible', () => {
searchDialog.checkSearchBarIsNotVisible().checkSearchIconIsVisible();
searchDialog.clickOnSearchIcon().checkSearchBarIsVisible().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.clickOnSearchIcon().checkSearchBarIsNotVisible().checkSearchIconIsVisible();
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()
.enterText(search.inactive.name).checkNoResultMessageIsDisplayed();
searchDialog.clearText();
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();
searchDialog.clickOnSearchIcon().checkSearchBarIsVisible().enterText(firstFolderModel.shortName);
@@ -156,7 +156,7 @@ describe('Search component - Search Bar', () => {
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();
searchDialog.clickOnSearchIcon().checkSearchBarIsVisible().enterText(firstFolderModel.name);
searchDialog.resultTableContainsRow(firstFolderModel.name);
@@ -179,7 +179,7 @@ describe('Search component - Search Bar', () => {
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.resultTableContainsRow(firstFolderModel.name);
searchDialog.clickOnSpecificRow(firstFolderModel.name);
@@ -197,21 +197,21 @@ describe('Search component - Search Bar', () => {
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.enterTextAndPressEnter(search.inactive.name);
searchResultPage.checkNoResultMessageIsDisplayed();
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();
browser.driver.sleep(1000);
searchDialog.enterTextAndPressEnter(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();
searchDialog.clickOnSearchIcon();
searchDialog.enterTextAndPressEnter(firstFileModel.name);
@@ -230,7 +230,7 @@ describe('Search component - Search Bar', () => {
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();
searchDialog
@@ -88,7 +88,7 @@ describe('Search Filters', () => {
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=*');
searchFiltersPage.checkShowLessButtonIsNotDisplayed();
@@ -107,7 +107,7 @@ describe('Search Component - Multi-Select Facet', () => {
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');
expect(searchResultsPage.numberOfResultsDisplayed()).toBe(2);
@@ -186,7 +186,7 @@ describe('Search Component - Multi-Select Facet', () => {
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.filterByCreator(userUploadingTxt.firstName, userUploadingTxt.lastName);
@@ -245,7 +245,7 @@ describe('Search Component - Multi-Select Facet', () => {
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.filterByCreator(acsUser.firstName, acsUser.lastName);
@@ -105,7 +105,7 @@ describe('Search component - Search Page', () => {
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();
contentServicesPage.goToDocumentList();
searchDialog.checkSearchBarIsNotVisible().checkSearchIconIsVisible().clickOnSearchIcon()
@@ -113,7 +113,7 @@ describe('Search component - Search Page', () => {
searchResultPage.checkNoResultMessageIsDisplayed();
});
it('[C260265] File previewer is displayed', () => {
it('[C260265] Should display file previewer when opening a file from search results', () => {
contentServicesPage.goToDocumentList();
searchDialog
@@ -130,7 +130,7 @@ describe('Search component - Search Page', () => {
filePreviewPage.closePreviewWithButton();
});
it('[C272810] Only the searched file is displayed', () => {
it('[C272810] Should display only files corresponding to search', () => {
contentServicesPage.goToDocumentList();
searchDialog
@@ -143,7 +143,7 @@ describe('Search component - Search Page', () => {
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();
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();
searchDialog
@@ -181,7 +181,7 @@ describe('Search component - Search Page', () => {
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()
.checkSearchIconIsVisible()
.clickOnSearchIcon()
@@ -198,7 +198,7 @@ describe('Search component - Search Page', () => {
searchResultPage.checkNoResultMessageIsDisplayed();
});
it('[C272803] Sort content ascending by name.', () => {
it('[C272803] Should be able to sort results by name (Ascending)', () => {
contentServicesPage.goToDocumentList();
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();
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();
searchDialog.checkSearchBarIsNotVisible().checkSearchIconIsVisible().clickOnSearchIcon()
.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();
searchDialog.checkSearchBarIsNotVisible().checkSearchIconIsVisible().clickOnSearchIcon()
.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();
searchDialog.checkSearchBarIsNotVisible().checkSearchIconIsVisible().clickOnSearchIcon()
.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();
searchDialog.checkSearchBarIsNotVisible().checkSearchIconIsVisible().clickOnSearchIcon()
.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();
searchDialog.checkSearchBarIsNotVisible().checkSearchIconIsVisible().clickOnSearchIcon()
.enterTextAndPressEnter(search.no_permission.noPermFile);
@@ -279,7 +279,7 @@ describe('Search component - Search Page', () => {
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();
searchDialog.checkSearchBarIsNotVisible();
searchDialog.checkSearchIconIsVisible();
+6 -6
View File
@@ -99,7 +99,7 @@ describe('Tag component', () => {
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.getNewTagPlaceholder()).toEqual('New Tag');
expect(tagPage.addTagButtonIsEnabled()).toEqual(false);
@@ -109,7 +109,7 @@ describe('Tag component', () => {
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.addTag(tagList[0]);
@@ -117,7 +117,7 @@ describe('Tag component', () => {
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.addTag(sameTag);
tagPage.checkTagIsDisplayedInTagList(sameTag);
@@ -125,7 +125,7 @@ describe('Tag component', () => {
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.addTag(tagList[2]);
@@ -136,7 +136,7 @@ describe('Tag component', () => {
tagPage.checkTagListContentServicesIsOrderedAscending();
});
it('[C91326] Tag text field', () => {
it('[C91326] Should be possible to create a tag with different characters', () => {
tagPage.insertNodeId(pdfFileModel.id);
tagPage.addTag(uppercaseTag);
@@ -159,7 +159,7 @@ describe('Tag component', () => {
tagPage.checkTagIsDisplayedInTagListByNodeId(nonLatinTag);
});
it('[C260375] Delete tag', () => {
it('[C260375] Should be possible to delete a tag', () => {
let deleteTag = Util.generateRandomStringToUpperCase();
tagPage.insertNodeId(deleteFile.id);
@@ -88,7 +88,7 @@ describe('Trashcan - Pagination', () => {
done();
});
it('[C272811] 20 Items per page', () => {
it('[C272811] Should be able to set Items per page to 20', () => {
navigationBarPage.clickTrashcanButton();
trashcanPage.waitForTableBody();
@@ -106,7 +106,7 @@ describe('Trashcan - Pagination', () => {
paginationPage.checkPreviousPageButtonIsDisabled();
});
it('[C276742] 15 Items per page', () => {
it('[C276742] Should be able to set Items per page to 15', () => {
navigationBarPage.clickTrashcanButton();
trashcanPage.waitForTableBody();
paginationPage.selectItemsPerPage(itemsPerPage.fifteen);
@@ -119,7 +119,7 @@ describe('Trashcan - Pagination', () => {
paginationPage.checkPreviousPageButtonIsDisabled();
});
it('[C276743] 10 Items per page', () => {
it('[C276743] Should be able to set Items per page to 10', () => {
navigationBarPage.clickTrashcanButton();
trashcanPage.waitForTableBody();
paginationPage.selectItemsPerPage(itemsPerPage.ten);
@@ -132,7 +132,7 @@ describe('Trashcan - Pagination', () => {
paginationPage.checkPreviousPageButtonIsDisabled();
});
it('[C276744] 5 Items per page', () => {
it('[C276744] Should be able to set Items per page to 5', () => {
navigationBarPage.clickTrashcanButton();
trashcanPage.waitForTableBody();
paginationPage.selectItemsPerPage(itemsPerPage.five);
@@ -118,8 +118,7 @@ describe('Upload component - Excluded Files', () => {
browser.refresh();
navigationBarPage.clickConfigEditorButton();
configEditorPage.clickFileConfiguration('adf-file-conf');
configEditorPage.clickFileConfiguration();
configEditorPage.clickClearButton();
@@ -149,7 +148,7 @@ describe('Upload component - Excluded Files', () => {
navigationBarPage.clickConfigEditorButton();
configEditorPage.clickFileConfiguration('adf-file-conf');
configEditorPage.clickFileConfiguration();
configEditorPage.clickClearButton();
@@ -15,7 +15,6 @@
* limitations under the License.
*/
/* tslint:disable */
import { element, by, browser } from 'protractor';
import { LoginPage } from '../../pages/adf/loginPage';
@@ -125,7 +124,7 @@ describe('Upload component', () => {
done();
});
it('[C272788] Upload Button is visible on the page', () => {
it('[C272788] Should display upload button', () => {
expect(contentServicesPage.getSingleFileButtonTooltip()).toEqual('Custom tooltip');
contentServicesPage
@@ -133,7 +132,7 @@ describe('Upload component', () => {
.checkContentIsDisplayed(firstPdfFileModel.name);
});
it('[C260173] Enable folder upload', () => {
it('[C260173] Should be able to upload folder when enabled', () => {
uploadToggles.enableFolderUpload();
contentServicesPage.uploadFolder(folderOne.location);
@@ -146,7 +145,7 @@ describe('Upload component', () => {
uploadToggles.disableFolderUpload();
});
it('[C272789] Upload a pdf file', () => {
it('[C272789] Should be able to upload PDF file', () => {
contentServicesPage
.uploadFile(pdfFileModel.location)
.checkContentIsDisplayed(pdfFileModel.name);
@@ -156,7 +155,7 @@ describe('Upload component', () => {
uploadDialog.clickOnCloseButton().dialogIsNotDisplayed();
});
it('[C272790] Upload a text file', () => {
it('[C272790] Should be able to upload text file', () => {
contentServicesPage
.uploadFile(docxFileModel.location)
.checkContentIsDisplayed(docxFileModel.name);
@@ -165,7 +164,7 @@ describe('Upload component', () => {
uploadDialog.clickOnCloseButton().dialogIsNotDisplayed();
});
it('[C260141] Upload a png file', () => {
it('[C260141] Should be possible to upload PNG file', () => {
contentServicesPage
.uploadFile(pngFileModel.location)
.checkContentIsDisplayed(pngFileModel.name);
@@ -174,7 +173,7 @@ describe('Upload component', () => {
uploadDialog.clickOnCloseButton().dialogIsNotDisplayed();
});
it('[C260143] Minimize and maximize the upload dialog box', () => {
it('[C260143] Should be possible to maximize/minimize the upload dialog', () => {
contentServicesPage
.uploadFile(docxFileModel.location)
.checkContentIsDisplayed(docxFileModel.name);
@@ -194,7 +193,7 @@ describe('Upload component', () => {
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)
.checkContentIsDisplayed(pdfFileModel.name);
uploadDialog.removeUploadedFile(pdfFileModel.name).fileIsCancelled(pdfFileModel.name);
@@ -203,7 +202,7 @@ describe('Upload component', () => {
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();' +
'document.querySelector("#adf-upload-dialog-cancel").click(); }, 3000)');
@@ -214,7 +213,7 @@ describe('Upload component', () => {
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);
expect(uploadDialog.getTitleText()).toEqual('Uploading 0 / 1');
expect(uploadDialog.getConfirmationDialogTitleText()).toEqual('Cancel Upload');
@@ -225,7 +224,7 @@ describe('Upload component', () => {
contentServicesPage.checkContentIsNotDisplayed(largeFile.name);
});
xit('[C272793] Cancel uploading multiple files', () => {
xit('[C272793] Should be able to cancel multiple files upload', () => {
uploadToggles.enableMultipleFileUpload();
contentServicesPage.uploadMultipleFile([pngFileModel.location, largeFile.location]);
uploadDialog.cancelUploads();
@@ -238,7 +237,7 @@ describe('Upload component', () => {
uploadToggles.disableMultipleFileUpload();
});
it('[C272794] Tooltip of uploading multiple files button', () => {
it('[C272794] Should display tooltip for uploading files', () => {
uploadToggles.enableMultipleFileUpload();
browser.driver.sleep(1000);
expect(contentServicesPage.getMultipleFileButtonTooltip()).toEqual('Custom tooltip');
@@ -277,7 +276,7 @@ describe('Upload component', () => {
uploadToggles.disableExtensionFilter();
});
it('[C279920] Upload same file twice', () => {
it('[C279920] Should rename a file uploaded twice', () => {
contentServicesPage
.uploadFile(pdfFileModel.location)
.checkContentIsDisplayed(pdfFileModel.name);
@@ -295,7 +294,7 @@ describe('Upload component', () => {
pdfFileModel.setVersion('');
});
it('[C260172] Enable versioning', () => {
it('[C260172] Should be possible to enable versioning', () => {
uploadToggles.enableVersioning();
contentServicesPage
@@ -322,7 +321,7 @@ describe('Upload component', () => {
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);
uploadDialog.fileIsUploaded(pngFileModelTwo.name);
@@ -338,7 +337,7 @@ describe('Upload component', () => {
uploadDialog.clickOnCloseButton().dialogIsNotDisplayed();
});
it('[C260170] Upload files on the same time', () => {
it('[C260170] Should be possible to upload multiple files', () => {
contentServicesPage.goToDocumentList();
contentServicesPage.checkAcsContainer();
@@ -355,7 +354,7 @@ describe('Upload component', () => {
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.checkAcsContainer();
uploadToggles.enableMaxSize();
@@ -376,12 +375,12 @@ describe('Upload component', () => {
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();
uploadToggles.enableMaxSize();
uploadToggles.addMaxSize('0');
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);
contentServicesPage.uploadFile(emptyFile.location).checkContentIsDisplayed(emptyFile.name);
@@ -390,7 +389,7 @@ describe('Upload component', () => {
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();
browser.driver.sleep(1000);
uploadToggles.addMaxSize('1');
@@ -15,7 +15,7 @@
* limitations under the License.
*/
import { element, by } from 'protractor';
import { element, by, browser } from 'protractor';
import Util = require('../../util/util');
@@ -47,7 +47,6 @@ describe('Upload - User permission', () => {
let acsUserTwo;
let navigationBarPage = new NavigationBarPage();
let notificationPage = new NotificationPage();
let consumerSite, managerSite;
let emptyFile = new FileModel({
'name': resources.Files.ADF_DOCUMENTS.TXT_0B.file_name,