Remove dynamic prop sources from test data

Created on 14 January 2025, 6 days ago

Overview

In πŸ“Œ Tighten validation: only allow StaticPropSource in XB fields + PageTemplate, DynamicPropSource in ContentTypeTemplate Active we added validation to prevent dynamic prop sources in page template and XB fields.
However, we did not remove dynamic prop sources from tests data in two places:

  • ui/tests/fixtures/layout-default.json
  • \Drupal\Tests\experience_builder\TestSite\XBTestSetup::setup

This doesn't cause validation issues/failures in HEAD because all of these places assume that prop sources are static:

  • ui/src/components/DummyPropsEditForm.tsx
  • \Drupal\experience_builder\Controller\ApiPreviewController::clientLayoutAndModelToXbField
  • \Drupal\experience_builder\Plugin\ExperienceBuilder\ComponentSource\SingleDirectoryComponent::createPropsForComponent

But becomes an issue in πŸ“Œ Maintain a per-component set of prop expressions/sources Active when we start respecting the per component prop sources.

Proposed resolution

Remove dynamic prop sources from XbTestSetup and layout-default.json.
Adjust any tests as required.

User interface changes

πŸ“Œ Task
Status

Active

Version

0.0

Component

Page builder

Created by

πŸ‡¦πŸ‡ΊAustralia larowlan πŸ‡¦πŸ‡ΊπŸ.au GMT+10

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Merge Requests

Comments & Activities

Production build 0.71.5 2024