sitecrafting / conifer

:evergreen_tree: A powerful WordPress library plugin for OO development
https://www.coniferplug.in
MIT License
18 stars 2 forks source link

Split test themes and fixtures #65

Closed acobster closed 5 years ago

acobster commented 5 years ago

The way we load test themes and database fixtures for running e2e tests needs improvement.

Expected behavior

I expect to be able to do something like this in a Cypress end-to-end test:

beforeEach(() => {
  // tell appserver to set up this theme and its fixtures
  runOnAppserver('wp theme activate theme-for-testing-this-scenario');
  runOnAppserver('wp fixture install test/fixture/fixture-for-this-scenario');
})

Actual behavior

There's just a single call to install the "search" test theme/fixture, hard-coded in a Lando event.

Steps to reproduce behavior

lando e2e

Proposal

Have a test server exposed on appserver that just executes whatever command is posted to it. Kind of terrible, so let's not actually ship that code in PHP, but find a way to generate it.

acobster commented 5 years ago

Addressed in f74b451, 00f5419, and e2f1289 using the new lando-cypress-wordpress image.