Problem/Motivation

Varbase Internationalization Base 1.0.0-rc2 (#3618242) makes a Drupal Canvas page translatable, component copy included. Varbase Starter renders those pages and has no functional testing coverage for any of it: no scenario reads the translation setup, the translations overview of a Canvas page, or whether a translated page is served in its own language and text direction.

Steps to reproduce

  1. Build a Varbase 11.0.x-dev site and install the Varbase Starter site template.
  2. Apply the Varbase Internationalization Base recipe, add Arabic, and translate the Features Canvas page.
  3. Run the Drupal Canvas suite: FEATURES="tests/features/09-drupal-canvas/**/*.feature" ddev yarn test:chromium
  4. Nothing covers Canvas page translations. Nothing would catch a regression that drops the Translate operation, breaks the translations overview, or serves an Arabic page as lang="en" dir="ltr".

Proposed resolution

Add tests/features/09-drupal-canvas/09-07-canvas-page-translations.feature with three scenarios:

  1. Ungated: a Canvas page is set up to be translated, component copy included. Green on any site the recipe touched.
  2. @wip @multilingual: the translations overview of a Canvas page lists the site languages and their status. Driven the editor way, Pages listing then the Translate operation then the overview, with no hardcoded entity ID.
  3. @wip @multilingual: a translated Canvas page is served in its own language and direction: /features gives html[lang=en][dir=ltr], /ar/features gives html[lang=ar][dir=rtl], and both carry their hreflang alternates.

Supporting changes:

  • tests/features/09-drupal-canvas/README.md: add the 09-06 row (already missing) and the 09-07 row, total 17 to 24 across 7 files.
  • .gitlab-ci.yml: one line, the 09-drupal-canvas-c matrix glob from 09-{03,04,05}-* to 09-{03,04,05,07}-*. Without it the new file would never run.
  • .cspell.json: two words, hreflang and the Arabic page title, for the gating Cspell job.

No new step definitions and no new selectors: everything uses the existing Varbase E2E 2.0.3 vocabulary.

Why two of the three scenarios are gated

CI in this repo runs cucumber-js --tags "not @wip". The @local, @development, @staging and @production tags are documentation and gate nothing, so @wip is the only working exclusion.

Those two scenarios need a second language and a translated page, which a fresh install cannot yet produce. Varbase Internationalization Base installs the language module without its default config entities (language.entity.en, und and zxx are missing), so adding a language through the admin UI fatals with Call to a member function setWeight() on null in Drupal\language\ConfigurableLanguageManager->updateLockedLanguageWeights(), and drush-added languages leave language-prefixed URLs 404ing.

Upstream: Drupal core #3002532 (Needs work, MR !10640) and Drupal CMS work item 3497957 (open). No Varbase issue is filed for it yet.

The two scenarios are proven green against a multilingual site and become ungated once that blocker is fixed. The feature file carries a comment block saying exactly that, plus the fixture they expect and the command to run them.

Testing evidence

Run against two purpose-built Varbase 11.0.x-dev DDEV sites with the recipe applied through the Project Browser UI.

  • Whole-suite --dry-run (294 scenarios / 2038 steps): 0 undefined, 0 ambiguous.
  • CI lane --tags "not @wip" on the 5-language site: 5 scenarios / 65 steps passed, 0 failed.
  • Gated lane --tags "@multilingual" for 09-07 on the 2-language site (English + Arabic with a translated Canvas page): 2 scenarios / 29 steps passed, 0 failed.
  • cspell over tests/**/*.feature: 0 issues.

Remaining tasks

  • ✅ File an issue
  • ✅ Addition/Change/Update/Fix
  • ❌ Testing to ensure no regression
  • ✅ Automated unit/functional testing coverage
  • ➖ Developer Documentation support
  • ➖ User Guide Documentation support
  • ➖ 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

User interface changes

  • N/A

API changes

  • N/A

Data model changes

  • N/A

Release notes snippet

  • Added functional testing coverage for Drupal Canvas page translations: the translation setup, the translations overview, and a translated page served in its own language and text direction. Two of the three scenarios are gated behind @wip @multilingual until a fresh install can add a language through the admin UI.
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 committed 640759d2 on 1.0.x
    test: #3618332 Add functional testing coverage for Drupal Canvas page...
rajab natshah’s picture

Status: Active » Fixed

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.