Open ataylorme opened 7 years ago
Yeah, we can override MinkContext to alter the handling of admin urls by assertPageAddress()
Cool, let's look into it at Drupalcon or when you are back. It's currently blocking work for me on my advanced WordPress demo repo running these tests since core is install in the wp
subdirectory so the admin URLs are wp/wp-admin
I'm working on addressing this problem. I've been combining this repo and https://github.com/pantheon-systems/example-drops-8-composer into https://github.com/stevector/example-wordpress-composer such that it can be built from https://github.com/pantheon-systems/terminus-build-tools-plugin
I have gotten to the point where at least a hacked branch of our tests can pass: https://github.com/pantheon-systems/pantheon-wordpress-upstream-tests/pull/47 by setting the base url to include /wp
: https://github.com/stevector/example-wordpress-composer/blob/bd0ea1302b744d6f01e6f39bf000da7155c1683d/tests/scripts/run-behat#L18
Here is a repo that was created by me running
terminus build-env:create-project stevector/example-wordpress-composer persch-ewc-m --stability=dev --yes
https://github.com/stevector/persch-ewc-m
As the name suggests, persch-ewc-a
through persch-ewc-l
all failed in one way or another. Next I need to update: https://github.com/pantheon-systems/terminus-build-tools-plugin/pull/9
@stevector I think we can take a lesson from WordHat here. They pull the admin URL from SITE_URL
, which has to be updated to the correct path when putting WordPress core in a subdirectory.
Thanks for finding that method @ataylorme! I'll adapt that method into our suite until we can do a fuller rewrite relying on WordHat.
until we can do a fuller rewrite relying on WordHat.
@stevector do you still think this is something we should do? I have a lot more Behat/Wordhat experience than I did 2 years ago 😄
lol, maybe @ataylorme. But it probably doesn't take precedent over Build Tools work.
Specifically the
$this->minkContext->assertPageAddress("wp-admin/");
assertion fails.We should pull the WordPress core URL with
wp option get siteurl
and appendwp-admin
.