diff --git a/goofy-client/libs/ui/src/lib/ui/password-editor/password-editor.component.html b/goofy-client/libs/ui/src/lib/ui/password-editor/password-editor.component.html deleted file mode 100644 index b54cea77d29761100e546b027f4bffd51fc519a2..0000000000000000000000000000000000000000 --- a/goofy-client/libs/ui/src/lib/ui/password-editor/password-editor.component.html +++ /dev/null @@ -1,10 +0,0 @@ -<mat-form-field appearance="fill"> - <mat-label>{{ label }}</mat-label> - <input type="password" matInput placeholder="{{ placeholder }}" - [formControl]="fieldControl" [attr.data-test-id]="(label | convertForDataTest) + '-password-input'" - (blur)="touch()" /> - - <mat-error> - <goofy-client-validation-error [issues]="issues" [label]="label" [attr.data-test-id]="(label | convertForDataTest) + '-password-error'" ></goofy-client-validation-error> - </mat-error> -</mat-form-field> diff --git a/goofy-client/libs/ui/src/lib/ui/password-editor/password-editor.component.scss b/goofy-client/libs/ui/src/lib/ui/password-editor/password-editor.component.scss deleted file mode 100644 index e69de29bb2d1d6434b8b29ae775ad8c2e48c5391..0000000000000000000000000000000000000000 diff --git a/goofy-client/libs/ui/src/lib/ui/password-editor/password-editor.component.spec.ts b/goofy-client/libs/ui/src/lib/ui/password-editor/password-editor.component.spec.ts deleted file mode 100644 index eced76f2682e0fb840e65824962b1439693e1056..0000000000000000000000000000000000000000 --- a/goofy-client/libs/ui/src/lib/ui/password-editor/password-editor.component.spec.ts +++ /dev/null @@ -1,57 +0,0 @@ -import { ComponentFixture, TestBed } from '@angular/core/testing'; -import { ReactiveFormsModule } from '@angular/forms'; -import { MatFormFieldModule } from '@angular/material/form-field'; -import { MatInputModule } from '@angular/material/input'; -import { BrowserAnimationsModule } from '@angular/platform-browser/animations'; -import { ConvertForDataTestPipe } from '@goofy-client/tech-shared'; -import { MockComponent } from 'ng-mocks'; -import { ValidationErrorComponent } from '../validation-error/validation-error.component'; -import { PasswordEditorComponent } from './password-editor.component'; - -describe('PasswordEditorComponent', () => { - let component: PasswordEditorComponent; - let fixture: ComponentFixture<PasswordEditorComponent>; - - const dataTestId: string = '[data-test-id="%s-password-input"]'; - - beforeEach(async () => { - await TestBed.configureTestingModule({ - declarations: [ - PasswordEditorComponent, - ConvertForDataTestPipe, - MockComponent(ValidationErrorComponent) - ], - imports: [ - MatFormFieldModule, - MatInputModule, - ReactiveFormsModule, - BrowserAnimationsModule - ], - }).compileComponents(); - }); - - beforeEach(() => { - fixture = TestBed.createComponent(PasswordEditorComponent); - component = fixture.componentInstance; - fixture.detectChanges(); - }); - - it('should create', () => { - expect(component).toBeTruthy(); - }); - - describe('data test id', () => { - it('should exist for input', () => { - component.label = 'Ein Label'; - fixture.detectChanges(); - - const element: HTMLElement = fixture.nativeElement.querySelector(buildDataTestId('Ein_Label')); - - expect(element).toBeInstanceOf(HTMLElement); - }); - }); - - function buildDataTestId(replacement: string): string { - return dataTestId.replace('%s', replacement); - } -}); diff --git a/goofy-client/libs/ui/src/lib/ui/password-editor/password-editor.component.ts b/goofy-client/libs/ui/src/lib/ui/password-editor/password-editor.component.ts deleted file mode 100644 index b2ebadd555adccbec1532fcc8fc3f000ac27fef7..0000000000000000000000000000000000000000 --- a/goofy-client/libs/ui/src/lib/ui/password-editor/password-editor.component.ts +++ /dev/null @@ -1,13 +0,0 @@ -import { Component, Input } from '@angular/core'; -import { FormControlEditorAbstractComponent } from '../editor/formcontrol-editor.abstract.component'; - -@Component({ - selector: 'goofy-client-password-editor', - templateUrl: './password-editor.component.html', - styleUrls: ['./password-editor.component.scss'] -}) -export class PasswordEditorComponent extends FormControlEditorAbstractComponent { - - @Input() label: string; - @Input() placeholder: string; -} diff --git a/goofy-client/libs/ui/src/lib/ui/ui.module.ts b/goofy-client/libs/ui/src/lib/ui/ui.module.ts index 81212d395fc20f71661ac434e4da7582ab7e4953..d1af78f0c30dd62b953dcc7fe790958ed9bfbcf0 100644 --- a/goofy-client/libs/ui/src/lib/ui/ui.module.ts +++ b/goofy-client/libs/ui/src/lib/ui/ui.module.ts @@ -6,6 +6,7 @@ import { MatButtonModule } from '@angular/material/button'; import { MatCheckboxModule } from '@angular/material/checkbox'; import { MatNativeDateModule, MatRippleModule } from '@angular/material/core'; import { MatDatepickerModule } from '@angular/material/datepicker'; +import { MatDialogModule } from '@angular/material/dialog'; import { MatExpansionModule } from '@angular/material/expansion'; import { MatFormFieldModule } from '@angular/material/form-field'; import { MatIconModule } from '@angular/material/icon'; @@ -23,16 +24,14 @@ import { DateEditorComponent } from './date-editor/date-editor.component'; import { AutocompleteEditorComponent } from './editor/autocomplete-editor/autocomplete-editor.component'; import { ExpansionPanelComponent } from './expansion-panel/expansion-panel.component'; import { FileUploadComponent } from './file-upload/file-upload.component'; +import { FixedDialogComponent } from './fixed-dialog/fixed-dialog.component'; import { IconButtonWithSpinnerComponent } from './icon-button-with-spinner/icon-button-with-spinner.component'; -import { PasswordEditorComponent } from './password-editor/password-editor.component'; import { ProgressBarComponent } from './progress-bar/progress-bar.component'; import { SpinnerComponent } from './spinner/spinner.component'; import { SubnavigationComponent } from './subnavigation/subnavigation.component'; import { TextEditorComponent } from './text-editor/text-editor.component'; import { TextAreaEditorComponent } from './textarea-editor/textarea-editor.component'; import { ValidationErrorComponent } from './validation-error/validation-error.component'; -import { FixedDialogComponent } from './fixed-dialog/fixed-dialog.component'; -import { MatDialogModule } from '@angular/material/dialog'; const components = [ SubnavigationComponent, @@ -47,7 +46,6 @@ const components = [ TextEditorComponent, TextAreaEditorComponent, ValidationErrorComponent, - PasswordEditorComponent, AutocompleteEditorComponent, FixedDialogComponent ];