Skip to content

Commit dd9b0be

Browse files
committed
🤖 GITHUB ACTIONS format_prettier
1 parent 6b7bed7 commit dd9b0be

3 files changed

Lines changed: 17 additions & 13 deletions

File tree

‎src/app/record/components/record-header/featured-employment-caption.util.ts‎

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,9 @@ export function getFeaturedEmploymentCaption(
1010
return ''
1111
}
1212

13-
const employmentGroup = affiliations.find((group) => group.type === 'EMPLOYMENT')
13+
const employmentGroup = affiliations.find(
14+
(group) => group.type === 'EMPLOYMENT'
15+
)
1416

1517
if (!employmentGroup || !employmentGroup.affiliationGroup) {
1618
return ''
@@ -79,4 +81,4 @@ function formatAffiliationCaption(affiliation: Affiliation): string {
7981
}
8082

8183
return parts.join(' ')
82-
}
84+
}

‎src/app/record/components/record-header/record-header.component.spec.ts‎

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -30,9 +30,11 @@ describe('RecordHeaderComponent', () => {
3030
'getRecord',
3131
])
3232
togglzService = {
33-
getStateOf: jasmine.createSpy('getStateOf').and.callFake((flag: string) =>
34-
of(flag === TogglzFlag.FEATURED_AFFILIATIONS)
35-
),
33+
getStateOf: jasmine
34+
.createSpy('getStateOf')
35+
.and.callFake((flag: string) =>
36+
of(flag === TogglzFlag.FEATURED_AFFILIATIONS)
37+
),
3638
}
3739

3840
await TestBed.configureTestingModule({

‎src/app/record/pages/my-orcid/my-orcid-header-loading.spec.ts‎

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -14,9 +14,10 @@ describe('MyOrcidComponent header loading state', () => {
1414

1515
beforeEach(() => {
1616
recordHeaderState = new RecordHeaderStateService()
17-
rumEvents = jasmine.createSpyObj<RumJourneyEventService>('RumJourneyEventService', [
18-
'recordSimpleEvent',
19-
])
17+
rumEvents = jasmine.createSpyObj<RumJourneyEventService>(
18+
'RumJourneyEventService',
19+
['recordSimpleEvent']
20+
)
2021
component = new MyOrcidComponent(
2122
{} as any,
2223
{} as any,
@@ -104,14 +105,14 @@ describe('MyOrcidComponent header loading state', () => {
104105
it('should record the featured employment caption event once when enabled', () => {
105106
const record = getUserRecord()
106107
record.affiliations[0].affiliationGroup[0].affiliations[0].featured = true
107-
record.affiliations[0].affiliationGroup[0].affiliations[0].affiliationType = {
108-
value: AffiliationType.employment,
109-
}
108+
record.affiliations[0].affiliationGroup[0].affiliations[0].affiliationType =
109+
{
110+
value: AffiliationType.employment,
111+
}
110112

111113
component.publicOrcid = record.userInfo.REAL_USER_ORCID
112114
;(component as any).featuredAffiliationsEnabled = true
113115
spyOn(performance, 'now').and.returnValue(275)
114-
115116
;(component as any).checkFeaturedEmploymentCaptionState(record)
116117
;(component as any).checkFeaturedEmploymentCaptionState(record)
117118

@@ -134,7 +135,6 @@ describe('MyOrcidComponent header loading state', () => {
134135

135136
component.publicOrcid = record.userInfo.REAL_USER_ORCID
136137
;(component as any).featuredAffiliationsEnabled = false
137-
138138
;(component as any).checkFeaturedEmploymentCaptionState(record)
139139

140140
expect(rumEvents.recordSimpleEvent).not.toHaveBeenCalledWith(

0 commit comments

Comments
 (0)