[ADF-] update library to use new js-api 3.0.0 (#4097)

This commit is contained in:
Eugenio Romano 2019-01-06 23:57:01 +01:00 committed by Eugenio Romano
parent 2acd1b4e26
commit 3ef7d3b7ea
430 changed files with 1966 additions and 2149 deletions

View File

@ -14,3 +14,13 @@ integration
tools tools
demo-shell/src/ demo-shell/src/
demo-shell/resources/ demo-shell/resources/
/angular.json
/desktop.ini
/cspell.json
/.travis.yml
/CODE_OF_CONDUCT.md
/.stylelintignore
/ALFRESCOCORS.md
/CONTRIBUTING.md
/appveyor.yml
/BROWSER-SUPPORT.md

1
.gitignore vendored
View File

@ -31,3 +31,4 @@ src/environments/
/docs/docs.json /docs/docs.json
/protractorFailuresReport /protractorFailuresReport
coverage/ coverage/
/desktop.ini

View File

@ -55,6 +55,7 @@ jobs:
- npm run stylelint || exit 1 - npm run stylelint || exit 1
- rm -rf tmp && (./scripts/smart-build.sh -b $TRAVIS_BRANCH || exit 1;); - rm -rf tmp && (./scripts/smart-build.sh -b $TRAVIS_BRANCH || exit 1;);
- npm run build:dist || exit 1 - npm run build:dist || exit 1
- npm run bundlesize-check || exit 1
- stage: Unit test - stage: Unit test
name: core name: core
script: script:

View File

@ -8,10 +8,6 @@
<img src='https://travis-ci.org/Alfresco/alfresco-ng2-components.svg?branch=master' alt='travis <img src='https://travis-ci.org/Alfresco/alfresco-ng2-components.svg?branch=master' alt='travis
Status' /> Status' />
</a> </a>
<a title='Build Status AppVeyor' href="https://ci.appveyor.com/project/alfresco/alfresco-ng2-components">
<img src='https://ci.appveyor.com/api/projects/status/github/Alfresco/alfresco-ng2-components' alt='travis
Status' />
</a>
<a href='https://codecov.io/gh/Alfresco/alfresco-ng2-components'> <a href='https://codecov.io/gh/Alfresco/alfresco-ng2-components'>
<img src='http://img.shields.io/codecov/c/github/Alfresco/alfresco-ng2-components/master.svg?maxAge=2592000' alt='Coverage Status' /> <img src='http://img.shields.io/codecov/c/github/Alfresco/alfresco-ng2-components/master.svg?maxAge=2592000' alt='Coverage Status' />
</a> </a>
@ -20,6 +16,7 @@
</a> </a>
</p> </p>
## Introduction ## Introduction
See the [Introduction page](INTRODUCTION.md) to get started with the Alfresco Application Development Framework. See the [Introduction page](INTRODUCTION.md) to get started with the Alfresco Application Development Framework.

Binary file not shown.

Before

Width:  |  Height:  |  Size: 35 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 36 KiB

View File

@ -15,7 +15,7 @@ module.exports = {
} }
}, },
"/activiti-app": { "/activiti-app": {
"target": "http://localhost:9999", "target": "http://localhost:8080",
"secure": false, "secure": false,
"pathRewrite": { "pathRewrite": {
"^/activiti-app/activiti-app": "" "^/activiti-app/activiti-app": ""

View File

@ -16,7 +16,7 @@
*/ */
import { Component, ViewEncapsulation } from '@angular/core'; import { Component, ViewEncapsulation } from '@angular/core';
import { SitePaging, SiteEntry, MinimalNodeEntryEntity } from 'alfresco-js-api'; import { SitePaging, SiteEntry, MinimalNodeEntryEntity } from '@alfresco/js-api';
import { ShareDataRow } from '@alfresco/adf-content-services'; import { ShareDataRow } from '@alfresco/adf-content-services';
import { DataRow, DataColumn, ThumbnailService } from '@alfresco/adf-core'; import { DataRow, DataColumn, ThumbnailService } from '@alfresco/adf-core';
@ -44,20 +44,20 @@ export class ContentNodeSelectorComponent {
customImageResolver: any = null; customImageResolver: any = null;
defaultSites: SiteEntry[] = [ defaultSites: SiteEntry[] = [
{ entry: { title: 'MINE', guid: '-my-' } }, new SiteEntry({ entry: { title: 'MINE', guid: '-my-' } }),
{ entry: { title: 'ROOTY', guid: '-root-' } }]; new SiteEntry({ entry: { title: 'ROOTY', guid: '-root-' } })];
customSites: SitePaging = { customSites: SitePaging = new SitePaging({
list: { list: {
entries: [ entries: [
{ entry: { title: 'MINE', guid: '-my-' } }, { entry: { title: 'MINE', guid: '-my-' } },
{ entry: { title: 'ROOTY', guid: '-root-' } }], { entry: { title: 'ROOTY', guid: '-root-' } }],
pagination: {} pagination: {}
} }
}; });
onClickAddSite() { onClickAddSite() {
const newSiteEntry: SiteEntry = { entry: { title: this.customSideTitle, guid: this.customSideGuid } }; const newSiteEntry: SiteEntry = new SiteEntry({ entry: { title: this.customSideTitle, guid: this.customSideGuid } });
this.customSites.list.entries.push(newSiteEntry); this.customSites.list.entries.push(newSiteEntry);
this.customSideGuid = ''; this.customSideGuid = '';
this.customSideTitle = ''; this.customSideTitle = '';

View File

@ -208,16 +208,6 @@
</mat-slide-toggle> </mat-slide-toggle>
</p> </p>
<p class="toggle">
<mat-slide-toggle
id="adf-switch-share"
[color]="'primary'"
(change)="toggleAllowShare()"
[checked]="allowShare">
Allow Share
</mat-slide-toggle>
</p>
<p class="toggle"> <p class="toggle">
<mat-slide-toggle <mat-slide-toggle
id="adf-switch-allowsidebar" id="adf-switch-allowsidebar"
@ -274,7 +264,6 @@
[allowGoBack]="allowGoBack" [allowGoBack]="allowGoBack"
[displayName]="displayName" [displayName]="displayName"
[showToolbar]="showToolbar" [showToolbar]="showToolbar"
[allowShare]="allowShare"
[allowPrint]="allowPrint" [allowPrint]="allowPrint"
[allowDownload]="allowDownload" [allowDownload]="allowDownload"
[allowSidebar]="allowSidebar" [allowSidebar]="allowSidebar"

View File

@ -43,7 +43,6 @@ export class FileViewComponent implements OnInit {
openWith = false; openWith = false;
allowDownload = true; allowDownload = true;
allowPrint = true; allowPrint = true;
allowShare = true;
allowSidebar = true; allowSidebar = true;
allowLeftSidebar = true; allowLeftSidebar = true;
moreActions = true; moreActions = true;
@ -120,10 +119,6 @@ export class FileViewComponent implements OnInit {
this.allowPrint = !this.allowPrint; this.allowPrint = !this.allowPrint;
} }
toggleAllowShare() {
this.allowShare = !this.allowShare;
}
toggleOpenMoreActions() { toggleOpenMoreActions() {
this.moreActions = !this.moreActions; this.moreActions = !this.moreActions;
} }

View File

@ -23,7 +23,7 @@ import { Location } from '@angular/common';
import { MatDialog } from '@angular/material'; import { MatDialog } from '@angular/material';
import { ActivatedRoute, Params, Router } from '@angular/router'; import { ActivatedRoute, Params, Router } from '@angular/router';
import { MinimalNodeEntity, NodePaging, Pagination, MinimalNodeEntryEntity, SiteEntry } from 'alfresco-js-api'; import { MinimalNodeEntity, NodePaging, Pagination, MinimalNodeEntryEntity, SiteEntry } from '@alfresco/js-api';
import { import {
AlfrescoApiService, AuthenticationService, AppConfigService, AppConfigValues, ContentService, TranslationService, AlfrescoApiService, AuthenticationService, AppConfigService, AppConfigValues, ContentService, TranslationService,
FileUploadEvent, FolderCreatedEvent, LogService, NotificationService, FileUploadEvent, FolderCreatedEvent, LogService, NotificationService,
@ -57,7 +57,7 @@ const DEFAULT_FOLDER_TO_SHOW = '-my-';
export class FilesComponent implements OnInit, OnChanges, OnDestroy { export class FilesComponent implements OnInit, OnChanges, OnDestroy {
errorMessage: string = null; errorMessage: string = null;
fileNodeId: any; nodeId: any;
showViewer = false; showViewer = false;
showVersions = false; showVersions = false;
allowDropFiles = true; allowDropFiles = true;

View File

@ -17,7 +17,7 @@
import { Component, Inject, ViewEncapsulation } from '@angular/core'; import { Component, Inject, ViewEncapsulation } from '@angular/core';
import { MAT_DIALOG_DATA, MatDialogRef } from '@angular/material'; import { MAT_DIALOG_DATA, MatDialogRef } from '@angular/material';
import { MinimalNodeEntryEntity } from 'alfresco-js-api'; import { MinimalNodeEntryEntity } from '@alfresco/js-api';
@Component({ @Component({
templateUrl: './metadata-dialog-adapter.component.html', templateUrl: './metadata-dialog-adapter.component.html',

View File

@ -17,7 +17,7 @@
import { Component, Inject, ViewEncapsulation } from '@angular/core'; import { Component, Inject, ViewEncapsulation } from '@angular/core';
import { MAT_DIALOG_DATA, MatDialogRef } from '@angular/material'; import { MAT_DIALOG_DATA, MatDialogRef } from '@angular/material';
import { MinimalNodeEntryEntity } from 'alfresco-js-api'; import { MinimalNodeEntryEntity } from '@alfresco/js-api';
import { MatSnackBar } from '@angular/material'; import { MatSnackBar } from '@angular/material';
@Component({ @Component({

View File

@ -18,5 +18,5 @@
<adf-viewer <adf-viewer
[(showViewer)]="showViewer" [(showViewer)]="showViewer"
[overlayMode]="isOverlay" [overlayMode]="isOverlay"
[fileNodeId]="nodeId"> [nodeId]="nodeId">
</adf-viewer> </adf-viewer>

View File

@ -18,7 +18,7 @@
import { Component, Optional, OnInit, ViewChild } from '@angular/core'; import { Component, Optional, OnInit, ViewChild } from '@angular/core';
import { ActivatedRoute, Params } from '@angular/router'; import { ActivatedRoute, Params } from '@angular/router';
import { PermissionListComponent, NodePermissionDialogService } from '@alfresco/adf-content-services'; import { PermissionListComponent, NodePermissionDialogService } from '@alfresco/adf-content-services';
import { MinimalNodeEntryEntity } from 'alfresco-js-api'; import { MinimalNodeEntryEntity } from '@alfresco/js-api';
import { NodesApiService, NotificationService } from '@alfresco/adf-core'; import { NodesApiService, NotificationService } from '@alfresco/adf-core';
@Component({ @Component({

View File

@ -33,7 +33,7 @@ import {
ProcessInstanceFilterRepresentation, ProcessInstanceFilterRepresentation,
Pagination, Pagination,
UserProcessInstanceFilterRepresentation UserProcessInstanceFilterRepresentation
} from 'alfresco-js-api'; } from '@alfresco/js-api';
import { import {
FORM_FIELD_VALIDATORS, FormEvent, FormFieldEvent, FormRenderingService, FormService, FORM_FIELD_VALIDATORS, FormEvent, FormFieldEvent, FormRenderingService, FormService,
DynamicTableRow, ValidateDynamicTableRowEvent, AppConfigService, PaginationComponent, UserPreferenceValues DynamicTableRow, ValidateDynamicTableRowEvent, AppConfigService, PaginationComponent, UserPreferenceValues

View File

@ -17,7 +17,7 @@
import { Component } from '@angular/core'; import { Component } from '@angular/core';
import { Router } from '@angular/router'; import { Router } from '@angular/router';
import { MinimalNodeEntity } from 'alfresco-js-api'; import { MinimalNodeEntity } from '@alfresco/js-api';
import { PreviewService } from '../../services/preview.service'; import { PreviewService } from '../../services/preview.service';
@Component({ @Component({

View File

@ -15,7 +15,7 @@
* limitations under the License. * limitations under the License.
*/ */
import { QueryBody } from 'alfresco-js-api'; import { QueryBody } from '@alfresco/js-api';
import { SearchConfigurationInterface } from '@alfresco/adf-core'; import { SearchConfigurationInterface } from '@alfresco/adf-core';
export class TestSearchConfigurationService implements SearchConfigurationInterface { export class TestSearchConfigurationService implements SearchConfigurationInterface {

View File

@ -16,7 +16,7 @@
*/ */
import { Component, ViewChild, ViewEncapsulation } from '@angular/core'; import { Component, ViewChild, ViewEncapsulation } from '@angular/core';
import { NodePaging, Pagination, QueryBody, MinimalNodeEntity } from 'alfresco-js-api'; import { NodePaging, Pagination, QueryBody, MinimalNodeEntity } from '@alfresco/js-api';
import { SearchComponent } from '@alfresco/adf-content-services'; import { SearchComponent } from '@alfresco/adf-content-services';
import { ThumbnailService } from '@alfresco/adf-core'; import { ThumbnailService } from '@alfresco/adf-core';
import { SearchService, SearchConfigurationService } from '@alfresco/adf-core'; import { SearchService, SearchConfigurationService } from '@alfresco/adf-core';

View File

@ -17,7 +17,7 @@
import { Component, OnInit, Optional, OnDestroy } from '@angular/core'; import { Component, OnInit, Optional, OnDestroy } from '@angular/core';
import { Router, ActivatedRoute, Params } from '@angular/router'; import { Router, ActivatedRoute, Params } from '@angular/router';
import { NodePaging, Pagination } from 'alfresco-js-api'; import { NodePaging, Pagination, ResultSetPaging } from '@alfresco/js-api';
import { SearchQueryBuilderService } from '@alfresco/adf-content-services'; import { SearchQueryBuilderService } from '@alfresco/adf-content-services';
import { UserPreferencesService, SearchService, AppConfigService } from '@alfresco/adf-core'; import { UserPreferencesService, SearchService, AppConfigService } from '@alfresco/adf-core';
import { Subscription } from 'rxjs'; import { Subscription } from 'rxjs';
@ -61,10 +61,10 @@ export class SearchResultComponent implements OnInit, OnDestroy {
this.isLoading = true; this.isLoading = true;
}), }),
this.queryBuilder.executed.subscribe((data) => { this.queryBuilder.executed.subscribe((resultSetPaging: ResultSetPaging) => {
this.queryBuilder.paging.skipCount = 0; this.queryBuilder.paging.skipCount = 0;
this.onSearchResultLoaded(data); this.onSearchResultLoaded(resultSetPaging);
this.isLoading = false; this.isLoading = false;
}) })
); );
@ -79,7 +79,12 @@ export class SearchResultComponent implements OnInit, OnDestroy {
this.queryBuilder.update(); this.queryBuilder.update();
} else { } else {
this.queryBuilder.userQuery = null; this.queryBuilder.userQuery = null;
this.queryBuilder.executed.next({ list: { pagination: { totalItems: 0 }, entries: [] } }); this.queryBuilder.executed.next(new ResultSetPaging({
list: {
pagination: { totalItems: 0 },
entries: []
}
}));
} }
}); });
} }
@ -101,9 +106,9 @@ export class SearchResultComponent implements OnInit, OnDestroy {
this.subscriptions = []; this.subscriptions = [];
} }
onSearchResultLoaded(nodePaging: NodePaging) { onSearchResultLoaded(resultSetPaging: ResultSetPaging) {
this.data = nodePaging; this.data = resultSetPaging;
this.pagination = { ...nodePaging.list.pagination }; this.pagination = { ...resultSetPaging.list.pagination };
} }
onRefreshPagination(pagination: Pagination) { onRefreshPagination(pagination: Pagination) {

View File

@ -19,7 +19,7 @@ import { Component, ViewChild } from '@angular/core';
import { DocumentListComponent } from '@alfresco/adf-content-services'; import { DocumentListComponent } from '@alfresco/adf-content-services';
import { UserPreferencesService, UserPreferenceValues, RestoreMessageModel, NotificationService } from '@alfresco/adf-core'; import { UserPreferencesService, UserPreferenceValues, RestoreMessageModel, NotificationService } from '@alfresco/adf-core';
import { Router } from '@angular/router'; import { Router } from '@angular/router';
import { PathInfoEntity } from 'alfresco-js-api'; import { PathInfoEntity } from '@alfresco/js-api';
@Component({ @Component({
templateUrl: './trashcan.component.html', templateUrl: './trashcan.component.html',

View File

@ -8,8 +8,8 @@
"skipLibCheck": false, "skipLibCheck": false,
"types": [], "types": [],
"paths": { "paths": {
"alfresco-js-api": [ "@alfresco/js-api": [
"../../node_modules/alfresco-js-api/dist/alfresco-js-api.js" "../../node_modules/@alfresco/js-api"
], ],
"rxjs/*": [ "rxjs/*": [
"../../node_modules/rxjs/*" "../../node_modules/rxjs/*"

View File

@ -38,7 +38,7 @@ Using with node id:
<adf-viewer <adf-viewer
[showViewer]="true" [showViewer]="true"
[overlayMode]="true" [overlayMode]="true"
[fileNodeId]="'d367023a-7ebe-4f3a-a7d0-4f27c43f1045'"> [nodeId]="'d367023a-7ebe-4f3a-a7d0-4f27c43f1045'">
</adf-viewer> </adf-viewer>
``` ```
@ -106,7 +106,6 @@ See the [Custom layout](#custom-layout) section for full details of all availabl
| thumbnailsTemplate | [`TemplateRef`](https://angular.io/api/core/TemplateRef)`<any>` | null | The template for the pdf thumbnails. | | thumbnailsTemplate | [`TemplateRef`](https://angular.io/api/core/TemplateRef)`<any>` | null | The template for the pdf thumbnails. |
| urlFile | `string` | "" | If you want to load an external file that does not come from ACS you can use this URL to specify where to load the file from. | | urlFile | `string` | "" | If you want to load an external file that does not come from ACS you can use this URL to specify where to load the file from. |
| urlFileViewer | `string` | null | Viewer to use with the `urlFile` address (`pdf`, `image`, `media`, `text`). Used when `urlFile` has no filename and extension. | | urlFileViewer | `string` | null | Viewer to use with the `urlFile` address (`pdf`, `image`, `media`, `text`). Used when `urlFile` has no filename and extension. |
| fileNodeId | `void` | | (**Deprecated:** 2.4.0 use nodeId) Node Id of the file to load. |
### Events ### Events
@ -147,7 +146,7 @@ Below is the most simple integration of the Viewer and
<adf-viewer <adf-viewer
[(showViewer)]="showViewer" [(showViewer)]="showViewer"
[overlayMode]="true" [overlayMode]="true"
[fileNodeId]="nodeId"> [nodeId]="nodeId">
</adf-viewer> </adf-viewer>
``` ```
@ -276,7 +275,7 @@ the [Viewer component](../core/viewer.component.md). Below is an example that sh
to handle 3D data files: to handle 3D data files:
```html ```html
<adf-viewer [fileNodeId]="fileNodeId"> <adf-viewer [nodeId]="nodeId">
<adf-viewer-extension [supportedExtensions]="['obj','3ds']" #extension> <adf-viewer-extension [supportedExtensions]="['obj','3ds']" #extension>
<ng-template let-urlFileContent="urlFileContent" let-extension="extension"> <ng-template let-urlFileContent="urlFileContent" let-extension="extension">
@ -295,7 +294,7 @@ Note: you need to add the `ng2-3d-editor` dependency to your `package.json` file
You can define multiple `adf-viewer-extension` templates if required: You can define multiple `adf-viewer-extension` templates if required:
```html ```html
<adf-viewer [fileNodeId]="fileNodeId"> <adf-viewer [nodeId]="nodeId">
<adf-viewer-extension [supportedExtensions]="['xls','xlsx']" #extension> <adf-viewer-extension [supportedExtensions]="['xls','xlsx']" #extension>
<ng-template let-urlFileContent="urlFileContent"> <ng-template let-urlFileContent="urlFileContent">
@ -377,7 +376,7 @@ transclusion, which will display all content placed inside the `<adf-viewer-side
``` ```
The second way to customize the sidebar is to use template injection but note that this only works The second way to customize the sidebar is to use template injection but note that this only works
when using the viewer with `fileNodeId`. when using the viewer with `nodeId`.
```html ```html
<ng-template let-node="node" #sidebarTemplate> <ng-template let-node="node" #sidebarTemplate>
@ -424,7 +423,7 @@ You can enable a custom "Open With" menu by providing at least one action inside
`adf-viewer-open-with` tag: `adf-viewer-open-with` tag:
```html ```html
<adf-viewer [fileNodeId]="nodeId"> <adf-viewer [nodeId]="nodeId">
<adf-viewer-open-with> <adf-viewer-open-with>
<button mat-menu-item> <button mat-menu-item>
@ -451,7 +450,7 @@ You can enable a custom "Open With" menu by providing at least one action inside
You can enable a custom "More actions" menu by providing at least one action inside the `adf-viewer-more-actions` tag: You can enable a custom "More actions" menu by providing at least one action inside the `adf-viewer-more-actions` tag:
```html ```html
<adf-viewer [fileNodeId]="nodeId"> <adf-viewer [nodeId]="nodeId">
<adf-viewer-more-actions> <adf-viewer-more-actions>
<button mat-menu-item> <button mat-menu-item>

View File

@ -1 +0,0 @@
var Util = require('../../util/util');var Util = require('../../util/util');

View File

@ -15,8 +15,8 @@
* limitations under the License. * limitations under the License.
*/ */
import { Tenant } from '../models/APS/Tenant'; import { Tenant } from '../models/APS/tenant';
import { User } from '../models/APS/User'; import { User } from '../models/APS/user';
import TestConfig = require('../test.config'); import TestConfig = require('../test.config');
import path = require('path'); import path = require('path');
import fs = require('fs'); import fs = require('fs');

View File

@ -20,7 +20,7 @@ import { FileModel } from '../models/ACS/fileModel';
import { LoginPage } from '../pages/adf/loginPage'; import { LoginPage } from '../pages/adf/loginPage';
import { TagPage } from '../pages/adf/tagPage'; import { TagPage } from '../pages/adf/tagPage';
import { AppNavigationBarPage } from '../pages/adf/process_services/appNavigationBarPage'; import { AppNavigationBarPage } from '../pages/adf/process-services/appNavigationBarPage';
import TestConfig = require('../test.config'); import TestConfig = require('../test.config');
import resources = require('../util/resources'); import resources = require('../util/resources');

View File

@ -17,7 +17,7 @@
import { LoginPage } from '../pages/adf/loginPage'; import { LoginPage } from '../pages/adf/loginPage';
import { NavigationBarPage } from '../pages/adf/navigationBarPage'; import { NavigationBarPage } from '../pages/adf/navigationBarPage';
import { TreeViewPage } from '../pages/adf/content_services/treeViewPage'; import { TreeViewPage } from '../pages/adf/content-services/treeViewPage';
import { AcsUserModel } from '../models/ACS/acsUserModel'; import { AcsUserModel } from '../models/ACS/acsUserModel';

View File

@ -19,7 +19,7 @@ import { browser } from 'protractor';
import { LoginPage } from '../../pages/adf/loginPage'; import { LoginPage } from '../../pages/adf/loginPage';
import { ContentServicesPage } from '../../pages/adf/contentServicesPage'; import { ContentServicesPage } from '../../pages/adf/contentServicesPage';
import { ProcessServicesPage } from '../../pages/adf/process_services/processServicesPage'; import { ProcessServicesPage } from '../../pages/adf/process-services/processServicesPage';
import { NavigationBarPage } from '../../pages/adf/navigationBarPage'; import { NavigationBarPage } from '../../pages/adf/navigationBarPage';
import { UserInfoDialog } from '../../pages/adf/dialog/userInfoDialog'; import { UserInfoDialog } from '../../pages/adf/dialog/userInfoDialog';

View File

@ -19,7 +19,7 @@ import { browser } from 'protractor';
import { LoginPage } from '../../pages/adf/loginPage'; import { LoginPage } from '../../pages/adf/loginPage';
import { ContentServicesPage } from '../../pages/adf/contentServicesPage'; import { ContentServicesPage } from '../../pages/adf/contentServicesPage';
import { ProcessServicesPage } from '../../pages/adf/process_services/processServicesPage'; import { ProcessServicesPage } from '../../pages/adf/process-services/processServicesPage';
import { NavigationBarPage } from '../../pages/adf/navigationBarPage'; import { NavigationBarPage } from '../../pages/adf/navigationBarPage';
import TestConfig = require('../../test.config'); import TestConfig = require('../../test.config');

View File

@ -19,7 +19,7 @@ import { LoginSSOPage } from '../pages/adf/loginSSOPage';
import { SettingsPage } from '../pages/adf/settingsPage'; import { SettingsPage } from '../pages/adf/settingsPage';
import TestConfig = require('../test.config'); import TestConfig = require('../test.config');
import { browser } from 'protractor'; import { browser } from 'protractor';
import { NavigationBarPage } from '../pages/adf/NavigationBarPage'; import { NavigationBarPage } from '../pages/adf/navigationBarPage';
import { UserInfoDialog } from '../pages/adf/dialog/userInfoDialog'; import { UserInfoDialog } from '../pages/adf/dialog/userInfoDialog';
import { Identity } from '../actions/APS-cloud/identity'; import { Identity } from '../actions/APS-cloud/identity';

View File

@ -127,13 +127,6 @@ describe('Viewer - properties', () => {
viewerPage.enablePrint(); viewerPage.enablePrint();
}); });
it('[C260087] Should Show/Hide share button when allowShare is true/false', () => {
viewerPage.checkShareButtonDisplayed();
viewerPage.disableShare();
viewerPage.checkShareButtonIsNotDisplayed();
viewerPage.enableShare();
});
it('[C260092] Should show adf-viewer-toolbar-actions directive buttons when adf-viewer-toolbar-actions is used', () => { it('[C260092] Should show adf-viewer-toolbar-actions directive buttons when adf-viewer-toolbar-actions is used', () => {
viewerPage.checkMoreActionsDisplayed(); viewerPage.checkMoreActionsDisplayed();

View File

@ -17,12 +17,12 @@
import { LoginPage } from '../pages/adf/loginPage'; import { LoginPage } from '../pages/adf/loginPage';
import { NavigationBarPage } from '../pages/adf/navigationBarPage'; import { NavigationBarPage } from '../pages/adf/navigationBarPage';
import { AnalyticsPage } from '../pages/adf/process_services/analyticsPage'; import { AnalyticsPage } from '../pages/adf/process-services/analyticsPage';
import { ProcessServicesPage } from '../pages/adf/process_services/processServicesPage'; import { ProcessServicesPage } from '../pages/adf/process-services/processServicesPage';
import { AppNavigationBarPage } from '../pages/adf/process_services/appNavigationBarPage'; import { AppNavigationBarPage } from '../pages/adf/process-services/appNavigationBarPage';
import TestConfig = require('../test.config'); import TestConfig = require('../test.config');
import { Tenant } from '../models/APS/Tenant'; import { Tenant } from '../models/APS/tenant';
import { User } from '../models/APS/User'; import { User } from '../models/APS/user';
import AlfrescoApi = require('alfresco-js-api-node'); import AlfrescoApi = require('alfresco-js-api-node');

View File

@ -17,9 +17,9 @@
import { Util } from '../../../util/util'; import { Util } from '../../../util/util';
import { ProcessFiltersCloudComponent } from '../process_cloud/processFiltersCloudComponent'; import { ProcessFiltersCloudComponent } from '../process-cloud/processFiltersCloudComponent';
import { ProcessListCloudComponent } from '../process_cloud/processListCloudComponent'; import { ProcessListCloudComponent } from '../process-cloud/processListCloudComponent';
import { EditProcessFilterCloudComponent } from '../process_cloud/editProcessFilterCloudComponent'; import { EditProcessFilterCloudComponent } from '../process-cloud/editProcessFilterCloudComponent';
import { element, by } from 'protractor'; import { element, by } from 'protractor';
export class ProcessCloudDemoPage { export class ProcessCloudDemoPage {

View File

@ -18,7 +18,7 @@
import { Util } from '../../../util/util'; import { Util } from '../../../util/util';
import { element, by } from 'protractor'; import { element, by } from 'protractor';
import { TaskFiltersPage } from '../process_services/taskFiltersPage'; import { TaskFiltersPage } from '../process-services/taskFiltersPage';
export class TaskFiltersDemoPage { export class TaskFiltersDemoPage {

View File

@ -16,7 +16,7 @@
*/ */
import { Util } from '../../../util/util'; import { Util } from '../../../util/util';
import { TasksListPage } from '../process_services/tasksListPage'; import { TasksListPage } from '../process-services/tasksListPage';
import { PaginationPage } from '../paginationPage'; import { PaginationPage } from '../paginationPage';
import { element, by } from 'protractor'; import { element, by } from 'protractor';

View File

@ -17,8 +17,8 @@
import { Util } from '../../../util/util'; import { Util } from '../../../util/util';
import { TaskFiltersCloudComponent } from '../process_cloud/taskFiltersCloudComponent'; import { TaskFiltersCloudComponent } from '../process-cloud/taskFiltersCloudComponent';
import { TaskListCloudComponent } from '../process_cloud/taskListCloudComponent'; import { TaskListCloudComponent } from '../process-cloud/taskListCloudComponent';
import { element, by } from 'protractor'; import { element, by } from 'protractor';
export class TasksCloudDemoPage { export class TasksCloudDemoPage {

View File

@ -17,11 +17,11 @@
import { Util } from '../../../util/util'; import { Util } from '../../../util/util';
import { element, by, browser, protractor } from 'protractor'; import { element, by, browser, protractor } from 'protractor';
import { DateUtil } from '../../../util/dateUtil';
export class DatePickerPage { export class DatePickerPage {
datePicker = element(by.css('mat-calendar')); datePicker = element(by.css('mat-calendar'));
months = ['Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun', 'Jul', 'Aug', 'Sep', 'Oct', 'Nov', 'Dec'];
nextMonthButton = element(by.css('button[class*="mat-calendar-next-button"]')); nextMonthButton = element(by.css('button[class*="mat-calendar-next-button"]'));
previousMonthButton = element(by.css('button[class*="mat-calendar-previous-button"]')); previousMonthButton = element(by.css('button[class*="mat-calendar-previous-button"]'));
@ -30,8 +30,8 @@ export class DatePickerPage {
} }
checkDatesAfterDateAreDisabled(date) { checkDatesAfterDateAreDisabled(date) {
let afterDate = new Date(date.getTime() + 24 * 60 * 60 * 1000); let afterDate = DateUtil.formatDate('DD-MM-YY', date, 1);
let afterCalendar = element(by.css(`td[class*="mat-calendar-body-cell"][aria-label="${this.convertDateToDefaultFormat(afterDate)}"]`)); let afterCalendar = element(by.css(`td[class*="mat-calendar-body-cell"][aria-label="${afterDate}"]`));
browser.controlFlow().execute(async () => { browser.controlFlow().execute(async () => {
if (await afterCalendar.isPresent()) { if (await afterCalendar.isPresent()) {
await expect(afterCalendar.getAttribute('aria-disabled')).toBe('true'); await expect(afterCalendar.getAttribute('aria-disabled')).toBe('true');
@ -42,8 +42,8 @@ export class DatePickerPage {
} }
checkDatesBeforeDateAreDisabled(date) { checkDatesBeforeDateAreDisabled(date) {
let beforeDate = new Date(date.getTime() - 24 * 60 * 60 * 1000); let beforeDate = DateUtil.formatDate('DD-MM-YY', date, -1);
let beforeCalendar = element(by.css(`td[class*="mat-calendar-body-cell"][aria-label="${this.convertDateToDefaultFormat(beforeDate)}"]`)); let beforeCalendar = element(by.css(`td[class*="mat-calendar-body-cell"][aria-label="${beforeDate}"]`));
browser.controlFlow().execute(async () => { browser.controlFlow().execute(async () => {
if (await beforeCalendar.isPresent()) { if (await beforeCalendar.isPresent()) {
await expect(beforeCalendar.getAttribute('aria-disabled')).toBe('true'); await expect(beforeCalendar.getAttribute('aria-disabled')).toBe('true');
@ -53,15 +53,6 @@ export class DatePickerPage {
return this; return this;
} }
convertDefaultFormatToDate(dateString) { // Format : dd-Mmm-yy
let date = dateString.split('-');
return new Date((2000 + parseInt(date[2], 10)), this.months.indexOf(date[1]), date[0]);
}
convertDateToDefaultFormat(date) { // Format : dd-Mmm-yy
return `${('0' + date.getDate()).slice(-2)}-${this.months[date.getMonth()]}-${date.getFullYear().toString().substr(-2)}`;
}
selectTodayDate() { selectTodayDate() {
this.checkDatePickerIsDisplayed(); this.checkDatePickerIsDisplayed();
let todayDate = element(by.css('.mat-calendar-body-today')); let todayDate = element(by.css('.mat-calendar-body-today'));

View File

@ -18,8 +18,8 @@
import { Util } from '../../util/util'; import { Util } from '../../util/util';
import TestConfig = require('../../test.config'); import TestConfig = require('../../test.config');
import { element, by, browser } from 'protractor'; import { element, by, browser } from 'protractor';
import { ProcessServicesPage } from './process_services/processServicesPage'; import { ProcessServicesPage } from './process-services/processServicesPage';
import { AppListCloudComponent } from './process_cloud/appListCloudComponent'; import { AppListCloudComponent } from './process-cloud/appListCloudComponent';
export class NavigationBarPage { export class NavigationBarPage {

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