Skip to content
Merged
Show file tree
Hide file tree
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
Next Next commit
test: TTL-910 fix tests
  • Loading branch information
Santiago220991 committed Aug 1, 2023
commit 57e0809cd8c20cd7864fdc2d22544c067e367668
Original file line number Diff line number Diff line change
Expand Up @@ -131,15 +131,15 @@ describe('TimeRangeCustomComponent', () => {
});

it('When the ngOnChanges method is the first change, the onSubmit method is not called', () => {
const userIdNotCalled = 'user-2';
const projectIdNotCalled = 'project_id';
const activityIdNotCalled = 'activity_id';
const userId = 'user-2';
const projectId = 'project_id';
const activityId = 'activity_id';
spyOn(component, 'onSubmit');

component.ngOnChanges({
userId: new SimpleChange(null, userIdNotCalled, true),
projectId: new SimpleChange(null, projectIdNotCalled, true),
activityId: new SimpleChange(null, activityIdNotCalled, true),
userId: new SimpleChange(null, userId, true),
projectId: new SimpleChange(null, projectId, true),
activityId: new SimpleChange(null, activityId, true),
});

expect(component.onSubmit).not.toHaveBeenCalled();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -147,15 +147,15 @@ describe('Reports Page', () => {
});

it('When the ngOnChanges method is the first change, the onSubmit method is not called', () => {
const userIdNotCalled = 'user_id';
const projectIdNotCalled = 'project_id';
const activityIdNotCalled = 'activity_id';
const userId = 'user_id';
const projectId = 'project_id';
const activityId = 'activity_id';
spyOn(component, 'onSubmit');

component.ngOnChanges({
userId: new SimpleChange(null, userIdNotCalled, true),
projectId: new SimpleChange(null, projectIdNotCalled, true),
activityId: new SimpleChange(null, activityIdNotCalled, true),
userId: new SimpleChange(null, userId, true),
projectId: new SimpleChange(null, projectId, true),
activityId: new SimpleChange(null, activityId, true),
});

expect(component.onSubmit).not.toHaveBeenCalled();
Expand Down