Tests are failing

Created on 29 June 2021, almost 3 years ago
Updated 24 April 2024, 2 months ago

Tests are failing, probably due to the Service. These tests pass on other, simpler Checklist modules. They need to be fixed.

πŸ› Bug report
Status

Fixed

Version

1.0

Component

Code

Created by

πŸ‡ΊπŸ‡ΈUnited States thejimbirch Cape Cod, Massachusetts

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Merge Requests

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

  • πŸ‡ΊπŸ‡Έ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 to admin/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
  • Merge request !6Updates url module path settings β†’ (Merged) created by Stockfoot
  • Issue was unassigned.
  • Status changed to Needs review 3 months ago
  • πŸ‡ΊπŸ‡Έ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 themes

    All tests are now passing

  • Status changed to Needs work 3 months ago
  • πŸ‡ΊπŸ‡ΈUnited States markie Albuquerque, NM

    MR still needs rebase

  • Status changed to RTBC 3 months ago
  • πŸ‡ΊπŸ‡ΈUnited States markie Albuquerque, NM

    all tests pass in D10

  • Status changed to Fixed 3 months ago
  • πŸ‡ΊπŸ‡ΈUnited States thejimbirch Cape Cod, Massachusetts

    Merged, thanks!

  • Automatically closed - issue fixed for 2 weeks with no activity.

Production build 0.69.0 2024