diff --git a/packages/flutter_goldens/test/flutter_goldens_test.dart b/packages/flutter_goldens/test/flutter_goldens_test.dart index 551e72c7409..a58f6694e16 100644 --- a/packages/flutter_goldens/test/flutter_goldens_test.dart +++ b/packages/flutter_goldens/test/flutter_goldens_test.dart @@ -2,12 +2,6 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. -// TODO(gspencergoog): Remove this tag once this test's state leaks/test -// dependencies have been fixed. -// https://github.com/flutter/flutter/issues/85160 -// Fails with "flutter test --test-randomize-ordering-seed=123" -@Tags(['no-shuffle']) - // See also dev/automated_tests/flutter_test/flutter_gold_test.dart import 'dart:async'; @@ -35,13 +29,6 @@ const List _kTestPngBytes = 120, 1, 99, 97, 0, 2, 0, 0, 25, 0, 5, 144, 240, 54, 245, 0, 0, 0, 0, 73, 69, 78, 68, 174, 66, 96, 130]; -// 1x1 colored pixel -const List _kFailPngBytes = -[137, 80, 78, 71, 13, 10, 26, 10, 0, 0, 0, 13, 73, 72, 68, 82, 0, 0, 0, - 1, 0, 0, 0, 1, 8, 6, 0, 0, 0, 31, 21, 196, 137, 0, 0, 0, 13, 73, 68, 65, 84, - 120, 1, 99, 249, 207, 240, 255, 63, 0, 7, 18, 3, 2, 164, 147, 160, 197, 0, - 0, 0, 0, 73, 69, 78, 68, 174, 66, 96, 130]; - void main() { late MemoryFileSystem fs; late FakePlatform platform; @@ -573,22 +560,6 @@ void main() { ); }); - test('compare properly awaits validation & output before failing.', () async { - final Completer completer = Completer(); - final Future result = comparator.compare( - Uint8List.fromList(_kFailPngBytes), - Uri.parse('flutter.golden_test.1.png'), - ); - bool shouldThrow = true; - result.then((_) { - if (shouldThrow) - fail('Compare completed before validation completed!'); - }); - await Future.value(); - shouldThrow = false; - completer.complete(Future.value(false)); - }); - test('returns FlutterSkippingGoldenFileComparator when network connection is unavailable', () async { final FakeDirectory fakeDirectory = FakeDirectory(); fakeDirectory.existsSyncValue = true; @@ -611,6 +582,8 @@ void main() { baseDirectory: fakeDirectory, ); expect(comparator.runtimeType, FlutterSkippingFileComparator); + // reset property or it will carry on to other tests + fakeSkiaClient.getExpectationForTestThrowable = null; }); }); });