diff --git a/src/app/features/preprints/pages/preprint-details/preprint-details.component.html b/src/app/features/preprints/pages/preprint-details/preprint-details.component.html index ba30e4bd3..0c60a008f 100644 --- a/src/app/features/preprints/pages/preprint-details/preprint-details.component.html +++ b/src/app/features/preprints/pages/preprint-details/preprint-details.component.html @@ -7,18 +7,21 @@ } @else { - - +
+ + + +

{{ preprint()?.title }}

- +
} @if (moderationMode()) { diff --git a/src/app/features/preprints/pages/preprint-details/preprint-details.component.spec.ts b/src/app/features/preprints/pages/preprint-details/preprint-details.component.spec.ts index b23e85952..1501af5f9 100644 --- a/src/app/features/preprints/pages/preprint-details/preprint-details.component.spec.ts +++ b/src/app/features/preprints/pages/preprint-details/preprint-details.component.spec.ts @@ -354,6 +354,17 @@ describe('PreprintDetailsComponent', () => { expect(component.isOsfPreprint()).toBe(true); }); + it('should render the title outside of the provider logo link', () => { + setup(); + + const title: HTMLElement = fixture.nativeElement.querySelector('h1'); + const logoImage: HTMLElement = fixture.nativeElement.querySelector('img.fit-contain'); + + expect(title.textContent?.trim()).toBe(mockPreprint.title); + expect(title.closest('a')).toBeNull(); + expect(logoImage.closest('a')).not.toBeNull(); + }); + it('should mark preprint withdrawable for pending and accepted states', () => { setup(); vi.spyOn(component, 'preprint').mockReturnValue({ ...mockPreprint, reviewsState: ReviewsState.Pending } as any);