* chore: remove verify-can-claim-cert logic
* remove extraneous
* remove console log before Nich wakes up
* add api route back with flash
* remove unnecessary logic in completion-epic
* change tests for new layout
* dynamically use api location
* rename file
* fix Cypress api location
* fix(test): anchor does not have disabled class
* fix(tests): change js test to claim from /settings
* chore: change status to 410 (gone)
* update testing again
* oliver is nitpicky
Co-authored-by: Oliver Eyton-Williams <ojeytonwilliams@gmail.com>
* make oliver happy
Co-authored-by: Oliver Eyton-Williams <ojeytonwilliams@gmail.com>
* fix: only render profile urls
* feat: warn user when submitting data url
* fix: prevent dataurls being saved to db
* fix: tests and imports
Not sure why jest didn't like the es imports, but they aren't necessary
so I dropped them.
* fix: check for url protocol
* fix: hotfix for isHonest null
* fix: early return if no user?
* fix: handle invalid input on api
Also lowerCases the username it receives since the client could send any
case.
* fix: report errors to user when verification fails
Co-authored-by: Oliver Eyton-Williams <ojeytonwilliams@gmail.com>
* chore(tools): test curriculum order
* chore: update orders
* fix(tests): temporarily ignore cert super
The Relational Databases cert being 'upcomingChanges' is breaking
the tests.
* fix: graphql query here
* fix: use only one meta
* chore: remove unnecessary superOrders
* chore: zero-based indexing
* fix: update mock
* refactor: remove unused fixture
Co-authored-by: Oliver Eyton-Williams <ojeytonwilliams@gmail.com>
Co-authored-by: Nicholas Carrigan (he/him) <nhcarrigan@gmail.com>
Co-authored-by: Shaun Hamilton <shauhami020@gmail.com>
Co-authored-by: Oliver Eyton-Williams <ojeytonwilliams@gmail.com>
* feat: Allow display username with uppercase characters
* fix: ensure user can change username to uppercased version
* fix: ensure that same username in a different case does not require validation
* feat: add stripe authentication support
Co-authored-by: Nicholas Carrigan (he/him) <nhcarrigan@gmail.com>
Co-authored-by: Oliver Eyton-Williams <ojeytonwilliams@gmail.com>
* added possibility to revert to default profile picture
* removed required from picture input
* remove addPlaceholderImage and replaced with empty string
* added test for empty string to avatar-renderer
* feat: remove eslint-plugin-prettier for prettier
This removes the annoying lint warnings when all that needs to change is
formatting
* fix: use .js lint-staged config to ignore properly
* fix: lint everything if a lot of files are changed
It's faster than making lots of individual linter calls
* chore: apply prettier
* fix: ignore code in curriculum-file-structure
* fix(client): convert challengeFiles->files before sending to api
* update use of user.completeChallenges
* parse response in ajax, pre-typing
* add typing to getSessionUser
* refactor: use Omit
* fix: reorganise getSessionUser
* refactor ajax for simplicity
* refactor to be worse
* allow for undefined completedChallenges
Co-authored-by: Oliver Eyton-Williams <ojeytonwilliams@gmail.com>
Co-authored-by: Oliver Eyton-Williams <ojeytonwilliams@gmail.com>
* chore: rename APIs and Microservices to include "Backend" (#42515)
* fix typo
* fix typo
* undo change
* Corrected grammar mistake
Corrected a grammar mistake by removing a comma.
* change APIs and Microservices cert title
* update title
* Change APIs and Microservices certi title
* Update translations.json
* update title
* feat(curriculum): rename apis and microservices cert
* rename folder structure
* rename certificate
* rename learn Markdown
* apis-and-microservices -> back-end-development-and-apis
* update backend meta
* update i18n langs and cypress test
Co-authored-by: Shaun Hamilton <shauhami020@gmail.com>
* fix: add development to front-end libraries (#42512)
* fix: added-the-word-Development-to-front-end-libraries
* fix/added-the-word-Development-to-front-end-libraries
* fix/added-word-development-to-front-end-libraries-in-other-related-files
* fix/added-the-word-Development-to-front-end-and-all-related-files
* fix/removed-typos-from-last-commit-in-index.md
* fix/reverted-changes-that-i-made-to-dependecies
* fix/removed xvfg
* fix/reverted changes that i made to package.json
* remove unwanted changes
* front-end-development-libraries changes
* rename backend certSlug and README
* update i18n folder names and keys
* test: add legacy path redirect tests
This uses serve.json from the client-config repo, since we currently use
that in production
* fix: create public dir before moving serve.json
* fix: add missing script
* refactor: collect redirect tests
* test: convert to cy.location for stricter tests
* rename certificate folder to 00-certificates
* change crowdin config to recognise new certificates location
* allow translations to be used
Co-authored-by: Nicholas Carrigan (he/him) <nhcarrigan@gmail.com>
* add forwards slashes to path redirects
* fix cypress path tests again
* plese cypress
* fix: test different challenge
Okay so I literally have no idea why this one particular challenge
fails in Cypress Firefox ONLY. Tom and I paired and spun a full build
instance and confirmed in Firefox the page loads and redirects as
expected. Changing to another bootstrap challenge passes Cypress firefox
locally. Absolutely boggled by this.
AAAAAAAAAAAAAAA
* fix: separate the test
Okay apparently the test does not work unless we separate it into
a different `it` statement.
>:( >:( >:( >:(
Co-authored-by: Sujal Gupta <55016909+heysujal@users.noreply.github.com>
Co-authored-by: Noor Fakhry <65724923+NoorFakhry@users.noreply.github.com>
Co-authored-by: Oliver Eyton-Williams <ojeytonwilliams@gmail.com>
Co-authored-by: Nicholas Carrigan (he/him) <nhcarrigan@gmail.com>
* feat: initial button setup client
* feat: rename walletsButton to .tsx
* chore: typescriptize wallet component
* chore: re-add keys to config, env, etc + check in gatsby-node
* feat: refactor donate form and wallet component
* feat(client): set labels correctly
* chore: add stripe package back to server
* chore: add stripe back to allowed paths
* chore: copy donate.js code from PR #41924
* feat: attempt to make back end work
* feat: make redux work
* feat: clean up
* feat: hokify
* feat: add error handling
* fix: back-end should be working
* fix: type errors
* fix: clean up back-end
* feat:addd styles
* feat: connect the client to the api
* feat: display wallets button everywhere
* test: add stripe key for cypress action
* test: fix for cypress tests
* test: cypress tests again
* test: maybe?
* test: more
* test: more
* test: more
* test
* askdfjasklfj
* fix: tests finally?
* revert: remove space from cypress yaml action
* remove logs
Co-authored-by: moT01 <20648924+moT01@users.noreply.github.com>
Co-authored-by: Oliver Eyton-Williams <ojeytonwilliams@gmail.com>
* fix: remove circular dependency
redux depended on templates/Challenges/redux and vice versa. This
meant that import order mattered and confusing bugs could arise.
(cherry picked from commit 7d67a4e70922bbb3051f2f9982dcc69e240d43dc)
* feat: require imports to be in alphabetical order
Import order generally does not matter, but there are edge cases
(circular imports and css imports, for example) where changing order
changes behaviour
(cherry picked from commit b8d1393a91ec6e068caf8e8498a5c95df68c2b2c)
* chore: order imports
* fix: lift up challenge description + title comps
This brings the classic Show closer to the others as they
now all create the description and title components
* fix: remove donation-saga/index circular import
(cherry picked from commit 51a44ca668a700786d2744feffeae4fdba5fd207)
* refactor: extract action-types from settings
(cherry picked from commit 25e26124d691c84a0d0827d41dafb761c686fadd)
* fix: lint errors
* feat: prevent useless renames
* fix: display legacy certs like the current ones
* fix: link projects in legacy certs to project pages
* fix: update tests to changed legacy cert display
* fix: update tests for removed legacy certs forms
* fix: display legacy certs like the current ones
* fix: submit projects for cert on projects pages
* fix: remove legacy certs form submitting handling
* fix: move claiming cert setup before both tests
* fix: remove legacy cert update props and actions
* fix: remove legacy cert updates from api
* fix: correct merge conflict
* fix(api): return json for delete + reset-progress
* refactor(api): make .json calls explicit
These .send() calls had objects as arguments. Using .json() makes it
explicit without changing behaviour.
* fix: return json or redirectWithFlash
We should never be getting requests for plain text, but if we do they
should be redirected back to the client.
* fix: prioritize JSON responses
If accepted, respond with JSON. If not, it's probably a bad request.