Skip to content

Commit

Permalink
Fix/check terms page for bad links (#2049)
Browse files Browse the repository at this point in the history
* chore: update broken link

* fix: add `/terms` page to list of pages checked for bad links

* fix: ignore the documentation site when checking links

* fix: update terms page with new string
  • Loading branch information
andrewleith authored Jan 15, 2025
1 parent 8a47c0c commit 7e901ed
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 3 deletions.
2 changes: 1 addition & 1 deletion app/templates/components/terms.html
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,7 @@ <h2 class="heading-medium">{{ _(headings[5].title) }}</h2>
<h2 class="heading-medium">{{ _(headings[6].title) }}</h2>
<ul class="list list-bullet ml-10">
<li>{{ _("Assess context to decide what <a href='https://www.tbs-sct.canada.ca/pol/doc-eng.aspx?id=32614&amp;section=html'>degree of injury</a> could result from release of personal information, either accidentally or by a bad actor.") }}</li>
<li>{{ _("Use GC Notify for <a href='https://www.tpsgc-pwgsc.gc.ca/esc-src/protection-safeguarding/niveaux-levels-eng.html#s2'>low-sensitivity personal information</a>.") }}</li>
<li>{{ _("Use GC Notify for <a href='https://www.canada.ca/en/public-services-procurement/services/industrial-security/security-requirements-contracting/safeguarding-equipment-sites-assets-information/levels-security.html'>low-sensitivity personal information</a>.") }}</li>
</ul>

<h2 class="heading-medium">{{ _(headings[7].title) }}</h2>
Expand Down
2 changes: 1 addition & 1 deletion app/translations/csv/fr.csv
Original file line number Diff line number Diff line change
Expand Up @@ -1979,7 +1979,7 @@
"Use accurate, in-use email addresses. We may suspend your service if, in a 24 hour period, you send 10%% or more of your email messages to problem addresses.","Utilisez des adresses courriel exactes et en activité. Il se pourrait que nous suspendions votre accès au service si, sur une période de 24 heures, 10 %% ou plus des messages que vous envoyez sont destinés à des adresses problématiques."
"Use accurate, in-use mobile phone numbers. Do not send to landlines.","Utilisez des numéros de téléphone exacts et en activité. N’envoyez pas de messages sur des lignes fixes."
"Assess context to decide what <a href='https://www.tbs-sct.canada.ca/pol/doc-eng.aspx?id=32614&amp;section=html'>degree of injury</a> could result from release of personal information, either accidentally or by a bad actor.","Évaluez le contexte pour déterminer quel <a href='https://www.tbs-sct.canada.ca/pol/doc-fra.aspx?id=32614&section=html'>degré de préjudice</a> pourrait résulter de la publication de renseignements personnels, que cela découle d’un accident ou des actions d’une personne mal intentionnée."
"Use GC Notify for <a href='https://www.tpsgc-pwgsc.gc.ca/esc-src/protection-safeguarding/niveaux-levels-eng.html#s2'>low-sensitivity personal information</a>.","Utilisez Notification GC pour <a href='https://www.tpsgc-pwgsc.gc.ca/esc-src/protection-safeguarding/niveaux-levels-fra.html#s2'>des renseignements personnels peu sensibles</a>."
"Use GC Notify for <a href='https://www.canada.ca/en/public-services-procurement/services/industrial-security/security-requirements-contracting/safeguarding-equipment-sites-assets-information/levels-security.html'>low-sensitivity personal information</a>.","Utilisez Notification GC pour <a href='https://www.canada.ca/fr/services-publics-approvisionnement/services/securite-industrielle/exigences-securite-contrats/protection-equipement-lieux-biens-renseignements/niveaux-securite.html'>des renseignements personnels peu sensibles</a>."
"Use a valid government email and a mobile device with a Canadian phone number to create your account and for 2-factor authentication.","Pour créer votre compte et mettre en place l’authentification à deux facteurs, utilisez une adresse courriel gouvernementale valide et un appareil mobile rattaché à un numéro de téléphone canadien."
"Create your GC Notify account with a work email address only you can access. Do not share inboxes, account information or passwords, even among staff.","Pour créer votre compte Notification GC, utilisez une adresse courriel professionnelle à laquelle personne d’autre n’a accès. Il est interdit d’utiliser une boîte de réception commune ou de partager vos identifiants ou votre mot de passe, même avec vos collègues."
"Follow the <a href='/security'>steps in our Security notice</a> and report any security breach or vulnerability using the <a href='https://digital.canada.ca/security-notice/'>CDS process</a>.","Suivez <a href='https://notification.canada.ca/securite'>les étapes détaillées dans notre avis de sécurité</a> et faites-nous part de toute faille de sécurité ou vulnérabilité à l’aide du <a href='https://numerique.canada.ca/avis-de-securite/'>processus du SNC</a>."
Expand Down
1 change: 1 addition & 0 deletions tests_cypress/cypress/e2e/admin/a11y/gca_pages.cy.js
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ const fullPageList = [
{ en: "/using-a-spreadsheet", fr: "/utiliser-une-feuille-de-calcul" },
{ en: "/why-gc-notify", fr: "/pourquoi-notification-gc" },
{ en: "/new-features", fr: "/nouvelles-fonctionnalites" },
{ en: "/terms", fr: "/terms" },
];

describe(`GCA a11y tests [${config.CONFIG_NAME}]`, () => {
Expand Down
3 changes: 2 additions & 1 deletion tests_cypress/cypress/support/commands.js
Original file line number Diff line number Diff line change
Expand Up @@ -43,14 +43,15 @@ Cypress.Commands.add('a11yScan', (url, options = { a11y: true, htmlValidate: tru
let checked = 0;

cy.get('a').each((link) => {
if (link.prop('href').startsWith('mailto') || link.prop('href').includes('/set-lang') || link.prop('href').includes(url)) return;
if (link.prop('href').startsWith('mailto') || link.prop('href').includes('/set-lang') || link.prop('href').includes(url) || link.prop('href').includes('documentation.staging.notification.cdssandbox.xyz')) return;

const check_url = link.prop('href');

// skip if its already been checked
if (links_checked.includes(check_url)) return;

// bypass rate limiting
cy.log('checking link', check_url);
if (check_url.includes(current_hostname)) {
cy.request({
url: check_url,
Expand Down

0 comments on commit 7e901ed

Please sign in to comment.