-
Notifications
You must be signed in to change notification settings - Fork 1
Closed
Description
Currently, there are no tests here. That makes it quite long winded and manual to validate changes needed on the site.
Let's make us an inroad on this.
I would like a BDD Gherkin syntax test suite.
- I would like a tests/staging folder created. And the whole tests ignored by eleventy.
- Simple Gherkin test (doesn't need to pass, we will currently miss step implementation yet), something like:
Feature: Website Logo
Scenario: Logo on main index in staging
Given the Staging site is started
When the index page is visited
Then the Logo should be displayed in the top left corner
- Select a suitable Gherkin tool for Javascript, and put in a testing group in package json (npm install with a testing group).
- Make an npm target to run it. It should run enough to say failed because steps are not defined.
- Create a dockerfile target to cover this testing area - which installs the gherkin tool (we will later add more, but this is enough for now). The dockerfile target should use npm to run the gherkin tool.
- Add a docker-compose target to build/run this stage (no shell scripts outside of the dockerfile/compose) - a docker-compose run should demonstrate it showing the steps not defined type failure. Don't worry about connections to the staging compose target just yet - focus on getting this up. This method of running test should be documented in the main repo README.md for running unit tests.
- Add running this test to the on call staging test workflow, when that runs, use a docker compose for this step after the curl tests. At this point, this should not be gating, but the output of this command should be posted as a workflow summary (see https://docs.github.com/en/actions/reference/workflows-and-actions/workflow-commands#adding-a-job-summary).
Copilot
Metadata
Metadata
Assignees
Labels
No labels