mirror of
https://github.com/Alfresco/alfresco-ng2-components.git
synced 2026-09-09 18:03:21 +00:00
AAE-36664 additional linting rules, cleanup (#11084)
This commit is contained in:
@@ -58,7 +58,7 @@ describe('FlagsComponent', () => {
|
||||
});
|
||||
|
||||
it('should update inputValue$ when onInputChange is called', (done) => {
|
||||
(component as any).onInputChange('test');
|
||||
component.onInputChange('test');
|
||||
component.inputValue$.subscribe((value) => {
|
||||
expect(value).toBe('test');
|
||||
done();
|
||||
@@ -67,12 +67,12 @@ describe('FlagsComponent', () => {
|
||||
|
||||
it('should clear inputValue when onClearInput is called', () => {
|
||||
component.inputValue = 'test';
|
||||
(component as any).onClearInput();
|
||||
component.onClearInput();
|
||||
expect(component.inputValue).toBe('');
|
||||
});
|
||||
|
||||
it('should filter flags when when onClearInput is called', (done) => {
|
||||
(component as any).onInputChange('feature1');
|
||||
component.onInputChange('feature1');
|
||||
component.flags$.subscribe((flags) => {
|
||||
expect(flags).toEqual([{ fictive: false, flag: 'feature1', value: true }]);
|
||||
done();
|
||||
|
||||
@@ -123,11 +123,11 @@ export class FlagsComponent {
|
||||
this.featuresService.enable(value);
|
||||
}
|
||||
|
||||
protected onInputChange(text: string) {
|
||||
onInputChange(text: string) {
|
||||
this.inputValue$.next(text);
|
||||
}
|
||||
|
||||
protected onClearInput() {
|
||||
onClearInput() {
|
||||
this.inputValue = '';
|
||||
this.inputValue$.next('');
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user