Skip to content

Commit e0a5fcd

Browse files
authored
fix: add message about third-party cookies (freeCodeCamp#45672)
1 parent 9ea7018 commit e0a5fcd

File tree

5 files changed

+14
-5
lines changed

5 files changed

+14
-5
lines changed

client/i18n/locales/english/intro.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -768,6 +768,7 @@
768768
"viewing-upcoming-change": "You are looking at a beta page. ",
769769
"go-back-to-learn": "Go back to the stable version of the curriculum.",
770770
"read-database-cert-article": "Please read this forum post before proceeding.",
771+
"enable-cookies": "You must enable third-party cookies before starting.",
771772
"english-only": "The courses in this section are only available in English. We are only able to translate the titles and introductions at the moment, not the lessons themselves."
772773
}
773774
}

client/i18n/locales/english/translations.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -68,8 +68,8 @@
6868
"ask-later": "Ask me later",
6969
"start-coding": "Start coding!",
7070
"go-to-settings": "Go to settings to claim your certification",
71-
"click-start-course": "Click here to start the course",
72-
"click-start-project": "Click here to start the project"
71+
"click-start-course": "Start the course",
72+
"click-start-project": "Start the project"
7373
},
7474
"landing": {
7575
"big-heading-1": "Learn to code — for free.",

client/src/components/settings/user-token.tsx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,7 @@ class UserToken extends Component<UserTokenProps> {
4242
bsSize='lg'
4343
bsStyle='danger'
4444
className='btn-info'
45+
data-cy='delete-user-token'
4546
onClick={this.deleteToken}
4647
type='button'
4748
>

client/src/templates/Challenges/codeally/show.tsx

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
// Package Utilities
2-
import { Grid, Col, Row, Button } from '@freecodecamp/react-bootstrap';
2+
import { Alert, Grid, Col, Row, Button } from '@freecodecamp/react-bootstrap';
33
import { graphql } from 'gatsby';
44
import React, { Component } from 'react';
55
import Helmet from 'react-helmet';
@@ -300,9 +300,14 @@ class ShowCodeAlly extends Component<ShowCodeAllyProps> {
300300
: ''
301301
}`}
302302
>
303+
<Alert id='codeally-cookie-warning' bsStyle='info'>
304+
<p>{t(`intro:misc-text.enable-cookies`)}</p>
305+
</Alert>
303306
<Button
307+
aria-describedby='codeally-cookie-warning'
304308
block={true}
305309
bsStyle='primary'
310+
data-cy='start-codeally'
306311
onClick={tryToShowCodeAlly}
307312
>
308313
{challengeType === challengeTypes.codeAllyCert

cypress/integration/settings/user-token.js

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ describe('User token widget on settings page,', function () {
77
});
88

99
it('should not render', function () {
10+
// make sure 'Danger Zone' is there so we know the page has rendered
1011
cy.contains('Danger Zone');
1112
cy.get('.user-token').should('not.exist');
1213
});
@@ -19,18 +20,19 @@ describe('User token widget on settings page,', function () {
1920
cy.visit(
2021
'/learn/relational-database/learn-bash-by-building-a-boilerplate/build-a-boilerplate'
2122
);
22-
cy.contains('Click here to start the course').click();
23+
cy.get('[data-cy=start-codeally]').click();
2324
cy.wait(2000);
2425
cy.visit('/settings');
2526
});
2627

2728
it('should render', function () {
29+
// make sure 'Danger Zone' is there so we know the page has rendered
2830
cy.contains('Danger Zone');
2931
cy.get('.user-token').should('have.length', 1);
3032
});
3133

3234
it('should allow you to delete your token', function () {
33-
cy.contains('Delete my user token').click();
35+
cy.get('[data-cy=delete-user-token]').click();
3436
cy.contains('Your user token has been deleted.');
3537
});
3638
});

0 commit comments

Comments
 (0)