TSK-1714: Show tooltip on Access Item label to see complete name

This commit is contained in:
Sofie Hofmann 2021-09-07 12:28:21 +02:00 committed by Mustapha Zorgati
parent e579720716
commit a054c45799
4 changed files with 16 additions and 2 deletions

View File

@ -75,7 +75,10 @@ context('TASKANA Workbaskets', () => {
cy.get('button[mattooltip="Add new access"') cy.get('button[mattooltip="Add new access"')
.click() .click()
.then(() => { .then(() => {
cy.get('mat-form-field').contains('mat-form-field', 'Access id').find('input').type('teamlead-2'); cy.get('mat-form-field')
.contains('mat-form-field', 'Access id')
.find('input')
.type('teamlead-2', { force: true });
cy.get('input[aria-label="checkAll"]:first').click(); cy.get('input[aria-label="checkAll"]:first').click();
cy.saveWorkbaskets(); cy.saveWorkbaskets();
}); });

View File

@ -71,3 +71,7 @@
::ng-deep .mat-drawer { ::ng-deep .mat-drawer {
overflow-y: visible !important; overflow-y: visible !important;
} }
::ng-deep mat-tooltip-component {
word-break: break-word;
}

View File

@ -1,7 +1,9 @@
<form [formGroup]="accessIdForm"> <form [formGroup]="accessIdForm">
<div [ngClass]="placeHolderMessage == 'Access id'? 'type-ahead--small' : 'type-ahead--large'"> <div [ngClass]="placeHolderMessage == 'Access id'? 'type-ahead--small' : 'type-ahead--large'">
<mat-form-field class="type-ahead__form-field" appearance="outline"> <mat-form-field class="type-ahead__form-field" appearance="outline">
<mat-label>{{name || placeHolderMessage}}</mat-label> <mat-label class="type-ahead__label" matTooltip="{{name}}" matTooltipPosition="above">
{{name || placeHolderMessage}}
</mat-label>
<!-- TEXT INPUT --> <!-- TEXT INPUT -->
<input matInput <input matInput
type="text" type="text"
@ -9,6 +11,7 @@
formControlName="accessId" formControlName="accessId"
[required]="isRequired" [required]="isRequired"
[matAutocomplete]="auto" [matAutocomplete]="auto"
matTooltip="{{accessIdForm.controls['accessId'].value}}"
class="type-ahead__input-field"> class="type-ahead__input-field">
<!-- ERROR MESSAGE --> <!-- ERROR MESSAGE -->
<mat-error <mat-error

View File

@ -32,3 +32,7 @@
.invalid { .invalid {
color: $invalid; color: $invalid;
} }
mat-label.type-ahead__label {
pointer-events: auto;
}