test: #3610876 Add a Varbase functional testing suite for the Varbase News Base recipe
Adds a Varbase functional testing suite to Varbase News Base, mirroring the one already shipped on Varbase Events Base — Behaviour-Driven browser tests (Playwright + Cucumber-js) that drive a running Varbase site and assert the behaviour the recipe actually provides.
What this adds
tests/features/(flat,NN-NN-ordered): News post content type fields, authoring (create / edit / featured image from the media library), the news listing (cards + result summary), the exposed filters (Search by keyword + Type + Industry), the pager (12 per page), and the news permissions (who can reach the add form + the editor create→edit→delete flow).tests/step-definitions/layered on webship-js core: per-role login +wait, and news save / edit / delete, the media-library featured image, the Type filter and the result-summary assertion.tests/recipes/varbase_news_base_test_content/— atype: Contentseed recipe (15 published example posts: 8 Announcements + 7 Press Releases, sharing one tag, plus a sample image media) so the read-only listing / filter / pager scenarios have deterministic data. Applied withdrush recipe, not a PHP fixture.- Root
cucumber.js,package.json,playwright.config.ts, and a self-contained.gitlab-ci.ymlfunctional-testing job (Varbase Starter + Varbase News Base, install fromvarbase_project's committed lock,--ignore-platform-req=ext-pgsql, the Drupal core #2741429 safety-net patch).
Scenarios adapted to the real News bundle
Authored against the actual news fields — Title, Featured image, Description, rich-text Content, Categories (field_news_categories, exposed as Type) and Tags (field_tags, exposed as Industry) — not the Events fields (no smart-date "When", no Location). The listing uses the recipe's BEF exposed filters (keyword search, type, industry) and its 12-per-page pager.
The /news listing page (added to the recipe)
Varbase News Base previously shipped its listing only as Views block displays (All / Latest / Related news posts), and the CI harness faked a /news page by cloning the all block. That clone kept exposed_block: true, so the exposed filters rendered as an unplaced block — the page showed no inline filters and the listing / filter / pager scenarios failed in CI.
Following the maintainer's direction, the recipe now ships a real /news page: a Views page display (page_1, path: news) in config/views.view.news.yml, based on the All news posts block, with exposed_block: false so the Search by keyword / Type / Industry filters render inline on the page, alongside the components cards grid, the result summary and the full 12-per-page pager. The listing is now available out of the box and functionally testable — no site template or test-harness page provisioning needed. The CI job's fake-/news clone step has been removed accordingly.
Local verification
The full suite passes green locally against a fresh Varbase 11 build (Varbase Starter + Varbase News Base, installed from varbase_project's committed lock with the core #2741429 patch), driving the recipe's own /news page (cucumber-js --tags "not @wip"): 15 scenarios (15 passed), 118 steps (118 passed). The four scenarios that were red in CI (listing filters, keyword filter, keyword + Type filter, pager) now pass against the recipe's inline /news filters. The seed recipe applies cleanly and produces 15 published posts at /news.
AI-Generated: Yes
Checkpoints
- File an issue about this project
- Addition/Change/Update/Fix to this project
- Testing to ensure no regression
- Automated unit/functional testing coverage
- Developer Documentation support on feature change/addition
- User Guide Documentation support on feature change/addition
- UX/UI designer responsibilities
- Accessibility and Readability
- Reviewed by a human
- Code review by maintainers
- Full testing and approval
- Credit contributors
- Review with the product owner
- Update Release Notes
- Release