Skip to content

4.0.0-rc2

Choose a tag to compare

@github-actions github-actions released this 20 Oct 10:57
· 12 commits to main since this release
2897362

What's new since 4.0.0-rc1

Highlights

  • [#1081] Split Configuration into a guide and a reference, and rewrote the option and tag prose against the code. @AlexSkrypnyk (#1085)
    The configuration guide now explains where each setting goes, and the extension option, tag and environment variable tables moved to a new Configuration reference page. Every option and tag description was checked against the code that reads it, and the ones that misled now say what actually happens, such as @testmode, which doesn't enable the Testmode module but fails when it isn't already enabled. Installation now points a headed Chrome's api_url through a headed profile, since BEHAT_PARAMS can't override a value behat.php sets, and explains why behat/mink-selenium2-driver can't open a session on Selenium 4.

  • Added a 'create-behat-step' skill that ships in the package and writes a project's own step on the public helpers. @AlexSkrypnyk (#1084)
    The package now ships skills/create-behat-step/SKILL.md, an agent skill that turns a plain-English description of a step into a method in a trait of your own, built only on the public helpers HELPERS.md lists, then adds the trait to FeatureContext, writes a scenario and runs it. It checks the registered steps first and asks before duplicating a shipped one, and it keeps the agent off protected methods, which can change in a minor release, and off \Drupal:: calls, which don't work through the Drush backend. STEPS.md and HELPERS.md now link it, so an agent already reading them finds it, and the AI assistants guide shows how to install it as a native skill for Claude Code, Codex, Cursor, Copilot or Gemini CLI.

  • [#1080] Steered projects to a 'FeatureContext' that extends 'DrupalContext' or 'WebContext', and named it in the duplicate-context error. @AlexSkrypnyk (#1082)
    The "Contexts to register" section of MIGRATION.md now opens with the shape 4.0 expects: your own FeatureContext that extends DrupalContext on a Drupal site or WebContext on any other, registered beside Mink's MinkContext, with its config argument on that registration, since Behat passes a context only the arguments registered for its own class. The rc1 guide said DrupalContext alone gives a Drupal suite every step, so a 3.14 suite that kept its FeatureContext ended up registering both, and the duplicate-context error then said to keep DrupalContext, which would drop every custom step. The error rejects the same suites as before, but it now names the class to keep, the registered class that extends all the others, or tells you to move the steps into 1 context when none does.

  • Reworked the docs for newcomers to Behat, gave Architecture a page per layer and made 'HELPERS.md' the only helper reference. @AlexSkrypnyk (#1077)
    The Quick start now takes someone who has never used Behat from composer require to a passing scenario in 7 numbered parts with complete files: pick WebContext or DrupalContext, extend it in tests/behat/bootstrap/FeatureContext.php, register FeatureContext in behat.php, then run a scenario and add a step of your own. New Key concepts, Contexts and Browsers pages explain contexts, helpers and backends, and what BrowserKit, Selenium2 and Chrome can each do, while Architecture gets a page per layer with every diagram drawn for both light and dark mode. The Web helpers and Drupal helpers sections left the site, so HELPERS.md, which ships in the package, is the only helper reference, and each step page links its trait's section there.

  • [#1073] Corrected the docs that said the Watchdog check needs an in-process backend. @AlexSkrypnyk (#1074)
    MIGRATION.md, the Quick start and the Usage guide said the Watchdog check needs the in-process drupal backend and fails under 'backends' => ['drush', 'blackbox'], but the Drush backend reads the log too, through watchdog:show. They now say the check needs drupal or drush, and give 'backends' => ['blackbox'] as the profile that fails at the start of every scenario. If you switched the check off on a Drush-only setup because of the old wording, you can turn it back on, as long as the site has dblog enabled.

Other changes

  • [#1081] Named the submit input fallback in 'field.add_more_button_selectors' and reworded 'time.enabled'. @AlexSkrypnyk (#1087)
    The field.add_more_button_selectors description now says that, when no configured selector matches, the fallback finds a submit input whose name contains _add_more or whose value contains Add another, as well as a button, so the option table shows that a widget rendering <input type="submit"> is covered. The time.enabled description was reworded too, and both edits are description strings, so no behavior, default or step text changed.

  • Update dependency drupal/profile to ^1.16.0 @renovate[bot] (#1086)

  • Added a zooming lightbox for images and diagrams to the docs site and linked the development docs in the README. @AlexSkrypnyk (#1083)
    Selecting a diagram or image on the docs site now opens it in a lightbox over the page, fitted to the window, where selecting it again zooms in and a drag or the arrow keys pan it, so the wide architecture diagrams are readable without leaving the page. Ctrl-click or Cmd-click still opens the SVG in a new tab, and the root README.md now links the development docs built from main at https://behat-steps-docs.netlify.app/.

  • [#1075] Replaced the PlantUML architecture diagrams with logical architecture, class inheritance and data flow diagrams in draw.io. @AlexSkrypnyk (#1076)
    The architecture docs swap 10 hard-to-read PlantUML diagrams for 3 draw.io views, logical architecture, class inheritance and data flow, and move the interface-to-implementation pairs and the Behat, Mink and Symfony extension points into 2 tables on the page. Each draw.io source is committed beside its SVG, and the unit suite fails an SVG exported from an older source, so the 2 can't drift apart.

Full Changelog: 4.0.0-rc1...4.0.0-rc2