remove not needed spaces (#5495)

* remove not usefull spaces

* increase timeout

* increase timeout

* fix
This commit is contained in:
Eugenio Romano
2020-02-23 17:00:16 +00:00
committed by GitHub
parent 9e0e2bdfa6
commit 2d0b571875
302 changed files with 378 additions and 1245 deletions
@@ -61,8 +61,7 @@ describe('Comment Component', () => {
beforeAll(async () => {
await this.alfrescoJsApi.login(browser.params.testConfig.adf.adminEmail, browser.params.testConfig.adf.adminPassword);
await this.alfrescoJsApi.core.peopleApi.addPerson(acsUser);
});
});
afterAll(async () => {
await navigationBarPage.clickLogoutButton();
@@ -81,14 +80,12 @@ describe('Comment Component', () => {
await navigationBarPage.clickContentServicesButton();
await contentServicesPage.waitForTableBody();
});
});
afterEach(async () => {
await this.alfrescoJsApi.login(browser.params.testConfig.adf.adminEmail, browser.params.testConfig.adf.adminPassword);
await uploadActions.deleteFileOrFolder(nodeId);
});
});
it('[C276947] Should be able to add a comment on ACS and view on ADF', async () => {
await this.alfrescoJsApi.core.commentsApi.addComment(nodeId, { content: comments.test });
@@ -105,8 +102,7 @@ describe('Comment Component', () => {
await expect(await commentsPage.getMessage(0)).toEqual(comments.test);
await expect(await commentsPage.getUserName(0)).toEqual(userFullName);
await expect(await commentsPage.getTime(0)).toMatch(/(ago|few)/);
});
});
it('[C276948] Should be able to add a comment on a file', async () => {
await viewerPage.viewFile(pngFileModel.name);
@@ -47,8 +47,7 @@ describe('Create folder directive', () => {
await loginPage.loginToContentServicesUsingUserModel(acsUser);
await contentServicesPage.goToDocumentList();
});
});
afterAll(async () => {
await navigationBarPage.clickLogoutButton();
@@ -56,13 +55,11 @@ describe('Create folder directive', () => {
beforeEach(async () => {
await browser.actions().sendKeys(Key.ESCAPE).perform();
});
});
afterEach(async () => {
await browser.actions().sendKeys(Key.ESCAPE).perform();
});
});
it('[C260154] Should not create the folder if cancel button is clicked', async () => {
const folderName = 'cancelFolder';
@@ -58,8 +58,7 @@ describe('Create library directive', () => {
title: StringUtil.generateRandomString(20).toLowerCase(),
visibility: 'PUBLIC'
});
});
});
afterAll(async () => {
await navigationBarPage.clickLogoutButton();
@@ -68,8 +67,7 @@ describe('Create library directive', () => {
beforeEach(async () => {
await contentServicesPage.goToDocumentList();
await contentServicesPage.openCreateLibraryDialog();
});
});
afterEach(async () => {
await BrowserActions.closeMenuAndDialogs();
@@ -83,8 +83,7 @@ describe('Version component actions', () => {
await navigationBarPage.clickContentServicesButton();
await contentServicesPage.waitForTableBody();
});
});
afterAll(async () => {
await navigationBarPage.clickLogoutButton();
@@ -134,5 +133,4 @@ describe('Version component actions', () => {
await contentServicesPage.clickDownloadButton();
await FileBrowserUtil.isFileDownloaded(txtFileComma.name);
});
});
@@ -72,8 +72,7 @@ describe('Edit folder directive', () => {
});
await loginPage.loginToContentServicesUsingUserModel(acsUser);
});
});
afterAll(async () => {
await navigationBarPage.clickLogoutButton();
@@ -81,8 +80,7 @@ describe('Edit folder directive', () => {
await uploadActions.deleteFileOrFolder(editFolder.entry.id);
await uploadActions.deleteFileOrFolder(anotherFolder.entry.id);
await uploadActions.deleteFileOrFolder(filePdfNode.entry.id);
});
});
beforeEach(async () => {
await navigationBarPage.clickHomeButton();
@@ -178,8 +176,7 @@ describe('Edit folder directive', () => {
await editFolderDialog.checkCreateUpdateBtnIsEnabled();
await editFolderDialog.clickOnCancelButton();
await editFolderDialog.checkFolderDialogIsNotDisplayed();
});
});
it('[C260166] Enable/Disable edit folder icon - when file selected', async () => {
await expect(await contentServicesPage.getDocumentList().dataTablePage().getNumberOfSelectedRows()).toBe(0);
@@ -188,8 +185,7 @@ describe('Edit folder directive', () => {
await contentServicesPage.getDocumentList().dataTablePage().selectRow('Display name', filePdfNode.entry.name);
await contentServicesPage.getDocumentList().dataTablePage().checkRowIsSelected('Display name', filePdfNode.entry.name);
await expect(await contentServicesPage.isEditFolderButtonEnabled()).toBe(false);
});
});
it('[C260166] Enable/Disable edit folder icon - when multiple folders selected', async () => {
await contentServicesPage.clickMultiSelectToggle();
@@ -241,7 +237,5 @@ describe('Edit folder directive', () => {
await contentServicesPage.getDocumentList().dataTablePage().checkRowIsSelected('Display name', subFolder.entry.name);
await expect(await contentServicesPage.isEditFolderButtonEnabled()).toBe(false);
});
});
});
});
@@ -62,8 +62,7 @@ describe('Favorite directive', () => {
await loginPage.loginToContentServicesUsingUserModel(acsUser);
await contentServicesPage.goToDocumentList();
});
});
afterAll(async () => {
await navigationBarPage.clickLogoutButton();
@@ -72,14 +71,12 @@ describe('Favorite directive', () => {
await uploadActions.deleteFileOrFolder(testFolder2.entry.id);
await uploadActions.deleteFileOrFolder(testFolder3.entry.id);
await uploadActions.deleteFileOrFolder(testFolder4.entry.id);
});
});
beforeEach(async () => {
await navigationBarPage.clickContentServicesButton();
await contentServicesPage.getDocumentList().dataTablePage().waitTillContentLoaded();
});
});
it('[C260247] Should be able to mark a file as favorite', async () => {
await contentServicesPage.getDocumentList().dataTablePage().checkContentIsDisplayed('Display name', testFile.entry.name);
@@ -216,6 +213,5 @@ describe('Favorite directive', () => {
await contentServicesPage.getDocumentList().dataTablePage().checkRowIsSelected('Display name', testFolder3.entry.name);
await expect(await contentServicesPage.getDocumentList().dataTablePage().getNumberOfSelectedRows()).toBe(1);
await contentServicesPage.checkIsMarkedFavorite();
});
});
});
@@ -325,5 +325,4 @@ describe('Restore content directive', () => {
await contentServicesPage.checkContentIsDisplayed(pngFile.entry.name);
});
});
});
@@ -381,6 +381,5 @@ describe('Document List Component - Actions', () => {
await contentServicesPage.checkContentIsDisplayed('A' + folderModel1.name);
});
});
});
});
@@ -245,8 +245,7 @@ describe('Document List Component', () => {
await contentServicesPage.doubleClickRow(folderName);
await contentServicesPage.checkEmptyFolderTextToBe('This folder is empty');
await contentServicesPage.checkEmptyFolderImageUrlToContain('/assets/images/empty_doc_lib.svg');
});
});
it('[C272775] Should be able to upload a file in new folder', async () => {
const testFile = new FileModel({
@@ -266,8 +265,7 @@ describe('Document List Component', () => {
await contentServicesPage.doubleClickRow(uploadedFolder.entry.name);
await contentServicesPage.uploadFile(testFile.location);
await contentServicesPage.checkContentIsDisplayed(testFile.name);
});
});
it('[C261997] Should be able to clean Recent Files history', async () => {
acsUser = new AcsUserModel();
@@ -281,8 +279,7 @@ describe('Document List Component', () => {
await contentServicesPage.expandRecentFiles();
await contentServicesPage.checkEmptyRecentFileIsDisplayed();
await contentServicesPage.closeRecentFiles();
});
});
it('[C279970] Should display Islocked field for folders', async () => {
acsUser = new AcsUserModel();
@@ -299,8 +296,7 @@ describe('Document List Component', () => {
await contentServicesPage.checkContentIsDisplayed(folderNameB);
await contentServicesPage.checkLockIsDisplayedForElement(folderNameA);
await contentServicesPage.checkLockIsDisplayedForElement(folderNameB);
});
});
it('[C269086] Should display Islocked field for files', async () => {
const testFileA = new FileModel({
@@ -323,8 +319,7 @@ describe('Document List Component', () => {
await contentServicesPage.checkContentIsDisplayed(testFileB.name);
await contentServicesPage.checkLockIsDisplayedForElement(testFileA.name);
await contentServicesPage.checkLockIsDisplayedForElement(testFileB.name);
});
});
describe('Once uploaded 20 folders', () => {
@@ -357,8 +352,7 @@ describe('Document List Component', () => {
await contentServicesPage.checkListIsSortedByNameColumn('asc');
});
});
});
describe('Column Template', () => {
@@ -90,8 +90,7 @@ describe('Document List Component', () => {
});
await browser.driver.sleep(12000);
});
});
afterAll(async () => {
await navigationBarPage.clickLogoutButton();
@@ -101,8 +100,7 @@ describe('Document List Component', () => {
await uploadActions.deleteFileOrFolder(uploadedFile.entry.id);
await uploadActions.deleteFileOrFolder(sourceFolder.entry.id);
await uploadActions.deleteFileOrFolder(destinationFolder.entry.id);
});
});
describe('Document List Component - Actions Move and Copy', () => {
@@ -177,8 +175,7 @@ describe('Document List Component', () => {
await contentNodeSelector.clickMoveCopyButton();
await notificationHistoryPage.checkNotifyContains('This name is already in use, try a different name.');
});
});
});
describe('Document List actionns - Move, Copy on no permission folder', () => {
@@ -213,7 +210,5 @@ describe('Document List Component', () => {
await contentNodeSelector.contentListPage().dataTablePage().waitTillContentLoaded();
await contentNodeSelector.contentListPage().dataTablePage().checkRowContentIsDisplayed(subFolder2.entry.name);
});
});
});
});
@@ -184,7 +184,5 @@ describe('Document List Component', () => {
await contentServicesPage.selectGridSortingFromDropdown(cardProperties.CREATED);
await contentServicesPage.checkListIsSortedByCreatedColumn('asc');
});
});
});
});
@@ -81,8 +81,7 @@ describe('Document List - Pagination', () => {
await uploadActions.createEmptyFiles(secondSetOfFiles, folderThreeUploadedModel.entry.id);
await loginPage.loginToContentServicesUsingUserModel(acsUser);
});
});
afterAll(async () => {
await navigationBarPage.clickLogoutButton();
@@ -92,8 +91,7 @@ describe('Document List - Pagination', () => {
await contentServicesPage.goToDocumentList();
await contentServicesPage.checkAcsContainer();
await contentServicesPage.waitForTableBody();
});
});
it('[C260062] Should use default pagination settings', async () => {
await contentServicesPage.doubleClickRow(newFolderModel.name);
@@ -85,7 +85,5 @@ describe('Document List Component', () => {
await BrowserActions.getUrl(browser.params.testConfig.adf.url + '/files/' + privateSite.entry.guid);
await expect(await errorPage.getErrorDescription()).toBe('Accesso alla risorsa sul server non consentito.');
});
});
});
});
@@ -155,5 +155,4 @@ describe('Document List Component', () => {
});
});
});
+3 -6
View File
@@ -165,8 +165,7 @@ describe('Lock File', () => {
await contentServices.checkUnlockedIcon(pngFileModel.name);
});
});
});
describe('Locked file without owner permissions', () => {
@@ -252,8 +251,7 @@ describe('Lock File', () => {
await expect(error.status).toEqual(409);
}
});
});
});
describe('Locked file with owner permissions', () => {
@@ -351,6 +349,5 @@ describe('Lock File', () => {
await contentServices.deleteContent(pngFileToBeLocked.entry.name);
await contentServices.checkContentIsNotDisplayed(pngFileToBeLocked.entry.name);
});
});
});
});
@@ -77,8 +77,7 @@ describe('Aspect oriented config', () => {
aspects.entry.aspectNames.push(defaultModel.concat(':', defaultEmptyPropertiesAspect));
await this.alfrescoJsApi.core.nodesApi.updateNode(uploadedFile.entry.id, { aspectNames: aspects.entry.aspectNames });
});
});
afterAll(async () => {
await navigationBarPage.clickLogoutButton();
@@ -87,8 +86,7 @@ describe('Aspect oriented config', () => {
afterEach(async () => {
await viewerPage.clickCloseButton();
await contentServicesPage.checkAcsContainer();
});
});
it('[C261117] Should be possible restrict the display properties of one an aspect', async () => {
@@ -240,8 +238,7 @@ describe('Aspect oriented config', () => {
await expect(await metadataViewPage.getMetadataGroupTitle('GROUP-TITLE1-TRANSLATION-KEY')).toBe('CUSTOM TITLE TRANSLATION ONE');
await expect(await metadataViewPage.getMetadataGroupTitle('GROUP-TITLE2-TRANSLATION-KEY')).toBe('CUSTOM TITLE TRANSLATION TWO');
});
});
it('[C279968] Should be possible use a custom preset', async () => {
@@ -88,8 +88,7 @@ describe('permissions', () => {
});
await uploadActions.uploadFile(pngFileModel.location, pngFileModel.name, site.entry.guid);
});
});
afterAll(async () => {
await navigationBarPage.clickLogoutButton();
@@ -74,8 +74,7 @@ describe('CardView Component - properties', () => {
await navigationBarPage.clickContentServicesButton();
await contentServicesPage.waitForTableBody();
});
});
afterEach(async () => {
await viewerPage.clickCloseButton();
@@ -142,8 +141,7 @@ describe('CardView Component - properties', () => {
await metadataViewPage.checkMetadataGroupIsExpand('EXIF');
await metadataViewPage.checkMetadataGroupIsExpand('properties');
});
});
it('[C280559] Should show/hide the default metadata properties when displayDefaultProperties is true/false', async () => {
await viewerPage.viewFile(pngFileModel.name);
@@ -69,8 +69,7 @@ describe('Metadata component', () => {
const pngUploadedFile = await uploadActions.uploadFile(pngFileModel.location, pngFileModel.name, '-my-');
Object.assign(pngFileModel, pngUploadedFile.entry);
pngFileModel.update(pngUploadedFile.entry);
});
});
afterAll(async () => {
await navigationBarPage.clickLogoutButton();
@@ -237,8 +236,7 @@ describe('Metadata component', () => {
await metadataViewPage.clickUpdatePropertyIcon('properties.exif:fNumber');
await expect(await metadataViewPage.getPropertyText('properties.exif:fNumber')).toEqual('22');
});
});
});
describe('Folder metadata', () => {
@@ -279,8 +277,7 @@ describe('Metadata component', () => {
await metadataViewPage.clickUpdatePropertyIcon('name');
await expect(await metadataViewPage.getPropertyText('name')).toEqual(folderName);
});
});
});
it('[C279960] Should show the last username modifier when modify a File', async () => {
await loginPage.loginToContentServices(browser.params.testConfig.adf.adminEmail, browser.params.testConfig.adf.adminPassword);
@@ -316,5 +313,4 @@ describe('Metadata component', () => {
await viewerPage.clickCloseButton();
await contentServicesPage.waitForTableBody();
});
});
@@ -158,8 +158,7 @@ describe('Permissions Component', () => {
await uploadActions.uploadFile(fileModel.location, 'RoleCoordinator' + fileModel.name, roleCoordinatorFolder.entry.id);
await uploadActions.uploadFile(fileModel.location, 'RoleCollaborator' + fileModel.name, roleCollaboratorFolder.entry.id);
await uploadActions.uploadFile(fileModel.location, 'RoleEditor' + fileModel.name, roleEditorFolder.entry.id);
});
});
afterAll(async () => {
await navigationBarPage.clickLogoutButton();
@@ -238,8 +237,7 @@ describe('Permissions Component', () => {
await permissionsPage.checkResultListIsDisplayed();
await permissionsPage.checkUserOrGroupIsDisplayed('EVERYONE');
});
});
});
describe('Changing and duplicate Permissions', () => {
@@ -304,8 +302,7 @@ describe('Permissions Component', () => {
await permissionsPage.clickDeletePermissionButton();
await permissionsPage.checkUserOrGroupIsDeleted(filePermissionUser.getId());
});
});
});
describe('Role: Consumer, Contributor, Coordinator, Collaborator, Editor, No Permissions', () => {
@@ -438,7 +435,5 @@ describe('Permissions Component', () => {
await permissionsPage.clickAddPermissionButton();
await notificationHistoryPage.checkNotifyContains('You are not allowed to change permissions');
});
});
});
});
@@ -141,8 +141,7 @@ describe('Permissions Component', () => {
});
await uploadActions.uploadFile(fileModel.location, 'Site' + fileModel.name, siteFolder.entry.id);
});
});
afterAll(async () => {
await navigationBarPage.clickLogoutButton();
@@ -150,8 +149,7 @@ describe('Permissions Component', () => {
await this.alfrescoJsApi.login(browser.params.testConfig.adf.adminEmail, browser.params.testConfig.adf.adminPassword);
await this.alfrescoJsApi.core.sitesApi.deleteSite(publicSite.entry.id);
await this.alfrescoJsApi.core.sitesApi.deleteSite(privateSite.entry.id);
});
});
describe('Role Site Dropdown', () => {
@@ -195,8 +193,7 @@ describe('Permissions Component', () => {
await expect(await BrowserActions.getText(roleDropdownOptions.get(2))).toBe(CONSTANTS.CS_USER_ROLES.CONTRIBUTOR);
await expect(await BrowserActions.getText(roleDropdownOptions.get(3))).toBe(CONSTANTS.CS_USER_ROLES.MANAGER);
});
});
});
describe('Roles: SiteConsumer, SiteCollaborator, SiteContributor, SiteManager', () => {
@@ -344,7 +341,5 @@ describe('Permissions Component', () => {
await contentServicesPage.deleteContent('Site' + fileModel.name);
await contentServicesPage.checkContentIsNotDisplayed('Site' + fileModel.name);
});
});
});
});
@@ -106,8 +106,7 @@ describe('Unshare file', () => {
await loginPage.loginToContentServicesUsingUserModel(acsUser);
await navBar.clickContentServicesButton();
await contentServicesPage.waitForTableBody();
});
});
afterAll(async () => {
await navigationBarPage.clickLogoutButton();
@@ -115,8 +114,7 @@ describe('Unshare file', () => {
afterEach(async () => {
await browser.refresh();
});
});
describe('with permission', () => {
afterAll(async () => {
@@ -79,14 +79,12 @@ describe('Social component', () => {
}]
}
});
});
});
afterAll(async () => {
await navigationBarPage.clickLogoutButton();
await uploadActions.deleteFileOrFolder(emptyFile.entry.id);
});
});
describe('User interaction on their own components', () => {
@@ -111,8 +109,7 @@ describe('Social component', () => {
await likePage.removeHoverFromLikeButton();
await expect(await likePage.getUnLikedIconColor()).toBe(greyLikeColor);
});
});
});
describe('User interaction on components that belong to other users', () => {
@@ -148,8 +145,7 @@ describe('Social component', () => {
await expect(await ratePage.getRatingCounter()).toBe('0');
await expect(await ratePage.isNotStarRated(4));
});
});
});
describe('Multiple Users interaction', () => {
@@ -176,5 +176,4 @@ describe('Tag component', () => {
await tagPage.checkTagListByNodeIdIsOrderedAscending();
await tagPage.checkTagListContentServicesIsOrderedAscending();
});
});
@@ -75,14 +75,12 @@ describe('Trashcan - Pagination', () => {
afterAll(async () => {
await navigationBarPage.clickLogoutButton();
});
});
afterEach(async () => {
await browser.refresh();
await trashcanPage.waitForTableBody();
});
});
it('[C272811] Should be able to set Items per page to 20', async () => {
await paginationPage.selectItemsPerPage(itemsPerPage.twenty);
@@ -139,5 +139,4 @@ describe('Tree View Component', () => {
await expect(await treeViewPage.getTotalNodes()).toEqual(1);
});
});
@@ -56,7 +56,7 @@ describe('Upload component', async () => {
});
it('[C272792] Should be possible to cancel upload of a big file using row cancel icon', async () => {
await browser.executeScript('setTimeout(() => {document.querySelector("div[data-automation-id=\'cancel-upload-progress\']").click();}, 1500)');
await browser.executeScript('setTimeout(() => {document.querySelector("div[data-automation-id=\'cancel-upload-progress\']").click();}, 2500)');
await contentServicesPage.uploadFile(largeFile.location);
@@ -68,7 +68,7 @@ describe('Upload component', async () => {
it('[C287790] Should be possible to cancel upload of a big file through the cancel uploads button', async () => {
await browser.executeScript(' setTimeout(() => {document.querySelector("#adf-upload-dialog-cancel-all").click();' +
'document.querySelector("#adf-upload-dialog-cancel").click(); }, 1500)');
'document.querySelector("#adf-upload-dialog-cancel").click(); }, 2500)');
await contentServicesPage.uploadFile(largeFile.location);
await expect(await uploadDialog.getTitleText()).toEqual('Upload canceled');
await uploadDialog.clickOnCloseButton();
@@ -79,7 +79,7 @@ describe('Upload component', async () => {
it('[C272793] Should be able to cancel multiple files upload', async () => {
await uploadToggles.enableMultipleFileUpload();
await browser.executeScript(' setTimeout(() => {document.querySelector("#adf-upload-dialog-cancel-all").click();' +
'document.querySelector("#adf-upload-dialog-cancel").click(); }, 1500)');
'document.querySelector("#adf-upload-dialog-cancel").click(); }, 4000)');
await contentServicesPage.uploadMultipleFile([pngFileModel.location, largeFile.location]);
await expect(await uploadDialog.getTitleText()).toEqual('Upload canceled');
@@ -92,7 +92,7 @@ describe('Upload component', async () => {
it('[C315257] Should be able to cancel file in upload queue', async () => {
await uploadToggles.enableMultipleFileUpload();
await browser.executeScript('setTimeout(() => {document.querySelector("button[data-automation-id=\'cancel-upload-queue\']").click();}, 1500)');
await browser.executeScript('setTimeout(() => {document.querySelector("button[data-automation-id=\'cancel-upload-queue\']").click();}, 2500)');
await contentServicesPage.uploadMultipleFile([largeFile.location, pngFileModel.location]);
await uploadDialog.fileIsCancelled(pngFileModel.name);
await uploadDialog.clickOnCloseButton();
@@ -65,18 +65,15 @@ describe('Upload component - Excluded Files', () => {
await loginPage.loginToContentServicesUsingUserModel(acsUser);
await contentServicesPage.goToDocumentList();
});
});
afterAll(async () => {
await navigationBarPage.clickLogoutButton();
});
});
afterEach(async () => {
await contentServicesPage.goToDocumentList();
});
});
it('[C279914] Should not allow upload default excluded files using D&D', async () => {
await contentServicesPage.checkDragAndDropDIsDisplayed();
@@ -71,8 +71,7 @@ describe('Upload component', () => {
await contentServicesPage.goToDocumentList();
const pdfUploadedFile = await uploadActions.uploadFile(firstPdfFileModel.location, firstPdfFileModel.name, '-my-');
Object.assign(firstPdfFileModel, pdfUploadedFile.entry);
});
});
beforeEach(async () => {
await contentServicesPage.goToDocumentList();
@@ -1,191 +0,0 @@
/*!
* @license
* Copyright 2019 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 { BrowserActions, LoginPage, UploadActions } from '@alfresco/adf-testing';
import { ContentServicesPage } from '../../pages/adf/content-services.page';
import { UploadDialogPage } from '../../pages/adf/dialog/upload-dialog.page';
import { UploadTogglesPage } from '../../pages/adf/dialog/upload-toggles.page';
import { AcsUserModel } from '../../models/ACS/acs-user.model';
import { FileModel } from '../../models/ACS/file.model';
import { browser } from 'protractor';
import { AlfrescoApiCompatibility as AlfrescoApi } from '@alfresco/js-api';
import { VersionManagePage } from '../../pages/adf/version-manager.page';
import { NavigationBarPage } from '../../pages/adf/navigation-bar.page';
describe('Upload component', () => {
const contentServicesPage = new ContentServicesPage();
const uploadDialog = new UploadDialogPage();
const uploadToggles = new UploadTogglesPage();
const loginPage = new LoginPage();
const acsUser = new AcsUserModel();
const versionManagePage = new VersionManagePage();
const navigationBarPage = new NavigationBarPage();
this.alfrescoJsApi = new AlfrescoApi({
provider: 'ECM',
hostEcm: browser.params.testConfig.adf_acs.host
});
const uploadActions = new UploadActions(this.alfrescoJsApi);
const firstPdfFileModel = new FileModel({
'name': browser.params.resources.Files.ADF_DOCUMENTS.PDF_B.file_name,
'location': browser.params.resources.Files.ADF_DOCUMENTS.PDF_B.file_location
});
const docxFileModel = new FileModel({
'name': browser.params.resources.Files.ADF_DOCUMENTS.DOCX.file_name,
'location': browser.params.resources.Files.ADF_DOCUMENTS.DOCX.file_location
});
const pdfFileModel = new FileModel({
'name': browser.params.resources.Files.ADF_DOCUMENTS.PDF.file_name,
'location': browser.params.resources.Files.ADF_DOCUMENTS.PDF.file_location
});
const pngFileModelTwo = new FileModel({
'name': browser.params.resources.Files.ADF_DOCUMENTS.PNG_B.file_name,
'location': browser.params.resources.Files.ADF_DOCUMENTS.PNG_B.file_location
});
const pngFileModel = new FileModel({
'name': browser.params.resources.Files.ADF_DOCUMENTS.PNG.file_name,
'location': browser.params.resources.Files.ADF_DOCUMENTS.PNG.file_location
});
const filesLocation = [pdfFileModel.location, docxFileModel.location, pngFileModel.location, firstPdfFileModel.location];
const filesName = [pdfFileModel.name, docxFileModel.name, pngFileModel.name, firstPdfFileModel.name];
beforeAll(async () => {
await this.alfrescoJsApi.login(browser.params.testConfig.adf.adminEmail, browser.params.testConfig.adf.adminPassword);
await this.alfrescoJsApi.core.peopleApi.addPerson(acsUser);
await this.alfrescoJsApi.login(acsUser.id, acsUser.password);
await loginPage.loginToContentServicesUsingUserModel(acsUser);
await contentServicesPage.goToDocumentList();
const pdfUploadedFile = await uploadActions.uploadFile(firstPdfFileModel.location, firstPdfFileModel.name, '-my-');
Object.assign(firstPdfFileModel, pdfUploadedFile.entry);
});
afterAll(async () => {
await navigationBarPage.clickLogoutButton();
});
beforeEach(async () => {
await contentServicesPage.goToDocumentList();
});
afterEach(async () => {
const nbResults = await contentServicesPage.numberOfResultsDisplayed();
if (nbResults > 1) {
const nodesPromise = await contentServicesPage.getElementsDisplayedId();
nodesPromise.forEach(async (currentNodePromise) => {
const nodeId = await currentNodePromise;
await uploadActions.deleteFileOrFolder(nodeId);
});
}
});
it('[C260143] Should be possible to maximize/minimize the upload dialog', async () => {
await contentServicesPage.uploadFile(docxFileModel.location);
await contentServicesPage.checkContentIsDisplayed(docxFileModel.name);
await uploadDialog.fileIsUploaded(docxFileModel.name);
await uploadDialog.checkCloseButtonIsDisplayed();
await expect(uploadDialog.numberOfCurrentFilesUploaded()).toEqual('1');
await expect(uploadDialog.numberOfInitialFilesUploaded()).toEqual('1');
await uploadDialog.minimizeUploadDialog();
await uploadDialog.dialogIsMinimized();
await expect(uploadDialog.numberOfCurrentFilesUploaded()).toEqual('1');
await expect(uploadDialog.numberOfInitialFilesUploaded()).toEqual('1');
await uploadDialog.maximizeUploadDialog();
await uploadDialog.dialogIsDisplayed();
await uploadDialog.fileIsUploaded(docxFileModel.name);
await expect(uploadDialog.numberOfCurrentFilesUploaded()).toEqual('1');
await expect(uploadDialog.numberOfInitialFilesUploaded()).toEqual('1');
await uploadDialog.checkCloseButtonIsDisplayed();
await uploadDialog.clickOnCloseButton();
await uploadDialog.dialogIsNotDisplayed();
});
it('[C291902] Should be shown upload counter display in dialog box', async () => {
await contentServicesPage
.uploadFile(docxFileModel.location);
await contentServicesPage.checkContentIsDisplayed(docxFileModel.name);
await uploadDialog.fileIsUploaded(docxFileModel.name);
await uploadDialog.checkCloseButtonIsDisplayed();
await expect(uploadDialog.getTitleText()).toEqual('Uploaded 1 / 1');
await uploadDialog.checkCloseButtonIsDisplayed();
await uploadDialog.clickOnCloseButton();
await uploadDialog.dialogIsNotDisplayed();
});
it('[C260168] Should be possible to cancel upload using dialog icon', async () => {
await contentServicesPage.uploadFile(pdfFileModel.location);
await contentServicesPage.checkContentIsDisplayed(pdfFileModel.name);
await uploadDialog.removeUploadedFile(pdfFileModel.name);
await uploadDialog.fileIsCancelled(pdfFileModel.name);
await expect(uploadDialog.getTitleText()).toEqual('Upload canceled');
await uploadDialog.clickOnCloseButton();
await uploadDialog.dialogIsNotDisplayed();
await contentServicesPage.checkContentIsNotDisplayed(pdfFileModel.name);
});
it('[C260176] Should remove files from upload dialog box when closed', async () => {
await contentServicesPage.uploadFile(pngFileModelTwo.location);
await contentServicesPage.checkContentIsDisplayed(pngFileModelTwo.name);
await uploadDialog.fileIsUploaded(pngFileModelTwo.name);
await contentServicesPage.uploadFile(pngFileModel.location);
await contentServicesPage.checkContentIsDisplayed(pngFileModel.name);
await uploadDialog.fileIsUploaded(pngFileModel.name);
await uploadDialog.fileIsUploaded(pngFileModelTwo.name);
await uploadDialog.clickOnCloseButton();
await uploadDialog.dialogIsNotDisplayed();
await contentServicesPage.uploadFile(pdfFileModel.location);
await contentServicesPage.checkContentIsDisplayed(pdfFileModel.name);
await uploadDialog.fileIsUploaded(pdfFileModel.name);
await uploadDialog.fileIsNotDisplayedInDialog(pngFileModel.name);
await uploadDialog.fileIsNotDisplayedInDialog(pngFileModelTwo.name);
await uploadDialog.clickOnCloseButton();
await uploadDialog.dialogIsNotDisplayed();
});
it('[C260170] Should be possible to upload multiple files', async () => {
await contentServicesPage.checkAcsContainer();
await uploadToggles.enableMultipleFileUpload();
await contentServicesPage.uploadMultipleFile(filesLocation);
await contentServicesPage.checkContentsAreDisplayed(filesName);
await uploadDialog.filesAreUploaded(filesName);
await expect(uploadDialog.getTitleText()).toEqual('Uploaded 4 / 4');
await uploadDialog.clickOnCloseButton();
await uploadDialog.dialogIsNotDisplayed();
await uploadToggles.disableMultipleFileUpload();
});
it('[C311305] Should NOT be able to remove uploaded version', async () => {
await contentServicesPage.uploadFile(docxFileModel.location);
await uploadDialog.fileIsUploaded(docxFileModel.name);
await contentServicesPage.checkContentIsDisplayed(docxFileModel.name);
await contentServicesPage.versionManagerContent(docxFileModel.name);
await BrowserActions.click(versionManagePage.showNewVersionButton);
await versionManagePage.uploadNewVersionFile(
pngFileModel.location
);
await versionManagePage.closeVersionDialog();
await uploadDialog.removeUploadedFile(pngFileModel.name);
await contentServicesPage.checkContentIsDisplayed(pngFileModel.name);
});
});
@@ -130,28 +130,6 @@ describe('Upload component', () => {
await uploadDialog.dialogIsNotDisplayed();
});
it('[C260143] Should be possible to maximize/minimize the upload dialog', async () => {
await contentServicesPage.uploadFile(docxFileModel.location);
await contentServicesPage.checkContentIsDisplayed(docxFileModel.name);
await uploadDialog.fileIsUploaded(docxFileModel.name);
await uploadDialog.checkCloseButtonIsDisplayed();
await expect(await uploadDialog.numberOfCurrentFilesUploaded()).toEqual('1');
await expect(await uploadDialog.numberOfInitialFilesUploaded()).toEqual('1');
await uploadDialog.minimizeUploadDialog();
await uploadDialog.dialogIsMinimized();
await expect(await uploadDialog.numberOfCurrentFilesUploaded()).toEqual('1');
await expect(await uploadDialog.numberOfInitialFilesUploaded()).toEqual('1');
await uploadDialog.maximizeUploadDialog();
await uploadDialog.dialogIsDisplayed();
await uploadDialog.fileIsUploaded(docxFileModel.name);
await expect(await uploadDialog.numberOfCurrentFilesUploaded()).toEqual('1');
await expect(await uploadDialog.numberOfInitialFilesUploaded()).toEqual('1');
await uploadDialog.checkCloseButtonIsDisplayed();
await uploadDialog.clickOnCloseButton();
await uploadDialog.dialogIsNotDisplayed();
});
it('[C272794] Should display tooltip for uploading files', async () => {
await uploadToggles.enableMultipleFileUpload();
await uploadToggles.checkMultipleFileUploadToggleIsEnabled();
@@ -317,5 +295,4 @@ describe('Upload component', () => {
await uploadDialog.displayTooltip();
await expect(await uploadDialog.getTooltip()).toEqual('Upload location no longer exists [404]');
});
});
@@ -88,8 +88,7 @@ describe('Upload - User permission', () => {
id: acsUser.id,
role: CONSTANTS.CS_USER_ROLES.MANAGER
});
});
});
describe('Consumer permissions', () => {
@@ -129,8 +128,7 @@ describe('Upload - User permission', () => {
await notificationHistoryPage.checkNotifyContains('You don\'t have the create permission to upload the content');
});
});
});
describe('full permissions', () => {
@@ -146,8 +144,7 @@ describe('Upload - User permission', () => {
await uploadDialog.fileIsUploaded(emptyFile.name);
});
});
});
describe('multiple users', () => {
@@ -184,5 +181,4 @@ describe('Upload - User permission', () => {
await contentServicesPage.checkContentIsDisplayed(pdfFile.name);
});
});
});
@@ -66,8 +66,7 @@ describe('Version component actions', () => {
await loginPage.loginToContentServicesUsingUserModel(acsUser);
await navigationBarPage.clickContentServicesButton();
await contentServicesPage.waitForTableBody();
});
});
beforeEach(async () => {
await contentServicesPage.versionManagerContent(txtFileModel.name);
@@ -165,5 +164,4 @@ describe('Version component actions', () => {
await contentServicesPage.waitForTableBody();
await contentServicesPage.checkContentIsDisplayed(txtFileModel.name);
});
});
@@ -189,8 +189,7 @@ describe('Version component permissions', () => {
await contentServices.getDocumentList().rightClickOnRow(lockFileModel.name);
await expect(await contentServices.isContextActionEnabled('Manage versions')).toBe(false, 'Manage version is enabled');
});
});
});
describe('Contributor', () => {
const sameCreatorFile = new FileModel({
@@ -317,5 +316,4 @@ describe('Version component permissions', () => {
await expect(await contentServices.isContextActionEnabled('Manage versions')).toBe(false, 'Manage versions is enabled');
});
});
});
@@ -67,8 +67,7 @@ describe('Version Properties', () => {
await navigationBarPage.clickContentServicesButton();
await contentServicesPage.waitForTableBody();
await contentServicesPage.versionManagerContent(txtFileModel.name);
});
});
it('[C272817] Should NOT be present the download action when allowDownload property is false', async () => {
await versionManagePage.disableDownload();
@@ -109,5 +108,4 @@ describe('Version Properties', () => {
await BrowserVisibility.waitUntilElementIsNotVisible(versionManagePage.showNewVersionButton);
await BrowserVisibility.waitUntilElementIsNotVisible(versionManagePage.uploadNewVersionButton);
});
});
@@ -82,8 +82,7 @@ describe('Version component', () => {
await navigationBarPage.clickContentServicesButton();
await contentServicesPage.waitForTableBody();
await contentServicesPage.versionManagerContent(txtFileModel.name);
});
});
it('[C272768] Should be visible the first file version when you upload a file', async () => {
await versionManagePage.checkUploadNewVersionsButtonIsDisplayed();
@@ -156,5 +155,4 @@ describe('Version component', () => {
await versionManagePage.checkFileVersionExist('2.1');
await expect(await versionManagePage.getFileVersionName('2.1')).toEqual(fileModelVersionFive.name);
});
});
@@ -36,5 +36,4 @@ describe('Auth Guard SSO', () => {
const error = await errorPage.getErrorCode();
await expect(error).toBe('403');
});
});
@@ -30,8 +30,7 @@ describe('CardView Component', () => {
beforeAll(async () => {
await loginPage.loginToContentServices(browser.params.testConfig.adf.adminEmail, browser.params.testConfig.adf.adminPassword);
await navigationBarPage.clickCardViewButton();
});
});
afterAll(async () => {
await navigationBarPage.clickLogoutButton();
@@ -233,8 +232,7 @@ describe('CardView Component', () => {
await expect(await cardViewPageComponent.getErrorFloat()).toBe('Use a number format');
});
});
});
describe('Boolean', () => {
@@ -283,8 +281,7 @@ describe('CardView Component', () => {
await expect(cardViewPageComponent.getOutputText(1))
.toBe('[CardView Datetime Item] - null');
});
});
});
it('[C306895] Should display the form field as editable and clickable depending on the \'Editable\' toggle mode.', async () => {
const message = 'clickable updated';
@@ -43,8 +43,7 @@ describe('Datatable component - selection', () => {
await loginPage.loginToContentServicesUsingUserModel(acsUser);
await navigationBarPage.navigateToDatatable();
});
});
afterAll(async () => {
await navigationBarPage.clickLogoutButton();
@@ -50,7 +50,6 @@ describe('Datatable component', () => {
await this.alfrescoJsApi.core.peopleApi.addPerson(acsUser);
await loginPage.loginToContentServicesUsingUserModel(acsUser);
});
afterAll(async () => {
+1 -3
View File
@@ -37,8 +37,7 @@ describe('Error Component', () => {
await this.alfrescoJsApi.login(browser.params.testConfig.adf.adminEmail, browser.params.testConfig.adf.adminPassword);
await this.alfrescoJsApi.core.peopleApi.addPerson(acsUser);
await loginPage.loginToContentServicesUsingUserModel(acsUser);
});
});
afterAll(async () => {
await navigationBarPage.clickLogoutButton();
@@ -64,5 +63,4 @@ describe('Error Component', () => {
await expect(await errorPage.getErrorTitle()).toBe('We hit a problem.');
await expect(await errorPage.getErrorDescription()).toBe('Looks like something went wrong.');
});
});
+2 -4
View File
@@ -60,8 +60,7 @@ describe('Header Component', () => {
await this.alfrescoJsApi.login(user.email, user.password);
await loginPage.loginToProcessServicesUsingUserModel(user);
});
});
beforeEach(async() => {
await navigationBarPage.clickHeaderDataButton();
@@ -71,8 +70,7 @@ describe('Header Component', () => {
await navigationBarPage.clickLogoutButton();
await this.alfrescoJsApi.login(browser.params.testConfig.adf.adminEmail, browser.params.testConfig.adf.adminPassword);
await this.alfrescoJsApi.activiti.adminTenantsApi.deleteTenant(tenantId);
});
});
it('[C280002] Should be able to view Header component', async () => {
await headerPage.checkShowMenuCheckBoxIsDisplayed();
+2 -5
View File
@@ -39,8 +39,7 @@ describe('Universal Icon component', () => {
await this.alfrescoJsApi.login(browser.params.testConfig.adf.adminEmail, browser.params.testConfig.adf.adminPassword);
await this.alfrescoJsApi.core.peopleApi.addPerson(acsUser);
await loginPage.loginToContentServicesUsingUserModel(acsUser);
});
});
afterAll(async () => {
await navigationBarPage.clickLogoutButton();
@@ -48,13 +47,11 @@ describe('Universal Icon component', () => {
beforeEach(async () => {
await navigationBarPage.clickIconsButton();
});
});
it('[C291872] Should display the icons on the page', async () => {
await expect(await iconsPage.isLigatureIconDisplayed('folder')).toBe(true, 'Ligature icon is not displayed');
await expect(await iconsPage.isCustomIconDisplayed('adf:move_file')).toBe(true, 'Named icon is not displayed');
await expect(await iconsPage.isCustomIconDisplayed('adf:folder')).toBe(true, 'Thumbnail service icon is not displayed');
});
});
+2 -5
View File
@@ -74,8 +74,7 @@ describe('Enable infinite scrolling', () => {
deleteUploaded = await uploadActions.createFolder('deleteFolder', '-my-');
await uploadActions.createEmptyFiles(deleteFileNames, deleteUploaded.entry.id);
});
});
afterAll(async () => {
await navigationBarPage.clickLogoutButton();
@@ -84,8 +83,7 @@ describe('Enable infinite scrolling', () => {
beforeEach(async () => {
await navigationBarPage.clickContentServicesButton();
await contentServicesPage.checkAcsContainer();
});
});
it('[C260484] Should be possible to enable infinite scrolling', async () => {
await contentServicesPage.doubleClickRow(folderModel.name);
@@ -150,5 +148,4 @@ describe('Enable infinite scrolling', () => {
await infinitePaginationPage.checkLoadMoreButtonIsNotDisplayed();
});
});
+1 -3
View File
@@ -61,8 +61,7 @@ describe('Login component', () => {
await this.alfrescoJsApi.core.peopleApi.addPerson(userA);
await this.alfrescoJsApi.core.peopleApi.addPerson(userB);
});
});
it('[C276746] Should display the right information in user-info when a different users logs in', async () => {
await loginPage.loginToContentServicesUsingUserModel(userA);
@@ -270,5 +269,4 @@ describe('Login component', () => {
await expect(await loginPage.getLoginError()).toEqual(errorMessages.invalid_credentials);
await loginPage.login(adminUserModel.id, adminUserModel.password);
});
});
+1 -2
View File
@@ -54,8 +54,7 @@ describe('Login component - SSO', () => {
await browser.refresh();
await loginSSOPage.loginSSOIdentityService(browser.params.testConfig.adf.adminEmail, browser.params.testConfig.adf.adminPassword);
});
});
});
describe('Login component - SSO Grant type password (implicit flow false)', () => {
@@ -38,5 +38,4 @@ describe('Logout component - SSO', () => {
const actualUrl = await browser.getCurrentUrl();
await expect(actualUrl).toEqual(browser.params.testConfig.adf.url + '/login');
});
});
+1 -2
View File
@@ -58,8 +58,7 @@ describe('Login component - Redirect', () => {
await this.alfrescoJsApi.login(user.id, user.password);
uploadedFolder = await uploadActions.createFolder('protecteFolder' + StringUtil.generateRandomString(), '-my-');
});
});
it('[C213838] Should after login in CS be redirect to Login page when try to access to PS', async () => {
await loginPage.goToLoginPage();
@@ -90,8 +90,7 @@ describe('Pagination - returns to previous page when current is empty', () => {
await loginPage.loginToContentServicesUsingUserModel(acsUser);
await contentServicesPage.goToDocumentList();
});
});
it('[C274710] Should redirect to previous page when current is emptied', async () => {
await contentServicesPage.doubleClickRow(folderModel.name);
@@ -127,8 +126,7 @@ describe('Pagination - returns to previous page when current is empty', () => {
list = await contentServicesPage.getAllRowsNameColumn();
await expect(Util.arrayContainsArray(list, fileNames.slice(0, 5))).toEqual(true);
});
});
it('[C297494] Should display content when navigating to a non-empty folder not in the first page', async () => {
await contentServicesPage.goToDocumentList();
+1 -3
View File
@@ -41,8 +41,7 @@ describe('User Info - SSO', () => {
await loginSSOPage.clickOnSSOButton();
await loginSSOPage.loginSSOIdentityService(identityUser.email, identityUser.password);
});
});
afterAll(async () => {
if (identityService) {
@@ -58,5 +57,4 @@ describe('User Info - SSO', () => {
await userInfoPage.closeUserProfile();
await userInfoPage.dialogIsNotDisplayed();
});
});
+1 -2
View File
@@ -62,8 +62,7 @@ describe('User Info component', () => {
});
await this.alfrescoJsApi.core.peopleApi.addPerson(contentUserModel);
});
});
afterAll(async () => {
await navigationBarPage.clickLogoutButton();
@@ -56,8 +56,7 @@ describe('Viewer', () => {
role: CONSTANTS.CS_USER_ROLES.MANAGER
});
await this.alfrescoJsApi.login(acsUser.id, acsUser.password);
});
});
afterAll(async () => {
await navigationBarPage.clickLogoutButton();
@@ -90,6 +89,5 @@ describe('Viewer', () => {
}
}
});
});
});
});
@@ -68,7 +68,6 @@ describe('Viewer', () => {
await this.alfrescoJsApi.login(acsUser.id, acsUser.password);
pngFileUploaded = await uploadActions.uploadFile(pngFileInfo.location, pngFileInfo.name, site.entry.guid);
});
afterAll(async () => {
@@ -118,7 +117,5 @@ describe('Viewer', () => {
}
}
});
});
});
});
@@ -56,8 +56,7 @@ describe('Viewer', () => {
});
await this.alfrescoJsApi.login(acsUser.id, acsUser.password);
});
});
describe('Excel Folder Uploaded', () => {
let uploadedExcels;
@@ -88,7 +87,5 @@ describe('Viewer', () => {
}
}
});
});
});
});
@@ -61,8 +61,7 @@ describe('Viewer', () => {
});
await this.alfrescoJsApi.login(acsUser.id, acsUser.password);
});
});
describe('Image Folder Uploaded', () => {
@@ -106,7 +105,5 @@ describe('Viewer', () => {
}
}
});
});
});
});
@@ -57,8 +57,7 @@ describe('Viewer', () => {
});
await this.alfrescoJsApi.login(acsUser.id, acsUser.password);
});
});
describe('PowerPoint Folder Uploaded', () => {
@@ -91,7 +90,5 @@ describe('Viewer', () => {
}
}
});
});
});
});
@@ -56,8 +56,7 @@ describe('Viewer', () => {
});
await this.alfrescoJsApi.login(acsUser.id, acsUser.password);
});
});
describe('Text Folder Uploaded', () => {
@@ -89,6 +88,5 @@ describe('Viewer', () => {
}
}
});
});
});
});
@@ -59,8 +59,7 @@ describe('Viewer', () => {
});
await this.alfrescoJsApi.login(acsUser.id, acsUser.password);
});
});
afterAll(async () => {
await navigationBarPage.clickLogoutButton();
@@ -96,7 +95,5 @@ describe('Viewer', () => {
}
}
});
});
});
});
+2 -4
View File
@@ -61,14 +61,12 @@ describe('Info Drawer', () => {
await this.alfrescoJsApi.login(acsUser.id, acsUser.password);
pngFileUploaded = await uploadActions.uploadFile(pngFileInfo.location, pngFileInfo.name, site.entry.guid);
});
});
afterAll(async () => {
await this.alfrescoJsApi.login(acsUser.id, acsUser.password);
await uploadActions.deleteFileOrFolder(pngFileUploaded.entry.id);
});
});
beforeEach(async() => {
await loginPage.loginToContentServicesUsingUserModel(acsUser);
@@ -106,8 +106,7 @@ describe('Content Services Viewer', () => {
await loginPage.loginToContentServicesUsingUserModel(acsUser);
await contentServicesPage.goToDocumentList();
});
});
afterAll(async () => {
await uploadActions.deleteFileOrFolder(pdfFile.getId());
@@ -118,8 +117,7 @@ describe('Content Services Viewer', () => {
await uploadActions.deleteFileOrFolder(pptFile.getId());
await uploadActions.deleteFileOrFolder(unsupportedFile.getId());
await navigationBarPage.clickLogoutButton();
});
});
it('[C260038] Should display first page, toolbar and pagination when opening a .pdf file', async () => {
await contentServicesPage.checkAcsContainer();
@@ -51,14 +51,12 @@ describe('Viewer', () => {
txtFileUploaded = await uploadActions.uploadFile(txtFileInfo.location, txtFileInfo.name, '-my-');
await loginPage.loginToContentServicesUsingUserModel(acsUser);
});
});
afterAll(async () => {
await uploadActions.deleteFileOrFolder(txtFileUploaded.entry.id);
await navigationBarPage.clickLogoutButton();
});
});
beforeEach(async () => {
await contentServicesPage.goToDocumentList();
+1 -2
View File
@@ -66,8 +66,7 @@ describe('Viewer', () => {
jsFileUploaded = await uploadActions.uploadFile(jsFileInfo.location, jsFileInfo.name, '-my-');
await loginPage.loginToContentServicesUsingUserModel(acsUser);
});
});
afterAll(async () => {
await this.alfrescoJsApi.login(acsUser.id, acsUser.password);
+2 -4
View File
@@ -70,14 +70,12 @@ describe('Viewer - properties', () => {
await viewerPage.clickLeftSidebarButton();
await viewerPage.checkLeftSideBarIsDisplayed();
});
});
afterAll(async () => {
await uploadActions.deleteFileOrFolder(pngFile.getId());
await navigationBarPage.clickLogoutButton();
});
});
it('[C260066] Should Show/Hide viewer toolbar when showToolbar is true/false', async () => {
await viewerPage.checkToolbarIsDisplayed();
+1 -2
View File
@@ -77,8 +77,7 @@ describe('Viewer', () => {
wordFileUploaded = await uploadActions.uploadFile(wordFileInfo.location, wordFileInfo.name, '-my-');
pngFileShared = await this.alfrescoJsApi.core.sharedlinksApi.addSharedLink({ 'nodeId': pngFileUploaded.entry.id });
});
});
afterAll(async () => {
await this.alfrescoJsApi.login(acsUser.id, acsUser.password);
+2 -4
View File
@@ -52,13 +52,11 @@ describe('Analytics Smoke Test', () => {
await this.alfrescoJsApi.activiti.adminUsersApi.createNewUser(procUserModel);
await loginPage.loginToProcessServicesUsingUserModel(procUserModel);
});
});
afterAll(async () => {
await this.alfrescoJsApi.activiti.adminTenantsApi.deleteTenant(tenantId);
});
});
it('[C260346] Should be able to change title of a report', async () => {
await navigationBarPage.navigateToProcessServicesPage();
@@ -48,14 +48,12 @@ describe('Applications list', () => {
});
await LocalStorageUtil.setConfigField('alfresco-deployed-apps', '[]');
});
});
afterAll(async () => {
await apiService.login(browser.params.identityAdmin.email, browser.params.identityAdmin.password);
await identityService.deleteIdentityUser(testUser.idIdentityService);
});
});
it('[C310373] Should all the app with running state be displayed on dashboard when alfresco-deployed-apps is not used in config file', async () => {
await navigationBarPage.navigateToProcessServicesCloudPage();
@@ -228,7 +228,5 @@ describe('Edit process filters cloud', () => {
await expect(await processCloudDemoPage.editProcessFilterCloudComponent().editProcessFilterDialog().getFilterName()).toEqual('All Processes');
await processCloudDemoPage.editProcessFilterCloudComponent().editProcessFilterDialog().clickOnCancelButton();
});
});
});
});
@@ -284,7 +284,5 @@ describe('Edit task filters cloud', () => {
await expect(await tasksCloudDemoPage.editTaskFilterCloudComponent().editTaskFilterDialog().getFilterName()).toEqual('My Tasks');
await tasksCloudDemoPage.editTaskFilterCloudComponent().editTaskFilterDialog().clickOnCancelButton();
});
});
});
});
@@ -1,60 +0,0 @@
/*!
* @license
* Copyright 2019 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 {
LoginSSOPage,
BrowserActions, FormPage, ProcessCloudWidgetPage, FormCloudComponentPage
} from '@alfresco/adf-testing';
import { browser } from 'protractor';
import { customDateFormAPS2 } from '../../resources/forms/custom-date-form';
describe('Form Field Component - Dropdown Widget', () => {
const loginSSOPage = new LoginSSOPage();
const widget = new ProcessCloudWidgetPage();
const dateWidget = widget.dateWidget();
const formDemoPage = new FormCloudComponentPage();
const formJson = JSON.parse(customDateFormAPS2);
const formPage = new FormPage();
beforeAll(async () => {
await loginSSOPage.loginSSOIdentityService(browser.params.testConfig.hrUser.email, browser.params.testConfig.hrUser.password);
});
beforeEach(async () => {
const urlFormDemoPage = `${browser.params.testConfig.adf.url}/form-cloud`;
await BrowserActions.getUrl(urlFormDemoPage);
});
it('[C313199] Should display the validation for min and max date values with custom date format', async () => {
await formDemoPage.setConfigToEditor(formJson);
await dateWidget.setDateInput('datefield', '18-7-19');
await formPage.saveForm();
await expect(await dateWidget.getErrorMessage('datefield'))
.toBe('Can\'t be less than 19-7-19', 'Min date validation is not working');
await dateWidget.clearDateInput('datefield');
await dateWidget.setDateInput('datefield', '20-7-19');
await formPage.saveForm();
await expect(await dateWidget.getErrorMessage('datefield'))
.toBe('Can\'t be greater than 19-8-19', 'Max date validation is not working');
await dateWidget.clearDateInput('datefield');
await dateWidget.setDateInput('datefield', '19-7-19');
await formPage.saveForm();
await dateWidget.checkErrorMessageIsNotDisplayed('datefield');
});
});
@@ -83,8 +83,7 @@ describe('Form Field Component - Dropdown Widget', () => {
afterAll(async () => {
await apiService.login(browser.params.identityAdmin.email, browser.params.identityAdmin.password);
await identityService.deleteIdentityUser(testUser.idIdentityService);
});
});
beforeEach(async () => {
await navigationBarPage.navigateToProcessServicesCloudPage();
@@ -118,5 +117,4 @@ describe('Form Field Component - Dropdown Widget', () => {
await expect(await dropdown.getSelectedOptionText('Dropdown097maj')).toBe('Clementine Bauch');
await taskFormCloudComponent.checkCompleteButtonIsNotDisplayed();
});
});
@@ -185,5 +185,4 @@ describe('People and Group of people Widgets', () => {
await expect(await formPage.isSaveButtonDisabled()).toBe(false);
await expect(await formPage.isValidationIconBlue()).toBe(true);
});
});
@@ -163,5 +163,4 @@ describe('Task cloud visibility', async () => {
await taskFormCloudComponent.clickCompleteButton();
});
});
@@ -205,5 +205,4 @@ describe('Visibility conditions on tabs - cloud', () => {
await widget.textWidget().setValue(widgets.textThreeId, value.notDisplayTab);
await widget.tab().checkTabIsDisplayedByLabel(tab.tabNextOperators);
});
});
@@ -183,8 +183,7 @@ describe('Visibility conditions - cloud', () => {
await widget.checkboxWidget().clickCheckboxInput('Checkbox2');
await widget.checkboxWidget().isCheckboxHidden(checkbox.checkbox1);
});
});
it('[C309650] Should be able to see Checkbox widget when has multiple visibility conditions and next condition operators', async () => {
let text1, text2;
@@ -266,8 +265,7 @@ describe('Visibility conditions - cloud', () => {
const textDisplayWidgetNoCondition = await widget.displayValueWidget().getFieldValue(displayValueString.displayValueNoConditionField);
await expect(textDisplayWidgetNoCondition).toEqual('No cats');
});
});
it('[C309869] Should be able to see Display text widget when visibility condition refers to a form variable and a field', async () => {
await formCloudDemoPage.setConfigToEditor(displayValueTextJson);
@@ -288,8 +286,7 @@ describe('Visibility conditions - cloud', () => {
textOneField = await widget.textWidget().getFieldValue(widgets.textOneDisplay);
await expect(textOneField).toEqual('dog');
await widget.displayValueWidget().checkDisplayValueWidgetIsHidden(displayValueString.displayValueSingleConditionField);
});
});
it('[C309871] Should be able to see Display text widget when has multiple visibility conditions and next condition operators', async () => {
await formCloudDemoPage.setConfigToEditor(displayValueTextJson);
@@ -331,6 +328,5 @@ describe('Visibility conditions - cloud', () => {
await expect(textTwoField).toEqual('dog');
await widget.displayValueWidget().isDisplayValueWidgetVisible(displayValueString.displayValueMultipleConditionsField);
await expect(textDisplayWidgetMultipleCondition).toEqual('more cats');
});
});
});
@@ -253,7 +253,5 @@ describe('People Groups Cloud Component', () => {
await peopleCloudComponent.checkSelectedPeople('TestFirstName3 TestLastName3');
});
});
});
});
@@ -138,7 +138,5 @@ describe('People Groups Cloud Component', () => {
await groupCloudComponentPage.searchGroupsToExisting(groupNoRole.name);
await groupCloudComponentPage.checkGroupIsNotDisplayed(groupNoRole.name);
});
});
});
});
@@ -326,7 +326,5 @@ describe('Process list cloud', () => {
});
});
});
});
});
@@ -132,8 +132,7 @@ describe('Process filters cloud', () => {
await loginSSOPage.loginSSOIdentityService(testUser.email, testUser.password);
await LocalStorageUtil.setConfigField('adf-edit-process-filter', JSON.stringify(editProcessFilterConfigFile));
await LocalStorageUtil.setConfigField('adf-cloud-process-list', JSON.stringify(processListCloudConfigFile));
});
});
afterAll(async () => {
await processInstancesService.deleteProcessInstance(runningProcessInstance.entry.id, candidateBaseApp);
@@ -147,8 +146,7 @@ describe('Process filters cloud', () => {
await identityService.deleteIdentityUser(testUser.idIdentityService);
await identityService.deleteIdentityUser(anotherUser.idIdentityService);
});
});
beforeEach(async () => {
await navigationBarPage.navigateToProcessServicesCloudPage();
@@ -129,5 +129,4 @@ describe('Process filters cloud', () => {
await processCloudDemoPage.processListCloudComponent().checkContentIsDisplayedById(completedProcess.entry.id);
});
});
});
@@ -144,7 +144,5 @@ describe('Process Header cloud component', () => {
await expect(await processHeaderCloudPage.getBusinessKey()).toEqual(CONSTANTS.PROCESS_DETAILS.NO_BUSINESS_KEY);
await expect(await processHeaderCloudPage.getLastModified()).toEqual(completedCreatedDate);
});
});
});
});
@@ -103,7 +103,5 @@ describe('Process list cloud', () => {
await processCloudDemoPage.processListCloudComponent().clickContextMenuActionNamed('delete');
await processCloudDemoPage.checkActionExecuted(deleteProcess.entry.id, 'delete');
});
});
});
});
@@ -99,7 +99,5 @@ describe('Process list cloud', () => {
await processCloudDemoPage.processListCloudComponent().getDataTable().checkColumnIsDisplayed('processDefinitionKey');
});
});
});
});
@@ -183,5 +183,4 @@ describe('Process list cloud', () => {
await processDetailsCloudDemoPage.checkListedSelectedProcessInstance(processInstances[1]);
});
});
});
@@ -54,14 +54,12 @@ describe('Start Process', () => {
await navigationBarPage.navigateToProcessServicesCloudPage();
await appListCloudComponent.checkApsContainer();
});
});
afterAll(async () => {
await apiService.login(browser.params.identityAdmin.email, browser.params.identityAdmin.password);
await identityService.deleteIdentityUser(testUser.idIdentityService);
});
});
afterEach(async () => {
await navigationBarPage.navigateToProcessServicesCloudPage();
@@ -111,7 +109,5 @@ describe('Start Process', () => {
await processCloudDemoPage.runningProcessesFilter().clickProcessFilter();
await expect(await processCloudDemoPage.getActiveFilterName()).toBe('Running Processes');
await processCloudDemoPage.processListCloudComponent().checkContentIsDisplayedByName(processName);
});
});
});
@@ -235,8 +235,7 @@ describe('Start Task Form', () => {
await startTask.checkFormDefinitionIsDisplayed(browser.params.resources.ACTIVITI_CLOUD_APPS.CANDIDATE_BASE_APP.forms.starteventform);
await startTask.checkFormDefinitionIsDisplayed(browser.params.resources.ACTIVITI_CLOUD_APPS.CANDIDATE_BASE_APP.forms.formtotestvalidations);
});
});
});
describe('Start a process with a start event form', async () => {
@@ -309,8 +308,7 @@ describe('Start Task Form', () => {
await processCloudDemoPage.processListCloudComponent().checkContentIsDisplayedById(processId);
});
});
});
describe('Attach content to process-cloud task form using upload widget', async () => {
@@ -544,6 +542,5 @@ describe('Start Task Form', () => {
await contentFileWidget.downloadFile(testFileModel.name);
await expect(await FileBrowserUtil.isFileDownloaded(testFileModel.name)).toBe(true);
});
});
});
});
@@ -92,8 +92,7 @@ describe('Start Task', () => {
await identityService.deleteIdentityUser(activitiUser.idIdentityService);
await identityService.deleteIdentityUser(apsUser.idIdentityService);
await identityService.deleteIdentityUser(testUser.idIdentityService);
});
});
beforeEach(async () => {
await navigationBarPage.navigateToProcessServicesCloudPage();
@@ -230,5 +229,4 @@ describe('Start Task', () => {
await expect(await taskHeaderCloudPage.getAssignee()).toBe(apsUser.username);
});
});
@@ -85,8 +85,7 @@ describe('Start Task - Group Cloud Component', () => {
await apiService.login(browser.params.identityAdmin.email, browser.params.identityAdmin.password);
await identityService.deleteIdentityUser(apsUser.idIdentityService);
await identityService.deleteIdentityUser(testUser.idIdentityService);
});
});
beforeEach(async () => {
await loginSSOPage.loginSSOIdentityService(testUser.email, testUser.password);
@@ -178,5 +177,4 @@ describe('Start Task - Group Cloud Component', () => {
await groupCloud.selectGroupFromList(testGroup.name);
await groupCloud.checkSelectedGroup(testGroup.name);
});
});
@@ -105,7 +105,5 @@ describe('Task filters cloud', () => {
await expect(await tasksCloudDemoPage.firstFilterIsActive()).toBe(true);
});
});
});
});
@@ -342,7 +342,5 @@ describe('Task form cloud component', () => {
await widget.tab().checkTabIsDisplayedByLabel(tab.tabWithFields);
await widget.tab().checkTabIsDisplayedByLabel(tab.tabVarVar);
});
});
});
});
@@ -294,5 +294,4 @@ describe('Task form cloud component', () => {
await taskFormCloudComponent.checkCompleteButtonIsNotDisplayed();
});
});
});
@@ -111,7 +111,5 @@ describe('Process list cloud', () => {
await tasksCloudDemoPage.taskListCloudComponent().clickContextMenuActionNamed('delete');
await tasksCloudDemoPage.checkActionExecuted(deleteTask.list.entries[0].entry.id, 'delete');
});
});
});
});
@@ -226,5 +226,4 @@ describe('Edit task filters and task list properties', () => {
await expect(await tasksCloudDemoPage.taskListCloudComponent().getDataTable().checkListIsSorted('DESC', 'Owner')).toBe(true);
});
});
});
@@ -364,6 +364,5 @@ describe('Edit task filters and task list properties', () => {
await tasksCloudDemoPage.editTaskFilterCloudComponent().setLastModifiedTo(afterDate);
await expect(await tasksCloudDemoPage.taskListCloudComponent().getNoTasksFoundMessage()).toEqual(noTasksFoundMessage);
});
});
});
});
@@ -176,7 +176,5 @@ describe('Task list cloud - selection', () => {
await expect(await tasksCloudDemoPage.getSelectedTaskRowText('1')).toBe(tasks[0]);
await expect(await tasksCloudDemoPage.getSelectedTaskRowText('2')).toBe(tasks[1]);
});
});
});
});
@@ -185,6 +185,5 @@ describe('Task filters cloud', () => {
await tasksCloudDemoPage.taskListCloudComponent().checkContentIsDisplayedByName(taskAssigned.list.entries[0].entry.name);
});
});
});
});
+1 -3
View File
@@ -55,8 +55,7 @@ describe('Modify applications', () => {
appVersionToBeDeleted = await apps.importPublishDeployApp(this.alfrescoJsApi, appToBeDeleted.file_location);
await loginPage.loginToProcessServicesUsingUserModel(user);
});
});
it('[C260198] Should the app be displayed on dashboard when is deployed on APS', async () => {
await navigationBarPage.navigateToProcessServicesPage();
@@ -162,5 +161,4 @@ describe('Modify applications', () => {
await expect(await processServicesPage.getBackgroundColor(appToBeDeleted.title)).toEqual(CONSTANTS.APP_COLOR.RED);
await expect(await processServicesPage.getAppIconType(appToBeDeleted.title)).toEqual(CONSTANTS.APP_ICON.USER);
});
});
@@ -56,8 +56,7 @@ describe('Start Task - Task App', () => {
await apps.importPublishDeployApp(this.alfrescoJsApi, app.file_location);
await loginPage.loginToProcessServicesUsingUserModel(processUserModel);
});
});
afterAll(async () => {
this.alfrescoJsApi = new AlfrescoApi({
@@ -68,8 +67,7 @@ describe('Start Task - Task App', () => {
await this.alfrescoJsApi.login(browser.params.testConfig.adf.adminEmail, browser.params.testConfig.adf.adminPassword);
await this.alfrescoJsApi.activiti.adminTenantsApi.deleteTenant(processUserModel.tenantId);
});
});
it('[C274690] Should be able to open a file attached to a start form', async () => {
await (await (await navigationBarPage.navigateToProcessServicesPage()).goToTaskApp()).clickTasksButton();
@@ -90,5 +88,4 @@ describe('Start Task - Task App', () => {
await viewerPage.clickCloseButton();
await taskPage.tasksListPage().checkContentIsDisplayed('View file');
});
});
@@ -70,15 +70,13 @@ describe('Attach Form Component', () => {
await this.alfrescoJsApi.activiti.taskApi.createNewTask({ name: testNames.taskName });
await loginPage.loginToProcessServicesUsingUserModel(user);
});
});
afterAll(async () => {
await this.alfrescoJsApi.activiti.modelsApi.deleteModel(appId);
await this.alfrescoJsApi.login(browser.params.testConfig.adf.adminEmail, browser.params.testConfig.adf.adminPassword);
await this.alfrescoJsApi.activiti.adminTenantsApi.deleteTenant(tenantId);
});
});
it('[C280047] Should be able to view the attach-form component after creating a standalone task', async () => {
await (await (await navigationBarPage.navigateToProcessServicesPage()).goToTaskApp()).clickTasksButton();
@@ -69,16 +69,14 @@ describe('Checklist component', () => {
}
await loginPage.loginToProcessServicesUsingUserModel(processUserModel);
});
});
beforeEach(async () => {
await navigationBarPage.clickHomeButton();
await navigationBarPage.navigateToProcessServicesPage();
await (await processServices.goToTaskApp()).clickTasksButton();
await taskPage.filtersPage().goToFilter(CONSTANTS.TASK_FILTERS.MY_TASKS);
});
});
it('[C279976] Should no checklist be created when no title is typed', async () => {
await taskPage.tasksListPage().checkContentIsDisplayed(tasks[0]);
@@ -202,5 +200,4 @@ describe('Checklist component', () => {
await taskPage.tasksListPage().checkContentIsDisplayed(hierarchyChecklist[2]);
await taskPage.tasksListPage().checkContentIsDisplayed(hierarchyChecklist[3]);
});
});
@@ -58,14 +58,12 @@ describe('Comment component for Processes', () => {
processInstanceId = processWithComment.id;
await loginPage.loginToProcessServicesUsingUserModel(user);
});
});
afterAll(async () => {
await this.alfrescoJsApi.activiti.modelsApi.deleteModel(appId);
await this.alfrescoJsApi.login(browser.params.testConfig.adf.adminEmail, browser.params.testConfig.adf.adminPassword);
await this.alfrescoJsApi.activiti.adminTenantsApi.deleteTenant(tenantId);
});
it('[C260464] Should be able to add a comment on APS and check on ADF', async () => {

Some files were not shown because too many files have changed in this diff Show More