diff --git a/lib/content-services/src/lib/search/components/search-date-range-advanced/search-date-range-advanced.component.spec.ts b/lib/content-services/src/lib/search/components/search-date-range-advanced/search-date-range-advanced.component.spec.ts index c1e851f9eb..ff9e78012d 100644 --- a/lib/content-services/src/lib/search/components/search-date-range-advanced/search-date-range-advanced.component.spec.ts +++ b/lib/content-services/src/lib/search/components/search-date-range-advanced/search-date-range-advanced.component.spec.ts @@ -3,21 +3,53 @@ import { ComponentFixture, TestBed } from '@angular/core/testing'; import { SearchDateRangeAdvancedComponent } from './search-date-range-advanced.component'; describe('SearchDateRangeAdvancedComponent', () => { - let component: SearchDateRangeAdvancedComponent; - let fixture: ComponentFixture; + let component: SearchDateRangeAdvancedComponent; + let fixture: ComponentFixture; - beforeEach(async () => { - await TestBed.configureTestingModule({ - declarations: [ SearchDateRangeAdvancedComponent ] - }) - .compileComponents(); + beforeEach(async () => { + await TestBed.configureTestingModule({ + declarations: [SearchDateRangeAdvancedComponent] + }) + .compileComponents(); - fixture = TestBed.createComponent(SearchDateRangeAdvancedComponent); - component = fixture.componentInstance; - fixture.detectChanges(); - }); + fixture = TestBed.createComponent(SearchDateRangeAdvancedComponent); + component = fixture.componentInstance; + fixture.detectChanges(); + }); - it('should create', () => { - expect(component).toBeTruthy(); - }); + it('should not set any date filter in context when Anytime option is selected', () => { + + }); + + 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', () => { + + }); }); diff --git a/lib/content-services/src/lib/search/components/search-filter-tabbed/search-filter-tabbed.component.spec.ts b/lib/content-services/src/lib/search/components/search-filter-tabbed/search-filter-tabbed.component.spec.ts index 02f632b8b4..5b724c0089 100644 --- a/lib/content-services/src/lib/search/components/search-filter-tabbed/search-filter-tabbed.component.spec.ts +++ b/lib/content-services/src/lib/search/components/search-filter-tabbed/search-filter-tabbed.component.spec.ts @@ -5,7 +5,7 @@ import { By } from '@angular/platform-browser'; import { ContentTestingModule } from '../../../testing/content.testing.module'; import { TranslateModule } from '@ngx-translate/core'; -xdescribe('SearchFilterTabbedComponent', () => { +describe('SearchFilterTabbedComponent', () => { let component: SearchFilterTabbedComponent; let fixture: ComponentFixture; @@ -57,8 +57,8 @@ xdescribe('SearchFilterTabbedComponent', () => { fixture.detectChanges(); }); - function getButtonByDataAutomationId(buttonDataAutomtaionId: string) { - return fixture.debugElement.query(By.css(`[data-automation-id="${buttonDataAutomtaionId}"]`)).nativeElement; + function getButtonByDataAutomationId(buttonDataAutomationId: string) { + return fixture.debugElement.query(By.css(`[data-automation-id="${buttonDataAutomationId}"]`)).nativeElement; } it('should update displayLabel when inner widgets display label is updated', async () => {