Use renderInIsolation in ReaderEntityChapterHeadingsSave

Created on 31 October 2024, 21 days ago

Problem/Motivation

When I'm trying to run tests, they fail during the programatid creation of the chapter because it's not happening during a request with a render context.

Steps to reproduce

Create a chapter programmatically in a functional test.

Proposed resolution

Can the module use renderInIsolation() instead of render() when rendering the chapter to check headings?

I don't think we'd need access to a render context here because we're rendering within a save hook to run checks against the rendered output - rather than displaying that rendered content anywhere. Because of that, I don't think we'd need cache context or bubbleable metadata.

Remaining tasks

Use renderInIsolation() rather than render()

📌 Task
Status

Active

Version

2.0

Component

Code

Created by

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