mirror of
https://github.com/Alfresco/alfresco-ng2-components.git
synced 2026-09-09 18:03:21 +00:00
Use hash strategy in demo shell as the other apps (#6402)
* hash startegy * use hash in e2e * trigger build * fix * fix * remove children router overwrite crazynes * Update login.module.ts * revert not needed changes * some fixes * fix * remove fdescribe * fix * fix * Update share-file.e2e.ts * Update lock-file.e2e.ts * Update share-file.e2e.ts * some fix * some other fixes * username as id * fix after rebase * username * fix usernamee * Fix the errorComponent * Attempt to fix unit test - to check * * Fixed circular dependency error while building adf-testing package * * Fixed failing UT * fix * use username * some fixes * some fix * fix Co-authored-by: Maurizio Vitale <maurizio.vitale@alfresco.com> Co-authored-by: Vito Albano <vitoalbano@vitoalbano-mbp-0120.local> Co-authored-by: sivakumar414ram <siva.kumar@muraai.com>
This commit is contained in:
co-authored by
Maurizio Vitale
Vito Albano
sivakumar414ram
parent
3734151338
commit
1c51b2a1a6
@@ -29,8 +29,8 @@ describe('About Content Services', () => {
|
||||
beforeAll(async() => {
|
||||
await apiService.loginWithProfile('admin');
|
||||
acsUser = await usersActions.createUser();
|
||||
await apiService.login(acsUser.email, acsUser.password);
|
||||
await loginPage.login(acsUser.email, acsUser.password);
|
||||
await apiService.login(acsUser.username, acsUser.password);
|
||||
await loginPage.login(acsUser.username, acsUser.password);
|
||||
await navigationBarPage.clickAboutButton();
|
||||
});
|
||||
|
||||
|
||||
@@ -31,7 +31,7 @@ import { FileModel } from '../../models/ACS/file.model';
|
||||
import { browser } from 'protractor';
|
||||
import CONSTANTS = require('../../util/constants');
|
||||
|
||||
describe('Comment Component', () => {
|
||||
describe('Comment', () => {
|
||||
|
||||
const loginPage: LoginPage = new LoginPage();
|
||||
const contentServicesPage: ContentServicesPage = new ContentServicesPage();
|
||||
@@ -68,100 +68,100 @@ describe('Comment Component', () => {
|
||||
acsUser = await usersActions.createUser();
|
||||
});
|
||||
|
||||
afterAll(async () => {
|
||||
await navigationBarPage.clickLogoutButton();
|
||||
});
|
||||
describe('component', () => {
|
||||
|
||||
beforeEach(async () => {
|
||||
await apiService.login(acsUser.email, acsUser.password);
|
||||
beforeEach(async () => {
|
||||
await apiService.login(acsUser.username, acsUser.password);
|
||||
|
||||
const pngUploadedFile = await uploadActions.uploadFile(pngFileModel.location, pngFileModel.name, '-my-');
|
||||
const pngUploadedFile = await uploadActions.uploadFile(pngFileModel.location, pngFileModel.name, '-my-');
|
||||
|
||||
nodeId = pngUploadedFile.entry.id;
|
||||
nodeId = pngUploadedFile.entry.id;
|
||||
|
||||
userFullName = pngUploadedFile.entry.createdByUser.displayName;
|
||||
userFullName = pngUploadedFile.entry.createdByUser.displayName;
|
||||
|
||||
await loginPage.login(acsUser.email, acsUser.password);
|
||||
await loginPage.login(acsUser.username, acsUser.password);
|
||||
|
||||
await navigationBarPage.navigateToContentServices();
|
||||
await contentServicesPage.waitForTableBody();
|
||||
});
|
||||
await navigationBarPage.navigateToContentServices();
|
||||
await contentServicesPage.waitForTableBody();
|
||||
});
|
||||
|
||||
afterEach(async () => {
|
||||
await apiService.loginWithProfile('admin');
|
||||
await uploadActions.deleteFileOrFolder(nodeId);
|
||||
});
|
||||
afterEach(async () => {
|
||||
await apiService.loginWithProfile('admin');
|
||||
await uploadActions.deleteFileOrFolder(nodeId);
|
||||
await navigationBarPage.clickLogoutButton();
|
||||
});
|
||||
|
||||
it('[C276947] Should be able to add a comment on ACS and view on ADF', async () => {
|
||||
await apiService.getInstance().core.commentsApi.addComment(nodeId, { content: comments.test });
|
||||
it('[C276947] Should be able to add a comment on ACS and view on ADF', async () => {
|
||||
await apiService.getInstance().core.commentsApi.addComment(nodeId, { content: comments.test });
|
||||
|
||||
await viewerPage.viewFile(pngFileModel.name);
|
||||
await viewerPage.viewFile(pngFileModel.name);
|
||||
|
||||
await viewerPage.clickInfoButton();
|
||||
await viewerPage.checkInfoSideBarIsDisplayed();
|
||||
await viewerPage.clickInfoButton();
|
||||
await viewerPage.checkInfoSideBarIsDisplayed();
|
||||
|
||||
await commentsPage.checkCommentsTabIsSelected();
|
||||
await commentsPage.checkCommentInputIsDisplayed();
|
||||
await commentsPage.checkCommentsTabIsSelected();
|
||||
await commentsPage.checkCommentInputIsDisplayed();
|
||||
|
||||
await expect(await commentsPage.getTotalNumberOfComments()).toEqual('Comments (1)');
|
||||
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)/);
|
||||
});
|
||||
await commentsPage.getTotalNumberOfComments('Comments (1)');
|
||||
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);
|
||||
it('[C276948] Should be able to add a comment on a file', async () => {
|
||||
await viewerPage.viewFile(pngFileModel.name);
|
||||
|
||||
await viewerPage.clickInfoButton();
|
||||
await viewerPage.checkInfoSideBarIsDisplayed();
|
||||
await viewerPage.clickOnCommentsTab();
|
||||
await viewerPage.clickInfoButton();
|
||||
await viewerPage.checkInfoSideBarIsDisplayed();
|
||||
await viewerPage.clickOnCommentsTab();
|
||||
|
||||
await commentsPage.addComment(comments.first);
|
||||
await commentsPage.checkUserIconIsDisplayed();
|
||||
await commentsPage.addComment(comments.first);
|
||||
await commentsPage.checkUserIconIsDisplayed();
|
||||
|
||||
await expect(await commentsPage.getTotalNumberOfComments()).toEqual('Comments (1)');
|
||||
await expect(await commentsPage.getMessage(0)).toEqual(comments.first);
|
||||
await expect(await commentsPage.getUserName(0)).toEqual(userFullName);
|
||||
await expect(await commentsPage.getTime(0)).toMatch(/(ago|few)/);
|
||||
});
|
||||
await commentsPage.getTotalNumberOfComments('Comments (1)');
|
||||
await expect(await commentsPage.getMessage(0)).toEqual(comments.first);
|
||||
await expect(await commentsPage.getUserName(0)).toEqual(userFullName);
|
||||
await expect(await commentsPage.getTime(0)).toMatch(/(ago|few)/);
|
||||
});
|
||||
|
||||
it('[C280021] Should be able to add a multiline comment on a file', async () => {
|
||||
await viewerPage.viewFile(pngFileModel.name);
|
||||
it('[C280021] Should be able to add a multiline comment on a file', async () => {
|
||||
await viewerPage.viewFile(pngFileModel.name);
|
||||
|
||||
await viewerPage.clickInfoButton();
|
||||
await viewerPage.checkInfoSideBarIsDisplayed();
|
||||
await viewerPage.clickOnCommentsTab();
|
||||
await viewerPage.clickInfoButton();
|
||||
await viewerPage.checkInfoSideBarIsDisplayed();
|
||||
await viewerPage.clickOnCommentsTab();
|
||||
|
||||
await commentsPage.addComment(comments.multiline);
|
||||
await commentsPage.checkUserIconIsDisplayed();
|
||||
await commentsPage.addComment(comments.multiline);
|
||||
await commentsPage.checkUserIconIsDisplayed();
|
||||
|
||||
await expect(await commentsPage.getTotalNumberOfComments()).toEqual('Comments (1)');
|
||||
await expect(await commentsPage.getMessage(0)).toEqual(comments.multiline);
|
||||
await expect(await commentsPage.getUserName(0)).toEqual(userFullName);
|
||||
await expect(await commentsPage.getTime(0)).toMatch(/(ago|few)/);
|
||||
await commentsPage.getTotalNumberOfComments('Comments (1)');
|
||||
await expect(await commentsPage.getMessage(0)).toEqual(comments.multiline);
|
||||
await expect(await commentsPage.getUserName(0)).toEqual(userFullName);
|
||||
await expect(await commentsPage.getTime(0)).toMatch(/(ago|few)/);
|
||||
|
||||
await commentsPage.addComment(comments.second);
|
||||
await commentsPage.checkUserIconIsDisplayed();
|
||||
await commentsPage.addComment(comments.second);
|
||||
await commentsPage.checkUserIconIsDisplayed();
|
||||
|
||||
await expect(await commentsPage.getTotalNumberOfComments()).toEqual('Comments (2)');
|
||||
await expect(await commentsPage.getMessage(0)).toEqual(comments.second);
|
||||
await expect(await commentsPage.getUserName(0)).toEqual(userFullName);
|
||||
await expect(await commentsPage.getTime(0)).toMatch(/(ago|few)/);
|
||||
});
|
||||
await commentsPage.getTotalNumberOfComments('Comments (2)');
|
||||
await expect(await commentsPage.getMessage(0)).toEqual(comments.second);
|
||||
await expect(await commentsPage.getUserName(0)).toEqual(userFullName);
|
||||
await expect(await commentsPage.getTime(0)).toMatch(/(ago|few)/);
|
||||
});
|
||||
|
||||
it('[C280022] Should not be able to add an HTML or other code input into the comment input filed', async () => {
|
||||
await viewerPage.viewFile(pngFileModel.name);
|
||||
await viewerPage.clickInfoButton();
|
||||
await viewerPage.checkInfoSideBarIsDisplayed();
|
||||
await viewerPage.clickOnCommentsTab();
|
||||
it('[C280022] Should not be able to add an HTML or other code input into the comment input filed', async () => {
|
||||
await viewerPage.viewFile(pngFileModel.name);
|
||||
await viewerPage.clickInfoButton();
|
||||
await viewerPage.checkInfoSideBarIsDisplayed();
|
||||
await viewerPage.clickOnCommentsTab();
|
||||
|
||||
await commentsPage.addComment(comments.codeType);
|
||||
await commentsPage.checkUserIconIsDisplayed();
|
||||
await commentsPage.addComment(comments.codeType);
|
||||
await commentsPage.checkUserIconIsDisplayed();
|
||||
|
||||
await expect(await commentsPage.getTotalNumberOfComments()).toEqual('Comments (1)');
|
||||
await expect(await commentsPage.getMessage(0)).toEqual('First name: Last name:');
|
||||
await expect(await commentsPage.getUserName(0)).toEqual(userFullName);
|
||||
await expect(await commentsPage.getTime(0)).toMatch(/(ago|few)/);
|
||||
await commentsPage.getTotalNumberOfComments('Comments (1)');
|
||||
await expect(await commentsPage.getMessage(0)).toEqual('First name: Last name:');
|
||||
await expect(await commentsPage.getUserName(0)).toEqual(userFullName);
|
||||
await expect(await commentsPage.getTime(0)).toMatch(/(ago|few)/);
|
||||
});
|
||||
});
|
||||
|
||||
describe('Consumer Permissions', () => {
|
||||
@@ -176,13 +176,13 @@ describe('Comment Component', () => {
|
||||
});
|
||||
|
||||
await apiService.getInstance().core.sitesApi.addSiteMember(site.entry.id, {
|
||||
id: acsUser.email,
|
||||
id: acsUser.username,
|
||||
role: CONSTANTS.CS_USER_ROLES.CONSUMER
|
||||
});
|
||||
|
||||
pngUploadedFile = await uploadActions.uploadFile(pngFileModel.location, pngFileModel.name, site.entry.guid);
|
||||
|
||||
await loginPage.login(acsUser.email, acsUser.password);
|
||||
await loginPage.login(acsUser.username, acsUser.password);
|
||||
|
||||
await navigationBarPage.navigateToContentServices();
|
||||
});
|
||||
@@ -203,6 +203,7 @@ describe('Comment Component', () => {
|
||||
|
||||
await commentsPage.checkCommentsTabIsSelected();
|
||||
await commentsPage.checkCommentInputIsNotDisplayed();
|
||||
await viewerPage.clickCloseButton();
|
||||
});
|
||||
});
|
||||
});
|
||||
|
||||
@@ -46,7 +46,7 @@ describe('Create folder directive', () => {
|
||||
|
||||
acsUser = await usersActions.createUser();
|
||||
|
||||
await loginPage.login(acsUser.email, acsUser.password);
|
||||
await loginPage.login(acsUser.username, acsUser.password);
|
||||
|
||||
await contentServicesPage.goToDocumentList();
|
||||
});
|
||||
|
||||
@@ -50,7 +50,7 @@ describe('Create library directive', () => {
|
||||
visibility: 'PUBLIC'
|
||||
});
|
||||
|
||||
await loginPage.login(acsUser.email, acsUser.password);
|
||||
await loginPage.login(acsUser.username, acsUser.password);
|
||||
});
|
||||
|
||||
afterAll(async () => {
|
||||
|
||||
@@ -30,19 +30,24 @@ import {
|
||||
} from '@alfresco/adf-testing';
|
||||
import { browser } from 'protractor';
|
||||
import { FolderModel } from '../../models/ACS/folder.model';
|
||||
import { NavigationBarPage } from '../../core/pages/navigation-bar.page';
|
||||
|
||||
describe('Delete Directive', () => {
|
||||
|
||||
const apiService = new ApiService();
|
||||
let baseFolderUploaded;
|
||||
|
||||
const loginPage = new LoginPage();
|
||||
const contentServicesPage = new ContentServicesPage();
|
||||
const paginationPage = new PaginationPage();
|
||||
const navigationBarPage = new NavigationBarPage();
|
||||
|
||||
const contentListPage = contentServicesPage.getDocumentList();
|
||||
const acsUser = new UserModel();
|
||||
const secondAcsUser = new UserModel();
|
||||
|
||||
const apiService = new ApiService();
|
||||
const uploadActions = new UploadActions(apiService);
|
||||
const permissionActions = new PermissionActions(apiService);
|
||||
let baseFolderUploaded;
|
||||
const usersActions = new UsersActions(apiService);
|
||||
|
||||
const txtFileModel = new FileModel({
|
||||
@@ -94,10 +99,10 @@ describe('Delete Directive', () => {
|
||||
await apiService.loginWithProfile('admin');
|
||||
await usersActions.createUser(acsUser);
|
||||
await usersActions.createUser(secondAcsUser);
|
||||
await apiService.login(acsUser.email, acsUser.password);
|
||||
});
|
||||
|
||||
beforeEach(async () => {
|
||||
await apiService.login(acsUser.username, acsUser.password);
|
||||
baseFolderUploaded = await uploadActions.createFolder(
|
||||
baseFolder.name,
|
||||
'-my-'
|
||||
@@ -105,6 +110,7 @@ describe('Delete Directive', () => {
|
||||
});
|
||||
|
||||
afterEach(async () => {
|
||||
await apiService.loginWithProfile('admin');
|
||||
await uploadActions.deleteFileOrFolder(baseFolderUploaded.entry.id);
|
||||
});
|
||||
|
||||
@@ -118,11 +124,15 @@ describe('Delete Directive', () => {
|
||||
await uploadActions.uploadFile(pdfFileModel.location, pdfFileModel.name, textFolderUploaded.entry.id);
|
||||
await uploadActions.createFolder(folderSecond.name, baseFolderUploaded.entry.id);
|
||||
|
||||
await loginPage.login(acsUser.email, acsUser.password);
|
||||
await loginPage.login(acsUser.username, acsUser.password);
|
||||
await BrowserActions.getUrl(`${browser.baseUrl}/files/${baseFolderUploaded.entry.id}`);
|
||||
await contentServicesPage.waitForTableBody();
|
||||
});
|
||||
|
||||
afterEach(async () => {
|
||||
await navigationBarPage.clickLogoutButton();
|
||||
});
|
||||
|
||||
it('[C260188] Delete multiple content', async () => {
|
||||
await contentListPage.selectRowWithKeyboard(txtFileModel.name);
|
||||
await contentListPage.dataTable.checkRowIsSelected('Display name', txtFileModel.name);
|
||||
@@ -184,6 +194,8 @@ describe('Delete Directive', () => {
|
||||
|
||||
describe('When selection on multiple pages', () => {
|
||||
beforeEach(async () => {
|
||||
await apiService.login(acsUser.username, acsUser.password);
|
||||
|
||||
await uploadActions.uploadFile( txtFileModel.location, txtFileModel.name, baseFolderUploaded.entry.id);
|
||||
await uploadActions.uploadFile(file0BytesModel.location, file0BytesModel.name, baseFolderUploaded.entry.id);
|
||||
await uploadActions.uploadFile(pdfFileModel.location, pdfFileModel.name, baseFolderUploaded.entry.id);
|
||||
@@ -191,11 +203,15 @@ describe('Delete Directive', () => {
|
||||
await uploadActions.uploadFile(pngFileModel.location, pngFileModel.name, baseFolderUploaded.entry.id);
|
||||
await uploadActions.uploadFile(secondPngFileModel.location, secondPngFileModel.name, baseFolderUploaded.entry.id);
|
||||
|
||||
await loginPage.login(acsUser.email, acsUser.password);
|
||||
await loginPage.login(acsUser.username, acsUser.password);
|
||||
await BrowserActions.getUrl(`${browser.baseUrl}/files/${baseFolderUploaded.entry.id}`);
|
||||
await contentServicesPage.waitForTableBody();
|
||||
});
|
||||
|
||||
afterEach(async () => {
|
||||
await navigationBarPage.clickLogoutButton();
|
||||
});
|
||||
|
||||
it('[C260191] Delete content selected from different pages', async () => {
|
||||
await contentServicesPage.sortByName('ASC');
|
||||
await paginationPage.selectItemsPerPage('5');
|
||||
@@ -216,13 +232,15 @@ describe('Delete Directive', () => {
|
||||
let fileTxt, filePdf, folderA, folderB;
|
||||
|
||||
beforeAll(async () => {
|
||||
await apiService.login(acsUser.username, acsUser.password);
|
||||
|
||||
createdSite = await apiService.getInstance().core.sitesApi.createSite({
|
||||
title: StringUtil.generateRandomString(20).toLowerCase(),
|
||||
visibility: 'PRIVATE'
|
||||
});
|
||||
|
||||
await apiService.getInstance().core.sitesApi.addSiteMember(createdSite.entry.id, {
|
||||
id: secondAcsUser.email,
|
||||
id: secondAcsUser.username,
|
||||
role: 'SiteCollaborator'
|
||||
});
|
||||
|
||||
@@ -231,17 +249,17 @@ describe('Delete Directive', () => {
|
||||
folderA = await uploadActions.createFolder(StringUtil.generateRandomString(5), createdSite.entry.guid);
|
||||
folderB = await uploadActions.createFolder(StringUtil.generateRandomString(5), createdSite.entry.guid);
|
||||
|
||||
await permissionActions.addRoleForUser(secondAcsUser.email, 'SiteManager', folderA);
|
||||
await permissionActions.addRoleForUser(secondAcsUser.email, 'SiteManager', fileTxt);
|
||||
await permissionActions.addRoleForUser(secondAcsUser.email, 'SiteConsumer', folderB);
|
||||
await permissionActions.addRoleForUser(secondAcsUser.email, 'SiteConsumer', filePdf);
|
||||
await permissionActions.addRoleForUser(secondAcsUser.username, 'SiteManager', folderA);
|
||||
await permissionActions.addRoleForUser(secondAcsUser.username, 'SiteManager', fileTxt);
|
||||
await permissionActions.addRoleForUser(secondAcsUser.username, 'SiteConsumer', folderB);
|
||||
await permissionActions.addRoleForUser(secondAcsUser.username, 'SiteConsumer', filePdf);
|
||||
|
||||
await permissionActions.disableInheritedPermissionsForNode(folderA.entry.id);
|
||||
await permissionActions.disableInheritedPermissionsForNode(folderB.entry.id);
|
||||
await permissionActions.disableInheritedPermissionsForNode(fileTxt.entry.id);
|
||||
await permissionActions.disableInheritedPermissionsForNode(filePdf.entry.id);
|
||||
|
||||
await loginPage.login(secondAcsUser.email, secondAcsUser.password);
|
||||
await loginPage.login(secondAcsUser.username, secondAcsUser.password);
|
||||
await BrowserActions.getUrl(`${browser.baseUrl}/files/${createdSite.entry.guid}`);
|
||||
await contentServicesPage.waitForTableBody();
|
||||
});
|
||||
@@ -250,6 +268,7 @@ describe('Delete Directive', () => {
|
||||
try {
|
||||
await apiService.getInstance().core.sitesApi.deleteSite(createdSite.entry.id, { permanent: true });
|
||||
} catch (error) {}
|
||||
await navigationBarPage.clickLogoutButton();
|
||||
});
|
||||
|
||||
it('[C216426] Delete file without delete permissions', async () => {
|
||||
|
||||
@@ -71,7 +71,7 @@ describe('Version component actions', () => {
|
||||
beforeAll(async () => {
|
||||
await apiService.loginWithProfile('admin');
|
||||
acsUser = await usersActions.createUser();
|
||||
await apiService.login(acsUser.email, acsUser.password);
|
||||
await apiService.login(acsUser.username, acsUser.password);
|
||||
|
||||
await uploadActions.uploadFile( txtFileModel.location, txtFileModel.name, '-my-');
|
||||
await uploadActions.uploadFile(file0BytesModel.location, file0BytesModel.name, '-my-');
|
||||
@@ -82,7 +82,7 @@ describe('Version component actions', () => {
|
||||
|
||||
await uploadActions.createFolder(folderSecond.name, '-my-');
|
||||
|
||||
await loginPage.login(acsUser.email, acsUser.password);
|
||||
await loginPage.login(acsUser.username, acsUser.password);
|
||||
|
||||
await navigationBarPage.navigateToContentServices();
|
||||
await contentServicesPage.waitForTableBody();
|
||||
|
||||
@@ -56,7 +56,7 @@ describe('Edit folder directive', () => {
|
||||
await apiService.loginWithProfile('admin');
|
||||
await usersActions.createUser(acsUser);
|
||||
await usersActions.createUser(anotherAcsUser);
|
||||
await apiService.login(acsUser.email, acsUser.password);
|
||||
await apiService.login(acsUser.username, acsUser.password);
|
||||
|
||||
editFolder = await uploadActions.createFolder(StringUtil.generateRandomString(5), '-my-');
|
||||
anotherFolder = await uploadActions.createFolder(StringUtil.generateRandomString(5), '-my-');
|
||||
@@ -68,14 +68,14 @@ describe('Edit folder directive', () => {
|
||||
{
|
||||
permissions: {
|
||||
locallySet: [{
|
||||
authorityId: anotherAcsUser.email,
|
||||
authorityId: anotherAcsUser.username,
|
||||
name: 'Consumer',
|
||||
accessStatus: 'ALLOWED'
|
||||
}]
|
||||
}
|
||||
});
|
||||
|
||||
await loginPage.login(acsUser.email, acsUser.password);
|
||||
await loginPage.login(acsUser.username, acsUser.password);
|
||||
});
|
||||
|
||||
afterAll(async () => {
|
||||
@@ -235,7 +235,7 @@ describe('Edit folder directive', () => {
|
||||
describe('Edit Folder - no permission', () => {
|
||||
beforeEach(async () => {
|
||||
await navigationBarPage.clickLogoutButton();
|
||||
await loginPage.login(anotherAcsUser.email, anotherAcsUser.password);
|
||||
await loginPage.login(anotherAcsUser.username, anotherAcsUser.password);
|
||||
await BrowserActions.getUrl(browser.baseUrl + '/files/' + editFolder.entry.id);
|
||||
await contentServicesPage.getDocumentList().dataTablePage().waitTillContentLoaded();
|
||||
});
|
||||
|
||||
@@ -56,7 +56,7 @@ describe('Favorite directive', () => {
|
||||
beforeAll(async () => {
|
||||
await apiService.loginWithProfile('admin');
|
||||
acsUser = await usersActions.createUser();
|
||||
await apiService.login(acsUser.email, acsUser.password);
|
||||
await apiService.login(acsUser.username, acsUser.password);
|
||||
|
||||
testFolder1 = await uploadActions.createFolder(StringUtil.generateRandomString(5), '-my-');
|
||||
testFolder2 = await uploadActions.createFolder(StringUtil.generateRandomString(5), '-my-');
|
||||
@@ -66,7 +66,7 @@ describe('Favorite directive', () => {
|
||||
|
||||
await browser.sleep(browser.params.testConfig.timeouts.index_search);
|
||||
|
||||
await loginPage.login(acsUser.email, acsUser.password);
|
||||
await loginPage.login(acsUser.username, acsUser.password);
|
||||
await contentServicesPage.goToDocumentList();
|
||||
});
|
||||
|
||||
|
||||
@@ -24,7 +24,6 @@ import { TrashcanPage } from '../../core/pages/trashcan.page';
|
||||
import {
|
||||
ApiService,
|
||||
BreadcrumbPage,
|
||||
BrowserActions,
|
||||
LoginPage,
|
||||
NotificationHistoryPage,
|
||||
StringUtil,
|
||||
@@ -71,7 +70,7 @@ describe('Restore content directive', () => {
|
||||
await apiService.loginWithProfile('admin');
|
||||
await usersActions.createUser(acsUser);
|
||||
await usersActions.createUser(anotherAcsUser);
|
||||
await apiService.login(acsUser.email, acsUser.password);
|
||||
await apiService.login(acsUser.username, acsUser.password);
|
||||
|
||||
await uploadActions.createFolder(folderName, '-my-');
|
||||
folderWithContent = await uploadActions.createFolder(StringUtil.generateRandomString(5), '-my-');
|
||||
@@ -80,8 +79,6 @@ describe('Restore content directive', () => {
|
||||
folderWithFolder = await uploadActions.createFolder(StringUtil.generateRandomString(5), '-my-');
|
||||
subFolder = await uploadActions.createFolder(StringUtil.generateRandomString(5), folderWithFolder.entry.id);
|
||||
restoreFile = await uploadActions.uploadFile(pngFileModel.location, pngFileModel.name, '-my-');
|
||||
|
||||
await loginPage.login(acsUser.email, acsUser.password);
|
||||
});
|
||||
|
||||
afterAll(async () => {
|
||||
@@ -90,14 +87,10 @@ describe('Restore content directive', () => {
|
||||
await uploadActions.deleteFileOrFolder(folderWithFolder.entry.id);
|
||||
});
|
||||
|
||||
beforeEach(async () => {
|
||||
await BrowserActions.closeMenuAndDialogs();
|
||||
await navigationBarPage.navigateToContentServices();
|
||||
await contentServicesPage.waitForTableBody();
|
||||
});
|
||||
|
||||
describe('Restore same name folders', () => {
|
||||
|
||||
beforeAll(async () => {
|
||||
await loginPage.login(acsUser.username, acsUser.password);
|
||||
await navigationBarPage.navigateToContentServices();
|
||||
await contentServicesPage.waitForTableBody();
|
||||
await contentServicesPage.checkContentIsDisplayed(folderName);
|
||||
@@ -108,10 +101,13 @@ describe('Restore content directive', () => {
|
||||
await trashcanPage.getDocumentList().dataTablePage().checkRowContentIsDisplayed(folderName);
|
||||
});
|
||||
|
||||
afterEach(async () => {
|
||||
await navigationBarPage.clickLogoutButton();
|
||||
});
|
||||
|
||||
it('[C260227] Should validate when restoring Folders with same name', async () => {
|
||||
await uploadActions.createFolder(folderName, '-my-');
|
||||
await navigationBarPage.navigateToContentServices();
|
||||
await browser.refresh();
|
||||
await contentServicesPage.waitForTableBody();
|
||||
await contentServicesPage.checkContentIsDisplayed(folderName);
|
||||
await contentServicesPage.deleteContent(folderName);
|
||||
@@ -121,8 +117,10 @@ describe('Restore content directive', () => {
|
||||
await trashcanPage.getDocumentList().dataTablePage().checkRowContentIsDisplayed(folderName);
|
||||
|
||||
await trashcanPage.getDocumentList().dataTablePage().checkAllRows();
|
||||
|
||||
await trashcanPage.clickRestore();
|
||||
await trashcanPage.getDocumentList().dataTablePage().checkRowContentIsDisplayed(folderName);
|
||||
await browser.sleep(1000);
|
||||
|
||||
await navigationBarPage.navigateToContentServices();
|
||||
await contentServicesPage.getDocumentList().dataTablePage().waitTillContentLoaded();
|
||||
await contentServicesPage.checkContentIsDisplayed(folderName);
|
||||
@@ -131,114 +129,129 @@ describe('Restore content directive', () => {
|
||||
});
|
||||
});
|
||||
|
||||
it('[C260238] Should restore a file', async () => {
|
||||
await contentServicesPage.checkContentIsDisplayed(testFile.entry.name);
|
||||
await contentServicesPage.deleteContent(testFile.entry.name);
|
||||
await contentServicesPage.checkContentIsNotDisplayed(testFile.entry.name);
|
||||
await navigationBarPage.clickTrashcanButton();
|
||||
await trashcanPage.waitForTableBody();
|
||||
await trashcanPage.getDocumentList().dataTablePage().clickRowByContent(testFile.entry.name);
|
||||
await trashcanPage.getDocumentList().dataTablePage().checkRowByContentIsSelected(testFile.entry.name);
|
||||
await trashcanPage.clickRestore();
|
||||
await trashcanPage.getDocumentList().dataTablePage().checkRowContentIsNotDisplayed(testFile.entry.name);
|
||||
describe('Validate', () => {
|
||||
|
||||
await notificationHistoryPage.checkNotifyContains(testFile.entry.name + ' item restored');
|
||||
beforeAll(async () => {
|
||||
await loginPage.login(acsUser.username, acsUser.password);
|
||||
});
|
||||
|
||||
await navigationBarPage.navigateToContentServices();
|
||||
await contentServicesPage.waitForTableBody();
|
||||
await contentServicesPage.checkContentIsDisplayed(testFile.entry.name);
|
||||
await contentServicesPage.deleteContent(testFile.entry.name);
|
||||
await contentServicesPage.checkContentIsNotDisplayed(testFile.entry.name);
|
||||
await navigationBarPage.clickTrashcanButton();
|
||||
await trashcanPage.waitForTableBody();
|
||||
await trashcanPage.getDocumentList().dataTablePage().checkRowContentIsDisplayed(testFile.entry.name);
|
||||
});
|
||||
afterAll(async () => {
|
||||
await navigationBarPage.clickLogoutButton();
|
||||
});
|
||||
|
||||
it('[C260239] Should restore folder with content', async () => {
|
||||
await contentServicesPage.checkContentIsDisplayed(folderWithContent.entry.name);
|
||||
await contentServicesPage.deleteContent(folderWithContent.entry.name);
|
||||
await contentServicesPage.checkContentIsNotDisplayed(folderWithContent.entry.name);
|
||||
await navigationBarPage.clickTrashcanButton();
|
||||
await trashcanPage.waitForTableBody();
|
||||
await trashcanPage.getDocumentList().dataTablePage().clickRowByContent(folderWithContent.entry.name);
|
||||
await trashcanPage.getDocumentList().dataTablePage().checkRowByContentIsSelected(folderWithContent.entry.name);
|
||||
await trashcanPage.clickRestore();
|
||||
await trashcanPage.getDocumentList().dataTablePage().checkRowContentIsNotDisplayed(folderWithContent.entry.name);
|
||||
beforeEach(async () => {
|
||||
await navigationBarPage.navigateToContentServices();
|
||||
await contentServicesPage.waitForTableBody();
|
||||
});
|
||||
|
||||
await navigationBarPage.navigateToContentServices();
|
||||
await contentServicesPage.waitForTableBody();
|
||||
await contentServicesPage.checkContentIsDisplayed(folderWithContent.entry.name);
|
||||
await contentServicesPage.getDocumentList().dataTablePage().doubleClickRow('Display name', folderWithContent.entry.name);
|
||||
await contentServicesPage.checkContentIsDisplayed(subFile.entry.name);
|
||||
await notificationHistoryPage.checkNotifyContains(folderWithContent.entry.name + ' item restored');
|
||||
});
|
||||
it('[C260238] Should restore a file', async () => {
|
||||
await contentServicesPage.checkContentIsDisplayed(testFile.entry.name);
|
||||
await contentServicesPage.deleteContent(testFile.entry.name);
|
||||
await contentServicesPage.checkContentIsNotDisplayed(testFile.entry.name);
|
||||
await navigationBarPage.clickTrashcanButton();
|
||||
await trashcanPage.waitForTableBody();
|
||||
await trashcanPage.getDocumentList().dataTablePage().clickRowByContent(testFile.entry.name);
|
||||
await trashcanPage.getDocumentList().dataTablePage().checkRowByContentIsSelected(testFile.entry.name);
|
||||
await trashcanPage.clickRestore();
|
||||
await trashcanPage.getDocumentList().dataTablePage().checkRowContentIsNotDisplayed(testFile.entry.name);
|
||||
|
||||
it('[C260240] Should validate restore when the original location no longer exists', async () => {
|
||||
await contentServicesPage.checkContentIsDisplayed(folderWithFolder.entry.name);
|
||||
await contentServicesPage.openFolder(folderWithFolder.entry.name);
|
||||
await contentServicesPage.checkContentIsDisplayed(subFolder.entry.name);
|
||||
await contentServicesPage.deleteContent(subFolder.entry.name);
|
||||
await contentServicesPage.checkContentIsNotDisplayed(subFolder.entry.name);
|
||||
await breadCrumbPage.chooseBreadCrumb(acsUser.email);
|
||||
await contentServicesPage.waitForTableBody();
|
||||
await contentServicesPage.checkContentIsDisplayed(folderWithFolder.entry.name);
|
||||
await contentServicesPage.deleteContent(folderWithFolder.entry.name);
|
||||
await contentServicesPage.checkContentIsNotDisplayed(folderWithFolder.entry.name);
|
||||
await notificationHistoryPage.checkNotifyContains(testFile.entry.name + ' item restored');
|
||||
|
||||
await navigationBarPage.clickTrashcanButton();
|
||||
await trashcanPage.waitForTableBody();
|
||||
await trashcanPage.getDocumentList().dataTablePage().checkRowContentIsDisplayed(subFolder.entry.name);
|
||||
await trashcanPage.getDocumentList().dataTablePage().checkRowContentIsDisplayed(folderWithFolder.entry.name);
|
||||
await trashcanPage.getDocumentList().dataTablePage().clickRowByContent(subFolder.entry.name);
|
||||
await trashcanPage.getDocumentList().dataTablePage().checkRowByContentIsSelected(subFolder.entry.name);
|
||||
await trashcanPage.clickRestore();
|
||||
await notificationHistoryPage.checkNotifyContains(`Can't restore ${subFolder.entry.name} item, the original location no longer exists`);
|
||||
await trashcanPage.getDocumentList().dataTablePage().checkRowContentIsDisplayed(subFolder.entry.name);
|
||||
await trashcanPage.getDocumentList().dataTablePage().checkRowContentIsDisplayed(folderWithFolder.entry.name);
|
||||
await trashcanPage.getDocumentList().dataTablePage().clickRowByContentCheckbox(subFolder.entry.name);
|
||||
await trashcanPage.getDocumentList().dataTablePage().checkRowByContentIsSelected(subFolder.entry.name);
|
||||
await trashcanPage.getDocumentList().dataTablePage().clickRowByContentCheckbox(folderWithFolder.entry.name);
|
||||
await trashcanPage.getDocumentList().dataTablePage().checkRowByContentIsSelected(folderWithFolder.entry.name);
|
||||
await trashcanPage.clickRestore();
|
||||
await notificationHistoryPage.checkNotifyContains('Restore successful');
|
||||
await navigationBarPage.navigateToContentServices();
|
||||
await contentServicesPage.waitForTableBody();
|
||||
await contentServicesPage.checkContentIsDisplayed(folderWithFolder.entry.name);
|
||||
await contentServicesPage.openFolder(folderWithFolder.entry.name);
|
||||
await contentServicesPage.checkContentIsDisplayed(subFolder.entry.name);
|
||||
});
|
||||
await navigationBarPage.navigateToContentServices();
|
||||
await contentServicesPage.waitForTableBody();
|
||||
await contentServicesPage.checkContentIsDisplayed(testFile.entry.name);
|
||||
await contentServicesPage.deleteContent(testFile.entry.name);
|
||||
await contentServicesPage.checkContentIsNotDisplayed(testFile.entry.name);
|
||||
await navigationBarPage.clickTrashcanButton();
|
||||
await trashcanPage.waitForTableBody();
|
||||
await trashcanPage.getDocumentList().dataTablePage().checkRowContentIsDisplayed(testFile.entry.name);
|
||||
});
|
||||
|
||||
it('[C260241] Should display restore icon both for file and folder', async () => {
|
||||
await contentServicesPage.checkContentIsDisplayed(folderName);
|
||||
await contentServicesPage.checkContentIsDisplayed(restoreFile.entry.name);
|
||||
await contentServicesPage.deleteContent(folderName);
|
||||
await contentServicesPage.deleteContent(restoreFile.entry.name);
|
||||
await contentServicesPage.checkContentIsNotDisplayed(folderName);
|
||||
await contentServicesPage.checkContentIsNotDisplayed(restoreFile.entry.name);
|
||||
it('[C260239] Should restore folder with content', async () => {
|
||||
await contentServicesPage.checkContentIsDisplayed(folderWithContent.entry.name);
|
||||
await contentServicesPage.deleteContent(folderWithContent.entry.name);
|
||||
await contentServicesPage.checkContentIsNotDisplayed(folderWithContent.entry.name);
|
||||
await navigationBarPage.clickTrashcanButton();
|
||||
await trashcanPage.waitForTableBody();
|
||||
await trashcanPage.getDocumentList().dataTablePage().clickRowByContent(folderWithContent.entry.name);
|
||||
await trashcanPage.getDocumentList().dataTablePage().checkRowByContentIsSelected(folderWithContent.entry.name);
|
||||
await trashcanPage.clickRestore();
|
||||
await trashcanPage.getDocumentList().dataTablePage().checkRowContentIsNotDisplayed(folderWithContent.entry.name);
|
||||
|
||||
await navigationBarPage.clickTrashcanButton();
|
||||
await trashcanPage.waitForTableBody();
|
||||
await trashcanPage.checkRestoreButtonIsNotDisplayed();
|
||||
await trashcanPage.getDocumentList().dataTablePage().clickRowByContentCheckbox(folderName);
|
||||
await trashcanPage.getDocumentList().dataTablePage().checkRowByContentIsSelected(folderName);
|
||||
await trashcanPage.checkRestoreButtonIsDisplayed();
|
||||
await trashcanPage.getDocumentList().dataTablePage().clickRowByContentCheckbox(folderName);
|
||||
await trashcanPage.getDocumentList().dataTablePage().checkRowByContentIsNotSelected(folderName);
|
||||
await navigationBarPage.navigateToContentServices();
|
||||
await contentServicesPage.waitForTableBody();
|
||||
await contentServicesPage.checkContentIsDisplayed(folderWithContent.entry.name);
|
||||
await contentServicesPage.getDocumentList().dataTablePage().doubleClickRow('Display name', folderWithContent.entry.name);
|
||||
await contentServicesPage.checkContentIsDisplayed(subFile.entry.name);
|
||||
await notificationHistoryPage.checkNotifyContains(folderWithContent.entry.name + ' item restored');
|
||||
});
|
||||
|
||||
await trashcanPage.getDocumentList().dataTablePage().clickRowByContentCheckbox(restoreFile.entry.name);
|
||||
await trashcanPage.getDocumentList().dataTablePage().checkRowByContentIsSelected(restoreFile.entry.name);
|
||||
await trashcanPage.checkRestoreButtonIsDisplayed();
|
||||
it('[C260240] Should validate restore when the original location no longer exists', async () => {
|
||||
await contentServicesPage.checkContentIsDisplayed(folderWithFolder.entry.name);
|
||||
await contentServicesPage.openFolder(folderWithFolder.entry.name);
|
||||
await contentServicesPage.checkContentIsDisplayed(subFolder.entry.name);
|
||||
await contentServicesPage.deleteContent(subFolder.entry.name);
|
||||
await contentServicesPage.checkContentIsNotDisplayed(subFolder.entry.name);
|
||||
await breadCrumbPage.chooseBreadCrumb(acsUser.username);
|
||||
await contentServicesPage.waitForTableBody();
|
||||
await contentServicesPage.checkContentIsDisplayed(folderWithFolder.entry.name);
|
||||
await contentServicesPage.deleteContent(folderWithFolder.entry.name);
|
||||
await contentServicesPage.checkContentIsNotDisplayed(folderWithFolder.entry.name);
|
||||
|
||||
await trashcanPage.getDocumentList().dataTablePage().clickRowByContentCheckbox(folderName);
|
||||
await trashcanPage.getDocumentList().dataTablePage().checkRowByContentIsSelected(folderName);
|
||||
await trashcanPage.getDocumentList().dataTablePage().checkRowByContentIsSelected(restoreFile.entry.name);
|
||||
await trashcanPage.checkRestoreButtonIsDisplayed();
|
||||
await navigationBarPage.clickTrashcanButton();
|
||||
await trashcanPage.waitForTableBody();
|
||||
await trashcanPage.getDocumentList().dataTablePage().checkRowContentIsDisplayed(subFolder.entry.name);
|
||||
await trashcanPage.getDocumentList().dataTablePage().checkRowContentIsDisplayed(folderWithFolder.entry.name);
|
||||
await trashcanPage.getDocumentList().dataTablePage().clickRowByContent(subFolder.entry.name);
|
||||
await trashcanPage.getDocumentList().dataTablePage().checkRowByContentIsSelected(subFolder.entry.name);
|
||||
await trashcanPage.clickRestore();
|
||||
await notificationHistoryPage.checkNotifyContains(`Can't restore ${subFolder.entry.name} item, the original location no longer exists`);
|
||||
await trashcanPage.getDocumentList().dataTablePage().checkRowContentIsDisplayed(subFolder.entry.name);
|
||||
await trashcanPage.getDocumentList().dataTablePage().checkRowContentIsDisplayed(folderWithFolder.entry.name);
|
||||
await trashcanPage.getDocumentList().dataTablePage().clickRowByContentCheckbox(subFolder.entry.name);
|
||||
await trashcanPage.getDocumentList().dataTablePage().checkRowByContentIsSelected(subFolder.entry.name);
|
||||
await trashcanPage.getDocumentList().dataTablePage().clickRowByContentCheckbox(folderWithFolder.entry.name);
|
||||
await trashcanPage.getDocumentList().dataTablePage().checkRowByContentIsSelected(folderWithFolder.entry.name);
|
||||
await trashcanPage.clickRestore();
|
||||
await notificationHistoryPage.checkNotifyContains('Restore successful');
|
||||
await navigationBarPage.navigateToContentServices();
|
||||
await contentServicesPage.waitForTableBody();
|
||||
await contentServicesPage.checkContentIsDisplayed(folderWithFolder.entry.name);
|
||||
await contentServicesPage.openFolder(folderWithFolder.entry.name);
|
||||
await contentServicesPage.checkContentIsDisplayed(subFolder.entry.name);
|
||||
});
|
||||
|
||||
it('[C260241] Should display restore icon both for file and folder', async () => {
|
||||
await contentServicesPage.checkContentIsDisplayed(folderName);
|
||||
await contentServicesPage.checkContentIsDisplayed(restoreFile.entry.name);
|
||||
await contentServicesPage.deleteContent(folderName);
|
||||
await contentServicesPage.deleteContent(restoreFile.entry.name);
|
||||
|
||||
await navigationBarPage.clickTrashcanButton();
|
||||
await trashcanPage.waitForTableBody();
|
||||
await trashcanPage.checkRestoreButtonIsNotDisplayed();
|
||||
await trashcanPage.getDocumentList().dataTablePage().clickRowByContentCheckbox(folderName);
|
||||
await trashcanPage.getDocumentList().dataTablePage().checkRowByContentIsSelected(folderName);
|
||||
await trashcanPage.checkRestoreButtonIsDisplayed();
|
||||
await trashcanPage.getDocumentList().dataTablePage().clickRowByContentCheckbox(folderName);
|
||||
await trashcanPage.getDocumentList().dataTablePage().checkRowByContentIsNotSelected(folderName);
|
||||
|
||||
await trashcanPage.getDocumentList().dataTablePage().clickRowByContentCheckbox(restoreFile.entry.name);
|
||||
await trashcanPage.getDocumentList().dataTablePage().checkRowByContentIsSelected(restoreFile.entry.name);
|
||||
await trashcanPage.checkRestoreButtonIsDisplayed();
|
||||
|
||||
await trashcanPage.getDocumentList().dataTablePage().clickRowByContentCheckbox(folderName);
|
||||
await trashcanPage.getDocumentList().dataTablePage().checkRowByContentIsSelected(folderName);
|
||||
await trashcanPage.getDocumentList().dataTablePage().checkRowByContentIsSelected(restoreFile.entry.name);
|
||||
await trashcanPage.checkRestoreButtonIsDisplayed();
|
||||
});
|
||||
});
|
||||
|
||||
describe('Restore deleted library', () => {
|
||||
|
||||
beforeAll(async () => {
|
||||
await apiService.login(acsUser.email, acsUser.password);
|
||||
const publicSiteName = `00${StringUtil.generateRandomString(5)}`;
|
||||
await apiService.login(acsUser.username, acsUser.password);
|
||||
const publicSiteName = `public-${StringUtil.generateRandomString(5)}`;
|
||||
const publicSiteBody = { visibility: 'PUBLIC', title: publicSiteName };
|
||||
publicSite = await apiService.getInstance().core.sitesApi.createSite(publicSiteBody);
|
||||
siteFolder = await uploadActions.createFolder(StringUtil.generateRandomString(5), publicSite.entry.guid);
|
||||
@@ -246,8 +259,19 @@ describe('Restore content directive', () => {
|
||||
await apiService.getInstance().core.sitesApi.deleteSite(publicSite.entry.id);
|
||||
});
|
||||
|
||||
afterEach(async () => {
|
||||
await navigationBarPage.clickLogoutButton();
|
||||
});
|
||||
|
||||
beforeEach(async () => {
|
||||
await loginPage.login(acsUser.username, acsUser.password);
|
||||
await navigationBarPage.navigateToContentServices();
|
||||
await contentServicesPage.waitForTableBody();
|
||||
});
|
||||
|
||||
afterAll(async () => {
|
||||
try {
|
||||
await apiService.loginWithProfile('admin');
|
||||
await apiService.getInstance().core.sitesApi.deleteSite(publicSite.entry.id, { permanent: true });
|
||||
} catch (error) {
|
||||
}
|
||||
@@ -261,8 +285,11 @@ describe('Restore content directive', () => {
|
||||
await trashcanPage.getDocumentList().dataTablePage().checkRowByContentIsSelected(publicSite.entry.id);
|
||||
await trashcanPage.clickRestore();
|
||||
|
||||
await browser.sleep(browser.params.testConfig.timeouts.index_search);
|
||||
|
||||
await navigationBarPage.navigateToContentServices();
|
||||
await contentServicesPage.waitForTableBody();
|
||||
|
||||
await contentServicesPage.selectSite(publicSite.entry.title);
|
||||
await contentServicesPage.waitForTableBody();
|
||||
await contentServicesPage.checkContentIsDisplayed(siteFolder.entry.name);
|
||||
@@ -276,7 +303,7 @@ describe('Restore content directive', () => {
|
||||
let parentFolder, folderWithin, pdfFile, pngFile, mainFile, mainFolder;
|
||||
|
||||
beforeAll(async () => {
|
||||
await apiService.login(anotherAcsUser.email, anotherAcsUser.password);
|
||||
await apiService.login(anotherAcsUser.username, anotherAcsUser.password);
|
||||
await uploadActions.createFolder(folderName, '-my-');
|
||||
parentFolder = await uploadActions.createFolder(StringUtil.generateRandomString(5), '-my-');
|
||||
folderWithin = await uploadActions.createFolder(StringUtil.generateRandomString(5), parentFolder.entry.id);
|
||||
@@ -285,8 +312,16 @@ describe('Restore content directive', () => {
|
||||
mainFile = await uploadActions.uploadFile(testFileModel.location, testFileModel.name, '-my-');
|
||||
mainFolder = await uploadActions.createFolder(StringUtil.generateRandomString(5), '-my-');
|
||||
|
||||
await loginPage.login(anotherAcsUser.email, anotherAcsUser.password);
|
||||
await contentServicesPage.goToDocumentList();
|
||||
await loginPage.login(anotherAcsUser.username, anotherAcsUser.password);
|
||||
});
|
||||
|
||||
beforeEach(async () => {
|
||||
await navigationBarPage.navigateToContentServices();
|
||||
await contentServicesPage.waitForTableBody();
|
||||
});
|
||||
|
||||
afterEach(async () => {
|
||||
await navigationBarPage.clickLogoutButton();
|
||||
});
|
||||
|
||||
afterAll(async () => {
|
||||
|
||||
@@ -68,7 +68,7 @@ describe('Document List Component - Actions', () => {
|
||||
folderName = `TATSUMAKY_${StringUtil.generateRandomString(5)}_SENPOUKYAKU`;
|
||||
await apiService.loginWithProfile('admin');
|
||||
acsUser = await usersActions.createUser();
|
||||
await apiService.login(acsUser.email, acsUser.password);
|
||||
await apiService.login(acsUser.username, acsUser.password);
|
||||
pdfUploadedNode = await uploadActions.uploadFile(pdfFileModel.location, pdfFileModel.name, '-my-');
|
||||
await uploadActions.uploadFile(testFileModel.location, testFileModel.name, '-my-');
|
||||
uploadedFolder = await uploadActions.createFolder(folderName, '-my-');
|
||||
@@ -77,7 +77,7 @@ describe('Document List Component - Actions', () => {
|
||||
fileNames = StringUtil.generateFilesNames(1, nrOfFiles, files.base, files.extension);
|
||||
await uploadActions.createEmptyFiles(fileNames, uploadedFolder.entry.id);
|
||||
|
||||
await loginPage.login(acsUser.email, acsUser.password);
|
||||
await loginPage.login(acsUser.username, acsUser.password);
|
||||
|
||||
await browser.sleep(browser.params.testConfig.timeouts.index_search); // wait search index previous file/folder uploaded
|
||||
});
|
||||
|
||||
@@ -20,12 +20,16 @@ import { browser } from 'protractor';
|
||||
import { ApiService, LoginPage, StringUtil, UploadActions, UsersActions, ViewerPage } from '@alfresco/adf-testing';
|
||||
import { FileModel } from '../../models/ACS/file.model';
|
||||
import moment from 'moment-es6';
|
||||
import { NavigationBarPage } from '../../core/pages/navigation-bar.page';
|
||||
|
||||
describe('Document List Component', () => {
|
||||
|
||||
const loginPage = new LoginPage();
|
||||
const contentServicesPage = new ContentServicesPage();
|
||||
let uploadedFolder, uploadedFolderExtra;
|
||||
|
||||
const loginPage = new LoginPage();
|
||||
const navigationBarPage = new NavigationBarPage();
|
||||
|
||||
const contentServicesPage = new ContentServicesPage();
|
||||
const apiService = new ApiService();
|
||||
const usersActions = new UsersActions(apiService);
|
||||
|
||||
@@ -82,7 +86,7 @@ describe('Document List Component', () => {
|
||||
|
||||
acsUser = await usersActions.createUser();
|
||||
|
||||
await apiService.login(acsUser.email, acsUser.password);
|
||||
await apiService.login(acsUser.username, acsUser.password);
|
||||
uploadedFolder = await uploadActions.createFolder(folderName, '-my-');
|
||||
pdfUploadedNode = await uploadActions.uploadFile(pdfFileModel.location, pdfFileModel.name, '-my-');
|
||||
docxUploadedNode = await uploadActions.uploadFile(docxFileModel.location, docxFileModel.name, '-my-');
|
||||
@@ -106,7 +110,11 @@ describe('Document List Component', () => {
|
||||
});
|
||||
|
||||
beforeEach(async () => {
|
||||
await loginPage.login(acsUser.email, acsUser.password);
|
||||
await loginPage.login(acsUser.username, acsUser.password);
|
||||
});
|
||||
|
||||
afterEach(async () => {
|
||||
await navigationBarPage.clickLogoutButton();
|
||||
});
|
||||
|
||||
it('[C279926] Should only display the user\'s files and folders', async () => {
|
||||
@@ -126,7 +134,7 @@ describe('Document List Component', () => {
|
||||
});
|
||||
|
||||
it('[C279928] Should be able to display date with timeAgo', async () => {
|
||||
await apiService.login(acsUser.email, acsUser.password);
|
||||
await apiService.login(acsUser.username, acsUser.password);
|
||||
timeAgoUploadedNode = await uploadActions.uploadFile(timeAgoFileModel.location, timeAgoFileModel.name, '-my-');
|
||||
await contentServicesPage.goToDocumentList();
|
||||
const dateValue = await contentServicesPage.getColumnValueForRow(timeAgoFileModel.name, 'Created');
|
||||
@@ -134,7 +142,7 @@ describe('Document List Component', () => {
|
||||
});
|
||||
|
||||
it('[C279929] Should be able to display the date with date type', async () => {
|
||||
await apiService.login(acsUser.email, acsUser.password);
|
||||
await apiService.login(acsUser.username, acsUser.password);
|
||||
mediumDateUploadedNode = await uploadActions.uploadFile(mediumFileModel.location, mediumFileModel.name, '-my-');
|
||||
const createdDate = moment(mediumDateUploadedNode.createdAt).format('ll');
|
||||
await contentServicesPage.goToDocumentList();
|
||||
@@ -166,18 +174,20 @@ describe('Document List Component', () => {
|
||||
await apiService.loginWithProfile('admin');
|
||||
|
||||
const user = await usersActions.createUser();
|
||||
await apiService.login(user.email, user.password);
|
||||
await apiService.login(user.username, user.password);
|
||||
|
||||
fileANode = await uploadActions.uploadFile(fakeFileA.location, fakeFileA.name, '-my-');
|
||||
fileBNode = await uploadActions.uploadFile(fakeFileB.location, fakeFileB.name, '-my-');
|
||||
fileCNode = await uploadActions.uploadFile(fakeFileC.location, fakeFileC.name, '-my-');
|
||||
|
||||
await loginPage.login(user.email, user.password);
|
||||
await loginPage.login(user.username, user.password);
|
||||
|
||||
await contentServicesPage.goToDocumentList();
|
||||
});
|
||||
|
||||
afterAll(async () => {
|
||||
await navigationBarPage.clickLogoutButton();
|
||||
|
||||
await apiService.loginWithProfile('admin');
|
||||
if (fileANode) {
|
||||
await uploadActions.deleteFileOrFolder(fileANode.entry.id);
|
||||
@@ -215,86 +225,98 @@ describe('Document List Component', () => {
|
||||
});
|
||||
});
|
||||
|
||||
it('[C279959] Should display empty folder state for new folders', async () => {
|
||||
const folderName = 'BANANA';
|
||||
await apiService.loginWithProfile('admin');
|
||||
acsUser = await usersActions.createUser();
|
||||
await loginPage.login(acsUser.email, acsUser.password);
|
||||
await contentServicesPage.goToDocumentList();
|
||||
await contentServicesPage.createNewFolder(folderName);
|
||||
await contentServicesPage.openFolder(folderName);
|
||||
await contentServicesPage.checkEmptyFolderTextToBe('This folder is empty');
|
||||
await contentServicesPage.checkEmptyFolderImageUrlToContain('/assets/images/empty_doc_lib.svg');
|
||||
});
|
||||
describe('', () => {
|
||||
|
||||
it('[C272775] Should be able to upload a file in new folder', async () => {
|
||||
const testFile = new FileModel({
|
||||
name: browser.params.resources.Files.ADF_DOCUMENTS.TEST.file_name,
|
||||
location: browser.params.resources.Files.ADF_DOCUMENTS.TEST.file_location
|
||||
afterEach(async () => {
|
||||
await navigationBarPage.clickLogoutButton();
|
||||
});
|
||||
/* cspell:disable-next-line */
|
||||
const folderName = `MEESEEKS_${StringUtil.generateRandomString(5)}_LOOK_AT_ME`;
|
||||
await apiService.loginWithProfile('admin');
|
||||
acsUser = await usersActions.createUser();
|
||||
await apiService.login(acsUser.email, acsUser.password);
|
||||
uploadedFolder = await uploadActions.createFolder(folderName, '-my-');
|
||||
await loginPage.login(acsUser.email, acsUser.password);
|
||||
await contentServicesPage.goToDocumentList();
|
||||
await contentServicesPage.checkContentIsDisplayed(uploadedFolder.entry.name);
|
||||
await contentServicesPage.openFolder(uploadedFolder.entry.name);
|
||||
await contentServicesPage.uploadFile(testFile.location);
|
||||
await contentServicesPage.checkContentIsDisplayed(testFile.name);
|
||||
});
|
||||
|
||||
it('[C261997] Should be able to clean Recent Files history', async () => {
|
||||
await apiService.loginWithProfile('admin');
|
||||
const cleanUser = await usersActions.createUser();
|
||||
await loginPage.login(cleanUser.email, cleanUser.password);
|
||||
await contentServicesPage.clickOnContentServices();
|
||||
await contentServicesPage.checkRecentFileToBeShowed();
|
||||
const icon = await contentServicesPage.getRecentFileIcon();
|
||||
await expect(icon).toBe('history');
|
||||
await contentServicesPage.expandRecentFiles();
|
||||
await contentServicesPage.checkEmptyRecentFileIsDisplayed();
|
||||
await contentServicesPage.closeRecentFiles();
|
||||
});
|
||||
it('[C279959] Should display empty folder state for new folders', async () => {
|
||||
const folderName = 'BANANA';
|
||||
await apiService.loginWithProfile('admin');
|
||||
acsUser = await usersActions.createUser();
|
||||
|
||||
it('[C279970] Should display Islocked field for folders', async () => {
|
||||
const folderNameA = `MEESEEKS_${StringUtil.generateRandomString(5)}_LOOK_AT_ME`;
|
||||
const folderNameB = `MEESEEKS_${StringUtil.generateRandomString(5)}_LOOK_AT_ME`;
|
||||
await apiService.loginWithProfile('admin');
|
||||
acsUser = await usersActions.createUser();
|
||||
await apiService.login(acsUser.email, acsUser.password);
|
||||
uploadedFolder = await uploadActions.createFolder(folderNameA, '-my-');
|
||||
uploadedFolderExtra = await uploadActions.createFolder(folderNameB, '-my-');
|
||||
await loginPage.login(acsUser.email, acsUser.password);
|
||||
await contentServicesPage.goToDocumentList();
|
||||
await contentServicesPage.checkContentIsDisplayed(folderNameA);
|
||||
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({
|
||||
name: browser.params.resources.Files.ADF_DOCUMENTS.TEST.file_name,
|
||||
location: browser.params.resources.Files.ADF_DOCUMENTS.TEST.file_path
|
||||
await loginPage.login(acsUser.username, acsUser.password);
|
||||
await contentServicesPage.goToDocumentList();
|
||||
await contentServicesPage.createNewFolder(folderName);
|
||||
await contentServicesPage.openFolder(folderName);
|
||||
await contentServicesPage.checkEmptyFolderTextToBe('This folder is empty');
|
||||
await contentServicesPage.checkEmptyFolderImageUrlToContain('/assets/images/empty_doc_lib.svg');
|
||||
});
|
||||
const testFileB = new FileModel({
|
||||
name: browser.params.resources.Files.ADF_DOCUMENTS.PDF_B.file_name,
|
||||
location: browser.params.resources.Files.ADF_DOCUMENTS.PDF_B.file_path
|
||||
|
||||
it('[C272775] Should be able to upload a file in new folder', async () => {
|
||||
const testFile = new FileModel({
|
||||
name: browser.params.resources.Files.ADF_DOCUMENTS.TEST.file_name,
|
||||
location: browser.params.resources.Files.ADF_DOCUMENTS.TEST.file_location
|
||||
});
|
||||
/* cspell:disable-next-line */
|
||||
const folderName = `MEESEEKS_${StringUtil.generateRandomString(5)}_LOOK_AT_ME`;
|
||||
await apiService.loginWithProfile('admin');
|
||||
acsUser = await usersActions.createUser();
|
||||
await apiService.login(acsUser.username, acsUser.password);
|
||||
uploadedFolder = await uploadActions.createFolder(folderName, '-my-');
|
||||
|
||||
await loginPage.login(acsUser.username, acsUser.password);
|
||||
await contentServicesPage.goToDocumentList();
|
||||
await contentServicesPage.checkContentIsDisplayed(uploadedFolder.entry.name);
|
||||
await contentServicesPage.openFolder(uploadedFolder.entry.name);
|
||||
await contentServicesPage.uploadFile(testFile.location);
|
||||
await contentServicesPage.checkContentIsDisplayed(testFile.name);
|
||||
});
|
||||
|
||||
it('[C261997] Should be able to clean Recent Files history', async () => {
|
||||
await apiService.loginWithProfile('admin');
|
||||
const cleanUser = await usersActions.createUser();
|
||||
|
||||
await loginPage.login(cleanUser.username, cleanUser.password);
|
||||
await contentServicesPage.clickOnContentServices();
|
||||
await contentServicesPage.checkRecentFileToBeShowed();
|
||||
const icon = await contentServicesPage.getRecentFileIcon();
|
||||
await expect(icon).toBe('history');
|
||||
await contentServicesPage.expandRecentFiles();
|
||||
await contentServicesPage.checkEmptyRecentFileIsDisplayed();
|
||||
await contentServicesPage.closeRecentFiles();
|
||||
});
|
||||
|
||||
it('[C279970] Should display Islocked field for folders', async () => {
|
||||
const folderNameA = `MEESEEKS_${StringUtil.generateRandomString(5)}_LOOK_AT_ME`;
|
||||
const folderNameB = `MEESEEKS_${StringUtil.generateRandomString(5)}_LOOK_AT_ME`;
|
||||
await apiService.loginWithProfile('admin');
|
||||
acsUser = await usersActions.createUser();
|
||||
await apiService.login(acsUser.username, acsUser.password);
|
||||
uploadedFolder = await uploadActions.createFolder(folderNameA, '-my-');
|
||||
uploadedFolderExtra = await uploadActions.createFolder(folderNameB, '-my-');
|
||||
|
||||
await loginPage.login(acsUser.username, acsUser.password);
|
||||
await contentServicesPage.goToDocumentList();
|
||||
await contentServicesPage.checkContentIsDisplayed(folderNameA);
|
||||
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({
|
||||
name: browser.params.resources.Files.ADF_DOCUMENTS.TEST.file_name,
|
||||
location: browser.params.resources.Files.ADF_DOCUMENTS.TEST.file_path
|
||||
});
|
||||
const testFileB = new FileModel({
|
||||
name: browser.params.resources.Files.ADF_DOCUMENTS.PDF_B.file_name,
|
||||
location: browser.params.resources.Files.ADF_DOCUMENTS.PDF_B.file_path
|
||||
});
|
||||
await apiService.loginWithProfile('admin');
|
||||
acsUser = await usersActions.createUser();
|
||||
await apiService.login(acsUser.username, acsUser.password);
|
||||
testFileNode = await uploadActions.uploadFile(testFileA.location, testFileA.name, '-my-');
|
||||
pdfBFileNode = await uploadActions.uploadFile(testFileB.location, testFileB.name, '-my-');
|
||||
|
||||
await loginPage.login(acsUser.username, acsUser.password);
|
||||
await contentServicesPage.goToDocumentList();
|
||||
await contentServicesPage.checkContentIsDisplayed(testFileA.name);
|
||||
await contentServicesPage.checkContentIsDisplayed(testFileB.name);
|
||||
await contentServicesPage.checkLockIsDisplayedForElement(testFileA.name);
|
||||
await contentServicesPage.checkLockIsDisplayedForElement(testFileB.name);
|
||||
});
|
||||
await apiService.loginWithProfile('admin');
|
||||
acsUser = await usersActions.createUser();
|
||||
await apiService.login(acsUser.email, acsUser.password);
|
||||
testFileNode = await uploadActions.uploadFile(testFileA.location, testFileA.name, '-my-');
|
||||
pdfBFileNode = await uploadActions.uploadFile(testFileB.location, testFileB.name, '-my-');
|
||||
await loginPage.login(acsUser.email, acsUser.password);
|
||||
await contentServicesPage.goToDocumentList();
|
||||
await contentServicesPage.checkContentIsDisplayed(testFileA.name);
|
||||
await contentServicesPage.checkContentIsDisplayed(testFileB.name);
|
||||
await contentServicesPage.checkLockIsDisplayedForElement(testFileA.name);
|
||||
await contentServicesPage.checkLockIsDisplayedForElement(testFileB.name);
|
||||
});
|
||||
|
||||
describe('Once uploaded 20 folders', () => {
|
||||
@@ -304,7 +326,7 @@ describe('Document List Component', () => {
|
||||
folderCreated = [];
|
||||
await apiService.loginWithProfile('admin');
|
||||
acsUser = await usersActions.createUser();
|
||||
await apiService.login(acsUser.email, acsUser.password);
|
||||
await apiService.login(acsUser.username, acsUser.password);
|
||||
let folderName = '';
|
||||
let folder = null;
|
||||
|
||||
@@ -319,10 +341,12 @@ describe('Document List Component', () => {
|
||||
for (let i = 0; i < folderCreated.length; i++) {
|
||||
await uploadActions.deleteFileOrFolder(folderCreated[i].entry.id);
|
||||
}
|
||||
await navigationBarPage.clickLogoutButton();
|
||||
});
|
||||
|
||||
it('[C277093] Should sort files with Items per page set to default', async () => {
|
||||
await loginPage.login(acsUser.email, acsUser.password);
|
||||
await navigationBarPage.clickLogoutButton();
|
||||
await loginPage.login(acsUser.username, acsUser.password);
|
||||
await contentServicesPage.goToDocumentList();
|
||||
await contentServicesPage.checkListIsSortedByNameColumn('asc');
|
||||
});
|
||||
@@ -340,10 +364,10 @@ describe('Document List Component', () => {
|
||||
beforeAll(async () => {
|
||||
await apiService.loginWithProfile('admin');
|
||||
acsUser = await usersActions.createUser();
|
||||
await apiService.login(acsUser.email, acsUser.password);
|
||||
await apiService.login(acsUser.username, acsUser.password);
|
||||
file = await uploadActions.uploadFile(file0BytesModel.location, file0BytesModel.name, '-my-');
|
||||
|
||||
await loginPage.login(acsUser.email, acsUser.password);
|
||||
await loginPage.login(acsUser.username, acsUser.password);
|
||||
await contentServicesPage.goToDocumentList();
|
||||
});
|
||||
|
||||
|
||||
@@ -71,10 +71,10 @@ describe('Document List Component', () => {
|
||||
visibility: 'PUBLIC'
|
||||
});
|
||||
await apiService.getInstance().core.sitesApi.addSiteMember(site.entry.id, {
|
||||
id: anotherAcsUser.email,
|
||||
id: anotherAcsUser.username,
|
||||
role: CONSTANTS.CS_USER_ROLES.COLLABORATOR
|
||||
});
|
||||
await apiService.login(acsUser.email, acsUser.password);
|
||||
await apiService.login(acsUser.username, acsUser.password);
|
||||
uploadedFolder = await uploadActions.createFolder(folderName, '-my-');
|
||||
destinationFolder = await uploadActions.createFolder(StringUtil.generateRandomString(5), '-my-');
|
||||
sourceFolder = await uploadActions.createFolder(StringUtil.generateRandomString(5), '-my-');
|
||||
@@ -90,7 +90,7 @@ describe('Document List Component', () => {
|
||||
{
|
||||
permissions: {
|
||||
locallySet: [{
|
||||
authorityId: anotherAcsUser.email,
|
||||
authorityId: anotherAcsUser.username,
|
||||
name: 'Consumer',
|
||||
accessStatus: 'ALLOWED'
|
||||
}]
|
||||
@@ -101,8 +101,6 @@ describe('Document List Component', () => {
|
||||
});
|
||||
|
||||
afterAll(async () => {
|
||||
await navigationBarPage.clickLogoutButton();
|
||||
|
||||
await apiService.loginWithProfile('admin');
|
||||
await uploadActions.deleteFileOrFolder(uploadedFolder.entry.id);
|
||||
await uploadActions.deleteFileOrFolder(uploadedFile.entry.id);
|
||||
@@ -112,8 +110,9 @@ describe('Document List Component', () => {
|
||||
});
|
||||
|
||||
describe('Document List Component - Actions Move and Copy', () => {
|
||||
|
||||
beforeAll(async () => {
|
||||
await loginPage.login(acsUser.email, acsUser.password);
|
||||
await loginPage.login(acsUser.username, acsUser.password);
|
||||
});
|
||||
|
||||
beforeEach(async () => {
|
||||
@@ -122,6 +121,10 @@ describe('Document List Component', () => {
|
||||
await contentServicesPage.contentList.dataTablePage().waitTillContentLoaded();
|
||||
});
|
||||
|
||||
afterAll(async () => {
|
||||
await navigationBarPage.clickLogoutButton();
|
||||
});
|
||||
|
||||
it('[C260128] Move - Same name file', async () => {
|
||||
await contentServicesPage.checkContentIsDisplayed(pdfFileModel.name);
|
||||
await contentServicesPage.getDocumentList().rightClickOnRow(pdfFileModel.name);
|
||||
@@ -206,13 +209,18 @@ describe('Document List Component', () => {
|
||||
});
|
||||
});
|
||||
|
||||
describe('Document List actionns - Move, Copy on no permission folder', () => {
|
||||
describe('Document List actions - Move, Copy on no permission folder', () => {
|
||||
|
||||
beforeAll(async () => {
|
||||
await loginPage.login(anotherAcsUser.email, anotherAcsUser.password);
|
||||
await loginPage.login(anotherAcsUser.username, anotherAcsUser.password);
|
||||
await BrowserActions.getUrl(`${browser.baseUrl}/files/${sourceFolder.entry.id}`);
|
||||
await contentServicesPage.getDocumentList().dataTablePage().waitTillContentLoaded();
|
||||
});
|
||||
|
||||
afterAll(async () => {
|
||||
await navigationBarPage.clickLogoutButton();
|
||||
});
|
||||
|
||||
it('[C260133] Move - no permission folder', async () => {
|
||||
await contentServicesPage.checkContentIsDisplayed(subFolder.entry.name);
|
||||
await contentServicesPage.getDocumentList().rightClickOnRow(subFolder.entry.name);
|
||||
@@ -269,7 +277,8 @@ describe('Document List Component', () => {
|
||||
await contentServicesPage.checkContentIsDisplayed(pdfFileModel.name);
|
||||
await contentServicesPage.checkDeleteIsDisabled(pdfFileModel.name);
|
||||
|
||||
await loginPage.login(acsUser.email, acsUser.password);
|
||||
await navigationBarPage.clickLogoutButton();
|
||||
await loginPage.login(acsUser.username, acsUser.password);
|
||||
await BrowserActions.getUrl(`${browser.baseUrl}/files/${sourceFolder.entry.id}`);
|
||||
await contentServicesPage.getDocumentList().dataTablePage().waitTillContentLoaded();
|
||||
|
||||
|
||||
@@ -31,6 +31,7 @@ import {
|
||||
import { ContentServicesPage } from '../../core/pages/content-services.page';
|
||||
import { InfinitePaginationPage } from '../../core/pages/infinite-pagination.page';
|
||||
import { FolderModel } from '../../models/ACS/folder.model';
|
||||
import { NavigationBarPage } from '../../core/pages/navigation-bar.page';
|
||||
|
||||
describe('Document List Component - Actions', () => {
|
||||
|
||||
@@ -41,6 +42,8 @@ describe('Document List Component - Actions', () => {
|
||||
const paginationPage = new PaginationPage();
|
||||
const breadCrumbDropdownPage = new BreadcrumbDropdownPage();
|
||||
const breadCrumbPage = new BreadcrumbPage();
|
||||
const navigationBarPage = new NavigationBarPage();
|
||||
|
||||
const apiService = new ApiService();
|
||||
const usersActions = new UsersActions(apiService);
|
||||
|
||||
@@ -63,7 +66,7 @@ describe('Document List Component - Actions', () => {
|
||||
beforeAll(async () => {
|
||||
await apiService.loginWithProfile('admin');
|
||||
await usersActions.createUser(contentServicesUser);
|
||||
await apiService.login(contentServicesUser.email, contentServicesUser.password);
|
||||
await apiService.login(contentServicesUser.username, contentServicesUser.password);
|
||||
folder1 = await uploadActions.createFolder('A' + folderModel1.name, '-my-');
|
||||
folder2 = await uploadActions.createFolder('B' + folderModel2.name, '-my-');
|
||||
folder3 = await uploadActions.createFolder('C' + folderModel3.name, '-my-');
|
||||
@@ -74,13 +77,17 @@ describe('Document List Component - Actions', () => {
|
||||
});
|
||||
|
||||
beforeEach(async () => {
|
||||
await loginPage.login(contentServicesUser.email, contentServicesUser.password);
|
||||
await loginPage.login(contentServicesUser.username, contentServicesUser.password);
|
||||
await contentServicesPage.goToDocumentList();
|
||||
await paginationPage.selectItemsPerPage('5');
|
||||
await contentServicesPage.checkAcsContainer();
|
||||
await contentListPage.waitForTableBody();
|
||||
});
|
||||
|
||||
afterEach(async () => {
|
||||
await navigationBarPage.clickLogoutButton();
|
||||
});
|
||||
|
||||
afterAll(async () => {
|
||||
await apiService.loginWithProfile('admin');
|
||||
for (const folder of folders) {
|
||||
@@ -134,11 +141,11 @@ describe('Document List Component - Actions', () => {
|
||||
await contentNodeSelector.checkDialogIsDisplayed();
|
||||
await breadCrumbDropdownPage.clickParentFolder();
|
||||
await breadCrumbDropdownPage.checkBreadCrumbDropdownIsDisplayed();
|
||||
await breadCrumbDropdownPage.choosePath(contentServicesUser.email);
|
||||
await breadCrumbDropdownPage.choosePath(contentServicesUser.username);
|
||||
await contentNodeSelector.clickMoveCopyButton();
|
||||
await contentServicesPage.checkContentIsNotDisplayed('A' + folderModel1.name);
|
||||
|
||||
await breadCrumbPage.chooseBreadCrumb(contentServicesUser.email);
|
||||
await breadCrumbPage.chooseBreadCrumb(contentServicesUser.username);
|
||||
await contentServicesPage.waitForTableBody();
|
||||
await contentServicesPage.checkContentIsDisplayed('A' + folderModel1.name);
|
||||
});
|
||||
@@ -177,7 +184,7 @@ describe('Document List Component - Actions', () => {
|
||||
await contentNodeSelector.clickMoveCopyButton();
|
||||
await contentServicesPage.checkContentIsDisplayed('A' + folderModel1.name);
|
||||
await paginationPage.clickOnNextPage();
|
||||
await contentServicesPage.getDocumentList().waitForTableBody();
|
||||
await contentServicesPage.getDocumentList().dataTable.waitTillContentLoaded();
|
||||
await contentServicesPage.openFolder('F' + folderModel6.name);
|
||||
await contentServicesPage.checkContentIsDisplayed('A' + folderModel1.name);
|
||||
});
|
||||
|
||||
@@ -61,14 +61,14 @@ describe('Document List Component', () => {
|
||||
beforeAll(async () => {
|
||||
await apiService.loginWithProfile('admin');
|
||||
acsUser = await usersActions.createUser();
|
||||
await apiService.login(acsUser.email, acsUser.password);
|
||||
await apiService.login(acsUser.username, acsUser.password);
|
||||
filePdfNode = await uploadActions.uploadFile(pdfFile.location, pdfFile.name, '-my-');
|
||||
fileTestNode = await uploadActions.uploadFile(testFile.location, testFile.name, '-my-');
|
||||
fileDocxNode = await uploadActions.uploadFile(docxFile.location, docxFile.name, '-my-');
|
||||
folderNode = await uploadActions.createFolder(folderName, '-my-');
|
||||
filePDFSubNode = await uploadActions.uploadFile(pdfFile.location, pdfFile.name, folderNode.entry.id);
|
||||
|
||||
await loginPage.login(acsUser.email, acsUser.password);
|
||||
await loginPage.login(acsUser.username, acsUser.password);
|
||||
});
|
||||
|
||||
afterAll(async () => {
|
||||
|
||||
@@ -77,7 +77,7 @@ describe('Document List - Pagination', () => {
|
||||
|
||||
await apiService.loginWithProfile('admin');
|
||||
acsUser = await usersActions.createUser();
|
||||
await apiService.login(acsUser.email, acsUser.password);
|
||||
await apiService.login(acsUser.username, acsUser.password);
|
||||
|
||||
const folderThreeUploadedModel = await uploadActions.createFolder(folderThreeModel.name, '-my-');
|
||||
const newFolderUploadedModel = await uploadActions.createFolder(newFolderModel.name, '-my-');
|
||||
@@ -85,7 +85,7 @@ describe('Document List - Pagination', () => {
|
||||
await uploadActions.createEmptyFiles(fileNames, newFolderUploadedModel.entry.id);
|
||||
await uploadActions.createEmptyFiles(secondSetOfFiles, folderThreeUploadedModel.entry.id);
|
||||
|
||||
await loginPage.login(acsUser.email, acsUser.password);
|
||||
await loginPage.login(acsUser.username, acsUser.password);
|
||||
});
|
||||
|
||||
afterAll(async () => {
|
||||
@@ -121,13 +121,13 @@ describe('Document List - Pagination', () => {
|
||||
await paginationPage.checkPreviousPageButtonIsDisabled();
|
||||
|
||||
await navigationBarPage.clickLogoutButton();
|
||||
await loginPage.login(acsUser.email, acsUser.password);
|
||||
await loginPage.login(acsUser.username, acsUser.password);
|
||||
|
||||
await contentServicesPage.goToDocumentList();
|
||||
await expect(await paginationPage.getCurrentItemsPerPage()).toEqual('20');
|
||||
|
||||
await navigationBarPage.clickLogoutButton();
|
||||
await loginPage.login(acsUser.email, acsUser.password);
|
||||
await loginPage.login(acsUser.username, acsUser.password);
|
||||
});
|
||||
|
||||
it('[C260069] Should be able to set Items per page to 5', async () => {
|
||||
@@ -175,7 +175,7 @@ describe('Document List - Pagination', () => {
|
||||
await contentServicesPage.contentList.dataTablePage().waitTillContentLoaded();
|
||||
await expect(await paginationPage.getCurrentItemsPerPage()).toEqual('5');
|
||||
await navigationBarPage.clickLogoutButton();
|
||||
await loginPage.login(acsUser.email, acsUser.password);
|
||||
await loginPage.login(acsUser.username, acsUser.password);
|
||||
});
|
||||
|
||||
it('[C260067] Should be able to set Items per page to 10', async () => {
|
||||
@@ -203,7 +203,7 @@ describe('Document List - Pagination', () => {
|
||||
|
||||
await expect(await paginationPage.getCurrentItemsPerPage()).toEqual('10');
|
||||
await navigationBarPage.clickLogoutButton();
|
||||
await loginPage.login(acsUser.email, acsUser.password);
|
||||
await loginPage.login(acsUser.username, acsUser.password);
|
||||
currentPage = 1;
|
||||
});
|
||||
|
||||
@@ -374,7 +374,7 @@ describe('Document List - Pagination', () => {
|
||||
await expect(await contentServicesPage.getActiveBreadcrumb()).toEqual(newFolderModel.name);
|
||||
await expect(await paginationPage.getCurrentItemsPerPage()).toEqual('5');
|
||||
|
||||
await apiService.login(acsUser.email, acsUser.password);
|
||||
await apiService.login(acsUser.username, acsUser.password);
|
||||
await contentServicesPage.createNewFolder(folderTwoModel.name);
|
||||
const nodeIdSubFolderTwo = await contentServicesPage.getAttributeValueForElement(folderTwoModel.name, 'Node id');
|
||||
await contentServicesPage.openFolder(folderTwoModel.name);
|
||||
@@ -415,7 +415,7 @@ describe('Document List - Pagination', () => {
|
||||
const nodeIdSubFolderTwo = await contentServicesPage.getAttributeValueForElement(folderTwoModel.name, 'Node id');
|
||||
await contentServicesPage.openFolder(folderTwoModel.name);
|
||||
|
||||
await apiService.login(acsUser.email, acsUser.password);
|
||||
await apiService.login(acsUser.username, acsUser.password);
|
||||
for (let i = 0; i < numberOfSubFolders; i++) {
|
||||
await uploadActions.createFolder('subfolder' + (i + 1), nodeIdSubFolderTwo);
|
||||
}
|
||||
|
||||
@@ -43,7 +43,7 @@ describe('Document List Component', () => {
|
||||
|
||||
privateSite = await apiService.getInstance().core.sitesApi.createSite(privateSiteBody);
|
||||
|
||||
await loginPage.login(acsUser.email, acsUser.password);
|
||||
await loginPage.login(acsUser.username, acsUser.password);
|
||||
});
|
||||
|
||||
afterAll(async () => {
|
||||
|
||||
@@ -43,12 +43,12 @@ describe('Document List Component - Properties', () => {
|
||||
await apiService.loginWithProfile('admin');
|
||||
|
||||
acsUser = await usersActions.createUser();
|
||||
await apiService.login(acsUser.email, acsUser.password);
|
||||
await apiService.login(acsUser.username, acsUser.password);
|
||||
|
||||
parentFolder = await uploadActions.createFolder('parentFolder', '-my-');
|
||||
subFolder = await uploadActions.createFolder('subFolder', parentFolder.entry.id);
|
||||
|
||||
await loginPage.login(acsUser.email, acsUser.password);
|
||||
await loginPage.login(acsUser.username, acsUser.password);
|
||||
});
|
||||
|
||||
afterEach(async () => {
|
||||
|
||||
@@ -43,9 +43,9 @@ describe('Document List - Selection', () => {
|
||||
try {
|
||||
await apiService.loginWithProfile('admin');
|
||||
acsUser = await usersActions.createUser();
|
||||
await apiService.login(acsUser.email, acsUser.password);
|
||||
await apiService.login(acsUser.username, acsUser.password);
|
||||
|
||||
await loginPage.login(acsUser.email, acsUser.password);
|
||||
await loginPage.login(acsUser.username, acsUser.password);
|
||||
|
||||
await contentServicesPage.goToDocumentList();
|
||||
await contentServicesPage.createNewFolder(folderModel.name);
|
||||
|
||||
@@ -77,7 +77,7 @@ describe('Document List Component', () => {
|
||||
|
||||
acsUser = await usersActions.createUser();
|
||||
|
||||
await apiService.login(acsUser.email, acsUser.password);
|
||||
await apiService.login(acsUser.username, acsUser.password);
|
||||
filePdfNode = await uploadActions.uploadFile(pdfFile.location, pdfFile.name, '-my-');
|
||||
fileTestNode = await uploadActions.uploadFile(testFile.location, testFile.name, '-my-');
|
||||
fileDocxNode = await uploadActions.uploadFile(docxFile.location, docxFile.name, '-my-');
|
||||
@@ -100,13 +100,17 @@ describe('Document List Component', () => {
|
||||
if (folderNode) {
|
||||
await uploadActions.deleteFileOrFolder(folderNode.entry.id);
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
beforeEach(async () => {
|
||||
await loginPage.login(acsUser.email, acsUser.password);
|
||||
await loginPage.login(acsUser.username, acsUser.password);
|
||||
await contentServicesPage.goToDocumentList();
|
||||
});
|
||||
|
||||
afterEach(async () => {
|
||||
await navigationBarPage.clickLogoutButton();
|
||||
});
|
||||
|
||||
it('[C260108] Should display tooltip for file\'s name', async () => {
|
||||
await expect(await contentServicesPage.getDocumentList().getTooltip(pdfFile.name)).toEqual(pdfFile.name);
|
||||
});
|
||||
|
||||
@@ -54,7 +54,7 @@ describe('Lock File', () => {
|
||||
await usersActions.createUser(adminUser);
|
||||
await usersActions.createUser(managerUser);
|
||||
|
||||
await apiService.login(adminUser.email, adminUser.password);
|
||||
await apiService.login(adminUser.username, adminUser.password);
|
||||
|
||||
site = await apiService.getInstance().core.sitesApi.createSite({
|
||||
title: StringUtil.generateRandomString(),
|
||||
@@ -66,7 +66,7 @@ describe('Lock File', () => {
|
||||
documentLibrary = resultNode.list.entries[0].entry.id;
|
||||
|
||||
await apiService.getInstance().core.sitesApi.addSiteMember(site.entry.id, {
|
||||
id: managerUser.email,
|
||||
id: managerUser.username,
|
||||
role: CONSTANTS.CS_USER_ROLES.MANAGER
|
||||
});
|
||||
});
|
||||
@@ -83,38 +83,25 @@ describe('Lock File', () => {
|
||||
});
|
||||
|
||||
beforeEach(async () => {
|
||||
try {
|
||||
const pngUploadedFile = await uploadActions.uploadFile(pngFileModel.location, pngFileModel.name, documentLibrary);
|
||||
nodeId = pngUploadedFile.entry.id;
|
||||
await loginPage.login(adminUser.email, adminUser.password);
|
||||
await navigationBarPage.openContentServicesFolder(documentLibrary);
|
||||
const pngUploadedFile = await uploadActions.uploadFile(pngFileModel.location, pngFileModel.name, documentLibrary);
|
||||
nodeId = pngUploadedFile.entry.id;
|
||||
await loginPage.login(adminUser.username, adminUser.password);
|
||||
await navigationBarPage.openContentServicesFolder(documentLibrary);
|
||||
|
||||
await contentServices.waitForTableBody();
|
||||
} catch (error) {
|
||||
}
|
||||
});
|
||||
await contentServices.waitForTableBody();
|
||||
});
|
||||
|
||||
afterEach(async () => {
|
||||
try {
|
||||
await apiService.login(adminUser.email, adminUser.password);
|
||||
|
||||
await uploadActions.deleteFileOrFolder(nodeId);
|
||||
|
||||
} catch (error) {
|
||||
}
|
||||
});
|
||||
await apiService.login(adminUser.username, adminUser.password);
|
||||
await uploadActions.deleteFileOrFolder(nodeId);
|
||||
await navigationBarPage.clickLogoutButton();
|
||||
});
|
||||
|
||||
afterAll(async () => {
|
||||
try {
|
||||
await apiService.login(adminUser.email, adminUser.password);
|
||||
|
||||
await apiService.getInstance().core.nodesApi.unlockNode(lockedFileNodeId);
|
||||
|
||||
await uploadActions.deleteFileOrFolder(lockedFileNodeId);
|
||||
|
||||
} catch (error) {
|
||||
}
|
||||
});
|
||||
await apiService.login(adminUser.username, adminUser.password);
|
||||
await apiService.getInstance().core.nodesApi.unlockNode(lockedFileNodeId);
|
||||
await uploadActions.deleteFileOrFolder(lockedFileNodeId);
|
||||
});
|
||||
|
||||
it('[C286604] Should be able to open Lock file option by clicking the lock image', async () => {
|
||||
await contentServices.lockContent(pngFileModel.name);
|
||||
@@ -158,28 +145,31 @@ describe('Lock File', () => {
|
||||
|
||||
await contentServices.checkUnlockedIcon(pngFileModel.name);
|
||||
});
|
||||
});
|
||||
});
|
||||
|
||||
describe('Locked file without owner permissions', () => {
|
||||
|
||||
beforeEach(async () => {
|
||||
await apiService.login(adminUser.username, adminUser.password);
|
||||
const pngUploadedFile = await uploadActions.uploadFile(pngFileModel.location, pngFileModel.name, documentLibrary);
|
||||
|
||||
nodeId = pngUploadedFile.entry.id;
|
||||
|
||||
await loginPage.login(managerUser.email, managerUser.password);
|
||||
await loginPage.login(managerUser.username, managerUser.password);
|
||||
|
||||
await navigationBarPage.openContentServicesFolder(documentLibrary);
|
||||
});
|
||||
|
||||
afterEach(async () => {
|
||||
await apiService.login(adminUser.email, adminUser.password);
|
||||
await apiService.login(adminUser.username, adminUser.password);
|
||||
|
||||
try {
|
||||
await apiService.getInstance().core.nodesApi.unlockNode(nodeId);
|
||||
await uploadActions.deleteFileOrFolder(nodeId);
|
||||
} catch (error) {
|
||||
}
|
||||
});
|
||||
await navigationBarPage.clickLogoutButton();
|
||||
});
|
||||
|
||||
it('[C286610] Should not be able to delete a locked file', async () => {
|
||||
await contentServices.lockContent(pngFileModel.name);
|
||||
@@ -193,7 +183,7 @@ describe('Lock File', () => {
|
||||
} catch (error) {
|
||||
await expect(error.status).toEqual(409);
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
it('[C286611] Should not be able to rename a locked file', async () => {
|
||||
await contentServices.lockContent(pngFileModel.name);
|
||||
@@ -208,7 +198,7 @@ describe('Lock File', () => {
|
||||
} catch (error) {
|
||||
await expect(error.status).toEqual(409);
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
it('[C286612] Should not be able to move a locked file', async () => {
|
||||
await contentServices.lockContent(pngFileModel.name);
|
||||
@@ -239,37 +229,28 @@ describe('Lock File', () => {
|
||||
await expect(error.status).toEqual(409);
|
||||
}
|
||||
});
|
||||
});
|
||||
});
|
||||
|
||||
describe('Locked file with owner permissions', () => {
|
||||
let pngFileToBeLocked;
|
||||
|
||||
beforeAll(async () => {
|
||||
try {
|
||||
pngFileToBeLocked = await uploadActions.uploadFile(pngFileToLock.location, pngFileToLock.name, documentLibrary);
|
||||
lockedFileNodeId = pngFileToBeLocked.entry.id;
|
||||
} catch (error) {
|
||||
}
|
||||
});
|
||||
pngFileToBeLocked = await uploadActions.uploadFile(pngFileToLock.location, pngFileToLock.name, documentLibrary);
|
||||
lockedFileNodeId = pngFileToBeLocked.entry.id;
|
||||
});
|
||||
|
||||
beforeEach(async () => {
|
||||
try {
|
||||
const pngUploadedFile = await uploadActions.uploadFile(pngFileModel.location, pngFileModel.name, documentLibrary);
|
||||
nodeId = pngUploadedFile.entry.id;
|
||||
await loginPage.login(adminUser.email, adminUser.password);
|
||||
await navigationBarPage.openContentServicesFolder(documentLibrary);
|
||||
} catch (error) {
|
||||
}
|
||||
});
|
||||
const pngUploadedFile = await uploadActions.uploadFile(pngFileModel.location, pngFileModel.name, documentLibrary);
|
||||
nodeId = pngUploadedFile.entry.id;
|
||||
await loginPage.login(adminUser.username, adminUser.password);
|
||||
await navigationBarPage.openContentServicesFolder(documentLibrary);
|
||||
});
|
||||
|
||||
afterEach(async () => {
|
||||
await apiService.login(adminUser.email, adminUser.password);
|
||||
|
||||
try {
|
||||
await uploadActions.deleteFileOrFolder(nodeId);
|
||||
} catch (error) {
|
||||
}
|
||||
});
|
||||
await apiService.login(adminUser.username, adminUser.password);
|
||||
await uploadActions.deleteFileOrFolder(nodeId);
|
||||
await navigationBarPage.clickLogoutButton();
|
||||
});
|
||||
|
||||
it('[C286614] Owner of the locked file should be able to rename if Allow owner to modify is checked', async () => {
|
||||
await contentServices.lockContent(pngFileModel.name);
|
||||
@@ -284,7 +265,7 @@ describe('Lock File', () => {
|
||||
await expect(response.entry.name).toEqual('My new name');
|
||||
} catch (error) {
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
it('[C286615] Owner of the locked file should be able to update a new version if Allow owner to modify is checked', async () => {
|
||||
await contentServices.lockContent(pngFileModel.name);
|
||||
@@ -299,7 +280,7 @@ describe('Lock File', () => {
|
||||
await expect(response.entry.modifiedAt.getTime()).toBeGreaterThan(response.entry.createdAt.getTime());
|
||||
} catch (error) {
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
it('[C286616] Owner of the locked file should be able to move if Allow owner to modify is checked', async () => {
|
||||
await contentServices.lockContent(pngFileModel.name);
|
||||
@@ -317,7 +298,7 @@ describe('Lock File', () => {
|
||||
await expect(movedFile.entry.parentId).not.toEqual(documentLibrary);
|
||||
} catch (error) {
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
it('[C286617] Owner of the locked file should be able to delete if Allow owner to modify is checked', async () => {
|
||||
await contentServices.lockContent(pngFileToLock.name);
|
||||
@@ -330,5 +311,5 @@ describe('Lock File', () => {
|
||||
await contentServices.deleteContent(pngFileToBeLocked.entry.name);
|
||||
await contentServices.checkContentIsNotDisplayed(pngFileToBeLocked.entry.name);
|
||||
});
|
||||
});
|
||||
});
|
||||
});
|
||||
|
||||
@@ -68,11 +68,11 @@ describe('Aspect oriented config', () => {
|
||||
|
||||
acsUser = await usersActions.createUser();
|
||||
|
||||
await apiService.login(acsUser.email, acsUser.password);
|
||||
await apiService.login(acsUser.username, acsUser.password);
|
||||
|
||||
const uploadedFile = await uploadActions.uploadFile(pngFileModel.location, pngFileModel.name, '-my-');
|
||||
|
||||
await loginPage.login(acsUser.email, acsUser.password);
|
||||
await loginPage.login(acsUser.username, acsUser.password);
|
||||
|
||||
const aspects = await apiService.getInstance().core.nodesApi.getNode(uploadedFile.entry.id);
|
||||
|
||||
|
||||
@@ -77,17 +77,17 @@ describe('permissions', () => {
|
||||
});
|
||||
|
||||
await apiService.getInstance().core.sitesApi.addSiteMember(site.entry.id, {
|
||||
id: consumerUser.email,
|
||||
id: consumerUser.username,
|
||||
role: CONSTANTS.CS_USER_ROLES.CONSUMER
|
||||
});
|
||||
|
||||
await apiService.getInstance().core.sitesApi.addSiteMember(site.entry.id, {
|
||||
id: collaboratorUser.email,
|
||||
id: collaboratorUser.username,
|
||||
role: CONSTANTS.CS_USER_ROLES.COLLABORATOR
|
||||
});
|
||||
|
||||
await apiService.getInstance().core.sitesApi.addSiteMember(site.entry.id, {
|
||||
id: contributorUser.email,
|
||||
id: contributorUser.username,
|
||||
role: CONSTANTS.CS_USER_ROLES.CONTRIBUTOR
|
||||
});
|
||||
|
||||
@@ -95,12 +95,15 @@ describe('permissions', () => {
|
||||
});
|
||||
|
||||
afterAll(async () => {
|
||||
await navigationBarPage.clickLogoutButton();
|
||||
await apiService.getInstance().core.sitesApi.deleteSite(site.entry.id, { permanent: true });
|
||||
});
|
||||
|
||||
afterEach(async () => {
|
||||
await navigationBarPage.clickLogoutButton();
|
||||
});
|
||||
|
||||
it('[C274692] Should not be possible edit metadata properties when the user is a consumer user', async () => {
|
||||
await loginPage.login(consumerUser.email, consumerUser.password);
|
||||
await loginPage.login(consumerUser.username, consumerUser.password);
|
||||
|
||||
await navigationBarPage.openContentServicesFolder(site.entry.guid);
|
||||
|
||||
@@ -112,7 +115,7 @@ describe('permissions', () => {
|
||||
});
|
||||
|
||||
it('[C279971] Should be possible edit metadata properties when the user is a collaborator user', async () => {
|
||||
await loginPage.login(collaboratorUser.email, collaboratorUser.password);
|
||||
await loginPage.login(collaboratorUser.username, collaboratorUser.password);
|
||||
|
||||
await navigationBarPage.openContentServicesFolder(site.entry.guid);
|
||||
|
||||
@@ -132,7 +135,7 @@ describe('permissions', () => {
|
||||
});
|
||||
|
||||
it('[C279972] Should be possible edit metadata properties when the user is a contributor user', async () => {
|
||||
await loginPage.login(collaboratorUser.email, collaboratorUser.password);
|
||||
await loginPage.login(collaboratorUser.username, collaboratorUser.password);
|
||||
|
||||
await navigationBarPage.openContentServicesFolder(site.entry.guid);
|
||||
|
||||
|
||||
@@ -64,7 +64,7 @@ describe('CardView Component - properties', () => {
|
||||
beforeAll(async () => {
|
||||
await apiService.loginWithProfile('admin');
|
||||
acsUser = await usersActions.createUser();
|
||||
await apiService.login(acsUser.email, acsUser.password);
|
||||
await apiService.login(acsUser.username, acsUser.password);
|
||||
|
||||
const pdfUploadedFile = await uploadActions.uploadFile(pngFileModel.location, pngFileModel.name, '-my-');
|
||||
|
||||
@@ -72,7 +72,7 @@ describe('CardView Component - properties', () => {
|
||||
|
||||
pngFileModel.update(pdfUploadedFile.entry);
|
||||
|
||||
await loginPage.login(acsUser.email, acsUser.password);
|
||||
await loginPage.login(acsUser.username, acsUser.password);
|
||||
|
||||
await navigationBarPage.navigateToContentServices();
|
||||
await contentServicesPage.waitForTableBody();
|
||||
|
||||
@@ -70,19 +70,15 @@ describe('Metadata component', () => {
|
||||
beforeAll(async () => {
|
||||
await apiService.loginWithProfile('admin');
|
||||
acsUser = await usersActions.createUser();
|
||||
await apiService.login(acsUser.email, acsUser.password);
|
||||
await apiService.login(acsUser.username, acsUser.password);
|
||||
const pngUploadedFile = await uploadActions.uploadFile(pngFileModel.location, pngFileModel.name, '-my-');
|
||||
Object.assign(pngFileModel, pngUploadedFile.entry);
|
||||
pngFileModel.update(pngUploadedFile.entry);
|
||||
});
|
||||
|
||||
afterAll(async () => {
|
||||
await navigationBarPage.clickLogoutButton();
|
||||
});
|
||||
|
||||
describe('Viewer Metadata', () => {
|
||||
beforeAll(async () => {
|
||||
await loginPage.login(acsUser.email, acsUser.password);
|
||||
await loginPage.login(acsUser.username, acsUser.password);
|
||||
await navigationBarPage.navigateToContentServices();
|
||||
await contentServicesPage.waitForTableBody();
|
||||
await LocalStorageUtil.setConfigField('content-metadata', JSON.stringify({
|
||||
@@ -94,6 +90,10 @@ describe('Metadata component', () => {
|
||||
}));
|
||||
});
|
||||
|
||||
afterAll(async () => {
|
||||
await navigationBarPage.clickLogoutButton();
|
||||
});
|
||||
|
||||
beforeEach(async () => {
|
||||
await viewerPage.viewFile(pngFileModel.name);
|
||||
await viewerPage.checkFileIsLoaded();
|
||||
@@ -226,19 +226,24 @@ describe('Metadata component', () => {
|
||||
});
|
||||
|
||||
describe('Folder metadata', () => {
|
||||
|
||||
beforeAll(async () => {
|
||||
await uploadActions.createFolder(folderName, '-my-');
|
||||
|
||||
await loginPage.login(acsUser.email, acsUser.password);
|
||||
await loginPage.login(acsUser.username, acsUser.password);
|
||||
await navigationBarPage.navigateToContentServices();
|
||||
await contentServicesPage.waitForTableBody();
|
||||
});
|
||||
|
||||
afterAll(async () => {
|
||||
await navigationBarPage.clickLogoutButton();
|
||||
});
|
||||
|
||||
it('[C261157] Should be possible use the metadata component When the node is a Folder', async () => {
|
||||
await contentServicesPage.metadataContent(folderName);
|
||||
|
||||
await expect(await metadataViewPage.getPropertyText('name')).toEqual(folderName);
|
||||
await expect(await metadataViewPage.getPropertyText('createdByUser.displayName')).toEqual(acsUser.firstName + ' ' + acsUser.lastName);
|
||||
await expect(await metadataViewPage.getPropertyText('createdByUser.displayName')).toEqual(`${acsUser.firstName} ${acsUser.lastName}`);
|
||||
await BrowserActions.closeMenuAndDialogs();
|
||||
});
|
||||
|
||||
@@ -279,7 +284,8 @@ describe('Metadata component', () => {
|
||||
await metadataViewPage.clickSaveMetadata();
|
||||
await expect(await metadataViewPage.getPropertyText('properties.cm:description')).toEqual('check author example description');
|
||||
|
||||
await loginPage.login(acsUser.email, acsUser.password);
|
||||
await navigationBarPage.clickLogoutButton();
|
||||
await loginPage.login(acsUser.username, acsUser.password);
|
||||
await navigationBarPage.navigateToContentServices();
|
||||
|
||||
await viewerPage.viewFile(pngFileModel.name);
|
||||
|
||||
@@ -81,7 +81,7 @@ describe('Permissions Component', () => {
|
||||
const fileOwnerUser = new UserModel();
|
||||
const filePermissionUser = new UserModel();
|
||||
|
||||
const duplicateUserPermissionMessage = 'One or more of the permissions you have set is already present : authority -> ' + filePermissionUser.email + ' / role -> Contributor';
|
||||
const duplicateUserPermissionMessage = 'One or more of the permissions you have set is already present : authority -> ' + filePermissionUser.username + ' / role -> Contributor';
|
||||
const roleConsumerFolderModel = new FolderModel({ name: 'roleConsumer' + StringUtil.generateRandomString() });
|
||||
const roleCoordinatorFolderModel = new FolderModel({ name: 'roleCoordinator' + StringUtil.generateRandomString() });
|
||||
const roleCollaboratorFolderModel = new FolderModel({ name: 'roleCollaborator' + StringUtil.generateRandomString() });
|
||||
@@ -99,7 +99,7 @@ describe('Permissions Component', () => {
|
||||
// to sync user in acs
|
||||
await searchService.isUserSearchable(filePermissionUser);
|
||||
|
||||
await apiService.login(fileOwnerUser.email, fileOwnerUser.password);
|
||||
await apiService.login(fileOwnerUser.username, fileOwnerUser.password);
|
||||
roleConsumerFolder = await uploadActions.createFolder(roleConsumerFolderModel.name, '-my-');
|
||||
roleCoordinatorFolder = await uploadActions.createFolder(roleCoordinatorFolderModel.name, '-my-');
|
||||
roleContributorFolder = await uploadActions.createFolder(roleContributorFolderModel.name, '-my-');
|
||||
@@ -112,11 +112,11 @@ describe('Permissions Component', () => {
|
||||
await uploadActions.uploadFile(fileModel.location, 'RoleCollaborator' + fileModel.name, roleCollaboratorFolder.entry.id);
|
||||
await uploadActions.uploadFile(fileModel.location, 'RoleEditor' + fileModel.name, roleEditorFolder.entry.id);
|
||||
|
||||
await permissionActions.addRoleForUser(filePermissionUser.email, 'Consumer', roleConsumerFolder);
|
||||
await permissionActions.addRoleForUser(filePermissionUser.email, 'Collaborator', roleCollaboratorFolder);
|
||||
await permissionActions.addRoleForUser(filePermissionUser.email, 'Coordinator', roleCoordinatorFolder);
|
||||
await permissionActions.addRoleForUser(filePermissionUser.email, 'Contributor', roleContributorFolder);
|
||||
await permissionActions.addRoleForUser(filePermissionUser.email, 'Editor', roleEditorFolder);
|
||||
await permissionActions.addRoleForUser(filePermissionUser.username, 'Consumer', roleConsumerFolder);
|
||||
await permissionActions.addRoleForUser(filePermissionUser.username, 'Collaborator', roleCollaboratorFolder);
|
||||
await permissionActions.addRoleForUser(filePermissionUser.username, 'Coordinator', roleCoordinatorFolder);
|
||||
await permissionActions.addRoleForUser(filePermissionUser.username, 'Contributor', roleContributorFolder);
|
||||
await permissionActions.addRoleForUser(filePermissionUser.username, 'Editor', roleEditorFolder);
|
||||
|
||||
await browser.sleep(browser.params.testConfig.timeouts.index_search); // wait search index previous file/folder uploaded
|
||||
});
|
||||
@@ -124,10 +124,10 @@ describe('Permissions Component', () => {
|
||||
describe('Inherit and assigning permissions', () => {
|
||||
|
||||
beforeEach(async () => {
|
||||
await apiService.login(fileOwnerUser.email, fileOwnerUser.password);
|
||||
await apiService.login(fileOwnerUser.username, fileOwnerUser.password);
|
||||
file = await uploadActions.uploadFile(fileModel.location, fileModel.name, '-my-');
|
||||
|
||||
await loginPage.login(fileOwnerUser.email, fileOwnerUser.password);
|
||||
await loginPage.login(fileOwnerUser.username, fileOwnerUser.password);
|
||||
|
||||
await contentServicesPage.goToDocumentList();
|
||||
await contentServicesPage.contentList.dataTablePage().waitTillContentLoaded();
|
||||
@@ -172,7 +172,7 @@ describe('Permissions Component', () => {
|
||||
await permissionsPage.addPermissionsDialog.clickAddPermissionButton();
|
||||
await permissionsPage.addPermissionsDialog.checkAddPermissionDialogIsDisplayed();
|
||||
await permissionsPage.addPermissionsDialog.checkSearchUserInputIsDisplayed();
|
||||
await permissionsPage.addPermissionsDialog.searchUserOrGroup(filePermissionUser.email);
|
||||
await permissionsPage.addPermissionsDialog.searchUserOrGroup(filePermissionUser.username);
|
||||
await permissionsPage.addPermissionsDialog.checkResultListIsDisplayed();
|
||||
await permissionsPage.addPermissionsDialog.checkUserOrGroupIsDisplayed('EVERYONE');
|
||||
await permissionsPage.addPermissionsDialog.searchUserOrGroup('somerandomtext');
|
||||
@@ -184,9 +184,9 @@ describe('Permissions Component', () => {
|
||||
describe('Changing and duplicate Permissions', () => {
|
||||
|
||||
beforeEach(async () => {
|
||||
await apiService.login(fileOwnerUser.email, fileOwnerUser.password);
|
||||
await apiService.login(fileOwnerUser.username, fileOwnerUser.password);
|
||||
file = await uploadActions.uploadFile(fileModel.location, fileModel.name, '-my-');
|
||||
await loginPage.login(fileOwnerUser.email, fileOwnerUser.password);
|
||||
await loginPage.login(fileOwnerUser.username, fileOwnerUser.password);
|
||||
await contentServicesPage.goToDocumentList();
|
||||
await contentServicesPage.checkContentIsDisplayed(fileModel.name);
|
||||
await contentServicesPage.checkSelectedSiteIsDisplayed('My files');
|
||||
@@ -198,7 +198,7 @@ describe('Permissions Component', () => {
|
||||
await permissionsPage.addPermissionsDialog.checkSearchUserInputIsDisplayed();
|
||||
await permissionsPage.addPermissionsDialog.searchUserOrGroup(filePermissionUser.firstName);
|
||||
await permissionsPage.addPermissionsDialog.clickUserOrGroup(filePermissionUser.firstName);
|
||||
await permissionsPage.addPermissionsDialog.checkUserIsAdded(filePermissionUser.email);
|
||||
await permissionsPage.addPermissionsDialog.checkUserIsAdded(filePermissionUser.username);
|
||||
});
|
||||
|
||||
afterEach(async () => {
|
||||
@@ -207,8 +207,8 @@ describe('Permissions Component', () => {
|
||||
});
|
||||
|
||||
it('[C274691] Should be able to add a new User with permission to the file and also change locally set permissions', async () => {
|
||||
await expect(await permissionsPage.addPermissionsDialog.getRoleCellValue(filePermissionUser.email)).toEqual('Contributor');
|
||||
await permissionsPage.addPermissionsDialog.clickRoleDropdownByUserOrGroupName(filePermissionUser.email);
|
||||
await expect(await permissionsPage.addPermissionsDialog.getRoleCellValue(filePermissionUser.username)).toEqual('Contributor');
|
||||
await permissionsPage.addPermissionsDialog.clickRoleDropdownByUserOrGroupName(filePermissionUser.username);
|
||||
const roleDropdownOptions = permissionsPage.addPermissionsDialog.getRoleDropdownOptions();
|
||||
await expect(await roleDropdownOptions.count()).toBe(5);
|
||||
|
||||
@@ -219,21 +219,21 @@ describe('Permissions Component', () => {
|
||||
await expect(await BrowserActions.getText(roleDropdownOptions.get(4))).toBe('Consumer');
|
||||
|
||||
await BrowserActions.closeMenuAndDialogs();
|
||||
await permissionsPage.changePermission(filePermissionUser.email, 'Collaborator');
|
||||
await expect(await permissionsPage.addPermissionsDialog.getRoleCellValue(filePermissionUser.email)).toEqual('Collaborator');
|
||||
await permissionsPage.changePermission(filePermissionUser.username, 'Collaborator');
|
||||
await expect(await permissionsPage.addPermissionsDialog.getRoleCellValue(filePermissionUser.username)).toEqual('Collaborator');
|
||||
|
||||
await permissionsPage.changePermission(filePermissionUser.email, 'Coordinator');
|
||||
await expect(await permissionsPage.addPermissionsDialog.getRoleCellValue(filePermissionUser.email)).toEqual('Coordinator');
|
||||
await permissionsPage.changePermission(filePermissionUser.username, 'Coordinator');
|
||||
await expect(await permissionsPage.addPermissionsDialog.getRoleCellValue(filePermissionUser.username)).toEqual('Coordinator');
|
||||
|
||||
await permissionsPage.changePermission(filePermissionUser.email, 'Editor');
|
||||
await expect(await permissionsPage.addPermissionsDialog.getRoleCellValue(filePermissionUser.email)).toEqual('Editor');
|
||||
await permissionsPage.changePermission(filePermissionUser.username, 'Editor');
|
||||
await expect(await permissionsPage.addPermissionsDialog.getRoleCellValue(filePermissionUser.username)).toEqual('Editor');
|
||||
|
||||
await permissionsPage.changePermission(filePermissionUser.email, 'Consumer');
|
||||
await expect(await permissionsPage.addPermissionsDialog.getRoleCellValue(filePermissionUser.email)).toEqual('Consumer');
|
||||
await permissionsPage.changePermission(filePermissionUser.username, 'Consumer');
|
||||
await expect(await permissionsPage.addPermissionsDialog.getRoleCellValue(filePermissionUser.username)).toEqual('Consumer');
|
||||
});
|
||||
|
||||
it('[C276980] Should not be able to duplicate User or Group to the locally set permissions', async () => {
|
||||
await expect(await permissionsPage.addPermissionsDialog.getRoleCellValue(filePermissionUser.email)).toEqual('Contributor');
|
||||
await expect(await permissionsPage.addPermissionsDialog.getRoleCellValue(filePermissionUser.username)).toEqual('Contributor');
|
||||
await permissionsPage.addPermissionsDialog.clickAddPermissionButton();
|
||||
await permissionsPage.addPermissionsDialog.checkAddPermissionDialogIsDisplayed();
|
||||
await permissionsPage.addPermissionsDialog.checkSearchUserInputIsDisplayed();
|
||||
@@ -245,9 +245,9 @@ describe('Permissions Component', () => {
|
||||
});
|
||||
|
||||
it('[C276982] Should be able to remove User or Group from the locally set permissions', async () => {
|
||||
await expect(await permissionsPage.addPermissionsDialog.getRoleCellValue(filePermissionUser.email)).toEqual('Contributor');
|
||||
await expect(await permissionsPage.addPermissionsDialog.getRoleCellValue(filePermissionUser.username)).toEqual('Contributor');
|
||||
await permissionsPage.addPermissionsDialog.clickDeletePermissionButton();
|
||||
await permissionsPage.addPermissionsDialog.checkUserIsDeleted(filePermissionUser.email);
|
||||
await permissionsPage.addPermissionsDialog.checkUserIsDeleted(filePermissionUser.username);
|
||||
});
|
||||
});
|
||||
|
||||
@@ -258,7 +258,7 @@ describe('Permissions Component', () => {
|
||||
});
|
||||
|
||||
it('[C276993] Role Consumer', async () => {
|
||||
await loginPage.login(filePermissionUser.email, filePermissionUser.password);
|
||||
await loginPage.login(filePermissionUser.username, filePermissionUser.password);
|
||||
await navigationBarPage.openContentServicesFolder(roleConsumerFolder.entry.id);
|
||||
await contentServicesPage.checkContentIsDisplayed('RoleConsumer' + fileModel.name);
|
||||
await contentList.doubleClickRow('RoleConsumer' + fileModel.name);
|
||||
@@ -278,7 +278,7 @@ describe('Permissions Component', () => {
|
||||
});
|
||||
|
||||
it('[C276996] Role Contributor', async () => {
|
||||
await loginPage.login(filePermissionUser.email, filePermissionUser.password);
|
||||
await loginPage.login(filePermissionUser.username, filePermissionUser.password);
|
||||
await navigationBarPage.openContentServicesFolder(roleContributorFolder.entry.id);
|
||||
await contentServicesPage.checkContentIsDisplayed('RoleContributor' + fileModel.name);
|
||||
await contentList.doubleClickRow('RoleContributor' + fileModel.name);
|
||||
@@ -298,7 +298,7 @@ describe('Permissions Component', () => {
|
||||
});
|
||||
|
||||
it('[C277000] Role Editor', async () => {
|
||||
await loginPage.login(filePermissionUser.email, filePermissionUser.password);
|
||||
await loginPage.login(filePermissionUser.username, filePermissionUser.password);
|
||||
await navigationBarPage.openContentServicesFolder(roleEditorFolder.entry.id);
|
||||
await contentServicesPage.checkContentIsDisplayed('RoleEditor' + fileModel.name);
|
||||
await contentList.doubleClickRow('RoleEditor' + fileModel.name);
|
||||
@@ -320,7 +320,7 @@ describe('Permissions Component', () => {
|
||||
});
|
||||
|
||||
it('[C277003] Role Collaborator', async () => {
|
||||
await loginPage.login(filePermissionUser.email, filePermissionUser.password);
|
||||
await loginPage.login(filePermissionUser.username, filePermissionUser.password);
|
||||
await navigationBarPage.openContentServicesFolder(roleCollaboratorFolder.entry.id);
|
||||
await contentServicesPage.checkContentIsDisplayed('RoleCollaborator' + fileModel.name);
|
||||
await contentList.doubleClickRow('RoleCollaborator' + fileModel.name);
|
||||
@@ -345,7 +345,7 @@ describe('Permissions Component', () => {
|
||||
});
|
||||
|
||||
it('[C277004] Role Coordinator', async () => {
|
||||
await loginPage.login(filePermissionUser.email, filePermissionUser.password);
|
||||
await loginPage.login(filePermissionUser.username, filePermissionUser.password);
|
||||
await navigationBarPage.openContentServicesFolder(roleCoordinatorFolder.entry.id);
|
||||
await contentServicesPage.checkContentIsDisplayed('RoleCoordinator' + fileModel.name);
|
||||
await contentList.doubleClickRow('RoleCoordinator' + fileModel.name);
|
||||
@@ -370,7 +370,7 @@ describe('Permissions Component', () => {
|
||||
});
|
||||
|
||||
it('[C279881] No Permission User', async () => {
|
||||
await loginPage.login(filePermissionUser.email, filePermissionUser.password);
|
||||
await loginPage.login(filePermissionUser.username, filePermissionUser.password);
|
||||
await navigationBarPage.openContentServicesFolder(roleConsumerFolder.entry.id);
|
||||
await contentServicesPage.checkContentIsDisplayed('RoleConsumer' + fileModel.name);
|
||||
await contentServicesPage.checkSelectedSiteIsDisplayed('My files');
|
||||
|
||||
@@ -93,7 +93,7 @@ describe('Permissions Component', () => {
|
||||
await usersActions.createUser(contributorUser);
|
||||
await usersActions.createUser(collaboratorUser);
|
||||
await usersActions.createUser(managerUser);
|
||||
await apiService.login(folderOwnerUser.email, folderOwnerUser.password);
|
||||
await apiService.login(folderOwnerUser.username, folderOwnerUser.password);
|
||||
|
||||
await browser.sleep(15000);
|
||||
|
||||
@@ -111,27 +111,27 @@ describe('Permissions Component', () => {
|
||||
privateSite = await apiService.getInstance().core.sitesApi.createSite(privateSiteBody);
|
||||
|
||||
await apiService.getInstance().core.sitesApi.addSiteMember(publicSite.entry.id, {
|
||||
id: siteConsumerUser.email,
|
||||
id: siteConsumerUser.username,
|
||||
role: CONSTANTS.CS_USER_ROLES.CONSUMER
|
||||
});
|
||||
|
||||
await apiService.getInstance().core.sitesApi.addSiteMember(publicSite.entry.id, {
|
||||
id: collaboratorUser.email,
|
||||
id: collaboratorUser.username,
|
||||
role: CONSTANTS.CS_USER_ROLES.COLLABORATOR
|
||||
});
|
||||
|
||||
await apiService.getInstance().core.sitesApi.addSiteMember(publicSite.entry.id, {
|
||||
id: contributorUser.email,
|
||||
id: contributorUser.username,
|
||||
role: CONSTANTS.CS_USER_ROLES.CONTRIBUTOR
|
||||
});
|
||||
|
||||
await apiService.getInstance().core.sitesApi.addSiteMember(publicSite.entry.id, {
|
||||
id: managerUser.email,
|
||||
id: managerUser.username,
|
||||
role: CONSTANTS.CS_USER_ROLES.MANAGER
|
||||
});
|
||||
|
||||
await apiService.getInstance().core.sitesApi.addSiteMember(privateSite.entry.id, {
|
||||
id: managerUser.email,
|
||||
id: managerUser.username,
|
||||
role: CONSTANTS.CS_USER_ROLES.MANAGER
|
||||
});
|
||||
|
||||
@@ -142,7 +142,7 @@ describe('Permissions Component', () => {
|
||||
{
|
||||
permissions: {
|
||||
locallySet: [{
|
||||
authorityId: managerUser.email,
|
||||
authorityId: managerUser.username,
|
||||
name: 'SiteConsumer',
|
||||
accessStatus: 'ALLOWED'
|
||||
}]
|
||||
@@ -153,20 +153,22 @@ describe('Permissions Component', () => {
|
||||
});
|
||||
|
||||
afterAll(async () => {
|
||||
await navigationBarPage.clickLogoutButton();
|
||||
|
||||
await apiService.loginWithProfile('admin');
|
||||
await apiService.getInstance().core.sitesApi.deleteSite(publicSite.entry.id, { permanent: true });
|
||||
await apiService.getInstance().core.sitesApi.deleteSite(privateSite.entry.id, { permanent: true });
|
||||
});
|
||||
|
||||
describe('Role Site Dropdown', () => {
|
||||
|
||||
beforeAll(async () => {
|
||||
await loginPage.login(folderOwnerUser.email, folderOwnerUser.password);
|
||||
await loginPage.login(folderOwnerUser.username, folderOwnerUser.password);
|
||||
|
||||
await BrowserActions.getUrl(browser.baseUrl + '/files/' + publicSite.entry.guid);
|
||||
await contentServicesPage.contentList.dataTablePage().waitTillContentLoaded();
|
||||
});
|
||||
|
||||
afterAll(async () => {
|
||||
await navigationBarPage.clickLogoutButton();
|
||||
});
|
||||
|
||||
it('[C277002] Should display the Role Site dropdown', async () => {
|
||||
@@ -185,14 +187,14 @@ describe('Permissions Component', () => {
|
||||
await permissionsPage.addPermissionsDialog.checkAddPermissionDialogIsDisplayed();
|
||||
await permissionsPage.addPermissionsDialog.checkSearchUserInputIsDisplayed();
|
||||
|
||||
await permissionsPage.addPermissionsDialog.searchUserOrGroup(consumerUser.email);
|
||||
await permissionsPage.addPermissionsDialog.searchUserOrGroup(consumerUser.username);
|
||||
|
||||
await permissionsPage.addPermissionsDialog.clickUserOrGroup(consumerUser.firstName);
|
||||
await permissionsPage.addPermissionsDialog.checkUserIsAdded(consumerUser.email);
|
||||
await permissionsPage.addPermissionsDialog.checkUserIsAdded(consumerUser.username);
|
||||
|
||||
await expect(await permissionsPage.addPermissionsDialog.getRoleCellValue(consumerUser.email)).toEqual('SiteCollaborator');
|
||||
await expect(await permissionsPage.addPermissionsDialog.getRoleCellValue(consumerUser.username)).toEqual('SiteCollaborator');
|
||||
|
||||
await permissionsPage.addPermissionsDialog.clickRoleDropdownByUserOrGroupName(consumerUser.email);
|
||||
await permissionsPage.addPermissionsDialog.clickRoleDropdownByUserOrGroupName(consumerUser.username);
|
||||
|
||||
const roleDropdownOptions = permissionsPage.addPermissionsDialog.getRoleDropdownOptions();
|
||||
|
||||
@@ -205,8 +207,13 @@ describe('Permissions Component', () => {
|
||||
});
|
||||
|
||||
describe('Roles: SiteConsumer, SiteCollaborator, SiteContributor, SiteManager', () => {
|
||||
|
||||
afterEach(async () => {
|
||||
await navigationBarPage.clickLogoutButton();
|
||||
});
|
||||
|
||||
it('[C276994] Role SiteConsumer', async () => {
|
||||
await loginPage.login(siteConsumerUser.email, siteConsumerUser.password);
|
||||
await loginPage.login(siteConsumerUser.username, siteConsumerUser.password);
|
||||
|
||||
await navigationBarPage.openContentServicesFolder(siteFolder.entry.id);
|
||||
await contentServicesPage.checkContentIsDisplayed('Site' + fileModel.name);
|
||||
@@ -234,7 +241,7 @@ describe('Permissions Component', () => {
|
||||
});
|
||||
|
||||
it('[C276997] Role SiteContributor', async () => {
|
||||
await loginPage.login(contributorUser.email, contributorUser.password);
|
||||
await loginPage.login(contributorUser.username, contributorUser.password);
|
||||
|
||||
await navigationBarPage.openContentServicesFolder(siteFolder.entry.id);
|
||||
await contentServicesPage.checkContentIsDisplayed('Site' + fileModel.name);
|
||||
@@ -265,7 +272,7 @@ describe('Permissions Component', () => {
|
||||
});
|
||||
|
||||
it('[C277005] Role SiteCollaborator', async () => {
|
||||
await loginPage.login(collaboratorUser.email, collaboratorUser.password);
|
||||
await loginPage.login(collaboratorUser.username, collaboratorUser.password);
|
||||
|
||||
await navigationBarPage.openContentServicesFolder(siteFolder.entry.id);
|
||||
await contentServicesPage.checkContentIsDisplayed('Site' + fileModel.name);
|
||||
@@ -304,7 +311,7 @@ describe('Permissions Component', () => {
|
||||
});
|
||||
|
||||
it('[C277006] Role SiteManager', async () => {
|
||||
await loginPage.login(managerUser.email, managerUser.password);
|
||||
await loginPage.login(managerUser.username, managerUser.password);
|
||||
|
||||
await navigationBarPage.openContentServicesFolder(siteFolder.entry.id);
|
||||
await contentServicesPage.checkContentIsDisplayed('Site' + fileModel.name);
|
||||
@@ -342,8 +349,13 @@ describe('Permissions Component', () => {
|
||||
});
|
||||
|
||||
describe('Roles: Private site and Manager User', () => {
|
||||
|
||||
afterEach(async () => {
|
||||
await navigationBarPage.clickLogoutButton();
|
||||
});
|
||||
|
||||
it('[C277196] should a user with Manager permissions be able to upload a new version for the created file', async () => {
|
||||
await loginPage.login(managerUser.email, managerUser.password);
|
||||
await loginPage.login(managerUser.username, managerUser.password);
|
||||
|
||||
await navigationBarPage.openContentServicesFolder(privateSite.entry.guid);
|
||||
|
||||
|
||||
@@ -66,7 +66,7 @@ describe('Share file', () => {
|
||||
};
|
||||
|
||||
const apiCall = async () => {
|
||||
await apiService.login(acsUser.email, acsUser.password);
|
||||
await apiService.login(acsUser.username, acsUser.password);
|
||||
return apiService.getInstance().core.sharedlinksApi.findSharedLinks();
|
||||
};
|
||||
|
||||
@@ -76,7 +76,7 @@ describe('Share file', () => {
|
||||
beforeAll(async () => {
|
||||
await apiService.loginWithProfile('admin');
|
||||
acsUser = await usersActions.createUser();
|
||||
await apiService.login(acsUser.email, acsUser.password);
|
||||
await apiService.login(acsUser.username, acsUser.password);
|
||||
|
||||
const pngUploadedFile = await uploadActions.uploadFile(pngFileModel.location, pngFileModel.name, '-my-');
|
||||
|
||||
@@ -90,12 +90,16 @@ describe('Share file', () => {
|
||||
|
||||
describe('Shared link dialog', () => {
|
||||
beforeAll(async () => {
|
||||
await loginPage.login(acsUser.email, acsUser.password);
|
||||
await loginPage.login(acsUser.username, acsUser.password);
|
||||
await navigationBarPage.navigateToContentServices();
|
||||
await contentListPage.selectRow(pngFileModel.name);
|
||||
await BrowserActions.closeMenuAndDialogs();
|
||||
});
|
||||
|
||||
afterAll(async () => {
|
||||
await navigationBarPage.clickLogoutButton();
|
||||
});
|
||||
|
||||
it('[C286549] Should check automatically toggle button in Share dialog', async () => {
|
||||
await contentServicesPage.clickShareButton();
|
||||
await shareDialog.checkDialogIsDisplayed();
|
||||
@@ -164,11 +168,15 @@ describe('Share file', () => {
|
||||
describe('Shared link preview', () => {
|
||||
|
||||
beforeEach(async () => {
|
||||
await loginPage.login(acsUser.email, acsUser.password);
|
||||
await loginPage.login(acsUser.username, acsUser.password);
|
||||
await navigationBarPage.navigateToContentServices();
|
||||
await contentServicesPage.waitForTableBody();
|
||||
});
|
||||
|
||||
afterEach(async () => {
|
||||
await navigationBarPage.clickLogoutButton();
|
||||
});
|
||||
|
||||
it('[C286565] Should open file when logged user access shared link', async () => {
|
||||
await contentListPage.selectRow(pngFileModel.name);
|
||||
await contentServicesPage.clickShareButton();
|
||||
|
||||
@@ -68,11 +68,6 @@ describe('Unshare file', () => {
|
||||
id: siteName
|
||||
};
|
||||
|
||||
const memberBody = {
|
||||
id: acsUser.email,
|
||||
role: CONSTANTS.CS_USER_ROLES.CONSUMER
|
||||
};
|
||||
|
||||
nodeBody = {
|
||||
name: StringUtil.generateRandomString(5),
|
||||
nodeType: 'cm:content',
|
||||
@@ -85,26 +80,29 @@ describe('Unshare file', () => {
|
||||
|
||||
const docLibId = (await apiService.getInstance().core.sitesApi.getSiteContainers(siteName)).list.entries[0].entry.id;
|
||||
const testFile1Id = (await apiService.getInstance().core.nodesApi.addNode(docLibId, nodeBody)).entry.id;
|
||||
await apiService.getInstance().core.sitesApi.addSiteMember(siteName, memberBody);
|
||||
await apiService.getInstance().core.sitesApi.addSiteMember(siteName, {
|
||||
id: acsUser.username,
|
||||
role: CONSTANTS.CS_USER_ROLES.CONSUMER
|
||||
});
|
||||
|
||||
await apiService.getInstance().core.nodesApi.updateNode(testFile1Id, {
|
||||
permissions: {
|
||||
isInheritanceEnabled: false,
|
||||
locallySet: [
|
||||
{
|
||||
authorityId: acsUser.email,
|
||||
authorityId: acsUser.username,
|
||||
name: CONSTANTS.CS_USER_ROLES.CONSUMER
|
||||
}
|
||||
]
|
||||
}
|
||||
});
|
||||
await apiService.getInstance().core.sharedlinksApi.addSharedLink({ nodeId: testFile1Id });
|
||||
await apiService.login(acsUser.email, acsUser.password);
|
||||
await apiService.login(acsUser.username, acsUser.password);
|
||||
|
||||
const pngUploadedFile = await uploadActions.uploadFile(pngFileModel.location, pngFileModel.name, '-my-');
|
||||
nodeId = pngUploadedFile.entry.id;
|
||||
|
||||
await loginPage.login(acsUser.email, acsUser.password);
|
||||
await loginPage.login(acsUser.username, acsUser.password);
|
||||
await navBar.navigateToContentServices();
|
||||
await contentServicesPage.waitForTableBody();
|
||||
});
|
||||
@@ -114,10 +112,6 @@ describe('Unshare file', () => {
|
||||
await apiService.getInstance().core.sitesApi.deleteSite(testSite.entry.id, { permanent: true });
|
||||
});
|
||||
|
||||
afterEach(async () => {
|
||||
await browser.refresh();
|
||||
});
|
||||
|
||||
describe('with permission', () => {
|
||||
afterAll(async () => {
|
||||
await apiService.loginWithProfile('admin');
|
||||
@@ -128,6 +122,7 @@ describe('Unshare file', () => {
|
||||
await contentListPage.selectRow(pngFileModel.name);
|
||||
await contentServicesPage.clickShareButton();
|
||||
await shareDialog.checkDialogIsDisplayed();
|
||||
await browser.sleep(2000);
|
||||
await shareDialog.clickUnShareFile();
|
||||
await shareDialog.confirmationDialogIsDisplayed();
|
||||
});
|
||||
@@ -156,17 +151,20 @@ describe('Unshare file', () => {
|
||||
await contentListPage.selectRow(pngFileModel.name);
|
||||
await contentServicesPage.clickShareButton();
|
||||
await shareDialog.checkDialogIsDisplayed();
|
||||
await browser.sleep(2000);
|
||||
|
||||
const sharedLink = await shareDialog.getShareLink();
|
||||
await shareDialog.clickUnShareFile();
|
||||
await shareDialog.confirmationDialogIsDisplayed();
|
||||
await shareDialog.clickConfirmationDialogRemoveButton();
|
||||
await shareDialog.dialogIsClosed();
|
||||
await BrowserActions.getUrl(sharedLink.replace(browser.params.testConfig.appConfig.ecmHost, browser.baseUrl));
|
||||
await BrowserActions.getUrl(sharedLink.replace(browser.params.testConfig.appConfig.ecmHost, `${browser.baseUrl}`));
|
||||
await errorPage.checkErrorCode();
|
||||
});
|
||||
});
|
||||
|
||||
describe('without permission', () => {
|
||||
|
||||
afterAll(async () => {
|
||||
await apiService.loginWithProfile('admin');
|
||||
await apiService.getInstance().core.sitesApi.deleteSite(siteName, { permanent: true });
|
||||
@@ -177,6 +175,7 @@ describe('Unshare file', () => {
|
||||
await contentServicesPage.openFolder('documentLibrary');
|
||||
await contentListPage.selectRow(nodeBody.name);
|
||||
await contentServicesPage.clickShareButton();
|
||||
|
||||
await shareDialog.checkDialogIsDisplayed();
|
||||
await shareDialog.shareToggleButtonIsChecked();
|
||||
await shareDialog.clickUnShareFile();
|
||||
@@ -184,6 +183,7 @@ describe('Unshare file', () => {
|
||||
await shareDialog.clickConfirmationDialogRemoveButton();
|
||||
await shareDialog.checkDialogIsDisplayed();
|
||||
await shareDialog.shareToggleButtonIsChecked();
|
||||
|
||||
await notificationHistoryPage.checkNotifyContains(`You don't have permission to unshare this file`);
|
||||
});
|
||||
});
|
||||
|
||||
@@ -63,7 +63,7 @@ describe('Social component', () => {
|
||||
await usersActions.createUser(componentVisitor);
|
||||
await usersActions.createUser(secondComponentVisitor);
|
||||
|
||||
await apiService.login(componentOwner.email, componentOwner.password);
|
||||
await apiService.login(componentOwner.username, componentOwner.password);
|
||||
|
||||
emptyFile = await uploadActions.uploadFile(emptyFileModel.location, emptyFileModel.name, '-my-');
|
||||
|
||||
@@ -72,11 +72,11 @@ describe('Social component', () => {
|
||||
{
|
||||
permissions: {
|
||||
locallySet: [{
|
||||
authorityId: componentVisitor.email,
|
||||
authorityId: componentVisitor.username,
|
||||
name: 'Consumer',
|
||||
accessStatus: 'ALLOWED'
|
||||
}, {
|
||||
authorityId: secondComponentVisitor.email,
|
||||
authorityId: secondComponentVisitor.username,
|
||||
name: 'Consumer',
|
||||
accessStatus: 'ALLOWED'
|
||||
}]
|
||||
@@ -85,52 +85,60 @@ describe('Social component', () => {
|
||||
});
|
||||
|
||||
afterAll(async () => {
|
||||
await navigationBarPage.clickLogoutButton();
|
||||
await apiService.loginWithProfile('admin');
|
||||
await uploadActions.deleteFileOrFolder(emptyFile.entry.email);
|
||||
});
|
||||
|
||||
describe('User interaction on their own components', () => {
|
||||
beforeEach(async () => {
|
||||
await loginPage.login(componentOwner.email, componentOwner.password);
|
||||
await loginPage.login(componentOwner.username, componentOwner.password);
|
||||
await navigationBarPage.clickSocialButton();
|
||||
});
|
||||
|
||||
afterEach(async () => {
|
||||
await navigationBarPage.clickLogoutButton();
|
||||
});
|
||||
|
||||
it('[C203006] Should be able to like and unlike their components but not rate them,', async () => {
|
||||
await socialPage.writeCustomNodeId(emptyFile.entry.id);
|
||||
await expect(await socialPage.getNodeIdFieldValue()).toEqual(emptyFile.entry.id);
|
||||
await likePage.clickLike();
|
||||
await expect(await likePage.getLikeCounter()).toBe('1');
|
||||
await likePage.checkLikeCounter(1);
|
||||
await likePage.removeHoverFromLikeButton();
|
||||
await expect(await likePage.getLikedIconColor()).toBe(blueLikeColor);
|
||||
await ratePage.rateComponent(4);
|
||||
await expect(await ratePage.getRatingCounter()).toBe('0');
|
||||
await ratePage.checkRatingCounter(0);
|
||||
await expect(await ratePage.isNotStarRated(4));
|
||||
await expect(await ratePage.getUnratedStarColor(4)).toBe(averageStarColor);
|
||||
await likePage.clickUnlike();
|
||||
await expect(await likePage.getLikeCounter()).toBe('0');
|
||||
await likePage.checkLikeCounter(0);
|
||||
await likePage.removeHoverFromLikeButton();
|
||||
await expect(await likePage.getUnLikedIconColor()).toBe(greyLikeColor);
|
||||
});
|
||||
});
|
||||
|
||||
describe('User interaction on components that belong to other users', () => {
|
||||
|
||||
beforeEach(async () => {
|
||||
await loginPage.login(componentVisitor.email, componentVisitor.password);
|
||||
await loginPage.login(componentVisitor.username, componentVisitor.password);
|
||||
await navigationBarPage.clickSocialButton();
|
||||
});
|
||||
|
||||
afterEach(async () => {
|
||||
await navigationBarPage.clickLogoutButton();
|
||||
});
|
||||
|
||||
it('[C260324] Should be able to like and unlike a component', async () => {
|
||||
await socialPage.writeCustomNodeId(emptyFile.entry.id);
|
||||
await expect(await socialPage.getNodeIdFieldValue()).toEqual(emptyFile.entry.id);
|
||||
await expect(await likePage.getLikeCounter()).toEqual('0');
|
||||
await likePage.checkLikeCounter(0);
|
||||
await expect(await likePage.getUnLikedIconColor()).toBe(greyLikeColor);
|
||||
await likePage.clickLike();
|
||||
await expect(await likePage.getLikeCounter()).toBe('1');
|
||||
await likePage.checkLikeCounter(1);
|
||||
await likePage.removeHoverFromLikeButton();
|
||||
await expect(await likePage.getLikedIconColor()).toBe(blueLikeColor);
|
||||
await likePage.clickUnlike();
|
||||
await expect(await likePage.getLikeCounter()).toBe('0');
|
||||
await likePage.checkLikeCounter(0);
|
||||
await likePage.removeHoverFromLikeButton();
|
||||
await expect(await likePage.getUnLikedIconColor()).toBe(greyLikeColor);
|
||||
});
|
||||
@@ -138,42 +146,49 @@ describe('Social component', () => {
|
||||
it('[C310198] Should be able to rate and unRate a component', async () => {
|
||||
await socialPage.writeCustomNodeId(emptyFile.entry.id);
|
||||
await expect(await socialPage.getNodeIdFieldValue()).toEqual(emptyFile.entry.id);
|
||||
await expect(await ratePage.getRatingCounter()).toBe('0');
|
||||
|
||||
await ratePage.checkRatingCounter(0);
|
||||
await ratePage.rateComponent(4);
|
||||
await expect(await ratePage.getRatingCounter()).toBe('1');
|
||||
await ratePage.checkRatingCounter(1);
|
||||
await expect(await ratePage.isStarRated(4));
|
||||
await expect(await ratePage.getRatedStarColor(4)).toBe(yellowRatedStarColor);
|
||||
await ratePage.removeRating(4);
|
||||
await expect(await ratePage.getRatingCounter()).toBe('0');
|
||||
await ratePage.checkRatingCounter(0);
|
||||
await expect(await ratePage.isNotStarRated(4));
|
||||
});
|
||||
});
|
||||
|
||||
describe('Multiple Users interaction', () => {
|
||||
|
||||
beforeEach(async () => {
|
||||
await loginPage.login(componentVisitor.email, componentVisitor.password);
|
||||
await loginPage.login(componentVisitor.username, componentVisitor.password);
|
||||
await navigationBarPage.clickSocialButton();
|
||||
});
|
||||
|
||||
afterEach(async () => {
|
||||
await navigationBarPage.clickLogoutButton();
|
||||
});
|
||||
|
||||
it('[C310197] Should be able to like, unLike, display total likes', async () => {
|
||||
await socialPage.writeCustomNodeId(emptyFile.entry.id);
|
||||
await expect(await socialPage.getNodeIdFieldValue()).toEqual(emptyFile.entry.id);
|
||||
await expect(await likePage.getUnLikedIconColor()).toBe(greyLikeColor);
|
||||
await likePage.clickLike();
|
||||
await expect(await likePage.getLikeCounter()).toBe('1');
|
||||
await likePage.checkLikeCounter(1);
|
||||
await likePage.removeHoverFromLikeButton();
|
||||
await expect(await likePage.getLikedIconColor()).toBe(blueLikeColor);
|
||||
|
||||
await loginPage.login(secondComponentVisitor.email, secondComponentVisitor.password);
|
||||
await navigationBarPage.clickLogoutButton();
|
||||
await loginPage.login(secondComponentVisitor.username, secondComponentVisitor.password);
|
||||
await navigationBarPage.clickSocialButton();
|
||||
await socialPage.writeCustomNodeId(emptyFile.entry.id);
|
||||
await expect(await likePage.getUnLikedIconColor()).toBe(greyLikeColor);
|
||||
await likePage.clickLike();
|
||||
await expect(await likePage.getLikeCounter()).toEqual('2');
|
||||
await likePage.checkLikeCounter(2);
|
||||
await likePage.removeHoverFromLikeButton();
|
||||
await expect(await likePage.getLikedIconColor()).toBe(blueLikeColor);
|
||||
await likePage.clickUnlike();
|
||||
await expect(await likePage.getLikeCounter()).toEqual('1');
|
||||
await likePage.checkLikeCounter(1);
|
||||
await likePage.removeHoverFromLikeButton();
|
||||
await expect(await likePage.getUnLikedIconColor()).toBe(greyLikeColor);
|
||||
});
|
||||
@@ -182,21 +197,22 @@ describe('Social component', () => {
|
||||
await socialPage.writeCustomNodeId(emptyFile.entry.id);
|
||||
await expect(await socialPage.getNodeIdFieldValue()).toEqual(emptyFile.entry.id);
|
||||
await ratePage.rateComponent(4);
|
||||
await expect(await ratePage.getRatingCounter()).toEqual('1');
|
||||
await ratePage.checkRatingCounter(1);
|
||||
await expect(await ratePage.isStarRated(4));
|
||||
await expect(await ratePage.getRatedStarColor(4)).toBe(yellowRatedStarColor);
|
||||
|
||||
await loginPage.login(secondComponentVisitor.email, secondComponentVisitor.password);
|
||||
await navigationBarPage.clickLogoutButton();
|
||||
await loginPage.login(secondComponentVisitor.username, secondComponentVisitor.password);
|
||||
await navigationBarPage.clickSocialButton();
|
||||
await socialPage.writeCustomNodeId(emptyFile.entry.id);
|
||||
await expect(await socialPage.getNodeIdFieldValue()).toEqual(emptyFile.entry.id);
|
||||
await expect(await ratePage.getRatingCounter()).toEqual('1');
|
||||
await ratePage.checkRatingCounter(1);
|
||||
await expect(await ratePage.getAverageStarColor(4)).toBe(averageStarColor);
|
||||
await ratePage.rateComponent(0);
|
||||
await expect(await ratePage.getRatingCounter()).toEqual('2');
|
||||
await ratePage.checkRatingCounter(2);
|
||||
await expect(await ratePage.isStarRated(2));
|
||||
await ratePage.removeRating(0);
|
||||
await expect(await ratePage.getRatingCounter()).toEqual('1');
|
||||
await ratePage.checkRatingCounter(1);
|
||||
await expect(await ratePage.getAverageStarColor(4)).toBe(averageStarColor);
|
||||
});
|
||||
});
|
||||
|
||||
@@ -64,7 +64,7 @@ describe('SSO in ADF using ACS and AIS, Download Directive, Viewer, DocumentList
|
||||
|
||||
acsUser = await usersActions.createUser();
|
||||
|
||||
await apiService.login(acsUser.email, acsUser.password);
|
||||
await apiService.login(acsUser.username, acsUser.password);
|
||||
|
||||
folder = await uploadActions.createFolder(folderName, '-my-');
|
||||
|
||||
@@ -75,7 +75,7 @@ describe('SSO in ADF using ACS and AIS, Download Directive, Viewer, DocumentList
|
||||
browser.params.testConfig.appConfig.oauth2.host,
|
||||
browser.params.testConfig.appConfig.identityHost, false, true, browser.params.testConfig.appConfig.oauth2.clientId);
|
||||
|
||||
await loginSsoPage.loginSSOIdentityService(acsUser.email, acsUser.password);
|
||||
await loginSsoPage.loginSSOIdentityService(acsUser.username, acsUser.password);
|
||||
|
||||
await navigationBarPage.navigateToContentServices();
|
||||
await contentServicesPage.checkAcsContainer();
|
||||
|
||||
@@ -54,7 +54,7 @@ describe('Tag component', () => {
|
||||
|
||||
acsUser = await usersActions.createUser();
|
||||
|
||||
await apiService.login(acsUser.email, acsUser.password);
|
||||
await apiService.login(acsUser.username, acsUser.password);
|
||||
|
||||
pdfUploadedFile = await uploadActions.uploadFile(pdfFileModel.location, pdfFileModel.name, '-my-');
|
||||
|
||||
@@ -68,7 +68,7 @@ describe('Tag component', () => {
|
||||
|
||||
await apiService.getInstance().core.tagsApi.addTag(nodeId, tags);
|
||||
|
||||
await loginPage.login(acsUser.email, acsUser.password);
|
||||
await loginPage.login(acsUser.username, acsUser.password);
|
||||
await navigationBarPage.clickTagButton();
|
||||
});
|
||||
|
||||
|
||||
@@ -64,7 +64,7 @@ describe('Trashcan - Pagination', () => {
|
||||
await apiService.loginWithProfile('admin');
|
||||
acsUser = await usersActions.createUser();
|
||||
|
||||
await apiService.login(acsUser.email, acsUser.password);
|
||||
await apiService.login(acsUser.username, acsUser.password);
|
||||
const folderUploadedModel = await uploadActions.createFolder(newFolderModel.name, '-my-');
|
||||
const emptyFiles: any = await uploadActions.createEmptyFiles(fileNames, folderUploadedModel.entry.id);
|
||||
|
||||
@@ -74,7 +74,7 @@ describe('Trashcan - Pagination', () => {
|
||||
});
|
||||
}
|
||||
|
||||
await loginPage.login(acsUser.email, acsUser.password);
|
||||
await loginPage.login(acsUser.username, acsUser.password);
|
||||
await navigationBarPage.clickTrashcanButton();
|
||||
await trashcanPage.getDocumentList().dataTablePage().waitTillContentLoaded();
|
||||
});
|
||||
|
||||
@@ -46,7 +46,7 @@ describe('Tree View Component', () => {
|
||||
|
||||
acsUser = await usersActions.createUser();
|
||||
|
||||
await apiService.login(acsUser.email, acsUser.password);
|
||||
await apiService.login(acsUser.username, acsUser.password);
|
||||
|
||||
treeFolder = await apiService.getInstance().nodes.addNode(nodeNames.parentFolder, {
|
||||
name: nodeNames.folder,
|
||||
@@ -65,7 +65,7 @@ describe('Tree View Component', () => {
|
||||
nodeType: 'cm:content'
|
||||
});
|
||||
|
||||
await loginPage.login(acsUser.email, acsUser.password);
|
||||
await loginPage.login(acsUser.username, acsUser.password);
|
||||
|
||||
await navigationBarPage.clickTreeViewButton();
|
||||
});
|
||||
|
||||
@@ -52,9 +52,9 @@ describe('Upload component', async () => {
|
||||
beforeAll(async () => {
|
||||
await apiService.loginWithProfile('admin');
|
||||
acsUser = await usersActions.createUser();
|
||||
await apiService.login(acsUser.email, acsUser.password);
|
||||
await apiService.login(acsUser.username, acsUser.password);
|
||||
|
||||
await loginPage.login(acsUser.email, acsUser.password);
|
||||
await loginPage.login(acsUser.username, acsUser.password);
|
||||
await contentServicesPage.goToDocumentList();
|
||||
});
|
||||
|
||||
|
||||
@@ -78,9 +78,9 @@ describe('Upload component - Excluded Files', () => {
|
||||
|
||||
acsUser = await usersActions.createUser();
|
||||
|
||||
await apiService.login(acsUser.email, acsUser.password);
|
||||
await apiService.login(acsUser.username, acsUser.password);
|
||||
|
||||
await loginPage.login(acsUser.email, acsUser.password);
|
||||
await loginPage.login(acsUser.username, acsUser.password);
|
||||
|
||||
await contentServicesPage.goToDocumentList();
|
||||
});
|
||||
|
||||
@@ -70,8 +70,8 @@ describe('Upload component', () => {
|
||||
beforeAll(async () => {
|
||||
await apiService.loginWithProfile('admin');
|
||||
acsUser = await usersActions.createUser();
|
||||
await apiService.login(acsUser.email, acsUser.password);
|
||||
await loginPage.login(acsUser.email, acsUser.password);
|
||||
await apiService.login(acsUser.username, acsUser.password);
|
||||
await loginPage.login(acsUser.username, acsUser.password);
|
||||
await contentServicesPage.goToDocumentList();
|
||||
});
|
||||
|
||||
|
||||
@@ -74,8 +74,8 @@ describe('Upload component', () => {
|
||||
beforeAll(async () => {
|
||||
await apiService.loginWithProfile('admin');
|
||||
acsUser = await usersActions.createUser();
|
||||
await apiService.login(acsUser.email, acsUser.password);
|
||||
await loginPage.login(acsUser.email, acsUser.password);
|
||||
await apiService.login(acsUser.username, acsUser.password);
|
||||
await loginPage.login(acsUser.username, acsUser.password);
|
||||
const pdfUploadedFile = await uploadActions.uploadFile(firstPdfFileModel.location, firstPdfFileModel.name, '-my-');
|
||||
Object.assign(firstPdfFileModel, pdfUploadedFile.entry);
|
||||
});
|
||||
|
||||
@@ -55,11 +55,10 @@ describe('Upload - User permission', () => {
|
||||
|
||||
acsUser = await usersActions.createUser(acsUser);
|
||||
acsUserTwo = await usersActions.createUser(acsUserTwo);
|
||||
await loginPage.login(acsUser.username, acsUser.password);
|
||||
});
|
||||
|
||||
beforeEach(async () => {
|
||||
await loginPage.login(acsUser.email, acsUser.password);
|
||||
|
||||
consumerSite = await apiService.getInstance().core.sitesApi.createSite({
|
||||
title: StringUtil.generateRandomString(),
|
||||
visibility: 'PUBLIC'
|
||||
@@ -71,12 +70,12 @@ describe('Upload - User permission', () => {
|
||||
});
|
||||
|
||||
await apiService.getInstance().core.sitesApi.addSiteMember(consumerSite.entry.id, {
|
||||
id: acsUser.email,
|
||||
id: acsUser.username,
|
||||
role: CONSTANTS.CS_USER_ROLES.CONSUMER
|
||||
});
|
||||
|
||||
await apiService.getInstance().core.sitesApi.addSiteMember(managerSite.entry.id, {
|
||||
id: acsUser.email,
|
||||
id: acsUser.username,
|
||||
role: CONSTANTS.CS_USER_ROLES.MANAGER
|
||||
});
|
||||
});
|
||||
@@ -150,8 +149,8 @@ describe('Upload - User permission', () => {
|
||||
|
||||
await contentServicesPage.checkContentIsDisplayed(emptyFile.name);
|
||||
|
||||
await navigationBarPage.clickLoginButton();
|
||||
await loginPage.login(acsUserTwo.email, acsUserTwo.password);
|
||||
await navigationBarPage.clickLogoutButton();
|
||||
await loginPage.login(acsUserTwo.username, acsUserTwo.password);
|
||||
await contentServicesPage.goToDocumentList();
|
||||
|
||||
await contentServicesPage.checkContentIsNotDisplayed(emptyFile.name);
|
||||
@@ -160,8 +159,8 @@ describe('Upload - User permission', () => {
|
||||
|
||||
await contentServicesPage.checkContentIsDisplayed(pngFile.name);
|
||||
|
||||
await navigationBarPage.clickLoginButton();
|
||||
await loginPage.login(acsUser.email, acsUser.password);
|
||||
await navigationBarPage.clickLogoutButton();
|
||||
await loginPage.login(acsUser.username, acsUser.password);
|
||||
await contentServicesPage.goToDocumentList();
|
||||
|
||||
await contentServicesPage.checkContentIsNotDisplayed(pngFile.name);
|
||||
|
||||
@@ -66,11 +66,11 @@ describe('Version component actions', () => {
|
||||
uploadActions = new UploadActions(apiService);
|
||||
await apiService.loginWithProfile('admin');
|
||||
acsUser = await usersActions.createUser();
|
||||
await apiService.login(acsUser.email, acsUser.password);
|
||||
await apiService.login(acsUser.username, acsUser.password);
|
||||
const txtUploadedFile = await uploadActions.uploadFile(txtFileModel.location, txtFileModel.name, '-my-');
|
||||
Object.assign(txtFileModel, txtUploadedFile.entry);
|
||||
txtFileModel.update(txtUploadedFile.entry);
|
||||
await loginPage.login(acsUser.email, acsUser.password);
|
||||
await loginPage.login(acsUser.username, acsUser.password);
|
||||
await navigationBarPage.navigateToContentServices();
|
||||
await contentServicesPage.waitForTableBody();
|
||||
});
|
||||
|
||||
@@ -85,27 +85,27 @@ describe('Version component permissions', () => {
|
||||
});
|
||||
|
||||
await apiService.getInstance().core.sitesApi.addSiteMember(site.entry.id, {
|
||||
id: consumerUser.email,
|
||||
id: consumerUser.username,
|
||||
role: CONSTANTS.CS_USER_ROLES.CONSUMER
|
||||
});
|
||||
|
||||
await apiService.getInstance().core.sitesApi.addSiteMember(site.entry.id, {
|
||||
id: collaboratorUser.email,
|
||||
id: collaboratorUser.username,
|
||||
role: CONSTANTS.CS_USER_ROLES.COLLABORATOR
|
||||
});
|
||||
|
||||
await apiService.getInstance().core.sitesApi.addSiteMember(site.entry.id, {
|
||||
id: contributorUser.email,
|
||||
id: contributorUser.username,
|
||||
role: CONSTANTS.CS_USER_ROLES.CONTRIBUTOR
|
||||
});
|
||||
|
||||
await apiService.getInstance().core.sitesApi.addSiteMember(site.entry.id, {
|
||||
id: managerUser.email,
|
||||
id: managerUser.username,
|
||||
role: CONSTANTS.CS_USER_ROLES.MANAGER
|
||||
});
|
||||
|
||||
await apiService.getInstance().core.sitesApi.addSiteMember(site.entry.id, {
|
||||
id: fileCreatorUser.email,
|
||||
id: fileCreatorUser.username,
|
||||
role: CONSTANTS.CS_USER_ROLES.MANAGER
|
||||
});
|
||||
|
||||
@@ -117,7 +117,7 @@ describe('Version component permissions', () => {
|
||||
lifetime: 'PERSISTENT'
|
||||
});
|
||||
|
||||
await apiService.login(fileCreatorUser.email, fileCreatorUser.password);
|
||||
await apiService.login(fileCreatorUser.username, fileCreatorUser.password);
|
||||
|
||||
await uploadActions.uploadFile(differentCreatorFile.location, differentCreatorFile.name, site.entry.guid);
|
||||
});
|
||||
@@ -134,12 +134,12 @@ describe('Version component permissions', () => {
|
||||
});
|
||||
|
||||
beforeAll(async () => {
|
||||
await apiService.login(managerUser.email, managerUser.password);
|
||||
await apiService.login(managerUser.username, managerUser.password);
|
||||
|
||||
const sameCreatorFileUploaded = await uploadActions.uploadFile(sameCreatorFile.location, sameCreatorFile.name, site.entry.guid);
|
||||
Object.assign(sameCreatorFile, sameCreatorFileUploaded.entry);
|
||||
|
||||
await loginPage.login(managerUser.email, managerUser.password);
|
||||
await loginPage.login(managerUser.username, managerUser.password);
|
||||
|
||||
await navigationBarPage.openContentServicesFolder(site.entry.guid);
|
||||
});
|
||||
@@ -178,7 +178,7 @@ describe('Version component permissions', () => {
|
||||
|
||||
describe('Consumer', () => {
|
||||
beforeAll(async () => {
|
||||
await loginPage.login(consumerUser.email, consumerUser.password);
|
||||
await loginPage.login(consumerUser.username, consumerUser.password);
|
||||
|
||||
await navigationBarPage.openContentServicesFolder(site.entry.guid);
|
||||
});
|
||||
@@ -206,12 +206,12 @@ describe('Version component permissions', () => {
|
||||
});
|
||||
|
||||
beforeAll(async () => {
|
||||
await apiService.login(contributorUser.email, contributorUser.password);
|
||||
await apiService.login(contributorUser.username, contributorUser.password);
|
||||
|
||||
const sameCreatorFileUploaded = await uploadActions.uploadFile(sameCreatorFile.location, sameCreatorFile.name, site.entry.guid);
|
||||
Object.assign(sameCreatorFile, sameCreatorFileUploaded.entry);
|
||||
|
||||
await loginPage.login(contributorUser.email, contributorUser.password);
|
||||
await loginPage.login(contributorUser.username, contributorUser.password);
|
||||
|
||||
await navigationBarPage.openContentServicesFolder(site.entry.guid);
|
||||
});
|
||||
@@ -261,12 +261,12 @@ describe('Version component permissions', () => {
|
||||
});
|
||||
|
||||
beforeAll(async () => {
|
||||
await apiService.login(collaboratorUser.email, collaboratorUser.password);
|
||||
await apiService.login(collaboratorUser.username, collaboratorUser.password);
|
||||
|
||||
const sameCreatorFileUploaded = await uploadActions.uploadFile(sameCreatorFile.location, sameCreatorFile.name, site.entry.guid);
|
||||
Object.assign(sameCreatorFile, sameCreatorFileUploaded.entry);
|
||||
|
||||
await loginPage.login(collaboratorUser.email, collaboratorUser.password);
|
||||
await loginPage.login(collaboratorUser.username, collaboratorUser.password);
|
||||
|
||||
await navigationBarPage.openContentServicesFolder(site.entry.guid);
|
||||
});
|
||||
|
||||
@@ -60,7 +60,7 @@ describe('Version Properties', () => {
|
||||
|
||||
acsUser = await usersActions.createUser();
|
||||
|
||||
await apiService.login(acsUser.email, acsUser.password);
|
||||
await apiService.login(acsUser.username, acsUser.password);
|
||||
|
||||
const txtUploadedFile = await uploadActions.uploadFile(txtFileModel.location, txtFileModel.name, '-my-');
|
||||
|
||||
@@ -68,7 +68,7 @@ describe('Version Properties', () => {
|
||||
|
||||
txtFileModel.update(txtUploadedFile.entry);
|
||||
|
||||
await loginPage.login(acsUser.email, acsUser.password);
|
||||
await loginPage.login(acsUser.username, acsUser.password);
|
||||
|
||||
await navigationBarPage.navigateToContentServices();
|
||||
await contentServicesPage.waitForTableBody();
|
||||
|
||||
@@ -75,14 +75,14 @@ describe('Version component', () => {
|
||||
|
||||
acsUser = await usersActions.createUser();
|
||||
|
||||
await apiService.login(acsUser.email, acsUser.password);
|
||||
await apiService.login(acsUser.username, acsUser.password);
|
||||
|
||||
txtUploadedFile = await uploadActions.uploadFile(txtFileModel.location, txtFileModel.name, '-my-');
|
||||
Object.assign(txtFileModel, txtUploadedFile.entry);
|
||||
|
||||
txtFileModel.update(txtUploadedFile.entry);
|
||||
|
||||
await loginPage.login(acsUser.email, acsUser.password);
|
||||
await loginPage.login(acsUser.username, acsUser.password);
|
||||
|
||||
await navigationBarPage.navigateToContentServices();
|
||||
await contentServicesPage.waitForTableBody();
|
||||
|
||||
Reference in New Issue
Block a user