Skip to content

Commit 4046c05

Browse files
author
FrancescoMauto
committed
[DSC-2901] fix: tests
1 parent e6c07da commit 4046c05

3 files changed

Lines changed: 7 additions & 2 deletions

File tree

src/app/cris-layout/cris-layout-matrix/cris-layout-box-container/boxes/metadata/rendering-types/orcid/orcid.component.spec.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -120,7 +120,7 @@ describe('OrcidComponent', () => {
120120
expect(spanValueFound[0].nativeElement.textContent).toContain('0000-0001-8918-3592');
121121

122122
const orcidLinkFound = fixture.debugElement.queryAll(By.css('a'));
123-
expect(orcidLinkFound.length).toBe(1);
123+
expect(orcidLinkFound.length).toBe(2);
124124
expect(orcidLinkFound[0].nativeElement.href).toBe('https://sandbox.orcid.org/0000-0001-8918-3592');
125125

126126
const orcidIconFound = fixture.debugElement.queryAll(By.css('.orcid-icon'));

src/app/shared/orcid-badge-and-tooltip/orcid-badge-and-tooltip.component.html

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
<img placement="top"
66
[ngbTooltip]="orcidTooltipTemplate"
77
class="orcid-icon"
8+
[ngClass]="{'not-authenticated': !authenticatedTimestamp}"
89
alt="ORCID {{ orcidTooltip }}"
910
[src]="authenticatedTimestamp ? 'assets/images/orcid.logo.icon.svg': 'assets/images/orcid.logo.unauth.icon.svg'"
1011
data-test="orcidIcon"/>

src/app/shared/orcid-badge-and-tooltip/orcid-badge-and-tooltip.component.scss

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,4 +4,8 @@
44

55
.orcid-icon {
66
height: 1.2rem;
7-
}
7+
8+
&.not-authenticated {
9+
filter: grayscale(100%);
10+
}
11+
}

0 commit comments

Comments
 (0)