-
-
Notifications
You must be signed in to change notification settings - Fork 4k
[4.x] Create RichContentFaker class #18100
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: 4.x
Are you sure you want to change the base?
Conversation
danharrin
left a comment
There was a problem hiding this 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?
|
Do you want it tested against the renderer output or the content in the editor in the browser? |
|
Not sure what you mean? Tested against the output of the PHP function, no need for a browser test |
|
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? |
|
It's not a screenshot, it stores text: https://pestphp.com/docs/snapshot-testing |
|
I'm not sure snapshot testing is going to work with this since each time the faker is called it would be different text, like in paragraphs which are using the $faker->paragraphs(). Wouldn't that cause the snapshot to fail every time? |
|
Yeah thats true, I think we still need some sort of test |
Description
Adds a
RichContentFakerclass to allow for easier population of rich editor content in factories and tests.Functional changes
composer cscommand.