Problem/Motivation

The recipe ships the whole Varbase E2E harness but none of the tests it is meant to run. The repository carries package.json with seven test scripts, cucumber.js and playwright.config.ts, and there is not a single feature file and no test content recipe, so npm test runs nothing and reports success. Varbase News Base, which this recipe is modelled on, carries 9 feature files plus a test content recipe.

The pipeline has the matching gap, and says so itself. The header of .gitlab-ci.yml states:

It deliberately does NOT build a Varbase site and run the functional suite yet. That job belongs here once the recipe has a released dependency set to resolve against; until then it would fail for reasons that have nothing to do with this recipe. Add it in a follow-up, modelled on the Varbase News Base pipeline.

This issue is that follow-up. The 1.0.x-dev release now exists, so the dependency set the header was waiting on is available.

Tests that never run and a CI stage with nothing to run are one deliverable, so they are one issue rather than two half-useful ones.

Steps to reproduce

  1. Clone the 1.0.x branch of Varbase Podcasts Base.
  2. Run npm install and then npm test. Cucumber finds no feature files and the run passes without asserting anything.
  3. Look at .gitlab-ci.yml. It has a single validate stage: composer validate, a YAML parse of every config file, and a recipe manifest key check. Nothing installs the recipe or exercises it in a browser.
  4. Compare with Varbase News Base, which has tests/features/ and tests/recipes/varbase_news_base_test_content/.

Proposed resolution

Add the feature files, a test content recipe and the CI stage that runs them, modelled on Varbase News Base but written for the podcast episode model rather than transliterated from news. The episode carries four fields news does not have: field_audio, field_audio_url, field_duration and field_episode_number.

Coverage to include at minimum:

  • The Podcast content type exists with its fields.
  • Creating an episode, and editing one.
  • An episode with an audio file, an episode with an audio URL, and an episode with neither. The empty case matters because both audio fields are optional by design, so an episode can be drafted before its audio exists. See the related rendering issue #3622800 on Vartheme BS5 RightUp.
  • The podcasts view returns episodes, and the related display returns episodes when given a tag context.
  • Role permissions for anonymous, authenticated, content editor and content admin.

Also fold in a one line documentation fix in the same review: the README badges point at a 1.0.0 pipeline and release that do not exist, and should point at 1.0.x. A separate issue for one line of badge markup would be overhead.

The pipeline will be proven green locally with gitlab-ci-local before anything is pushed. This project's .gitlab-ci.yml is self-contained and does not include drupal/gitlab_templates, so it is expected to run locally.

Pipeline #960326 on the merge request, green across both stages — the three validate jobs and the Automated Functional Testing job that runs this suite:

GitLab pipeline 960326 marked Passed, with the validate stage jobs composer, recipe and yaml all green and the test stage job Automated Functional Testing green.

Remaining tasks

  • Write the feature files for the coverage listed above.
  • Add the test content recipe that gives those features episodes to act on.
  • Add the functional stage to .gitlab-ci.yml and get it green.
  • Point the README badges at 1.0.x.
  • Open the merge request from the issue fork for review.

User interface changes

  • N/A

API changes

  • N/A

Data model changes

  • N/A. The test content recipe adds content only when it is applied, and is not part of the shipped recipe.

Release notes snippet

  • Added functional test coverage for the Podcast content type, its audio file, audio URL, duration and episode number fields, the podcasts view and its related display, and role permissions, with a CI stage that runs the suite.

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 a human
  • ❌ Code review by maintainers
  • ❌ Full testing and approval
  • ❌ Credit contributors
  • ❌ Review with the product owner
  • ❌ Release notes snippet
  • ❌ Release

AI-Generated: Yes

Command icon Show commands

Start within a Git clone of the project using the version control instructions.

Or, if you do not have SSH keys set up on git.drupalcode.org:

Comments

rajab natshah created an issue. See original summary.

rajab natshah’s picture

Issue summary: View changes
StatusFileSize
new177.39 KB

  • rajab natshah committed 96242004 on 1.0.x
    task: #3622806 Add functional test coverage for the podcast episode...
rajab natshah’s picture

Status: Active » Fixed

Fixed by MR !2 (9624200) and released in 1.0.0-alpha1: https://www.drupal.org/project/varbase_podcasts_base/releases/1.0.0-alpha1

The release carries 11 feature files, the varbase_podcasts_base_test_content recipe, a test stage in .gitlab-ci.yml that runs the suite, and README badges pointing at 1.0.x. The audio cases were rewritten against the media reference field in #3624729.

Now that this issue is closed, review the contribution record.

As a contributor, attribute any organization that helped you, or if you volunteered your own time.

Maintainers, credit people who helped resolve this issue.

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.