googleinterns / step23-2020

Apache License 2.0
3 stars 5 forks source link

Fix test #121

Closed bsidhom closed 4 years ago

bsidhom commented 4 years ago

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 (via flutter 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.

bsidhom commented 4 years ago

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.