Skip to content

Behat Scenario Fail on Drupal 8 #346

@grayside

Description

@grayside

One of the scenarios in the test suite is failing, and I do not know why. Since the tests serve as an example and a confirmation the test runner is working, in the interest of expediency I'm going to mark it as a wip so it will be skipped, and file this issue.

The Scenario:

  @api @javascript
  Scenario: Ensure the Reports page is loaded into an overlay when the Reports
  menu item is clicked.
    Given I am logged in as a user with the "administrator" role
      And I am on the homepage
      And I click "My account"
      And I click "Edit"
     When I fill in "pass[pass1]" with "123"
     Then I should see "Password strength" in the ".form-item-pass-pass1" element

The error output from Travis:

Expand to see the error details
 Scenario: Ensure the Reports page is loaded into an overlay when the Reports   # features/example.feature:21
    menu item is clicked.
    Given I am logged in as a user with the "administrator" role                 # Drupal\DrupalExtension\Context\DrupalContext::assertAuthenticatedByRole()
      Error while processing event 'click': "TypeError: Cannot read property 'add' of undefined\n    at Object.attach (http://127.0.0.1:8080/sites/default/files/js/js_NMRRhb0nelGJUJIamL02h1d6UlwJLmr8dFn7dMiTOVc.js:8240:33)\n    at Object.Drupal.attachBehaviors (http://127.0.0.1:8080/sites/default/files/js/js_NMRRhb0nelGJUJIamL02h1d6UlwJLmr8dFn7dMiTOVc.js:207:24)\n    at http://127.0.0.1:8080/sites/default/files/js/js_NMRRhb0nelGJUJIamL02h1d6UlwJLmr8dFn7dMiTOVc.js:648:33\n    at HTMLDocument.t (http://127.0.0.1:8080/sites/default/files/js/js_BKcMdIbOMdbTdLn9dkUq3KCJfIKKo2SvKoQ1AnB8D-g.js:4:381)\n    at callListeners (/home/travis/build/phase2/grunt-drupal-tasks/test/working_copy/node_modules/jsdom/lib/jsdom/events/EventTarget.js:170:34)\n    at dispatchPhase (/home/travis/build/phase2/grunt-drupal-tasks/test/working_copy/node_modules/jsdom/lib/jsdom/events/EventTarget.js:159:7)\n    at HTMLDocument.EventTarget.dispatchEvent (/home/travis/build/phase2/grunt-drupal-tasks/test/working_copy/node_modules/jsdom/lib/jsdom/events/EventTarget.js:115:3)\n    at HTMLDocument.DOM.EventTarget.dispatchEvent (/home/travis/build/phase2/grunt-drupal-tasks/test/working_copy/node_modules/zombie/lib/dom/jsdom_patches.js:155:31)\n    at HTMLDocument.<anonymous> (/home/travis/build/phase2/grunt-drupal-tasks/test/working_copy/node_modules/jsdom/lib/jsdom/level2/html.js:306:12)\n    at /home/travis/build/phase2/grunt-drupal-tasks/test/working_copy/node_modules/jsdom/lib/jsdom/browser/resource-loader.js:32:22" (Behat\Mink\Exception\DriverException)
    And I am on the homepage                                                     # Drupal\DrupalExtension\Context\MinkContext::iAmOnHomepage()
    And I click "My account"                                                     # Drupal\DrupalExtension\Context\MinkContext::assertClick()
    And I click "Edit"                                                           # Drupal\DrupalExtension\Context\MinkContext::assertClick()
    When I fill in "pass[pass1]" with "123"                                      # Drupal\DrupalExtension\Context\MinkContext::fillField()
    Then I should see "Password strength" in the ".form-item-pass-pass1" element # Drupal\DrupalExtension\Context\MinkContext::assertElementContainsText()

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions