testing library
Golden-test harness shared by every country package.
Import from a package's test/ only: it pulls in flutter_test.
Constants
- plateGoldenFont → const String
-
The bold face every golden is drawn with, so the ink can be measured
against the references (
platekit golden-check).
Functions
-
plateGoldens(
String prefix, PlateCountry? country, Map< String, PlateGoldenCase> cases, {List<String> fonts = const <String>[], String separator = ' ', Duration? decodeDelay}) → void -
Registers one golden test per entry of
cases, written togoldens/<prefix>_<key>.pngand drawn on a 680×300 stage undercountry's panel (each spec's own country when null). -
pumpPlateGolden(
WidgetTester tester, PlateController controller, String golden, {PlateTheme? theme, bool scoped = true, PlateCountry? country, Size stage = const Size(680, 300), Duration? decodeDelay}) → Future< void> -
Draws
controller's plate centred on astage-sized box, compares it with the golden filegolden, then unmounts and disposescontroller.
Typedefs
- PlateGoldenCase = (PlateSpec, PlateTheme, String)
-
One golden: the spec, its theme, and a sample value with one
plateGoldens
separator-separated token per slot ('AB 1234', never'A B 1 2 3 4'). An empty value leaves every slot blank.