-
Notifications
You must be signed in to change notification settings - Fork 4.2k
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
Testing: Remove beautification from block fixtures #8294
Comments
Hi, first of all, thank you for this great editor, I would like to help, can you give an example of which whitespace you mean? |
Hi @Taym95 ! Thanks for your willingness to step in. If you look at this folder, you'll see that, for each fixture, there are two HTML files, one ending in https://github.com/WordPress/gutenberg/tree/master/core-blocks/test/fixtures The idea with these fixtures tests is that we treat the For example, consider the gallery fixture: The first one includes extra tabs and newlines, since this is how prior to #7892 blocks were written to the database. Since this is no longer true, it would be more accurate for us to rewrite them without the excess whitespace. The process may very well be to copy contents of |
Hi @aduth , Thank you for clarifications, I got it I will try to submit PR for this issue. |
Looks like this is no longer relevant? The files are not there. |
The files have since been moved to: https://github.com/WordPress/gutenberg/tree/master/test/integration/full-content/fixtures
As best I can tell, the original point of the task remains (the original |
I don't think this is very important to address. In fact, the variations between the source and output could be seen as a good real-world stress-test of whitespace variations. |
Related: #7892
As of #7892, we no longer apply HTML beautification to the output of blocks. However, our block test fixtures "original" markup was not updated to reflect this. The original markup should ideally align with more-or-less exactly what is expected as the output of the block itself.
Task: For each
.html
file (not.serialized.html
) intest/integration/full-content/fixtures
, remove excess whitespace which would not have been generated in the output of block serialization. This could be done by using the.serialized.html
which is expected to be equivalent, but should be done so carefully so as not to simply assume that the.serialized.html
is "correct" (as it's the intention of these tests to ensure sensible parse / reserialize flow).The text was updated successfully, but these errors were encountered: