Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update documentation for running Flutter Integration tests with Chrome #1408

Merged
merged 1 commit into from
Mar 14, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading