+
-
+
+
+
diff --git a/src/app/modules/reports/pages/reports.component.html b/src/app/modules/reports/pages/reports.component.html
index 8e6224080..661823546 100644
--- a/src/app/modules/reports/pages/reports.component.html
+++ b/src/app/modules/reports/pages/reports.component.html
@@ -1,4 +1,3 @@
-
+
+
+
diff --git a/src/app/modules/reports/pages/reports.component.spec.ts b/src/app/modules/reports/pages/reports.component.spec.ts
index e1036e336..e60f52ad4 100644
--- a/src/app/modules/reports/pages/reports.component.spec.ts
+++ b/src/app/modules/reports/pages/reports.component.spec.ts
@@ -6,17 +6,11 @@ describe('ReportsComponent', () => {
let component: ReportsComponent;
let fixture: ComponentFixture
;
- function setup() {
- // tslint:disable-next-line: no-shadowed-variable
- const fixture = TestBed.createComponent(ReportsComponent);
- const app = fixture.debugElement.componentInstance;
- return { fixture, app };
- }
-
beforeEach(async(() => {
TestBed.configureTestingModule({
declarations: [ReportsComponent],
}).compileComponents();
+ fixture = TestBed.createComponent(ReportsComponent);
}));
beforeEach(() => {
@@ -30,16 +24,11 @@ describe('ReportsComponent', () => {
});
it('should have form and datatable components', async(() => {
- // tslint:disable-next-line: no-shadowed-variable
- const { fixture } = setup();
-
fixture.detectChanges();
const compile = fixture.debugElement.nativeElement;
- const div = compile.querySelector('div');
const reportForm = compile.querySelector('app-time-range-form');
const reportDataTable = compile.querySelector('app-time-entries-table');
- expect(div).toBeTruthy();
expect(reportForm).toBeTruthy();
expect(reportDataTable).toBeTruthy();
}));
diff --git a/src/app/modules/time-clock/store/entry.effects.spec.ts b/src/app/modules/time-clock/store/entry.effects.spec.ts
index b1fa2fa44..ea840229e 100644
--- a/src/app/modules/time-clock/store/entry.effects.spec.ts
+++ b/src/app/modules/time-clock/store/entry.effects.spec.ts
@@ -1,7 +1,7 @@
import {TestBed} from '@angular/core/testing';
import {provideMockActions} from '@ngrx/effects/testing';
import {EntryEffects} from './entry.effects';
-import {Observable, of} from 'rxjs';
+import {Observable, of, throwError} from 'rxjs';
import {HttpClientTestingModule} from '@angular/common/http/testing';
import {ToastrModule} from 'ngx-toastr';
import {Action} from '@ngrx/store';
@@ -34,7 +34,7 @@ describe('TimeEntryActionEffects', () => {
expect(effects).toBeTruthy();
});
- it('When the service returns a value, then LOAD_ENTRIES_BY_TIME_RANGE_SUCCESS should be triggered', async () => {
+ it('When the service returns a value, then LOAD_ENTRIES_BY_TIME_RANGE_SUCCESS should be triggered', () => {
const timeRange: TimeEntriesTimeRange = {start_date: new Date(), end_date: new Date()};
actions$ = of({type: EntryActionTypes.LOAD_ENTRIES_BY_TIME_RANGE, timeRange});
const serviceSpy = spyOn(service, 'loadEntriesByTimeRange');
@@ -44,20 +44,16 @@ describe('TimeEntryActionEffects', () => {
expect(action.type).toEqual(EntryActionTypes.LOAD_ENTRIES_BY_TIME_RANGE_SUCCESS);
});
- expect(service.loadEntriesByTimeRange).toHaveBeenCalledWith(timeRange);
});
it('When the service fails, then LOAD_ENTRIES_BY_TIME_RANGE_FAIL should be triggered', async () => {
- const timeRange: TimeEntriesTimeRange = {start_date: new Date(), end_date: new Date()};
- actions$ = of({type: EntryActionTypes.LOAD_ENTRIES_BY_TIME_RANGE, timeRange});
- const serviceSpy = spyOn(service, 'loadEntriesByTimeRange');
- serviceSpy.and.throwError('error getting time entries');
-
- effects.loadEntriesByTimeRange$.subscribe(action => {
- expect(action.type).toEqual(EntryActionTypes.LOAD_ENTRIES_BY_TIME_RANGE_FAIL);
- });
+ const timeRange: TimeEntriesTimeRange = {start_date: new Date(), end_date: new Date()};
+ actions$ = of({type: EntryActionTypes.LOAD_ENTRIES_BY_TIME_RANGE, timeRange});
+ spyOn(service, 'loadEntriesByTimeRange').and.returnValue(throwError('any error'));
- expect(service.loadEntriesByTimeRange).toHaveBeenCalledWith(timeRange);
+ effects.loadEntriesByTimeRange$.subscribe(action => {
+ expect(action.type).toEqual(EntryActionTypes.LOAD_ENTRIES_BY_TIME_RANGE_FAIL);
+ });
});
// TODO Implement the remaining unit tests for the other effects.
diff --git a/src/app/modules/time-entries/pages/time-entries.component.html b/src/app/modules/time-entries/pages/time-entries.component.html
index 3326c5fc2..0da931c48 100644
--- a/src/app/modules/time-entries/pages/time-entries.component.html
+++ b/src/app/modules/time-entries/pages/time-entries.component.html
@@ -1,4 +1,4 @@
-
+
-
+
| Date |
Time in - out |
diff --git a/src/styles/colors.scss b/src/styles/colors.scss
index 592a0a85f..22b9fbbf3 100644
--- a/src/styles/colors.scss
+++ b/src/styles/colors.scss
@@ -37,7 +37,7 @@ $info: #00BAEE;
}
-.thead-orange {
+.thead-blue {
background-color: $primary;
color: white;
}