sharezone-app icon indicating copy to clipboard operation
sharezone-app copied to clipboard

Migrate from `golden_toolkit` to an alternative

Open nilsreichardt opened this issue 1 year ago • 2 comments

image image

The golden_toolkit package hasn't a maintainer anymore. Therefore, we should migrate to an alternative. The following packages are good candidates:

  • https://pub.dev/packages/alchemist

nilsreichardt avatar Sep 28 '24 19:09 nilsreichardt

Hi @nilsreichardt,

I'd like to work on migrating the project from golden_toolkit to alchemist. I’ll refactor the snapshot tests and ensure everything works smoothly with the new package.

Thanks!

faresbouzayen avatar Sep 28 '24 23:09 faresbouzayen

Hi @faresbouzayen,

Thanks for taking this over!

Here is a bit more information and things you need to keep in mind when doing this migration:

  • Sometimes we used the multiScreenGolden method which generates goldens for different screen sizes, see https://github.com/SharezoneApp/sharezone-app/blob/e22d4b61fd11c60d908362779a2adc81e259bf31/app/test_goldens/blackboard/details/blackboard_item_read_by_users_list_page_test.dart#L85 - we need something similar with alchemist.
  • We use platform tests and not CI tests this means that also the text is rendered in the goldens, see the following link for more information: https://pub.dev/packages/alchemist#about-platform-tests-vs-ci-tests
  • Also, our golden_toolkit config file can be helpful: https://github.com/SharezoneApp/sharezone-app/blob/da2d45ee0cd76e0f79c54b8c09d5ff22701406de/app/test_goldens/flutter_test_config.dart

nilsreichardt avatar Sep 29 '24 10:09 nilsreichardt