fix(Page builder): #3591782 Content template editor preview shows a stale snapshot instead of live edits

Closes #3591782

What this MR does

Clears the preview snapshotHTML on the content template editor's own render paths (getTemplateLayout, updateComponent onQueryStarted), so selectPreviewHtml returns the live editor html instead of a leftover preview snapshot. Extends the getPageLayout clear from #3591684 (closed) to the content-template paths it missed.

Includes a Playwright regression test that seeds a full-page preview, returns to the editor, links a component prop to the entity Title, and asserts the preview reflects the resolved value (it fails without the fix).

Testing steps

  1. Create a content type (e.g. Article) with a node; add a "Full content" content template containing a component with a text prop.
  2. Open the template editor → PreviewExit Preview.
  3. Edit the component (e.g. link its heading to Title). The preview reflects the edit.

AI usage

Diagnosis, regression test, and fix were produced with AI assistance (Claude), reviewed by the author, per Drupal's policy on AI-assisted contributions.

Merge request reports

Loading