Skip to content

Commit

Permalink
updated test
Browse files Browse the repository at this point in the history
  • Loading branch information
CaptainDario committed Jul 11, 2024
1 parent 426b4df commit 355c743
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 10 deletions.
2 changes: 0 additions & 2 deletions integration_test/draw_screen_test.dart
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ import 'package:flutter/gestures.dart';
import 'package:flutter/material.dart';
import 'package:flutter_test/flutter_test.dart';
import 'package:integration_test/integration_test.dart';
import 'package:flutter_driver/driver_extension.dart';

import 'package:get_it/get_it.dart';

Expand All @@ -20,7 +19,6 @@ import 'test_utils.dart';

void main() {

enableFlutterDriverExtension();
IntegrationTestWidgetsFlutterBinding.ensureInitialized();

testWidgets("DrawScreen test", (WidgetTester tester) async {
Expand Down
12 changes: 6 additions & 6 deletions integration_test/run_tests.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
if platform == "linux" or platform == "linux2":
prefix = "xvfb-run"
device = "linux"
additional_args += "--profile"
#additional_args += "--profile"

# MacOS
elif platform == "darwin":
Expand All @@ -31,12 +31,12 @@
device = arg.replace("ios_", "")
else:
device = "macos"
additional_args += "--profile"
#additional_args += "--profile"

# Windows
elif platform == "win32":
device = "windows"
additional_args += "--profile"
#additional_args += "--profile"

if(arg == "android"):
device = "emulator"
Expand All @@ -45,9 +45,9 @@
# run all tests
for file in os.listdir("integration_test"):
if(file.endswith("_test.dart")):
command = f"{prefix} flutter drive "
command += "--driver=test_driver/integration_test.dart "
command += "--target=integration_test/draw_screen_test.dart "
command = f"{prefix} flutter test "
#command += "--driver=test_driver/integration_test.dart "
command += "integration_test/draw_screen_test.dart "
command += f"-d {device} "
command += additional_args
command += " -v"
Expand Down
10 changes: 8 additions & 2 deletions test_driver/integration_test.dart
Original file line number Diff line number Diff line change
@@ -1,4 +1,10 @@
// Package imports:
import 'package:integration_test/integration_test_driver.dart';
import 'package:flutter_driver/flutter_driver.dart';
import 'package:integration_test/integration_test_driver_extended.dart';

Future<void> main() => integrationDriver();
Future<void> main() async {

final FlutterDriver driver = await FlutterDriver.connect();
await integrationDriver(driver: driver);

}

0 comments on commit 355c743

Please sign in to comment.