|
1 | 1 | <div class="flex flex-column gap-2"> |
2 | 2 | @let resourceValue = resource(); |
3 | 3 | @if (resourceValue.description) { |
4 | | - <p>{{ 'resourceCard.labels.description' | translate }} {{ resourceValue.description }}</p> |
| 4 | + <p data-test-search-result-card-preprint-description> |
| 5 | + {{ 'resourceCard.labels.description' | translate }} {{ resourceValue.description }} |
| 6 | + </p> |
5 | 7 | } |
6 | 8 |
|
7 | 9 | @if (resourceValue.provider) { |
8 | | - <p> |
| 10 | + <p data-test-search-result-card-preprint-provider> |
9 | 11 | {{ 'resourceCard.labels.provider' | translate }} |
10 | | - <a class="font-bold" [href]="resourceValue.provider!.absoluteUrl" target="_blank" rel="noopener noreferrer"> |
| 12 | + <a |
| 13 | + class="font-bold" |
| 14 | + [href]="resourceValue.provider!.absoluteUrl" |
| 15 | + target="_blank" |
| 16 | + rel="noopener noreferrer" |
| 17 | + data-test-search-result-card-preprint-provider-link |
| 18 | + > |
11 | 19 | {{ resourceValue.provider!.name }} |
12 | 20 | </a> |
13 | 21 | </p> |
14 | 22 | } |
15 | 23 |
|
16 | 24 | @if (resourceValue.hasDataResource) { |
17 | | - <p> |
| 25 | + <p data-test-search-result-card-preprint-associated-data> |
18 | 26 | {{ 'resourceCard.labels.associatedData' | translate }} |
19 | | - <a class="font-bold" [href]="resourceValue.hasDataResource" target="_blank" rel="noopener noreferrer"> |
| 27 | + <a |
| 28 | + class="font-bold" |
| 29 | + [href]="resourceValue.hasDataResource" |
| 30 | + target="_blank" |
| 31 | + rel="noopener noreferrer" |
| 32 | + data-test-search-result-card-preprint-associated-data-link |
| 33 | + > |
20 | 34 | {{ resourceValue.hasDataResource }} |
21 | 35 | </a> |
22 | 36 | </p> |
23 | 37 | } |
24 | 38 |
|
25 | 39 | @if (resourceValue.hasPreregisteredAnalysisPlan) { |
26 | | - <p> |
| 40 | + <p data-test-search-result-card-preprint-associated-analysis-plan> |
27 | 41 | {{ 'resourceCard.labels.associatedAnalysisPlan' | translate }} |
28 | 42 | <a |
29 | 43 | class="font-bold" |
30 | 44 | [href]="resourceValue.hasPreregisteredAnalysisPlan" |
31 | 45 | target="_blank" |
32 | 46 | rel="noopener noreferrer" |
| 47 | + data-test-search-result-card-preprint-associated-analysis-plan-link |
33 | 48 | > |
34 | 49 | {{ resourceValue.hasPreregisteredAnalysisPlan }} |
35 | 50 | </a> |
36 | 51 | </p> |
37 | 52 | } |
38 | 53 |
|
39 | 54 | @if (resourceValue.hasPreregisteredStudyDesign) { |
40 | | - <p> |
| 55 | + <p data-test-search-result-card-preprint-associated-study-design> |
41 | 56 | {{ 'resourceCard.labels.associatedStudyDesign' | translate }} |
42 | | - <a class="font-bold" [href]="resourceValue.hasPreregisteredStudyDesign" target="_blank" rel="noopener noreferrer"> |
| 57 | + <a |
| 58 | + class="font-bold" |
| 59 | + [href]="resourceValue.hasPreregisteredStudyDesign" |
| 60 | + target="_blank" |
| 61 | + rel="noopener noreferrer" |
| 62 | + data-test-search-result-card-preprint-associated-study-design-link |
| 63 | + > |
43 | 64 | {{ resourceValue.hasPreregisteredStudyDesign }} |
44 | 65 | </a> |
45 | 66 | </p> |
46 | 67 | } |
47 | 68 |
|
48 | 69 | @if (resourceValue.statedConflictOfInterest) { |
49 | | - <p> |
| 70 | + <p data-test-search-result-card-preprint-conflict-of-interest> |
50 | 71 | {{ 'resourceCard.labels.conflictOfInterestResponse' | translate }} |
51 | 72 | {{ resourceValue.statedConflictOfInterest }} |
52 | 73 | </p> |
53 | 74 | } @else { |
54 | | - <p> |
| 75 | + <p data-test-search-result-card-preprint-conflict-of-interest-none> |
55 | 76 | {{ 'resourceCard.labels.conflictOfInterestResponse' | translate }} |
56 | 77 | {{ 'resourceCard.labels.noCoi' | translate }} |
57 | 78 | </p> |
58 | 79 | } |
59 | 80 |
|
60 | 81 | @if (resourceValue.license?.absoluteUrl) { |
61 | | - <p> |
| 82 | + <p data-test-search-result-card-preprint-license> |
62 | 83 | {{ 'common.labels.license' | translate }}: |
63 | 84 | <a |
64 | 85 | class="font-bold" |
65 | 86 | [attr.href]="resourceValue.license!.absoluteUrl || null" |
66 | 87 | target="_blank" |
67 | 88 | rel="noopener noreferrer" |
| 89 | + data-test-search-result-card-preprint-license-link |
68 | 90 | > |
69 | 91 | {{ resourceValue.license!.name }} |
70 | 92 | </a> |
71 | 93 | </p> |
72 | 94 | } |
73 | 95 |
|
74 | 96 | @if (resourceValue.absoluteUrl) { |
75 | | - <p> |
| 97 | + <p data-test-search-result-card-preprint-url> |
76 | 98 | {{ 'resourceCard.labels.url' | translate }} |
77 | | - <a class="font-bold" [href]="resourceValue.absoluteUrl" target="_blank" rel="noopener noreferrer"> |
| 99 | + <a |
| 100 | + class="font-bold" |
| 101 | + [href]="resourceValue.absoluteUrl" |
| 102 | + target="_blank" |
| 103 | + rel="noopener noreferrer" |
| 104 | + data-test-search-result-card-preprint-resource-url-link |
| 105 | + > |
78 | 106 | {{ resourceValue.absoluteUrl }} |
79 | 107 | </a> |
80 | 108 | </p> |
81 | 109 | } |
82 | 110 |
|
83 | 111 | @let limit = 4; |
84 | 112 | @if (resourceValue.doi.length > 0) { |
85 | | - <p> |
| 113 | + <p data-test-search-result-card-preprint-doi> |
86 | 114 | {{ 'resourceCard.labels.doi' | translate }} |
87 | 115 | @for (doi of resourceValue.doi.slice(0, limit); track $index) { |
88 | | - <a class="font-bold" [href]="doi" target="_blank" rel="noopener noreferrer">{{ doi }}{{ $last ? '' : ', ' }}</a> |
| 116 | + <a |
| 117 | + class="font-bold" |
| 118 | + [href]="doi" |
| 119 | + target="_blank" |
| 120 | + rel="noopener noreferrer" |
| 121 | + data-test-search-result-card-preprint-doi-link |
| 122 | + > |
| 123 | + {{ doi }}{{ $last ? '' : ', ' }} |
| 124 | + </a> |
89 | 125 | } |
90 | 126 | @if (resourceValue.doi.length > limit) { |
91 | | - <span>{{ 'resourceCard.andCountMore' | translate: { count: resourceValue.doi.length - limit } }} </span> |
| 127 | + <span data-test-search-result-card-preprint-doi-more> |
| 128 | + {{ 'resourceCard.andCountMore' | translate: { count: resourceValue.doi.length - limit } }} |
| 129 | + </span> |
92 | 130 | } |
93 | 131 | </p> |
94 | 132 | } |
|
0 commit comments