pantheon-systems / wordpress-composer-managed

WordPress boilerplate with Composer, easier configuration, and an improved folder structure
https://docs.pantheon.io/guides/wordpress-composer
MIT License
3 stars 4 forks source link

Get subdomain multisite tests working properly #148

Closed jazzsequence closed 1 month ago

jazzsequence commented 1 month ago

We're not running the full setup-playwright-tests script because subdomain multisites don't need most of the setup. However, it does need some of the setup (specifically copying the changes from the PR to the fixture site), so we need to manually add those back into that workflow.

In the future we might be able to run just portions of the script for the purpose of subdomain multisite so we're not duplicating code here.

~This PR is blocked by #147 -- the changes the robot fixed were part of what was updated in that PR. Merging this PR before that one will create a commit that gets dropped during deploy.~

This change includes some tweaks to the actual playwright tests and some deviations in the setup. It was discovered in running the tests that the subdomain fixture site was getting reset (GraphQL plugin being deleted, multisite config resetting) -- those have been added to the setup -- but in troubleshooting those it was hypothesized that an incorrect GraphQL endpoint url could have been the issue (it wasn't, multisite not being set up was the issue), or that the environment variables weren't being processed correctly (that wasn't it either, but that was only discovered after breaking the Playwright tests into separate tests -- one for the main site and one for the subdomain). An additional passed environment variable is now supported, however, for GraphQL endpoint, which means that we can eventually remove the handling in the test for different endpoint urls for subdirectory multisite (not included in this PR as it doesn't relate to the subdomain testing).

github-actions[bot] commented 1 month ago

Hi from your friendly robot! :robot: I fixed PHPCS issues with phpcbf on 3e5e15f. Please review the changes.

jazzsequence commented 1 month ago

@pwtyler re-requesting review since I've made changes since your ✅