Skip to content

Commit

Permalink
fixed tests
Browse files Browse the repository at this point in the history
  • Loading branch information
pichillilorenzo committed Nov 2, 2022
1 parent 0666870 commit 6906763
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -58,11 +58,13 @@ void onPermissionRequest() {
expect(listEquals(resources, expectedValue), true);
}, skip: shouldSkip);

final shouldSkip2 = kIsWeb
? true
: ![
TargetPlatform.android,
].contains(defaultTargetPlatform);
// final shouldSkip2 = kIsWeb
// ? true
// : ![
// TargetPlatform.android,
// ].contains(defaultTargetPlatform);
// TODO: this test is not working
final shouldSkip2 = true;

testWidgets('onPermissionRequestCanceled', (WidgetTester tester) async {
final Completer<InAppWebViewController> controllerCompleter =
Expand Down Expand Up @@ -90,7 +92,7 @@ void onPermissionRequest() {
},
onPermissionRequest: (controller, permissionRequest) async {
onPermissionRequestCompleter.complete(permissionRequest.resources);
await Future.delayed(Duration(seconds: 30));
await Future.delayed(Duration(seconds: 5));
return PermissionResponse(
resources: permissionRequest.resources,
action: PermissionResponseAction.GRANT);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,10 @@ void startAndStop() {
String traceFilePath = '${appDocDir.path}${Platform.pathSeparator}trace.json';
expect(
await tracingController.stop(filePath: traceFilePath), true);

expect(File(traceFilePath).existsSync(), true);

await Future.delayed(Duration(seconds: 2));
expect(await tracingController.isTracing(), false);
}, skip: shouldSkip);
}
4 changes: 2 additions & 2 deletions example/ios/Flutter/flutter_export_environment.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,11 @@
export "FLUTTER_ROOT=/Users/lorenzopichilli/fvm/versions/3.3.6"
export "FLUTTER_APPLICATION_PATH=/Users/lorenzopichilli/Desktop/flutter_inappwebview/example"
export "COCOAPODS_PARALLEL_CODE_SIGN=true"
export "FLUTTER_TARGET=/Users/lorenzopichilli/Desktop/flutter_inappwebview/example/lib/main.dart"
export "FLUTTER_TARGET=integration_test/webview_flutter_test.dart"
export "FLUTTER_BUILD_DIR=build"
export "FLUTTER_BUILD_NAME=1.0.0"
export "FLUTTER_BUILD_NUMBER=1"
export "DART_DEFINES=Zmx1dHRlci5pbnNwZWN0b3Iuc3RydWN0dXJlZEVycm9ycz10cnVl,RkxVVFRFUl9XRUJfQVVUT19ERVRFQ1Q9dHJ1ZQ=="
export "DART_DEFINES=RkxVVFRFUl9XRUJfQVVUT19ERVRFQ1Q9dHJ1ZQ=="
export "DART_OBFUSCATION=false"
export "TRACK_WIDGET_CREATION=true"
export "TREE_SHAKE_ICONS=false"
Expand Down

0 comments on commit 6906763

Please sign in to comment.