mirror of
https://github.com/Alfresco/alfresco-ng2-components.git
synced 2025-07-24 17:32:15 +00:00
[ADF 3635] Added translation label to checklist dialog (#3894)
* [ADF-3635] added translation label to checklist dialog * [ADF-3635] fixed tests
This commit is contained in:
@@ -28,16 +28,16 @@
|
||||
|
||||
<ng-template #dialog>
|
||||
<div class="adf-checklist-dialog" id="checklist-dialog">
|
||||
<h4 matDialogTitle id="add-checklist-title">New Check</h4>
|
||||
<h4 matDialogTitle id="add-checklist-title">{{ 'ADF_TASK_LIST.DETAILS.CHECKLIST.DIALOG.TITLE' | translate }}</h4>
|
||||
<mat-dialog-content>
|
||||
<mat-form-field>
|
||||
<input matInput placeholder="Name" [(ngModel)]="taskName" id="checklist-name"
|
||||
<input matInput placeholder="{{ 'ADF_TASK_LIST.DETAILS.CHECKLIST.DIALOG.PLACEHOLDER' | translate }}" [(ngModel)]="taskName" id="checklist-name"
|
||||
data-automation-id="checklist-name">
|
||||
</mat-form-field>
|
||||
</mat-dialog-content>
|
||||
<mat-dialog-actions class="adf-checklist-dialog-actions">
|
||||
<button mat-button type="button" id="close-check-dialog" (click)="cancel()">Cancel</button>
|
||||
<button mat-button type="button" id="add-check" (click)="add()">Add Checklist</button>
|
||||
<button mat-button type="button" id="close-check-dialog" (click)="cancel()">{{ 'ADF_TASK_LIST.DETAILS.CHECKLIST.DIALOG.CANCEL-BUTTON' | translate }}</button>
|
||||
<button mat-button type="button" id="add-check" (click)="add()">{{ 'ADF_TASK_LIST.DETAILS.CHECKLIST.DIALOG.ADD-BUTTON' | translate }}</button>
|
||||
</mat-dialog-actions>
|
||||
</div>
|
||||
</ng-template>
|
||||
|
@@ -116,13 +116,16 @@ describe('ChecklistComponent', () => {
|
||||
showChecklistDialog = <HTMLElement> element.querySelector('#add-checklist');
|
||||
});
|
||||
|
||||
it('should show dialog when clicked on add', () => {
|
||||
it('should show dialog when clicked on add', (done) => {
|
||||
expect(showChecklistDialog).not.toBeNull();
|
||||
showChecklistDialog.click();
|
||||
|
||||
expect(window.document.querySelector('#checklist-dialog')).not.toBeNull();
|
||||
expect(window.document.querySelector('#add-checklist-title')).not.toBeNull();
|
||||
expect(window.document.querySelector('#add-checklist-title').textContent).toContain('New Check');
|
||||
fixture.detectChanges();
|
||||
fixture.whenStable().then(() => {
|
||||
expect(window.document.querySelector('#checklist-dialog')).not.toBeNull();
|
||||
expect(window.document.querySelector('#add-checklist-title')).not.toBeNull();
|
||||
expect(window.document.querySelector('#add-checklist-title').textContent).toContain('ADF_TASK_LIST.DETAILS.CHECKLIST.DIALOG.TITLE');
|
||||
done();
|
||||
});
|
||||
});
|
||||
});
|
||||
|
||||
|
Reference in New Issue
Block a user