- πΊπΈUnited States stockfoot
When running the phpunit test for the module, I received the following error:
Exception: You must provide a SIMPLETEST_BASE_URL environment variable to run some PHPUnit based functional tests.
This is because the
SIMPLETEST_BASE_URL
environment variable in the/web/core/phpunit.xml file
defaults to an empty string. Setting the base URL of the project on which I was testing the module fixed this issue and allowed the tests to run further. However, this is not a good approach as we don't want to edit files in the /core folder.Allowing the unit tests to run I found a few issues that I will fix in the upcoming merge request...
- Instances of
admin/config/development/a11yproject-checklist
need to be updated with an extra dash toadmin/config/development/a11y-project-checklist
- $this->submitForm(['edit-checklistapi-content-use-plain-language' => '1',], t('Save')); is throwing the error
TypeError: Behat\Mink\Element\TraversableElement::findButton(): Argument #1 ($locator) must be of type string, Drupal\Core\StringTranslation\TranslatableMarkup given, called in /var/www/web/core/tests/Drupal/Tests/WebAssert.php on line 143
- Instances of
- Issue was unassigned.
- Status changed to Needs review
11 months ago 7:36pm 28 March 2024 - πΊπΈUnited States stockfoot
I have completed making the changes to make sure that the tests are now passing with no errors.
Merge request - https://git.drupalcode.org/project/a11yproject_checklist/-/merge_requests/6
Moving to "In Review" status, thanks!
- πΊπΈUnited States markie Albuquerque, NM
Loaded it up in DrupalPod and re-ran with the same error.
- πΊπΈUnited States markie Albuquerque, NM
Also, you may want to rebase your MR so it can work on D10..
- πΊπΈUnited States thejimbirch Cape Cod, Massachusetts
Should this be Needs Work then?
- πΊπΈUnited States stockfoot
I have removed the text check on the path.
We have the assertion for the 200 response code which verifies the page loads.
Checking for the text 'Welcome to Drupal' would only work for standard/plain Drupal installs and not any custom themesAll tests are now passing
- Status changed to Needs work
11 months ago 6:52pm 3 April 2024 - Status changed to RTBC
11 months ago 8:03pm 3 April 2024 - Status changed to Fixed
11 months ago 5:42pm 10 April 2024 Automatically closed - issue fixed for 2 weeks with no activity.