Commit Graph

195 Commits

Author SHA1 Message Date
Muhammed Mustafa
d23676ad86 feat(client): clean homepage components from extra prop (#49948)
Co-authored-by: sembauke <semboot699@gmail.com>
2023-04-17 17:09:17 +07:00
Bruce Blaser
e0088db2b3 fix(a11y): settings toggles (#49664)
Co-authored-by: Sboonny <muhammedelruby@gmail.com>
Co-authored-by: Sboonny <muhammed@freecodecamp.org>
2023-04-12 14:40:00 +03:00
Muhammed Mustafa
16a0b8572a refactor(client): split lower-jaw component to subcomponents (#49015)
---------

Co-authored-by: Bruce B <bbsmooth@gmail.com>
Co-authored-by: moshe vilner <shootermv@gmail.com>
2023-04-05 22:11:37 +02:00
Ahmad Abdolsaheb
8bd84760b3 feat(client): isolate progress bar (#49479)
Co-authored-by: Shaun Hamilton <shauhami020@gmail.com>
2023-03-27 08:02:55 +00:00
Tom
605fdf220a feat(curriculum): make college algebra with python live (#49695) 2023-03-23 21:57:32 +00:00
Sem Bauke
87d9ade1a7 fix(curriculum,client): move the Euler Project to its own superBlock (#49294)
Co-authored-by: Kristofer Koishigawa <scissorsneedfoodtoo@gmail.com>
Co-authored-by: Oliver Eyton-Williams <ojeytonwilliams@gmail.com>
Co-authored-by: Naomi Carrigan <nhcarrigan@gmail.com>
Co-authored-by: moT01 <20648924+moT01@users.noreply.github.com>
2023-03-23 21:29:13 +05:30
Muhammed Mustafa
5a2b5f1ed2 fix(client): stop margin from pushing outline out of the container (#49647)
* feat(client): stop margin from pushing outline out of the container

* remove the parent because it was breaking the layout on mobile devices

* sort the mobile and laptop layout

* remove extra property

* Update client/src/components/Header/components/universal-nav.css

* center the logo and fix the extra pixel issue

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

* increase padding top

---------

Co-authored-by: moT01 <20648924+moT01@users.noreply.github.com>
2023-03-21 13:56:04 +05:30
Ahmad Abdolsaheb
d3396a2017 feat(client): expose nav donate button for non-donor (#49705)
Co-authored-by: Muhammed Mustafa <muhammed@freecodecamp.org>
2023-03-21 13:31:44 +05:30
Sem Bauke
f578a22c99 fix: disable portfolio description if over 288 characters (#49730)
* fix: description if characters is over 288 characters on portfolio

* feat: add tests

* Update client/src/components/helpers/form/block-save-button.tsx
2023-03-17 12:27:53 +01:00
pmelin
90d35945c1 chore(cypress): TS Migration: projects.ts, show-cert-from-superblock.ts and challenges.ts (#49635) 2023-03-10 07:41:25 +00:00
Oliver Eyton-Williams
d7848ae01a feat: migrate to pnpm for better workspace DX (#49293)
* feat: npm -> pnpm 

This resolves the issues with the gatsby client (gatsby-plugin-pnpm
deals with the fact that gatsby is relying on its own dependencies
being de-duped)
and challenge-editor (which doesn't seem to want to automatically install
codemirror and needed its own eslint config)

* fix: correct mocha path for curriculum tests

* fix: use select workspace with -F not -w

* fix: reorganise packages and restrict hoisting

pnpm works best if the workspaces keep their own dependencies, since
dependencies are not flattened and then what node resolves from a
require is predictable.

@types seem to be a special case and more care is required to prevent
them getting smushed together in the root (hence the .npmrc)

* fix: add types for tools + root

* fix: decouple challenge-auditor from client

* fix: add ui-components types

* fix(client): use the latest types for react 16

* fix: prettify

* fix: prettierignore pnpm-lock

* fix: relax hoisting

Turns out pnpm works just fine with types. I don't know what was going
wrong before, but there are no-longer any type conflicts.

* fix: add @redux-saga/core to fix eslint issue

It seems to only be redux-saga that import/named can't cope with, so it
is probably okay to work around this one.

* chore: add chai to tools/scripts/build

* fix: add store to root for cypress

* fix: allow cypress to download binaries

If we want to keep preventing cypress from downloading binaries, we can
figure out a workaround, but I'm allowing it to ease the transition to
pnpm.

My guess about why this is happening is that npm triggers Cypress's
postinstall script, but pnpm does not (because pnpm install only
installs if necessary, perferring to link)

* chore: re-enable pre/post scripts

* fix: update build scripts for client

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

* chore: update engines to use pnpm


* fix: enable choice of (super)block for tests

Only 'nix machines for now.

* chore: pin pnpm to version 7

* chore: remove last npms

Except web + curriculum-server. I'll update them when I start work on
them again.

* fix: lockfile check to catch any package-locks

* fix(action): install pnpm for upcoming tests

* chore: add nodemon to new api

Co-authored-by: Shaun Hamilton <shauhami020@gmail.com>
2023-03-02 18:17:44 +00:00
a2937
346ac9db66 chore(cypress): email-change.js to ts (#49464)
Initial conversion of email-change.js
2023-02-24 23:09:56 +00:00
a2937
4a836aa578 chore: convert heading-challenge.js to typescript (#49450) 2023-02-21 09:49:43 +05:30
a2937
91ee155101 Chore: Convert show-certification.js to Typescript. (#49451) 2023-02-21 09:49:08 +05:30
a2937
78e984d98a Chore migrate es6-to-basic-javascript.js (#49352)
Start converting es6 javascript.
2023-02-18 21:58:59 +01:00
Muhammed Mustafa
3cd60a692d feat(tools): revert the quick solution in cypress tests (#49427) 2023-02-18 21:56:57 +01:00
Muhammed Mustafa
251aecc58f feat(client): change the save buttons from disabled to aria-disabled (#49216)
* feat(client): change the buttons from disabled to aria-disabled

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

* stop the API call when the validation isn't true

* use aria disabled instead of disabled on the test?

* use have.attr  to check for aria disabled

* hide the button when it's disabled

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

* update Privacy Settings save button

---------

Co-authored-by: Bruce Blaser <bbsmooth@gmail.com>
2023-02-18 12:16:35 -08:00
a2937
1cc6c55469 Chore : Migrate universal-navigation.js (#49337) 2023-02-11 07:57:47 +00:00
Mrugesh Mohapatra
17bca17c1c chore: rename e2e tests (#49332) 2023-02-10 17:14:29 +00:00
a2937
63762164d5 chore: migrate navigation bar tests to TypeScript (#49215)
* Chore: Rename navbar

* Remove error suppressors

* Fix the prototype issue

* Experiment with listeners

* Fix the arguments problem.

* Remove anti-pattern loader.

* Fix: Properly wait for the page to load.
2023-02-10 16:47:39 +00:00
Muhammed Mustafa
77c8809b00 refactor(client): cleanup honesty policy section (#49003)
Co-authored-by: Bruce B <bbsmooth@gmail.com>
Co-authored-by: Mrugesh Mohapatra <1884376+raisedadead@users.noreply.github.com>
Co-authored-by: sidemt <25644062+sidemt@users.noreply.github.com>
Co-authored-by: Mrugesh Mohapatra <hi@mrugesh.dev>
Co-authored-by: Quincy Larson <QuincyLarson@users.noreply.github.com>
2023-02-09 13:37:22 -06:00
Muhammed Mustafa
f558e93bb5 refactor(tools): fix selector type error in the footer.ts (#49259) 2023-02-07 18:17:49 +09:00
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