You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The core spacer block broke in themes on which the useSetting function returned false for the spacing.units settings. A regression test would make sure the same problem doesn't happen again in the future.
What is your proposed solution?
There are two approaches to testing this:
An E2E test that changes to a theme, inserts the block on the editor, and makes sure it doesn't error;
An unit test that stubs useSetting('spacing.units') to return false and makes sure the component renders without errors.
I tend to think the E2E is better as it reproduces what users saw and covers more ground, potentially, and doesn't require stubbing values, but I'm open to hearing your thoughts about it!
The text was updated successfully, but these errors were encountered:
What problem does this address?
Follow-up to: #37774
The core spacer block broke in themes on which the
useSetting
function returnedfalse
for thespacing.units
settings. A regression test would make sure the same problem doesn't happen again in the future.What is your proposed solution?
There are two approaches to testing this:
useSetting('spacing.units')
to returnfalse
and makes sure the component renders without errors.I tend to think the E2E is better as it reproduces what users saw and covers more ground, potentially, and doesn't require stubbing values, but I'm open to hearing your thoughts about it!
The text was updated successfully, but these errors were encountered: