Skip to content

Conversation

awcodes
Copy link
Contributor

@awcodes awcodes commented Oct 6, 2025

Description

Adds a RichContentFaker class to allow for easier population of rich editor content in factories and tests.

Functional changes

  • Code style has been fixed by running the composer cs command.
  • Changes have been tested to not break existing functionality.
  • Documentation is up-to-date.

@github-project-automation github-project-automation bot moved this to Todo in Roadmap Oct 6, 2025
@awcodes awcodes added the enhancement New feature or request label Oct 6, 2025
@awcodes awcodes changed the title Create Rich Content Faker class [4.x] CreateRichContent Faker class Oct 6, 2025
@awcodes awcodes requested review from Copilot and danharrin and removed request for Copilot October 6, 2025 19:46
@awcodes awcodes changed the title [4.x] CreateRichContent Faker class [4.x] Create RichContentFaker class Oct 6, 2025
@danharrin danharrin added this to the v4 milestone Oct 6, 2025
Copy link
Member

@danharrin danharrin left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we have some snapshot tests for the different options please?

@github-project-automation github-project-automation bot moved this from Todo to In Progress in Roadmap Oct 7, 2025
@awcodes
Copy link
Contributor Author

awcodes commented Oct 7, 2025

Do you want it tested against the renderer output or the content in the editor in the browser?

@danharrin
Copy link
Member

Not sure what you mean? Tested against the output of the PHP function, no need for a browser test

@awcodes
Copy link
Contributor Author

awcodes commented Oct 11, 2025

Maybe I'm just not clear on what you mean by "snapshot" test.

I'm my mind snapshot implies browser. But as long as the RichContentRender outputs the correct html or json/array I think that satisfies the test.

Am I wrong?

@danharrin
Copy link
Member

It's not a screenshot, it stores text: https://pestphp.com/docs/snapshot-testing

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request pending changes

Projects

Status: In Progress

Development

Successfully merging this pull request may close these issues.

2 participants