Fix screenshot testing for flutter web integration_test (#117114)
* Fix screenshot testing for flutter web integration_test * update packages * fix method signature and todo * Run tests on CI * fix type * remove silences * Add docs * fix comment * fix whitespace * review comments
This commit is contained in:
@@ -9,8 +9,20 @@ Future<void> main() async {
|
||||
final FlutterDriver driver = await FlutterDriver.connect();
|
||||
await integrationDriver(
|
||||
driver: driver,
|
||||
onScreenshot: (String screenshotName, List<int> screenshotBytes) async {
|
||||
onScreenshot: (
|
||||
String screenshotName,
|
||||
List<int> screenshotBytes, [
|
||||
Map<String, Object?>? args,
|
||||
]) async {
|
||||
// Return false if the screenshot is invalid.
|
||||
// TODO(yjbanov): implement, see https://github.com/flutter/flutter/issues/86120
|
||||
|
||||
// Here is an example of using an argument that was passed in via the
|
||||
// optional 'args' Map.
|
||||
if (args != null) {
|
||||
final String? someArgumentValue = args['someArgumentKey'] as String?;
|
||||
return someArgumentValue != null;
|
||||
}
|
||||
return true;
|
||||
},
|
||||
);
|
||||
|
||||
Reference in New Issue
Block a user