Skip to content

Commit

Permalink
chore: remove Cypress (freeCodeCamp#55056)
Browse files Browse the repository at this point in the history
  • Loading branch information
Sembauke authored Jun 14, 2024
1 parent 1a51bb0 commit eb84dce
Show file tree
Hide file tree
Showing 51 changed files with 67 additions and 1,042 deletions.
33 changes: 16 additions & 17 deletions .devcontainer/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -7,29 +7,28 @@ ARG MONGODB_VERSION=6.0.4
ARG DEBIAN_FRONTEND=noninteractive

RUN apt-get update && apt-get install -y sudo && \
sudo apt-get install -y ca-certificates curl gnupg && \
sudo mkdir -p /etc/apt/keyrings && \
curl -fsSL https://deb.nodesource.com/gpgkey/nodesource-repo.gpg.key | sudo gpg --dearmor -o /etc/apt/keyrings/nodesource.gpg && \
echo "deb [signed-by=/etc/apt/keyrings/nodesource.gpg] https://deb.nodesource.com/node_$NODE_MAJOR.x nodistro main" | sudo tee /etc/apt/sources.list.d/nodesource.list && \
sudo apt-get update && \
sudo apt-get install nodejs -y && \
sudo apt-get install -y libcurl4 openssl liblzma5 && \
mkdir -p /tmp/mongodb && \
cd /tmp/mongodb && \
wget -qOmongodb.tgz https://fastdl.mongodb.org/linux/mongodb-linux-x86_64-ubuntu2004-${MONGODB_VERSION}.tgz && \
tar -zxvf mongodb.tgz && \
cd mongodb-* && \
sudo cp bin/* /usr/local/bin/ && \
rm -rf /tmp/mongodb && \
sudo mkdir -p /data/db && \
sudo chown vscode:vscode -R /data/db
sudo apt-get install -y ca-certificates curl gnupg && \
sudo mkdir -p /etc/apt/keyrings && \
curl -fsSL https://deb.nodesource.com/gpgkey/nodesource-repo.gpg.key | sudo gpg --dearmor -o /etc/apt/keyrings/nodesource.gpg && \
echo "deb [signed-by=/etc/apt/keyrings/nodesource.gpg] https://deb.nodesource.com/node_$NODE_MAJOR.x nodistro main" | sudo tee /etc/apt/sources.list.d/nodesource.list && \
sudo apt-get update && \
sudo apt-get install nodejs -y && \
sudo apt-get install -y libcurl4 openssl liblzma5 && \
mkdir -p /tmp/mongodb && \
cd /tmp/mongodb && \
wget -qOmongodb.tgz https://fastdl.mongodb.org/linux/mongodb-linux-x86_64-ubuntu2004-${MONGODB_VERSION}.tgz && \
tar -zxvf mongodb.tgz && \
cd mongodb-* && \
sudo cp bin/* /usr/local/bin/ && \
rm -rf /tmp/mongodb && \
sudo mkdir -p /data/db && \
sudo chown vscode:vscode -R /data/db


# Setup ENV
ENV COOKIE_DOMAIN=github.dev
ENV HOME_LOCATION=https://$CODESPACE_NAME-8000.$GITHUB_CODESPACES_PORT_FORWARDING_DOMAIN
ENV API_LOCATION=https://$CODESPACE_NAME-3000.$GITHUB_CODESPACES_PORT_FORWARDING_DOMAIN
ENV CYPRESS_BASE_URL=https://$CODESPACE_NAME-8000.$GITHUB_CODESPACES_PORT_FORWARDING_DOMAIN
ENV REACT_APP_CHALLENGE_EDITOR_API_LOCATION=https://$CODESPACE_NAME-3200.$GITHUB_CODESPACES_PORT_FORWARDING_DOMAIN
ENV CHALLENGE_EDITOR_CLIENT_LOCATION=https://$CODESPACE_NAME-3300.$GITHUB_CODESPACES_PORT_FORWARDING_DOMAIN

8 changes: 0 additions & 8 deletions .eslintrc.json
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,6 @@
"./api/tsconfig.json",
"./shared/tsconfig.json",
"./tools/client-plugins/browser-scripts/tsconfig.json",
"./cypress/tsconfig.json",
"./e2e/tsconfig.json"
]
},
Expand All @@ -94,13 +93,6 @@
],
"rules": { "import/named": 2 }
},
{
"files": ["cypress/**/*.js"],
"globals": {
"cy": true,
"Cypress": true
}
},
{
"files": ["e2e/*.ts"],
"rules": {
Expand Down
1 change: 0 additions & 1 deletion .github/labeler.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@
- api/**/*

'scope: tools/scripts':
- cypress/**/*
- tools/**/*
- .github/**/*
- utils/**/*
Expand Down
157 changes: 0 additions & 157 deletions .github/workflows/e2e-web.yml

This file was deleted.

4 changes: 0 additions & 4 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -111,10 +111,6 @@ coverage
# nyc test coverage
.nyc_output

# Cypress.io
cypress/videos
cypress/screenshots

# Grunt intermediate storage (https://gruntjs.com/creating-plugins#storing-task-files)
.grunt

Expand Down
5 changes: 2 additions & 3 deletions .gitpod.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,6 @@ tasks:
export COOKIE_DOMAIN=gitpod.io
export HOME_LOCATION=$(gp url 8000)
export API_LOCATION=$(gp url 3000)
export CYPRESS_BASE_URL=$(gp url 8000)
export CHALLENGE_EDITOR_API_LOCATION=$(gp url 3200)
export CHALLENGE_EDITOR_CLIENT_LOCATION=$(gp url 3300)
' >> ~/.bashrc;
Expand All @@ -39,7 +38,7 @@ tasks:
(mongod --dbpath /workspace/data &)
- name: server
before: export COOKIE_DOMAIN=gitpod.io && export HOME_LOCATION=$(gp url 8000) && export API_LOCATION=$(gp url 3000) && export CYPRESS_BASE_URL=$(gp url 8000)
before: export COOKIE_DOMAIN=gitpod.io && export HOME_LOCATION=$(gp url 8000) && export API_LOCATION=$(gp url 3000)
# init is not executed for prebuilt workspaces and restarts,
# so we should put all the heavy initialization here
init: >
Expand All @@ -55,7 +54,7 @@ tasks:
pnpm run develop:server
- name: client
before: export HOME_LOCATION=$(gp url 8000) && export API_LOCATION=$(gp url 3000) && export CYPRESS_BASE_URL=$(gp url 8000)
before: export HOME_LOCATION=$(gp url 8000) && export API_LOCATION=$(gp url 3000)
init: >
cd ./client &&
gp sync-await pnpm-install &&
Expand Down
1 change: 0 additions & 1 deletion client/src/assets/icons/freecodecamp.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ function FreeCodeCampLogo(
): JSX.Element {
return (
<svg
data-cy='freeCodeCamp-logo'
height={24}
version='1.1'
viewBox='0 0 210 24'
Expand Down
1 change: 0 additions & 1 deletion client/src/assets/icons/microsoft-logo.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ function MicrosoftLogo(
): JSX.Element {
return (
<svg
data-cy='microsoft-logo'
version='1.1'
viewBox='0 0 610 130'
xmlns='http://www.w3.org/2000/svg'
Expand Down
8 changes: 1 addition & 7 deletions client/src/client-only-routes/show-certification.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -392,10 +392,7 @@ const ShowCertification = (props: ShowCertificationProps): JSX.Element => {
}}
</strong>
</h1>
<h4
data-cy={'issue-date'}
data-playwright-test-label='issue-date'
>
<h4 data-playwright-test-label='issue-date'>
{{
time: certDate.toLocaleString([localeCode, 'en-US'], {
year: 'numeric',
Expand All @@ -414,7 +411,6 @@ const ShowCertification = (props: ShowCertificationProps): JSX.Element => {
<>
<div>
<Image
data-cy='quincy-signature'
data-playwright-test-label='quincy-signature'
alt="Quincy Larson's Signature"
src={
Expand All @@ -431,7 +427,6 @@ const ShowCertification = (props: ShowCertificationProps): JSX.Element => {
</div>
<div className='microsoft-signature'>
<Image
data-cy='microsoft-signature'
data-playwright-test-label='microsoft-signature'
alt="Julia Liusons's Signature"
src={
Expand All @@ -451,7 +446,6 @@ const ShowCertification = (props: ShowCertificationProps): JSX.Element => {
) : (
<div>
<Image
data-cy='quincy-signature'
data-playwright-test-label='quincy-signature'
alt="Quincy Larson's Signature"
src={
Expand Down
2 changes: 1 addition & 1 deletion client/src/client-only-routes/show-project-links.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -184,7 +184,7 @@ const ShowProjectLinks = (props: ShowProjectLinksProps): JSX.Element => {
if (!isCertName(certName)) return <div> Unknown Certification</div>;

return (
<div data-cy='solution-widget' data-playwright-test-label='project-links'>
<div data-playwright-test-label='project-links'>
{t(getCertHeading(certName), { user: name })}
<Spacer size='medium' />
<Table striped>
Expand Down
14 changes: 4 additions & 10 deletions client/src/components/Donation/donation-text-components.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -43,15 +43,11 @@ export const ThankYouMessage = ({
const { t } = useTranslation();
return (
<>
<h1 data-playwright-test-label='main-head' data-cy='donate.thank-you'>
{t('donate.thank-you')}
</h1>
<h1 data-playwright-test-label='main-head'>{t('donate.thank-you')}</h1>
{(askForDonation || thankContributon) && (
<>
<Spacer size='medium' />
<p data-cy='donate.crucial-contribution'>
{t('donate.crucial-contribution')}
</p>
<p>{t('donate.crucial-contribution')}</p>
</>
)}
{askForDonation && <OtherWaysToSupport />}
Expand All @@ -63,13 +59,11 @@ export const OtherWaysToSupport = (): JSX.Element => {
const { t } = useTranslation();
return (
<>
<p data-cy='donate.if-support-further'>
<p>
<Trans i18nKey='donate.if-support-further'>
<a href={t('links:donate.one-time-external-url')}>placeholder</a>
<a href={t('links:donate.mail-check-url')}>placeholder</a>
<a data-cy='donate-link' href={t('links:donate.other-ways-url')}>
placeholder
</a>
<a href={t('links:donate.other-ways-url')}>placeholder</a>
</Trans>
</p>
</>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,6 @@ function SelectionTabs({
<button
className='text-center confirm-donation-btn donate-btn-group'
type='submit'
data-cy='donation-tier-selection-button'
onClick={() => setShowDonateForm(true)}
>
{isAnimationEnabled
Expand Down
1 change: 0 additions & 1 deletion client/src/components/Donation/stripe-card-form.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -157,7 +157,6 @@ export default function StripeCardForm({
<button
className='confirm-donation-btn'
disabled={!stripe || !elements || isSubmitting}
data-cy='donation-confirmation-button'
type='submit'
>
{t('buttons.donate')}
Expand Down
7 changes: 1 addition & 6 deletions client/src/components/SolutionViewer/project-modal.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -30,12 +30,7 @@ const ProjectModal = ({
<SolutionViewer challengeFiles={challengeFiles} solution={solution} />
</Modal.Body>
<Modal.Footer alignment='end'>
<Button
data-cy='solution-viewer-close-btn'
onClick={handleSolutionModalHide}
>
{t('buttons.close')}
</Button>
<Button onClick={handleSolutionModalHide}>{t('buttons.close')}</Button>
</Modal.Footer>
</Modal>
);
Expand Down
Loading

0 comments on commit eb84dce

Please sign in to comment.