Skip to content

Commit

Permalink
♻️ certif: use openNew icon for external link
Browse files Browse the repository at this point in the history
  • Loading branch information
AndreiaPena committed Dec 17, 2024
1 parent 6563136 commit 8df0393
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,11 @@ export default class SessionDetailsCleaResultsDownload extends Component {
{{t 'pages.sessions.detail.panel-clea.description'}}
<a class='link' href='https://cleanumerique.org/' target='_blank' rel='noopener noreferrer'>
{{t 'pages.sessions.detail.panel-clea.link-text'}}
<PixIcon @name='link' @ariaHidden={{true}} class='session-details__clea-results-link-icon' />
<PixIcon
@name='openNew'
@title={{t 'navigation.external-link-title'}}
class='session-details__clea-results-link-icon'
/>
</a>
</p>

Expand Down
9 changes: 4 additions & 5 deletions certif/app/styles/pages/authenticated/sessions/details.scss
Original file line number Diff line number Diff line change
Expand Up @@ -150,7 +150,6 @@
margin: 0 0 8px;
color: var(--pix-neutral-900);
@extend %pix-title-xs;
font-weight: 500;
}

&__clea-results-download-description {
Expand All @@ -163,13 +162,13 @@
width: 5rem;
height: 3rem;
margin-right: 16px;
fill: var(--pix-neutral-500);
color: var(--pix-neutral-500);
}

&__clea-results-link-icon {
width: 1.3rem;
height: 1.3rem;
fill: var(--pix-primary-500);
width: 1rem;
height: 1rem;
color: var(--pix-primary-500);
}

&__controls {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,9 @@ module('Integration | Component | sessions | session-details | clea-results-down
const screen = await render(<template><SessionDetailsCleaResultsDownload @sessionId={{sessionId}} /></template>);

// then
const pngDownloadLink = screen.getByRole('link', { name: t('pages.sessions.detail.panel-clea.link-text') });
const pngDownloadLink = screen.getByRole('link', {
name: `${t('pages.sessions.detail.panel-clea.link-text')} ${t('navigation.external-link-title')}`,
});
assert.dom(pngDownloadLink).hasAttribute('href', 'https://cleanumerique.org/');
});
});
Expand Down

0 comments on commit 8df0393

Please sign in to comment.