(E2E) `testErrorChrome` - Update to work with current wp-demo build
authorTim Otten <totten@civicrm.org>
Fri, 6 May 2022 22:35:04 +0000 (15:35 -0700)
committerTim Otten <totten@civicrm.org>
Fri, 6 May 2022 22:35:04 +0000 (15:35 -0700)
This test was added during 5.50.alpha (#23257, #22805).  It's purpose is to
assert that the page-chrome/site-wide-template is present.  It appears that
the markup from WordPress has changed slightly.  (It may be that I
originally tested against an older version of WP.) In any event, this
relaxes the test so that it also passes on a newer WP build.

tests/phpunit/E2E/Core/ErrorTest.php

index 90f7c4edda9198c02d89a96b7374c00a996383df..a5b95895215a2543a7907da1fc9d042c2b1b0b0e 100644 (file)
@@ -97,7 +97,7 @@ class ErrorTest extends \CiviEndToEndTestCase {
       'Backdrop' => '/body class=\".*not-logged-in/',
       'Drupal' => '/body class=\".*not-logged-in/',
       'Drupal8' => '/body class=\".*not-logged-in/',
-      'WordPress' => '/ role=.navigation./',
+      'WordPress' => '/( role=.navigation.| class=.site-header.)/',
     ];
     if (!isset($patterns[CIVICRM_UF])) {
       $this->markTestIncomplete('testErrorChrome() cannot check for chrome on ' . CIVICRM_UF);