Skip to content

Improved Behat tests with correct Gherkin structure and JS screenshot probing.#2447

Merged
AlexSkrypnyk merged 2 commits intomainfrom
feature/improve-behat-tests
Apr 2, 2026
Merged

Improved Behat tests with correct Gherkin structure and JS screenshot probing.#2447
AlexSkrypnyk merged 2 commits intomainfrom
feature/improve-behat-tests

Conversation

@AlexSkrypnyk
Copy link
Copy Markdown
Member

Summary

  • Fixed homepage feature tests to use proper Gherkin Given/When/Then structure — scenarios previously started with Given I go to the homepage, which conflates setup and action; they now open with Given I am an anonymous user (or similar state setup) before the When step that navigates to the page.
  • Updated the screenshot smoke test to include the @javascript tag so it runs in a real browser context (Selenium/Chrome). Screenshots require a JavaScript-capable driver; without this tag the scenario was assigned to BrowserKit, which cannot take screenshots.
  • Both sets of changes are mirrored in the installer baseline fixtures under .vortex/installer/tests/Fixtures/handler_process/_baseline/tests/behat/features/ to keep the scaffold in sync.

Test plan

  • Run ahoy test-bdd and confirm all Behat scenarios pass, including the screenshot smoke test.
  • Verify the homepage scenarios execute without Gherkin step-order warnings.
  • Confirm the installer fixture diff matches the changes in tests/behat/features/.

@github-actions
Copy link
Copy Markdown

github-actions bot commented Apr 2, 2026

Code coverage (threshold: 90%)

  Classes: 100.00% (1/1)
  Methods: 100.00% (2/2)
  Lines:   98.53% (201/204)
Per-class coverage
Drupal\ys_demo\Plugin\Block\CounterBlock
  Methods: 100.00% ( 2/ 2)   Lines: 100.00% ( 10/ 10)

@AlexSkrypnyk

This comment has been minimized.

2 similar comments
@AlexSkrypnyk

This comment has been minimized.

@AlexSkrypnyk
Copy link
Copy Markdown
Member Author

Code coverage (threshold: 90%)

  Classes: 100.00% (1/1)
  Methods: 100.00% (2/2)
  Lines:   98.53% (201/204)
Per-class coverage
Drupal\ys_demo\Plugin\Block\CounterBlock
  Methods: 100.00% ( 2/ 2)   Lines: 100.00% ( 10/ 10)

@codecov
Copy link
Copy Markdown

codecov bot commented Apr 2, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 79.42%. Comparing base (b6e739e) to head (12c0000).
⚠️ Report is 1 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #2447      +/-   ##
==========================================
- Coverage   79.88%   79.42%   -0.47%     
==========================================
  Files         128      121       -7     
  Lines        6861     6702     -159     
  Branches       47        3      -44     
==========================================
- Hits         5481     5323     -158     
+ Misses       1380     1379       -1     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@AlexSkrypnyk AlexSkrypnyk merged commit 2fb7627 into main Apr 2, 2026
29 checks passed
@AlexSkrypnyk AlexSkrypnyk deleted the feature/improve-behat-tests branch April 2, 2026 09:57
@github-project-automation github-project-automation bot moved this from BACKLOG to Release queue in Vortex Apr 2, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Release queue

Development

Successfully merging this pull request may close these issues.

1 participant