The repository demonstrates how to write a simple custom workflow step plus automated browser testing using Codeception & WP-Browser.
step.php contains the custom workflow step as a plugin.
The tests/acceptance folder contains some examples of acceptance tests.
- Docker Desktop. Note: It may be necessary to increase the RAM to 4GB.
- A Gravity Forms license key
Copy .env.sample to .env and enter your Gravity Forms license key.
Run docker-compose run codeception run -vv --html from the root folder to start the tests.
Docker compose will create containers for the following services:
- Codeception + WP-Browser
- WordPress
- MariaDB
- Selenium + Chromedriver
When the tests start the latest versions of Gravity Forms and Gravity Flow will be installed and activated.
You can watch Chrome perform the tests via VNC on localhost:5900. On a Mac open vnc://localhost:5900 in Safari. Password: secret.
An HTML report will be generated in the tests/_output folder.