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-898 add tests for entryFormIsValidate function
  • Loading branch information
mmaquina committed Jul 10, 2023
commit 01ad644e88f12bd02896ff3d15005218b20d35a7
Original file line number Diff line number Diff line change
Expand Up @@ -338,7 +338,7 @@ describe('EntryFieldsComponent', () => {
it('entryFormIsValidate returns false when data in the form is not valid', () => {
component.newData = mockEntryOverlap;

const invalidEntry = {...entry, 'activity_id': ''}
const invalidEntry = {...entry, activity_id: ''};
component.activeEntry = invalidEntry;
component.setDataToUpdate(invalidEntry);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -134,10 +134,10 @@ export class EntryFieldsComponent implements OnInit, OnDestroy {
}
}

/**
* Makes activity mandatory when clocking in.
* Also makes uri or description mandatory if it is an internal app.
*/
/**
* Makes activity mandatory when clocking in.
* Also makes uri or description mandatory if it is an internal app.
*/
entryFormIsValidate() {
let customerName = '';
let projectName = '';
Expand Down Expand Up @@ -214,10 +214,10 @@ export class EntryFieldsComponent implements OnInit, OnDestroy {
this.actionSetDateSubscription.unsubscribe();
}

/**
* Manages the conditions for requiring uri or description fields
* when clocking in an internal app.
*/
/**
* Manages the conditions for requiring uri or description fields
* when clocking in an internal app.
*/
requiredFieldsForInternalAppExist(customerName: string, projectName: string) {
const emptyValue = '';
const areEmptyValues = [this.entryForm.value.uri, this.entryForm.value.description].every(
Expand Down