[ermine] Uncomment ermine unittests
The tests were commented out to enable flutter roll. This change
uncomments them and fixes them so that they pass.
Test: All ermine unittests pass
Change-Id: I2bdaeae96519a02e1bdaf24bee51d7f145c3b0c6
Reviewed-on: https://fuchsia-review.googlesource.com/c/experiences/+/404898
Reviewed-by: Chase Latta <chaselatta@google.com>
Testability-Review: Chase Latta <chaselatta@google.com>
Commit-Queue: Sanjay Chouksey <sanjayc@google.com>
diff --git a/session_shells/BUILD.gn b/session_shells/BUILD.gn
index 4c3ff48..0bbc28d 100644
--- a/session_shells/BUILD.gn
+++ b/session_shells/BUILD.gn
@@ -15,7 +15,7 @@
if (host_os != "mac") {
_flutter_tester_tests += [
"ermine/settings:ermine_settings_unittests($host_toolchain)",
- #"ermine/shell:ermine_unittests($host_toolchain)",
+ "ermine/shell:ermine_unittests($host_toolchain)",
"ermine/tiler:tiler_unittests($host_toolchain)",
"ermine/keyboard_shortcuts:keyboard_shortcuts_unittests($host_toolchain)",
]
diff --git a/session_shells/ermine/shell/test/app_model_test.dart b/session_shells/ermine/shell/test/app_model_test.dart
index fed816b..e8fc576 100644
--- a/session_shells/ermine/shell/test/app_model_test.dart
+++ b/session_shells/ermine/shell/test/app_model_test.dart
@@ -2,6 +2,8 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
+import 'dart:ui';
+
import 'package:keyboard_shortcuts/keyboard_shortcuts.dart'
show KeyboardShortcuts;
import 'package:fuchsia_internationalization_flutter/internationalization.dart';
@@ -33,6 +35,8 @@
statusModel = MockStatusModel();
clustersModel = MockClustersModel();
+ when(localeSource.stream()).thenAnswer((_) => Stream<Locale>.empty());
+
appModel = _TestAppModel(
keyboardShortcuts: keyboardShortcuts,
pointerEventsListener: pointerEventsListener,