mirror of
https://github.com/Alfresco/alfresco-ng2-components.git
synced 2026-09-09 18:03:21 +00:00
minor fixes
This commit is contained in:
committed by
Anukriti Singh
parent
b44ff8aa0c
commit
70b54213fd
@@ -64,13 +64,20 @@ adf-tags-creator {
|
||||
}
|
||||
|
||||
.adf-tag-search-field {
|
||||
width: 752px;
|
||||
background: var(--adf-metadata-tags-background-color);
|
||||
background: var(--adf-metadata-buttons-background-color);
|
||||
height: 32px;
|
||||
border-radius: 12px;
|
||||
align-items: center;
|
||||
display: flex;
|
||||
padding: 0 12px;
|
||||
|
||||
.mat-form-field-underline {
|
||||
display: none;
|
||||
}
|
||||
|
||||
.mat-form-field-wrapper {
|
||||
width: 100%;
|
||||
}
|
||||
}
|
||||
|
||||
.adf-create-tag-label {
|
||||
|
||||
@@ -21,7 +21,7 @@ import { NotificationService } from '@alfresco/adf-core';
|
||||
import { By } from '@angular/platform-browser';
|
||||
import { TranslateModule } from '@ngx-translate/core';
|
||||
import { MatIconModule } from '@angular/material/icon';
|
||||
import { MatError, MatFormFieldModule } from '@angular/material/form-field';
|
||||
import { MatError, MatFormField, MatFormFieldModule } from '@angular/material/form-field';
|
||||
import { MatInputModule } from '@angular/material/input';
|
||||
import { ReactiveFormsModule } from '@angular/forms';
|
||||
import { MatButtonModule } from '@angular/material/button';
|
||||
@@ -300,7 +300,7 @@ describe('TagsCreatorComponent', () => {
|
||||
const tagNameField = fixture.debugElement.query(By.css(tagNameFieldSelector));
|
||||
expect(tagNameField).toBeTruthy();
|
||||
expect(tagNameField.nativeElement.hasAttribute('hidden')).toBeFalsy();
|
||||
expect(tagNameField).toBeTruthy();
|
||||
expect(tagNameField.query(By.directive(MatFormField))).toBeTruthy();
|
||||
});
|
||||
|
||||
it('should input be autofocused', fakeAsync(() => {
|
||||
@@ -410,6 +410,13 @@ describe('TagsCreatorComponent', () => {
|
||||
expect(getFirstError()).toBe('TAG.TAGS_CREATOR.ERRORS.ALREADY_ADDED_TAG');
|
||||
}));
|
||||
|
||||
it('should not show error for required if tags are changed', fakeAsync(() => {
|
||||
typeTag('');
|
||||
component.tags = ['new tag 1', 'new tag 2'];
|
||||
fixture.detectChanges();
|
||||
expect(getFirstError()).toBeUndefined();
|
||||
}));
|
||||
|
||||
it('should show error when duplicated already existing tag', fakeAsync(() => {
|
||||
const tag = 'Some tag';
|
||||
|
||||
|
||||
Reference in New Issue
Block a user