mirror of
https://github.com/Alfresco/alfresco-ng2-components.git
synced 2026-09-09 18:03:21 +00:00
[ACS-4985] Added test cases for SearchDateRangeAdvancedTabbedComponent. Moved pending logic from template to typescript
This commit is contained in:
committed by
Jatin_Chugh
parent
131b2bcb52
commit
0b8a4d9f0f
+1
-1
@@ -16,7 +16,7 @@
|
||||
<button mat-button color="primary" data-automation-id="date-range-advanced-btn-clear" (click)="reset()">
|
||||
{{ 'SEARCH.FILTER.ACTIONS.CLEAR' | translate }}
|
||||
</button>
|
||||
<button mat-button color="primary" data-automation-id="date-range-advanced-btn-apply" [disabled]="hasValidValue()" (click)="submitValues()">
|
||||
<button mat-button color="primary" data-automation-id="date-range-advanced-btn-apply" [disabled]="!hasValidValue()" (click)="submitValues()">
|
||||
{{ 'SEARCH.FILTER.ACTIONS.APPLY' | translate }}
|
||||
</button>
|
||||
</div>
|
||||
|
||||
-1
@@ -82,7 +82,6 @@ describe('SearchDateRangeAdvancedTabbedComponent', () => {
|
||||
]
|
||||
});
|
||||
fixture = TestBed.createComponent(SearchDateRangeAdvancedTabbedComponent);
|
||||
|
||||
component = fixture.componentInstance;
|
||||
component.id = 'dateRangeAdvanced';
|
||||
component.context = {
|
||||
|
||||
+8
@@ -184,4 +184,12 @@ export class SearchDateRangeAdvancedTabbedComponent implements SearchWidget, OnI
|
||||
onDateRangedValueChanged(value: Partial<SearchDateRangeAdvanced>, field: string) {
|
||||
this.value[field] = value;
|
||||
}
|
||||
|
||||
onFieldsChanged(fields: string[]) {
|
||||
this.fields = fields;
|
||||
}
|
||||
|
||||
onDisplayLabelsByFieldsTranslated(displayedLabelsByField: { [p: string]: string }) {
|
||||
this.displayedLabelsByField = displayedLabelsByField;
|
||||
}
|
||||
}
|
||||
|
||||
-8
@@ -1,8 +0,0 @@
|
||||
import { SearchFilterTabDirective } from './search-filter-tab.directive';
|
||||
|
||||
describe('SearchFilterTabDirective', () => {
|
||||
it('should create an instance', () => {
|
||||
const directive = new SearchFilterTabDirective();
|
||||
expect(directive).toBeTruthy();
|
||||
});
|
||||
});
|
||||
Reference in New Issue
Block a user