0
Fork 0
mirror of https://github.com/TryGhost/Ghost.git synced 2025-01-20 22:42:53 -05:00
ghost/test/utils/fixtures/themes
Hannah Wolfe 034f7d9a55
Renamed & cleaned up price data test theme fixture
refs: https://github.com/TryGhost/Toolbox/issues/168

- Having large theme fixtures makes tests run slower, so we're working to reduce them
- This fixture was a full copy of a very old version of Casper, but all we needed was a handful of files so that the tests can run
- This theme is also used for testing members, not just price data so I've renamed it for clarity
- The remaining files is the bare minimum we need to test these features
2022-01-24 09:55:21 +00:00
..
broken-theme
casper Moved locale testing out of casper fixture (#13850) 2021-12-06 15:11:54 +00:00
casper-1.4 Swapped to American English spellings 2021-06-09 16:39:06 +01:00
locale-theme Moved locale testing out of casper fixture (#13850) 2021-12-06 15:11:54 +00:00
members-test-theme Renamed & cleaned up price data test theme fixture 2022-01-24 09:55:21 +00:00
test-theme Updated fixture for test theme to use @site 2021-03-04 01:09:54 +05:30
test-theme-channels
casper.zip
invalid.zip
README.md Bumped gscan to 4.0.0-pre.5 2021-03-04 21:18:27 +13:00
valid.zip Updated valid.zip to the latest casper version 2021-11-24 20:22:20 +01:00
warnings.zip

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: zip -r valid.zip ./valid
  • 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