Skip to content

Commit

Permalink
Chore: Use named constants
Browse files Browse the repository at this point in the history
  • Loading branch information
adil192 committed Dec 25, 2024
1 parent 948e90a commit 92c3222
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 18 deletions.
4 changes: 2 additions & 2 deletions pubspec.lock
Original file line number Diff line number Diff line change
Expand Up @@ -313,10 +313,10 @@ packages:
dependency: "direct dev"
description:
name: golden_screenshot
sha256: "03b34656154b7e08125de8671962f4862b08ea1f57522d32a16fce4b71a1f394"
sha256: "7e939af2e309265937dbce348b573d01fdd5085bb72b721cb8be32736fa26b82"
url: "https://pub.dev"
source: hosted
version: "3.0.0"
version: "3.0.1"
golden_toolkit:
dependency: transitive
description:
Expand Down
2 changes: 1 addition & 1 deletion pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ dev_dependencies:
flutter_test:
sdk: flutter

golden_screenshot: ^3.0.0
golden_screenshot: ^3.0.1

icons_launcher: ^3.0.0

Expand Down
21 changes: 6 additions & 15 deletions test/game_golden_test.dart
Original file line number Diff line number Diff line change
Expand Up @@ -96,45 +96,36 @@ void main() {
ShopItems.bulletColors[7].purchase(noCost: true);
ShopItems.bulletColors[9].purchase(noCost: true);

const darkFrameIcons = ScreenshotFrameColors(
topBarIconBrightness: Brightness.dark,
gestureHintBrightness: Brightness.dark,
);
const lightFrameIcons = ScreenshotFrameColors(
topBarIconBrightness: Brightness.light,
gestureHintBrightness: Brightness.light,
);

_testGame(
frameColors: darkFrameIcons,
frameColors: ScreenshotFrameColors.dark,
goldenFileName: '1_home',
child: const HomePage(),
);
_testGame(
gameSave: inProgressGameSave,
frameColors: lightFrameIcons,
frameColors: ScreenshotFrameColors.light,
goldenFileName: '2_play',
child: const PlayPage(),
);
// _testGame(
// gameSave: gameOverGameSave,
// frameColors: darkFrameIcons,
// frameColors: ScreenshotFrameColors.dark,
// goldenFileName: '3_game_over',
// child: const PlayPage(),
// );
_testGame(
goldenFileName: '4_shop',
frameColors: darkFrameIcons,
frameColors: ScreenshotFrameColors.dark,
child: const ShopPage(),
);
_testGame(
goldenFileName: '5_tutorial',
frameColors: darkFrameIcons,
frameColors: ScreenshotFrameColors.dark,
child: const TutorialPage(),
);
_testGame(
goldenFileName: '6_settings',
frameColors: darkFrameIcons,
frameColors: ScreenshotFrameColors.dark,
child: const SettingsPage(),
);
});
Expand Down

0 comments on commit 92c3222

Please sign in to comment.