Skip to content
Prev Previous commit
Next Next commit
Attempt to match different images in stable/master.
  • Loading branch information
ditman committed Jun 4, 2024
commit 99223d9d2ac88b7b11a6888b9771ec5fa7f429da
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.
12 changes: 8 additions & 4 deletions packages/flutter_markdown/test/image_test.dart
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,8 @@ import 'package:flutter_test/flutter_test.dart';
import 'image_test_mocks.dart';
import 'utils.dart';

bool isRunningInStable = io.Platform.environment['CHANNEL'] == 'stable';

void main() => defineTests();

void defineTests() {
Expand Down Expand Up @@ -167,8 +169,9 @@ void defineTests() {

await expectLater(
find.byType(Container),
matchesGoldenFile(
'assets/images/golden/image_test/resource_asset_logo.png'));
matchesGoldenFile(isRunningInStable
? 'assets/images/golden/image_test/resource_asset_logo_old.png'
: 'assets/images/golden/image_test/resource_asset_logo.png'));
},
skip: kIsWeb, // Goldens are platform-specific.
);
Expand Down Expand Up @@ -413,8 +416,9 @@ void defineTests() {

await expectLater(
find.byType(Container),
matchesGoldenFile(
'assets/images/golden/image_test/custom_builder_asset_logo.png'));
matchesGoldenFile(isRunningInStable
? 'assets/images/golden/image_test/custom_builder_asset_logo_old.png'
: 'assets/images/golden/image_test/custom_builder_asset_logo.png'));
},
skip: kIsWeb, // Goldens are platform-specific.
);
Expand Down