Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Behat: First test tagged @javascript in a feature fails, subsequent pass #456

Closed
jrbeeman opened this issue Sep 26, 2016 · 2 comments
Closed

Comments

@jrbeeman
Copy link
Contributor

When attempting to run blt tests:behat:execute against a Behat feature file, the first scenario tagged @javascript is failing, while subsequent scenarios in that feature file pass.

Example I have tested:

The result is that the first scenario, e.g. Scenario: Ensure that the WYSIWYG editor is present. fails, but the next scenario, e.g. Scenario: Ensure that meta tag fields are present. passes.

The output from running the test is consistent between the two example feature files:

  @javascript
  Scenario: Ensure that the WYSIWYG editor is present.         # /Users/jeff.beeman/Projects/watercooler/docroot/profiles/contrib/lightning/tests/features/content_type.feature:12
    Given I am logged in as a user with the administrator role # Drupal\DrupalExtension\Context\DrupalContext::assertAuthenticatedByRole()
      Form field with id|name|label|value|placeholder "Username" not found.

      +--[  | Selenium2Driver ]
      |
      |
      |
    When I visit "node/add/page"                               # Drupal\DrupalExtension\Context\MinkContext::assertAtPath()
    Then CKEditor "edit-body-0-value" should exist

My naive guess is that it's failing to login. Perhaps a race condition with loading the page via the Selenium driver?

@grasmash
Copy link
Contributor

@jrbeeman Is this still an issue in more recent versions of BLT? I have been unable to reproduce. Testing tools for Behat have changed significantly since this issue was filed.

@jrbeeman
Copy link
Contributor Author

Following the changes to the testing infrastructure (use of Selenium, Drupal VM improvements, etc.) this is no longer an issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants