Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
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
Original file line number Diff line number Diff line change
Expand Up @@ -7,18 +7,21 @@
<p-skeleton width="12rem" height="2.25rem" />
</div>
} @else {
<a
class="flex flex-column gap-3 custom-light-hover dark-blue-link md:flex-row"
[routerLink]="['/preprints', preprintProvider()?.id, 'discover']"
>
<img
class="fit-contain"
height="36"
[src]="preprintProvider()?.brand?.heroLogoImageUrl"
[alt]="'preprints.selectService.providerLogoImageAlt' | translate"
/>
<div class="flex flex-column gap-3 md:flex-row">
<a
class="flex align-self-start max-w-full custom-light-hover"
[routerLink]="['/preprints', preprintProvider()?.id, 'discover']"
>
<img
class="fit-contain max-w-full"
height="36"
[src]="preprintProvider()?.brand?.heroLogoImageUrl"
[alt]="'preprints.selectService.providerLogoImageAlt' | translate"
/>
</a>

<h1>{{ preprint()?.title }}</h1>
</a>
</div>
}

@if (moderationMode()) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down
Loading