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

ISAICP-5450: Make Cookie Consent step definitions reusable #101

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

pfrenssen
Copy link
Member

ISAICP-5450

Description

In the Joinup project we are planning to replace our custom cookie consent solution with oe_webtools_cookie_consent (ref. Jira ticket ISAICP-5450).

We would like to be able to use the step definitions defined in WebtoolsCookieConsentContext but these currently contain code that is specific to the oe_webtools project and is related to the creating of certain media entities in the setup of the test scenarios and enabling/disabling modules needed for the scenarios.

In projects using Behat, any code that is specific to the local test suite and is not intended to be reusable should be put in the features/bootstrap/ folder. All Context classes in this folder are discovered and added to the autoloader when the Behat application is bootstrapped. This means they are not exposed to the global autoloader, so they cannot be instantiated by any PHP code except for Behat in scope of the current test suite.

By moving the oe_webtools-specific code in this folder we can ensure that other projects can reuse the code in WebtoolsCookieConsentContext without risking to accidentally trigger the non-reusable code.

Change log

  • Changed: Move non-reusable Behat code into the private FeatureContext.

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

Successfully merging this pull request may close these issues.

1 participant