freeCodeCamp / freeCodeCamp/news

Improve Testing

Open
#69 1 comment 0 reactions 1 assignee Claimed by @scissorsneedfoodtoo View on GitHub
Dominant language
TypeScript
Stars
65
Forks
59
Avg merge
2d 12h
Merged PRs (30d)
6

Description

Currently the Cypress tests use local JSON page and post files sourced from the English Ghost instance (Content API, v3).

Going forward, we'll want to set up a Docker instance of Ghost with the following:
- Articles, tags, and at least two authors (one for regular posts, another to act as a translator for a later feature)
- A preconfigured Content API key for 11ty to use during test builds

Once the Dockerized Ghost instance has been set up, we'll need to:
- Create a SQL dump and zip it
- Create a workflow / modify the Cypress test GH Action (still in progress) to spin up the Docker container and restore the dump
- Run the Cypress tests once the dump has been restored

We should also have detailed documentation on how to start the Docker image, unzip and restore the SQL dump locally, make modifications (add more articles, authors, and so on), and create / zip a new SQL dump.

## Tasks

* [x] Use Dockerized Ghost instances for Cypress test suite. Closed via #207
* [ ] Write tests for pre-production containers, and adjust workflow to run tests before the deployment step

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.