Commit Graph

173 Commits

Author SHA1 Message Date
Naomi Carrigan
6221b2b1a5
chore: rename files in challenge editor to kebab case (#49224)
chore: rename files
2023-02-02 07:59:02 +01:00
Sem Bauke
d7eaffdb99
chore: migrate sass test to TypeScript (#49213)
* chore: rename file

* chore: migrate sass ts
2023-02-01 18:43:34 +02:00
Sam Rice
8c03f0910c
refactor(cypress): convert additional specs to ts (#49143)
* convert challenge-hot-keys to ts

* rename selector object in challenge-hot-keys

* convert challenges/output to ts

* update selector and location objects in challenges/output

* convert common-components/searchBar to ts

* add missing type and fix final url assertion

* convert searchBar to kebab-case and fix URL assertion

* convert donate-page-donor to ts

* convert donation-block-completion-modal to ts

* resolve compilation errors in donation-block-completion-modal.ts

* convert intro-page to ts

* resolve compiler errors in intro-page.ts

* convert settings/certifications to ts

* add cypress testing library types to tsconfig for settings/certifications.ts

* convert settings/image-picture-check to ts

* convert settings/settings to ts

* convert settings/user-token to ts

* convert settings/username-change to ts

* resolve compiler errors in settings/username-change.ts

* convert default/top-contributor to ts

* add ES2017 to compilerOptions.lib in cypress/tsconfig

* edit custom command interface
2023-01-26 20:25:19 +00:00
Muhammed Mustafa
5b43fd0a00
refactor(client): clear selector type error in editor cypress test (#49129) 2023-01-25 18:38:57 +05:30
Sam Rice
6d051bb768
fix(cypress): convert tests to TypeScript (#49120)
* convert challenge-hot-keys to ts

* rename selector object in challenge-hot-keys

* convert challenges/output to ts

* update selector and location objects in challenges/output

* convert common-components/searchBar to ts

* add missing type and fix final url assertion

* convert searchBar to kebab-case and fix URL assertion

* update URL assertion for non-local environments in search-bar.ts

Co-authored-by: Shaun Hamilton <shauhami020@gmail.com>

* Update cypress/e2e/default/learn/common-components/search-bar.ts

Co-authored-by: Shaun Hamilton <shauhami020@gmail.com>

Co-authored-by: Shaun Hamilton <shauhami020@gmail.com>
2023-01-25 12:22:12 +00:00
a2937
2d41346d79
Chore: Convert user tests (#49113)
Chore: Convert user tests.
2023-01-23 15:38:34 +01:00
Muhammed Mustafa
4e093f2c28
feat(client): fix the position of flash message (#48911)
* feat(client): fix the position of flash message

* WIP: move the alert message to header

* fix: cypress

* remove the spacing effect

* Revert "WIP: move the alert message to header"

This reverts commit f5242d261a.

* feat: new feature!

* Revert "feat: new feature!"

This reverts commit f6c403cc80.

* Revert "fix: cypress"

This reverts commit c24c1d8440.

* feat: add reverted cypress test

Co-authored-by: moT01 <20648924+moT01@users.noreply.github.com>

* center the close alert button

Co-authored-by: Sanjeev <sanjeevranjan.singh08@gmail.com>

Co-authored-by: moT01 <20648924+moT01@users.noreply.github.com>
Co-authored-by: Sanjeev <sanjeevranjan.singh08@gmail.com>
2023-01-23 15:36:22 +01:00
MhemedAbderrahmen
5ba3e62f3f
feat: converting more cypress test files (#49048) 2023-01-19 17:42:27 +02:00
a2937
7bf72b3208
Feat: Convert landing page test to Typescript (#49022)
* Feat: Convert landing page test to Typescript

* Chore: Remove Eslint issue with template.

* Fix: Remove dumb typo.

* Set the types for the parameters and set unique name to please TypeScript

Co-authored-by: Sboonny <muhammed@freecodecamp.org>
2023-01-19 16:04:15 +01:00
a2937
0469e8e960
Feat: Convert 8 more Cypress files to Typescript (#49001) 2023-01-13 07:53:04 +02:00
a2937
191057296a
Feature: convert some cypress tests (#48988)
Feature: convert default tests
2023-01-11 07:52:24 +02:00
Ahmad Abdolsaheb
a73996c174
Revert "fix(client): expose donate button on navigation bar" (#48902)
Revert "fix(client): expose donate button on navigation bar (#48820)"

This reverts commit 959d667aeb.
2023-01-03 18:26:15 +05:30
Ahmad Abdolsaheb
959d667aeb
fix(client): expose donate button on navigation bar (#48820)
* feat: expose donate nav button

* feat: add the ignores

* fix: adjust tests

* feat: adjust nav button styles
2023-01-03 10:40:47 +01:00
Sem Bauke
ff95595fa5
feat(Cypress): give basic structure to cypress typescript files (#48734) 2022-12-12 17:07:03 +00:00
Ahmad Abdolsaheb
00c7b6de86
chore: replace nonprofit with charity (#48739) 2022-12-12 20:52:27 +05:30
Sem Bauke
12fd5c4d32
feat: enable TypeScript for Cypress (#48701)
* feat: enable TypeScript for Cypress

* fix: run both js and ts in workflow
2022-12-10 17:12:42 +02:00
Niraj Nandish
d06b65ff85
fix(actions): errors in mobile cypress action (#48612)
* action: update flutter version in action

* action: update cypress action version to v4

* fix: mobile cypress test file location
2022-12-02 14:21:22 +05:30
Tom
5f73773cd4
feat(client): move legacy rwd button to bottom of map (#47596)
Co-authored-by: Oliver Eyton-Williams <ojeytonwilliams@gmail.com>
Closes https://github.com/freeCodeCamp/freeCodeCamp/issues/46523
2022-11-08 21:00:46 +05:30
Mrugesh Mohapatra
75f4ff10d5
feat(client): add a confirmation modal on signout (#48385)
* feat(client): add a confirmation modal on signout

* test: add and update universal nav

* chore: remove extraneous action

* chore: apply suggestions from code review
2022-11-04 10:31:06 +01:00
Mrugesh Mohapatra
b393d88b9e
refactor: s/all-langs/i18n/g (#48258) 2022-10-26 10:08:27 -07:00
Sawjan Gurung
7f1b136e40
test(e2e): add tests for navigating Menu with keyboard (#47791) 2022-10-21 22:51:43 +05:30
Mehdi Bouaziz
818568376d
fix(UI): replace button with icons in challenge lower jaw (#48014)
* fix: replace button with icons in challenge lower jaw

* fix: update icon buttons to add data-cy, align right, and cleaner conditional display

* fix: update cypress test with correct selector, update conditional button syntax

* fix: add reset and help icon components, move lowerjaw.css to editor.css

* feat: adjust icon buttons order

Co-authored-by: ahmad abdolsaheb <ahmad.abdolsaheb@gmail.com>
2022-10-20 14:08:56 +02:00
Atir Nayab
bc4edf518e
fix(tools/script): add tests for hotkeys when instruction is clicked (#47838)
fix: added check for hotkeys when instruction is clicked
2022-10-17 22:57:56 +05:30
Niraj Nandish
441f11db38
feat: mobile curriculum testing (#47586)
* feat: first draft of action and cypress spec

* feat: test all generated challenges

* fix: better identification of block

* action: update cypress config

* action: upload to dashboard

* action: testing js cert challenges

* fix: unnecessary after user code for Make a Person

* feat: capture console log output for assert test

* fix: remove after seed code

* fix: change const to let

* fix: test

* action: disable js certification

* action: stop checking out branch in action

* action: check out right mobile repo

Co-authored-by: sembauke <semboot699@gmail.com>
2022-10-14 16:57:34 -07:00
Niraj Nandish
0214eb2488
feat: cypress 10 (#47886)
Co-authored-by: Oliver Eyton-Williams <ojeytonwilliams@gmail.com>
2022-10-11 18:40:25 +05:30
Divyansh Singh
6dd8c6241b
feat: add hidden skip-to-content button (#47577)
* feat: add skip-to-content button

* fix: remove content start ids from everywhere and add to default layout

* chore: format landing-top.tsx

* use single quotes in skip-to-content component

* include breadcrumbs in navigation

* linting fail fix

* use anchor tag instead of new component

* update challenge title snap

* fix(test): reliably move focus onto the editor

Co-authored-by: Oliver Eyton-Williams <ojeytonwilliams@gmail.com>
2022-10-05 20:43:00 +02:00
Oliver Eyton-Williams
15309a88d0
fix: update lower jaw on ctrl enter (#47463)
* fix: update jaw on all ctrl-enter presses

* fix: show running tests while hiding feedback

Screenreaders still announcing running tests and then the output, and
the display now stops showing a flash of the new feedback message

* refactor: camelCase

* refactor: clean up and reduce renders

previousHint isn't really state, insofar as it changing should not
trigger a new render - a ref does the trick.

* chore: remove log

* fix: use ref to track latest attempts prop

* fix: allow lower jaw to trigger viewzone updates

React.render's callback cannot be relied on. It does not necessarily
get called on every update to the rendered element.

updateContainer is called on every render, so the editor will be
updated.

* refactor: attemptsNumber -> attempts

* fix: do not render on attempt changes

* refactor: more camelCase

* fix: try to prevent previous hint rendering

Co-authored-by:
Manabu Matsumoto <mmatsumoto1026@gmail.com>

* test: resetting of lower jaw

* fix: reset lower jaw when step is reset

* test: check congrats message appears on completion

* fix: hide feedback after reset

* fix: leave focus in the editor after passing tests

This is an attempt to work around a JAWS issue whereby the submit
shortcut (ctrl+enter) is ignored after the user passes all tests.

* test: submit button receives focus when tests pass

* fix: focus submit button when tests pass

Co-authored-by: Bruce Blaser <bbsmooth@gmail.com>

Co-authored-by: Bruce Blaser <bbsmooth@gmail.com>
2022-09-15 12:44:06 -05:00
Naomi Carrigan
e2f236131e
fix(tools): update nav test (#47369) 2022-08-24 11:48:34 +01:00
Tom
136f60bbef
feat: move rdb order to middle of superblocks (#46138)
feat: move rdb out of beta
2022-08-10 18:48:39 +02:00
Ahmad Abdolsaheb
29e4a18a56
feat(tools): donation tests (#46633)
* feat: add stripe donate page test for non donors

* fix: revert changes to see if ev is passed correctly

* feat: download artifacts

* fix: add quotations for spec args with global patterns

* fix: remove firefox from cypress donation tests

* fix: trigger action on main push

* Apply suggestions from code review

Co-authored-by: Oliver Eyton-Williams <ojeytonwilliams@gmail.com>

* feat: remove matrix and simplify

Co-authored-by: Oliver Eyton-Williams <ojeytonwilliams@gmail.com>
2022-08-08 08:43:23 -07:00
Ahmad Abdolsaheb
72a9e76ce5
feat: remove the mention of recurring donations. (#46948)
feat: remove the mention of ongoing donations
2022-07-19 08:39:45 -05:00
Moshe
8d4d4d79e8
fix(ui): "sign in" button hidden at small devices (#46561)
* fix(UI): missing sign-in button at small devices

* feat: replace menu and sign-in buttons text with images

* refactor: svg icons replaced by fortawesome ones

* test: fix e2e test of navigation menu button

* feat: display sign in button and hide all

* feat: display sign in icon on nav for small screens

* feat: add accessibility span for menu icon

* fix: lint errors

Co-authored-by: ahmad abdolsaheb <ahmad.abdolsaheb@gmail.com>
2022-07-12 08:15:52 -05:00
Oliver Eyton-Williams
8bc5b0a310
fix: show completion modal (#46589)
* fix: make ctrl/cmd + enter trigger modal

Multifile projects should be handled like legacy challenges in this
regard.

* test: check modal appears

* refactor: ignore additional solutions

* test: fix ctrl + enter tests

* fix: only run on electron

* fix: remove log

* fix: show completion modal if instructions focused

* fix: handle undefined challengeType
2022-06-26 12:23:46 -05:00
Oliver Eyton-Williams
9046d70b67
fix: use certification hours consistently (#46442)
* fix: use certification hours consistently

Since the value appearing on the /learn map was hardcoded, it could have
gone out of sync with the certifications, which were relying on
certification-settings.

Also, for simplicity (and because it's hard to estimate accurately), all
the certifications are set to 300 hours.  Fullstack being the exception,
as it is a set of certifications.

* feat: remove the hours from the map
2022-06-23 14:24:33 +03:00
Radi Totev
9e51b59584
feat: show sign in button for unauthenticated users (#46401) 2022-06-16 13:47:30 +02:00
Bruce Blaser
46450b802c
fix(a11y): improve challenge test suite results accessibility (#45802)
Co-authored-by: moT01 <20648924+moT01@users.noreply.github.com>
2022-06-14 12:09:25 +05:30
Radi Totev
ca1faa7f59
Remove .only from test (#46395) 2022-06-08 09:37:53 +02:00
Oliver Eyton-Williams
51bb887a28
test: fix multifile tests (#46384)
cy.viewport should not be chainable, hence the failure in CI. Also, the
tests need to check for the absence of (Ctrl + Enter), not the presence
Check Your Code since that's present for all viewports.
2022-06-07 22:35:34 +05:30
Oliver Eyton-Williams
f0f44ca315
feat(client): re-enable failed update re-submission (#46064)
* refactor: return response with data from ajax

Because we still need to manipulate the data coming back from the server
(files -> challengeFiles) and we want to keep ajax.ts as the interface
between client and server we need to return the manipulated data with
the response.

* feat: re-enable failed updates flushing

* test: failed updates get resubmitted and flushed

* fix: convert settings requests to use { data }

* refactor: use preserveSession
2022-06-07 17:52:23 +03:00
Jordan Moore
fcf2dd7254
fix(UI): Remove 'CTRL + Enter' on CTA for mobile (#46239)
Co-authored-by: ahmad abdolsaheb <ahmad.abdolsaheb@gmail.com>
2022-06-07 18:20:16 +05:30
Radi Totev
e581bd9081
feat(client): shortcuts legend modal available on pressing the ? key (#45530)
* Add modal texts in translations.json file

* Add shortcuts modal state in redux

* Create shortcuts modal

* Integrate shortcuts modal

* Resolve codefactor.io issues

* Extend list of shortcuts

Based on this comment:
https://github.com/freeCodeCamp/freeCodeCamp/issues/36841#issuecomment-933310078

* Remove temporary placeholder for modal title

* Open modal fom Hotkeys instead of learn.tsx

As suggested in this comment:
https://github.com/freeCodeCamp/freeCodeCamp/pull/45530#issuecomment-1101224993

* Complete list in transaltions

* Change shortcut presentation fo better a11y

Use table instead of list items as suggestedin this comment:
https://github.com/freeCodeCamp/freeCodeCamp/pull/45530#issuecomment-1101796368

* Add aria-labelledby

* Remove GAnalytics

* Remove leftover style

* Remove table caption

* autofocus on modal close button

* Improve modal a11y

- Add requested changes from https://github.com/freeCodeCamp/freeCodeCamp/pull/45530#issuecomment-1104764766
- Leave autofocus and parent div role=dialog changes for later. (https://github.com/freeCodeCamp/freeCodeCamp/pull/45530#issuecomment-1107754148)

* [WIP] Alllow users to turn off keyboard shortcuts

* Add keyboard shortcuts switch in settings

* Disable shortcuts

* Remove toggle switch description

* Refactor and cleanup

* Remove close button from modal header

Suggested by bbsmooth:
https://github.com/freeCodeCamp/freeCodeCamp/pull/45530#issuecomment-1107861091

* Fix lint issues

* Disable shortcuts

* Disable shortcuts by default

* Update challenge output test

* Update challenge-hot-keys test

* Disable shortcuts from inside handlers

Co-authored-by: Mrugesh Mohapatra <1884376+raisedadead@users.noreply.github.com>
2022-06-03 09:57:52 -07:00
Oliver Eyton-Williams
42ec3e2ecb
test: reduce flake on multifileCertProject (#46313) 2022-06-03 09:36:46 -07:00
Oliver Eyton-Williams
f55a4c48db
test: tighten up two more cypress tests (#46273)
* test: tighten up user-token

This should be faster and a little more reliable.  before should have
worked, but beforeEach seems more reliable, so I'm trying it.

* test: use a single test for intro-page

Should be more robust as well as a lot faster.
2022-06-03 11:44:20 +03:00
Bruce Blaser
d2332093f6
fix(a11y): main menu a11y updates (#45137)
* fix: main menu a11y updates

* update font menu

* fix: sign in button text alignment

* fix: disabled button font

* fix: language menu font

* remove sign-in from main menu

* fix: add section dividers to menu

* fix: height on language selector menu

* fix: alignment of Menu button text

* fix: language globe icon

* refactor: remove dup selector

* update language menu colors

* refactor: clearer name for language menu display state

* fix: don't close onBlur if Menu button is clicked

* refactor: move globe icon styling to CSS

* refactor: get rid of switch statements

* refactor: remove try catch block

* fix: translate Change language button

* fix: move search into nav menu for mobile layout

* fix: forgot a merge

* refactor: updates for changes in i18n/all-langs

* fix: prevent menu from collapsing when focus is on change language button and user clicks into search

* fix: translate cancel change option in language picker

* feat: add cypress tests

* feat: display the complete language list

* fix: fix TS typing

* fix: force scrollbar on lang menu

* fix: remove scroll bar from lang menu

* fix: close menu when user tabs away from last menu item

* add list role to navigation list to appease Safari

* chore: capitalize Change Language/remove CSS comment

* fix: right side search box alignment in narrow view

* remove extraneous list role

* fix: cypress

Co-authored-by: ahmad abdolsaheb <ahmad.abdolsaheb@gmail.com>
Co-authored-by: moT01 <20648924+moT01@users.noreply.github.com>
2022-06-01 10:39:26 +03:00
Oliver Eyton-Williams
9076c419eb
test: clean upcoding interview prep intro (#46257) 2022-05-31 17:21:24 -05:00
Oliver Eyton-Williams
ed865269a6
test: fix donate page for existing donors (#46255) 2022-05-31 23:06:35 +01:00
Oliver Eyton-Williams
b8cedbcc65
test: simplify donation page tests (#46253) 2022-05-31 09:27:37 -07:00
Oliver Eyton-Williams
00998b5aa9
test: reduce flake (#46235)
* test: increase timeouts for slow operations

* test: ignore ChunkLoadErrors again

* test: clean up commands

* Revert "fix(cypress): disable electron due to timeouts (#46231)"

This reverts commit 2b884d9dd9.

* test: various minor refactors
2022-05-31 00:27:32 +05:30
Oliver Eyton-Williams
3679d36169
test: ignore Firefox specific runtime errors (#46179)
Frustrating, but I've not been able to pin them down
2022-05-27 09:31:02 -07:00
Kristofer Koishigawa
739ee60995
fix: display certs on profile for username with upper chars (#46118) 2022-05-26 15:03:49 +05:30