coderedcorp / coderedcorp/wagtail-flexible-forms

Help wanted: add unit tests

Open
#5 2 comments 0 reactions 0 assignees View on GitHub
good first issue help wanted
Dominant language
Python
Stars
38
Forks
6
PR merge metrics
No merged PRs in 30d

Description

This project is set up nearly identically to our other packages, https://github.com/coderedcorp/wagtail-seo and https://github.com/coderedcorp/wagtail-cache. So the basic unit tests can probably be copied from one of those projects as a starting point.

I have already created a "testproject" which implements all of the functionality.

However, there are no unit tests. The most basic unit test, which would probably get us up to 70% coverage instantly, would be to:
* Create a single unit test case.
* This test would create an instance of a page (i.e. `MultiStepStreamFormPage` in `home/models.py`)
* Make a GET request and ensure it responds with a 200

Slightly more advanced tests:
* Add one of each block type to the page instance
* Add at least 2 steps to the page instance.
* GET and POST both steps.
* Check that a `FormSubmission` object was created.

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.