mirror of
https://github.com/Alfresco/alfresco-ng2-components.git
synced 2025-07-24 17:32:15 +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:
@@ -21,7 +21,7 @@
|
||||
"silentLogin": true,
|
||||
"redirectSilentIframeUri": "{protocol}//{hostname}{:port}/assets/silent-refresh.html",
|
||||
"redirectUri": "/",
|
||||
"redirectUriLogout": "/logout",
|
||||
"redirectUriLogout": "#/logout",
|
||||
"publicUrls": [
|
||||
"**/preview/s/*",
|
||||
"**/settings",
|
||||
|
@@ -23,7 +23,14 @@ import { ChartsModule } from 'ng2-charts';
|
||||
import { HttpClientModule, HTTP_INTERCEPTORS } from '@angular/common/http';
|
||||
import { BrowserAnimationsModule, NoopAnimationsModule } from '@angular/platform-browser/animations';
|
||||
import { TranslateModule } from '@ngx-translate/core';
|
||||
import { AppConfigService, TRANSLATION_PROVIDER, DebugAppConfigService, CoreModule, CoreAutomationService, AuthBearerInterceptor } from '@alfresco/adf-core';
|
||||
import {
|
||||
AppConfigService,
|
||||
TRANSLATION_PROVIDER,
|
||||
DebugAppConfigService,
|
||||
CoreModule,
|
||||
CoreAutomationService,
|
||||
AuthBearerInterceptor
|
||||
} from '@alfresco/adf-core';
|
||||
import { ExtensionsModule } from '@alfresco/adf-extensions';
|
||||
import { AppComponent } from './app.component';
|
||||
import { MaterialModule } from './material.module';
|
||||
@@ -127,7 +134,7 @@ registerLocaleData(localeSv);
|
||||
BrowserModule,
|
||||
environment.e2e ? NoopAnimationsModule : BrowserAnimationsModule,
|
||||
ReactiveFormsModule,
|
||||
RouterModule.forRoot(appRoutes, { initialNavigation: true }),
|
||||
RouterModule.forRoot(appRoutes, { useHash: true }),
|
||||
FormsModule,
|
||||
HttpClientModule,
|
||||
MaterialModule,
|
||||
|
@@ -26,7 +26,7 @@ import { LogService } from '@alfresco/adf-core';
|
||||
})
|
||||
export class LoginComponent {
|
||||
|
||||
customSuccessRouteURI = '';
|
||||
customSuccessRouteURI = '/home';
|
||||
customLogoImageURL = './assets/images/alfresco-logo.svg';
|
||||
|
||||
disableCsrf = false;
|
||||
|
@@ -7,7 +7,7 @@
|
||||
|
||||
<div class="app-logout-login">
|
||||
<a mat-raised-button class="app-logout-docs-button adf-primary-color"
|
||||
href="/login">{{ 'APP.LOGOUT.LOGIN' | translate}}</a>
|
||||
href="#/login">{{ 'APP.LOGOUT.LOGIN' | translate}}</a>
|
||||
</div>
|
||||
<div class="app-logout-home">
|
||||
<a mat-raised-button class="app-logout-docs-button adf-primary-color"
|
||||
|
@@ -3,8 +3,15 @@
|
||||
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
|
||||
<!-- Important: cache busting for index.html -->
|
||||
<meta http-equiv="cache-control" content="max-age=0" />
|
||||
<meta http-equiv="cache-control" content="no-cache" />
|
||||
<meta http-equiv="expires" content="0" />
|
||||
<meta http-equiv="expires" content="Tue, 01 Jan 1980 1:00:00 GMT" />
|
||||
<meta http-equiv="pragma" content="no-cache" />
|
||||
|
||||
<title>ACS APS ADF Application with Angular CLI</title>
|
||||
<base href="/">
|
||||
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||
<link rel="icon" type="image/png" href="favicon-96x96.png" sizes="96x96">
|
||||
|
@@ -1,7 +1,7 @@
|
||||
---
|
||||
Title: Context Menu directive
|
||||
Added: v2.0.0
|
||||
Status: Active
|
||||
Status: Deprecated
|
||||
Last reviewed: 2018-11-20
|
||||
---
|
||||
|
||||
|
@@ -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();
|
||||
|
@@ -35,7 +35,7 @@ describe('Datatable component - selection', () => {
|
||||
|
||||
await usersActions.createUser(acsUser);
|
||||
|
||||
await loginPage.login(acsUser.email, acsUser.password);
|
||||
await loginPage.login(acsUser.username, acsUser.password);
|
||||
|
||||
await navigationBarPage.navigateToDatatable();
|
||||
});
|
||||
|
@@ -50,7 +50,7 @@ describe('Datatable component', () => {
|
||||
|
||||
await usersActions.createUser(acsUser);
|
||||
|
||||
await loginPage.login(acsUser.email, acsUser.password);
|
||||
await loginPage.login(acsUser.username, acsUser.password);
|
||||
});
|
||||
|
||||
afterAll(async () => {
|
||||
|
@@ -17,29 +17,21 @@
|
||||
|
||||
import { ApiService, BrowserActions, ErrorPage, LoginPage, UserModel, UsersActions } from '@alfresco/adf-testing';
|
||||
import { browser } from 'protractor';
|
||||
import { NavigationBarPage } from '../core/pages/navigation-bar.page';
|
||||
import { ContentServicesPage } from './pages/content-services.page';
|
||||
|
||||
describe('Error Component', () => {
|
||||
|
||||
const acsUser = new UserModel();
|
||||
const loginPage = new LoginPage();
|
||||
const errorPage = new ErrorPage();
|
||||
const navigationBarPage = new NavigationBarPage();
|
||||
|
||||
const apiService = new ApiService();
|
||||
const usersActions = new UsersActions(apiService);
|
||||
const contentServicesPage = new ContentServicesPage();
|
||||
|
||||
const acsUser = new UserModel();
|
||||
|
||||
const errorPage = new ErrorPage();
|
||||
const loginPage = new LoginPage();
|
||||
|
||||
beforeAll(async () => {
|
||||
await apiService.loginWithProfile('admin');
|
||||
await usersActions.createUser(acsUser);
|
||||
await loginPage.login(acsUser.email, acsUser.password);
|
||||
await contentServicesPage.goToDocumentList();
|
||||
});
|
||||
|
||||
afterAll(async () => {
|
||||
await navigationBarPage.clickLogoutButton();
|
||||
await loginPage.login(acsUser.username, acsUser.password);
|
||||
});
|
||||
|
||||
it('[C277302] Should display the error 403 when access to unauthorized page - My Change', async () => {
|
||||
|
@@ -47,7 +47,7 @@ describe('Header Component', () => {
|
||||
await apiService.loginWithProfile('admin');
|
||||
|
||||
await usersActions.createUser(acsUser);
|
||||
await loginPage.login(acsUser.email, acsUser.password);
|
||||
await loginPage.login(acsUser.username, acsUser.password);
|
||||
});
|
||||
|
||||
beforeEach(async () => {
|
||||
|
@@ -32,7 +32,7 @@ describe('Universal Icon component', () => {
|
||||
beforeAll(async () => {
|
||||
await apiService.loginWithProfile('admin');
|
||||
await usersActions.createUser(acsUser);
|
||||
await loginPage.login(acsUser.email, acsUser.password);
|
||||
await loginPage.login(acsUser.username, acsUser.password);
|
||||
});
|
||||
|
||||
afterAll(async () => {
|
||||
|
@@ -62,12 +62,12 @@ describe('Enable infinite scrolling', () => {
|
||||
|
||||
await usersActions.createUser(acsUser);
|
||||
|
||||
await loginPage.login(acsUser.email, acsUser.password);
|
||||
await loginPage.login(acsUser.username, acsUser.password);
|
||||
|
||||
fileNames = StringUtil.generateFilesNames(1, nrOfFiles, files.base, files.extension);
|
||||
deleteFileNames = StringUtil.generateFilesNames(1, nrOfDeletedFiles, files.base, files.extension);
|
||||
|
||||
await apiService.login(acsUser.email, acsUser.password);
|
||||
await apiService.login(acsUser.username, acsUser.password);
|
||||
|
||||
const folderUploadedModel = await uploadActions.createFolder(folderModel.name, '-my-');
|
||||
emptyFolderModel = await uploadActions.createFolder('emptyFolder', '-my-');
|
||||
|
@@ -59,24 +59,27 @@ describe('Login component', () => {
|
||||
|
||||
await usersActions.createUser(userA);
|
||||
await usersActions.createUser(userB);
|
||||
});
|
||||
});
|
||||
|
||||
afterEach(async () => {
|
||||
await navigationBarPage.clickLogoutButton();
|
||||
});
|
||||
|
||||
it('[C276746] Should display the right information in user-info when a different users logs in', async () => {
|
||||
await LocalStorageUtil.setStorageItem('providers', 'ECM');
|
||||
|
||||
await loginPage.login(userA.email, userA.password);
|
||||
await loginPage.login(userA.username, userA.password);
|
||||
await userInfoPage.clickUserProfile();
|
||||
await expect(await userInfoPage.getContentHeaderTitle()).toEqual(userA.firstName + ' ' + userA.lastName);
|
||||
await expect(await userInfoPage.getContentEmail()).toEqual(userA.email);
|
||||
await expect(await userInfoPage.getContentHeaderTitle()).toEqual(`${userA.firstName} ${userA.lastName}`);
|
||||
|
||||
await loginPage.login(userB.email, userB.password);
|
||||
await navigationBarPage.clickLogoutButton();
|
||||
await loginPage.login(userB.username, userB.password);
|
||||
await userInfoPage.clickUserProfile();
|
||||
await expect(await userInfoPage.getContentHeaderTitle()).toEqual(userB.firstName + ' ' + userB.lastName);
|
||||
await expect(await userInfoPage.getContentEmail()).toEqual(userB.email);
|
||||
await expect(await userInfoPage.getContentHeaderTitle()).toEqual(`${userB.firstName} ${userB.lastName}`);
|
||||
});
|
||||
|
||||
it('[C299206] Should redirect the user without the right access role on a forbidden page', async () => {
|
||||
await loginPage.login(userA.email, userA.password);
|
||||
await loginPage.login(userA.username, userA.password);
|
||||
await navigationBarPage.navigateToProcessServicesCloudPage();
|
||||
await expect(await errorPage.getErrorCode()).toBe('403');
|
||||
await expect(await errorPage.getErrorTitle()).toBe('You don\'t have permission to access this server.');
|
||||
|
@@ -15,22 +15,23 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
import { BrowserActions, LoginPage, SettingsPage } from '@alfresco/adf-testing';
|
||||
import { LoginPage, SettingsPage } from '@alfresco/adf-testing';
|
||||
import { browser } from 'protractor';
|
||||
import { NavigationBarPage } from '../../pages/navigation-bar.page';
|
||||
|
||||
describe('Logout component - SSO', () => {
|
||||
|
||||
const settingsPage = new SettingsPage();
|
||||
const loginSSOPage = new LoginPage();
|
||||
const navigationBarPage = new NavigationBarPage();
|
||||
|
||||
it('[C280665] Should be possible change the logout redirect URL', async () => {
|
||||
await settingsPage.setProviderEcmSso(browser.params.testConfig.appConfig.ecmHost,
|
||||
browser.params.testConfig.appConfig.oauth2.host,
|
||||
browser.params.testConfig.appConfig.identityHost, false, true, browser.params.testConfig.appConfig.oauth2.clientId, '/login');
|
||||
browser.params.testConfig.appConfig.identityHost, false, true, browser.params.testConfig.appConfig.oauth2.clientId, '#/login');
|
||||
await loginSSOPage.loginSSOIdentityService(browser.params.testConfig.users.admin.username, browser.params.testConfig.users.admin.password);
|
||||
await BrowserActions.clickExecuteScript('.app-sidenav-link[adf-logout]');
|
||||
|
||||
await browser.sleep(2000);
|
||||
await navigationBarPage.clickLogoutButton();
|
||||
|
||||
const actualUrl = await browser.getCurrentUrl();
|
||||
await expect(actualUrl).toEqual(browser.baseUrl + '/login');
|
||||
|
@@ -35,9 +35,9 @@ describe('Notifications Component', () => {
|
||||
|
||||
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 notificationPage.goToNotificationsPage();
|
||||
});
|
||||
|
@@ -29,8 +29,8 @@ export class CommentsPage {
|
||||
commentInput = element(by.id('comment-input'));
|
||||
addCommentButton = element(by.css("[data-automation-id='comments-input-add']"));
|
||||
|
||||
async getTotalNumberOfComments(): Promise<string> {
|
||||
return BrowserActions.getText(this.numberOfComments);
|
||||
async getTotalNumberOfComments(text: string): Promise<void> {
|
||||
await BrowserVisibility.waitUntilElementHasText(this.numberOfComments, text);
|
||||
}
|
||||
|
||||
async checkUserIconIsDisplayed(): Promise<void> {
|
||||
|
@@ -132,15 +132,14 @@ export class ContentServicesPage {
|
||||
|
||||
async checkDeleteIsDisabled(content): Promise<void> {
|
||||
await this.contentList.clickOnActionMenu(content);
|
||||
await this.waitForContentOptions();
|
||||
const disabledDelete = element(by.css(`button[data-automation-id*='DELETE'][disabled='true']`));
|
||||
await BrowserVisibility.waitUntilElementIsVisible(disabledDelete);
|
||||
}
|
||||
|
||||
async deleteContent(content): Promise<void> {
|
||||
await this.contentList.clickOnActionMenu(content);
|
||||
await this.waitForContentOptions();
|
||||
await BrowserActions.click(this.deleteContentElement);
|
||||
await this.checkContentIsNotDisplayed(content);
|
||||
}
|
||||
|
||||
async clickDeleteOnToolbar(): Promise<void> {
|
||||
@@ -153,13 +152,11 @@ export class ContentServicesPage {
|
||||
|
||||
async metadataContent(content): Promise<void> {
|
||||
await this.contentList.clickOnActionMenu(content);
|
||||
await this.waitForContentOptions();
|
||||
await BrowserActions.click(this.metadataAction);
|
||||
}
|
||||
|
||||
async versionManagerContent(content): Promise<void> {
|
||||
await this.contentList.clickOnActionMenu(content);
|
||||
await this.waitForContentOptions();
|
||||
await BrowserActions.click(this.versionManagerAction);
|
||||
}
|
||||
|
||||
@@ -178,13 +175,6 @@ export class ContentServicesPage {
|
||||
await BrowserActions.click(this.lockContentElement);
|
||||
}
|
||||
|
||||
async waitForContentOptions(): Promise<void> {
|
||||
await BrowserVisibility.waitUntilElementIsVisible(this.copyContentElement);
|
||||
await BrowserVisibility.waitUntilElementIsVisible(this.moveContentElement);
|
||||
await BrowserVisibility.waitUntilElementIsVisible(this.deleteContentElement);
|
||||
await BrowserVisibility.waitUntilElementIsVisible(this.downloadContent);
|
||||
}
|
||||
|
||||
async clickFileHyperlink(fileName): Promise<void> {
|
||||
const hyperlink = this.contentList.dataTablePage().getFileHyperlink(fileName);
|
||||
await BrowserActions.click(hyperlink);
|
||||
@@ -641,6 +631,7 @@ export class ContentServicesPage {
|
||||
}
|
||||
|
||||
async clickShareButton(): Promise<void> {
|
||||
await browser.sleep(2000);
|
||||
await BrowserActions.closeMenuAndDialogs();
|
||||
await BrowserActions.click(this.shareNodeButton);
|
||||
}
|
||||
|
@@ -16,7 +16,7 @@
|
||||
*/
|
||||
|
||||
import { BrowserActions, BrowserVisibility, DocumentListPage } from '@alfresco/adf-testing';
|
||||
import { Locator, element, by } from 'protractor';
|
||||
import { Locator, element, by, browser } from 'protractor';
|
||||
|
||||
export class TrashcanPage {
|
||||
|
||||
@@ -49,6 +49,7 @@ export class TrashcanPage {
|
||||
|
||||
async clickRestore(): Promise<void> {
|
||||
await BrowserActions.click(this.restoreButton);
|
||||
await browser.sleep(2000);
|
||||
}
|
||||
|
||||
async checkRestoreButtonIsNotDisplayed(): Promise<void> {
|
||||
|
@@ -77,7 +77,7 @@ describe('Pagination - returns to previous page when current is empty', () => {
|
||||
|
||||
fileNames = StringUtil.generateFilesNames(1, nrOfFiles, files.base, files.extension);
|
||||
|
||||
await apiService.login(acsUser.email, acsUser.password);
|
||||
await apiService.login(acsUser.username, acsUser.password);
|
||||
|
||||
const folderUploadedModel = await uploadActions.createFolder(folderModel.name, '-my-');
|
||||
|
||||
@@ -93,7 +93,7 @@ describe('Pagination - returns to previous page when current is empty', () => {
|
||||
|
||||
pngFileUploaded = await uploadActions.uploadFile(pngFileInfo.location, pngFileInfo.name, lastFolderResponse.entry.id);
|
||||
|
||||
await loginPage.login(acsUser.email, acsUser.password);
|
||||
await loginPage.login(acsUser.username, acsUser.password);
|
||||
|
||||
await contentServicesPage.goToDocumentList();
|
||||
});
|
||||
|
@@ -38,7 +38,7 @@ describe('User Info - SSO', () => {
|
||||
browser.params.testConfig.appConfig.oauth2.host,
|
||||
browser.params.testConfig.appConfig.identityHost, false, true, browser.params.testConfig.appConfig.oauth2.clientId);
|
||||
|
||||
await loginSSOPage.loginSSOIdentityService(identityUser.email, identityUser.password);
|
||||
await loginSSOPage.loginSSOIdentityService(identityUser.username, identityUser.password);
|
||||
});
|
||||
|
||||
it('[C290066] Should display UserInfo when login using SSO', async () => {
|
||||
|
@@ -57,10 +57,10 @@ describe('Viewer', () => {
|
||||
visibility: 'PUBLIC'
|
||||
});
|
||||
await apiService.getInstance().core.sitesApi.addSiteMember(site.entry.id, {
|
||||
id: acsUser.email,
|
||||
id: acsUser.username,
|
||||
role: CONSTANTS.CS_USER_ROLES.MANAGER
|
||||
});
|
||||
await apiService.login(acsUser.email, acsUser.password);
|
||||
await apiService.login(acsUser.username, acsUser.password);
|
||||
});
|
||||
|
||||
afterAll(async () => {
|
||||
@@ -76,7 +76,7 @@ describe('Viewer', () => {
|
||||
beforeAll(async () => {
|
||||
archiveFolderUploaded = await uploadActions.createFolder(archiveFolderInfo.name, '-my-');
|
||||
uploadedArchives = await uploadActions.uploadFolder(archiveFolderInfo.location, archiveFolderUploaded.entry.id);
|
||||
await loginPage.login(acsUser.email, acsUser.password);
|
||||
await loginPage.login(acsUser.username, acsUser.password);
|
||||
await contentServicesPage.goToDocumentList();
|
||||
});
|
||||
|
||||
|
@@ -69,11 +69,11 @@ describe('Viewer', () => {
|
||||
});
|
||||
|
||||
await apiService.getInstance().core.sitesApi.addSiteMember(site.entry.id, {
|
||||
id: acsUser.email,
|
||||
id: acsUser.username,
|
||||
role: CONSTANTS.CS_USER_ROLES.MANAGER
|
||||
});
|
||||
|
||||
await apiService.login(acsUser.email, acsUser.password);
|
||||
await apiService.login(acsUser.username, acsUser.password);
|
||||
|
||||
pngFileUploaded = await uploadActions.uploadFile(pngFileInfo.location, pngFileInfo.name, site.entry.guid);
|
||||
});
|
||||
@@ -81,11 +81,10 @@ describe('Viewer', () => {
|
||||
afterAll(async () => {
|
||||
await apiService.loginWithProfile('admin');
|
||||
await apiService.getInstance().core.sitesApi.deleteSite(site.entry.id, { permanent: true });
|
||||
await navigationBarPage.clickLogoutButton();
|
||||
});
|
||||
|
||||
it('[C272813] Should be redirected to site when opening and closing a file in a site', async () => {
|
||||
await loginPage.login(acsUser.email, acsUser.password);
|
||||
await loginPage.login(acsUser.username, acsUser.password);
|
||||
|
||||
await navigationBarPage.goToSite(site);
|
||||
await contentServicesPage.contentList.dataTablePage().waitTillContentLoaded();
|
||||
@@ -95,6 +94,7 @@ describe('Viewer', () => {
|
||||
await viewerPage.checkImgViewerIsDisplayed();
|
||||
|
||||
await viewerPage.clickCloseButton();
|
||||
await navigationBarPage.clickLogoutButton();
|
||||
});
|
||||
|
||||
describe('Other Folder Uploaded', () => {
|
||||
@@ -102,11 +102,12 @@ describe('Viewer', () => {
|
||||
let otherFolderUploaded;
|
||||
|
||||
beforeAll(async () => {
|
||||
await apiService.login(acsUser.username, acsUser.password);
|
||||
otherFolderUploaded = await uploadActions.createFolder(otherFolderInfo.name, '-my-');
|
||||
|
||||
uploadedOthers = await uploadActions.uploadFolder(otherFolderInfo.location, otherFolderUploaded.entry.id);
|
||||
|
||||
await loginPage.login(acsUser.email, acsUser.password);
|
||||
await loginPage.login(acsUser.username, acsUser.password);
|
||||
await contentServicesPage.goToDocumentList();
|
||||
});
|
||||
|
||||
|
@@ -56,11 +56,11 @@ describe('Viewer', () => {
|
||||
});
|
||||
|
||||
await apiService.getInstance().core.sitesApi.addSiteMember(site.entry.id, {
|
||||
id: acsUser.email,
|
||||
id: acsUser.username,
|
||||
role: CONSTANTS.CS_USER_ROLES.MANAGER
|
||||
});
|
||||
|
||||
await apiService.login(acsUser.email, acsUser.password);
|
||||
await apiService.login(acsUser.username, acsUser.password);
|
||||
});
|
||||
|
||||
afterAll(async () => {
|
||||
@@ -77,7 +77,7 @@ describe('Viewer', () => {
|
||||
|
||||
uploadedExcels = await uploadActions.uploadFolder(excelFolderInfo.location, excelFolderUploaded.entry.id);
|
||||
|
||||
await loginPage.login(acsUser.email, acsUser.password);
|
||||
await loginPage.login(acsUser.username, acsUser.password);
|
||||
await contentServicesPage.goToDocumentList();
|
||||
});
|
||||
|
||||
|
@@ -62,11 +62,11 @@ describe('Viewer', () => {
|
||||
});
|
||||
|
||||
await apiService.getInstance().core.sitesApi.addSiteMember(site.entry.id, {
|
||||
id: acsUser.email,
|
||||
id: acsUser.username,
|
||||
role: CONSTANTS.CS_USER_ROLES.MANAGER
|
||||
});
|
||||
|
||||
await apiService.login(acsUser.email, acsUser.password);
|
||||
await apiService.login(acsUser.username, acsUser.password);
|
||||
});
|
||||
|
||||
afterAll(async () => {
|
||||
@@ -87,7 +87,7 @@ describe('Viewer', () => {
|
||||
|
||||
uploadedImgRenditionFolderInfo = await uploadActions.uploadFolder(imgRenditionFolderInfo.location, imgFolderRenditionUploaded.entry.id);
|
||||
|
||||
await loginPage.login(acsUser.email, acsUser.password);
|
||||
await loginPage.login(acsUser.username, acsUser.password);
|
||||
await contentServicesPage.goToDocumentList();
|
||||
});
|
||||
|
||||
|
@@ -58,11 +58,11 @@ describe('Viewer', () => {
|
||||
});
|
||||
|
||||
await apiService.getInstance().core.sitesApi.addSiteMember(site.entry.id, {
|
||||
id: acsUser.email,
|
||||
id: acsUser.username,
|
||||
role: CONSTANTS.CS_USER_ROLES.MANAGER
|
||||
});
|
||||
|
||||
await apiService.login(acsUser.email, acsUser.password);
|
||||
await apiService.login(acsUser.username, acsUser.password);
|
||||
});
|
||||
|
||||
afterAll(async () => {
|
||||
@@ -79,7 +79,7 @@ describe('Viewer', () => {
|
||||
|
||||
uploadedPpt = await uploadActions.uploadFolder(pptFolderInfo.location, pptFolderUploaded.entry.id);
|
||||
|
||||
await loginPage.login(acsUser.email, acsUser.password);
|
||||
await loginPage.login(acsUser.username, acsUser.password);
|
||||
await contentServicesPage.goToDocumentList();
|
||||
});
|
||||
|
||||
|
@@ -56,11 +56,11 @@ describe('Viewer', () => {
|
||||
});
|
||||
|
||||
await apiService.getInstance().core.sitesApi.addSiteMember(site.entry.id, {
|
||||
id: acsUser.email,
|
||||
id: acsUser.username,
|
||||
role: CONSTANTS.CS_USER_ROLES.MANAGER
|
||||
});
|
||||
|
||||
await apiService.login(acsUser.email, acsUser.password);
|
||||
await apiService.login(acsUser.username, acsUser.password);
|
||||
});
|
||||
|
||||
afterAll(async () => {
|
||||
@@ -77,7 +77,7 @@ describe('Viewer', () => {
|
||||
|
||||
uploadedTexts = await uploadActions.uploadFolder(textFolderInfo.location, textFolderUploaded.entry.id);
|
||||
|
||||
await loginPage.login(acsUser.email, acsUser.password);
|
||||
await loginPage.login(acsUser.username, acsUser.password);
|
||||
await contentServicesPage.goToDocumentList();
|
||||
});
|
||||
|
||||
|
@@ -58,11 +58,11 @@ describe('Viewer', () => {
|
||||
});
|
||||
|
||||
await apiService.getInstance().core.sitesApi.addSiteMember(site.entry.id, {
|
||||
id: acsUser.email,
|
||||
id: acsUser.username,
|
||||
role: CONSTANTS.CS_USER_ROLES.MANAGER
|
||||
});
|
||||
|
||||
await apiService.login(acsUser.email, acsUser.password);
|
||||
await apiService.login(acsUser.username, acsUser.password);
|
||||
});
|
||||
|
||||
afterAll(async () => {
|
||||
@@ -80,7 +80,7 @@ describe('Viewer', () => {
|
||||
|
||||
uploadedWords = await uploadActions.uploadFolder(wordFolderInfo.location, wordFolderUploaded.entry.id);
|
||||
|
||||
await loginPage.login(acsUser.email, acsUser.password);
|
||||
await loginPage.login(acsUser.username, acsUser.password);
|
||||
await contentServicesPage.goToDocumentList();
|
||||
});
|
||||
|
||||
|
@@ -92,7 +92,7 @@ describe('Content Services Viewer', () => {
|
||||
|
||||
await usersActions.createUser(acsUser);
|
||||
|
||||
await apiService.login(acsUser.email, acsUser.password);
|
||||
await apiService.login(acsUser.username, acsUser.password);
|
||||
|
||||
const pdfFileUploaded = await uploadActions.uploadFile(pdfFile.location, pdfFile.name, '-my-');
|
||||
Object.assign(pdfFile, pdfFileUploaded.entry);
|
||||
@@ -115,7 +115,7 @@ describe('Content Services Viewer', () => {
|
||||
const unsupportedFileUploaded = await uploadActions.uploadFile(unsupportedFile.location, unsupportedFile.name, '-my-');
|
||||
Object.assign(unsupportedFile, unsupportedFileUploaded.entry);
|
||||
|
||||
await loginPage.login(acsUser.email, acsUser.password);
|
||||
await loginPage.login(acsUser.username, acsUser.password);
|
||||
|
||||
await contentServicesPage.goToDocumentList();
|
||||
});
|
||||
|
@@ -51,11 +51,11 @@ describe('Viewer', () => {
|
||||
await apiService.loginWithProfile('admin');
|
||||
await usersActions.createUser(acsUser);
|
||||
|
||||
await apiService.login(acsUser.email, acsUser.password);
|
||||
await apiService.login(acsUser.username, acsUser.password);
|
||||
|
||||
txtFileUploaded = await uploadActions.uploadFile(txtFileInfo.location, txtFileInfo.name, '-my-');
|
||||
|
||||
await loginPage.login(acsUser.email, acsUser.password);
|
||||
await loginPage.login(acsUser.username, acsUser.password);
|
||||
});
|
||||
|
||||
afterAll(async () => {
|
||||
|
@@ -29,7 +29,7 @@ import { ContentServicesPage } from '../../core/pages/content-services.page';
|
||||
import { NavigationBarPage } from '../../core/pages/navigation-bar.page';
|
||||
import { FileModel } from '../../models/ACS/file.model';
|
||||
|
||||
describe('Viewer - properties', () => {
|
||||
describe('Viewer', () => {
|
||||
|
||||
const acsUser = new UserModel();
|
||||
const viewerPage = new ViewerPage();
|
||||
@@ -56,7 +56,7 @@ describe('Viewer - properties', () => {
|
||||
|
||||
await usersActions.createUser(acsUser);
|
||||
|
||||
await apiService.login(acsUser.email, acsUser.password);
|
||||
await apiService.login(acsUser.username, acsUser.password);
|
||||
|
||||
let pngFileUploaded = await uploadActions.uploadFile(pngFile.location, pngFile.name, '-my-');
|
||||
Object.assign(pngFile, pngFileUploaded.entry);
|
||||
@@ -64,126 +64,137 @@ describe('Viewer - properties', () => {
|
||||
pngFileUploaded = await uploadActions.uploadFile(fileForOverlay.location, fileForOverlay.name, '-my-');
|
||||
Object.assign(fileForOverlay, pngFileUploaded.entry);
|
||||
|
||||
await loginPage.login(acsUser.email, acsUser.password);
|
||||
await loginPage.login(acsUser.username, acsUser.password);
|
||||
|
||||
await contentServicesPage.goToDocumentList();
|
||||
|
||||
await viewerPage.viewFile(pngFile.name);
|
||||
|
||||
await viewerPage.clickLeftSidebarButton();
|
||||
await viewerPage.checkLeftSideBarIsDisplayed();
|
||||
});
|
||||
});
|
||||
|
||||
afterAll(async () => {
|
||||
await uploadActions.deleteFileOrFolder(pngFile.getId());
|
||||
await navigationBarPage.clickLogoutButton();
|
||||
});
|
||||
|
||||
it('[C260066] Should Show/Hide viewer toolbar when showToolbar is true/false', async () => {
|
||||
await viewerPage.checkToolbarIsDisplayed();
|
||||
await viewerPage.disableToolbar();
|
||||
await viewerPage.checkToolbarIsNotDisplayed();
|
||||
await viewerPage.enableToolbar();
|
||||
});
|
||||
|
||||
it('[C260076] Should Show/Hide back button when allowGoBack is true/false', async () => {
|
||||
await viewerPage.checkGoBackIsDisplayed();
|
||||
await viewerPage.disableGoBack();
|
||||
await viewerPage.checkGoBackIsNotDisplayed();
|
||||
await viewerPage.enableGoBack();
|
||||
});
|
||||
describe('properties', () => {
|
||||
|
||||
it('[C260077] Should Show toolbar options dropdown when adf-viewer-open-with directive is used', async () => {
|
||||
await viewerPage.checkToolbarOptionsIsNotDisplayed();
|
||||
await viewerPage.enableToolbarOptions();
|
||||
await viewerPage.checkToolbarOptionsIsDisplayed();
|
||||
await viewerPage.disableToolbarOptions();
|
||||
});
|
||||
beforeAll(async () => {
|
||||
await viewerPage.viewFile(pngFile.name);
|
||||
|
||||
it('[C260079] Should Show/Hide download button when allowDownload is true/false', async () => {
|
||||
await viewerPage.checkDownloadButtonIsDisplayed();
|
||||
await viewerPage.disableDownload();
|
||||
await viewerPage.checkDownloadButtonIsNotDisplayed();
|
||||
await viewerPage.enableDownload();
|
||||
});
|
||||
await viewerPage.clickLeftSidebarButton();
|
||||
await viewerPage.checkLeftSideBarIsDisplayed();
|
||||
});
|
||||
|
||||
it('[C260082] Should Show/Hide print button when allowPrint is true/false', async () => {
|
||||
await viewerPage.checkPrintButtonIsDisplayed();
|
||||
await viewerPage.disablePrint();
|
||||
await viewerPage.checkPrintButtonIsNotDisplayed();
|
||||
await viewerPage.enablePrint();
|
||||
});
|
||||
afterAll(async () => {
|
||||
await viewerPage.clickCloseButton();
|
||||
});
|
||||
|
||||
it('[C260092] Should show adf-viewer-toolbar-actions directive buttons when adf-viewer-toolbar-actions is used', async () => {
|
||||
await viewerPage.checkMoreActionsDisplayed();
|
||||
it('[C260066] Should Show/Hide viewer toolbar when showToolbar is true/false', async () => {
|
||||
await viewerPage.checkToolbarIsDisplayed();
|
||||
await viewerPage.disableToolbar();
|
||||
await viewerPage.checkToolbarIsNotDisplayed();
|
||||
await viewerPage.enableToolbar();
|
||||
});
|
||||
|
||||
await viewerPage.disableMoreActions();
|
||||
it('[C260076] Should Show/Hide back button when allowGoBack is true/false', async () => {
|
||||
await viewerPage.checkGoBackIsDisplayed();
|
||||
await viewerPage.disableGoBack();
|
||||
await viewerPage.checkGoBackIsNotDisplayed();
|
||||
await viewerPage.enableGoBack();
|
||||
});
|
||||
|
||||
await viewerPage.checkMoreActionsIsNotDisplayed();
|
||||
it('[C260077] Should Show toolbar options dropdown when adf-viewer-open-with directive is used', async () => {
|
||||
await viewerPage.checkToolbarOptionsIsNotDisplayed();
|
||||
await viewerPage.enableToolbarOptions();
|
||||
await viewerPage.checkToolbarOptionsIsDisplayed();
|
||||
await viewerPage.disableToolbarOptions();
|
||||
});
|
||||
|
||||
await viewerPage.enableMoreActions();
|
||||
});
|
||||
it('[C260079] Should Show/Hide download button when allowDownload is true/false', async () => {
|
||||
await viewerPage.checkDownloadButtonIsDisplayed();
|
||||
await viewerPage.disableDownload();
|
||||
await viewerPage.checkDownloadButtonIsNotDisplayed();
|
||||
await viewerPage.enableDownload();
|
||||
});
|
||||
|
||||
it('[C260074] Should show a custom file name when displayName property is used', async () => {
|
||||
await viewerPage.checkFileNameIsDisplayed(pngFile.name);
|
||||
it('[C260082] Should Show/Hide print button when allowPrint is true/false', async () => {
|
||||
await viewerPage.checkPrintButtonIsDisplayed();
|
||||
await viewerPage.disablePrint();
|
||||
await viewerPage.checkPrintButtonIsNotDisplayed();
|
||||
await viewerPage.enablePrint();
|
||||
});
|
||||
|
||||
await viewerPage.enableCustomName();
|
||||
it('[C260092] Should show adf-viewer-toolbar-actions directive buttons when adf-viewer-toolbar-actions is used', async () => {
|
||||
await viewerPage.checkMoreActionsDisplayed();
|
||||
|
||||
await viewerPage.enterCustomName('test custom title');
|
||||
await viewerPage.checkFileNameIsDisplayed('test custom title');
|
||||
await viewerPage.disableMoreActions();
|
||||
|
||||
await viewerPage.disableCustomName();
|
||||
});
|
||||
await viewerPage.checkMoreActionsIsNotDisplayed();
|
||||
|
||||
it('[C260090] Should showSidebar allow right info-drawer to be shown', async () => {
|
||||
await viewerPage.clickToggleRightSidebar();
|
||||
await viewerPage.checkInfoSideBarIsDisplayed();
|
||||
await viewerPage.enableMoreActions();
|
||||
});
|
||||
|
||||
await viewerPage.clickToggleRightSidebar();
|
||||
await viewerPage.checkInfoSideBarIsNotDisplayed();
|
||||
});
|
||||
it('[C260074] Should show a custom file name when displayName property is used', async () => {
|
||||
await viewerPage.checkFileNameIsDisplayed(pngFile.name);
|
||||
|
||||
it('[C286442] Should showLeftSidebar allow left info-drawer to be shown', async () => {
|
||||
await viewerPage.clickToggleLeftSidebar();
|
||||
await viewerPage.checkLeftSideBarIsNotDisplayed();
|
||||
await viewerPage.clickLeftSidebarButton();
|
||||
await viewerPage.checkLeftSideBarIsDisplayed();
|
||||
});
|
||||
await viewerPage.enableCustomName();
|
||||
|
||||
it('[C260089] Should Show/Hide info-drawer if allowSidebar true/false', async () => {
|
||||
await viewerPage.clickInfoButton();
|
||||
await viewerPage.enterCustomName('test custom title');
|
||||
await viewerPage.checkFileNameIsDisplayed('test custom title');
|
||||
|
||||
await viewerPage.checkInfoSideBarIsDisplayed();
|
||||
await viewerPage.checkInfoButtonIsDisplayed();
|
||||
await viewerPage.disableCustomName();
|
||||
});
|
||||
|
||||
await viewerPage.disableAllowSidebar();
|
||||
it('[C260090] Should showSidebar allow right info-drawer to be shown', async () => {
|
||||
await viewerPage.clickToggleRightSidebar();
|
||||
await viewerPage.checkInfoSideBarIsDisplayed();
|
||||
|
||||
await viewerPage.checkInfoButtonIsNotDisplayed();
|
||||
await viewerPage.checkInfoSideBarIsNotDisplayed();
|
||||
});
|
||||
await viewerPage.clickToggleRightSidebar();
|
||||
await viewerPage.checkInfoSideBarIsNotDisplayed();
|
||||
});
|
||||
|
||||
it('[C286596] Should Show/Hide left info-drawer if allowLeftSidebar true/false', async () => {
|
||||
await viewerPage.checkLeftSideBarIsDisplayed();
|
||||
await viewerPage.checkLeftSideBarButtonIsDisplayed();
|
||||
it('[C286442] Should showLeftSidebar allow left info-drawer to be shown', async () => {
|
||||
await viewerPage.clickToggleLeftSidebar();
|
||||
await viewerPage.checkLeftSideBarIsNotDisplayed();
|
||||
await viewerPage.clickLeftSidebarButton();
|
||||
await viewerPage.checkLeftSideBarIsDisplayed();
|
||||
});
|
||||
|
||||
await viewerPage.disableAllowLeftSidebar();
|
||||
it('[C260089] Should Show/Hide info-drawer if allowSidebar true/false', async () => {
|
||||
await viewerPage.clickInfoButton();
|
||||
|
||||
await viewerPage.checkInfoSideBarIsDisplayed();
|
||||
await viewerPage.checkInfoButtonIsDisplayed();
|
||||
|
||||
await viewerPage.disableAllowSidebar();
|
||||
|
||||
await viewerPage.checkInfoButtonIsNotDisplayed();
|
||||
await viewerPage.checkInfoSideBarIsNotDisplayed();
|
||||
});
|
||||
|
||||
it('[C286596] Should Show/Hide left info-drawer if allowLeftSidebar true/false', async () => {
|
||||
await viewerPage.checkLeftSideBarIsDisplayed();
|
||||
await viewerPage.checkLeftSideBarButtonIsDisplayed();
|
||||
|
||||
await viewerPage.disableAllowLeftSidebar();
|
||||
|
||||
await viewerPage.checkLeftSideBarButtonIsNotDisplayed();
|
||||
await viewerPage.checkLeftSideBarIsNotDisplayed();
|
||||
});
|
||||
|
||||
await viewerPage.checkLeftSideBarButtonIsNotDisplayed();
|
||||
await viewerPage.checkLeftSideBarIsNotDisplayed();
|
||||
});
|
||||
|
||||
it('[C260100] Should be possible to disable Overlay viewer', async () => {
|
||||
await viewerPage.clickCloseButton();
|
||||
await navigationBarPage.clickOverlayViewerButton();
|
||||
|
||||
await dataTable.doubleClickRow('Name', fileForOverlay.name);
|
||||
await viewerPage.checkOverlayViewerIsDisplayed();
|
||||
|
||||
await viewerPage.clickCloseButton();
|
||||
await dataTable.doubleClickRow('Name', pngFile.name);
|
||||
|
||||
await viewerPage.checkOverlayViewerIsDisplayed();
|
||||
await viewerPage.clickCloseButton();
|
||||
|
||||
await viewerPage.disableOverlay();
|
||||
|
||||
await dataTable.doubleClickRow('Name', fileForOverlay.name);
|
||||
await viewerPage.checkImgContainerIsDisplayed();
|
||||
await viewerPage.checkInlineViewerIsDisplayed();
|
||||
@@ -191,4 +202,5 @@ describe('Viewer - properties', () => {
|
||||
await viewerPage.checkImgContainerIsDisplayed();
|
||||
await viewerPage.checkInlineViewerIsDisplayed();
|
||||
});
|
||||
});
|
||||
})
|
||||
;
|
||||
|
@@ -71,15 +71,15 @@ describe('Viewer', () => {
|
||||
});
|
||||
|
||||
await apiService.getInstance().core.sitesApi.addSiteMember(site.entry.id, {
|
||||
id: acsUser.email,
|
||||
id: acsUser.username,
|
||||
role: CONSTANTS.CS_USER_ROLES.MANAGER
|
||||
});
|
||||
|
||||
await apiService.login(acsUser.email, acsUser.password);
|
||||
await apiService.login(acsUser.username, acsUser.password);
|
||||
|
||||
pngFileUploaded = await uploadActions.uploadFile(pngFileInfo.location, pngFileInfo.name, site.entry.guid);
|
||||
|
||||
await apiService.login(acsUser.email, acsUser.password);
|
||||
await apiService.login(acsUser.username, acsUser.password);
|
||||
|
||||
wordFileUploaded = await uploadActions.uploadFile(wordFileInfo.location, wordFileInfo.name, '-my-');
|
||||
|
||||
@@ -88,12 +88,12 @@ describe('Viewer', () => {
|
||||
|
||||
afterAll(async () => {
|
||||
await apiService.getInstance().core.sitesApi.deleteSite(site.entry.id, { permanent: true });
|
||||
await apiService.login(acsUser.email, acsUser.password);
|
||||
await apiService.login(acsUser.username, acsUser.password);
|
||||
await uploadActions.deleteFileOrFolder(wordFileUploaded.entry.id);
|
||||
});
|
||||
|
||||
beforeEach(async () => {
|
||||
await loginPage.login(acsUser.email, acsUser.password);
|
||||
await loginPage.login(acsUser.username, acsUser.password);
|
||||
});
|
||||
|
||||
it('[C260105] Should be able to open an image file shared via API', async () => {
|
||||
|
@@ -40,7 +40,7 @@ describe('Analytics Smoke Test', () => {
|
||||
|
||||
procUserModel = await usersActions.createUser();
|
||||
|
||||
await loginPage.login(procUserModel.email, procUserModel.password);
|
||||
await loginPage.login(procUserModel.username, procUserModel.password);
|
||||
});
|
||||
|
||||
afterAll(async () => {
|
||||
|
@@ -32,8 +32,8 @@ describe('About Process Services Cloud', () => {
|
||||
beforeAll(async () => {
|
||||
await apiService.loginWithProfile('identityAdmin');
|
||||
testUser = await identityService.createIdentityUserWithRole( [identityService.ROLES.ACTIVITI_USER, identityService.ROLES.ACTIVITI_DEVOPS]);
|
||||
await loginSSOPage.login(testUser.email, testUser.password);
|
||||
await apiService.login(testUser.email, testUser.password);
|
||||
await loginSSOPage.login(testUser.username, testUser.password);
|
||||
await apiService.login(testUser.username, testUser.password);
|
||||
await navigationBarPage.clickAboutButton();
|
||||
});
|
||||
|
||||
|
@@ -39,8 +39,8 @@ describe('Applications list', () => {
|
||||
await apiService.loginWithProfile('identityAdmin');
|
||||
testUser = await identityService.createIdentityUserWithRole( [identityService.ROLES.ACTIVITI_USER, identityService.ROLES.ACTIVITI_DEVOPS]);
|
||||
|
||||
await loginSSOPage.login(testUser.email, testUser.password);
|
||||
await apiService.login(testUser.email, testUser.password);
|
||||
await loginSSOPage.login(testUser.username, testUser.password);
|
||||
await apiService.login(testUser.username, testUser.password);
|
||||
|
||||
applications = await applicationsService.getApplicationsByStatus('RUNNING');
|
||||
|
||||
|
@@ -53,7 +53,7 @@ describe('Edit process filters cloud', () => {
|
||||
groupInfo = await groupIdentityService.getGroupInfoByGroupName('hr');
|
||||
await identityService.addUserToGroup(testUser.idIdentityService, groupInfo.id);
|
||||
|
||||
await loginSSOPage.login(testUser.email, testUser.password);
|
||||
await loginSSOPage.login(testUser.username, testUser.password);
|
||||
});
|
||||
|
||||
afterAll(async () => {
|
||||
|
@@ -54,12 +54,12 @@ describe('Edit task filters cloud', () => {
|
||||
groupInfo = await groupIdentityService.getGroupInfoByGroupName('hr');
|
||||
await identityService.addUserToGroup(testUser.idIdentityService, groupInfo.id);
|
||||
|
||||
await apiService.login(testUser.email, testUser.password);
|
||||
await apiService.login(testUser.username, testUser.password);
|
||||
const assignedTask = await tasksService.createStandaloneTask(assignedTaskName, simpleApp);
|
||||
await tasksService.claimTask(assignedTask.entry.id, simpleApp);
|
||||
await tasksService.createAndCompleteTask(completedTaskName, simpleApp);
|
||||
|
||||
await loginSSOPage.login(testUser.email, testUser.password);
|
||||
await loginSSOPage.login(testUser.username, testUser.password);
|
||||
});
|
||||
|
||||
afterAll(async () => {
|
||||
|
@@ -56,7 +56,7 @@ describe('Form Field Component - Dropdown Widget', () => {
|
||||
|
||||
groupInfo = await groupIdentityService.getGroupInfoByGroupName('hr');
|
||||
await identityService.addUserToGroup(testUser.idIdentityService, groupInfo.id);
|
||||
await apiService.login(testUser.email, testUser.password);
|
||||
await apiService.login(testUser.username, testUser.password);
|
||||
|
||||
const processDefinition = await processDefinitionService
|
||||
.getProcessDefinitionByName(browser.params.resources.ACTIVITI_CLOUD_APPS.SIMPLE_APP.processes.dropdownrestprocess, simpleApp);
|
||||
@@ -69,7 +69,7 @@ describe('Form Field Component - Dropdown Widget', () => {
|
||||
task = await tasklist.list.entries[0];
|
||||
await tasksService.claimTask(task.entry.id, simpleApp);
|
||||
|
||||
await loginSSOPage.login(testUser.email, testUser.password);
|
||||
await loginSSOPage.login(testUser.username, testUser.password);
|
||||
});
|
||||
|
||||
afterAll(async () => {
|
||||
|
@@ -62,7 +62,7 @@ describe('Task cloud visibility', async () => {
|
||||
groupInfo = await groupIdentityService.getGroupInfoByGroupName('hr');
|
||||
await identityService.addUserToGroup(testUser.idIdentityService, groupInfo.id);
|
||||
|
||||
await loginSSOPage.login(testUser.email, testUser.password);
|
||||
await loginSSOPage.login(testUser.username, testUser.password);
|
||||
});
|
||||
|
||||
afterAll(async () => {
|
||||
|
@@ -80,7 +80,7 @@ describe('People Groups Cloud Component', () => {
|
||||
`${testUser.idIdentityService}`, `${devopsUser.idIdentityService}`];
|
||||
groups = [`${groupUser.id}`, `${groupAdmin.id}`, `${groupNoRole.id}`];
|
||||
|
||||
await loginSSOPage.login(testUser.email, testUser.password);
|
||||
await loginSSOPage.login(testUser.username, testUser.password);
|
||||
});
|
||||
|
||||
afterAll(async () => {
|
||||
|
@@ -57,7 +57,7 @@ describe('People Groups Cloud Component', () => {
|
||||
|
||||
users = [apsUser.idIdentityService, noRoleUser.idIdentityService, testUser.idIdentityService];
|
||||
|
||||
await loginSSOPage.login(apsUser.email, apsUser.password);
|
||||
await loginSSOPage.login(apsUser.username, apsUser.password);
|
||||
});
|
||||
|
||||
afterAll(async () => {
|
||||
|
@@ -57,7 +57,7 @@ describe('Process list cloud', () => {
|
||||
|
||||
groupInfo = await groupIdentityService.getGroupInfoByGroupName('hr');
|
||||
await identityService.addUserToGroup(testUser.idIdentityService, groupInfo.id);
|
||||
await apiService.login(testUser.email, testUser.password);
|
||||
await apiService.login(testUser.username, testUser.password);
|
||||
|
||||
const processDefinition = await processDefinitionService
|
||||
.getProcessDefinitionByName(browser.params.resources.ACTIVITI_CLOUD_APPS.CANDIDATE_BASE_APP.processes.candidateGroupProcess, candidateBaseApp);
|
||||
@@ -91,13 +91,13 @@ describe('Process list cloud', () => {
|
||||
const claimedTask = await tasksService.claimTask(task.list.entries[0].entry.id, candidateBaseApp);
|
||||
await tasksService.completeTask(claimedTask.entry.id, candidateBaseApp);
|
||||
|
||||
await loginSSOPage.login(testUser.email, testUser.password);
|
||||
await loginSSOPage.login(testUser.username, testUser.password);
|
||||
await LocalStorageUtil.setConfigField('adf-edit-process-filter', JSON.stringify(editProcessFilterConfigFile));
|
||||
await LocalStorageUtil.setConfigField('adf-cloud-process-list', JSON.stringify(processListCloudConfigFile));
|
||||
});
|
||||
|
||||
afterAll(async () => {
|
||||
await apiService.login(testUser.email, testUser.password);
|
||||
await apiService.login(testUser.username, testUser.password);
|
||||
await processInstancesService.deleteProcessInstance(anotherProcessInstance.entry.id, candidateBaseApp);
|
||||
await apiService.loginWithProfile('identityAdmin');
|
||||
await identityService.deleteIdentityUser(testUser.idIdentityService);
|
||||
|
@@ -79,7 +79,7 @@ describe('Process filters cloud', () => {
|
||||
await identityService.addUserToGroup(testUser.idIdentityService, groupInfo.id);
|
||||
await identityService.addUserToGroup(anotherUser.idIdentityService, groupInfo.id);
|
||||
|
||||
await apiService.login(anotherUser.email, anotherUser.password);
|
||||
await apiService.login(anotherUser.username, anotherUser.password);
|
||||
simpleAppProcessDefinition = await processDefinitionService
|
||||
.getProcessDefinitionByName(browser.params.resources.ACTIVITI_CLOUD_APPS.SIMPLE_APP.processes.simpleProcess, simpleApp);
|
||||
|
||||
@@ -88,7 +88,7 @@ describe('Process filters cloud', () => {
|
||||
'businessKey': StringUtil.generateRandomString()
|
||||
});
|
||||
|
||||
await apiService.login(testUser.email, testUser.password);
|
||||
await apiService.login(testUser.username, testUser.password);
|
||||
processDefinition = await processDefinitionService
|
||||
.getProcessDefinitionByName(browser.params.resources.ACTIVITI_CLOUD_APPS.CANDIDATE_BASE_APP.processes.candidateGroupProcess, candidateBaseApp);
|
||||
|
||||
@@ -120,7 +120,7 @@ describe('Process filters cloud', () => {
|
||||
const claimedTask = await tasksService.claimTask(task.list.entries[0].entry.id, candidateBaseApp);
|
||||
await tasksService.completeTask(claimedTask.entry.id, candidateBaseApp);
|
||||
|
||||
await loginSSOPage.login(testUser.email, testUser.password);
|
||||
await loginSSOPage.login(testUser.username, testUser.password);
|
||||
await LocalStorageUtil.setConfigField('adf-edit-process-filter', JSON.stringify(editProcessFilterConfigFile));
|
||||
await LocalStorageUtil.setConfigField('adf-cloud-process-list', JSON.stringify(processListCloudConfigFile));
|
||||
});
|
||||
@@ -130,7 +130,7 @@ describe('Process filters cloud', () => {
|
||||
await processInstancesService.deleteProcessInstance(anotherProcessInstance.entry.id, candidateBaseApp);
|
||||
await processInstancesService.deleteProcessInstance(suspendProcessInstance.entry.id, candidateBaseApp);
|
||||
|
||||
await apiService.login(anotherUser.email, anotherUser.password);
|
||||
await apiService.login(anotherUser.username, anotherUser.password);
|
||||
await processInstancesService.deleteProcessInstance(differentAppUserProcessInstance.entry.id, simpleApp);
|
||||
|
||||
await apiService.loginWithProfile('identityAdmin');
|
||||
|
@@ -63,7 +63,7 @@ describe('Process filters cloud', () => {
|
||||
|
||||
groupInfo = await groupIdentityService.getGroupInfoByGroupName('hr');
|
||||
await identityService.addUserToGroup(testUser.idIdentityService, groupInfo.id);
|
||||
await apiService.login(testUser.email, testUser.password);
|
||||
await apiService.login(testUser.username, testUser.password);
|
||||
|
||||
const processDefinition = await processDefinitionService
|
||||
.getProcessDefinitionByName(browser.params.resources.ACTIVITI_CLOUD_APPS.CANDIDATE_BASE_APP.processes.candidateGroupProcess, candidateBaseApp);
|
||||
@@ -82,7 +82,7 @@ describe('Process filters cloud', () => {
|
||||
const claimedTask = await tasksService.claimTask(task.list.entries[0].entry.id, candidateBaseApp);
|
||||
await tasksService.completeTask(claimedTask.entry.id, candidateBaseApp);
|
||||
|
||||
await loginSSOPage.login(testUser.email, testUser.password);
|
||||
await loginSSOPage.login(testUser.username, testUser.password);
|
||||
|
||||
}, 5 * 60 * 1000);
|
||||
|
||||
|
@@ -60,7 +60,7 @@ describe('Process Header cloud component', () => {
|
||||
groupInfo = await groupIdentityService.getGroupInfoByGroupName('hr');
|
||||
await identityService.addUserToGroup(testUser.idIdentityService, groupInfo.id);
|
||||
|
||||
await apiService.login(testUser.email, testUser.password);
|
||||
await apiService.login(testUser.username, testUser.password);
|
||||
|
||||
const dropdownRestProcess = await processDefinitionService.getProcessDefinitionByName(browser.params.resources.ACTIVITI_CLOUD_APPS.SIMPLE_APP.processes.dropdownrestprocess, simpleApp);
|
||||
|
||||
@@ -81,7 +81,7 @@ describe('Process Header cloud component', () => {
|
||||
|
||||
completedCreatedDate = moment(childCompleteProcess.entry.startDate).format(formatDate);
|
||||
|
||||
await loginSSOPage.login(testUser.email, testUser.password);
|
||||
await loginSSOPage.login(testUser.username, testUser.password);
|
||||
await LocalStorageUtil.setConfigField('adf-edit-process-filter', JSON.stringify(editProcessFilterConfigFile));
|
||||
});
|
||||
|
||||
|
@@ -58,7 +58,7 @@ describe('Process list cloud', () => {
|
||||
groupInfo = await groupIdentityService.getGroupInfoByGroupName('hr');
|
||||
await identityService.addUserToGroup(testUser.idIdentityService, groupInfo.id);
|
||||
|
||||
await apiService.login(testUser.email, testUser.password);
|
||||
await apiService.login(testUser.username, testUser.password);
|
||||
const processDefinition = await processDefinitionService
|
||||
.getProcessDefinitionByName(browser.params.resources.ACTIVITI_CLOUD_APPS.SIMPLE_APP.processes.simpleProcess, simpleApp);
|
||||
|
||||
@@ -71,7 +71,7 @@ describe('Process list cloud', () => {
|
||||
'businessKey': StringUtil.generateRandomString()
|
||||
});
|
||||
|
||||
await loginSSOPage.login(testUser.email, testUser.password);
|
||||
await loginSSOPage.login(testUser.username, testUser.password);
|
||||
|
||||
await navigationBarPage.navigateToProcessServicesCloudPage();
|
||||
await appListCloudComponent.checkApsContainer();
|
||||
|
@@ -58,7 +58,7 @@ describe('Process list cloud', () => {
|
||||
groupInfo = await groupIdentityService.getGroupInfoByGroupName('hr');
|
||||
await identityService.addUserToGroup(testUser.idIdentityService, groupInfo.id);
|
||||
|
||||
await apiService.login(testUser.email, testUser.password);
|
||||
await apiService.login(testUser.username, testUser.password);
|
||||
const processDefinition = await processDefinitionService
|
||||
.getProcessDefinitionByName(browser.params.resources.ACTIVITI_CLOUD_APPS.SIMPLE_APP.processes.simpleProcess, simpleApp);
|
||||
|
||||
@@ -67,7 +67,7 @@ describe('Process list cloud', () => {
|
||||
processInstances.push(response.entry.id);
|
||||
}
|
||||
|
||||
await loginSSOPage.login(testUser.email, testUser.password);
|
||||
await loginSSOPage.login(testUser.username, testUser.password);
|
||||
await LocalStorageUtil.setConfigField('adf-edit-process-filter', JSON.stringify(editProcessFilterConfigFile));
|
||||
});
|
||||
|
||||
|
@@ -87,18 +87,18 @@ describe('Process Task - Attach content file', () => {
|
||||
groupInfo = await groupIdentityService.getGroupInfoByGroupName('hr');
|
||||
await identityService.addUserToGroup(testUser.idIdentityService, groupInfo.id);
|
||||
|
||||
await apiService.login(testUser.email, testUser.password);
|
||||
await apiService.login(testUser.username, testUser.password);
|
||||
const processDefinition = await processDefinitionService.getProcessDefinitionByName(processDefinitionName, simpleApp);
|
||||
processInstance = await processInstancesService.createProcessInstance(processDefinition.entry.key, simpleApp, { name: 'upload process' });
|
||||
|
||||
const task = await queryService.getProcessInstanceTasks(processInstance.entry.id, simpleApp);
|
||||
await tasksService.claimTask(task.list.entries[0].entry.id, simpleApp);
|
||||
await apiService.login(testUser.email, testUser.password);
|
||||
await apiService.login(testUser.username, testUser.password);
|
||||
uploadedFolder = await uploadActions.createFolder(folderName, '-my-');
|
||||
await uploadActions.uploadFile(pdfFileOne.location, pdfFileOne.name, uploadedFolder.entry.id);
|
||||
await uploadActions.uploadFile(pdfFileTwo.location, pdfFileTwo.name, uploadedFolder.entry.id);
|
||||
|
||||
await loginSSOPage.login(testUser.email, testUser.password);
|
||||
await loginSSOPage.login(testUser.username, testUser.password);
|
||||
await navigationBarPage.navigateToProcessServicesCloudPage();
|
||||
await appListCloudComponent.checkApsContainer();
|
||||
});
|
||||
|
@@ -48,7 +48,7 @@ describe('Start Process', () => {
|
||||
groupInfo = await groupIdentityService.getGroupInfoByGroupName('hr');
|
||||
await identityService.addUserToGroup(testUser.idIdentityService, groupInfo.id);
|
||||
|
||||
await loginSSOPage.login(testUser.email, testUser.password);
|
||||
await loginSSOPage.login(testUser.username, testUser.password);
|
||||
|
||||
await navigationBarPage.navigateToProcessServicesCloudPage();
|
||||
await appListCloudComponent.checkApsContainer();
|
||||
|
@@ -101,7 +101,7 @@ describe('Start Task Form', () => {
|
||||
groupInfo = await groupIdentityService.getGroupInfoByGroupName('hr');
|
||||
await identityService.addUserToGroup(testUser.idIdentityService, groupInfo.id);
|
||||
|
||||
await apiService.login(testUser.email, testUser.password);
|
||||
await apiService.login(testUser.username, testUser.password);
|
||||
processDefinitionService = new ProcessDefinitionsService(apiService);
|
||||
processInstancesService = new ProcessInstancesService(apiService);
|
||||
processDefinition = await processDefinitionService
|
||||
@@ -141,18 +141,18 @@ describe('Start Task Form', () => {
|
||||
'businessKey': StringUtil.generateRandomString()
|
||||
});
|
||||
|
||||
await apiService.login(testUser.email, testUser.password);
|
||||
await apiService.login(testUser.username, testUser.password);
|
||||
uploadedFolder = await uploadActions.createFolder(folderName, '-my-');
|
||||
await uploadActions.uploadFile(testFileModel.location, testFileModel.name, uploadedFolder.entry.id);
|
||||
await uploadActions.uploadFile(pdfFileModel.location, pdfFileModel.name, uploadedFolder.entry.id);
|
||||
|
||||
await loginSSOPage.login(testUser.email, testUser.password);
|
||||
await loginSSOPage.login(testUser.username, testUser.password);
|
||||
await LocalStorageUtil.setConfigField('adf-cloud-start-process', JSON.stringify(startProcessCloudConfig));
|
||||
});
|
||||
|
||||
afterAll(async () => {
|
||||
await uploadActions.deleteFileOrFolder(uploadedFolder.entry.id);
|
||||
await apiService.login(testUser.email, testUser.password);
|
||||
await apiService.login(testUser.username, testUser.password);
|
||||
const standaloneTaskId = await tasksService.getTaskId(standaloneTaskName, candidateBaseApp);
|
||||
await tasksService.deleteTask(standaloneTaskId, candidateBaseApp);
|
||||
|
||||
|
@@ -67,9 +67,9 @@ describe('Start Task', () => {
|
||||
groupInfo = await groupIdentityService.getGroupInfoByGroupName('hr');
|
||||
await identityService.addUserToGroup(testUser.idIdentityService, groupInfo.id);
|
||||
await identityService.addUserToGroup(apsUser.idIdentityService, groupInfo.id);
|
||||
await apiService.login(testUser.email, testUser.password);
|
||||
await apiService.login(testUser.username, testUser.password);
|
||||
|
||||
await loginSSOPage.login(testUser.email, testUser.password);
|
||||
await loginSSOPage.login(testUser.username, testUser.password);
|
||||
});
|
||||
|
||||
afterAll(async () => {
|
||||
@@ -80,7 +80,7 @@ describe('Start Task', () => {
|
||||
taskId = await tasksService.getTaskId(unassignedTaskName, simpleApp);
|
||||
await tasksService.deleteTask(taskId, simpleApp);
|
||||
|
||||
await apiService.login(apsUser.email, apsUser.password);
|
||||
await apiService.login(apsUser.username, apsUser.password);
|
||||
taskId = await tasksService.getTaskId(reassignTaskName, simpleApp);
|
||||
await tasksService.deleteTask(taskId, simpleApp);
|
||||
|
||||
|
@@ -63,11 +63,11 @@ describe('Start Task - Group Cloud Component', () => {
|
||||
await identityService.addUserToGroup(testUser.idIdentityService, hrGroup.id);
|
||||
await identityService.addUserToGroup(apsUser.idIdentityService, testGroup.id);
|
||||
|
||||
await loginSSOPage.login(testUser.email, testUser.password);
|
||||
await loginSSOPage.login(testUser.username, testUser.password);
|
||||
});
|
||||
|
||||
afterAll(async () => {
|
||||
await apiService.login(testUser.email, testUser.password);
|
||||
await apiService.login(testUser.username, testUser.password);
|
||||
const tasksService = new TasksService(apiService);
|
||||
|
||||
const bothGroupsTaskId = await tasksService.getTaskId(bothGroupsTaskName, simpleApp);
|
||||
|
@@ -57,9 +57,9 @@ describe('Task filters cloud', () => {
|
||||
groupInfo = await groupIdentityService.getGroupInfoByGroupName('hr');
|
||||
await identityService.addUserToGroup(testUser.idIdentityService, groupInfo.id);
|
||||
|
||||
await apiService.login(testUser.email, testUser.password);
|
||||
await apiService.login(testUser.username, testUser.password);
|
||||
|
||||
await loginSSOPage.login(testUser.email, testUser.password);
|
||||
await loginSSOPage.login(testUser.username, testUser.password);
|
||||
});
|
||||
|
||||
afterAll(async () => {
|
||||
|
@@ -94,7 +94,7 @@ describe('Task form cloud component', () => {
|
||||
const groupInfo = await groupIdentityService.getGroupInfoByGroupName('hr');
|
||||
await identityService.addUserToGroup(testUser.idIdentityService, groupInfo.id);
|
||||
|
||||
await apiServiceHrUser.login(testUser.email, testUser.password);
|
||||
await apiServiceHrUser.login(testUser.username, testUser.password);
|
||||
const tasksService = new TasksService(apiServiceHrUser);
|
||||
|
||||
assigneeTask = await tasksService.createStandaloneTask(StringUtil.generateRandomString(), candidateBaseApp);
|
||||
@@ -139,7 +139,7 @@ describe('Task form cloud component', () => {
|
||||
processInstancesService = new ProcessInstancesService(apiServiceHrUser);
|
||||
await processInstancesService.createProcessInstance(processDefinition.entry.key, candidateBaseApp);
|
||||
|
||||
await loginSSOPage.login(testUser.email, testUser.password);
|
||||
await loginSSOPage.login(testUser.username, testUser.password);
|
||||
|
||||
}, 5 * 60 * 1000);
|
||||
|
||||
|
@@ -102,7 +102,7 @@ describe('Task Header cloud component', () => {
|
||||
testUser = await identityService.createIdentityUserWithRole( [identityService.ROLES.ACTIVITI_USER]);
|
||||
groupInfo = await groupIdentityService.getGroupInfoByGroupName('hr');
|
||||
await identityService.addUserToGroup(testUser.idIdentityService, groupInfo.id);
|
||||
await apiService.login(testUser.email, testUser.password);
|
||||
await apiService.login(testUser.username, testUser.password);
|
||||
|
||||
unclaimedTask = await tasksService.createStandaloneTask(unclaimedTaskName, simpleApp);
|
||||
|
||||
@@ -119,7 +119,7 @@ describe('Task Header cloud component', () => {
|
||||
subTaskCreatedDate = moment(subTask.entry.createdDate).format(formatDate);
|
||||
|
||||
await browser.sleep(3000);
|
||||
await loginSSOPage.login(testUser.email, testUser.password);
|
||||
await loginSSOPage.login(testUser.username, testUser.password);
|
||||
});
|
||||
|
||||
afterAll(async () => {
|
||||
|
@@ -48,7 +48,7 @@ describe('Process list cloud', () => {
|
||||
groupInfo = await groupIdentityService.getGroupInfoByGroupName('hr');
|
||||
await identityService.addUserToGroup(testUser.idIdentityService, groupInfo.id);
|
||||
|
||||
await apiService.login(testUser.email, testUser.password);
|
||||
await apiService.login(testUser.username, testUser.password);
|
||||
const processDefinition = await processDefinitionService
|
||||
.getProcessDefinitionByName(browser.params.resources.ACTIVITI_CLOUD_APPS.SIMPLE_APP.processes.dropdownrestprocess, simpleApp);
|
||||
|
||||
@@ -60,7 +60,7 @@ describe('Process list cloud', () => {
|
||||
await tasksService.claimTask(editTask.list.entries[0].entry.id, simpleApp);
|
||||
await tasksService.claimTask(deleteTask.list.entries[0].entry.id, simpleApp);
|
||||
|
||||
await loginSSOPage.login(testUser.email, testUser.password);
|
||||
await loginSSOPage.login(testUser.username, testUser.password);
|
||||
});
|
||||
|
||||
afterAll(async() => {
|
||||
|
@@ -50,7 +50,7 @@ describe('Edit task filters and task list properties', () => {
|
||||
groupInfo = await groupIdentityService.getGroupInfoByGroupName('hr');
|
||||
await identityService.addUserToGroup(testUser.idIdentityService, groupInfo.id);
|
||||
|
||||
await apiService.login(testUser.email, testUser.password);
|
||||
await apiService.login(testUser.username, testUser.password);
|
||||
|
||||
otherOwnerTask = await tasksService.createStandaloneTask(StringUtil.generateRandomString(), simpleApp);
|
||||
await tasksService.claimTask(otherOwnerTask.entry.id, simpleApp);
|
||||
@@ -75,7 +75,7 @@ describe('Edit task filters and task list properties', () => {
|
||||
|
||||
const jsonFile = new TaskListCloudConfiguration().getConfiguration();
|
||||
|
||||
await loginSSOPage.login(testUser.email, testUser.password);
|
||||
await loginSSOPage.login(testUser.username, testUser.password);
|
||||
await LocalStorageUtil.setConfigField('adf-cloud-task-list', JSON.stringify(jsonFile));
|
||||
await LocalStorageUtil.setConfigField('adf-edit-task-filter', JSON.stringify({
|
||||
'filterProperties': [
|
||||
|
@@ -62,7 +62,7 @@ describe('Edit task filters and task list properties', () => {
|
||||
groupInfo = await groupIdentityService.getGroupInfoByGroupName('hr');
|
||||
await identityService.addUserToGroup(testUser.idIdentityService, groupInfo.id);
|
||||
|
||||
await apiService.login(testUser.email, testUser.password);
|
||||
await apiService.login(testUser.username, testUser.password);
|
||||
|
||||
otherOwnerTask = await tasksService.createStandaloneTask(StringUtil.generateRandomString(), simpleApp);
|
||||
await tasksService.claimTask(otherOwnerTask.entry.id, simpleApp);
|
||||
@@ -88,7 +88,7 @@ describe('Edit task filters and task list properties', () => {
|
||||
|
||||
const jsonFile = new TaskListCloudConfiguration().getConfiguration();
|
||||
|
||||
await loginSSOPage.login(testUser.email, testUser.password);
|
||||
await loginSSOPage.login(testUser.username, testUser.password);
|
||||
await LocalStorageUtil.setConfigField('adf-cloud-task-list', JSON.stringify(jsonFile));
|
||||
await LocalStorageUtil.setConfigField('adf-edit-task-filter', JSON.stringify(taskFilterConfiguration));
|
||||
}, 5 * 60 * 1000);
|
||||
|
@@ -55,7 +55,7 @@ describe('Task list cloud - selection', () => {
|
||||
|
||||
groupInfo = await groupIdentityService.getGroupInfoByGroupName('hr');
|
||||
await identityService.addUserToGroup(testUser.idIdentityService, groupInfo.id);
|
||||
await apiService.login(testUser.email, testUser.password);
|
||||
await apiService.login(testUser.username, testUser.password);
|
||||
|
||||
for (let i = 0; i < noOfTasks; i++) {
|
||||
response = await tasksService.createStandaloneTask(StringUtil.generateRandomString(), simpleApp);
|
||||
@@ -63,7 +63,7 @@ describe('Task list cloud - selection', () => {
|
||||
tasks.push(response.entry.name);
|
||||
}
|
||||
|
||||
await loginSSOPage.login(testUser.email, testUser.password);
|
||||
await loginSSOPage.login(testUser.username, testUser.password);
|
||||
});
|
||||
|
||||
afterAll(async () => {
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user