- Issue created by @osab
During adding test ( https://www.drupal.org/project/cache_review/issues/3446118 📌 Add basic test and setup CI Needs work ) there was found the problem with testin on "stark" theme https://www.drupal.org/project/cache_review/issues/3446118#mr2-note320285 📌 Add basic test and setup CI Needs work .
Looks like that problem relates to the src/StackMiddleware/CacheReview.php handle() function. There is additional "Page cache status" description on the page. And that tests works fine if remove several sentences from that "Page cache status" section. It looks like limitation for "stark" theme. But will be good to find solution.
In tests/src/Functional/CacheReviewTest.php change to protected $defaultTheme = 'stark';
and run tests (like ./vendor/bin/phpunit -c web/core web/modules/custom/cache_review/tests/src/Functional/CacheReviewTest.php).
Errors during testing:
1) Drupal\Tests\cache_review\Functional\AdminTest::testAdmin
Behat\Mink\Exception\ElementNotFoundException: Button with id|name|label|value "op" not found.
/var/www/html/core/tests/Drupal/Tests/WebAssert.php:158
/var/www/html/core/tests/Drupal/Tests/UiHelperTrait.php:74
/var/www/html/core/tests/Drupal/Tests/UiHelperTrait.php:187
/var/www/html/modules/custom/cache_review/tests/src/Functional/AdminTest.php:47
2) Drupal\Tests\cache_review\Functional\CacheReviewTest::testCacheReviewPages
Behat\Mink\Exception\ElementNotFoundException: Button with id|name|label|value "Log in" not found.
/var/www/html/core/tests/Drupal/Tests/WebAssert.php:158
/var/www/html/core/tests/Drupal/Tests/UiHelperTrait.php:78
/var/www/html/core/tests/Drupal/Tests/UiHelperTrait.php:160
/var/www/html/modules/custom/cache_review/tests/src/Functional/CacheReviewTest.php:40
As rusult, we dont have full login form in genereted html page from testing.
Active
1.1
Code