You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: packages/golden_toolkit/CHANGELOG.md
+20-12Lines changed: 20 additions & 12 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,19 +1,27 @@
1
1
# Changelog
2
2
3
+
## 0.7.0
4
+
5
+
Thanks to @moonytoes29 for the following enhancements:
6
+
7
+
A new helper widget `DeviceBuilder` has been added. This works conceptually similar to `GoldenBuilder` but is used for displaying multiple device renderings of a widget in a single golden. This is an alternative to the existing `multiScreenGolden()` API which captures separate golden images for each device variation under test.
8
+
9
+
To assist with usage of `DeviceBuilder`, there is a new helper API: `tester.pumpDeviceBuilder(builder)` which assists in easily pumping a DeviceBuilder widget in your tests. Check out the documentation for more details.
10
+
3
11
## 0.6.0
4
12
5
-
Added the ability to configure the default set of devices to use for ```multiScreenGolden``` assertions globally.
13
+
Added the ability to configure the default set of devices to use for `multiScreenGolden` assertions globally.
### Added the ability to customize the generated filenames
50
58
51
-
When using ```screenMatchesGolden``` or ```multiGoldenFile```, you can now supply your own functions for controlling the naming of the files. This can be done using the configuration API mentioned above.
59
+
When using `screenMatchesGolden` or `multiGoldenFile`, you can now supply your own functions for controlling the naming of the files. This can be done using the configuration API mentioned above.
*```fileNameFactory``` is used for screenMatchesGolden
60
-
*```deviceFileNameFactory``` is used for multiScreenGolden
67
+
-`fileNameFactory` is used for screenMatchesGolden
68
+
-`deviceFileNameFactory` is used for multiScreenGolden
61
69
62
70
Future releases will likely consolidate these APIs.
63
71
64
72
Thanks to @christian-muertz for this enhancement.
65
73
66
74
### Added additional utility functions for preparing for goldens
67
75
68
-
Extracted out some public extension methods that were previously private implementation details of ```multiScreenGolden``` & ```screenMatchesGolden```
76
+
Extracted out some public extension methods that were previously private implementation details of `multiScreenGolden` & `screenMatchesGolden`
69
77
70
-
Added the following extensions. These can be used with any vanilla golden assertions and do not require ```multiScreenGolden```, ```screenMatchesGolden```, or ```GoldenBuilder```.
78
+
Added the following extensions. These can be used with any vanilla golden assertions and do not require `multiScreenGolden`, `screenMatchesGolden`, or `GoldenBuilder`.
71
79
72
80
```dart
73
81
// configures the simulated device to mirror the supplied device configuration (dimensions, pixel density, safe area, etc)
@@ -95,7 +103,7 @@ A few API / parameters were marked as deprecated and will be removed in future r
95
103
96
104
### Configuration API
97
105
98
-
Added a configuration API so that you can control the behavior of skipping golden assertions in a single location, rather than at each call to ```screenMatchesGolden``` or ```multiScreenGolden```.
106
+
Added a configuration API so that you can control the behavior of skipping golden assertions in a single location, rather than at each call to `screenMatchesGolden` or `multiScreenGolden`.
A new optional parameter ```autoHeight``` has been added to ```screenMatchesGolden``` and ```multiScreenGolden```. If set to true, the height of the golden will adapt to fit the widget under test. Thanks to @christian-muertz!
120
+
A new optional parameter `autoHeight` has been added to `screenMatchesGolden` and `multiScreenGolden`. If set to true, the height of the golden will adapt to fit the widget under test. Thanks to @christian-muertz!
The multiScreenGolden assertion is used to capture multiple goldens of a single widget using different simulated device sizes & characteristics.
@@ -227,10 +222,7 @@ If you use VSCode, we highly recommend adding this configuration to your `.vscod
227
222
"request": "launch",
228
223
"type": "dart",
229
224
"codeLens": {
230
-
"for": [
231
-
"run-test",
232
-
"run-test-file"
233
-
]
225
+
"for": ["run-test", "run-test-file"]
234
226
},
235
227
"args": ["--update-goldens"]
236
228
}
@@ -358,7 +350,7 @@ See more usage examples here: [golden_builder_test.dart](test/golden_builder_tes
358
350
359
351
There are global settings that can be configured by calling the following API:
360
352
361
-
```GoldenToolkit.runWithConfiguration()```
353
+
`GoldenToolkit.runWithConfiguration()`
362
354
363
355
Currently, the primary option is to allow consumers to holistically skip golden assertions. For example, perhaps you only want to perform golden assertions on certain platforms.
0 commit comments