Skip to content

Commit

Permalink
Update documentation for running Flutter Integration tests with Chrome (
Browse files Browse the repository at this point in the history
  • Loading branch information
nilsreichardt authored Mar 14, 2024
1 parent 8be2ca2 commit e5f2623
Showing 1 changed file with 14 additions and 22 deletions.
36 changes: 14 additions & 22 deletions app/integration_test/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -111,24 +111,9 @@ For more information about running Android Device Testing for Flutter integratio

### Web

_Note: The integration tests are not working for the web at the moment because we need to migrate our app to null safety. Otherwise, the build will fail because of this message:_

```
org-dartlang-app:/app_test.dart:27:11: Error: Non-nullable variable 'dependencies' must be assigned before it can be used.
await dependencies.blocDependencies.auth.signOut();
^^^^^^^^^^^^
org-dartlang-app:/app_test.dart:34:30: Error: Non-nullable variable 'dependencies' must be assigned before it can be used.
beitrittsversuche: dependencies.beitrittsversuche,
^^^^^^^^^^^^
org-dartlang-app:/app_test.dart:35:29: Error: Non-nullable variable 'dependencies' must be assigned before it can be used.
blocDependencies: dependencies.blocDependencies,
^^^^^^^^^^^^
org-dartlang-app:/app_test.dart:36:28: Error: Non-nullable variable 'dependencies' must be assigned before it can be used.
dynamicLinkBloc: dependencies.dynamicLinkBloc,
^^^^^^^^^^^^
```

To get started testing in a web browser, download [ChromeDriver](https://chromedriver.chromium.org/downloads).
To get started testing in a web browser, download
[ChromeDriver](https://chromedriver.chromium.org/downloads). You need have the
same version of ChromeDriver as the version of Chrome you have installed.

Launch WebDriver, for example:

Expand All @@ -139,8 +124,15 @@ chromedriver --port=4444
And then run the following command in a different process:

```sh
fvm flutter test \
integration_test
--flavor dev
-d web-server
fvm flutter drive \
--driver=test_driver/integration_test.dart \
--target=integration_test/integration_test_old.dart \
--flavor dev \
--dart-define=USER_1_EMAIL=$USER_1_EMAIL \
--dart-define=USER_1_PASSWORD=$USER_1_PASSWORD \
-d chrome
```

For more information about running Flutter integration tests on the web, check
out the official Flutter repository documentation:
https://github.com/flutter/flutter/wiki/Running-Flutter-Driver-tests-with-Web

0 comments on commit e5f2623

Please sign in to comment.