From ecdc9eaefd73deb76ac28c5d2a3213f786088edb Mon Sep 17 00:00:00 2001 From: Naz Date: Mon, 1 Mar 2021 19:32:20 +1300 Subject: [PATCH] Added instructions about theme fixtures maintenance refs https://github.com/TryGhost/Ghost/commit/492f115850e9140046fcfe27031655fdec837822 - Added quick copy-pasteable instruction on modifying theme fixtures - Added notes about possible future improvemetns and current pitfalls when touching theme fixtures --- test/utils/fixtures/themes/README.md | 11 +++++++++++ 1 file changed, 11 insertions(+) create mode 100644 test/utils/fixtures/themes/README.md diff --git a/test/utils/fixtures/themes/README.md b/test/utils/fixtures/themes/README.md new file mode 100644 index 0000000000..06c36f614d --- /dev/null +++ b/test/utils/fixtures/themes/README.md @@ -0,0 +1,11 @@ +### Modifying theme fixtures +When a new rule is introduced in gscan one of these fixture files might break and you'll have to update a "zip" which isn't as easy as opening a text editor... It could become that one day but for now here are some commands to help out with the edit process + +- Unzip the theme files, e.g.: `cd $CURRENT_DIR && unzip valid.zip -d valid` +- Make a change in the file which caused a warning/error/whatever +- Zip the files back: `` +- Commit changed zip file: `git add valid.zip ;... you know the drill :)` + +Ideas for future improvements in theme tests: +- Decouple tests from file system as much as possible +- Track contents of what is in "zips" in source control. Right now, having a diff on a binary file is not useful at all