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

85 lines
3.3 KiB
HTML

<mat-card class="adf-start-process">
<mat-card-title>{{'ADF_PROCESS_LIST.START_PROCESS.FORM.TITLE' | translate}}
</mat-card-title>
<mat-card-content *ngIf="isProcessDefinitionEmpty()">
<mat-card-subtitle id="error-message" *ngIf="errorMessageId">
{{errorMessageId|translate}}
</mat-card-subtitle>
<mat-form-field class="adf-process-input-container">
<input
matInput
placeholder="{{'ADF_PROCESS_LIST.START_PROCESS.FORM.LABEL.NAME' | translate}}"
[formControl]="processNameInput"
id="processName"
required/>
</mat-form-field>
<mat-form-field class="adf-process-input-container">
<input
type="text"
placeholder="{{'ADF_PROCESS_LIST.START_PROCESS.FORM.LABEL.TYPE'|translate}}"
matInput
[formControl]="processDefinitionInput"
[matAutocomplete]="auto"
#inputAutocomplete>
<div class="adf-process-input-autocomplete">
<mat-autocomplete
#auto="matAutocomplete"
[displayWith]="displayFn">
<mat-option *ngFor="let processDef of filteredProcesses | async" [value]="processDef.name">
{{ processDef.name }}
</mat-option>
</mat-autocomplete>
<button
id="adf-select-process-dropdown"
*ngIf="showSelectProcessDropdown"
mat-icon-button
(click)="displayDropdown($event)">
<mat-icon>arrow_drop_down</mat-icon>
</button>
</div>
</mat-form-field>
<adf-start-form
#startForm
*ngIf="hasStartForm()"
[data]="values"
[disableStartProcessButton]="!hasProcessName()"
[processDefinitionId]="selectedProcessDef.id"
(outcomeClick)="onOutcomeClick($event)"
[showRefreshButton]="false">
<button
form-custom-button
mat-button
(click)="cancelStartProcess()"
id="cancel_process">
{{'ADF_PROCESS_LIST.START_PROCESS.FORM.ACTION.CANCEL'| translate}}
</button>
</adf-start-form>
</mat-card-content>
<mat-card-content *ngIf="hasErrorMessage()">
<mat-card-subtitle class="error-message" id="no-process-message">
{{'ADF_PROCESS_LIST.START_PROCESS.NO_PROCESS_DEFINITIONS' | translate}}
</mat-card-subtitle>
</mat-card-content>
<mat-card-actions *ngIf="!hasStartForm()">
<button
mat-button
*ngIf="!hasStartForm()"
(click)="cancelStartProcess()"
id="cancel_process">
{{'ADF_PROCESS_LIST.START_PROCESS.FORM.ACTION.CANCEL'| translate}}
</button>
<button
color="primary"
mat-button
*ngIf="!hasStartForm()"
[disabled]="!validateForm()"
(click)="startProcess()"
data-automation-id="btn-start"
id="button-start"
class="btn-start">
{{'ADF_PROCESS_LIST.START_PROCESS.FORM.ACTION.START' | translate}}
</button>
</mat-card-actions>
</mat-card>