Skip to content

Commit

Permalink
Fix tests real
Browse files Browse the repository at this point in the history
  • Loading branch information
HugoMigner committed Sep 25, 2023
1 parent 251ab53 commit d584cea
Showing 1 changed file with 10 additions and 2 deletions.
12 changes: 10 additions & 2 deletions test/ui/views/dashboard_view_test.dart
Original file line number Diff line number Diff line change
Expand Up @@ -850,6 +850,9 @@ void main() {
});

testWidgets("Schedule card", (WidgetTester tester) async {
RemoteConfigServiceMock.stubGetBroadcastEnabled(
remoteConfigService as RemoteConfigServiceMock,
toReturn: false);
tester.binding.window.physicalSizeTestValue = const Size(800, 1410);

CourseRepositoryMock.stubCoursesActivities(
Expand All @@ -862,7 +865,8 @@ void main() {
fromCacheOnly: false);

dashboard = {
PreferencesFlag.scheduleCard: 0,
PreferencesFlag.broadcastCard: 0,
PreferencesFlag.scheduleCard: 1,
};

SettingsManagerMock.stubGetDashboard(
Expand All @@ -877,10 +881,14 @@ void main() {
matchesGoldenFile(goldenFilePath("dashboardView_scheduleCard_1")));
});
testWidgets("progressBar Card", (WidgetTester tester) async {
RemoteConfigServiceMock.stubGetBroadcastEnabled(
remoteConfigService as RemoteConfigServiceMock,
toReturn: false);
tester.binding.window.physicalSizeTestValue = const Size(800, 1410);

dashboard = {
PreferencesFlag.progressBarCard: 0,
PreferencesFlag.broadcastCard: 0,
PreferencesFlag.progressBarCard: 1,
};

SettingsManagerMock.stubGetDashboard(
Expand Down

0 comments on commit d584cea

Please sign in to comment.