Skip to content

Latest commit

 

History

History

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

readme.md

E2E Testing

Stackable's end-to-end testing aims to test the high-level functions of the plugin in order to quickly assess whether everything is in working condition.

Our goal is to have this run in every Github pull request, and for RC builds.

At the minimum, e2e testing should test the following:

  • Plugin's admin pages are intact
  • Plugin's licensing functionality is working (for Premium codebase only)
  • Blocks are present in the Block Editor and working
  • Blocks are present in the Site Editor
  • Global settings and functionality is working
  • Perform the above tests in all supported lower WordPress versions

Ideally, we should also handle these:

  • Blocks / content from old plugin versions to this new one do not show errors in editor
  • Blocks / content from old plugin versions to this new one look identical in the frontend

Github workflow should also test:

  • Different WP versions that we support
  • Different PHP versions that we support

Usage

Create an .env file in the root directory of the plugin with the contents:

WP_BASE_URL=http://local.local/
WP_AUTH_STORAGE=wp-auth.json
WP_USERNAME=admin
WP_PASSWORD=password
STACKABLE_SLUG={ STACKABLE SLUG }
WP_TEST_POSTID={ POST_ID }
WP_STK_LICENSE={ STACKABLE LICENSE }

In Freemius, make sure the license key is:

  • new
  • lifetime unlimited quota
  • has an owner
  • non-blocking and white-labeled

Run this command to run e2e:

npm run test:debug

or without the UI:

npm run test

Dev Notes