Add tests for gutenberg_render_layout_support_flag#47719
Add tests for gutenberg_render_layout_support_flag#47719tellthemachines merged 1 commit intotrunkfrom
Conversation
|
Flaky tests detected in 75aa876. 🔍 Workflow run URL: https://github.com/WordPress/gutenberg/actions/runs/4081235988
|
andrewserong
left a comment
There was a problem hiding this comment.
Thanks for adding in these tests @tellthemachines, great idea testing to make sure the main container class is output correctly! 🎉
The tests are running well for me locally, I noticed that the Github action PHP tests are failing, but it's tag processor tests that are failing, so I assume this is a potential conflict between Gutenberg trunk and wordpress-develop rather than anything in this PR. Once that's resolved (separately to this PR), and this is rebased, it looks like this will be in good shape to land to me ✨
There was a problem hiding this comment.
Nice idea making sure the inner wrapper logic works 👍
There was a problem hiding this comment.
This looks good to me, but I was wondering if there's a code style preference between placing the params in a nested args array or moving them one level up to be at the root of the array (and therefore become their own params on test_layout_support_flag_renders_classnames_on_wrapper)? So far I haven't been nesting them further in data providers, but it does look like a good way to keep the params contained 👍
In short: this was just a comment, not anything that needs changing IMO 🙂
There was a problem hiding this comment.
I copied this from the get_layout_style tests as it felt like a nice way to structure it! Not sure how widespread one or the other approach is.
There was a problem hiding this comment.
Ah yes, of course! Let's leave it as is, looks nice to me, too, I'll probably borrow it next time I'm writing a data provider 🙂
Just to close the loop, the failing PHP tests should be resolved by: #47720 |
bf4d643 to
75aa876
Compare
What?
Adding some unit tests for
gutenberg_render_layout_support_flagbecause it didn't have any.Testing Instructions
Check out the branch and run
npm run test:unit:php.Testing Instructions for Keyboard
Screenshots or screencast