This library is not available when running in the local test environment, so a stub is used in that case. You can run a test against the real UI widgets by running flutter test --platform chrome.
Note that the create-trip test currently tests the stub widget itself when running locally, which is not very useful. The conditionally-imported widget should be refactored to be as small as possible to minimize the surface area of conditional imports and to allow tests to be more useful.
Consider this a starting point for what conditional imports for the maps-specific APIs might look like. The create-trip test is not very useful as it stands.
Fix test dep and only run REST tests when server is running
REST API tests are toggled by the REST_SERVER_RUNNING environment variable. When this is set to
true
, the REST tests run as normal (viaflutter test
).Conditionally import dart:html autocomplete widget
This library is not available when running in the local test environment, so a stub is used in that case. You can run a test against the real UI widgets by running
flutter test --platform chrome
.Note that the create-trip test currently tests the stub widget itself when running locally, which is not very useful. The conditionally-imported widget should be refactored to be as small as possible to minimize the surface area of conditional imports and to allow tests to be more useful.