Coder Social home page Coder Social logo

coderdojo / cp-zen-frontend Goto Github PK

View Code? Open in Web Editor NEW
4.0 13.0 8.0 1.93 MB

Frontend code for the CoderDojo Community Platform (Zen)

Home Page: https://zen.coderdojo.org

License: MIT License

JavaScript 73.47% Vue 25.70% Shell 0.20% Dockerfile 0.03% Less 0.50% EJS 0.09%
vue frontend

cp-zen-frontend's Introduction

cp-zen-frontend

Frontend code for the CoderDojo Community Platform (Zen)

Running e2e tests

cypress tests

We've begun moving e2e tests to Cypress in order to improve reliability.

Running with UI

To run Cypress tests with the Cypress UI (good for debugging issues), you will first need to run the front end by running yarn start, then simply run

yarn cypress:open

This will open a window where you can select what spec to run. Notice that if you have a new version of the translations which is not published yet, tests on strings containing interpolation will fail as they are not depending on the linked version of your own repo. Running it headless will solve that.

Headless

You can also run the Cypress tests headless through Docker. You'll first need to install Cypress within the Docker container by running

docker-compose run --rm cypress yarn cypress:install

Once done, the installed Cypress is kept in a volume so it will persist between runs. If running the tests ever gives out about Cypress not being installed, just run this command again.

To run the tests

docker-compose run --rm cypress

E2E Tests

The tests in the /cypress/integration_e2e folder that are not run as part of the main test in CI.

They are designed to be run manually & locally with the full stack, no endpoints are stubbed.

NOTE: the register test includes a 5 second pause where you are required to click the recaptcha.

yarn cypress:e2e:open

wdio tests

The selenium-based wdio tests are legacy tests, waiting to be migrated to cypress. They are not actively maintained and are there only for reference until migrated. To run the tests

docker-compose run --rm test e2e-with-mocks

cp-zen-frontend's People

Contributors

arayb avatar bu3 avatar butlerx avatar campbs avatar christinavoss avatar curtishughes avatar danielbrierton avatar dependabot[bot] avatar glenpike avatar grabartley avatar grega avatar heyitsmaimai avatar izzysmillie avatar jeddf avatar josephwilk avatar nyashamaphosa avatar patch0 avatar peconia avatar wardormeur avatar zenplatformbot avatar

Stargazers

 avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

cp-zen-frontend's Issues

Handle dojo.city being null in new event form.

When the new event form loads it populates the form with data from the dojo.

It uses the dojo.city to set the city for the event, but this value can be null.
If it is null an error is thrown as we try to access dojo.city.name this breaks the initializing of the data stores (dojo is not set) and the form can not be submitted.

We need to handle the null value here to ensure there is no error. We can look at using the place_name value if city is null.

Fix News blog links in Zen dashboard on log in

Story

Note! Requires CoderDojo/cp-zen-platform#1485 to be merged in too in order to work

Describe the bug
See monday item here
Current blog link in dashboard is not showing anything.

To Reproduce
Steps to reproduce the behaviour:

  1. Go to your dashboard
  2. Scroll down to news
  3. Nothing shows up

Expected behavior
Ideally the blog articles would show up, but for a simpler solution, remove the articles preview and just show a button "Visit our blog" that links to the new blog.

Screenshots
image

Add `utm` tags to DMaH links

Add ?utm_source=coderdojo&utm_medium=covid-banner&utm_campaign=dmah to any raspberrypi.org/at-home links to allow more accurate tracking in Analytics.

Projects don't load on dashboard for some locales

When I visit the dashboard, I get an infinitely loading projects section. Network panel shows I'm getting a 404 because the locale being sent to learning-admin is en-us, but only en (or other supported two letter locale code) will work for that.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.