mirror of
https://github.com/Alfresco/alfresco-ng2-components.git
synced 2026-09-16 18:13:06 +00:00
Compare commits
95
Commits
3.4.0
...
3.5.0-beta8
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
2b8703a74c | ||
|
|
9cea94a853 | ||
|
|
dcd86ff3b3 | ||
|
|
ddb5fb445c | ||
|
|
27c36ad4a2 | ||
|
|
8766dc18a6 | ||
|
|
a2fedee05f | ||
|
|
ce50e9a3d3 | ||
|
|
42c9a2e833 | ||
|
|
1cb4dfc1b8 | ||
|
|
be867b0c0c | ||
|
|
2b1250cae7 | ||
|
|
3bebc7a18c | ||
|
|
9e1a90adc8 | ||
|
|
537d5b912f | ||
|
|
073ece2d02 | ||
|
|
f69b3646ae | ||
|
|
31bec59a16 | ||
|
|
505e8204e2 | ||
|
|
52210594ad | ||
|
|
a6ee26b35b | ||
|
|
52af042450 | ||
|
|
6c81cbc832 | ||
|
|
9f7f6c0427 | ||
|
|
ee71866702 | ||
|
|
b25d989853 | ||
|
|
6590b59de0 | ||
|
|
d7ff927b79 | ||
|
|
edc0945f39 | ||
|
|
140c64b79f | ||
|
|
a588a64937 | ||
|
|
ac28b959ee | ||
|
|
24e1794fb9 | ||
|
|
f35f0466e6 | ||
|
|
e5f7d2f304 | ||
|
|
c6ddfe46cf | ||
|
|
df37455edd | ||
|
|
01ff4dfa52 | ||
|
|
43df299096 | ||
|
|
cdfae95c2a | ||
|
|
64cecaa125 | ||
|
|
c35fee473b | ||
|
|
609ae3a3ff | ||
|
|
09d3710bcf | ||
|
|
36b76821d0 | ||
|
|
151fef16f4 | ||
|
|
88f9678571 | ||
|
|
329a8a5348 | ||
|
|
29533e751d | ||
|
|
c4adfd49c0 | ||
|
|
4c468530d9 | ||
|
|
bfc132eeff | ||
|
|
ee9ed24844 | ||
|
|
8a48738b99 | ||
|
|
3aed425020 | ||
|
|
d8961ea904 | ||
|
|
bfc3f30674 | ||
|
|
30d03cf540 | ||
|
|
8c00919db0 | ||
|
|
8c159babe0 | ||
|
|
73601dfcfb | ||
|
|
027e29964c | ||
|
|
9a90e58f0c | ||
|
|
8875113a4a | ||
|
|
de5bf9dc88 | ||
|
|
3b4f3ae7b7 | ||
|
|
ea2bfa8021 | ||
|
|
6918944a63 | ||
|
|
89b832ff18 | ||
|
|
11e1bd7a59 | ||
|
|
3aa2e56c02 | ||
|
|
453461f8ca | ||
|
|
1407bff208 | ||
|
|
7ab054f7e1 | ||
|
|
9bd08f4968 | ||
|
|
e27e99b551 | ||
|
|
1c37fdab81 | ||
|
|
711a461f8b | ||
|
|
0650502b8a | ||
|
|
f3ab69474d | ||
|
|
023476e14f | ||
|
|
9960a37e9a | ||
|
|
643510ed45 | ||
|
|
329f8b21bf | ||
|
|
6c969dda56 | ||
|
|
e7c0852051 | ||
|
|
f5c5e7cf9e | ||
|
|
83412bb9b6 | ||
|
|
4f3cf669f2 | ||
|
|
e65a1db7e9 | ||
|
|
9873e9952a | ||
|
|
9ca61975a5 | ||
|
|
3453cacaea | ||
|
|
b176a43fba | ||
|
|
eb2811fdd0 |
@@ -23,3 +23,4 @@ e2e-output/
|
||||
/protractorFailuresReport
|
||||
coverage/
|
||||
/desktop.ini
|
||||
out-tsc
|
||||
|
||||
+80
-23
@@ -22,10 +22,24 @@ branches:
|
||||
|
||||
# TRAVIS_PULL_REQUEST == false means is running on dev branch and is not a PR
|
||||
stages:
|
||||
- name: Warm Up Cache & Lint & Build Dist
|
||||
- name: Lint & Build Dist
|
||||
if: type = pull_request
|
||||
- name: Lint & Build Dist & Release
|
||||
if: type = push OR type = cron AND tag IS blank
|
||||
- name: Check bundle
|
||||
if: type = push AND tag IS blank
|
||||
- name: Unit test
|
||||
if: type != cron AND tag IS blank
|
||||
- name: Update Rancher
|
||||
if: type = push AND tag IS blank
|
||||
- name: e2e Test
|
||||
- name: Deploy PR
|
||||
if: type != cron AND tag IS blank
|
||||
- name: Update Rancher PR
|
||||
if: type = pull_request
|
||||
- name: Update Children Projects
|
||||
if: branch = master AND type = push OR (tag =~ .*beta.*)
|
||||
- name: Release beta tag
|
||||
if: type = cron
|
||||
|
||||
addons:
|
||||
chrome: stable
|
||||
@@ -41,10 +55,25 @@ before_install:
|
||||
|
||||
jobs:
|
||||
include:
|
||||
- stage: Warm Up Cache & Lint & Build Dist
|
||||
name: Warm Up Cache & Lint & Build Dist
|
||||
# Run Only for any PR
|
||||
- stage: Lint & Build Dist
|
||||
name: Lint & Build Dist
|
||||
script:
|
||||
./scripts/travis/build/build.sh
|
||||
- ./scripts/travis/build/build.sh || exit 1;
|
||||
- ./scripts/lint.sh || exit 1;
|
||||
|
||||
# Run Only on Development and master
|
||||
- stage: Lint & Build Dist & Release
|
||||
name: Lint & Build Dist & Release
|
||||
script:
|
||||
- ./scripts/travis/build/build.sh || exit 1;
|
||||
- ./scripts/lint.sh || exit 1;
|
||||
- ./scripts/travis/release/release.sh
|
||||
- TAG_VERSION=$(./scripts/travis/deploy/tag-travis-branch.sh)
|
||||
- echo "Running the docker with tag" $TAG_VERSION
|
||||
- ./node_modules/@alfresco/adf-cli/bin/adf-cli docker-publish --loginCheck --loginUsername "$DOCKER_REPOSITORY_USER" --loginPassword "$DOCKER_REPOSITORY_PASSWORD" --loginRepo "$DOCKER_REPOSITORY_DOMAIN" --dockerRepo "$DOCKER_REPOSITORY" --dockerTags "$TAG_VERSION" --pathProject "$(pwd)"
|
||||
|
||||
|
||||
- stage: Unit test
|
||||
name: Unit test content
|
||||
script: ./scripts/travis/unit-test/content.sh
|
||||
@@ -54,37 +83,65 @@ jobs:
|
||||
- stage: Unit test
|
||||
name: Unit test process process-cloud insights
|
||||
script: ./scripts/travis/unit-test/process.sh
|
||||
- stage: Deploy PR
|
||||
name: Deploy PR
|
||||
script:
|
||||
./scripts/travis/deploy/deploy.sh
|
||||
- stage: Update children projects dependency #Update children projects dependency
|
||||
name: Update Related Project
|
||||
if: tag =~ .*beta.*
|
||||
|
||||
|
||||
- stage: Update Children Projects
|
||||
script: ./scripts/travis/update/update-children.sh
|
||||
|
||||
- stage: Release beta tag
|
||||
script: ./scripts/travis/release/git-tag-beta.sh
|
||||
|
||||
|
||||
- stage: e2e Test
|
||||
name: core
|
||||
script: ./scripts/travis/e2e/core-e2e.sh
|
||||
- stage: e2e Test
|
||||
name: content
|
||||
script:
|
||||
./scripts/travis/e2e/content-services-e2e.sh
|
||||
script: ./scripts/travis/e2e/content-services-e2e.sh
|
||||
- stage: e2e Test
|
||||
name: search
|
||||
script:
|
||||
./scripts/travis/e2e/search-e2e.sh
|
||||
script: ./scripts/travis/e2e/search-e2e.sh
|
||||
- stage: e2e Test
|
||||
name: process
|
||||
script:
|
||||
./scripts/travis/e2e/process-services-e2e.sh
|
||||
script: ./scripts/travis/e2e/process-services-e2e.sh
|
||||
- stage: e2e Test
|
||||
name: process Cloud
|
||||
script:
|
||||
./scripts/travis/e2e/process-services-cloud-e2e.sh
|
||||
script: ./scripts/travis/e2e/process-services-cloud-e2e.sh
|
||||
|
||||
# Send coverage data to codecov
|
||||
after_success:
|
||||
bash <(curl -s https://codecov.io/bash) -X gcov
|
||||
|
||||
- stage: Check bundle
|
||||
script:
|
||||
- ADF_VERSION=$(npm view @alfresco/adf-core@${TAG_NPM} version)
|
||||
- ./scripts/npm-check-bundles.sh -v ${ADF_VERSION}
|
||||
|
||||
|
||||
- stage: Update Rancher
|
||||
script:
|
||||
- TAG_VERSION=$(./scripts/travis/deploy/tag-travis-branch.sh)
|
||||
- echo "Update rancher with docker tag" $TAG_VERSION --url $REPO_RANCHER --environment_name $REPO_RANCHER_ADF_NAME
|
||||
- ./scripts/rancher-update.sh --access_key $RANCHER_TOKEN --secret_key $RANCHER_SECRET --url $REPO_RANCHER --environment_name $REPO_RANCHER_ADF_NAME --image docker:$DOCKER_REPOSITORY:$TAG_VERSION
|
||||
|
||||
|
||||
- stage: Update Rancher PR
|
||||
name: Update Rancher PR
|
||||
script: ./scripts/travis/deploy/deploy.sh
|
||||
|
||||
|
||||
before_deploy:
|
||||
# Set up git user name and tag this commit
|
||||
- git config --local user.name "Alfresco"
|
||||
- export TRAVIS_TAG=$(cat package.json | grep version | head -1 | awk -F= "{ print $2 }" | sed 's/[version:,\",]//g' | tr -d '[[:space:]]')
|
||||
- echo "Create tag:" $TRAVIS_TAG
|
||||
- git tag $TRAVIS_TAG
|
||||
|
||||
deploy:
|
||||
provider: releases
|
||||
api_key: $GITHUB_TOKEN
|
||||
name: $TRAVIS_TAG
|
||||
body: "Add the release note"
|
||||
skip_cleanup: true
|
||||
on:
|
||||
branch: master
|
||||
|
||||
cache:
|
||||
directories:
|
||||
|
||||
+7
-3
@@ -227,7 +227,8 @@
|
||||
"./demo-shell/src/tsconfig.app.json"
|
||||
],
|
||||
"exclude": [
|
||||
"**/node_modules/**/*"
|
||||
"**/node_modules/**/*",
|
||||
"package.json"
|
||||
]
|
||||
}
|
||||
}
|
||||
@@ -525,7 +526,8 @@
|
||||
"./demo-shell/src/tsconfig.app.json"
|
||||
],
|
||||
"exclude": [
|
||||
"**/node_modules/**/*"
|
||||
"**/node_modules/**/*",
|
||||
"package.json"
|
||||
]
|
||||
}
|
||||
}
|
||||
@@ -559,7 +561,9 @@
|
||||
"lint": {
|
||||
"builder": "@angular-devkit/build-angular:tslint",
|
||||
"options": {
|
||||
"tsConfig": [],
|
||||
"tsConfig": [
|
||||
"./e2e/tsconfig.e2e.json"
|
||||
],
|
||||
"exclude": [
|
||||
"**/node_modules/**/*"
|
||||
]
|
||||
|
||||
@@ -1,63 +0,0 @@
|
||||
# Test against this version of Node.js
|
||||
branches:
|
||||
only:
|
||||
- master
|
||||
- development
|
||||
- dev-build-test
|
||||
|
||||
environment:
|
||||
nodejs_version: "8"
|
||||
|
||||
matrix:
|
||||
- COMPONENT_NAME: process-service
|
||||
- COMPONENT_NAME: content-service
|
||||
- COMPONENT_NAME: core
|
||||
- COMPONENT_NAME: insights
|
||||
# - COMPONENT_NAME: ng2-demo-shell
|
||||
|
||||
# Install scripts. (runs after repo cloning)
|
||||
install:
|
||||
# Get the latest stable version of Node.js or io.js
|
||||
- ps: Install-Product node $env:nodejs_version
|
||||
# install module
|
||||
- if %COMPONENT_NAME% EQU process-service (
|
||||
if %APPVEYOR_REPO_BRANCH EQU master
|
||||
(cd scripts && sh npm-build-all.sh -t "process-services" || exit 1)
|
||||
else
|
||||
(cd scripts && sh npm-build-all.sh -t "process-services" -vjsapi alpha|| exit 1)
|
||||
)
|
||||
- if %COMPONENT_NAME% EQU content-service (
|
||||
if %APPVEYOR_REPO_BRANCH EQU master
|
||||
(cd scripts && sh npm-build-all.sh -t "content-services" || exit 1)
|
||||
else
|
||||
(cd scripts && sh npm-build-all.sh -t "content-services" -vjsapi alpha|| exit 1)
|
||||
)
|
||||
- if %COMPONENT_NAME% EQU insights (
|
||||
if %APPVEYOR_REPO_BRANCH EQU master
|
||||
(cd scripts && sh npm-build-all.sh -t "insights" || exit 1)
|
||||
else
|
||||
(cd scripts && sh npm-build-all.sh -t "insights" -vjsapi alpha|| exit 1)
|
||||
)
|
||||
- if %COMPONENT_NAME% EQU core (
|
||||
if %APPVEYOR_REPO_BRANCH EQU master
|
||||
(cd scripts && sh npm-build-all.sh -t "core" || exit 1)
|
||||
else
|
||||
(cd scripts && sh npm-build-all.sh -t "core" -vjsapi alpha|| exit 1)
|
||||
)
|
||||
- if %COMPONENT_NAME% EQU process-service-cloud (
|
||||
if %APPVEYOR_REPO_BRANCH EQU master
|
||||
(cd scripts && sh npm-build-all.sh -t "process-services-cloud" || exit 1)
|
||||
else
|
||||
(cd scripts && sh npm-build-all.sh -t "process-services-cloud" -vjsapi alpha|| exit 1)
|
||||
)
|
||||
# - if %COMPONENT_NAME% EQU ng2-demo-shell (
|
||||
# if %APPVEYOR_REPO_BRANCH EQU master
|
||||
# (cd scripts && sh start.sh -t -ss || exit 1)
|
||||
# else
|
||||
# (cd scripts && sh start.sh -dev -t -ss -vjsapi alpha || exit 1)
|
||||
# )
|
||||
|
||||
# Don't actually build.
|
||||
build: off
|
||||
matrix:
|
||||
fast_finish: true
|
||||
@@ -304,23 +304,25 @@
|
||||
"ROLE_FILTER_MODE": "Filter by role",
|
||||
"PRESELECT_VALIDATION": "Preselect validation"
|
||||
},
|
||||
"ABOUT": {
|
||||
"TITLE": "Plugins",
|
||||
"TABLE_HEADERS": {
|
||||
"ID": "ID",
|
||||
"NAME": "Name",
|
||||
"VERSION": "Version",
|
||||
"VENDOR": "Vendor",
|
||||
"LICENSE": "License",
|
||||
"RUNTIME": "Runtime",
|
||||
"DESCRIPTION": "Description"
|
||||
}
|
||||
},
|
||||
"SETTINGS_CLOUD": {
|
||||
"MULTISELECTION": "Multiselection",
|
||||
"TESTING_MODE": "Testing Mode",
|
||||
"SELECTION_MODE": "Selection Mode",
|
||||
"SELECTED_ROWS": "Selected rows",
|
||||
"TASK_DETAILS_REDIRECTION": "Display task details on task click",
|
||||
"PROCESS_DETAILS_REDIRECTION": "Display process details on process click"
|
||||
"PROCESS_DETAILS_REDIRECTION": "Display process details on process click",
|
||||
"ACTION": {
|
||||
"ACTION_TITLE": "Add Action",
|
||||
"ACTION_MENU": "Action Menu",
|
||||
"CONTEX_MENU": "Context Menu",
|
||||
"ACTION_VISIBLE": "Visible",
|
||||
"ACTION_DISABLE": "Disable",
|
||||
"ADD_BUTTON": "Add",
|
||||
"KEY": "Key",
|
||||
"TITLE": "Title",
|
||||
"ICON": "Icon",
|
||||
"PROCESS_ID": "ProcessInstanceId",
|
||||
"ACTION_TYPE": "Action Type"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1 +1,5 @@
|
||||
<adf-about></adf-about>
|
||||
<adf-about
|
||||
[githubUrlCommitAlpha]="githubUrlCommitAlpha"
|
||||
[version]="version"
|
||||
[dependencies]="dependencies">
|
||||
</adf-about>
|
||||
|
||||
@@ -16,6 +16,7 @@
|
||||
*/
|
||||
|
||||
import { Component } from '@angular/core';
|
||||
import { name, version, commit, dependencies } from '../../../../../package.json';
|
||||
|
||||
@Component({
|
||||
selector: 'app-about-page',
|
||||
@@ -24,6 +25,10 @@ import { Component } from '@angular/core';
|
||||
})
|
||||
export class AboutComponent {
|
||||
|
||||
githubUrlCommitAlpha = `https://github.com/Alfresco/${name}/commits/${commit}`;
|
||||
version = version;
|
||||
dependencies = dependencies;
|
||||
|
||||
constructor() {
|
||||
|
||||
}
|
||||
|
||||
@@ -55,7 +55,7 @@
|
||||
</ng-container>
|
||||
</ng-container>
|
||||
|
||||
<mat-list-item adf-logout [enableRedirect]="enableRedirect" redirectUri="/logout" class="adf-sidenav-link">
|
||||
<mat-list-item adf-logout [enableRedirect]="enableRedirect" redirectUri="/logout" class="adf-sidenav-link" data-automation-id="Logout" >
|
||||
<mat-icon matListIcon>exit_to_app</mat-icon>
|
||||
<span matLine *ngIf="!isMenuMinimized()">Logout</span>
|
||||
</mat-list-item>
|
||||
|
||||
@@ -16,8 +16,9 @@
|
||||
*/
|
||||
|
||||
import { Component, ViewEncapsulation } from '@angular/core';
|
||||
import { PeopleCloudComponent, GroupCloudComponent, GroupModel } from '@alfresco/adf-process-services-cloud';
|
||||
import { PeopleCloudComponent, GroupCloudComponent } from '@alfresco/adf-process-services-cloud';
|
||||
import { MatRadioChange, MatCheckboxChange } from '@angular/material';
|
||||
import { IdentityGroupModel } from '@alfresco/adf-core';
|
||||
|
||||
@Component({
|
||||
selector: 'app-people-groups-cloud',
|
||||
@@ -39,8 +40,8 @@ export class PeopleGroupCloudDemoComponent {
|
||||
peoplePreselectValidation: Boolean = false;
|
||||
|
||||
groupMode: string = GroupCloudComponent.MODE_SINGLE;
|
||||
preSelectGroup: GroupModel[] = [];
|
||||
selectedGroupList: GroupModel[] = [];
|
||||
preSelectGroup: IdentityGroupModel[] = [];
|
||||
selectedGroupList: IdentityGroupModel[] = [];
|
||||
groupRoles: string[];
|
||||
groupAppName: string;
|
||||
groupFilterMode: string = this.DEFAULT_FILTER_MODE;
|
||||
@@ -144,11 +145,11 @@ export class PeopleGroupCloudDemoComponent {
|
||||
return this.groupMode === GroupCloudComponent.MODE_MULTIPLE;
|
||||
}
|
||||
|
||||
onRemoveGroup(group: GroupModel) {
|
||||
onRemoveGroup(group: IdentityGroupModel) {
|
||||
this.preSelectGroup = this.preSelectGroup.filter((value: any) => value.id !== group.id);
|
||||
}
|
||||
|
||||
onSelectGroup(group: GroupModel) {
|
||||
onSelectGroup(group: IdentityGroupModel) {
|
||||
if (this.groupMode === GroupCloudComponent.MODE_MULTIPLE) {
|
||||
this.preSelectGroup.push(group);
|
||||
}
|
||||
|
||||
@@ -24,7 +24,13 @@
|
||||
[lastModifiedTo]="editedFilter.lastModifiedTo"
|
||||
[sorting]="sortArray"
|
||||
[selectionMode]="selectionMode"
|
||||
[stickyHeader]="true"
|
||||
[showActions]="actionMenu"
|
||||
[showContextMenu]="contextMenu"
|
||||
[multiselect]="multiselect"
|
||||
(showRowActionsMenu)="onShowRowActionsMenu($event)"
|
||||
(showRowContextMenu)="onShowRowContextMenu($event)"
|
||||
(executeRowAction)="onExecuteRowAction($event)"
|
||||
(rowClick)="onRowClick($event)"
|
||||
(rowsSelected)="onRowsSelected($event)">
|
||||
</adf-cloud-process-list>
|
||||
@@ -35,10 +41,28 @@
|
||||
(prevPage)="resetSelectedRows()">
|
||||
</adf-pagination>
|
||||
<div *ngIf="testingMode">
|
||||
Selected rows:
|
||||
<ul>
|
||||
<li *ngFor="let row of selectedRows">{{ row.id }}</li>
|
||||
</ul>
|
||||
<div *ngIf="multiselect">
|
||||
{{ 'SETTINGS_CLOUD.SELECTED_ROWS' | translate }}:
|
||||
<ul>
|
||||
<li *ngFor="let row of selectedRows">{{ row.id }}</li>
|
||||
</ul>
|
||||
</div>
|
||||
<div *ngIf="actionMenu">
|
||||
<span>{{ 'SETTINGS_CLOUD.ACTION.ACTION_MENU' | translate }}:</span>
|
||||
<br>
|
||||
<div *ngIf="selectedAction">
|
||||
<span>{{ 'SETTINGS_CLOUD.ACTION.PROCESS_ID' | translate }}: {{ selectedAction.id }}</span><br>
|
||||
<span>{{ 'SETTINGS_CLOUD.ACTION.ACTION_TYPE' | translate }}: {{ selectedAction.actionType }}</span>
|
||||
</div>
|
||||
</div>
|
||||
<div *ngIf="contextMenu">
|
||||
<span>{{ 'SETTINGS_CLOUD.ACTION.CONTEX_MENU' | translate }}:</span>
|
||||
<br>
|
||||
<div *ngIf="selectedContextAction">
|
||||
<span>{{ 'SETTINGS_CLOUD.ACTION.PROCESS_ID' | translate }}: {{ selectedContextAction.id }}</span><br>
|
||||
<span>{{ 'SETTINGS_CLOUD.ACTION.ACTION_TYPE' | translate }}: {{ selectedContextAction.actionType }}</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -24,7 +24,7 @@ import {
|
||||
} from '@alfresco/adf-process-services-cloud';
|
||||
|
||||
import { ActivatedRoute, Router } from '@angular/router';
|
||||
import { UserPreferencesService, AppConfigService } from '@alfresco/adf-core';
|
||||
import { UserPreferencesService, AppConfigService, DataCellEvent } from '@alfresco/adf-core';
|
||||
import { CloudLayoutService, CloudServiceSettings } from './services/cloud-layout.service';
|
||||
import { Subject } from 'rxjs';
|
||||
import { takeUntil } from 'rxjs/operators';
|
||||
@@ -55,11 +55,17 @@ export class ProcessesCloudDemoComponent implements OnInit, OnDestroy {
|
||||
selectionMode: string;
|
||||
selectedRows: string[] = [];
|
||||
testingMode: boolean;
|
||||
actionMenu: boolean;
|
||||
contextMenu: boolean;
|
||||
actions: any[] = [];
|
||||
selectedAction: { id: number, name: string, actionType: string};
|
||||
selectedContextAction: { id: number, name: string, actionType: string};
|
||||
processFilterProperties: any = { filterProperties: [], sortProperties: [], actions: [] };
|
||||
processDetailsRedirection: boolean;
|
||||
|
||||
editedFilter: ProcessFilterCloudModel;
|
||||
|
||||
private performAction$ = new Subject<any>();
|
||||
private onDestroy$ = new Subject<boolean>();
|
||||
|
||||
constructor(
|
||||
@@ -89,6 +95,7 @@ export class ProcessesCloudDemoComponent implements OnInit, OnDestroy {
|
||||
this.cloudLayoutService.settings$
|
||||
.pipe(takeUntil(this.onDestroy$))
|
||||
.subscribe(settings => this.setCurrentSettings(settings));
|
||||
this.performContextActions();
|
||||
}
|
||||
|
||||
ngOnDestroy() {
|
||||
@@ -102,6 +109,9 @@ export class ProcessesCloudDemoComponent implements OnInit, OnDestroy {
|
||||
this.testingMode = settings.testingMode;
|
||||
this.selectionMode = settings.selectionMode;
|
||||
this.processDetailsRedirection = settings.processDetailsRedirection;
|
||||
this.actionMenu = settings.actionMenu;
|
||||
this.contextMenu = settings.contextMenu;
|
||||
this.actions = settings.actions;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -140,4 +150,41 @@ export class ProcessesCloudDemoComponent implements OnInit, OnDestroy {
|
||||
this.resetSelectedRows();
|
||||
this.selectedRows = nodes.map((node) => node.obj.entry);
|
||||
}
|
||||
|
||||
onShowRowActionsMenu(event: DataCellEvent) {
|
||||
event.value.actions = this.actions;
|
||||
}
|
||||
|
||||
onShowRowContextMenu(event: DataCellEvent) {
|
||||
event.value.actions = this.actions.map((action) => {
|
||||
return {
|
||||
data: event.value.row['obj'],
|
||||
model: action,
|
||||
subject: this.performAction$
|
||||
|
||||
};
|
||||
});
|
||||
}
|
||||
|
||||
onExecuteRowAction(row: any) {
|
||||
const value = row.value.row['obj'].entry;
|
||||
const action = row.value.action;
|
||||
this.selectedAction = {id: value.id, name: value.name, actionType: action.title};
|
||||
}
|
||||
|
||||
performContextActions() {
|
||||
this.performAction$
|
||||
.pipe(takeUntil(this.onDestroy$))
|
||||
.subscribe((action: any) => {
|
||||
if (action) {
|
||||
this.onExecuteContextAction(action);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
onExecuteContextAction(contextAction: any) {
|
||||
const value = contextAction.data.entry;
|
||||
const action = contextAction.model;
|
||||
this.selectedContextAction = {id: value.id, name: value.name, actionType: action.title};
|
||||
}
|
||||
}
|
||||
|
||||
@@ -20,10 +20,13 @@ import { BehaviorSubject } from 'rxjs';
|
||||
|
||||
export interface CloudServiceSettings {
|
||||
multiselect: boolean;
|
||||
actionMenu: boolean;
|
||||
contextMenu: boolean;
|
||||
testingMode: boolean;
|
||||
taskDetailsRedirection: boolean;
|
||||
processDetailsRedirection: boolean;
|
||||
selectionMode: string;
|
||||
actions: any[];
|
||||
}
|
||||
|
||||
export interface FilterSettings {
|
||||
@@ -32,6 +35,17 @@ export interface FilterSettings {
|
||||
key?: string;
|
||||
}
|
||||
|
||||
export class ActionMenuModel {
|
||||
constructor(
|
||||
public key: string,
|
||||
public icon: string,
|
||||
public title: string,
|
||||
public visible?: boolean,
|
||||
public disable?: boolean
|
||||
) { }
|
||||
|
||||
}
|
||||
|
||||
@Injectable({
|
||||
providedIn: 'root'
|
||||
})
|
||||
@@ -39,10 +53,13 @@ export class CloudLayoutService {
|
||||
|
||||
private settings: CloudServiceSettings = {
|
||||
multiselect: false,
|
||||
actionMenu: false,
|
||||
contextMenu: false,
|
||||
testingMode: false,
|
||||
taskDetailsRedirection: true,
|
||||
processDetailsRedirection: true,
|
||||
selectionMode: 'single'
|
||||
selectionMode: 'single',
|
||||
actions: []
|
||||
};
|
||||
|
||||
taskFilter$ = new BehaviorSubject<FilterSettings>({index: 0});
|
||||
|
||||
@@ -2,6 +2,12 @@
|
||||
<mat-slide-toggle [color]="'primary'" [checked]="multiselect" (change)="toggleMultiselect()" data-automation-id="multiSelection">
|
||||
{{ 'SETTINGS_CLOUD.MULTISELECTION' | translate }}
|
||||
</mat-slide-toggle>
|
||||
<mat-slide-toggle [color]="'primary'" [checked]="actionMenu" (change)="toggleActionMenu()" data-automation-id="actionmenu">
|
||||
{{ 'SETTINGS_CLOUD.ACTION.ACTION_MENU' | translate }}
|
||||
</mat-slide-toggle>
|
||||
<mat-slide-toggle [color]="'primary'" [checked]="contextMenu" (change)="toggleContextMenu()" data-automation-id="contextmenu">
|
||||
{{ 'SETTINGS_CLOUD.ACTION.CONTEX_MENU' | translate }}
|
||||
</mat-slide-toggle>
|
||||
<mat-slide-toggle [color]="'primary'" [checked]="testingMode" (change)="toggleTestingMode()" data-automation-id="testingMode">
|
||||
{{ 'SETTINGS_CLOUD.TESTING_MODE' | translate }}
|
||||
</mat-slide-toggle>
|
||||
@@ -21,4 +27,45 @@
|
||||
</mat-option>
|
||||
</mat-select>
|
||||
</mat-form-field>
|
||||
<mat-card *ngIf="actionMenu || contextMenu">
|
||||
<mat-card-header>
|
||||
<mat-card-title>{{ 'SETTINGS_CLOUD.ACTION.ACTION_TITLE' | translate }}</mat-card-title>
|
||||
</mat-card-header>
|
||||
<mat-card-content>
|
||||
<form [formGroup]="actionMenuForm" fxLayout="row" fxLayoutAlign="space-around center" fxLayoutGap="20px">
|
||||
<mat-form-field fxFlex="23%">
|
||||
<input matInput formControlName="key" placeholder="{{ 'SETTINGS_CLOUD.ACTION.KEY' | translate }}">
|
||||
</mat-form-field>
|
||||
|
||||
<mat-form-field fxFlex="23%">
|
||||
<input matInput formControlName="title" placeholder="{{ 'SETTINGS_CLOUD.ACTION.TITLE' | translate }}">
|
||||
</mat-form-field>
|
||||
|
||||
<mat-form-field fxFlex="23%">
|
||||
<input matInput formControlName="icon" placeholder="{{ 'SETTINGS_CLOUD.ACTION.ICON' | translate }}"I>
|
||||
</mat-form-field>
|
||||
<mat-checkbox formControlName="visible">
|
||||
{{ 'SETTINGS_CLOUD.ACTION.ACTION_VISIBLE' | translate }}
|
||||
</mat-checkbox>
|
||||
<mat-checkbox formControlName="disable">
|
||||
{{ 'SETTINGS_CLOUD.ACTION.ACTION_DISABLE' | translate }}
|
||||
</mat-checkbox>
|
||||
<button mat-raised-button (click)="addAction()">
|
||||
{{ 'SETTINGS_CLOUD.ACTION.ADD_BUTTON' | translate }}
|
||||
</button>
|
||||
</form>
|
||||
<div *ngIf="actions.length > 0">
|
||||
<mat-chip-list #chipList>
|
||||
<mat-chip *ngFor="let action of actions" [removable]="true">
|
||||
{{action.title}}
|
||||
<mat-icon
|
||||
matChipRemove
|
||||
(click)="removeAction(action)">
|
||||
cancel
|
||||
</mat-icon>
|
||||
</mat-chip>
|
||||
</mat-chip-list>
|
||||
</div>
|
||||
</mat-card-content>
|
||||
</mat-card>
|
||||
</div>
|
||||
|
||||
@@ -16,9 +16,10 @@
|
||||
*/
|
||||
|
||||
import { Component, OnInit, OnDestroy } from '@angular/core';
|
||||
import { CloudLayoutService } from '../services/cloud-layout.service';
|
||||
import { CloudLayoutService, ActionMenuModel } from '../services/cloud-layout.service';
|
||||
import { Subject } from 'rxjs';
|
||||
import { takeUntil } from 'rxjs/operators';
|
||||
import { FormGroup, FormControl } from '@angular/forms';
|
||||
|
||||
@Component({
|
||||
selector: 'app-cloud-settings',
|
||||
@@ -29,6 +30,9 @@ export class CloudSettingsComponent implements OnInit, OnDestroy {
|
||||
private onDestroy$ = new Subject<boolean>();
|
||||
|
||||
multiselect: boolean;
|
||||
actionMenu: boolean;
|
||||
contextMenu: boolean;
|
||||
actions: ActionMenuModel[] = [];
|
||||
selectionMode: string;
|
||||
testingMode: boolean;
|
||||
taskDetailsRedirection: boolean;
|
||||
@@ -40,6 +44,14 @@ export class CloudSettingsComponent implements OnInit, OnDestroy {
|
||||
{ value: 'multiple', title: 'Multiple' }
|
||||
];
|
||||
|
||||
actionMenuForm = new FormGroup({
|
||||
key: new FormControl(''),
|
||||
title: new FormControl(''),
|
||||
icon: new FormControl(''),
|
||||
visible: new FormControl(true),
|
||||
disable: new FormControl(false)
|
||||
});
|
||||
|
||||
constructor(private cloudLayoutService: CloudLayoutService) { }
|
||||
|
||||
ngOnInit() {
|
||||
@@ -57,6 +69,9 @@ export class CloudSettingsComponent implements OnInit, OnDestroy {
|
||||
setCurrentSettings(settings) {
|
||||
if (settings) {
|
||||
this.multiselect = settings.multiselect;
|
||||
this.actionMenu = this.actionMenu;
|
||||
this.contextMenu = this.contextMenu;
|
||||
this.actions = this.actions;
|
||||
this.testingMode = settings.testingMode;
|
||||
this.selectionMode = settings.selectionMode;
|
||||
this.taskDetailsRedirection = settings.taskDetailsRedirection;
|
||||
@@ -88,9 +103,35 @@ export class CloudSettingsComponent implements OnInit, OnDestroy {
|
||||
this.setSetting();
|
||||
}
|
||||
|
||||
toggleActionMenu() {
|
||||
this.actionMenu = !this.actionMenu;
|
||||
this.setSetting();
|
||||
}
|
||||
|
||||
toggleContextMenu() {
|
||||
this.contextMenu = !this.contextMenu;
|
||||
this.setSetting();
|
||||
}
|
||||
|
||||
addAction() {
|
||||
this.actions.push(<ActionMenuModel> this.actionMenuForm.value);
|
||||
this.actionMenuForm.get('key').reset();
|
||||
this.actionMenuForm.get('title').reset();
|
||||
this.actionMenuForm.get('icon').reset();
|
||||
this.setSetting();
|
||||
}
|
||||
|
||||
removeAction(removedAction: ActionMenuModel) {
|
||||
this.actions = this.actions.filter((action: ActionMenuModel) => action.key !== removedAction.key);
|
||||
this.setSetting();
|
||||
}
|
||||
|
||||
setSetting() {
|
||||
this.cloudLayoutService.setCurrentSettings({
|
||||
multiselect: this.multiselect,
|
||||
actionMenu: this.actionMenu,
|
||||
contextMenu: this.contextMenu,
|
||||
actions: this.actions,
|
||||
testingMode: this.testingMode,
|
||||
selectionMode: this.selectionMode,
|
||||
taskDetailsRedirection: this.taskDetailsRedirection,
|
||||
|
||||
@@ -20,6 +20,7 @@ import { CommonModule } from '@angular/common';
|
||||
import { CloudSettingsComponent } from './cloud-settings.component';
|
||||
import { MatDialogModule, MatInputModule, MatSelectModule, MatSlideToggleModule } from '@angular/material';
|
||||
import { CoreModule } from '@alfresco/adf-core';
|
||||
import { FlexLayoutModule } from '@angular/flex-layout';
|
||||
|
||||
@NgModule({
|
||||
imports: [
|
||||
@@ -28,7 +29,8 @@ import { CoreModule } from '@alfresco/adf-core';
|
||||
MatDialogModule,
|
||||
MatInputModule,
|
||||
MatSelectModule,
|
||||
MatSlideToggleModule
|
||||
MatSlideToggleModule,
|
||||
FlexLayoutModule
|
||||
],
|
||||
declarations: [ CloudSettingsComponent ],
|
||||
exports: [ CommonModule, CloudSettingsComponent]
|
||||
|
||||
+2
-2
@@ -18,7 +18,7 @@
|
||||
import { Component, ViewEncapsulation } from '@angular/core';
|
||||
import { SitePaging, SiteEntry, MinimalNodeEntryEntity } from '@alfresco/js-api';
|
||||
import { ContentNodeDialogService, ShareDataRow, RowFilter } from '@alfresco/adf-content-services';
|
||||
import { DataRow, DataColumn, ThumbnailService } from '@alfresco/adf-core';
|
||||
import { ThumbnailService } from '@alfresco/adf-core';
|
||||
|
||||
@Component({
|
||||
templateUrl: './content-node-selector.component.html',
|
||||
@@ -95,7 +95,7 @@ export class ContentNodeSelectorComponent {
|
||||
return showNode;
|
||||
}
|
||||
|
||||
customImageResolverExample(row: DataRow, col: DataColumn) {
|
||||
customImageResolverExample() {
|
||||
return this.thumbnailService.getMimeTypeIcon('video/quicktime');
|
||||
}
|
||||
|
||||
|
||||
+1
-1
@@ -55,7 +55,7 @@ export class ExtensionPresetsComponent implements OnInit, OnDestroy {
|
||||
this.onDestroy$.complete();
|
||||
}
|
||||
|
||||
trackById(index: number, obj: { id: string }) {
|
||||
trackById(_: number, obj: { id: string }) {
|
||||
return obj.id;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -27,7 +27,7 @@ import { MinimalNodeEntity, NodePaging, Pagination, MinimalNodeEntryEntity, Site
|
||||
import {
|
||||
AlfrescoApiService, AuthenticationService, AppConfigService, AppConfigValues, ContentService, TranslationService,
|
||||
FileUploadEvent, FolderCreatedEvent, LogService, NotificationService,
|
||||
UploadService, DataColumn, DataRow, UserPreferencesService,
|
||||
UploadService, DataRow, UserPreferencesService,
|
||||
PaginationComponent, FormValues, DisplayMode, InfinitePaginationComponent, HighlightDirective,
|
||||
SharedLinksApiService
|
||||
} from '@alfresco/adf-core';
|
||||
@@ -474,7 +474,7 @@ export class FilesComponent implements OnInit, OnChanges, OnDestroy {
|
||||
return this.contentService.hasAllowableOperations(selection[0].entry, 'update');
|
||||
}
|
||||
|
||||
getNodeNameTooltip(row: DataRow, col: DataColumn): string {
|
||||
getNodeNameTooltip(row: DataRow): string {
|
||||
if (row) {
|
||||
return row.getValue('name');
|
||||
}
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -18,35 +18,43 @@
|
||||
import { Observable, of } from 'rxjs';
|
||||
import { Injectable } from '@angular/core';
|
||||
import {
|
||||
AppConfigService, AlfrescoApiService, EcmModelService, LogService, FormService, FormOutcomeEvent
|
||||
AlfrescoApiService,
|
||||
EcmModelService,
|
||||
LogService,
|
||||
FormService,
|
||||
FormOutcomeEvent
|
||||
} from '@alfresco/adf-core';
|
||||
import { Subject } from 'rxjs';
|
||||
|
||||
@Injectable()
|
||||
export class FakeFormService extends FormService {
|
||||
|
||||
executeOutcome = new Subject<FormOutcomeEvent>();
|
||||
|
||||
constructor(appConfig: AppConfigService,
|
||||
ecmModelService: EcmModelService,
|
||||
apiService: AlfrescoApiService,
|
||||
protected logService: LogService) {
|
||||
constructor(
|
||||
ecmModelService: EcmModelService,
|
||||
apiService: AlfrescoApiService,
|
||||
protected logService: LogService
|
||||
) {
|
||||
super(ecmModelService, apiService, logService);
|
||||
}
|
||||
|
||||
public getRestFieldValues(taskId: string, fieldId: string): Observable<any> {
|
||||
public getRestFieldValues(
|
||||
taskId: string,
|
||||
fieldId: string
|
||||
): Observable<any> {
|
||||
if (fieldId === 'typeaheadField') {
|
||||
return of([
|
||||
{ 'id': '1', 'name': 'Leanne Graham' },
|
||||
{ 'id': '2', 'name': 'Ervin Howell' },
|
||||
{ 'id': '3', 'name': 'Clementine Bauch' },
|
||||
{ 'id': '4', 'name': 'Patricia Lebsack' },
|
||||
{ 'id': '5', 'name': 'Chelsey Dietrich' },
|
||||
{ 'id': '6', 'name': 'Mrs. Dennis Schulist' },
|
||||
{ 'id': '7', 'name': 'Kurtis Weissnat' },
|
||||
{ 'id': '8', 'name': 'Nicholas Runolfsdottir V' },
|
||||
{ 'id': '9', 'name': 'Glenna Reichert' },
|
||||
{ 'id': '10', 'name': 'Clementina DuBuque' }]);
|
||||
{ id: '1', name: 'Leanne Graham' },
|
||||
{ id: '2', name: 'Ervin Howell' },
|
||||
{ id: '3', name: 'Clementine Bauch' },
|
||||
{ id: '4', name: 'Patricia Lebsack' },
|
||||
{ id: '5', name: 'Chelsey Dietrich' },
|
||||
{ id: '6', name: 'Mrs. Dennis Schulist' },
|
||||
{ id: '7', name: 'Kurtis Weissnat' },
|
||||
{ id: '8', name: 'Nicholas Runolfsdottir V' },
|
||||
{ id: '9', name: 'Glenna Reichert' },
|
||||
{ id: '10', name: 'Clementina DuBuque' }
|
||||
]);
|
||||
} else {
|
||||
return super.getRestFieldValues(taskId, fieldId);
|
||||
}
|
||||
|
||||
@@ -16,7 +16,7 @@
|
||||
*/
|
||||
|
||||
import { NgModule } from '@angular/core';
|
||||
import { CoreModule, TranslationService } from '@alfresco/adf-core';
|
||||
import { CoreModule } from '@alfresco/adf-core';
|
||||
|
||||
import { LazyLoadingRoutes } from './lazy-loading.routes';
|
||||
import { LazyLoadingComponent } from './lazy-loading.component';
|
||||
@@ -30,7 +30,4 @@ import { LazyLoadingComponent } from './lazy-loading.component';
|
||||
LazyLoadingComponent
|
||||
]
|
||||
})
|
||||
export class LazyLoadingModule {
|
||||
constructor(translation: TranslationService) {
|
||||
}
|
||||
}
|
||||
export class LazyLoadingModule {}
|
||||
|
||||
@@ -85,7 +85,7 @@
|
||||
[showRememberMe]="showFooter && showRememberMe"
|
||||
(executeSubmit)="checkForm($event)"
|
||||
copyrightText="{{ 'application.copyright' | adfAppConfig }}"
|
||||
(success)="onLogin($event)"
|
||||
(success)="onLogin()"
|
||||
(error)="onError($event)">
|
||||
<div class="adf-mobile-settings">
|
||||
<p>
|
||||
|
||||
@@ -55,7 +55,7 @@ export class LoginComponent implements OnInit {
|
||||
this.alfrescoLogin.addCustomValidationError('password', 'required', 'LOGIN.MESSAGES.PASSWORD-REQUIRED');
|
||||
}
|
||||
|
||||
onLogin($event) {
|
||||
onLogin() {
|
||||
this.router.navigate(['/home']);
|
||||
}
|
||||
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
(error)="showErrorMessage($event)"
|
||||
(updated)="onUpdatedPermissions($event)">
|
||||
{{ (toggleStatus?'DEMO_PERMISSION.INHERITED_PERMISSIONS_BUTTON':'DEMO_PERMISSION.INHERIT_PERMISSION_BUTTON') | translate}}</button>
|
||||
<button mat-button color="primary" (click)="openAddPermissionDialog($event)" data-automation-id="adf-add-permission-button">Add User or Group</button>
|
||||
<button mat-button color="primary" (click)="openAddPermissionDialog()" data-automation-id="adf-add-permission-button">Add User or Group</button>
|
||||
</div>
|
||||
|
||||
<div>
|
||||
|
||||
@@ -64,7 +64,7 @@ export class DemoPermissionComponent implements OnInit {
|
||||
this.displayPermissionComponent.reload();
|
||||
}
|
||||
|
||||
openAddPermissionDialog(event: Event) {
|
||||
openAddPermissionDialog() {
|
||||
this.nodePermissionDialogService
|
||||
.updateNodePermissionByDialog(this.nodeId)
|
||||
.subscribe(
|
||||
|
||||
@@ -28,7 +28,7 @@
|
||||
[appId]="appId"
|
||||
[showIcon]="showTaskFilterIcon"
|
||||
(filterClick)="onTaskFilterClick($event)"
|
||||
(success)="onSuccessTaskFilterList($event)" #activitiFilter>
|
||||
(success)="onSuccessTaskFilterList()" #activitiFilter>
|
||||
</adf-task-filters>
|
||||
</mat-expansion-panel>
|
||||
</mat-accordion>
|
||||
@@ -48,7 +48,7 @@
|
||||
[sort]="taskFilter?.filter?.sort"
|
||||
[landingTaskId]="currentTaskId"
|
||||
(rowClick)="onTaskRowClick($event)"
|
||||
(success)="onSuccessTaskList($event)"
|
||||
(success)="onSuccessTaskList()"
|
||||
(row-click)="onRowClick($event)"
|
||||
(row-dblclick)="onTaskRowDblClick($event)"
|
||||
[multiselect]="multiSelectTask"
|
||||
@@ -76,11 +76,11 @@
|
||||
[taskId]="currentTaskId"
|
||||
[fieldValidators]="fieldValidators"
|
||||
[showHeaderContent]="showHeaderContent"
|
||||
(formCompleted)="onFormCompleted($event)"
|
||||
(formCompleted)="onFormCompleted()"
|
||||
(formContentClicked)="onContentClick($event)"
|
||||
(taskCreated)="onTaskCreated($event)"
|
||||
(assignTask)="onAssignTask()"
|
||||
(taskDeleted)="onTaskDeleted($event)">
|
||||
(taskDeleted)="onTaskDeleted()">
|
||||
</adf-task-details>
|
||||
<mat-divider></mat-divider>
|
||||
<div *ngIf="currentTaskId">
|
||||
@@ -144,7 +144,7 @@
|
||||
[showIcon]="showProcessFilterIcon"
|
||||
(filterClick)="onProcessFilterChange($event)"
|
||||
(filterSelected)="onProcessFilterChange($event)"
|
||||
(success)="onSuccessProcessFilterList($event)">
|
||||
(success)="onSuccessProcessFilterList()">
|
||||
</adf-process-instance-filters>
|
||||
</mat-expansion-panel>
|
||||
</mat-accordion>
|
||||
@@ -164,7 +164,7 @@
|
||||
(rowClick)="onProcessRowClick($event)"
|
||||
(row-dblclick)="onProcessRowDblClick($event)"
|
||||
[multiselect]="multiSelectProcess"
|
||||
(success)="onSuccessProcessList($event)">
|
||||
(success)="onSuccessProcessList()">
|
||||
<!-- Custom column definition demo -->
|
||||
|
||||
<!-- <data-columns>
|
||||
@@ -242,7 +242,7 @@
|
||||
[appId]="appId"
|
||||
[reportId]="report.id"
|
||||
[hideParameters]="false"
|
||||
(editReport)="onEditReport($event)"
|
||||
(editReport)="onEditReport()"
|
||||
(reportSaved)="onReportSaved($event)"
|
||||
(reportDeleted)="onReportDeleted()">
|
||||
</adf-analytics>
|
||||
|
||||
@@ -30,7 +30,6 @@ import {
|
||||
} from '@angular/core';
|
||||
import { ActivatedRoute, Router } from '@angular/router';
|
||||
import {
|
||||
ProcessInstanceFilterRepresentation,
|
||||
Pagination,
|
||||
UserProcessInstanceFilterRepresentation
|
||||
} from '@alfresco/js-api';
|
||||
@@ -306,7 +305,7 @@ export class ProcessServiceComponent implements AfterViewInit, OnDestroy, OnInit
|
||||
this.report = event;
|
||||
}
|
||||
|
||||
onSuccessTaskFilterList(event: any): void {
|
||||
onSuccessTaskFilterList(): void {
|
||||
this.applyTaskFilter(this.activitiFilter.getCurrentFilter());
|
||||
}
|
||||
|
||||
@@ -329,7 +328,7 @@ export class ProcessServiceComponent implements AfterViewInit, OnDestroy, OnInit
|
||||
this.reloadTaskFilters();
|
||||
}
|
||||
|
||||
onSuccessTaskList(event: FilterRepresentationModel) {
|
||||
onSuccessTaskList() {
|
||||
this.currentTaskId = this.taskList.getCurrentId();
|
||||
}
|
||||
|
||||
@@ -343,15 +342,15 @@ export class ProcessServiceComponent implements AfterViewInit, OnDestroy, OnInit
|
||||
this.processPage = 0;
|
||||
}
|
||||
|
||||
onSuccessProcessFilterList(event: ProcessInstanceFilterRepresentation[]): void {
|
||||
onSuccessProcessFilterList(): void {
|
||||
this.processFilter = this.activitiProcessFilter.getCurrentFilter();
|
||||
}
|
||||
|
||||
onSuccessProcessList(event: any): void {
|
||||
onSuccessProcessList(): void {
|
||||
this.currentProcessInstanceId = this.processList.getCurrentId();
|
||||
}
|
||||
|
||||
onTaskRowClick(taskId): void {
|
||||
onTaskRowClick(taskId: string): void {
|
||||
this.currentTaskId = taskId;
|
||||
}
|
||||
|
||||
@@ -365,15 +364,15 @@ export class ProcessServiceComponent implements AfterViewInit, OnDestroy, OnInit
|
||||
this.currentProcessInstanceId = processInstanceId;
|
||||
}
|
||||
|
||||
onProcessRowClick(processInstanceId): void {
|
||||
onProcessRowClick(processInstanceId: string): void {
|
||||
this.currentProcessInstanceId = processInstanceId;
|
||||
}
|
||||
|
||||
onEditReport(name: string): void {
|
||||
onEditReport(): void {
|
||||
this.analyticsReportList.reload();
|
||||
}
|
||||
|
||||
onReportSaved(reportId): void {
|
||||
onReportSaved(reportId: number): void {
|
||||
this.analyticsReportList.reload(reportId);
|
||||
}
|
||||
|
||||
@@ -409,12 +408,12 @@ export class ProcessServiceComponent implements AfterViewInit, OnDestroy, OnInit
|
||||
return this.currentTaskId === currentTaskIdNew;
|
||||
}
|
||||
|
||||
processCancelled(data: any): void {
|
||||
processCancelled(): void {
|
||||
this.currentProcessInstanceId = null;
|
||||
this.processList.reload();
|
||||
}
|
||||
|
||||
onFormCompleted(form): void {
|
||||
onFormCompleted(): void {
|
||||
this.currentTaskId = null;
|
||||
if (this.taskListPagination) {
|
||||
this.taskPage = this.taskListPagination.current - 1;
|
||||
@@ -468,7 +467,7 @@ export class ProcessServiceComponent implements AfterViewInit, OnDestroy, OnInit
|
||||
this.taskList.reload();
|
||||
}
|
||||
|
||||
onTaskDeleted(data: any): void {
|
||||
onTaskDeleted(): void {
|
||||
this.taskList.reload();
|
||||
}
|
||||
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
{
|
||||
"compileOnSave": false,
|
||||
"compilerOptions": {
|
||||
"resolveJsonModule": true,
|
||||
"outDir": "./dist/out-tsc",
|
||||
"baseUrl": "src",
|
||||
"sourceMap": true,
|
||||
@@ -10,6 +11,7 @@
|
||||
"experimentalDecorators": true,
|
||||
"skipLibCheck": true,
|
||||
"noUnusedLocals": true,
|
||||
"noUnusedParameters": true,
|
||||
"target": "es5",
|
||||
"allowSyntheticDefaultImports": true,
|
||||
"typeRoots": [
|
||||
|
||||
@@ -234,7 +234,7 @@ const dateItemProperty = new CardViewDateItemModel(options);
|
||||
| default | any | | The default value to display if the value is empty |
|
||||
| displayValue\* | any | | The value to display |
|
||||
| editable | boolean | false | Toggles whether the item is editable |
|
||||
| format | boolean | "MMM DD YYYY" | Any date format that momentjs accepts |
|
||||
| format | string | "MMM DD YYYY" | Any date format that momentjs accepts |
|
||||
|
||||
#### Card Datetime Item
|
||||
|
||||
@@ -252,7 +252,7 @@ const datetimeItemProperty = new CardViewDatetimeItemModel(options);
|
||||
| default | any | any | The default value to display if the value is empty |
|
||||
| displayValue\* | string | | The value to display |
|
||||
| editable | boolean | false | Toggles whether the item is editable |
|
||||
| format | boolean | "MMM DD YYYY HH:mm" | Any datetime format that momentjs accepts |
|
||||
| format | string | "MMM DD YYYY HH:mm" | Any datetime format that momentjs accepts |
|
||||
|
||||
#### Card Bool Item
|
||||
|
||||
|
||||
@@ -0,0 +1,75 @@
|
||||
---
|
||||
Title: Identity Group service
|
||||
Added: v3.4.0
|
||||
Status: Active
|
||||
Last reviewed: 2019-07-13
|
||||
---
|
||||
|
||||
# [Identity Group service](../../../lib/core/userinfo/services/identity-group.service.ts "Defined in identity-group.service.ts")
|
||||
|
||||
Performs CRUD operations on identity groups.
|
||||
|
||||
## Class members
|
||||
|
||||
### Methods
|
||||
|
||||
- **checkGroupHasAnyClientAppRole**(groupId: `string`, clientId: `string`, roleNames: `string[]`): [`Observable`](http://reactivex.io/documentation/observable.html)`<boolean>`<br/>
|
||||
Check if a group has any of the client app roles in the supplied list.
|
||||
- _groupId:_ `string` - Id of the target group
|
||||
- _clientId:_ `string` - Id of the client
|
||||
- _roleNames:_ `string[]` - Array of role names to check
|
||||
- **Returns** [`Observable`](http://reactivex.io/documentation/observable.html)`<boolean>` - True if the group has one or more of the roles, false otherwise
|
||||
- **checkGroupHasClientApp**(groupId: `string`, clientId: `string`): [`Observable`](http://reactivex.io/documentation/observable.html)`<boolean>`<br/>
|
||||
Checks if a group has a client app.
|
||||
- _groupId:_ `string` - Id of the target group
|
||||
- _clientId:_ `string` - Id of the client
|
||||
- **Returns** [`Observable`](http://reactivex.io/documentation/observable.html)`<boolean>` - True if the group has the client app, false otherwise
|
||||
- **checkGroupHasRole**(groupId: `string`, roleNames: `string[]`): [`Observable`](http://reactivex.io/documentation/observable.html)`<boolean>`<br/>
|
||||
Check that a group has one or more roles from the supplied list.
|
||||
- _groupId:_ `string` - Id of the target group
|
||||
- _roleNames:_ `string[]` - Array of role names
|
||||
- **Returns** [`Observable`](http://reactivex.io/documentation/observable.html)`<boolean>` - True if the group has one or more of the roles, false otherwise
|
||||
- **createGroup**(newGroup: [`IdentityGroupModel`](../../../lib/core/userinfo/models/identity-group.model.ts)): [`Observable`](http://reactivex.io/documentation/observable.html)`<any>`<br/>
|
||||
Creates new group.
|
||||
- _newGroup:_ [`IdentityGroupModel`](../../../lib/core/userinfo/models/identity-group.model.ts) - Object of containing the new group details.
|
||||
- **Returns** [`Observable`](http://reactivex.io/documentation/observable.html)`<any>` - Empty response when the group created.
|
||||
- **deleteGroup**(groupId: `string`): [`Observable`](http://reactivex.io/documentation/observable.html)`<any>`<br/>
|
||||
Deletes Group.
|
||||
- _groupId:_ `string` - Id of the group.
|
||||
- **Returns** [`Observable`](http://reactivex.io/documentation/observable.html)`<any>` - Empty response when the group deleted.
|
||||
- **findGroupsByName**(searchParams: [`IdentityGroupSearchParam`](../../../lib/core/userinfo/models/identity-group.model.ts)): [`Observable`](http://reactivex.io/documentation/observable.html)`<any>`<br/>
|
||||
Finds groups filtered by name.
|
||||
- _searchParams:_ [`IdentityGroupSearchParam`](../../../lib/core/userinfo/models/identity-group.model.ts) - Object containing the name filter string
|
||||
- **Returns** [`Observable`](http://reactivex.io/documentation/observable.html)`<any>` - List of group information
|
||||
- **getClientIdByApplicationName**(applicationName: `string`): [`Observable`](http://reactivex.io/documentation/observable.html)`<string>`<br/>
|
||||
Gets the client ID using the app name.
|
||||
- _applicationName:_ `string` - Name of the app
|
||||
- **Returns** [`Observable`](http://reactivex.io/documentation/observable.html)`<string>` - client ID string
|
||||
- **getClientRoles**(groupId: `string`, clientId: `string`): [`Observable`](http://reactivex.io/documentation/observable.html)`<`[`IdentityRoleModel`](../../../lib/core/userinfo/models/identity-role.model.ts)`[]>`<br/>
|
||||
Gets client roles.
|
||||
- _groupId:_ `string` - ID of the target group
|
||||
- _clientId:_ `string` - ID of the client
|
||||
- **Returns** [`Observable`](http://reactivex.io/documentation/observable.html)`<`[`IdentityRoleModel`](../../../lib/core/userinfo/models/identity-role.model.ts)`[]>` - List of roles
|
||||
- **getGroupRoles**(groupId: `string`): [`Observable`](http://reactivex.io/documentation/observable.html)`<`[`IdentityRoleModel`](../../../lib/core/userinfo/models/identity-role.model.ts)`[]>`<br/>
|
||||
Gets details for a specified group.
|
||||
- _groupId:_ `string` - ID of the target group
|
||||
- **Returns** [`Observable`](http://reactivex.io/documentation/observable.html)`<`[`IdentityRoleModel`](../../../lib/core/userinfo/models/identity-role.model.ts)`[]>` - Group details
|
||||
- **getGroups**(): [`Observable`](http://reactivex.io/documentation/observable.html)`<`[`IdentityGroupModel`](../../../lib/core/userinfo/models/identity-group.model.ts)`[]>`<br/>
|
||||
Gets all groups.
|
||||
- **Returns** [`Observable`](http://reactivex.io/documentation/observable.html)`<`[`IdentityGroupModel`](../../../lib/core/userinfo/models/identity-group.model.ts)`[]>` - Array of group information objects
|
||||
- **getTotalGroupsCount**(): [`Observable`](http://reactivex.io/documentation/observable.html)`<`[`IdentityGroupCountModel`](../../../lib/core/userinfo/models/identity-group.model.ts)`>`<br/>
|
||||
Gets groups total count.
|
||||
- **Returns** [`Observable`](http://reactivex.io/documentation/observable.html)`<`[`IdentityGroupCountModel`](../../../lib/core/userinfo/models/identity-group.model.ts)`>` - Number of groups count.
|
||||
- **queryGroups**(requestQuery: [`IdentityGroupQueryCloudRequestModel`](../../../lib/core/userinfo/models/identity-group.model.ts)): [`Observable`](http://reactivex.io/documentation/observable.html)`<`[`IdentityGroupQueryResponse`](../../../lib/core/userinfo/models/identity-group.model.ts)`>`<br/>
|
||||
Queries groups.
|
||||
- _requestQuery:_ [`IdentityGroupQueryCloudRequestModel`](../../../lib/core/userinfo/models/identity-group.model.ts) -
|
||||
- **Returns** [`Observable`](http://reactivex.io/documentation/observable.html)`<`[`IdentityGroupQueryResponse`](../../../lib/core/userinfo/models/identity-group.model.ts)`>` - Array of user information objects
|
||||
- **updateGroup**(groupId: `string`, updatedGroup: [`IdentityGroupModel`](../../../lib/core/userinfo/models/identity-group.model.ts)): [`Observable`](http://reactivex.io/documentation/observable.html)`<any>`<br/>
|
||||
Updates group details.
|
||||
- _groupId:_ `string` - Id of the targeted group.
|
||||
- _updatedGroup:_ [`IdentityGroupModel`](../../../lib/core/userinfo/models/identity-group.model.ts) - Object of containing the group details
|
||||
- **Returns** [`Observable`](http://reactivex.io/documentation/observable.html)`<any>` - Empty response when the group updated.
|
||||
|
||||
## See also
|
||||
|
||||
- [Identity user service](../../core/userInfo/services/identity-user.service.md)
|
||||
@@ -21,7 +21,8 @@ Shows a notification message with optional feedback.
|
||||
Opens a SnackBar notification to show a message.
|
||||
- _message:_ `string` - The message (or resource key) to show.
|
||||
- _config:_ `number|MatSnackBarConfig` - (Optional) Time before notification disappears after being shown or MatSnackBarConfig object
|
||||
- **Returns** [`MatSnackBarRef`](https://material.angular.io/components/snack-bar/overview)`<any>` - Information/control object for the SnackBar
|
||||
- translationArgs: `any` - The object with the keys for the interpolation of your translation string
|
||||
- **Returns** [`MatSnackBarRef`](https://material.angular.io/components/snack-bar/overview)`<any>` - Information/control object for the SnackBar
|
||||
- **openSnackMessageAction**(message: `string`, action: `string`, config?: `number|MatSnackBarConfig`): [`MatSnackBarRef`](https://material.angular.io/components/snack-bar/overview)`<any>`<br/>
|
||||
Opens a SnackBar notification with a message and a response button.
|
||||
- _message:_ `string` - The message (or resource key) to show.
|
||||
|
||||
Binary file not shown.
|
After Width: | Height: | Size: 30 KiB |
Binary file not shown.
|
After Width: | Height: | Size: 27 KiB |
@@ -28,7 +28,7 @@ Searches Groups.
|
||||
| ---- | ---- | ------------- | ----------- |
|
||||
| appName | `string` | | Name of the application. If specified this shows the users who have access to the app. |
|
||||
| mode | `string` | | User selection mode (single/multiple). |
|
||||
| preSelectGroups | [`GroupModel`](../../../lib/process-services-cloud/src/lib/group/models/group.model.ts)`[]` | \[] | Array of users to be pre-selected. This pre-selects all users in multi selection mode and only the first user of the array in single selection mode. |
|
||||
| preSelectGroups | [`IdentityGroupModel`](../../../lib/core/userinfo/models/identity-group.model.ts)`[]` | \[] | Array of users to be pre-selected. This pre-selects all users in multi selection mode and only the first user of the array in single selection mode. |
|
||||
| roles | `string[]` | \[] | Role names of the groups to be listed. |
|
||||
| searchGroupsControl | `FormControl` | new FormControl() | FormControl to search the group |
|
||||
| title | `string` | | Title of the field |
|
||||
@@ -37,8 +37,8 @@ Searches Groups.
|
||||
|
||||
| Name | Type | Description |
|
||||
| ---- | ---- | ----------- |
|
||||
| removeGroup | [`EventEmitter`](https://angular.io/api/core/EventEmitter)`<`[`GroupModel`](../../../lib/process-services-cloud/src/lib/group/models/group.model.ts)`>` | Emitted when a group is removed. |
|
||||
| selectGroup | [`EventEmitter`](https://angular.io/api/core/EventEmitter)`<`[`GroupModel`](../../../lib/process-services-cloud/src/lib/group/models/group.model.ts)`>` | Emitted when a group is selected. |
|
||||
| removeGroup | [`EventEmitter`](https://angular.io/api/core/EventEmitter)`<`[`IdentityGroupModel`](../../../lib/core/userinfo/models/identity-group.model.ts)`>` | Emitted when a group is removed. |
|
||||
| selectGroup | [`EventEmitter`](https://angular.io/api/core/EventEmitter)`<`[`IdentityGroupModel`](../../../lib/core/userinfo/models/identity-group.model.ts)`>` | Emitted when a group is selected. |
|
||||
|
||||
## Details
|
||||
|
||||
|
||||
@@ -51,6 +51,9 @@ when the process list is empty:
|
||||
| Name | Type | Default value | Description |
|
||||
| ---- | ---- | ------------- | ----------- |
|
||||
| appName | `string` | | The name of the application. |
|
||||
| actions | `boolean` | false | Toggles the data actions column. |
|
||||
| actionsPosition | `string` | "right" | Position of the actions dropdown menu. Can be "left" or "right". |
|
||||
| contextMenu | `boolean` | false | Toggles custom context menu for the component. |
|
||||
| businessKey | `string` | "" | Filter the processes to display only the ones with this businessKey value. |
|
||||
| id | `string` | "" | Filter the processes to display only the ones with this ID. |
|
||||
| initiator | `string` | "" | Name of the initiator of the process. |
|
||||
@@ -64,6 +67,7 @@ when the process list is empty:
|
||||
| selectionMode | `string` | "single" | Row selection mode. Can be "none", "single" or "multiple". For multiple mode, you can use Cmd (macOS) or Ctrl (Win) modifier key to toggle selection for multiple rows. |
|
||||
| sorting | [`ProcessListCloudSortingModel`](../../../lib/process-services-cloud/src/lib/process/process-list/models/process-list-sorting.model.ts)`[]` | | Array of objects specifying the sort order and direction for the list. The sort parameters are for BE sorting. |
|
||||
| status | `string` | "" | Filter the processes to display only the ones with this status. |
|
||||
| stickyHeader | `boolean` | false | Toggles the sticky header mode. |
|
||||
|
||||
### Events
|
||||
|
||||
@@ -73,6 +77,9 @@ when the process list is empty:
|
||||
| rowClick | [`EventEmitter`](https://angular.io/api/core/EventEmitter)`<string>` | Emitted when a row in the process list is clicked. |
|
||||
| rowsSelected | [`EventEmitter`](https://angular.io/api/core/EventEmitter)`<any[]>` | Emitted when rows are selected/unselected. |
|
||||
| success | [`EventEmitter`](https://angular.io/api/core/EventEmitter)`<any>` | Emitted when the list of process instances has been loaded successfully from the server. |
|
||||
| executeRowAction | [`EventEmitter`](https://angular.io/api/core/EventEmitter)`<`[`DataRowActionEvent`](../../../lib/core/datatable/components/datatable/data-row-action.event.ts)`>` | Emitted when the user executes a row action. |
|
||||
| showRowActionsMenu | [`EventEmitter`](https://angular.io/api/core/EventEmitter)`<`[`DataCellEvent`](../../../lib/core/datatable/components/datatable/data-cell.event.ts)`>` | Emitted before the actions menu is displayed for a row. |
|
||||
| showRowContextMenu | [`EventEmitter`](https://angular.io/api/core/EventEmitter)`<`[`DataCellEvent`](../../../lib/core/datatable/components/datatable/data-cell.event.ts)`>` | Emitted before the context menu is displayed for a row. |
|
||||
|
||||
## Details
|
||||
|
||||
@@ -192,6 +199,116 @@ The configuration related to the pagination can be changed from the `app.config.
|
||||
},
|
||||
```
|
||||
|
||||
#### showRowContextMenu event
|
||||
|
||||
Emitted before the context menu is displayed for a row.
|
||||
|
||||
Note that the ProcessListCloud itself does not populate the context menu with items.
|
||||
You can provide all necessary content via the handler.
|
||||
|
||||
```html
|
||||
<adf-cloud-process-list
|
||||
[contextMenu]="true"
|
||||
(showRowContextMenu)="onShowRowContextMenu($event)">
|
||||
</adf-cloud-process-list>
|
||||
```
|
||||
|
||||
Event properties:
|
||||
|
||||
```ts
|
||||
value: {
|
||||
row: DataRow,
|
||||
col: DataColumn,
|
||||
actions: []
|
||||
}
|
||||
```
|
||||
|
||||
Handler example:
|
||||
|
||||
```ts
|
||||
onShowRowContextMenu(event: DataCellEvent) {
|
||||
event.value.actions = [
|
||||
{ title: 'Hello Context Action' },
|
||||
{ ... }
|
||||
]
|
||||
}
|
||||
```
|
||||

|
||||
|
||||
This event is cancellable. You can use `event.preventDefault()` to prevent the default behavior.
|
||||
|
||||
The ProcessListCloud will automatically render the supplied menu items.
|
||||
|
||||
See the [ContextMenu](https://www.npmjs.com/package/ng2-alfresco-core)
|
||||
documentation for more details on the format and behavior of context actions.
|
||||
|
||||
#### showRowActionsMenu event
|
||||
|
||||
Emitted before the actions menu is displayed for a row.
|
||||
Requires the `actions` property to be set to `true`.
|
||||
|
||||
Event properties:
|
||||
|
||||
```ts
|
||||
value: {
|
||||
row: DataRow,
|
||||
action: any
|
||||
}
|
||||
```
|
||||
|
||||
Note that the ProcessListCloud itself does not populate the action menu with items.
|
||||
You can provide all necessary content via the handler.
|
||||
|
||||
This event is cancellable. You can use `event.preventDefault()` to prevent the default behavior.
|
||||
|
||||
#### executeRowAction event
|
||||
|
||||
Emitted when the user executes a row action.
|
||||
|
||||
This usually accompanies a `showRowActionsMenu` event.
|
||||
The ProcessListCloud itself does not execute actions but provides support for external
|
||||
integration. If actions are provided using the `showRowActionsMenu` event
|
||||
then `executeRowAction` will be automatically executed when the user clicks a
|
||||
corresponding menu item.
|
||||
|
||||
```html
|
||||
<adf-cloud-process-list
|
||||
[actions]="true"
|
||||
(showRowActionsMenu)="onShowRowActionsMenu($event)"
|
||||
(executeRowAction)="onExecuteRowAction($event)">
|
||||
</adf-cloud-process-list>
|
||||
```
|
||||
|
||||
```ts
|
||||
import { DataCellEvent, DataRowActionEvent } from '@alfresco/adf-core';
|
||||
|
||||
onShowRowActionsMenu(event: DataCellEvent) {
|
||||
let myAction = {
|
||||
title: 'Hello Action'
|
||||
// your custom metadata needed for onExecuteRowAction
|
||||
};
|
||||
event.value.actions = [
|
||||
myAction
|
||||
];
|
||||
}
|
||||
|
||||
onExecuteRowAction(event: DataRowActionEvent) {
|
||||
let args = event.value;
|
||||
console.log(args.row);
|
||||
console.log(args.action);
|
||||
window.alert(`My custom action: ${args.action.title}`);
|
||||
}
|
||||
```
|
||||
|
||||

|
||||
|
||||
You can use any payloads for row actions. The only requirement for the objects is that they
|
||||
must have a `title` property.
|
||||
|
||||
When an action is selected in the dropdown menu, the ProcessListCloud invokes the `executeRowAction` event.
|
||||
Use this to handle the response, inspect the action payload (and all custom properties defined
|
||||
earlier), and perform the corresponding actions.
|
||||
|
||||
## See also
|
||||
|
||||
- [Data column component](../../core/components/data-column.component.md)
|
||||
|
||||
@@ -70,6 +70,7 @@ when the task list is empty:
|
||||
| sorting | [`TaskListCloudSortingModel`](../../../lib/process-services-cloud/src/lib/task/task-list/models/task-list-sorting.model.ts)`[]` | | Specifies how the table should be sorted. The parameters are for BE sorting. |
|
||||
| standAlone | `boolean` | false | Filter the tasks. Display only the tasks that belong to a process in case is false or tasks that doesn't belong to a process in case of true. |
|
||||
| status | `string` | "" | Filter the tasks. Display only tasks with status equal to the supplied value. |
|
||||
| stickyHeader | `boolean` | false | Toggles the sticky header mode. |
|
||||
|
||||
### Events
|
||||
|
||||
|
||||
@@ -23,7 +23,7 @@ Extracts the initial character from a group name.
|
||||
|
||||
## Details
|
||||
|
||||
This pipe takes a [`GroupModel`](../../../lib/process-services-cloud/src/lib/group/models/group.model.ts)
|
||||
This pipe takes a [`IdentityGroupModel`](../../../lib/core/userinfo/models/identity-group.model.ts)
|
||||
object as its parameter and extracts the initial character from the `name`
|
||||
property. The initial is a handy way to identify the group in lists and
|
||||
other situations where there is limited screen space available.
|
||||
|
||||
@@ -47,7 +47,7 @@ export interface ComponentTypeResolver {
|
||||
```
|
||||
|
||||
Typically a `ComponentTypeResolver` is a function that takes [`FormFieldModel`](../core/models/form-field.model.md) and returns corresponding component type.
|
||||
It can be either a predefined component type or a dynamically evaluated based on field properties and metadata.
|
||||
This can either be a predefined component type or dynamically evaluated based on the field properties and metadata.
|
||||
|
||||
#### Static component mapping
|
||||
|
||||
|
||||
@@ -33,6 +33,9 @@ backend services have been tested with each released version of ADF.
|
||||
<!--v340 start-->
|
||||
|
||||
- [Decimal number pipe](core/pipes/decimal-number.pipe.md)
|
||||
- [Identity group service](core/services/identity-group.service.md)
|
||||
- [Local preference cloud service](process-services-cloud/services/local-preference-cloud.service.md)
|
||||
- [User preference cloud service](process-services-cloud/services/user-preference-cloud.service.md)
|
||||
|
||||
<!--v340 end-->
|
||||
|
||||
|
||||
@@ -20,8 +20,8 @@ export class NodeActions {
|
||||
lockNode(alfrescoJsApi, nodeId: string, allowOwner?: string) {
|
||||
|
||||
return alfrescoJsApi.nodes.lockNode(nodeId, {
|
||||
'type': allowOwner ? 'ALLOW_OWNER_CHANGES' : 'FULL',
|
||||
'lifetime': 'PERSISTENT'
|
||||
type: allowOwner ? 'ALLOW_OWNER_CHANGES' : 'FULL',
|
||||
lifetime: 'PERSISTENT'
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
+14
-20
@@ -20,11 +20,11 @@ import path = require('path');
|
||||
import { browser } from 'protractor';
|
||||
import remote = require('selenium-webdriver/remote');
|
||||
|
||||
const JS_BIND_INPUT = function (target) {
|
||||
const JS_BIND_INPUT = function(target) {
|
||||
const input = document.createElement('input');
|
||||
input.type = 'file';
|
||||
input.style.display = 'none';
|
||||
input.addEventListener('change', function (event) {
|
||||
input.addEventListener('change', function() {
|
||||
target.scrollIntoView(true);
|
||||
|
||||
const rect = target.getBoundingClientRect();
|
||||
@@ -32,7 +32,7 @@ const JS_BIND_INPUT = function (target) {
|
||||
const y = rect.top + (rect.height >> 1);
|
||||
const data = { files: input.files };
|
||||
|
||||
['dragenter', 'dragover', 'drop'].forEach(function (name) {
|
||||
['dragenter', 'dragover', 'drop'].forEach(function(name) {
|
||||
const mouseEvent: any = document.createEvent('MouseEvent');
|
||||
mouseEvent.initMouseEvent(name, !0, !0, window, 0, 0, 0, x, y, !1, !1, !1, !1, 0, null);
|
||||
mouseEvent.dataTransfer = data;
|
||||
@@ -46,13 +46,13 @@ const JS_BIND_INPUT = function (target) {
|
||||
return input;
|
||||
};
|
||||
|
||||
const JS_BIND_INPUT_FOLDER = function (target) {
|
||||
const JS_BIND_INPUT_FOLDER = function(target) {
|
||||
const input: any = document.createElement('input');
|
||||
input.type = 'file';
|
||||
input.style.display = 'none';
|
||||
input.multiple = true;
|
||||
input.webkitdirectory = true;
|
||||
input.addEventListener('change', function (event) {
|
||||
input.addEventListener('change', function() {
|
||||
target.scrollIntoView(true);
|
||||
|
||||
const rect = target.getBoundingClientRect();
|
||||
@@ -60,7 +60,7 @@ const JS_BIND_INPUT_FOLDER = function (target) {
|
||||
const y = rect.top + (rect.height >> 1);
|
||||
const data = { files: input.files };
|
||||
|
||||
['dragenter', 'dragover', 'drop'].forEach(function (name) {
|
||||
['dragenter', 'dragover', 'drop'].forEach(function(name) {
|
||||
const mouseEvent: any = document.createEvent('MouseEvent');
|
||||
mouseEvent.initMouseEvent(name, !0, !0, window, 0, 0, 0, x, y, !1, !1, !1, !1, 0, null);
|
||||
mouseEvent.dataTransfer = data;
|
||||
@@ -76,31 +76,25 @@ const JS_BIND_INPUT_FOLDER = function (target) {
|
||||
|
||||
export class DropActions {
|
||||
|
||||
dropFile(dropArea, filePath) {
|
||||
async dropFile(dropArea, filePath) {
|
||||
browser.setFileDetector(new remote.FileDetector());
|
||||
|
||||
const absolutePath = path.resolve(path.join(browser.params.testConfig.main.rootPath, filePath));
|
||||
|
||||
fs.accessSync(absolutePath, fs.constants.F_OK);
|
||||
return dropArea.getWebElement().then((element) => {
|
||||
browser.executeScript(JS_BIND_INPUT, element).then((input: any) => {
|
||||
input.sendKeys(absolutePath);
|
||||
|
||||
});
|
||||
});
|
||||
const elem = await dropArea.getWebElement();
|
||||
const input: any = await browser.executeScript(JS_BIND_INPUT, elem);
|
||||
return await input.sendKeys(absolutePath);
|
||||
}
|
||||
|
||||
dropFolder(dropArea, folderPath) {
|
||||
async dropFolder(dropArea, folderPath) {
|
||||
browser.setFileDetector(new remote.FileDetector());
|
||||
|
||||
const absolutePath = path.resolve(path.join(browser.params.testConfig.main.rootPath, folderPath));
|
||||
fs.accessSync(absolutePath, fs.constants.F_OK);
|
||||
|
||||
return dropArea.getWebElement().then((element) => {
|
||||
browser.executeScript(JS_BIND_INPUT_FOLDER, element).then((input: any) => {
|
||||
input.sendKeys(absolutePath);
|
||||
|
||||
});
|
||||
});
|
||||
const elem = await dropArea.getWebElement();
|
||||
const input: any = await browser.executeScript(JS_BIND_INPUT_FOLDER, elem);
|
||||
return await input.sendKeys(absolutePath);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -35,7 +35,7 @@ export class UsersActions {
|
||||
}
|
||||
|
||||
async createApsUser(alfrescoJsApi, tenantId) {
|
||||
const user = new User({ tenantId: tenantId });
|
||||
const user = new User({ tenantId });
|
||||
|
||||
await alfrescoJsApi.activiti.adminUsersApi.createNewUser(user);
|
||||
|
||||
@@ -54,7 +54,7 @@ export class UsersActions {
|
||||
}
|
||||
|
||||
async createApsUserWithName(alfrescoJsApi, tenantId, email, firstName, lastName) {
|
||||
const user = new User({ tenantId: tenantId , email: email, firstName: firstName, lastName: lastName});
|
||||
const user = new User({ tenantId , email, firstName, lastName});
|
||||
|
||||
await alfrescoJsApi.activiti.adminUsersApi.createNewUser(user);
|
||||
|
||||
|
||||
@@ -29,18 +29,18 @@ import { AlfrescoApiCompatibility as AlfrescoApi } from '@alfresco/js-api';
|
||||
|
||||
describe('Comment Component', () => {
|
||||
|
||||
const loginPage = new LoginPage();
|
||||
const contentServicesPage = new ContentServicesPage();
|
||||
const viewerPage = new ViewerPage();
|
||||
const commentsPage = new CommentsPage();
|
||||
const loginPage: LoginPage = new LoginPage();
|
||||
const contentServicesPage: ContentServicesPage = new ContentServicesPage();
|
||||
const viewerPage: ViewerPage = new ViewerPage();
|
||||
const commentsPage: CommentsPage = new CommentsPage();
|
||||
const navigationBarPage = new NavigationBarPage();
|
||||
const acsUser = new AcsUserModel();
|
||||
const acsUser: AcsUserModel = new AcsUserModel();
|
||||
|
||||
let userFullName, nodeId;
|
||||
|
||||
const pngFileModel = new FileModel({
|
||||
'name': resources.Files.ADF_DOCUMENTS.PNG.file_name,
|
||||
'location': resources.Files.ADF_DOCUMENTS.PNG.file_location
|
||||
name: resources.Files.ADF_DOCUMENTS.PNG.file_name,
|
||||
location: resources.Files.ADF_DOCUMENTS.PNG.file_location
|
||||
});
|
||||
this.alfrescoJsApi = new AlfrescoApi({
|
||||
provider: 'ECM',
|
||||
@@ -60,18 +60,17 @@ describe('Comment Component', () => {
|
||||
test: 'Test'
|
||||
};
|
||||
|
||||
beforeAll(async (done) => {
|
||||
beforeAll(async () => {
|
||||
await this.alfrescoJsApi.login(browser.params.testConfig.adf.adminEmail, browser.params.testConfig.adf.adminPassword);
|
||||
await this.alfrescoJsApi.core.peopleApi.addPerson(acsUser);
|
||||
|
||||
done();
|
||||
});
|
||||
|
||||
afterAll(async () => {
|
||||
await navigationBarPage.clickLogoutButton();
|
||||
});
|
||||
|
||||
beforeEach(async (done) => {
|
||||
beforeEach(async () => {
|
||||
await this.alfrescoJsApi.login(acsUser.id, acsUser.password);
|
||||
|
||||
const pngUploadedFile = await uploadActions.uploadFile(pngFileModel.location, pngFileModel.name, '-my-');
|
||||
@@ -82,96 +81,95 @@ describe('Comment Component', () => {
|
||||
|
||||
await loginPage.loginToContentServicesUsingUserModel(acsUser);
|
||||
|
||||
navigationBarPage.clickContentServicesButton();
|
||||
contentServicesPage.waitForTableBody();
|
||||
await navigationBarPage.clickContentServicesButton();
|
||||
await contentServicesPage.waitForTableBody();
|
||||
|
||||
done();
|
||||
});
|
||||
|
||||
afterEach(async (done) => {
|
||||
afterEach(async () => {
|
||||
await this.alfrescoJsApi.login(browser.params.testConfig.adf.adminEmail, browser.params.testConfig.adf.adminPassword);
|
||||
await uploadActions.deleteFileOrFolder(nodeId);
|
||||
done();
|
||||
|
||||
});
|
||||
|
||||
it('[C276947] Should be able to add a comment on ACS and view on ADF', async () => {
|
||||
await this.alfrescoJsApi.core.commentsApi.addComment(nodeId, { content: comments.test });
|
||||
|
||||
viewerPage.viewFile(pngFileModel.name);
|
||||
viewerPage.checkImgViewerIsDisplayed();
|
||||
viewerPage.clickInfoButton();
|
||||
viewerPage.checkInfoSideBarIsDisplayed();
|
||||
await viewerPage.viewFile(pngFileModel.name);
|
||||
await viewerPage.checkImgViewerIsDisplayed();
|
||||
await viewerPage.clickInfoButton();
|
||||
await viewerPage.checkInfoSideBarIsDisplayed();
|
||||
|
||||
commentsPage.checkCommentsTabIsSelected();
|
||||
commentsPage.checkCommentInputIsDisplayed();
|
||||
await commentsPage.checkCommentsTabIsSelected();
|
||||
await commentsPage.checkCommentInputIsDisplayed();
|
||||
|
||||
expect(commentsPage.getTotalNumberOfComments()).toEqual('Comments (1)');
|
||||
expect(commentsPage.getMessage(0)).toEqual(comments.test);
|
||||
expect(commentsPage.getUserName(0)).toEqual(userFullName);
|
||||
expect(commentsPage.getTime(0)).toMatch(/(ago|few)/);
|
||||
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)/);
|
||||
|
||||
});
|
||||
|
||||
it('[C276948] Should be able to add a comment on a file', () => {
|
||||
viewerPage.viewFile(pngFileModel.name);
|
||||
viewerPage.checkImgViewerIsDisplayed();
|
||||
viewerPage.clickInfoButton();
|
||||
viewerPage.checkInfoSideBarIsDisplayed();
|
||||
viewerPage.clickOnCommentsTab();
|
||||
it('[C276948] Should be able to add a comment on a file', async () => {
|
||||
await viewerPage.viewFile(pngFileModel.name);
|
||||
await viewerPage.checkImgViewerIsDisplayed();
|
||||
await viewerPage.clickInfoButton();
|
||||
await viewerPage.checkInfoSideBarIsDisplayed();
|
||||
await viewerPage.clickOnCommentsTab();
|
||||
|
||||
commentsPage.addComment(comments.first);
|
||||
commentsPage.checkUserIconIsDisplayed(0);
|
||||
await commentsPage.addComment(comments.first);
|
||||
await commentsPage.checkUserIconIsDisplayed();
|
||||
|
||||
expect(commentsPage.getTotalNumberOfComments()).toEqual('Comments (1)');
|
||||
expect(commentsPage.getMessage(0)).toEqual(comments.first);
|
||||
expect(commentsPage.getUserName(0)).toEqual(userFullName);
|
||||
expect(commentsPage.getTime(0)).toMatch(/(ago|few)/);
|
||||
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)/);
|
||||
});
|
||||
|
||||
it('[C280021] Should be able to add a multiline comment on a file', () => {
|
||||
viewerPage.viewFile(pngFileModel.name);
|
||||
viewerPage.checkImgViewerIsDisplayed();
|
||||
viewerPage.clickInfoButton();
|
||||
viewerPage.checkInfoSideBarIsDisplayed();
|
||||
viewerPage.clickOnCommentsTab();
|
||||
it('[C280021] Should be able to add a multiline comment on a file', async () => {
|
||||
await viewerPage.viewFile(pngFileModel.name);
|
||||
await viewerPage.checkImgViewerIsDisplayed();
|
||||
await viewerPage.clickInfoButton();
|
||||
await viewerPage.checkInfoSideBarIsDisplayed();
|
||||
await viewerPage.clickOnCommentsTab();
|
||||
|
||||
commentsPage.addComment(comments.multiline);
|
||||
commentsPage.checkUserIconIsDisplayed(0);
|
||||
await commentsPage.addComment(comments.multiline);
|
||||
await commentsPage.checkUserIconIsDisplayed();
|
||||
|
||||
expect(commentsPage.getTotalNumberOfComments()).toEqual('Comments (1)');
|
||||
expect(commentsPage.getMessage(0)).toEqual(comments.multiline);
|
||||
expect(commentsPage.getUserName(0)).toEqual(userFullName);
|
||||
expect(commentsPage.getTime(0)).toMatch(/(ago|few)/);
|
||||
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)/);
|
||||
|
||||
commentsPage.addComment(comments.second);
|
||||
commentsPage.checkUserIconIsDisplayed(0);
|
||||
await commentsPage.addComment(comments.second);
|
||||
await commentsPage.checkUserIconIsDisplayed();
|
||||
|
||||
expect(commentsPage.getTotalNumberOfComments()).toEqual('Comments (2)');
|
||||
expect(commentsPage.getMessage(0)).toEqual(comments.second);
|
||||
expect(commentsPage.getUserName(0)).toEqual(userFullName);
|
||||
expect(commentsPage.getTime(0)).toMatch(/(ago|few)/);
|
||||
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)/);
|
||||
});
|
||||
|
||||
it('[C280022] Should not be able to add an HTML or other code input into the comment input filed', () => {
|
||||
viewerPage.viewFile(pngFileModel.name);
|
||||
viewerPage.checkImgViewerIsDisplayed();
|
||||
viewerPage.clickInfoButton();
|
||||
viewerPage.checkInfoSideBarIsDisplayed();
|
||||
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.checkImgViewerIsDisplayed();
|
||||
await viewerPage.clickInfoButton();
|
||||
await viewerPage.checkInfoSideBarIsDisplayed();
|
||||
await viewerPage.clickOnCommentsTab();
|
||||
|
||||
commentsPage.addComment(comments.codeType);
|
||||
commentsPage.checkUserIconIsDisplayed(0);
|
||||
await commentsPage.addComment(comments.codeType);
|
||||
await commentsPage.checkUserIconIsDisplayed();
|
||||
|
||||
expect(commentsPage.getTotalNumberOfComments()).toEqual('Comments (1)');
|
||||
expect(commentsPage.getMessage(0)).toEqual('First name: Last name:');
|
||||
expect(commentsPage.getUserName(0)).toEqual(userFullName);
|
||||
expect(commentsPage.getTime(0)).toMatch(/(ago|few)/);
|
||||
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)/);
|
||||
});
|
||||
|
||||
describe('Consumer Permissions', () => {
|
||||
let site, pngUploadedFile;
|
||||
|
||||
beforeAll(async (done) => {
|
||||
beforeAll(async () => {
|
||||
await this.alfrescoJsApi.login(browser.params.testConfig.adf.adminEmail, browser.params.testConfig.adf.adminPassword);
|
||||
|
||||
site = await this.alfrescoJsApi.core.sitesApi.createSite({
|
||||
@@ -186,31 +184,29 @@ describe('Comment Component', () => {
|
||||
|
||||
pngUploadedFile = await uploadActions.uploadFile(pngFileModel.location, pngFileModel.name, site.entry.guid);
|
||||
|
||||
loginPage.loginToContentServicesUsingUserModel(acsUser);
|
||||
await loginPage.loginToContentServicesUsingUserModel(acsUser);
|
||||
|
||||
navigationBarPage.clickContentServicesButton();
|
||||
await navigationBarPage.clickContentServicesButton();
|
||||
|
||||
done();
|
||||
});
|
||||
|
||||
afterAll((done) => {
|
||||
uploadActions.deleteFileOrFolder(pngUploadedFile.entry.id);
|
||||
afterAll(async () => {
|
||||
await uploadActions.deleteFileOrFolder(pngUploadedFile.entry.id);
|
||||
|
||||
done();
|
||||
});
|
||||
|
||||
it('[C290147] Should NOT be able to add comments to a site file with Consumer permissions', () => {
|
||||
navigationBarPage.goToSite(site);
|
||||
contentServicesPage.checkAcsContainer();
|
||||
it('[C290147] Should NOT be able to add comments to a site file with Consumer permissions', async () => {
|
||||
await navigationBarPage.goToSite(site);
|
||||
await contentServicesPage.checkAcsContainer();
|
||||
|
||||
viewerPage.viewFile(pngUploadedFile.entry.name);
|
||||
viewerPage.checkImgViewerIsDisplayed();
|
||||
viewerPage.checkInfoButtonIsDisplayed();
|
||||
viewerPage.clickInfoButton();
|
||||
viewerPage.checkInfoSideBarIsDisplayed();
|
||||
await viewerPage.viewFile(pngUploadedFile.entry.name);
|
||||
await viewerPage.checkImgViewerIsDisplayed();
|
||||
await viewerPage.checkInfoButtonIsDisplayed();
|
||||
await viewerPage.clickInfoButton();
|
||||
await viewerPage.checkInfoSideBarIsDisplayed();
|
||||
|
||||
commentsPage.checkCommentsTabIsSelected();
|
||||
commentsPage.checkCommentInputIsNotDisplayed();
|
||||
await commentsPage.checkCommentsTabIsSelected();
|
||||
await commentsPage.checkCommentInputIsNotDisplayed();
|
||||
});
|
||||
});
|
||||
});
|
||||
|
||||
@@ -24,7 +24,7 @@ import { AlfrescoApiCompatibility as AlfrescoApi } from '@alfresco/js-api';
|
||||
import { browser, Key } from 'protractor';
|
||||
import { NavigationBarPage } from '../../pages/adf/navigationBarPage';
|
||||
|
||||
describe('Create folder directive', function () {
|
||||
describe('Create folder directive', () => {
|
||||
|
||||
const loginPage = new LoginPage();
|
||||
const contentServicesPage = new ContentServicesPage();
|
||||
@@ -34,7 +34,7 @@ describe('Create folder directive', function () {
|
||||
const acsUser = new AcsUserModel();
|
||||
const navigationBarPage = new NavigationBarPage();
|
||||
|
||||
beforeAll(async (done) => {
|
||||
beforeAll(async () => {
|
||||
this.alfrescoJsApi = new AlfrescoApi({
|
||||
provider: 'ECM',
|
||||
hostEcm: browser.params.testConfig.adf_acs.host
|
||||
@@ -46,106 +46,105 @@ describe('Create folder directive', function () {
|
||||
|
||||
await loginPage.loginToContentServicesUsingUserModel(acsUser);
|
||||
|
||||
contentServicesPage.goToDocumentList();
|
||||
await contentServicesPage.goToDocumentList();
|
||||
|
||||
done();
|
||||
});
|
||||
|
||||
afterAll(async () => {
|
||||
await navigationBarPage.clickLogoutButton();
|
||||
});
|
||||
|
||||
beforeEach(async (done) => {
|
||||
beforeEach(async () => {
|
||||
await browser.actions().sendKeys(Key.ESCAPE).perform();
|
||||
done();
|
||||
|
||||
});
|
||||
|
||||
afterEach(async (done) => {
|
||||
afterEach(async () => {
|
||||
await browser.actions().sendKeys(Key.ESCAPE).perform();
|
||||
done();
|
||||
|
||||
});
|
||||
|
||||
it('[C260154] Should not create the folder if cancel button is clicked', () => {
|
||||
it('[C260154] Should not create the folder if cancel button is clicked', async () => {
|
||||
const folderName = 'cancelFolder';
|
||||
contentServicesPage.clickOnCreateNewFolder();
|
||||
await contentServicesPage.clickOnCreateNewFolder();
|
||||
|
||||
createFolderDialog.addFolderName(folderName);
|
||||
createFolderDialog.clickOnCancelButton();
|
||||
await createFolderDialog.addFolderName(folderName);
|
||||
await createFolderDialog.clickOnCancelButton();
|
||||
|
||||
contentServicesPage.checkContentIsNotDisplayed(folderName);
|
||||
await contentServicesPage.checkContentIsNotDisplayed(folderName);
|
||||
});
|
||||
|
||||
it('[C260155] Should enable the Create button only when a folder name is present', () => {
|
||||
it('[C260155] Should enable the Create button only when a folder name is present', async () => {
|
||||
const folderName = 'NotEnableFolder';
|
||||
contentServicesPage.clickOnCreateNewFolder();
|
||||
await contentServicesPage.clickOnCreateNewFolder();
|
||||
|
||||
createFolderDialog.checkCreateUpdateBtnIsDisabled();
|
||||
await createFolderDialog.checkCreateUpdateBtnIsDisabled();
|
||||
|
||||
createFolderDialog.addFolderName(folderName);
|
||||
await createFolderDialog.addFolderName(folderName);
|
||||
|
||||
createFolderDialog.checkCreateUpdateBtnIsEnabled();
|
||||
await createFolderDialog.checkCreateUpdateBtnIsEnabled();
|
||||
});
|
||||
|
||||
it('[C260156] Should not be possible create two folder with the same name', () => {
|
||||
it('[C260156] Should not be possible create two folder with the same name', async () => {
|
||||
const folderName = 'duplicate';
|
||||
contentServicesPage.createNewFolder(folderName);
|
||||
await contentServicesPage.createNewFolder(folderName);
|
||||
|
||||
contentServicesPage.checkContentIsDisplayed(folderName);
|
||||
await contentServicesPage.checkContentIsDisplayed(folderName);
|
||||
|
||||
contentServicesPage.createNewFolder(folderName);
|
||||
await contentServicesPage.createNewFolder(folderName);
|
||||
|
||||
notificationHistoryPage.checkNotifyContains('There\'s already a folder with this name. Try a different name.');
|
||||
await notificationHistoryPage.checkNotifyContains('There\'s already a folder with this name. Try a different name.');
|
||||
});
|
||||
|
||||
it('[C260157] Should be possible create a folder under a folder with the same name', () => {
|
||||
it('[C260157] Should be possible create a folder under a folder with the same name', async () => {
|
||||
const folderName = 'sameSubFolder';
|
||||
|
||||
contentServicesPage.createNewFolder(folderName);
|
||||
contentServicesPage.checkContentIsDisplayed(folderName);
|
||||
await contentServicesPage.createNewFolder(folderName);
|
||||
await contentServicesPage.checkContentIsDisplayed(folderName);
|
||||
|
||||
contentServicesPage.doubleClickRow(folderName);
|
||||
await contentServicesPage.doubleClickRow(folderName);
|
||||
|
||||
contentServicesPage.createNewFolder(folderName);
|
||||
contentServicesPage.checkContentIsDisplayed(folderName);
|
||||
await contentServicesPage.createNewFolder(folderName);
|
||||
await contentServicesPage.checkContentIsDisplayed(folderName);
|
||||
});
|
||||
|
||||
it('[C260158] Should be possible add a folder description when create a new folder', () => {
|
||||
it('[C260158] Should be possible add a folder description when create a new folder', async () => {
|
||||
const folderName = 'folderDescription';
|
||||
const description = 'this is the description';
|
||||
|
||||
contentServicesPage.clickOnCreateNewFolder();
|
||||
await contentServicesPage.clickOnCreateNewFolder();
|
||||
|
||||
createFolderDialog.addFolderName(folderName);
|
||||
createFolderDialog.addFolderDescription(description);
|
||||
await createFolderDialog.addFolderName(folderName);
|
||||
await createFolderDialog.addFolderDescription(description);
|
||||
|
||||
createFolderDialog.clickOnCreateUpdateButton();
|
||||
await createFolderDialog.clickOnCreateUpdateButton();
|
||||
|
||||
contentServicesPage.checkContentIsDisplayed(folderName);
|
||||
await contentServicesPage.checkContentIsDisplayed(folderName);
|
||||
|
||||
contentServicesPage.metadataContent(folderName);
|
||||
await contentServicesPage.metadataContent(folderName);
|
||||
|
||||
expect(metadataViewPage.getPropertyText('properties.cm:description')).toEqual('this is the description');
|
||||
await expect(await metadataViewPage.getPropertyText('properties.cm:description')).toEqual('this is the description');
|
||||
});
|
||||
|
||||
it('[C260159] Should not be possible create a folder with banned character', () => {
|
||||
browser.refresh();
|
||||
contentServicesPage.clickOnCreateNewFolder();
|
||||
it('[C260159] Should not be possible create a folder with banned character', async () => {
|
||||
await browser.refresh();
|
||||
await contentServicesPage.clickOnCreateNewFolder();
|
||||
|
||||
createFolderDialog.addFolderName('*');
|
||||
createFolderDialog.checkCreateUpdateBtnIsDisabled();
|
||||
createFolderDialog.addFolderName('<');
|
||||
createFolderDialog.checkCreateUpdateBtnIsDisabled();
|
||||
createFolderDialog.addFolderName('>');
|
||||
createFolderDialog.checkCreateUpdateBtnIsDisabled();
|
||||
createFolderDialog.addFolderName('\\');
|
||||
createFolderDialog.checkCreateUpdateBtnIsDisabled();
|
||||
createFolderDialog.addFolderName('/');
|
||||
createFolderDialog.checkCreateUpdateBtnIsDisabled();
|
||||
createFolderDialog.addFolderName('?');
|
||||
createFolderDialog.checkCreateUpdateBtnIsDisabled();
|
||||
createFolderDialog.addFolderName(':');
|
||||
createFolderDialog.checkCreateUpdateBtnIsDisabled();
|
||||
createFolderDialog.addFolderName('|');
|
||||
createFolderDialog.checkCreateUpdateBtnIsDisabled();
|
||||
await createFolderDialog.addFolderName('*');
|
||||
await createFolderDialog.checkCreateUpdateBtnIsDisabled();
|
||||
await createFolderDialog.addFolderName('<');
|
||||
await createFolderDialog.checkCreateUpdateBtnIsDisabled();
|
||||
await createFolderDialog.addFolderName('>');
|
||||
await createFolderDialog.checkCreateUpdateBtnIsDisabled();
|
||||
await createFolderDialog.addFolderName('\\');
|
||||
await createFolderDialog.checkCreateUpdateBtnIsDisabled();
|
||||
await createFolderDialog.addFolderName('/');
|
||||
await createFolderDialog.checkCreateUpdateBtnIsDisabled();
|
||||
await createFolderDialog.addFolderName('?');
|
||||
await createFolderDialog.checkCreateUpdateBtnIsDisabled();
|
||||
await createFolderDialog.addFolderName(':');
|
||||
await createFolderDialog.checkCreateUpdateBtnIsDisabled();
|
||||
await createFolderDialog.addFolderName('|');
|
||||
await createFolderDialog.checkCreateUpdateBtnIsDisabled();
|
||||
});
|
||||
});
|
||||
|
||||
@@ -26,7 +26,7 @@ import { AlfrescoApiCompatibility as AlfrescoApi } from '@alfresco/js-api';
|
||||
import { StringUtil } from '@alfresco/adf-testing';
|
||||
import { NavigationBarPage } from '../../pages/adf/navigationBarPage';
|
||||
|
||||
describe('Create library directive', function () {
|
||||
describe('Create library directive', () => {
|
||||
|
||||
const loginPage = new LoginPage();
|
||||
const contentServicesPage = new ContentServicesPage();
|
||||
@@ -44,7 +44,7 @@ describe('Create library directive', function () {
|
||||
|
||||
const acsUser = new AcsUserModel();
|
||||
|
||||
beforeAll(async (done) => {
|
||||
beforeAll(async () => {
|
||||
this.alfrescoJsApi = new AlfrescoApi({
|
||||
provider: 'ECM',
|
||||
hostEcm: browser.params.testConfig.adf_acs.host
|
||||
@@ -57,222 +57,221 @@ describe('Create library directive', function () {
|
||||
await loginPage.loginToContentServicesUsingUserModel(acsUser);
|
||||
|
||||
createSite = await this.alfrescoJsApi.core.sitesApi.createSite({
|
||||
'title': StringUtil.generateRandomString(20).toLowerCase(),
|
||||
'visibility': 'PUBLIC'
|
||||
title: StringUtil.generateRandomString(20).toLowerCase(),
|
||||
visibility: 'PUBLIC'
|
||||
});
|
||||
|
||||
done();
|
||||
});
|
||||
|
||||
afterAll(async () => {
|
||||
await navigationBarPage.clickLogoutButton();
|
||||
});
|
||||
|
||||
beforeEach((done) => {
|
||||
contentServicesPage.goToDocumentList();
|
||||
contentServicesPage.openCreateLibraryDialog();
|
||||
done();
|
||||
beforeEach(async () => {
|
||||
await contentServicesPage.goToDocumentList();
|
||||
await contentServicesPage.openCreateLibraryDialog();
|
||||
|
||||
});
|
||||
|
||||
afterEach(() => {
|
||||
BrowserActions.closeMenuAndDialogs();
|
||||
afterEach(async () => {
|
||||
await BrowserActions.closeMenuAndDialogs();
|
||||
});
|
||||
|
||||
it('[C290158] Should display the Create Library defaults', () => {
|
||||
expect(createLibraryDialog.getTitle()).toMatch('Create Library');
|
||||
expect(createLibraryDialog.isNameDisplayed()).toBe(true, 'Name input field is not displayed');
|
||||
expect(createLibraryDialog.isLibraryIdDisplayed()).toBe(true, 'Library ID field is not displayed');
|
||||
expect(createLibraryDialog.isDescriptionDisplayed()).toBe(true, 'Library description is not displayed');
|
||||
expect(createLibraryDialog.isPublicDisplayed()).toBe(true, 'Public radio button is not displayed');
|
||||
expect(createLibraryDialog.isPrivateDisplayed()).toBe(true, 'Private radio button is not displayed');
|
||||
expect(createLibraryDialog.isModeratedDisplayed()).toBe(true, 'Moderated radio button is not displayed');
|
||||
expect(createLibraryDialog.isCreateEnabled()).toBe(false, 'Create button is not disabled');
|
||||
expect(createLibraryDialog.isCancelEnabled()).toBe(true, 'Cancel button is disabled');
|
||||
expect(createLibraryDialog.getSelectedRadio()).toMatch(visibility.public, 'The default visibility is not public');
|
||||
it('[C290158] Should display the Create Library defaults', async () => {
|
||||
await expect(await createLibraryDialog.getTitle()).toMatch('Create Library');
|
||||
await expect(await createLibraryDialog.isNameDisplayed()).toBe(true, 'Name input field is not displayed');
|
||||
await expect(await createLibraryDialog.isLibraryIdDisplayed()).toBe(true, 'Library ID field is not displayed');
|
||||
await expect(await createLibraryDialog.isDescriptionDisplayed()).toBe(true, 'Library description is not displayed');
|
||||
await expect(await createLibraryDialog.isPublicDisplayed()).toBe(true, 'Public radio button is not displayed');
|
||||
await expect(await createLibraryDialog.isPrivateDisplayed()).toBe(true, 'Private radio button is not displayed');
|
||||
await expect(await createLibraryDialog.isModeratedDisplayed()).toBe(true, 'Moderated radio button is not displayed');
|
||||
await expect(await createLibraryDialog.isCreateEnabled()).toBe(false, 'Create button is not disabled');
|
||||
await expect(await createLibraryDialog.isCancelEnabled()).toBe(true, 'Cancel button is disabled');
|
||||
await expect(await createLibraryDialog.getSelectedRadio()).toMatch(visibility.public, 'The default visibility is not public');
|
||||
});
|
||||
|
||||
it('[C290159] Should close the dialog when clicking Cancel button', () => {
|
||||
it('[C290159] Should close the dialog when clicking Cancel button', async () => {
|
||||
const libraryName = 'cancelLibrary';
|
||||
|
||||
createLibraryDialog.typeLibraryName(libraryName);
|
||||
await createLibraryDialog.typeLibraryName(libraryName);
|
||||
|
||||
createLibraryDialog.clickCancel();
|
||||
await createLibraryDialog.clickCancel();
|
||||
|
||||
createLibraryDialog.waitForDialogToClose();
|
||||
await createLibraryDialog.waitForDialogToClose();
|
||||
});
|
||||
|
||||
it('[C290160] Should create a public library', () => {
|
||||
it('[C290160] Should create a public library', async () => {
|
||||
const libraryName = StringUtil.generateRandomString();
|
||||
const libraryDescription = StringUtil.generateRandomString();
|
||||
createLibraryDialog.typeLibraryName(libraryName);
|
||||
createLibraryDialog.typeLibraryDescription(libraryDescription);
|
||||
createLibraryDialog.selectPublic();
|
||||
await createLibraryDialog.typeLibraryName(libraryName);
|
||||
await createLibraryDialog.typeLibraryDescription(libraryDescription);
|
||||
await createLibraryDialog.selectPublic();
|
||||
|
||||
expect(createLibraryDialog.getSelectedRadio()).toMatch(visibility.public, 'The visibility is not public');
|
||||
await expect(await createLibraryDialog.getSelectedRadio()).toMatch(visibility.public, 'The visibility is not public');
|
||||
|
||||
createLibraryDialog.clickCreate();
|
||||
createLibraryDialog.waitForDialogToClose();
|
||||
await createLibraryDialog.clickCreate();
|
||||
await createLibraryDialog.waitForDialogToClose();
|
||||
|
||||
expect(createLibraryDialog.isDialogOpen()).not.toBe(true, 'The Create Library dialog is not closed');
|
||||
await expect(await createLibraryDialog.isDialogOpen()).not.toBe(true, 'The Create Library dialog is not closed');
|
||||
|
||||
customSourcesPage.navigateToCustomSources();
|
||||
customSourcesPage.selectMySitesSourceType();
|
||||
customSourcesPage.checkRowIsDisplayed(libraryName);
|
||||
await customSourcesPage.navigateToCustomSources();
|
||||
await customSourcesPage.selectMySitesSourceType();
|
||||
await customSourcesPage.checkRowIsDisplayed(libraryName);
|
||||
|
||||
expect(customSourcesPage.getStatusCell(libraryName)).toMatch('PUBLIC', 'Wrong library status.');
|
||||
await expect(await customSourcesPage.getStatusCell(libraryName)).toMatch('PUBLIC', 'Wrong library status.');
|
||||
});
|
||||
|
||||
it('[C290173] Should create a private library', () => {
|
||||
it('[C290173] Should create a private library', async () => {
|
||||
const libraryName = StringUtil.generateRandomString();
|
||||
const libraryDescription = StringUtil.generateRandomString();
|
||||
createLibraryDialog.typeLibraryName(libraryName);
|
||||
createLibraryDialog.typeLibraryDescription(libraryDescription);
|
||||
createLibraryDialog.selectPrivate();
|
||||
await createLibraryDialog.typeLibraryName(libraryName);
|
||||
await createLibraryDialog.typeLibraryDescription(libraryDescription);
|
||||
await createLibraryDialog.selectPrivate();
|
||||
|
||||
expect(createLibraryDialog.getSelectedRadio()).toMatch(visibility.private, 'The visibility is not private');
|
||||
await expect(await createLibraryDialog.getSelectedRadio()).toMatch(visibility.private, 'The visibility is not private');
|
||||
|
||||
createLibraryDialog.clickCreate();
|
||||
createLibraryDialog.waitForDialogToClose();
|
||||
await createLibraryDialog.clickCreate();
|
||||
await createLibraryDialog.waitForDialogToClose();
|
||||
|
||||
expect(createLibraryDialog.isDialogOpen()).not.toBe(true, 'The Create Library dialog is not closed');
|
||||
await expect(await createLibraryDialog.isDialogOpen()).not.toBe(true, 'The Create Library dialog is not closed');
|
||||
|
||||
customSourcesPage.navigateToCustomSources();
|
||||
customSourcesPage.selectMySitesSourceType();
|
||||
customSourcesPage.checkRowIsDisplayed(libraryName);
|
||||
await customSourcesPage.navigateToCustomSources();
|
||||
await customSourcesPage.selectMySitesSourceType();
|
||||
await customSourcesPage.checkRowIsDisplayed(libraryName);
|
||||
|
||||
expect(customSourcesPage.getStatusCell(libraryName)).toMatch('PRIVATE', 'Wrong library status.');
|
||||
await expect(await customSourcesPage.getStatusCell(libraryName)).toMatch('PRIVATE', 'Wrong library status.');
|
||||
});
|
||||
|
||||
it('[C290174, C290175] Should create a moderated library with a given Library ID', () => {
|
||||
it('[C290174, C290175] Should create a moderated library with a given Library ID', async () => {
|
||||
const libraryName = StringUtil.generateRandomString();
|
||||
const libraryId = StringUtil.generateRandomString();
|
||||
const libraryDescription = StringUtil.generateRandomString();
|
||||
createLibraryDialog.typeLibraryName(libraryName);
|
||||
createLibraryDialog.typeLibraryId(libraryId);
|
||||
createLibraryDialog.typeLibraryDescription(libraryDescription);
|
||||
createLibraryDialog.selectModerated();
|
||||
await createLibraryDialog.typeLibraryName(libraryName);
|
||||
await createLibraryDialog.typeLibraryId(libraryId);
|
||||
await createLibraryDialog.typeLibraryDescription(libraryDescription);
|
||||
await createLibraryDialog.selectModerated();
|
||||
|
||||
expect(createLibraryDialog.getSelectedRadio()).toMatch(visibility.moderated, 'The visibility is not moderated');
|
||||
await expect(await createLibraryDialog.getSelectedRadio()).toMatch(visibility.moderated, 'The visibility is not moderated');
|
||||
|
||||
createLibraryDialog.clickCreate();
|
||||
createLibraryDialog.waitForDialogToClose();
|
||||
await createLibraryDialog.clickCreate();
|
||||
await createLibraryDialog.waitForDialogToClose();
|
||||
|
||||
expect(createLibraryDialog.isDialogOpen()).not.toBe(true, 'The Create Library dialog is not closed');
|
||||
await expect(await createLibraryDialog.isDialogOpen()).not.toBe(true, 'The Create Library dialog is not closed');
|
||||
|
||||
customSourcesPage.navigateToCustomSources();
|
||||
customSourcesPage.selectMySitesSourceType();
|
||||
customSourcesPage.checkRowIsDisplayed(libraryName);
|
||||
await customSourcesPage.navigateToCustomSources();
|
||||
await customSourcesPage.selectMySitesSourceType();
|
||||
await customSourcesPage.checkRowIsDisplayed(libraryName);
|
||||
|
||||
expect(customSourcesPage.getStatusCell(libraryName)).toMatch('MODERATED', 'Wrong library status.');
|
||||
await expect(await customSourcesPage.getStatusCell(libraryName)).toMatch('MODERATED', 'Wrong library status.');
|
||||
});
|
||||
|
||||
it('[C290163] Should disable Create button when a mandatory field is not filled in', () => {
|
||||
it('[C290163] Should disable Create button when a mandatory field is not filled in', async () => {
|
||||
const inputValue = StringUtil.generateRandomString();
|
||||
|
||||
createLibraryDialog.typeLibraryName(inputValue);
|
||||
createLibraryDialog.clearLibraryId();
|
||||
expect(createLibraryDialog.isCreateEnabled()).not.toBe(true, 'The Create button is enabled');
|
||||
createLibraryDialog.clearLibraryName();
|
||||
await createLibraryDialog.typeLibraryName(inputValue);
|
||||
await createLibraryDialog.clearLibraryId();
|
||||
await expect(await createLibraryDialog.isCreateEnabled()).not.toBe(true, 'The Create button is enabled');
|
||||
await createLibraryDialog.clearLibraryName();
|
||||
|
||||
createLibraryDialog.typeLibraryId(inputValue);
|
||||
expect(createLibraryDialog.isCreateEnabled()).not.toBe(true, 'The Create button is enabled');
|
||||
createLibraryDialog.clearLibraryId();
|
||||
await createLibraryDialog.typeLibraryId(inputValue);
|
||||
await expect(await createLibraryDialog.isCreateEnabled()).not.toBe(true, 'The Create button is enabled');
|
||||
await createLibraryDialog.clearLibraryId();
|
||||
|
||||
createLibraryDialog.typeLibraryDescription(inputValue);
|
||||
expect(createLibraryDialog.isCreateEnabled()).not.toBe(true, 'The Create button is enabled');
|
||||
await createLibraryDialog.typeLibraryDescription(inputValue);
|
||||
await expect(await createLibraryDialog.isCreateEnabled()).not.toBe(true, 'The Create button is enabled');
|
||||
});
|
||||
|
||||
it('[C290164] Should auto-fill in the Library Id built from library name', () => {
|
||||
it('[C290164] Should auto-fill in the Library Id built from library name', async () => {
|
||||
const name: string[] = ['abcd1234', 'ab cd 12 34', 'ab cd&12+34_@link/*'];
|
||||
const libraryId: string[] = ['abcd1234', 'ab-cd-12-34', 'ab-cd1234link'];
|
||||
|
||||
for (let _i = 0; _i < 3; _i++) {
|
||||
createLibraryDialog.typeLibraryName(name[_i]);
|
||||
expect(createLibraryDialog.getLibraryIdText()).toMatch(libraryId[_i]);
|
||||
createLibraryDialog.clearLibraryName();
|
||||
for (let i = 0; i < 3; i++) {
|
||||
await createLibraryDialog.typeLibraryName(name[i]);
|
||||
await expect(await createLibraryDialog.getLibraryIdText()).toMatch(libraryId[i]);
|
||||
await createLibraryDialog.clearLibraryName();
|
||||
}
|
||||
});
|
||||
|
||||
it('[C290176] Should not accept special characters for Library Id', () => {
|
||||
it('[C290176] Should not accept special characters for Library Id', async () => {
|
||||
const name = 'My Library';
|
||||
const libraryId: string[] = ['My New Library', 'My+New+Library123!', '<>'];
|
||||
|
||||
createLibraryDialog.typeLibraryName(name);
|
||||
await createLibraryDialog.typeLibraryName(name);
|
||||
|
||||
for (let _i = 0; _i < 3; _i++) {
|
||||
createLibraryDialog.typeLibraryId(libraryId[_i]);
|
||||
expect(createLibraryDialog.isErrorMessageDisplayed()).toBe(true, 'Error message is not displayed');
|
||||
expect(createLibraryDialog.getErrorMessage()).toMatch('Use numbers and letters only');
|
||||
for (let i = 0; i < 3; i++) {
|
||||
await createLibraryDialog.typeLibraryId(libraryId[i]);
|
||||
await expect(await createLibraryDialog.isErrorMessageDisplayed()).toBe(true, 'Error message is not displayed');
|
||||
await expect(await createLibraryDialog.getErrorMessage()).toMatch('Use numbers and letters only');
|
||||
}
|
||||
});
|
||||
|
||||
it('[C291985] Should not accept less than one character name for Library name', () => {
|
||||
it('[C291985] Should not accept less than 2 characters for Library name', async () => {
|
||||
const name = 'x';
|
||||
const libraryId = 'My New Library';
|
||||
const libraryId = 'my-library-id';
|
||||
|
||||
createLibraryDialog.typeLibraryName(name);
|
||||
createLibraryDialog.typeLibraryId(libraryId);
|
||||
expect(createLibraryDialog.isErrorMessageDisplayed()).toBe(true, 'Error message is not displayed');
|
||||
expect(createLibraryDialog.getErrorMessage()).toMatch('Title must be at least 2 characters long');
|
||||
await createLibraryDialog.typeLibraryName(name);
|
||||
await createLibraryDialog.typeLibraryId(libraryId);
|
||||
await expect(await createLibraryDialog.isErrorMessageDisplayed()).toBe(true, 'Error message is not displayed');
|
||||
await expect(await createLibraryDialog.getErrorMessage()).toMatch('Title must be at least 2 characters long');
|
||||
});
|
||||
|
||||
it('[C291793] Should display error for Name field filled in with spaces only', () => {
|
||||
it('[C291793] Should display error for Name field filled in with spaces only', async () => {
|
||||
const name = ' ';
|
||||
const libraryId = StringUtil.generateRandomString();
|
||||
|
||||
createLibraryDialog.typeLibraryName(name);
|
||||
createLibraryDialog.typeLibraryId(libraryId);
|
||||
await createLibraryDialog.typeLibraryName(name);
|
||||
await createLibraryDialog.typeLibraryId(libraryId);
|
||||
|
||||
expect(createLibraryDialog.isErrorMessageDisplayed()).toBe(true, 'Error message is not displayed');
|
||||
expect(createLibraryDialog.getErrorMessage()).toMatch("Library name can't contain only spaces");
|
||||
await expect(await createLibraryDialog.isErrorMessageDisplayed()).toBe(true, 'Error message is not displayed');
|
||||
await expect(await createLibraryDialog.getErrorMessage()).toMatch("Library name can't contain only spaces");
|
||||
});
|
||||
|
||||
it('[C290177] Should not accept a duplicate Library Id', () => {
|
||||
it('[C290177] Should not accept a duplicate Library Id', async () => {
|
||||
const name = 'My Library';
|
||||
const libraryId = StringUtil.generateRandomString();
|
||||
|
||||
createLibraryDialog.typeLibraryName(name);
|
||||
createLibraryDialog.typeLibraryId(libraryId);
|
||||
createLibraryDialog.clickCreate();
|
||||
createLibraryDialog.waitForDialogToClose();
|
||||
await createLibraryDialog.typeLibraryName(name);
|
||||
await createLibraryDialog.typeLibraryId(libraryId);
|
||||
await createLibraryDialog.clickCreate();
|
||||
await createLibraryDialog.waitForDialogToClose();
|
||||
|
||||
contentServicesPage.openCreateLibraryDialog();
|
||||
await contentServicesPage.openCreateLibraryDialog();
|
||||
|
||||
createLibraryDialog.typeLibraryName(name);
|
||||
createLibraryDialog.typeLibraryId(libraryId);
|
||||
expect(createLibraryDialog.isErrorMessageDisplayed()).toBe(true, 'Error message is not displayed');
|
||||
expect(createLibraryDialog.getErrorMessage()).toMatch("This Library ID isn't available. Try a different Library ID.");
|
||||
await createLibraryDialog.typeLibraryName(name);
|
||||
await createLibraryDialog.typeLibraryId(libraryId);
|
||||
await expect(await createLibraryDialog.isErrorMessageDisplayed()).toBe(true, 'Error message is not displayed');
|
||||
await expect(await createLibraryDialog.getErrorMessage()).toMatch("This Library ID isn't available. Try a different Library ID.");
|
||||
});
|
||||
|
||||
it('[C290178] Should accept the same library name but different Library Ids', () => {
|
||||
it('[C290178] Should accept the same library name but different Library Ids', async () => {
|
||||
const name = createSite.entry.title;
|
||||
const libraryId = StringUtil.generateRandomString();
|
||||
|
||||
createLibraryDialog.typeLibraryName(name.toUpperCase());
|
||||
createLibraryDialog.typeLibraryId(libraryId);
|
||||
await createLibraryDialog.typeLibraryName(name.toUpperCase());
|
||||
await createLibraryDialog.typeLibraryId(libraryId);
|
||||
|
||||
createLibraryDialog.waitForLibraryNameHint();
|
||||
expect(createLibraryDialog.getLibraryNameHint()).toMatch('Library name already in use', 'The library name hint is wrong');
|
||||
await createLibraryDialog.waitForLibraryNameHint();
|
||||
await expect(await createLibraryDialog.getLibraryNameHint()).toMatch('Library name already in use', 'The library name hint is wrong');
|
||||
|
||||
createLibraryDialog.clickCreate();
|
||||
createLibraryDialog.waitForDialogToClose();
|
||||
await createLibraryDialog.clickCreate();
|
||||
await createLibraryDialog.waitForDialogToClose();
|
||||
|
||||
expect(createLibraryDialog.isDialogOpen()).not.toBe(true, 'The Create library dialog remained open');
|
||||
await expect(await createLibraryDialog.isDialogOpen()).not.toBe(true, 'The Create library dialog remained open');
|
||||
});
|
||||
|
||||
it('[C290179] Should not accept more than the expected characters for input fields', () => {
|
||||
it('[C290179] Should not accept more than the expected characters for input fields', async () => {
|
||||
const name = StringUtil.generateRandomString(257);
|
||||
const libraryId = StringUtil.generateRandomString(73);
|
||||
const libraryDescription = StringUtil.generateRandomString(513);
|
||||
|
||||
createLibraryDialog.typeLibraryName(name);
|
||||
createLibraryDialog.typeLibraryId(libraryId);
|
||||
createLibraryDialog.typeLibraryDescription(libraryDescription);
|
||||
await createLibraryDialog.typeLibraryName(name);
|
||||
await createLibraryDialog.typeLibraryId(libraryId);
|
||||
await createLibraryDialog.typeLibraryDescription(libraryDescription);
|
||||
|
||||
createLibraryDialog.selectPublic();
|
||||
await createLibraryDialog.selectPublic();
|
||||
|
||||
expect(createLibraryDialog.getErrorMessages(0)).toMatch('Use 256 characters or less for title');
|
||||
expect(createLibraryDialog.getErrorMessages(1)).toMatch('Use 72 characters or less for the URL name');
|
||||
expect(createLibraryDialog.getErrorMessages(2)).toMatch('Use 512 characters or less for description');
|
||||
await expect(await createLibraryDialog.getErrorMessages(0)).toMatch('Use 256 characters or less for title');
|
||||
await expect(await createLibraryDialog.getErrorMessages(1)).toMatch('Use 72 characters or less for the URL name');
|
||||
await expect(await createLibraryDialog.getErrorMessages(2)).toMatch('Use 512 characters or less for description');
|
||||
});
|
||||
});
|
||||
|
||||
@@ -35,28 +35,28 @@ describe('Version component actions', () => {
|
||||
const acsUser = new AcsUserModel();
|
||||
|
||||
const txtFileComma = new FileModel({
|
||||
'name': 'comma,name',
|
||||
'location': resources.Files.ADF_DOCUMENTS.TXT.file_location
|
||||
name: 'comma,name',
|
||||
location: resources.Files.ADF_DOCUMENTS.TXT.file_location
|
||||
});
|
||||
|
||||
const txtFileModel = new FileModel({
|
||||
'name': resources.Files.ADF_DOCUMENTS.TXT.file_name,
|
||||
'location': resources.Files.ADF_DOCUMENTS.TXT.file_location
|
||||
name: resources.Files.ADF_DOCUMENTS.TXT.file_name,
|
||||
location: resources.Files.ADF_DOCUMENTS.TXT.file_location
|
||||
});
|
||||
|
||||
const file0BytesModel = new FileModel({
|
||||
'name': resources.Files.ADF_DOCUMENTS.TXT_0B.file_name,
|
||||
'location': resources.Files.ADF_DOCUMENTS.TXT_0B.file_location
|
||||
name: resources.Files.ADF_DOCUMENTS.TXT_0B.file_name,
|
||||
location: resources.Files.ADF_DOCUMENTS.TXT_0B.file_location
|
||||
});
|
||||
|
||||
const folderInfo = new FolderModel({
|
||||
'name': 'myFolder',
|
||||
'location': resources.Files.ADF_DOCUMENTS.TEXT_FOLDER.folder_location
|
||||
name: 'myFolder',
|
||||
location: resources.Files.ADF_DOCUMENTS.TEXT_FOLDER.folder_location
|
||||
});
|
||||
|
||||
const folderSecond = new FolderModel({
|
||||
'name': 'myrSecondFolder',
|
||||
'location': resources.Files.ADF_DOCUMENTS.TEXT_FOLDER.folder_location
|
||||
name: 'myrSecondFolder',
|
||||
location: resources.Files.ADF_DOCUMENTS.TEXT_FOLDER.folder_location
|
||||
});
|
||||
|
||||
this.alfrescoJsApi = new AlfrescoApi({
|
||||
@@ -65,7 +65,7 @@ describe('Version component actions', () => {
|
||||
});
|
||||
const uploadActions = new UploadActions(this.alfrescoJsApi);
|
||||
|
||||
beforeAll(async (done) => {
|
||||
beforeAll(async () => {
|
||||
|
||||
await this.alfrescoJsApi.login(browser.params.testConfig.adf.adminEmail, browser.params.testConfig.adf.adminPassword);
|
||||
await this.alfrescoJsApi.core.peopleApi.addPerson(acsUser);
|
||||
@@ -82,10 +82,9 @@ describe('Version component actions', () => {
|
||||
|
||||
await loginPage.loginToContentServicesUsingUserModel(acsUser);
|
||||
|
||||
navigationBarPage.clickContentServicesButton();
|
||||
contentServicesPage.waitForTableBody();
|
||||
await navigationBarPage.clickContentServicesButton();
|
||||
await contentServicesPage.waitForTableBody();
|
||||
|
||||
done();
|
||||
});
|
||||
|
||||
afterAll(async () => {
|
||||
@@ -93,48 +92,48 @@ describe('Version component actions', () => {
|
||||
});
|
||||
|
||||
afterEach(async () => {
|
||||
BrowserVisibility.waitUntilDialogIsClose();
|
||||
await BrowserVisibility.waitUntilDialogIsClose();
|
||||
});
|
||||
|
||||
it('[C260083] Download files - Different size values', () => {
|
||||
contentListPage.selectRow(txtFileModel.name);
|
||||
contentServicesPage.clickDownloadButton();
|
||||
FileBrowserUtil.isFileDownloaded(txtFileModel.name);
|
||||
BrowserVisibility.waitUntilDialogIsClose();
|
||||
it('[C260083] Download files - Different size values', async () => {
|
||||
await contentListPage.selectRow(txtFileModel.name);
|
||||
await contentServicesPage.clickDownloadButton();
|
||||
await FileBrowserUtil.isFileDownloaded(txtFileModel.name);
|
||||
await BrowserVisibility.waitUntilDialogIsClose();
|
||||
|
||||
contentListPage.selectRow(file0BytesModel.name);
|
||||
contentServicesPage.clickDownloadButton();
|
||||
FileBrowserUtil.isFileDownloaded(file0BytesModel.name);
|
||||
await contentListPage.selectRow(file0BytesModel.name);
|
||||
await contentServicesPage.clickDownloadButton();
|
||||
await FileBrowserUtil.isFileDownloaded(file0BytesModel.name);
|
||||
});
|
||||
|
||||
it('[C260084] Download folder', () => {
|
||||
contentListPage.selectRow(folderInfo.name);
|
||||
contentServicesPage.clickDownloadButton();
|
||||
FileBrowserUtil.isFileDownloaded(folderInfo.name + '.zip');
|
||||
it('[C260084] Download folder', async () => {
|
||||
await contentListPage.selectRow(folderInfo.name);
|
||||
await contentServicesPage.clickDownloadButton();
|
||||
await FileBrowserUtil.isFileDownloaded(folderInfo.name + '.zip');
|
||||
});
|
||||
|
||||
it('[C261032] File and Folder', () => {
|
||||
contentServicesPage.clickMultiSelectToggle();
|
||||
contentServicesPage.checkAcsContainer();
|
||||
contentListPage.dataTablePage().checkAllRows();
|
||||
contentServicesPage.clickDownloadButton();
|
||||
FileBrowserUtil.isFileDownloaded('archive.zip');
|
||||
it('[C261032] File and Folder', async () => {
|
||||
await contentServicesPage.clickMultiSelectToggle();
|
||||
await contentServicesPage.checkAcsContainer();
|
||||
await contentListPage.dataTablePage().checkAllRows();
|
||||
await contentServicesPage.clickDownloadButton();
|
||||
await FileBrowserUtil.isFileDownloaded('archive.zip');
|
||||
});
|
||||
|
||||
it('[C261033] Folder and Folder', () => {
|
||||
contentListPage.selectRow(folderInfo.name);
|
||||
contentListPage.selectRow(folderSecond.name);
|
||||
it('[C261033] Folder and Folder', async () => {
|
||||
await contentListPage.selectRow(folderInfo.name);
|
||||
await contentListPage.selectRow(folderSecond.name);
|
||||
|
||||
contentServicesPage.clickDownloadButton();
|
||||
await contentServicesPage.clickDownloadButton();
|
||||
|
||||
FileBrowserUtil.isFileDownloaded('archive.zip');
|
||||
BrowserVisibility.waitUntilDialogIsClose();
|
||||
await FileBrowserUtil.isFileDownloaded('archive.zip');
|
||||
await BrowserVisibility.waitUntilDialogIsClose();
|
||||
});
|
||||
|
||||
it('[C277757] Download file - Comma in file name', () => {
|
||||
contentListPage.selectRow(txtFileComma.name);
|
||||
contentServicesPage.clickDownloadButton();
|
||||
FileBrowserUtil.isFileDownloaded(txtFileComma.name);
|
||||
it('[C277757] Download file - Comma in file name', async () => {
|
||||
await contentListPage.selectRow(txtFileComma.name);
|
||||
await contentServicesPage.clickDownloadButton();
|
||||
await FileBrowserUtil.isFileDownloaded(txtFileComma.name);
|
||||
});
|
||||
|
||||
});
|
||||
|
||||
@@ -25,7 +25,7 @@ import { NavigationBarPage } from '../../pages/adf/navigationBarPage';
|
||||
import { FileModel } from '../../models/ACS/fileModel';
|
||||
import resources = require('../../util/resources');
|
||||
|
||||
describe('Edit folder directive', function () {
|
||||
describe('Edit folder directive', () => {
|
||||
|
||||
const loginPage = new LoginPage();
|
||||
const contentServicesPage = new ContentServicesPage();
|
||||
@@ -41,15 +41,15 @@ describe('Edit folder directive', function () {
|
||||
});
|
||||
|
||||
const pdfFile = new FileModel({
|
||||
'name': resources.Files.ADF_DOCUMENTS.PDF.file_name,
|
||||
'location': resources.Files.ADF_DOCUMENTS.PDF.file_location
|
||||
name: resources.Files.ADF_DOCUMENTS.PDF.file_name,
|
||||
location: resources.Files.ADF_DOCUMENTS.PDF.file_location
|
||||
});
|
||||
|
||||
const uploadActions = new UploadActions(this.alfrescoJsApi);
|
||||
const updateFolderName = StringUtil.generateRandomString(5);
|
||||
let editFolder, anotherFolder, filePdfNode, subFolder;
|
||||
|
||||
beforeAll(async (done) => {
|
||||
beforeAll(async () => {
|
||||
await this.alfrescoJsApi.login(browser.params.testConfig.adf.adminEmail, browser.params.testConfig.adf.adminPassword);
|
||||
await this.alfrescoJsApi.core.peopleApi.addPerson(acsUser);
|
||||
await this.alfrescoJsApi.core.peopleApi.addPerson(anotherAcsUser);
|
||||
@@ -74,171 +74,173 @@ describe('Edit folder directive', function () {
|
||||
|
||||
await loginPage.loginToContentServicesUsingUserModel(acsUser);
|
||||
|
||||
done();
|
||||
});
|
||||
|
||||
afterAll(async (done) => {
|
||||
afterAll(async () => {
|
||||
await navigationBarPage.clickLogoutButton();
|
||||
await this.alfrescoJsApi.login(browser.params.testConfig.adf.adminEmail, browser.params.testConfig.adf.adminPassword);
|
||||
await uploadActions.deleteFileOrFolder(editFolder.entry.id);
|
||||
await uploadActions.deleteFileOrFolder(anotherFolder.entry.id);
|
||||
await uploadActions.deleteFileOrFolder(filePdfNode.entry.id);
|
||||
done();
|
||||
|
||||
});
|
||||
|
||||
beforeEach(async (done) => {
|
||||
navigationBarPage.clickHomeButton();
|
||||
navigationBarPage.clickContentServicesButton();
|
||||
contentServicesPage.getContentList().dataTablePage().waitTillContentLoaded();
|
||||
done();
|
||||
beforeEach(async () => {
|
||||
await navigationBarPage.clickHomeButton();
|
||||
await navigationBarPage.clickContentServicesButton();
|
||||
await contentServicesPage.getDocumentList().dataTablePage().waitTillContentLoaded();
|
||||
});
|
||||
|
||||
afterEach(async () => {
|
||||
await BrowserActions.closeMenuAndDialogs();
|
||||
});
|
||||
|
||||
it('[C260161] Update folder - Cancel button', async () => {
|
||||
contentServicesPage.getContentList().dataTablePage().selectRow('Display name', editFolder.entry.name);
|
||||
contentServicesPage.getContentList().dataTablePage().checkRowIsSelected('Display name', editFolder.entry.name);
|
||||
contentServicesPage.clickOnEditFolder();
|
||||
editFolderDialog.checkFolderDialogIsDisplayed();
|
||||
expect(editFolderDialog.getDialogTitle()).toBe('Edit folder');
|
||||
expect(editFolderDialog.getFolderName()).toBe(editFolder.entry.name);
|
||||
editFolderDialog.checkCreateUpdateBtnIsEnabled();
|
||||
editFolderDialog.checkCancelBtnIsEnabled();
|
||||
editFolderDialog.clickOnCancelButton();
|
||||
editFolderDialog.checkFolderDialogIsNotDisplayed();
|
||||
await contentServicesPage.getDocumentList().dataTablePage().selectRow('Display name', editFolder.entry.name);
|
||||
await contentServicesPage.getDocumentList().dataTablePage().checkRowIsSelected('Display name', editFolder.entry.name);
|
||||
await contentServicesPage.clickOnEditFolder();
|
||||
await editFolderDialog.checkFolderDialogIsDisplayed();
|
||||
await expect(await editFolderDialog.getDialogTitle()).toBe('Edit folder');
|
||||
await expect(await editFolderDialog.getFolderName()).toBe(editFolder.entry.name);
|
||||
await editFolderDialog.checkCreateUpdateBtnIsEnabled();
|
||||
await editFolderDialog.checkCancelBtnIsEnabled();
|
||||
await editFolderDialog.clickOnCancelButton();
|
||||
await editFolderDialog.checkFolderDialogIsNotDisplayed();
|
||||
});
|
||||
|
||||
it('[C260162] Update folder - Introducing letters', async () => {
|
||||
contentServicesPage.getContentList().dataTablePage().checkContentIsDisplayed('Display name', editFolder.entry.name);
|
||||
contentServicesPage.getContentList().dataTablePage().selectRow('Display name', editFolder.entry.name);
|
||||
contentServicesPage.getContentList().dataTablePage().checkRowIsSelected('Display name', editFolder.entry.name);
|
||||
expect(contentServicesPage.checkEditFolderButtonIsEnabled()).toBe(true);
|
||||
contentServicesPage.clickOnEditFolder();
|
||||
editFolderDialog.checkFolderDialogIsDisplayed();
|
||||
editFolderDialog.checkCreateUpdateBtnIsEnabled();
|
||||
editFolderDialog.addFolderName(editFolder.entry.name + 'a');
|
||||
editFolderDialog.checkCreateUpdateBtnIsEnabled();
|
||||
editFolderDialog.clickOnCancelButton();
|
||||
editFolderDialog.checkFolderDialogIsNotDisplayed();
|
||||
contentServicesPage.getDocumentList().dataTablePage().checkContentIsDisplayed('Display name', editFolder.entry.name);
|
||||
await contentServicesPage.getDocumentList().dataTablePage().checkContentIsDisplayed('Display name', editFolder.entry.name);
|
||||
await contentServicesPage.getDocumentList().dataTablePage().selectRow('Display name', editFolder.entry.name);
|
||||
await contentServicesPage.getDocumentList().dataTablePage().checkRowIsSelected('Display name', editFolder.entry.name);
|
||||
await expect(await contentServicesPage.isEditFolderButtonEnabled()).toBe(true);
|
||||
await contentServicesPage.clickOnEditFolder();
|
||||
await editFolderDialog.checkFolderDialogIsDisplayed();
|
||||
await editFolderDialog.checkCreateUpdateBtnIsEnabled();
|
||||
await editFolderDialog.addFolderName(editFolder.entry.name + 'a');
|
||||
await editFolderDialog.checkCreateUpdateBtnIsEnabled();
|
||||
await editFolderDialog.clickOnCancelButton();
|
||||
await editFolderDialog.checkFolderDialogIsNotDisplayed();
|
||||
await contentServicesPage.getDocumentList().dataTablePage().checkContentIsDisplayed('Display name', editFolder.entry.name);
|
||||
});
|
||||
|
||||
it('[C260163] Update folder name with an existing one', async () => {
|
||||
contentServicesPage.getContentList().dataTablePage().checkContentIsDisplayed('Display name', editFolder.entry.name);
|
||||
contentServicesPage.getContentList().dataTablePage().selectRow('Display name', editFolder.entry.name);
|
||||
contentServicesPage.getContentList().dataTablePage().checkRowIsSelected('Display name', editFolder.entry.name);
|
||||
expect(contentServicesPage.checkEditFolderButtonIsEnabled()).toBe(true);
|
||||
contentServicesPage.clickOnEditFolder();
|
||||
editFolderDialog.checkFolderDialogIsDisplayed();
|
||||
editFolderDialog.checkCreateUpdateBtnIsEnabled();
|
||||
editFolderDialog.addFolderName(anotherFolder.entry.name);
|
||||
editFolderDialog.checkCreateUpdateBtnIsEnabled();
|
||||
editFolderDialog.clickOnCreateUpdateButton();
|
||||
editFolderDialog.checkFolderDialogIsDisplayed();
|
||||
notificationHistoryPage.checkNotifyContains('There\'s already a folder with this name. Try a different name.');
|
||||
await contentServicesPage.getDocumentList().dataTablePage().checkContentIsDisplayed('Display name', editFolder.entry.name);
|
||||
await contentServicesPage.getDocumentList().dataTablePage().selectRow('Display name', editFolder.entry.name);
|
||||
await contentServicesPage.getDocumentList().dataTablePage().checkRowIsSelected('Display name', editFolder.entry.name);
|
||||
await expect(await contentServicesPage.isEditFolderButtonEnabled()).toBe(true);
|
||||
await contentServicesPage.clickOnEditFolder();
|
||||
await editFolderDialog.checkFolderDialogIsDisplayed();
|
||||
await editFolderDialog.checkCreateUpdateBtnIsEnabled();
|
||||
await editFolderDialog.addFolderName(anotherFolder.entry.name);
|
||||
await editFolderDialog.checkCreateUpdateBtnIsEnabled();
|
||||
await editFolderDialog.clickOnCreateUpdateButton();
|
||||
await editFolderDialog.checkFolderDialogIsDisplayed();
|
||||
await notificationHistoryPage.checkNotifyContains('There\'s already a folder with this name. Try a different name.');
|
||||
});
|
||||
|
||||
it('[C260164] Edit Folder - Unsupported characters', async () => {
|
||||
contentServicesPage.getContentList().dataTablePage().checkContentIsDisplayed('Display name', editFolder.entry.name);
|
||||
contentServicesPage.getContentList().dataTablePage().selectRow('Display name', editFolder.entry.name);
|
||||
contentServicesPage.getContentList().dataTablePage().checkRowIsSelected('Display name', editFolder.entry.name);
|
||||
contentServicesPage.clickOnEditFolder();
|
||||
editFolderDialog.checkFolderDialogIsDisplayed();
|
||||
await contentServicesPage.getDocumentList().dataTablePage().checkContentIsDisplayed('Display name', editFolder.entry.name);
|
||||
await contentServicesPage.getDocumentList().dataTablePage().selectRow('Display name', editFolder.entry.name);
|
||||
await contentServicesPage.getDocumentList().dataTablePage().checkRowIsSelected('Display name', editFolder.entry.name);
|
||||
await contentServicesPage.clickOnEditFolder();
|
||||
await editFolderDialog.checkFolderDialogIsDisplayed();
|
||||
|
||||
editFolderDialog.addFolderName('a*"<>\\/?:|');
|
||||
expect(editFolderDialog.getValidationMessage()).toBe('Folder name can\'t contain these characters * " < > \\ / ? : |');
|
||||
editFolderDialog.checkCreateUpdateBtnIsDisabled();
|
||||
await editFolderDialog.addFolderName('a*"<>\\/?:|');
|
||||
await expect(await editFolderDialog.getValidationMessage()).toBe('Folder name can\'t contain these characters * " < > \\ / ? : |');
|
||||
await editFolderDialog.checkCreateUpdateBtnIsDisabled();
|
||||
|
||||
editFolderDialog.addFolderName('a.a');
|
||||
editFolderDialog.checkValidationMessageIsNotDisplayed();
|
||||
editFolderDialog.checkCreateUpdateBtnIsEnabled();
|
||||
await editFolderDialog.addFolderName('a.a');
|
||||
await editFolderDialog.checkValidationMessageIsNotDisplayed();
|
||||
await editFolderDialog.checkCreateUpdateBtnIsEnabled();
|
||||
|
||||
editFolderDialog.addFolderName('a.');
|
||||
expect(editFolderDialog.getValidationMessage()).toBe('Folder name can\'t end with a period .');
|
||||
editFolderDialog.checkCreateUpdateBtnIsDisabled();
|
||||
await editFolderDialog.addFolderName('a.');
|
||||
await expect(await editFolderDialog.getValidationMessage()).toBe('Folder name can\'t end with a period .');
|
||||
await editFolderDialog.checkCreateUpdateBtnIsDisabled();
|
||||
|
||||
editFolderDialog.getFolderNameField().clear();
|
||||
editFolderDialog.getFolderNameField().sendKeys(protractor.Key.SPACE);
|
||||
expect(editFolderDialog.getValidationMessage()).toBe('Folder name can\'t contain only spaces');
|
||||
editFolderDialog.checkCreateUpdateBtnIsDisabled();
|
||||
await BrowserActions.clearSendKeys(editFolderDialog.getFolderNameField(), protractor.Key.SPACE);
|
||||
await expect(await editFolderDialog.getValidationMessage()).toBe('Folder name can\'t contain only spaces');
|
||||
await editFolderDialog.checkCreateUpdateBtnIsDisabled();
|
||||
|
||||
editFolderDialog.addFolderName(editFolder.entry.name);
|
||||
editFolderDialog.addFolderDescription('a*"<>\\/?:|');
|
||||
editFolderDialog.checkValidationMessageIsNotDisplayed();
|
||||
editFolderDialog.checkCreateUpdateBtnIsEnabled();
|
||||
await editFolderDialog.addFolderName(editFolder.entry.name);
|
||||
await editFolderDialog.addFolderDescription('a*"<>\\/?:|');
|
||||
await editFolderDialog.checkValidationMessageIsNotDisplayed();
|
||||
await editFolderDialog.checkCreateUpdateBtnIsEnabled();
|
||||
|
||||
editFolderDialog.addFolderDescription('a.');
|
||||
editFolderDialog.checkValidationMessageIsNotDisplayed();
|
||||
editFolderDialog.checkCreateUpdateBtnIsEnabled();
|
||||
await editFolderDialog.addFolderDescription('a.');
|
||||
await editFolderDialog.checkValidationMessageIsNotDisplayed();
|
||||
await editFolderDialog.checkCreateUpdateBtnIsEnabled();
|
||||
|
||||
editFolderDialog.addFolderDescription('a.a');
|
||||
editFolderDialog.checkValidationMessageIsNotDisplayed();
|
||||
editFolderDialog.checkCreateUpdateBtnIsEnabled();
|
||||
await editFolderDialog.addFolderDescription('a.a');
|
||||
await editFolderDialog.checkValidationMessageIsNotDisplayed();
|
||||
await editFolderDialog.checkCreateUpdateBtnIsEnabled();
|
||||
|
||||
editFolderDialog.getFolderDescriptionField().sendKeys(protractor.Key.SPACE);
|
||||
editFolderDialog.checkValidationMessageIsNotDisplayed();
|
||||
editFolderDialog.checkCreateUpdateBtnIsEnabled();
|
||||
editFolderDialog.clickOnCancelButton();
|
||||
editFolderDialog.checkFolderDialogIsNotDisplayed();
|
||||
await editFolderDialog.getFolderDescriptionField().sendKeys(protractor.Key.SPACE);
|
||||
await editFolderDialog.checkValidationMessageIsNotDisplayed();
|
||||
await editFolderDialog.checkCreateUpdateBtnIsEnabled();
|
||||
await editFolderDialog.clickOnCancelButton();
|
||||
await editFolderDialog.checkFolderDialogIsNotDisplayed();
|
||||
|
||||
});
|
||||
|
||||
it('[C260166] Enable/Disable edit folder icon - when file selected', async () => {
|
||||
expect(contentServicesPage.getDocumentList().dataTablePage().getNumberOfSelectedRows()).toBe(0);
|
||||
expect(contentServicesPage.checkEditFolderButtonIsEnabled()).toBe(false);
|
||||
contentServicesPage.getContentList().dataTablePage().checkContentIsDisplayed('Display name', filePdfNode.entry.name);
|
||||
contentServicesPage.getContentList().dataTablePage().selectRow('Display name', filePdfNode.entry.name);
|
||||
contentServicesPage.getContentList().dataTablePage().checkRowIsSelected('Display name', filePdfNode.entry.name);
|
||||
expect(contentServicesPage.checkEditFolderButtonIsEnabled()).toBe(false);
|
||||
await expect(await contentServicesPage.getDocumentList().dataTablePage().getNumberOfSelectedRows()).toBe(0);
|
||||
await expect(await contentServicesPage.isEditFolderButtonEnabled()).toBe(false);
|
||||
await contentServicesPage.getDocumentList().dataTablePage().checkContentIsDisplayed('Display name', filePdfNode.entry.name);
|
||||
await contentServicesPage.getDocumentList().dataTablePage().selectRow('Display name', filePdfNode.entry.name);
|
||||
await contentServicesPage.getDocumentList().dataTablePage().checkRowIsSelected('Display name', filePdfNode.entry.name);
|
||||
await expect(await contentServicesPage.isEditFolderButtonEnabled()).toBe(false);
|
||||
|
||||
});
|
||||
|
||||
it('[C260166] Enable/Disable edit folder icon - when multiple folders selected', async () => {
|
||||
contentServicesPage.clickMultiSelectToggle();
|
||||
contentServicesPage.getContentList().dataTablePage().waitTillContentLoaded();
|
||||
contentServicesPage.getContentList().dataTablePage().checkAllRowsButtonIsDisplayed().checkAllRows();
|
||||
contentServicesPage.getContentList().dataTablePage().waitTillContentLoaded();
|
||||
contentServicesPage.getContentList().dataTablePage().checkRowIsChecked('Display name', editFolder.entry.name);
|
||||
contentServicesPage.getContentList().dataTablePage().checkRowIsChecked('Display name', anotherFolder.entry.name);
|
||||
contentServicesPage.getContentList().dataTablePage().clickCheckbox('Display name', filePdfNode.entry.name);
|
||||
contentServicesPage.getContentList().dataTablePage().checkRowIsNotChecked('Display name', filePdfNode.entry.name);
|
||||
expect(contentServicesPage.getContentList().dataTablePage().getNumberOfSelectedRows()).toBe(2);
|
||||
expect(contentServicesPage.checkEditFolderButtonIsEnabled()).toBe(false);
|
||||
await contentServicesPage.clickMultiSelectToggle();
|
||||
await contentServicesPage.getDocumentList().dataTablePage().waitTillContentLoaded();
|
||||
await contentServicesPage.getDocumentList().dataTablePage().checkAllRowsButtonIsDisplayed();
|
||||
await contentServicesPage.getDocumentList().dataTablePage().checkAllRows();
|
||||
await contentServicesPage.getDocumentList().dataTablePage().waitTillContentLoaded();
|
||||
await contentServicesPage.getDocumentList().dataTablePage().checkRowIsChecked('Display name', editFolder.entry.name);
|
||||
await contentServicesPage.getDocumentList().dataTablePage().checkRowIsChecked('Display name', anotherFolder.entry.name);
|
||||
await contentServicesPage.getDocumentList().dataTablePage().clickCheckbox('Display name', filePdfNode.entry.name);
|
||||
await contentServicesPage.getDocumentList().dataTablePage().checkRowIsNotChecked('Display name', filePdfNode.entry.name);
|
||||
await expect(await contentServicesPage.getDocumentList().dataTablePage().getNumberOfSelectedRows()).toBe(2);
|
||||
await expect(await contentServicesPage.isEditFolderButtonEnabled()).toBe(false);
|
||||
});
|
||||
|
||||
it('[C260166] Enable/Disable edit folder icon - when single folder selected', async () => {
|
||||
expect(contentServicesPage.getDocumentList().dataTablePage().getNumberOfSelectedRows()).toBe(0);
|
||||
contentServicesPage.getContentList().dataTablePage().selectRow('Display name', editFolder.entry.name);
|
||||
contentServicesPage.getContentList().dataTablePage().checkRowIsSelected('Display name', editFolder.entry.name);
|
||||
expect(contentServicesPage.getContentList().dataTablePage().getNumberOfSelectedRows()).toBe(1);
|
||||
expect(contentServicesPage.checkEditFolderButtonIsEnabled()).toBe(true);
|
||||
await expect(await contentServicesPage.getDocumentList().dataTablePage().getNumberOfSelectedRows()).toBe(0);
|
||||
await contentServicesPage.getDocumentList().dataTablePage().selectRow('Display name', editFolder.entry.name);
|
||||
await contentServicesPage.getDocumentList().dataTablePage().checkRowIsSelected('Display name', editFolder.entry.name);
|
||||
await expect(await contentServicesPage.getDocumentList().dataTablePage().getNumberOfSelectedRows()).toBe(1);
|
||||
await expect(await contentServicesPage.isEditFolderButtonEnabled()).toBe(true);
|
||||
});
|
||||
|
||||
it('[C260165] Update folder name with non-existing one', async () => {
|
||||
contentServicesPage.getContentList().dataTablePage().checkContentIsDisplayed('Display name', editFolder.entry.name);
|
||||
contentServicesPage.getContentList().dataTablePage().selectRow('Display name', editFolder.entry.name);
|
||||
contentServicesPage.getContentList().dataTablePage().checkRowIsSelected('Display name', editFolder.entry.name);
|
||||
contentServicesPage.clickOnEditFolder();
|
||||
editFolderDialog.checkFolderDialogIsDisplayed();
|
||||
editFolderDialog.addFolderName(updateFolderName);
|
||||
editFolderDialog.checkCreateUpdateBtnIsEnabled();
|
||||
editFolderDialog.clickOnCreateUpdateButton();
|
||||
editFolderDialog.checkFolderDialogIsNotDisplayed();
|
||||
contentServicesPage.getDocumentList().dataTablePage().checkContentIsDisplayed('Display name', updateFolderName);
|
||||
await contentServicesPage.getDocumentList().dataTablePage().checkContentIsDisplayed('Display name', editFolder.entry.name);
|
||||
await contentServicesPage.getDocumentList().dataTablePage().selectRow('Display name', editFolder.entry.name);
|
||||
await contentServicesPage.getDocumentList().dataTablePage().checkRowIsSelected('Display name', editFolder.entry.name);
|
||||
await contentServicesPage.clickOnEditFolder();
|
||||
await editFolderDialog.checkFolderDialogIsDisplayed();
|
||||
await editFolderDialog.addFolderName(updateFolderName);
|
||||
await editFolderDialog.checkCreateUpdateBtnIsEnabled();
|
||||
await editFolderDialog.clickOnCreateUpdateButton();
|
||||
await editFolderDialog.checkFolderDialogIsNotDisplayed();
|
||||
await contentServicesPage.getDocumentList().dataTablePage().checkContentIsDisplayed('Display name', updateFolderName);
|
||||
});
|
||||
|
||||
describe('Edit Folder - no permission', () => {
|
||||
|
||||
beforeEach(async (done) => {
|
||||
loginPage.loginToContentServicesUsingUserModel(anotherAcsUser);
|
||||
BrowserActions.getUrl(browser.params.testConfig.adf.url + '/files/' + editFolder.entry.id);
|
||||
contentServicesPage.getContentList().dataTablePage().waitTillContentLoaded();
|
||||
done();
|
||||
beforeEach(async () => {
|
||||
await loginPage.loginToContentServicesUsingUserModel(anotherAcsUser);
|
||||
await BrowserActions.getUrl(browser.params.testConfig.adf.url + '/files/' + editFolder.entry.id);
|
||||
await contentServicesPage.getDocumentList().dataTablePage().waitTillContentLoaded();
|
||||
|
||||
});
|
||||
|
||||
it('[C260167] Edit folder without permission', async () => {
|
||||
contentServicesPage.getContentList().dataTablePage().checkContentIsDisplayed('Display name', subFolder.entry.name);
|
||||
contentServicesPage.getContentList().dataTablePage().selectRow('Display name', subFolder.entry.name);
|
||||
contentServicesPage.getContentList().dataTablePage().checkRowIsSelected('Display name', subFolder.entry.name);
|
||||
expect(contentServicesPage.checkEditFolderButtonIsEnabled()).toBe(false);
|
||||
await contentServicesPage.getDocumentList().dataTablePage().checkContentIsDisplayed('Display name', subFolder.entry.name);
|
||||
await contentServicesPage.getDocumentList().dataTablePage().selectRow('Display name', subFolder.entry.name);
|
||||
await contentServicesPage.getDocumentList().dataTablePage().checkRowIsSelected('Display name', subFolder.entry.name);
|
||||
await expect(await contentServicesPage.isEditFolderButtonEnabled()).toBe(false);
|
||||
});
|
||||
|
||||
});
|
||||
|
||||
@@ -27,7 +27,7 @@ import { NavigationBarPage } from '../../pages/adf/navigationBarPage';
|
||||
import { CustomSources } from '../../pages/adf/demo-shell/customSourcesPage';
|
||||
import { TrashcanPage } from '../../pages/adf/trashcanPage';
|
||||
|
||||
describe('Favorite directive', function () {
|
||||
describe('Favorite directive', () => {
|
||||
|
||||
const loginPage = new LoginPage();
|
||||
const contentServicesPage = new ContentServicesPage();
|
||||
@@ -43,14 +43,14 @@ describe('Favorite directive', function () {
|
||||
hostEcm: browser.params.testConfig.adf_acs.host
|
||||
});
|
||||
const pdfFile = new FileModel({
|
||||
'name': resources.Files.ADF_DOCUMENTS.PDF.file_name,
|
||||
'location': resources.Files.ADF_DOCUMENTS.PDF.file_location
|
||||
name: resources.Files.ADF_DOCUMENTS.PDF.file_name,
|
||||
location: resources.Files.ADF_DOCUMENTS.PDF.file_location
|
||||
});
|
||||
|
||||
const uploadActions = new UploadActions(this.alfrescoJsApi);
|
||||
let testFolder1, testFolder2, testFolder3, testFolder4, testFile;
|
||||
|
||||
beforeAll(async (done) => {
|
||||
beforeAll(async () => {
|
||||
await this.alfrescoJsApi.login(browser.params.testConfig.adf.adminEmail, browser.params.testConfig.adf.adminPassword);
|
||||
await this.alfrescoJsApi.core.peopleApi.addPerson(acsUser);
|
||||
await this.alfrescoJsApi.login(acsUser.id, acsUser.password);
|
||||
@@ -62,161 +62,161 @@ describe('Favorite directive', function () {
|
||||
testFile = await uploadActions.uploadFile(pdfFile.location, pdfFile.name, '-my-');
|
||||
|
||||
await loginPage.loginToContentServicesUsingUserModel(acsUser);
|
||||
contentServicesPage.goToDocumentList();
|
||||
done();
|
||||
await contentServicesPage.goToDocumentList();
|
||||
|
||||
});
|
||||
|
||||
afterAll(async (done) => {
|
||||
afterAll(async () => {
|
||||
await navigationBarPage.clickLogoutButton();
|
||||
await this.alfrescoJsApi.login(browser.params.testConfig.adf.adminEmail, browser.params.testConfig.adf.adminPassword);
|
||||
await uploadActions.deleteFileOrFolder(testFolder1.entry.id);
|
||||
await uploadActions.deleteFileOrFolder(testFolder2.entry.id);
|
||||
await uploadActions.deleteFileOrFolder(testFolder3.entry.id);
|
||||
await uploadActions.deleteFileOrFolder(testFolder4.entry.id);
|
||||
done();
|
||||
|
||||
});
|
||||
|
||||
beforeEach(async (done) => {
|
||||
navigationBarPage.clickContentServicesButton();
|
||||
contentServicesPage.getContentList().dataTablePage().waitTillContentLoaded();
|
||||
done();
|
||||
beforeEach(async () => {
|
||||
await navigationBarPage.clickContentServicesButton();
|
||||
await contentServicesPage.getDocumentList().dataTablePage().waitTillContentLoaded();
|
||||
|
||||
});
|
||||
|
||||
it('[C260247] Should be able to mark a file as favorite', async () => {
|
||||
contentServicesPage.getContentList().dataTablePage().checkContentIsDisplayed('Display name', testFile.entry.name);
|
||||
contentServicesPage.getContentList().dataTablePage().selectRow('Display name', testFile.entry.name);
|
||||
contentServicesPage.getContentList().dataTablePage().checkRowIsSelected('Display name', testFile.entry.name);
|
||||
contentServicesPage.clickOnFavoriteButton();
|
||||
contentServicesPage.checkIsMarkedFavorite();
|
||||
contentServicesPage.getContentList().dataTablePage().checkRowIsSelected('Display name', testFile.entry.name);
|
||||
customSourcesPage.navigateToCustomSources();
|
||||
customSourcesPage.selectFavoritesSourceType();
|
||||
customSourcesPage.checkRowIsDisplayed(testFile.entry.name);
|
||||
await contentServicesPage.getDocumentList().dataTablePage().checkContentIsDisplayed('Display name', testFile.entry.name);
|
||||
await contentServicesPage.getDocumentList().dataTablePage().selectRow('Display name', testFile.entry.name);
|
||||
await contentServicesPage.getDocumentList().dataTablePage().checkRowIsSelected('Display name', testFile.entry.name);
|
||||
await contentServicesPage.clickOnFavoriteButton();
|
||||
await contentServicesPage.checkIsMarkedFavorite();
|
||||
await contentServicesPage.getDocumentList().dataTablePage().checkRowIsSelected('Display name', testFile.entry.name);
|
||||
await customSourcesPage.navigateToCustomSources();
|
||||
await customSourcesPage.selectFavoritesSourceType();
|
||||
await customSourcesPage.checkRowIsDisplayed(testFile.entry.name);
|
||||
|
||||
navigationBarPage.clickContentServicesButton();
|
||||
contentServicesPage.getContentList().dataTablePage().waitTillContentLoaded();
|
||||
contentServicesPage.getContentList().dataTablePage().checkContentIsDisplayed('Display name', testFile.entry.name);
|
||||
contentServicesPage.getContentList().dataTablePage().selectRow('Display name', testFile.entry.name);
|
||||
contentServicesPage.getContentList().dataTablePage().checkRowIsSelected('Display name', testFile.entry.name);
|
||||
contentServicesPage.clickOnFavoriteButton();
|
||||
contentServicesPage.checkIsNotMarkedFavorite();
|
||||
customSourcesPage.navigateToCustomSources();
|
||||
customSourcesPage.selectFavoritesSourceType();
|
||||
customSourcesPage.checkRowIsNotDisplayed(testFile.entry.name);
|
||||
await navigationBarPage.clickContentServicesButton();
|
||||
await contentServicesPage.getDocumentList().dataTablePage().waitTillContentLoaded();
|
||||
await contentServicesPage.getDocumentList().dataTablePage().checkContentIsDisplayed('Display name', testFile.entry.name);
|
||||
await contentServicesPage.getDocumentList().dataTablePage().selectRow('Display name', testFile.entry.name);
|
||||
await contentServicesPage.getDocumentList().dataTablePage().checkRowIsSelected('Display name', testFile.entry.name);
|
||||
await contentServicesPage.clickOnFavoriteButton();
|
||||
await contentServicesPage.checkIsNotMarkedFavorite();
|
||||
await customSourcesPage.navigateToCustomSources();
|
||||
await customSourcesPage.selectFavoritesSourceType();
|
||||
await customSourcesPage.checkRowIsNotDisplayed(testFile.entry.name);
|
||||
});
|
||||
|
||||
it('[C260249] Should be able to mark a folder as favorite', async () => {
|
||||
contentServicesPage.getContentList().dataTablePage().checkContentIsDisplayed('Display name', testFolder1.entry.name);
|
||||
contentServicesPage.getContentList().dataTablePage().selectRow('Display name', testFolder1.entry.name);
|
||||
contentServicesPage.getContentList().dataTablePage().checkRowIsSelected('Display name', testFolder1.entry.name);
|
||||
contentServicesPage.clickOnFavoriteButton();
|
||||
contentServicesPage.checkIsMarkedFavorite();
|
||||
customSourcesPage.navigateToCustomSources();
|
||||
customSourcesPage.selectFavoritesSourceType();
|
||||
customSourcesPage.checkRowIsDisplayed(testFolder1.entry.name);
|
||||
await contentServicesPage.getDocumentList().dataTablePage().checkContentIsDisplayed('Display name', testFolder1.entry.name);
|
||||
await contentServicesPage.getDocumentList().dataTablePage().selectRow('Display name', testFolder1.entry.name);
|
||||
await contentServicesPage.getDocumentList().dataTablePage().checkRowIsSelected('Display name', testFolder1.entry.name);
|
||||
await contentServicesPage.clickOnFavoriteButton();
|
||||
await contentServicesPage.checkIsMarkedFavorite();
|
||||
await customSourcesPage.navigateToCustomSources();
|
||||
await customSourcesPage.selectFavoritesSourceType();
|
||||
await customSourcesPage.checkRowIsDisplayed(testFolder1.entry.name);
|
||||
|
||||
navigationBarPage.clickContentServicesButton();
|
||||
contentServicesPage.getContentList().dataTablePage().waitTillContentLoaded();
|
||||
contentServicesPage.getContentList().dataTablePage().checkContentIsDisplayed('Display name', testFolder1.entry.name);
|
||||
contentServicesPage.getContentList().dataTablePage().selectRow('Display name', testFolder1.entry.name);
|
||||
contentServicesPage.getContentList().dataTablePage().checkRowIsSelected('Display name', testFolder1.entry.name);
|
||||
contentServicesPage.clickOnFavoriteButton();
|
||||
contentServicesPage.checkIsNotMarkedFavorite();
|
||||
customSourcesPage.navigateToCustomSources();
|
||||
customSourcesPage.selectFavoritesSourceType();
|
||||
customSourcesPage.checkRowIsNotDisplayed(testFolder1.entry.name);
|
||||
await navigationBarPage.clickContentServicesButton();
|
||||
await contentServicesPage.getDocumentList().dataTablePage().waitTillContentLoaded();
|
||||
await contentServicesPage.getDocumentList().dataTablePage().checkContentIsDisplayed('Display name', testFolder1.entry.name);
|
||||
await contentServicesPage.getDocumentList().dataTablePage().selectRow('Display name', testFolder1.entry.name);
|
||||
await contentServicesPage.getDocumentList().dataTablePage().checkRowIsSelected('Display name', testFolder1.entry.name);
|
||||
await contentServicesPage.clickOnFavoriteButton();
|
||||
await contentServicesPage.checkIsNotMarkedFavorite();
|
||||
await customSourcesPage.navigateToCustomSources();
|
||||
await customSourcesPage.selectFavoritesSourceType();
|
||||
await customSourcesPage.checkRowIsNotDisplayed(testFolder1.entry.name);
|
||||
});
|
||||
|
||||
it('[C260251] Should retain the restored file as favorite', async () => {
|
||||
contentServicesPage.getContentList().dataTablePage().checkContentIsDisplayed('Display name', testFile.entry.name);
|
||||
contentServicesPage.getContentList().dataTablePage().selectRow('Display name', testFile.entry.name);
|
||||
contentServicesPage.getContentList().dataTablePage().checkRowIsSelected('Display name', testFile.entry.name);
|
||||
contentServicesPage.clickOnFavoriteButton();
|
||||
contentServicesPage.checkIsMarkedFavorite();
|
||||
contentListPage.rightClickOnRow(testFile.entry.name);
|
||||
contentServicesPage.pressContextMenuActionNamed('Delete');
|
||||
contentServicesPage.checkContentIsNotDisplayed(testFile.entry.name);
|
||||
customSourcesPage.navigateToCustomSources();
|
||||
customSourcesPage.selectFavoritesSourceType();
|
||||
customSourcesPage.checkRowIsNotDisplayed(testFile.entry.name);
|
||||
await contentServicesPage.getDocumentList().dataTablePage().checkContentIsDisplayed('Display name', testFile.entry.name);
|
||||
await contentServicesPage.getDocumentList().dataTablePage().selectRow('Display name', testFile.entry.name);
|
||||
await contentServicesPage.getDocumentList().dataTablePage().checkRowIsSelected('Display name', testFile.entry.name);
|
||||
await contentServicesPage.clickOnFavoriteButton();
|
||||
await contentServicesPage.checkIsMarkedFavorite();
|
||||
await contentListPage.rightClickOnRow(testFile.entry.name);
|
||||
await contentServicesPage.pressContextMenuActionNamed('Delete');
|
||||
await contentServicesPage.checkContentIsNotDisplayed(testFile.entry.name);
|
||||
await customSourcesPage.navigateToCustomSources();
|
||||
await customSourcesPage.selectFavoritesSourceType();
|
||||
await customSourcesPage.checkRowIsNotDisplayed(testFile.entry.name);
|
||||
|
||||
navigationBarPage.clickTrashcanButton();
|
||||
trashcanPage.waitForTableBody();
|
||||
expect(trashcanPage.numberOfResultsDisplayed()).toBe(1);
|
||||
trashcanPage.getDocumentList().dataTablePage().clickRowByContent(testFile.entry.name);
|
||||
trashcanPage.getDocumentList().dataTablePage().checkRowByContentIsSelected(testFile.entry.name);
|
||||
trashcanPage.clickRestore();
|
||||
trashcanPage.checkTrashcanIsEmpty();
|
||||
await navigationBarPage.clickTrashcanButton();
|
||||
await trashcanPage.waitForTableBody();
|
||||
await expect(await trashcanPage.numberOfResultsDisplayed()).toBe(1);
|
||||
await trashcanPage.getDocumentList().dataTablePage().clickRowByContent(testFile.entry.name);
|
||||
await trashcanPage.getDocumentList().dataTablePage().checkRowByContentIsSelected(testFile.entry.name);
|
||||
await trashcanPage.clickRestore();
|
||||
await trashcanPage.checkTrashcanIsEmpty();
|
||||
|
||||
navigationBarPage.clickContentServicesButton();
|
||||
contentServicesPage.getContentList().dataTablePage().waitTillContentLoaded();
|
||||
contentServicesPage.getContentList().dataTablePage().checkContentIsDisplayed('Display name', testFile.entry.name);
|
||||
contentServicesPage.getContentList().dataTablePage().selectRow('Display name', testFile.entry.name);
|
||||
contentServicesPage.getContentList().dataTablePage().checkRowIsSelected('Display name', testFile.entry.name);
|
||||
contentServicesPage.checkIsMarkedFavorite();
|
||||
customSourcesPage.navigateToCustomSources();
|
||||
customSourcesPage.selectFavoritesSourceType();
|
||||
customSourcesPage.checkRowIsDisplayed(testFile.entry.name);
|
||||
await navigationBarPage.clickContentServicesButton();
|
||||
await contentServicesPage.getDocumentList().dataTablePage().waitTillContentLoaded();
|
||||
await contentServicesPage.getDocumentList().dataTablePage().checkContentIsDisplayed('Display name', testFile.entry.name);
|
||||
await contentServicesPage.getDocumentList().dataTablePage().selectRow('Display name', testFile.entry.name);
|
||||
await contentServicesPage.getDocumentList().dataTablePage().checkRowIsSelected('Display name', testFile.entry.name);
|
||||
await contentServicesPage.checkIsMarkedFavorite();
|
||||
await customSourcesPage.navigateToCustomSources();
|
||||
await customSourcesPage.selectFavoritesSourceType();
|
||||
await customSourcesPage.checkRowIsDisplayed(testFile.entry.name);
|
||||
});
|
||||
|
||||
it('[C260252] Should retain the moved file as favorite', async () => {
|
||||
contentServicesPage.getContentList().dataTablePage().checkContentIsDisplayed('Display name', testFile.entry.name);
|
||||
contentServicesPage.getContentList().dataTablePage().selectRow('Display name', testFile.entry.name);
|
||||
contentServicesPage.getContentList().dataTablePage().checkRowIsSelected('Display name', testFile.entry.name);
|
||||
contentServicesPage.clickOnFavoriteButton();
|
||||
contentServicesPage.checkIsMarkedFavorite();
|
||||
await contentServicesPage.getDocumentList().dataTablePage().checkContentIsDisplayed('Display name', testFile.entry.name);
|
||||
await contentServicesPage.getDocumentList().dataTablePage().selectRow('Display name', testFile.entry.name);
|
||||
await contentServicesPage.getDocumentList().dataTablePage().checkRowIsSelected('Display name', testFile.entry.name);
|
||||
await contentServicesPage.clickOnFavoriteButton();
|
||||
await contentServicesPage.checkIsMarkedFavorite();
|
||||
|
||||
contentServicesPage.getDocumentList().rightClickOnRow(testFile.entry.name);
|
||||
contentServicesPage.pressContextMenuActionNamed('Move');
|
||||
contentNodeSelector.checkDialogIsDisplayed();
|
||||
contentNodeSelector.typeIntoNodeSelectorSearchField(testFolder1.entry.name);
|
||||
contentNodeSelector.clickContentNodeSelectorResult(testFolder1.entry.name);
|
||||
contentNodeSelector.clickMoveCopyButton();
|
||||
contentServicesPage.checkContentIsNotDisplayed(testFile.entry.name);
|
||||
contentServicesPage.doubleClickRow(testFolder1.entry.name);
|
||||
contentServicesPage.checkContentIsDisplayed(testFile.entry.name);
|
||||
await contentServicesPage.getDocumentList().rightClickOnRow(testFile.entry.name);
|
||||
await contentServicesPage.pressContextMenuActionNamed('Move');
|
||||
await contentNodeSelector.checkDialogIsDisplayed();
|
||||
await contentNodeSelector.typeIntoNodeSelectorSearchField(testFolder1.entry.name);
|
||||
await contentNodeSelector.clickContentNodeSelectorResult(testFolder1.entry.name);
|
||||
await contentNodeSelector.clickMoveCopyButton();
|
||||
await contentServicesPage.checkContentIsNotDisplayed(testFile.entry.name);
|
||||
await contentServicesPage.doubleClickRow(testFolder1.entry.name);
|
||||
await contentServicesPage.checkContentIsDisplayed(testFile.entry.name);
|
||||
|
||||
contentServicesPage.getContentList().dataTablePage().selectRow('Display name', testFile.entry.name);
|
||||
contentServicesPage.getContentList().dataTablePage().checkRowIsSelected('Display name', testFile.entry.name);
|
||||
contentServicesPage.checkIsMarkedFavorite();
|
||||
await contentServicesPage.getDocumentList().dataTablePage().selectRow('Display name', testFile.entry.name);
|
||||
await contentServicesPage.getDocumentList().dataTablePage().checkRowIsSelected('Display name', testFile.entry.name);
|
||||
await contentServicesPage.checkIsMarkedFavorite();
|
||||
});
|
||||
|
||||
it('[C217216] Should be able to mark and unmark multiple folders as favorite', async () => {
|
||||
contentServicesPage.clickMultiSelectToggle();
|
||||
contentServicesPage.getContentList().dataTablePage().waitTillContentLoaded();
|
||||
contentServicesPage.getContentList().dataTablePage().clickCheckbox('Display name', testFolder1.entry.name);
|
||||
contentServicesPage.getContentList().dataTablePage().clickCheckbox('Display name', testFolder2.entry.name);
|
||||
contentServicesPage.getContentList().dataTablePage().clickCheckbox('Display name', testFolder3.entry.name);
|
||||
contentServicesPage.getContentList().dataTablePage().checkRowIsSelected('Display name', testFolder1.entry.name);
|
||||
contentServicesPage.getContentList().dataTablePage().checkRowIsSelected('Display name', testFolder2.entry.name);
|
||||
contentServicesPage.getContentList().dataTablePage().checkRowIsSelected('Display name', testFolder3.entry.name);
|
||||
expect(contentServicesPage.getContentList().dataTablePage().getNumberOfSelectedRows()).toBe(3);
|
||||
contentServicesPage.clickOnFavoriteButton();
|
||||
contentServicesPage.checkIsMarkedFavorite();
|
||||
await contentServicesPage.clickMultiSelectToggle();
|
||||
await contentServicesPage.getDocumentList().dataTablePage().waitTillContentLoaded();
|
||||
await contentServicesPage.getDocumentList().dataTablePage().clickCheckbox('Display name', testFolder1.entry.name);
|
||||
await contentServicesPage.getDocumentList().dataTablePage().clickCheckbox('Display name', testFolder2.entry.name);
|
||||
await contentServicesPage.getDocumentList().dataTablePage().clickCheckbox('Display name', testFolder3.entry.name);
|
||||
await contentServicesPage.getDocumentList().dataTablePage().checkRowIsSelected('Display name', testFolder1.entry.name);
|
||||
await contentServicesPage.getDocumentList().dataTablePage().checkRowIsSelected('Display name', testFolder2.entry.name);
|
||||
await contentServicesPage.getDocumentList().dataTablePage().checkRowIsSelected('Display name', testFolder3.entry.name);
|
||||
await expect(await contentServicesPage.getDocumentList().dataTablePage().getNumberOfSelectedRows()).toBe(3);
|
||||
await contentServicesPage.clickOnFavoriteButton();
|
||||
await contentServicesPage.checkIsMarkedFavorite();
|
||||
|
||||
contentServicesPage.getContentList().dataTablePage().clickCheckbox('Display name', testFolder3.entry.name);
|
||||
contentServicesPage.getContentList().dataTablePage().checkRowIsNotSelected('Display name', testFolder3.entry.name);
|
||||
expect(contentServicesPage.getContentList().dataTablePage().getNumberOfSelectedRows()).toBe(2);
|
||||
await contentServicesPage.getDocumentList().dataTablePage().clickCheckbox('Display name', testFolder3.entry.name);
|
||||
await contentServicesPage.getDocumentList().dataTablePage().checkRowIsNotSelected('Display name', testFolder3.entry.name);
|
||||
await expect(await contentServicesPage.getDocumentList().dataTablePage().getNumberOfSelectedRows()).toBe(2);
|
||||
|
||||
contentServicesPage.getContentList().dataTablePage().clickCheckbox('Display name', testFolder4.entry.name);
|
||||
expect(contentServicesPage.getContentList().dataTablePage().getNumberOfSelectedRows()).toBe(3);
|
||||
contentServicesPage.getContentList().dataTablePage().checkRowIsSelected('Display name', testFolder1.entry.name);
|
||||
contentServicesPage.getContentList().dataTablePage().checkRowIsSelected('Display name', testFolder2.entry.name);
|
||||
contentServicesPage.getContentList().dataTablePage().checkRowIsSelected('Display name', testFolder4.entry.name);
|
||||
contentServicesPage.clickOnFavoriteButton();
|
||||
contentServicesPage.checkIsMarkedFavorite();
|
||||
await contentServicesPage.getDocumentList().dataTablePage().clickCheckbox('Display name', testFolder4.entry.name);
|
||||
await expect(await contentServicesPage.getDocumentList().dataTablePage().getNumberOfSelectedRows()).toBe(3);
|
||||
await contentServicesPage.getDocumentList().dataTablePage().checkRowIsSelected('Display name', testFolder1.entry.name);
|
||||
await contentServicesPage.getDocumentList().dataTablePage().checkRowIsSelected('Display name', testFolder2.entry.name);
|
||||
await contentServicesPage.getDocumentList().dataTablePage().checkRowIsSelected('Display name', testFolder4.entry.name);
|
||||
await contentServicesPage.clickOnFavoriteButton();
|
||||
await contentServicesPage.checkIsMarkedFavorite();
|
||||
|
||||
contentServicesPage.clickOnFavoriteButton();
|
||||
contentServicesPage.checkIsNotMarkedFavorite();
|
||||
contentServicesPage.getContentList().dataTablePage().checkAllRows();
|
||||
expect(contentServicesPage.getContentList().dataTablePage().getNumberOfSelectedRows()).toBeGreaterThanOrEqual(4);
|
||||
contentServicesPage.getContentList().dataTablePage().uncheckAllRows();
|
||||
expect(contentServicesPage.getContentList().dataTablePage().getNumberOfSelectedRows()).toBe(0);
|
||||
await contentServicesPage.clickOnFavoriteButton();
|
||||
await contentServicesPage.checkIsNotMarkedFavorite();
|
||||
await contentServicesPage.getDocumentList().dataTablePage().checkAllRows();
|
||||
await expect(await contentServicesPage.getDocumentList().dataTablePage().getNumberOfSelectedRows()).toBeGreaterThanOrEqual(4);
|
||||
await contentServicesPage.getDocumentList().dataTablePage().uncheckAllRows();
|
||||
await expect(await contentServicesPage.getDocumentList().dataTablePage().getNumberOfSelectedRows()).toBe(0);
|
||||
|
||||
contentServicesPage.getContentList().dataTablePage().clickCheckbox('Display name', testFolder3.entry.name);
|
||||
contentServicesPage.getContentList().dataTablePage().checkRowIsSelected('Display name', testFolder3.entry.name);
|
||||
expect(contentServicesPage.getContentList().dataTablePage().getNumberOfSelectedRows()).toBe(1);
|
||||
contentServicesPage.checkIsMarkedFavorite();
|
||||
await contentServicesPage.getDocumentList().dataTablePage().clickCheckbox('Display name', testFolder3.entry.name);
|
||||
await contentServicesPage.getDocumentList().dataTablePage().checkRowIsSelected('Display name', testFolder3.entry.name);
|
||||
await expect(await contentServicesPage.getDocumentList().dataTablePage().getNumberOfSelectedRows()).toBe(1);
|
||||
await contentServicesPage.checkIsMarkedFavorite();
|
||||
|
||||
});
|
||||
});
|
||||
|
||||
@@ -24,10 +24,10 @@ import { FileModel } from '../../models/ACS/fileModel';
|
||||
import resources = require('../../util/resources');
|
||||
import { NavigationBarPage } from '../../pages/adf/navigationBarPage';
|
||||
import { TrashcanPage } from '../../pages/adf/trashcanPage';
|
||||
import { LoginPage, NotificationHistoryPage, StringUtil, UploadActions } from '@alfresco/adf-testing';
|
||||
import { LoginPage, NotificationHistoryPage, StringUtil, UploadActions, BrowserActions } from '@alfresco/adf-testing';
|
||||
import { BreadCrumbPage } from '../../pages/adf/content-services/breadcrumb/breadCrumbPage';
|
||||
|
||||
describe('Restore content directive', function () {
|
||||
describe('Restore content directive', () => {
|
||||
|
||||
const loginPage = new LoginPage();
|
||||
const contentServicesPage = new ContentServicesPage();
|
||||
@@ -44,18 +44,18 @@ describe('Restore content directive', function () {
|
||||
});
|
||||
|
||||
const pdfFileModel = new FileModel({
|
||||
'name': resources.Files.ADF_DOCUMENTS.PDF.file_name,
|
||||
'location': resources.Files.ADF_DOCUMENTS.PDF.file_location
|
||||
name: resources.Files.ADF_DOCUMENTS.PDF.file_name,
|
||||
location: resources.Files.ADF_DOCUMENTS.PDF.file_location
|
||||
});
|
||||
|
||||
const testFileModel = new FileModel({
|
||||
'name': resources.Files.ADF_DOCUMENTS.TEST.file_name,
|
||||
'location': resources.Files.ADF_DOCUMENTS.TEST.file_location
|
||||
name: resources.Files.ADF_DOCUMENTS.TEST.file_name,
|
||||
location: resources.Files.ADF_DOCUMENTS.TEST.file_location
|
||||
});
|
||||
|
||||
const pngFileModel = new FileModel({
|
||||
'name': resources.Files.ADF_DOCUMENTS.PNG.file_name,
|
||||
'location': resources.Files.ADF_DOCUMENTS.PNG.file_location
|
||||
name: resources.Files.ADF_DOCUMENTS.PNG.file_name,
|
||||
location: resources.Files.ADF_DOCUMENTS.PNG.file_location
|
||||
});
|
||||
|
||||
const folderName = StringUtil.generateRandomString(5);
|
||||
@@ -64,7 +64,7 @@ describe('Restore content directive', function () {
|
||||
let folderWithContent, folderWithFolder, subFolder, subFile, testFile, restoreFile, publicSite, siteFolder,
|
||||
siteFile;
|
||||
|
||||
beforeAll(async (done) => {
|
||||
beforeAll(async () => {
|
||||
await this.alfrescoJsApi.login(browser.params.testConfig.adf.adminEmail, browser.params.testConfig.adf.adminPassword);
|
||||
await this.alfrescoJsApi.core.peopleApi.addPerson(acsUser);
|
||||
await this.alfrescoJsApi.core.peopleApi.addPerson(anotherAcsUser);
|
||||
@@ -79,171 +79,163 @@ describe('Restore content directive', function () {
|
||||
restoreFile = await uploadActions.uploadFile(pngFileModel.location, pngFileModel.name, '-my-');
|
||||
|
||||
await loginPage.loginToContentServicesUsingUserModel(acsUser);
|
||||
done();
|
||||
});
|
||||
|
||||
afterAll(async () => {
|
||||
await navigationBarPage.clickLogoutButton();
|
||||
|
||||
await this.alfrescoJsApi.login(browser.params.testConfig.adf.adminEmail, browser.params.testConfig.adf.adminPassword);
|
||||
await uploadActions.deleteFileOrFolder(folderWithContent.entry.id);
|
||||
await uploadActions.deleteFileOrFolder(folderWithFolder.entry.id);
|
||||
await this.alfrescoJsApi.core.sitesApi.deleteSite(publicSite.entry.id);
|
||||
});
|
||||
|
||||
beforeEach(async (done) => {
|
||||
navigationBarPage.clickContentServicesButton();
|
||||
contentServicesPage.waitForTableBody();
|
||||
done();
|
||||
beforeEach(async () => {
|
||||
await BrowserActions.closeMenuAndDialogs();
|
||||
await navigationBarPage.clickContentServicesButton();
|
||||
await contentServicesPage.waitForTableBody();
|
||||
});
|
||||
|
||||
describe('Restore same name folders', function () {
|
||||
describe('Restore same name folders', () => {
|
||||
|
||||
beforeAll(async (done) => {
|
||||
navigationBarPage.clickContentServicesButton();
|
||||
contentServicesPage.waitForTableBody();
|
||||
contentServicesPage.checkContentIsDisplayed(folderName);
|
||||
contentServicesPage.deleteContent(folderName);
|
||||
contentServicesPage.checkContentIsNotDisplayed(folderName);
|
||||
navigationBarPage.clickTrashcanButton();
|
||||
trashcanPage.waitForTableBody();
|
||||
trashcanPage.getDocumentList().dataTablePage().checkRowContentIsDisplayed(folderName);
|
||||
done();
|
||||
beforeAll(async () => {
|
||||
await navigationBarPage.clickContentServicesButton();
|
||||
await contentServicesPage.waitForTableBody();
|
||||
await contentServicesPage.checkContentIsDisplayed(folderName);
|
||||
await contentServicesPage.deleteContent(folderName);
|
||||
await contentServicesPage.checkContentIsNotDisplayed(folderName);
|
||||
await navigationBarPage.clickTrashcanButton();
|
||||
await trashcanPage.waitForTableBody();
|
||||
await trashcanPage.getDocumentList().dataTablePage().checkRowContentIsDisplayed(folderName);
|
||||
});
|
||||
|
||||
it('[C260227] Should validate when restoring Folders with same name', async () => {
|
||||
await uploadActions.createFolder(folderName, '-my-');
|
||||
navigationBarPage.clickContentServicesButton();
|
||||
browser.refresh();
|
||||
contentServicesPage.waitForTableBody();
|
||||
contentServicesPage.checkContentIsDisplayed(folderName);
|
||||
contentServicesPage.deleteContent(folderName);
|
||||
contentServicesPage.checkContentIsNotDisplayed(folderName);
|
||||
navigationBarPage.clickTrashcanButton();
|
||||
trashcanPage.waitForTableBody();
|
||||
trashcanPage.getDocumentList().dataTablePage().checkRowContentIsDisplayed(folderName);
|
||||
await navigationBarPage.clickContentServicesButton();
|
||||
await browser.refresh();
|
||||
await contentServicesPage.waitForTableBody();
|
||||
await contentServicesPage.checkContentIsDisplayed(folderName);
|
||||
await contentServicesPage.deleteContent(folderName);
|
||||
await contentServicesPage.checkContentIsNotDisplayed(folderName);
|
||||
await navigationBarPage.clickTrashcanButton();
|
||||
await trashcanPage.waitForTableBody();
|
||||
await trashcanPage.getDocumentList().dataTablePage().checkRowContentIsDisplayed(folderName);
|
||||
|
||||
trashcanPage.getDocumentList().dataTablePage().checkAllRows();
|
||||
trashcanPage.clickRestore();
|
||||
trashcanPage.getDocumentList().dataTablePage().checkRowContentIsDisplayed(folderName);
|
||||
navigationBarPage.clickContentServicesButton();
|
||||
contentServicesPage.getContentList().dataTablePage().waitTillContentLoaded();
|
||||
contentServicesPage.checkContentIsDisplayed(folderName);
|
||||
await trashcanPage.getDocumentList().dataTablePage().checkAllRows();
|
||||
await trashcanPage.clickRestore();
|
||||
await trashcanPage.getDocumentList().dataTablePage().checkRowContentIsDisplayed(folderName);
|
||||
await navigationBarPage.clickContentServicesButton();
|
||||
await contentServicesPage.getDocumentList().dataTablePage().waitTillContentLoaded();
|
||||
await contentServicesPage.checkContentIsDisplayed(folderName);
|
||||
|
||||
notificationHistoryPage.checkNotifyContains('Can\'t restore, ' + folderName + ' item already exists');
|
||||
await notificationHistoryPage.checkNotifyContains('Can\'t restore, ' + folderName + ' item already exists');
|
||||
|
||||
});
|
||||
});
|
||||
|
||||
it('[C260238] Should restore a file', async () => {
|
||||
contentServicesPage.checkContentIsDisplayed(testFile.entry.name);
|
||||
contentServicesPage.deleteContent(testFile.entry.name);
|
||||
contentServicesPage.checkContentIsNotDisplayed(testFile.entry.name);
|
||||
navigationBarPage.clickTrashcanButton();
|
||||
trashcanPage.waitForTableBody();
|
||||
trashcanPage.getDocumentList().dataTablePage().clickRowByContent(testFile.entry.name);
|
||||
trashcanPage.getDocumentList().dataTablePage().checkRowByContentIsSelected(testFile.entry.name);
|
||||
trashcanPage.clickRestore();
|
||||
trashcanPage.getDocumentList().dataTablePage().checkRowContentIsNotDisplayed(testFile.entry.name);
|
||||
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);
|
||||
|
||||
navigationBarPage.clickContentServicesButton();
|
||||
contentServicesPage.waitForTableBody();
|
||||
contentServicesPage.checkContentIsDisplayed(testFile.entry.name);
|
||||
contentServicesPage.deleteContent(testFile.entry.name);
|
||||
contentServicesPage.checkContentIsNotDisplayed(testFile.entry.name);
|
||||
navigationBarPage.clickTrashcanButton();
|
||||
trashcanPage.waitForTableBody();
|
||||
trashcanPage.getDocumentList().dataTablePage().checkRowContentIsDisplayed(testFile.entry.name);
|
||||
notificationHistoryPage.checkNotifyContains(testFile.entry.name + ' item restored');
|
||||
await navigationBarPage.clickContentServicesButton();
|
||||
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);
|
||||
await notificationHistoryPage.checkNotifyContains(testFile.entry.name + ' item restored');
|
||||
});
|
||||
|
||||
it('[C260239] Should restore folder with content', async () => {
|
||||
contentServicesPage.checkContentIsDisplayed(folderWithContent.entry.name);
|
||||
contentServicesPage.deleteContent(folderWithContent.entry.name);
|
||||
contentServicesPage.checkContentIsNotDisplayed(folderWithContent.entry.name);
|
||||
navigationBarPage.clickTrashcanButton();
|
||||
trashcanPage.waitForTableBody();
|
||||
trashcanPage.getDocumentList().dataTablePage().clickRowByContent(folderWithContent.entry.name);
|
||||
trashcanPage.getDocumentList().dataTablePage().checkRowByContentIsSelected(folderWithContent.entry.name);
|
||||
trashcanPage.clickRestore();
|
||||
trashcanPage.getDocumentList().dataTablePage().checkRowContentIsNotDisplayed(folderWithContent.entry.name);
|
||||
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);
|
||||
|
||||
navigationBarPage.clickContentServicesButton();
|
||||
contentServicesPage.waitForTableBody();
|
||||
contentServicesPage.checkContentIsDisplayed(folderWithContent.entry.name);
|
||||
contentServicesPage.getContentList().dataTablePage().doubleClickRow('Display name', folderWithContent.entry.name);
|
||||
contentServicesPage.checkContentIsDisplayed(subFile.entry.name);
|
||||
notificationHistoryPage.checkNotifyContains(folderWithContent.entry.name + ' item restored');
|
||||
await navigationBarPage.clickContentServicesButton();
|
||||
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('[C260240] Should validate restore when the original location no longer exists', async () => {
|
||||
contentServicesPage.checkContentIsDisplayed(folderWithFolder.entry.name);
|
||||
contentServicesPage.doubleClickRow(folderWithFolder.entry.name);
|
||||
contentServicesPage.checkContentIsDisplayed(subFolder.entry.name);
|
||||
contentServicesPage.deleteContent(subFolder.entry.name);
|
||||
contentServicesPage.checkContentIsNotDisplayed(subFolder.entry.name);
|
||||
breadCrumbPage.chooseBreadCrumb(acsUser.id);
|
||||
contentServicesPage.waitForTableBody();
|
||||
contentServicesPage.checkContentIsDisplayed(folderWithFolder.entry.name);
|
||||
contentServicesPage.deleteContent(folderWithFolder.entry.name);
|
||||
contentServicesPage.checkContentIsNotDisplayed(folderWithFolder.entry.name);
|
||||
await contentServicesPage.checkContentIsDisplayed(folderWithFolder.entry.name);
|
||||
await contentServicesPage.doubleClickRow(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.id);
|
||||
await contentServicesPage.waitForTableBody();
|
||||
await contentServicesPage.checkContentIsDisplayed(folderWithFolder.entry.name);
|
||||
await contentServicesPage.deleteContent(folderWithFolder.entry.name);
|
||||
await contentServicesPage.checkContentIsNotDisplayed(folderWithFolder.entry.name);
|
||||
|
||||
navigationBarPage.clickTrashcanButton();
|
||||
trashcanPage.waitForTableBody();
|
||||
trashcanPage.getDocumentList().dataTablePage().checkRowContentIsDisplayed(subFolder.entry.name);
|
||||
trashcanPage.getDocumentList().dataTablePage().checkRowContentIsDisplayed(folderWithFolder.entry.name);
|
||||
trashcanPage.getDocumentList().dataTablePage().clickRowByContent(subFolder.entry.name);
|
||||
trashcanPage.getDocumentList().dataTablePage().checkRowByContentIsSelected(subFolder.entry.name);
|
||||
trashcanPage.clickRestore();
|
||||
trashcanPage.getDocumentList().dataTablePage().checkRowContentIsDisplayed(subFolder.entry.name);
|
||||
trashcanPage.getDocumentList().dataTablePage().checkRowContentIsDisplayed(folderWithFolder.entry.name);
|
||||
trashcanPage.getDocumentList().dataTablePage().clickRowByContentCheckbox(subFolder.entry.name);
|
||||
trashcanPage.getDocumentList().dataTablePage().checkRowByContentIsSelected(subFolder.entry.name);
|
||||
trashcanPage.getDocumentList().dataTablePage().clickRowByContentCheckbox(folderWithFolder.entry.name);
|
||||
trashcanPage.getDocumentList().dataTablePage().checkRowByContentIsSelected(folderWithFolder.entry.name);
|
||||
trashcanPage.clickRestore();
|
||||
|
||||
navigationBarPage.clickContentServicesButton();
|
||||
contentServicesPage.waitForTableBody();
|
||||
contentServicesPage.checkContentIsDisplayed(folderWithFolder.entry.name);
|
||||
contentServicesPage.doubleClickRow(folderWithFolder.entry.name);
|
||||
contentServicesPage.checkContentIsDisplayed(subFolder.entry.name);
|
||||
notificationHistoryPage.clickNotificationButton();
|
||||
notificationHistoryPage.checkNotificationIsPresent('Can\'t restore ' + subFolder.entry.name + ' item, the original location no longer exists');
|
||||
notificationHistoryPage.checkNotificationIsPresent('Restore successful');
|
||||
notificationHistoryPage.clickMarkAsRead();
|
||||
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.clickContentServicesButton();
|
||||
await contentServicesPage.waitForTableBody();
|
||||
await contentServicesPage.checkContentIsDisplayed(folderWithFolder.entry.name);
|
||||
await contentServicesPage.doubleClickRow(folderWithFolder.entry.name);
|
||||
await contentServicesPage.checkContentIsDisplayed(subFolder.entry.name);
|
||||
});
|
||||
|
||||
it('[C260241] Should display restore icon both for file and folder', async () => {
|
||||
contentServicesPage.checkContentIsDisplayed(folderName);
|
||||
contentServicesPage.checkContentIsDisplayed(restoreFile.entry.name);
|
||||
contentServicesPage.deleteContent(folderName);
|
||||
contentServicesPage.deleteContent(restoreFile.entry.name);
|
||||
contentServicesPage.checkContentIsNotDisplayed(folderName);
|
||||
contentServicesPage.checkContentIsNotDisplayed(restoreFile.entry.name);
|
||||
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);
|
||||
|
||||
navigationBarPage.clickTrashcanButton();
|
||||
trashcanPage.waitForTableBody();
|
||||
trashcanPage.checkRestoreButtonIsNotDisplayed();
|
||||
trashcanPage.getDocumentList().dataTablePage().clickRowByContentCheckbox(folderName);
|
||||
trashcanPage.getDocumentList().dataTablePage().checkRowByContentIsSelected(folderName);
|
||||
trashcanPage.checkRestoreButtonIsDisplayed();
|
||||
trashcanPage.getDocumentList().dataTablePage().clickRowByContentCheckbox(folderName);
|
||||
trashcanPage.getDocumentList().dataTablePage().checkRowByContentIsNotSelected(folderName);
|
||||
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);
|
||||
|
||||
trashcanPage.getDocumentList().dataTablePage().clickRowByContentCheckbox(restoreFile.entry.name);
|
||||
trashcanPage.getDocumentList().dataTablePage().checkRowByContentIsSelected(restoreFile.entry.name);
|
||||
trashcanPage.checkRestoreButtonIsDisplayed();
|
||||
await trashcanPage.getDocumentList().dataTablePage().clickRowByContentCheckbox(restoreFile.entry.name);
|
||||
await trashcanPage.getDocumentList().dataTablePage().checkRowByContentIsSelected(restoreFile.entry.name);
|
||||
await trashcanPage.checkRestoreButtonIsDisplayed();
|
||||
|
||||
trashcanPage.getDocumentList().dataTablePage().clickRowByContentCheckbox(folderName);
|
||||
trashcanPage.getDocumentList().dataTablePage().checkRowByContentIsSelected(folderName);
|
||||
trashcanPage.getDocumentList().dataTablePage().checkRowByContentIsSelected(restoreFile.entry.name);
|
||||
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 (done) => {
|
||||
beforeAll(async () => {
|
||||
await this.alfrescoJsApi.login(acsUser.id, acsUser.password);
|
||||
const publicSiteName = `00${StringUtil.generateRandomString(5)}`;
|
||||
const publicSiteBody = { visibility: 'PUBLIC', title: publicSiteName };
|
||||
@@ -251,25 +243,31 @@ describe('Restore content directive', function () {
|
||||
siteFolder = await uploadActions.createFolder(StringUtil.generateRandomString(5), publicSite.entry.guid);
|
||||
siteFile = await uploadActions.uploadFile(pngFileModel.location, pngFileModel.name, siteFolder.entry.id);
|
||||
await this.alfrescoJsApi.core.sitesApi.deleteSite(publicSite.entry.id);
|
||||
done();
|
||||
});
|
||||
|
||||
afterAll(async () => {
|
||||
try {
|
||||
await this.alfrescoJsApi.core.sitesApi.deleteSite(publicSite.entry.id);
|
||||
} catch (error) {
|
||||
}
|
||||
});
|
||||
|
||||
it('[C260241] Should restore the deleted library along with contents inside', async () => {
|
||||
navigationBarPage.clickTrashcanButton();
|
||||
trashcanPage.waitForTableBody();
|
||||
trashcanPage.getDocumentList().dataTablePage().checkRowContentIsDisplayed(publicSite.entry.id);
|
||||
trashcanPage.getDocumentList().dataTablePage().clickRowByContentCheckbox(publicSite.entry.id);
|
||||
trashcanPage.getDocumentList().dataTablePage().checkRowByContentIsSelected(publicSite.entry.id);
|
||||
trashcanPage.clickRestore();
|
||||
await navigationBarPage.clickTrashcanButton();
|
||||
await trashcanPage.waitForTableBody();
|
||||
await trashcanPage.getDocumentList().dataTablePage().checkRowContentIsDisplayed(publicSite.entry.id);
|
||||
await trashcanPage.getDocumentList().dataTablePage().clickRowByContentCheckbox(publicSite.entry.id);
|
||||
await trashcanPage.getDocumentList().dataTablePage().checkRowByContentIsSelected(publicSite.entry.id);
|
||||
await trashcanPage.clickRestore();
|
||||
|
||||
navigationBarPage.clickContentServicesButton();
|
||||
contentServicesPage.waitForTableBody();
|
||||
contentServicesPage.selectSite(publicSite.entry.title);
|
||||
contentServicesPage.waitForTableBody();
|
||||
contentServicesPage.checkContentIsDisplayed(siteFolder.entry.name);
|
||||
contentServicesPage.doubleClickRow(siteFolder.entry.name);
|
||||
contentServicesPage.checkContentIsDisplayed(siteFile.entry.name);
|
||||
notificationHistoryPage.checkNotifyContains(publicSite.entry.id + ' item restored');
|
||||
await navigationBarPage.clickContentServicesButton();
|
||||
await contentServicesPage.waitForTableBody();
|
||||
await contentServicesPage.selectSite(publicSite.entry.title);
|
||||
await contentServicesPage.waitForTableBody();
|
||||
await contentServicesPage.checkContentIsDisplayed(siteFolder.entry.name);
|
||||
await contentServicesPage.doubleClickRow(siteFolder.entry.name);
|
||||
await contentServicesPage.checkContentIsDisplayed(siteFile.entry.name);
|
||||
await notificationHistoryPage.checkNotifyContains(publicSite.entry.id + ' item restored');
|
||||
|
||||
});
|
||||
});
|
||||
@@ -278,7 +276,7 @@ describe('Restore content directive', function () {
|
||||
|
||||
let parentFolder, folderWithin, pdfFile, pngFile, mainFile, mainFolder;
|
||||
|
||||
beforeAll(async (done) => {
|
||||
beforeAll(async () => {
|
||||
await this.alfrescoJsApi.login(anotherAcsUser.id, anotherAcsUser.password);
|
||||
await uploadActions.createFolder(folderName, '-my-');
|
||||
parentFolder = await uploadActions.createFolder(StringUtil.generateRandomString(5), '-my-');
|
||||
@@ -289,45 +287,43 @@ describe('Restore content directive', function () {
|
||||
mainFolder = await uploadActions.createFolder(StringUtil.generateRandomString(5), '-my-');
|
||||
|
||||
await loginPage.loginToContentServicesUsingUserModel(anotherAcsUser);
|
||||
contentServicesPage.goToDocumentList();
|
||||
contentServicesPage.waitForTableBody();
|
||||
done();
|
||||
await contentServicesPage.goToDocumentList();
|
||||
await contentServicesPage.waitForTableBody();
|
||||
});
|
||||
|
||||
afterAll(async (done) => {
|
||||
afterAll(async () => {
|
||||
await this.alfrescoJsApi.login(browser.params.testConfig.adf.adminEmail, browser.params.testConfig.adf.adminPassword);
|
||||
await uploadActions.deleteFileOrFolder(parentFolder.entry.id);
|
||||
await uploadActions.deleteFileOrFolder(mainFolder.entry.id);
|
||||
await uploadActions.deleteFileOrFolder(mainFile.entry.id);
|
||||
done();
|
||||
});
|
||||
|
||||
it('[C216431] Should restore hierarchy of folders', async () => {
|
||||
contentServicesPage.deleteContent(parentFolder.entry.name);
|
||||
contentServicesPage.deleteContent(mainFolder.entry.name);
|
||||
contentServicesPage.deleteContent(mainFile.entry.name);
|
||||
await contentServicesPage.deleteContent(parentFolder.entry.name);
|
||||
await contentServicesPage.deleteContent(mainFolder.entry.name);
|
||||
await contentServicesPage.deleteContent(mainFile.entry.name);
|
||||
|
||||
navigationBarPage.clickTrashcanButton();
|
||||
trashcanPage.waitForTableBody();
|
||||
trashcanPage.checkRestoreButtonIsNotDisplayed();
|
||||
trashcanPage.getDocumentList().dataTablePage().clickRowByContentCheckbox(parentFolder.entry.name);
|
||||
trashcanPage.getDocumentList().dataTablePage().checkRowByContentIsSelected(parentFolder.entry.name);
|
||||
trashcanPage.getDocumentList().dataTablePage().clickRowByContentCheckbox(mainFolder.entry.name);
|
||||
trashcanPage.getDocumentList().dataTablePage().checkRowByContentIsSelected(mainFolder.entry.name);
|
||||
trashcanPage.getDocumentList().dataTablePage().clickRowByContentCheckbox(mainFile.entry.name);
|
||||
trashcanPage.getDocumentList().dataTablePage().checkRowByContentIsSelected(mainFile.entry.name);
|
||||
trashcanPage.clickRestore();
|
||||
await navigationBarPage.clickTrashcanButton();
|
||||
await trashcanPage.waitForTableBody();
|
||||
await trashcanPage.checkRestoreButtonIsNotDisplayed();
|
||||
await trashcanPage.getDocumentList().dataTablePage().clickRowByContentCheckbox(parentFolder.entry.name);
|
||||
await trashcanPage.getDocumentList().dataTablePage().checkRowByContentIsSelected(parentFolder.entry.name);
|
||||
await trashcanPage.getDocumentList().dataTablePage().clickRowByContentCheckbox(mainFolder.entry.name);
|
||||
await trashcanPage.getDocumentList().dataTablePage().checkRowByContentIsSelected(mainFolder.entry.name);
|
||||
await trashcanPage.getDocumentList().dataTablePage().clickRowByContentCheckbox(mainFile.entry.name);
|
||||
await trashcanPage.getDocumentList().dataTablePage().checkRowByContentIsSelected(mainFile.entry.name);
|
||||
await trashcanPage.clickRestore();
|
||||
|
||||
navigationBarPage.clickContentServicesButton();
|
||||
contentServicesPage.waitForTableBody();
|
||||
contentServicesPage.checkContentIsDisplayed(parentFolder.entry.name);
|
||||
contentServicesPage.checkContentIsDisplayed(mainFolder.entry.name);
|
||||
contentServicesPage.checkContentIsDisplayed(mainFile.entry.name);
|
||||
contentServicesPage.doubleClickRow(parentFolder.entry.name);
|
||||
contentServicesPage.checkContentIsDisplayed(folderWithin.entry.name);
|
||||
contentServicesPage.doubleClickRow(folderWithin.entry.name);
|
||||
contentServicesPage.checkContentIsDisplayed(pdfFile.entry.name);
|
||||
contentServicesPage.checkContentIsDisplayed(pngFile.entry.name);
|
||||
await navigationBarPage.clickContentServicesButton();
|
||||
await contentServicesPage.waitForTableBody();
|
||||
await contentServicesPage.checkContentIsDisplayed(parentFolder.entry.name);
|
||||
await contentServicesPage.checkContentIsDisplayed(mainFolder.entry.name);
|
||||
await contentServicesPage.checkContentIsDisplayed(mainFile.entry.name);
|
||||
await contentServicesPage.doubleClickRow(parentFolder.entry.name);
|
||||
await contentServicesPage.checkContentIsDisplayed(folderWithin.entry.name);
|
||||
await contentServicesPage.doubleClickRow(folderWithin.entry.name);
|
||||
await contentServicesPage.checkContentIsDisplayed(pdfFile.entry.name);
|
||||
await contentServicesPage.checkContentIsDisplayed(pngFile.entry.name);
|
||||
});
|
||||
});
|
||||
|
||||
|
||||
@@ -16,7 +16,13 @@
|
||||
*/
|
||||
|
||||
import { browser, by, element } from 'protractor';
|
||||
import { LoginPage, PaginationPage, UploadActions, StringUtil, ContentNodeSelectorDialogPage } from '@alfresco/adf-testing';
|
||||
import {
|
||||
LoginPage,
|
||||
PaginationPage,
|
||||
UploadActions,
|
||||
StringUtil,
|
||||
ContentNodeSelectorDialogPage
|
||||
} from '@alfresco/adf-testing';
|
||||
import { ContentServicesPage } from '../../pages/adf/contentServicesPage';
|
||||
import { NavigationBarPage } from '../../pages/adf/navigationBarPage';
|
||||
import { AcsUserModel } from '../../models/ACS/acsUserModel';
|
||||
@@ -56,12 +62,12 @@ describe('Document List Component - Actions', () => {
|
||||
const nrOfFiles = 5;
|
||||
|
||||
const pdfFileModel = new FileModel({
|
||||
'name': resources.Files.ADF_DOCUMENTS.PDF.file_name,
|
||||
'location': resources.Files.ADF_DOCUMENTS.PDF.file_location
|
||||
name: resources.Files.ADF_DOCUMENTS.PDF.file_name,
|
||||
location: resources.Files.ADF_DOCUMENTS.PDF.file_location
|
||||
});
|
||||
const testFileModel = new FileModel({
|
||||
'name': resources.Files.ADF_DOCUMENTS.TEST.file_name,
|
||||
'location': resources.Files.ADF_DOCUMENTS.TEST.file_location
|
||||
name: resources.Files.ADF_DOCUMENTS.TEST.file_name,
|
||||
location: resources.Files.ADF_DOCUMENTS.TEST.file_location
|
||||
});
|
||||
|
||||
const files = {
|
||||
@@ -69,7 +75,7 @@ describe('Document List Component - Actions', () => {
|
||||
extension: '.txt'
|
||||
};
|
||||
|
||||
beforeAll(async (done) => {
|
||||
beforeAll(async () => {
|
||||
acsUser = new AcsUserModel();
|
||||
folderName = `TATSUMAKY_${StringUtil.generateRandomString(5)}_SENPOUKYAKU`;
|
||||
await this.alfrescoJsApi.login(browser.params.testConfig.adf.adminEmail, browser.params.testConfig.adf.adminPassword);
|
||||
@@ -85,150 +91,149 @@ describe('Document List Component - Actions', () => {
|
||||
|
||||
await loginPage.loginToContentServicesUsingUserModel(acsUser);
|
||||
|
||||
browser.driver.sleep(12000);
|
||||
done();
|
||||
await browser.sleep(10000);
|
||||
|
||||
});
|
||||
|
||||
afterAll(async () => {
|
||||
await navigationBarPage.clickLogoutButton();
|
||||
});
|
||||
|
||||
beforeEach(async(done) => {
|
||||
beforeEach(async () => {
|
||||
await navigationBarPage.clickContentServicesButton();
|
||||
done();
|
||||
});
|
||||
|
||||
describe('File Actions', () => {
|
||||
|
||||
it('[C213257] Should be able to copy a file', () => {
|
||||
contentServicesPage.checkContentIsDisplayed(pdfUploadedNode.entry.name);
|
||||
contentServicesPage.getDocumentList().rightClickOnRow(pdfFileModel.name);
|
||||
contentServicesPage.pressContextMenuActionNamed('Copy');
|
||||
contentNodeSelector.checkDialogIsDisplayed();
|
||||
contentNodeSelector.typeIntoNodeSelectorSearchField(folderName);
|
||||
contentNodeSelector.clickContentNodeSelectorResult(folderName);
|
||||
contentNodeSelector.clickMoveCopyButton();
|
||||
contentServicesPage.checkContentIsDisplayed(pdfFileModel.name);
|
||||
contentServicesPage.doubleClickRow(uploadedFolder.entry.name);
|
||||
contentServicesPage.checkContentIsDisplayed(pdfFileModel.name);
|
||||
it('[C213257] Should be able to copy a file', async () => {
|
||||
await contentServicesPage.checkContentIsDisplayed(pdfUploadedNode.entry.name);
|
||||
await contentServicesPage.getDocumentList().rightClickOnRow(pdfFileModel.name);
|
||||
await contentServicesPage.pressContextMenuActionNamed('Copy');
|
||||
await contentNodeSelector.checkDialogIsDisplayed();
|
||||
await contentNodeSelector.typeIntoNodeSelectorSearchField(folderName);
|
||||
await contentNodeSelector.clickContentNodeSelectorResult(folderName);
|
||||
await contentNodeSelector.clickMoveCopyButton();
|
||||
await contentServicesPage.checkContentIsDisplayed(pdfFileModel.name);
|
||||
await contentServicesPage.doubleClickRow(uploadedFolder.entry.name);
|
||||
await contentServicesPage.checkContentIsDisplayed(pdfFileModel.name);
|
||||
});
|
||||
|
||||
it('[C260131] Copy - Destination picker search', () => {
|
||||
contentServicesPage.checkContentIsDisplayed(pdfFileModel.name);
|
||||
contentServicesPage.getDocumentList().rightClickOnRow(pdfFileModel.name);
|
||||
contentServicesPage.pressContextMenuActionNamed('Copy');
|
||||
contentNodeSelector.checkDialogIsDisplayed();
|
||||
contentNodeSelector.typeIntoNodeSelectorSearchField(folderName);
|
||||
contentNodeSelector.contentListPage().dataTablePage().checkCellByHighlightContent(folderName);
|
||||
contentNodeSelector.clickCancelButton();
|
||||
contentNodeSelector.checkDialogIsNotDisplayed();
|
||||
it('[C260131] Copy - Destination picker search', async () => {
|
||||
await contentServicesPage.checkContentIsDisplayed(pdfFileModel.name);
|
||||
await contentServicesPage.getDocumentList().rightClickOnRow(pdfFileModel.name);
|
||||
await contentServicesPage.pressContextMenuActionNamed('Copy');
|
||||
await contentNodeSelector.checkDialogIsDisplayed();
|
||||
await contentNodeSelector.typeIntoNodeSelectorSearchField(folderName);
|
||||
await contentNodeSelector.contentListPage().dataTablePage().checkCellByHighlightContent(folderName);
|
||||
await contentNodeSelector.clickCancelButton();
|
||||
await contentNodeSelector.checkDialogIsNotDisplayed();
|
||||
});
|
||||
|
||||
it('[C297491] Should be able to move a file', () => {
|
||||
contentServicesPage.checkContentIsDisplayed(testFileModel.name);
|
||||
it('[C297491] Should be able to move a file', async () => {
|
||||
await contentServicesPage.checkContentIsDisplayed(testFileModel.name);
|
||||
|
||||
contentServicesPage.getDocumentList().rightClickOnRow(testFileModel.name);
|
||||
contentServicesPage.pressContextMenuActionNamed('Move');
|
||||
contentNodeSelector.checkDialogIsDisplayed();
|
||||
contentNodeSelector.typeIntoNodeSelectorSearchField(folderName);
|
||||
contentNodeSelector.clickContentNodeSelectorResult(folderName);
|
||||
contentNodeSelector.clickMoveCopyButton();
|
||||
contentServicesPage.checkContentIsNotDisplayed(testFileModel.name);
|
||||
contentServicesPage.doubleClickRow(uploadedFolder.entry.name);
|
||||
contentServicesPage.checkContentIsDisplayed(testFileModel.name);
|
||||
await contentServicesPage.getDocumentList().rightClickOnRow(testFileModel.name);
|
||||
await contentServicesPage.pressContextMenuActionNamed('Move');
|
||||
await contentNodeSelector.checkDialogIsDisplayed();
|
||||
await contentNodeSelector.typeIntoNodeSelectorSearchField(folderName);
|
||||
await contentNodeSelector.clickContentNodeSelectorResult(folderName);
|
||||
await contentNodeSelector.clickMoveCopyButton();
|
||||
await contentServicesPage.checkContentIsNotDisplayed(testFileModel.name);
|
||||
await contentServicesPage.doubleClickRow(uploadedFolder.entry.name);
|
||||
await contentServicesPage.checkContentIsDisplayed(testFileModel.name);
|
||||
});
|
||||
|
||||
it('[C260127] Move - Destination picker search', () => {
|
||||
contentServicesPage.checkContentIsDisplayed(pdfFileModel.name);
|
||||
contentServicesPage.getDocumentList().rightClickOnRow(pdfFileModel.name);
|
||||
contentServicesPage.pressContextMenuActionNamed('Move');
|
||||
contentNodeSelector.checkDialogIsDisplayed();
|
||||
contentNodeSelector.typeIntoNodeSelectorSearchField(folderName);
|
||||
contentNodeSelector.contentListPage().dataTablePage().checkCellByHighlightContent(folderName);
|
||||
contentNodeSelector.clickCancelButton();
|
||||
contentNodeSelector.checkDialogIsNotDisplayed();
|
||||
it('[C260127] Move - Destination picker search', async () => {
|
||||
await contentServicesPage.checkContentIsDisplayed(pdfFileModel.name);
|
||||
await contentServicesPage.getDocumentList().rightClickOnRow(pdfFileModel.name);
|
||||
await contentServicesPage.pressContextMenuActionNamed('Move');
|
||||
await contentNodeSelector.checkDialogIsDisplayed();
|
||||
await contentNodeSelector.typeIntoNodeSelectorSearchField(folderName);
|
||||
await contentNodeSelector.contentListPage().dataTablePage().checkCellByHighlightContent(folderName);
|
||||
await contentNodeSelector.clickCancelButton();
|
||||
await contentNodeSelector.checkDialogIsNotDisplayed();
|
||||
});
|
||||
|
||||
it('[C280561] Should be able to delete a file via dropdown menu', () => {
|
||||
contentServicesPage.doubleClickRow(uploadedFolder.entry.name);
|
||||
it('[C280561] Should be able to delete a file via dropdown menu', async () => {
|
||||
await contentServicesPage.doubleClickRow(uploadedFolder.entry.name);
|
||||
|
||||
contentServicesPage.checkContentIsDisplayed(fileNames[0]);
|
||||
contentServicesPage.deleteContent(fileNames[0]);
|
||||
contentServicesPage.checkContentIsNotDisplayed(fileNames[0]);
|
||||
await contentServicesPage.checkContentIsDisplayed(fileNames[0]);
|
||||
await contentServicesPage.deleteContent(fileNames[0]);
|
||||
await contentServicesPage.checkContentIsNotDisplayed(fileNames[0]);
|
||||
});
|
||||
|
||||
it('[C280562] Only one file is deleted when multiple files are selected using dropdown menu', () => {
|
||||
contentServicesPage.doubleClickRow(uploadedFolder.entry.name);
|
||||
it('[C280562] Only one file is deleted when multiple files are selected using dropdown menu', async () => {
|
||||
await contentServicesPage.doubleClickRow(uploadedFolder.entry.name);
|
||||
|
||||
contentListPage.selectRow(fileNames[1]);
|
||||
contentListPage.selectRow(fileNames[2]);
|
||||
contentServicesPage.deleteContent(fileNames[1]);
|
||||
contentServicesPage.checkContentIsNotDisplayed(fileNames[1]);
|
||||
contentServicesPage.checkContentIsDisplayed(fileNames[2]);
|
||||
await contentServicesPage.getDocumentList().selectRow(fileNames[1]);
|
||||
await contentServicesPage.getDocumentList().selectRow(fileNames[2]);
|
||||
await contentServicesPage.deleteContent(fileNames[1]);
|
||||
await contentServicesPage.checkContentIsNotDisplayed(fileNames[1]);
|
||||
await contentServicesPage.checkContentIsDisplayed(fileNames[2]);
|
||||
});
|
||||
|
||||
it('[C280565] Should be able to delete a file using context menu', () => {
|
||||
contentServicesPage.doubleClickRow(uploadedFolder.entry.name);
|
||||
|
||||
contentListPage.rightClickOnRow(fileNames[2]);
|
||||
contentServicesPage.pressContextMenuActionNamed('Delete');
|
||||
contentServicesPage.checkContentIsNotDisplayed(fileNames[2]);
|
||||
it('[C280565] Should be able to delete a file using context menu', async () => {
|
||||
await contentServicesPage.doubleClickRow(uploadedFolder.entry.name);
|
||||
await contentServicesPage.checkContentIsDisplayed(fileNames[2]);
|
||||
await contentServicesPage.getDocumentList().rightClickOnRow(fileNames[2]);
|
||||
await contentServicesPage.pressContextMenuActionNamed('Delete');
|
||||
await contentServicesPage.checkContentIsNotDisplayed(fileNames[2]);
|
||||
});
|
||||
|
||||
it('[C280567] Only one file is deleted when multiple files are selected using context menu', () => {
|
||||
contentServicesPage.doubleClickRow(uploadedFolder.entry.name);
|
||||
it('[C280567] Only one file is deleted when multiple files are selected using context menu', async () => {
|
||||
await contentServicesPage.doubleClickRow(uploadedFolder.entry.name);
|
||||
|
||||
contentListPage.selectRow(fileNames[3]);
|
||||
contentListPage.selectRow(fileNames[4]);
|
||||
contentListPage.rightClickOnRow(fileNames[3]);
|
||||
contentServicesPage.pressContextMenuActionNamed('Delete');
|
||||
contentServicesPage.checkContentIsNotDisplayed(fileNames[3]);
|
||||
contentServicesPage.checkContentIsDisplayed(fileNames[4]);
|
||||
await contentServicesPage.getDocumentList().selectRow(fileNames[3]);
|
||||
await contentServicesPage.getDocumentList().selectRow(fileNames[4]);
|
||||
await contentServicesPage.getDocumentList().rightClickOnRow(fileNames[3]);
|
||||
await contentServicesPage.pressContextMenuActionNamed('Delete');
|
||||
await contentServicesPage.checkContentIsNotDisplayed(fileNames[3]);
|
||||
await contentServicesPage.checkContentIsDisplayed(fileNames[4]);
|
||||
});
|
||||
|
||||
it('[C280566] Should be able to open context menu with right click', () => {
|
||||
contentServicesPage.getDocumentList().rightClickOnRow(pdfFileModel.name);
|
||||
contentServicesPage.checkContextActionIsVisible('Download');
|
||||
contentServicesPage.checkContextActionIsVisible('Copy');
|
||||
contentServicesPage.checkContextActionIsVisible('Move');
|
||||
contentServicesPage.checkContextActionIsVisible('Delete');
|
||||
contentServicesPage.checkContextActionIsVisible('Info');
|
||||
contentServicesPage.checkContextActionIsVisible('Manage versions');
|
||||
contentServicesPage.checkContextActionIsVisible('Permission');
|
||||
contentServicesPage.checkContextActionIsVisible('Lock');
|
||||
contentServicesPage.closeActionContext();
|
||||
it('[C280566] Should be able to open context menu with right click', async () => {
|
||||
await contentServicesPage.getDocumentList().rightClickOnRow(pdfFileModel.name);
|
||||
await contentServicesPage.checkContextActionIsVisible('Download');
|
||||
await contentServicesPage.checkContextActionIsVisible('Copy');
|
||||
await contentServicesPage.checkContextActionIsVisible('Move');
|
||||
await contentServicesPage.checkContextActionIsVisible('Delete');
|
||||
await contentServicesPage.checkContextActionIsVisible('Info');
|
||||
await contentServicesPage.checkContextActionIsVisible('Manage versions');
|
||||
await contentServicesPage.checkContextActionIsVisible('Permission');
|
||||
await contentServicesPage.checkContextActionIsVisible('Lock');
|
||||
await contentServicesPage.closeActionContext();
|
||||
});
|
||||
|
||||
});
|
||||
|
||||
describe('Folder Actions', () => {
|
||||
|
||||
it('[C260138] Should be able to copy a folder', () => {
|
||||
contentServicesPage.copyContent(folderName);
|
||||
contentNodeSelector.checkDialogIsDisplayed();
|
||||
contentNodeSelector.typeIntoNodeSelectorSearchField(secondUploadedFolder.entry.name);
|
||||
contentNodeSelector.clickContentNodeSelectorResult(secondUploadedFolder.entry.name);
|
||||
contentNodeSelector.clickMoveCopyButton();
|
||||
contentServicesPage.checkContentIsDisplayed(folderName);
|
||||
contentServicesPage.doubleClickRow(secondUploadedFolder.entry.name);
|
||||
contentServicesPage.checkContentIsDisplayed(folderName);
|
||||
it('[C260138] Should be able to copy a folder', async () => {
|
||||
await contentServicesPage.copyContent(folderName);
|
||||
await contentNodeSelector.checkDialogIsDisplayed();
|
||||
await contentNodeSelector.typeIntoNodeSelectorSearchField(secondUploadedFolder.entry.name);
|
||||
await contentNodeSelector.clickContentNodeSelectorResult(secondUploadedFolder.entry.name);
|
||||
await contentNodeSelector.clickMoveCopyButton();
|
||||
await contentServicesPage.checkContentIsDisplayed(folderName);
|
||||
await contentServicesPage.doubleClickRow(secondUploadedFolder.entry.name);
|
||||
await contentServicesPage.checkContentIsDisplayed(folderName);
|
||||
});
|
||||
|
||||
it('[C260123] Should be able to delete a folder using context menu', () => {
|
||||
contentServicesPage.deleteContent(folderName);
|
||||
contentServicesPage.checkContentIsNotDisplayed(folderName);
|
||||
it('[C260123] Should be able to delete a folder using context menu', async () => {
|
||||
await contentServicesPage.deleteContent(folderName);
|
||||
await contentServicesPage.checkContentIsNotDisplayed(folderName);
|
||||
});
|
||||
|
||||
it('[C280568] Should be able to open context menu with right click', () => {
|
||||
contentServicesPage.checkContentIsDisplayed(secondUploadedFolder.entry.name);
|
||||
it('[C280568] Should be able to open context menu with right click', async () => {
|
||||
await contentServicesPage.checkContentIsDisplayed(secondUploadedFolder.entry.name);
|
||||
|
||||
contentListPage.rightClickOnRow(secondUploadedFolder.entry.name);
|
||||
contentServicesPage.checkContextActionIsVisible('Download');
|
||||
contentServicesPage.checkContextActionIsVisible('Copy');
|
||||
contentServicesPage.checkContextActionIsVisible('Move');
|
||||
contentServicesPage.checkContextActionIsVisible('Delete');
|
||||
contentServicesPage.checkContextActionIsVisible('Info');
|
||||
contentServicesPage.checkContextActionIsVisible('Permission');
|
||||
await contentServicesPage.getDocumentList().rightClickOnRow(secondUploadedFolder.entry.name);
|
||||
await contentServicesPage.checkContextActionIsVisible('Download');
|
||||
await contentServicesPage.checkContextActionIsVisible('Copy');
|
||||
await contentServicesPage.checkContextActionIsVisible('Move');
|
||||
await contentServicesPage.checkContextActionIsVisible('Delete');
|
||||
await contentServicesPage.checkContextActionIsVisible('Info');
|
||||
await contentServicesPage.checkContextActionIsVisible('Permission');
|
||||
});
|
||||
|
||||
});
|
||||
@@ -236,19 +241,19 @@ describe('Document List Component - Actions', () => {
|
||||
|
||||
describe('Folder Actions - Copy and Move', () => {
|
||||
|
||||
const folderModel1 = new FolderModel({'name': StringUtil.generateRandomString()});
|
||||
const folderModel2 = new FolderModel({'name': StringUtil.generateRandomString()});
|
||||
const folderModel3 = new FolderModel({'name': StringUtil.generateRandomString()});
|
||||
const folderModel4 = new FolderModel({'name': StringUtil.generateRandomString()});
|
||||
const folderModel5 = new FolderModel({'name': StringUtil.generateRandomString()});
|
||||
const folderModel6 = new FolderModel({'name': StringUtil.generateRandomString()});
|
||||
const folderModel1 = new FolderModel({ name: StringUtil.generateRandomString() });
|
||||
const folderModel2 = new FolderModel({ name: StringUtil.generateRandomString() });
|
||||
const folderModel3 = new FolderModel({ name: StringUtil.generateRandomString() });
|
||||
const folderModel4 = new FolderModel({ name: StringUtil.generateRandomString() });
|
||||
const folderModel5 = new FolderModel({ name: StringUtil.generateRandomString() });
|
||||
const folderModel6 = new FolderModel({ name: StringUtil.generateRandomString() });
|
||||
|
||||
let folder1, folder2, folder3, folder4, folder5, folder6;
|
||||
|
||||
let folders;
|
||||
const contentServicesUser = new AcsUserModel();
|
||||
|
||||
beforeAll(async (done) => {
|
||||
beforeAll(async () => {
|
||||
|
||||
await this.alfrescoJsApi.login(browser.params.testConfig.adf.adminEmail, browser.params.testConfig.adf.adminPassword);
|
||||
await this.alfrescoJsApi.core.peopleApi.addPerson(contentServicesUser);
|
||||
@@ -260,118 +265,121 @@ describe('Document List Component - Actions', () => {
|
||||
folder5 = await uploadActions.createFolder('E' + folderModel5.name, '-my-');
|
||||
folder6 = await uploadActions.createFolder('F' + folderModel6.name, '-my-');
|
||||
folders = [folder1, folder2, folder3, folder4, folder5, folder6];
|
||||
done();
|
||||
|
||||
});
|
||||
|
||||
beforeEach(async (done) => {
|
||||
loginPage.loginToContentServicesUsingUserModel(contentServicesUser);
|
||||
contentServicesPage.goToDocumentList();
|
||||
contentServicesPage.waitForTableBody();
|
||||
paginationPage.selectItemsPerPage('5');
|
||||
contentServicesPage.checkAcsContainer();
|
||||
contentListPage.waitForTableBody();
|
||||
done();
|
||||
beforeEach(async () => {
|
||||
await loginPage.loginToContentServicesUsingUserModel(contentServicesUser);
|
||||
await contentServicesPage.goToDocumentList();
|
||||
await contentServicesPage.waitForTableBody();
|
||||
await paginationPage.selectItemsPerPage('5');
|
||||
await contentServicesPage.checkAcsContainer();
|
||||
await contentListPage.waitForTableBody();
|
||||
|
||||
});
|
||||
|
||||
afterAll(async (done) => {
|
||||
afterAll(async () => {
|
||||
await this.alfrescoJsApi.login(browser.params.testConfig.adf.adminEmail, browser.params.testConfig.adf.adminPassword);
|
||||
await folders.forEach(function (folder) {
|
||||
uploadActions.deleteFileOrFolder(folder.entry.id);
|
||||
});
|
||||
done();
|
||||
});
|
||||
|
||||
it('[C260132] Move action on folder with - Load more', () => {
|
||||
|
||||
expect(paginationPage.getCurrentItemsPerPage()).toEqual('5');
|
||||
expect(paginationPage.getPaginationRange()).toEqual('Showing 1-' + 5 + ' of ' + 6);
|
||||
contentListPage.rightClickOnRow('A' + folderModel1.name);
|
||||
contentServicesPage.checkContextActionIsVisible('Move');
|
||||
contentServicesPage.pressContextMenuActionNamed('Move');
|
||||
contentNodeSelector.checkDialogIsDisplayed();
|
||||
expect(contentNodeSelector.getDialogHeaderText()).toBe('Move \'' + 'A' + folderModel1.name + '\' to...');
|
||||
contentNodeSelector.checkSearchInputIsDisplayed();
|
||||
expect(contentNodeSelector.getSearchLabel()).toBe('Search');
|
||||
contentNodeSelector.checkSelectedSiteIsDisplayed('My files');
|
||||
contentNodeSelector.checkCancelButtonIsDisplayed();
|
||||
contentNodeSelector.checkMoveCopyButtonIsDisplayed();
|
||||
expect(contentNodeSelector.getMoveCopyButtonText()).toBe('MOVE');
|
||||
expect(contentNodeSelector.numberOfResultsDisplayed()).toBe(5);
|
||||
infinitePaginationPage.clickLoadMoreButton();
|
||||
expect(contentNodeSelector.numberOfResultsDisplayed()).toBe(6);
|
||||
infinitePaginationPage.checkLoadMoreButtonIsNotDisplayed();
|
||||
contentNodeSelector.contentListPage().dataTablePage().selectRowByContent('F' + folderModel6.name);
|
||||
contentNodeSelector.contentListPage().dataTablePage().checkRowByContentIsSelected('F' + folderModel6.name);
|
||||
contentNodeSelector.clickCancelButton();
|
||||
contentNodeSelector.checkDialogIsNotDisplayed();
|
||||
contentServicesPage.checkContentIsDisplayed('A' + folderModel1.name);
|
||||
|
||||
contentListPage.rightClickOnRow('A' + folderModel1.name);
|
||||
contentServicesPage.checkContextActionIsVisible('Move');
|
||||
contentServicesPage.pressContextMenuActionNamed('Move');
|
||||
contentNodeSelector.checkDialogIsDisplayed();
|
||||
infinitePaginationPage.clickLoadMoreButton();
|
||||
contentNodeSelector.contentListPage().dataTablePage().selectRowByContent('F' + folderModel6.name);
|
||||
contentNodeSelector.contentListPage().dataTablePage().checkRowByContentIsSelected('F' + folderModel6.name);
|
||||
contentNodeSelector.clickMoveCopyButton();
|
||||
contentServicesPage.checkContentIsNotDisplayed('A' + folderModel1.name);
|
||||
contentServicesPage.doubleClickRow('F' + folderModel6.name);
|
||||
contentServicesPage.checkContentIsDisplayed('A' + folderModel1.name);
|
||||
|
||||
contentListPage.rightClickOnRow('A' + folderModel1.name);
|
||||
contentServicesPage.checkContextActionIsVisible('Move');
|
||||
contentServicesPage.pressContextMenuActionNamed('Move');
|
||||
contentNodeSelector.checkDialogIsDisplayed();
|
||||
breadCrumbDropdownPage.clickParentFolder();
|
||||
breadCrumbDropdownPage.checkBreadCrumbDropdownIsDisplayed();
|
||||
breadCrumbDropdownPage.choosePath(contentServicesUser.id);
|
||||
contentNodeSelector.clickMoveCopyButton();
|
||||
contentServicesPage.checkContentIsNotDisplayed('A' + folderModel1.name);
|
||||
|
||||
breadCrumbPage.chooseBreadCrumb(contentServicesUser.id);
|
||||
contentServicesPage.waitForTableBody();
|
||||
contentServicesPage.checkContentIsDisplayed('A' + folderModel1.name);
|
||||
for (const folder of folders) {
|
||||
await uploadActions.deleteFileOrFolder(folder.entry.id);
|
||||
}
|
||||
|
||||
});
|
||||
|
||||
it('[C305051] Copy action on folder with - Load more', () => {
|
||||
it('[C260132] Move action on folder with - Load more', async () => {
|
||||
|
||||
expect(paginationPage.getCurrentItemsPerPage()).toEqual('5');
|
||||
expect(paginationPage.getPaginationRange()).toEqual('Showing 1-' + 5 + ' of ' + 6);
|
||||
contentListPage.rightClickOnRow('A' + folderModel1.name);
|
||||
contentServicesPage.checkContextActionIsVisible('Copy');
|
||||
contentServicesPage.pressContextMenuActionNamed('Copy');
|
||||
contentNodeSelector.checkDialogIsDisplayed();
|
||||
expect(contentNodeSelector.getDialogHeaderText()).toBe('Copy \'' + 'A' + folderModel1.name + '\' to...');
|
||||
contentNodeSelector.checkSearchInputIsDisplayed();
|
||||
expect(contentNodeSelector.getSearchLabel()).toBe('Search');
|
||||
contentNodeSelector.checkSelectedSiteIsDisplayed('My files');
|
||||
contentNodeSelector.checkCancelButtonIsDisplayed();
|
||||
contentNodeSelector.checkMoveCopyButtonIsDisplayed();
|
||||
expect(contentNodeSelector.getMoveCopyButtonText()).toBe('COPY');
|
||||
expect(contentNodeSelector.numberOfResultsDisplayed()).toBe(5);
|
||||
infinitePaginationPage.clickLoadMoreButton();
|
||||
expect(contentNodeSelector.numberOfResultsDisplayed()).toBe(6);
|
||||
infinitePaginationPage.checkLoadMoreButtonIsNotDisplayed();
|
||||
contentNodeSelector.contentListPage().dataTablePage().selectRowByContent('F' + folderModel6.name);
|
||||
contentNodeSelector.contentListPage().dataTablePage().checkRowByContentIsSelected('F' + folderModel6.name);
|
||||
contentNodeSelector.clickCancelButton();
|
||||
contentNodeSelector.checkDialogIsNotDisplayed();
|
||||
contentServicesPage.checkContentIsDisplayed('A' + folderModel1.name);
|
||||
await expect(await paginationPage.getCurrentItemsPerPage()).toEqual('5');
|
||||
await expect(await paginationPage.getPaginationRange()).toEqual('Showing 1-' + 5 + ' of ' + 6);
|
||||
|
||||
contentListPage.rightClickOnRow('A' + folderModel1.name);
|
||||
contentServicesPage.checkContextActionIsVisible('Copy');
|
||||
contentServicesPage.pressContextMenuActionNamed('Copy');
|
||||
contentNodeSelector.checkDialogIsDisplayed();
|
||||
infinitePaginationPage.clickLoadMoreButton();
|
||||
contentNodeSelector.contentListPage().dataTablePage().selectRowByContent('F' + folderModel6.name);
|
||||
contentNodeSelector.contentListPage().dataTablePage().checkRowByContentIsSelected('F' + folderModel6.name);
|
||||
contentNodeSelector.clickMoveCopyButton();
|
||||
contentServicesPage.checkContentIsDisplayed('A' + folderModel1.name);
|
||||
paginationPage.clickOnNextPage();
|
||||
contentListPage.waitForTableBody();
|
||||
contentServicesPage.doubleClickRow('F' + folderModel6.name);
|
||||
contentServicesPage.checkContentIsDisplayed('A' + folderModel1.name);
|
||||
await contentServicesPage.getDocumentList().rightClickOnRow('A' + folderModel1.name);
|
||||
await contentServicesPage.checkContextActionIsVisible('Move');
|
||||
await contentServicesPage.pressContextMenuActionNamed('Move');
|
||||
await contentNodeSelector.checkDialogIsDisplayed();
|
||||
|
||||
await expect(await contentNodeSelector.getDialogHeaderText()).toBe('Move \'' + 'A' + folderModel1.name + '\' to...');
|
||||
await contentNodeSelector.checkSearchInputIsDisplayed();
|
||||
await expect(await contentNodeSelector.getSearchLabel()).toBe('Search');
|
||||
await contentNodeSelector.checkSelectedSiteIsDisplayed('My files');
|
||||
await contentNodeSelector.checkCancelButtonIsDisplayed();
|
||||
await contentNodeSelector.checkMoveCopyButtonIsDisplayed();
|
||||
|
||||
await expect(await contentNodeSelector.getMoveCopyButtonText()).toBe('MOVE');
|
||||
await expect(await contentNodeSelector.numberOfResultsDisplayed()).toBe(5);
|
||||
await infinitePaginationPage.clickLoadMoreButton();
|
||||
|
||||
await expect(await contentNodeSelector.numberOfResultsDisplayed()).toBe(6);
|
||||
await infinitePaginationPage.checkLoadMoreButtonIsNotDisplayed();
|
||||
await contentNodeSelector.contentListPage().dataTablePage().selectRowByContent('F' + folderModel6.name);
|
||||
await contentNodeSelector.contentListPage().dataTablePage().checkRowByContentIsSelected('F' + folderModel6.name);
|
||||
await contentNodeSelector.clickCancelButton();
|
||||
await contentNodeSelector.checkDialogIsNotDisplayed();
|
||||
await contentServicesPage.checkContentIsDisplayed('A' + folderModel1.name);
|
||||
|
||||
await contentServicesPage.getDocumentList().rightClickOnRow('A' + folderModel1.name);
|
||||
await contentServicesPage.checkContextActionIsVisible('Move');
|
||||
await contentServicesPage.pressContextMenuActionNamed('Move');
|
||||
await contentNodeSelector.checkDialogIsDisplayed();
|
||||
await infinitePaginationPage.clickLoadMoreButton();
|
||||
await contentNodeSelector.contentListPage().dataTablePage().selectRowByContent('F' + folderModel6.name);
|
||||
await contentNodeSelector.contentListPage().dataTablePage().checkRowByContentIsSelected('F' + folderModel6.name);
|
||||
await contentNodeSelector.clickMoveCopyButton();
|
||||
await contentServicesPage.checkContentIsNotDisplayed('A' + folderModel1.name);
|
||||
await contentServicesPage.doubleClickRow('F' + folderModel6.name);
|
||||
await contentServicesPage.checkContentIsDisplayed('A' + folderModel1.name);
|
||||
|
||||
await contentServicesPage.getDocumentList().rightClickOnRow('A' + folderModel1.name);
|
||||
await contentServicesPage.checkContextActionIsVisible('Move');
|
||||
await contentServicesPage.pressContextMenuActionNamed('Move');
|
||||
await contentNodeSelector.checkDialogIsDisplayed();
|
||||
await breadCrumbDropdownPage.clickParentFolder();
|
||||
await breadCrumbDropdownPage.checkBreadCrumbDropdownIsDisplayed();
|
||||
await breadCrumbDropdownPage.choosePath(contentServicesUser.id);
|
||||
await contentNodeSelector.clickMoveCopyButton();
|
||||
await contentServicesPage.checkContentIsNotDisplayed('A' + folderModel1.name);
|
||||
|
||||
await breadCrumbPage.chooseBreadCrumb(contentServicesUser.id);
|
||||
await contentServicesPage.waitForTableBody();
|
||||
await contentServicesPage.checkContentIsDisplayed('A' + folderModel1.name);
|
||||
});
|
||||
|
||||
it('[C305051] Copy action on folder with - Load more', async () => {
|
||||
|
||||
await expect(await paginationPage.getCurrentItemsPerPage()).toEqual('5');
|
||||
await expect(await paginationPage.getPaginationRange()).toEqual('Showing 1-' + 5 + ' of ' + 6);
|
||||
await contentServicesPage.getDocumentList().rightClickOnRow('A' + folderModel1.name);
|
||||
await contentServicesPage.checkContextActionIsVisible('Copy');
|
||||
await contentServicesPage.pressContextMenuActionNamed('Copy');
|
||||
await contentNodeSelector.checkDialogIsDisplayed();
|
||||
await expect(await contentNodeSelector.getDialogHeaderText()).toBe('Copy \'' + 'A' + folderModel1.name + '\' to...');
|
||||
await contentNodeSelector.checkSearchInputIsDisplayed();
|
||||
await expect(await contentNodeSelector.getSearchLabel()).toBe('Search');
|
||||
await contentNodeSelector.checkSelectedSiteIsDisplayed('My files');
|
||||
await contentNodeSelector.checkCancelButtonIsDisplayed();
|
||||
await contentNodeSelector.checkMoveCopyButtonIsDisplayed();
|
||||
await expect(await contentNodeSelector.getMoveCopyButtonText()).toBe('COPY');
|
||||
await expect(await contentNodeSelector.numberOfResultsDisplayed()).toBe(5);
|
||||
await infinitePaginationPage.clickLoadMoreButton();
|
||||
await expect(await contentNodeSelector.numberOfResultsDisplayed()).toBe(6);
|
||||
await infinitePaginationPage.checkLoadMoreButtonIsNotDisplayed();
|
||||
await contentNodeSelector.contentListPage().dataTablePage().selectRowByContent('F' + folderModel6.name);
|
||||
await contentNodeSelector.contentListPage().dataTablePage().checkRowByContentIsSelected('F' + folderModel6.name);
|
||||
await contentNodeSelector.clickCancelButton();
|
||||
await contentNodeSelector.checkDialogIsNotDisplayed();
|
||||
await contentServicesPage.checkContentIsDisplayed('A' + folderModel1.name);
|
||||
|
||||
await contentServicesPage.getDocumentList().rightClickOnRow('A' + folderModel1.name);
|
||||
await contentServicesPage.checkContextActionIsVisible('Copy');
|
||||
await contentServicesPage.pressContextMenuActionNamed('Copy');
|
||||
await contentNodeSelector.checkDialogIsDisplayed();
|
||||
await infinitePaginationPage.clickLoadMoreButton();
|
||||
await contentNodeSelector.contentListPage().dataTablePage().selectRowByContent('F' + folderModel6.name);
|
||||
await contentNodeSelector.contentListPage().dataTablePage().checkRowByContentIsSelected('F' + folderModel6.name);
|
||||
await contentNodeSelector.clickMoveCopyButton();
|
||||
await contentServicesPage.checkContentIsDisplayed('A' + folderModel1.name);
|
||||
await paginationPage.clickOnNextPage();
|
||||
await contentServicesPage.getDocumentList().waitForTableBody();
|
||||
await contentServicesPage.doubleClickRow('F' + folderModel6.name);
|
||||
await contentServicesPage.checkContentIsDisplayed('A' + folderModel1.name);
|
||||
|
||||
});
|
||||
|
||||
|
||||
@@ -38,7 +38,7 @@ describe('Document List Component', () => {
|
||||
let acsUser = null;
|
||||
let testFileNode, pdfBFileNode;
|
||||
|
||||
afterEach(async (done) => {
|
||||
afterEach(async () => {
|
||||
await this.alfrescoJsApi.login(browser.params.testConfig.adf.adminEmail, browser.params.testConfig.adf.adminPassword);
|
||||
if (uploadedFolder) {
|
||||
await uploadActions.deleteFileOrFolder(uploadedFolder.entry.id);
|
||||
@@ -56,32 +56,32 @@ describe('Document List Component', () => {
|
||||
await uploadActions.deleteFileOrFolder(pdfBFileNode.entry.id);
|
||||
pdfBFileNode = null;
|
||||
}
|
||||
done();
|
||||
|
||||
});
|
||||
|
||||
describe('Custom Column', () => {
|
||||
|
||||
let folderName;
|
||||
const pdfFileModel = new FileModel({
|
||||
'name': resources.Files.ADF_DOCUMENTS.PDF.file_name,
|
||||
'location': resources.Files.ADF_DOCUMENTS.PDF.file_location
|
||||
name: resources.Files.ADF_DOCUMENTS.PDF.file_name,
|
||||
location: resources.Files.ADF_DOCUMENTS.PDF.file_location
|
||||
});
|
||||
const docxFileModel = new FileModel({
|
||||
'name': resources.Files.ADF_DOCUMENTS.DOCX.file_name,
|
||||
'location': resources.Files.ADF_DOCUMENTS.DOCX.file_location
|
||||
name: resources.Files.ADF_DOCUMENTS.DOCX.file_name,
|
||||
location: resources.Files.ADF_DOCUMENTS.DOCX.file_location
|
||||
});
|
||||
const timeAgoFileModel = new FileModel({
|
||||
'name': resources.Files.ADF_DOCUMENTS.TEST.file_name,
|
||||
'location': resources.Files.ADF_DOCUMENTS.TEST.file_location
|
||||
name: resources.Files.ADF_DOCUMENTS.TEST.file_name,
|
||||
location: resources.Files.ADF_DOCUMENTS.TEST.file_location
|
||||
});
|
||||
const mediumFileModel = new FileModel({
|
||||
'name': resources.Files.ADF_DOCUMENTS.PDF_B.file_name,
|
||||
'location': resources.Files.ADF_DOCUMENTS.PDF_B.file_location
|
||||
name: resources.Files.ADF_DOCUMENTS.PDF_B.file_name,
|
||||
location: resources.Files.ADF_DOCUMENTS.PDF_B.file_location
|
||||
});
|
||||
|
||||
let pdfUploadedNode, docxUploadedNode, timeAgoUploadedNode, mediumDateUploadedNode;
|
||||
|
||||
beforeAll(async (done) => {
|
||||
beforeAll(async () => {
|
||||
|
||||
acsUser = new AcsUserModel();
|
||||
|
||||
@@ -96,10 +96,10 @@ describe('Document List Component', () => {
|
||||
uploadedFolder = await uploadActions.createFolder(folderName, '-my-');
|
||||
pdfUploadedNode = await uploadActions.uploadFile(pdfFileModel.location, pdfFileModel.name, '-my-');
|
||||
docxUploadedNode = await uploadActions.uploadFile(docxFileModel.location, docxFileModel.name, '-my-');
|
||||
done();
|
||||
|
||||
});
|
||||
|
||||
afterAll(async (done) => {
|
||||
afterAll(async () => {
|
||||
await this.alfrescoJsApi.login(browser.params.testConfig.adf.adminEmail, browser.params.testConfig.adf.adminPassword);
|
||||
|
||||
if (pdfUploadedNode) {
|
||||
@@ -114,71 +114,71 @@ describe('Document List Component', () => {
|
||||
if (mediumDateUploadedNode) {
|
||||
await uploadActions.deleteFileOrFolder(mediumDateUploadedNode.entry.id);
|
||||
}
|
||||
done();
|
||||
|
||||
});
|
||||
|
||||
beforeEach(async (done) => {
|
||||
beforeEach(async () => {
|
||||
await loginPage.loginToContentServicesUsingUserModel(acsUser);
|
||||
done();
|
||||
|
||||
});
|
||||
|
||||
it('[C279926] Should only display the user\'s files and folders', () => {
|
||||
contentServicesPage.goToDocumentList();
|
||||
contentServicesPage.checkContentIsDisplayed(folderName);
|
||||
contentServicesPage.checkContentIsDisplayed(pdfFileModel.name);
|
||||
contentServicesPage.checkContentIsDisplayed(docxFileModel.name);
|
||||
expect(contentServicesPage.getDocumentListRowNumber()).toBe(4);
|
||||
it('[C279926] Should only display the user\'s files and folders', async () => {
|
||||
await contentServicesPage.goToDocumentList();
|
||||
await contentServicesPage.checkContentIsDisplayed(folderName);
|
||||
await contentServicesPage.checkContentIsDisplayed(pdfFileModel.name);
|
||||
await contentServicesPage.checkContentIsDisplayed(docxFileModel.name);
|
||||
await expect(await contentServicesPage.getDocumentListRowNumber()).toBe(4);
|
||||
});
|
||||
|
||||
it('[C279927] Should display default columns', () => {
|
||||
contentServicesPage.goToDocumentList();
|
||||
contentServicesPage.checkColumnNameHeader();
|
||||
contentServicesPage.checkColumnSizeHeader();
|
||||
contentServicesPage.checkColumnCreatedByHeader();
|
||||
contentServicesPage.checkColumnCreatedHeader();
|
||||
it('[C279927] Should display default columns', async () => {
|
||||
await contentServicesPage.goToDocumentList();
|
||||
await contentServicesPage.checkColumnNameHeader();
|
||||
await contentServicesPage.checkColumnSizeHeader();
|
||||
await contentServicesPage.checkColumnCreatedByHeader();
|
||||
await contentServicesPage.checkColumnCreatedHeader();
|
||||
});
|
||||
|
||||
it('[C279928] Should be able to display date with timeAgo', async (done) => {
|
||||
it('[C279928] Should be able to display date with timeAgo', async () => {
|
||||
await this.alfrescoJsApi.login(acsUser.id, acsUser.password);
|
||||
timeAgoUploadedNode = await uploadActions.uploadFile(timeAgoFileModel.location, timeAgoFileModel.name, '-my-');
|
||||
contentServicesPage.goToDocumentList();
|
||||
const dateValue = contentServicesPage.getColumnValueForRow(timeAgoFileModel.name, 'Created');
|
||||
expect(dateValue).toMatch(/(ago|few)/);
|
||||
done();
|
||||
await contentServicesPage.goToDocumentList();
|
||||
const dateValue = await contentServicesPage.getColumnValueForRow(timeAgoFileModel.name, 'Created');
|
||||
await expect(dateValue).toMatch(/(ago|few)/);
|
||||
|
||||
});
|
||||
|
||||
it('[C279929] Should be able to display the date with date type', async (done) => {
|
||||
it('[C279929] Should be able to display the date with date type', async () => {
|
||||
await this.alfrescoJsApi.login(acsUser.id, acsUser.password);
|
||||
mediumDateUploadedNode = await uploadActions.uploadFile(mediumFileModel.location, mediumFileModel.name, '-my-');
|
||||
const createdDate = moment(mediumDateUploadedNode.createdAt).format('ll');
|
||||
contentServicesPage.goToDocumentList();
|
||||
contentServicesPage.enableMediumTimeFormat();
|
||||
const dateValue = contentServicesPage.getColumnValueForRow(mediumFileModel.name, 'Created');
|
||||
expect(dateValue).toContain(createdDate);
|
||||
done();
|
||||
await contentServicesPage.goToDocumentList();
|
||||
await contentServicesPage.enableMediumTimeFormat();
|
||||
const dateValue = await contentServicesPage.getColumnValueForRow(mediumFileModel.name, 'Created');
|
||||
await expect(dateValue).toContain(createdDate);
|
||||
|
||||
});
|
||||
});
|
||||
|
||||
describe('Column Sorting', () => {
|
||||
|
||||
const fakeFileA = new FileModel({
|
||||
'name': 'A',
|
||||
'location': resources.Files.ADF_DOCUMENTS.TEST.file_location
|
||||
name: 'A',
|
||||
location: resources.Files.ADF_DOCUMENTS.TEST.file_location
|
||||
});
|
||||
|
||||
const fakeFileB = new FileModel({
|
||||
'name': 'B',
|
||||
'location': resources.Files.ADF_DOCUMENTS.TEST.file_location
|
||||
name: 'B',
|
||||
location: resources.Files.ADF_DOCUMENTS.TEST.file_location
|
||||
});
|
||||
|
||||
const fakeFileC = new FileModel({
|
||||
'name': 'C',
|
||||
'location': resources.Files.ADF_DOCUMENTS.TEST.file_location
|
||||
name: 'C',
|
||||
location: resources.Files.ADF_DOCUMENTS.TEST.file_location
|
||||
});
|
||||
|
||||
let fileANode, fileBNode, fileCNode;
|
||||
|
||||
beforeAll(async (done) => {
|
||||
beforeAll(async () => {
|
||||
|
||||
const user = new AcsUserModel();
|
||||
|
||||
@@ -192,12 +192,11 @@ describe('Document List Component', () => {
|
||||
fileCNode = await uploadActions.uploadFile(fakeFileC.location, fakeFileC.name, '-my-');
|
||||
|
||||
await loginPage.loginToContentServicesUsingUserModel(user);
|
||||
contentServicesPage.goToDocumentList();
|
||||
await contentServicesPage.goToDocumentList();
|
||||
|
||||
done();
|
||||
});
|
||||
|
||||
afterAll(async (done) => {
|
||||
afterAll(async () => {
|
||||
await this.alfrescoJsApi.login(browser.params.testConfig.adf.adminEmail, browser.params.testConfig.adf.adminPassword);
|
||||
if (fileANode) {
|
||||
await uploadActions.deleteFileOrFolder(fileANode.entry.id);
|
||||
@@ -208,53 +207,53 @@ describe('Document List Component', () => {
|
||||
if (fileCNode) {
|
||||
await uploadActions.deleteFileOrFolder(fileCNode.entry.id);
|
||||
}
|
||||
done();
|
||||
|
||||
});
|
||||
|
||||
it('[C260112] Should be able to sort by name (Ascending)', () => {
|
||||
expect(contentServicesPage.sortAndCheckListIsOrderedByName('asc')).toBe(true, 'List is not sorted.');
|
||||
it('[C260112] Should be able to sort by name (Ascending)', async () => {
|
||||
await expect(await contentServicesPage.sortAndCheckListIsOrderedByName('asc')).toBe(true, 'List is not sorted.');
|
||||
});
|
||||
|
||||
it('[C272770] Should be able to sort by name (Descending)', () => {
|
||||
expect(contentServicesPage.sortAndCheckListIsOrderedByName('desc')).toBe(true, 'List is not sorted.');
|
||||
it('[C272770] Should be able to sort by name (Descending)', async () => {
|
||||
await expect(await contentServicesPage.sortAndCheckListIsOrderedByName('desc')).toBe(true, 'List is not sorted.');
|
||||
});
|
||||
|
||||
it('[C272771] Should be able to sort by author (Ascending)', () => {
|
||||
expect(contentServicesPage.sortAndCheckListIsOrderedByAuthor('asc')).toBe(true, 'List is not sorted.');
|
||||
it('[C272771] Should be able to sort by author (Ascending)', async () => {
|
||||
await expect(await contentServicesPage.sortAndCheckListIsOrderedByAuthor('asc')).toBe(true, 'List is not sorted.');
|
||||
});
|
||||
|
||||
it('[C272772] Should be able to sort by author (Descending)', () => {
|
||||
expect(contentServicesPage.sortAndCheckListIsOrderedByAuthor('desc')).toBe(true, 'List is not sorted.');
|
||||
it('[C272772] Should be able to sort by author (Descending)', async () => {
|
||||
await expect(await contentServicesPage.sortAndCheckListIsOrderedByAuthor('desc')).toBe(true, 'List is not sorted.');
|
||||
});
|
||||
|
||||
it('[C272773] Should be able to sort by date (Ascending)', () => {
|
||||
expect(contentServicesPage.sortAndCheckListIsOrderedByCreated('asc')).toBe(true, 'List is not sorted.');
|
||||
it('[C272773] Should be able to sort by date (Ascending)', async () => {
|
||||
await expect(await contentServicesPage.sortAndCheckListIsOrderedByCreated('asc')).toBe(true, 'List is not sorted.');
|
||||
});
|
||||
|
||||
it('[C272774] Should be able to sort by date (Descending)', () => {
|
||||
expect(contentServicesPage.sortAndCheckListIsOrderedByCreated('desc')).toBe(true, 'List is not sorted.');
|
||||
it('[C272774] Should be able to sort by date (Descending)', async () => {
|
||||
await expect(await contentServicesPage.sortAndCheckListIsOrderedByCreated('desc')).toBe(true, 'List is not sorted.');
|
||||
});
|
||||
});
|
||||
|
||||
it('[C279959] Should display empty folder state for new folders', async (done) => {
|
||||
it('[C279959] Should display empty folder state for new folders', async () => {
|
||||
acsUser = new AcsUserModel();
|
||||
|
||||
const folderName = 'BANANA';
|
||||
await this.alfrescoJsApi.login(browser.params.testConfig.adf.adminEmail, browser.params.testConfig.adf.adminPassword);
|
||||
await this.alfrescoJsApi.core.peopleApi.addPerson(acsUser);
|
||||
await loginPage.loginToContentServicesUsingUserModel(acsUser);
|
||||
contentServicesPage.goToDocumentList();
|
||||
contentServicesPage.createNewFolder(folderName);
|
||||
contentServicesPage.doubleClickRow(folderName);
|
||||
contentServicesPage.checkEmptyFolderTextToBe('This folder is empty');
|
||||
contentServicesPage.checkEmptyFolderImageUrlToContain('/assets/images/empty_doc_lib.svg');
|
||||
done();
|
||||
await contentServicesPage.goToDocumentList();
|
||||
await contentServicesPage.createNewFolder(folderName);
|
||||
await contentServicesPage.doubleClickRow(folderName);
|
||||
await contentServicesPage.checkEmptyFolderTextToBe('This folder is empty');
|
||||
await contentServicesPage.checkEmptyFolderImageUrlToContain('/assets/images/empty_doc_lib.svg');
|
||||
|
||||
});
|
||||
|
||||
it('[C272775] Should be able to upload a file in new folder', async (done) => {
|
||||
it('[C272775] Should be able to upload a file in new folder', async () => {
|
||||
const testFile = new FileModel({
|
||||
'name': resources.Files.ADF_DOCUMENTS.TEST.file_name,
|
||||
'location': resources.Files.ADF_DOCUMENTS.TEST.file_location
|
||||
name: resources.Files.ADF_DOCUMENTS.TEST.file_name,
|
||||
location: resources.Files.ADF_DOCUMENTS.TEST.file_location
|
||||
});
|
||||
acsUser = new AcsUserModel();
|
||||
/* cspell:disable-next-line */
|
||||
@@ -264,30 +263,30 @@ describe('Document List Component', () => {
|
||||
await this.alfrescoJsApi.login(acsUser.id, acsUser.password);
|
||||
uploadedFolder = await uploadActions.createFolder(folderName, '-my-');
|
||||
await loginPage.loginToContentServicesUsingUserModel(acsUser);
|
||||
contentServicesPage.goToDocumentList();
|
||||
contentServicesPage.checkContentIsDisplayed(uploadedFolder.entry.name);
|
||||
contentServicesPage.doubleClickRow(uploadedFolder.entry.name);
|
||||
contentServicesPage.uploadFile(testFile.location);
|
||||
contentServicesPage.checkContentIsDisplayed(testFile.name);
|
||||
done();
|
||||
await contentServicesPage.goToDocumentList();
|
||||
await contentServicesPage.checkContentIsDisplayed(uploadedFolder.entry.name);
|
||||
await contentServicesPage.doubleClickRow(uploadedFolder.entry.name);
|
||||
await contentServicesPage.uploadFile(testFile.location);
|
||||
await contentServicesPage.checkContentIsDisplayed(testFile.name);
|
||||
|
||||
});
|
||||
|
||||
it('[C261997] Should be able to clean Recent Files history', async (done) => {
|
||||
it('[C261997] Should be able to clean Recent Files history', async () => {
|
||||
acsUser = new AcsUserModel();
|
||||
await this.alfrescoJsApi.login(browser.params.testConfig.adf.adminEmail, browser.params.testConfig.adf.adminPassword);
|
||||
await this.alfrescoJsApi.core.peopleApi.addPerson(acsUser);
|
||||
await loginPage.loginToContentServicesUsingUserModel(acsUser);
|
||||
contentServicesPage.clickOnContentServices();
|
||||
contentServicesPage.checkRecentFileToBeShowed();
|
||||
await contentServicesPage.clickOnContentServices();
|
||||
await contentServicesPage.checkRecentFileToBeShowed();
|
||||
const icon = await contentServicesPage.getRecentFileIcon();
|
||||
expect(icon).toBe('history');
|
||||
contentServicesPage.expandRecentFiles();
|
||||
contentServicesPage.checkEmptyRecentFileIsDisplayed();
|
||||
contentServicesPage.closeRecentFiles();
|
||||
done();
|
||||
await expect(icon).toBe('history');
|
||||
await contentServicesPage.expandRecentFiles();
|
||||
await contentServicesPage.checkEmptyRecentFileIsDisplayed();
|
||||
await contentServicesPage.closeRecentFiles();
|
||||
|
||||
});
|
||||
|
||||
it('[C279970] Should display Islocked field for folders', async (done) => {
|
||||
it('[C279970] Should display Islocked field for folders', async () => {
|
||||
acsUser = new AcsUserModel();
|
||||
const folderNameA = `MEESEEKS_${StringUtil.generateRandomString(5)}_LOOK_AT_ME`;
|
||||
const folderNameB = `MEESEEKS_${StringUtil.generateRandomString(5)}_LOOK_AT_ME`;
|
||||
@@ -297,22 +296,22 @@ describe('Document List Component', () => {
|
||||
uploadedFolder = await uploadActions.createFolder(folderNameA, '-my-');
|
||||
uploadedFolderExtra = await uploadActions.createFolder(folderNameB, '-my-');
|
||||
await loginPage.loginToContentServicesUsingUserModel(acsUser);
|
||||
contentServicesPage.goToDocumentList();
|
||||
contentServicesPage.checkContentIsDisplayed(folderNameA);
|
||||
contentServicesPage.checkContentIsDisplayed(folderNameB);
|
||||
contentServicesPage.checkLockIsDisplayedForElement(folderNameA);
|
||||
contentServicesPage.checkLockIsDisplayedForElement(folderNameB);
|
||||
done();
|
||||
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 (done) => {
|
||||
it('[C269086] Should display Islocked field for files', async () => {
|
||||
const testFileA = new FileModel({
|
||||
'name': resources.Files.ADF_DOCUMENTS.TEST.file_name,
|
||||
'location': resources.Files.ADF_DOCUMENTS.TEST.file_location
|
||||
name: resources.Files.ADF_DOCUMENTS.TEST.file_name,
|
||||
location: resources.Files.ADF_DOCUMENTS.TEST.file_location
|
||||
});
|
||||
const testFileB = new FileModel({
|
||||
'name': resources.Files.ADF_DOCUMENTS.PDF_B.file_name,
|
||||
'location': resources.Files.ADF_DOCUMENTS.PDF_B.file_location
|
||||
name: resources.Files.ADF_DOCUMENTS.PDF_B.file_name,
|
||||
location: resources.Files.ADF_DOCUMENTS.PDF_B.file_location
|
||||
});
|
||||
acsUser = new AcsUserModel();
|
||||
await this.alfrescoJsApi.login(browser.params.testConfig.adf.adminEmail, browser.params.testConfig.adf.adminPassword);
|
||||
@@ -321,19 +320,19 @@ describe('Document List Component', () => {
|
||||
testFileNode = await uploadActions.uploadFile(testFileA.location, testFileA.name, '-my-');
|
||||
pdfBFileNode = await uploadActions.uploadFile(testFileB.location, testFileB.name, '-my-');
|
||||
await loginPage.loginToContentServicesUsingUserModel(acsUser);
|
||||
contentServicesPage.goToDocumentList();
|
||||
contentServicesPage.checkContentIsDisplayed(testFileA.name);
|
||||
contentServicesPage.checkContentIsDisplayed(testFileB.name);
|
||||
contentServicesPage.checkLockIsDisplayedForElement(testFileA.name);
|
||||
contentServicesPage.checkLockIsDisplayedForElement(testFileB.name);
|
||||
done();
|
||||
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', () => {
|
||||
|
||||
let folderCreated;
|
||||
|
||||
beforeAll(async (done) => {
|
||||
beforeAll(async () => {
|
||||
acsUser = new AcsUserModel();
|
||||
folderCreated = [];
|
||||
await this.alfrescoJsApi.login(browser.params.testConfig.adf.adminEmail, browser.params.testConfig.adf.adminPassword);
|
||||
@@ -346,22 +345,19 @@ describe('Document List Component', () => {
|
||||
folder = await uploadActions.createFolder(folderName, '-my-');
|
||||
folderCreated.push(folder);
|
||||
}
|
||||
done();
|
||||
});
|
||||
|
||||
afterAll(async (done) => {
|
||||
Promise.all(folderCreated.map((folder) =>
|
||||
uploadActions.deleteFileOrFolder(folder.entry.id)
|
||||
)).then(() => {
|
||||
done();
|
||||
});
|
||||
afterAll(async () => {
|
||||
for (let i = 0; i <= folderCreated.length; i++) {
|
||||
await uploadActions.deleteFileOrFolder(folderCreated[i].entry.id);
|
||||
}
|
||||
});
|
||||
|
||||
it('[C277093] Should sort files with Items per page set to default', async (done) => {
|
||||
it('[C277093] Should sort files with Items per page set to default', async () => {
|
||||
await loginPage.loginToContentServicesUsingUserModel(acsUser);
|
||||
contentServicesPage.goToDocumentList();
|
||||
contentServicesPage.checkListIsSortedByNameColumn('asc');
|
||||
done();
|
||||
await contentServicesPage.goToDocumentList();
|
||||
await contentServicesPage.checkListIsSortedByNameColumn('asc');
|
||||
|
||||
});
|
||||
|
||||
});
|
||||
@@ -369,14 +365,14 @@ describe('Document List Component', () => {
|
||||
describe('Column Template', () => {
|
||||
|
||||
const file0BytesModel = new FileModel({
|
||||
'name': resources.Files.ADF_DOCUMENTS.TXT_0B.file_name,
|
||||
'location': resources.Files.ADF_DOCUMENTS.TXT_0B.file_location
|
||||
name: resources.Files.ADF_DOCUMENTS.TXT_0B.file_name,
|
||||
location: resources.Files.ADF_DOCUMENTS.TXT_0B.file_location
|
||||
});
|
||||
|
||||
let file;
|
||||
const viewer = new ViewerPage();
|
||||
|
||||
beforeAll(async (done) => {
|
||||
beforeAll(async () => {
|
||||
acsUser = new AcsUserModel();
|
||||
await this.alfrescoJsApi.login(browser.params.testConfig.adf.adminEmail, browser.params.testConfig.adf.adminPassword);
|
||||
await this.alfrescoJsApi.core.peopleApi.addPerson(acsUser);
|
||||
@@ -384,16 +380,16 @@ describe('Document List Component', () => {
|
||||
file = await uploadActions.uploadFile(file0BytesModel.location, file0BytesModel.name, '-my-');
|
||||
|
||||
await loginPage.loginToContentServicesUsingUserModel(acsUser);
|
||||
contentServicesPage.goToDocumentList()
|
||||
.waitForTableBody();
|
||||
done();
|
||||
await contentServicesPage.goToDocumentList();
|
||||
await contentServicesPage.waitForTableBody();
|
||||
|
||||
});
|
||||
|
||||
it('[C291843] Should be able to navigate using nodes hyperlink when activated', () => {
|
||||
contentServicesPage.clickHyperlinkNavigationToggle()
|
||||
.checkFileHyperlinkIsEnabled(file.entry.name)
|
||||
.clickFileHyperlink(file.entry.name);
|
||||
viewer.checkFileIsLoaded();
|
||||
it('[C291843] Should be able to navigate using nodes hyperlink when activated', async () => {
|
||||
await contentServicesPage.clickHyperlinkNavigationToggle();
|
||||
await contentServicesPage.checkFileHyperlinkIsEnabled(file.entry.name);
|
||||
await contentServicesPage.clickFileHyperlink(file.entry.name);
|
||||
await viewer.checkFileIsLoaded();
|
||||
});
|
||||
});
|
||||
});
|
||||
|
||||
@@ -50,16 +50,16 @@ describe('Document List Component', () => {
|
||||
let folderName, sameNameFolder;
|
||||
|
||||
const pdfFileModel = new FileModel({
|
||||
'name': resources.Files.ADF_DOCUMENTS.PDF.file_name,
|
||||
'location': resources.Files.ADF_DOCUMENTS.PDF.file_location
|
||||
name: resources.Files.ADF_DOCUMENTS.PDF.file_name,
|
||||
location: resources.Files.ADF_DOCUMENTS.PDF.file_location
|
||||
});
|
||||
|
||||
const testFileModel = new FileModel({
|
||||
'name': resources.Files.ADF_DOCUMENTS.TEST.file_name,
|
||||
'location': resources.Files.ADF_DOCUMENTS.TEST.file_location
|
||||
name: resources.Files.ADF_DOCUMENTS.TEST.file_name,
|
||||
location: resources.Files.ADF_DOCUMENTS.TEST.file_location
|
||||
});
|
||||
|
||||
beforeAll(async (done) => {
|
||||
beforeAll(async () => {
|
||||
acsUser = new AcsUserModel();
|
||||
anotherAcsUser = new AcsUserModel();
|
||||
folderName = StringUtil.generateRandomString(5);
|
||||
@@ -90,131 +90,129 @@ describe('Document List Component', () => {
|
||||
}
|
||||
});
|
||||
|
||||
browser.driver.sleep(12000);
|
||||
done();
|
||||
await browser.driver.sleep(12000);
|
||||
|
||||
});
|
||||
|
||||
afterAll(async (done) => {
|
||||
afterAll(async () => {
|
||||
await navigationBarPage.clickLogoutButton();
|
||||
|
||||
try {
|
||||
await this.alfrescoJsApi.login(browser.params.testConfig.adf.adminEmail, browser.params.testConfig.adf.adminPassword);
|
||||
await uploadActions.deleteFileOrFolder(uploadedFolder.entry.id);
|
||||
await uploadActions.deleteFileOrFolder(uploadedFile.entry.id);
|
||||
await uploadActions.deleteFileOrFolder(sourceFolder.entry.id);
|
||||
await uploadActions.deleteFileOrFolder(destinationFolder.entry.id);
|
||||
} catch (error) {
|
||||
// tslint:disable-next-line:no-console
|
||||
console.log('Error delete file or folder' + error);
|
||||
}
|
||||
done();
|
||||
await this.alfrescoJsApi.login(browser.params.testConfig.adf.adminEmail, browser.params.testConfig.adf.adminPassword);
|
||||
await uploadActions.deleteFileOrFolder(uploadedFolder.entry.id);
|
||||
await uploadActions.deleteFileOrFolder(uploadedFile.entry.id);
|
||||
await uploadActions.deleteFileOrFolder(sourceFolder.entry.id);
|
||||
await uploadActions.deleteFileOrFolder(destinationFolder.entry.id);
|
||||
|
||||
});
|
||||
|
||||
describe('Document List Component - Actions Move and Copy', () => {
|
||||
|
||||
beforeEach(async (done) => {
|
||||
beforeAll(async () => {
|
||||
await loginPage.loginToContentServicesUsingUserModel(acsUser);
|
||||
navigationBarPage.clickContentServicesButton();
|
||||
done();
|
||||
});
|
||||
|
||||
it('[C260128] Move - Same name file', () => {
|
||||
contentServicesPage.checkContentIsDisplayed(pdfFileModel.name);
|
||||
contentServicesPage.getDocumentList().rightClickOnRow(pdfFileModel.name);
|
||||
contentServicesPage.pressContextMenuActionNamed('Move');
|
||||
contentNodeSelector.checkDialogIsDisplayed();
|
||||
contentNodeSelector.typeIntoNodeSelectorSearchField(folderName);
|
||||
contentNodeSelector.clickContentNodeSelectorResult(folderName);
|
||||
contentNodeSelector.clickMoveCopyButton();
|
||||
notificationHistoryPage.checkNotifyContains('This name is already in use, try a different name.');
|
||||
beforeEach(async () => {
|
||||
await BrowserActions.closeMenuAndDialogs();
|
||||
await navigationBarPage.clickContentServicesButton();
|
||||
|
||||
});
|
||||
|
||||
it('[C260134] Move - folder with subfolder and file within it', () => {
|
||||
contentServicesPage.checkContentIsDisplayed(destinationFolder.entry.name);
|
||||
contentServicesPage.checkContentIsDisplayed(sourceFolder.entry.name);
|
||||
contentServicesPage.getDocumentList().rightClickOnRow(sourceFolder.entry.name);
|
||||
contentServicesPage.pressContextMenuActionNamed('Move');
|
||||
contentNodeSelector.checkDialogIsDisplayed();
|
||||
contentNodeSelector.typeIntoNodeSelectorSearchField(destinationFolder.entry.name);
|
||||
contentNodeSelector.clickContentNodeSelectorResult(destinationFolder.entry.name);
|
||||
contentNodeSelector.clickMoveCopyButton();
|
||||
contentServicesPage.checkContentIsNotDisplayed(sourceFolder.entry.name);
|
||||
contentServicesPage.doubleClickRow(destinationFolder.entry.name);
|
||||
contentServicesPage.checkContentIsDisplayed(sourceFolder.entry.name);
|
||||
contentServicesPage.doubleClickRow(sourceFolder.entry.name);
|
||||
contentServicesPage.checkContentIsDisplayed(subFolder.entry.name);
|
||||
contentServicesPage.doubleClickRow(subFolder.entry.name);
|
||||
contentServicesPage.checkContentIsDisplayed(subFile.entry.name);
|
||||
it('[C260128] Move - Same name file', async () => {
|
||||
await contentServicesPage.checkContentIsDisplayed(pdfFileModel.name);
|
||||
await contentServicesPage.getDocumentList().rightClickOnRow(pdfFileModel.name);
|
||||
await contentServicesPage.pressContextMenuActionNamed('Move');
|
||||
await contentNodeSelector.checkDialogIsDisplayed();
|
||||
await contentNodeSelector.typeIntoNodeSelectorSearchField(folderName);
|
||||
await contentNodeSelector.clickContentNodeSelectorResult(folderName);
|
||||
await contentNodeSelector.clickMoveCopyButton();
|
||||
await notificationHistoryPage.checkNotifyContains('This name is already in use, try a different name.');
|
||||
});
|
||||
|
||||
it('[C260135] Move - Same name folder', () => {
|
||||
contentServicesPage.checkContentIsDisplayed(duplicateFolderName.entry.name);
|
||||
contentServicesPage.getDocumentList().rightClickOnRow(duplicateFolderName.entry.name);
|
||||
contentServicesPage.pressContextMenuActionNamed('Move');
|
||||
contentNodeSelector.checkDialogIsDisplayed();
|
||||
contentNodeSelector.typeIntoNodeSelectorSearchField(sourceFolder.entry.name);
|
||||
contentNodeSelector.clickContentNodeSelectorResult(sourceFolder.entry.name);
|
||||
contentNodeSelector.clickMoveCopyButton();
|
||||
notificationHistoryPage.checkNotifyContains('This name is already in use, try a different name.');
|
||||
it('[C260134] Move - folder with subfolder and file within it', async () => {
|
||||
await contentServicesPage.checkContentIsDisplayed(destinationFolder.entry.name);
|
||||
await contentServicesPage.checkContentIsDisplayed(sourceFolder.entry.name);
|
||||
await contentServicesPage.getDocumentList().rightClickOnRow(sourceFolder.entry.name);
|
||||
await contentServicesPage.pressContextMenuActionNamed('Move');
|
||||
await contentNodeSelector.checkDialogIsDisplayed();
|
||||
await contentNodeSelector.typeIntoNodeSelectorSearchField(destinationFolder.entry.name);
|
||||
await contentNodeSelector.clickContentNodeSelectorResult(destinationFolder.entry.name);
|
||||
await contentNodeSelector.clickMoveCopyButton();
|
||||
await contentServicesPage.checkContentIsNotDisplayed(sourceFolder.entry.name);
|
||||
await contentServicesPage.doubleClickRow(destinationFolder.entry.name);
|
||||
await contentServicesPage.checkContentIsDisplayed(sourceFolder.entry.name);
|
||||
await contentServicesPage.doubleClickRow(sourceFolder.entry.name);
|
||||
await contentServicesPage.checkContentIsDisplayed(subFolder.entry.name);
|
||||
await contentServicesPage.doubleClickRow(subFolder.entry.name);
|
||||
await contentServicesPage.checkContentIsDisplayed(subFile.entry.name);
|
||||
});
|
||||
|
||||
it('[C260129] Copy - Same name file', () => {
|
||||
contentServicesPage.checkContentIsDisplayed(pdfFileModel.name);
|
||||
contentServicesPage.getDocumentList().rightClickOnRow(pdfFileModel.name);
|
||||
contentServicesPage.pressContextMenuActionNamed('Copy');
|
||||
contentNodeSelector.checkDialogIsDisplayed();
|
||||
contentNodeSelector.typeIntoNodeSelectorSearchField(folderName);
|
||||
contentNodeSelector.clickContentNodeSelectorResult(folderName);
|
||||
contentNodeSelector.clickMoveCopyButton();
|
||||
notificationHistoryPage.checkNotifyContains('This name is already in use, try a different name.');
|
||||
it('[C260135] Move - Same name folder', async () => {
|
||||
await contentServicesPage.checkContentIsDisplayed(duplicateFolderName.entry.name);
|
||||
await contentServicesPage.getDocumentList().rightClickOnRow(duplicateFolderName.entry.name);
|
||||
await contentServicesPage.pressContextMenuActionNamed('Move');
|
||||
await contentNodeSelector.checkDialogIsDisplayed();
|
||||
await contentNodeSelector.typeIntoNodeSelectorSearchField(sourceFolder.entry.name);
|
||||
await contentNodeSelector.clickContentNodeSelectorResult(sourceFolder.entry.name);
|
||||
await contentNodeSelector.clickMoveCopyButton();
|
||||
await notificationHistoryPage.checkNotifyContains('This name is already in use, try a different name.');
|
||||
});
|
||||
|
||||
it('[C260136] Copy - Same name folder', () => {
|
||||
contentServicesPage.checkContentIsDisplayed(duplicateFolderName.entry.name);
|
||||
contentServicesPage.getDocumentList().rightClickOnRow(duplicateFolderName.entry.name);
|
||||
contentServicesPage.pressContextMenuActionNamed('Copy');
|
||||
contentNodeSelector.checkDialogIsDisplayed();
|
||||
contentNodeSelector.typeIntoNodeSelectorSearchField(sourceFolder.entry.name);
|
||||
contentNodeSelector.clickContentNodeSelectorResult(sourceFolder.entry.name);
|
||||
contentNodeSelector.clickMoveCopyButton();
|
||||
notificationHistoryPage.checkNotifyContains('This name is already in use, try a different name.');
|
||||
it('[C260129] Copy - Same name file', async () => {
|
||||
await contentServicesPage.checkContentIsDisplayed(pdfFileModel.name);
|
||||
await contentServicesPage.getDocumentList().rightClickOnRow(pdfFileModel.name);
|
||||
await contentServicesPage.pressContextMenuActionNamed('Copy');
|
||||
await contentNodeSelector.checkDialogIsDisplayed();
|
||||
await contentNodeSelector.typeIntoNodeSelectorSearchField(folderName);
|
||||
await contentNodeSelector.clickContentNodeSelectorResult(folderName);
|
||||
await contentNodeSelector.clickMoveCopyButton();
|
||||
await notificationHistoryPage.checkNotifyContains('This name is already in use, try a different name.');
|
||||
});
|
||||
|
||||
it('[C260136] Copy - Same name folder', async () => {
|
||||
await contentServicesPage.checkContentIsDisplayed(duplicateFolderName.entry.name);
|
||||
await contentServicesPage.getDocumentList().rightClickOnRow(duplicateFolderName.entry.name);
|
||||
await contentServicesPage.pressContextMenuActionNamed('Copy');
|
||||
await contentNodeSelector.checkDialogIsDisplayed();
|
||||
await contentNodeSelector.typeIntoNodeSelectorSearchField(sourceFolder.entry.name);
|
||||
await contentNodeSelector.clickContentNodeSelectorResult(sourceFolder.entry.name);
|
||||
await contentNodeSelector.clickMoveCopyButton();
|
||||
await notificationHistoryPage.checkNotifyContains('This name is already in use, try a different name.');
|
||||
});
|
||||
|
||||
});
|
||||
|
||||
describe('Document List actionns - Move, Copy on no permission folder', () => {
|
||||
|
||||
beforeAll((done) => {
|
||||
loginPage.loginToContentServicesUsingUserModel(anotherAcsUser);
|
||||
BrowserActions.getUrl(browser.params.testConfig.adf.url + '/files/' + sourceFolder.entry.id);
|
||||
contentServicesPage.getDocumentList().dataTablePage().waitTillContentLoaded();
|
||||
done();
|
||||
beforeAll(async () => {
|
||||
await loginPage.loginToContentServicesUsingUserModel(anotherAcsUser);
|
||||
await BrowserActions.getUrl(`${browser.params.testConfig.adf.url}/files/${sourceFolder.entry.id}`);
|
||||
await contentServicesPage.getDocumentList().dataTablePage().waitTillContentLoaded();
|
||||
});
|
||||
|
||||
it('[C260133] Move - no permission folder', () => {
|
||||
contentServicesPage.checkContentIsDisplayed(subFolder.entry.name);
|
||||
contentServicesPage.getDocumentList().rightClickOnRow(subFolder.entry.name);
|
||||
contentServicesPage.checkContextActionIsVisible('Move');
|
||||
expect(contentServicesPage.checkContentActionIsEnabled('Move')).toBe(false);
|
||||
contentServicesPage.closeActionContext();
|
||||
it('[C260133] Move - no permission folder', async () => {
|
||||
await contentServicesPage.checkContentIsDisplayed(subFolder.entry.name);
|
||||
await contentServicesPage.getDocumentList().rightClickOnRow(subFolder.entry.name);
|
||||
await contentServicesPage.checkContextActionIsVisible('Move');
|
||||
await expect(await contentServicesPage.isContextActionEnabled('Move')).toBe(false);
|
||||
await contentServicesPage.closeActionContext();
|
||||
});
|
||||
|
||||
it('[C260140] Copy - No permission folder', () => {
|
||||
contentServicesPage.checkContentIsDisplayed(subFolder.entry.name);
|
||||
contentServicesPage.checkContentIsDisplayed(copyFolder.entry.name);
|
||||
contentServicesPage.getDocumentList().rightClickOnRow(copyFolder.entry.name);
|
||||
contentServicesPage.checkContextActionIsVisible('Copy');
|
||||
expect(contentServicesPage.checkContentActionIsEnabled('Copy')).toBe(true);
|
||||
contentServicesPage.pressContextMenuActionNamed('Copy');
|
||||
contentNodeSelector.checkDialogIsDisplayed();
|
||||
contentNodeSelector.contentListPage().dataTablePage().checkRowContentIsDisplayed(subFolder.entry.name);
|
||||
contentNodeSelector.contentListPage().dataTablePage().checkRowContentIsDisabled(subFolder.entry.name);
|
||||
contentNodeSelector.clickContentNodeSelectorResult(subFolder.entry.name);
|
||||
contentNodeSelector.contentListPage().dataTablePage().checkRowByContentIsSelected(subFolder.entry.name);
|
||||
expect(contentNodeSelector.checkCopyMoveButtonIsEnabled()).toBe(false);
|
||||
contentNodeSelector.contentListPage().dataTablePage().doubleClickRowByContent(subFolder.entry.name);
|
||||
contentNodeSelector.contentListPage().dataTablePage().waitTillContentLoaded();
|
||||
contentNodeSelector.contentListPage().dataTablePage().checkRowContentIsDisplayed(subFolder2.entry.name);
|
||||
it('[C260140] Copy - No permission folder', async () => {
|
||||
await contentServicesPage.checkContentIsDisplayed(subFolder.entry.name);
|
||||
await contentServicesPage.checkContentIsDisplayed(copyFolder.entry.name);
|
||||
await contentServicesPage.getDocumentList().rightClickOnRow(copyFolder.entry.name);
|
||||
await contentServicesPage.checkContextActionIsVisible('Copy');
|
||||
await expect(await contentServicesPage.isContextActionEnabled('Copy')).toBe(true);
|
||||
await contentServicesPage.pressContextMenuActionNamed('Copy');
|
||||
await contentNodeSelector.checkDialogIsDisplayed();
|
||||
await contentNodeSelector.contentListPage().dataTablePage().checkRowContentIsDisplayed(subFolder.entry.name);
|
||||
await contentNodeSelector.contentListPage().dataTablePage().checkRowContentIsDisabled(subFolder.entry.name);
|
||||
await contentNodeSelector.clickContentNodeSelectorResult(subFolder.entry.name);
|
||||
await contentNodeSelector.contentListPage().dataTablePage().checkRowByContentIsSelected(subFolder.entry.name);
|
||||
await expect(await contentNodeSelector.checkCopyMoveButtonIsEnabled()).toBe(false);
|
||||
await contentNodeSelector.contentListPage().dataTablePage().doubleClickRowByContent(subFolder.entry.name);
|
||||
await contentNodeSelector.contentListPage().dataTablePage().waitTillContentLoaded();
|
||||
await contentNodeSelector.contentListPage().dataTablePage().checkRowContentIsDisplayed(subFolder2.entry.name);
|
||||
});
|
||||
|
||||
});
|
||||
|
||||
@@ -34,7 +34,6 @@ describe('Document List Component', () => {
|
||||
});
|
||||
const uploadActions = new UploadActions(this.alfrescoJsApi);
|
||||
let acsUser = null;
|
||||
const navBar = new NavigationBarPage();
|
||||
const navigationBarPage = new NavigationBarPage();
|
||||
|
||||
describe('Gallery View', () => {
|
||||
@@ -50,23 +49,23 @@ describe('Document List Component', () => {
|
||||
let funnyUser;
|
||||
|
||||
const pdfFile = new FileModel({
|
||||
'name': resources.Files.ADF_DOCUMENTS.PDF.file_name,
|
||||
'location': resources.Files.ADF_DOCUMENTS.PDF.file_location
|
||||
name: resources.Files.ADF_DOCUMENTS.PDF.file_name,
|
||||
location: resources.Files.ADF_DOCUMENTS.PDF.file_location
|
||||
});
|
||||
|
||||
const testFile = new FileModel({
|
||||
'name': resources.Files.ADF_DOCUMENTS.TEST.file_name,
|
||||
'location': resources.Files.ADF_DOCUMENTS.TEST.file_location
|
||||
name: resources.Files.ADF_DOCUMENTS.TEST.file_name,
|
||||
location: resources.Files.ADF_DOCUMENTS.TEST.file_location
|
||||
});
|
||||
|
||||
const docxFile = new FileModel({
|
||||
'name': resources.Files.ADF_DOCUMENTS.DOCX.file_name,
|
||||
'location': resources.Files.ADF_DOCUMENTS.DOCX.file_location
|
||||
name: resources.Files.ADF_DOCUMENTS.DOCX.file_name,
|
||||
location: resources.Files.ADF_DOCUMENTS.DOCX.file_location
|
||||
});
|
||||
const folderName = `MEESEEKS_${StringUtil.generateRandomString(5)}_LOOK_AT_ME`;
|
||||
let filePdfNode, fileTestNode, fileDocxNode, folderNode, filePDFSubNode;
|
||||
|
||||
beforeAll(async (done) => {
|
||||
beforeAll(async () => {
|
||||
acsUser = new AcsUserModel();
|
||||
await this.alfrescoJsApi.login(browser.params.testConfig.adf.adminEmail, browser.params.testConfig.adf.adminPassword);
|
||||
funnyUser = await this.alfrescoJsApi.core.peopleApi.addPerson(acsUser);
|
||||
@@ -79,7 +78,6 @@ describe('Document List Component', () => {
|
||||
|
||||
await loginPage.loginToContentServicesUsingUserModel(acsUser);
|
||||
|
||||
done();
|
||||
});
|
||||
|
||||
afterAll(async () => {
|
||||
@@ -87,92 +85,94 @@ describe('Document List Component', () => {
|
||||
});
|
||||
|
||||
beforeEach(async () => {
|
||||
navBar.clickHomeButton();
|
||||
contentServicesPage.goToDocumentList();
|
||||
contentServicesPage.clickGridViewButton();
|
||||
contentServicesPage.checkCardViewContainerIsDisplayed();
|
||||
await navigationBarPage.clickHomeButton();
|
||||
await contentServicesPage.goToDocumentList();
|
||||
await contentServicesPage.clickGridViewButton();
|
||||
await contentServicesPage.checkCardViewContainerIsDisplayed();
|
||||
});
|
||||
|
||||
it('[C280016] Should be able to choose Gallery View', () => {
|
||||
expect(contentServicesPage.getCardElementShowedInPage()).toBe(4);
|
||||
it('[C280016] Should be able to choose Gallery View', async () => {
|
||||
await expect(await contentServicesPage.getCardElementShowedInPage()).toBe(4);
|
||||
});
|
||||
|
||||
it('[C280023] Gallery Card should show details', () => {
|
||||
expect(contentServicesPage.getDocumentCardIconForElement(folderName)).toContain('/assets/images/ft_ic_folder.svg');
|
||||
expect(contentServicesPage.getDocumentCardIconForElement(pdfFile.name)).toContain('/assets/images/ft_ic_pdf.svg');
|
||||
expect(contentServicesPage.getDocumentCardIconForElement(docxFile.name)).toContain('/assets/images/ft_ic_ms_word.svg');
|
||||
expect(contentServicesPage.getDocumentCardIconForElement(testFile.name)).toContain('/assets/images/ft_ic_document.svg');
|
||||
contentServicesPage.checkMenuIsShowedForElementIndex(0);
|
||||
contentServicesPage.checkMenuIsShowedForElementIndex(1);
|
||||
contentServicesPage.checkMenuIsShowedForElementIndex(2);
|
||||
contentServicesPage.checkMenuIsShowedForElementIndex(3);
|
||||
it('[C280023] Gallery Card should show details', async () => {
|
||||
await expect(await contentServicesPage.getDocumentCardIconForElement(folderName)).toContain('/assets/images/ft_ic_folder.svg');
|
||||
await expect(await contentServicesPage.getDocumentCardIconForElement(pdfFile.name)).toContain('/assets/images/ft_ic_pdf.svg');
|
||||
await expect(await contentServicesPage.getDocumentCardIconForElement(docxFile.name)).toContain('/assets/images/ft_ic_ms_word.svg');
|
||||
await expect(await contentServicesPage.getDocumentCardIconForElement(testFile.name)).toContain('/assets/images/ft_ic_document.svg');
|
||||
await contentServicesPage.checkMenuIsShowedForElementIndex(0);
|
||||
await contentServicesPage.checkMenuIsShowedForElementIndex(1);
|
||||
await contentServicesPage.checkMenuIsShowedForElementIndex(2);
|
||||
await contentServicesPage.checkMenuIsShowedForElementIndex(3);
|
||||
});
|
||||
|
||||
it('[C280069] Gallery Card should show attributes', () => {
|
||||
contentServicesPage.checkDocumentCardPropertyIsShowed(folderName, cardProperties.DISPLAY_NAME);
|
||||
contentServicesPage.checkDocumentCardPropertyIsShowed(folderName, cardProperties.SIZE);
|
||||
contentServicesPage.checkDocumentCardPropertyIsShowed(folderName, cardProperties.CREATED_BY);
|
||||
contentServicesPage.checkDocumentCardPropertyIsShowed(folderName, cardProperties.CREATED);
|
||||
it('[C280069] Gallery Card should show attributes', async () => {
|
||||
await contentServicesPage.checkDocumentCardPropertyIsShowed(folderName, cardProperties.DISPLAY_NAME);
|
||||
await contentServicesPage.checkDocumentCardPropertyIsShowed(folderName, cardProperties.SIZE);
|
||||
await contentServicesPage.checkDocumentCardPropertyIsShowed(folderName, cardProperties.CREATED_BY);
|
||||
await contentServicesPage.checkDocumentCardPropertyIsShowed(folderName, cardProperties.CREATED);
|
||||
|
||||
expect(contentServicesPage.getAttributeValueForElement(folderName, cardProperties.DISPLAY_NAME)).toBe(folderName);
|
||||
expect(contentServicesPage.getAttributeValueForElement(folderName, cardProperties.CREATED_BY)).toBe(`${funnyUser.entry.firstName} ${funnyUser.entry.lastName}`);
|
||||
await expect(await contentServicesPage.getAttributeValueForElement(folderName, cardProperties.DISPLAY_NAME)).toBe(folderName);
|
||||
await expect(await contentServicesPage.getAttributeValueForElement(folderName, cardProperties.CREATED_BY)).toBe(`${funnyUser.entry.firstName} ${funnyUser.entry.lastName}`);
|
||||
|
||||
expect(contentServicesPage.getAttributeValueForElement(folderName, cardProperties.CREATED)).toMatch(/(ago|few)/);
|
||||
await expect(await contentServicesPage.getAttributeValueForElement(folderName, cardProperties.CREATED)).toMatch(/(ago|few)/);
|
||||
|
||||
expect(contentServicesPage.getAttributeValueForElement(pdfFile.name, cardProperties.DISPLAY_NAME)).toBe(pdfFile.name);
|
||||
expect(contentServicesPage.getAttributeValueForElement(pdfFile.name, cardProperties.SIZE)).toBe(`105.02 KB`);
|
||||
expect(contentServicesPage.getAttributeValueForElement(pdfFile.name, cardProperties.CREATED_BY)).toBe(`${funnyUser.entry.firstName} ${funnyUser.entry.lastName}`);
|
||||
await expect(await contentServicesPage.getAttributeValueForElement(pdfFile.name, cardProperties.DISPLAY_NAME)).toBe(pdfFile.name);
|
||||
await expect(await contentServicesPage.getAttributeValueForElement(pdfFile.name, cardProperties.SIZE)).toBe(`105.02 KB`);
|
||||
await expect(await contentServicesPage.getAttributeValueForElement(pdfFile.name, cardProperties.CREATED_BY)).toBe(`${funnyUser.entry.firstName} ${funnyUser.entry.lastName}`);
|
||||
|
||||
expect(contentServicesPage.getAttributeValueForElement(pdfFile.name, cardProperties.CREATED)).toMatch(/(ago|few)/);
|
||||
await expect(await contentServicesPage.getAttributeValueForElement(pdfFile.name, cardProperties.CREATED)).toMatch(/(ago|few)/);
|
||||
|
||||
expect(contentServicesPage.getAttributeValueForElement(docxFile.name, cardProperties.DISPLAY_NAME)).toBe(docxFile.name);
|
||||
expect(contentServicesPage.getAttributeValueForElement(docxFile.name, cardProperties.SIZE)).toBe(`81.05 KB`);
|
||||
expect(contentServicesPage.getAttributeValueForElement(docxFile.name, cardProperties.CREATED_BY)).toBe(`${funnyUser.entry.firstName} ${funnyUser.entry.lastName}`);
|
||||
await expect(await contentServicesPage.getAttributeValueForElement(docxFile.name, cardProperties.DISPLAY_NAME)).toBe(docxFile.name);
|
||||
await expect(await contentServicesPage.getAttributeValueForElement(docxFile.name, cardProperties.SIZE)).toBe(`81.05 KB`);
|
||||
await expect(await contentServicesPage.getAttributeValueForElement(docxFile.name, cardProperties.CREATED_BY))
|
||||
.toBe(`${funnyUser.entry.firstName} ${funnyUser.entry.lastName}`);
|
||||
|
||||
expect(contentServicesPage.getAttributeValueForElement(docxFile.name, cardProperties.CREATED)).toMatch(/(ago|few)/);
|
||||
await expect(await contentServicesPage.getAttributeValueForElement(docxFile.name, cardProperties.CREATED)).toMatch(/(ago|few)/);
|
||||
|
||||
expect(contentServicesPage.getAttributeValueForElement(testFile.name, cardProperties.DISPLAY_NAME)).toBe(testFile.name);
|
||||
expect(contentServicesPage.getAttributeValueForElement(testFile.name, cardProperties.SIZE)).toBe(`14 Bytes`);
|
||||
expect(contentServicesPage.getAttributeValueForElement(testFile.name, cardProperties.CREATED_BY)).toBe(`${funnyUser.entry.firstName} ${funnyUser.entry.lastName}`);
|
||||
await expect(await contentServicesPage.getAttributeValueForElement(testFile.name, cardProperties.DISPLAY_NAME)).toBe(testFile.name);
|
||||
await expect(await contentServicesPage.getAttributeValueForElement(testFile.name, cardProperties.SIZE)).toBe(`14 Bytes`);
|
||||
await expect(await contentServicesPage.getAttributeValueForElement(testFile.name, cardProperties.CREATED_BY))
|
||||
.toBe(`${funnyUser.entry.firstName} ${funnyUser.entry.lastName}`);
|
||||
|
||||
expect(contentServicesPage.getAttributeValueForElement(testFile.name, cardProperties.CREATED)).toMatch(/(ago|few)/);
|
||||
await expect(await contentServicesPage.getAttributeValueForElement(testFile.name, cardProperties.CREATED)).toMatch(/(ago|few)/);
|
||||
});
|
||||
|
||||
it('[C280129] Should keep Gallery View when accessing a folder', () => {
|
||||
contentServicesPage.navigateToCardFolder(folderName);
|
||||
it('[C280129] Should keep Gallery View when accessing a folder', async () => {
|
||||
await contentServicesPage.navigateToCardFolder(folderName);
|
||||
|
||||
expect(contentServicesPage.getCardElementShowedInPage()).toBe(1);
|
||||
expect(contentServicesPage.getDocumentCardIconForElement(pdfFile.name)).toContain('/assets/images/ft_ic_pdf.svg');
|
||||
await expect(await contentServicesPage.getCardElementShowedInPage()).toBe(1);
|
||||
await expect(await contentServicesPage.getDocumentCardIconForElement(pdfFile.name)).toContain('/assets/images/ft_ic_pdf.svg');
|
||||
});
|
||||
|
||||
it('[C280130] Should be able to go back to List View', () => {
|
||||
contentServicesPage.clickGridViewButton();
|
||||
contentServicesPage.checkAcsContainer();
|
||||
contentServicesPage.doubleClickRow(folderName);
|
||||
contentServicesPage.checkRowIsDisplayed(pdfFile.name);
|
||||
it('[C280130] Should be able to go back to List View', async () => {
|
||||
await contentServicesPage.clickGridViewButton();
|
||||
await contentServicesPage.checkAcsContainer();
|
||||
await contentServicesPage.doubleClickRow(folderName);
|
||||
await contentServicesPage.checkRowIsDisplayed(pdfFile.name);
|
||||
});
|
||||
|
||||
it('[C261993] Should be able to sort Gallery Cards by display name', () => {
|
||||
contentServicesPage.selectGridSortingFromDropdown(cardProperties.DISPLAY_NAME);
|
||||
contentServicesPage.checkListIsSortedByNameColumn('asc');
|
||||
it('[C261993] Should be able to sort Gallery Cards by display name', async () => {
|
||||
await contentServicesPage.selectGridSortingFromDropdown(cardProperties.DISPLAY_NAME);
|
||||
await contentServicesPage.checkListIsSortedByNameColumn('asc');
|
||||
});
|
||||
|
||||
it('[C261994] Should be able to sort Gallery Cards by size', () => {
|
||||
contentServicesPage.selectGridSortingFromDropdown(cardProperties.SIZE);
|
||||
contentServicesPage.checkListIsSortedBySizeColumn('asc');
|
||||
it('[C261994] Should be able to sort Gallery Cards by size', async () => {
|
||||
await contentServicesPage.selectGridSortingFromDropdown(cardProperties.SIZE);
|
||||
await contentServicesPage.checkListIsSortedBySizeColumn('asc');
|
||||
});
|
||||
|
||||
it('[C261995] Should be able to sort Gallery Cards by author', () => {
|
||||
contentServicesPage.selectGridSortingFromDropdown(cardProperties.CREATED_BY);
|
||||
contentServicesPage.checkListIsSortedByAuthorColumn('asc');
|
||||
it('[C261995] Should be able to sort Gallery Cards by author', async () => {
|
||||
await contentServicesPage.selectGridSortingFromDropdown(cardProperties.CREATED_BY);
|
||||
await contentServicesPage.checkListIsSortedByAuthorColumn('asc');
|
||||
});
|
||||
|
||||
it('[C261996] Should be able to sort Gallery Cards by created date', () => {
|
||||
contentServicesPage.selectGridSortingFromDropdown(cardProperties.CREATED);
|
||||
contentServicesPage.checkListIsSortedByCreatedColumn('asc');
|
||||
it('[C261996] Should be able to sort Gallery Cards by created date', async () => {
|
||||
await contentServicesPage.selectGridSortingFromDropdown(cardProperties.CREATED);
|
||||
await contentServicesPage.checkListIsSortedByCreatedColumn('asc');
|
||||
});
|
||||
|
||||
afterAll(async (done) => {
|
||||
afterAll(async () => {
|
||||
await this.alfrescoJsApi.login(browser.params.testConfig.adf.adminEmail, browser.params.testConfig.adf.adminPassword);
|
||||
if (filePdfNode) {
|
||||
await uploadActions.deleteFileOrFolder(filePdfNode.entry.id);
|
||||
@@ -189,7 +189,7 @@ describe('Document List Component', () => {
|
||||
if (folderNode) {
|
||||
await uploadActions.deleteFileOrFolder(folderNode.entry.id);
|
||||
}
|
||||
done();
|
||||
|
||||
});
|
||||
});
|
||||
|
||||
|
||||
@@ -24,7 +24,7 @@ import { Util } from '../../util/util';
|
||||
import { browser } from 'protractor';
|
||||
import { AlfrescoApiCompatibility as AlfrescoApi } from '@alfresco/js-api';
|
||||
|
||||
describe('Document List - Pagination', function () {
|
||||
describe('Document List - Pagination', () => {
|
||||
const pagination = {
|
||||
base: 'newFile',
|
||||
secondSetBase: 'secondSet',
|
||||
@@ -49,21 +49,21 @@ describe('Document List - Pagination', function () {
|
||||
const navigationBarPage = new NavigationBarPage();
|
||||
|
||||
const acsUser = new AcsUserModel();
|
||||
const newFolderModel = new FolderModel({ 'name': 'newFolder' });
|
||||
const newFolderModel = new FolderModel({ name: 'newFolder' });
|
||||
let fileNames = [];
|
||||
const nrOfFiles = 20;
|
||||
let currentPage = 1;
|
||||
let secondSetOfFiles = [];
|
||||
const secondSetNumber = 25;
|
||||
const folderTwoModel = new FolderModel({ 'name': 'folderTwo' });
|
||||
const folderThreeModel = new FolderModel({ 'name': 'folderThree' });
|
||||
const folderTwoModel = new FolderModel({ name: 'folderTwo' });
|
||||
const folderThreeModel = new FolderModel({ name: 'folderThree' });
|
||||
this.alfrescoJsApi = new AlfrescoApi({
|
||||
provider: 'ECM',
|
||||
hostEcm: browser.params.testConfig.adf_acs.host
|
||||
});
|
||||
provider: 'ECM',
|
||||
hostEcm: browser.params.testConfig.adf_acs.host
|
||||
});
|
||||
const uploadActions = new UploadActions(this.alfrescoJsApi);
|
||||
|
||||
beforeAll(async (done) => {
|
||||
beforeAll(async () => {
|
||||
fileNames = Util.generateSequenceFiles(10, nrOfFiles + 9, pagination.base, pagination.extension);
|
||||
secondSetOfFiles = Util.generateSequenceFiles(10, secondSetNumber + 9, pagination.secondSetBase, pagination.extension);
|
||||
|
||||
@@ -80,270 +80,256 @@ describe('Document List - Pagination', function () {
|
||||
|
||||
await uploadActions.createEmptyFiles(secondSetOfFiles, folderThreeUploadedModel.entry.id);
|
||||
|
||||
loginPage.loginToContentServicesUsingUserModel(acsUser);
|
||||
await loginPage.loginToContentServicesUsingUserModel(acsUser);
|
||||
|
||||
done();
|
||||
});
|
||||
|
||||
afterAll(async () => {
|
||||
await navigationBarPage.clickLogoutButton();
|
||||
});
|
||||
|
||||
beforeEach((done) => {
|
||||
contentServicesPage.goToDocumentList();
|
||||
contentServicesPage.checkAcsContainer();
|
||||
contentServicesPage.waitForTableBody();
|
||||
done();
|
||||
beforeEach(async () => {
|
||||
await contentServicesPage.goToDocumentList();
|
||||
await contentServicesPage.checkAcsContainer();
|
||||
await contentServicesPage.waitForTableBody();
|
||||
|
||||
});
|
||||
|
||||
it('[C260062] Should use default pagination settings', () => {
|
||||
contentServicesPage.doubleClickRow(newFolderModel.name);
|
||||
contentServicesPage.checkAcsContainer();
|
||||
contentServicesPage.waitForTableBody();
|
||||
expect(paginationPage.getCurrentItemsPerPage()).toEqual(itemsPerPage.twenty);
|
||||
expect(paginationPage.getPaginationRange()).toEqual('Showing 1-' + nrOfFiles + ' of ' + nrOfFiles);
|
||||
expect(contentServicesPage.numberOfResultsDisplayed()).toBe(nrOfFiles);
|
||||
contentServicesPage.getAllRowsNameColumn().then(function (list) {
|
||||
expect(Util.arrayContainsArray(list, fileNames)).toEqual(true);
|
||||
});
|
||||
paginationPage.checkNextPageButtonIsDisabled();
|
||||
paginationPage.checkPreviousPageButtonIsDisabled();
|
||||
it('[C260062] Should use default pagination settings', async () => {
|
||||
await contentServicesPage.doubleClickRow(newFolderModel.name);
|
||||
await contentServicesPage.checkAcsContainer();
|
||||
await contentServicesPage.waitForTableBody();
|
||||
await expect(await paginationPage.getCurrentItemsPerPage()).toEqual(itemsPerPage.twenty);
|
||||
await expect(await paginationPage.getPaginationRange()).toEqual('Showing 1-' + nrOfFiles + ' of ' + nrOfFiles);
|
||||
await expect(await contentServicesPage.numberOfResultsDisplayed()).toBe(nrOfFiles);
|
||||
const list = await contentServicesPage.getAllRowsNameColumn();
|
||||
await expect(Util.arrayContainsArray(list, fileNames)).toEqual(true);
|
||||
await paginationPage.checkNextPageButtonIsDisabled();
|
||||
await paginationPage.checkPreviousPageButtonIsDisabled();
|
||||
});
|
||||
|
||||
it('[C274713] Should be able to set Items per page to 20', () => {
|
||||
contentServicesPage.doubleClickRow(newFolderModel.name);
|
||||
contentServicesPage.checkAcsContainer();
|
||||
contentServicesPage.waitForTableBody();
|
||||
paginationPage.selectItemsPerPage(itemsPerPage.twenty);
|
||||
contentServicesPage.checkAcsContainer();
|
||||
contentServicesPage.waitForTableBody();
|
||||
expect(paginationPage.getCurrentItemsPerPage()).toEqual(itemsPerPage.twenty);
|
||||
expect(paginationPage.getPaginationRange()).toEqual('Showing 1-' + nrOfFiles + ' of ' + nrOfFiles);
|
||||
expect(contentServicesPage.numberOfResultsDisplayed()).toBe(nrOfFiles);
|
||||
contentServicesPage.getAllRowsNameColumn().then(function (list) {
|
||||
expect(Util.arrayContainsArray(list, fileNames)).toEqual(true);
|
||||
});
|
||||
paginationPage.checkNextPageButtonIsDisabled();
|
||||
paginationPage.checkPreviousPageButtonIsDisabled();
|
||||
it('[C274713] Should be able to set Items per page to 20', async () => {
|
||||
await contentServicesPage.doubleClickRow(newFolderModel.name);
|
||||
await contentServicesPage.checkAcsContainer();
|
||||
await contentServicesPage.waitForTableBody();
|
||||
await paginationPage.selectItemsPerPage(itemsPerPage.twenty);
|
||||
await contentServicesPage.checkAcsContainer();
|
||||
await contentServicesPage.waitForTableBody();
|
||||
await expect(await paginationPage.getCurrentItemsPerPage()).toEqual(itemsPerPage.twenty);
|
||||
await expect(await paginationPage.getPaginationRange()).toEqual('Showing 1-' + nrOfFiles + ' of ' + nrOfFiles);
|
||||
await expect(await contentServicesPage.numberOfResultsDisplayed()).toBe(nrOfFiles);
|
||||
const list = await contentServicesPage.getAllRowsNameColumn();
|
||||
await expect(Util.arrayContainsArray(list, fileNames)).toEqual(true);
|
||||
await paginationPage.checkNextPageButtonIsDisabled();
|
||||
await paginationPage.checkPreviousPageButtonIsDisabled();
|
||||
|
||||
navigationBarPage.clickLogoutButton();
|
||||
loginPage.loginToContentServicesUsingUserModel(acsUser);
|
||||
contentServicesPage.goToDocumentList();
|
||||
contentServicesPage.checkAcsContainer();
|
||||
contentServicesPage.waitForTableBody();
|
||||
expect(paginationPage.getCurrentItemsPerPage()).toEqual(itemsPerPage.twenty);
|
||||
navigationBarPage.clickLogoutButton();
|
||||
loginPage.loginToContentServicesUsingUserModel(acsUser);
|
||||
await navigationBarPage.clickLogoutButton();
|
||||
await loginPage.loginToContentServicesUsingUserModel(acsUser);
|
||||
await contentServicesPage.goToDocumentList();
|
||||
await contentServicesPage.checkAcsContainer();
|
||||
await contentServicesPage.waitForTableBody();
|
||||
await expect(await paginationPage.getCurrentItemsPerPage()).toEqual(itemsPerPage.twenty);
|
||||
await navigationBarPage.clickLogoutButton();
|
||||
await loginPage.loginToContentServicesUsingUserModel(acsUser);
|
||||
});
|
||||
|
||||
it('[C260069] Should be able to set Items per page to 5', () => {
|
||||
contentServicesPage.doubleClickRow(newFolderModel.name);
|
||||
contentServicesPage.checkAcsContainer();
|
||||
contentServicesPage.waitForTableBody();
|
||||
paginationPage.selectItemsPerPage(itemsPerPage.five);
|
||||
contentServicesPage.checkAcsContainer();
|
||||
contentServicesPage.waitForTableBody();
|
||||
expect(paginationPage.getCurrentItemsPerPage()).toEqual(itemsPerPage.five);
|
||||
expect(paginationPage.getPaginationRange()).toEqual('Showing 1-' + itemsPerPage.fiveValue * currentPage + ' of ' + nrOfFiles);
|
||||
expect(contentServicesPage.numberOfResultsDisplayed()).toBe(itemsPerPage.fiveValue);
|
||||
contentServicesPage.getAllRowsNameColumn().then(function (list) {
|
||||
expect(Util.arrayContainsArray(list, fileNames.slice(0, 5))).toEqual(true);
|
||||
});
|
||||
paginationPage.clickOnNextPage();
|
||||
it('[C260069] Should be able to set Items per page to 5', async () => {
|
||||
await contentServicesPage.doubleClickRow(newFolderModel.name);
|
||||
await contentServicesPage.checkAcsContainer();
|
||||
await contentServicesPage.waitForTableBody();
|
||||
await paginationPage.selectItemsPerPage(itemsPerPage.five);
|
||||
await contentServicesPage.checkAcsContainer();
|
||||
await contentServicesPage.waitForTableBody();
|
||||
await expect(await paginationPage.getCurrentItemsPerPage()).toEqual(itemsPerPage.five);
|
||||
await expect(await paginationPage.getPaginationRange()).toEqual('Showing 1-' + itemsPerPage.fiveValue * currentPage + ' of ' + nrOfFiles);
|
||||
await expect(await contentServicesPage.numberOfResultsDisplayed()).toBe(itemsPerPage.fiveValue);
|
||||
let list = await contentServicesPage.getAllRowsNameColumn();
|
||||
await expect(Util.arrayContainsArray(list, fileNames.slice(0, 5))).toEqual(true);
|
||||
await paginationPage.clickOnNextPage();
|
||||
currentPage++;
|
||||
contentServicesPage.checkAcsContainer();
|
||||
contentServicesPage.waitForTableBody();
|
||||
expect(paginationPage.getCurrentItemsPerPage()).toEqual(itemsPerPage.five);
|
||||
expect(paginationPage.getPaginationRange()).toEqual('Showing 6-' + itemsPerPage.fiveValue * currentPage + ' of ' + nrOfFiles);
|
||||
expect(contentServicesPage.numberOfResultsDisplayed()).toBe(itemsPerPage.fiveValue);
|
||||
contentServicesPage.getAllRowsNameColumn().then(function (list) {
|
||||
expect(Util.arrayContainsArray(list, fileNames.slice(5, 10))).toEqual(true);
|
||||
});
|
||||
paginationPage.clickOnNextPage();
|
||||
await contentServicesPage.checkAcsContainer();
|
||||
await contentServicesPage.waitForTableBody();
|
||||
await expect(await paginationPage.getCurrentItemsPerPage()).toEqual(itemsPerPage.five);
|
||||
await expect(await paginationPage.getPaginationRange()).toEqual('Showing 6-' + itemsPerPage.fiveValue * currentPage + ' of ' + nrOfFiles);
|
||||
await expect(await contentServicesPage.numberOfResultsDisplayed()).toBe(itemsPerPage.fiveValue);
|
||||
list = await contentServicesPage.getAllRowsNameColumn();
|
||||
await expect(Util.arrayContainsArray(list, fileNames.slice(5, 10))).toEqual(true);
|
||||
await paginationPage.clickOnNextPage();
|
||||
currentPage++;
|
||||
contentServicesPage.checkAcsContainer();
|
||||
contentServicesPage.waitForTableBody();
|
||||
expect(paginationPage.getCurrentItemsPerPage()).toEqual(itemsPerPage.five);
|
||||
expect(paginationPage.getPaginationRange()).toEqual('Showing 11-' + itemsPerPage.fiveValue * currentPage + ' of ' + nrOfFiles);
|
||||
expect(contentServicesPage.numberOfResultsDisplayed()).toBe(itemsPerPage.fiveValue);
|
||||
contentServicesPage.getAllRowsNameColumn().then(function (list) {
|
||||
expect(Util.arrayContainsArray(list, fileNames.slice(10, 15))).toEqual(true);
|
||||
});
|
||||
paginationPage.clickOnNextPage();
|
||||
await contentServicesPage.checkAcsContainer();
|
||||
await contentServicesPage.waitForTableBody();
|
||||
await expect(await paginationPage.getCurrentItemsPerPage()).toEqual(itemsPerPage.five);
|
||||
await expect(await paginationPage.getPaginationRange()).toEqual('Showing 11-' + itemsPerPage.fiveValue * currentPage + ' of ' + nrOfFiles);
|
||||
await expect(await contentServicesPage.numberOfResultsDisplayed()).toBe(itemsPerPage.fiveValue);
|
||||
list = await contentServicesPage.getAllRowsNameColumn();
|
||||
await expect(Util.arrayContainsArray(list, fileNames.slice(10, 15))).toEqual(true);
|
||||
await paginationPage.clickOnNextPage();
|
||||
currentPage++;
|
||||
contentServicesPage.checkAcsContainer();
|
||||
contentServicesPage.waitForTableBody();
|
||||
expect(paginationPage.getCurrentItemsPerPage()).toEqual(itemsPerPage.five);
|
||||
expect(paginationPage.getPaginationRange()).toEqual('Showing 16-' + itemsPerPage.fiveValue * currentPage + ' of ' + nrOfFiles);
|
||||
expect(contentServicesPage.numberOfResultsDisplayed()).toBe(itemsPerPage.fiveValue);
|
||||
contentServicesPage.getAllRowsNameColumn().then(function (list) {
|
||||
expect(Util.arrayContainsArray(list, fileNames.slice(15, 20))).toEqual(true);
|
||||
});
|
||||
await contentServicesPage.checkAcsContainer();
|
||||
await contentServicesPage.waitForTableBody();
|
||||
await expect(await paginationPage.getCurrentItemsPerPage()).toEqual(itemsPerPage.five);
|
||||
await expect(await paginationPage.getPaginationRange()).toEqual('Showing 16-' + itemsPerPage.fiveValue * currentPage + ' of ' + nrOfFiles);
|
||||
await expect(await contentServicesPage.numberOfResultsDisplayed()).toBe(itemsPerPage.fiveValue);
|
||||
list = await contentServicesPage.getAllRowsNameColumn();
|
||||
await expect(Util.arrayContainsArray(list, fileNames.slice(15, 20))).toEqual(true);
|
||||
|
||||
browser.refresh();
|
||||
contentServicesPage.checkAcsContainer();
|
||||
contentServicesPage.waitForTableBody();
|
||||
expect(paginationPage.getCurrentItemsPerPage()).toEqual(itemsPerPage.five);
|
||||
navigationBarPage.clickLogoutButton();
|
||||
loginPage.loginToContentServicesUsingUserModel(acsUser);
|
||||
await browser.refresh();
|
||||
await contentServicesPage.checkAcsContainer();
|
||||
await contentServicesPage.waitForTableBody();
|
||||
await expect(await paginationPage.getCurrentItemsPerPage()).toEqual(itemsPerPage.five);
|
||||
await navigationBarPage.clickLogoutButton();
|
||||
await loginPage.loginToContentServicesUsingUserModel(acsUser);
|
||||
});
|
||||
|
||||
it('[C260067] Should be able to set Items per page to 10', () => {
|
||||
it('[C260067] Should be able to set Items per page to 10', async () => {
|
||||
currentPage = 1;
|
||||
contentServicesPage.doubleClickRow(newFolderModel.name);
|
||||
contentServicesPage.checkAcsContainer();
|
||||
contentServicesPage.waitForTableBody();
|
||||
paginationPage.selectItemsPerPage(itemsPerPage.ten);
|
||||
contentServicesPage.checkAcsContainer();
|
||||
contentServicesPage.waitForTableBody();
|
||||
expect(paginationPage.getCurrentItemsPerPage()).toEqual(itemsPerPage.ten);
|
||||
expect(paginationPage.getPaginationRange()).toEqual('Showing 1-' + itemsPerPage.tenValue * currentPage + ' of ' + nrOfFiles);
|
||||
expect(contentServicesPage.numberOfResultsDisplayed()).toBe(itemsPerPage.tenValue);
|
||||
contentServicesPage.getAllRowsNameColumn().then(function (list) {
|
||||
expect(Util.arrayContainsArray(list, fileNames.slice(0, 10))).toEqual(true);
|
||||
});
|
||||
paginationPage.clickOnNextPage();
|
||||
await contentServicesPage.doubleClickRow(newFolderModel.name);
|
||||
await contentServicesPage.checkAcsContainer();
|
||||
await contentServicesPage.waitForTableBody();
|
||||
await paginationPage.selectItemsPerPage(itemsPerPage.ten);
|
||||
await contentServicesPage.checkAcsContainer();
|
||||
await contentServicesPage.waitForTableBody();
|
||||
await expect(await paginationPage.getCurrentItemsPerPage()).toEqual(itemsPerPage.ten);
|
||||
await expect(await paginationPage.getPaginationRange()).toEqual('Showing 1-' + itemsPerPage.tenValue * currentPage + ' of ' + nrOfFiles);
|
||||
await expect(await contentServicesPage.numberOfResultsDisplayed()).toBe(itemsPerPage.tenValue);
|
||||
let list = await contentServicesPage.getAllRowsNameColumn();
|
||||
await expect(Util.arrayContainsArray(list, fileNames.slice(0, 10))).toEqual(true);
|
||||
await paginationPage.clickOnNextPage();
|
||||
currentPage++;
|
||||
contentServicesPage.checkAcsContainer();
|
||||
contentServicesPage.waitForTableBody();
|
||||
expect(paginationPage.getCurrentItemsPerPage()).toEqual(itemsPerPage.ten);
|
||||
expect(paginationPage.getPaginationRange()).toEqual('Showing 11-' + itemsPerPage.tenValue * currentPage + ' of ' + nrOfFiles);
|
||||
expect(contentServicesPage.numberOfResultsDisplayed()).toBe(itemsPerPage.tenValue);
|
||||
contentServicesPage.getAllRowsNameColumn().then(function (list) {
|
||||
expect(Util.arrayContainsArray(list, fileNames.slice(10, 20))).toEqual(true);
|
||||
});
|
||||
await contentServicesPage.checkAcsContainer();
|
||||
await contentServicesPage.waitForTableBody();
|
||||
await expect(await paginationPage.getCurrentItemsPerPage()).toEqual(itemsPerPage.ten);
|
||||
await expect(await paginationPage.getPaginationRange()).toEqual('Showing 11-' + itemsPerPage.tenValue * currentPage + ' of ' + nrOfFiles);
|
||||
await expect(await contentServicesPage.numberOfResultsDisplayed()).toBe(itemsPerPage.tenValue);
|
||||
list = await contentServicesPage.getAllRowsNameColumn();
|
||||
await expect(Util.arrayContainsArray(list, fileNames.slice(10, 20))).toEqual(true);
|
||||
|
||||
browser.refresh();
|
||||
contentServicesPage.waitForTableBody();
|
||||
expect(paginationPage.getCurrentItemsPerPage()).toEqual(itemsPerPage.ten);
|
||||
navigationBarPage.clickLogoutButton();
|
||||
loginPage.loginToContentServicesUsingUserModel(acsUser);
|
||||
await browser.refresh();
|
||||
await contentServicesPage.waitForTableBody();
|
||||
await expect(await paginationPage.getCurrentItemsPerPage()).toEqual(itemsPerPage.ten);
|
||||
await navigationBarPage.clickLogoutButton();
|
||||
await loginPage.loginToContentServicesUsingUserModel(acsUser);
|
||||
currentPage = 1;
|
||||
});
|
||||
|
||||
it('[C260065] Should be able to set Items per page to 15', () => {
|
||||
it('[C260065] Should be able to set Items per page to 15', async () => {
|
||||
currentPage = 1;
|
||||
contentServicesPage.doubleClickRow(newFolderModel.name);
|
||||
contentServicesPage.checkAcsContainer();
|
||||
contentServicesPage.waitForTableBody();
|
||||
expect(contentServicesPage.getActiveBreadcrumb()).toEqual(newFolderModel.name);
|
||||
paginationPage.selectItemsPerPage(itemsPerPage.fifteen);
|
||||
contentServicesPage.checkAcsContainer();
|
||||
contentServicesPage.waitForTableBody();
|
||||
expect(paginationPage.getCurrentItemsPerPage()).toEqual(itemsPerPage.fifteen);
|
||||
expect(paginationPage.getPaginationRange()).toEqual('Showing 1-' + itemsPerPage.fifteenValue * currentPage + ' of ' + nrOfFiles);
|
||||
expect(contentServicesPage.numberOfResultsDisplayed()).toBe(itemsPerPage.fifteenValue);
|
||||
contentServicesPage.getAllRowsNameColumn().then(function (list) {
|
||||
expect(Util.arrayContainsArray(list, fileNames.slice(0, 15))).toEqual(true);
|
||||
});
|
||||
await contentServicesPage.doubleClickRow(newFolderModel.name);
|
||||
await contentServicesPage.checkAcsContainer();
|
||||
await contentServicesPage.waitForTableBody();
|
||||
await expect(await contentServicesPage.getActiveBreadcrumb()).toEqual(newFolderModel.name);
|
||||
await paginationPage.selectItemsPerPage(itemsPerPage.fifteen);
|
||||
await contentServicesPage.checkAcsContainer();
|
||||
await contentServicesPage.waitForTableBody();
|
||||
await expect(await paginationPage.getCurrentItemsPerPage()).toEqual(itemsPerPage.fifteen);
|
||||
await expect(await paginationPage.getPaginationRange()).toEqual('Showing 1-' + itemsPerPage.fifteenValue * currentPage + ' of ' + nrOfFiles);
|
||||
await expect(await contentServicesPage.numberOfResultsDisplayed()).toBe(itemsPerPage.fifteenValue);
|
||||
let list = await contentServicesPage.getAllRowsNameColumn();
|
||||
await expect(Util.arrayContainsArray(list, fileNames.slice(0, 15))).toEqual(true);
|
||||
currentPage++;
|
||||
paginationPage.clickOnNextPage();
|
||||
contentServicesPage.checkAcsContainer();
|
||||
contentServicesPage.waitForTableBody();
|
||||
expect(paginationPage.getCurrentItemsPerPage()).toEqual(itemsPerPage.fifteen);
|
||||
expect(paginationPage.getPaginationRange()).toEqual('Showing 16-' + nrOfFiles + ' of ' + nrOfFiles);
|
||||
expect(contentServicesPage.numberOfResultsDisplayed()).toBe(nrOfFiles - itemsPerPage.fifteenValue);
|
||||
contentServicesPage.getAllRowsNameColumn().then(function (list) {
|
||||
expect(Util.arrayContainsArray(list, fileNames.slice(15, 20))).toEqual(true);
|
||||
});
|
||||
await paginationPage.clickOnNextPage();
|
||||
await contentServicesPage.checkAcsContainer();
|
||||
await contentServicesPage.waitForTableBody();
|
||||
await expect(await paginationPage.getCurrentItemsPerPage()).toEqual(itemsPerPage.fifteen);
|
||||
await expect(await paginationPage.getPaginationRange()).toEqual('Showing 16-' + nrOfFiles + ' of ' + nrOfFiles);
|
||||
await expect(await contentServicesPage.numberOfResultsDisplayed()).toBe(nrOfFiles - itemsPerPage.fifteenValue);
|
||||
list = await contentServicesPage.getAllRowsNameColumn();
|
||||
await expect(Util.arrayContainsArray(list, fileNames.slice(15, 20))).toEqual(true);
|
||||
|
||||
browser.refresh();
|
||||
contentServicesPage.waitForTableBody();
|
||||
expect(paginationPage.getCurrentItemsPerPage()).toEqual(itemsPerPage.fifteen);
|
||||
await browser.refresh();
|
||||
await contentServicesPage.waitForTableBody();
|
||||
await expect(await paginationPage.getCurrentItemsPerPage()).toEqual(itemsPerPage.fifteen);
|
||||
});
|
||||
|
||||
it('[C91320] Pagination should preserve sorting', () => {
|
||||
contentServicesPage.doubleClickRow(newFolderModel.name);
|
||||
contentServicesPage.checkAcsContainer();
|
||||
contentServicesPage.waitForTableBody();
|
||||
expect(contentServicesPage.getActiveBreadcrumb()).toEqual(newFolderModel.name);
|
||||
paginationPage.selectItemsPerPage(itemsPerPage.twenty);
|
||||
contentServicesPage.checkAcsContainer();
|
||||
contentServicesPage.waitForTableBody();
|
||||
it('[C91320] Pagination should preserve sorting', async () => {
|
||||
await contentServicesPage.doubleClickRow(newFolderModel.name);
|
||||
await contentServicesPage.checkAcsContainer();
|
||||
await contentServicesPage.waitForTableBody();
|
||||
await expect(await contentServicesPage.getActiveBreadcrumb()).toEqual(newFolderModel.name);
|
||||
await paginationPage.selectItemsPerPage(itemsPerPage.twenty);
|
||||
await contentServicesPage.checkAcsContainer();
|
||||
await contentServicesPage.waitForTableBody();
|
||||
|
||||
expect(contentServicesPage.getContentList().dataTablePage().checkListIsSorted('ASC', 'Display name'));
|
||||
await expect(await contentServicesPage.getDocumentList().dataTablePage().checkListIsSorted('ASC', 'Display name'));
|
||||
|
||||
contentServicesPage.sortByName('DESC');
|
||||
expect(contentServicesPage.getContentList().dataTablePage().checkListIsSorted('DESC', 'Display name'));
|
||||
await contentServicesPage.sortByName('DESC');
|
||||
await expect(await contentServicesPage.getDocumentList().dataTablePage().checkListIsSorted('DESC', 'Display name'));
|
||||
|
||||
paginationPage.selectItemsPerPage(itemsPerPage.five);
|
||||
contentServicesPage.checkAcsContainer();
|
||||
contentServicesPage.waitForTableBody();
|
||||
expect(contentServicesPage.getContentList().dataTablePage().checkListIsSorted('DESC', 'Display name'));
|
||||
await paginationPage.selectItemsPerPage(itemsPerPage.five);
|
||||
await contentServicesPage.checkAcsContainer();
|
||||
await contentServicesPage.waitForTableBody();
|
||||
await expect(await contentServicesPage.getDocumentList().dataTablePage().checkListIsSorted('DESC', 'Display name'));
|
||||
|
||||
paginationPage.clickOnNextPage();
|
||||
contentServicesPage.checkAcsContainer();
|
||||
contentServicesPage.waitForTableBody();
|
||||
expect(contentServicesPage.getContentList().dataTablePage().checkListIsSorted('DESC', 'Display name'));
|
||||
await paginationPage.clickOnNextPage();
|
||||
await contentServicesPage.checkAcsContainer();
|
||||
await contentServicesPage.waitForTableBody();
|
||||
await expect(await contentServicesPage.getDocumentList().dataTablePage().checkListIsSorted('DESC', 'Display name'));
|
||||
|
||||
paginationPage.selectItemsPerPage(itemsPerPage.ten);
|
||||
contentServicesPage.checkAcsContainer();
|
||||
contentServicesPage.waitForTableBody();
|
||||
expect(contentServicesPage.getContentList().dataTablePage().checkListIsSorted('DESC', 'Display name'));
|
||||
await paginationPage.selectItemsPerPage(itemsPerPage.ten);
|
||||
await contentServicesPage.checkAcsContainer();
|
||||
await contentServicesPage.waitForTableBody();
|
||||
await expect(await contentServicesPage.getDocumentList().dataTablePage().checkListIsSorted('DESC', 'Display name'));
|
||||
});
|
||||
|
||||
it('[C260107] Should not display pagination bar when a folder is empty', () => {
|
||||
paginationPage.selectItemsPerPage(itemsPerPage.five);
|
||||
contentServicesPage.checkAcsContainer();
|
||||
contentServicesPage.waitForTableBody();
|
||||
expect(paginationPage.getCurrentItemsPerPage()).toEqual(itemsPerPage.five);
|
||||
contentServicesPage.doubleClickRow(newFolderModel.name);
|
||||
contentServicesPage.checkAcsContainer();
|
||||
contentServicesPage.waitForTableBody();
|
||||
expect(contentServicesPage.getActiveBreadcrumb()).toEqual(newFolderModel.name);
|
||||
expect(paginationPage.getCurrentItemsPerPage()).toEqual(itemsPerPage.five);
|
||||
contentServicesPage.createNewFolder(folderTwoModel.name).checkContentIsDisplayed(folderTwoModel.name);
|
||||
contentServicesPage.doubleClickRow(folderTwoModel.name);
|
||||
contentServicesPage.checkPaginationIsNotDisplayed();
|
||||
it('[C260107] Should not display pagination bar when a folder is empty', async () => {
|
||||
await paginationPage.selectItemsPerPage(itemsPerPage.five);
|
||||
await contentServicesPage.checkAcsContainer();
|
||||
await contentServicesPage.waitForTableBody();
|
||||
await expect(await paginationPage.getCurrentItemsPerPage()).toEqual(itemsPerPage.five);
|
||||
await contentServicesPage.doubleClickRow(newFolderModel.name);
|
||||
await contentServicesPage.checkAcsContainer();
|
||||
await contentServicesPage.waitForTableBody();
|
||||
await expect(await contentServicesPage.getActiveBreadcrumb()).toEqual(newFolderModel.name);
|
||||
await expect(await paginationPage.getCurrentItemsPerPage()).toEqual(itemsPerPage.five);
|
||||
await contentServicesPage.createNewFolder(folderTwoModel.name);
|
||||
await contentServicesPage.checkContentIsDisplayed(folderTwoModel.name);
|
||||
await contentServicesPage.doubleClickRow(folderTwoModel.name);
|
||||
await contentServicesPage.checkPaginationIsNotDisplayed();
|
||||
});
|
||||
|
||||
it('[C260071] Should be able to change pagination when having 25 files', () => {
|
||||
it('[C260071] Should be able to change pagination when having 25 files', async () => {
|
||||
currentPage = 1;
|
||||
contentServicesPage.doubleClickRow(folderThreeModel.name);
|
||||
contentServicesPage.checkAcsContainer();
|
||||
contentServicesPage.waitForTableBody();
|
||||
expect(contentServicesPage.getActiveBreadcrumb()).toEqual(folderThreeModel.name);
|
||||
paginationPage.selectItemsPerPage(itemsPerPage.fifteen);
|
||||
contentServicesPage.checkAcsContainer();
|
||||
contentServicesPage.waitForTableBody();
|
||||
expect(paginationPage.getCurrentItemsPerPage()).toEqual(itemsPerPage.fifteen);
|
||||
expect(paginationPage.getPaginationRange()).toEqual('Showing 1-' + itemsPerPage.fifteenValue * currentPage + ' of ' + secondSetNumber);
|
||||
expect(contentServicesPage.numberOfResultsDisplayed()).toBe(itemsPerPage.fifteenValue);
|
||||
contentServicesPage.getAllRowsNameColumn().then(function (list) {
|
||||
expect(Util.arrayContainsArray(list, secondSetOfFiles.slice(0, 15))).toEqual(true);
|
||||
});
|
||||
await contentServicesPage.doubleClickRow(folderThreeModel.name);
|
||||
await contentServicesPage.checkAcsContainer();
|
||||
await contentServicesPage.waitForTableBody();
|
||||
await expect(await contentServicesPage.getActiveBreadcrumb()).toEqual(folderThreeModel.name);
|
||||
await paginationPage.selectItemsPerPage(itemsPerPage.fifteen);
|
||||
await contentServicesPage.checkAcsContainer();
|
||||
await contentServicesPage.waitForTableBody();
|
||||
await expect(await paginationPage.getCurrentItemsPerPage()).toEqual(itemsPerPage.fifteen);
|
||||
await expect(await paginationPage.getPaginationRange()).toEqual('Showing 1-' + itemsPerPage.fifteenValue * currentPage + ' of ' + secondSetNumber);
|
||||
await expect(await contentServicesPage.numberOfResultsDisplayed()).toBe(itemsPerPage.fifteenValue);
|
||||
let list = await contentServicesPage.getAllRowsNameColumn();
|
||||
await expect(Util.arrayContainsArray(list, secondSetOfFiles.slice(0, 15))).toEqual(true);
|
||||
|
||||
currentPage++;
|
||||
paginationPage.clickOnNextPage();
|
||||
contentServicesPage.checkAcsContainer();
|
||||
contentServicesPage.waitForTableBody();
|
||||
expect(paginationPage.getCurrentItemsPerPage()).toEqual(itemsPerPage.fifteen);
|
||||
expect(paginationPage.getPaginationRange()).toEqual('Showing 16-' + secondSetNumber + ' of ' + secondSetNumber);
|
||||
expect(contentServicesPage.numberOfResultsDisplayed()).toBe(secondSetNumber - itemsPerPage.fifteenValue);
|
||||
contentServicesPage.getAllRowsNameColumn().then(function (list) {
|
||||
expect(Util.arrayContainsArray(list, secondSetOfFiles.slice(15, 25))).toEqual(true);
|
||||
});
|
||||
await paginationPage.clickOnNextPage();
|
||||
await contentServicesPage.checkAcsContainer();
|
||||
await contentServicesPage.waitForTableBody();
|
||||
await expect(await paginationPage.getCurrentItemsPerPage()).toEqual(itemsPerPage.fifteen);
|
||||
await expect(await paginationPage.getPaginationRange()).toEqual('Showing 16-' + secondSetNumber + ' of ' + secondSetNumber);
|
||||
await expect(await contentServicesPage.numberOfResultsDisplayed()).toBe(secondSetNumber - itemsPerPage.fifteenValue);
|
||||
list = await contentServicesPage.getAllRowsNameColumn();
|
||||
await expect(Util.arrayContainsArray(list, secondSetOfFiles.slice(15, 25))).toEqual(true);
|
||||
|
||||
currentPage = 1;
|
||||
paginationPage.selectItemsPerPage(itemsPerPage.twenty);
|
||||
contentServicesPage.checkAcsContainer();
|
||||
contentServicesPage.waitForTableBody();
|
||||
expect(paginationPage.getCurrentItemsPerPage()).toEqual(itemsPerPage.twenty);
|
||||
expect(paginationPage.getPaginationRange()).toEqual('Showing 1-' + itemsPerPage.twentyValue * currentPage + ' of ' + secondSetNumber);
|
||||
expect(contentServicesPage.numberOfResultsDisplayed()).toBe(itemsPerPage.twentyValue);
|
||||
contentServicesPage.getAllRowsNameColumn().then(function (list) {
|
||||
expect(Util.arrayContainsArray(list, secondSetOfFiles.slice(0, 20))).toEqual(true);
|
||||
});
|
||||
await paginationPage.selectItemsPerPage(itemsPerPage.twenty);
|
||||
await contentServicesPage.checkAcsContainer();
|
||||
await contentServicesPage.waitForTableBody();
|
||||
await expect(await paginationPage.getCurrentItemsPerPage()).toEqual(itemsPerPage.twenty);
|
||||
await expect(await paginationPage.getPaginationRange()).toEqual('Showing 1-' + itemsPerPage.twentyValue * currentPage + ' of ' + secondSetNumber);
|
||||
await expect(await contentServicesPage.numberOfResultsDisplayed()).toBe(itemsPerPage.twentyValue);
|
||||
list = await contentServicesPage.getAllRowsNameColumn();
|
||||
await expect(Util.arrayContainsArray(list, secondSetOfFiles.slice(0, 20))).toEqual(true);
|
||||
|
||||
currentPage++;
|
||||
paginationPage.clickOnNextPage();
|
||||
contentServicesPage.checkAcsContainer();
|
||||
contentServicesPage.waitForTableBody();
|
||||
expect(paginationPage.getCurrentItemsPerPage()).toEqual(itemsPerPage.twenty);
|
||||
expect(paginationPage.getPaginationRange()).toEqual('Showing 21-' + secondSetNumber + ' of ' + secondSetNumber);
|
||||
expect(contentServicesPage.numberOfResultsDisplayed()).toBe(secondSetNumber - itemsPerPage.twentyValue);
|
||||
contentServicesPage.getAllRowsNameColumn().then(function (list) {
|
||||
expect(Util.arrayContainsArray(list, secondSetOfFiles.slice(20, 25))).toEqual(true);
|
||||
});
|
||||
await paginationPage.clickOnNextPage();
|
||||
await contentServicesPage.checkAcsContainer();
|
||||
await contentServicesPage.waitForTableBody();
|
||||
await expect(await paginationPage.getCurrentItemsPerPage()).toEqual(itemsPerPage.twenty);
|
||||
await expect(await paginationPage.getPaginationRange()).toEqual('Showing 21-' + secondSetNumber + ' of ' + secondSetNumber);
|
||||
await expect(await contentServicesPage.numberOfResultsDisplayed()).toBe(secondSetNumber - itemsPerPage.twentyValue);
|
||||
list = await contentServicesPage.getAllRowsNameColumn();
|
||||
await expect(Util.arrayContainsArray(list, secondSetOfFiles.slice(20, 25))).toEqual(true);
|
||||
});
|
||||
});
|
||||
|
||||
@@ -40,9 +40,9 @@ describe('Document List Component', () => {
|
||||
});
|
||||
});
|
||||
|
||||
describe('Permission Message', async () => {
|
||||
describe('Permission Message', () => {
|
||||
|
||||
beforeAll(async (done) => {
|
||||
beforeAll(async () => {
|
||||
acsUser = new AcsUserModel();
|
||||
const siteName = `PRIVATE_TEST_SITE_${StringUtil.generateRandomString(5)}`;
|
||||
const privateSiteBody = { visibility: 'PRIVATE', title: siteName };
|
||||
@@ -55,36 +55,35 @@ describe('Document List Component', () => {
|
||||
|
||||
await loginPage.loginToContentServicesUsingUserModel(acsUser);
|
||||
|
||||
done();
|
||||
});
|
||||
|
||||
afterAll(async (done) => {
|
||||
afterAll(async () => {
|
||||
await navigationBarPage.clickLogoutButton();
|
||||
await this.alfrescoJsApi.core.sitesApi.deleteSite(privateSite.entry.id);
|
||||
navBar.openLanguageMenu();
|
||||
navBar.chooseLanguage('English');
|
||||
done();
|
||||
await navBar.openLanguageMenu();
|
||||
await navBar.chooseLanguage('English');
|
||||
|
||||
});
|
||||
|
||||
it('[C217334] Should display a message when accessing file without permissions', () => {
|
||||
BrowserActions.getUrl(browser.params.testConfig.adf.url + '/files/' + privateSite.entry.guid);
|
||||
expect(errorPage.getErrorCode()).toBe('403');
|
||||
expect(errorPage.getErrorDescription()).toBe('You\'re not allowed access to this resource on the server.');
|
||||
it('[C217334] Should display a message when accessing file without permissions', async () => {
|
||||
await BrowserActions.getUrl(browser.params.testConfig.adf.url + '/files/' + privateSite.entry.guid);
|
||||
await expect(await errorPage.getErrorCode()).toBe('403');
|
||||
await expect(await errorPage.getErrorDescription()).toBe('You\'re not allowed access to this resource on the server.');
|
||||
});
|
||||
|
||||
it('[C279924] Should display custom message when accessing a file without permissions', () => {
|
||||
contentServicesPage.goToDocumentList();
|
||||
contentServicesPage.enableCustomPermissionMessage();
|
||||
BrowserActions.getUrl(browser.params.testConfig.adf.url + '/files/' + privateSite.entry.guid);
|
||||
expect(errorPage.getErrorCode()).toBe('403');
|
||||
it('[C279924] Should display custom message when accessing a file without permissions', async () => {
|
||||
await contentServicesPage.goToDocumentList();
|
||||
await contentServicesPage.enableCustomPermissionMessage();
|
||||
await BrowserActions.getUrl(browser.params.testConfig.adf.url + '/files/' + privateSite.entry.guid);
|
||||
await expect(await errorPage.getErrorCode()).toBe('403');
|
||||
});
|
||||
|
||||
it('[C279925] Should display translated message when accessing a file without permissions if language is changed', () => {
|
||||
navBar.openLanguageMenu();
|
||||
navBar.chooseLanguage('Italiano');
|
||||
browser.sleep(2000);
|
||||
BrowserActions.getUrl(browser.params.testConfig.adf.url + '/files/' + privateSite.entry.guid);
|
||||
expect(errorPage.getErrorDescription()).toBe('Accesso alla risorsa sul server non consentito.');
|
||||
it('[C279925] Should display translated message when accessing a file without permissions if language is changed', async () => {
|
||||
await navBar.openLanguageMenu();
|
||||
await navBar.chooseLanguage('Italiano');
|
||||
await browser.sleep(2000);
|
||||
await BrowserActions.getUrl(browser.params.testConfig.adf.url + '/files/' + privateSite.entry.guid);
|
||||
await expect(await errorPage.getErrorDescription()).toBe('Accesso alla risorsa sul server non consentito.');
|
||||
});
|
||||
|
||||
});
|
||||
|
||||
@@ -29,7 +29,7 @@ describe('Document List Component - Properties', () => {
|
||||
|
||||
const loginPage = new LoginPage();
|
||||
const contentServicesPage = new ContentServicesPage();
|
||||
const navigationBarPage = new NavigationBarPage();
|
||||
const navigationBar = new NavigationBarPage();
|
||||
|
||||
let subFolder, parentFolder;
|
||||
this.alfrescoJsApi = new AlfrescoApi({
|
||||
@@ -40,13 +40,13 @@ describe('Document List Component - Properties', () => {
|
||||
let acsUser = null;
|
||||
|
||||
const pngFile = new FileModel({
|
||||
'name': resources.Files.ADF_DOCUMENTS.PNG.file_name,
|
||||
'location': resources.Files.ADF_DOCUMENTS.PNG.file_location
|
||||
name: resources.Files.ADF_DOCUMENTS.PNG.file_name,
|
||||
location: resources.Files.ADF_DOCUMENTS.PNG.file_location
|
||||
});
|
||||
|
||||
describe('Allow drop files property', async () => {
|
||||
describe('Allow drop files property', () => {
|
||||
|
||||
beforeEach(async (done) => {
|
||||
beforeEach(async () => {
|
||||
acsUser = new AcsUserModel();
|
||||
|
||||
await this.alfrescoJsApi.login(browser.params.testConfig.adf.adminEmail, browser.params.testConfig.adf.adminPassword);
|
||||
@@ -61,46 +61,44 @@ describe('Document List Component - Properties', () => {
|
||||
|
||||
await loginPage.loginToContentServicesUsingUserModel(acsUser);
|
||||
|
||||
done();
|
||||
});
|
||||
|
||||
afterEach(async (done) => {
|
||||
afterEach(async () => {
|
||||
await this.alfrescoJsApi.login(browser.params.testConfig.adf.adminEmail, browser.params.testConfig.adf.adminPassword);
|
||||
await uploadActions.deleteFileOrFolder(subFolder.entry.id);
|
||||
await uploadActions.deleteFileOrFolder(parentFolder.entry.id);
|
||||
done();
|
||||
|
||||
});
|
||||
|
||||
it('[C299154] Should disallow upload content on a folder row if allowDropFiles is false', () => {
|
||||
navigationBarPage.clickContentServicesButton();
|
||||
contentServicesPage.doubleClickRow(parentFolder.entry.name);
|
||||
it('[C299154] Should disallow upload content on a folder row if allowDropFiles is false', async () => {
|
||||
await navigationBar.clickContentServicesButton();
|
||||
await contentServicesPage.doubleClickRow(parentFolder.entry.name);
|
||||
|
||||
contentServicesPage.disableDropFilesInAFolder();
|
||||
await contentServicesPage.disableDropFilesInAFolder();
|
||||
|
||||
const dragAndDropArea = contentServicesPage.getRowByName(subFolder.entry.name);
|
||||
|
||||
const dragAndDrop = new DropActions();
|
||||
dragAndDrop.dropFile(dragAndDropArea, pngFile.location);
|
||||
|
||||
contentServicesPage.checkContentIsDisplayed(pngFile.name);
|
||||
contentServicesPage.doubleClickRow(subFolder.entry.name);
|
||||
contentServicesPage.checkEmptyFolderTextToBe('This folder is empty');
|
||||
await dragAndDrop.dropFile(dragAndDropArea, pngFile.location);
|
||||
await contentServicesPage.checkContentIsDisplayed(pngFile.name);
|
||||
await contentServicesPage.doubleClickRow(subFolder.entry.name);
|
||||
await contentServicesPage.checkEmptyFolderTextToBe('This folder is empty');
|
||||
});
|
||||
|
||||
it('[C91319] Should allow upload content on a folder row if allowDropFiles is true', () => {
|
||||
navigationBarPage.clickContentServicesButton();
|
||||
contentServicesPage.doubleClickRow(parentFolder.entry.name);
|
||||
it('[C91319] Should allow upload content on a folder row if allowDropFiles is true', async () => {
|
||||
await navigationBar.clickContentServicesButton();
|
||||
await contentServicesPage.doubleClickRow(parentFolder.entry.name);
|
||||
|
||||
contentServicesPage.enableDropFilesInAFolder();
|
||||
await contentServicesPage.enableDropFilesInAFolder();
|
||||
|
||||
const dragAndDropArea = contentServicesPage.getRowByName(subFolder.entry.name);
|
||||
|
||||
const dragAndDrop = new DropActions();
|
||||
dragAndDrop.dropFile(dragAndDropArea, pngFile.location);
|
||||
await dragAndDrop.dropFile(dragAndDropArea, pngFile.location);
|
||||
|
||||
contentServicesPage.checkContentIsNotDisplayed(pngFile.name);
|
||||
contentServicesPage.doubleClickRow(subFolder.entry.name);
|
||||
contentServicesPage.checkContentIsDisplayed(pngFile.name);
|
||||
await contentServicesPage.checkContentIsNotDisplayed(pngFile.name);
|
||||
await contentServicesPage.doubleClickRow(subFolder.entry.name);
|
||||
await contentServicesPage.checkContentIsDisplayed(pngFile.name);
|
||||
});
|
||||
});
|
||||
});
|
||||
|
||||
@@ -38,7 +38,7 @@ describe('Document List Component', () => {
|
||||
let testFileNode, pdfBFileNode;
|
||||
const navigationBarPage = new NavigationBarPage();
|
||||
|
||||
afterEach(async (done) => {
|
||||
afterEach(async () => {
|
||||
await this.alfrescoJsApi.login(browser.params.testConfig.adf.adminEmail, browser.params.testConfig.adf.adminPassword);
|
||||
if (uploadedFolder) {
|
||||
await uploadActions.deleteFileOrFolder(uploadedFolder.entry.id);
|
||||
@@ -56,29 +56,29 @@ describe('Document List Component', () => {
|
||||
await uploadActions.deleteFileOrFolder(pdfBFileNode.entry.id);
|
||||
pdfBFileNode = null;
|
||||
}
|
||||
done();
|
||||
|
||||
});
|
||||
|
||||
describe('Thumbnails and tooltips', () => {
|
||||
|
||||
const pdfFile = new FileModel({
|
||||
'name': resources.Files.ADF_DOCUMENTS.PDF.file_name,
|
||||
'location': resources.Files.ADF_DOCUMENTS.PDF.file_location
|
||||
name: resources.Files.ADF_DOCUMENTS.PDF.file_name,
|
||||
location: resources.Files.ADF_DOCUMENTS.PDF.file_location
|
||||
});
|
||||
|
||||
const testFile = new FileModel({
|
||||
'name': resources.Files.ADF_DOCUMENTS.TEST.file_name,
|
||||
'location': resources.Files.ADF_DOCUMENTS.TEST.file_location
|
||||
name: resources.Files.ADF_DOCUMENTS.TEST.file_name,
|
||||
location: resources.Files.ADF_DOCUMENTS.TEST.file_location
|
||||
});
|
||||
|
||||
const docxFile = new FileModel({
|
||||
'name': resources.Files.ADF_DOCUMENTS.DOCX.file_name,
|
||||
'location': resources.Files.ADF_DOCUMENTS.DOCX.file_location
|
||||
name: resources.Files.ADF_DOCUMENTS.DOCX.file_name,
|
||||
location: resources.Files.ADF_DOCUMENTS.DOCX.file_location
|
||||
});
|
||||
const folderName = `MEESEEKS_${StringUtil.generateRandomString(5)}_LOOK_AT_ME`;
|
||||
let filePdfNode, fileTestNode, fileDocxNode, folderNode;
|
||||
|
||||
beforeAll(async (done) => {
|
||||
beforeAll(async () => {
|
||||
acsUser = new AcsUserModel();
|
||||
await this.alfrescoJsApi.login(browser.params.testConfig.adf.adminEmail, browser.params.testConfig.adf.adminPassword);
|
||||
|
||||
@@ -90,10 +90,9 @@ describe('Document List Component', () => {
|
||||
fileDocxNode = await uploadActions.uploadFile(docxFile.location, docxFile.name, '-my-');
|
||||
folderNode = await uploadActions.createFolder(folderName, '-my-');
|
||||
|
||||
done();
|
||||
});
|
||||
|
||||
afterAll(async (done) => {
|
||||
afterAll(async () => {
|
||||
await navigationBarPage.clickLogoutButton();
|
||||
|
||||
await this.alfrescoJsApi.login(browser.params.testConfig.adf.adminEmail, browser.params.testConfig.adf.adminPassword);
|
||||
@@ -109,52 +108,52 @@ describe('Document List Component', () => {
|
||||
if (folderNode) {
|
||||
await uploadActions.deleteFileOrFolder(folderNode.entry.id);
|
||||
}
|
||||
done();
|
||||
|
||||
});
|
||||
|
||||
beforeEach(async () => {
|
||||
await loginPage.loginToContentServicesUsingUserModel(acsUser);
|
||||
contentServicesPage.goToDocumentList();
|
||||
await contentServicesPage.goToDocumentList();
|
||||
});
|
||||
|
||||
it('[C260108] Should display tooltip for file\'s name', () => {
|
||||
expect(contentServicesPage.getContentList().getTooltip(pdfFile.name)).toEqual(pdfFile.name);
|
||||
it('[C260108] Should display tooltip for file\'s name', async () => {
|
||||
await expect(await contentServicesPage.getDocumentList().getTooltip(pdfFile.name)).toEqual(pdfFile.name);
|
||||
});
|
||||
|
||||
it('[C260109] Should display tooltip for folder\'s name', () => {
|
||||
expect(contentServicesPage.getContentList().getTooltip(folderName)).toEqual(folderName);
|
||||
it('[C260109] Should display tooltip for folder\'s name', async () => {
|
||||
await expect(await contentServicesPage.getDocumentList().getTooltip(folderName)).toEqual(folderName);
|
||||
});
|
||||
|
||||
it('[C260119] Should have a specific thumbnail for folders', async (done) => {
|
||||
it('[C260119] Should have a specific thumbnail for folders', async () => {
|
||||
const folderIconUrl = await contentServicesPage.getRowIconImageUrl(folderName);
|
||||
expect(folderIconUrl).toContain('/assets/images/ft_ic_folder.svg');
|
||||
done();
|
||||
await expect(folderIconUrl).toContain('/assets/images/ft_ic_folder.svg');
|
||||
|
||||
});
|
||||
|
||||
it('[C280066] Should have a specific thumbnail PDF files', async (done) => {
|
||||
it('[C280066] Should have a specific thumbnail PDF files', async () => {
|
||||
const fileIconUrl = await contentServicesPage.getRowIconImageUrl(pdfFile.name);
|
||||
expect(fileIconUrl).toContain('/assets/images/ft_ic_pdf.svg');
|
||||
done();
|
||||
await expect(fileIconUrl).toContain('/assets/images/ft_ic_pdf.svg');
|
||||
|
||||
});
|
||||
|
||||
it('[C280067] Should have a specific thumbnail DOCX files', async (done) => {
|
||||
it('[C280067] Should have a specific thumbnail DOCX files', async () => {
|
||||
const fileIconUrl = await contentServicesPage.getRowIconImageUrl(docxFile.name);
|
||||
expect(fileIconUrl).toContain('/assets/images/ft_ic_ms_word.svg');
|
||||
done();
|
||||
await expect(fileIconUrl).toContain('/assets/images/ft_ic_ms_word.svg');
|
||||
|
||||
});
|
||||
|
||||
it('[C280068] Should have a specific thumbnail files', async (done) => {
|
||||
it('[C280068] Should have a specific thumbnail files', async () => {
|
||||
const fileIconUrl = await contentServicesPage.getRowIconImageUrl(testFile.name);
|
||||
expect(fileIconUrl).toContain('/assets/images/ft_ic_document.svg');
|
||||
done();
|
||||
await expect(fileIconUrl).toContain('/assets/images/ft_ic_document.svg');
|
||||
|
||||
});
|
||||
|
||||
it('[C274701] Should be able to enable thumbnails', async (done) => {
|
||||
contentServicesPage.enableThumbnails();
|
||||
contentServicesPage.checkAcsContainer();
|
||||
it('[C274701] Should be able to enable thumbnails', async () => {
|
||||
await contentServicesPage.enableThumbnails();
|
||||
await contentServicesPage.checkAcsContainer();
|
||||
const fileIconUrl = await contentServicesPage.getRowIconImageUrl(pdfFile.name);
|
||||
expect(fileIconUrl).toContain(`/versions/1/nodes/${filePdfNode.entry.id}/renditions`);
|
||||
done();
|
||||
await expect(fileIconUrl).toContain(`/versions/1/nodes/${filePdfNode.entry.id}/renditions`);
|
||||
|
||||
});
|
||||
});
|
||||
|
||||
|
||||
@@ -41,18 +41,18 @@ describe('Lock File', () => {
|
||||
const uploadActions = new UploadActions(this.alfrescoJsApi);
|
||||
|
||||
const pngFileModel = new FileModel({
|
||||
'name': resources.Files.ADF_DOCUMENTS.PNG.file_name,
|
||||
'location': resources.Files.ADF_DOCUMENTS.PNG.file_location
|
||||
name: resources.Files.ADF_DOCUMENTS.PNG.file_name,
|
||||
location: resources.Files.ADF_DOCUMENTS.PNG.file_location
|
||||
});
|
||||
|
||||
const pngFileToLock = new FileModel({
|
||||
'name': resources.Files.ADF_DOCUMENTS.PNG_B.file_name,
|
||||
'location': resources.Files.ADF_DOCUMENTS.PNG_B.file_location
|
||||
name: resources.Files.ADF_DOCUMENTS.PNG_B.file_name,
|
||||
location: resources.Files.ADF_DOCUMENTS.PNG_B.file_location
|
||||
});
|
||||
|
||||
let nodeId, site, documentLibrary, lockedFileNodeId;
|
||||
|
||||
beforeAll(async (done) => {
|
||||
beforeAll(async () => {
|
||||
await this.alfrescoJsApi.login(browser.params.testConfig.adf.adminEmail, browser.params.testConfig.adf.adminPassword);
|
||||
|
||||
await this.alfrescoJsApi.core.peopleApi.addPerson(adminUser);
|
||||
@@ -73,36 +73,32 @@ describe('Lock File', () => {
|
||||
id: managerUser.id,
|
||||
role: CONSTANTS.CS_USER_ROLES.MANAGER
|
||||
});
|
||||
|
||||
done();
|
||||
|
||||
});
|
||||
|
||||
describe('Lock file interaction with the UI', () => {
|
||||
|
||||
beforeAll(async (done) => {
|
||||
beforeAll(async () => {
|
||||
const pngLockedUploadedFile = await uploadActions.uploadFile(pngFileToLock.location, pngFileToLock.name, documentLibrary);
|
||||
|
||||
lockedFileNodeId = pngLockedUploadedFile.entry.id;
|
||||
|
||||
done();
|
||||
});
|
||||
|
||||
beforeEach(async (done) => {
|
||||
beforeEach(async () => {
|
||||
try {
|
||||
const pngUploadedFile = await uploadActions.uploadFile(pngFileModel.location, pngFileModel.name, documentLibrary);
|
||||
nodeId = pngUploadedFile.entry.id;
|
||||
await loginPage.loginToContentServicesUsingUserModel(adminUser);
|
||||
await navigationBarPage.openContentServicesFolder(documentLibrary);
|
||||
|
||||
contentServices.waitForTableBody();
|
||||
await contentServices.waitForTableBody();
|
||||
} catch (error) {
|
||||
|
||||
}
|
||||
done();
|
||||
|
||||
});
|
||||
|
||||
afterEach(async (done) => {
|
||||
afterEach(async () => {
|
||||
try {
|
||||
await this.alfrescoJsApi.login(adminUser.id, adminUser.password);
|
||||
|
||||
@@ -111,10 +107,10 @@ describe('Lock File', () => {
|
||||
} catch (error) {
|
||||
|
||||
}
|
||||
done();
|
||||
|
||||
});
|
||||
|
||||
afterAll(async (done) => {
|
||||
afterAll(async () => {
|
||||
try {
|
||||
await this.alfrescoJsApi.login(adminUser.id, adminUser.password);
|
||||
|
||||
@@ -125,57 +121,57 @@ describe('Lock File', () => {
|
||||
} catch (error) {
|
||||
|
||||
}
|
||||
done();
|
||||
|
||||
});
|
||||
|
||||
it('[C286604] Should be able to open Lock file option by clicking the lock image', () => {
|
||||
contentServices.lockContent(pngFileModel.name);
|
||||
it('[C286604] Should be able to open Lock file option by clicking the lock image', async () => {
|
||||
await contentServices.lockContent(pngFileModel.name);
|
||||
|
||||
lockFilePage.checkLockFileCheckboxIsDisplayed();
|
||||
lockFilePage.checkCancelButtonIsDisplayed();
|
||||
lockFilePage.checkSaveButtonIsDisplayed();
|
||||
await lockFilePage.checkLockFileCheckboxIsDisplayed();
|
||||
await lockFilePage.checkCancelButtonIsDisplayed();
|
||||
await lockFilePage.checkSaveButtonIsDisplayed();
|
||||
});
|
||||
|
||||
it('[C286625] Should be able to click Cancel to cancel lock file operation', () => {
|
||||
contentServices.lockContent(pngFileModel.name);
|
||||
it('[C286625] Should be able to click Cancel to cancel lock file operation', async () => {
|
||||
await contentServices.lockContent(pngFileModel.name);
|
||||
|
||||
lockFilePage.checkLockFileCheckboxIsDisplayed();
|
||||
lockFilePage.clickCancelButton();
|
||||
await lockFilePage.checkLockFileCheckboxIsDisplayed();
|
||||
await lockFilePage.clickCancelButton();
|
||||
|
||||
contentServices.checkUnlockedIcon(pngFileModel.name);
|
||||
await contentServices.checkUnlockedIcon(pngFileModel.name);
|
||||
});
|
||||
|
||||
it('[C286603] Should be able to click on Lock file checkbox and lock a file', () => {
|
||||
contentServices.lockContent(pngFileToLock.name);
|
||||
it('[C286603] Should be able to click on Lock file checkbox and lock a file', async () => {
|
||||
await contentServices.lockContent(pngFileToLock.name);
|
||||
|
||||
lockFilePage.checkLockFileCheckboxIsDisplayed();
|
||||
lockFilePage.clickLockFileCheckbox();
|
||||
lockFilePage.clickSaveButton();
|
||||
await lockFilePage.checkLockFileCheckboxIsDisplayed();
|
||||
await lockFilePage.clickLockFileCheckbox();
|
||||
await lockFilePage.clickSaveButton();
|
||||
|
||||
contentServices.checkLockedIcon(pngFileToLock.name);
|
||||
await contentServices.checkLockedIcon(pngFileToLock.name);
|
||||
});
|
||||
|
||||
it('[C286618] Should be able to uncheck Lock file checkbox and unlock a file', () => {
|
||||
contentServices.lockContent(pngFileModel.name);
|
||||
it('[C286618] Should be able to uncheck Lock file checkbox and unlock a file', async () => {
|
||||
await contentServices.lockContent(pngFileModel.name);
|
||||
|
||||
lockFilePage.checkLockFileCheckboxIsDisplayed();
|
||||
lockFilePage.clickLockFileCheckbox();
|
||||
lockFilePage.clickSaveButton();
|
||||
await lockFilePage.checkLockFileCheckboxIsDisplayed();
|
||||
await lockFilePage.clickLockFileCheckbox();
|
||||
await lockFilePage.clickSaveButton();
|
||||
|
||||
contentServices.checkLockedIcon(pngFileModel.name);
|
||||
contentServices.lockContent(pngFileModel.name);
|
||||
await contentServices.checkLockedIcon(pngFileModel.name);
|
||||
await contentServices.lockContent(pngFileModel.name);
|
||||
|
||||
lockFilePage.clickLockFileCheckbox();
|
||||
lockFilePage.clickSaveButton();
|
||||
await lockFilePage.clickLockFileCheckbox();
|
||||
await lockFilePage.clickSaveButton();
|
||||
|
||||
contentServices.checkUnlockedIcon(pngFileModel.name);
|
||||
await contentServices.checkUnlockedIcon(pngFileModel.name);
|
||||
});
|
||||
|
||||
});
|
||||
|
||||
describe('Locked file without owner permissions', () => {
|
||||
|
||||
beforeEach(async (done) => {
|
||||
beforeEach(async () => {
|
||||
const pngUploadedFile = await uploadActions.uploadFile(pngFileModel.location, pngFileModel.name, documentLibrary);
|
||||
|
||||
nodeId = pngUploadedFile.entry.id;
|
||||
@@ -184,10 +180,9 @@ describe('Lock File', () => {
|
||||
|
||||
await navigationBarPage.openContentServicesFolder(documentLibrary);
|
||||
|
||||
done();
|
||||
});
|
||||
|
||||
afterEach(async (done) => {
|
||||
afterEach(async () => {
|
||||
await this.alfrescoJsApi.login(adminUser.id, adminUser.password);
|
||||
|
||||
try {
|
||||
@@ -196,67 +191,66 @@ describe('Lock File', () => {
|
||||
} catch (error) {
|
||||
}
|
||||
|
||||
done();
|
||||
});
|
||||
|
||||
it('[C286610] Should not be able to delete a locked file', async () => {
|
||||
contentServices.lockContent(pngFileModel.name);
|
||||
await contentServices.lockContent(pngFileModel.name);
|
||||
|
||||
lockFilePage.checkLockFileCheckboxIsDisplayed();
|
||||
lockFilePage.clickLockFileCheckbox();
|
||||
lockFilePage.clickSaveButton();
|
||||
await lockFilePage.checkLockFileCheckboxIsDisplayed();
|
||||
await lockFilePage.clickLockFileCheckbox();
|
||||
await lockFilePage.clickSaveButton();
|
||||
|
||||
try {
|
||||
await this.alfrescoJsApi.core.nodesApi.deleteNode(nodeId);
|
||||
} catch (error) {
|
||||
expect(error.status).toEqual(409);
|
||||
await expect(error.status).toEqual(409);
|
||||
}
|
||||
|
||||
});
|
||||
|
||||
it('[C286611] Should not be able to rename a locked file', async () => {
|
||||
contentServices.lockContent(pngFileModel.name);
|
||||
await contentServices.lockContent(pngFileModel.name);
|
||||
|
||||
lockFilePage.checkLockFileCheckboxIsDisplayed();
|
||||
lockFilePage.clickLockFileCheckbox();
|
||||
lockFilePage.clickSaveButton();
|
||||
await lockFilePage.checkLockFileCheckboxIsDisplayed();
|
||||
await lockFilePage.clickLockFileCheckbox();
|
||||
await lockFilePage.clickSaveButton();
|
||||
|
||||
try {
|
||||
await this.alfrescoJsApi.core.nodesApi.updateNode(nodeId, { name: 'My new name' });
|
||||
|
||||
} catch (error) {
|
||||
expect(error.status).toEqual(409);
|
||||
await expect(error.status).toEqual(409);
|
||||
}
|
||||
|
||||
});
|
||||
|
||||
it('[C286612] Should not be able to move a locked file', async () => {
|
||||
contentServices.lockContent(pngFileModel.name);
|
||||
await contentServices.lockContent(pngFileModel.name);
|
||||
|
||||
lockFilePage.checkLockFileCheckboxIsDisplayed();
|
||||
lockFilePage.clickLockFileCheckbox();
|
||||
lockFilePage.clickSaveButton();
|
||||
await lockFilePage.checkLockFileCheckboxIsDisplayed();
|
||||
await lockFilePage.clickLockFileCheckbox();
|
||||
await lockFilePage.clickSaveButton();
|
||||
|
||||
try {
|
||||
await this.alfrescoJsApi.core.nodesApi.moveNode(nodeId, { targetParentId: '-my-' });
|
||||
|
||||
} catch (error) {
|
||||
expect(error.status).toEqual(409);
|
||||
await expect(error.status).toEqual(409);
|
||||
}
|
||||
});
|
||||
|
||||
it('[C286613] Should not be able to update a new version on a locked file', async () => {
|
||||
contentServices.lockContent(pngFileModel.name);
|
||||
await contentServices.lockContent(pngFileModel.name);
|
||||
|
||||
lockFilePage.checkLockFileCheckboxIsDisplayed();
|
||||
lockFilePage.clickLockFileCheckbox();
|
||||
lockFilePage.clickSaveButton();
|
||||
await lockFilePage.checkLockFileCheckboxIsDisplayed();
|
||||
await lockFilePage.clickLockFileCheckbox();
|
||||
await lockFilePage.clickSaveButton();
|
||||
|
||||
try {
|
||||
await this.alfrescoJsApi.core.nodesApi.updateNodeContent(nodeId, 'NEW FILE CONTENT');
|
||||
|
||||
} catch (error) {
|
||||
expect(error.status).toEqual(409);
|
||||
await expect(error.status).toEqual(409);
|
||||
}
|
||||
});
|
||||
|
||||
@@ -266,27 +260,27 @@ describe('Lock File', () => {
|
||||
|
||||
let pngFileToBeLocked;
|
||||
|
||||
beforeAll(async (done) => {
|
||||
beforeAll(async () => {
|
||||
try {
|
||||
pngFileToBeLocked = await uploadActions.uploadFile(pngFileToLock.location, pngFileToLock.name, documentLibrary);
|
||||
lockedFileNodeId = pngFileToBeLocked.entry.id;
|
||||
} catch (error) {
|
||||
}
|
||||
done();
|
||||
|
||||
});
|
||||
|
||||
beforeEach(async (done) => {
|
||||
beforeEach(async () => {
|
||||
try {
|
||||
const pngUploadedFile = await uploadActions.uploadFile(pngFileModel.location, pngFileModel.name, documentLibrary);
|
||||
nodeId = pngUploadedFile.entry.id;
|
||||
await loginPage.loginToContentServicesUsingUserModel(adminUser);
|
||||
navigationBarPage.openContentServicesFolder(documentLibrary);
|
||||
await navigationBarPage.openContentServicesFolder(documentLibrary);
|
||||
} catch (error) {
|
||||
}
|
||||
done();
|
||||
|
||||
});
|
||||
|
||||
afterEach(async (done) => {
|
||||
afterEach(async () => {
|
||||
await this.alfrescoJsApi.login(adminUser.id, adminUser.password);
|
||||
|
||||
try {
|
||||
@@ -294,71 +288,69 @@ describe('Lock File', () => {
|
||||
} catch (error) {
|
||||
}
|
||||
|
||||
done();
|
||||
|
||||
});
|
||||
|
||||
it('[C286614] Owner of the locked file should be able to rename if Allow owner to modify is checked', async () => {
|
||||
contentServices.lockContent(pngFileModel.name);
|
||||
await contentServices.lockContent(pngFileModel.name);
|
||||
|
||||
lockFilePage.checkLockFileCheckboxIsDisplayed();
|
||||
lockFilePage.clickLockFileCheckbox();
|
||||
lockFilePage.clickAllowOwnerCheckbox();
|
||||
lockFilePage.clickSaveButton();
|
||||
await lockFilePage.checkLockFileCheckboxIsDisplayed();
|
||||
await lockFilePage.clickLockFileCheckbox();
|
||||
await lockFilePage.clickAllowOwnerCheckbox();
|
||||
await lockFilePage.clickSaveButton();
|
||||
|
||||
try {
|
||||
const response = await this.alfrescoJsApi.core.nodesApi.updateNode(nodeId, { name: 'My new name' });
|
||||
expect(response.entry.name).toEqual('My new name');
|
||||
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 () => {
|
||||
contentServices.lockContent(pngFileModel.name);
|
||||
await contentServices.lockContent(pngFileModel.name);
|
||||
|
||||
lockFilePage.checkLockFileCheckboxIsDisplayed();
|
||||
lockFilePage.clickLockFileCheckbox();
|
||||
lockFilePage.clickAllowOwnerCheckbox();
|
||||
lockFilePage.clickSaveButton();
|
||||
await lockFilePage.checkLockFileCheckboxIsDisplayed();
|
||||
await lockFilePage.clickLockFileCheckbox();
|
||||
await lockFilePage.clickAllowOwnerCheckbox();
|
||||
await lockFilePage.clickSaveButton();
|
||||
|
||||
try {
|
||||
const response = await this.alfrescoJsApi.core.nodesApi.updateNodeContent(nodeId, 'NEW FILE CONTENT');
|
||||
expect(response.entry.modifiedAt).toBeGreaterThan(response.entry.createdAt);
|
||||
await expect(response.entry.modifiedAt).toBeGreaterThan(response.entry.createdAt);
|
||||
} catch (error) {
|
||||
}
|
||||
|
||||
});
|
||||
|
||||
it('[C286616] Owner of the locked file should be able to move if Allow owner to modify is checked', async () => {
|
||||
contentServices.lockContent(pngFileModel.name);
|
||||
await contentServices.lockContent(pngFileModel.name);
|
||||
|
||||
lockFilePage.checkLockFileCheckboxIsDisplayed();
|
||||
lockFilePage.clickLockFileCheckbox();
|
||||
lockFilePage.clickAllowOwnerCheckbox();
|
||||
lockFilePage.clickSaveButton();
|
||||
await lockFilePage.checkLockFileCheckboxIsDisplayed();
|
||||
await lockFilePage.clickLockFileCheckbox();
|
||||
await lockFilePage.clickAllowOwnerCheckbox();
|
||||
await lockFilePage.clickSaveButton();
|
||||
|
||||
try {
|
||||
await this.alfrescoJsApi.core.nodesApi.moveNode(nodeId, { targetParentId: '-my-' });
|
||||
|
||||
const movedFile = await this.alfrescoJsApi.core.nodesApi.getNode(nodeId);
|
||||
|
||||
expect(movedFile.entry.parentId).not.toEqual(documentLibrary);
|
||||
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', () => {
|
||||
contentServices.lockContent(pngFileToLock.name);
|
||||
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);
|
||||
|
||||
lockFilePage.checkLockFileCheckboxIsDisplayed();
|
||||
lockFilePage.clickLockFileCheckbox();
|
||||
lockFilePage.clickAllowOwnerCheckbox();
|
||||
lockFilePage.clickSaveButton();
|
||||
await lockFilePage.checkLockFileCheckboxIsDisplayed();
|
||||
await lockFilePage.clickLockFileCheckbox();
|
||||
await lockFilePage.clickAllowOwnerCheckbox();
|
||||
await lockFilePage.clickSaveButton();
|
||||
|
||||
contentServices.deleteContent(pngFileToBeLocked.entry.name);
|
||||
contentServices.checkContentIsNotDisplayed(pngFileToBeLocked.entry.name);
|
||||
await contentServices.deleteContent(pngFileToBeLocked.entry.name);
|
||||
await contentServices.checkContentIsNotDisplayed(pngFileToBeLocked.entry.name);
|
||||
});
|
||||
|
||||
});
|
||||
|
||||
@@ -43,12 +43,12 @@ describe('Aspect oriented config', () => {
|
||||
const acsUser = new AcsUserModel();
|
||||
|
||||
const pngFileModel = new FileModel({
|
||||
'name': resources.Files.ADF_DOCUMENTS.PNG.file_name,
|
||||
'location': resources.Files.ADF_DOCUMENTS.PNG.file_location
|
||||
name: resources.Files.ADF_DOCUMENTS.PNG.file_name,
|
||||
location: resources.Files.ADF_DOCUMENTS.PNG.file_location
|
||||
});
|
||||
let uploadActions;
|
||||
|
||||
beforeAll(async (done) => {
|
||||
beforeAll(async () => {
|
||||
this.alfrescoJsApi = new AlfrescoApi({
|
||||
provider: 'ECM',
|
||||
hostEcm: browser.params.testConfig.adf_acs.host
|
||||
@@ -81,19 +81,18 @@ describe('Aspect oriented config', () => {
|
||||
|
||||
aspects.entry.aspectNames.push(defaultModel.concat(':', defaultEmptyPropertiesAspect));
|
||||
|
||||
await this.alfrescoJsApi.core.nodesApi.updateNode(uploadedFile.entry.id, {'aspectNames': aspects.entry.aspectNames});
|
||||
await this.alfrescoJsApi.core.nodesApi.updateNode(uploadedFile.entry.id, { aspectNames: aspects.entry.aspectNames });
|
||||
|
||||
done();
|
||||
});
|
||||
|
||||
afterAll(async () => {
|
||||
await navigationBarPage.clickLogoutButton();
|
||||
});
|
||||
|
||||
afterEach(async (done) => {
|
||||
viewerPage.clickCloseButton();
|
||||
contentServicesPage.checkAcsContainer();
|
||||
done();
|
||||
afterEach(async () => {
|
||||
await viewerPage.clickCloseButton();
|
||||
await contentServicesPage.checkAcsContainer();
|
||||
|
||||
});
|
||||
|
||||
it('[C261117] Should be possible restrict the display properties of one an aspect', async () => {
|
||||
@@ -118,23 +117,23 @@ describe('Aspect oriented config', () => {
|
||||
}
|
||||
}));
|
||||
|
||||
navigationBarPage.clickContentServicesButton();
|
||||
await navigationBarPage.clickContentServicesButton();
|
||||
|
||||
viewerPage.viewFile(pngFileModel.name);
|
||||
viewerPage.clickInfoButton();
|
||||
viewerPage.checkInfoSideBarIsDisplayed();
|
||||
metadataViewPage.clickOnPropertiesTab();
|
||||
metadataViewPage.informationButtonIsDisplayed();
|
||||
metadataViewPage.clickOnInformationButton();
|
||||
await viewerPage.viewFile(pngFileModel.name);
|
||||
await viewerPage.clickInfoButton();
|
||||
await viewerPage.checkInfoSideBarIsDisplayed();
|
||||
await metadataViewPage.clickOnPropertiesTab();
|
||||
await metadataViewPage.informationButtonIsDisplayed();
|
||||
await metadataViewPage.clickOnInformationButton();
|
||||
|
||||
metadataViewPage.clickMetadataGroup('IMAGE');
|
||||
metadataViewPage.checkPropertyIsVisible('properties.exif:pixelXDimension', 'textitem');
|
||||
metadataViewPage.checkPropertyIsVisible('properties.exif:pixelYDimension', 'textitem');
|
||||
metadataViewPage.checkPropertyIsNotVisible('properties.exif:isoSpeedRatings', 'textitem');
|
||||
await metadataViewPage.clickMetadataGroup('IMAGE');
|
||||
await metadataViewPage.checkPropertyIsVisible('properties.exif:pixelXDimension', 'textitem');
|
||||
await metadataViewPage.checkPropertyIsVisible('properties.exif:pixelYDimension', 'textitem');
|
||||
await metadataViewPage.checkPropertyIsNotVisible('properties.exif:isoSpeedRatings', 'textitem');
|
||||
|
||||
metadataViewPage.editIconClick();
|
||||
await metadataViewPage.editIconClick();
|
||||
|
||||
metadataViewPage.checkPropertyIsVisible('properties.exif:isoSpeedRatings', 'textitem');
|
||||
await metadataViewPage.checkPropertyIsVisible('properties.exif:isoSpeedRatings', 'textitem');
|
||||
});
|
||||
|
||||
it('[C260185] Should ignore not existing aspect when present in the configuration', async () => {
|
||||
@@ -149,37 +148,37 @@ describe('Aspect oriented config', () => {
|
||||
}
|
||||
}));
|
||||
|
||||
navigationBarPage.clickContentServicesButton();
|
||||
await navigationBarPage.clickContentServicesButton();
|
||||
|
||||
viewerPage.viewFile(pngFileModel.name);
|
||||
viewerPage.clickInfoButton();
|
||||
viewerPage.checkInfoSideBarIsDisplayed();
|
||||
metadataViewPage.clickOnPropertiesTab();
|
||||
metadataViewPage.informationButtonIsDisplayed();
|
||||
metadataViewPage.clickOnInformationButton();
|
||||
await viewerPage.viewFile(pngFileModel.name);
|
||||
await viewerPage.clickInfoButton();
|
||||
await viewerPage.checkInfoSideBarIsDisplayed();
|
||||
await metadataViewPage.clickOnPropertiesTab();
|
||||
await metadataViewPage.informationButtonIsDisplayed();
|
||||
await metadataViewPage.clickOnInformationButton();
|
||||
|
||||
metadataViewPage.checkMetadataGroupIsPresent('EXIF');
|
||||
metadataViewPage.checkMetadataGroupIsPresent('properties');
|
||||
metadataViewPage.checkMetadataGroupIsPresent('Versionable');
|
||||
metadataViewPage.checkMetadataGroupIsNotPresent('exists');
|
||||
await metadataViewPage.checkMetadataGroupIsPresent('EXIF');
|
||||
await metadataViewPage.checkMetadataGroupIsPresent('properties');
|
||||
await metadataViewPage.checkMetadataGroupIsPresent('Versionable');
|
||||
await metadataViewPage.checkMetadataGroupIsNotPresent('exists');
|
||||
});
|
||||
|
||||
it('[C260183] Should show all the aspect if the content-metadata configuration is NOT provided', async () => {
|
||||
|
||||
await LocalStorageUtil.setConfigField('content-metadata', '{}');
|
||||
|
||||
navigationBarPage.clickContentServicesButton();
|
||||
await navigationBarPage.clickContentServicesButton();
|
||||
|
||||
viewerPage.viewFile(pngFileModel.name);
|
||||
viewerPage.clickInfoButton();
|
||||
viewerPage.checkInfoSideBarIsDisplayed();
|
||||
metadataViewPage.clickOnPropertiesTab();
|
||||
metadataViewPage.informationButtonIsDisplayed();
|
||||
metadataViewPage.clickOnInformationButton();
|
||||
await viewerPage.viewFile(pngFileModel.name);
|
||||
await viewerPage.clickInfoButton();
|
||||
await viewerPage.checkInfoSideBarIsDisplayed();
|
||||
await metadataViewPage.clickOnPropertiesTab();
|
||||
await metadataViewPage.informationButtonIsDisplayed();
|
||||
await metadataViewPage.clickOnInformationButton();
|
||||
|
||||
metadataViewPage.checkMetadataGroupIsPresent('EXIF');
|
||||
metadataViewPage.checkMetadataGroupIsPresent('properties');
|
||||
metadataViewPage.checkMetadataGroupIsPresent('Versionable');
|
||||
await metadataViewPage.checkMetadataGroupIsPresent('EXIF');
|
||||
await metadataViewPage.checkMetadataGroupIsPresent('properties');
|
||||
await metadataViewPage.checkMetadataGroupIsPresent('Versionable');
|
||||
});
|
||||
|
||||
it('[C260182] Should show all the aspects if the default configuration contains the star symbol', async () => {
|
||||
@@ -190,19 +189,18 @@ describe('Aspect oriented config', () => {
|
||||
}
|
||||
}));
|
||||
|
||||
navigationBarPage.clickContentServicesButton();
|
||||
await navigationBarPage.clickContentServicesButton();
|
||||
|
||||
viewerPage.viewFile(pngFileModel.name);
|
||||
viewerPage.clickInfoButton();
|
||||
viewerPage.checkInfoSideBarIsDisplayed();
|
||||
metadataViewPage.clickOnPropertiesTab();
|
||||
await viewerPage.viewFile(pngFileModel.name);
|
||||
await viewerPage.clickInfoButton();
|
||||
await viewerPage.checkInfoSideBarIsDisplayed();
|
||||
await metadataViewPage.clickOnPropertiesTab();
|
||||
await metadataViewPage.informationButtonIsDisplayed();
|
||||
await metadataViewPage.clickOnInformationButton();
|
||||
|
||||
metadataViewPage.informationButtonIsDisplayed();
|
||||
metadataViewPage.clickOnInformationButton();
|
||||
|
||||
metadataViewPage.checkMetadataGroupIsPresent('EXIF');
|
||||
metadataViewPage.checkMetadataGroupIsPresent('properties');
|
||||
metadataViewPage.checkMetadataGroupIsPresent('Versionable');
|
||||
await metadataViewPage.checkMetadataGroupIsPresent('EXIF');
|
||||
await metadataViewPage.checkMetadataGroupIsPresent('properties');
|
||||
await metadataViewPage.checkMetadataGroupIsPresent('Versionable');
|
||||
});
|
||||
|
||||
it('[C268899] Should be possible use a Translation key as Title of a metadata group', async () => {
|
||||
@@ -232,21 +230,21 @@ describe('Aspect oriented config', () => {
|
||||
' }' +
|
||||
'}');
|
||||
|
||||
navigationBarPage.clickContentServicesButton();
|
||||
await navigationBarPage.clickContentServicesButton();
|
||||
|
||||
viewerPage.viewFile(pngFileModel.name);
|
||||
viewerPage.clickInfoButton();
|
||||
viewerPage.checkInfoSideBarIsDisplayed();
|
||||
metadataViewPage.clickOnPropertiesTab();
|
||||
await viewerPage.viewFile(pngFileModel.name);
|
||||
await viewerPage.clickInfoButton();
|
||||
await viewerPage.checkInfoSideBarIsDisplayed();
|
||||
await metadataViewPage.clickOnPropertiesTab();
|
||||
|
||||
metadataViewPage.informationButtonIsDisplayed();
|
||||
metadataViewPage.clickOnInformationButton();
|
||||
await metadataViewPage.informationButtonIsDisplayed();
|
||||
await metadataViewPage.clickOnInformationButton();
|
||||
|
||||
metadataViewPage.checkMetadataGroupIsPresent('GROUP-TITLE1-TRANSLATION-KEY');
|
||||
metadataViewPage.checkMetadataGroupIsPresent('GROUP-TITLE2-TRANSLATION-KEY');
|
||||
await metadataViewPage.checkMetadataGroupIsPresent('GROUP-TITLE1-TRANSLATION-KEY');
|
||||
await metadataViewPage.checkMetadataGroupIsPresent('GROUP-TITLE2-TRANSLATION-KEY');
|
||||
|
||||
expect(metadataViewPage.getMetadataGroupTitle('GROUP-TITLE1-TRANSLATION-KEY')).toBe('CUSTOM TITLE TRANSLATION ONE');
|
||||
expect(metadataViewPage.getMetadataGroupTitle('GROUP-TITLE2-TRANSLATION-KEY')).toBe('CUSTOM TITLE TRANSLATION TWO');
|
||||
await expect(await metadataViewPage.getMetadataGroupTitle('GROUP-TITLE1-TRANSLATION-KEY')).toBe('CUSTOM TITLE TRANSLATION ONE');
|
||||
await expect(await metadataViewPage.getMetadataGroupTitle('GROUP-TITLE2-TRANSLATION-KEY')).toBe('CUSTOM TITLE TRANSLATION TWO');
|
||||
|
||||
});
|
||||
|
||||
@@ -261,23 +259,22 @@ describe('Aspect oriented config', () => {
|
||||
' }' +
|
||||
'}');
|
||||
|
||||
navigationBarPage.clickContentServicesButton();
|
||||
await navigationBarPage.clickContentServicesButton();
|
||||
|
||||
viewerPage.viewFile(pngFileModel.name);
|
||||
viewerPage.clickInfoButton();
|
||||
viewerPage.checkInfoSideBarIsDisplayed();
|
||||
metadataViewPage.clickOnPropertiesTab();
|
||||
await viewerPage.viewFile(pngFileModel.name);
|
||||
await viewerPage.clickInfoButton();
|
||||
await viewerPage.checkInfoSideBarIsDisplayed();
|
||||
await metadataViewPage.clickOnPropertiesTab();
|
||||
|
||||
check(metadataViewPage.presetSwitch);
|
||||
await check(metadataViewPage.presetSwitch);
|
||||
|
||||
metadataViewPage.enterPresetText('custom-preset');
|
||||
await metadataViewPage.enterPresetText('custom-preset');
|
||||
|
||||
metadataViewPage.informationButtonIsDisplayed();
|
||||
metadataViewPage.clickOnInformationButton();
|
||||
await metadataViewPage.informationButtonIsDisplayed();
|
||||
await metadataViewPage.clickOnInformationButton();
|
||||
|
||||
metadataViewPage.checkMetadataGroupIsPresent('properties');
|
||||
metadataViewPage.checkMetadataGroupIsPresent('EXIF');
|
||||
metadataViewPage.checkMetadataGroupIsPresent('Versionable');
|
||||
await metadataViewPage.checkMetadataGroupIsPresent('properties');
|
||||
await metadataViewPage.checkMetadataGroupIsPresent('Versionable');
|
||||
});
|
||||
|
||||
it('[C299186] The aspect without properties is not displayed', async () => {
|
||||
@@ -290,17 +287,17 @@ describe('Aspect oriented config', () => {
|
||||
' }' +
|
||||
'}');
|
||||
|
||||
navigationBarPage.clickContentServicesButton();
|
||||
await navigationBarPage.clickContentServicesButton();
|
||||
|
||||
viewerPage.viewFile(pngFileModel.name);
|
||||
viewerPage.clickInfoButton();
|
||||
viewerPage.checkInfoSideBarIsDisplayed();
|
||||
metadataViewPage.clickOnPropertiesTab();
|
||||
await viewerPage.viewFile(pngFileModel.name);
|
||||
await viewerPage.clickInfoButton();
|
||||
await viewerPage.checkInfoSideBarIsDisplayed();
|
||||
await metadataViewPage.clickOnPropertiesTab();
|
||||
|
||||
metadataViewPage.informationButtonIsDisplayed();
|
||||
metadataViewPage.clickOnInformationButton();
|
||||
await metadataViewPage.informationButtonIsDisplayed();
|
||||
await metadataViewPage.clickOnInformationButton();
|
||||
|
||||
metadataViewPage.checkMetadataGroupIsNotPresent(emptyAspectName);
|
||||
await metadataViewPage.checkMetadataGroupIsNotPresent(emptyAspectName);
|
||||
});
|
||||
|
||||
it('[C299187] The aspect with empty properties is displayed when edit', async () => {
|
||||
@@ -313,20 +310,20 @@ describe('Aspect oriented config', () => {
|
||||
' }' +
|
||||
'}');
|
||||
|
||||
navigationBarPage.clickContentServicesButton();
|
||||
await navigationBarPage.clickContentServicesButton();
|
||||
|
||||
viewerPage.viewFile(pngFileModel.name);
|
||||
viewerPage.clickInfoButton();
|
||||
viewerPage.checkInfoSideBarIsDisplayed();
|
||||
metadataViewPage.clickOnPropertiesTab();
|
||||
await viewerPage.viewFile(pngFileModel.name);
|
||||
await viewerPage.clickInfoButton();
|
||||
await viewerPage.checkInfoSideBarIsDisplayed();
|
||||
await metadataViewPage.clickOnPropertiesTab();
|
||||
|
||||
metadataViewPage.informationButtonIsDisplayed();
|
||||
metadataViewPage.clickOnInformationButton();
|
||||
await metadataViewPage.informationButtonIsDisplayed();
|
||||
await metadataViewPage.clickOnInformationButton();
|
||||
|
||||
metadataViewPage.checkMetadataGroupIsNotPresent(aspectName);
|
||||
await metadataViewPage.checkMetadataGroupIsNotPresent(aspectName);
|
||||
|
||||
metadataViewPage.editIconClick();
|
||||
await metadataViewPage.editIconClick();
|
||||
|
||||
metadataViewPage.checkMetadataGroupIsPresent(aspectName);
|
||||
await metadataViewPage.checkMetadataGroupIsPresent(aspectName);
|
||||
});
|
||||
});
|
||||
|
||||
@@ -52,8 +52,8 @@ describe('permissions', () => {
|
||||
let site;
|
||||
|
||||
const pngFileModel = new FileModel({
|
||||
'name': resources.Files.ADF_DOCUMENTS.PNG.file_name,
|
||||
'location': resources.Files.ADF_DOCUMENTS.PNG.file_location
|
||||
name: resources.Files.ADF_DOCUMENTS.PNG.file_name,
|
||||
location: resources.Files.ADF_DOCUMENTS.PNG.file_location
|
||||
});
|
||||
this.alfrescoJsApi = new AlfrescoApi({
|
||||
provider: 'ECM',
|
||||
@@ -61,7 +61,7 @@ describe('permissions', () => {
|
||||
});
|
||||
const uploadActions = new UploadActions(this.alfrescoJsApi);
|
||||
|
||||
beforeAll(async (done) => {
|
||||
beforeAll(async () => {
|
||||
|
||||
await this.alfrescoJsApi.login(browser.params.testConfig.adf.adminEmail, browser.params.testConfig.adf.adminPassword);
|
||||
|
||||
@@ -91,7 +91,6 @@ describe('permissions', () => {
|
||||
|
||||
await uploadActions.uploadFile(pngFileModel.location, pngFileModel.name, site.entry.guid);
|
||||
|
||||
done();
|
||||
});
|
||||
|
||||
afterAll(async () => {
|
||||
@@ -102,52 +101,52 @@ describe('permissions', () => {
|
||||
it('[C274692] Should not be possible edit metadata properties when the user is a consumer user', async () => {
|
||||
await loginPage.loginToContentServicesUsingUserModel(consumerUser);
|
||||
|
||||
navigationBarPage.openContentServicesFolder(site.entry.guid);
|
||||
await navigationBarPage.openContentServicesFolder(site.entry.guid);
|
||||
|
||||
viewerPage.viewFile(pngFileModel.name);
|
||||
viewerPage.clickInfoButton();
|
||||
viewerPage.checkInfoSideBarIsDisplayed();
|
||||
metadataViewPage.clickOnPropertiesTab();
|
||||
metadataViewPage.editIconIsNotDisplayed();
|
||||
await viewerPage.viewFile(pngFileModel.name);
|
||||
await viewerPage.clickInfoButton();
|
||||
await viewerPage.checkInfoSideBarIsDisplayed();
|
||||
await metadataViewPage.clickOnPropertiesTab();
|
||||
await metadataViewPage.editIconIsNotDisplayed();
|
||||
});
|
||||
|
||||
it('[C279971] Should be possible edit metadata properties when the user is a collaborator user', async () => {
|
||||
await loginPage.loginToContentServicesUsingUserModel(collaboratorUser);
|
||||
|
||||
navigationBarPage.openContentServicesFolder(site.entry.guid);
|
||||
await navigationBarPage.openContentServicesFolder(site.entry.guid);
|
||||
|
||||
viewerPage.viewFile(pngFileModel.name);
|
||||
viewerPage.clickInfoButton();
|
||||
viewerPage.checkInfoSideBarIsDisplayed();
|
||||
metadataViewPage.clickOnPropertiesTab();
|
||||
metadataViewPage.editIconIsDisplayed();
|
||||
await viewerPage.viewFile(pngFileModel.name);
|
||||
await viewerPage.clickInfoButton();
|
||||
await viewerPage.checkInfoSideBarIsDisplayed();
|
||||
await metadataViewPage.clickOnPropertiesTab();
|
||||
await metadataViewPage.editIconIsDisplayed();
|
||||
|
||||
expect(viewerPage.getActiveTab()).toEqual(METADATA.PROPERTY_TAB);
|
||||
await expect(await viewerPage.getActiveTab()).toEqual(METADATA.PROPERTY_TAB);
|
||||
|
||||
metadataViewPage.clickOnInformationButton();
|
||||
await metadataViewPage.clickOnInformationButton();
|
||||
|
||||
metadataViewPage.clickMetadataGroup('EXIF');
|
||||
await metadataViewPage.clickMetadataGroup('EXIF');
|
||||
|
||||
metadataViewPage.editIconIsDisplayed();
|
||||
await metadataViewPage.editIconIsDisplayed();
|
||||
});
|
||||
|
||||
it('[C279972] Should be possible edit metadata properties when the user is a contributor user', async () => {
|
||||
await loginPage.loginToContentServicesUsingUserModel(collaboratorUser);
|
||||
|
||||
navigationBarPage.openContentServicesFolder(site.entry.guid);
|
||||
await navigationBarPage.openContentServicesFolder(site.entry.guid);
|
||||
|
||||
viewerPage.viewFile(pngFileModel.name);
|
||||
viewerPage.clickInfoButton();
|
||||
viewerPage.checkInfoSideBarIsDisplayed();
|
||||
metadataViewPage.clickOnPropertiesTab();
|
||||
metadataViewPage.editIconIsDisplayed();
|
||||
await viewerPage.viewFile(pngFileModel.name);
|
||||
await viewerPage.clickInfoButton();
|
||||
await viewerPage.checkInfoSideBarIsDisplayed();
|
||||
await metadataViewPage.clickOnPropertiesTab();
|
||||
await metadataViewPage.editIconIsDisplayed();
|
||||
|
||||
expect(viewerPage.getActiveTab()).toEqual(METADATA.PROPERTY_TAB);
|
||||
await expect(await viewerPage.getActiveTab()).toEqual(METADATA.PROPERTY_TAB);
|
||||
|
||||
metadataViewPage.clickOnInformationButton();
|
||||
await metadataViewPage.clickOnInformationButton();
|
||||
|
||||
metadataViewPage.clickMetadataGroup('EXIF');
|
||||
await metadataViewPage.clickMetadataGroup('EXIF');
|
||||
|
||||
metadataViewPage.editIconIsDisplayed();
|
||||
await metadataViewPage.editIconIsDisplayed();
|
||||
});
|
||||
});
|
||||
|
||||
@@ -51,8 +51,8 @@ describe('CardView Component - properties', () => {
|
||||
const acsUser = new AcsUserModel();
|
||||
|
||||
const pngFileModel = new FileModel({
|
||||
'name': resources.Files.ADF_DOCUMENTS.PNG.file_name,
|
||||
'location': resources.Files.ADF_DOCUMENTS.PNG.file_location
|
||||
name: resources.Files.ADF_DOCUMENTS.PNG.file_name,
|
||||
location: resources.Files.ADF_DOCUMENTS.PNG.file_location
|
||||
});
|
||||
this.alfrescoJsApi = new AlfrescoApi({
|
||||
provider: 'ECM',
|
||||
@@ -60,7 +60,7 @@ describe('CardView Component - properties', () => {
|
||||
});
|
||||
const uploadActions = new UploadActions(this.alfrescoJsApi);
|
||||
|
||||
beforeAll(async (done) => {
|
||||
beforeAll(async () => {
|
||||
|
||||
await this.alfrescoJsApi.login(browser.params.testConfig.adf.adminEmail, browser.params.testConfig.adf.adminPassword);
|
||||
await this.alfrescoJsApi.core.peopleApi.addPerson(acsUser);
|
||||
@@ -74,139 +74,133 @@ describe('CardView Component - properties', () => {
|
||||
|
||||
await loginPage.loginToContentServicesUsingUserModel(acsUser);
|
||||
|
||||
navigationBarPage.clickContentServicesButton();
|
||||
contentServicesPage.waitForTableBody();
|
||||
|
||||
done();
|
||||
});
|
||||
|
||||
afterAll(async () => {
|
||||
await navigationBarPage.clickLogoutButton();
|
||||
});
|
||||
|
||||
afterEach(() => {
|
||||
viewerPage.clickCloseButton();
|
||||
});
|
||||
|
||||
it('[C246516] Should show/hide the empty metadata when the property displayEmpty is true/false', () => {
|
||||
viewerPage.viewFile(pngFileModel.name);
|
||||
viewerPage.clickInfoButton();
|
||||
viewerPage.checkInfoSideBarIsDisplayed();
|
||||
metadataViewPage.clickOnPropertiesTab();
|
||||
metadataViewPage.editIconIsDisplayed();
|
||||
|
||||
expect(viewerPage.getActiveTab()).toEqual(METADATA.PROPERTY_TAB);
|
||||
|
||||
metadataViewPage.clickOnInformationButton();
|
||||
|
||||
metadataViewPage.clickMetadataGroup('EXIF');
|
||||
|
||||
metadataViewPage.checkPropertyIsVisible('properties.exif:flash', 'boolean');
|
||||
metadataViewPage.checkPropertyIsNotVisible('properties.exif:model', 'textitem');
|
||||
|
||||
check(metadataViewPage.displayEmptySwitch);
|
||||
|
||||
metadataViewPage.checkPropertyIsVisible('properties.exif:flash', 'boolean');
|
||||
metadataViewPage.checkPropertyIsVisible('properties.exif:model', 'textitem');
|
||||
});
|
||||
|
||||
it('[C260179] Should not be possible edit the basic property when readOnly is true', () => {
|
||||
viewerPage.viewFile(pngFileModel.name);
|
||||
viewerPage.clickInfoButton();
|
||||
viewerPage.checkInfoSideBarIsDisplayed();
|
||||
metadataViewPage.clickOnPropertiesTab();
|
||||
metadataViewPage.editIconIsDisplayed();
|
||||
|
||||
check(metadataViewPage.readonlySwitch);
|
||||
|
||||
metadataViewPage.editIconIsNotDisplayed();
|
||||
});
|
||||
|
||||
it('[C268965] Should multi property allow expand multi accordion at the same time when set', () => {
|
||||
viewerPage.viewFile(pngFileModel.name);
|
||||
viewerPage.clickInfoButton();
|
||||
viewerPage.checkInfoSideBarIsDisplayed();
|
||||
metadataViewPage.clickOnPropertiesTab();
|
||||
|
||||
metadataViewPage.clickOnInformationButton();
|
||||
|
||||
metadataViewPage.checkMetadataGroupIsNotExpand('EXIF');
|
||||
metadataViewPage.checkMetadataGroupIsNotExpand('properties');
|
||||
|
||||
metadataViewPage.clickMetadataGroup('properties');
|
||||
|
||||
metadataViewPage.checkMetadataGroupIsNotExpand('EXIF');
|
||||
metadataViewPage.checkMetadataGroupIsExpand('properties');
|
||||
|
||||
metadataViewPage.clickMetadataGroup('EXIF');
|
||||
|
||||
metadataViewPage.checkMetadataGroupIsExpand('EXIF');
|
||||
metadataViewPage.checkMetadataGroupIsNotExpand('properties');
|
||||
|
||||
check(metadataViewPage.multiSwitch);
|
||||
|
||||
metadataViewPage.clickMetadataGroup('properties');
|
||||
|
||||
metadataViewPage.checkMetadataGroupIsExpand('EXIF');
|
||||
metadataViewPage.checkMetadataGroupIsExpand('properties');
|
||||
await navigationBarPage.clickContentServicesButton();
|
||||
await contentServicesPage.waitForTableBody();
|
||||
|
||||
});
|
||||
|
||||
it('[C280559] Should show/hide the default metadata properties when displayDefaultProperties is true/false', () => {
|
||||
viewerPage.viewFile(pngFileModel.name);
|
||||
viewerPage.clickInfoButton();
|
||||
viewerPage.checkInfoSideBarIsDisplayed();
|
||||
metadataViewPage.clickOnPropertiesTab();
|
||||
|
||||
uncheck(metadataViewPage.defaultPropertiesSwitch);
|
||||
|
||||
metadataViewPage.checkMetadataGroupIsNotPresent('properties');
|
||||
metadataViewPage.checkMetadataGroupIsPresent('EXIF');
|
||||
metadataViewPage.checkMetadataGroupIsExpand('EXIF');
|
||||
|
||||
check(metadataViewPage.defaultPropertiesSwitch);
|
||||
|
||||
metadataViewPage.checkMetadataGroupIsPresent('properties');
|
||||
metadataViewPage.checkMetadataGroupIsExpand('properties');
|
||||
afterEach(async () => {
|
||||
await viewerPage.clickCloseButton();
|
||||
});
|
||||
|
||||
it('[C280560] Should show/hide the more properties button when displayDefaultProperties is true/false', () => {
|
||||
viewerPage.viewFile(pngFileModel.name);
|
||||
viewerPage.clickInfoButton();
|
||||
viewerPage.checkInfoSideBarIsDisplayed();
|
||||
metadataViewPage.clickOnPropertiesTab();
|
||||
it('[C246516] Should show/hide the empty metadata when the property displayEmpty is true/false', async () => {
|
||||
await viewerPage.viewFile(pngFileModel.name);
|
||||
await viewerPage.clickInfoButton();
|
||||
await viewerPage.checkInfoSideBarIsDisplayed();
|
||||
await metadataViewPage.clickOnPropertiesTab();
|
||||
await metadataViewPage.editIconIsDisplayed();
|
||||
|
||||
metadataViewPage.informationButtonIsDisplayed();
|
||||
await expect(await viewerPage.getActiveTab()).toEqual(METADATA.PROPERTY_TAB);
|
||||
|
||||
uncheck(metadataViewPage.defaultPropertiesSwitch);
|
||||
await metadataViewPage.clickOnInformationButton();
|
||||
|
||||
metadataViewPage.informationButtonIsNotDisplayed();
|
||||
await metadataViewPage.clickMetadataGroup('EXIF');
|
||||
|
||||
await metadataViewPage.checkPropertyIsVisible('properties.exif:flash', 'boolean');
|
||||
await metadataViewPage.checkPropertyIsNotVisible('properties.exif:model', 'textitem');
|
||||
|
||||
await check(metadataViewPage.displayEmptySwitch);
|
||||
|
||||
await metadataViewPage.checkPropertyIsVisible('properties.exif:flash', 'boolean');
|
||||
await metadataViewPage.checkPropertyIsVisible('properties.exif:model', 'textitem');
|
||||
});
|
||||
|
||||
it('[C307975] Should be able to choose which aspect to show expanded in the info-drawer', () => {
|
||||
viewerPage.viewFile(pngFileModel.name);
|
||||
viewerPage.clickInfoButton();
|
||||
viewerPage.checkInfoSideBarIsDisplayed();
|
||||
metadataViewPage.clickOnPropertiesTab();
|
||||
it('[C260179] Should not be possible edit the basic property when readOnly is true', async () => {
|
||||
await viewerPage.viewFile(pngFileModel.name);
|
||||
await viewerPage.clickInfoButton();
|
||||
await viewerPage.checkInfoSideBarIsDisplayed();
|
||||
await metadataViewPage.clickOnPropertiesTab();
|
||||
await metadataViewPage.editIconIsDisplayed();
|
||||
|
||||
metadataViewPage.typeAspectName('EXIF');
|
||||
metadataViewPage.clickApplyAspect();
|
||||
await check(metadataViewPage.readonlySwitch);
|
||||
|
||||
metadataViewPage.checkMetadataGroupIsExpand('EXIF');
|
||||
metadataViewPage.checkMetadataGroupIsNotExpand('properties');
|
||||
check(metadataViewPage.displayEmptySwitch);
|
||||
await metadataViewPage.editIconIsNotDisplayed();
|
||||
});
|
||||
|
||||
metadataViewPage.checkPropertyIsVisible('properties.exif:flash', 'boolean');
|
||||
metadataViewPage.checkPropertyIsVisible('properties.exif:model', 'textitem');
|
||||
it('[C268965] Should multi property allow expand multi accordion at the same time when set', async () => {
|
||||
await viewerPage.viewFile(pngFileModel.name);
|
||||
await viewerPage.clickInfoButton();
|
||||
await viewerPage.checkInfoSideBarIsDisplayed();
|
||||
await metadataViewPage.clickOnPropertiesTab();
|
||||
|
||||
metadataViewPage.typeAspectName('nonexistent');
|
||||
metadataViewPage.clickApplyAspect();
|
||||
metadataViewPage.checkMetadataGroupIsNotPresent('nonexistent');
|
||||
await metadataViewPage.clickOnInformationButton();
|
||||
|
||||
metadataViewPage.typeAspectName('Properties');
|
||||
metadataViewPage.clickApplyAspect();
|
||||
metadataViewPage.checkMetadataGroupIsPresent('properties');
|
||||
metadataViewPage.checkMetadataGroupIsExpand('properties');
|
||||
await metadataViewPage.checkMetadataGroupIsNotExpand('EXIF');
|
||||
await metadataViewPage.checkMetadataGroupIsNotExpand('properties');
|
||||
|
||||
await metadataViewPage.clickMetadataGroup('properties');
|
||||
|
||||
await metadataViewPage.checkMetadataGroupIsNotExpand('EXIF');
|
||||
await metadataViewPage.checkMetadataGroupIsExpand('properties');
|
||||
|
||||
await metadataViewPage.clickMetadataGroup('EXIF');
|
||||
|
||||
await metadataViewPage.checkMetadataGroupIsExpand('EXIF');
|
||||
await metadataViewPage.checkMetadataGroupIsNotExpand('properties');
|
||||
|
||||
await check(metadataViewPage.multiSwitch);
|
||||
|
||||
await metadataViewPage.clickMetadataGroup('properties');
|
||||
|
||||
await metadataViewPage.checkMetadataGroupIsExpand('EXIF');
|
||||
await metadataViewPage.checkMetadataGroupIsExpand('properties');
|
||||
|
||||
});
|
||||
|
||||
it('[C280559] Should show/hide the default metadata properties when displayDefaultProperties is true/false', async () => {
|
||||
await viewerPage.viewFile(pngFileModel.name);
|
||||
await viewerPage.clickInfoButton();
|
||||
await viewerPage.checkInfoSideBarIsDisplayed();
|
||||
await metadataViewPage.clickOnPropertiesTab();
|
||||
|
||||
await uncheck(metadataViewPage.defaultPropertiesSwitch);
|
||||
|
||||
await metadataViewPage.checkMetadataGroupIsNotPresent('properties');
|
||||
await metadataViewPage.checkMetadataGroupIsPresent('EXIF');
|
||||
await metadataViewPage.checkMetadataGroupIsExpand('EXIF');
|
||||
|
||||
await check(metadataViewPage.defaultPropertiesSwitch);
|
||||
|
||||
await metadataViewPage.checkMetadataGroupIsPresent('properties');
|
||||
await metadataViewPage.checkMetadataGroupIsExpand('properties');
|
||||
});
|
||||
|
||||
it('[C280560] Should show/hide the more properties button when displayDefaultProperties is true/false', async () => {
|
||||
await viewerPage.viewFile(pngFileModel.name);
|
||||
await viewerPage.clickInfoButton();
|
||||
await viewerPage.checkInfoSideBarIsDisplayed();
|
||||
await metadataViewPage.clickOnPropertiesTab();
|
||||
|
||||
await metadataViewPage.informationButtonIsDisplayed();
|
||||
|
||||
await uncheck(metadataViewPage.defaultPropertiesSwitch);
|
||||
|
||||
await metadataViewPage.informationButtonIsNotDisplayed();
|
||||
});
|
||||
|
||||
it('[C307975] Should be able to choose which aspect to show expanded in the info-drawer', async () => {
|
||||
await viewerPage.viewFile(pngFileModel.name);
|
||||
await viewerPage.clickInfoButton();
|
||||
await viewerPage.checkInfoSideBarIsDisplayed();
|
||||
await metadataViewPage.clickOnPropertiesTab();
|
||||
|
||||
await metadataViewPage.typeAspectName('EXIF');
|
||||
await metadataViewPage.clickApplyAspect();
|
||||
|
||||
await metadataViewPage.checkMetadataGroupIsExpand('EXIF');
|
||||
await metadataViewPage.checkMetadataGroupIsNotExpand('properties');
|
||||
await check(metadataViewPage.displayEmptySwitch);
|
||||
|
||||
await metadataViewPage.checkPropertyIsVisible('properties.exif:flash', 'boolean');
|
||||
await metadataViewPage.checkPropertyIsVisible('properties.exif:model', 'textitem');
|
||||
|
||||
await metadataViewPage.typeAspectName('nonexistent');
|
||||
await metadataViewPage.clickApplyAspect();
|
||||
await metadataViewPage.checkMetadataGroupIsNotPresent('nonexistent');
|
||||
|
||||
await metadataViewPage.typeAspectName('Properties');
|
||||
await metadataViewPage.clickApplyAspect();
|
||||
await metadataViewPage.checkMetadataGroupIsPresent('properties');
|
||||
await metadataViewPage.checkMetadataGroupIsExpand('properties');
|
||||
});
|
||||
});
|
||||
|
||||
@@ -56,8 +56,8 @@ describe('Metadata component', () => {
|
||||
const folderName = 'Metadata Folder';
|
||||
|
||||
const pngFileModel = new FileModel({
|
||||
'name': resources.Files.ADF_DOCUMENTS.PNG.file_name,
|
||||
'location': resources.Files.ADF_DOCUMENTS.PNG.file_location
|
||||
name: resources.Files.ADF_DOCUMENTS.PNG.file_name,
|
||||
location: resources.Files.ADF_DOCUMENTS.PNG.file_location
|
||||
});
|
||||
|
||||
this.alfrescoJsApi = new AlfrescoApi({
|
||||
@@ -67,21 +67,14 @@ describe('Metadata component', () => {
|
||||
|
||||
const uploadActions = new UploadActions(this.alfrescoJsApi);
|
||||
|
||||
beforeAll(async (done) => {
|
||||
|
||||
beforeAll(async () => {
|
||||
await this.alfrescoJsApi.login(browser.params.testConfig.adf.adminEmail, browser.params.testConfig.adf.adminPassword);
|
||||
|
||||
await this.alfrescoJsApi.core.peopleApi.addPerson(acsUser);
|
||||
|
||||
await this.alfrescoJsApi.login(acsUser.id, acsUser.password);
|
||||
|
||||
const pngUploadedFile = await uploadActions.uploadFile(pngFileModel.location, pngFileModel.name, '-my-');
|
||||
|
||||
Object.assign(pngFileModel, pngUploadedFile.entry);
|
||||
|
||||
pngFileModel.update(pngUploadedFile.entry);
|
||||
|
||||
done();
|
||||
});
|
||||
|
||||
afterAll(async () => {
|
||||
@@ -92,9 +85,8 @@ describe('Metadata component', () => {
|
||||
|
||||
beforeAll(async () => {
|
||||
await loginPage.loginToContentServicesUsingUserModel(acsUser);
|
||||
navigationBarPage.clickContentServicesButton();
|
||||
contentServicesPage.waitForTableBody();
|
||||
|
||||
await navigationBarPage.clickContentServicesButton();
|
||||
await contentServicesPage.waitForTableBody();
|
||||
await LocalStorageUtil.setConfigField('content-metadata', JSON.stringify({
|
||||
presets: {
|
||||
default: {
|
||||
@@ -104,194 +96,193 @@ describe('Metadata component', () => {
|
||||
}));
|
||||
});
|
||||
|
||||
beforeEach(async (done) => {
|
||||
viewerPage.viewFile(pngFileModel.name);
|
||||
viewerPage.checkFileIsLoaded();
|
||||
done();
|
||||
beforeEach(async () => {
|
||||
await viewerPage.viewFile(pngFileModel.name);
|
||||
await viewerPage.checkFileIsLoaded();
|
||||
});
|
||||
|
||||
afterEach(() => {
|
||||
viewerPage.clickCloseButton();
|
||||
contentServicesPage.waitForTableBody();
|
||||
afterEach(async () => {
|
||||
await viewerPage.clickCloseButton();
|
||||
await contentServicesPage.waitForTableBody();
|
||||
});
|
||||
|
||||
it('[C245652] Should be possible to display a file\'s properties', () => {
|
||||
viewerPage.clickInfoButton();
|
||||
viewerPage.checkInfoSideBarIsDisplayed();
|
||||
metadataViewPage.clickOnPropertiesTab();
|
||||
it('[C245652] Should be possible to display a file\'s properties', async () => {
|
||||
await viewerPage.clickInfoButton();
|
||||
await viewerPage.checkInfoSideBarIsDisplayed();
|
||||
await metadataViewPage.clickOnPropertiesTab();
|
||||
|
||||
expect(metadataViewPage.getTitle()).toEqual(METADATA.TITLE);
|
||||
expect(viewerPage.getActiveTab()).toEqual(METADATA.PROPERTY_TAB);
|
||||
expect(metadataViewPage.getExpandedAspectName()).toEqual(METADATA.DEFAULT_ASPECT);
|
||||
expect(metadataViewPage.getName()).toEqual(pngFileModel.name);
|
||||
expect(metadataViewPage.getCreator()).toEqual(pngFileModel.getCreatedByUser().displayName);
|
||||
expect(metadataViewPage.getCreatedDate()).toEqual(dateFormat(pngFileModel.createdAt, METADATA.DATA_FORMAT));
|
||||
expect(metadataViewPage.getModifier()).toEqual(pngFileModel.getCreatedByUser().displayName);
|
||||
expect(metadataViewPage.getModifiedDate()).toEqual(dateFormat(pngFileModel.createdAt, METADATA.DATA_FORMAT));
|
||||
expect(metadataViewPage.getMimetypeName()).toEqual(pngFileModel.getContent().mimeTypeName);
|
||||
expect(metadataViewPage.getSize()).toEqual(pngFileModel.getContent().getSizeInBytes());
|
||||
await expect(await metadataViewPage.getTitle()).toEqual(METADATA.TITLE);
|
||||
await expect(await viewerPage.getActiveTab()).toEqual(METADATA.PROPERTY_TAB);
|
||||
await expect(await metadataViewPage.getExpandedAspectName()).toEqual(METADATA.DEFAULT_ASPECT);
|
||||
await expect(await metadataViewPage.getName()).toEqual(pngFileModel.name);
|
||||
await expect(await metadataViewPage.getCreator()).toEqual(pngFileModel.getCreatedByUser().displayName);
|
||||
await expect(await metadataViewPage.getCreatedDate()).toEqual(dateFormat(pngFileModel.createdAt, METADATA.DATA_FORMAT));
|
||||
await expect(await metadataViewPage.getModifier()).toEqual(pngFileModel.getCreatedByUser().displayName);
|
||||
await expect(await metadataViewPage.getModifiedDate()).toEqual(dateFormat(pngFileModel.createdAt, METADATA.DATA_FORMAT));
|
||||
await expect(await metadataViewPage.getMimetypeName()).toEqual(pngFileModel.getContent().mimeTypeName);
|
||||
await expect(await metadataViewPage.getSize()).toEqual(pngFileModel.getContent().getSizeInBytes());
|
||||
|
||||
metadataViewPage.editIconIsDisplayed();
|
||||
metadataViewPage.informationButtonIsDisplayed();
|
||||
expect(metadataViewPage.getInformationButtonText()).toEqual(METADATA.LESS_INFO_BUTTON);
|
||||
expect(metadataViewPage.getInformationIconText()).toEqual(METADATA.ARROW_UP);
|
||||
await metadataViewPage.editIconIsDisplayed();
|
||||
await metadataViewPage.informationButtonIsDisplayed();
|
||||
await expect(await metadataViewPage.getInformationButtonText()).toEqual(METADATA.LESS_INFO_BUTTON);
|
||||
await expect(await metadataViewPage.getInformationIconText()).toEqual(METADATA.ARROW_UP);
|
||||
});
|
||||
|
||||
it('[C272769] Should be possible to display more details when clicking on More Information button', () => {
|
||||
viewerPage.clickInfoButton();
|
||||
viewerPage.checkInfoSideBarIsDisplayed();
|
||||
metadataViewPage.clickOnPropertiesTab();
|
||||
metadataViewPage.informationButtonIsDisplayed();
|
||||
metadataViewPage.clickOnInformationButton();
|
||||
expect(metadataViewPage.getInformationButtonText()).toEqual(METADATA.MORE_INFO_BUTTON);
|
||||
expect(metadataViewPage.getInformationIconText()).toEqual(METADATA.ARROW_DOWN);
|
||||
it('[C272769] Should be possible to display more details when clicking on More Information button', async () => {
|
||||
await viewerPage.clickInfoButton();
|
||||
await viewerPage.checkInfoSideBarIsDisplayed();
|
||||
await metadataViewPage.clickOnPropertiesTab();
|
||||
await metadataViewPage.informationButtonIsDisplayed();
|
||||
await metadataViewPage.clickOnInformationButton();
|
||||
await expect(await metadataViewPage.getInformationButtonText()).toEqual(METADATA.MORE_INFO_BUTTON);
|
||||
await expect(await metadataViewPage.getInformationIconText()).toEqual(METADATA.ARROW_DOWN);
|
||||
});
|
||||
|
||||
it('[C270952] Should be possible to open/close properties using info icon', () => {
|
||||
viewerPage.clickInfoButton();
|
||||
viewerPage.checkInfoSideBarIsDisplayed();
|
||||
metadataViewPage.clickOnPropertiesTab().informationButtonIsDisplayed();
|
||||
viewerPage.clickInfoButton();
|
||||
viewerPage.checkInfoSideBarIsNotDisplayed();
|
||||
viewerPage.clickInfoButton();
|
||||
viewerPage.checkInfoSideBarIsDisplayed();
|
||||
expect(viewerPage.getActiveTab()).toEqual(METADATA.COMMENTS_TAB);
|
||||
metadataViewPage.clickOnPropertiesTab();
|
||||
expect(viewerPage.getActiveTab()).toEqual(METADATA.PROPERTY_TAB);
|
||||
expect(metadataViewPage.getEditIconTooltip()).toEqual(METADATA.EDIT_BUTTON_TOOLTIP);
|
||||
it('[C270952] Should be possible to open/close properties using info icon', async () => {
|
||||
await viewerPage.clickInfoButton();
|
||||
await viewerPage.checkInfoSideBarIsDisplayed();
|
||||
await metadataViewPage.clickOnPropertiesTab();
|
||||
await metadataViewPage.informationButtonIsDisplayed();
|
||||
await viewerPage.clickInfoButton();
|
||||
await viewerPage.checkInfoSideBarIsNotDisplayed();
|
||||
await viewerPage.clickInfoButton();
|
||||
await viewerPage.checkInfoSideBarIsDisplayed();
|
||||
await expect(await viewerPage.getActiveTab()).toEqual(METADATA.COMMENTS_TAB);
|
||||
await metadataViewPage.clickOnPropertiesTab();
|
||||
await expect(await viewerPage.getActiveTab()).toEqual(METADATA.PROPERTY_TAB);
|
||||
await expect(await metadataViewPage.getEditIconTooltip()).toEqual(METADATA.EDIT_BUTTON_TOOLTIP);
|
||||
});
|
||||
|
||||
it('[C245654] Should be possible edit the basic Metadata Info of a Document', () => {
|
||||
viewerPage.clickInfoButton();
|
||||
viewerPage.checkInfoSideBarIsDisplayed();
|
||||
metadataViewPage.clickOnPropertiesTab();
|
||||
metadataViewPage.editIconIsDisplayed();
|
||||
it('[C245654] Should be possible edit the basic Metadata Info of a Document', async () => {
|
||||
await viewerPage.clickInfoButton();
|
||||
await viewerPage.checkInfoSideBarIsDisplayed();
|
||||
await metadataViewPage.clickOnPropertiesTab();
|
||||
await metadataViewPage.editIconIsDisplayed();
|
||||
|
||||
expect(viewerPage.getActiveTab()).toEqual(METADATA.PROPERTY_TAB);
|
||||
await expect(await viewerPage.getActiveTab()).toEqual(METADATA.PROPERTY_TAB);
|
||||
|
||||
metadataViewPage.editIconClick();
|
||||
metadataViewPage.editPropertyIconIsDisplayed('name');
|
||||
metadataViewPage.editPropertyIconIsDisplayed('properties.cm:title');
|
||||
metadataViewPage.editPropertyIconIsDisplayed('properties.cm:description');
|
||||
await metadataViewPage.editIconClick();
|
||||
await metadataViewPage.editPropertyIconIsDisplayed('name');
|
||||
await metadataViewPage.editPropertyIconIsDisplayed('properties.cm:title');
|
||||
await metadataViewPage.editPropertyIconIsDisplayed('properties.cm:description');
|
||||
|
||||
expect(metadataViewPage.getPropertyIconTooltip('name')).toEqual('Edit');
|
||||
expect(metadataViewPage.getPropertyIconTooltip('properties.cm:title')).toEqual('Edit');
|
||||
expect(metadataViewPage.getPropertyIconTooltip('properties.cm:description')).toEqual('Edit');
|
||||
await expect(await metadataViewPage.getPropertyIconTooltip('name')).toEqual('Edit');
|
||||
await expect(await metadataViewPage.getPropertyIconTooltip('properties.cm:title')).toEqual('Edit');
|
||||
await expect(await metadataViewPage.getPropertyIconTooltip('properties.cm:description')).toEqual('Edit');
|
||||
|
||||
metadataViewPage.clickEditPropertyIcons('name');
|
||||
metadataViewPage.updatePropertyIconIsDisplayed('name');
|
||||
metadataViewPage.clearPropertyIconIsDisplayed('name');
|
||||
await metadataViewPage.clickEditPropertyIcons('name');
|
||||
await metadataViewPage.updatePropertyIconIsDisplayed('name');
|
||||
await metadataViewPage.clearPropertyIconIsDisplayed('name');
|
||||
|
||||
metadataViewPage.enterPropertyText('name', 'exampleText');
|
||||
metadataViewPage.clickClearPropertyIcon('name');
|
||||
expect(metadataViewPage.getPropertyText('name')).toEqual(resources.Files.ADF_DOCUMENTS.PNG.file_name);
|
||||
await metadataViewPage.enterPropertyText('name', 'exampleText');
|
||||
await metadataViewPage.clickClearPropertyIcon('name');
|
||||
await expect(await metadataViewPage.getPropertyText('name')).toEqual(resources.Files.ADF_DOCUMENTS.PNG.file_name);
|
||||
|
||||
metadataViewPage.clickEditPropertyIcons('name');
|
||||
metadataViewPage.enterPropertyText('name', 'exampleText.png');
|
||||
metadataViewPage.clickUpdatePropertyIcon('name');
|
||||
expect(metadataViewPage.getPropertyText('name')).toEqual('exampleText.png');
|
||||
await metadataViewPage.clickEditPropertyIcons('name');
|
||||
await metadataViewPage.enterPropertyText('name', 'exampleText.png');
|
||||
await metadataViewPage.clickUpdatePropertyIcon('name');
|
||||
await expect(await metadataViewPage.getPropertyText('name')).toEqual('exampleText.png');
|
||||
|
||||
metadataViewPage.clickEditPropertyIcons('properties.cm:title');
|
||||
metadataViewPage.enterPropertyText('properties.cm:title', 'example title');
|
||||
metadataViewPage.clickUpdatePropertyIcon('properties.cm:title');
|
||||
expect(metadataViewPage.getPropertyText('properties.cm:title')).toEqual('example title');
|
||||
await metadataViewPage.clickEditPropertyIcons('properties.cm:title');
|
||||
await metadataViewPage.enterPropertyText('properties.cm:title', 'example title');
|
||||
await metadataViewPage.clickUpdatePropertyIcon('properties.cm:title');
|
||||
await expect(await metadataViewPage.getPropertyText('properties.cm:title')).toEqual('example title');
|
||||
|
||||
metadataViewPage.clickEditPropertyIcons('properties.cm:description');
|
||||
metadataViewPage.enterDescriptionText('example description');
|
||||
metadataViewPage.clickUpdatePropertyIcon('properties.cm:description');
|
||||
expect(metadataViewPage.getPropertyText('properties.cm:description')).toEqual('example description');
|
||||
await metadataViewPage.clickEditPropertyIcons('properties.cm:description');
|
||||
await metadataViewPage.enterDescriptionText('example description');
|
||||
await metadataViewPage.clickUpdatePropertyIcon('properties.cm:description');
|
||||
await expect(await metadataViewPage.getPropertyText('properties.cm:description')).toEqual('example description');
|
||||
|
||||
viewerPage.clickCloseButton();
|
||||
contentServicesPage.waitForTableBody();
|
||||
await viewerPage.clickCloseButton();
|
||||
await contentServicesPage.waitForTableBody();
|
||||
|
||||
viewerPage.viewFile('exampleText.png');
|
||||
viewerPage.clickInfoButton();
|
||||
viewerPage.checkInfoSideBarIsDisplayed();
|
||||
metadataViewPage.clickOnPropertiesTab();
|
||||
metadataViewPage.editIconIsDisplayed();
|
||||
await viewerPage.viewFile('exampleText.png');
|
||||
await viewerPage.clickInfoButton();
|
||||
await viewerPage.checkInfoSideBarIsDisplayed();
|
||||
await metadataViewPage.clickOnPropertiesTab();
|
||||
await metadataViewPage.editIconIsDisplayed();
|
||||
|
||||
expect(metadataViewPage.getPropertyText('name')).toEqual('exampleText.png');
|
||||
expect(metadataViewPage.getPropertyText('properties.cm:title')).toEqual('example title');
|
||||
expect(metadataViewPage.getPropertyText('properties.cm:description')).toEqual('example description');
|
||||
await expect(await metadataViewPage.getPropertyText('name')).toEqual('exampleText.png');
|
||||
await expect(await metadataViewPage.getPropertyText('properties.cm:title')).toEqual('example title');
|
||||
await expect(await metadataViewPage.getPropertyText('properties.cm:description')).toEqual('example description');
|
||||
|
||||
metadataViewPage.editIconClick();
|
||||
metadataViewPage.clickEditPropertyIcons('name');
|
||||
metadataViewPage.enterPropertyText('name', resources.Files.ADF_DOCUMENTS.PNG.file_name);
|
||||
metadataViewPage.clickUpdatePropertyIcon('name');
|
||||
expect(metadataViewPage.getPropertyText('name')).toEqual(resources.Files.ADF_DOCUMENTS.PNG.file_name);
|
||||
await metadataViewPage.editIconClick();
|
||||
await metadataViewPage.clickEditPropertyIcons('name');
|
||||
await metadataViewPage.enterPropertyText('name', resources.Files.ADF_DOCUMENTS.PNG.file_name);
|
||||
await metadataViewPage.clickUpdatePropertyIcon('name');
|
||||
await expect(await metadataViewPage.getPropertyText('name')).toEqual(resources.Files.ADF_DOCUMENTS.PNG.file_name);
|
||||
});
|
||||
|
||||
it('[C260181] Should be possible edit all the metadata aspect', () => {
|
||||
viewerPage.clickInfoButton();
|
||||
viewerPage.checkInfoSideBarIsDisplayed();
|
||||
metadataViewPage.clickOnPropertiesTab();
|
||||
metadataViewPage.editIconIsDisplayed();
|
||||
it('[C260181] Should be possible edit all the metadata aspect', async () => {
|
||||
await viewerPage.clickInfoButton();
|
||||
await viewerPage.checkInfoSideBarIsDisplayed();
|
||||
await metadataViewPage.clickOnPropertiesTab();
|
||||
await metadataViewPage.editIconIsDisplayed();
|
||||
|
||||
expect(viewerPage.getActiveTab()).toEqual(METADATA.PROPERTY_TAB);
|
||||
await expect(await viewerPage.getActiveTab()).toEqual(METADATA.PROPERTY_TAB);
|
||||
|
||||
metadataViewPage.clickOnInformationButton();
|
||||
await metadataViewPage.clickOnInformationButton();
|
||||
|
||||
metadataViewPage.clickMetadataGroup('EXIF');
|
||||
await metadataViewPage.clickMetadataGroup('EXIF');
|
||||
|
||||
metadataViewPage.editIconClick();
|
||||
await metadataViewPage.editIconClick();
|
||||
|
||||
metadataViewPage.clickEditPropertyIcons('properties.exif:software');
|
||||
metadataViewPage.enterPropertyText('properties.exif:software', 'test custom text software');
|
||||
metadataViewPage.clickUpdatePropertyIcon('properties.exif:software');
|
||||
expect(metadataViewPage.getPropertyText('properties.exif:software')).toEqual('test custom text software');
|
||||
await metadataViewPage.clickEditPropertyIcons('properties.exif:software');
|
||||
await metadataViewPage.enterPropertyText('properties.exif:software', 'test custom text software');
|
||||
await metadataViewPage.clickUpdatePropertyIcon('properties.exif:software');
|
||||
await expect(await metadataViewPage.getPropertyText('properties.exif:software')).toEqual('test custom text software');
|
||||
|
||||
metadataViewPage.clickEditPropertyIcons('properties.exif:isoSpeedRatings');
|
||||
metadataViewPage.enterPropertyText('properties.exif:isoSpeedRatings', 'test custom text isoSpeedRatings');
|
||||
metadataViewPage.clickUpdatePropertyIcon('properties.exif:isoSpeedRatings');
|
||||
expect(metadataViewPage.getPropertyText('properties.exif:isoSpeedRatings')).toEqual('test custom text isoSpeedRatings');
|
||||
await metadataViewPage.clickEditPropertyIcons('properties.exif:isoSpeedRatings');
|
||||
await metadataViewPage.enterPropertyText('properties.exif:isoSpeedRatings', 'test custom text isoSpeedRatings');
|
||||
await metadataViewPage.clickUpdatePropertyIcon('properties.exif:isoSpeedRatings');
|
||||
await expect(await metadataViewPage.getPropertyText('properties.exif:isoSpeedRatings')).toEqual('test custom text isoSpeedRatings');
|
||||
|
||||
metadataViewPage.clickEditPropertyIcons('properties.exif:fNumber');
|
||||
metadataViewPage.enterPropertyText('properties.exif:fNumber', 22);
|
||||
metadataViewPage.clickUpdatePropertyIcon('properties.exif:fNumber');
|
||||
expect(metadataViewPage.getPropertyText('properties.exif:fNumber')).toEqual('22');
|
||||
await metadataViewPage.clickEditPropertyIcons('properties.exif:fNumber');
|
||||
await metadataViewPage.enterPropertyText('properties.exif:fNumber', 22);
|
||||
await metadataViewPage.clickUpdatePropertyIcon('properties.exif:fNumber');
|
||||
await expect(await metadataViewPage.getPropertyText('properties.exif:fNumber')).toEqual('22');
|
||||
});
|
||||
|
||||
});
|
||||
|
||||
describe('Folder metadata', () => {
|
||||
|
||||
beforeAll(async (done) => {
|
||||
beforeAll(async () => {
|
||||
await uploadActions.createFolder(folderName, '-my-');
|
||||
|
||||
await loginPage.loginToContentServicesUsingUserModel(acsUser);
|
||||
navigationBarPage.clickContentServicesButton();
|
||||
contentServicesPage.waitForTableBody();
|
||||
await navigationBarPage.clickContentServicesButton();
|
||||
await contentServicesPage.waitForTableBody();
|
||||
|
||||
done();
|
||||
});
|
||||
|
||||
it('[C261157] Should be possible use the metadata component When the node is a Folder', () => {
|
||||
contentServicesPage.metadataContent(folderName);
|
||||
it('[C261157] Should be possible use the metadata component When the node is a Folder', async () => {
|
||||
await contentServicesPage.metadataContent(folderName);
|
||||
|
||||
expect(metadataViewPage.getPropertyText('name')).toEqual(folderName);
|
||||
expect(metadataViewPage.getPropertyText('createdByUser.displayName')).toEqual(acsUser.firstName + ' ' + acsUser.lastName);
|
||||
BrowserActions.closeMenuAndDialogs();
|
||||
await expect(await metadataViewPage.getPropertyText('name')).toEqual(folderName);
|
||||
await expect(await metadataViewPage.getPropertyText('createdByUser.displayName')).toEqual(acsUser.firstName + ' ' + acsUser.lastName);
|
||||
await BrowserActions.closeMenuAndDialogs();
|
||||
});
|
||||
|
||||
it('[C261158] Should be possible edit the metadata When the node is a Folder', () => {
|
||||
contentServicesPage.metadataContent(folderName);
|
||||
it('[C261158] Should be possible edit the metadata When the node is a Folder', async () => {
|
||||
await contentServicesPage.metadataContent(folderName);
|
||||
|
||||
metadataViewPage.editIconClick();
|
||||
await metadataViewPage.editIconClick();
|
||||
|
||||
metadataViewPage.clickEditPropertyIcons('name');
|
||||
metadataViewPage.enterPropertyText('name', 'newnameFolder');
|
||||
metadataViewPage.clickClearPropertyIcon('name');
|
||||
expect(metadataViewPage.getPropertyText('name')).toEqual(folderName);
|
||||
await metadataViewPage.clickEditPropertyIcons('name');
|
||||
await metadataViewPage.enterPropertyText('name', 'newnameFolder');
|
||||
await metadataViewPage.clickClearPropertyIcon('name');
|
||||
await expect(await metadataViewPage.getPropertyText('name')).toEqual(folderName);
|
||||
|
||||
metadataViewPage.clickEditPropertyIcons('name');
|
||||
metadataViewPage.enterPropertyText('name', 'newnameFolder');
|
||||
metadataViewPage.clickUpdatePropertyIcon('name');
|
||||
expect(metadataViewPage.getPropertyText('name')).toEqual('newnameFolder');
|
||||
await metadataViewPage.clickEditPropertyIcons('name');
|
||||
await metadataViewPage.enterPropertyText('name', 'newnameFolder');
|
||||
await metadataViewPage.clickUpdatePropertyIcon('name');
|
||||
await expect(await metadataViewPage.getPropertyText('name')).toEqual('newnameFolder');
|
||||
|
||||
metadataViewPage.clickEditPropertyIcons('name');
|
||||
metadataViewPage.enterPropertyText('name', folderName);
|
||||
metadataViewPage.clickUpdatePropertyIcon('name');
|
||||
expect(metadataViewPage.getPropertyText('name')).toEqual(folderName);
|
||||
await metadataViewPage.clickEditPropertyIcons('name');
|
||||
await metadataViewPage.enterPropertyText('name', folderName);
|
||||
await metadataViewPage.clickUpdatePropertyIcon('name');
|
||||
await expect(await metadataViewPage.getPropertyText('name')).toEqual(folderName);
|
||||
});
|
||||
|
||||
});
|
||||
@@ -299,36 +290,36 @@ describe('Metadata component', () => {
|
||||
it('[C279960] Should show the last username modifier when modify a File', async () => {
|
||||
await loginPage.loginToContentServices(browser.params.testConfig.adf.adminEmail, browser.params.testConfig.adf.adminPassword);
|
||||
|
||||
BrowserActions.getUrl(browser.params.testConfig.adf.url + `/(overlay:files/${pngFileModel.id}/view)`);
|
||||
await BrowserActions.getUrl(browser.params.testConfig.adf.url + `/(overlay:files/${pngFileModel.id}/view)`);
|
||||
|
||||
viewerPage.clickInfoButton();
|
||||
viewerPage.checkInfoSideBarIsDisplayed();
|
||||
metadataViewPage.clickOnPropertiesTab();
|
||||
metadataViewPage.editIconIsDisplayed();
|
||||
await viewerPage.clickInfoButton();
|
||||
await viewerPage.checkInfoSideBarIsDisplayed();
|
||||
await metadataViewPage.clickOnPropertiesTab();
|
||||
await metadataViewPage.editIconIsDisplayed();
|
||||
|
||||
expect(viewerPage.getActiveTab()).toEqual(METADATA.PROPERTY_TAB);
|
||||
await expect(await viewerPage.getActiveTab()).toEqual(METADATA.PROPERTY_TAB);
|
||||
|
||||
metadataViewPage.editIconClick();
|
||||
await metadataViewPage.editIconClick();
|
||||
|
||||
metadataViewPage.clickEditPropertyIcons('properties.cm:description');
|
||||
metadataViewPage.enterDescriptionText('check author example description');
|
||||
metadataViewPage.clickUpdatePropertyIcon('properties.cm:description');
|
||||
expect(metadataViewPage.getPropertyText('properties.cm:description')).toEqual('check author example description');
|
||||
await metadataViewPage.clickEditPropertyIcons('properties.cm:description');
|
||||
await metadataViewPage.enterDescriptionText('check author example description');
|
||||
await metadataViewPage.clickUpdatePropertyIcon('properties.cm:description');
|
||||
await expect(await metadataViewPage.getPropertyText('properties.cm:description')).toEqual('check author example description');
|
||||
|
||||
loginPage.loginToContentServicesUsingUserModel(acsUser);
|
||||
navigationBarPage.clickContentServicesButton();
|
||||
await loginPage.loginToContentServicesUsingUserModel(acsUser);
|
||||
await navigationBarPage.clickContentServicesButton();
|
||||
|
||||
viewerPage.viewFile(pngFileModel.name);
|
||||
viewerPage.checkFileIsLoaded();
|
||||
await viewerPage.viewFile(pngFileModel.name);
|
||||
await viewerPage.checkFileIsLoaded();
|
||||
|
||||
viewerPage.clickInfoButton();
|
||||
viewerPage.checkInfoSideBarIsDisplayed();
|
||||
metadataViewPage.clickOnPropertiesTab();
|
||||
await viewerPage.clickInfoButton();
|
||||
await viewerPage.checkInfoSideBarIsDisplayed();
|
||||
await metadataViewPage.clickOnPropertiesTab();
|
||||
|
||||
expect(metadataViewPage.getPropertyText('modifiedByUser.displayName')).toEqual('Administrator');
|
||||
await expect(await metadataViewPage.getPropertyText('modifiedByUser.displayName')).toEqual('Administrator');
|
||||
|
||||
viewerPage.clickCloseButton();
|
||||
contentServicesPage.waitForTableBody();
|
||||
await viewerPage.clickCloseButton();
|
||||
await contentServicesPage.waitForTableBody();
|
||||
});
|
||||
|
||||
});
|
||||
|
||||
@@ -25,12 +25,12 @@ import { NavigationBarPage } from '../pages/adf/navigationBarPage';
|
||||
describe('Notifications Component', () => {
|
||||
|
||||
const loginPage = new LoginPage();
|
||||
const notificationHistoryPage = new NotificationPage();
|
||||
const notificationPage = new NotificationPage();
|
||||
const navigationBarPage = new NavigationBarPage();
|
||||
|
||||
const acsUser = new AcsUserModel();
|
||||
|
||||
beforeAll(async (done) => {
|
||||
beforeAll(async () => {
|
||||
|
||||
this.alfrescoJsApi = new AlfrescoApi({
|
||||
provider: 'ECM',
|
||||
@@ -45,78 +45,76 @@ describe('Notifications Component', () => {
|
||||
|
||||
await loginPage.loginToContentServicesUsingUserModel(acsUser);
|
||||
|
||||
notificationHistoryPage.goToNotificationsPage();
|
||||
await notificationPage.goToNotificationsPage();
|
||||
|
||||
notificationHistoryPage.enterDurationField(3000);
|
||||
|
||||
done();
|
||||
await notificationPage.enterDurationField(3000);
|
||||
});
|
||||
|
||||
afterAll(async () => {
|
||||
await navigationBarPage.clickLogoutButton();
|
||||
});
|
||||
|
||||
afterEach( () => {
|
||||
browser.executeScript(`document.querySelector('button[data-automation-id="notification-custom-dismiss-button"]').click();`);
|
||||
notificationHistoryPage.enterDurationField(3000);
|
||||
afterEach(async () => {
|
||||
await browser.executeScript(`document.querySelector('button[data-automation-id="notification-custom-dismiss-button"]').click();`);
|
||||
await notificationPage.enterDurationField(3000);
|
||||
});
|
||||
|
||||
it('[C279977] Should show notification when the message is not empty and button is clicked', () => {
|
||||
notificationHistoryPage.enterMessageField('Notification test');
|
||||
notificationHistoryPage.clickNotificationButton();
|
||||
notificationHistoryPage.checkNotificationSnackBarIsDisplayedWithMessage('Notification test');
|
||||
it('[C279977] Should show notification when the message is not empty and button is clicked', async () => {
|
||||
await notificationPage.enterMessageField('Notification test');
|
||||
await notificationPage.clickNotificationButton();
|
||||
await notificationPage.checkNotificationSnackBarIsDisplayedWithMessage('Notification test');
|
||||
});
|
||||
|
||||
it('[C279979] Should not show notification when the message is empty and button is clicked', () => {
|
||||
notificationHistoryPage.clearMessage();
|
||||
notificationHistoryPage.clickNotificationButton();
|
||||
notificationHistoryPage.checkNotificationSnackBarIsNotDisplayed();
|
||||
it('[C279979] Should not show notification when the message is empty and button is clicked', async () => {
|
||||
await notificationPage.clearMessage();
|
||||
await notificationPage.clickNotificationButton();
|
||||
await notificationPage.checkNotificationSnackBarIsNotDisplayed();
|
||||
});
|
||||
|
||||
it('[C279978] Should show notification with action when the message is not empty and button is clicked', () => {
|
||||
notificationHistoryPage.enterMessageField('Notification test');
|
||||
notificationHistoryPage.clickActionToggle();
|
||||
notificationHistoryPage.clickNotificationButton();
|
||||
notificationHistoryPage.checkNotificationSnackBarIsDisplayedWithMessage('Notification test');
|
||||
notificationHistoryPage.clickActionButton();
|
||||
notificationHistoryPage.checkActionEvent();
|
||||
notificationHistoryPage.clickActionToggle();
|
||||
it('[C279978] Should show notification with action when the message is not empty and button is clicked', async () => {
|
||||
await notificationPage.enterMessageField('Notification test');
|
||||
await notificationPage.clickActionToggle();
|
||||
await notificationPage.clickNotificationButton();
|
||||
await notificationPage.checkNotificationSnackBarIsDisplayedWithMessage('Notification test');
|
||||
await notificationPage.clickActionButton();
|
||||
await notificationPage.checkActionEvent();
|
||||
await notificationPage.clickActionToggle();
|
||||
});
|
||||
|
||||
it('[C279981] Should show notification with action when the message is not empty and custom configuration button is clicked', () => {
|
||||
notificationHistoryPage.enterMessageField('Notification test');
|
||||
notificationHistoryPage.clickNotificationButton();
|
||||
notificationHistoryPage.checkNotificationSnackBarIsDisplayed();
|
||||
it('[C279981] Should show notification with action when the message is not empty and custom configuration button is clicked', async () => {
|
||||
await notificationPage.enterMessageField('Notification test');
|
||||
await notificationPage.clickNotificationButton();
|
||||
await notificationPage.checkNotificationSnackBarIsDisplayed();
|
||||
});
|
||||
|
||||
it('[C279987] Should show custom notification during a limited time when a duration is added', () => {
|
||||
notificationHistoryPage.enterMessageField('Notification test');
|
||||
notificationHistoryPage.enterDurationField(1000);
|
||||
notificationHistoryPage.clickNotificationButton();
|
||||
notificationHistoryPage.checkNotificationSnackBarIsDisplayed();
|
||||
browser.sleep(1500);
|
||||
notificationHistoryPage.checkNotificationSnackBarIsNotDisplayed();
|
||||
it('[C279987] Should show custom notification during a limited time when a duration is added', async () => {
|
||||
await notificationPage.enterMessageField('Notification test');
|
||||
await notificationPage.enterDurationField(1000);
|
||||
await notificationPage.clickNotificationButton();
|
||||
await notificationPage.checkNotificationSnackBarIsDisplayed();
|
||||
await browser.sleep(1500);
|
||||
await notificationPage.checkNotificationSnackBarIsNotDisplayed();
|
||||
});
|
||||
|
||||
it('[C280000] Should show notification with action when the message is not empty and custom button is clicked', () => {
|
||||
notificationHistoryPage.enterMessageField('Notification test');
|
||||
notificationHistoryPage.clickActionToggle();
|
||||
notificationHistoryPage.clickNotificationButton();
|
||||
notificationHistoryPage.checkNotificationSnackBarIsDisplayedWithMessage('Notification test');
|
||||
notificationHistoryPage.checkNotificationSnackBarIsNotDisplayed();
|
||||
notificationHistoryPage.clickNotificationButton();
|
||||
notificationHistoryPage.clickActionButton();
|
||||
notificationHistoryPage.checkActionEvent();
|
||||
notificationHistoryPage.clickActionToggle();
|
||||
it('[C280000] Should show notification with action when the message is not empty and custom button is clicked', async () => {
|
||||
await notificationPage.enterMessageField('Notification test');
|
||||
await notificationPage.clickActionToggle();
|
||||
await notificationPage.clickNotificationButton();
|
||||
await notificationPage.checkNotificationSnackBarIsDisplayedWithMessage('Notification test');
|
||||
await notificationPage.checkNotificationSnackBarIsNotDisplayed();
|
||||
await notificationPage.clickNotificationButton();
|
||||
await notificationPage.clickActionButton();
|
||||
await notificationPage.checkActionEvent();
|
||||
await notificationPage.clickActionToggle();
|
||||
});
|
||||
|
||||
it('[C280001] Should meet configuration when a custom notification is set', () => {
|
||||
notificationHistoryPage.enterMessageField('Notification test');
|
||||
notificationHistoryPage.enterDurationField(1000);
|
||||
notificationHistoryPage.selectHorizontalPosition('Right');
|
||||
notificationHistoryPage.selectVerticalPosition('Top');
|
||||
notificationHistoryPage.selectDirection('Left to right');
|
||||
notificationHistoryPage.clickNotificationButton();
|
||||
expect(notificationHistoryPage.getConfigObject()).toBe('{"direction": "ltr", "duration": "1000", "horizontalPosition": "right", "verticalPosition": "top"}');
|
||||
it('[C280001] Should meet configuration when a custom notification is set', async () => {
|
||||
await notificationPage.enterMessageField('Notification test');
|
||||
await notificationPage.enterDurationField(1000);
|
||||
await notificationPage.selectHorizontalPosition('Right');
|
||||
await notificationPage.selectVerticalPosition('Top');
|
||||
await notificationPage.selectDirection('Left to right');
|
||||
await notificationPage.clickNotificationButton();
|
||||
await expect(await notificationPage.getConfigObject()).toBe('{"direction": "ltr", "duration": "1000", "horizontalPosition": "right", "verticalPosition": "top"}');
|
||||
});
|
||||
});
|
||||
|
||||
@@ -29,7 +29,7 @@ import { MetadataViewPage } from '../../pages/adf/metadataViewPage';
|
||||
import { NavigationBarPage } from '../../pages/adf/navigationBarPage';
|
||||
import { UploadDialog } from '../../pages/adf/dialog/uploadDialog';
|
||||
|
||||
describe('Permissions Component', function () {
|
||||
describe('Permissions Component', () => {
|
||||
|
||||
this.alfrescoJsApi = new AlfrescoApi({
|
||||
provider: 'ECM',
|
||||
@@ -44,22 +44,22 @@ describe('Permissions Component', function () {
|
||||
const contentList = contentServicesPage.getDocumentList();
|
||||
const viewerPage = new ViewerPage();
|
||||
const metadataViewPage = new MetadataViewPage();
|
||||
const notificationPage = new NotificationHistoryPage();
|
||||
const notificationHistoryPage = new NotificationHistoryPage();
|
||||
const uploadDialog = new UploadDialog();
|
||||
let fileOwnerUser, filePermissionUser, file;
|
||||
const fileModel = new FileModel({
|
||||
'name': resources.Files.ADF_DOCUMENTS.TXT_0B.file_name,
|
||||
'location': resources.Files.ADF_DOCUMENTS.TXT_0B.file_location
|
||||
name: resources.Files.ADF_DOCUMENTS.TXT_0B.file_name,
|
||||
location: resources.Files.ADF_DOCUMENTS.TXT_0B.file_location
|
||||
});
|
||||
|
||||
const testFileModel = new FileModel({
|
||||
'name': resources.Files.ADF_DOCUMENTS.TEST.file_name,
|
||||
'location': resources.Files.ADF_DOCUMENTS.TEST.file_location
|
||||
name: resources.Files.ADF_DOCUMENTS.TEST.file_name,
|
||||
location: resources.Files.ADF_DOCUMENTS.TEST.file_location
|
||||
});
|
||||
|
||||
const pngFileModel = new FileModel({
|
||||
'name': resources.Files.ADF_DOCUMENTS.PNG.file_name,
|
||||
'location': resources.Files.ADF_DOCUMENTS.PNG.file_location
|
||||
name: resources.Files.ADF_DOCUMENTS.PNG.file_name,
|
||||
location: resources.Files.ADF_DOCUMENTS.PNG.file_location
|
||||
});
|
||||
|
||||
const groupBody = {
|
||||
@@ -67,11 +67,11 @@ describe('Permissions Component', function () {
|
||||
displayName: StringUtil.generateRandomString()
|
||||
};
|
||||
|
||||
const roleConsumerFolderModel = new FolderModel({ 'name': 'roleConsumer' + StringUtil.generateRandomString() });
|
||||
const roleCoordinatorFolderModel = new FolderModel({ 'name': 'roleCoordinator' + StringUtil.generateRandomString() });
|
||||
const roleCollaboratorFolderModel = new FolderModel({ 'name': 'roleCollaborator' + StringUtil.generateRandomString() });
|
||||
const roleContributorFolderModel = new FolderModel({ 'name': 'roleContributor' + StringUtil.generateRandomString() });
|
||||
const roleEditorFolderModel = new FolderModel({ 'name': 'roleEditor' + StringUtil.generateRandomString() });
|
||||
const roleConsumerFolderModel = new FolderModel({ name: 'roleConsumer' + StringUtil.generateRandomString() });
|
||||
const roleCoordinatorFolderModel = new FolderModel({ name: 'roleCoordinator' + StringUtil.generateRandomString() });
|
||||
const roleCollaboratorFolderModel = new FolderModel({ name: 'roleCollaborator' + StringUtil.generateRandomString() });
|
||||
const roleContributorFolderModel = new FolderModel({ name: 'roleContributor' + StringUtil.generateRandomString() });
|
||||
const roleEditorFolderModel = new FolderModel({ name: 'roleEditor' + StringUtil.generateRandomString() });
|
||||
|
||||
let roleConsumerFolder, roleCoordinatorFolder, roleContributorFolder, roleCollaboratorFolder, roleEditorFolder;
|
||||
let folders;
|
||||
@@ -81,7 +81,7 @@ describe('Permissions Component', function () {
|
||||
|
||||
const duplicateUserPermissionMessage = 'One or more of the permissions you have set is already present : authority -> ' + filePermissionUser.getId() + ' / role -> Contributor';
|
||||
|
||||
beforeAll(async (done) => {
|
||||
beforeAll(async () => {
|
||||
|
||||
await this.alfrescoJsApi.login(browser.params.testConfig.adf.adminEmail, browser.params.testConfig.adf.adminPassword);
|
||||
await this.alfrescoJsApi.core.peopleApi.addPerson(fileOwnerUser);
|
||||
@@ -161,189 +161,150 @@ describe('Permissions Component', function () {
|
||||
await uploadActions.uploadFile(fileModel.location, 'RoleCollaborator' + fileModel.name, roleCollaboratorFolder.entry.id);
|
||||
await uploadActions.uploadFile(fileModel.location, 'RoleEditor' + fileModel.name, roleEditorFolder.entry.id);
|
||||
|
||||
done();
|
||||
});
|
||||
|
||||
afterAll(async (done) => {
|
||||
afterAll(async () => {
|
||||
await navigationBarPage.clickLogoutButton();
|
||||
|
||||
await this.alfrescoJsApi.login(browser.params.testConfig.adf.adminEmail, browser.params.testConfig.adf.adminPassword);
|
||||
await folders.forEach(function (folder) {
|
||||
uploadActions.deleteFileOrFolder(folder.entry.id);
|
||||
for (const folder of folders) {
|
||||
await uploadActions.deleteFileOrFolder(folder.entry.id);
|
||||
}
|
||||
|
||||
});
|
||||
|
||||
done();
|
||||
});
|
||||
|
||||
describe('Inherit and assigning permissions', () => {
|
||||
|
||||
beforeEach(async (done) => {
|
||||
|
||||
beforeEach(async () => {
|
||||
await this.alfrescoJsApi.login(fileOwnerUser.id, fileOwnerUser.password);
|
||||
|
||||
file = await uploadActions.uploadFile(fileModel.location, fileModel.name, '-my-');
|
||||
|
||||
loginPage.loginToContentServicesUsingUserModel(fileOwnerUser);
|
||||
|
||||
contentServicesPage.goToDocumentList();
|
||||
contentServicesPage.checkContentIsDisplayed(fileModel.name);
|
||||
contentServicesPage.checkSelectedSiteIsDisplayed('My files');
|
||||
contentList.rightClickOnRow(fileModel.name);
|
||||
|
||||
contentServicesPage.pressContextMenuActionNamed('Permission');
|
||||
|
||||
permissionsPage.checkPermissionContainerIsDisplayed();
|
||||
|
||||
done();
|
||||
await loginPage.loginToContentServicesUsingUserModel(fileOwnerUser);
|
||||
await contentServicesPage.goToDocumentList();
|
||||
await contentServicesPage.checkContentIsDisplayed(fileModel.name);
|
||||
await contentServicesPage.checkSelectedSiteIsDisplayed('My files');
|
||||
await contentList.rightClickOnRow(fileModel.name);
|
||||
await contentServicesPage.pressContextMenuActionNamed('Permission');
|
||||
await permissionsPage.checkPermissionContainerIsDisplayed();
|
||||
|
||||
});
|
||||
|
||||
afterEach(async (done) => {
|
||||
|
||||
await uploadActions.deleteFileOrFolder(file.entry.id);
|
||||
|
||||
done();
|
||||
});
|
||||
|
||||
it('[C268974] Inherit Permission', () => {
|
||||
permissionsPage.checkPermissionInheritedButtonIsDisplayed();
|
||||
expect(permissionsPage.getPermissionInheritedButtonText()).toBe('Permission Inherited');
|
||||
permissionsPage.checkPermissionsDatatableIsDisplayed();
|
||||
permissionsPage.clickPermissionInheritedButton();
|
||||
expect(permissionsPage.getPermissionInheritedButtonText()).toBe('Inherit Permission');
|
||||
permissionsPage.checkNoPermissionsIsDisplayed();
|
||||
permissionsPage.clickPermissionInheritedButton();
|
||||
expect(permissionsPage.getPermissionInheritedButtonText()).toBe('Permission Inherited');
|
||||
permissionsPage.checkPermissionsDatatableIsDisplayed();
|
||||
afterEach(async () => {
|
||||
await BrowserActions.closeMenuAndDialogs();
|
||||
try {
|
||||
await uploadActions.deleteFileOrFolder(file.entry.id);
|
||||
} catch (error) {
|
||||
}
|
||||
|
||||
});
|
||||
|
||||
it('[C286272] Should be able to see results when searching for a user', () => {
|
||||
permissionsPage.checkAddPermissionButtonIsDisplayed();
|
||||
permissionsPage.clickAddPermissionButton();
|
||||
permissionsPage.checkAddPermissionDialogIsDisplayed();
|
||||
permissionsPage.checkSearchUserInputIsDisplayed();
|
||||
permissionsPage.searchUserOrGroup('a');
|
||||
permissionsPage.checkResultListIsDisplayed();
|
||||
|
||||
it('[C268974] Inherit Permission', async () => {
|
||||
await permissionsPage.checkPermissionInheritedButtonIsDisplayed();
|
||||
await expect(await permissionsPage.getPermissionInheritedButtonText()).toBe('Permission Inherited');
|
||||
await permissionsPage.checkPermissionsDatatableIsDisplayed();
|
||||
await permissionsPage.clickPermissionInheritedButton();
|
||||
await expect(await permissionsPage.getPermissionInheritedButtonText()).toBe('Inherit Permission');
|
||||
await permissionsPage.checkNoPermissionsIsDisplayed();
|
||||
await permissionsPage.clickPermissionInheritedButton();
|
||||
await expect(await permissionsPage.getPermissionInheritedButtonText()).toBe('Permission Inherited');
|
||||
await permissionsPage.checkPermissionsDatatableIsDisplayed();
|
||||
});
|
||||
|
||||
it('[C276979] Should be able to give permissions to a group of people', () => {
|
||||
permissionsPage.checkAddPermissionButtonIsDisplayed();
|
||||
permissionsPage.clickAddPermissionButton();
|
||||
permissionsPage.checkAddPermissionDialogIsDisplayed();
|
||||
permissionsPage.checkSearchUserInputIsDisplayed();
|
||||
permissionsPage.searchUserOrGroup('GROUP_' + groupBody.id);
|
||||
permissionsPage.clickUserOrGroup('GROUP_' + groupBody.id);
|
||||
permissionsPage.checkUserOrGroupIsAdded('GROUP_' + groupBody.id);
|
||||
|
||||
it('[C286272] Should be able to see results when searching for a user', async () => {
|
||||
await permissionsPage.checkAddPermissionButtonIsDisplayed();
|
||||
await permissionsPage.clickAddPermissionButton();
|
||||
await permissionsPage.checkAddPermissionDialogIsDisplayed();
|
||||
await permissionsPage.checkSearchUserInputIsDisplayed();
|
||||
await permissionsPage.searchUserOrGroup('a');
|
||||
await permissionsPage.checkResultListIsDisplayed();
|
||||
});
|
||||
|
||||
it('[C277100] Should display EVERYONE group in the search result set', () => {
|
||||
permissionsPage.checkAddPermissionButtonIsDisplayed();
|
||||
permissionsPage.clickAddPermissionButton();
|
||||
permissionsPage.checkAddPermissionDialogIsDisplayed();
|
||||
permissionsPage.checkSearchUserInputIsDisplayed();
|
||||
permissionsPage.searchUserOrGroup(filePermissionUser.getId());
|
||||
permissionsPage.checkResultListIsDisplayed();
|
||||
permissionsPage.checkUserOrGroupIsDisplayed('EVERYONE');
|
||||
permissionsPage.searchUserOrGroup('somerandomtext');
|
||||
permissionsPage.checkResultListIsDisplayed();
|
||||
permissionsPage.checkUserOrGroupIsDisplayed('EVERYONE');
|
||||
it('[C276979] Should be able to give permissions to a group of people', async () => {
|
||||
await permissionsPage.checkAddPermissionButtonIsDisplayed();
|
||||
await permissionsPage.clickAddPermissionButton();
|
||||
await permissionsPage.checkAddPermissionDialogIsDisplayed();
|
||||
await permissionsPage.checkSearchUserInputIsDisplayed();
|
||||
await permissionsPage.searchUserOrGroup('GROUP_' + groupBody.id);
|
||||
await permissionsPage.clickUserOrGroup('GROUP_' + groupBody.id);
|
||||
await permissionsPage.checkUserOrGroupIsAdded('GROUP_' + groupBody.id);
|
||||
});
|
||||
|
||||
it('[C277100] Should display EVERYONE group in the search result set', async () => {
|
||||
await permissionsPage.checkAddPermissionButtonIsDisplayed();
|
||||
await permissionsPage.clickAddPermissionButton();
|
||||
await permissionsPage.checkAddPermissionDialogIsDisplayed();
|
||||
await permissionsPage.checkSearchUserInputIsDisplayed();
|
||||
await permissionsPage.searchUserOrGroup(filePermissionUser.getId());
|
||||
await permissionsPage.checkResultListIsDisplayed();
|
||||
await permissionsPage.checkUserOrGroupIsDisplayed('EVERYONE');
|
||||
await permissionsPage.searchUserOrGroup('somerandomtext');
|
||||
await permissionsPage.checkResultListIsDisplayed();
|
||||
await permissionsPage.checkUserOrGroupIsDisplayed('EVERYONE');
|
||||
});
|
||||
|
||||
});
|
||||
|
||||
describe('Changing and duplicate Permissions', () => {
|
||||
|
||||
beforeEach(async (done) => {
|
||||
|
||||
beforeEach(async () => {
|
||||
await this.alfrescoJsApi.login(fileOwnerUser.id, fileOwnerUser.password);
|
||||
|
||||
file = await uploadActions.uploadFile(fileModel.location, fileModel.name, '-my-');
|
||||
|
||||
loginPage.loginToContentServicesUsingUserModel(fileOwnerUser);
|
||||
|
||||
contentServicesPage.goToDocumentList();
|
||||
contentServicesPage.checkContentIsDisplayed(fileModel.name);
|
||||
contentServicesPage.checkSelectedSiteIsDisplayed('My files');
|
||||
|
||||
contentList.rightClickOnRow(fileModel.name);
|
||||
|
||||
contentServicesPage.pressContextMenuActionNamed('Permission');
|
||||
|
||||
permissionsPage.checkAddPermissionButtonIsDisplayed();
|
||||
permissionsPage.clickAddPermissionButton();
|
||||
permissionsPage.checkAddPermissionDialogIsDisplayed();
|
||||
permissionsPage.checkSearchUserInputIsDisplayed();
|
||||
permissionsPage.searchUserOrGroup(filePermissionUser.getId());
|
||||
permissionsPage.clickUserOrGroup(filePermissionUser.getFirstName());
|
||||
permissionsPage.checkUserOrGroupIsAdded(filePermissionUser.getId());
|
||||
|
||||
done();
|
||||
|
||||
await loginPage.loginToContentServicesUsingUserModel(fileOwnerUser);
|
||||
await contentServicesPage.goToDocumentList();
|
||||
await contentServicesPage.checkContentIsDisplayed(fileModel.name);
|
||||
await contentServicesPage.checkSelectedSiteIsDisplayed('My files');
|
||||
await contentList.rightClickOnRow(fileModel.name);
|
||||
await contentServicesPage.pressContextMenuActionNamed('Permission');
|
||||
await permissionsPage.checkAddPermissionButtonIsDisplayed();
|
||||
await permissionsPage.clickAddPermissionButton();
|
||||
await permissionsPage.checkAddPermissionDialogIsDisplayed();
|
||||
await permissionsPage.checkSearchUserInputIsDisplayed();
|
||||
await permissionsPage.searchUserOrGroup(filePermissionUser.getId());
|
||||
await permissionsPage.clickUserOrGroup(filePermissionUser.getFirstName());
|
||||
await permissionsPage.checkUserOrGroupIsAdded(filePermissionUser.getId());
|
||||
});
|
||||
|
||||
afterEach(async (done) => {
|
||||
afterEach(async () => {
|
||||
await uploadActions.deleteFileOrFolder(file.entry.id);
|
||||
done();
|
||||
});
|
||||
|
||||
it('[C274691] Should be able to add a new User with permission to the file and also change locally set permissions', () => {
|
||||
|
||||
expect(permissionsPage.getRoleCellValue(filePermissionUser.getId())).toEqual('Contributor');
|
||||
|
||||
permissionsPage.clickRoleDropdownByUserOrGroupName(filePermissionUser.getId());
|
||||
|
||||
expect(permissionsPage.getRoleDropdownOptions().count()).toBe(5);
|
||||
expect(permissionsPage.getRoleDropdownOptions().get(0).getText()).toBe('Contributor');
|
||||
expect(permissionsPage.getRoleDropdownOptions().get(1).getText()).toBe('Collaborator');
|
||||
expect(permissionsPage.getRoleDropdownOptions().get(2).getText()).toBe('Coordinator');
|
||||
expect(permissionsPage.getRoleDropdownOptions().get(3).getText()).toBe('Editor');
|
||||
expect(permissionsPage.getRoleDropdownOptions().get(4).getText()).toBe('Consumer');
|
||||
|
||||
permissionsPage.selectOption('Collaborator');
|
||||
|
||||
expect(permissionsPage.getRoleCellValue(filePermissionUser.getId())).toEqual('Collaborator');
|
||||
|
||||
permissionsPage.clickRoleDropdownByUserOrGroupName(filePermissionUser.getId());
|
||||
permissionsPage.selectOption('Coordinator');
|
||||
|
||||
expect(permissionsPage.getRoleCellValue(filePermissionUser.getId())).toEqual('Coordinator');
|
||||
|
||||
permissionsPage.clickRoleDropdownByUserOrGroupName(filePermissionUser.getId());
|
||||
permissionsPage.selectOption('Editor');
|
||||
|
||||
expect(permissionsPage.getRoleCellValue(filePermissionUser.getId())).toEqual('Editor');
|
||||
|
||||
permissionsPage.clickRoleDropdownByUserOrGroupName(filePermissionUser.getId());
|
||||
permissionsPage.selectOption('Consumer');
|
||||
|
||||
expect(permissionsPage.getRoleCellValue(filePermissionUser.getId())).toEqual('Consumer');
|
||||
|
||||
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.getRoleCellValue(filePermissionUser.getId())).toEqual('Contributor');
|
||||
await permissionsPage.clickRoleDropdownByUserOrGroupName(filePermissionUser.getId());
|
||||
const roleDropdownOptions = permissionsPage.getRoleDropdownOptions();
|
||||
await expect(await roleDropdownOptions.count()).toBe(5);
|
||||
await expect(await BrowserActions.getText(roleDropdownOptions.get(0))).toBe('Contributor');
|
||||
await expect(await BrowserActions.getText(roleDropdownOptions.get(1))).toBe('Collaborator');
|
||||
await expect(await BrowserActions.getText(roleDropdownOptions.get(2))).toBe('Coordinator');
|
||||
await expect(await BrowserActions.getText(roleDropdownOptions.get(3))).toBe('Editor');
|
||||
await expect(await BrowserActions.getText(roleDropdownOptions.get(4))).toBe('Consumer');
|
||||
await permissionsPage.selectOption('Collaborator');
|
||||
await expect(await permissionsPage.getRoleCellValue(filePermissionUser.getId())).toEqual('Collaborator');
|
||||
await permissionsPage.clickRoleDropdownByUserOrGroupName(filePermissionUser.getId());
|
||||
await permissionsPage.selectOption('Coordinator');
|
||||
await expect(await permissionsPage.getRoleCellValue(filePermissionUser.getId())).toEqual('Coordinator');
|
||||
await permissionsPage.clickRoleDropdownByUserOrGroupName(filePermissionUser.getId());
|
||||
await permissionsPage.selectOption('Editor');
|
||||
await expect(await permissionsPage.getRoleCellValue(filePermissionUser.getId())).toEqual('Editor');
|
||||
await permissionsPage.clickRoleDropdownByUserOrGroupName(filePermissionUser.getId());
|
||||
await permissionsPage.selectOption('Consumer');
|
||||
await expect(await permissionsPage.getRoleCellValue(filePermissionUser.getId())).toEqual('Consumer');
|
||||
});
|
||||
|
||||
it('[C276980] Should not be able to duplicate User or Group to the locally set permissions', () => {
|
||||
expect(permissionsPage.getRoleCellValue(filePermissionUser.getId())).toEqual('Contributor');
|
||||
|
||||
permissionsPage.clickAddPermissionButton();
|
||||
permissionsPage.checkAddPermissionDialogIsDisplayed();
|
||||
permissionsPage.checkSearchUserInputIsDisplayed();
|
||||
permissionsPage.searchUserOrGroup(filePermissionUser.getId());
|
||||
permissionsPage.clickUserOrGroup(filePermissionUser.getFirstName());
|
||||
|
||||
expect(permissionsPage.getAssignPermissionErrorText()).toBe(duplicateUserPermissionMessage);
|
||||
it('[C276980] Should not be able to duplicate User or Group to the locally set permissions', async () => {
|
||||
await expect(await permissionsPage.getRoleCellValue(filePermissionUser.getId())).toEqual('Contributor');
|
||||
await permissionsPage.clickAddPermissionButton();
|
||||
await permissionsPage.checkAddPermissionDialogIsDisplayed();
|
||||
await permissionsPage.checkSearchUserInputIsDisplayed();
|
||||
await permissionsPage.searchUserOrGroup(filePermissionUser.getId());
|
||||
await permissionsPage.clickUserOrGroup(filePermissionUser.getFirstName());
|
||||
|
||||
await notificationHistoryPage.checkNotifyContains(duplicateUserPermissionMessage);
|
||||
});
|
||||
|
||||
it('[C276982] Should be able to remove User or Group from the locally set permissions', () => {
|
||||
expect(permissionsPage.getRoleCellValue(filePermissionUser.getId())).toEqual('Contributor');
|
||||
|
||||
permissionsPage.clickDeletePermissionButton();
|
||||
permissionsPage.checkUserOrGroupIsDeleted(filePermissionUser.getId());
|
||||
|
||||
it('[C276982] Should be able to remove User or Group from the locally set permissions', async () => {
|
||||
await expect(await permissionsPage.getRoleCellValue(filePermissionUser.getId())).toEqual('Contributor');
|
||||
await permissionsPage.clickDeletePermissionButton();
|
||||
await permissionsPage.checkUserOrGroupIsDeleted(filePermissionUser.getId());
|
||||
});
|
||||
|
||||
});
|
||||
@@ -351,231 +312,133 @@ describe('Permissions Component', function () {
|
||||
describe('Role: Consumer, Contributor, Coordinator, Collaborator, Editor, No Permissions', () => {
|
||||
|
||||
it('[C276993] Role Consumer', async () => {
|
||||
|
||||
await loginPage.loginToContentServicesUsingUserModel(filePermissionUser);
|
||||
|
||||
navigationBarPage.openContentServicesFolder(roleConsumerFolder.entry.id);
|
||||
|
||||
contentServicesPage.checkContentIsDisplayed('RoleConsumer' + fileModel.name);
|
||||
|
||||
contentList.doubleClickRow('RoleConsumer' + fileModel.name);
|
||||
|
||||
viewerPage.checkFileIsLoaded();
|
||||
viewerPage.clickCloseButton();
|
||||
|
||||
contentList.waitForTableBody();
|
||||
|
||||
contentServicesPage.checkDeleteIsDisabled('RoleConsumer' + fileModel.name);
|
||||
|
||||
BrowserActions.closeMenuAndDialogs();
|
||||
|
||||
contentList.checkActionMenuIsNotDisplayed();
|
||||
|
||||
contentServicesPage.metadataContent('RoleConsumer' + fileModel.name);
|
||||
|
||||
notificationPage.checkNotifyContains('You don\'t have access to do this.');
|
||||
|
||||
contentServicesPage.uploadFile(fileModel.location);
|
||||
|
||||
notificationPage.checkNotifyContains('You don\'t have the create permission to upload the content');
|
||||
|
||||
await navigationBarPage.openContentServicesFolder(roleConsumerFolder.entry.id);
|
||||
await contentServicesPage.checkContentIsDisplayed('RoleConsumer' + fileModel.name);
|
||||
await contentList.doubleClickRow('RoleConsumer' + fileModel.name);
|
||||
await viewerPage.checkFileIsLoaded();
|
||||
await viewerPage.clickCloseButton();
|
||||
await contentList.waitForTableBody();
|
||||
await contentServicesPage.checkDeleteIsDisabled('RoleConsumer' + fileModel.name);
|
||||
await BrowserActions.closeMenuAndDialogs();
|
||||
await contentList.checkActionMenuIsNotDisplayed();
|
||||
await contentServicesPage.metadataContent('RoleConsumer' + fileModel.name);
|
||||
await notificationHistoryPage.checkNotifyContains('You don\'t have access to do this.');
|
||||
await contentServicesPage.uploadFile(fileModel.location);
|
||||
await notificationHistoryPage.checkNotifyContains('You don\'t have the create permission to upload the content');
|
||||
});
|
||||
|
||||
it('[C276996] Role Contributor', async () => {
|
||||
|
||||
await loginPage.loginToContentServicesUsingUserModel(filePermissionUser);
|
||||
|
||||
navigationBarPage.openContentServicesFolder(roleContributorFolder.entry.id);
|
||||
|
||||
contentServicesPage.checkContentIsDisplayed('RoleContributor' + fileModel.name);
|
||||
|
||||
contentList.doubleClickRow('RoleContributor' + fileModel.name);
|
||||
|
||||
viewerPage.checkFileIsLoaded();
|
||||
viewerPage.clickCloseButton();
|
||||
|
||||
contentList.waitForTableBody();
|
||||
|
||||
contentServicesPage.checkDeleteIsDisabled('RoleContributor' + fileModel.name);
|
||||
|
||||
BrowserActions.closeMenuAndDialogs();
|
||||
|
||||
contentList.checkActionMenuIsNotDisplayed();
|
||||
|
||||
contentServicesPage.metadataContent('RoleContributor' + fileModel.name);
|
||||
|
||||
notificationPage.checkNotifyContains('You don\'t have access to do this.');
|
||||
|
||||
contentServicesPage.uploadFile(testFileModel.location).checkContentIsDisplayed(testFileModel.name);
|
||||
|
||||
uploadDialog.fileIsUploaded(testFileModel.name);
|
||||
uploadDialog.clickOnCloseButton().dialogIsNotDisplayed();
|
||||
|
||||
await navigationBarPage.openContentServicesFolder(roleContributorFolder.entry.id);
|
||||
await contentServicesPage.checkContentIsDisplayed('RoleContributor' + fileModel.name);
|
||||
await contentList.doubleClickRow('RoleContributor' + fileModel.name);
|
||||
await viewerPage.checkFileIsLoaded();
|
||||
await viewerPage.clickCloseButton();
|
||||
await contentList.waitForTableBody();
|
||||
await contentServicesPage.checkDeleteIsDisabled('RoleContributor' + fileModel.name);
|
||||
await BrowserActions.closeMenuAndDialogs();
|
||||
await contentList.checkActionMenuIsNotDisplayed();
|
||||
await contentServicesPage.metadataContent('RoleContributor' + fileModel.name);
|
||||
await notificationHistoryPage.checkNotifyContains('You don\'t have access to do this.');
|
||||
await contentServicesPage.uploadFile(testFileModel.location);
|
||||
await contentServicesPage.checkContentIsDisplayed(testFileModel.name);
|
||||
await uploadDialog.fileIsUploaded(testFileModel.name);
|
||||
await uploadDialog.clickOnCloseButton();
|
||||
await uploadDialog.dialogIsNotDisplayed();
|
||||
});
|
||||
|
||||
it('[C277000] Role Editor', async () => {
|
||||
|
||||
await loginPage.loginToContentServicesUsingUserModel(filePermissionUser);
|
||||
|
||||
navigationBarPage.openContentServicesFolder(roleEditorFolder.entry.id);
|
||||
|
||||
contentServicesPage.checkContentIsDisplayed('RoleEditor' + fileModel.name);
|
||||
|
||||
contentList.doubleClickRow('RoleEditor' + fileModel.name);
|
||||
|
||||
viewerPage.checkFileIsLoaded();
|
||||
viewerPage.clickCloseButton();
|
||||
|
||||
contentList.waitForTableBody();
|
||||
|
||||
contentServicesPage.checkDeleteIsDisabled('RoleEditor' + fileModel.name);
|
||||
|
||||
BrowserActions.closeMenuAndDialogs();
|
||||
|
||||
browser.controlFlow().execute(async () => {
|
||||
|
||||
contentList.checkActionMenuIsNotDisplayed();
|
||||
|
||||
contentServicesPage.metadataContent('RoleEditor' + fileModel.name);
|
||||
|
||||
metadataViewPage.editIconIsDisplayed();
|
||||
|
||||
await metadataViewPage.editIconClick();
|
||||
|
||||
metadataViewPage.editPropertyIconIsDisplayed('properties.cm:title');
|
||||
metadataViewPage.clickEditPropertyIcons('properties.cm:title');
|
||||
metadataViewPage.enterPropertyText('properties.cm:title', 'newTitle1');
|
||||
|
||||
await metadataViewPage.clickUpdatePropertyIcon('properties.cm:title');
|
||||
|
||||
expect(metadataViewPage.getPropertyText('properties.cm:title')).toEqual('newTitle1');
|
||||
|
||||
metadataViewPage.clickCloseButton();
|
||||
|
||||
contentServicesPage.uploadFile(fileModel.location);
|
||||
|
||||
notificationPage.checkNotifyContains('You don\'t have the create permission to upload the content');
|
||||
|
||||
});
|
||||
|
||||
await navigationBarPage.openContentServicesFolder(roleEditorFolder.entry.id);
|
||||
await contentServicesPage.checkContentIsDisplayed('RoleEditor' + fileModel.name);
|
||||
await contentList.doubleClickRow('RoleEditor' + fileModel.name);
|
||||
await viewerPage.checkFileIsLoaded();
|
||||
await viewerPage.clickCloseButton();
|
||||
await contentList.waitForTableBody();
|
||||
await contentServicesPage.checkDeleteIsDisabled('RoleEditor' + fileModel.name);
|
||||
await BrowserActions.closeMenuAndDialogs();
|
||||
await contentList.checkActionMenuIsNotDisplayed();
|
||||
await contentServicesPage.metadataContent('RoleEditor' + fileModel.name);
|
||||
await metadataViewPage.editIconIsDisplayed();
|
||||
await metadataViewPage.editIconClick();
|
||||
await metadataViewPage.editPropertyIconIsDisplayed('properties.cm:title');
|
||||
await metadataViewPage.clickEditPropertyIcons('properties.cm:title');
|
||||
await metadataViewPage.enterPropertyText('properties.cm:title', 'newTitle1');
|
||||
await metadataViewPage.clickUpdatePropertyIcon('properties.cm:title');
|
||||
await expect(await metadataViewPage.getPropertyText('properties.cm:title')).toEqual('newTitle1');
|
||||
await metadataViewPage.clickCloseButton();
|
||||
await contentServicesPage.uploadFile(fileModel.location);
|
||||
await notificationHistoryPage.checkNotifyContains('You don\'t have the create permission to upload the content');
|
||||
});
|
||||
|
||||
it('[C277003] Role Collaborator', async () => {
|
||||
|
||||
await loginPage.loginToContentServicesUsingUserModel(filePermissionUser);
|
||||
|
||||
navigationBarPage.openContentServicesFolder(roleCollaboratorFolder.entry.id);
|
||||
|
||||
contentServicesPage.checkContentIsDisplayed('RoleCollaborator' + fileModel.name);
|
||||
|
||||
contentList.doubleClickRow('RoleCollaborator' + fileModel.name);
|
||||
|
||||
viewerPage.checkFileIsLoaded();
|
||||
viewerPage.clickCloseButton();
|
||||
|
||||
contentList.waitForTableBody();
|
||||
|
||||
contentServicesPage.checkDeleteIsDisabled('RoleCollaborator' + fileModel.name);
|
||||
|
||||
BrowserActions.closeMenuAndDialogs();
|
||||
|
||||
browser.controlFlow().execute(async () => {
|
||||
|
||||
contentList.checkActionMenuIsNotDisplayed();
|
||||
|
||||
contentServicesPage.metadataContent('RoleCollaborator' + fileModel.name);
|
||||
|
||||
metadataViewPage.editIconIsDisplayed();
|
||||
|
||||
await metadataViewPage.editIconClick();
|
||||
|
||||
metadataViewPage.editPropertyIconIsDisplayed('properties.cm:title');
|
||||
metadataViewPage.clickEditPropertyIcons('properties.cm:title');
|
||||
metadataViewPage.enterPropertyText('properties.cm:title', 'newTitle2');
|
||||
|
||||
await metadataViewPage.clickUpdatePropertyIcon('properties.cm:title');
|
||||
|
||||
expect(metadataViewPage.getPropertyText('properties.cm:title')).toEqual('newTitle2');
|
||||
|
||||
metadataViewPage.clickCloseButton();
|
||||
|
||||
contentServicesPage.uploadFile(testFileModel.location).checkContentIsDisplayed(testFileModel.name);
|
||||
|
||||
uploadDialog.fileIsUploaded(testFileModel.name);
|
||||
uploadDialog.clickOnCloseButton().dialogIsNotDisplayed();
|
||||
|
||||
});
|
||||
|
||||
await navigationBarPage.openContentServicesFolder(roleCollaboratorFolder.entry.id);
|
||||
await contentServicesPage.checkContentIsDisplayed('RoleCollaborator' + fileModel.name);
|
||||
await contentList.doubleClickRow('RoleCollaborator' + fileModel.name);
|
||||
await viewerPage.checkFileIsLoaded();
|
||||
await viewerPage.clickCloseButton();
|
||||
await contentList.waitForTableBody();
|
||||
await contentServicesPage.checkDeleteIsDisabled('RoleCollaborator' + fileModel.name);
|
||||
await BrowserActions.closeMenuAndDialogs();
|
||||
await contentList.checkActionMenuIsNotDisplayed();
|
||||
await contentServicesPage.metadataContent('RoleCollaborator' + fileModel.name);
|
||||
await metadataViewPage.editIconIsDisplayed();
|
||||
await metadataViewPage.editIconClick();
|
||||
await metadataViewPage.editPropertyIconIsDisplayed('properties.cm:title');
|
||||
await metadataViewPage.clickEditPropertyIcons('properties.cm:title');
|
||||
await metadataViewPage.enterPropertyText('properties.cm:title', 'newTitle2');
|
||||
await metadataViewPage.clickUpdatePropertyIcon('properties.cm:title');
|
||||
await expect(await metadataViewPage.getPropertyText('properties.cm:title')).toEqual('newTitle2');
|
||||
await metadataViewPage.clickCloseButton();
|
||||
await contentServicesPage.uploadFile(testFileModel.location);
|
||||
await contentServicesPage.checkContentIsDisplayed(testFileModel.name);
|
||||
await uploadDialog.fileIsUploaded(testFileModel.name);
|
||||
await uploadDialog.clickOnCloseButton();
|
||||
await uploadDialog.dialogIsNotDisplayed();
|
||||
});
|
||||
|
||||
it('[C277004] Role Coordinator', async () => {
|
||||
|
||||
await loginPage.loginToContentServicesUsingUserModel(filePermissionUser);
|
||||
|
||||
navigationBarPage.openContentServicesFolder(roleCoordinatorFolder.entry.id);
|
||||
|
||||
contentServicesPage.checkContentIsDisplayed('RoleCoordinator' + fileModel.name);
|
||||
|
||||
contentList.doubleClickRow('RoleCoordinator' + fileModel.name);
|
||||
|
||||
viewerPage.checkFileIsLoaded();
|
||||
viewerPage.clickCloseButton();
|
||||
|
||||
contentList.waitForTableBody();
|
||||
|
||||
contentServicesPage.metadataContent('RoleCoordinator' + fileModel.name);
|
||||
|
||||
metadataViewPage.editIconIsDisplayed();
|
||||
|
||||
browser.controlFlow().execute(async () => {
|
||||
|
||||
await metadataViewPage.editIconClick();
|
||||
|
||||
metadataViewPage.editPropertyIconIsDisplayed('properties.cm:title');
|
||||
metadataViewPage.clickEditPropertyIcons('properties.cm:title');
|
||||
metadataViewPage.enterPropertyText('properties.cm:title', 'newTitle3');
|
||||
|
||||
await metadataViewPage.clickUpdatePropertyIcon('properties.cm:title');
|
||||
|
||||
expect(metadataViewPage.getPropertyText('properties.cm:title')).toEqual('newTitle3');
|
||||
|
||||
metadataViewPage.clickCloseButton();
|
||||
contentServicesPage.uploadFile(pngFileModel.location).checkContentIsDisplayed(pngFileModel.name);
|
||||
|
||||
uploadDialog.fileIsUploaded(pngFileModel.name);
|
||||
uploadDialog.clickOnCloseButton().dialogIsNotDisplayed();
|
||||
|
||||
contentServicesPage.checkContentIsDisplayed('RoleCoordinator' + fileModel.name);
|
||||
contentServicesPage.deleteContent('RoleCoordinator' + fileModel.name);
|
||||
contentServicesPage.checkContentIsNotDisplayed('RoleCoordinator' + fileModel.name);
|
||||
|
||||
});
|
||||
|
||||
await navigationBarPage.openContentServicesFolder(roleCoordinatorFolder.entry.id);
|
||||
await contentServicesPage.checkContentIsDisplayed('RoleCoordinator' + fileModel.name);
|
||||
await contentList.doubleClickRow('RoleCoordinator' + fileModel.name);
|
||||
await viewerPage.checkFileIsLoaded();
|
||||
await viewerPage.clickCloseButton();
|
||||
await contentList.waitForTableBody();
|
||||
await contentServicesPage.metadataContent('RoleCoordinator' + fileModel.name);
|
||||
await metadataViewPage.editIconIsDisplayed();
|
||||
await metadataViewPage.editIconClick();
|
||||
await metadataViewPage.editPropertyIconIsDisplayed('properties.cm:title');
|
||||
await metadataViewPage.clickEditPropertyIcons('properties.cm:title');
|
||||
await metadataViewPage.enterPropertyText('properties.cm:title', 'newTitle3');
|
||||
await metadataViewPage.clickUpdatePropertyIcon('properties.cm:title');
|
||||
await expect(await metadataViewPage.getPropertyText('properties.cm:title')).toEqual('newTitle3');
|
||||
await metadataViewPage.clickCloseButton();
|
||||
await contentServicesPage.uploadFile(pngFileModel.location);
|
||||
await contentServicesPage.checkContentIsDisplayed(pngFileModel.name);
|
||||
await uploadDialog.fileIsUploaded(pngFileModel.name);
|
||||
await uploadDialog.clickOnCloseButton();
|
||||
await uploadDialog.dialogIsNotDisplayed();
|
||||
await contentServicesPage.checkContentIsDisplayed('RoleCoordinator' + fileModel.name);
|
||||
await contentServicesPage.deleteContent('RoleCoordinator' + fileModel.name);
|
||||
await contentServicesPage.checkContentIsNotDisplayed('RoleCoordinator' + fileModel.name);
|
||||
});
|
||||
|
||||
it('[C279881] No Permission User', async () => {
|
||||
|
||||
await loginPage.loginToContentServicesUsingUserModel(filePermissionUser);
|
||||
|
||||
navigationBarPage.openContentServicesFolder(roleConsumerFolder.entry.id);
|
||||
|
||||
contentServicesPage.checkContentIsDisplayed('RoleConsumer' + fileModel.name);
|
||||
contentServicesPage.checkSelectedSiteIsDisplayed('My files');
|
||||
|
||||
contentList.rightClickOnRow('RoleConsumer' + fileModel.name);
|
||||
|
||||
contentServicesPage.pressContextMenuActionNamed('Permission');
|
||||
|
||||
permissionsPage.checkPermissionInheritedButtonIsDisplayed();
|
||||
permissionsPage.checkAddPermissionButtonIsDisplayed();
|
||||
permissionsPage.clickPermissionInheritedButton();
|
||||
|
||||
notificationPage.checkNotifyContains('You are not allowed to change permissions');
|
||||
|
||||
permissionsPage.clickAddPermissionButton();
|
||||
|
||||
notificationPage.checkNotifyContains('You are not allowed to change permissions');
|
||||
|
||||
await navigationBarPage.openContentServicesFolder(roleConsumerFolder.entry.id);
|
||||
await contentServicesPage.checkContentIsDisplayed('RoleConsumer' + fileModel.name);
|
||||
await contentServicesPage.checkSelectedSiteIsDisplayed('My files');
|
||||
await contentList.rightClickOnRow('RoleConsumer' + fileModel.name);
|
||||
await contentServicesPage.pressContextMenuActionNamed('Permission');
|
||||
await permissionsPage.checkPermissionInheritedButtonIsDisplayed();
|
||||
await permissionsPage.checkAddPermissionButtonIsDisplayed();
|
||||
await permissionsPage.clickPermissionInheritedButton();
|
||||
await notificationHistoryPage.checkNotifyContains('You are not allowed to change permissions');
|
||||
await permissionsPage.clickAddPermissionButton();
|
||||
await notificationHistoryPage.checkNotifyContains('You are not allowed to change permissions');
|
||||
});
|
||||
|
||||
});
|
||||
|
||||
@@ -29,7 +29,7 @@ import { MetadataViewPage } from '../../pages/adf/metadataViewPage';
|
||||
import { UploadDialog } from '../../pages/adf/dialog/uploadDialog';
|
||||
import { NavigationBarPage } from '../../pages/adf/navigationBarPage';
|
||||
|
||||
describe('Permissions Component', function () {
|
||||
describe('Permissions Component', () => {
|
||||
|
||||
this.alfrescoJsApi = new AlfrescoApi({
|
||||
provider: 'ECM',
|
||||
@@ -53,18 +53,18 @@ describe('Permissions Component', function () {
|
||||
let publicSite, privateSite, folderName;
|
||||
|
||||
const fileModel = new FileModel({
|
||||
'name': resources.Files.ADF_DOCUMENTS.TXT_0B.file_name,
|
||||
'location': resources.Files.ADF_DOCUMENTS.TXT_0B.file_location
|
||||
name: resources.Files.ADF_DOCUMENTS.TXT_0B.file_name,
|
||||
location: resources.Files.ADF_DOCUMENTS.TXT_0B.file_location
|
||||
});
|
||||
|
||||
const testFileModel = new FileModel({
|
||||
'name': resources.Files.ADF_DOCUMENTS.TEST.file_name,
|
||||
'location': resources.Files.ADF_DOCUMENTS.TEST.file_location
|
||||
name: resources.Files.ADF_DOCUMENTS.TEST.file_name,
|
||||
location: resources.Files.ADF_DOCUMENTS.TEST.file_location
|
||||
});
|
||||
|
||||
const pngFileModel = new FileModel({
|
||||
'name': resources.Files.ADF_DOCUMENTS.PNG.file_name,
|
||||
'location': resources.Files.ADF_DOCUMENTS.PNG.file_location
|
||||
name: resources.Files.ADF_DOCUMENTS.PNG.file_name,
|
||||
location: resources.Files.ADF_DOCUMENTS.PNG.file_location
|
||||
});
|
||||
|
||||
let siteFolder, privateSiteFile;
|
||||
@@ -76,7 +76,7 @@ describe('Permissions Component', function () {
|
||||
contributorUser = new AcsUserModel();
|
||||
managerUser = new AcsUserModel();
|
||||
|
||||
beforeAll(async (done) => {
|
||||
beforeAll(async () => {
|
||||
|
||||
await this.alfrescoJsApi.login(browser.params.testConfig.adf.adminEmail, browser.params.testConfig.adf.adminPassword);
|
||||
await this.alfrescoJsApi.core.peopleApi.addPerson(folderOwnerUser);
|
||||
@@ -87,7 +87,7 @@ describe('Permissions Component', function () {
|
||||
await this.alfrescoJsApi.core.peopleApi.addPerson(managerUser);
|
||||
await this.alfrescoJsApi.login(folderOwnerUser.id, folderOwnerUser.password);
|
||||
|
||||
browser.sleep(15000);
|
||||
await browser.sleep(15000);
|
||||
|
||||
const publicSiteName = `PUBLIC_TEST_SITE_${StringUtil.generateRandomString(5)}`;
|
||||
|
||||
@@ -144,121 +144,125 @@ describe('Permissions Component', function () {
|
||||
|
||||
await uploadActions.uploadFile(fileModel.location, 'Site' + fileModel.name, siteFolder.entry.id);
|
||||
|
||||
done();
|
||||
|
||||
});
|
||||
|
||||
afterAll(async (done) => {
|
||||
afterAll(async () => {
|
||||
await navigationBarPage.clickLogoutButton();
|
||||
|
||||
await this.alfrescoJsApi.login(browser.params.testConfig.adf.adminEmail, browser.params.testConfig.adf.adminPassword);
|
||||
await this.alfrescoJsApi.core.sitesApi.deleteSite(publicSite.entry.id);
|
||||
await this.alfrescoJsApi.core.sitesApi.deleteSite(privateSite.entry.id);
|
||||
|
||||
done();
|
||||
});
|
||||
|
||||
describe('Role Site Dropdown', function () {
|
||||
describe('Role Site Dropdown', () => {
|
||||
|
||||
beforeAll(async (done) => {
|
||||
beforeAll(async () => {
|
||||
await loginPage.loginToContentServicesUsingUserModel(folderOwnerUser);
|
||||
|
||||
await BrowserActions.getUrl(browser.params.testConfig.adf.url + '/files/' + publicSite.entry.guid);
|
||||
|
||||
done();
|
||||
});
|
||||
|
||||
it('[C277002] Should display the Role Site dropdown', async () => {
|
||||
contentServicesPage.checkContentIsDisplayed(folderName);
|
||||
await contentServicesPage.checkContentIsDisplayed(folderName);
|
||||
|
||||
contentList.rightClickOnRow(folderName);
|
||||
await contentList.rightClickOnRow(folderName);
|
||||
|
||||
contentServicesPage.pressContextMenuActionNamed('Permission');
|
||||
await contentServicesPage.pressContextMenuActionNamed('Permission');
|
||||
|
||||
permissionsPage.checkPermissionInheritedButtonIsDisplayed();
|
||||
permissionsPage.checkAddPermissionButtonIsDisplayed();
|
||||
permissionsPage.clickAddPermissionButton();
|
||||
permissionsPage.checkAddPermissionDialogIsDisplayed();
|
||||
permissionsPage.checkSearchUserInputIsDisplayed();
|
||||
await permissionsPage.checkPermissionInheritedButtonIsDisplayed();
|
||||
await permissionsPage.checkAddPermissionButtonIsDisplayed();
|
||||
|
||||
permissionsPage.searchUserOrGroup(consumerUser.getId());
|
||||
permissionsPage.clickUserOrGroup(consumerUser.getFirstName());
|
||||
permissionsPage.checkUserOrGroupIsAdded(consumerUser.getId());
|
||||
await browser.sleep(5000);
|
||||
|
||||
expect(permissionsPage.getRoleCellValue(consumerUser.getId())).toEqual('SiteCollaborator');
|
||||
await permissionsPage.clickAddPermissionButton();
|
||||
await permissionsPage.checkAddPermissionDialogIsDisplayed();
|
||||
await permissionsPage.checkSearchUserInputIsDisplayed();
|
||||
|
||||
permissionsPage.clickRoleDropdownByUserOrGroupName(consumerUser.getId());
|
||||
await permissionsPage.searchUserOrGroup(consumerUser.getId());
|
||||
|
||||
expect(permissionsPage.getRoleDropdownOptions().count()).toBe(4);
|
||||
expect(permissionsPage.getRoleDropdownOptions().get(0).getText()).toBe(CONSTANTS.CS_USER_ROLES.COLLABORATOR);
|
||||
expect(permissionsPage.getRoleDropdownOptions().get(1).getText()).toBe(CONSTANTS.CS_USER_ROLES.CONSUMER);
|
||||
expect(permissionsPage.getRoleDropdownOptions().get(2).getText()).toBe(CONSTANTS.CS_USER_ROLES.CONTRIBUTOR);
|
||||
expect(permissionsPage.getRoleDropdownOptions().get(3).getText()).toBe(CONSTANTS.CS_USER_ROLES.MANAGER);
|
||||
await permissionsPage.clickUserOrGroup(consumerUser.getFirstName());
|
||||
await permissionsPage.checkUserOrGroupIsAdded(consumerUser.getId());
|
||||
|
||||
await expect(await permissionsPage.getRoleCellValue(consumerUser.getId())).toEqual('SiteCollaborator');
|
||||
|
||||
await permissionsPage.clickRoleDropdownByUserOrGroupName(consumerUser.getId());
|
||||
|
||||
const roleDropdownOptions = permissionsPage.getRoleDropdownOptions();
|
||||
|
||||
await expect(await roleDropdownOptions.count()).toBe(4);
|
||||
await expect(await BrowserActions.getText(roleDropdownOptions.get(0))).toBe(CONSTANTS.CS_USER_ROLES.COLLABORATOR);
|
||||
await expect(await BrowserActions.getText(roleDropdownOptions.get(1))).toBe(CONSTANTS.CS_USER_ROLES.CONSUMER);
|
||||
await expect(await BrowserActions.getText(roleDropdownOptions.get(2))).toBe(CONSTANTS.CS_USER_ROLES.CONTRIBUTOR);
|
||||
await expect(await BrowserActions.getText(roleDropdownOptions.get(3))).toBe(CONSTANTS.CS_USER_ROLES.MANAGER);
|
||||
});
|
||||
|
||||
});
|
||||
|
||||
describe('Roles: SiteConsumer, SiteCollaborator, SiteContributor, SiteManager', function () {
|
||||
describe('Roles: SiteConsumer, SiteCollaborator, SiteContributor, SiteManager', () => {
|
||||
|
||||
it('[C276994] Role SiteConsumer', async () => {
|
||||
|
||||
await loginPage.loginToContentServicesUsingUserModel(siteConsumerUser);
|
||||
|
||||
navigationBarPage.openContentServicesFolder(siteFolder.entry.id);
|
||||
await navigationBarPage.openContentServicesFolder(siteFolder.entry.id);
|
||||
|
||||
contentServicesPage.checkContentIsDisplayed('Site' + fileModel.name);
|
||||
await contentServicesPage.checkContentIsDisplayed('Site' + fileModel.name);
|
||||
|
||||
contentList.doubleClickRow('Site' + fileModel.name);
|
||||
await contentList.doubleClickRow('Site' + fileModel.name);
|
||||
|
||||
viewerPage.checkFileIsLoaded();
|
||||
viewerPage.clickCloseButton();
|
||||
await viewerPage.checkFileIsLoaded();
|
||||
await viewerPage.clickCloseButton();
|
||||
|
||||
contentList.waitForTableBody();
|
||||
await contentList.waitForTableBody();
|
||||
|
||||
contentServicesPage.checkDeleteIsDisabled('Site' + fileModel.name);
|
||||
await contentServicesPage.checkDeleteIsDisabled('Site' + fileModel.name);
|
||||
|
||||
BrowserActions.closeMenuAndDialogs();
|
||||
await BrowserActions.closeMenuAndDialogs();
|
||||
|
||||
contentList.checkActionMenuIsNotDisplayed();
|
||||
await contentList.checkActionMenuIsNotDisplayed();
|
||||
|
||||
contentServicesPage.metadataContent('Site' + fileModel.name);
|
||||
await contentServicesPage.metadataContent('Site' + fileModel.name);
|
||||
|
||||
notificationHistoryPage.checkNotifyContains('You don\'t have access to do this.');
|
||||
await notificationHistoryPage.checkNotifyContains('You don\'t have access to do this.');
|
||||
|
||||
contentServicesPage.uploadFile(fileModel.location);
|
||||
await contentServicesPage.uploadFile(fileModel.location);
|
||||
|
||||
notificationHistoryPage.checkNotifyContains('You don\'t have the create permission to upload the content');
|
||||
await notificationHistoryPage.checkNotifyContains('You don\'t have the create permission to upload the content');
|
||||
|
||||
});
|
||||
|
||||
it('[C276997] Role SiteContributor', async () => {
|
||||
await loginPage.loginToContentServicesUsingUserModel(contributorUser);
|
||||
|
||||
navigationBarPage.openContentServicesFolder(siteFolder.entry.id);
|
||||
await navigationBarPage.openContentServicesFolder(siteFolder.entry.id);
|
||||
|
||||
contentServicesPage.checkContentIsDisplayed('Site' + fileModel.name);
|
||||
await contentServicesPage.checkContentIsDisplayed('Site' + fileModel.name);
|
||||
|
||||
contentList.doubleClickRow('Site' + fileModel.name);
|
||||
await contentList.doubleClickRow('Site' + fileModel.name);
|
||||
|
||||
viewerPage.checkFileIsLoaded();
|
||||
viewerPage.clickCloseButton();
|
||||
await viewerPage.checkFileIsLoaded();
|
||||
await viewerPage.clickCloseButton();
|
||||
|
||||
contentList.waitForTableBody();
|
||||
await contentList.waitForTableBody();
|
||||
|
||||
contentServicesPage.checkDeleteIsDisabled('Site' + fileModel.name);
|
||||
await contentServicesPage.checkDeleteIsDisabled('Site' + fileModel.name);
|
||||
|
||||
BrowserActions.closeMenuAndDialogs();
|
||||
await BrowserActions.closeMenuAndDialogs();
|
||||
|
||||
contentList.checkActionMenuIsNotDisplayed();
|
||||
await contentList.checkActionMenuIsNotDisplayed();
|
||||
|
||||
contentServicesPage.metadataContent('Site' + fileModel.name);
|
||||
await contentServicesPage.metadataContent('Site' + fileModel.name);
|
||||
|
||||
notificationHistoryPage.checkNotifyContains('You don\'t have access to do this.');
|
||||
await notificationHistoryPage.checkNotifyContains('You don\'t have access to do this.');
|
||||
|
||||
contentServicesPage.uploadFile(testFileModel.location).checkContentIsDisplayed(testFileModel.name);
|
||||
await contentServicesPage.uploadFile(testFileModel.location);
|
||||
await contentServicesPage.checkContentIsDisplayed(testFileModel.name);
|
||||
|
||||
uploadDialog.fileIsUploaded(testFileModel.name);
|
||||
uploadDialog.clickOnCloseButton().dialogIsNotDisplayed();
|
||||
await uploadDialog.fileIsUploaded(testFileModel.name);
|
||||
await uploadDialog.clickOnCloseButton();
|
||||
await uploadDialog.dialogIsNotDisplayed();
|
||||
|
||||
});
|
||||
|
||||
@@ -266,86 +270,81 @@ describe('Permissions Component', function () {
|
||||
|
||||
await loginPage.loginToContentServicesUsingUserModel(collaboratorUser);
|
||||
|
||||
navigationBarPage.openContentServicesFolder(siteFolder.entry.id);
|
||||
await navigationBarPage.openContentServicesFolder(siteFolder.entry.id);
|
||||
|
||||
contentServicesPage.checkContentIsDisplayed('Site' + fileModel.name);
|
||||
await contentServicesPage.checkContentIsDisplayed('Site' + fileModel.name);
|
||||
|
||||
contentList.doubleClickRow('Site' + fileModel.name);
|
||||
await contentList.doubleClickRow('Site' + fileModel.name);
|
||||
|
||||
viewerPage.checkFileIsLoaded();
|
||||
viewerPage.clickCloseButton();
|
||||
await viewerPage.checkFileIsLoaded();
|
||||
await viewerPage.clickCloseButton();
|
||||
|
||||
contentList.waitForTableBody();
|
||||
await contentList.waitForTableBody();
|
||||
|
||||
contentServicesPage.checkDeleteIsDisabled('Site' + fileModel.name);
|
||||
await contentServicesPage.checkDeleteIsDisabled('Site' + fileModel.name);
|
||||
|
||||
BrowserActions.closeMenuAndDialogs();
|
||||
await BrowserActions.closeMenuAndDialogs();
|
||||
|
||||
browser.controlFlow().execute(async () => {
|
||||
await contentList.checkActionMenuIsNotDisplayed();
|
||||
|
||||
contentList.checkActionMenuIsNotDisplayed();
|
||||
await contentServicesPage.metadataContent('Site' + fileModel.name);
|
||||
|
||||
contentServicesPage.metadataContent('Site' + fileModel.name);
|
||||
await metadataViewPage.editIconIsDisplayed();
|
||||
await metadataViewPage.editIconClick();
|
||||
|
||||
metadataViewPage.editIconIsDisplayed();
|
||||
await metadataViewPage.editIconClick();
|
||||
await metadataViewPage.editPropertyIconIsDisplayed('properties.cm:title');
|
||||
await metadataViewPage.clickEditPropertyIcons('properties.cm:title');
|
||||
|
||||
metadataViewPage.editPropertyIconIsDisplayed('properties.cm:title');
|
||||
metadataViewPage.clickEditPropertyIcons('properties.cm:title');
|
||||
await metadataViewPage.enterPropertyText('properties.cm:title', 'newTitle');
|
||||
await metadataViewPage.clickUpdatePropertyIcon('properties.cm:title');
|
||||
|
||||
metadataViewPage.enterPropertyText('properties.cm:title', 'newTitle');
|
||||
await metadataViewPage.clickUpdatePropertyIcon('properties.cm:title');
|
||||
await expect(await metadataViewPage.getPropertyText('properties.cm:title')).toEqual('newTitle');
|
||||
await metadataViewPage.clickCloseButton();
|
||||
|
||||
expect(metadataViewPage.getPropertyText('properties.cm:title')).toEqual('newTitle');
|
||||
metadataViewPage.clickCloseButton();
|
||||
|
||||
contentServicesPage.uploadFile(pngFileModel.location).checkContentIsDisplayed(pngFileModel.name);
|
||||
|
||||
uploadDialog.fileIsUploaded(pngFileModel.name);
|
||||
uploadDialog.clickOnCloseButton().dialogIsNotDisplayed();
|
||||
|
||||
});
|
||||
await contentServicesPage.uploadFile(pngFileModel.location);
|
||||
await contentServicesPage.checkContentIsDisplayed(pngFileModel.name);
|
||||
|
||||
await uploadDialog.fileIsUploaded(pngFileModel.name);
|
||||
await uploadDialog.clickOnCloseButton();
|
||||
await uploadDialog.dialogIsNotDisplayed();
|
||||
});
|
||||
|
||||
it('[C277006] Role SiteManager', async () => {
|
||||
await loginPage.loginToContentServicesUsingUserModel(managerUser);
|
||||
navigationBarPage.openContentServicesFolder(siteFolder.entry.id);
|
||||
contentServicesPage.checkContentIsDisplayed('Site' + fileModel.name);
|
||||
await navigationBarPage.openContentServicesFolder(siteFolder.entry.id);
|
||||
await contentServicesPage.checkContentIsDisplayed('Site' + fileModel.name);
|
||||
|
||||
contentList.doubleClickRow('Site' + fileModel.name);
|
||||
await contentList.doubleClickRow('Site' + fileModel.name);
|
||||
|
||||
viewerPage.checkFileIsLoaded();
|
||||
viewerPage.clickCloseButton();
|
||||
await viewerPage.checkFileIsLoaded();
|
||||
await viewerPage.clickCloseButton();
|
||||
|
||||
contentList.waitForTableBody();
|
||||
contentServicesPage.metadataContent('Site' + fileModel.name);
|
||||
await contentList.waitForTableBody();
|
||||
await contentServicesPage.metadataContent('Site' + fileModel.name);
|
||||
|
||||
metadataViewPage.editIconIsDisplayed();
|
||||
await metadataViewPage.editIconIsDisplayed();
|
||||
|
||||
browser.controlFlow().execute(async () => {
|
||||
await metadataViewPage.editIconClick();
|
||||
|
||||
await metadataViewPage.editIconClick();
|
||||
await metadataViewPage.editPropertyIconIsDisplayed('properties.cm:description');
|
||||
await metadataViewPage.clickEditPropertyIcons('properties.cm:description');
|
||||
await metadataViewPage.enterDescriptionText('newDescription');
|
||||
|
||||
metadataViewPage.editPropertyIconIsDisplayed('properties.cm:description');
|
||||
metadataViewPage.clickEditPropertyIcons('properties.cm:description');
|
||||
metadataViewPage.enterDescriptionText('newDescription');
|
||||
await metadataViewPage.clickUpdatePropertyIcon('properties.cm:description');
|
||||
|
||||
await metadataViewPage.clickUpdatePropertyIcon('properties.cm:description');
|
||||
await expect(await metadataViewPage.getPropertyText('properties.cm:description')).toEqual('newDescription');
|
||||
|
||||
expect(metadataViewPage.getPropertyText('properties.cm:description')).toEqual('newDescription');
|
||||
await metadataViewPage.clickCloseButton();
|
||||
await contentServicesPage.uploadFile(testFileModel.location);
|
||||
await contentServicesPage.checkContentIsDisplayed(testFileModel.name);
|
||||
|
||||
metadataViewPage.clickCloseButton();
|
||||
contentServicesPage.uploadFile(testFileModel.location).checkContentIsDisplayed(testFileModel.name);
|
||||
|
||||
uploadDialog.fileIsUploaded(testFileModel.name);
|
||||
uploadDialog.clickOnCloseButton().dialogIsNotDisplayed();
|
||||
|
||||
contentServicesPage.checkContentIsDisplayed('Site' + fileModel.name);
|
||||
contentServicesPage.deleteContent('Site' + fileModel.name);
|
||||
contentServicesPage.checkContentIsNotDisplayed('Site' + fileModel.name);
|
||||
});
|
||||
await uploadDialog.fileIsUploaded(testFileModel.name);
|
||||
await uploadDialog.clickOnCloseButton();
|
||||
await uploadDialog.dialogIsNotDisplayed();
|
||||
|
||||
await contentServicesPage.checkContentIsDisplayed('Site' + fileModel.name);
|
||||
await contentServicesPage.deleteContent('Site' + fileModel.name);
|
||||
await contentServicesPage.checkContentIsNotDisplayed('Site' + fileModel.name);
|
||||
});
|
||||
|
||||
});
|
||||
|
||||
@@ -48,13 +48,13 @@ describe('Share file', () => {
|
||||
const acsUser = new AcsUserModel();
|
||||
const uploadActions = new UploadActions(this.alfrescoJsApi);
|
||||
const pngFileModel = new FileModel({
|
||||
'name': resources.Files.ADF_DOCUMENTS.PNG.file_name,
|
||||
'location': resources.Files.ADF_DOCUMENTS.PNG.file_location
|
||||
name: resources.Files.ADF_DOCUMENTS.PNG.file_name,
|
||||
location: resources.Files.ADF_DOCUMENTS.PNG.file_location
|
||||
});
|
||||
|
||||
let nodeId;
|
||||
|
||||
beforeAll(async (done) => {
|
||||
beforeAll(async () => {
|
||||
await this.alfrescoJsApi.login(browser.params.testConfig.adf.adminEmail, browser.params.testConfig.adf.adminPassword);
|
||||
await this.alfrescoJsApi.core.peopleApi.addPerson(acsUser);
|
||||
await this.alfrescoJsApi.login(acsUser.id, acsUser.password);
|
||||
@@ -67,147 +67,144 @@ describe('Share file', () => {
|
||||
|
||||
await navigationBarPage.clickContentServicesButton();
|
||||
|
||||
done();
|
||||
});
|
||||
|
||||
afterAll(async (done) => {
|
||||
afterAll(async () => {
|
||||
await this.alfrescoJsApi.login(browser.params.testConfig.adf.adminEmail, browser.params.testConfig.adf.adminPassword);
|
||||
await uploadActions.deleteFileOrFolder(nodeId);
|
||||
done();
|
||||
|
||||
});
|
||||
|
||||
describe('Shared link dialog', () => {
|
||||
|
||||
beforeAll(() => {
|
||||
contentListPage.selectRow(pngFileModel.name);
|
||||
beforeAll(async () => {
|
||||
await contentListPage.selectRow(pngFileModel.name);
|
||||
});
|
||||
|
||||
afterEach(() => {
|
||||
BrowserActions.closeMenuAndDialogs();
|
||||
afterEach(async () => {
|
||||
await BrowserActions.closeMenuAndDialogs();
|
||||
});
|
||||
|
||||
it('[C286549] Should check automatically toggle button in Share dialog', () => {
|
||||
contentServicesPage.clickShareButton();
|
||||
shareDialog.checkDialogIsDisplayed();
|
||||
shareDialog.shareToggleButtonIsChecked();
|
||||
it('[C286549] Should check automatically toggle button in Share dialog', async () => {
|
||||
await contentServicesPage.clickShareButton();
|
||||
await shareDialog.checkDialogIsDisplayed();
|
||||
await shareDialog.shareToggleButtonIsChecked();
|
||||
});
|
||||
|
||||
it('[C286544] Should display notification when clicking URL copy button', () => {
|
||||
contentServicesPage.clickShareButton();
|
||||
shareDialog.checkDialogIsDisplayed();
|
||||
shareDialog.clickShareLinkButton();
|
||||
notificationHistoryPage.checkNotifyContains('Link copied to the clipboard');
|
||||
it('[C286544] Should display notification when clicking URL copy button', async () => {
|
||||
await contentServicesPage.clickShareButton();
|
||||
await shareDialog.checkDialogIsDisplayed();
|
||||
await shareDialog.clickShareLinkButton();
|
||||
await notificationHistoryPage.checkNotifyContains('Link copied to the clipboard');
|
||||
});
|
||||
|
||||
it('[C286543] Should be possible to close Share dialog', () => {
|
||||
contentServicesPage.clickShareButton();
|
||||
shareDialog.checkDialogIsDisplayed();
|
||||
shareDialog.checkShareLinkIsDisplayed();
|
||||
it('[C286543] Should be possible to close Share dialog', async () => {
|
||||
await contentServicesPage.clickShareButton();
|
||||
await shareDialog.checkDialogIsDisplayed();
|
||||
await shareDialog.checkShareLinkIsDisplayed();
|
||||
});
|
||||
|
||||
it('[C286578] Should disable today option in expiration day calendar', () => {
|
||||
contentServicesPage.clickShareButton();
|
||||
shareDialog.checkDialogIsDisplayed();
|
||||
shareDialog.clickDateTimePickerButton();
|
||||
shareDialog.calendarTodayDayIsDisabled();
|
||||
it('[C286578] Should disable today option in expiration day calendar', async () => {
|
||||
await contentServicesPage.clickShareButton();
|
||||
await shareDialog.checkDialogIsDisplayed();
|
||||
await shareDialog.clickDateTimePickerButton();
|
||||
await shareDialog.calendarTodayDayIsDisabled();
|
||||
});
|
||||
|
||||
it('[C286548] Should be possible to set expiry date for link', async () => {
|
||||
contentServicesPage.clickShareButton();
|
||||
shareDialog.checkDialogIsDisplayed();
|
||||
shareDialog.clickDateTimePickerButton();
|
||||
shareDialog.setDefaultDay();
|
||||
shareDialog.setDefaultHour();
|
||||
shareDialog.setDefaultMinutes();
|
||||
shareDialog.dateTimePickerDialogIsClosed();
|
||||
await contentServicesPage.clickShareButton();
|
||||
await shareDialog.checkDialogIsDisplayed();
|
||||
await shareDialog.clickDateTimePickerButton();
|
||||
await shareDialog.setDefaultDay();
|
||||
await shareDialog.setDefaultHour();
|
||||
await shareDialog.setDefaultMinutes();
|
||||
await shareDialog.dateTimePickerDialogIsClosed();
|
||||
const value = await shareDialog.getExpirationDate();
|
||||
shareDialog.clickCloseButton();
|
||||
shareDialog.dialogIsClosed();
|
||||
contentServicesPage.clickShareButton();
|
||||
shareDialog.checkDialogIsDisplayed();
|
||||
shareDialog.expirationDateInputHasValue(value);
|
||||
BrowserActions.closeMenuAndDialogs();
|
||||
await shareDialog.clickCloseButton();
|
||||
await shareDialog.dialogIsClosed();
|
||||
await contentServicesPage.clickShareButton();
|
||||
await shareDialog.checkDialogIsDisplayed();
|
||||
await shareDialog.expirationDateInputHasValue(value);
|
||||
await BrowserActions.closeMenuAndDialogs();
|
||||
});
|
||||
|
||||
it('[C286578] Should disable today option in expiration day calendar', () => {
|
||||
contentServicesPage.clickShareButton();
|
||||
shareDialog.checkDialogIsDisplayed();
|
||||
shareDialog.clickDateTimePickerButton();
|
||||
shareDialog.calendarTodayDayIsDisabled();
|
||||
it('[C286578] Should disable today option in expiration day calendar', async () => {
|
||||
await contentServicesPage.clickShareButton();
|
||||
await shareDialog.checkDialogIsDisplayed();
|
||||
await shareDialog.clickDateTimePickerButton();
|
||||
await shareDialog.calendarTodayDayIsDisabled();
|
||||
});
|
||||
|
||||
it('[C310329] Should be possible to set expiry date only for link', async () => {
|
||||
await LocalStorageUtil.setConfigField('sharedLinkDateTimePickerType', JSON.stringify('date'));
|
||||
contentServicesPage.clickShareButton();
|
||||
shareDialog.checkDialogIsDisplayed();
|
||||
shareDialog.clickDateTimePickerButton();
|
||||
shareDialog.setDefaultDay();
|
||||
shareDialog.dateTimePickerDialogIsClosed();
|
||||
await contentServicesPage.clickShareButton();
|
||||
await shareDialog.checkDialogIsDisplayed();
|
||||
await shareDialog.clickDateTimePickerButton();
|
||||
await shareDialog.setDefaultDay();
|
||||
await shareDialog.dateTimePickerDialogIsClosed();
|
||||
const value = await shareDialog.getExpirationDate();
|
||||
shareDialog.clickCloseButton();
|
||||
shareDialog.dialogIsClosed();
|
||||
contentServicesPage.clickShareButton();
|
||||
shareDialog.checkDialogIsDisplayed();
|
||||
shareDialog.expirationDateInputHasValue(value);
|
||||
BrowserActions.closeMenuAndDialogs();
|
||||
await shareDialog.clickCloseButton();
|
||||
await shareDialog.dialogIsClosed();
|
||||
await contentServicesPage.clickShareButton();
|
||||
await shareDialog.checkDialogIsDisplayed();
|
||||
await shareDialog.expirationDateInputHasValue(value);
|
||||
await BrowserActions.closeMenuAndDialogs();
|
||||
});
|
||||
});
|
||||
|
||||
describe('Shared link preview', () => {
|
||||
afterEach((done) => {
|
||||
loginPage.loginToContentServicesUsingUserModel(acsUser);
|
||||
navigationBarPage.clickContentServicesButton();
|
||||
done();
|
||||
afterEach(async() => {
|
||||
await loginPage.loginToContentServicesUsingUserModel(acsUser);
|
||||
await navigationBarPage.clickContentServicesButton();
|
||||
|
||||
});
|
||||
|
||||
beforeAll(async (done) => {
|
||||
loginPage.loginToContentServicesUsingUserModel(acsUser);
|
||||
beforeAll(async () => {
|
||||
await loginPage.loginToContentServicesUsingUserModel(acsUser);
|
||||
await navigationBarPage.clickContentServicesButton();
|
||||
await contentServicesPage.waitForTableBody();
|
||||
|
||||
navigationBarPage.clickContentServicesButton();
|
||||
contentServicesPage.waitForTableBody();
|
||||
|
||||
done();
|
||||
});
|
||||
|
||||
it('[C286565] Should open file when logged user access shared link', async () => {
|
||||
contentListPage.selectRow(pngFileModel.name);
|
||||
contentServicesPage.clickShareButton();
|
||||
shareDialog.checkDialogIsDisplayed();
|
||||
shareDialog.clickShareLinkButton();
|
||||
notificationHistoryPage.checkNotifyContains('Link copied to the clipboard');
|
||||
await contentListPage.selectRow(pngFileModel.name);
|
||||
await contentServicesPage.clickShareButton();
|
||||
await shareDialog.checkDialogIsDisplayed();
|
||||
await shareDialog.clickShareLinkButton();
|
||||
const sharedLink = await shareDialog.getShareLink();
|
||||
BrowserActions.getUrl(sharedLink);
|
||||
viewerPage.checkFileNameIsDisplayed(pngFileModel.name);
|
||||
await notificationHistoryPage.checkNotifyContains('Link copied to the clipboard');
|
||||
await BrowserActions.getUrl(sharedLink);
|
||||
await viewerPage.checkFileNameIsDisplayed(pngFileModel.name);
|
||||
});
|
||||
|
||||
it('[C287803] Should the URL be kept the same when opening the share dialog multiple times', async () => {
|
||||
contentListPage.selectRow(pngFileModel.name);
|
||||
contentServicesPage.clickShareButton();
|
||||
shareDialog.checkDialogIsDisplayed();
|
||||
shareDialog.clickShareLinkButton();
|
||||
notificationHistoryPage.checkNotifyContains('Link copied to the clipboard');
|
||||
await contentListPage.selectRow(pngFileModel.name);
|
||||
await contentServicesPage.clickShareButton();
|
||||
await shareDialog.checkDialogIsDisplayed();
|
||||
await shareDialog.clickShareLinkButton();
|
||||
const sharedLink = await shareDialog.getShareLink();
|
||||
shareDialog.clickCloseButton();
|
||||
contentServicesPage.clickShareButton();
|
||||
shareDialog.checkDialogIsDisplayed();
|
||||
shareDialog.clickShareLinkButton();
|
||||
notificationHistoryPage.checkNotifyContains('Link copied to the clipboard');
|
||||
await shareDialog.clickCloseButton();
|
||||
await notificationHistoryPage.checkNotifyContains('Link copied to the clipboard');
|
||||
await contentServicesPage.clickShareButton();
|
||||
await shareDialog.checkDialogIsDisplayed();
|
||||
await shareDialog.clickShareLinkButton();
|
||||
const secondSharedLink = await shareDialog.getShareLink();
|
||||
expect(sharedLink).toEqual(secondSharedLink);
|
||||
BrowserActions.getUrl(sharedLink);
|
||||
viewerPage.checkFileNameIsDisplayed(pngFileModel.name);
|
||||
await notificationHistoryPage.checkNotifyContains('Link copied to the clipboard');
|
||||
await expect(sharedLink).toEqual(secondSharedLink);
|
||||
await BrowserActions.getUrl(sharedLink);
|
||||
await viewerPage.checkFileNameIsDisplayed(pngFileModel.name);
|
||||
});
|
||||
|
||||
it('[C286539] Should open file when non-logged user access shared link', async () => {
|
||||
contentListPage.selectRow(pngFileModel.name);
|
||||
contentServicesPage.clickShareButton();
|
||||
shareDialog.checkDialogIsDisplayed();
|
||||
shareDialog.checkShareLinkIsDisplayed();
|
||||
await contentListPage.selectRow(pngFileModel.name);
|
||||
await contentServicesPage.clickShareButton();
|
||||
await shareDialog.checkDialogIsDisplayed();
|
||||
await shareDialog.checkShareLinkIsDisplayed();
|
||||
const sharedLink = await shareDialog.getShareLink();
|
||||
shareDialog.clickCloseButton();
|
||||
navigationBarPage.clickLogoutButton();
|
||||
BrowserActions.getUrl(sharedLink);
|
||||
viewerPage.checkFileNameIsDisplayed(pngFileModel.name);
|
||||
await shareDialog.clickCloseButton();
|
||||
await navigationBarPage.clickLogoutButton();
|
||||
await BrowserActions.getUrl(sharedLink);
|
||||
await viewerPage.checkFileNameIsDisplayed(pngFileModel.name);
|
||||
});
|
||||
});
|
||||
});
|
||||
|
||||
@@ -16,7 +16,14 @@
|
||||
*/
|
||||
|
||||
import CONSTANTS = require('../../util/constants');
|
||||
import { StringUtil, BrowserActions, NotificationHistoryPage, LoginPage, ErrorPage, UploadActions } from '@alfresco/adf-testing';
|
||||
import {
|
||||
StringUtil,
|
||||
BrowserActions,
|
||||
NotificationHistoryPage,
|
||||
LoginPage,
|
||||
ErrorPage,
|
||||
UploadActions
|
||||
} from '@alfresco/adf-testing';
|
||||
import { NavigationBarPage } from '../../pages/adf/navigationBarPage';
|
||||
import { ContentServicesPage } from '../../pages/adf/contentServicesPage';
|
||||
import { ShareDialog } from '../../pages/adf/dialog/shareDialog';
|
||||
@@ -48,11 +55,11 @@ describe('Unshare file', () => {
|
||||
let nodeId;
|
||||
let testSite;
|
||||
const pngFileModel = new FileModel({
|
||||
'name': resources.Files.ADF_DOCUMENTS.PNG.file_name,
|
||||
'location': resources.Files.ADF_DOCUMENTS.PNG.file_location
|
||||
name: resources.Files.ADF_DOCUMENTS.PNG.file_name,
|
||||
location: resources.Files.ADF_DOCUMENTS.PNG.file_location
|
||||
});
|
||||
|
||||
beforeAll(async (done) => {
|
||||
beforeAll(async () => {
|
||||
const site = {
|
||||
title: siteName,
|
||||
visibility: 'PRIVATE',
|
||||
@@ -98,88 +105,88 @@ describe('Unshare file', () => {
|
||||
nodeId = pngUploadedFile.entry.id;
|
||||
|
||||
await loginPage.loginToContentServicesUsingUserModel(acsUser);
|
||||
navBar.clickContentServicesButton();
|
||||
contentServicesPage.waitForTableBody();
|
||||
done();
|
||||
await navBar.clickContentServicesButton();
|
||||
await contentServicesPage.waitForTableBody();
|
||||
|
||||
});
|
||||
|
||||
afterAll(async (done) => {
|
||||
afterAll(async () => {
|
||||
await navigationBarPage.clickLogoutButton();
|
||||
});
|
||||
|
||||
afterEach(async (done) => {
|
||||
afterEach(async () => {
|
||||
await browser.refresh();
|
||||
done();
|
||||
|
||||
});
|
||||
|
||||
describe('with permission', () => {
|
||||
afterAll(async (done) => {
|
||||
afterAll(async () => {
|
||||
await uploadActions.deleteFileOrFolder(nodeId);
|
||||
done();
|
||||
|
||||
});
|
||||
|
||||
it('[C286550] Should display unshare confirmation dialog', () => {
|
||||
contentListPage.selectRow(pngFileModel.name);
|
||||
contentServicesPage.clickShareButton();
|
||||
shareDialog.checkDialogIsDisplayed();
|
||||
shareDialog.clickUnShareFile();
|
||||
shareDialog.confirmationDialogIsDisplayed();
|
||||
it('[C286550] Should display unshare confirmation dialog', async () => {
|
||||
await contentListPage.selectRow(pngFileModel.name);
|
||||
await contentServicesPage.clickShareButton();
|
||||
await shareDialog.checkDialogIsDisplayed();
|
||||
await shareDialog.clickUnShareFile();
|
||||
await shareDialog.confirmationDialogIsDisplayed();
|
||||
});
|
||||
|
||||
it('[C286551] Should be able to cancel unshare action', () => {
|
||||
contentListPage.selectRow(pngFileModel.name);
|
||||
contentServicesPage.clickShareButton();
|
||||
shareDialog.checkDialogIsDisplayed();
|
||||
shareDialog.clickUnShareFile();
|
||||
shareDialog.confirmationDialogIsDisplayed();
|
||||
shareDialog.clickConfirmationDialogCancelButton();
|
||||
shareDialog.shareToggleButtonIsChecked();
|
||||
it('[C286551] Should be able to cancel unshare action', async () => {
|
||||
await contentListPage.selectRow(pngFileModel.name);
|
||||
await contentServicesPage.clickShareButton();
|
||||
await shareDialog.checkDialogIsDisplayed();
|
||||
await shareDialog.clickUnShareFile();
|
||||
await shareDialog.confirmationDialogIsDisplayed();
|
||||
await shareDialog.clickConfirmationDialogCancelButton();
|
||||
await shareDialog.shareToggleButtonIsChecked();
|
||||
});
|
||||
|
||||
it('[C286552] Should be able to confirm unshare action', async () => {
|
||||
contentListPage.selectRow(pngFileModel.name);
|
||||
contentServicesPage.clickShareButton();
|
||||
shareDialog.checkDialogIsDisplayed();
|
||||
shareDialog.clickUnShareFile();
|
||||
shareDialog.confirmationDialogIsDisplayed();
|
||||
shareDialog.clickConfirmationDialogRemoveButton();
|
||||
shareDialog.dialogIsClosed();
|
||||
await contentListPage.selectRow(pngFileModel.name);
|
||||
await contentServicesPage.clickShareButton();
|
||||
await shareDialog.checkDialogIsDisplayed();
|
||||
await shareDialog.clickUnShareFile();
|
||||
await shareDialog.confirmationDialogIsDisplayed();
|
||||
await shareDialog.clickConfirmationDialogRemoveButton();
|
||||
await shareDialog.dialogIsClosed();
|
||||
});
|
||||
|
||||
it('[C280556] Should redirect to 404 when trying to access an unshared file', async () => {
|
||||
contentListPage.selectRow(pngFileModel.name);
|
||||
contentServicesPage.clickShareButton();
|
||||
shareDialog.checkDialogIsDisplayed();
|
||||
await contentListPage.selectRow(pngFileModel.name);
|
||||
await contentServicesPage.clickShareButton();
|
||||
await shareDialog.checkDialogIsDisplayed();
|
||||
const sharedLink = await shareDialog.getShareLink();
|
||||
shareDialog.clickUnShareFile();
|
||||
shareDialog.confirmationDialogIsDisplayed();
|
||||
shareDialog.clickConfirmationDialogRemoveButton();
|
||||
shareDialog.dialogIsClosed();
|
||||
BrowserActions.getUrl(sharedLink.replace(browser.params.testConfig.adf_acs.host, browser.params.testConfig.adf.host));
|
||||
errorPage.checkErrorCode();
|
||||
await shareDialog.clickUnShareFile();
|
||||
await shareDialog.confirmationDialogIsDisplayed();
|
||||
await shareDialog.clickConfirmationDialogRemoveButton();
|
||||
await shareDialog.dialogIsClosed();
|
||||
await BrowserActions.getUrl(sharedLink.replace(browser.params.testConfig.adf_acs.host, browser.params.testConfig.adf.host));
|
||||
await errorPage.checkErrorCode();
|
||||
});
|
||||
});
|
||||
|
||||
describe('without permission', () => {
|
||||
afterAll(async (done) => {
|
||||
afterAll(async () => {
|
||||
await this.alfrescoJsApi.login(browser.params.testConfig.adf.adminEmail, browser.params.testConfig.adf.adminPassword);
|
||||
await this.alfrescoJsApi.core.sitesApi.deleteSite(siteName, { permanent: true });
|
||||
done();
|
||||
|
||||
});
|
||||
|
||||
it('[C286555] Should NOT be able to unshare file without permission', () => {
|
||||
navBar.goToSite(testSite);
|
||||
contentListPage.doubleClickRow('documentLibrary');
|
||||
contentListPage.selectRow(nodeBody.name);
|
||||
contentServicesPage.clickShareButton();
|
||||
shareDialog.checkDialogIsDisplayed();
|
||||
shareDialog.shareToggleButtonIsChecked();
|
||||
shareDialog.clickUnShareFile();
|
||||
shareDialog.confirmationDialogIsDisplayed();
|
||||
shareDialog.clickConfirmationDialogRemoveButton();
|
||||
shareDialog.checkDialogIsDisplayed();
|
||||
shareDialog.shareToggleButtonIsChecked();
|
||||
notificationHistoryPage.checkNotifyContains(`You don't have permission to unshare this file`);
|
||||
it('[C286555] Should NOT be able to unshare file without permission', async () => {
|
||||
await navBar.goToSite(testSite);
|
||||
await contentListPage.doubleClickRow('documentLibrary');
|
||||
await contentListPage.selectRow(nodeBody.name);
|
||||
await contentServicesPage.clickShareButton();
|
||||
await shareDialog.checkDialogIsDisplayed();
|
||||
await shareDialog.shareToggleButtonIsChecked();
|
||||
await shareDialog.clickUnShareFile();
|
||||
await shareDialog.confirmationDialogIsDisplayed();
|
||||
await shareDialog.clickConfirmationDialogRemoveButton();
|
||||
await shareDialog.checkDialogIsDisplayed();
|
||||
await shareDialog.shareToggleButtonIsChecked();
|
||||
await notificationHistoryPage.checkNotifyContains(`You don't have permission to unshare this file`);
|
||||
});
|
||||
});
|
||||
});
|
||||
|
||||
@@ -52,7 +52,7 @@ describe('Social component', () => {
|
||||
'location': resources.Files.ADF_DOCUMENTS.TXT_0B.file_location
|
||||
});
|
||||
|
||||
beforeAll(async (done) => {
|
||||
beforeAll(async () => {
|
||||
await this.alfrescoJsApi.login(browser.params.testConfig.adf.adminEmail, browser.params.testConfig.adf.adminPassword);
|
||||
|
||||
await this.alfrescoJsApi.core.peopleApi.addPerson(componentOwner);
|
||||
@@ -81,13 +81,12 @@ describe('Social component', () => {
|
||||
}
|
||||
});
|
||||
|
||||
done();
|
||||
});
|
||||
|
||||
afterAll(async (done) => {
|
||||
afterAll(async () => {
|
||||
await navigationBarPage.clickLogoutButton();
|
||||
await uploadActions.deleteFileOrFolder(emptyFile.entry.id);
|
||||
done();
|
||||
|
||||
});
|
||||
|
||||
describe('User interaction on their own components', () => {
|
||||
@@ -97,21 +96,21 @@ describe('Social component', () => {
|
||||
await navigationBarPage.clickSocialButton();
|
||||
});
|
||||
|
||||
it('[C203006] Should be able to like and unlike their components but not rate them,', () => {
|
||||
socialPage.writeCustomNodeId(emptyFile.entry.id);
|
||||
expect(socialPage.getNodeIdFieldValue()).toEqual(emptyFile.entry.id);
|
||||
likePage.clickLike();
|
||||
expect(likePage.getLikeCounter()).toBe('1');
|
||||
likePage.removeHoverFromLikeButton();
|
||||
expect(likePage.getLikedIconColor()).toBe(blueLikeColor);
|
||||
ratePage.rateComponent(4);
|
||||
expect(ratePage.getRatingCounter()).toBe('0');
|
||||
expect(ratePage.isNotStarRated(4));
|
||||
expect(ratePage.getUnratedStarColor(4)).toBe(averageStarColor);
|
||||
likePage.clickUnlike();
|
||||
expect(likePage.getLikeCounter()).toBe('0');
|
||||
likePage.removeHoverFromLikeButton();
|
||||
expect(likePage.getUnLikedIconColor()).toBe(greyLikeColor);
|
||||
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.removeHoverFromLikeButton();
|
||||
await expect(await likePage.getLikedIconColor()).toBe(blueLikeColor);
|
||||
await ratePage.rateComponent(4);
|
||||
await expect(await ratePage.getRatingCounter()).toBe('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.removeHoverFromLikeButton();
|
||||
await expect(await likePage.getUnLikedIconColor()).toBe(greyLikeColor);
|
||||
});
|
||||
|
||||
});
|
||||
@@ -123,32 +122,32 @@ describe('Social component', () => {
|
||||
await navigationBarPage.clickSocialButton();
|
||||
});
|
||||
|
||||
it('[C260324] Should be able to like and unlike a component', () => {
|
||||
socialPage.writeCustomNodeId(emptyFile.entry.id);
|
||||
expect(socialPage.getNodeIdFieldValue()).toEqual(emptyFile.entry.id);
|
||||
expect(likePage.getLikeCounter()).toEqual('0');
|
||||
expect(likePage.getUnLikedIconColor()).toBe(greyLikeColor);
|
||||
likePage.clickLike();
|
||||
expect(likePage.getLikeCounter()).toBe('1');
|
||||
likePage.removeHoverFromLikeButton();
|
||||
expect(likePage.getLikedIconColor()).toBe(blueLikeColor);
|
||||
likePage.clickUnlike();
|
||||
expect(likePage.getLikeCounter()).toBe('0');
|
||||
likePage.removeHoverFromLikeButton();
|
||||
expect(likePage.getUnLikedIconColor()).toBe(greyLikeColor);
|
||||
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 expect(await likePage.getUnLikedIconColor()).toBe(greyLikeColor);
|
||||
await likePage.clickLike();
|
||||
await expect(await likePage.getLikeCounter()).toBe('1');
|
||||
await likePage.removeHoverFromLikeButton();
|
||||
await expect(await likePage.getLikedIconColor()).toBe(blueLikeColor);
|
||||
await likePage.clickUnlike();
|
||||
await expect(await likePage.getLikeCounter()).toBe('0');
|
||||
await likePage.removeHoverFromLikeButton();
|
||||
await expect(await likePage.getUnLikedIconColor()).toBe(greyLikeColor);
|
||||
});
|
||||
|
||||
it('[C310198] Should be able to rate and unRate a component', () => {
|
||||
socialPage.writeCustomNodeId(emptyFile.entry.id);
|
||||
expect(socialPage.getNodeIdFieldValue()).toEqual(emptyFile.entry.id);
|
||||
expect(ratePage.getRatingCounter()).toBe('0');
|
||||
ratePage.rateComponent(4);
|
||||
expect(ratePage.getRatingCounter()).toBe('1');
|
||||
expect(ratePage.isStarRated(4));
|
||||
expect(ratePage.getRatedStarColor(4)).toBe(yellowRatedStarColor);
|
||||
ratePage.removeRating(4);
|
||||
expect(ratePage.getRatingCounter()).toBe('0');
|
||||
expect(ratePage.isNotStarRated(4));
|
||||
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.rateComponent(4);
|
||||
await expect(await ratePage.getRatingCounter()).toBe('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 expect(await ratePage.isNotStarRated(4));
|
||||
});
|
||||
|
||||
});
|
||||
@@ -161,48 +160,48 @@ describe('Social component', () => {
|
||||
});
|
||||
|
||||
it('[C310197] Should be able to like, unLike, display total likes', async () => {
|
||||
socialPage.writeCustomNodeId(emptyFile.entry.id);
|
||||
expect(socialPage.getNodeIdFieldValue()).toEqual(emptyFile.entry.id);
|
||||
expect(likePage.getUnLikedIconColor()).toBe(greyLikeColor);
|
||||
likePage.clickLike();
|
||||
expect(likePage.getLikeCounter()).toBe('1');
|
||||
likePage.removeHoverFromLikeButton();
|
||||
expect(likePage.getLikedIconColor()).toBe(blueLikeColor);
|
||||
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.removeHoverFromLikeButton();
|
||||
await expect(await likePage.getLikedIconColor()).toBe(blueLikeColor);
|
||||
|
||||
await loginPage.loginToContentServicesUsingUserModel(secondComponentVisitor);
|
||||
navigationBarPage.clickSocialButton();
|
||||
socialPage.writeCustomNodeId(emptyFile.entry.id);
|
||||
expect(likePage.getUnLikedIconColor()).toBe(greyLikeColor);
|
||||
likePage.clickLike();
|
||||
expect(likePage.getLikeCounter()).toEqual('2');
|
||||
likePage.removeHoverFromLikeButton();
|
||||
expect(likePage.getLikedIconColor()).toBe(blueLikeColor);
|
||||
likePage.clickUnlike();
|
||||
expect(likePage.getLikeCounter()).toEqual('1');
|
||||
likePage.removeHoverFromLikeButton();
|
||||
expect(likePage.getUnLikedIconColor()).toBe(greyLikeColor);
|
||||
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.removeHoverFromLikeButton();
|
||||
await expect(await likePage.getLikedIconColor()).toBe(blueLikeColor);
|
||||
await likePage.clickUnlike();
|
||||
await expect(await likePage.getLikeCounter()).toEqual('1');
|
||||
await likePage.removeHoverFromLikeButton();
|
||||
await expect(await likePage.getUnLikedIconColor()).toBe(greyLikeColor);
|
||||
});
|
||||
|
||||
it('[C260327] Should be able to rate, unRate, display total ratings, display average rating', async () => {
|
||||
socialPage.writeCustomNodeId(emptyFile.entry.id);
|
||||
expect(socialPage.getNodeIdFieldValue()).toEqual(emptyFile.entry.id);
|
||||
ratePage.rateComponent(4);
|
||||
expect(ratePage.getRatingCounter()).toEqual('1');
|
||||
expect(ratePage.isStarRated(4));
|
||||
expect(ratePage.getRatedStarColor(4)).toBe(yellowRatedStarColor);
|
||||
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 expect(await ratePage.isStarRated(4));
|
||||
await expect(await ratePage.getRatedStarColor(4)).toBe(yellowRatedStarColor);
|
||||
|
||||
await loginPage.loginToContentServicesUsingUserModel(secondComponentVisitor);
|
||||
navigationBarPage.clickSocialButton();
|
||||
socialPage.writeCustomNodeId(emptyFile.entry.id);
|
||||
expect(socialPage.getNodeIdFieldValue()).toEqual(emptyFile.entry.id);
|
||||
expect(ratePage.getRatingCounter()).toEqual('1');
|
||||
expect(ratePage.getAverageStarColor(4)).toBe(averageStarColor);
|
||||
ratePage.rateComponent(0);
|
||||
expect(ratePage.getRatingCounter()).toEqual('2');
|
||||
expect(ratePage.isStarRated(2));
|
||||
ratePage.removeRating(0);
|
||||
expect(ratePage.getRatingCounter()).toEqual('1');
|
||||
expect(ratePage.getAverageStarColor(4)).toBe(averageStarColor);
|
||||
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 expect(await ratePage.getAverageStarColor(4)).toBe(averageStarColor);
|
||||
await ratePage.rateComponent(0);
|
||||
await expect(await ratePage.getRatingCounter()).toEqual('2');
|
||||
await expect(await ratePage.isStarRated(2));
|
||||
await ratePage.removeRating(0);
|
||||
await expect(await ratePage.getRatingCounter()).toEqual('1');
|
||||
await expect(await ratePage.getAverageStarColor(4)).toBe(averageStarColor);
|
||||
});
|
||||
});
|
||||
});
|
||||
|
||||
@@ -18,13 +18,20 @@
|
||||
import { ContentServicesPage } from '../../pages/adf/contentServicesPage';
|
||||
import { browser } from 'protractor';
|
||||
import { NavigationBarPage } from '../../pages/adf/navigationBarPage';
|
||||
import { ApiService, LoginSSOPage, UploadActions, IdentityService, SettingsPage, StringUtil, UserModel } from '@alfresco/adf-testing';
|
||||
import {
|
||||
ApiService,
|
||||
LoginSSOPage,
|
||||
UploadActions,
|
||||
IdentityService,
|
||||
SettingsPage,
|
||||
StringUtil,
|
||||
UserModel,
|
||||
FileBrowserUtil
|
||||
} from '@alfresco/adf-testing';
|
||||
import { FileModel } from '../../models/ACS/fileModel';
|
||||
import { ViewerPage } from '../../pages/adf/viewerPage';
|
||||
import resources = require('../../util/resources');
|
||||
import { AlfrescoApiCompatibility as AlfrescoApi } from '@alfresco/js-api';
|
||||
import * as path from 'path';
|
||||
import { Util } from '../../util/util';
|
||||
|
||||
describe('SSO in ADF using ACS and AIS, Download Directive, Viewer, DocumentList, implicitFlow true', () => {
|
||||
|
||||
@@ -65,15 +72,13 @@ describe('SSO in ADF using ACS and AIS, Download Directive, Viewer, DocumentList
|
||||
}
|
||||
});
|
||||
const uploadActions = new UploadActions(this.alfrescoJsApi);
|
||||
const downloadedPngFile = path.join(__dirname, 'downloads', pngFileModel.name);
|
||||
const downloadedMultipleFiles = path.join(__dirname, 'downloads', 'archive.zip');
|
||||
const folderName = StringUtil.generateRandomString(5);
|
||||
const acsUser = new UserModel();
|
||||
let identityService: IdentityService;
|
||||
|
||||
describe('SSO in ADF using ACS and AIS, implicit flow set', () => {
|
||||
|
||||
beforeAll(async (done) => {
|
||||
beforeAll(async () => {
|
||||
const apiService = new ApiService(browser.params.config.oauth2.clientId, browser.params.testConfig.adf_acs.host, browser.params.testConfig.adf.hostSso, 'ECM');
|
||||
await apiService.login(browser.params.testConfig.adf.adminEmail, browser.params.testConfig.adf.adminPassword);
|
||||
|
||||
@@ -100,12 +105,11 @@ describe('SSO in ADF using ACS and AIS, Download Directive, Viewer, DocumentList
|
||||
|
||||
await navigationBarPage.clickContentServicesButton();
|
||||
await contentServicesPage.checkAcsContainer();
|
||||
contentListPage.doubleClickRow(folderName);
|
||||
await contentListPage.doubleClickRow(folderName);
|
||||
await contentListPage.waitForTableBody();
|
||||
done();
|
||||
});
|
||||
|
||||
afterAll(async (done) => {
|
||||
afterAll(async () => {
|
||||
try {
|
||||
await this.alfrescoJsApi.login(browser.params.testConfig.adf.adminEmail, browser.params.testConfig.adf.adminPassword);
|
||||
await uploadActions.deleteFileOrFolder(folder.entry.id);
|
||||
@@ -113,62 +117,55 @@ describe('SSO in ADF using ACS and AIS, Download Directive, Viewer, DocumentList
|
||||
} catch (error) {
|
||||
}
|
||||
await this.alfrescoJsApi.logout();
|
||||
browser.executeScript('window.sessionStorage.clear();');
|
||||
browser.executeScript('window.localStorage.clear();');
|
||||
done();
|
||||
await browser.executeScript('window.sessionStorage.clear();');
|
||||
await browser.executeScript('window.localStorage.clear();');
|
||||
});
|
||||
|
||||
afterEach(async (done) => {
|
||||
browser.refresh();
|
||||
contentListPage.waitForTableBody();
|
||||
done();
|
||||
afterEach(async () => {
|
||||
await browser.refresh();
|
||||
await contentListPage.waitForTableBody();
|
||||
});
|
||||
|
||||
it('[C291936] Should be able to download a file', async (done) => {
|
||||
contentListPage.selectRow(pngFileModel.name);
|
||||
contentServicesPage.clickDownloadButton();
|
||||
expect(Util.fileExists(downloadedPngFile, 30)).toBe(true);
|
||||
done();
|
||||
it('[C291936] Should be able to download a file', async () => {
|
||||
await contentListPage.selectRow(pngFileModel.name);
|
||||
await contentServicesPage.clickDownloadButton();
|
||||
await expect(await FileBrowserUtil.isFileDownloaded(pngFileModel.name)).toBe(true, `${pngFileModel.name} not downloaded`);
|
||||
});
|
||||
|
||||
it('[C291938] Should be able to open a document', async (done) => {
|
||||
contentServicesPage.doubleClickRow(firstPdfFileModel.name);
|
||||
viewerPage.checkFileIsLoaded();
|
||||
viewerPage.checkFileNameIsDisplayed(firstPdfFileModel.name);
|
||||
viewerPage.clickCloseButton();
|
||||
contentListPage.waitForTableBody();
|
||||
done();
|
||||
it('[C291938] Should be able to open a document', async () => {
|
||||
await contentServicesPage.doubleClickRow(firstPdfFileModel.name);
|
||||
await viewerPage.checkFileIsLoaded();
|
||||
await viewerPage.checkFileNameIsDisplayed(firstPdfFileModel.name);
|
||||
await viewerPage.clickCloseButton();
|
||||
await contentListPage.waitForTableBody();
|
||||
});
|
||||
|
||||
it('[C291942] Should be able to open an image', async (done) => {
|
||||
viewerPage.viewFile(pngFileModel.name);
|
||||
viewerPage.checkImgViewerIsDisplayed();
|
||||
viewerPage.checkFileNameIsDisplayed(pngFileModel.name);
|
||||
viewerPage.clickCloseButton();
|
||||
contentListPage.waitForTableBody();
|
||||
done();
|
||||
it('[C291942] Should be able to open an image', async () => {
|
||||
await viewerPage.viewFile(pngFileModel.name);
|
||||
await viewerPage.checkImgViewerIsDisplayed();
|
||||
await viewerPage.checkFileNameIsDisplayed(pngFileModel.name);
|
||||
await viewerPage.clickCloseButton();
|
||||
await contentListPage.waitForTableBody();
|
||||
});
|
||||
|
||||
it('[C291941] Should be able to download multiple files', async (done) => {
|
||||
contentServicesPage.clickMultiSelectToggle();
|
||||
contentServicesPage.checkAcsContainer();
|
||||
contentListPage.dataTablePage().checkAllRows();
|
||||
contentListPage.dataTablePage().checkRowIsChecked('Display name', pngFileModel.name);
|
||||
contentListPage.dataTablePage().checkRowIsChecked('Display name', firstPdfFileModel.name);
|
||||
contentServicesPage.clickDownloadButton();
|
||||
expect(Util.fileExists(downloadedMultipleFiles, 30)).toBe(true);
|
||||
done();
|
||||
it('[C291941] Should be able to download multiple files', async () => {
|
||||
await contentServicesPage.clickMultiSelectToggle();
|
||||
await contentServicesPage.checkAcsContainer();
|
||||
await contentListPage.dataTablePage().checkAllRows();
|
||||
await contentListPage.dataTablePage().checkRowIsChecked('Display name', pngFileModel.name);
|
||||
await contentListPage.dataTablePage().checkRowIsChecked('Display name', firstPdfFileModel.name);
|
||||
await contentServicesPage.clickDownloadButton();
|
||||
await expect(await FileBrowserUtil.isFileDownloaded('archive.zip')).toBe(true, `archive.zip not downloaded`);
|
||||
});
|
||||
|
||||
it('[C291940] Should be able to view thumbnails when enabled', async (done) => {
|
||||
contentServicesPage.enableThumbnails();
|
||||
contentServicesPage.checkAcsContainer();
|
||||
contentListPage.waitForTableBody();
|
||||
it('[C291940] Should be able to view thumbnails when enabled', async () => {
|
||||
await contentServicesPage.enableThumbnails();
|
||||
await contentServicesPage.checkAcsContainer();
|
||||
await contentListPage.waitForTableBody();
|
||||
const filePdfIconUrl = await contentServicesPage.getRowIconImageUrl(firstPdfFileModel.name);
|
||||
expect(filePdfIconUrl).toContain(`/versions/1/nodes/${pdfUploadedFile.entry.id}/renditions`);
|
||||
await expect(filePdfIconUrl).toContain(`/versions/1/nodes/${pdfUploadedFile.entry.id}/renditions`);
|
||||
const filePngIconUrl = await contentServicesPage.getRowIconImageUrl(pngFileModel.name);
|
||||
expect(filePngIconUrl).toContain(`/versions/1/nodes/${pngUploadedFile.entry.id}/renditions`);
|
||||
done();
|
||||
await expect(filePngIconUrl).toContain(`/versions/1/nodes/${pngUploadedFile.entry.id}/renditions`);
|
||||
});
|
||||
});
|
||||
});
|
||||
|
||||
@@ -36,8 +36,8 @@ describe('Tag component', () => {
|
||||
hostEcm: browser.params.testConfig.adf_acs.host
|
||||
});
|
||||
const uploadActions = new UploadActions(this.alfrescoJsApi);
|
||||
const pdfFileModel = new FileModel({ 'name': resources.Files.ADF_DOCUMENTS.PDF.file_name });
|
||||
const deleteFile = new FileModel({ 'name': StringUtil.generateRandomString() });
|
||||
const pdfFileModel = new FileModel({ name: resources.Files.ADF_DOCUMENTS.PDF.file_name });
|
||||
const deleteFile = new FileModel({ name: StringUtil.generateRandomString() });
|
||||
const sameTag = StringUtil.generateRandomString().toLowerCase();
|
||||
|
||||
const tagList = [
|
||||
@@ -56,7 +56,7 @@ describe('Tag component', () => {
|
||||
const nonLatinTag = StringUtil.generateRandomStringNonLatin();
|
||||
let pdfUploadedFile, nodeId;
|
||||
|
||||
beforeAll(async (done) => {
|
||||
beforeAll(async () => {
|
||||
|
||||
await this.alfrescoJsApi.login(browser.params.testConfig.adf.adminEmail, browser.params.testConfig.adf.adminPassword);
|
||||
|
||||
@@ -77,122 +77,121 @@ describe('Tag component', () => {
|
||||
await this.alfrescoJsApi.core.tagsApi.addTag(nodeId, tags);
|
||||
|
||||
await loginPage.loginToContentServicesUsingUserModel(acsUser);
|
||||
|
||||
done();
|
||||
});
|
||||
|
||||
afterAll(async (done) => {
|
||||
afterAll(async () => {
|
||||
await navigationBarPage.clickLogoutButton();
|
||||
|
||||
await uploadActions.deleteFileOrFolder(pdfUploadedFile.entry.id);
|
||||
done();
|
||||
});
|
||||
|
||||
it('[C260374] Should NOT be possible to add a new tag without Node ID', () => {
|
||||
navigationBarPage.clickTagButton();
|
||||
it('[C260374] Should NOT be possible to add a new tag without Node ID', async () => {
|
||||
await navigationBarPage.clickTagButton();
|
||||
|
||||
expect(tagPage.getNodeId()).toEqual('');
|
||||
expect(tagPage.getNewTagPlaceholder()).toEqual('New Tag');
|
||||
expect(tagPage.addTagButtonIsEnabled()).toEqual(false);
|
||||
tagPage.checkTagListIsEmpty();
|
||||
tagPage.checkTagListByNodeIdIsEmpty();
|
||||
expect(tagPage.addNewTagInput('a').addTagButtonIsEnabled()).toEqual(false);
|
||||
expect(tagPage.getNewTagInput()).toEqual('a');
|
||||
await expect(await tagPage.getNodeId()).toEqual('');
|
||||
await expect(await tagPage.getNewTagPlaceholder()).toEqual('New Tag');
|
||||
await expect(await tagPage.addTagButtonIsEnabled()).toEqual(false);
|
||||
await tagPage.checkTagListIsEmpty();
|
||||
await tagPage.checkTagListByNodeIdIsEmpty();
|
||||
await tagPage.addNewTagInput('a');
|
||||
|
||||
await expect(await tagPage.addTagButtonIsEnabled()).toEqual(false);
|
||||
await expect(await tagPage.getNewTagInput()).toEqual('a');
|
||||
});
|
||||
|
||||
it('[C268151] Should be possible to add a new tag to a Node', () => {
|
||||
tagPage.insertNodeId(pdfFileModel.id);
|
||||
tagPage.addTag(tagList[0]);
|
||||
it('[C268151] Should be possible to add a new tag to a Node', async () => {
|
||||
await tagPage.insertNodeId(pdfFileModel.id);
|
||||
await tagPage.addTag(tagList[0]);
|
||||
|
||||
tagPage.checkTagIsDisplayedInTagList(tagList[0]);
|
||||
tagPage.checkTagIsDisplayedInTagListByNodeId(tagList[0]);
|
||||
await tagPage.checkTagIsDisplayedInTagList(tagList[0]);
|
||||
await tagPage.checkTagIsDisplayedInTagListByNodeId(tagList[0]);
|
||||
});
|
||||
|
||||
it('[C260377] Should NOT be possible to add a tag that already exists', () => {
|
||||
tagPage.insertNodeId(pdfFileModel.id);
|
||||
tagPage.addTag(sameTag);
|
||||
tagPage.checkTagIsDisplayedInTagList(sameTag);
|
||||
tagPage.addTag(sameTag);
|
||||
expect(tagPage.getErrorMessage()).toEqual('Tag already exists');
|
||||
it('[C260377] Should NOT be possible to add a tag that already exists', async () => {
|
||||
await tagPage.insertNodeId(pdfFileModel.id);
|
||||
await tagPage.addTag(sameTag);
|
||||
await tagPage.checkTagIsDisplayedInTagList(sameTag);
|
||||
await tagPage.addTag(sameTag);
|
||||
await expect(await tagPage.getErrorMessage()).toEqual('Tag already exists');
|
||||
});
|
||||
|
||||
it('[C91326] Should be possible to create a tag with different characters', () => {
|
||||
tagPage.insertNodeId(pdfFileModel.id);
|
||||
it('[C91326] Should be possible to create a tag with different characters', async () => {
|
||||
await tagPage.insertNodeId(pdfFileModel.id);
|
||||
|
||||
tagPage.addTag(uppercaseTag + digitsTag + nonLatinTag);
|
||||
await tagPage.addTag(uppercaseTag + digitsTag + nonLatinTag);
|
||||
|
||||
browser.driver.sleep(5000); // wait CS return tags
|
||||
await browser.sleep(5000); // wait CS return tags
|
||||
|
||||
tagPage.checkTagIsDisplayedInTagList(uppercaseTag.toLowerCase() + digitsTag + nonLatinTag);
|
||||
tagPage.checkTagIsDisplayedInTagListByNodeId(uppercaseTag.toLowerCase() + digitsTag + nonLatinTag);
|
||||
await tagPage.checkTagIsDisplayedInTagList(uppercaseTag.toLowerCase() + digitsTag + nonLatinTag);
|
||||
await tagPage.checkTagIsDisplayedInTagListByNodeId(uppercaseTag.toLowerCase() + digitsTag + nonLatinTag);
|
||||
|
||||
tagPage.checkTagIsNotDisplayedInTagList(uppercaseTag + digitsTag + nonLatinTag);
|
||||
await tagPage.checkTagIsNotDisplayedInTagList(uppercaseTag + digitsTag + nonLatinTag);
|
||||
});
|
||||
|
||||
it('[C260375] Should be possible to delete a tag', () => {
|
||||
it('[C260375] Should be possible to delete a tag', async () => {
|
||||
const deleteTag = StringUtil.generateRandomString().toUpperCase();
|
||||
|
||||
tagPage.insertNodeId(deleteFile.id);
|
||||
await tagPage.insertNodeId(deleteFile.id);
|
||||
|
||||
tagPage.addTag(deleteTag);
|
||||
await tagPage.addTag(deleteTag);
|
||||
|
||||
tagPage.checkTagIsDisplayedInTagList(deleteTag.toLowerCase());
|
||||
tagPage.checkTagIsDisplayedInTagListByNodeId(deleteTag.toLowerCase());
|
||||
await tagPage.checkTagIsDisplayedInTagList(deleteTag.toLowerCase());
|
||||
await tagPage.checkTagIsDisplayedInTagListByNodeId(deleteTag.toLowerCase());
|
||||
|
||||
tagPage.deleteTagFromTagListByNodeId(deleteTag.toLowerCase());
|
||||
await tagPage.deleteTagFromTagListByNodeId(deleteTag.toLowerCase());
|
||||
|
||||
tagPage.checkTagIsNotDisplayedInTagList(deleteTag.toLowerCase());
|
||||
tagPage.checkTagIsNotDisplayedInTagListByNodeId(deleteTag.toLowerCase());
|
||||
await tagPage.checkTagIsNotDisplayedInTagList(deleteTag.toLowerCase());
|
||||
await tagPage.checkTagIsNotDisplayedInTagListByNodeId(deleteTag.toLowerCase());
|
||||
|
||||
tagPage.insertNodeId(deleteFile.id);
|
||||
await tagPage.insertNodeId(deleteFile.id);
|
||||
|
||||
tagPage.addTag(deleteTag);
|
||||
await tagPage.addTag(deleteTag);
|
||||
|
||||
tagPage.checkTagIsDisplayedInTagList(deleteTag.toLowerCase());
|
||||
tagPage.checkTagIsDisplayedInTagListByNodeId(deleteTag.toLowerCase());
|
||||
await tagPage.checkTagIsDisplayedInTagList(deleteTag.toLowerCase());
|
||||
await tagPage.checkTagIsDisplayedInTagListByNodeId(deleteTag.toLowerCase());
|
||||
|
||||
tagPage.deleteTagFromTagList(deleteTag.toLowerCase());
|
||||
await tagPage.deleteTagFromTagList(deleteTag.toLowerCase());
|
||||
|
||||
tagPage.checkTagIsNotDisplayedInTagList(deleteTag.toLowerCase());
|
||||
tagPage.checkTagIsNotDisplayedInTagListByNodeId(deleteTag.toLowerCase());
|
||||
await tagPage.checkTagIsNotDisplayedInTagList(deleteTag.toLowerCase());
|
||||
await tagPage.checkTagIsNotDisplayedInTagListByNodeId(deleteTag.toLowerCase());
|
||||
});
|
||||
|
||||
it('[C286290] Should be able to hide the delete option from a tag component', () => {
|
||||
tagPage.insertNodeId(pdfFileModel.id);
|
||||
tagPage.addTag(tagList[3]);
|
||||
it('[C286290] Should be able to hide the delete option from a tag component', async () => {
|
||||
await tagPage.insertNodeId(pdfFileModel.id);
|
||||
await tagPage.addTag(tagList[3]);
|
||||
|
||||
tagPage.checkTagIsDisplayedInTagListByNodeId(tagList[3]);
|
||||
tagPage.checkDeleteTagFromTagListByNodeIdIsDisplayed(tagList[3]);
|
||||
await tagPage.checkTagIsDisplayedInTagListByNodeId(tagList[3]);
|
||||
await tagPage.checkDeleteTagFromTagListByNodeIdIsDisplayed(tagList[3]);
|
||||
|
||||
tagPage.clickShowDeleteButtonSwitch();
|
||||
await tagPage.clickShowDeleteButtonSwitch();
|
||||
|
||||
tagPage.checkDeleteTagFromTagListByNodeIdIsNotDisplayed(tagList[3]);
|
||||
await tagPage.checkDeleteTagFromTagListByNodeIdIsNotDisplayed(tagList[3]);
|
||||
});
|
||||
|
||||
it('[C286472] Should be able to click Show more/less button on List Tags Content Services', () => {
|
||||
tagPage.insertNodeId(pdfFileModel.id);
|
||||
it('[C286472] Should be able to click Show more/less button on List Tags Content Services', async () => {
|
||||
await tagPage.insertNodeId(pdfFileModel.id);
|
||||
|
||||
tagPage.checkShowMoreButtonIsDisplayed();
|
||||
tagPage.checkShowLessButtonIsNotDisplayed();
|
||||
await tagPage.checkShowMoreButtonIsDisplayed();
|
||||
await tagPage.checkShowLessButtonIsNotDisplayed();
|
||||
|
||||
expect(tagPage.checkTagsOnList()).toEqual(10);
|
||||
await expect(await tagPage.checkTagsOnList()).toEqual(10);
|
||||
|
||||
tagPage.clickShowMoreButton();
|
||||
tagPage.checkShowLessButtonIsDisplayed();
|
||||
await tagPage.clickShowMoreButton();
|
||||
await tagPage.checkShowLessButtonIsDisplayed();
|
||||
|
||||
tagPage.clickShowLessButton();
|
||||
tagPage.checkShowLessButtonIsNotDisplayed();
|
||||
await tagPage.clickShowLessButton();
|
||||
await tagPage.checkShowLessButtonIsNotDisplayed();
|
||||
});
|
||||
|
||||
it('[C260378] Should be possible to add multiple tags', () => {
|
||||
tagPage.insertNodeId(pdfFileModel.id);
|
||||
tagPage.addTag(tagList[2]);
|
||||
it('[C260378] Should be possible to add multiple tags', async () => {
|
||||
await tagPage.insertNodeId(pdfFileModel.id);
|
||||
await tagPage.addTag(tagList[2]);
|
||||
|
||||
browser.driver.sleep(5000); // wait CS return tags
|
||||
await browser.sleep(5000); // wait CS return tags
|
||||
|
||||
tagPage.checkTagListIsOrderedAscending();
|
||||
tagPage.checkTagListByNodeIdIsOrderedAscending();
|
||||
tagPage.checkTagListContentServicesIsOrderedAscending();
|
||||
await tagPage.checkTagListIsOrderedAscending();
|
||||
await tagPage.checkTagListByNodeIdIsOrderedAscending();
|
||||
await tagPage.checkTagListContentServicesIsOrderedAscending();
|
||||
});
|
||||
|
||||
});
|
||||
|
||||
@@ -54,97 +54,84 @@ describe('Trashcan - Pagination', () => {
|
||||
const navigationBarPage = new NavigationBarPage();
|
||||
|
||||
const acsUser = new AcsUserModel();
|
||||
const newFolderModel = new FolderModel({ 'name': 'newFolder' });
|
||||
const nrOfFiles = 20;
|
||||
const newFolderModel = new FolderModel({ name: 'newFolder' });
|
||||
const noOfFiles = 20;
|
||||
|
||||
beforeAll(async (done) => {
|
||||
beforeAll(async () => {
|
||||
this.alfrescoJsApi = new AlfrescoApi({
|
||||
provider: 'ECM',
|
||||
hostEcm: browser.params.testConfig.adf_acs.host
|
||||
});
|
||||
const uploadActions = new UploadActions(this.alfrescoJsApi);
|
||||
|
||||
const fileNames = Util.generateSequenceFiles(10, nrOfFiles + 9, pagination.base, pagination.extension);
|
||||
|
||||
const fileNames = Util.generateSequenceFiles(10, noOfFiles + 9, pagination.base, pagination.extension);
|
||||
await this.alfrescoJsApi.login(browser.params.testConfig.adf.adminEmail, browser.params.testConfig.adf.adminPassword);
|
||||
|
||||
await this.alfrescoJsApi.core.peopleApi.addPerson(acsUser);
|
||||
|
||||
await this.alfrescoJsApi.login(acsUser.id, acsUser.password);
|
||||
|
||||
const folderUploadedModel = await uploadActions.createFolder(newFolderModel.name, '-my-');
|
||||
|
||||
const emptyFiles = await uploadActions.createEmptyFiles(fileNames, folderUploadedModel.entry.id);
|
||||
await emptyFiles.list.entries.forEach(async (node) => {
|
||||
await this.alfrescoJsApi.node.deleteNode(node.entry.id).then(() => {
|
||||
}, () => {
|
||||
this.alfrescoJsApi.node.deleteNode(node.entry.id);
|
||||
const emptyFiles: any = await uploadActions.createEmptyFiles(fileNames, folderUploadedModel.entry.id);
|
||||
for (const entry of emptyFiles.list.entries) {
|
||||
await this.alfrescoJsApi.node.deleteNode(entry.entry.id).then(() => {}, () => {
|
||||
this.alfrescoJsApi.node.deleteNode(entry.entry.id);
|
||||
});
|
||||
});
|
||||
|
||||
}
|
||||
await loginPage.loginToContentServicesUsingUserModel(acsUser);
|
||||
navigationBarPage.clickTrashcanButton();
|
||||
trashcanPage.waitForTableBody();
|
||||
|
||||
done();
|
||||
await navigationBarPage.clickTrashcanButton();
|
||||
await trashcanPage.waitForTableBody();
|
||||
});
|
||||
|
||||
afterAll(async (done) => {
|
||||
afterAll(async () => {
|
||||
await navigationBarPage.clickLogoutButton();
|
||||
done();
|
||||
|
||||
});
|
||||
|
||||
afterEach((done) => {
|
||||
browser.refresh();
|
||||
trashcanPage.waitForTableBody();
|
||||
done();
|
||||
afterEach(async () => {
|
||||
await browser.refresh();
|
||||
await trashcanPage.waitForTableBody();
|
||||
|
||||
});
|
||||
|
||||
it('[C272811] Should be able to set Items per page to 20', () => {
|
||||
paginationPage.selectItemsPerPage(itemsPerPage.twenty);
|
||||
|
||||
trashcanPage.waitForTableBody();
|
||||
trashcanPage.waitForPagination();
|
||||
|
||||
expect(paginationPage.getCurrentItemsPerPage()).toEqual(itemsPerPage.twenty);
|
||||
expect(paginationPage.getPaginationRange()).toEqual('Showing 1-' + nrOfFiles + ' of ' + nrOfFiles);
|
||||
expect(trashcanPage.numberOfResultsDisplayed()).toBe(nrOfFiles);
|
||||
|
||||
paginationPage.checkNextPageButtonIsDisabled();
|
||||
paginationPage.checkPreviousPageButtonIsDisabled();
|
||||
it('[C272811] Should be able to set Items per page to 20', async () => {
|
||||
await paginationPage.selectItemsPerPage(itemsPerPage.twenty);
|
||||
await trashcanPage.waitForTableBody();
|
||||
await trashcanPage.waitForPagination();
|
||||
await expect(await paginationPage.getCurrentItemsPerPage()).toEqual(itemsPerPage.twenty);
|
||||
await expect(await paginationPage.getPaginationRange()).toEqual('Showing 1-' + noOfFiles + ' of ' + noOfFiles);
|
||||
await expect(await trashcanPage.numberOfResultsDisplayed()).toBe(noOfFiles);
|
||||
await paginationPage.checkNextPageButtonIsDisabled();
|
||||
await paginationPage.checkPreviousPageButtonIsDisabled();
|
||||
});
|
||||
|
||||
it('[C276742] Should be able to set Items per page to 15', () => {
|
||||
paginationPage.selectItemsPerPage(itemsPerPage.fifteen);
|
||||
trashcanPage.waitForTableBody();
|
||||
trashcanPage.waitForPagination();
|
||||
expect(paginationPage.getCurrentItemsPerPage()).toEqual(itemsPerPage.fifteen);
|
||||
expect(paginationPage.getPaginationRange()).toEqual('Showing 1-' + itemsPerPage.fifteenValue + ' of ' + nrOfFiles);
|
||||
expect(trashcanPage.numberOfResultsDisplayed()).toBe(itemsPerPage.fifteenValue);
|
||||
paginationPage.checkNextPageButtonIsEnabled();
|
||||
paginationPage.checkPreviousPageButtonIsDisabled();
|
||||
it('[C276742] Should be able to set Items per page to 15', async () => {
|
||||
await paginationPage.selectItemsPerPage(itemsPerPage.fifteen);
|
||||
await trashcanPage.waitForTableBody();
|
||||
await trashcanPage.waitForPagination();
|
||||
await expect(await paginationPage.getCurrentItemsPerPage()).toEqual(itemsPerPage.fifteen);
|
||||
await expect(await paginationPage.getPaginationRange()).toEqual('Showing 1-' + itemsPerPage.fifteenValue + ' of ' + noOfFiles);
|
||||
await expect(await trashcanPage.numberOfResultsDisplayed()).toBe(itemsPerPage.fifteenValue);
|
||||
await paginationPage.checkNextPageButtonIsEnabled();
|
||||
await paginationPage.checkPreviousPageButtonIsDisabled();
|
||||
});
|
||||
|
||||
it('[C276743] Should be able to set Items per page to 10', () => {
|
||||
paginationPage.selectItemsPerPage(itemsPerPage.ten);
|
||||
trashcanPage.waitForTableBody();
|
||||
trashcanPage.waitForPagination();
|
||||
expect(paginationPage.getCurrentItemsPerPage()).toEqual(itemsPerPage.ten);
|
||||
expect(paginationPage.getPaginationRange()).toEqual('Showing 1-' + itemsPerPage.tenValue + ' of ' + nrOfFiles);
|
||||
expect(trashcanPage.numberOfResultsDisplayed()).toBe(itemsPerPage.tenValue);
|
||||
paginationPage.checkNextPageButtonIsEnabled();
|
||||
paginationPage.checkPreviousPageButtonIsDisabled();
|
||||
it('[C276743] Should be able to set Items per page to 10', async () => {
|
||||
await paginationPage.selectItemsPerPage(itemsPerPage.ten);
|
||||
await trashcanPage.waitForTableBody();
|
||||
await trashcanPage.waitForPagination();
|
||||
await expect(await paginationPage.getCurrentItemsPerPage()).toEqual(itemsPerPage.ten);
|
||||
await expect(await paginationPage.getPaginationRange()).toEqual('Showing 1-' + itemsPerPage.tenValue + ' of ' + noOfFiles);
|
||||
await expect(await trashcanPage.numberOfResultsDisplayed()).toBe(itemsPerPage.tenValue);
|
||||
await paginationPage.checkNextPageButtonIsEnabled();
|
||||
await paginationPage.checkPreviousPageButtonIsDisabled();
|
||||
});
|
||||
|
||||
it('[C276744] Should be able to set Items per page to 5', () => {
|
||||
paginationPage.selectItemsPerPage(itemsPerPage.five);
|
||||
trashcanPage.waitForTableBody();
|
||||
trashcanPage.waitForPagination();
|
||||
expect(paginationPage.getCurrentItemsPerPage()).toEqual(itemsPerPage.five);
|
||||
expect(paginationPage.getPaginationRange()).toEqual('Showing 1-' + itemsPerPage.fiveValue + ' of ' + nrOfFiles);
|
||||
expect(trashcanPage.numberOfResultsDisplayed()).toBe(itemsPerPage.fiveValue);
|
||||
paginationPage.checkNextPageButtonIsEnabled();
|
||||
paginationPage.checkPreviousPageButtonIsDisabled();
|
||||
it('[C276744] Should be able to set Items per page to 5', async () => {
|
||||
await paginationPage.selectItemsPerPage(itemsPerPage.five);
|
||||
await trashcanPage.waitForTableBody();
|
||||
await trashcanPage.waitForPagination();
|
||||
await expect(await paginationPage.getCurrentItemsPerPage()).toEqual(itemsPerPage.five);
|
||||
await expect(await paginationPage.getPaginationRange()).toEqual('Showing 1-' + itemsPerPage.fiveValue + ' of ' + noOfFiles);
|
||||
await expect(await trashcanPage.numberOfResultsDisplayed()).toBe(itemsPerPage.fiveValue);
|
||||
await paginationPage.checkNextPageButtonIsEnabled();
|
||||
await paginationPage.checkPreviousPageButtonIsDisabled();
|
||||
});
|
||||
})
|
||||
;
|
||||
|
||||
@@ -45,7 +45,7 @@ describe('Tree View Component', () => {
|
||||
document: 'MyFile'
|
||||
};
|
||||
|
||||
beforeAll(async (done) => {
|
||||
beforeAll(async () => {
|
||||
await this.alfrescoJsApi.login(browser.params.testConfig.adf.adminEmail, browser.params.testConfig.adf.adminPassword);
|
||||
|
||||
await this.alfrescoJsApi.core.peopleApi.addPerson(acsUser);
|
||||
@@ -69,78 +69,75 @@ describe('Tree View Component', () => {
|
||||
nodeType: 'cm:content'
|
||||
});
|
||||
|
||||
loginPage.loginToContentServicesUsingUserModel(acsUser);
|
||||
await loginPage.loginToContentServicesUsingUserModel(acsUser);
|
||||
|
||||
navigationBarPage.clickTreeViewButton();
|
||||
|
||||
done();
|
||||
await navigationBarPage.clickTreeViewButton();
|
||||
});
|
||||
|
||||
afterAll(async (done) => {
|
||||
afterAll(async () => {
|
||||
await navigationBarPage.clickLogoutButton();
|
||||
|
||||
await this.alfrescoJsApi.login(browser.params.testConfig.adf.adminEmail, browser.params.testConfig.adf.adminPassword);
|
||||
|
||||
await uploadActions.deleteFileOrFolder(treeFolder.entry.id);
|
||||
await uploadActions.deleteFileOrFolder(secondTreeFolder.entry.id);
|
||||
done();
|
||||
});
|
||||
|
||||
it('[C289972] Should be able to show folders and sub-folders of a node as a tree view', () => {
|
||||
treeViewPage.checkTreeViewTitleIsDisplayed();
|
||||
it('[C289972] Should be able to show folders and sub-folders of a node as a tree view', async () => {
|
||||
await treeViewPage.checkTreeViewTitleIsDisplayed();
|
||||
|
||||
expect(treeViewPage.getNodeId()).toEqual(nodeNames.parentFolder);
|
||||
await expect(await treeViewPage.getNodeId()).toEqual(nodeNames.parentFolder);
|
||||
|
||||
treeViewPage.checkNodeIsDisplayedAsClosed(nodeNames.folder);
|
||||
treeViewPage.checkNodeIsDisplayedAsClosed(nodeNames.secondFolder);
|
||||
await treeViewPage.checkNodeIsDisplayedAsClosed(nodeNames.folder);
|
||||
await treeViewPage.checkNodeIsDisplayedAsClosed(nodeNames.secondFolder);
|
||||
|
||||
treeViewPage.clickNode(nodeNames.secondFolder);
|
||||
await treeViewPage.clickNode(nodeNames.secondFolder);
|
||||
|
||||
treeViewPage.checkClickedNodeName(nodeNames.secondFolder);
|
||||
treeViewPage.checkNodeIsDisplayedAsOpen(nodeNames.secondFolder);
|
||||
treeViewPage.checkNodeIsDisplayedAsClosed(nodeNames.thirdFolder);
|
||||
await treeViewPage.checkClickedNodeName(nodeNames.secondFolder);
|
||||
await treeViewPage.checkNodeIsDisplayedAsOpen(nodeNames.secondFolder);
|
||||
await treeViewPage.checkNodeIsDisplayedAsClosed(nodeNames.thirdFolder);
|
||||
|
||||
treeViewPage.clickNode(nodeNames.thirdFolder);
|
||||
await treeViewPage.clickNode(nodeNames.thirdFolder);
|
||||
|
||||
treeViewPage.checkClickedNodeName(nodeNames.thirdFolder);
|
||||
treeViewPage.checkNodeIsDisplayedAsOpen(nodeNames.thirdFolder);
|
||||
await treeViewPage.checkClickedNodeName(nodeNames.thirdFolder);
|
||||
await treeViewPage.checkNodeIsDisplayedAsOpen(nodeNames.thirdFolder);
|
||||
|
||||
treeViewPage.clickNode(nodeNames.secondFolder);
|
||||
await treeViewPage.clickNode(nodeNames.secondFolder);
|
||||
|
||||
treeViewPage.checkClickedNodeName(nodeNames.secondFolder);
|
||||
treeViewPage.checkNodeIsDisplayedAsClosed(nodeNames.secondFolder);
|
||||
treeViewPage.checkNodeIsNotDisplayed(nodeNames.thirdFolder);
|
||||
await treeViewPage.checkClickedNodeName(nodeNames.secondFolder);
|
||||
await treeViewPage.checkNodeIsDisplayedAsClosed(nodeNames.secondFolder);
|
||||
await treeViewPage.checkNodeIsNotDisplayed(nodeNames.thirdFolder);
|
||||
});
|
||||
|
||||
it('[C289973] Should be able to change the default nodeId', () => {
|
||||
treeViewPage.clearNodeIdInput();
|
||||
it('[C289973] Should be able to change the default nodeId', async () => {
|
||||
await treeViewPage.clearNodeIdInput();
|
||||
|
||||
treeViewPage.checkNoNodeIdMessageIsDisplayed();
|
||||
treeViewPage.addNodeId(secondTreeFolder.entry.id);
|
||||
await treeViewPage.checkNoNodeIdMessageIsDisplayed();
|
||||
await treeViewPage.addNodeId(secondTreeFolder.entry.id);
|
||||
|
||||
treeViewPage.checkNodeIsDisplayedAsClosed(nodeNames.thirdFolder);
|
||||
await treeViewPage.checkNodeIsDisplayedAsClosed(nodeNames.thirdFolder);
|
||||
|
||||
treeViewPage.addNodeId('ThisIdDoesNotExist');
|
||||
treeViewPage.checkErrorMessageIsDisplayed();
|
||||
await treeViewPage.addNodeId('ThisIdDoesNotExist');
|
||||
await treeViewPage.checkErrorMessageIsDisplayed();
|
||||
|
||||
treeViewPage.addNodeId(nodeNames.parentFolder);
|
||||
await treeViewPage.addNodeId(nodeNames.parentFolder);
|
||||
|
||||
treeViewPage.checkNodeIsDisplayedAsClosed(nodeNames.folder);
|
||||
treeViewPage.checkNodeIsDisplayedAsClosed(nodeNames.secondFolder);
|
||||
await treeViewPage.checkNodeIsDisplayedAsClosed(nodeNames.folder);
|
||||
await treeViewPage.checkNodeIsDisplayedAsClosed(nodeNames.secondFolder);
|
||||
|
||||
treeViewPage.clickNode(nodeNames.secondFolder);
|
||||
await treeViewPage.clickNode(nodeNames.secondFolder);
|
||||
|
||||
treeViewPage.checkNodeIsDisplayedAsClosed(nodeNames.thirdFolder);
|
||||
await treeViewPage.checkNodeIsDisplayedAsClosed(nodeNames.thirdFolder);
|
||||
});
|
||||
|
||||
it('[C290071] Should not be able to display files', () => {
|
||||
treeViewPage.addNodeId(secondTreeFolder.entry.id);
|
||||
it('[C290071] Should not be able to display files', async () => {
|
||||
await treeViewPage.addNodeId(secondTreeFolder.entry.id);
|
||||
|
||||
treeViewPage.checkNodeIsDisplayedAsClosed(nodeNames.thirdFolder);
|
||||
await treeViewPage.checkNodeIsDisplayedAsClosed(nodeNames.thirdFolder);
|
||||
|
||||
treeViewPage.clickNode(nodeNames.thirdFolder);
|
||||
await treeViewPage.clickNode(nodeNames.thirdFolder);
|
||||
|
||||
expect(treeViewPage.getTotalNodes()).toEqual(1);
|
||||
await expect(await treeViewPage.getTotalNodes()).toEqual(1);
|
||||
});
|
||||
|
||||
});
|
||||
|
||||
@@ -26,12 +26,12 @@ import resources = require('../../util/resources');
|
||||
import { AlfrescoApiCompatibility as AlfrescoApi } from '@alfresco/js-api';
|
||||
import { NavigationBarPage } from '../../pages/adf/navigationBarPage';
|
||||
|
||||
describe('Upload component', () => {
|
||||
describe('Upload component', async () => {
|
||||
|
||||
this.alfrescoJsApi = new AlfrescoApi({
|
||||
provider: 'ECM',
|
||||
hostEcm: browser.params.testConfig.adf_acs.host
|
||||
});
|
||||
provider: 'ECM',
|
||||
hostEcm: browser.params.testConfig.adf_acs.host
|
||||
});
|
||||
const contentServicesPage = new ContentServicesPage();
|
||||
const uploadDialog = new UploadDialog();
|
||||
const uploadToggles = new UploadToggles();
|
||||
@@ -53,7 +53,7 @@ describe('Upload component', () => {
|
||||
'location': resources.Files.ADF_DOCUMENTS.LARGE_FILE.file_location
|
||||
});
|
||||
|
||||
beforeAll(async (done) => {
|
||||
beforeAll(async () => {
|
||||
await this.alfrescoJsApi.login(browser.params.testConfig.adf.adminEmail, browser.params.testConfig.adf.adminPassword);
|
||||
|
||||
await this.alfrescoJsApi.core.peopleApi.addPerson(acsUser);
|
||||
@@ -62,55 +62,57 @@ describe('Upload component', () => {
|
||||
|
||||
await loginPage.loginToContentServicesUsingUserModel(acsUser);
|
||||
|
||||
contentServicesPage.goToDocumentList();
|
||||
await contentServicesPage.goToDocumentList();
|
||||
|
||||
const pdfUploadedFile = await uploadActions.uploadFile(firstPdfFileModel.location, firstPdfFileModel.name, '-my-');
|
||||
|
||||
Object.assign(firstPdfFileModel, pdfUploadedFile.entry);
|
||||
|
||||
done();
|
||||
});
|
||||
|
||||
afterAll(async (done) => {
|
||||
afterAll(async () => {
|
||||
await navigationBarPage.clickLogoutButton();
|
||||
done();
|
||||
});
|
||||
|
||||
beforeEach(() => {
|
||||
contentServicesPage.goToDocumentList();
|
||||
beforeEach(async () => {
|
||||
await contentServicesPage.goToDocumentList();
|
||||
});
|
||||
|
||||
it('[C272792] Should be possible to cancel upload of a big file using row cancel icon', () => {
|
||||
browser.executeScript(' setTimeout(() => {document.querySelector(\'mat-icon[class*="adf-file-uploading-row__action"]\').click();}, 3000)');
|
||||
it('[C272792] Should be possible to cancel upload of a big file using row cancel icon', async () => {
|
||||
await browser.executeScript(' setTimeout(() => {document.querySelector(\'mat-icon[class*="adf-file-uploading-row__action"]\').click();}, 3000)');
|
||||
|
||||
contentServicesPage.uploadFile(largeFile.location);
|
||||
await contentServicesPage.uploadFile(largeFile.location);
|
||||
|
||||
expect(uploadDialog.getTitleText()).toEqual('Upload canceled');
|
||||
uploadDialog.clickOnCloseButton().dialogIsNotDisplayed();
|
||||
contentServicesPage.checkContentIsNotDisplayed(largeFile.name);
|
||||
await expect(await uploadDialog.getTitleText()).toEqual('Upload canceled');
|
||||
await uploadDialog.clickOnCloseButton();
|
||||
await uploadDialog.dialogIsNotDisplayed();
|
||||
await contentServicesPage.checkContentIsNotDisplayed(largeFile.name);
|
||||
});
|
||||
|
||||
it('[C287790] Should be possible to cancel upload of a big file through the cancel uploads button', () => {
|
||||
browser.executeScript(' setInterval(() => {document.querySelector("#adf-upload-dialog-cancel-all").click();' +
|
||||
it('[C287790] Should be possible to cancel upload of a big file through the cancel uploads button', async () => {
|
||||
await browser.executeScript(' setInterval(() => {document.querySelector("#adf-upload-dialog-cancel-all").click();' +
|
||||
'document.querySelector("#adf-upload-dialog-cancel").click(); }, 500)');
|
||||
|
||||
contentServicesPage.uploadFile(largeFile.location);
|
||||
await contentServicesPage.uploadFile(largeFile.location);
|
||||
|
||||
expect(uploadDialog.getTitleText()).toEqual('Upload canceled');
|
||||
uploadDialog.clickOnCloseButton().dialogIsNotDisplayed();
|
||||
contentServicesPage.checkContentIsNotDisplayed(largeFile.name);
|
||||
await expect(await uploadDialog.getTitleText()).toEqual('Upload canceled');
|
||||
await uploadDialog.clickOnCloseButton();
|
||||
await uploadDialog.dialogIsNotDisplayed();
|
||||
await contentServicesPage.checkContentIsNotDisplayed(largeFile.name);
|
||||
});
|
||||
|
||||
it('[C272793] Should be able to cancel multiple files upload', () => {
|
||||
browser.executeScript(' setInterval(() => {document.querySelector("#adf-upload-dialog-cancel-all").click();' +
|
||||
it('[C272793] Should be able to cancel multiple files upload', async () => {
|
||||
await browser.executeScript(' setInterval(() => {document.querySelector("#adf-upload-dialog-cancel-all").click();' +
|
||||
'document.querySelector("#adf-upload-dialog-cancel").click(); }, 500)');
|
||||
|
||||
uploadToggles.enableMultipleFileUpload();
|
||||
contentServicesPage.uploadMultipleFile([pngFileModel.location, largeFile.location]);
|
||||
expect(uploadDialog.getTitleText()).toEqual('Upload canceled');
|
||||
uploadDialog.clickOnCloseButton().dialogIsNotDisplayed();
|
||||
contentServicesPage.checkContentIsNotDisplayed(pngFileModel.name).checkContentIsNotDisplayed(largeFile.name);
|
||||
uploadToggles.disableMultipleFileUpload();
|
||||
await uploadToggles.enableMultipleFileUpload();
|
||||
await contentServicesPage.uploadMultipleFile([pngFileModel.location, largeFile.location]);
|
||||
await expect(await uploadDialog.getTitleText()).toEqual('Upload canceled');
|
||||
await uploadDialog.clickOnCloseButton();
|
||||
await uploadDialog.dialogIsNotDisplayed();
|
||||
await contentServicesPage.checkContentIsNotDisplayed(pngFileModel.name);
|
||||
await contentServicesPage.checkContentIsNotDisplayed(largeFile.name);
|
||||
await uploadToggles.disableMultipleFileUpload();
|
||||
});
|
||||
|
||||
});
|
||||
|
||||
@@ -55,7 +55,7 @@ describe('Upload component - Excluded Files', () => {
|
||||
'location': resources.Files.ADF_DOCUMENTS.PNG.file_location
|
||||
});
|
||||
|
||||
beforeAll(async (done) => {
|
||||
beforeAll(async () => {
|
||||
this.alfrescoJsApi = new AlfrescoApi({
|
||||
provider: 'ECM',
|
||||
hostEcm: browser.params.testConfig.adf_acs.host
|
||||
@@ -69,42 +69,39 @@ describe('Upload component - Excluded Files', () => {
|
||||
|
||||
await loginPage.loginToContentServicesUsingUserModel(acsUser);
|
||||
|
||||
contentServicesPage.goToDocumentList();
|
||||
await contentServicesPage.goToDocumentList();
|
||||
|
||||
done();
|
||||
});
|
||||
|
||||
afterAll(async (done) => {
|
||||
afterAll(async () => {
|
||||
await navigationBarPage.clickLogoutButton();
|
||||
done();
|
||||
|
||||
});
|
||||
|
||||
afterEach(async (done) => {
|
||||
contentServicesPage.goToDocumentList();
|
||||
afterEach(async () => {
|
||||
await contentServicesPage.goToDocumentList();
|
||||
|
||||
done();
|
||||
});
|
||||
|
||||
it('[C279914] Should not allow upload default excluded files using D&D', () => {
|
||||
contentServicesPage.checkDragAndDropDIsDisplayed();
|
||||
it('[C279914] Should not allow upload default excluded files using D&D', async () => {
|
||||
await contentServicesPage.checkDragAndDropDIsDisplayed();
|
||||
|
||||
const dragAndDropArea = element.all(by.css('adf-upload-drag-area div')).first();
|
||||
|
||||
const dragAndDrop = new DropActions();
|
||||
|
||||
dragAndDrop.dropFile(dragAndDropArea, iniExcludedFile.location);
|
||||
await dragAndDrop.dropFile(dragAndDropArea, iniExcludedFile.location);
|
||||
|
||||
browser.driver.sleep(5000);
|
||||
await browser.sleep(5000);
|
||||
|
||||
uploadDialog.dialogIsNotDisplayed();
|
||||
await uploadDialog.dialogIsNotDisplayed();
|
||||
|
||||
contentServicesPage.checkContentIsNotDisplayed(iniExcludedFile.name);
|
||||
await contentServicesPage.checkContentIsNotDisplayed(iniExcludedFile.name);
|
||||
});
|
||||
|
||||
it('[C260122] Should not allow upload default excluded files using Upload button', () => {
|
||||
contentServicesPage
|
||||
.uploadFile(iniExcludedFile.location)
|
||||
.checkContentIsNotDisplayed(iniExcludedFile.name);
|
||||
it('[C260122] Should not allow upload default excluded files using Upload button', async () => {
|
||||
await contentServicesPage.uploadFile(iniExcludedFile.location);
|
||||
await contentServicesPage.checkContentIsNotDisplayed(iniExcludedFile.name);
|
||||
});
|
||||
|
||||
it('[C212862] Should not allow upload file excluded in the files extension of app.config.json', async () => {
|
||||
@@ -113,11 +110,12 @@ describe('Upload component - Excluded Files', () => {
|
||||
'match-options': { 'nocase': true }
|
||||
}));
|
||||
|
||||
contentServicesPage.goToDocumentList();
|
||||
await contentServicesPage.goToDocumentList();
|
||||
|
||||
contentServicesPage
|
||||
.uploadFile(txtFileModel.location)
|
||||
.checkContentIsNotDisplayed(txtFileModel.name);
|
||||
await contentServicesPage
|
||||
.uploadFile(txtFileModel.location);
|
||||
|
||||
await contentServicesPage.checkContentIsNotDisplayed(txtFileModel.name);
|
||||
});
|
||||
|
||||
it('[C274688] Should extension type added as excluded and accepted not be uploaded', async () => {
|
||||
@@ -126,14 +124,14 @@ describe('Upload component - Excluded Files', () => {
|
||||
'match-options': { 'nocase': true }
|
||||
}));
|
||||
|
||||
contentServicesPage.goToDocumentList();
|
||||
await contentServicesPage.goToDocumentList();
|
||||
|
||||
uploadToggles.enableExtensionFilter();
|
||||
browser.driver.sleep(1000);
|
||||
uploadToggles.addExtension('.png');
|
||||
await uploadToggles.enableExtensionFilter();
|
||||
await browser.sleep(1000);
|
||||
await uploadToggles.addExtension('.png');
|
||||
|
||||
contentServicesPage.uploadFile(pngFile.location);
|
||||
browser.driver.sleep(1000);
|
||||
contentServicesPage.checkContentIsNotDisplayed(pngFile.name);
|
||||
await contentServicesPage.uploadFile(pngFile.location);
|
||||
await browser.sleep(1000);
|
||||
await contentServicesPage.checkContentIsNotDisplayed(pngFile.name);
|
||||
});
|
||||
});
|
||||
|
||||
@@ -0,0 +1,185 @@
|
||||
/*!
|
||||
* @license
|
||||
* Copyright 2019 Alfresco Software, Ltd.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
import { BrowserActions, LoginPage, UploadActions } from '@alfresco/adf-testing';
|
||||
import { ContentServicesPage } from '../../pages/adf/contentServicesPage';
|
||||
import { UploadDialog } from '../../pages/adf/dialog/uploadDialog';
|
||||
import { UploadToggles } from '../../pages/adf/dialog/uploadToggles';
|
||||
import { AcsUserModel } from '../../models/ACS/acsUserModel';
|
||||
import { FileModel } from '../../models/ACS/fileModel';
|
||||
import { browser } from 'protractor';
|
||||
import resources = require('../../util/resources');
|
||||
import { AlfrescoApiCompatibility as AlfrescoApi } from '@alfresco/js-api';
|
||||
import { VersionManagePage } from '../../pages/adf/versionManagerPage';
|
||||
|
||||
describe('Upload component', () => {
|
||||
|
||||
const contentServicesPage = new ContentServicesPage();
|
||||
const uploadDialog = new UploadDialog();
|
||||
const uploadToggles = new UploadToggles();
|
||||
const loginPage = new LoginPage();
|
||||
const acsUser = new AcsUserModel();
|
||||
const versionManagePage = new VersionManagePage();
|
||||
this.alfrescoJsApi = new AlfrescoApi({
|
||||
provider: 'ECM',
|
||||
hostEcm: browser.params.testConfig.adf_acs.host
|
||||
});
|
||||
const uploadActions = new UploadActions(this.alfrescoJsApi);
|
||||
|
||||
const firstPdfFileModel = new FileModel({
|
||||
'name': resources.Files.ADF_DOCUMENTS.PDF_B.file_name,
|
||||
'location': resources.Files.ADF_DOCUMENTS.PDF_B.file_location
|
||||
});
|
||||
const docxFileModel = new FileModel({
|
||||
'name': resources.Files.ADF_DOCUMENTS.DOCX.file_name,
|
||||
'location': resources.Files.ADF_DOCUMENTS.DOCX.file_location
|
||||
});
|
||||
const pdfFileModel = new FileModel({
|
||||
'name': resources.Files.ADF_DOCUMENTS.PDF.file_name,
|
||||
'location': resources.Files.ADF_DOCUMENTS.PDF.file_location
|
||||
});
|
||||
const pngFileModelTwo = new FileModel({
|
||||
'name': resources.Files.ADF_DOCUMENTS.PNG_B.file_name,
|
||||
'location': resources.Files.ADF_DOCUMENTS.PNG_B.file_location
|
||||
});
|
||||
const pngFileModel = new FileModel({
|
||||
'name': resources.Files.ADF_DOCUMENTS.PNG.file_name,
|
||||
'location': resources.Files.ADF_DOCUMENTS.PNG.file_location
|
||||
});
|
||||
const filesLocation = [pdfFileModel.location, docxFileModel.location, pngFileModel.location, firstPdfFileModel.location];
|
||||
const filesName = [pdfFileModel.name, docxFileModel.name, pngFileModel.name, firstPdfFileModel.name];
|
||||
|
||||
beforeAll(async () => {
|
||||
|
||||
await this.alfrescoJsApi.login(browser.params.testConfig.adf.adminEmail, browser.params.testConfig.adf.adminPassword);
|
||||
await this.alfrescoJsApi.core.peopleApi.addPerson(acsUser);
|
||||
await this.alfrescoJsApi.login(acsUser.id, acsUser.password);
|
||||
await loginPage.loginToContentServicesUsingUserModel(acsUser);
|
||||
await contentServicesPage.goToDocumentList();
|
||||
const pdfUploadedFile = await uploadActions.uploadFile(firstPdfFileModel.location, firstPdfFileModel.name, '-my-');
|
||||
Object.assign(firstPdfFileModel, pdfUploadedFile.entry);
|
||||
|
||||
});
|
||||
|
||||
beforeEach(async () => {
|
||||
await contentServicesPage.goToDocumentList();
|
||||
});
|
||||
|
||||
afterEach(async () => {
|
||||
const nbResults = await contentServicesPage.numberOfResultsDisplayed();
|
||||
if (nbResults > 1) {
|
||||
const nodesPromise = await contentServicesPage.getElementsDisplayedId();
|
||||
for (const node of nodesPromise) {
|
||||
const nodeId = await node;
|
||||
await uploadActions.deleteFileOrFolder(nodeId);
|
||||
}
|
||||
}
|
||||
|
||||
});
|
||||
|
||||
it('[C260143] Should be possible to maximize/minimize the upload dialog', async () => {
|
||||
await contentServicesPage
|
||||
.uploadFile(docxFileModel.location);
|
||||
await contentServicesPage.checkContentIsDisplayed(docxFileModel.name);
|
||||
|
||||
await uploadDialog.fileIsUploaded(docxFileModel.name);
|
||||
await uploadDialog.checkCloseButtonIsDisplayed();
|
||||
await expect(await uploadDialog.numberOfCurrentFilesUploaded()).toEqual('1');
|
||||
await expect(await uploadDialog.numberOfInitialFilesUploaded()).toEqual('1');
|
||||
await uploadDialog.minimizeUploadDialog();
|
||||
await uploadDialog.dialogIsMinimized();
|
||||
await expect(await uploadDialog.numberOfCurrentFilesUploaded()).toEqual('1');
|
||||
await expect(await uploadDialog.numberOfInitialFilesUploaded()).toEqual('1');
|
||||
await uploadDialog.maximizeUploadDialog();
|
||||
await uploadDialog.dialogIsDisplayed();
|
||||
await uploadDialog.fileIsUploaded(docxFileModel.name);
|
||||
await expect(await uploadDialog.numberOfCurrentFilesUploaded()).toEqual('1');
|
||||
await expect(await uploadDialog.numberOfInitialFilesUploaded()).toEqual('1');
|
||||
await uploadDialog.checkCloseButtonIsDisplayed();
|
||||
await uploadDialog.clickOnCloseButton();
|
||||
await uploadDialog.dialogIsNotDisplayed();
|
||||
});
|
||||
|
||||
it('[C291902] Should be shown upload counter display in dialog box', async () => {
|
||||
await contentServicesPage
|
||||
.uploadFile(docxFileModel.location);
|
||||
await contentServicesPage.checkContentIsDisplayed(docxFileModel.name);
|
||||
|
||||
await uploadDialog.fileIsUploaded(docxFileModel.name);
|
||||
await uploadDialog.checkCloseButtonIsDisplayed();
|
||||
await expect(await uploadDialog.getTitleText()).toEqual('Uploaded 1 / 1');
|
||||
await uploadDialog.checkCloseButtonIsDisplayed();
|
||||
await uploadDialog.clickOnCloseButton();
|
||||
await uploadDialog.dialogIsNotDisplayed();
|
||||
});
|
||||
|
||||
it('[C260168] Should be possible to cancel upload using dialog icon', async () => {
|
||||
await contentServicesPage.uploadFile(pdfFileModel.location);
|
||||
await contentServicesPage.checkContentIsDisplayed(pdfFileModel.name);
|
||||
await uploadDialog.removeUploadedFile(pdfFileModel.name);
|
||||
await uploadDialog.fileIsCancelled(pdfFileModel.name);
|
||||
await expect(await uploadDialog.getTitleText()).toEqual('Upload canceled');
|
||||
await uploadDialog.clickOnCloseButton();
|
||||
await uploadDialog.dialogIsNotDisplayed();
|
||||
await contentServicesPage.checkContentIsNotDisplayed(pdfFileModel.name);
|
||||
});
|
||||
|
||||
it('[C260176] Should remove files from upload dialog box when closed', async () => {
|
||||
await contentServicesPage.uploadFile(pngFileModelTwo.location);
|
||||
await contentServicesPage.checkContentIsDisplayed(pngFileModelTwo.name);
|
||||
|
||||
await uploadDialog.fileIsUploaded(pngFileModelTwo.name);
|
||||
await contentServicesPage.uploadFile(pngFileModel.location);
|
||||
await contentServicesPage.checkContentIsDisplayed(pngFileModel.name);
|
||||
await uploadDialog.fileIsUploaded(pngFileModel.name);
|
||||
await uploadDialog.fileIsUploaded(pngFileModelTwo.name);
|
||||
await uploadDialog.clickOnCloseButton();
|
||||
await uploadDialog.dialogIsNotDisplayed();
|
||||
await contentServicesPage.uploadFile(pdfFileModel.location);
|
||||
await contentServicesPage .checkContentIsDisplayed(pdfFileModel.name);
|
||||
await uploadDialog.fileIsUploaded(pdfFileModel.name);
|
||||
await uploadDialog.fileIsNotDisplayedInDialog(pngFileModel.name);
|
||||
await uploadDialog.fileIsNotDisplayedInDialog(pngFileModelTwo.name);
|
||||
await uploadDialog.clickOnCloseButton();
|
||||
await uploadDialog.dialogIsNotDisplayed();
|
||||
});
|
||||
|
||||
it('[C260170] Should be possible to upload multiple files', async () => {
|
||||
await contentServicesPage.checkAcsContainer();
|
||||
await uploadToggles.enableMultipleFileUpload();
|
||||
await contentServicesPage.uploadMultipleFile(filesLocation);
|
||||
await contentServicesPage.checkContentsAreDisplayed(filesName);
|
||||
await uploadDialog.filesAreUploaded(filesName);
|
||||
await expect(await uploadDialog.getTitleText()).toEqual('Uploaded 4 / 4');
|
||||
await uploadDialog.clickOnCloseButton();
|
||||
await uploadDialog.dialogIsNotDisplayed();
|
||||
await uploadToggles.disableMultipleFileUpload();
|
||||
});
|
||||
|
||||
it('[C311305] Should NOT be able to remove uploaded version', async () => {
|
||||
await contentServicesPage.uploadFile(docxFileModel.location);
|
||||
await uploadDialog.fileIsUploaded(docxFileModel.name);
|
||||
await contentServicesPage.checkContentIsDisplayed(docxFileModel.name);
|
||||
|
||||
await contentServicesPage.versionManagerContent(docxFileModel.name);
|
||||
await BrowserActions.click(versionManagePage.showNewVersionButton);
|
||||
await versionManagePage.uploadNewVersionFile(pngFileModel.location);
|
||||
await versionManagePage.closeVersionDialog();
|
||||
await uploadDialog.removeUploadedFile(pngFileModel.name);
|
||||
await contentServicesPage.checkContentIsDisplayed(pngFileModel.name);
|
||||
});
|
||||
});
|
||||
@@ -66,28 +66,28 @@ describe('Upload component', () => {
|
||||
const filesLocation = [pdfFileModel.location, docxFileModel.location, pngFileModel.location, firstPdfFileModel.location];
|
||||
const filesName = [pdfFileModel.name, docxFileModel.name, pngFileModel.name, firstPdfFileModel.name];
|
||||
|
||||
beforeAll(async (done) => {
|
||||
beforeAll(async () => {
|
||||
|
||||
await this.alfrescoJsApi.login(browser.params.testConfig.adf.adminEmail, browser.params.testConfig.adf.adminPassword);
|
||||
await this.alfrescoJsApi.core.peopleApi.addPerson(acsUser);
|
||||
await this.alfrescoJsApi.login(acsUser.id, acsUser.password);
|
||||
await loginPage.loginToContentServicesUsingUserModel(acsUser);
|
||||
contentServicesPage.goToDocumentList();
|
||||
await contentServicesPage.goToDocumentList();
|
||||
const pdfUploadedFile = await uploadActions.uploadFile(firstPdfFileModel.location, firstPdfFileModel.name, '-my-');
|
||||
Object.assign(firstPdfFileModel, pdfUploadedFile.entry);
|
||||
done();
|
||||
|
||||
});
|
||||
|
||||
afterAll(async (done) => {
|
||||
afterAll(async () => {
|
||||
await navigationBarPage.clickLogoutButton();
|
||||
done();
|
||||
|
||||
});
|
||||
|
||||
beforeEach(() => {
|
||||
contentServicesPage.goToDocumentList();
|
||||
beforeEach(async () => {
|
||||
await contentServicesPage.goToDocumentList();
|
||||
});
|
||||
|
||||
afterEach(async (done) => {
|
||||
afterEach(async () => {
|
||||
const nbResults = await contentServicesPage.numberOfResultsDisplayed();
|
||||
if (nbResults > 1) {
|
||||
const nodesPromise = await contentServicesPage.getElementsDisplayedId();
|
||||
@@ -97,80 +97,99 @@ describe('Upload component', () => {
|
||||
await uploadActions.deleteFileOrFolder(nodeId);
|
||||
});
|
||||
}
|
||||
|
||||
done();
|
||||
});
|
||||
|
||||
it('[C260143] Should be possible to maximize/minimize the upload dialog', () => {
|
||||
contentServicesPage
|
||||
.uploadFile(docxFileModel.location)
|
||||
.checkContentIsDisplayed(docxFileModel.name);
|
||||
it('[C260143] Should be possible to maximize/minimize the upload dialog', async () => {
|
||||
await contentServicesPage.uploadFile(docxFileModel.location);
|
||||
|
||||
uploadDialog.fileIsUploaded(docxFileModel.name).checkCloseButtonIsDisplayed();
|
||||
expect(uploadDialog.numberOfCurrentFilesUploaded()).toEqual('1');
|
||||
expect(uploadDialog.numberOfInitialFilesUploaded()).toEqual('1');
|
||||
uploadDialog.minimizeUploadDialog().dialogIsMinimized();
|
||||
expect(uploadDialog.numberOfCurrentFilesUploaded()).toEqual('1');
|
||||
expect(uploadDialog.numberOfInitialFilesUploaded()).toEqual('1');
|
||||
uploadDialog.maximizeUploadDialog().dialogIsDisplayed().fileIsUploaded(docxFileModel.name);
|
||||
expect(uploadDialog.numberOfCurrentFilesUploaded()).toEqual('1');
|
||||
expect(uploadDialog.numberOfInitialFilesUploaded()).toEqual('1');
|
||||
uploadDialog.checkCloseButtonIsDisplayed().clickOnCloseButton().dialogIsNotDisplayed();
|
||||
await contentServicesPage.checkContentIsDisplayed(docxFileModel.name);
|
||||
|
||||
await uploadDialog.fileIsUploaded(docxFileModel.name);
|
||||
await uploadDialog.checkCloseButtonIsDisplayed();
|
||||
await expect(uploadDialog.numberOfCurrentFilesUploaded()).toEqual('1');
|
||||
await expect(uploadDialog.numberOfInitialFilesUploaded()).toEqual('1');
|
||||
await uploadDialog.minimizeUploadDialog();
|
||||
await uploadDialog.dialogIsMinimized();
|
||||
await expect(uploadDialog.numberOfCurrentFilesUploaded()).toEqual('1');
|
||||
await expect(uploadDialog.numberOfInitialFilesUploaded()).toEqual('1');
|
||||
await uploadDialog.maximizeUploadDialog();
|
||||
await uploadDialog.dialogIsDisplayed();
|
||||
await uploadDialog.fileIsUploaded(docxFileModel.name);
|
||||
await expect(uploadDialog.numberOfCurrentFilesUploaded()).toEqual('1');
|
||||
await expect(uploadDialog.numberOfInitialFilesUploaded()).toEqual('1');
|
||||
await uploadDialog.checkCloseButtonIsDisplayed();
|
||||
await uploadDialog.clickOnCloseButton();
|
||||
await uploadDialog.dialogIsNotDisplayed();
|
||||
});
|
||||
|
||||
it('[C291902] Should be shown upload counter display in dialog box', () => {
|
||||
contentServicesPage
|
||||
.uploadFile(docxFileModel.location)
|
||||
.checkContentIsDisplayed(docxFileModel.name);
|
||||
it('[C291902] Should be shown upload counter display in dialog box', async () => {
|
||||
await contentServicesPage
|
||||
.uploadFile(docxFileModel.location);
|
||||
await contentServicesPage.checkContentIsDisplayed(docxFileModel.name);
|
||||
|
||||
uploadDialog.fileIsUploaded(docxFileModel.name).checkCloseButtonIsDisplayed();
|
||||
expect(uploadDialog.getTitleText()).toEqual('Uploaded 1 / 1');
|
||||
uploadDialog.checkCloseButtonIsDisplayed().clickOnCloseButton().dialogIsNotDisplayed();
|
||||
await uploadDialog.fileIsUploaded(docxFileModel.name);
|
||||
await uploadDialog.checkCloseButtonIsDisplayed();
|
||||
await expect(uploadDialog.getTitleText()).toEqual('Uploaded 1 / 1');
|
||||
await uploadDialog.checkCloseButtonIsDisplayed();
|
||||
await uploadDialog.clickOnCloseButton();
|
||||
await uploadDialog.dialogIsNotDisplayed();
|
||||
});
|
||||
|
||||
it('[C260168] Should be possible to cancel upload using dialog icon', () => {
|
||||
contentServicesPage.uploadFile(pdfFileModel.location)
|
||||
.checkContentIsDisplayed(pdfFileModel.name);
|
||||
uploadDialog.removeUploadedFile(pdfFileModel.name).fileIsCancelled(pdfFileModel.name);
|
||||
expect(uploadDialog.getTitleText()).toEqual('Upload canceled');
|
||||
uploadDialog.clickOnCloseButton().dialogIsNotDisplayed();
|
||||
contentServicesPage.checkContentIsNotDisplayed(pdfFileModel.name);
|
||||
it('[C260168] Should be possible to cancel upload using dialog icon', async () => {
|
||||
await contentServicesPage.uploadFile(pdfFileModel.location);
|
||||
await contentServicesPage.checkContentIsDisplayed(pdfFileModel.name);
|
||||
await uploadDialog.removeUploadedFile(pdfFileModel.name);
|
||||
await uploadDialog.fileIsCancelled(pdfFileModel.name);
|
||||
await expect(uploadDialog.getTitleText()).toEqual('Upload canceled');
|
||||
await uploadDialog.clickOnCloseButton();
|
||||
await uploadDialog.dialogIsNotDisplayed();
|
||||
await contentServicesPage.checkContentIsNotDisplayed(pdfFileModel.name);
|
||||
});
|
||||
|
||||
it('[C260176] Should remove files from upload dialog box when closed', () => {
|
||||
contentServicesPage.uploadFile(pngFileModelTwo.location).checkContentIsDisplayed(pngFileModelTwo.name);
|
||||
it('[C260176] Should remove files from upload dialog box when closed', async () => {
|
||||
await contentServicesPage.uploadFile(pngFileModelTwo.location);
|
||||
await contentServicesPage.checkContentIsDisplayed(pngFileModelTwo.name);
|
||||
|
||||
uploadDialog.fileIsUploaded(pngFileModelTwo.name);
|
||||
contentServicesPage.uploadFile(pngFileModel.location).checkContentIsDisplayed(pngFileModel.name);
|
||||
uploadDialog.fileIsUploaded(pngFileModel.name).fileIsUploaded(pngFileModelTwo.name);
|
||||
uploadDialog.clickOnCloseButton().dialogIsNotDisplayed();
|
||||
contentServicesPage.uploadFile(pdfFileModel.location).checkContentIsDisplayed(pdfFileModel.name);
|
||||
uploadDialog.fileIsUploaded(pdfFileModel.name).fileIsNotDisplayedInDialog(pngFileModel.name).fileIsNotDisplayedInDialog(pngFileModelTwo.name);
|
||||
uploadDialog.clickOnCloseButton().dialogIsNotDisplayed();
|
||||
await uploadDialog.fileIsUploaded(pngFileModelTwo.name);
|
||||
await contentServicesPage.uploadFile(pngFileModel.location);
|
||||
await contentServicesPage.checkContentIsDisplayed(pngFileModel.name);
|
||||
await uploadDialog.fileIsUploaded(pngFileModel.name);
|
||||
await uploadDialog.fileIsUploaded(pngFileModelTwo.name);
|
||||
await uploadDialog.clickOnCloseButton();
|
||||
await uploadDialog.dialogIsNotDisplayed();
|
||||
await contentServicesPage.uploadFile(pdfFileModel.location);
|
||||
await contentServicesPage.checkContentIsDisplayed(pdfFileModel.name);
|
||||
await uploadDialog.fileIsUploaded(pdfFileModel.name);
|
||||
await uploadDialog.fileIsNotDisplayedInDialog(pngFileModel.name);
|
||||
await uploadDialog.fileIsNotDisplayedInDialog(pngFileModelTwo.name);
|
||||
await uploadDialog.clickOnCloseButton();
|
||||
await uploadDialog.dialogIsNotDisplayed();
|
||||
});
|
||||
|
||||
it('[C260170] Should be possible to upload multiple files', () => {
|
||||
contentServicesPage.checkAcsContainer();
|
||||
uploadToggles.enableMultipleFileUpload();
|
||||
contentServicesPage.uploadMultipleFile(filesLocation).checkContentsAreDisplayed(filesName);
|
||||
uploadDialog.filesAreUploaded(filesName);
|
||||
expect(uploadDialog.getTitleText()).toEqual('Uploaded 4 / 4');
|
||||
uploadDialog.clickOnCloseButton().dialogIsNotDisplayed();
|
||||
uploadToggles.disableMultipleFileUpload();
|
||||
it('[C260170] Should be possible to upload multiple files', async () => {
|
||||
await contentServicesPage.checkAcsContainer();
|
||||
await uploadToggles.enableMultipleFileUpload();
|
||||
await contentServicesPage.uploadMultipleFile(filesLocation);
|
||||
await contentServicesPage.checkContentsAreDisplayed(filesName);
|
||||
await uploadDialog.filesAreUploaded(filesName);
|
||||
await expect(uploadDialog.getTitleText()).toEqual('Uploaded 4 / 4');
|
||||
await uploadDialog.clickOnCloseButton();
|
||||
await uploadDialog.dialogIsNotDisplayed();
|
||||
await uploadToggles.disableMultipleFileUpload();
|
||||
});
|
||||
|
||||
it('[C311305] Should NOT be able to remove uploaded version', () => {
|
||||
contentServicesPage.uploadFile(docxFileModel.location);
|
||||
uploadDialog.fileIsUploaded(docxFileModel.name);
|
||||
contentServicesPage.checkContentIsDisplayed(docxFileModel.name);
|
||||
it('[C311305] Should NOT be able to remove uploaded version', async () => {
|
||||
await contentServicesPage.uploadFile(docxFileModel.location);
|
||||
await uploadDialog.fileIsUploaded(docxFileModel.name);
|
||||
await contentServicesPage.checkContentIsDisplayed(docxFileModel.name);
|
||||
|
||||
contentServicesPage.versionManagerContent(docxFileModel.name);
|
||||
BrowserActions.click(versionManagePage.showNewVersionButton);
|
||||
versionManagePage.uploadNewVersionFile(
|
||||
await contentServicesPage.versionManagerContent(docxFileModel.name);
|
||||
await BrowserActions.click(versionManagePage.showNewVersionButton);
|
||||
await versionManagePage.uploadNewVersionFile(
|
||||
pngFileModel.location
|
||||
);
|
||||
versionManagePage.closeVersionDialog();
|
||||
uploadDialog.removeUploadedFile(pngFileModel.name);
|
||||
contentServicesPage.checkContentIsDisplayed(pngFileModel.name);
|
||||
await versionManagePage.closeVersionDialog();
|
||||
await uploadDialog.removeUploadedFile(pngFileModel.name);
|
||||
await contentServicesPage.checkContentIsDisplayed(pngFileModel.name);
|
||||
});
|
||||
});
|
||||
|
||||
@@ -36,9 +36,9 @@ describe('Upload component', () => {
|
||||
const loginPage = new LoginPage();
|
||||
const acsUser = new AcsUserModel();
|
||||
this.alfrescoJsApi = new AlfrescoApi({
|
||||
provider: 'ECM',
|
||||
hostEcm: browser.params.testConfig.adf_acs.host
|
||||
});
|
||||
provider: 'ECM',
|
||||
hostEcm: browser.params.testConfig.adf_acs.host
|
||||
});
|
||||
const uploadActions = new UploadActions(this.alfrescoJsApi);
|
||||
const navigationBarPage = new NavigationBarPage();
|
||||
|
||||
@@ -67,7 +67,7 @@ describe('Upload component', () => {
|
||||
'location': resources.Files.ADF_DOCUMENTS.TXT_0B.file_location
|
||||
});
|
||||
|
||||
beforeAll(async (done) => {
|
||||
beforeAll(async () => {
|
||||
|
||||
await this.alfrescoJsApi.login(browser.params.testConfig.adf.adminEmail, browser.params.testConfig.adf.adminPassword);
|
||||
|
||||
@@ -75,259 +75,255 @@ describe('Upload component', () => {
|
||||
|
||||
await this.alfrescoJsApi.login(acsUser.id, acsUser.password);
|
||||
|
||||
loginPage.loginToContentServicesUsingUserModel(acsUser);
|
||||
|
||||
contentServicesPage.goToDocumentList();
|
||||
await loginPage.loginToContentServicesUsingUserModel(acsUser);
|
||||
|
||||
const pdfUploadedFile = await uploadActions.uploadFile(firstPdfFileModel.location, firstPdfFileModel.name, '-my-');
|
||||
|
||||
Object.assign(firstPdfFileModel, pdfUploadedFile.entry);
|
||||
|
||||
done();
|
||||
});
|
||||
|
||||
afterAll(async (done) => {
|
||||
afterAll(async () => {
|
||||
await navigationBarPage.clickLogoutButton();
|
||||
done();
|
||||
});
|
||||
|
||||
beforeEach(() => {
|
||||
contentServicesPage.goToDocumentList();
|
||||
beforeEach(async () => {
|
||||
await contentServicesPage.goToDocumentList();
|
||||
});
|
||||
|
||||
describe('', () => {
|
||||
|
||||
beforeEach(() => {
|
||||
contentServicesPage.goToDocumentList();
|
||||
afterEach(async () => {
|
||||
const nodeList = await contentServicesPage.getElementsDisplayedId();
|
||||
for (const node of nodeList) {
|
||||
try {
|
||||
await uploadActions.deleteFileOrFolder(node);
|
||||
} catch (error) {
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
afterEach(async (done) => {
|
||||
it('[C272788] Should display upload button', async () => {
|
||||
await expect(await contentServicesPage.getSingleFileButtonTooltip()).toEqual('Custom tooltip');
|
||||
|
||||
contentServicesPage.getElementsDisplayedId().then((nodeList) => {
|
||||
nodeList.forEach(async (currentNode) => {
|
||||
await uploadActions.deleteFileOrFolder(currentNode);
|
||||
});
|
||||
});
|
||||
|
||||
done();
|
||||
await contentServicesPage.checkUploadButton();
|
||||
await contentServicesPage.checkContentIsDisplayed(firstPdfFileModel.name);
|
||||
});
|
||||
|
||||
it('[C272788] Should display upload button', () => {
|
||||
expect(contentServicesPage.getSingleFileButtonTooltip()).toEqual('Custom tooltip');
|
||||
it('[C272789] Should be able to upload PDF file', async () => {
|
||||
await contentServicesPage.uploadFile(pdfFileModel.location);
|
||||
await contentServicesPage.checkContentIsDisplayed(pdfFileModel.name);
|
||||
|
||||
contentServicesPage
|
||||
.checkUploadButton()
|
||||
.checkContentIsDisplayed(firstPdfFileModel.name);
|
||||
await uploadDialog.fileIsUploaded(pdfFileModel.name);
|
||||
|
||||
await uploadDialog.clickOnCloseButton();
|
||||
await uploadDialog.dialogIsNotDisplayed();
|
||||
});
|
||||
|
||||
it('[C272789] Should be able to upload PDF file', () => {
|
||||
contentServicesPage
|
||||
.uploadFile(pdfFileModel.location)
|
||||
.checkContentIsDisplayed(pdfFileModel.name);
|
||||
it('[C272790] Should be able to upload text file', async () => {
|
||||
await contentServicesPage.uploadFile(docxFileModel.location);
|
||||
await contentServicesPage.checkContentIsDisplayed(docxFileModel.name);
|
||||
|
||||
uploadDialog.fileIsUploaded(pdfFileModel.name);
|
||||
|
||||
uploadDialog.clickOnCloseButton().dialogIsNotDisplayed();
|
||||
await uploadDialog.fileIsUploaded(docxFileModel.name);
|
||||
await uploadDialog.clickOnCloseButton();
|
||||
await uploadDialog.dialogIsNotDisplayed();
|
||||
});
|
||||
|
||||
it('[C272790] Should be able to upload text file', () => {
|
||||
contentServicesPage
|
||||
.uploadFile(docxFileModel.location)
|
||||
.checkContentIsDisplayed(docxFileModel.name);
|
||||
it('[C260141] Should be possible to upload PNG file', async () => {
|
||||
await contentServicesPage.uploadFile(pngFileModel.location);
|
||||
await contentServicesPage.checkContentIsDisplayed(pngFileModel.name);
|
||||
|
||||
uploadDialog.fileIsUploaded(docxFileModel.name);
|
||||
uploadDialog.clickOnCloseButton().dialogIsNotDisplayed();
|
||||
await uploadDialog.fileIsUploaded(pngFileModel.name);
|
||||
await uploadDialog.clickOnCloseButton();
|
||||
await uploadDialog.dialogIsNotDisplayed();
|
||||
});
|
||||
|
||||
it('[C260141] Should be possible to upload PNG file', () => {
|
||||
contentServicesPage
|
||||
.uploadFile(pngFileModel.location)
|
||||
.checkContentIsDisplayed(pngFileModel.name);
|
||||
it('[C260143] Should be possible to maximize/minimize the upload dialog', async () => {
|
||||
await contentServicesPage.uploadFile(docxFileModel.location);
|
||||
await contentServicesPage.checkContentIsDisplayed(docxFileModel.name);
|
||||
|
||||
uploadDialog.fileIsUploaded(pngFileModel.name);
|
||||
uploadDialog.clickOnCloseButton().dialogIsNotDisplayed();
|
||||
await uploadDialog.fileIsUploaded(docxFileModel.name);
|
||||
await uploadDialog.checkCloseButtonIsDisplayed();
|
||||
await expect(await uploadDialog.numberOfCurrentFilesUploaded()).toEqual('1');
|
||||
await expect(await uploadDialog.numberOfInitialFilesUploaded()).toEqual('1');
|
||||
await uploadDialog.minimizeUploadDialog();
|
||||
await uploadDialog.dialogIsMinimized();
|
||||
await expect(await uploadDialog.numberOfCurrentFilesUploaded()).toEqual('1');
|
||||
await expect(await uploadDialog.numberOfInitialFilesUploaded()).toEqual('1');
|
||||
await uploadDialog.maximizeUploadDialog();
|
||||
await uploadDialog.dialogIsDisplayed();
|
||||
await uploadDialog.fileIsUploaded(docxFileModel.name);
|
||||
await expect(await uploadDialog.numberOfCurrentFilesUploaded()).toEqual('1');
|
||||
await expect(await uploadDialog.numberOfInitialFilesUploaded()).toEqual('1');
|
||||
await uploadDialog.checkCloseButtonIsDisplayed();
|
||||
await uploadDialog.clickOnCloseButton();
|
||||
await uploadDialog.dialogIsNotDisplayed();
|
||||
});
|
||||
|
||||
it('[C260143] Should be possible to maximize/minimize the upload dialog', () => {
|
||||
contentServicesPage
|
||||
.uploadFile(docxFileModel.location)
|
||||
.checkContentIsDisplayed(docxFileModel.name);
|
||||
|
||||
uploadDialog.fileIsUploaded(docxFileModel.name).checkCloseButtonIsDisplayed();
|
||||
expect(uploadDialog.numberOfCurrentFilesUploaded()).toEqual('1');
|
||||
expect(uploadDialog.numberOfInitialFilesUploaded()).toEqual('1');
|
||||
uploadDialog.minimizeUploadDialog().dialogIsMinimized();
|
||||
expect(uploadDialog.numberOfCurrentFilesUploaded()).toEqual('1');
|
||||
expect(uploadDialog.numberOfInitialFilesUploaded()).toEqual('1');
|
||||
uploadDialog.maximizeUploadDialog().dialogIsDisplayed().fileIsUploaded(docxFileModel.name);
|
||||
expect(uploadDialog.numberOfCurrentFilesUploaded()).toEqual('1');
|
||||
expect(uploadDialog.numberOfInitialFilesUploaded()).toEqual('1');
|
||||
uploadDialog.checkCloseButtonIsDisplayed().clickOnCloseButton().dialogIsNotDisplayed();
|
||||
it('[C272794] Should display tooltip for uploading files', async () => {
|
||||
await uploadToggles.enableMultipleFileUpload();
|
||||
await uploadToggles.checkMultipleFileUploadToggleIsEnabled();
|
||||
await expect(await contentServicesPage.getMultipleFileButtonTooltip()).toEqual('Custom tooltip');
|
||||
await uploadToggles.disableMultipleFileUpload();
|
||||
});
|
||||
|
||||
it('[C272794] Should display tooltip for uploading files', () => {
|
||||
uploadToggles.enableMultipleFileUpload();
|
||||
uploadToggles.checkMultipleFileUploadToggleIsEnabled();
|
||||
|
||||
browser.driver.sleep(1000);
|
||||
expect(contentServicesPage.getMultipleFileButtonTooltip()).toEqual('Custom tooltip');
|
||||
uploadToggles.disableMultipleFileUpload();
|
||||
});
|
||||
|
||||
it('[C279920] Should rename a file uploaded twice', () => {
|
||||
contentServicesPage
|
||||
.uploadFile(pdfFileModel.location)
|
||||
.checkContentIsDisplayed(pdfFileModel.name);
|
||||
it('[C279920] Should rename a file uploaded twice', async () => {
|
||||
await contentServicesPage.uploadFile(pdfFileModel.location);
|
||||
await contentServicesPage.checkContentIsDisplayed(pdfFileModel.name);
|
||||
|
||||
pdfFileModel.setVersion('1');
|
||||
|
||||
contentServicesPage
|
||||
.uploadFile(pdfFileModel.location)
|
||||
.checkContentIsDisplayed(pdfFileModel.getVersionName());
|
||||
await contentServicesPage.uploadFile(pdfFileModel.location);
|
||||
await contentServicesPage.checkContentIsDisplayed(pdfFileModel.getVersionName());
|
||||
|
||||
uploadDialog
|
||||
.clickOnCloseButton()
|
||||
.dialogIsNotDisplayed();
|
||||
await uploadDialog.clickOnCloseButton();
|
||||
await uploadDialog.dialogIsNotDisplayed();
|
||||
|
||||
pdfFileModel.setVersion('');
|
||||
});
|
||||
|
||||
it('[C260172] Should be possible to enable versioning', () => {
|
||||
uploadToggles.enableVersioning();
|
||||
uploadToggles.checkVersioningToggleIsEnabled();
|
||||
it('[C260172] Should be possible to enable versioning', async () => {
|
||||
await uploadToggles.enableVersioning();
|
||||
await uploadToggles.checkVersioningToggleIsEnabled();
|
||||
|
||||
contentServicesPage
|
||||
.uploadFile(pdfFileModel.location)
|
||||
.checkContentIsDisplayed(pdfFileModel.name);
|
||||
await contentServicesPage.uploadFile(pdfFileModel.location);
|
||||
await contentServicesPage.checkContentIsDisplayed(pdfFileModel.name);
|
||||
|
||||
pdfFileModel.setVersion('1');
|
||||
|
||||
contentServicesPage
|
||||
.uploadFile(pdfFileModel.location)
|
||||
.checkContentIsDisplayed(pdfFileModel.name);
|
||||
await contentServicesPage.uploadFile(pdfFileModel.location);
|
||||
await contentServicesPage.checkContentIsDisplayed(pdfFileModel.name);
|
||||
|
||||
uploadDialog
|
||||
.fileIsUploaded(pdfFileModel.name);
|
||||
await uploadDialog.fileIsUploaded(pdfFileModel.name);
|
||||
|
||||
uploadDialog
|
||||
.clickOnCloseButton()
|
||||
.dialogIsNotDisplayed();
|
||||
await uploadDialog.clickOnCloseButton();
|
||||
await uploadDialog.dialogIsNotDisplayed();
|
||||
|
||||
contentServicesPage
|
||||
.checkContentIsNotDisplayed(pdfFileModel.getVersionName());
|
||||
await contentServicesPage.checkContentIsNotDisplayed(pdfFileModel.getVersionName());
|
||||
|
||||
pdfFileModel.setVersion('');
|
||||
uploadToggles.disableVersioning();
|
||||
await uploadToggles.disableVersioning();
|
||||
});
|
||||
|
||||
it('[C260174] Should be possible to set a max size', () => {
|
||||
contentServicesPage.goToDocumentList();
|
||||
contentServicesPage.checkAcsContainer();
|
||||
uploadToggles.enableMaxSize();
|
||||
uploadToggles.checkMaxSizeToggleIsEnabled();
|
||||
uploadToggles.addMaxSize('400');
|
||||
contentServicesPage.uploadFile(fileWithSpecificSize.location);
|
||||
uploadDialog.fileIsUploaded(fileWithSpecificSize.name).clickOnCloseButton().dialogIsNotDisplayed();
|
||||
contentServicesPage.deleteContent(fileWithSpecificSize.name);
|
||||
contentServicesPage.checkContentIsNotDisplayed(fileWithSpecificSize.name);
|
||||
uploadToggles.addMaxSize('399');
|
||||
contentServicesPage.uploadFile(fileWithSpecificSize.location);
|
||||
it('[C260174] Should be possible to set a max size', async () => {
|
||||
await contentServicesPage.goToDocumentList();
|
||||
await contentServicesPage.checkAcsContainer();
|
||||
await uploadToggles.enableMaxSize();
|
||||
await uploadToggles.checkMaxSizeToggleIsEnabled();
|
||||
await uploadToggles.addMaxSize('400');
|
||||
await contentServicesPage.uploadFile(fileWithSpecificSize.location);
|
||||
await uploadDialog.fileIsUploaded(fileWithSpecificSize.name);
|
||||
await uploadDialog.clickOnCloseButton();
|
||||
await uploadDialog.dialogIsNotDisplayed();
|
||||
await contentServicesPage.deleteContent(fileWithSpecificSize.name);
|
||||
await contentServicesPage.checkContentIsNotDisplayed(fileWithSpecificSize.name);
|
||||
await uploadToggles.addMaxSize('399');
|
||||
await contentServicesPage.uploadFile(fileWithSpecificSize.location);
|
||||
|
||||
// expect(contentServicesPage.getErrorMessage()).toEqual('File ' + fileWithSpecificSize.name + ' is larger than the allowed file size');
|
||||
// await expect(await contentServicesPage.getErrorMessage()).toEqual('File ' + fileWithSpecificSize.name + ' is larger than the allowed file size');
|
||||
|
||||
contentServicesPage.checkContentIsNotDisplayed(fileWithSpecificSize.name);
|
||||
uploadDialog.fileIsNotDisplayedInDialog(fileWithSpecificSize.name);
|
||||
contentServicesPage.uploadFile(emptyFile.location).checkContentIsDisplayed(emptyFile.name);
|
||||
uploadDialog.fileIsUploaded(emptyFile.name).clickOnCloseButton().dialogIsNotDisplayed();
|
||||
await contentServicesPage.checkContentIsNotDisplayed(fileWithSpecificSize.name);
|
||||
await uploadDialog.fileIsNotDisplayedInDialog(fileWithSpecificSize.name);
|
||||
await contentServicesPage.uploadFile(emptyFile.location);
|
||||
await contentServicesPage.checkContentIsDisplayed(emptyFile.name);
|
||||
await uploadDialog.fileIsUploaded(emptyFile.name);
|
||||
await uploadDialog.clickOnCloseButton();
|
||||
await uploadDialog.dialogIsNotDisplayed();
|
||||
|
||||
uploadToggles.disableMaxSize();
|
||||
await uploadToggles.disableMaxSize();
|
||||
});
|
||||
|
||||
it('[C272796] Should be possible to set max size to 0', () => {
|
||||
contentServicesPage.goToDocumentList();
|
||||
uploadToggles.enableMaxSize();
|
||||
uploadToggles.checkMaxSizeToggleIsEnabled();
|
||||
uploadToggles.addMaxSize('0');
|
||||
contentServicesPage.uploadFile(fileWithSpecificSize.location);
|
||||
// expect(contentServicesPage.getErrorMessage()).toEqual('File ' + fileWithSpecificSize.name + ' is larger than the allowed file size');
|
||||
it('[C272796] Should be possible to set max size to 0', async () => {
|
||||
await contentServicesPage.goToDocumentList();
|
||||
await uploadToggles.enableMaxSize();
|
||||
await uploadToggles.checkMaxSizeToggleIsEnabled();
|
||||
await uploadToggles.addMaxSize('0');
|
||||
await contentServicesPage.uploadFile(fileWithSpecificSize.location);
|
||||
// await expect(await contentServicesPage.getErrorMessage()).toEqual('File ' + fileWithSpecificSize.name + ' is larger than the allowed file size');
|
||||
|
||||
uploadDialog.fileIsNotDisplayedInDialog(fileWithSpecificSize.name);
|
||||
contentServicesPage.uploadFile(emptyFile.location).checkContentIsDisplayed(emptyFile.name);
|
||||
uploadDialog.fileIsUploaded(emptyFile.name).clickOnCloseButton().dialogIsNotDisplayed();
|
||||
await uploadDialog.fileIsNotDisplayedInDialog(fileWithSpecificSize.name);
|
||||
await contentServicesPage.uploadFile(emptyFile.location);
|
||||
await contentServicesPage.checkContentIsDisplayed(emptyFile.name);
|
||||
await uploadDialog.fileIsUploaded(emptyFile.name);
|
||||
await uploadDialog.clickOnCloseButton();
|
||||
await uploadDialog.dialogIsNotDisplayed();
|
||||
|
||||
uploadToggles.disableMaxSize();
|
||||
await uploadToggles.disableMaxSize();
|
||||
});
|
||||
|
||||
it('[C272797] Should be possible to set max size to 1', () => {
|
||||
uploadToggles.enableMaxSize();
|
||||
uploadToggles.checkMaxSizeToggleIsEnabled();
|
||||
browser.driver.sleep(1000);
|
||||
uploadToggles.addMaxSize('1');
|
||||
uploadToggles.disableMaxSize();
|
||||
contentServicesPage.uploadFile(fileWithSpecificSize.location);
|
||||
uploadDialog.fileIsUploaded(fileWithSpecificSize.name).clickOnCloseButton().dialogIsNotDisplayed();
|
||||
contentServicesPage.checkContentIsDisplayed(fileWithSpecificSize.name);
|
||||
it('[C272797] Should be possible to set max size to 1', async () => {
|
||||
await uploadToggles.enableMaxSize();
|
||||
await uploadToggles.checkMaxSizeToggleIsEnabled();
|
||||
await browser.sleep(1000);
|
||||
await uploadToggles.addMaxSize('1');
|
||||
await uploadToggles.disableMaxSize();
|
||||
await contentServicesPage.uploadFile(fileWithSpecificSize.location);
|
||||
await uploadDialog.fileIsUploaded(fileWithSpecificSize.name);
|
||||
await uploadDialog.clickOnCloseButton();
|
||||
await uploadDialog.dialogIsNotDisplayed();
|
||||
await contentServicesPage.checkContentIsDisplayed(fileWithSpecificSize.name);
|
||||
});
|
||||
|
||||
it('[C91318] Should Enable/Disable upload button when change the disable property', () => {
|
||||
uploadToggles.clickCheckboxDisableUpload();
|
||||
expect(contentServicesPage.uploadButtonIsEnabled()).toBeFalsy();
|
||||
it('[C91318] Should Enable/Disable upload button when change the disable property', async () => {
|
||||
await uploadToggles.clickCheckboxDisableUpload();
|
||||
await expect(await contentServicesPage.uploadButtonIsEnabled()).toBe(false, 'Upload button is enabled');
|
||||
|
||||
uploadToggles.clickCheckboxDisableUpload();
|
||||
expect(contentServicesPage.uploadButtonIsEnabled()).toBeTruthy();
|
||||
await uploadToggles.clickCheckboxDisableUpload();
|
||||
await expect(await contentServicesPage.uploadButtonIsEnabled()).toBe(true, 'Upload button not enabled');
|
||||
});
|
||||
});
|
||||
|
||||
it('[C260171] Should upload only the extension filter allowed when Enable extension filter is enabled', () => {
|
||||
uploadToggles.enableExtensionFilter();
|
||||
browser.driver.sleep(1000);
|
||||
uploadToggles.addExtension('.docx');
|
||||
contentServicesPage.uploadFile(docxFileModel.location).checkContentIsDisplayed(docxFileModel.name);
|
||||
uploadDialog.removeUploadedFile(docxFileModel.name).fileIsCancelled(docxFileModel.name);
|
||||
uploadDialog.clickOnCloseButton().dialogIsNotDisplayed();
|
||||
contentServicesPage.uploadFile(pngFileModel.location).checkContentIsNotDisplayed(pngFileModel.name);
|
||||
uploadDialog.dialogIsNotDisplayed();
|
||||
uploadToggles.disableExtensionFilter();
|
||||
it('[C260171] Should upload only the extension filter allowed when Enable extension filter is enabled', async () => {
|
||||
await uploadToggles.enableExtensionFilter();
|
||||
await browser.sleep(1000);
|
||||
await uploadToggles.addExtension('.docx');
|
||||
await contentServicesPage.uploadFile(docxFileModel.location);
|
||||
await contentServicesPage.checkContentIsDisplayed(docxFileModel.name);
|
||||
await uploadDialog.removeUploadedFile(docxFileModel.name);
|
||||
await uploadDialog.fileIsCancelled(docxFileModel.name);
|
||||
await uploadDialog.clickOnCloseButton();
|
||||
await uploadDialog.dialogIsNotDisplayed();
|
||||
await contentServicesPage.uploadFile(pngFileModel.location);
|
||||
await contentServicesPage.checkContentIsNotDisplayed(pngFileModel.name);
|
||||
await uploadDialog.dialogIsNotDisplayed();
|
||||
await uploadToggles.disableExtensionFilter();
|
||||
});
|
||||
|
||||
it('[C274687] Should upload with drag and drop only the extension filter allowed when Enable extension filter is enabled', () => {
|
||||
uploadToggles.enableExtensionFilter();
|
||||
browser.driver.sleep(1000);
|
||||
uploadToggles.addExtension('.docx');
|
||||
it('[C274687] Should upload with drag and drop only the extension filter allowed when Enable extension filter is enabled', async () => {
|
||||
await uploadToggles.enableExtensionFilter();
|
||||
await browser.sleep(1000);
|
||||
await uploadToggles.addExtension('.docx');
|
||||
|
||||
const dragAndDrop = new DropActions();
|
||||
const dragAndDropArea = element.all(by.css('adf-upload-drag-area div')).first();
|
||||
|
||||
dragAndDrop.dropFile(dragAndDropArea, docxFileModel.location);
|
||||
contentServicesPage.checkContentIsDisplayed(docxFileModel.name);
|
||||
await dragAndDrop.dropFile(dragAndDropArea, docxFileModel.location);
|
||||
await contentServicesPage.checkContentIsDisplayed(docxFileModel.name);
|
||||
|
||||
uploadDialog.removeUploadedFile(docxFileModel.name).fileIsCancelled(docxFileModel.name);
|
||||
uploadDialog.clickOnCloseButton().dialogIsNotDisplayed();
|
||||
await uploadDialog.removeUploadedFile(docxFileModel.name);
|
||||
await uploadDialog.fileIsCancelled(docxFileModel.name);
|
||||
await uploadDialog.clickOnCloseButton();
|
||||
await uploadDialog.dialogIsNotDisplayed();
|
||||
|
||||
dragAndDrop.dropFile(dragAndDropArea, pngFileModel.location);
|
||||
contentServicesPage.checkContentIsNotDisplayed(pngFileModel.name);
|
||||
uploadDialog.dialogIsNotDisplayed();
|
||||
uploadToggles.disableExtensionFilter();
|
||||
await dragAndDrop.dropFile(dragAndDropArea, pngFileModel.location);
|
||||
await contentServicesPage.checkContentIsNotDisplayed(pngFileModel.name);
|
||||
await uploadDialog.dialogIsNotDisplayed();
|
||||
await uploadToggles.disableExtensionFilter();
|
||||
});
|
||||
|
||||
it('[C291921] Should display tooltip for uploading files on a not found location', async () => {
|
||||
const folderName = StringUtil.generateRandomString(8);
|
||||
|
||||
const folderUploadedModel = await browser.controlFlow().execute(async () => {
|
||||
return await uploadActions.createFolder(folderName, '-my-');
|
||||
});
|
||||
const folderUploadedModel = await uploadActions.createFolder(folderName, '-my-');
|
||||
await navigationBarPage.openContentServicesFolder(folderUploadedModel.entry.id);
|
||||
await contentServicesPage.checkUploadButton();
|
||||
|
||||
navigationBarPage.openContentServicesFolder(folderUploadedModel.entry.id);
|
||||
contentServicesPage.checkUploadButton();
|
||||
await uploadActions.deleteFileOrFolder(folderUploadedModel.entry.id);
|
||||
|
||||
browser.controlFlow().execute(async () => {
|
||||
await uploadActions.deleteFileOrFolder(folderUploadedModel.entry.id);
|
||||
});
|
||||
await contentServicesPage.uploadFile(pdfFileModel.location);
|
||||
|
||||
contentServicesPage.uploadFile(pdfFileModel.location);
|
||||
|
||||
uploadDialog.displayTooltip();
|
||||
expect(uploadDialog.getTooltip()).toEqual('Upload location no longer exists [404]');
|
||||
await uploadDialog.displayTooltip();
|
||||
await expect(await uploadDialog.getTooltip()).toEqual('Upload location no longer exists [404]');
|
||||
});
|
||||
|
||||
});
|
||||
|
||||
@@ -56,14 +56,14 @@ describe('Upload - User permission', () => {
|
||||
'location': resources.Files.ADF_DOCUMENTS.PDF.file_location
|
||||
});
|
||||
|
||||
beforeAll(() => {
|
||||
beforeAll(async () => {
|
||||
this.alfrescoJsApi = new AlfrescoApi({
|
||||
provider: 'ECM',
|
||||
hostEcm: browser.params.testConfig.adf_acs.host
|
||||
});
|
||||
});
|
||||
|
||||
beforeEach(async (done) => {
|
||||
beforeEach(async () => {
|
||||
acsUser = new AcsUserModel();
|
||||
acsUserTwo = new AcsUserModel();
|
||||
|
||||
@@ -95,106 +95,99 @@ describe('Upload - User permission', () => {
|
||||
role: CONSTANTS.CS_USER_ROLES.MANAGER
|
||||
});
|
||||
|
||||
done();
|
||||
});
|
||||
|
||||
afterAll(async (done) => {
|
||||
await navigationBarPage.clickLogoutButton();
|
||||
done();
|
||||
});
|
||||
|
||||
describe('Consumer permissions', () => {
|
||||
|
||||
beforeEach(async (done) => {
|
||||
contentServicesPage.goToDocumentList();
|
||||
beforeEach(async () => {
|
||||
await contentServicesPage.goToDocumentList();
|
||||
|
||||
done();
|
||||
});
|
||||
|
||||
it('[C291921] Should display tooltip for uploading files without permissions', () => {
|
||||
navigationBarPage.openContentServicesFolder(this.consumerSite.entry.guid);
|
||||
it('[C291921] Should display tooltip for uploading files without permissions', async () => {
|
||||
await navigationBarPage.openContentServicesFolder(this.consumerSite.entry.guid);
|
||||
|
||||
contentServicesPage.checkDragAndDropDIsDisplayed();
|
||||
await contentServicesPage.checkDragAndDropDIsDisplayed();
|
||||
|
||||
contentServicesPage.dragAndDropFile(emptyFile.location);
|
||||
await contentServicesPage.dragAndDropFile(emptyFile.location);
|
||||
|
||||
uploadDialog.fileIsError(emptyFile.name);
|
||||
await uploadDialog.fileIsError(emptyFile.name);
|
||||
|
||||
uploadDialog.displayTooltip();
|
||||
await uploadDialog.displayTooltip();
|
||||
|
||||
expect(uploadDialog.getTooltip()).toEqual('Insufficient permissions to upload in this location [403]');
|
||||
await expect(await uploadDialog.getTooltip()).toEqual('Insufficient permissions to upload in this location [403]');
|
||||
});
|
||||
|
||||
it('[C279915] Should not be allowed to upload a file in folder with consumer permissions', () => {
|
||||
contentServicesPage.uploadFile(emptyFile.location).checkContentIsDisplayed(emptyFile.name);
|
||||
it('[C279915] Should not be allowed to upload a file in folder with consumer permissions', async () => {
|
||||
await contentServicesPage.uploadFile(emptyFile.location);
|
||||
await contentServicesPage.checkContentIsDisplayed(emptyFile.name);
|
||||
|
||||
uploadDialog.fileIsUploaded(emptyFile.name);
|
||||
await uploadDialog.fileIsUploaded(emptyFile.name);
|
||||
|
||||
uploadDialog.clickOnCloseButton().dialogIsNotDisplayed();
|
||||
await uploadDialog.clickOnCloseButton();
|
||||
await uploadDialog.dialogIsNotDisplayed();
|
||||
|
||||
navigationBarPage.openContentServicesFolder(this.consumerSite.entry.guid);
|
||||
await navigationBarPage.openContentServicesFolder(this.consumerSite.entry.guid);
|
||||
|
||||
browser.sleep(3000);
|
||||
await browser.sleep(3000);
|
||||
|
||||
contentServicesPage.uploadFile(emptyFile.location);
|
||||
await contentServicesPage.uploadFile(emptyFile.location);
|
||||
|
||||
notificationHistoryPage.checkNotifyContains('You don\'t have the create permission to upload the content');
|
||||
await notificationHistoryPage.checkNotifyContains('You don\'t have the create permission to upload the content');
|
||||
});
|
||||
|
||||
});
|
||||
|
||||
describe('full permissions', () => {
|
||||
|
||||
beforeEach(async (done) => {
|
||||
navigationBarPage.openContentServicesFolder(this.managerSite.entry.guid);
|
||||
beforeEach(async () => {
|
||||
await navigationBarPage.openContentServicesFolder(this.managerSite.entry.guid);
|
||||
|
||||
contentServicesPage.goToDocumentList();
|
||||
await contentServicesPage.goToDocumentList();
|
||||
|
||||
done();
|
||||
});
|
||||
|
||||
it('[C279917] Should be allowed to upload a file in a folder with manager permissions', () => {
|
||||
contentServicesPage.uploadFile(emptyFile.location);
|
||||
it('[C279917] Should be allowed to upload a file in a folder with manager permissions', async () => {
|
||||
await contentServicesPage.uploadFile(emptyFile.location);
|
||||
|
||||
uploadDialog.fileIsUploaded(emptyFile.name);
|
||||
await uploadDialog.fileIsUploaded(emptyFile.name);
|
||||
});
|
||||
|
||||
});
|
||||
|
||||
describe('multiple users', () => {
|
||||
|
||||
beforeEach(async (done) => {
|
||||
contentServicesPage.goToDocumentList();
|
||||
beforeEach(async () => {
|
||||
await contentServicesPage.goToDocumentList();
|
||||
|
||||
done();
|
||||
});
|
||||
|
||||
it('[C260175] Should two different user upload files in the proper User Home', async () => {
|
||||
contentServicesPage.uploadFile(emptyFile.location);
|
||||
await contentServicesPage.uploadFile(emptyFile.location);
|
||||
|
||||
uploadDialog.fileIsUploaded(emptyFile.name);
|
||||
await uploadDialog.fileIsUploaded(emptyFile.name);
|
||||
|
||||
contentServicesPage.checkContentIsDisplayed(emptyFile.name);
|
||||
await contentServicesPage.checkContentIsDisplayed(emptyFile.name);
|
||||
|
||||
navigationBarPage.clickLoginButton();
|
||||
await navigationBarPage.clickLoginButton();
|
||||
await loginPage.loginToContentServicesUsingUserModel(acsUserTwo);
|
||||
contentServicesPage.goToDocumentList();
|
||||
await contentServicesPage.goToDocumentList();
|
||||
|
||||
contentServicesPage.checkContentIsNotDisplayed(emptyFile.name);
|
||||
await contentServicesPage.checkContentIsNotDisplayed(emptyFile.name);
|
||||
|
||||
contentServicesPage.uploadFile(pngFile.location);
|
||||
await contentServicesPage.uploadFile(pngFile.location);
|
||||
|
||||
contentServicesPage.checkContentIsDisplayed(pngFile.name);
|
||||
await contentServicesPage.checkContentIsDisplayed(pngFile.name);
|
||||
|
||||
navigationBarPage.clickLoginButton();
|
||||
await navigationBarPage.clickLoginButton();
|
||||
await loginPage.loginToContentServicesUsingUserModel(acsUser);
|
||||
contentServicesPage.goToDocumentList();
|
||||
await contentServicesPage.goToDocumentList();
|
||||
|
||||
contentServicesPage.checkContentIsNotDisplayed(pngFile.name);
|
||||
await contentServicesPage.checkContentIsNotDisplayed(pngFile.name);
|
||||
|
||||
contentServicesPage.uploadFile(pdfFile.location);
|
||||
await contentServicesPage.uploadFile(pdfFile.location);
|
||||
|
||||
contentServicesPage.checkContentIsDisplayed(pdfFile.name);
|
||||
await contentServicesPage.checkContentIsDisplayed(pdfFile.name);
|
||||
});
|
||||
});
|
||||
|
||||
|
||||
@@ -28,10 +28,8 @@ import resources = require('../../util/resources');
|
||||
|
||||
import { AlfrescoApiCompatibility as AlfrescoApi } from '@alfresco/js-api';
|
||||
import { UploadActions } from '@alfresco/adf-testing';
|
||||
import { Util } from '../../util/util';
|
||||
import path = require('path');
|
||||
import { NavigationBarPage } from '../../pages/adf/navigationBarPage';
|
||||
import { BrowserVisibility } from '@alfresco/adf-testing';
|
||||
import { BrowserVisibility, FileBrowserUtil, BrowserActions } from '@alfresco/adf-testing';
|
||||
import { UploadDialog } from '../../pages/adf/dialog/uploadDialog';
|
||||
|
||||
describe('Version component actions', () => {
|
||||
@@ -40,6 +38,7 @@ describe('Version component actions', () => {
|
||||
const contentServicesPage = new ContentServicesPage();
|
||||
const versionManagePage = new VersionManagePage();
|
||||
const navigationBarPage = new NavigationBarPage();
|
||||
const uploadDialog = new UploadDialog();
|
||||
|
||||
const acsUser = new AcsUserModel();
|
||||
|
||||
@@ -49,8 +48,8 @@ describe('Version component actions', () => {
|
||||
});
|
||||
|
||||
const fileModelVersionTwo = new FileModel({
|
||||
'name': resources.Files.ADF_DOCUMENTS.PNG.file_name,
|
||||
'location': resources.Files.ADF_DOCUMENTS.PNG.file_location
|
||||
'name': resources.Files.ADF_DOCUMENTS.TXT.file_name,
|
||||
'location': resources.Files.ADF_DOCUMENTS.TXT.file_location
|
||||
});
|
||||
let uploadActions;
|
||||
|
||||
@@ -59,122 +58,119 @@ describe('Version component actions', () => {
|
||||
'location': resources.Files.ADF_DOCUMENTS.LARGE_FILE.file_location
|
||||
});
|
||||
|
||||
beforeAll(async (done) => {
|
||||
beforeAll(async () => {
|
||||
this.alfrescoJsApi = new AlfrescoApi({
|
||||
provider: 'ECM',
|
||||
hostEcm: browser.params.testConfig.adf_acs.host
|
||||
});
|
||||
uploadActions = new UploadActions(this.alfrescoJsApi);
|
||||
|
||||
await this.alfrescoJsApi.login(browser.params.testConfig.adf.adminEmail, browser.params.testConfig.adf.adminPassword);
|
||||
|
||||
await this.alfrescoJsApi.core.peopleApi.addPerson(acsUser);
|
||||
|
||||
await this.alfrescoJsApi.login(acsUser.id, acsUser.password);
|
||||
|
||||
const txtUploadedFile = await uploadActions.uploadFile(txtFileModel.location, txtFileModel.name, '-my-');
|
||||
|
||||
Object.assign(txtFileModel, txtUploadedFile.entry);
|
||||
|
||||
txtFileModel.update(txtUploadedFile.entry);
|
||||
|
||||
await loginPage.loginToContentServicesUsingUserModel(acsUser);
|
||||
await navigationBarPage.clickContentServicesButton();
|
||||
await contentServicesPage.waitForTableBody();
|
||||
|
||||
navigationBarPage.clickContentServicesButton();
|
||||
contentServicesPage.waitForTableBody();
|
||||
contentServicesPage.versionManagerContent(txtFileModel.name);
|
||||
|
||||
done();
|
||||
});
|
||||
|
||||
afterAll(async () => {
|
||||
await navigationBarPage.clickLogoutButton();
|
||||
beforeEach(async () => {
|
||||
await contentServicesPage.versionManagerContent(txtFileModel.name);
|
||||
});
|
||||
|
||||
it('[C280003] Should not be possible delete a file version if there is only one version', () => {
|
||||
versionManagePage.clickActionButton('1.0');
|
||||
expect(element(by.css(`[id="adf-version-list-action-delete-1.0"]`)).isEnabled()).toBe(false);
|
||||
versionManagePage.closeActionsMenu();
|
||||
BrowserVisibility.waitUntilElementIsNotOnPage(element(by.css(`[id="adf-version-list-action-delete-1.0"]`)));
|
||||
afterEach(async () => {
|
||||
await BrowserActions.closeMenuAndDialogs();
|
||||
});
|
||||
|
||||
it('[C280004] Should not be possible restore the version if there is only one version', () => {
|
||||
versionManagePage.clickActionButton('1.0');
|
||||
expect(element(by.css(`[id="adf-version-list-action-restore-1.0"]`)).isEnabled()).toBe(false);
|
||||
versionManagePage.closeActionsMenu();
|
||||
BrowserVisibility.waitUntilElementIsNotOnPage(element(by.css(`[id="adf-version-list-action-restore-1.0"]`)));
|
||||
it('[C280003] Should not be possible delete a file version if there is only one version', async () => {
|
||||
await versionManagePage.clickActionButton('1.0');
|
||||
await expect(await element(by.css(`[id="adf-version-list-action-delete-1.0"]`)).isEnabled()).toBe(false);
|
||||
await versionManagePage.closeActionsMenu();
|
||||
await BrowserVisibility.waitUntilElementIsNotVisible(element(by.css(`[id="adf-version-list-action-delete-1.0"]`)));
|
||||
});
|
||||
|
||||
it('[C280005] Should be showed all the default action when you have more then one version', () => {
|
||||
versionManagePage.showNewVersionButton.click();
|
||||
|
||||
versionManagePage.uploadNewVersionFile(fileModelVersionTwo.location);
|
||||
|
||||
versionManagePage.clickActionButton('1.1').checkActionsArePresent('1.1');
|
||||
|
||||
versionManagePage.closeActionsMenu();
|
||||
it('[C280004] Should not be possible restore the version if there is only one version', async () => {
|
||||
await versionManagePage.clickActionButton('1.0');
|
||||
await expect(await element(by.css(`[id="adf-version-list-action-restore-1.0"]`)).isEnabled()).toBe(false);
|
||||
await versionManagePage.closeActionsMenu();
|
||||
await BrowserVisibility.waitUntilElementIsNotVisible(element(by.css(`[id="adf-version-list-action-restore-1.0"]`)));
|
||||
});
|
||||
|
||||
it('[C269081] Should be possible download all the version of a file', () => {
|
||||
versionManagePage.downloadFileVersion('1.0');
|
||||
it('[C280005] Should be showed all the default action when you have more then one version', async () => {
|
||||
await BrowserActions.click(versionManagePage.showNewVersionButton);
|
||||
|
||||
expect(Util.fileExists(path.join(__dirname, 'downloads', txtFileModel.name), 20)).toBe(true);
|
||||
await versionManagePage.uploadNewVersionFile(fileModelVersionTwo.location);
|
||||
|
||||
versionManagePage.downloadFileVersion('1.1');
|
||||
await versionManagePage.clickActionButton('1.1');
|
||||
await versionManagePage.checkActionsArePresent('1.1');
|
||||
|
||||
expect(Util.fileExists(path.join(__dirname, 'downloads', fileModelVersionTwo.name), 20)).toBe(true);
|
||||
await versionManagePage.closeActionsMenu();
|
||||
|
||||
await versionManagePage.closeVersionDialog();
|
||||
|
||||
await uploadDialog.clickOnCloseButton();
|
||||
});
|
||||
|
||||
it('[C272819] Should be possible delete a version when click on delete version action', () => {
|
||||
versionManagePage.deleteFileVersion('1.1');
|
||||
|
||||
versionManagePage.clickAcceptConfirm();
|
||||
|
||||
versionManagePage.checkFileVersionNotExist('1.1');
|
||||
versionManagePage.checkFileVersionExist('1.0');
|
||||
it('[C269081] Should be possible download all the version of a file', async () => {
|
||||
await versionManagePage.downloadFileVersion('1.0');
|
||||
await expect(await FileBrowserUtil.isFileDownloaded(txtFileModel.name)).toBe(true, `${txtFileModel.name} not downloaded`);
|
||||
await versionManagePage.downloadFileVersion('1.1');
|
||||
await expect(await FileBrowserUtil.isFileDownloaded(fileModelVersionTwo.name)).toBe(true, `${fileModelVersionTwo.name} not downloaded`);
|
||||
});
|
||||
|
||||
it('[C280006] Should be possible prevent a version to be deleted when click on No on the confirm dialog', () => {
|
||||
versionManagePage.showNewVersionButton.click();
|
||||
it('[C272819] Should be possible delete a version when click on delete version action', async () => {
|
||||
await versionManagePage.deleteFileVersion('1.1');
|
||||
|
||||
versionManagePage.uploadNewVersionFile(fileModelVersionTwo.location);
|
||||
await versionManagePage.clickAcceptConfirm();
|
||||
|
||||
versionManagePage.checkFileVersionExist('1.1');
|
||||
await versionManagePage.checkFileVersionNotExist('1.1');
|
||||
await versionManagePage.checkFileVersionExist('1.0');
|
||||
});
|
||||
|
||||
versionManagePage.deleteFileVersion('1.1');
|
||||
it('[C280006] Should be possible prevent a version to be deleted when click on No on the confirm dialog', async () => {
|
||||
await BrowserActions.click(versionManagePage.showNewVersionButton);
|
||||
|
||||
versionManagePage.clickCancelConfirm();
|
||||
await versionManagePage.uploadNewVersionFile(fileModelVersionTwo.location);
|
||||
|
||||
versionManagePage.checkFileVersionExist('1.1');
|
||||
versionManagePage.checkFileVersionExist('1.0');
|
||||
versionManagePage.closeVersionDialog();
|
||||
await versionManagePage.checkFileVersionExist('1.1');
|
||||
|
||||
await versionManagePage.deleteFileVersion('1.1');
|
||||
|
||||
await versionManagePage.clickCancelConfirm();
|
||||
|
||||
await versionManagePage.checkFileVersionExist('1.1');
|
||||
await versionManagePage.checkFileVersionExist('1.0');
|
||||
await versionManagePage.closeVersionDialog();
|
||||
});
|
||||
|
||||
it('[C280007] Should be possible to restore an old version of your file and the document list updated', async () => {
|
||||
contentServicesPage.versionManagerContent(fileModelVersionTwo.name);
|
||||
versionManagePage.restoreFileVersion('1.0');
|
||||
versionManagePage.checkFileVersionExist('2.0');
|
||||
versionManagePage.closeVersionDialog();
|
||||
contentServicesPage.waitForTableBody();
|
||||
contentServicesPage.checkContentIsDisplayed(txtFileModel.name);
|
||||
await contentServicesPage.versionManagerContent(fileModelVersionTwo.name);
|
||||
await versionManagePage.restoreFileVersion('1.0');
|
||||
await versionManagePage.checkFileVersionExist('2.0');
|
||||
await versionManagePage.closeVersionDialog();
|
||||
await contentServicesPage.waitForTableBody();
|
||||
await contentServicesPage.checkContentIsDisplayed(txtFileModel.name);
|
||||
});
|
||||
|
||||
it('[C307033] Should be possible to cancel the upload of a new version', async () => {
|
||||
await browser.refresh();
|
||||
contentServicesPage.versionManagerContent(txtFileModel.name);
|
||||
browser.executeScript(' setTimeout(() => {document.querySelector(\'mat-icon[class*="adf-file-uploading-row__action"]\').click();}, 1000)');
|
||||
await contentServicesPage.versionManagerContent(txtFileModel.name);
|
||||
await browser.executeScript(' setTimeout(() => {document.querySelector(\'mat-icon[class*="adf-file-uploading-row__action"]\').click();}, 1000)');
|
||||
|
||||
versionManagePage.showNewVersionButton.click();
|
||||
versionManagePage.uploadNewVersionFile(bigFileToCancel.location);
|
||||
versionManagePage.closeVersionDialog();
|
||||
await BrowserActions.click(versionManagePage.showNewVersionButton);
|
||||
|
||||
await expect(new UploadDialog().getTitleText()).toEqual('Upload canceled');
|
||||
await versionManagePage.uploadNewVersionFile(bigFileToCancel.location);
|
||||
await versionManagePage.closeVersionDialog();
|
||||
|
||||
await expect(await uploadDialog.getTitleText()).toEqual('Upload canceled');
|
||||
|
||||
await browser.refresh();
|
||||
|
||||
navigationBarPage.clickContentServicesButton();
|
||||
await navigationBarPage.clickContentServicesButton();
|
||||
await contentServicesPage.waitForTableBody();
|
||||
contentServicesPage.checkContentIsDisplayed(txtFileModel.name);
|
||||
await contentServicesPage.checkContentIsDisplayed(txtFileModel.name);
|
||||
});
|
||||
|
||||
});
|
||||
|
||||
@@ -69,7 +69,7 @@ describe('Version component permissions', () => {
|
||||
const uploadActions = new UploadActions(this.alfrescoJsApi);
|
||||
const nodeActions = new NodeActions();
|
||||
|
||||
beforeAll(async (done) => {
|
||||
beforeAll(async () => {
|
||||
|
||||
await this.alfrescoJsApi.login(browser.params.testConfig.adf.adminEmail, browser.params.testConfig.adf.adminPassword);
|
||||
await this.alfrescoJsApi.core.peopleApi.addPerson(acsUser);
|
||||
@@ -117,8 +117,6 @@ describe('Version component permissions', () => {
|
||||
await this.alfrescoJsApi.login(fileCreatorUser.id, fileCreatorUser.password);
|
||||
|
||||
await uploadActions.uploadFile(differentCreatorFile.location, differentCreatorFile.name, site.entry.guid);
|
||||
|
||||
done();
|
||||
});
|
||||
|
||||
describe('Manager', () => {
|
||||
@@ -128,7 +126,7 @@ describe('Version component permissions', () => {
|
||||
'location': resources.Files.ADF_DOCUMENTS.PNG.file_location
|
||||
});
|
||||
|
||||
beforeAll(async (done) => {
|
||||
beforeAll(async () => {
|
||||
await this.alfrescoJsApi.login(managerUser.id, managerUser.password);
|
||||
|
||||
const sameCreatorFileUploaded = await uploadActions.uploadFile(sameCreatorFile.location, sameCreatorFile.name, site.entry.guid);
|
||||
@@ -136,70 +134,63 @@ describe('Version component permissions', () => {
|
||||
|
||||
await loginPage.loginToContentServicesUsingUserModel(managerUser);
|
||||
|
||||
navigationBarPage.openContentServicesFolder(site.entry.guid);
|
||||
|
||||
done();
|
||||
await navigationBarPage.openContentServicesFolder(site.entry.guid);
|
||||
});
|
||||
|
||||
afterAll(async (done) => {
|
||||
await navigationBarPage.clickLogoutButton();
|
||||
|
||||
afterAll(async () => {
|
||||
await this.alfrescoJsApi.nodes.deleteNode(sameCreatorFile.id);
|
||||
done();
|
||||
await navigationBarPage.clickLogoutButton();
|
||||
});
|
||||
|
||||
it('[C277200] should a user with Manager permission be able to upload a new version for a file with different creator', () => {
|
||||
contentServices.versionManagerContent(differentCreatorFile.name);
|
||||
it('[C277200] should a user with Manager permission be able to upload a new version for a file with different creator', async () => {
|
||||
await contentServices.versionManagerContent(differentCreatorFile.name);
|
||||
|
||||
BrowserActions.click(versionManagePage.showNewVersionButton);
|
||||
await BrowserActions.click(versionManagePage.showNewVersionButton);
|
||||
|
||||
versionManagePage.uploadNewVersionFile(newVersionFile.location);
|
||||
await versionManagePage.uploadNewVersionFile(newVersionFile.location);
|
||||
|
||||
versionManagePage.checkFileVersionExist('1.1');
|
||||
expect(versionManagePage.getFileVersionName('1.1')).toEqual(newVersionFile.name);
|
||||
expect(versionManagePage.getFileVersionDate('1.1')).not.toBeUndefined();
|
||||
await versionManagePage.checkFileVersionExist('1.1');
|
||||
await expect(await versionManagePage.getFileVersionName('1.1')).toEqual(newVersionFile.name);
|
||||
await expect(await versionManagePage.getFileVersionDate('1.1')).not.toBeUndefined();
|
||||
|
||||
versionManagePage.deleteFileVersion('1.1');
|
||||
versionManagePage.clickAcceptConfirm();
|
||||
await versionManagePage.deleteFileVersion('1.1');
|
||||
await versionManagePage.clickAcceptConfirm();
|
||||
|
||||
versionManagePage.checkFileVersionNotExist('1.1');
|
||||
await versionManagePage.checkFileVersionNotExist('1.1');
|
||||
|
||||
versionManagePage.closeVersionDialog();
|
||||
await versionManagePage.closeVersionDialog();
|
||||
|
||||
uploadDialog.clickOnCloseButton();
|
||||
await uploadDialog.clickOnCloseButton();
|
||||
});
|
||||
|
||||
it('[C277204] Should be disabled the option for locked file', () => {
|
||||
contentServices.getDocumentList().rightClickOnRow(lockFileModel.name);
|
||||
const actionVersion = contentServices.checkContextActionIsVisible('Manage versions');
|
||||
expect(actionVersion.isEnabled()).toBeFalsy();
|
||||
it('[C277204] Should be disabled the option for locked file', async () => {
|
||||
await contentServices.getDocumentList().rightClickOnRow(lockFileModel.name);
|
||||
await expect(await contentServices.isContextActionEnabled('Manage versions')).toBe(false, 'Manage versions is enabled');
|
||||
});
|
||||
});
|
||||
|
||||
describe('Consumer', () => {
|
||||
|
||||
beforeAll(async (done) => {
|
||||
beforeAll(async () => {
|
||||
await loginPage.loginToContentServicesUsingUserModel(consumerUser);
|
||||
|
||||
navigationBarPage.openContentServicesFolder(site.entry.guid);
|
||||
await navigationBarPage.openContentServicesFolder(site.entry.guid);
|
||||
|
||||
done();
|
||||
});
|
||||
|
||||
afterAll(async () => {
|
||||
await navigationBarPage.clickLogoutButton();
|
||||
});
|
||||
|
||||
it('[C277197] Should a user with Consumer permission not be able to upload a new version for a file with different creator', () => {
|
||||
contentServices.versionManagerContent(differentCreatorFile.name);
|
||||
it('[C277197] Should a user with Consumer permission not be able to upload a new version for a file with different creator', async () => {
|
||||
await contentServices.versionManagerContent(differentCreatorFile.name);
|
||||
|
||||
notificationHistoryPage.checkNotifyContains(`You don't have access to do this`);
|
||||
await notificationHistoryPage.checkNotifyContains(`You don't have access to do this`);
|
||||
});
|
||||
|
||||
it('[C277201] Should a user with Consumer permission not be able to upload a new version for a locked file', () => {
|
||||
contentServices.getDocumentList().rightClickOnRow(lockFileModel.name);
|
||||
const actionVersion = contentServices.checkContextActionIsVisible('Manage versions');
|
||||
expect(actionVersion.isEnabled()).toBeFalsy();
|
||||
it('[C277201] Should a user with Consumer permission not be able to upload a new version for a locked file', async () => {
|
||||
await contentServices.getDocumentList().rightClickOnRow(lockFileModel.name);
|
||||
await expect(await contentServices.isContextActionEnabled('Manage versions')).toBe(false, 'Manage version is enabled');
|
||||
});
|
||||
|
||||
});
|
||||
@@ -210,7 +201,7 @@ describe('Version component permissions', () => {
|
||||
'location': resources.Files.ADF_DOCUMENTS.PNG.file_location
|
||||
});
|
||||
|
||||
beforeAll(async (done) => {
|
||||
beforeAll(async () => {
|
||||
await this.alfrescoJsApi.login(contributorUser.id, contributorUser.password);
|
||||
|
||||
const sameCreatorFileUploaded = await uploadActions.uploadFile(sameCreatorFile.location, sameCreatorFile.name, site.entry.guid);
|
||||
@@ -218,49 +209,45 @@ describe('Version component permissions', () => {
|
||||
|
||||
await loginPage.loginToContentServicesUsingUserModel(contributorUser);
|
||||
|
||||
navigationBarPage.openContentServicesFolder(site.entry.guid);
|
||||
await navigationBarPage.openContentServicesFolder(site.entry.guid);
|
||||
|
||||
done();
|
||||
});
|
||||
|
||||
afterAll(async (done) => {
|
||||
await navigationBarPage.clickLogoutButton();
|
||||
|
||||
afterAll(async () => {
|
||||
await this.alfrescoJsApi.nodes.deleteNode(sameCreatorFile.id);
|
||||
done();
|
||||
await navigationBarPage.clickLogoutButton();
|
||||
});
|
||||
|
||||
it('[C277177] Should a user with Contributor permission be able to upload a new version for the created file', () => {
|
||||
contentServices.versionManagerContent(sameCreatorFile.name);
|
||||
it('[C277177] Should a user with Contributor permission be able to upload a new version for the created file', async () => {
|
||||
await contentServices.versionManagerContent(sameCreatorFile.name);
|
||||
|
||||
BrowserActions.click(versionManagePage.showNewVersionButton);
|
||||
await BrowserActions.click(versionManagePage.showNewVersionButton);
|
||||
|
||||
versionManagePage.uploadNewVersionFile(newVersionFile.location);
|
||||
await versionManagePage.uploadNewVersionFile(newVersionFile.location);
|
||||
|
||||
versionManagePage.checkFileVersionExist('1.1');
|
||||
expect(versionManagePage.getFileVersionName('1.1')).toEqual(newVersionFile.name);
|
||||
expect(versionManagePage.getFileVersionDate('1.1')).not.toBeUndefined();
|
||||
await versionManagePage.checkFileVersionExist('1.1');
|
||||
await expect(await versionManagePage.getFileVersionName('1.1')).toEqual(newVersionFile.name);
|
||||
await expect(await versionManagePage.getFileVersionDate('1.1')).not.toBeUndefined();
|
||||
|
||||
versionManagePage.deleteFileVersion('1.1');
|
||||
versionManagePage.clickAcceptConfirm();
|
||||
await versionManagePage.deleteFileVersion('1.1');
|
||||
await versionManagePage.clickAcceptConfirm();
|
||||
|
||||
versionManagePage.checkFileVersionNotExist('1.1');
|
||||
await versionManagePage.checkFileVersionNotExist('1.1');
|
||||
|
||||
versionManagePage.closeVersionDialog();
|
||||
await versionManagePage.closeVersionDialog();
|
||||
|
||||
uploadDialog.clickOnCloseButton();
|
||||
await uploadDialog.clickOnCloseButton();
|
||||
});
|
||||
|
||||
it('[C277198] Should a user with Contributor permission not be able to upload a new version for a file with different creator', () => {
|
||||
contentServices.versionManagerContent(differentCreatorFile.name);
|
||||
it('[C277198] Should a user with Contributor permission not be able to upload a new version for a file with different creator', async () => {
|
||||
await contentServices.versionManagerContent(differentCreatorFile.name);
|
||||
|
||||
notificationHistoryPage.checkNotifyContains(`You don't have access to do this`);
|
||||
await notificationHistoryPage.checkNotifyContains(`You don't have access to do this`);
|
||||
});
|
||||
|
||||
it('[C277202] Should be disabled the option for a locked file', () => {
|
||||
contentServices.getDocumentList().rightClickOnRow(lockFileModel.name);
|
||||
const actionVersion = contentServices.checkContextActionIsVisible('Manage versions');
|
||||
expect(actionVersion.isEnabled()).toBeFalsy();
|
||||
it('[C277202] Should be disabled the option for a locked file', async () => {
|
||||
await contentServices.getDocumentList().rightClickOnRow(lockFileModel.name);
|
||||
await expect(await contentServices.isContextActionEnabled('Manage versions')).toBe(false, 'Manage versions is enabled');
|
||||
});
|
||||
});
|
||||
|
||||
@@ -270,7 +257,7 @@ describe('Version component permissions', () => {
|
||||
'location': resources.Files.ADF_DOCUMENTS.PNG.file_location
|
||||
});
|
||||
|
||||
beforeAll(async (done) => {
|
||||
beforeAll(async () => {
|
||||
await this.alfrescoJsApi.login(collaboratorUser.id, collaboratorUser.password);
|
||||
|
||||
const sameCreatorFileUploaded = await uploadActions.uploadFile(sameCreatorFile.location, sameCreatorFile.name, site.entry.guid);
|
||||
@@ -278,62 +265,59 @@ describe('Version component permissions', () => {
|
||||
|
||||
await loginPage.loginToContentServicesUsingUserModel(collaboratorUser);
|
||||
|
||||
navigationBarPage.openContentServicesFolder(site.entry.guid);
|
||||
await navigationBarPage.openContentServicesFolder(site.entry.guid);
|
||||
|
||||
done();
|
||||
});
|
||||
|
||||
afterAll(async (done) => {
|
||||
await navigationBarPage.clickLogoutButton();
|
||||
afterAll(async () => {
|
||||
await this.alfrescoJsApi.nodes.deleteNode(sameCreatorFile.id);
|
||||
done();
|
||||
await navigationBarPage.clickLogoutButton();
|
||||
});
|
||||
|
||||
it('[C277195] Should a user with Collaborator permission be able to upload a new version for the created file', () => {
|
||||
contentServices.versionManagerContent(sameCreatorFile.name);
|
||||
it('[C277195] Should a user with Collaborator permission be able to upload a new version for the created file', async () => {
|
||||
await contentServices.versionManagerContent(sameCreatorFile.name);
|
||||
|
||||
BrowserActions.click(versionManagePage.showNewVersionButton);
|
||||
await BrowserActions.click(versionManagePage.showNewVersionButton);
|
||||
|
||||
versionManagePage.uploadNewVersionFile(newVersionFile.location);
|
||||
await versionManagePage.uploadNewVersionFile(newVersionFile.location);
|
||||
|
||||
versionManagePage.checkFileVersionExist('1.1');
|
||||
expect(versionManagePage.getFileVersionName('1.1')).toEqual(newVersionFile.name);
|
||||
expect(versionManagePage.getFileVersionDate('1.1')).not.toBeUndefined();
|
||||
await versionManagePage.checkFileVersionExist('1.1');
|
||||
await expect(await versionManagePage.getFileVersionName('1.1')).toEqual(newVersionFile.name);
|
||||
await expect(await versionManagePage.getFileVersionDate('1.1')).not.toBeUndefined();
|
||||
|
||||
versionManagePage.deleteFileVersion('1.1');
|
||||
versionManagePage.clickAcceptConfirm();
|
||||
await versionManagePage.deleteFileVersion('1.1');
|
||||
await versionManagePage.clickAcceptConfirm();
|
||||
|
||||
versionManagePage.checkFileVersionNotExist('1.1');
|
||||
await versionManagePage.checkFileVersionNotExist('1.1');
|
||||
|
||||
versionManagePage.closeVersionDialog();
|
||||
await versionManagePage.closeVersionDialog();
|
||||
|
||||
uploadDialog.clickOnCloseButton();
|
||||
await uploadDialog.clickOnCloseButton();
|
||||
});
|
||||
|
||||
it('[C277199] should a user with Collaborator permission be able to upload a new version for a file with different creator', () => {
|
||||
contentServices.versionManagerContent(differentCreatorFile.name);
|
||||
it('[C277199] should a user with Collaborator permission be able to upload a new version for a file with different creator', async () => {
|
||||
await contentServices.versionManagerContent(differentCreatorFile.name);
|
||||
|
||||
BrowserActions.click(versionManagePage.showNewVersionButton);
|
||||
await BrowserActions.click(versionManagePage.showNewVersionButton);
|
||||
|
||||
versionManagePage.uploadNewVersionFile(newVersionFile.location);
|
||||
await versionManagePage.uploadNewVersionFile(newVersionFile.location);
|
||||
|
||||
versionManagePage.checkFileVersionExist('1.1');
|
||||
expect(versionManagePage.getFileVersionName('1.1')).toEqual(newVersionFile.name);
|
||||
expect(versionManagePage.getFileVersionDate('1.1')).not.toBeUndefined();
|
||||
await versionManagePage.checkFileVersionExist('1.1');
|
||||
await expect(await versionManagePage.getFileVersionName('1.1')).toEqual(newVersionFile.name);
|
||||
await expect(await versionManagePage.getFileVersionDate('1.1')).not.toBeUndefined();
|
||||
|
||||
versionManagePage.clickActionButton('1.1');
|
||||
await versionManagePage.clickActionButton('1.1');
|
||||
|
||||
expect(element(by.css(`[id="adf-version-list-action-delete-1.1"]`)).isEnabled()).toBe(false);
|
||||
await expect(await element(by.css(`[id="adf-version-list-action-delete-1.1"]`)).isEnabled()).toBe(false);
|
||||
|
||||
versionManagePage.closeActionsMenu();
|
||||
await versionManagePage.closeActionsMenu();
|
||||
|
||||
versionManagePage.closeVersionDialog();
|
||||
await versionManagePage.closeVersionDialog();
|
||||
});
|
||||
|
||||
it('[C277203] Should a user with Collaborator permission not be able to upload a new version for a locked file', () => {
|
||||
contentServices.getDocumentList().rightClickOnRow(lockFileModel.name);
|
||||
const actionVersion = contentServices.checkContextActionIsVisible('Manage versions');
|
||||
expect(actionVersion.isEnabled()).toBeFalsy();
|
||||
it('[C277203] Should a user with Collaborator permission not be able to upload a new version for a locked file', async () => {
|
||||
await contentServices.getDocumentList().rightClickOnRow(lockFileModel.name);
|
||||
await expect(await contentServices.isContextActionEnabled('Manage versions')).toBe(false, 'Manage versions is enabled');
|
||||
});
|
||||
});
|
||||
|
||||
|
||||
@@ -49,7 +49,7 @@ describe('Version Properties', () => {
|
||||
});
|
||||
const uploadActions = new UploadActions(this.alfrescoJsApi);
|
||||
|
||||
beforeAll(async (done) => {
|
||||
beforeAll(async () => {
|
||||
|
||||
await this.alfrescoJsApi.login(browser.params.testConfig.adf.adminEmail, browser.params.testConfig.adf.adminPassword);
|
||||
|
||||
@@ -65,73 +65,50 @@ describe('Version Properties', () => {
|
||||
|
||||
await loginPage.loginToContentServicesUsingUserModel(acsUser);
|
||||
|
||||
navigationBarPage.clickContentServicesButton();
|
||||
contentServicesPage.waitForTableBody();
|
||||
contentServicesPage.versionManagerContent(txtFileModel.name);
|
||||
await navigationBarPage.clickContentServicesButton();
|
||||
await contentServicesPage.waitForTableBody();
|
||||
await contentServicesPage.versionManagerContent(txtFileModel.name);
|
||||
|
||||
done();
|
||||
});
|
||||
|
||||
afterAll(async (done) => {
|
||||
await navigationBarPage.clickLogoutButton();
|
||||
done();
|
||||
it('[C272817] Should NOT be present the download action when allowDownload property is false', async () => {
|
||||
await versionManagePage.disableDownload();
|
||||
await versionManagePage.clickActionButton('1.0');
|
||||
await BrowserVisibility.waitUntilElementIsNotVisible(element(by.css(`[id="adf-version-list-action-download-1.0"]`)));
|
||||
await versionManagePage.closeDisabledActionsMenu();
|
||||
});
|
||||
|
||||
it('[C272817] Should NOT be present the download action when allowDownload property is false', () => {
|
||||
versionManagePage.disableDownload();
|
||||
|
||||
versionManagePage.clickActionButton('1.0');
|
||||
|
||||
BrowserVisibility.waitUntilElementIsNotVisible(element(by.css(`[id="adf-version-list-action-download-1.0"]`)));
|
||||
|
||||
versionManagePage.closeDisabledActionsMenu();
|
||||
it('[C279992] Should be present the download action when allowDownload property is true', async () => {
|
||||
await versionManagePage.enableDownload();
|
||||
await versionManagePage.clickActionButton('1.0');
|
||||
await BrowserVisibility.waitUntilElementIsVisible(element(by.css(`[id="adf-version-list-action-download-1.0"]`)));
|
||||
await versionManagePage.closeActionsMenu();
|
||||
});
|
||||
|
||||
it('[C279992] Should be present the download action when allowDownload property is true', () => {
|
||||
versionManagePage.enableDownload();
|
||||
|
||||
versionManagePage.clickActionButton('1.0');
|
||||
|
||||
BrowserVisibility.waitUntilElementIsVisible(element(by.css(`[id="adf-version-list-action-download-1.0"]`)));
|
||||
|
||||
versionManagePage.closeActionsMenu();
|
||||
it('[C269085] Should show/hide comments when showComments true/false', async () => {
|
||||
await versionManagePage.enableComments();
|
||||
await BrowserActions.click(versionManagePage.showNewVersionButton);
|
||||
await versionManagePage.enterCommentText('Example comment text');
|
||||
await versionManagePage.uploadNewVersionFile(fileModelVersionTwo.location);
|
||||
await versionManagePage.checkFileVersionExist('1.1');
|
||||
await expect(await versionManagePage.getFileVersionComment('1.1')).toEqual('Example comment text');
|
||||
await versionManagePage.disableComments();
|
||||
await BrowserVisibility.waitUntilElementIsNotVisible(element(by.css(`[id="adf-version-list-item-comment-1.1"]`)));
|
||||
});
|
||||
|
||||
it('[C269085] Should show/hide comments when showComments true/false', () => {
|
||||
versionManagePage.enableComments();
|
||||
|
||||
BrowserActions.click(versionManagePage.showNewVersionButton);
|
||||
|
||||
versionManagePage.enterCommentText('Example comment text');
|
||||
versionManagePage.uploadNewVersionFile(fileModelVersionTwo.location);
|
||||
|
||||
versionManagePage.checkFileVersionExist('1.1');
|
||||
expect(versionManagePage.getFileVersionComment('1.1')).toEqual('Example comment text');
|
||||
|
||||
versionManagePage.disableComments();
|
||||
|
||||
BrowserVisibility.waitUntilElementIsNotVisible(element(by.css(`[id="adf-version-list-item-comment-1.1"]`)));
|
||||
it('[C277277] Should show/hide actions menu when readOnly is true/false', async () => {
|
||||
await versionManagePage.disableReadOnly();
|
||||
await BrowserVisibility.waitUntilElementIsVisible(element(by.css(`[id="adf-version-list-action-menu-button-1.0"]`)));
|
||||
await versionManagePage.enableReadOnly();
|
||||
await BrowserVisibility.waitUntilElementIsNotVisible(element(by.css(`[id="adf-version-list-action-menu-button-1.0"]`)));
|
||||
});
|
||||
|
||||
it('[C277277] Should show/hide actions menu when readOnly is true/false', () => {
|
||||
versionManagePage.disableReadOnly();
|
||||
|
||||
BrowserVisibility.waitUntilElementIsVisible(element(by.css(`[id="adf-version-list-action-menu-button-1.0"]`)));
|
||||
|
||||
versionManagePage.enableReadOnly();
|
||||
|
||||
BrowserVisibility.waitUntilElementIsNotVisible(element(by.css(`[id="adf-version-list-action-menu-button-1.0"]`)));
|
||||
});
|
||||
|
||||
it('[C279994] Should show/hide upload new version button when readOnly is true/false', () => {
|
||||
versionManagePage.disableReadOnly();
|
||||
|
||||
BrowserVisibility.waitUntilElementIsVisible(versionManagePage.showNewVersionButton);
|
||||
|
||||
versionManagePage.enableReadOnly();
|
||||
|
||||
BrowserVisibility.waitUntilElementIsNotVisible(versionManagePage.showNewVersionButton);
|
||||
BrowserVisibility.waitUntilElementIsNotVisible(versionManagePage.uploadNewVersionButton);
|
||||
it('[C279994] Should show/hide upload new version button when readOnly is true/false', async () => {
|
||||
await versionManagePage.disableReadOnly();
|
||||
await BrowserVisibility.waitUntilElementIsVisible(versionManagePage.showNewVersionButton);
|
||||
await versionManagePage.enableReadOnly();
|
||||
await BrowserVisibility.waitUntilElementIsNotVisible(versionManagePage.showNewVersionButton);
|
||||
await BrowserVisibility.waitUntilElementIsNotVisible(versionManagePage.uploadNewVersionButton);
|
||||
});
|
||||
|
||||
});
|
||||
|
||||
@@ -17,7 +17,7 @@
|
||||
|
||||
import { browser } from 'protractor';
|
||||
|
||||
import { LoginPage, UploadActions, BrowserVisibility } from '@alfresco/adf-testing';
|
||||
import { LoginPage, UploadActions, BrowserVisibility, BrowserActions } from '@alfresco/adf-testing';
|
||||
import { ContentServicesPage } from '../../pages/adf/contentServicesPage';
|
||||
import { VersionManagePage } from '../../pages/adf/versionManagerPage';
|
||||
import { AcsUserModel } from '../../models/ACS/acsUserModel';
|
||||
@@ -67,7 +67,7 @@ describe('Version component', () => {
|
||||
|
||||
const uploadActions = new UploadActions(this.alfrescoJsApi);
|
||||
|
||||
beforeAll(async (done) => {
|
||||
beforeAll(async () => {
|
||||
await this.alfrescoJsApi.login(browser.params.testConfig.adf.adminEmail, browser.params.testConfig.adf.adminPassword);
|
||||
|
||||
await this.alfrescoJsApi.core.peopleApi.addPerson(acsUser);
|
||||
@@ -81,92 +81,82 @@ describe('Version component', () => {
|
||||
|
||||
await loginPage.loginToContentServicesUsingUserModel(acsUser);
|
||||
|
||||
navigationBarPage.clickContentServicesButton();
|
||||
contentServicesPage.waitForTableBody();
|
||||
contentServicesPage.versionManagerContent(txtFileModel.name);
|
||||
await navigationBarPage.clickContentServicesButton();
|
||||
await contentServicesPage.waitForTableBody();
|
||||
await contentServicesPage.versionManagerContent(txtFileModel.name);
|
||||
|
||||
done();
|
||||
});
|
||||
|
||||
afterAll(async (done) => {
|
||||
await navigationBarPage.clickLogoutButton();
|
||||
done();
|
||||
it('[C272768] Should be visible the first file version when you upload a file', async () => {
|
||||
await versionManagePage.checkUploadNewVersionsButtonIsDisplayed();
|
||||
|
||||
await versionManagePage.checkFileVersionExist('1.0');
|
||||
await expect(await versionManagePage.getFileVersionName('1.0')).toEqual(txtFileModel.name);
|
||||
await expect(await versionManagePage.getFileVersionDate('1.0')).not.toBeUndefined();
|
||||
});
|
||||
|
||||
it('[C272768] Should be visible the first file version when you upload a file', () => {
|
||||
versionManagePage.checkUploadNewVersionsButtonIsDisplayed();
|
||||
it('[C279995] Should show/hide the new upload file options when click on add New version/cancel button', async () => {
|
||||
await BrowserActions.click(versionManagePage.showNewVersionButton);
|
||||
|
||||
versionManagePage.checkFileVersionExist('1.0');
|
||||
expect(versionManagePage.getFileVersionName('1.0')).toEqual(txtFileModel.name);
|
||||
expect(versionManagePage.getFileVersionDate('1.0')).not.toBeUndefined();
|
||||
await BrowserVisibility.waitUntilElementIsVisible(versionManagePage.cancelButton);
|
||||
await BrowserVisibility.waitUntilElementIsVisible(versionManagePage.majorRadio);
|
||||
await BrowserVisibility.waitUntilElementIsVisible(versionManagePage.minorRadio);
|
||||
await BrowserVisibility.waitUntilElementIsVisible(versionManagePage.cancelButton);
|
||||
await BrowserVisibility.waitUntilElementIsVisible(versionManagePage.commentText);
|
||||
await BrowserVisibility.waitUntilElementIsVisible(versionManagePage.uploadNewVersionButton);
|
||||
|
||||
await BrowserActions.click(versionManagePage.cancelButton);
|
||||
|
||||
await BrowserVisibility.waitUntilElementIsNotVisible(versionManagePage.cancelButton);
|
||||
await BrowserVisibility.waitUntilElementIsNotVisible(versionManagePage.majorRadio);
|
||||
await BrowserVisibility.waitUntilElementIsNotVisible(versionManagePage.minorRadio);
|
||||
await BrowserVisibility.waitUntilElementIsNotVisible(versionManagePage.cancelButton);
|
||||
await BrowserVisibility.waitUntilElementIsNotVisible(versionManagePage.commentText);
|
||||
await BrowserVisibility.waitUntilElementIsNotVisible(versionManagePage.uploadNewVersionButton);
|
||||
|
||||
await BrowserVisibility.waitUntilElementIsVisible(versionManagePage.showNewVersionButton);
|
||||
});
|
||||
|
||||
it('[C279995] Should show/hide the new upload file options when click on add New version/cancel button', () => {
|
||||
versionManagePage.showNewVersionButton.click();
|
||||
it('[C260244] Should show the version history when select a file with multiple version', async () => {
|
||||
await BrowserActions.click(versionManagePage.showNewVersionButton);
|
||||
await versionManagePage.uploadNewVersionFile(fileModelVersionTwo.location);
|
||||
|
||||
browser.driver.sleep(300);
|
||||
await versionManagePage.checkFileVersionExist('1.0');
|
||||
await expect(await versionManagePage.getFileVersionName('1.0')).toEqual(txtFileModel.name);
|
||||
await expect(await versionManagePage.getFileVersionDate('1.0')).not.toBeUndefined();
|
||||
|
||||
BrowserVisibility.waitUntilElementIsVisible(versionManagePage.cancelButton);
|
||||
BrowserVisibility.waitUntilElementIsVisible(versionManagePage.majorRadio);
|
||||
BrowserVisibility.waitUntilElementIsVisible(versionManagePage.minorRadio);
|
||||
BrowserVisibility.waitUntilElementIsVisible(versionManagePage.cancelButton);
|
||||
BrowserVisibility.waitUntilElementIsVisible(versionManagePage.commentText);
|
||||
BrowserVisibility.waitUntilElementIsVisible(versionManagePage.uploadNewVersionButton);
|
||||
|
||||
versionManagePage.cancelButton.click();
|
||||
|
||||
browser.driver.sleep(300);
|
||||
|
||||
BrowserVisibility.waitUntilElementIsNotVisible(versionManagePage.cancelButton);
|
||||
BrowserVisibility.waitUntilElementIsNotVisible(versionManagePage.majorRadio);
|
||||
BrowserVisibility.waitUntilElementIsNotVisible(versionManagePage.minorRadio);
|
||||
BrowserVisibility.waitUntilElementIsNotVisible(versionManagePage.cancelButton);
|
||||
BrowserVisibility.waitUntilElementIsNotVisible(versionManagePage.commentText);
|
||||
BrowserVisibility.waitUntilElementIsNotVisible(versionManagePage.uploadNewVersionButton);
|
||||
|
||||
BrowserVisibility.waitUntilElementIsVisible(versionManagePage.showNewVersionButton);
|
||||
await versionManagePage.checkFileVersionExist('1.1');
|
||||
await expect(await versionManagePage.getFileVersionName('1.1')).toEqual(fileModelVersionTwo.name);
|
||||
await expect(await versionManagePage.getFileVersionDate('1.1')).not.toBeUndefined();
|
||||
});
|
||||
|
||||
it('[C260244] Should show the version history when select a file with multiple version', () => {
|
||||
versionManagePage.showNewVersionButton.click();
|
||||
versionManagePage.uploadNewVersionFile(fileModelVersionTwo.location);
|
||||
it('[C269084] Should be possible add a comment when add a new version', async () => {
|
||||
await BrowserActions.click(versionManagePage.showNewVersionButton);
|
||||
await versionManagePage.enterCommentText('Example comment text');
|
||||
await versionManagePage.uploadNewVersionFile(fileModelVersionThree.location);
|
||||
|
||||
versionManagePage.checkFileVersionExist('1.0');
|
||||
expect(versionManagePage.getFileVersionName('1.0')).toEqual(txtFileModel.name);
|
||||
expect(versionManagePage.getFileVersionDate('1.0')).not.toBeUndefined();
|
||||
|
||||
versionManagePage.checkFileVersionExist('1.1');
|
||||
expect(versionManagePage.getFileVersionName('1.1')).toEqual(fileModelVersionTwo.name);
|
||||
expect(versionManagePage.getFileVersionDate('1.1')).not.toBeUndefined();
|
||||
await versionManagePage.checkFileVersionExist('1.2');
|
||||
await expect(await versionManagePage.getFileVersionName('1.2')).toEqual(fileModelVersionThree.name);
|
||||
await expect(await versionManagePage.getFileVersionDate('1.2')).not.toBeUndefined();
|
||||
await expect(await versionManagePage.getFileVersionComment('1.2')).toEqual('Example comment text');
|
||||
});
|
||||
|
||||
it('[C269084] Should be possible add a comment when add a new version', () => {
|
||||
versionManagePage.showNewVersionButton.click();
|
||||
versionManagePage.enterCommentText('Example comment text');
|
||||
versionManagePage.uploadNewVersionFile(fileModelVersionThree.location);
|
||||
it('[C275719] Should be possible preview the file when you add a new version', async () => {
|
||||
await BrowserActions.click(versionManagePage.showNewVersionButton);
|
||||
await versionManagePage.clickMajorChange();
|
||||
|
||||
versionManagePage.checkFileVersionExist('1.2');
|
||||
expect(versionManagePage.getFileVersionName('1.2')).toEqual(fileModelVersionThree.name);
|
||||
expect(versionManagePage.getFileVersionDate('1.2')).not.toBeUndefined();
|
||||
expect(versionManagePage.getFileVersionComment('1.2')).toEqual('Example comment text');
|
||||
});
|
||||
await versionManagePage.uploadNewVersionFile(fileModelVersionFor.location);
|
||||
|
||||
it('[C275719] Should be possible preview the file when you add a new version', () => {
|
||||
versionManagePage.showNewVersionButton.click();
|
||||
versionManagePage.clickMajorChange();
|
||||
await versionManagePage.checkFileVersionExist('2.0');
|
||||
await expect(await versionManagePage.getFileVersionName('2.0')).toEqual(fileModelVersionFor.name);
|
||||
|
||||
versionManagePage.uploadNewVersionFile(fileModelVersionFor.location);
|
||||
await BrowserActions.click(versionManagePage.showNewVersionButton);
|
||||
await versionManagePage.clickMinorChange();
|
||||
|
||||
versionManagePage.checkFileVersionExist('2.0');
|
||||
expect(versionManagePage.getFileVersionName('2.0')).toEqual(fileModelVersionFor.name);
|
||||
await versionManagePage.uploadNewVersionFile(fileModelVersionFive.location);
|
||||
|
||||
versionManagePage.showNewVersionButton.click();
|
||||
versionManagePage.clickMinorChange();
|
||||
|
||||
versionManagePage.uploadNewVersionFile(fileModelVersionFive.location);
|
||||
|
||||
versionManagePage.checkFileVersionExist('2.1');
|
||||
expect(versionManagePage.getFileVersionName('2.1')).toEqual(fileModelVersionFive.name);
|
||||
await versionManagePage.checkFileVersionExist('2.1');
|
||||
await expect(await versionManagePage.getFileVersionName('2.1')).toEqual(fileModelVersionFive.name);
|
||||
});
|
||||
|
||||
});
|
||||
|
||||
@@ -25,19 +25,16 @@ describe('Auth Guard SSO', () => {
|
||||
const errorPage = new ErrorPage();
|
||||
|
||||
it('[C307058] Should be redirected to 403 when user doesn\'t have permissions', async () => {
|
||||
settingsPage.setProviderEcmSso(browser.params.testConfig.adf_acs.host,
|
||||
await settingsPage.setProviderEcmSso(browser.params.testConfig.adf.url,
|
||||
browser.params.testConfig.adf.hostSso,
|
||||
browser.params.testConfig.adf.hostIdentity,
|
||||
false, true, browser.params.config.oauth2.clientId);
|
||||
|
||||
browser.driver.sleep(5000);
|
||||
|
||||
loginSSOPage.clickOnSSOButton();
|
||||
|
||||
await loginSSOPage.clickOnSSOButton();
|
||||
await loginSSOPage.loginSSOIdentityService(browser.params.testConfig.adf.adminEmail, browser.params.testConfig.adf.adminPassword);
|
||||
BrowserActions.getUrl(browser.params.testConfig.adf.url + '/cloud/simple-app');
|
||||
browser.driver.sleep(2000);
|
||||
expect(errorPage.getErrorCode()).toBe('403');
|
||||
await BrowserActions.getUrl(browser.params.testConfig.adf.url + '/cloud/simple-app');
|
||||
await browser.sleep(1000);
|
||||
const error = await errorPage.getErrorCode();
|
||||
await expect(error).toBe('403');
|
||||
});
|
||||
|
||||
});
|
||||
|
||||
@@ -30,255 +30,262 @@ describe('CardView Component', () => {
|
||||
const cardViewPageComponent = new CardViewComponentPage();
|
||||
const metadataViewPage = new MetadataViewPage();
|
||||
|
||||
beforeAll(async (done) => {
|
||||
loginPage.loginToContentServices(browser.params.testConfig.adf.adminEmail, browser.params.testConfig.adf.adminPassword);
|
||||
navigationBarPage.clickCardViewButton();
|
||||
beforeAll(async () => {
|
||||
await loginPage.loginToContentServices(browser.params.testConfig.adf.adminEmail, browser.params.testConfig.adf.adminPassword);
|
||||
await navigationBarPage.clickCardViewButton();
|
||||
|
||||
done();
|
||||
});
|
||||
|
||||
afterAll(async () => {
|
||||
await navigationBarPage.clickLogoutButton();
|
||||
});
|
||||
|
||||
afterEach(() => {
|
||||
cardViewPageComponent.clickOnResetButton();
|
||||
afterEach(async () => {
|
||||
await cardViewPageComponent.clickOnResetButton();
|
||||
});
|
||||
|
||||
describe('key-value pair ', () => {
|
||||
|
||||
it('[C279938] Should the label be present', () => {
|
||||
it('[C279938] Should the label be present', async () => {
|
||||
const label = element(by.css('div[data-automation-id="card-key-value-pairs-label-key-value-pairs"]'));
|
||||
|
||||
BrowserVisibility.waitUntilElementIsPresent(label);
|
||||
await BrowserVisibility.waitUntilElementIsPresent(label);
|
||||
});
|
||||
|
||||
it('[C279898] Should be possible edit key-value pair properties', () => {
|
||||
cardViewPageComponent.clickOnAddButton();
|
||||
cardViewPageComponent.setName('testName');
|
||||
cardViewPageComponent.setValue('testValue');
|
||||
cardViewPageComponent.clickOnAddButton();
|
||||
cardViewPageComponent.waitForOutput();
|
||||
expect(cardViewPageComponent.getOutputText(0)).toBe('[CardView Key-Value Pairs Item] - [{"name":"testName","value":"testValue"}]');
|
||||
it('[C279898] Should be possible edit key-value pair properties', async () => {
|
||||
await cardViewPageComponent.clickOnAddButton();
|
||||
await cardViewPageComponent.setName('testName');
|
||||
await cardViewPageComponent.setValue('testValue');
|
||||
await cardViewPageComponent.clickOnAddButton();
|
||||
await cardViewPageComponent.waitForOutput();
|
||||
await expect(await cardViewPageComponent.getOutputText(0)).toBe('[CardView Key-Value Pairs Item] - [{"name":"testName","value":"testValue"}]');
|
||||
|
||||
cardViewPageComponent.deletePairsValues();
|
||||
await cardViewPageComponent.deletePairsValues();
|
||||
|
||||
expect(cardViewPageComponent.getOutputText(1)).toBe('[CardView Key-Value Pairs Item] - []');
|
||||
await expect(await cardViewPageComponent.getOutputText(1)).toBe('[CardView Key-Value Pairs Item] - []');
|
||||
});
|
||||
});
|
||||
|
||||
describe('SelectBox', () => {
|
||||
|
||||
it('[C279939] Should the label be present', () => {
|
||||
it('[C279939] Should the label be present', async () => {
|
||||
const label = element(by.css('div[data-automation-id="card-select-label-select"]'));
|
||||
|
||||
BrowserVisibility.waitUntilElementIsPresent(label);
|
||||
await BrowserVisibility.waitUntilElementIsPresent(label);
|
||||
});
|
||||
|
||||
it('[C279899] Should be possible edit selectBox item', () => {
|
||||
cardViewPageComponent.clickSelectBox();
|
||||
cardViewPageComponent.selectValueFromComboBox(1);
|
||||
it('[C279899] Should be possible edit selectBox item', async () => {
|
||||
await cardViewPageComponent.clickSelectBox();
|
||||
await cardViewPageComponent.selectValueFromComboBox(1);
|
||||
|
||||
expect(cardViewPageComponent.getOutputText(0))
|
||||
await expect(await cardViewPageComponent.getOutputText(0))
|
||||
.toBe('[CardView Select Item] - two');
|
||||
});
|
||||
|
||||
it('[C312448] Should be able to enable None option', async () => {
|
||||
await cardViewPageComponent.enableNoneOption();
|
||||
await cardViewPageComponent.clickSelectBox();
|
||||
await cardViewPageComponent.selectValueFromComboBox(0);
|
||||
|
||||
await expect(cardViewPageComponent.getOutputText(0))
|
||||
.toBe('[CardView Select Item] - null');
|
||||
});
|
||||
});
|
||||
|
||||
describe('Text', () => {
|
||||
|
||||
it('[C279937] Should the label be present', () => {
|
||||
it('[C279937] Should the label be present', async () => {
|
||||
const label = element(by.css('div[data-automation-id="card-textitem-label-name"]'));
|
||||
|
||||
BrowserVisibility.waitUntilElementIsPresent(label);
|
||||
await BrowserVisibility.waitUntilElementIsPresent(label);
|
||||
});
|
||||
|
||||
it('[C279943] Should be present a default value', () => {
|
||||
expect(cardViewPageComponent.getTextFieldText()).toBe('Spock');
|
||||
it('[C279943] Should be present a default value', async () => {
|
||||
await expect(await cardViewPageComponent.getTextFieldText()).toBe('Spock');
|
||||
});
|
||||
|
||||
it('[C279934] Should be possible edit text item', () => {
|
||||
cardViewPageComponent
|
||||
.clickOnTextField()
|
||||
.enterTextField('example')
|
||||
.clickOnTextSaveIcon();
|
||||
it('[C279934] Should be possible edit text item', async () => {
|
||||
await cardViewPageComponent.clickOnTextField();
|
||||
await cardViewPageComponent.enterTextField('example');
|
||||
await cardViewPageComponent.clickOnTextSaveIcon();
|
||||
|
||||
expect(cardViewPageComponent.getOutputText(0)).toBe('[CardView Text Item] - example');
|
||||
await expect(await cardViewPageComponent.getOutputText(0)).toBe('[CardView Text Item] - example');
|
||||
});
|
||||
|
||||
it('[C279944] Should be possible undo text item modify when click on the clear button', () => {
|
||||
cardViewPageComponent
|
||||
.clickOnTextField()
|
||||
.enterTextField('example')
|
||||
.clickOnTextClearIcon();
|
||||
it('[C279944] Should be possible undo text item modify when click on the clear button', async () => {
|
||||
await cardViewPageComponent.clickOnTextField();
|
||||
await cardViewPageComponent.enterTextField('example');
|
||||
await cardViewPageComponent.clickOnTextClearIcon();
|
||||
|
||||
expect(cardViewPageComponent.getTextFieldText()).toBe('Spock');
|
||||
await expect(await cardViewPageComponent.getTextFieldText()).toBe('Spock');
|
||||
});
|
||||
});
|
||||
|
||||
describe('Int', () => {
|
||||
|
||||
it('[C279940] Should the label be present', () => {
|
||||
it('[C279940] Should the label be present', async () => {
|
||||
const label = element(by.css('div[data-automation-id="card-textitem-label-int"]'));
|
||||
|
||||
BrowserVisibility.waitUntilElementIsPresent(label);
|
||||
await BrowserVisibility.waitUntilElementIsPresent(label);
|
||||
});
|
||||
|
||||
it('[C279945] Should be present a default value', () => {
|
||||
expect(cardViewPageComponent.getIntFieldText()).toBe('213');
|
||||
it('[C279945] Should be present a default value', async () => {
|
||||
await expect(await cardViewPageComponent.getIntFieldText()).toBe('213');
|
||||
});
|
||||
|
||||
it('[C279946] Should be possible edit int item', () => {
|
||||
cardViewPageComponent
|
||||
.clickOnIntField()
|
||||
.enterIntField('99999')
|
||||
.clickOnIntSaveIcon();
|
||||
it('[C279946] Should be possible edit int item', async () => {
|
||||
await cardViewPageComponent.clickOnIntField();
|
||||
await cardViewPageComponent.enterIntField('99999');
|
||||
await cardViewPageComponent.clickOnIntSaveIcon();
|
||||
|
||||
expect(cardViewPageComponent.getOutputText(0)).toBe('[CardView Int Item] - 99999');
|
||||
await expect(await cardViewPageComponent.getOutputText(0)).toBe('[CardView Int Item] - 99999');
|
||||
});
|
||||
|
||||
it('[C279947] Should not be possible add string value to the int item', () => {
|
||||
cardViewPageComponent
|
||||
.clickOnIntField()
|
||||
.enterIntField('string value')
|
||||
.clickOnIntSaveIcon();
|
||||
it('[C279947] Should not be possible add string value to the int item', async () => {
|
||||
await cardViewPageComponent.clickOnIntField();
|
||||
await cardViewPageComponent.enterIntField('string value');
|
||||
await cardViewPageComponent.clickOnIntSaveIcon();
|
||||
|
||||
expect(cardViewPageComponent.getErrorInt()).toBe('Use an integer format');
|
||||
await expect(await cardViewPageComponent.getErrorInt()).toBe('Use an integer format');
|
||||
});
|
||||
|
||||
it('[C279948] Should not be possible add float value to the int item', () => {
|
||||
cardViewPageComponent
|
||||
.clickOnIntField()
|
||||
.enterIntField('0.22')
|
||||
.clickOnIntSaveIcon();
|
||||
it('[C279948] Should not be possible add float value to the int item', async () => {
|
||||
await cardViewPageComponent.clickOnIntField();
|
||||
await cardViewPageComponent.enterIntField('0.22');
|
||||
await cardViewPageComponent.clickOnIntSaveIcon();
|
||||
|
||||
expect(cardViewPageComponent.getErrorInt()).toBe('Use an integer format');
|
||||
await expect(await cardViewPageComponent.getErrorInt()).toBe('Use an integer format');
|
||||
});
|
||||
|
||||
it('[C279949] Should not be possible have an empty value', () => {
|
||||
cardViewPageComponent
|
||||
.clickOnIntField()
|
||||
.enterIntField(' ')
|
||||
.clickOnIntSaveIcon();
|
||||
it('[C279949] Should not be possible have an empty value', async () => {
|
||||
await cardViewPageComponent.clickOnIntField();
|
||||
await cardViewPageComponent.enterIntField(' ');
|
||||
await cardViewPageComponent.clickOnIntSaveIcon();
|
||||
|
||||
expect(cardViewPageComponent.getErrorInt()).toBe('Use an integer format');
|
||||
await expect(await cardViewPageComponent.getErrorInt()).toBe('Use an integer format');
|
||||
});
|
||||
|
||||
it('[C279950] Should return an error when the value is > 2147483647', () => {
|
||||
cardViewPageComponent
|
||||
.clickOnIntField()
|
||||
.enterIntField('214748367')
|
||||
.clickOnIntSaveIcon();
|
||||
it('[C279950] Should return an error when the value is > 2147483647', async () => {
|
||||
await cardViewPageComponent.clickOnIntField();
|
||||
await cardViewPageComponent.enterIntField('214748367');
|
||||
await cardViewPageComponent.clickOnIntSaveIcon();
|
||||
|
||||
expect(cardViewPageComponent.getOutputText(0)).toBe('[CardView Int Item] - 214748367');
|
||||
await expect(await cardViewPageComponent.getOutputText(0)).toBe('[CardView Int Item] - 214748367');
|
||||
|
||||
cardViewPageComponent
|
||||
.clickOnIntField()
|
||||
.enterIntField('2147483648')
|
||||
.clickOnIntSaveIcon();
|
||||
await cardViewPageComponent.clickOnIntField();
|
||||
await cardViewPageComponent.enterIntField('2147483648');
|
||||
await cardViewPageComponent.clickOnIntSaveIcon();
|
||||
|
||||
expect(cardViewPageComponent.getErrorInt()).toBe('Use an integer format');
|
||||
await expect(await cardViewPageComponent.getErrorInt()).toBe('Use an integer format');
|
||||
});
|
||||
|
||||
it('[C279951] Should be possible undo item modify when click on the clear button', () => {
|
||||
cardViewPageComponent
|
||||
.clickOnIntField()
|
||||
.enterIntField('999')
|
||||
.clickOnIntClearIcon();
|
||||
it('[C279951] Should be possible undo item modify when click on the clear button', async () => {
|
||||
await cardViewPageComponent.clickOnIntField();
|
||||
await cardViewPageComponent.enterIntField('999');
|
||||
await cardViewPageComponent.clickOnIntClearIcon();
|
||||
|
||||
expect(cardViewPageComponent.getIntFieldText()).toBe('213');
|
||||
await expect(await cardViewPageComponent.getIntFieldText()).toBe('213');
|
||||
});
|
||||
});
|
||||
|
||||
describe('Float', () => {
|
||||
|
||||
it('[C279941] Should the label be present', () => {
|
||||
it('[C279941] Should the label be present', async () => {
|
||||
const label = element(by.css('div[data-automation-id="card-textitem-label-float"]'));
|
||||
|
||||
BrowserVisibility.waitUntilElementIsPresent(label);
|
||||
await BrowserVisibility.waitUntilElementIsPresent(label);
|
||||
});
|
||||
|
||||
it('[C279952] Should be present a default value', () => {
|
||||
expect(cardViewPageComponent.getFloatFieldText()).toBe('9.9');
|
||||
it('[C279952] Should be present a default value', async () => {
|
||||
await expect(await cardViewPageComponent.getFloatFieldText()).toBe('9.9');
|
||||
});
|
||||
|
||||
it('[C279953] Should be possible edit float item', () => {
|
||||
cardViewPageComponent
|
||||
.clickOnFloatField()
|
||||
.enterFloatField('77.33')
|
||||
.clickOnFloatSaveIcon();
|
||||
it('[C279953] Should be possible edit float item', async () => {
|
||||
await cardViewPageComponent.clickOnFloatField();
|
||||
await cardViewPageComponent.enterFloatField('77.33');
|
||||
await cardViewPageComponent.clickOnFloatSaveIcon();
|
||||
|
||||
expect(cardViewPageComponent.getOutputText(0)).toBe('[CardView Float Item] - 77.33');
|
||||
await expect(await cardViewPageComponent.getOutputText(0)).toBe('[CardView Float Item] - 77.33');
|
||||
});
|
||||
|
||||
it('[C279954] Should not be possible add string value to the float item', () => {
|
||||
cardViewPageComponent
|
||||
.clickOnFloatField()
|
||||
.enterFloatField('string value')
|
||||
.clickOnFloatSaveIcon();
|
||||
it('[C279954] Should not be possible add string value to the float item', async () => {
|
||||
await cardViewPageComponent.clickOnFloatField();
|
||||
await cardViewPageComponent.enterFloatField('string value');
|
||||
await cardViewPageComponent.clickOnFloatSaveIcon();
|
||||
|
||||
expect(cardViewPageComponent.getErrorFloat()).toBe('Use a number format');
|
||||
await expect(await cardViewPageComponent.getErrorFloat()).toBe('Use a number format');
|
||||
});
|
||||
|
||||
it('[C279955] Should be possible undo item item modify when click on the clear button', () => {
|
||||
cardViewPageComponent
|
||||
.clickOnFloatField()
|
||||
.enterFloatField('77.33')
|
||||
.clickOnFloatClearIcon();
|
||||
it('[C279955] Should be possible undo item item modify when click on the clear button', async () => {
|
||||
await cardViewPageComponent.clickOnFloatField();
|
||||
await cardViewPageComponent.enterFloatField('77.33');
|
||||
await cardViewPageComponent.clickOnFloatClearIcon();
|
||||
|
||||
expect(cardViewPageComponent.getFloatFieldText()).toBe('9.9');
|
||||
await expect(await cardViewPageComponent.getFloatFieldText()).toBe('9.9');
|
||||
});
|
||||
|
||||
it('[C279956] Should not be possible have an empty value', () => {
|
||||
cardViewPageComponent
|
||||
.clickOnFloatField()
|
||||
.enterFloatField(' ')
|
||||
.clickOnFloatSaveIcon();
|
||||
it('[C279956] Should not be possible have an empty value', async () => {
|
||||
await cardViewPageComponent.clickOnFloatField();
|
||||
await cardViewPageComponent.enterFloatField(' ');
|
||||
await cardViewPageComponent.clickOnFloatSaveIcon();
|
||||
|
||||
expect(cardViewPageComponent.getErrorFloat()).toBe('Use a number format');
|
||||
await expect(await cardViewPageComponent.getErrorFloat()).toBe('Use a number format');
|
||||
});
|
||||
|
||||
});
|
||||
|
||||
describe('Boolean', () => {
|
||||
|
||||
it('[C279942] Should the label be present', () => {
|
||||
it('[C279942] Should the label be present', async () => {
|
||||
const label = element(by.css('div[data-automation-id="card-boolean-label-boolean"]'));
|
||||
|
||||
BrowserVisibility.waitUntilElementIsPresent(label);
|
||||
await BrowserVisibility.waitUntilElementIsPresent(label);
|
||||
});
|
||||
|
||||
it('[C279957] Should be possible edit the checkbox value when click on it', () => {
|
||||
cardViewPageComponent.checkboxClick();
|
||||
it('[C279957] Should be possible edit the checkbox value when click on it', async () => {
|
||||
await cardViewPageComponent.checkboxClick();
|
||||
|
||||
expect(cardViewPageComponent.getOutputText(0)).toBe('[CardView Boolean Item] - false');
|
||||
await expect(await cardViewPageComponent.getOutputText(0)).toBe('[CardView Boolean Item] - false');
|
||||
|
||||
cardViewPageComponent.checkboxClick();
|
||||
await cardViewPageComponent.checkboxClick();
|
||||
|
||||
expect(cardViewPageComponent.getOutputText(1)).toBe('[CardView Boolean Item] - true');
|
||||
await expect(await cardViewPageComponent.getOutputText(1)).toBe('[CardView Boolean Item] - true');
|
||||
});
|
||||
});
|
||||
|
||||
describe('Date and DateTime', () => {
|
||||
|
||||
it('[C279961] Should the label be present', () => {
|
||||
it('[C279961] Should the label be present', async () => {
|
||||
const labelDate = element(by.css('div[data-automation-id="card-dateitem-label-date"]'));
|
||||
|
||||
BrowserVisibility.waitUntilElementIsPresent(labelDate);
|
||||
await BrowserVisibility.waitUntilElementIsPresent(labelDate);
|
||||
|
||||
const labelDatetime = element(by.css('div[data-automation-id="card-dateitem-label-datetime"]'));
|
||||
|
||||
BrowserVisibility.waitUntilElementIsPresent(labelDatetime);
|
||||
await BrowserVisibility.waitUntilElementIsPresent(labelDatetime);
|
||||
});
|
||||
|
||||
it('[C279962] Should be present a default value', () => {
|
||||
expect(metadataViewPage.getPropertyText('date', 'date')).toEqual('12/24/83');
|
||||
expect(metadataViewPage.getPropertyText('datetime', 'datetime')).toEqual('Dec 24, 1983, 10:00');
|
||||
it('[C279962] Should be present a default value', async () => {
|
||||
await expect(await metadataViewPage.getPropertyText('date', 'date')).toEqual('12/24/83');
|
||||
await expect(await metadataViewPage.getPropertyText('datetime', 'datetime')).toEqual('Dec 24, 1983, 10:00');
|
||||
});
|
||||
|
||||
it('[C312447] Should be able to clear the date field', async () => {
|
||||
await cardViewPageComponent.enableClearDate();
|
||||
await cardViewPageComponent.clearDateField();
|
||||
await expect(await cardViewPageComponent.getDateValue()).toBe('', 'Date field should be cleared');
|
||||
await expect(cardViewPageComponent.getOutputText(0))
|
||||
.toBe('[CardView Date Item] - null');
|
||||
await cardViewPageComponent.clearDateTimeField();
|
||||
await expect(await cardViewPageComponent.getDateTimeValue()).toBe('', 'DateTime field should be cleared');
|
||||
await expect(cardViewPageComponent.getOutputText(1))
|
||||
.toBe('[CardView Datetime Item] - null');
|
||||
});
|
||||
|
||||
});
|
||||
|
||||
it('[C279936] Should not be possible edit any parameter when editable property is false', () => {
|
||||
cardViewPageComponent.disableEdit();
|
||||
it('[C279936] Should not be possible edit any parameter when editable property is false', async () => {
|
||||
await cardViewPageComponent.disableEdit();
|
||||
|
||||
const editIconText = element(by.css('mat-icon[data-automation-id="card-textitem-edit-icon-name"]'));
|
||||
const editIconInt = element(by.css('mat-icon[data-automation-id="card-textitem-edit-icon-int"]'));
|
||||
@@ -286,10 +293,10 @@ describe('CardView Component', () => {
|
||||
const editIconKey = element(by.css('mat-icon[data-automation-id="card-key-value-pairs-button-key-value-pairs"]'));
|
||||
const editIconData = element(by.css('mat-datetimepicker-toggle'));
|
||||
|
||||
BrowserVisibility.waitUntilElementIsNotVisible(editIconText);
|
||||
BrowserVisibility.waitUntilElementIsNotVisible(editIconInt);
|
||||
BrowserVisibility.waitUntilElementIsNotVisible(editIconFloat);
|
||||
BrowserVisibility.waitUntilElementIsNotVisible(editIconKey);
|
||||
BrowserVisibility.waitUntilElementIsNotVisible(editIconData);
|
||||
await BrowserVisibility.waitUntilElementIsNotVisible(editIconText);
|
||||
await BrowserVisibility.waitUntilElementIsNotVisible(editIconInt);
|
||||
await BrowserVisibility.waitUntilElementIsNotVisible(editIconFloat);
|
||||
await BrowserVisibility.waitUntilElementIsNotVisible(editIconKey);
|
||||
await BrowserVisibility.waitUntilElementIsNotVisible(editIconData);
|
||||
});
|
||||
});
|
||||
|
||||
@@ -32,7 +32,7 @@ describe('Datatable component - selection', () => {
|
||||
const navigationBarPage = new NavigationBarPage();
|
||||
const dataTableComponent = new DataTableComponentPage();
|
||||
|
||||
beforeAll(async (done) => {
|
||||
beforeAll(async () => {
|
||||
this.alfrescoJsApi = new AlfrescoApi({
|
||||
provider: 'ECM',
|
||||
hostEcm: browser.params.testConfig.adf_acs.host
|
||||
@@ -46,60 +46,59 @@ describe('Datatable component - selection', () => {
|
||||
|
||||
await navigationBarPage.navigateToDatatable();
|
||||
|
||||
done();
|
||||
});
|
||||
|
||||
afterAll(async () => {
|
||||
await navigationBarPage.clickLogoutButton();
|
||||
});
|
||||
|
||||
it('[C213258] Should be possible change the selection modes when change the selectionMode property', () => {
|
||||
dataTablePage.selectRow('2');
|
||||
dataTableComponent.checkRowIsSelected('Id', '2');
|
||||
expect(dataTablePage.getNumberOfSelectedRows()).toEqual(1);
|
||||
dataTablePage.selectRow('3');
|
||||
dataTableComponent.checkRowIsSelected('Id', '3');
|
||||
expect(dataTablePage.getNumberOfSelectedRows()).toEqual(1);
|
||||
dataTablePage.selectSelectionMode('Multiple');
|
||||
dataTablePage.selectRow('1');
|
||||
dataTableComponent.checkRowIsSelected('Id', '1');
|
||||
dataTablePage.selectRowWithKeyboard('3');
|
||||
dataTableComponent.checkRowIsSelected('Id', '1');
|
||||
dataTableComponent.checkRowIsSelected('Id', '3');
|
||||
dataTablePage.checkRowIsNotSelected('2');
|
||||
dataTablePage.checkRowIsNotSelected('4');
|
||||
dataTablePage.selectSelectionMode('None');
|
||||
dataTablePage.selectRow('1');
|
||||
dataTablePage.checkNoRowIsSelected();
|
||||
it('[C213258] Should be possible change the selection modes when change the selectionMode property', async () => {
|
||||
await dataTablePage.selectRow('2');
|
||||
await dataTableComponent.checkRowIsSelected('Id', '2');
|
||||
await expect(await dataTablePage.getNumberOfSelectedRows()).toEqual(1);
|
||||
await dataTablePage.selectRow('3');
|
||||
await dataTableComponent.checkRowIsSelected('Id', '3');
|
||||
await expect(await dataTablePage.getNumberOfSelectedRows()).toEqual(1);
|
||||
await dataTablePage.selectSelectionMode('Multiple');
|
||||
await dataTablePage.selectRow('1');
|
||||
await dataTableComponent.checkRowIsSelected('Id', '1');
|
||||
await dataTablePage.selectRowWithKeyboard('3');
|
||||
await dataTableComponent.checkRowIsSelected('Id', '1');
|
||||
await dataTableComponent.checkRowIsSelected('Id', '3');
|
||||
await dataTablePage.checkRowIsNotSelected('2');
|
||||
await dataTablePage.checkRowIsNotSelected('4');
|
||||
await dataTablePage.selectSelectionMode('None');
|
||||
await dataTablePage.selectRow('1');
|
||||
await dataTablePage.checkNoRowIsSelected();
|
||||
});
|
||||
|
||||
it('[C260059] Should be possible select multiple row when multiselect is true', () => {
|
||||
dataTablePage.clickMultiSelect();
|
||||
dataTablePage.clickCheckbox('1');
|
||||
dataTablePage.checkRowIsChecked('1');
|
||||
dataTablePage.clickCheckbox('3');
|
||||
dataTablePage.checkRowIsChecked('3');
|
||||
dataTablePage.checkRowIsNotChecked('2');
|
||||
dataTablePage.checkRowIsNotChecked('4');
|
||||
dataTablePage.clickCheckbox('3');
|
||||
dataTablePage.checkRowIsNotChecked('3');
|
||||
dataTablePage.checkRowIsChecked('1');
|
||||
it('[C260059] Should be possible select multiple row when multiselect is true', async () => {
|
||||
await dataTablePage.clickMultiSelect();
|
||||
await dataTablePage.clickCheckbox('1');
|
||||
await dataTablePage.checkRowIsChecked('1');
|
||||
await dataTablePage.clickCheckbox('3');
|
||||
await dataTablePage.checkRowIsChecked('3');
|
||||
await dataTablePage.checkRowIsNotChecked('2');
|
||||
await dataTablePage.checkRowIsNotChecked('4');
|
||||
await dataTablePage.clickCheckbox('3');
|
||||
await dataTablePage.checkRowIsNotChecked('3');
|
||||
await dataTablePage.checkRowIsChecked('1');
|
||||
});
|
||||
|
||||
it('[C260058] Should be possible select all the rows when multiselect is true', () => {
|
||||
dataTablePage.checkAllRows();
|
||||
dataTablePage.checkRowIsChecked('1');
|
||||
dataTablePage.checkRowIsChecked('2');
|
||||
dataTablePage.checkRowIsChecked('3');
|
||||
dataTablePage.checkRowIsChecked('4');
|
||||
it('[C260058] Should be possible select all the rows when multiselect is true', async () => {
|
||||
await dataTablePage.checkAllRows();
|
||||
await dataTablePage.checkRowIsChecked('1');
|
||||
await dataTablePage.checkRowIsChecked('2');
|
||||
await dataTablePage.checkRowIsChecked('3');
|
||||
await dataTablePage.checkRowIsChecked('4');
|
||||
});
|
||||
|
||||
it('[C277262] Should be possible reset the selected row when click on the reset button', () => {
|
||||
dataTablePage.checkRowIsChecked('1');
|
||||
dataTablePage.checkRowIsChecked('2');
|
||||
dataTablePage.checkRowIsChecked('3');
|
||||
dataTablePage.checkRowIsChecked('4');
|
||||
dataTablePage.clickReset();
|
||||
dataTablePage.checkNoRowIsSelected();
|
||||
it('[C277262] Should be possible reset the selected row when click on the reset button', async () => {
|
||||
await dataTablePage.checkRowIsChecked('1');
|
||||
await dataTablePage.checkRowIsChecked('2');
|
||||
await dataTablePage.checkRowIsChecked('3');
|
||||
await dataTablePage.checkRowIsChecked('4');
|
||||
await dataTablePage.clickReset();
|
||||
await dataTablePage.checkNoRowIsSelected();
|
||||
});
|
||||
});
|
||||
|
||||
@@ -43,7 +43,7 @@ describe('Datatable component', () => {
|
||||
'location': resources.Files.ADF_DOCUMENTS.PNG.file_location
|
||||
});
|
||||
|
||||
beforeAll(async (done) => {
|
||||
beforeAll(async () => {
|
||||
this.alfrescoJsApi = new AlfrescoApi({
|
||||
provider: 'ECM',
|
||||
hostEcm: browser.params.testConfig.adf_acs.host
|
||||
@@ -55,7 +55,6 @@ describe('Datatable component', () => {
|
||||
|
||||
await loginPage.loginToContentServicesUsingUserModel(acsUser);
|
||||
|
||||
done();
|
||||
});
|
||||
|
||||
afterAll(async () => {
|
||||
@@ -64,151 +63,153 @@ describe('Datatable component', () => {
|
||||
|
||||
describe('Datatable component', () => {
|
||||
|
||||
beforeAll(async (done) => {
|
||||
navigationBarPage.navigateToDatatable();
|
||||
|
||||
done();
|
||||
beforeAll(async () => {
|
||||
await navigationBarPage.navigateToDatatable();
|
||||
await dataTablePage.dataTable.waitForTableBody();
|
||||
});
|
||||
|
||||
beforeEach(async (done) => {
|
||||
dataTablePage.clickReset();
|
||||
done();
|
||||
beforeEach(async () => {
|
||||
await dataTablePage.clickReset();
|
||||
});
|
||||
|
||||
it('[C91314] Should be possible add new row to the table', () => {
|
||||
dataTableComponent.numberOfRows().then((result) => {
|
||||
dataTablePage.addRow();
|
||||
expect(dataTableComponent.numberOfRows()).toEqual(result + 1);
|
||||
dataTablePage.addRow();
|
||||
expect(dataTableComponent.numberOfRows()).toEqual(result + 2);
|
||||
});
|
||||
it('[C91314] Should be possible add new row to the table', async () => {
|
||||
const result = await dataTableComponent.numberOfRows();
|
||||
await dataTablePage.addRow();
|
||||
await expect(await dataTableComponent.numberOfRows()).toEqual(result + 1);
|
||||
await dataTablePage.addRow();
|
||||
await expect(await dataTableComponent.numberOfRows()).toEqual(result + 2);
|
||||
});
|
||||
|
||||
it('[C260039] Should be possible replace rows', () => {
|
||||
dataTablePage.replaceRows(1);
|
||||
it('[C260039] Should be possible replace rows', async () => {
|
||||
await dataTablePage.replaceRows(1);
|
||||
});
|
||||
|
||||
it('[C260041] Should be possible replace columns', () => {
|
||||
dataTablePage.replaceColumns();
|
||||
it('[C260041] Should be possible replace columns', async () => {
|
||||
await dataTablePage.replaceColumns();
|
||||
});
|
||||
|
||||
it('[C277314] Should filter the table rows when the input filter is passed', () => {
|
||||
dataTablePage.replaceRows(1);
|
||||
dataTablePage.replaceColumns();
|
||||
expect(dataTableComponent.numberOfRows()).toEqual(4);
|
||||
dataTablePage.insertFilter('Name');
|
||||
expect(dataTableComponent.numberOfRows()).toEqual(3);
|
||||
dataTablePage.insertFilter('I');
|
||||
expect(dataTableComponent.numberOfRows()).toEqual(1);
|
||||
it('[C277314] Should filter the table rows when the input filter is passed', async () => {
|
||||
await dataTablePage.replaceRows(1);
|
||||
await dataTablePage.replaceColumns();
|
||||
await expect(await dataTableComponent.numberOfRows()).toEqual(4);
|
||||
await dataTablePage.insertFilter('Name');
|
||||
await expect(await dataTableComponent.numberOfRows()).toEqual(3);
|
||||
await dataTablePage.insertFilter('I');
|
||||
await expect(await dataTableComponent.numberOfRows()).toEqual(1);
|
||||
});
|
||||
});
|
||||
|
||||
describe('Datatable component - copyContent', () => {
|
||||
|
||||
beforeAll(async (done) => {
|
||||
navigationBarPage.navigateToCopyContentDatatable();
|
||||
done();
|
||||
beforeAll(async () => {
|
||||
await navigationBarPage.navigateToCopyContentDatatable();
|
||||
await dataTablePage.dataTable.waitForTableBody();
|
||||
|
||||
});
|
||||
|
||||
it('[C307037] A tooltip is displayed when mouseOver a column with copyContent set to true', () => {
|
||||
dataTablePage.mouseOverIdColumn('1');
|
||||
expect(dataTablePage.getCopyContentTooltip()).toEqual('Click to copy');
|
||||
dataTablePage.mouseOverNameColumn('Name 2');
|
||||
dataTablePage.dataTable.copyContentTooltipIsNotDisplayed();
|
||||
it('[C307037] A tooltip is displayed when mouseOver a column with copyContent set to true', async () => {
|
||||
await dataTablePage.mouseOverIdColumn('1');
|
||||
await expect(await dataTablePage.getCopyContentTooltip()).toEqual('Click to copy');
|
||||
await dataTablePage.mouseOverNameColumn('Name 2');
|
||||
await dataTablePage.dataTable.copyContentTooltipIsNotDisplayed();
|
||||
});
|
||||
|
||||
it('[C307045] No tooltip is displayed when hover over a column with copyContent set to false', () => {
|
||||
dataTablePage.mouseOverNameColumn('Name 2');
|
||||
dataTablePage.dataTable.copyContentTooltipIsNotDisplayed();
|
||||
dataTablePage.clickOnNameColumn('Name 2');
|
||||
notificationHistoryPage.checkNotifyNotContains('Name 2');
|
||||
it('[C307045] No tooltip is displayed when hover over a column with copyContent set to false', async () => {
|
||||
await dataTablePage.mouseOverNameColumn('Name 2');
|
||||
await dataTablePage.dataTable.copyContentTooltipIsNotDisplayed();
|
||||
await dataTablePage.clickOnNameColumn('Name 2');
|
||||
await notificationHistoryPage.checkNotifyNotContains('Name 2');
|
||||
});
|
||||
|
||||
it('[C307046] No tooltip is displayed when hover over a column that has default value for copyContent property', () => {
|
||||
dataTablePage.mouseOverCreatedByColumn('Created One');
|
||||
dataTablePage.dataTable.copyContentTooltipIsNotDisplayed();
|
||||
dataTablePage.clickOnCreatedByColumn('Created One');
|
||||
notificationHistoryPage.checkNotifyNotContains('Created One');
|
||||
it('[C307046] No tooltip is displayed when hover over a column that has default value for copyContent property', async () => {
|
||||
await dataTablePage.mouseOverCreatedByColumn('Created One');
|
||||
await dataTablePage.dataTable.copyContentTooltipIsNotDisplayed();
|
||||
await dataTablePage.clickOnCreatedByColumn('Created One');
|
||||
await notificationHistoryPage.checkNotifyNotContains('Created One');
|
||||
});
|
||||
|
||||
it('[C307040] A column value with copyContent set to true is copied when clicking on it', () => {
|
||||
dataTablePage.mouseOverIdColumn('1');
|
||||
expect(dataTablePage.getCopyContentTooltip()).toEqual('Click to copy');
|
||||
dataTablePage.clickOnIdColumn('1');
|
||||
notificationHistoryPage.checkNotifyContains('Text copied to clipboard');
|
||||
dataTablePage.clickOnIdColumn('2');
|
||||
notificationHistoryPage.checkNotifyContains('Text copied to clipboard');
|
||||
dataTablePage.pasteClipboard();
|
||||
expect(dataTablePage.getClipboardInputText()).toEqual('2');
|
||||
it('[C307040] A column value with copyContent set to true is copied when clicking on it', async () => {
|
||||
await dataTablePage.mouseOverIdColumn('1');
|
||||
await expect(await dataTablePage.getCopyContentTooltip()).toEqual('Click to copy');
|
||||
await dataTablePage.clickOnIdColumn('1');
|
||||
await notificationHistoryPage.checkNotifyContains('Text copied to clipboard');
|
||||
await dataTablePage.clickOnIdColumn('2');
|
||||
await notificationHistoryPage.checkNotifyContains('Text copied to clipboard');
|
||||
await dataTablePage.pasteClipboard();
|
||||
await expect(await dataTablePage.getClipboardInputText()).toEqual('2');
|
||||
});
|
||||
|
||||
it('[C307072] A tooltip is displayed when mouseOver a column with copyContent set to true', () => {
|
||||
copyContentDataTablePage.mouseOverIdColumn('1');
|
||||
expect(copyContentDataTablePage.getCopyContentTooltip()).toEqual('Click to copy');
|
||||
copyContentDataTablePage.mouseOverNameColumn('First');
|
||||
copyContentDataTablePage.dataTable.copyContentTooltipIsNotDisplayed();
|
||||
it('[C307072] A tooltip is displayed when mouseOver a column with copyContent set to true', async () => {
|
||||
await copyContentDataTablePage.mouseOverIdColumn('1');
|
||||
await expect(await copyContentDataTablePage.getCopyContentTooltip()).toEqual('Click to copy');
|
||||
await copyContentDataTablePage.mouseOverNameColumn('First');
|
||||
await copyContentDataTablePage.dataTable.copyContentTooltipIsNotDisplayed();
|
||||
});
|
||||
|
||||
it('[C307074] No tooltip is displayed when hover over a column with copyContent set to false', () => {
|
||||
copyContentDataTablePage.mouseOverNameColumn('Second');
|
||||
copyContentDataTablePage.dataTable.copyContentTooltipIsNotDisplayed();
|
||||
copyContentDataTablePage.clickOnNameColumn('Second');
|
||||
notificationHistoryPage.checkNotifyNotContains('Second');
|
||||
it('[C307074] No tooltip is displayed when hover over a column with copyContent set to false', async () => {
|
||||
await copyContentDataTablePage.mouseOverNameColumn('Second');
|
||||
await copyContentDataTablePage.dataTable.copyContentTooltipIsNotDisplayed();
|
||||
await copyContentDataTablePage.clickOnNameColumn('Second');
|
||||
await notificationHistoryPage.checkNotifyNotContains('Second');
|
||||
});
|
||||
|
||||
it('[C307075] No tooltip is displayed when hover over a column that has default value for copyContent property', () => {
|
||||
copyContentDataTablePage.mouseOverCreatedByColumn('Created one');
|
||||
copyContentDataTablePage.dataTable.copyContentTooltipIsNotDisplayed();
|
||||
copyContentDataTablePage.clickOnCreatedByColumn('Created one');
|
||||
notificationHistoryPage.checkNotifyNotContains('Created One');
|
||||
it('[C307075] No tooltip is displayed when hover over a column that has default value for copyContent property', async () => {
|
||||
await copyContentDataTablePage.mouseOverCreatedByColumn('Created one');
|
||||
await copyContentDataTablePage.dataTable.copyContentTooltipIsNotDisplayed();
|
||||
await copyContentDataTablePage.clickOnCreatedByColumn('Created one');
|
||||
await notificationHistoryPage.checkNotifyNotContains('Created One');
|
||||
});
|
||||
|
||||
it('[C307073] A column value with copyContent set to true is copied when clicking on it', () => {
|
||||
copyContentDataTablePage.mouseOverIdColumn('1');
|
||||
expect(copyContentDataTablePage.getCopyContentTooltip()).toEqual('Click to copy');
|
||||
copyContentDataTablePage.clickOnIdColumn('1');
|
||||
notificationHistoryPage.checkNotifyContains('Text copied to clipboard');
|
||||
copyContentDataTablePage.clickOnIdColumn('2');
|
||||
notificationHistoryPage.checkNotifyContains('Text copied to clipboard');
|
||||
copyContentDataTablePage.pasteClipboard();
|
||||
expect(copyContentDataTablePage.getClipboardInputText()).toEqual('2');
|
||||
it('[C307073] A column value with copyContent set to true is copied when clicking on it', async () => {
|
||||
await copyContentDataTablePage.mouseOverIdColumn('1');
|
||||
await expect(await copyContentDataTablePage.getCopyContentTooltip()).toEqual('Click to copy');
|
||||
await copyContentDataTablePage.clickOnIdColumn('1');
|
||||
await notificationHistoryPage.checkNotifyContains('Text copied to clipboard');
|
||||
await copyContentDataTablePage.clickOnIdColumn('2');
|
||||
await notificationHistoryPage.checkNotifyContains('Text copied to clipboard');
|
||||
await copyContentDataTablePage.pasteClipboard();
|
||||
await expect(await copyContentDataTablePage.getClipboardInputText()).toEqual('2');
|
||||
});
|
||||
|
||||
it('[C307100] A column value of type text and with copyContent set to true is copied when clicking on it', () => {
|
||||
dataTablePage.mouseOverIdColumn('1');
|
||||
expect(dataTablePage.getCopyContentTooltip()).toEqual('Click to copy');
|
||||
dataTablePage.clickOnIdColumn('1');
|
||||
notificationHistoryPage.checkNotifyContains('Text copied to clipboard');
|
||||
dataTablePage.pasteClipboard();
|
||||
expect(dataTablePage.getClipboardInputText()).toEqual('1');
|
||||
it('[C307100] A column value of type text and with copyContent set to true is copied when clicking on it', async () => {
|
||||
await dataTablePage.mouseOverIdColumn('1');
|
||||
await expect(await dataTablePage.getCopyContentTooltip()).toEqual('Click to copy');
|
||||
await dataTablePage.clickOnIdColumn('1');
|
||||
await notificationHistoryPage.checkNotifyContains('Text copied to clipboard');
|
||||
await dataTablePage.pasteClipboard();
|
||||
await expect(await dataTablePage.getClipboardInputText()).toEqual('1');
|
||||
});
|
||||
|
||||
it('[C307101] A column value of type json and with copyContent set to true is copied when clicking on it', () => {
|
||||
it('[C307101] A column value of type json and with copyContent set to true is copied when clicking on it', async () => {
|
||||
const jsonValue = `{ "id": 4 }`;
|
||||
copyContentDataTablePage.mouseOverJsonColumn(2);
|
||||
expect(copyContentDataTablePage.getCopyContentTooltip()).toEqual('Click to copy');
|
||||
copyContentDataTablePage.clickOnJsonColumn(2);
|
||||
notificationHistoryPage.checkNotifyContains('Text copied to clipboard');
|
||||
copyContentDataTablePage.pasteClipboard();
|
||||
expect(copyContentDataTablePage.getClipboardInputText()).toContain(jsonValue);
|
||||
await copyContentDataTablePage.mouseOverJsonColumn(2);
|
||||
await expect(await copyContentDataTablePage.getCopyContentTooltip()).toEqual('Click to copy');
|
||||
await copyContentDataTablePage.clickOnJsonColumn(2);
|
||||
await notificationHistoryPage.checkNotifyContains('Text copied to clipboard');
|
||||
await copyContentDataTablePage.pasteClipboard();
|
||||
await expect(await copyContentDataTablePage.getClipboardInputText()).toContain(jsonValue);
|
||||
});
|
||||
|
||||
afterAll(async () => {
|
||||
await navigationBarPage.clickHomeButton();
|
||||
});
|
||||
});
|
||||
|
||||
describe('Datatable component - Drag and Drop', () => {
|
||||
|
||||
beforeAll(async (done) => {
|
||||
navigationBarPage.navigateToDragAndDropDatatable();
|
||||
done();
|
||||
beforeAll(async () => {
|
||||
await navigationBarPage.navigateToDragAndDropDatatable();
|
||||
await dragAndDropDataTablePage.dataTable.waitForTableBody();
|
||||
});
|
||||
|
||||
it('[C307984] Should trigger the event handling header-drop and cell-drop', () => {
|
||||
it('[C307984] Should trigger the event handling header-drop and cell-drop', async () => {
|
||||
const dragAndDropHeader = dragAndDropDataTablePage.getDropTargetIdColumnHeader();
|
||||
dragAndDrop.dropFile(dragAndDropHeader, pngFile.location);
|
||||
notificationHistoryPage.checkNotifyContains('Dropped data on [ id ] header');
|
||||
await dragAndDrop.dropFile(dragAndDropHeader, pngFile.location);
|
||||
await notificationHistoryPage.checkNotifyContains('Dropped data on [ id ] header');
|
||||
|
||||
const dragAndDropCell = dragAndDropDataTablePage.getDropTargetIdColumnCell(1);
|
||||
dragAndDrop.dropFile(dragAndDropCell, pngFile.location);
|
||||
notificationHistoryPage.checkNotifyContains('Dropped data on [ id ] cell');
|
||||
await dragAndDrop.dropFile(dragAndDropCell, pngFile.location);
|
||||
await notificationHistoryPage.checkNotifyContains('Dropped data on [ id ] cell');
|
||||
});
|
||||
});
|
||||
});
|
||||
|
||||
@@ -28,7 +28,7 @@ describe('Error Component', () => {
|
||||
const errorPage = new ErrorPage();
|
||||
const navigationBarPage = new NavigationBarPage();
|
||||
|
||||
beforeAll(async (done) => {
|
||||
beforeAll(async () => {
|
||||
this.alfrescoJsApi = new AlfrescoApi({
|
||||
provider: 'ECM',
|
||||
hostEcm: browser.params.testConfig.adf_acs.host
|
||||
@@ -38,49 +38,47 @@ describe('Error Component', () => {
|
||||
await this.alfrescoJsApi.core.peopleApi.addPerson(acsUser);
|
||||
await loginPage.loginToContentServicesUsingUserModel(acsUser);
|
||||
|
||||
done();
|
||||
|
||||
});
|
||||
|
||||
afterAll(async () => {
|
||||
await navigationBarPage.clickLogoutButton();
|
||||
});
|
||||
|
||||
it('[C277302] Should display the error 403 when access to unauthorized page - My Change', () => {
|
||||
BrowserActions.getUrl(browser.params.testConfig.adf.url + '/error/403');
|
||||
expect(errorPage.getErrorCode()).toBe('403');
|
||||
expect(errorPage.getErrorTitle()).toBe('You don\'t have permission to access this server.');
|
||||
expect(errorPage.getErrorDescription()).toBe('You\'re not allowed access to this resource on the server.');
|
||||
it('[C277302] Should display the error 403 when access to unauthorized page - My Change', async () => {
|
||||
await BrowserActions.getUrl(browser.params.testConfig.adf.url + '/error/403');
|
||||
await expect(await errorPage.getErrorCode()).toBe('403');
|
||||
await expect(await errorPage.getErrorTitle()).toBe('You don\'t have permission to access this server.');
|
||||
await expect(await errorPage.getErrorDescription()).toBe('You\'re not allowed access to this resource on the server.');
|
||||
});
|
||||
|
||||
it('[C280563] Should back home button navigate to the home page', () => {
|
||||
BrowserActions.getUrl(browser.params.testConfig.adf.url + '/error/404');
|
||||
it('[C280563] Should back home button navigate to the home page', async () => {
|
||||
await BrowserActions.getUrl(browser.params.testConfig.adf.url + '/error/404');
|
||||
|
||||
errorPage.clickBackButton();
|
||||
await errorPage.clickBackButton();
|
||||
|
||||
expect(browser.getCurrentUrl()).toBe(browser.params.testConfig.adf.url + '/');
|
||||
await expect(await browser.getCurrentUrl()).toBe(browser.params.testConfig.adf.url + '/');
|
||||
});
|
||||
|
||||
it('[C280564] Should secondary button by default redirect to report-issue URL', () => {
|
||||
BrowserActions.getUrl(browser.params.testConfig.adf.url + '/error/403');
|
||||
it('[C280564] Should secondary button by default redirect to report-issue URL', async () => {
|
||||
await BrowserActions.getUrl(browser.params.testConfig.adf.url + '/error/403');
|
||||
|
||||
errorPage.clickSecondButton();
|
||||
await errorPage.clickSecondButton();
|
||||
|
||||
expect(browser.getCurrentUrl()).toBe(browser.params.testConfig.adf.url + '/report-issue');
|
||||
await expect(await browser.getCurrentUrl()).toBe(browser.params.testConfig.adf.url + '/report-issue');
|
||||
});
|
||||
|
||||
it('[C277304] Should display the error 404 when access to not found page', () => {
|
||||
BrowserActions.getUrl(browser.params.testConfig.adf.url + '/error/404');
|
||||
expect(errorPage.getErrorCode()).toBe('404');
|
||||
expect(errorPage.getErrorTitle()).toBe('An error occurred.');
|
||||
expect(errorPage.getErrorDescription()).toBe('We couldn’t find the page you were looking for.');
|
||||
it('[C277304] Should display the error 404 when access to not found page', async () => {
|
||||
await BrowserActions.getUrl(browser.params.testConfig.adf.url + '/error/404');
|
||||
await expect(await errorPage.getErrorCode()).toBe('404');
|
||||
await expect(await errorPage.getErrorTitle()).toBe('An error occurred.');
|
||||
await expect(await errorPage.getErrorDescription()).toBe('We couldn’t find the page you were looking for.');
|
||||
});
|
||||
|
||||
it('[C307029] Should display Unknown message when error is undefined', () => {
|
||||
BrowserActions.getUrl(browser.params.testConfig.adf.url + '/error/501');
|
||||
expect(errorPage.getErrorCode()).toBe('UNKNOWN');
|
||||
expect(errorPage.getErrorTitle()).toBe('We hit a problem.');
|
||||
expect(errorPage.getErrorDescription()).toBe('Looks like something went wrong.');
|
||||
it('[C307029] Should display Unknown message when error is undefined', async () => {
|
||||
await BrowserActions.getUrl(browser.params.testConfig.adf.url + '/error/501');
|
||||
await expect(await errorPage.getErrorCode()).toBe('UNKNOWN');
|
||||
await expect(await errorPage.getErrorTitle()).toBe('We hit a problem.');
|
||||
await expect(await errorPage.getErrorDescription()).toBe('Looks like something went wrong.');
|
||||
});
|
||||
|
||||
});
|
||||
|
||||
@@ -46,7 +46,7 @@ describe('Header Component', () => {
|
||||
logo_tooltip: 'test_tooltip'
|
||||
};
|
||||
|
||||
beforeAll(async(done) => {
|
||||
beforeAll(async() => {
|
||||
this.alfrescoJsApi = new AlfrescoApi({
|
||||
provider: 'BPM',
|
||||
hostBpm: browser.params.testConfig.adf_aps.host
|
||||
@@ -64,85 +64,83 @@ describe('Header Component', () => {
|
||||
|
||||
await loginPage.loginToProcessServicesUsingUserModel(user);
|
||||
|
||||
done();
|
||||
});
|
||||
|
||||
beforeEach(async(done) => {
|
||||
navigationBarPage.clickHeaderDataButton();
|
||||
done();
|
||||
beforeEach(async() => {
|
||||
await navigationBarPage.clickHeaderDataButton();
|
||||
});
|
||||
|
||||
afterAll(async(done) => {
|
||||
afterAll(async() => {
|
||||
await navigationBarPage.clickLogoutButton();
|
||||
await this.alfrescoJsApi.login(browser.params.testConfig.adf.adminEmail, browser.params.testConfig.adf.adminPassword);
|
||||
await this.alfrescoJsApi.activiti.adminTenantsApi.deleteTenant(tenantId);
|
||||
done();
|
||||
|
||||
});
|
||||
|
||||
it('[C280002] Should be able to view Header component', () => {
|
||||
headerPage.checkShowMenuCheckBoxIsDisplayed();
|
||||
headerPage.checkChooseHeaderColourIsDisplayed();
|
||||
headerPage.checkHexColorInputIsDisplayed();
|
||||
headerPage.checkChangeTitleIsDisplayed();
|
||||
headerPage.checkChangeUrlPathIsDisplayed();
|
||||
headerPage.checkLogoHyperlinkInputIsDisplayed();
|
||||
headerPage.checkLogoTooltipInputIsDisplayed();
|
||||
it('[C280002] Should be able to view Header component', async () => {
|
||||
await headerPage.checkShowMenuCheckBoxIsDisplayed();
|
||||
await headerPage.checkChooseHeaderColourIsDisplayed();
|
||||
await headerPage.checkHexColorInputIsDisplayed();
|
||||
await headerPage.checkChangeTitleIsDisplayed();
|
||||
await headerPage.checkChangeUrlPathIsDisplayed();
|
||||
await headerPage.checkLogoHyperlinkInputIsDisplayed();
|
||||
await headerPage.checkLogoTooltipInputIsDisplayed();
|
||||
});
|
||||
|
||||
it('[C279996] Should be able to show/hide menu button', () => {
|
||||
headerPage.clickShowMenuButton();
|
||||
navigationBarPage.checkMenuButtonIsNotDisplayed();
|
||||
headerPage.clickShowMenuButton();
|
||||
navigationBarPage.checkMenuButtonIsDisplayed();
|
||||
it('[C279996] Should be able to show/hide menu button', async () => {
|
||||
await headerPage.clickShowMenuButton();
|
||||
await navigationBarPage.checkMenuButtonIsNotDisplayed();
|
||||
await headerPage.clickShowMenuButton();
|
||||
await navigationBarPage.checkMenuButtonIsDisplayed();
|
||||
});
|
||||
|
||||
it('[C279999] Should be able to change the colour between primary, accent and warn', () => {
|
||||
headerPage.changeHeaderColor(names.color_accent);
|
||||
navigationBarPage.checkToolbarColor(names.color_accent);
|
||||
headerPage.changeHeaderColor(names.color_primary);
|
||||
navigationBarPage.checkToolbarColor(names.color_primary);
|
||||
headerPage.changeHeaderColor(names.color_warn);
|
||||
navigationBarPage.checkToolbarColor(names.color_warn);
|
||||
it('[C279999] Should be able to change the colour between primary, accent and warn', async () => {
|
||||
await headerPage.changeHeaderColor(names.color_accent);
|
||||
await navigationBarPage.checkToolbarColor(names.color_accent);
|
||||
await headerPage.changeHeaderColor(names.color_primary);
|
||||
await navigationBarPage.checkToolbarColor(names.color_primary);
|
||||
await headerPage.changeHeaderColor(names.color_warn);
|
||||
await navigationBarPage.checkToolbarColor(names.color_warn);
|
||||
});
|
||||
|
||||
it('[C280552] Should be able to change the colour of the header by typing a hex code', () => {
|
||||
headerPage.addHexCodeColor(names.color_custom);
|
||||
navigationBarPage.checkToolbarColor(names.color_custom);
|
||||
it('[C280552] Should be able to change the colour of the header by typing a hex code', async () => {
|
||||
await headerPage.addHexCodeColor(names.color_custom);
|
||||
await navigationBarPage.checkToolbarColor(names.color_custom);
|
||||
});
|
||||
|
||||
it('[C279997] Should be able to change the title of the app', () => {
|
||||
headerPage.checkAppTitle(names.app_title_default);
|
||||
headerPage.addTitle(names.app_title_custom);
|
||||
headerPage.checkAppTitle(names.app_title_custom);
|
||||
it('[C279997] Should be able to change the title of the app', async () => {
|
||||
await headerPage.checkAppTitle(names.app_title_default);
|
||||
await headerPage.addTitle(names.app_title_custom);
|
||||
await headerPage.checkAppTitle(names.app_title_custom);
|
||||
});
|
||||
|
||||
it('[C279998] Should be able to change the default logo of the app', () => {
|
||||
headerPage.checkIconIsDisplayed(names.urlPath_default);
|
||||
headerPage.addIcon(names.urlPath_custom);
|
||||
headerPage.checkIconIsDisplayed(names.urlPath_custom);
|
||||
it('[C279998] Should be able to change the default logo of the app', async () => {
|
||||
await headerPage.checkIconIsDisplayed(names.urlPath_default);
|
||||
await headerPage.addIcon(names.urlPath_custom);
|
||||
await headerPage.checkIconIsDisplayed(names.urlPath_custom);
|
||||
});
|
||||
|
||||
it('[C280553] Should be able to set a hyperlink to the logo', () => {
|
||||
headerPage.addLogoHyperlink(names.urlPath_logo_link);
|
||||
navigationBarPage.clickAppLogo(names.logo_title);
|
||||
settingsPage.checkProviderDropdownIsDisplayed();
|
||||
it('[C280553] Should be able to set a hyperlink to the logo', async () => {
|
||||
await headerPage.addLogoHyperlink(names.urlPath_logo_link);
|
||||
await navigationBarPage.clickAppLogo(names.logo_title);
|
||||
await settingsPage.checkProviderDropdownIsDisplayed();
|
||||
});
|
||||
|
||||
it('[C286517] Should be able to set a hyperlink to the logo text', () => {
|
||||
headerPage.addLogoHyperlink(names.urlPath_logo_link);
|
||||
navigationBarPage.clickAppLogoText();
|
||||
settingsPage.checkProviderDropdownIsDisplayed();
|
||||
it('[C286517] Should be able to set a hyperlink to the logo text', async () => {
|
||||
await headerPage.addLogoHyperlink(names.urlPath_logo_link);
|
||||
await navigationBarPage.clickAppLogoText();
|
||||
await settingsPage.checkProviderDropdownIsDisplayed();
|
||||
});
|
||||
|
||||
it('[C280554] Should be able to customise the tooltip-text of the logo', () => {
|
||||
headerPage.addLogoTooltip(names.logo_tooltip);
|
||||
navigationBarPage.checkLogoTooltip(names.logo_tooltip);
|
||||
it('[C280554] Should be able to customise the tooltip-text of the logo', async () => {
|
||||
await headerPage.addLogoTooltip(names.logo_tooltip);
|
||||
await navigationBarPage.checkLogoTooltip(names.logo_tooltip);
|
||||
});
|
||||
|
||||
it('[C286297] Should be able to change the position of the sidebar menu', () => {
|
||||
headerPage.sideBarPositionEnd();
|
||||
headerPage.checkSidebarPositionEnd();
|
||||
headerPage.sideBarPositionStart();
|
||||
headerPage.checkSidebarPositionStart();
|
||||
it('[C286297] Should be able to change the position of the sidebar menu', async () => {
|
||||
await headerPage.sideBarPositionEnd();
|
||||
await headerPage.checkSidebarPositionEnd();
|
||||
await headerPage.sideBarPositionStart();
|
||||
await headerPage.checkSidebarPositionStart();
|
||||
});
|
||||
});
|
||||
|
||||
@@ -23,14 +23,14 @@ import { AcsUserModel } from '../models/ACS/acsUserModel';
|
||||
import { browser } from 'protractor';
|
||||
import { AlfrescoApiCompatibility as AlfrescoApi } from '@alfresco/js-api';
|
||||
|
||||
describe('Universal Icon component', function () {
|
||||
describe('Universal Icon component', () => {
|
||||
|
||||
const loginPage = new LoginPage();
|
||||
const acsUser = new AcsUserModel();
|
||||
const navigationBarPage = new NavigationBarPage();
|
||||
const iconsPage = new IconsPage();
|
||||
|
||||
beforeAll(async (done) => {
|
||||
beforeAll(async () => {
|
||||
this.alfrescoJsApi = new AlfrescoApi({
|
||||
provider: 'ECM',
|
||||
hostEcm: browser.params.testConfig.adf_acs.host
|
||||
@@ -40,25 +40,21 @@ describe('Universal Icon component', function () {
|
||||
await this.alfrescoJsApi.core.peopleApi.addPerson(acsUser);
|
||||
await loginPage.loginToContentServicesUsingUserModel(acsUser);
|
||||
|
||||
done();
|
||||
});
|
||||
|
||||
afterAll(async () => {
|
||||
await navigationBarPage.clickLogoutButton();
|
||||
});
|
||||
|
||||
beforeEach(async (done) => {
|
||||
navigationBarPage.navigateToIconsPage();
|
||||
done();
|
||||
beforeEach(async () => {
|
||||
await navigationBarPage.clickIconsButton();
|
||||
|
||||
});
|
||||
|
||||
it('[C291872] Should display the icons on the page', () => {
|
||||
|
||||
expect(iconsPage.locateLigatureIcon('folder').isDisplayed()).toBe(true, 'Ligature icon is not displayed');
|
||||
|
||||
expect(iconsPage.locateCustomIcon('adf:move_file').isDisplayed()).toBe(true, 'Named icon is not displayed');
|
||||
|
||||
expect(iconsPage.locateCustomIcon('adf:folder').isDisplayed()).toBe(true, 'Thumbnail service icon is not displayed');
|
||||
it('[C291872] Should display the icons on the page', async () => {
|
||||
await expect(await iconsPage.isLigatureIconDisplayed('folder')).toBe(true, 'Ligature icon is not displayed');
|
||||
await expect(await iconsPage.isCustomIconDisplayed('adf:move_file')).toBe(true, 'Named icon is not displayed');
|
||||
await expect(await iconsPage.isCustomIconDisplayed('adf:folder')).toBe(true, 'Thumbnail service icon is not displayed');
|
||||
});
|
||||
|
||||
});
|
||||
|
||||
@@ -52,7 +52,7 @@ describe('Enable infinite scrolling', () => {
|
||||
extension: '.txt'
|
||||
};
|
||||
|
||||
beforeAll(async (done) => {
|
||||
beforeAll(async () => {
|
||||
this.alfrescoJsApi = new AlfrescoApi({
|
||||
provider: 'ECM',
|
||||
hostEcm: browser.params.testConfig.adf_acs.host
|
||||
@@ -79,81 +79,80 @@ describe('Enable infinite scrolling', () => {
|
||||
|
||||
await uploadActions.createEmptyFiles(deleteFileNames, deleteUploaded.entry.id);
|
||||
|
||||
done();
|
||||
});
|
||||
|
||||
afterAll(async () => {
|
||||
await navigationBarPage.clickLogoutButton();
|
||||
});
|
||||
|
||||
beforeEach(async (done) => {
|
||||
navigationBarPage.clickContentServicesButton();
|
||||
contentServicesPage.checkAcsContainer();
|
||||
done();
|
||||
beforeEach(async () => {
|
||||
await navigationBarPage.clickContentServicesButton();
|
||||
await contentServicesPage.checkAcsContainer();
|
||||
|
||||
});
|
||||
|
||||
it('[C260484] Should be possible to enable infinite scrolling', () => {
|
||||
contentServicesPage.doubleClickRow(folderModel.name);
|
||||
contentServicesPage.enableInfiniteScrolling();
|
||||
infinitePaginationPage.clickLoadMoreButton();
|
||||
it('[C260484] Should be possible to enable infinite scrolling', async () => {
|
||||
await contentServicesPage.doubleClickRow(folderModel.name);
|
||||
await contentServicesPage.enableInfiniteScrolling();
|
||||
await infinitePaginationPage.clickLoadMoreButton();
|
||||
for (let i = 0; i < nrOfFiles; i++) {
|
||||
contentServicesPage.checkContentIsDisplayed(fileNames[i]);
|
||||
await contentServicesPage.checkContentIsDisplayed(fileNames[i]);
|
||||
}
|
||||
});
|
||||
|
||||
it('[C268165] Delete folder when infinite scrolling is enabled', () => {
|
||||
contentServicesPage.doubleClickRow(deleteUploaded.entry.name);
|
||||
contentServicesPage.checkAcsContainer();
|
||||
contentServicesPage.waitForTableBody();
|
||||
contentServicesPage.enableInfiniteScrolling();
|
||||
infinitePaginationPage.clickLoadMoreButton();
|
||||
it('[C268165] Delete folder when infinite scrolling is enabled', async () => {
|
||||
await contentServicesPage.doubleClickRow(deleteUploaded.entry.name);
|
||||
await contentServicesPage.checkAcsContainer();
|
||||
await contentServicesPage.waitForTableBody();
|
||||
await contentServicesPage.enableInfiniteScrolling();
|
||||
await infinitePaginationPage.clickLoadMoreButton();
|
||||
for (let i = 0; i < nrOfDeletedFiles; i++) {
|
||||
contentServicesPage.checkContentIsDisplayed(deleteFileNames[i]);
|
||||
await contentServicesPage.checkContentIsDisplayed(deleteFileNames[i]);
|
||||
}
|
||||
expect(contentServicesPage.getContentList().dataTablePage().numberOfRows()).toEqual(nrOfDeletedFiles);
|
||||
await expect(await contentServicesPage.getDocumentList().dataTablePage().numberOfRows()).toEqual(nrOfDeletedFiles);
|
||||
|
||||
contentServicesPage.deleteContent(deleteFileNames[nrOfDeletedFiles - 1]);
|
||||
contentServicesPage.checkContentIsNotDisplayed(deleteFileNames[nrOfDeletedFiles - 1]);
|
||||
await contentServicesPage.deleteContent(deleteFileNames[nrOfDeletedFiles - 1]);
|
||||
await contentServicesPage.checkContentIsNotDisplayed(deleteFileNames[nrOfDeletedFiles - 1]);
|
||||
|
||||
for (let i = 0; i < nrOfDeletedFiles - 1; i++) {
|
||||
contentServicesPage.checkContentIsDisplayed(deleteFileNames[i]);
|
||||
await contentServicesPage.checkContentIsDisplayed(deleteFileNames[i]);
|
||||
}
|
||||
});
|
||||
|
||||
it('[C299201] Should use default pagination settings for infinite pagination', () => {
|
||||
navigationBarPage.clickContentServicesButton();
|
||||
contentServicesPage.checkAcsContainer();
|
||||
contentServicesPage.doubleClickRow(folderModel.name);
|
||||
it('[C299201] Should use default pagination settings for infinite pagination', async () => {
|
||||
await navigationBarPage.clickContentServicesButton();
|
||||
await contentServicesPage.checkAcsContainer();
|
||||
await contentServicesPage.doubleClickRow(folderModel.name);
|
||||
|
||||
contentServicesPage.enableInfiniteScrolling();
|
||||
expect(contentServicesPage.numberOfResultsDisplayed()).toBe(pageSize);
|
||||
infinitePaginationPage.clickLoadMoreButton();
|
||||
expect(contentServicesPage.numberOfResultsDisplayed()).toBe(nrOfFiles);
|
||||
await contentServicesPage.enableInfiniteScrolling();
|
||||
await expect(await contentServicesPage.numberOfResultsDisplayed()).toBe(pageSize);
|
||||
await infinitePaginationPage.clickLoadMoreButton();
|
||||
await expect(await contentServicesPage.numberOfResultsDisplayed()).toBe(nrOfFiles);
|
||||
|
||||
infinitePaginationPage.checkLoadMoreButtonIsNotDisplayed();
|
||||
await infinitePaginationPage.checkLoadMoreButtonIsNotDisplayed();
|
||||
});
|
||||
|
||||
it('[C299202] Should not display load more button when all the files are already displayed', () => {
|
||||
LocalStorageUtil.setUserPreference('paginationSize', '30');
|
||||
it('[C299202] Should not display load more button when all the files are already displayed', async () => {
|
||||
await LocalStorageUtil.setUserPreference('paginationSize', '30');
|
||||
|
||||
navigationBarPage.clickContentServicesButton();
|
||||
contentServicesPage.checkAcsContainer();
|
||||
await navigationBarPage.clickContentServicesButton();
|
||||
await contentServicesPage.checkAcsContainer();
|
||||
|
||||
contentServicesPage.doubleClickRow(folderModel.name);
|
||||
await contentServicesPage.doubleClickRow(folderModel.name);
|
||||
|
||||
contentServicesPage.enableInfiniteScrolling();
|
||||
expect(contentServicesPage.numberOfResultsDisplayed()).toBe(nrOfFiles);
|
||||
await contentServicesPage.enableInfiniteScrolling();
|
||||
await expect(await contentServicesPage.numberOfResultsDisplayed()).toBe(nrOfFiles);
|
||||
|
||||
infinitePaginationPage.checkLoadMoreButtonIsNotDisplayed();
|
||||
await infinitePaginationPage.checkLoadMoreButtonIsNotDisplayed();
|
||||
});
|
||||
|
||||
it('[C299203] Should not display load more button when a folder is empty', () => {
|
||||
navigationBarPage.clickContentServicesButton();
|
||||
contentServicesPage.checkAcsContainer();
|
||||
it('[C299203] Should not display load more button when a folder is empty', async () => {
|
||||
await navigationBarPage.clickContentServicesButton();
|
||||
await contentServicesPage.checkAcsContainer();
|
||||
|
||||
contentServicesPage.doubleClickRow(emptyFolderModel.entry.name);
|
||||
await contentServicesPage.doubleClickRow(emptyFolderModel.entry.name);
|
||||
|
||||
infinitePaginationPage.checkLoadMoreButtonIsNotDisplayed();
|
||||
await infinitePaginationPage.checkLoadMoreButtonIsNotDisplayed();
|
||||
});
|
||||
|
||||
});
|
||||
|
||||
@@ -56,7 +56,7 @@ describe('Login component', () => {
|
||||
const invalidUsername = 'invaliduser';
|
||||
const invalidPassword = 'invalidpassword';
|
||||
|
||||
beforeAll(async (done) => {
|
||||
beforeAll(async () => {
|
||||
this.alfrescoJsApi = new AlfrescoApi({
|
||||
provider: 'ALL',
|
||||
hostEcm: browser.params.testConfig.adf_acs.host,
|
||||
@@ -68,218 +68,213 @@ describe('Login component', () => {
|
||||
await this.alfrescoJsApi.core.peopleApi.addPerson(userA);
|
||||
await this.alfrescoJsApi.core.peopleApi.addPerson(userB);
|
||||
|
||||
done();
|
||||
});
|
||||
|
||||
it('[C276746] Should display the right information in user-info when a different users logs in', async () => {
|
||||
await loginPage.loginToContentServicesUsingUserModel(userA);
|
||||
userInfoPage.clickUserProfile();
|
||||
expect(userInfoPage.getContentHeaderTitle()).toEqual(userA.firstName + ' ' + userA.lastName);
|
||||
expect(userInfoPage.getContentEmail()).toEqual(userA.email);
|
||||
await userInfoPage.clickUserProfile();
|
||||
await expect(await userInfoPage.getContentHeaderTitle()).toEqual(userA.firstName + ' ' + userA.lastName);
|
||||
await expect(await userInfoPage.getContentEmail()).toEqual(userA.email);
|
||||
|
||||
await loginPage.loginToContentServicesUsingUserModel(userB);
|
||||
userInfoPage.clickUserProfile();
|
||||
expect(userInfoPage.getContentHeaderTitle()).toEqual(userB.firstName + ' ' + userB.lastName);
|
||||
expect(userInfoPage.getContentEmail()).toEqual(userB.email);
|
||||
await userInfoPage.clickUserProfile();
|
||||
await expect(await userInfoPage.getContentHeaderTitle()).toEqual(userB.firstName + ' ' + userB.lastName);
|
||||
await expect(await userInfoPage.getContentEmail()).toEqual(userB.email);
|
||||
});
|
||||
|
||||
it('[C299206] Should redirect the user without the right access role on a forbidden page', async () => {
|
||||
await loginPage.loginToContentServicesUsingUserModel(userA);
|
||||
navigationBarPage.navigateToProcessServicesCloudPage();
|
||||
expect(errorPage.getErrorCode()).toBe('403');
|
||||
expect(errorPage.getErrorTitle()).toBe('You don\'t have permission to access this server.');
|
||||
expect(errorPage.getErrorDescription()).toBe('You\'re not allowed access to this resource on the server.');
|
||||
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.');
|
||||
await expect(await errorPage.getErrorDescription()).toBe('You\'re not allowed access to this resource on the server.');
|
||||
});
|
||||
|
||||
it('[C260036] Should require username', () => {
|
||||
loginPage.goToLoginPage();
|
||||
loginPage.checkUsernameInactive();
|
||||
expect(loginPage.getSignInButtonIsEnabled()).toBe(false);
|
||||
loginPage.enterUsername('A');
|
||||
expect(loginPage.getUsernameTooltip()).toEqual(errorMessages.username);
|
||||
loginPage.clearUsername();
|
||||
expect(loginPage.getUsernameTooltip()).toEqual(errorMessages.required);
|
||||
loginPage.checkUsernameHighlighted();
|
||||
expect(loginPage.getSignInButtonIsEnabled()).toBe(false);
|
||||
it('[C260036] Should require username', async () => {
|
||||
await loginPage.goToLoginPage();
|
||||
await loginPage.checkUsernameInactive();
|
||||
await expect(await loginPage.getSignInButtonIsEnabled()).toBe(false);
|
||||
await loginPage.enterUsername('A');
|
||||
await expect(await loginPage.getUsernameTooltip()).toEqual(errorMessages.username);
|
||||
await loginPage.clearUsername();
|
||||
await expect(await loginPage.getUsernameTooltip()).toEqual(errorMessages.required);
|
||||
await loginPage.checkUsernameHighlighted();
|
||||
await expect(await loginPage.getSignInButtonIsEnabled()).toBe(false);
|
||||
});
|
||||
|
||||
it('[C260043] Should require password', () => {
|
||||
loginPage.goToLoginPage();
|
||||
loginPage.checkPasswordInactive();
|
||||
loginPage.checkUsernameInactive();
|
||||
loginPage.enterPassword('A');
|
||||
loginPage.checkPasswordTooltipIsNotVisible();
|
||||
loginPage.clearPassword();
|
||||
expect(loginPage.getPasswordTooltip()).toEqual(errorMessages.password);
|
||||
loginPage.checkPasswordHighlighted();
|
||||
expect(loginPage.getSignInButtonIsEnabled()).toBe(false);
|
||||
it('[C260043] Should require password', async () => {
|
||||
await loginPage.goToLoginPage();
|
||||
await loginPage.checkPasswordInactive();
|
||||
await loginPage.checkUsernameInactive();
|
||||
await loginPage.enterPassword('A');
|
||||
await loginPage.checkPasswordTooltipIsNotVisible();
|
||||
await loginPage.clearPassword();
|
||||
await expect(await loginPage.getPasswordTooltip()).toEqual(errorMessages.password);
|
||||
await loginPage.checkPasswordHighlighted();
|
||||
await expect(await loginPage.getSignInButtonIsEnabled()).toBe(false);
|
||||
});
|
||||
|
||||
it('[C260044] Username should be at least 2 characters long', () => {
|
||||
loginPage.goToLoginPage();
|
||||
expect(loginPage.getSignInButtonIsEnabled()).toBe(false);
|
||||
loginPage.enterUsername('A');
|
||||
expect(loginPage.getUsernameTooltip()).toEqual(errorMessages.username);
|
||||
loginPage.enterUsername('AB');
|
||||
loginPage.checkUsernameTooltipIsNotVisible();
|
||||
expect(loginPage.getSignInButtonIsEnabled()).toBe(false);
|
||||
loginPage.clearUsername();
|
||||
it('[C260044] Username should be at least 2 characters long', async () => {
|
||||
await loginPage.goToLoginPage();
|
||||
await expect(await loginPage.getSignInButtonIsEnabled()).toBe(false);
|
||||
await loginPage.enterUsername('A');
|
||||
await expect(await loginPage.getUsernameTooltip()).toEqual(errorMessages.username);
|
||||
await loginPage.enterUsername('AB');
|
||||
await loginPage.checkUsernameTooltipIsNotVisible();
|
||||
await expect(await loginPage.getSignInButtonIsEnabled()).toBe(false);
|
||||
await loginPage.clearUsername();
|
||||
});
|
||||
|
||||
it('[C260045] Should enable login button after entering a valid username and a password', () => {
|
||||
loginPage.goToLoginPage();
|
||||
loginPage.enterUsername(adminUserModel.id);
|
||||
expect(loginPage.getSignInButtonIsEnabled()).toBe(false);
|
||||
loginPage.enterPassword('a');
|
||||
expect(loginPage.getSignInButtonIsEnabled()).toBe(true);
|
||||
loginPage.clearUsername();
|
||||
loginPage.clearPassword();
|
||||
it('[C260045] Should enable login button after entering a valid username and a password', async () => {
|
||||
await loginPage.goToLoginPage();
|
||||
await loginPage.enterUsername(adminUserModel.id);
|
||||
await expect(await loginPage.getSignInButtonIsEnabled()).toBe(false);
|
||||
await loginPage.enterPassword('a');
|
||||
await expect(await loginPage.getSignInButtonIsEnabled()).toBe(true);
|
||||
await loginPage.clearUsername();
|
||||
await loginPage.clearPassword();
|
||||
});
|
||||
|
||||
it('[C260046] Should NOT be possible to login with an invalid username/password', () => {
|
||||
loginPage.goToLoginPage();
|
||||
expect(loginPage.getSignInButtonIsEnabled()).toBe(false);
|
||||
loginPage.enterUsername('test');
|
||||
loginPage.enterPassword('test');
|
||||
expect(loginPage.getSignInButtonIsEnabled()).toBe(true);
|
||||
loginPage.clickSignInButton();
|
||||
expect(loginPage.getLoginError()).toEqual(errorMessages.invalid_credentials);
|
||||
loginPage.clearUsername();
|
||||
loginPage.clearPassword();
|
||||
it('[C260046] Should NOT be possible to login with an invalid username/password', async () => {
|
||||
await loginPage.goToLoginPage();
|
||||
await expect(await loginPage.getSignInButtonIsEnabled()).toBe(false);
|
||||
await loginPage.enterUsername('test');
|
||||
await loginPage.enterPassword('test');
|
||||
await expect(await loginPage.getSignInButtonIsEnabled()).toBe(true);
|
||||
await loginPage.clickSignInButton();
|
||||
await expect(await loginPage.getLoginError()).toEqual(errorMessages.invalid_credentials);
|
||||
await loginPage.clearUsername();
|
||||
await loginPage.clearPassword();
|
||||
});
|
||||
|
||||
it('[C260047] Password should be crypted', () => {
|
||||
loginPage.goToLoginPage();
|
||||
expect(loginPage.getSignInButtonIsEnabled()).toBe(false);
|
||||
loginPage.enterPassword('test');
|
||||
loginPage.showPassword();
|
||||
loginPage.getShownPassword().then(async (tooltip) => {
|
||||
await expect(tooltip).toEqual('test');
|
||||
});
|
||||
loginPage.hidePassword();
|
||||
loginPage.checkPasswordIsHidden();
|
||||
loginPage.clearPassword();
|
||||
it('[C260047] Password should be crypted', async () => {
|
||||
await loginPage.goToLoginPage();
|
||||
await expect(await loginPage.getSignInButtonIsEnabled()).toBe(false);
|
||||
await loginPage.enterPassword('test');
|
||||
await loginPage.showPassword();
|
||||
const tooltip = await loginPage.getShownPassword();
|
||||
await expect(tooltip).toEqual('test');
|
||||
await loginPage.hidePassword();
|
||||
await loginPage.checkPasswordIsHidden();
|
||||
await loginPage.clearPassword();
|
||||
});
|
||||
|
||||
it('[C260048] Should be possible to enable/disable login footer', () => {
|
||||
loginPage.goToLoginPage();
|
||||
loginPage.enableFooter();
|
||||
loginPage.checkRememberIsDisplayed();
|
||||
loginPage.checkNeedHelpIsDisplayed();
|
||||
loginPage.checkRegisterDisplayed();
|
||||
loginPage.disableFooter();
|
||||
loginPage.checkRememberIsNotDisplayed();
|
||||
loginPage.checkNeedHelpIsNotDisplayed();
|
||||
loginPage.checkRegisterIsNotDisplayed();
|
||||
it('[C260048] Should be possible to enable/disable login footer', async () => {
|
||||
await loginPage.goToLoginPage();
|
||||
await loginPage.enableFooter();
|
||||
await loginPage.checkRememberIsDisplayed();
|
||||
await loginPage.checkNeedHelpIsDisplayed();
|
||||
await loginPage.checkRegisterDisplayed();
|
||||
await loginPage.disableFooter();
|
||||
await loginPage.checkRememberIsNotDisplayed();
|
||||
await loginPage.checkNeedHelpIsNotDisplayed();
|
||||
await loginPage.checkRegisterIsNotDisplayed();
|
||||
});
|
||||
|
||||
it('[C260049] Should be possible to login to Process Services with Content Services disabled', () => {
|
||||
loginPage.goToLoginPage();
|
||||
expect(loginPage.getSignInButtonIsEnabled()).toBe(false);
|
||||
loginPage.clickSettingsIcon();
|
||||
settingsPage.setProviderBpm();
|
||||
loginPage.login(adminUserModel.id, adminUserModel.password);
|
||||
navigationBarPage.navigateToProcessServicesPage();
|
||||
processServicesPage.checkApsContainer();
|
||||
navigationBarPage.clickContentServicesButton();
|
||||
loginPage.waitForElements();
|
||||
it('[C260049] Should be possible to login to Process Services with Content Services disabled', async () => {
|
||||
await loginPage.goToLoginPage();
|
||||
await expect(await loginPage.getSignInButtonIsEnabled()).toBe(false);
|
||||
await loginPage.clickSettingsIcon();
|
||||
await settingsPage.setProviderBpm();
|
||||
await loginPage.login(adminUserModel.id, adminUserModel.password);
|
||||
await navigationBarPage.navigateToProcessServicesPage();
|
||||
await processServicesPage.checkApsContainer();
|
||||
await navigationBarPage.clickContentServicesButton();
|
||||
await loginPage.waitForElements();
|
||||
});
|
||||
|
||||
it('[C260050] Should be possible to login to Content Services with Process Services disabled', () => {
|
||||
loginPage.goToLoginPage();
|
||||
expect(loginPage.getSignInButtonIsEnabled()).toBe(false);
|
||||
loginPage.clickSettingsIcon();
|
||||
settingsPage.setProviderEcm();
|
||||
loginPage.login(browser.params.testConfig.adf.adminUser, browser.params.testConfig.adf.adminPassword);
|
||||
navigationBarPage.clickContentServicesButton();
|
||||
contentServicesPage.checkAcsContainer();
|
||||
it('[C260050] Should be possible to login to Content Services with Process Services disabled', async () => {
|
||||
await loginPage.goToLoginPage();
|
||||
await expect(await loginPage.getSignInButtonIsEnabled()).toBe(false);
|
||||
await loginPage.clickSettingsIcon();
|
||||
await settingsPage.setProviderEcm();
|
||||
await loginPage.login(browser.params.testConfig.adf.adminUser, browser.params.testConfig.adf.adminPassword);
|
||||
await navigationBarPage.clickContentServicesButton();
|
||||
await contentServicesPage.checkAcsContainer();
|
||||
});
|
||||
|
||||
it('[C260051] Should be able to login to both Content Services and Process Services', () => {
|
||||
loginPage.goToLoginPage();
|
||||
loginPage.clickSettingsIcon();
|
||||
settingsPage.setProviderEcmBpm();
|
||||
expect(loginPage.getSignInButtonIsEnabled()).toBe(false);
|
||||
loginPage.clickSettingsIcon();
|
||||
settingsPage.setProviderEcmBpm();
|
||||
loginPage.login(adminUserModel.id, adminUserModel.password);
|
||||
navigationBarPage.navigateToProcessServicesPage();
|
||||
processServicesPage.checkApsContainer();
|
||||
navigationBarPage.clickContentServicesButton();
|
||||
contentServicesPage.checkAcsContainer();
|
||||
navigationBarPage.clickLoginButton();
|
||||
loginPage.waitForElements();
|
||||
it('[C260051] Should be able to login to both Content Services and Process Services', async () => {
|
||||
await loginPage.goToLoginPage();
|
||||
await loginPage.clickSettingsIcon();
|
||||
await settingsPage.setProviderEcmBpm();
|
||||
await expect(await loginPage.getSignInButtonIsEnabled()).toBe(false);
|
||||
await loginPage.clickSettingsIcon();
|
||||
await settingsPage.setProviderEcmBpm();
|
||||
await loginPage.login(adminUserModel.id, adminUserModel.password);
|
||||
await navigationBarPage.navigateToProcessServicesPage();
|
||||
await processServicesPage.checkApsContainer();
|
||||
await navigationBarPage.clickContentServicesButton();
|
||||
await contentServicesPage.checkAcsContainer();
|
||||
await navigationBarPage.clickLoginButton();
|
||||
await loginPage.waitForElements();
|
||||
});
|
||||
|
||||
it('[C277754] Should the user be redirect to the login page when the Content Service session expire', () => {
|
||||
loginPage.goToLoginPage();
|
||||
loginPage.clickSettingsIcon();
|
||||
settingsPage.setProviderEcmBpm();
|
||||
loginPage.login(adminUserModel.id, adminUserModel.password);
|
||||
browser.executeScript('window.localStorage.removeItem("ticket-ECM");');
|
||||
BrowserActions.getUrl(browser.params.testConfig.adf.url + '/files');
|
||||
loginPage.waitForElements();
|
||||
it('[C277754] Should the user be redirect to the login page when the Content Service session expire', async () => {
|
||||
await loginPage.goToLoginPage();
|
||||
await loginPage.clickSettingsIcon();
|
||||
await settingsPage.setProviderEcmBpm();
|
||||
await loginPage.login(adminUserModel.id, adminUserModel.password);
|
||||
await browser.executeScript('window.localStorage.removeItem("ticket-ECM");');
|
||||
await BrowserActions.getUrl(browser.params.testConfig.adf.url + '/files');
|
||||
await loginPage.waitForElements();
|
||||
});
|
||||
|
||||
it('[C279932] Should successRoute property change the landing page when the user Login', () => {
|
||||
loginPage.goToLoginPage();
|
||||
loginPage.clickSettingsIcon();
|
||||
settingsPage.setProviderEcmBpm();
|
||||
loginPage.enableSuccessRouteSwitch();
|
||||
loginPage.enterSuccessRoute('activiti');
|
||||
loginPage.login(adminUserModel.id, adminUserModel.password);
|
||||
processServicesPage.checkApsContainer();
|
||||
it('[C279932] Should successRoute property change the landing page when the user Login', async () => {
|
||||
await loginPage.goToLoginPage();
|
||||
await loginPage.clickSettingsIcon();
|
||||
await settingsPage.setProviderEcmBpm();
|
||||
await loginPage.enableSuccessRouteSwitch();
|
||||
await loginPage.enterSuccessRoute('activiti');
|
||||
await loginPage.login(adminUserModel.id, adminUserModel.password);
|
||||
await processServicesPage.checkApsContainer();
|
||||
});
|
||||
|
||||
it('[C279931] Should the user be redirect to the login page when the Process Service session expire', () => {
|
||||
loginPage.goToLoginPage();
|
||||
loginPage.clickSettingsIcon();
|
||||
settingsPage.setProviderEcmBpm();
|
||||
loginPage.login(adminUserModel.id, adminUserModel.password);
|
||||
browser.executeScript('window.localStorage.removeItem("ticket-BPM");');
|
||||
BrowserActions.getUrl(browser.params.testConfig.adf.url + '/activiti');
|
||||
loginPage.waitForElements();
|
||||
it('[C279931] Should the user be redirect to the login page when the Process Service session expire', async () => {
|
||||
await loginPage.goToLoginPage();
|
||||
await loginPage.clickSettingsIcon();
|
||||
await settingsPage.setProviderEcmBpm();
|
||||
await loginPage.login(adminUserModel.id, adminUserModel.password);
|
||||
await browser.executeScript('window.localStorage.removeItem("ticket-BPM");');
|
||||
await BrowserActions.getUrl(browser.params.testConfig.adf.url + '/activiti');
|
||||
await loginPage.waitForElements();
|
||||
});
|
||||
|
||||
it('[C279930] Should a user still be logged-in when open a new tab', () => {
|
||||
loginPage.goToLoginPage();
|
||||
loginPage.clickSettingsIcon();
|
||||
settingsPage.setProviderEcmBpm();
|
||||
loginPage.login(adminUserModel.id, adminUserModel.password);
|
||||
it('[C279930] Should a user still be logged-in when open a new tab', async () => {
|
||||
await loginPage.goToLoginPage();
|
||||
await loginPage.clickSettingsIcon();
|
||||
await settingsPage.setProviderEcmBpm();
|
||||
await loginPage.login(adminUserModel.id, adminUserModel.password);
|
||||
|
||||
Util.openNewTabInBrowser();
|
||||
await Util.openNewTabInBrowser();
|
||||
|
||||
browser.getAllWindowHandles().then((handles) => {
|
||||
|
||||
browser.switchTo().window(handles[1]).then(() => {
|
||||
BrowserActions.getUrl(browser.params.testConfig.adf.url + '/activiti');
|
||||
processServicesPage.checkApsContainer();
|
||||
BrowserActions.getUrl(browser.params.testConfig.adf.url + '/files');
|
||||
contentServicesPage.checkAcsContainer();
|
||||
});
|
||||
});
|
||||
const handles = await browser.getAllWindowHandles();
|
||||
await browser.switchTo().window(handles[1]);
|
||||
await BrowserActions.getUrl(browser.params.testConfig.adf.url + '/activiti');
|
||||
await processServicesPage.checkApsContainer();
|
||||
await BrowserActions.getUrl(browser.params.testConfig.adf.url + '/files');
|
||||
await contentServicesPage.checkAcsContainer();
|
||||
});
|
||||
|
||||
it('[C279933] Should be possible change the login component logo when logoImageUrl is changed', () => {
|
||||
loginPage.goToLoginPage();
|
||||
loginPage.clickSettingsIcon();
|
||||
settingsPage.setProviderEcmBpm();
|
||||
loginPage.enableLogoSwitch();
|
||||
loginPage.enterLogo('https://rawgit.com/Alfresco/alfresco-ng2-components/master/assets/angular2.png');
|
||||
loginPage.checkLoginImgURL();
|
||||
it('[C279933] Should be possible change the login component logo when logoImageUrl is changed', async () => {
|
||||
await loginPage.goToLoginPage();
|
||||
await loginPage.clickSettingsIcon();
|
||||
await settingsPage.setProviderEcmBpm();
|
||||
await loginPage.enableLogoSwitch();
|
||||
await loginPage.enterLogo('https://rawgit.com/Alfresco/alfresco-ng2-components/master/assets/angular2.png');
|
||||
await loginPage.checkLoginImgURL();
|
||||
});
|
||||
|
||||
it('[C291854] Should be possible login in valid credentials', () => {
|
||||
BrowserActions.getUrl(browser.params.testConfig.adf.url);
|
||||
loginPage.waitForElements();
|
||||
expect(loginPage.getSignInButtonIsEnabled()).toBe(false);
|
||||
loginPage.enterUsername(invalidUsername);
|
||||
expect(loginPage.getSignInButtonIsEnabled()).toBe(false);
|
||||
loginPage.enterPassword(invalidPassword);
|
||||
expect(loginPage.getSignInButtonIsEnabled()).toBe(true);
|
||||
loginPage.clickSignInButton();
|
||||
expect(loginPage.getLoginError()).toEqual(errorMessages.invalid_credentials);
|
||||
loginPage.login(adminUserModel.id, adminUserModel.password);
|
||||
it('[C291854] Should be possible login in valid credentials', async () => {
|
||||
await BrowserActions.getUrl(browser.params.testConfig.adf.url);
|
||||
await loginPage.waitForElements();
|
||||
await expect(await loginPage.getSignInButtonIsEnabled()).toBe(false);
|
||||
await loginPage.enterUsername(invalidUsername);
|
||||
await expect(await loginPage.getSignInButtonIsEnabled()).toBe(false);
|
||||
await loginPage.enterPassword(invalidPassword);
|
||||
await expect(await loginPage.getSignInButtonIsEnabled()).toBe(true);
|
||||
await loginPage.clickSignInButton();
|
||||
await expect(await loginPage.getLoginError()).toEqual(errorMessages.invalid_credentials);
|
||||
await loginPage.login(adminUserModel.id, adminUserModel.password);
|
||||
});
|
||||
|
||||
});
|
||||
|
||||
@@ -36,7 +36,7 @@ describe('Login component - SSO', () => {
|
||||
browser.params.testConfig.adf.hostIdentity, false, true, browser.params.config.oauth2.clientId);
|
||||
await loginSSOPage.clickOnSSOButton();
|
||||
await loginSSOPage.checkLoginErrorIsDisplayed();
|
||||
expect(loginSSOPage.getLoginErrorMessage()).toContain('SSO Authentication server unreachable');
|
||||
await expect(loginSSOPage.getLoginErrorMessage()).toContain('SSO Authentication server unreachable');
|
||||
});
|
||||
});
|
||||
|
||||
|
||||
@@ -15,7 +15,7 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
import { LoginSSOPage, SettingsPage, LoginPage } from '@alfresco/adf-testing';
|
||||
import { LoginSSOPage, SettingsPage, LoginPage, BrowserVisibility } from '@alfresco/adf-testing';
|
||||
import { browser } from 'protractor';
|
||||
import { NavigationBarPage } from '../../../pages/adf/navigationBarPage';
|
||||
|
||||
@@ -29,21 +29,6 @@ describe('Login component - SSO', () => {
|
||||
const silentLogin = false;
|
||||
let implicitFlow;
|
||||
|
||||
it('[C280665] Should be possible change the logout redirect URL', async () => {
|
||||
await settingsPage.setProviderEcmSso(browser.params.testConfig.adf.url,
|
||||
browser.params.testConfig.adf.hostSso,
|
||||
browser.params.testConfig.adf.hostIdentity, false, true, browser.params.config.oauth2.clientId, '/login');
|
||||
await loginSSOPage.clickOnSSOButton();
|
||||
await loginSSOPage.loginSSOIdentityService(browser.params.testConfig.adf.adminEmail, browser.params.testConfig.adf.adminPassword);
|
||||
await navigationBarPage.clickLogoutButton();
|
||||
|
||||
browser.sleep(2000);
|
||||
|
||||
browser.getCurrentUrl().then((actualUrl) => {
|
||||
expect(actualUrl).toEqual(browser.params.testConfig.adf.url + '/login');
|
||||
});
|
||||
});
|
||||
|
||||
describe('Login component - SSO Grant type password (implicit flow false)', () => {
|
||||
|
||||
it('[C299158] Should be possible to login with SSO, with grant type password (Implicit Flow false)', async () => {
|
||||
@@ -63,28 +48,18 @@ describe('Login component - SSO', () => {
|
||||
await loginPage.enterPassword(browser.params.testConfig.adf.adminPassword);
|
||||
await loginPage.clickSignInButton();
|
||||
|
||||
let isDisplayed = false;
|
||||
await BrowserVisibility.waitUntilElementIsVisible(loginPage.sidenavLayout);
|
||||
|
||||
browser.wait(() => {
|
||||
loginPage.header.isDisplayed().then(
|
||||
() => {
|
||||
isDisplayed = true;
|
||||
},
|
||||
() => {
|
||||
isDisplayed = false;
|
||||
}
|
||||
);
|
||||
return isDisplayed;
|
||||
}, browser.params.testConfig.main.timeout, 'Element is not visible ' + loginPage.header.locator());
|
||||
});
|
||||
});
|
||||
|
||||
describe('Login component - SSO implicit Flow', () => {
|
||||
|
||||
afterEach(() => {
|
||||
navigationBarPage.clickLogoutButton();
|
||||
browser.executeScript('window.sessionStorage.clear();');
|
||||
browser.executeScript('window.localStorage.clear();');
|
||||
afterEach(async () => {
|
||||
await navigationBarPage.clickLogoutButton();
|
||||
await browser.executeScript('window.sessionStorage.clear();');
|
||||
await browser.executeScript('window.localStorage.clear();');
|
||||
await browser.refresh();
|
||||
});
|
||||
|
||||
it('[C261050] Should be possible login with SSO', async () => {
|
||||
@@ -96,7 +71,7 @@ describe('Login component - SSO', () => {
|
||||
});
|
||||
|
||||
it('[C280667] Should be redirect directly to keycloak without show the login page with silent login', async () => {
|
||||
await settingsPage.setProviderEcmSso(browser.params.testConfig.adf_acs.host,
|
||||
await settingsPage.setProviderEcmSso(browser.params.testConfig.adf_acs.host,
|
||||
browser.params.testConfig.adf.hostSso,
|
||||
browser.params.testConfig.adf.hostIdentity, true, true, browser.params.config.oauth2.clientId);
|
||||
await loginSSOPage.loginSSOIdentityService(browser.params.testConfig.adf.adminEmail, browser.params.testConfig.adf.adminPassword);
|
||||
|
||||
@@ -0,0 +1,42 @@
|
||||
/*!
|
||||
* @license
|
||||
* Copyright 2019 Alfresco Software, Ltd.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
import { LoginSSOPage, SettingsPage } from '@alfresco/adf-testing';
|
||||
import { browser } from 'protractor';
|
||||
import { NavigationBarPage } from '../../../pages/adf/navigationBarPage';
|
||||
|
||||
describe('Logout component - SSO', () => {
|
||||
|
||||
const settingsPage = new SettingsPage();
|
||||
const loginSSOPage = new LoginSSOPage();
|
||||
const navigationBarPage = new NavigationBarPage();
|
||||
|
||||
it('[C280665] Should be possible change the logout redirect URL', async () => {
|
||||
await settingsPage.setProviderEcmSso(browser.params.testConfig.adf.url,
|
||||
browser.params.testConfig.adf.hostSso,
|
||||
browser.params.testConfig.adf.hostIdentity, false, true, browser.params.config.oauth2.clientId, '/login');
|
||||
await loginSSOPage.clickOnSSOButton();
|
||||
await loginSSOPage.loginSSOIdentityService(browser.params.testConfig.adf.adminEmail, browser.params.testConfig.adf.adminPassword);
|
||||
await navigationBarPage.clickLogoutButton();
|
||||
|
||||
await browser.sleep(2000);
|
||||
|
||||
const actualUrl = await browser.getCurrentUrl();
|
||||
await expect(actualUrl).toEqual(browser.params.testConfig.adf.url + '/login');
|
||||
});
|
||||
|
||||
});
|
||||
@@ -48,7 +48,7 @@ describe('Login component - Redirect', () => {
|
||||
const uploadActions = new UploadActions(this.alfrescoJsApi);
|
||||
const logoutPage = new LogoutPage();
|
||||
|
||||
beforeAll(async (done) => {
|
||||
beforeAll(async () => {
|
||||
|
||||
await this.alfrescoJsApi.login(browser.params.testConfig.adf.adminEmail, browser.params.testConfig.adf.adminPassword);
|
||||
|
||||
@@ -59,118 +59,111 @@ describe('Login component - Redirect', () => {
|
||||
|
||||
uploadedFolder = await uploadActions.createFolder('protecteFolder' + StringUtil.generateRandomString(), '-my-');
|
||||
|
||||
done();
|
||||
});
|
||||
|
||||
it('[C213838] Should after login in CS be redirect to Login page when try to access to PS', () => {
|
||||
loginPage.goToLoginPage();
|
||||
loginPage.clickSettingsIcon();
|
||||
settingsPage.setProviderEcm();
|
||||
loginPage.login(user.id, user.password);
|
||||
it('[C213838] Should after login in CS be redirect to Login page when try to access to PS', async () => {
|
||||
await loginPage.goToLoginPage();
|
||||
await loginPage.clickSettingsIcon();
|
||||
await settingsPage.setProviderEcm();
|
||||
await loginPage.login(user.id, user.password);
|
||||
|
||||
navigationBarPage.clickContentServicesButton();
|
||||
contentServicesPage.checkAcsContainer();
|
||||
await navigationBarPage.clickContentServicesButton();
|
||||
await contentServicesPage.checkAcsContainer();
|
||||
|
||||
navigationBarPage.navigateToProcessServicesPage();
|
||||
await navigationBarPage.navigateToProcessServicesPage();
|
||||
|
||||
loginPage.waitForElements();
|
||||
await loginPage.waitForElements();
|
||||
});
|
||||
|
||||
it('[C260085] Should after login in PS be redirect to Login page when try to access to CS', () => {
|
||||
loginPage.goToLoginPage();
|
||||
loginPage.clickSettingsIcon();
|
||||
settingsPage.setProviderBpm();
|
||||
it('[C260085] Should after login in PS be redirect to Login page when try to access to CS', async () => {
|
||||
await loginPage.goToLoginPage();
|
||||
await loginPage.clickSettingsIcon();
|
||||
await settingsPage.setProviderBpm();
|
||||
|
||||
loginPage.enableSuccessRouteSwitch();
|
||||
loginPage.enterSuccessRoute('activiti');
|
||||
await loginPage.enableSuccessRouteSwitch();
|
||||
await loginPage.enterSuccessRoute('activiti');
|
||||
|
||||
loginPage.login(adminUserModel.id, adminUserModel.password);
|
||||
await loginPage.login(adminUserModel.id, adminUserModel.password);
|
||||
|
||||
navigationBarPage.navigateToProcessServicesPage();
|
||||
processServicesPage.checkApsContainer();
|
||||
await navigationBarPage.navigateToProcessServicesPage();
|
||||
await processServicesPage.checkApsContainer();
|
||||
|
||||
navigationBarPage.clickContentServicesButton();
|
||||
await navigationBarPage.clickContentServicesButton();
|
||||
|
||||
loginPage.waitForElements();
|
||||
await loginPage.waitForElements();
|
||||
});
|
||||
|
||||
it('[C260081] Should after login in BOTH not be redirect to Login page when try to access to CS or PS', () => {
|
||||
loginPage.goToLoginPage();
|
||||
loginPage.clickSettingsIcon();
|
||||
it('[C260081] Should after login in BOTH not be redirect to Login page when try to access to CS or PS', async () => {
|
||||
await loginPage.goToLoginPage();
|
||||
await loginPage.clickSettingsIcon();
|
||||
|
||||
settingsPage.setProviderEcmBpm();
|
||||
await settingsPage.setProviderEcmBpm();
|
||||
|
||||
loginPage.login(adminUserModel.id, adminUserModel.password);
|
||||
await loginPage.login(adminUserModel.id, adminUserModel.password);
|
||||
|
||||
navigationBarPage.navigateToProcessServicesPage();
|
||||
processServicesPage.checkApsContainer();
|
||||
await navigationBarPage.navigateToProcessServicesPage();
|
||||
await processServicesPage.checkApsContainer();
|
||||
|
||||
navigationBarPage.clickContentServicesButton();
|
||||
contentServicesPage.checkAcsContainer();
|
||||
await navigationBarPage.clickContentServicesButton();
|
||||
await contentServicesPage.checkAcsContainer();
|
||||
});
|
||||
|
||||
it('[C260088] Should be re-redirect to the request URL after login when try to access to a protect URL ', () => {
|
||||
loginPage.goToLoginPage();
|
||||
loginPage.clickSettingsIcon();
|
||||
settingsPage.setProviderEcm();
|
||||
loginPage.login(user.id, user.password);
|
||||
it('[C260088] Should be re-redirect to the request URL after login when try to access to a protect URL ', async () => {
|
||||
await loginPage.goToLoginPage();
|
||||
await loginPage.clickSettingsIcon();
|
||||
await settingsPage.setProviderEcm();
|
||||
await loginPage.login(user.id, user.password);
|
||||
|
||||
navigationBarPage.openContentServicesFolder(uploadedFolder.entry.id);
|
||||
await navigationBarPage.openContentServicesFolder(uploadedFolder.entry.id);
|
||||
|
||||
browser.getCurrentUrl().then((actualUrl) => {
|
||||
expect(actualUrl).toEqual(browser.params.testConfig.adf.url + '/files/' + uploadedFolder.entry.id);
|
||||
});
|
||||
let actualUrl = await browser.getCurrentUrl();
|
||||
await expect(actualUrl).toEqual(browser.params.testConfig.adf.url + '/files/' + uploadedFolder.entry.id);
|
||||
|
||||
contentServicesPage.waitForTableBody();
|
||||
await contentServicesPage.waitForTableBody();
|
||||
|
||||
navigationBarPage.clickLogoutButton();
|
||||
await navigationBarPage.clickLogoutButton();
|
||||
|
||||
logoutPage.checkLogoutSectionIsDisplayed();
|
||||
await logoutPage.checkLogoutSectionIsDisplayed();
|
||||
|
||||
navigationBarPage.openContentServicesFolder(uploadedFolder.entry.id);
|
||||
await navigationBarPage.openContentServicesFolder(uploadedFolder.entry.id);
|
||||
|
||||
loginPage.waitForElements();
|
||||
await loginPage.waitForElements();
|
||||
|
||||
loginPage.login(user.id, user.password);
|
||||
|
||||
browser.getCurrentUrl().then((actualUrl) => {
|
||||
expect(actualUrl).toEqual(browser.params.testConfig.adf.url + '/files/' + uploadedFolder.entry.id);
|
||||
});
|
||||
await loginPage.login(user.id, user.password);
|
||||
|
||||
actualUrl = await browser.getCurrentUrl();
|
||||
await expect(actualUrl).toEqual(browser.params.testConfig.adf.url + '/files/' + uploadedFolder.entry.id);
|
||||
});
|
||||
|
||||
it('[C299161] Should redirect user to requested URL after reloading login page', () => {
|
||||
loginPage.goToLoginPage();
|
||||
loginPage.clickSettingsIcon();
|
||||
settingsPage.setProviderEcm();
|
||||
loginPage.login(user.id, user.password);
|
||||
it('[C299161] Should redirect user to requested URL after reloading login page', async () => {
|
||||
await loginPage.goToLoginPage();
|
||||
await loginPage.clickSettingsIcon();
|
||||
await settingsPage.setProviderEcm();
|
||||
await loginPage.login(user.id, user.password);
|
||||
|
||||
navigationBarPage.openContentServicesFolder(uploadedFolder.entry.id);
|
||||
await navigationBarPage.openContentServicesFolder(uploadedFolder.entry.id);
|
||||
|
||||
browser.getCurrentUrl().then((actualUrl) => {
|
||||
expect(actualUrl).toEqual(browser.params.testConfig.adf.url + '/files/' + uploadedFolder.entry.id);
|
||||
});
|
||||
const currentUrl = await browser.getCurrentUrl();
|
||||
await expect(currentUrl).toEqual(browser.params.testConfig.adf.url + '/files/' + uploadedFolder.entry.id);
|
||||
|
||||
contentServicesPage.waitForTableBody();
|
||||
await contentServicesPage.waitForTableBody();
|
||||
|
||||
navigationBarPage.clickLogoutButton();
|
||||
await navigationBarPage.clickLogoutButton();
|
||||
|
||||
logoutPage.checkLogoutSectionIsDisplayed();
|
||||
await logoutPage.checkLogoutSectionIsDisplayed();
|
||||
|
||||
navigationBarPage.openContentServicesFolder(uploadedFolder.entry.id);
|
||||
loginPage.waitForElements();
|
||||
browser.refresh();
|
||||
loginPage.waitForElements();
|
||||
await navigationBarPage.openContentServicesFolder(uploadedFolder.entry.id);
|
||||
await loginPage.waitForElements();
|
||||
await browser.refresh();
|
||||
await loginPage.waitForElements();
|
||||
|
||||
loginPage.enterUsername(user.id);
|
||||
loginPage.enterPassword(user.password);
|
||||
loginPage.clickSignInButton();
|
||||
await loginPage.enterUsername(user.id);
|
||||
await loginPage.enterPassword(user.password);
|
||||
await loginPage.clickSignInButton();
|
||||
|
||||
navigationBarPage.checkMenuButtonIsDisplayed();
|
||||
|
||||
browser.getCurrentUrl().then((actualUrl) => {
|
||||
expect(actualUrl).toEqual(browser.params.testConfig.adf.url + '/files/' + uploadedFolder.entry.id);
|
||||
});
|
||||
await navigationBarPage.checkMenuButtonIsDisplayed();
|
||||
|
||||
const actualUrl = await browser.getCurrentUrl();
|
||||
await expect(actualUrl).toEqual(browser.params.testConfig.adf.url + '/files/' + uploadedFolder.entry.id);
|
||||
});
|
||||
});
|
||||
|
||||
@@ -22,16 +22,15 @@ describe('Login component - Remember Me', () => {
|
||||
const settingsPage = new SettingsPage();
|
||||
const loginPage = new LoginPage();
|
||||
|
||||
beforeAll((done) => {
|
||||
loginPage.goToLoginPage();
|
||||
loginPage.clickSettingsIcon();
|
||||
settingsPage.setProviderEcmBpm();
|
||||
done();
|
||||
beforeAll(async () => {
|
||||
await loginPage.goToLoginPage();
|
||||
await loginPage.clickSettingsIcon();
|
||||
await settingsPage.setProviderEcmBpm();
|
||||
});
|
||||
|
||||
it('[C260501] Should Remember me checkbox not be present in the login if the property showRememberMe is false', () => {
|
||||
loginPage.checkRememberIsDisplayed();
|
||||
loginPage.disableRememberMe();
|
||||
loginPage.checkRememberIsNotDisplayed();
|
||||
it('[C260501] Should Remember me checkbox not be present in the login if the property showRememberMe is false', async () => {
|
||||
await loginPage.checkRememberIsDisplayed();
|
||||
await loginPage.disableRememberMe();
|
||||
await loginPage.checkRememberIsNotDisplayed();
|
||||
});
|
||||
});
|
||||
|
||||
@@ -30,7 +30,6 @@ import { UploadActions } from '@alfresco/adf-testing';
|
||||
import { Util } from '../util/util';
|
||||
import resources = require('../util/resources');
|
||||
import { browser } from 'protractor';
|
||||
import { NavigationBarPage } from '../pages/adf/navigationBarPage';
|
||||
|
||||
describe('Pagination - returns to previous page when current is empty', () => {
|
||||
|
||||
@@ -38,7 +37,6 @@ describe('Pagination - returns to previous page when current is empty', () => {
|
||||
const contentServicesPage = new ContentServicesPage();
|
||||
const paginationPage = new PaginationPage();
|
||||
const viewerPage = new ViewerPage();
|
||||
const navigationBarPage = new NavigationBarPage();
|
||||
|
||||
const acsUser = new AcsUserModel();
|
||||
const folderModel = new FolderModel({ 'name': 'folderOne' });
|
||||
@@ -67,7 +65,7 @@ describe('Pagination - returns to previous page when current is empty', () => {
|
||||
'location': resources.Files.ADF_DOCUMENTS.PNG.file_location
|
||||
});
|
||||
|
||||
beforeAll(async (done) => {
|
||||
beforeAll(async () => {
|
||||
this.alfrescoJsApi = new AlfrescoApi({
|
||||
provider: 'ECM',
|
||||
hostEcm: browser.params.testConfig.adf_acs.host
|
||||
@@ -98,79 +96,71 @@ describe('Pagination - returns to previous page when current is empty', () => {
|
||||
|
||||
await loginPage.loginToContentServicesUsingUserModel(acsUser);
|
||||
|
||||
contentServicesPage.goToDocumentList();
|
||||
|
||||
done();
|
||||
});
|
||||
|
||||
afterAll(async () => {
|
||||
await navigationBarPage.clickLogoutButton();
|
||||
});
|
||||
|
||||
it('[C274710] Should redirect to previous page when current is emptied', () => {
|
||||
contentServicesPage.doubleClickRow(folderModel.name);
|
||||
contentServicesPage.checkAcsContainer();
|
||||
contentServicesPage.waitForTableBody();
|
||||
|
||||
paginationPage.selectItemsPerPage(itemsPerPage.five);
|
||||
|
||||
contentServicesPage.checkAcsContainer();
|
||||
contentServicesPage.waitForTableBody();
|
||||
|
||||
expect(paginationPage.getCurrentItemsPerPage()).toEqual(itemsPerPage.five);
|
||||
expect(contentServicesPage.numberOfResultsDisplayed()).toBe(itemsPerPage.fiveValue);
|
||||
|
||||
contentServicesPage.getAllRowsNameColumn().then((list) => {
|
||||
expect(Util.arrayContainsArray(list, fileNames.slice(0, 5))).toEqual(true);
|
||||
});
|
||||
|
||||
paginationPage.clickOnNextPage();
|
||||
|
||||
contentServicesPage.checkAcsContainer();
|
||||
contentServicesPage.waitForTableBody();
|
||||
|
||||
expect(paginationPage.getCurrentItemsPerPage()).toEqual(itemsPerPage.five);
|
||||
|
||||
contentServicesPage.getAllRowsNameColumn().then((list) => {
|
||||
expect(Util.arrayContainsArray(list, fileNames.slice(5, 6))).toEqual(true);
|
||||
});
|
||||
|
||||
contentServicesPage.deleteContent(lastFile);
|
||||
contentServicesPage.checkContentIsNotDisplayed(lastFile);
|
||||
|
||||
expect(paginationPage.getCurrentItemsPerPage()).toEqual(itemsPerPage.five);
|
||||
expect(contentServicesPage.numberOfResultsDisplayed()).toBe(itemsPerPage.fiveValue);
|
||||
|
||||
contentServicesPage.getAllRowsNameColumn().then((list) => {
|
||||
expect(Util.arrayContainsArray(list, fileNames.slice(0, 5))).toEqual(true);
|
||||
});
|
||||
await contentServicesPage.goToDocumentList();
|
||||
|
||||
});
|
||||
|
||||
it('[C297494] Should display content when navigating to a non-empty folder not in the first page', () => {
|
||||
contentServicesPage.goToDocumentList();
|
||||
contentServicesPage.doubleClickRow(parentFolderModel.name);
|
||||
contentServicesPage.checkAcsContainer();
|
||||
contentServicesPage.waitForTableBody();
|
||||
it('[C274710] Should redirect to previous page when current is emptied', async () => {
|
||||
await contentServicesPage.doubleClickRow(folderModel.name);
|
||||
await contentServicesPage.checkAcsContainer();
|
||||
await contentServicesPage.waitForTableBody();
|
||||
|
||||
paginationPage.selectItemsPerPage(itemsPerPage.five);
|
||||
await paginationPage.selectItemsPerPage(itemsPerPage.five);
|
||||
|
||||
contentServicesPage.checkAcsContainer();
|
||||
contentServicesPage.waitForTableBody();
|
||||
await contentServicesPage.checkAcsContainer();
|
||||
await contentServicesPage.waitForTableBody();
|
||||
|
||||
expect(paginationPage.getCurrentItemsPerPage()).toEqual(itemsPerPage.five);
|
||||
expect(contentServicesPage.numberOfResultsDisplayed()).toBe(itemsPerPage.fiveValue);
|
||||
await expect(await paginationPage.getCurrentItemsPerPage()).toEqual(itemsPerPage.five);
|
||||
await expect(await contentServicesPage.numberOfResultsDisplayed()).toBe(itemsPerPage.fiveValue);
|
||||
|
||||
paginationPage.clickOnNextPage();
|
||||
let list = await contentServicesPage.getAllRowsNameColumn();
|
||||
await expect(Util.arrayContainsArray(list, fileNames.slice(0, 5))).toEqual(true);
|
||||
|
||||
contentServicesPage.checkAcsContainer();
|
||||
contentServicesPage.waitForTableBody();
|
||||
await paginationPage.clickOnNextPage();
|
||||
|
||||
contentServicesPage.doubleClickRow(lastFolderResponse.entry.name);
|
||||
contentServicesPage.checkContentIsDisplayed(pngFileInfo.name);
|
||||
await contentServicesPage.checkAcsContainer();
|
||||
await contentServicesPage.waitForTableBody();
|
||||
|
||||
viewerPage.viewFile(pngFileUploaded.entry.name);
|
||||
viewerPage.checkImgViewerIsDisplayed();
|
||||
viewerPage.clickCloseButton();
|
||||
await expect(await paginationPage.getCurrentItemsPerPage()).toEqual(itemsPerPage.five);
|
||||
|
||||
list = await contentServicesPage.getAllRowsNameColumn();
|
||||
await expect(Util.arrayContainsArray(list, fileNames.slice(5, 6))).toEqual(true);
|
||||
|
||||
await contentServicesPage.deleteContent(lastFile);
|
||||
await contentServicesPage.checkContentIsNotDisplayed(lastFile);
|
||||
|
||||
await expect(await paginationPage.getCurrentItemsPerPage()).toEqual(itemsPerPage.five);
|
||||
await expect(await contentServicesPage.numberOfResultsDisplayed()).toBe(itemsPerPage.fiveValue);
|
||||
|
||||
list = await contentServicesPage.getAllRowsNameColumn();
|
||||
await expect(Util.arrayContainsArray(list, fileNames.slice(0, 5))).toEqual(true);
|
||||
|
||||
});
|
||||
|
||||
it('[C297494] Should display content when navigating to a non-empty folder not in the first page', async () => {
|
||||
await contentServicesPage.goToDocumentList();
|
||||
await contentServicesPage.doubleClickRow(parentFolderModel.name);
|
||||
await contentServicesPage.checkAcsContainer();
|
||||
await contentServicesPage.waitForTableBody();
|
||||
|
||||
await paginationPage.selectItemsPerPage(itemsPerPage.five);
|
||||
|
||||
await contentServicesPage.checkAcsContainer();
|
||||
await contentServicesPage.waitForTableBody();
|
||||
|
||||
await expect(await paginationPage.getCurrentItemsPerPage()).toEqual(itemsPerPage.five);
|
||||
await expect(await contentServicesPage.numberOfResultsDisplayed()).toBe(itemsPerPage.fiveValue);
|
||||
|
||||
await paginationPage.clickOnNextPage();
|
||||
|
||||
await contentServicesPage.checkAcsContainer();
|
||||
await contentServicesPage.waitForTableBody();
|
||||
|
||||
await contentServicesPage.doubleClickRow(lastFolderResponse.entry.name);
|
||||
await contentServicesPage.checkContentIsDisplayed(pngFileInfo.name);
|
||||
|
||||
await viewerPage.viewFile(pngFileUploaded.entry.name);
|
||||
await viewerPage.checkImgViewerIsDisplayed();
|
||||
await viewerPage.clickCloseButton();
|
||||
});
|
||||
});
|
||||
|
||||
+155
-152
@@ -39,179 +39,182 @@ describe('Settings component', () => {
|
||||
});
|
||||
|
||||
describe('Should be able to change Urls in the Settings', () => {
|
||||
beforeEach( (done) => {
|
||||
settingsPage.goToSettingsPage();
|
||||
done();
|
||||
});
|
||||
|
||||
it('[C245641] Should navigate User from Settings page to Login screen', () => {
|
||||
settingsPage.clickBackButton();
|
||||
loginPage.waitForElements();
|
||||
});
|
||||
|
||||
it('[C291948] Should save ALL Settings changes when User clicks Apply button', () => {
|
||||
loginPage.goToLoginPage();
|
||||
loginPage.clickSettingsIcon();
|
||||
settingsPage.setProviderEcmBpm();
|
||||
loginPage.waitForElements();
|
||||
settingsPage.goToSettingsPage();
|
||||
expect(settingsPage.getSelectedOptionText()).toEqual('ALL', 'The Settings changes are not saved');
|
||||
expect(settingsPage.getBpmHostUrl()).toEqual(browser.params.testConfig.adf_aps.host, 'The BPM Settings changes are not saved');
|
||||
expect(settingsPage.getEcmHostUrl()).toEqual(browser.params.testConfig.adf_acs.host, 'The ECM Settings changes are not saved');
|
||||
beforeEach(async () => {
|
||||
await settingsPage.goToSettingsPage();
|
||||
|
||||
});
|
||||
|
||||
it('[C291949] Should have field validation for Content Services Url', () => {
|
||||
settingsPage.setProvider(settingsPage.getEcmAndBpmOption(), 'ALL');
|
||||
settingsPage.clearContentServicesURL();
|
||||
settingsPage.ecmText.sendKeys(protractor.Key.TAB);
|
||||
settingsPage.checkValidationMessageIsDisplayed();
|
||||
settingsPage.checkApplyButtonIsDisabled();
|
||||
it('[C245641] Should navigate User from Settings page to Login screen', async () => {
|
||||
await settingsPage.clickBackButton();
|
||||
await loginPage.waitForElements();
|
||||
});
|
||||
|
||||
it('[C291950] Should have field validation for Process Services Url', () => {
|
||||
settingsPage.setProvider(settingsPage.getEcmAndBpmOption(), 'ALL');
|
||||
settingsPage.clearProcessServicesURL();
|
||||
settingsPage.bpmText.sendKeys(protractor.Key.TAB);
|
||||
settingsPage.checkValidationMessageIsDisplayed();
|
||||
settingsPage.checkApplyButtonIsDisabled();
|
||||
it('[C291948] Should save ALL Settings changes when User clicks Apply button', async () => {
|
||||
await loginPage.goToLoginPage();
|
||||
await loginPage.clickSettingsIcon();
|
||||
await settingsPage.setProviderEcmBpm();
|
||||
await loginPage.waitForElements();
|
||||
await settingsPage.goToSettingsPage();
|
||||
await expect(await settingsPage.getSelectedOptionText()).toEqual('ALL', 'The Settings changes are not saved');
|
||||
await expect(await settingsPage.getBpmHostUrl()).toEqual(browser.params.testConfig.adf_aps.host, 'The BPM Settings changes are not saved');
|
||||
await expect(await settingsPage.getEcmHostUrl()).toEqual(browser.params.testConfig.adf_acs.host, 'The ECM Settings changes are not saved');
|
||||
|
||||
});
|
||||
|
||||
it('[C291951] Should not be able to sign in with invalid Content Services Url', () => {
|
||||
settingsPage.setProvider(settingsPage.getEcmOption(), 'ECM');
|
||||
settingsPage.setContentServicesURL('http://localhost:7070');
|
||||
settingsPage.clickApply();
|
||||
loginPage.waitForElements();
|
||||
loginPage.enterUsername(adminUserModel.id);
|
||||
loginPage.enterPassword(adminUserModel.password);
|
||||
loginPage.clickSignInButton();
|
||||
expect(loginPage.getLoginError()).toMatch(loginError);
|
||||
it('[C291949] Should have field validation for Content Services Url', async () => {
|
||||
await settingsPage.setProvider(settingsPage.getEcmAndBpmOption(), 'ALL');
|
||||
await settingsPage.clearContentServicesURL();
|
||||
await settingsPage.ecmText.sendKeys(protractor.Key.TAB);
|
||||
await settingsPage.checkValidationMessageIsDisplayed();
|
||||
await settingsPage.checkApplyButtonIsDisabled();
|
||||
});
|
||||
|
||||
it('[C291952] Should not be able to sign in with invalid Process Services Url', () => {
|
||||
settingsPage.setProvider(settingsPage.getBpmOption(), 'BPM');
|
||||
settingsPage.setProcessServicesURL('http://localhost:7070');
|
||||
settingsPage.clickApply();
|
||||
loginPage.waitForElements();
|
||||
loginPage.enterUsername(adminUserModel.id);
|
||||
loginPage.enterPassword(adminUserModel.password);
|
||||
loginPage.clickSignInButton();
|
||||
expect(loginPage.getLoginError()).toMatch(loginError);
|
||||
it('[C291950] Should have field validation for Process Services Url', async () => {
|
||||
await settingsPage.setProvider(settingsPage.getEcmAndBpmOption(), 'ALL');
|
||||
await settingsPage.clearProcessServicesURL();
|
||||
await settingsPage.bpmText.sendKeys(protractor.Key.TAB);
|
||||
await settingsPage.checkValidationMessageIsDisplayed();
|
||||
await settingsPage.checkApplyButtonIsDisabled();
|
||||
});
|
||||
|
||||
it('[C291951] Should not be able to sign in with invalid Content Services Url', async () => {
|
||||
await settingsPage.setProvider(settingsPage.getEcmOption(), 'ECM');
|
||||
await settingsPage.setContentServicesURL('http://localhost:7070');
|
||||
await settingsPage.clickApply();
|
||||
await loginPage.waitForElements();
|
||||
await loginPage.enterUsername(adminUserModel.id);
|
||||
await loginPage.enterPassword(adminUserModel.password);
|
||||
await loginPage.clickSignInButton();
|
||||
await expect(await loginPage.getLoginError()).toMatch(loginError);
|
||||
});
|
||||
|
||||
it('[C291952] Should not be able to sign in with invalid Process Services Url', async () => {
|
||||
await settingsPage.setProvider(settingsPage.getBpmOption(), 'BPM');
|
||||
await settingsPage.setProcessServicesURL('http://localhost:7070');
|
||||
await settingsPage.clickApply();
|
||||
await loginPage.waitForElements();
|
||||
await loginPage.enterUsername(adminUserModel.id);
|
||||
await loginPage.enterPassword(adminUserModel.password);
|
||||
await loginPage.clickSignInButton();
|
||||
await expect(await loginPage.getLoginError()).toMatch(loginError);
|
||||
});
|
||||
});
|
||||
|
||||
describe('Settings Component - Basic Authentication', () => {
|
||||
beforeAll( (done) => {
|
||||
settingsPage.goToSettingsPage();
|
||||
settingsPage.setProvider(settingsPage.getEcmAndBpmOption(), 'ALL');
|
||||
settingsPage.setContentServicesURL(browser.params.testConfig.adf_acs.host);
|
||||
settingsPage.setProcessServicesURL(browser.params.testConfig.adf_aps.host);
|
||||
settingsPage.clickApply();
|
||||
done();
|
||||
beforeAll(async () => {
|
||||
await settingsPage.goToSettingsPage();
|
||||
await settingsPage.setProvider(settingsPage.getEcmAndBpmOption(), 'ALL');
|
||||
await settingsPage.setContentServicesURL(browser.params.testConfig.adf_acs.host);
|
||||
await settingsPage.setProcessServicesURL(browser.params.testConfig.adf_aps.host);
|
||||
await settingsPage.clickApply();
|
||||
});
|
||||
|
||||
beforeEach( (done) => {
|
||||
loginPage.goToLoginPage();
|
||||
loginPage.clickSettingsIcon();
|
||||
settingsPage.checkProviderDropdownIsDisplayed();
|
||||
done();
|
||||
beforeEach(async () => {
|
||||
await loginPage.goToLoginPage();
|
||||
await loginPage.clickSettingsIcon();
|
||||
await settingsPage.checkProviderDropdownIsDisplayed();
|
||||
});
|
||||
|
||||
it('[C277751] Should allow the User to login to Process Services using the BPM selection on Settings page', () => {
|
||||
settingsPage.checkProviderOptions();
|
||||
settingsPage.checkBasicAuthRadioIsSelected();
|
||||
settingsPage.checkSsoRadioIsNotSelected();
|
||||
expect(settingsPage.getEcmHostUrl()).toBe(browser.params.testConfig.adf_acs.host);
|
||||
expect(settingsPage.getBpmHostUrl()).toBe(browser.params.testConfig.adf_aps.host);
|
||||
expect(settingsPage.getBackButton().isEnabled()).toBe(true);
|
||||
expect(settingsPage.getApplyButton().isEnabled()).toBe(true);
|
||||
loginPage.goToLoginPage();
|
||||
loginPage.clickSettingsIcon();
|
||||
settingsPage.checkProviderDropdownIsDisplayed();
|
||||
settingsPage.setProvider(settingsPage.getBpmOption(), 'BPM');
|
||||
settingsPage.clickBackButton();
|
||||
loginPage.waitForElements();
|
||||
loginPage.clickSettingsIcon();
|
||||
settingsPage.checkProviderDropdownIsDisplayed();
|
||||
settingsPage.setProviderBpm();
|
||||
loginPage.waitForElements();
|
||||
loginPage.enterUsername(adminUserModel.id);
|
||||
loginPage.enterPassword(adminUserModel.password);
|
||||
loginPage.clickSignInButton();
|
||||
navigationBarPage.navigateToProcessServicesPage();
|
||||
processServicesPage.checkApsContainer();
|
||||
processServicesPage.checkAppIsDisplayed('Task App');
|
||||
navigationBarPage.navigateToSettingsPage();
|
||||
expect(settingsPage.getSelectedOptionText()).toBe('BPM');
|
||||
settingsPage.checkBasicAuthRadioIsSelected();
|
||||
settingsPage.checkSsoRadioIsNotSelected();
|
||||
expect(settingsPage.getBpmHostUrl()).toBe(browser.params.testConfig.adf_aps.host);
|
||||
expect(settingsPage.getBackButton().isEnabled()).toBe(true);
|
||||
expect(settingsPage.getApplyButton().isEnabled()).toBe(true);
|
||||
settingsPage.clickBackButton();
|
||||
loginPage.waitForElements();
|
||||
BrowserActions.getUrl(browser.params.testConfig.adf.url + '/activiti');
|
||||
processServicesPage.checkApsContainer();
|
||||
processServicesPage.checkAppIsDisplayed('Task App');
|
||||
it('[C277751] Should allow the User to login to Process Services using the BPM selection on Settings page', async () => {
|
||||
await settingsPage.checkProviderOptions();
|
||||
await settingsPage.checkBasicAuthRadioIsSelected();
|
||||
await settingsPage.checkSsoRadioIsNotSelected();
|
||||
await expect(await settingsPage.getEcmHostUrl()).toBe(browser.params.testConfig.adf_acs.host);
|
||||
await expect(await settingsPage.getBpmHostUrl()).toBe(browser.params.testConfig.adf_aps.host);
|
||||
|
||||
await expect(await settingsPage.getBackButton().isEnabled()).toBe(true);
|
||||
await expect(await settingsPage.getApplyButton().isEnabled()).toBe(true);
|
||||
await loginPage.goToLoginPage();
|
||||
await loginPage.clickSettingsIcon();
|
||||
await settingsPage.checkProviderDropdownIsDisplayed();
|
||||
await settingsPage.setProvider(settingsPage.getBpmOption(), 'BPM');
|
||||
await settingsPage.clickBackButton();
|
||||
await loginPage.waitForElements();
|
||||
await loginPage.clickSettingsIcon();
|
||||
await settingsPage.checkProviderDropdownIsDisplayed();
|
||||
await settingsPage.setProviderBpm();
|
||||
await loginPage.waitForElements();
|
||||
await loginPage.enterUsername(adminUserModel.id);
|
||||
await loginPage.enterPassword(adminUserModel.password);
|
||||
await loginPage.clickSignInButton();
|
||||
await navigationBarPage.navigateToProcessServicesPage();
|
||||
await processServicesPage.checkApsContainer();
|
||||
await processServicesPage.checkAppIsDisplayed('Task App');
|
||||
await navigationBarPage.clickSettingsButton();
|
||||
await expect(await settingsPage.getSelectedOptionText()).toBe('BPM');
|
||||
|
||||
await settingsPage.checkBasicAuthRadioIsSelected();
|
||||
await settingsPage.checkSsoRadioIsNotSelected();
|
||||
await expect(await settingsPage.getBpmHostUrl()).toBe(browser.params.testConfig.adf_aps.host);
|
||||
|
||||
await expect(await settingsPage.getBackButton().isEnabled()).toBe(true);
|
||||
await expect(await settingsPage.getApplyButton().isEnabled()).toBe(true);
|
||||
await settingsPage.clickBackButton();
|
||||
await loginPage.waitForElements();
|
||||
await BrowserActions.getUrl(browser.params.testConfig.adf.url + '/activiti');
|
||||
await processServicesPage.checkApsContainer();
|
||||
await processServicesPage.checkAppIsDisplayed('Task App');
|
||||
});
|
||||
|
||||
it('[C277752] Should allow the User to login to Content Services using the ECM selection on Settings page', () => {
|
||||
settingsPage.setProvider(settingsPage.getEcmOption(), 'ECM');
|
||||
settingsPage.clickBackButton();
|
||||
loginPage.waitForElements();
|
||||
loginPage.clickSettingsIcon();
|
||||
settingsPage.checkProviderDropdownIsDisplayed();
|
||||
settingsPage.setProviderEcm();
|
||||
loginPage.waitForElements();
|
||||
loginPage.enterUsername(adminUserModel.id);
|
||||
loginPage.enterPassword(adminUserModel.password);
|
||||
loginPage.clickSignInButton();
|
||||
navigationBarPage.clickContentServicesButton();
|
||||
contentServicesPage.checkAcsContainer();
|
||||
navigationBarPage.navigateToSettingsPage();
|
||||
expect(settingsPage.getSelectedOptionText()).toBe('ECM');
|
||||
settingsPage.checkBasicAuthRadioIsSelected();
|
||||
settingsPage.checkSsoRadioIsNotSelected();
|
||||
expect(settingsPage.getEcmHostUrl()).toBe(browser.params.testConfig.adf_acs.host);
|
||||
expect(settingsPage.getBackButton().isEnabled()).toBe(true);
|
||||
expect(settingsPage.getApplyButton().isEnabled()).toBe(true);
|
||||
settingsPage.clickBackButton();
|
||||
loginPage.waitForElements();
|
||||
BrowserActions.getUrl(browser.params.testConfig.adf.url + '/files');
|
||||
contentServicesPage.checkAcsContainer();
|
||||
it('[C277752] Should allow the User to login to Content Services using the ECM selection on Settings page', async () => {
|
||||
await settingsPage.setProvider(settingsPage.getEcmOption(), 'ECM');
|
||||
await settingsPage.clickBackButton();
|
||||
await loginPage.waitForElements();
|
||||
await loginPage.clickSettingsIcon();
|
||||
await settingsPage.checkProviderDropdownIsDisplayed();
|
||||
await settingsPage.setProviderEcm();
|
||||
await loginPage.waitForElements();
|
||||
await loginPage.enterUsername(adminUserModel.id);
|
||||
await loginPage.enterPassword(adminUserModel.password);
|
||||
await loginPage.clickSignInButton();
|
||||
await navigationBarPage.clickContentServicesButton();
|
||||
await contentServicesPage.checkAcsContainer();
|
||||
await navigationBarPage.clickSettingsButton();
|
||||
await expect(await settingsPage.getSelectedOptionText()).toBe('ECM');
|
||||
await settingsPage.checkBasicAuthRadioIsSelected();
|
||||
await settingsPage.checkSsoRadioIsNotSelected();
|
||||
|
||||
await expect(await settingsPage.getEcmHostUrl()).toBe(browser.params.testConfig.adf_acs.host);
|
||||
await expect(await settingsPage.getBackButton().isEnabled()).toBe(true);
|
||||
await expect(await settingsPage.getApplyButton().isEnabled()).toBe(true);
|
||||
await settingsPage.clickBackButton();
|
||||
await loginPage.waitForElements();
|
||||
await BrowserActions.getUrl(browser.params.testConfig.adf.url + '/files');
|
||||
await contentServicesPage.checkAcsContainer();
|
||||
});
|
||||
|
||||
it('[C277753] Should allow the User to login to both Process Services and Content Services using the ALL selection on Settings Page', () => {
|
||||
settingsPage.setProvider(settingsPage.getEcmAndBpmOption(), 'ALL');
|
||||
settingsPage.clickBackButton();
|
||||
loginPage.waitForElements();
|
||||
loginPage.clickSettingsIcon();
|
||||
settingsPage.checkProviderDropdownIsDisplayed();
|
||||
settingsPage.setProviderEcmBpm();
|
||||
loginPage.waitForElements();
|
||||
loginPage.enterUsername(adminUserModel.id);
|
||||
loginPage.enterPassword(adminUserModel.password);
|
||||
loginPage.clickSignInButton();
|
||||
navigationBarPage.clickContentServicesButton();
|
||||
contentServicesPage.checkAcsContainer();
|
||||
navigationBarPage.navigateToProcessServicesPage();
|
||||
processServicesPage.checkApsContainer();
|
||||
processServicesPage.checkAppIsDisplayed('Task App');
|
||||
navigationBarPage.navigateToSettingsPage();
|
||||
expect(settingsPage.getSelectedOptionText()).toBe('ALL');
|
||||
settingsPage.checkBasicAuthRadioIsSelected();
|
||||
settingsPage.checkSsoRadioIsNotSelected();
|
||||
expect(settingsPage.getEcmHostUrl()).toBe(browser.params.testConfig.adf_acs.host);
|
||||
expect(settingsPage.getBpmHostUrl()).toBe(browser.params.testConfig.adf_aps.host);
|
||||
expect(settingsPage.getBackButton().isEnabled()).toBe(true);
|
||||
expect(settingsPage.getApplyButton().isEnabled()).toBe(true);
|
||||
settingsPage.clickBackButton();
|
||||
loginPage.waitForElements();
|
||||
BrowserActions.getUrl(browser.params.testConfig.adf.url + '/files');
|
||||
contentServicesPage.checkAcsContainer();
|
||||
BrowserActions.getUrl(browser.params.testConfig.adf.url + '/activiti');
|
||||
processServicesPage.checkApsContainer();
|
||||
processServicesPage.checkAppIsDisplayed('Task App');
|
||||
it('[C277753] Should allow the User to login to both Process Services and Content Services using the ALL selection on Settings Page', async () => {
|
||||
await settingsPage.setProvider(settingsPage.getEcmAndBpmOption(), 'ALL');
|
||||
await settingsPage.clickBackButton();
|
||||
await loginPage.waitForElements();
|
||||
await loginPage.clickSettingsIcon();
|
||||
await settingsPage.checkProviderDropdownIsDisplayed();
|
||||
await settingsPage.setProviderEcmBpm();
|
||||
await loginPage.waitForElements();
|
||||
await loginPage.enterUsername(adminUserModel.id);
|
||||
await loginPage.enterPassword(adminUserModel.password);
|
||||
await loginPage.clickSignInButton();
|
||||
await navigationBarPage.clickContentServicesButton();
|
||||
await contentServicesPage.checkAcsContainer();
|
||||
await navigationBarPage.navigateToProcessServicesPage();
|
||||
await processServicesPage.checkApsContainer();
|
||||
await processServicesPage.checkAppIsDisplayed('Task App');
|
||||
await navigationBarPage.clickSettingsButton();
|
||||
await expect(await settingsPage.getSelectedOptionText()).toBe('ALL');
|
||||
await settingsPage.checkBasicAuthRadioIsSelected();
|
||||
await settingsPage.checkSsoRadioIsNotSelected();
|
||||
await expect(await settingsPage.getEcmHostUrl()).toBe(browser.params.testConfig.adf_acs.host);
|
||||
await expect(await settingsPage.getBpmHostUrl()).toBe(browser.params.testConfig.adf_aps.host);
|
||||
|
||||
await expect(await settingsPage.getBackButton().isEnabled()).toBe(true);
|
||||
await expect(await settingsPage.getApplyButton().isEnabled()).toBe(true);
|
||||
await settingsPage.clickBackButton();
|
||||
await loginPage.waitForElements();
|
||||
await BrowserActions.getUrl(browser.params.testConfig.adf.url + '/files');
|
||||
await contentServicesPage.checkAcsContainer();
|
||||
await BrowserActions.getUrl(browser.params.testConfig.adf.url + '/activiti');
|
||||
await processServicesPage.checkApsContainer();
|
||||
await processServicesPage.checkAppIsDisplayed('Task App');
|
||||
});
|
||||
});
|
||||
});
|
||||
|
||||
@@ -28,7 +28,7 @@ describe('User Info - SSO', () => {
|
||||
let silentLogin, identityUser;
|
||||
let identityService: IdentityService;
|
||||
|
||||
beforeAll(async (done) => {
|
||||
beforeAll(async () => {
|
||||
const apiService = new ApiService(browser.params.config.oauth2.clientId, browser.params.testConfig.adf.url, browser.params.testConfig.adf.hostSso, 'ECM');
|
||||
await apiService.login(browser.params.testConfig.adf.adminEmail, browser.params.testConfig.adf.adminPassword);
|
||||
|
||||
@@ -36,15 +36,14 @@ describe('User Info - SSO', () => {
|
||||
identityUser = await identityService.createIdentityUser();
|
||||
|
||||
silentLogin = false;
|
||||
settingsPage.setProviderEcmSso(browser.params.testConfig.adf.url,
|
||||
await settingsPage.setProviderEcmSso(browser.params.testConfig.adf.url,
|
||||
browser.params.testConfig.adf.hostSso,
|
||||
browser.params.testConfig.adf.hostIdentity, silentLogin, true, browser.params.config.oauth2.clientId);
|
||||
|
||||
loginSSOPage.clickOnSSOButton();
|
||||
await loginSSOPage.clickOnSSOButton();
|
||||
|
||||
loginSSOPage.loginSSOIdentityService(identityUser.email, identityUser.password);
|
||||
await loginSSOPage.loginSSOIdentityService(identityUser.email, identityUser.password);
|
||||
|
||||
done();
|
||||
});
|
||||
|
||||
afterAll(async () => {
|
||||
@@ -53,13 +52,13 @@ describe('User Info - SSO', () => {
|
||||
}
|
||||
});
|
||||
|
||||
it('[C290066] Should display UserInfo when login using SSO', () => {
|
||||
userInfoPage.clickUserProfile();
|
||||
expect(userInfoPage.getSsoHeaderTitle()).toEqual(identityUser.firstName + ' ' + identityUser.lastName);
|
||||
expect(userInfoPage.getSsoTitle()).toEqual(identityUser.firstName + ' ' + identityUser.lastName);
|
||||
expect(userInfoPage.getSsoEmail()).toEqual(identityUser.email);
|
||||
userInfoPage.closeUserProfile();
|
||||
userInfoPage.dialogIsNotDisplayed();
|
||||
it('[C290066] Should display UserInfo when login using SSO', async () => {
|
||||
await userInfoPage.clickUserProfile();
|
||||
await expect(await userInfoPage.getSsoHeaderTitle()).toEqual(identityUser.firstName + ' ' + identityUser.lastName);
|
||||
await expect(await userInfoPage.getSsoTitle()).toEqual(identityUser.firstName + ' ' + identityUser.lastName);
|
||||
await expect(await userInfoPage.getSsoEmail()).toEqual(identityUser.email);
|
||||
await userInfoPage.closeUserProfile();
|
||||
await userInfoPage.dialogIsNotDisplayed();
|
||||
});
|
||||
|
||||
});
|
||||
|
||||
@@ -46,7 +46,7 @@ describe('User Info component', () => {
|
||||
'location': resources.Files.PROFILE_IMAGES.BPM.file_location
|
||||
});
|
||||
|
||||
beforeAll(async (done) => {
|
||||
beforeAll(async () => {
|
||||
const users = new UsersActions();
|
||||
|
||||
this.alfrescoJsApi = new AlfrescoApi({
|
||||
@@ -69,7 +69,6 @@ describe('User Info component', () => {
|
||||
|
||||
await this.alfrescoJsApi.core.peopleApi.addPerson(contentUserModel);
|
||||
|
||||
done();
|
||||
});
|
||||
|
||||
afterAll(async () => {
|
||||
@@ -79,86 +78,86 @@ describe('User Info component', () => {
|
||||
it('[C260111] Should display UserInfo when Process Services and Content Services are enabled', async () => {
|
||||
await loginPage.loginToAllUsingUserModel(contentUserModel);
|
||||
|
||||
userInfoPage.clickUserProfile();
|
||||
await userInfoPage.clickUserProfile();
|
||||
|
||||
expect(userInfoPage.getContentHeaderTitle()).toEqual(contentUserModel.firstName + ' ' + contentUserModel.lastName);
|
||||
expect(userInfoPage.getContentTitle()).toEqual(contentUserModel.firstName + ' ' + contentUserModel.lastName);
|
||||
expect(userInfoPage.getContentEmail()).toEqual(contentUserModel.email);
|
||||
expect(userInfoPage.getContentJobTitle()).toEqual('N/A');
|
||||
await expect(await userInfoPage.getContentHeaderTitle()).toEqual(contentUserModel.firstName + ' ' + contentUserModel.lastName);
|
||||
await expect(await userInfoPage.getContentTitle()).toEqual(contentUserModel.firstName + ' ' + contentUserModel.lastName);
|
||||
await expect(await userInfoPage.getContentEmail()).toEqual(contentUserModel.email);
|
||||
await expect(await userInfoPage.getContentJobTitle()).toEqual('N/A');
|
||||
|
||||
userInfoPage.checkInitialImage();
|
||||
userInfoPage.APSProfileImageNotDisplayed();
|
||||
userInfoPage.ACSProfileImageNotDisplayed();
|
||||
userInfoPage.clickOnContentServicesTab();
|
||||
await userInfoPage.checkInitialImage();
|
||||
await userInfoPage.APSProfileImageNotDisplayed();
|
||||
await userInfoPage.ACSProfileImageNotDisplayed();
|
||||
await userInfoPage.clickOnContentServicesTab();
|
||||
|
||||
expect(userInfoPage.getContentHeaderTitle()).toEqual(contentUserModel.firstName + ' ' + contentUserModel.lastName);
|
||||
expect(userInfoPage.getContentTitle()).toEqual(contentUserModel.firstName + ' ' + contentUserModel.lastName);
|
||||
expect(userInfoPage.getContentEmail()).toEqual(contentUserModel.email);
|
||||
expect(userInfoPage.getContentJobTitle()).toEqual('N/A');
|
||||
await expect(await userInfoPage.getContentHeaderTitle()).toEqual(contentUserModel.firstName + ' ' + contentUserModel.lastName);
|
||||
await expect(await userInfoPage.getContentTitle()).toEqual(contentUserModel.firstName + ' ' + contentUserModel.lastName);
|
||||
await expect(await userInfoPage.getContentEmail()).toEqual(contentUserModel.email);
|
||||
await expect(await userInfoPage.getContentJobTitle()).toEqual('N/A');
|
||||
|
||||
userInfoPage.checkInitialImage();
|
||||
userInfoPage.APSProfileImageNotDisplayed();
|
||||
userInfoPage.ACSProfileImageNotDisplayed();
|
||||
userInfoPage.clickOnProcessServicesTab();
|
||||
userInfoPage.checkProcessServicesTabIsSelected();
|
||||
await userInfoPage.checkInitialImage();
|
||||
await userInfoPage.APSProfileImageNotDisplayed();
|
||||
await userInfoPage.ACSProfileImageNotDisplayed();
|
||||
await userInfoPage.clickOnProcessServicesTab();
|
||||
await userInfoPage.checkProcessServicesTabIsSelected();
|
||||
|
||||
expect(userInfoPage.getProcessHeaderTitle()).toEqual(contentUserModel.firstName + ' ' + contentUserModel.lastName);
|
||||
expect(userInfoPage.getProcessTitle()).toEqual(contentUserModel.firstName + ' ' + processUserModel.lastName);
|
||||
expect(userInfoPage.getProcessEmail()).toEqual(contentUserModel.email);
|
||||
await expect(await userInfoPage.getProcessHeaderTitle()).toEqual(contentUserModel.firstName + ' ' + contentUserModel.lastName);
|
||||
await expect(await userInfoPage.getProcessTitle()).toEqual(contentUserModel.firstName + ' ' + processUserModel.lastName);
|
||||
await expect(await userInfoPage.getProcessEmail()).toEqual(contentUserModel.email);
|
||||
|
||||
userInfoPage.checkInitialImage();
|
||||
userInfoPage.APSProfileImageNotDisplayed();
|
||||
userInfoPage.ACSProfileImageNotDisplayed();
|
||||
userInfoPage.closeUserProfile();
|
||||
await userInfoPage.checkInitialImage();
|
||||
await userInfoPage.APSProfileImageNotDisplayed();
|
||||
await userInfoPage.ACSProfileImageNotDisplayed();
|
||||
await userInfoPage.closeUserProfile();
|
||||
});
|
||||
|
||||
it('[C260113] Should display UserInfo when Content Services is enabled and Process Services is disabled', async () => {
|
||||
await loginPage.loginToContentServicesUsingUserModel(contentUserModel);
|
||||
|
||||
userInfoPage.clickUserProfile();
|
||||
userInfoPage.dialogIsDisplayed();
|
||||
await userInfoPage.clickUserProfile();
|
||||
await userInfoPage.dialogIsDisplayed();
|
||||
|
||||
expect(userInfoPage.getContentHeaderTitle()).toEqual(contentUserModel.firstName + ' ' + contentUserModel.lastName);
|
||||
expect(userInfoPage.getContentTitle()).toEqual(contentUserModel.firstName + ' ' + contentUserModel.lastName);
|
||||
expect(userInfoPage.getContentEmail()).toEqual(contentUserModel.email);
|
||||
expect(userInfoPage.getContentJobTitle()).toEqual('N/A');
|
||||
await expect(await userInfoPage.getContentHeaderTitle()).toEqual(contentUserModel.firstName + ' ' + contentUserModel.lastName);
|
||||
await expect(await userInfoPage.getContentTitle()).toEqual(contentUserModel.firstName + ' ' + contentUserModel.lastName);
|
||||
await expect(await userInfoPage.getContentEmail()).toEqual(contentUserModel.email);
|
||||
await expect(await userInfoPage.getContentJobTitle()).toEqual('N/A');
|
||||
|
||||
userInfoPage.checkInitialImage();
|
||||
userInfoPage.APSProfileImageNotDisplayed();
|
||||
userInfoPage.ACSProfileImageNotDisplayed();
|
||||
userInfoPage.closeUserProfile();
|
||||
userInfoPage.dialogIsNotDisplayed();
|
||||
await userInfoPage.checkInitialImage();
|
||||
await userInfoPage.APSProfileImageNotDisplayed();
|
||||
await userInfoPage.ACSProfileImageNotDisplayed();
|
||||
await userInfoPage.closeUserProfile();
|
||||
await userInfoPage.dialogIsNotDisplayed();
|
||||
});
|
||||
|
||||
it('[C260115] Should display UserInfo when Process Services is enabled and Content Services is disabled', async () => {
|
||||
await loginPage.loginToProcessServicesUsingUserModel(contentUserModel);
|
||||
|
||||
userInfoPage.clickUserProfile();
|
||||
await userInfoPage.clickUserProfile();
|
||||
|
||||
userInfoPage.dialogIsDisplayed();
|
||||
await userInfoPage.dialogIsDisplayed();
|
||||
|
||||
expect(userInfoPage.getProcessHeaderTitle()).toEqual(processUserModel.firstName + ' ' + processUserModel.lastName);
|
||||
expect(userInfoPage.getProcessTitle()).toEqual(processUserModel.firstName + ' ' + processUserModel.lastName);
|
||||
expect(userInfoPage.getProcessEmail()).toEqual(processUserModel.email);
|
||||
await expect(await userInfoPage.getProcessHeaderTitle()).toEqual(processUserModel.firstName + ' ' + processUserModel.lastName);
|
||||
await expect(await userInfoPage.getProcessTitle()).toEqual(processUserModel.firstName + ' ' + processUserModel.lastName);
|
||||
await expect(await userInfoPage.getProcessEmail()).toEqual(processUserModel.email);
|
||||
|
||||
userInfoPage.checkInitialImage();
|
||||
userInfoPage.APSProfileImageNotDisplayed();
|
||||
userInfoPage.ACSProfileImageNotDisplayed();
|
||||
userInfoPage.closeUserProfile();
|
||||
await userInfoPage.checkInitialImage();
|
||||
await userInfoPage.APSProfileImageNotDisplayed();
|
||||
await userInfoPage.ACSProfileImageNotDisplayed();
|
||||
await userInfoPage.closeUserProfile();
|
||||
});
|
||||
|
||||
it('[C260117] Should display UserInfo with profile image uploaded in ACS', async () => {
|
||||
await PeopleAPI.updateAvatarViaAPI(contentUserModel, acsAvatarFileModel, '-me-');
|
||||
await PeopleAPI.getAvatarViaAPI(4, contentUserModel, '-me-', function () {
|
||||
await PeopleAPI.getAvatarViaAPI(4, contentUserModel, '-me-', async() => {
|
||||
});
|
||||
|
||||
await loginPage.loginToContentServicesUsingUserModel(contentUserModel);
|
||||
|
||||
userInfoPage.clickUserProfile();
|
||||
await userInfoPage.clickUserProfile();
|
||||
|
||||
userInfoPage.checkACSProfileImage();
|
||||
userInfoPage.APSProfileImageNotDisplayed();
|
||||
userInfoPage.closeUserProfile();
|
||||
await userInfoPage.checkACSProfileImage();
|
||||
await userInfoPage.APSProfileImageNotDisplayed();
|
||||
await userInfoPage.closeUserProfile();
|
||||
});
|
||||
|
||||
it('[C260118] Should display UserInfo with profile image uploaded in APS', async () => {
|
||||
@@ -168,12 +167,12 @@ describe('User Info component', () => {
|
||||
|
||||
await loginPage.loginToProcessServicesUsingUserModel(contentUserModel);
|
||||
|
||||
userInfoPage.clickUserProfile();
|
||||
await userInfoPage.clickUserProfile();
|
||||
|
||||
userInfoPage.checkAPSProfileImage();
|
||||
userInfoPage.ACSProfileImageNotDisplayed();
|
||||
userInfoPage.initialImageNotDisplayed();
|
||||
userInfoPage.closeUserProfile();
|
||||
await userInfoPage.checkAPSProfileImage();
|
||||
await userInfoPage.ACSProfileImageNotDisplayed();
|
||||
await userInfoPage.initialImageNotDisplayed();
|
||||
await userInfoPage.closeUserProfile();
|
||||
});
|
||||
|
||||
it('[C260120] Should not display profile image in UserInfo when deleted in ACS', async () => {
|
||||
@@ -181,11 +180,11 @@ describe('User Info component', () => {
|
||||
|
||||
await loginPage.loginToContentServicesUsingUserModel(contentUserModel);
|
||||
|
||||
userInfoPage.clickUserProfile();
|
||||
await userInfoPage.clickUserProfile();
|
||||
|
||||
userInfoPage.checkInitialImage();
|
||||
userInfoPage.APSProfileImageNotDisplayed();
|
||||
userInfoPage.ACSProfileImageNotDisplayed();
|
||||
userInfoPage.closeUserProfile();
|
||||
await userInfoPage.checkInitialImage();
|
||||
await userInfoPage.APSProfileImageNotDisplayed();
|
||||
await userInfoPage.ACSProfileImageNotDisplayed();
|
||||
await userInfoPage.closeUserProfile();
|
||||
});
|
||||
});
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user