Files
Bubberstation/code/modules/unit_tests/screenshots
Mothblocks ed06502fb6 Fix flaky wizard screenshot test failure, and try to make screenshot tests run more consistently (#80631)
From https://github.com/tgstation/tgstation/pull/80542

Not exactly sure why this only fails once. My hint is that it happens
when the alternate tests are skipped from this:


![image](https://github.com/tgstation/tgstation/assets/35135081/67c261c0-e771-4696-add2-f41bb800ad65)

...though this should still be *consistent* at least.
2023-12-30 00:44:29 +01:00
..

This folder contains the results for screenshot tests. Screenshot tests make sure an icon looks the same as it did before a change to prevent regressions.

You can create one by simply using the test_screenshot proc.

This example test screenshots a red image and keeps it.

/// This is an example for screenshot tests, and a meta-test to make sure they work in the success case.
/// It creates a picture that is red on the left side, green on the other.
/datum/unit_test/screenshot_basic

/datum/unit_test/screenshot_basic/Run()
	var/icon/red = icon('icons/blanks/32x32.dmi', "nothing")
	red.Blend(COLOR_RED, ICON_OVERLAY)
	test_screenshot("red", red)

Unfortunately, screenshot tests are sanest to test through a pull request directly, due to limitations with both DM and GitHub.