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

Test failures due to dependencies between scenario tags #103

Open
pfrenssen opened this issue Oct 1, 2019 · 0 comments
Open

Test failures due to dependencies between scenario tags #103

pfrenssen opened this issue Oct 1, 2019 · 0 comments

Comments

@pfrenssen
Copy link
Member

The PR #101 is failing because there are dependencies between the @cleanup:media and @remote-video tags in the Behat scenarios.

The @cleanup:media tag relies on the fact that the Media module is enabled, which happens in the @remote-video tag. Behat does not allow to set a priority on hooks (which is by design, ref Behat/Behat#438), so it is entirely possible that the @cleanup:media tag runs first, and in this case we get this error:

    BeforeScenario # Drupal\Tests\oe_webtools\Behat\WebtoolsCleanupContext::collectExistingEntities()
      The "media" entity type does not exist. (Drupal\Component\Plugin\Exception\PluginNotFoundException)

The best way to solve this would be to get rid of the @cleanup:x tags completely, it is not a good idea to rely on magically cleaning up any entities present in the system since it might hide underlying bugs in the implementation and causes data loss if a developer is pausing the test and interacting with the site. In all scenarios only the exact entities that were created should be cleaned up, no more, no less.

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

1 participant