Skip to content

Commit

Permalink
Implement Acceptance testing for Add New Membership Level page
Browse files Browse the repository at this point in the history
  • Loading branch information
sc0ttkclark committed Sep 6, 2021
1 parent 3d35b93 commit 01d4412
Show file tree
Hide file tree
Showing 16 changed files with 14,257 additions and 599 deletions.
2 changes: 1 addition & 1 deletion .env
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

# What version of WordPress we want to install and test against.
# This has to be compatible with the `wp core download` command, see https://developer.wordpress.org/cli/commands/core/download/.
# WP_VERSION=latest # NOTE: Already defined in .travis.yml matrix.
WP_VERSION=latest

# A space-separated list of plugin repositories that will be cloned in the WordPress installation folder and that are
# required for the plugin tests.
Expand Down
13 changes: 0 additions & 13 deletions .env.example

This file was deleted.

6 changes: 3 additions & 3 deletions .env.testing.tric
Original file line number Diff line number Diff line change
Expand Up @@ -21,15 +21,15 @@ WP_ADMIN_PASSWORD=password

WP_DB_PORT=3306

# The databse is served from the Docker `db` container.
# The database is served from the Docker `db` container.
# See `dev/docker/ci-compose.yml` for more information.
WP_TABLE_PREFIX=wp_
WP_DB_HOST=db
WP_DB_NAME=test
WP_DB_USER=root
WP_DB_PASSWORD=password

# The test databse is served from the Docker `db` container.
# The test database is served from the Docker `db` container.
# See `dev/docker/ci-compose.yml` for more information.
WP_TEST_DB_HOST=db
WP_TEST_DB_NAME=test
Expand All @@ -48,7 +48,7 @@ CHROMEDRIVER_PORT=4444
# lines that, in the `wp-config.php` file, will make it so that WordPress will use as its home
# URL whatever URL we reach it with.
# See the `dev/docker/wp-config.php` template for more information.
WP_CHROMEDRIVER_URL=http://wordpress.test
WP_CHROMEDRIVER_URL="http://wordpress.test"

# We're using Docker to run the tests.
USING_CONTAINERS=1
61 changes: 0 additions & 61 deletions .travis.yml

This file was deleted.

3 changes: 0 additions & 3 deletions codeception.example.yml

This file was deleted.

13 changes: 10 additions & 3 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -38,15 +38,22 @@
"require-dev": {
"automattic/vipwpcs": "^2.0",
"bvanhoekelen/performance": "^2.5.1",
"codeception/codeception": "2.5.6",
"codeception/codeception": "^4.0",
"codeception/module-asserts": "^1.0",
"codeception/module-cli": "^1.0",
"codeception/module-db": "^1.0",
"codeception/module-filesystem": "^1.0",
"codeception/module-phpbrowser": "^1.0",
"codeception/module-rest": "^1.0",
"codeception/module-webdriver": "^1.0",
"dealerdirect/phpcodesniffer-composer-installer": "^0.7.0",
"fzaninotto/faker": "^1.8",
"lucatume/function-mocker": "^1.3.8",
"lucatume/function-mocker-le": "^1.0.1",
"lucatume/wp-browser": "2.2.15",
"lucatume/wp-browser": "^3.0.5",
"lucatume/wp-snaphot-assertions": "^1.0",
"the-events-calendar/tribalscents": "dev-master",
"phpunit/phpunit": "6.5.14",
"phpunit/phpunit": "^6.5.14",
"spatie/phpunit-snapshot-assertions": "^1.4.2",
"wp-cli/wp-cli": "2.*",
"wp-coding-standards/wpcs": "^2.1"
Expand Down
31 changes: 0 additions & 31 deletions phpunit.xml.dist

This file was deleted.

785 changes: 785 additions & 0 deletions tests/_data/dump-acceptance.sql

Large diffs are not rendered by default.

26 changes: 26 additions & 0 deletions tests/_support/AcceptanceTester.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
<?php


/**
* Inherited Methods
* @method void wantToTest($text)
* @method void wantTo($text)
* @method void execute($callable)
* @method void expectTo($prediction)
* @method void expect($prediction)
* @method void amGoingTo($argumentation)
* @method void am($role)
* @method void lookForwardTo($achieveValue)
* @method void comment($description)
* @method \Codeception\Lib\Friend haveFriend($name, $actorClass = NULL)
*
* @SuppressWarnings(PHPMD)
*/
class AcceptanceTester extends \Codeception\Actor
{
use _generated\AcceptanceTesterActions;

/**
* Define custom actions here
*/
}
10 changes: 10 additions & 0 deletions tests/_support/Helper/Acceptance.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
<?php

namespace Helper;

// here you can define custom actions
// all public methods declared in helper class will be available in $I

class Acceptance extends \Codeception\Module {

}
Loading

0 comments on commit 01d4412

Please sign in to comment.