task: #3622806 Add functional test coverage for the podcast episode content model and run it in CI
Summary
Varbase Podcasts Base ships a package.json advertising seven test:* scripts and no feature files at all, so npm test currently runs nothing. This adds the functional suite those scripts were written for, and a CI stage that runs it.
Issue: #3622806 — Add functional test coverage for the podcast episode content model and run it in CI
What this adds
- 11
.featurefiles undertests/features/, plustests/step-definitions/podcasts.steps.jsandtests/README.md. - A fixture recipe,
tests/recipes/varbase_podcasts_base_test_content/— 15 episodes with their file, media and taxonomy YAML, an example cover image and an example audio file. .gitlab-ci.yml: ateststage carrying the🧪 Automated Functional Testingjob, alongside the existing composer, YAML and recipe validation jobs.cucumber.js: comment and example paths corrected from the news recipe this was cloned from to the podcasts one.package.jsonis unchanged and is not in this MR.
Coverage
- The podcast episode content type and its fields.
- Creating and editing an episode.
- All three audio cases: an uploaded audio file, a remote audio URL, and no audio at all.
- The podcasts listing, with its exposed filters and its pager.
- The related-episodes display.
- Role permissions.
The CI job does not touch the site template theme
The job requires only drupal/varbase_podcasts_base and drush. It has zero references to vartheme_bs5_rightup. An earlier draft installed the site-template theme, which would have reintroduced exactly the dependency inversion that !1 (merged) (#3622810) removed — worth stating plainly, because a reviewer who remembers !1 (merged) will look for it.
Rebased onto 1.0.x, and the Gherkin cleaned up
Rebased onto canonical 1.0.x at 5361743 (!3 (merged), #3622960, the podcasts RSS feed and the news wording cleared from the view). Nothing conflicted: that commit touches config/views.view.podcasts.yml only, and this branch does not. The suite asserts the Search by and Industry exposed filter labels, which !3 (merged) leaves in place, and the CI job provisions its two test page displays from the all and related block displays, which !3 (merged) does not change.
A follow-up commit removes the explanatory prose comment blocks from all 11 .feature files: 83 comment lines, and nothing else. Tag lines, Feature: descriptions, step text, scenario names and the scenario order are untouched, and the diff is deletions only apart from the README addition below. The reason is house style: the Feature: block already states the actor, the want and the reason, the steps already say what happens, and a prose block restates both in worse form and goes stale.
One fact lived only in a comment and has been relocated rather than dropped: why no scenario authors the rich-text Show notes field (its CKEditor 5 editor loads the Varbase Plugin Pack and Premium Features plugins from cdn.ckeditor.com, which a network-isolated CI runner cannot reach). It is now a short section in tests/README.md. Everything else those comments said was already documented there, including the /podcasts and /podcasts-related-test/<tag>/<episode> page displays the CI job provisions.
Test results
Pipeline #960467 is green on the rebased, comment-stripped branch: 23 scenarios (23 passed), 430 steps (430 passed) in 11m 38s, with composer, yaml and recipe all passing.
The earlier pipeline #960326 was green on this branch — composer, yaml and recipe all pass, and 🧪 Automated Functional Testing reports 23 scenarios (23 passed), 430 steps (430 passed).
Since the rebase the suite has also been run locally against a Varbase site with this recipe applied, the updated view config imported and the two test page displays provisioned the way the CI job does: 23 scenarios (23 passed), 430 steps (430 passed). That agrees with CI, so the comment removal changed nothing the suite can see. It remains a second opinion rather than the gate.
On the earlier state of this branch, the suite could not be run trustworthily on the authoring host: a control run there against unmodified, already-shipping code failed worse than any branch did, so a local result would have proved nothing either way. The remote pipeline was therefore made the gate, and the gate has reported green with the numbers above.
One honest caveat on what that green means: the suite passing proves it passes against this branch, not that a defect could not slip past tests written alongside the code they cover.
Also verified: 21 YAML files across the suite, 0 invalid.
Console messages in the passing run, explained
Eight of the 23 scenarios logged browser console errors while still passing (mode=warn). They were traced rather than waved through:
- Two 403s are the assertion itself. They belong to "An anonymous user cannot reach the Podcast episode creation form" and "A Normal user cannot reach the Podcast episode creation form". A 403 is what those scenarios exist to prove. Benign.
- Three
404 ()— no status text, i.e. cross-origin — are the deliberately non-resolving placeholder audio. The fixture recipe putshttps://example.com/podcasts/varbase-example-episode-NN.mp3on 8 of its 15 episodes, and the remote-audio feature uses one such URL, so any page rendering one of those episodes logs a failed media fetch. Intended, though it does mean those scenarios depend on howexample.comanswers. - Five
404 (Not Found)— same-origin — are NOT yet explained. They fall on "A Content editor creates a podcast episode…" (two), "An anonymous visitor can read an episode that has no audio yet", "The podcasts listing shows episode cards and a result summary", and "A Content editor publishes an episode that links to remote audio". The request URL is not recoverable from what CI kept: varbase-e2e logs the console message without the URL, and the job's watchdog health check only surfaces severityError, while a Drupal "page not found" is aWarning. A site-wide missing asset such as a favicon is ruled out, because 15 of the 23 scenarios logged nothing at all. Calling this benign would be a guess, so it is left open — see Remaining work.
Remaining work
- Identify the five same-origin 404s above, by having the suite record the failing request URL (or by widening the CI watchdog check below
Error). Filed as follow-up work rather than fixed here, to keep this MR to the one issue.
Known limitation of the related-episodes test
The related display is exercised with a tag context. Tags are a topic axis, while the design actually groups episodes by show, which the content model does not have yet (tracked as #3622954). So this test proves the display works; it does not prove tags are the right axis for a "More Episodes" rail.
AI-Generated: Yes
Checkpoints:
- File an issue
- Addition/Change/Update/Fix
- Testing to ensure no regression
- Automated unit testing coverage
- Automated functional testing coverage
- UX/UI designer responsibilities
- Readability
- Accessibility
- Performance
- Security
- Developer Documentation
- User Guide Documentation
- Reviewed by human
- Code review by maintainers
- Full testing and approval
- Credit contributors
- Review with the product owner
- Release notes snippet
- Release
