diff --git a/packages/flutter_goldens/lib/flutter_goldens.dart b/packages/flutter_goldens/lib/flutter_goldens.dart index 2ae622d37f..decc5d6593 100644 --- a/packages/flutter_goldens/lib/flutter_goldens.dart +++ b/packages/flutter_goldens/lib/flutter_goldens.dart @@ -91,7 +91,7 @@ class FlutterGoldenFileComparator implements GoldenFileComparator { } final bool authorized = await _skiaClient.auth(fs.directory(basedir)); if (!authorized) { - //TODO(katelovett): Clean up for final implementation on CI + // TODO(Piinks): Clean up for final implementation on CI, https://github.com/flutter/flutter/pull/31630 return true; //throw test_package.TestFailure('Could not authorize golctl.'); } diff --git a/packages/flutter_goldens/test/flutter_goldens_test.dart b/packages/flutter_goldens/test/flutter_goldens_test.dart index 681a42a448..a1a4696894 100644 --- a/packages/flutter_goldens/test/flutter_goldens_test.dart +++ b/packages/flutter_goldens/test/flutter_goldens_test.dart @@ -13,35 +13,36 @@ import 'package:platform/platform.dart'; import 'package:process/process.dart'; const String _kFlutterRoot = '/flutter'; -const String _kGoldenRoot = '$_kFlutterRoot/bin/cache/pkg/goldens'; +//const String _kGoldenRoot = '$_kFlutterRoot/bin/cache/pkg/goldens'; //const String _kVersionFile = '$_kFlutterRoot/bin/internal/goldens.version'; //const String _kGoldensVersion = '123456abcdef'; -//TODO(katelovett): Finish testing +// TODO(Piinks): Finish testing, https://github.com/flutter/flutter/pull/31630 void main() { MemoryFileSystem fs; FakePlatform platform; MockProcessManager process; - Directory flutter; - Directory golden; + //Directory flutter; + //Directory golden; setUp(() async { fs = MemoryFileSystem(); platform = FakePlatform(environment: { 'FLUTTER_ROOT': _kFlutterRoot, - //TODO(katelovett): Add other env vars for testing + // TODO(Piinks): Add other env vars for testing, https://github.com/flutter/flutter/pull/31630 }); process = MockProcessManager(); - flutter = await fs.directory(_kFlutterRoot).create(recursive: true); - golden = await fs.directory(_kGoldenRoot).create(recursive: true); + //flutter = await fs.directory(_kFlutterRoot).create(recursive: true); + //golden = await fs.directory(_kGoldenRoot).create(recursive: true); //fs.file(_kVersionFile).createSync(recursive: true); //fs.file(_kVersionFile).writeAsStringSync(_kGoldensVersion); }); group('SkiaGoldClient', () { - SkiaGoldClient skiaGold; + //SkiaGoldClient skiaGold; setUp(() { - skiaGold = SkiaGoldClient( + //skiaGold = + SkiaGoldClient( fs: fs, platform: platform, process: process, @@ -105,7 +106,7 @@ void main() { } }); - // TODO(katelovett): This is currently disabled in flutter_goldens.dart + // TODO(Piinks): This is currently disabled in flutter_goldens.dart, https://github.com/flutter/flutter/pull/31630 // test('throws if goldctl has not been authorized', () async { // // See that preceding test does not leave auth behind [52] // try { @@ -115,8 +116,7 @@ void main() { // expect(error.message, contains('Could not authorize goldctl.')); // } // }); - // TODO(katelovett): Add methods to Mock SkiaGoldClient to inform the comparator - // TODO... and test for proper behavior. See matcher_test.dart for model + // TODO(Piinks): Add methods to Mock SkiaGoldClient to inform the comparator and test for proper behavior. See matcher_test.dart for model, https://github.com/flutter/flutter/pull/31630 // test('returns false if skia gold test fails', () async { // final File goldenFile = fs.file('/path/to/flutter/bin/cache/goldens/test/foo/bar/test.png') // ..createSync(recursive: true); diff --git a/packages/flutter_goldens_client/lib/client.dart b/packages/flutter_goldens_client/lib/client.dart index 3dc8a5769f..27e3b2ab16 100644 --- a/packages/flutter_goldens_client/lib/client.dart +++ b/packages/flutter_goldens_client/lib/client.dart @@ -51,7 +51,7 @@ class SkiaGoldClient { Directory _workDirectory; - //TODO(katelovett): Environment variables are temporary for local testing + // TODO(Piinks): Environment variables are temporary for local testing, https://github.com/flutter/flutter/pull/31630 /// The local [Directory] where the Flutter repository is hosted. /// /// Uses the [fs] file system. @@ -80,7 +80,7 @@ class SkiaGoldClient { Future auth(Directory workDirectory) async { _workDirectory = workDirectory; - //TODO(katelovett): Cleanup for final CI implementation + // TODO(Piinks): Cleanup for final CI implementation, https://github.com/flutter/flutter/pull/31630 if (_serviceAccount == null) return false; // Not in the proper environment for golden file testing. @@ -188,7 +188,7 @@ class SkiaGoldClient { } Future _getCommitHash() async { - // TODO(katelovett): Remove after pre-commit tests can be ingested by Skia Gold + // TODO(Piinks): Remove after pre-commit tests can be ingested by Skia Gold, https://github.com/flutter/flutter/pull/31630 return 'e51947241b37790a9e4e33bfdef59aaa9b930851'; // if (!flutterRoot.existsSync()) { // return null; @@ -214,7 +214,7 @@ class SkiaGoldClient { } String _getKeysJSON() { - // TODO(katelovett): Parse out cleaner key information + // TODO(Piinks): Parse out cleaner key information, https://github.com/flutter/flutter/pull/31630 return convert.json.encode( { 'Operating System' : io.Platform.operatingSystem,