Handle generated plantuml files in functional testcases #1993
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
What is the purpose of this pull request?
Overview of changes:
Fixes #1937
Fixes #1130 (arguably, this is an "expedient" solution such that if we include more/adjust plantuml files in our test sites in the future, we will need to update the handling code accordingly to ignore them. Let me know if I should change the keyword here to leave that issue open)
Also:
Anything you'd like to highlight/discuss:
Besides deleting the plantuml images and git ignore them, I realized I will also need to delete them from theexpected
folder again, before running the functional test. This is because these files which will still be generated after annpm run updatetest
will affect testing.The plantuml images will still be generated in the
expected
folder, in case devs want to look at them.Wonder if we should do the same thing for the font files, as they appear to be problematic as well.
Testing instructions:
For docs update:
https://deploy-preview-1993--markbind-master.netlify.app/devguide/workflow#updating-and-writing-tests
For testing code:
npm run test
should succeednpm run updatetest
should no longer show plantuml files as uncommitted changes, but those files should actually be generated in theexpected
folder (because they are added to .gitignore)npm run test
should pass again, and those generated plantuml files should still appear in theexpected
folderProposed commit message: (wrap lines at 72 characters)
Handle generated plantuml files in test sites
Unrelated changes to png files (generated by plantuml) appear
when updating functional test cases.
Let's mention the need to ignore .png files (and binary files in general)
in our developer guide. Let's also update functional tests such that
some files can be ignored, to reduce the need to deal with
unrelated changes.
This helps newcomers to know how to update functional tests
properly and reduce unnecessary dev work to maintain the test cases.
Checklist: ☑️