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-259 Fixed bugs provided by sonarcloud
  • Loading branch information
jcalarcon98 committed Jun 2, 2021
commit 3ca87ff289de4abb002b4fe6152bef8431b11c5d
Original file line number Diff line number Diff line change
Expand Up @@ -176,7 +176,7 @@ describe('DetailsFieldsComponent', () => {
expect(component.saveEntry.emit).toHaveBeenCalledTimes(0);
});

[{ actionType: EntryActionTypes.CREATE_ENTRY_SUCCESS }, { actionType: EntryActionTypes.UPDATE_ENTRY_SUCCESS }].map(
[{ actionType: EntryActionTypes.CREATE_ENTRY_SUCCESS }, { actionType: EntryActionTypes.UPDATE_ENTRY_SUCCESS }].forEach(
(param) => {
it(`cleanForm after an action type ${param.actionType} is received`, () => {
const actionSubject = TestBed.inject(ActionsSubject) as ActionsSubject;
Expand Down Expand Up @@ -247,7 +247,7 @@ describe('DetailsFieldsComponent', () => {
{ select_activity_id: 'fc5fab41-a21e-4155-9d05-511b956ebd07', expected_size_activities: 3, title: 'active' },
{ select_activity_id: 'fc5fab41-a21e-4155-9d05-511b956ebd08', expected_size_activities: 4, title: 'inactive' },
];
activitiesParams.map((param) => {
activitiesParams.forEach((param) => {
it(`should emit ngOnChange to set ${param.expected_size_activities} activities for select (${param.title} time entry clicked)`, () => {
component.entryToEdit = { ...entryToEdit, activity_id: param.select_activity_id };
spyOn(component.entryForm, 'patchValue');
Expand Down Expand Up @@ -592,7 +592,7 @@ describe('DetailsFieldsComponent', () => {
expectedTimeDiff: '00:00',
},
];
diffParams.map((param) => {
diffParams.forEach((param) => {
it(`if [start_date, start_hour] and [end_date, end_hour] diff is ${param.case}`, () => {
component.entryForm.setValue({ ...formValues, ...param.entryDates });
const timeDiff = component.getTimeDifference();
Expand Down