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 SearchFilterTabbedComponent. Added test case placeholders for SearchDateRangeAdvancedComponent
This commit is contained in:
committed by
Jatin_Chugh
parent
9a37bd239d
commit
164a5a5e4a
+35
-3
@@ -8,7 +8,7 @@ describe('SearchDateRangeAdvancedComponent', () => {
|
|||||||
|
|
||||||
beforeEach(async () => {
|
beforeEach(async () => {
|
||||||
await TestBed.configureTestingModule({
|
await TestBed.configureTestingModule({
|
||||||
declarations: [ SearchDateRangeAdvancedComponent ]
|
declarations: [SearchDateRangeAdvancedComponent]
|
||||||
})
|
})
|
||||||
.compileComponents();
|
.compileComponents();
|
||||||
|
|
||||||
@@ -17,7 +17,39 @@ describe('SearchDateRangeAdvancedComponent', () => {
|
|||||||
fixture.detectChanges();
|
fixture.detectChanges();
|
||||||
});
|
});
|
||||||
|
|
||||||
it('should create', () => {
|
it('should not set any date filter in context when Anytime option is selected', () => {
|
||||||
expect(component).toBeTruthy();
|
|
||||||
|
});
|
||||||
|
|
||||||
|
it('should set proper date filter in context when In the last option is selected', () => {
|
||||||
|
|
||||||
|
});
|
||||||
|
|
||||||
|
it('should not set any date filter in context when In the last option is selected, but no value is provided', () => {
|
||||||
|
|
||||||
|
});
|
||||||
|
|
||||||
|
it('should set proper date filter in context when Between option is selected', () => {
|
||||||
|
|
||||||
|
});
|
||||||
|
|
||||||
|
it('should not set any date filter in context when Between option is selected, but no value is provided in the dates', () => {
|
||||||
|
|
||||||
|
});
|
||||||
|
|
||||||
|
it('should clear context when widget is reset', () => {
|
||||||
|
|
||||||
|
});
|
||||||
|
|
||||||
|
it('should update display label with proper text when In the last/Between option is selected and values are properly set', () => {
|
||||||
|
|
||||||
|
});
|
||||||
|
|
||||||
|
it('should set values if initial value is provided', () => {
|
||||||
|
|
||||||
|
});
|
||||||
|
|
||||||
|
it('should not allow selecting a date after the current date when Between option is selected', () => {
|
||||||
|
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|||||||
+3
-3
@@ -5,7 +5,7 @@ import { By } from '@angular/platform-browser';
|
|||||||
import { ContentTestingModule } from '../../../testing/content.testing.module';
|
import { ContentTestingModule } from '../../../testing/content.testing.module';
|
||||||
import { TranslateModule } from '@ngx-translate/core';
|
import { TranslateModule } from '@ngx-translate/core';
|
||||||
|
|
||||||
xdescribe('SearchFilterTabbedComponent', () => {
|
describe('SearchFilterTabbedComponent', () => {
|
||||||
let component: SearchFilterTabbedComponent;
|
let component: SearchFilterTabbedComponent;
|
||||||
let fixture: ComponentFixture<SearchFilterTabbedComponent>;
|
let fixture: ComponentFixture<SearchFilterTabbedComponent>;
|
||||||
|
|
||||||
@@ -57,8 +57,8 @@ xdescribe('SearchFilterTabbedComponent', () => {
|
|||||||
fixture.detectChanges();
|
fixture.detectChanges();
|
||||||
});
|
});
|
||||||
|
|
||||||
function getButtonByDataAutomationId(buttonDataAutomtaionId: string) {
|
function getButtonByDataAutomationId(buttonDataAutomationId: string) {
|
||||||
return fixture.debugElement.query(By.css(`[data-automation-id="${buttonDataAutomtaionId}"]`)).nativeElement;
|
return fixture.debugElement.query(By.css(`[data-automation-id="${buttonDataAutomationId}"]`)).nativeElement;
|
||||||
}
|
}
|
||||||
|
|
||||||
it('should update displayLabel when inner widgets display label is updated', async () => {
|
it('should update displayLabel when inner widgets display label is updated', async () => {
|
||||||
|
|||||||
Reference in New Issue
Block a user