Session/10 #53
GitHub Actions / flutter test
succeeded
Oct 12, 2023 in 0s
flutter test ✅
✅ test_report.log
24 tests were completed in 20s with 22 passed, 0 failed and 0 skipped.
Test suite | Passed | Failed | Skipped | Time |
---|---|---|---|---|
test/model/weather_forecast_test.dart | 5✅ | 55ms | ||
test/model/weather_reqest_test.dart | 1✅ | 25ms | ||
test/service/weather_service_test.dart | 3✅ | 84ms | ||
test/state/weather_state_notifier_test.dart | 5✅ | 84ms | ||
test/view/weather_forecast_panel_test.dart | 8✅ | 1s |
✅ test/model/weather_forecast_test.dart
✅ success case: fromJson
fromJson failure: CheckedFromJsonException should be thrown.
✅ non-exist weather
✅ jsonData has wrong key
✅ unexpected type of value
✅ required property is missing
✅ test/model/weather_reqest_test.dart
✅ success case: encode WeatherRequest
✅ test/service/weather_service_test.dart
✅ success case
failure case
✅ invalidParameter error is thrown
✅ unknown error is thrown
✅ test/state/weather_state_notifier_test.dart
✅ success case: getWeather()
failure case: getWeather()
✅ an unknown error is thrown
✅ invalidParameter error is thrown
✅ fromJson error case: CheckedFromJsonException should be thrown.
✅ received data is not in JSON format
✅ test/view/weather_forecast_panel_test.dart
(setUpAll)
(tearDownAll)
✅ initial screen
after getting the weather
✅ when reload button is pressed, cloudy weather and correct temperature should be displayed.
✅ when reload button is pressed, sunny weather and correct temperature should be displayed.
✅ when reload button is pressed, rainy weather and correct temperature should be displayed.
when an error occurs
✅ when fetchWeather() returns failure with invalidParameter error, error dialog and correct message should be visible. Then the dialog is closed by pressing the ok button.
✅ when fetchWeather() returns failure with unknown error, error dialog and correct message should be visible.
✅ when fetchWeather() returns failure with CheckedFromJsonException, error dialog and correct message should be visible.
✅ when fetchWeather() returns failure with FormatException, error dialog and correct message should be visible.
Loading