forked from Betterment/alchemist
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat:
GoldenTestTheme
(Betterment#124)
* wip: introduce GoldenTestTheme * chore: regenerate goldens and add some tests * chore: Updating Goldens * Re-run CI after updating goldens
- Loading branch information
1 parent
7b386af
commit 83740a6
Showing
22 changed files
with
212 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
import 'package:alchemist/src/golden_test_group.dart'; | ||
import 'package:flutter/material.dart'; | ||
|
||
/// {@template golden_test_theme} | ||
/// A theme that dictates the behavior and appearance of elements created | ||
/// by Alchemist during golden testing. This theme is used to ensure that | ||
/// parts of golden tests controlled by Alchemist are consistent across | ||
/// Flutter SDK versions. | ||
/// {@endtemplate} | ||
class GoldenTestTheme { | ||
/// {@macro golden_test_theme} | ||
GoldenTestTheme({ | ||
required this.backgroundColor, | ||
required this.borderColor, | ||
}); | ||
|
||
/// The standard theme for golden tests, used when no other theme is provided. | ||
factory GoldenTestTheme.standard() { | ||
return GoldenTestTheme( | ||
// These colors are not tied to any implementation so they won't | ||
// change out from under us, which would cause golden tests to fail. | ||
backgroundColor: const Color(0xFF2b54a1), | ||
borderColor: const Color(0xFF3d394a), | ||
); | ||
} | ||
|
||
/// The background color of the golden test. | ||
final Color backgroundColor; | ||
|
||
/// The border color used to separate scenarios in a [GoldenTestGroup]. | ||
final Color borderColor; | ||
} |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified
BIN
+37 Bytes
(110%)
test/smoke_tests/goldens/ci/composited_transform_smoke_test.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified
BIN
-35 Bytes
(97%)
test/smoke_tests/goldens/ci/interactions_smoke_test_long_pressed.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified
BIN
-44 Bytes
(98%)
test/smoke_tests/goldens/ci/interactions_smoke_test_pressed.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified
BIN
-35 Bytes
(97%)
test/smoke_tests/goldens/ci/interactions_smoke_test_regular.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified
BIN
+1 Byte
(100%)
test/smoke_tests/goldens/ci/render_object_text_smoke_test.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.