Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
fix: TT-593 coverage time-entries-table
  • Loading branch information
wilc0519 committed Apr 28, 2022
commit 17208d29f708e958d75fa7cb8c6b05025e2a1ecb
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ import { getReportDataSource } from 'src/app/modules/time-clock/store/entry.sele
import { EntryState } from '../../../time-clock/store/entry.reducer';
import { TimeEntriesTableComponent } from './time-entries-table.component';
import { ActionsSubject } from '@ngrx/store';
import { UserActionTypes } from 'src/app/modules/users/store';

describe('Reports Page', () => {
describe('TimeEntriesTableComponent', () => {
Expand Down Expand Up @@ -161,6 +162,20 @@ describe('Reports Page', () => {

});

it('Should populate the users with the payload from the action executed', () => {
const actionSubject = TestBed.inject(ActionsSubject) as ActionsSubject;
const usersArray = []
const action = {
type: UserActionTypes.LOAD_USERS_SUCCESS,
payload: usersArray
};

actionSubject.next(action);


expect(component.users).toEqual(usersArray);
});

afterEach(() => {
fixture.destroy();
});
Expand Down