Marouan Bentaleb 5a6d8d8a2a [ADF-3331] Automated tests for Viewer Component (#3615)
* Automation tests for Viewer Component - Content Services

* Deleting alfresco-ng2-components.iml

* Updating Viewer Page for failing tests

* Adding tests for Viewer Component and some minor changes on Viewer Component - Content Services

* Removing some lines used to test

* Automation tests for Viewer component and Viewer component - Integration with Router + minor changes on tests for Viewer Component - Content Services

* Correcting an import + some improvement to the code

* Correcting tests for opening different file extensions

* Removing a console.log I forgot

* Refactoring the test in Viewer Component

* Refacotring using lint

* Adding browser refresh after each file type

* Moving tests to proper folder

* Minor changes

* remove faulty BE files from e2e

* fix test viewer

* fix process service tests

* fix test

* fix process test

* fix lint
timeout decrease

* increase some timeouts to fix CS e2e

* lint fix
2018-09-25 21:58:22 +01:00

63 lines
3.4 KiB
HTML

<div id="adf-permission-display-container" class="adf-display-permission-container">
<div *ngIf="!permissionList || !permissionList.length" id="adf-no-permissions-template">
<div #ref>
<ng-content select="adf-no-permission-template"></ng-content>
</div>
<p *ngIf="ref.children.length == 0">
{{ 'PERMISSION_MANAGER.PERMISSION_DISPLAY.NO_PERMISSIONS' | translate }}
</p>
</div>
<adf-datatable [rows]="permissionList" class="adf-datatable-permission" *ngIf="permissionList && permissionList.length">
<data-columns>
<data-column key="icon" type="icon" [sortable]="false">
</data-column>
<data-column title="{{'PERMISSION_MANAGER.PERMISSION_DISPLAY.AUTHORITY_ID' | translate}}" key="authorityId"></data-column>
<data-column title="{{'PERMISSION_MANAGER.PERMISSION_DISPLAY.ROLE' | translate}}" key="name">
<ng-template let-entry="$implicit">
<mat-form-field *ngIf="!entry.row.getValue('isInherited') else show_only_label">
<mat-select id="adf-select-role-permission"
[placeholder]="entry.data.getValue(entry.row, entry.col)"
value="{{entry.data.getValue(entry.row, entry.col)}}"
(selectionChange)="saveNewRole($event, entry.row.obj)">
<mat-option *ngFor="let role of settableRoles" [value]="role">
{{ role }}
</mat-option>
</mat-select>
</mat-form-field>
<ng-template #show_only_label>
<span>{{entry.data.getValue(entry.row, entry.col)}}</span>
</ng-template>
</ng-template>
</data-column>
<data-column title="{{'PERMISSION_MANAGER.PERMISSION_DISPLAY.INHERITED' | translate}}" key="isInherited">
<ng-template let-entry="$implicit">
<mat-chip-list>
<mat-chip *ngIf="!!entry.data.getValue(entry.row, entry.col) else locally_set_chip"
id="adf-permission-inherited-label"
color="primary" selected="true">{{'PERMISSION_MANAGER.PERMISSION_DISPLAY.INHERITED' | translate}}</mat-chip>
</mat-chip-list>
<ng-template #locally_set_chip>
<mat-chip-list>
<mat-chip id="adf-permission-locallyset-label"
color="accent" selected="true">
{{'PERMISSION_MANAGER.PERMISSION_DISPLAY.LOCALLY_SET' | translate}}
</mat-chip>
</mat-chip-list>
</ng-template>
</ng-template>
</data-column>
<data-column key="delete">
<ng-template let-entry="$implicit">
<button *ngIf="!entry.row.getValue('isInherited')" mat-icon-button color="primary" (click)="removePermission(entry.row.obj)">
<mat-icon>highlight_off</mat-icon>
</button>
</ng-template>
</data-column>
</data-columns>
</adf-datatable>
</div>