Handle generated plantuml files in functional testcases#1993
Merged
Conversation
jonahtanjz
reviewed
Aug 9, 2022
jonahtanjz
left a comment
Contributor
There was a problem hiding this comment.
Wonder if we should do the same thing for the font files, as they appear to be problematic as well.
Some of the fonts need to be updated together with the dependency (Bumping font-awesome etc). Not sure about the rest but the fonts on my end don't really change during updatetest (Happened only a few times as far as I can remember). If this is a rare issue, we can do the manual reminder method as it seems more complicated to maintain a long list of ignored fonts.
jonahtanjz
approved these changes
Aug 10, 2022
jonahtanjz
left a comment
Contributor
There was a problem hiding this comment.
Nice job @tlylt!
LGTM 👍
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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 theexpectedfolder again, before running the functional test. This is because these files which will still be generated after annpm run updatetestwill affect testing.The plantuml images will still be generated in the
expectedfolder, 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 testshould succeednpm run updatetestshould no longer show plantuml files as uncommitted changes, but those files should actually be generated in theexpectedfolder (because they are added to .gitignore)npm run testshould pass again, and those generated plantuml files should still appear in theexpectedfolderProposed 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: ☑️