Skip to content

Commit

Permalink
Add spaces to tests
Browse files Browse the repository at this point in the history
  • Loading branch information
Jonas-Sander committed Feb 22, 2024
1 parent ba66ec8 commit 678d09d
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 0 deletions.
5 changes: 5 additions & 0 deletions app/test/timetable/timetable_dialog_test.dart
Original file line number Diff line number Diff line change
Expand Up @@ -166,6 +166,7 @@ void main() {

expect(find.text(EventDialogErrorStrings.emptyTitle), findsNothing);
});

testWidgets(
'shows title error message if save is pressed and the title is empty',
(tester) async {
Expand All @@ -176,6 +177,7 @@ void main() {

expect(find.text(EventDialogErrorStrings.emptyTitle), findsOneWidget);
});

testWidgets(
'removes title error message if save is pressed with an empty title but text is entered afterwards',
(tester) async {
Expand All @@ -188,6 +190,7 @@ void main() {

expect(find.text(EventDialogErrorStrings.emptyTitle), findsNothing);
});

testWidgets(
'shows course error message if save is pressed and no course is chosen',
(tester) async {
Expand All @@ -198,6 +201,7 @@ void main() {

expect(find.text(EventDialogErrorStrings.emptyCourse), findsOneWidget);
});

testWidgets('removes course error message if a course is chosen',
(tester) async {
final dt = createDialogTester(tester);
Expand Down Expand Up @@ -225,6 +229,7 @@ void main() {
expect(find.text(EventDialogErrorStrings.endTimeMustBeAfterStartTime),
findsOneWidget);
});

testWidgets('doesnt shows error message if end time after start time',
(tester) async {
final dt = createDialogTester(tester);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,7 @@ void main() {
'event_dialog_add_empty_${testConfig.theme.name}_${testConfig.isExam ? 'exam' : 'event'}',
);
});

testGoldens(
'renders full event dialog as expected (${testConfig.theme.name}, isExam: ${testConfig.isExam})',
(tester) async {
Expand Down Expand Up @@ -96,6 +97,7 @@ void main() {
'event_dialog_add_full_${testConfig.theme.name}_${testConfig.isExam ? 'exam' : 'event'}',
);
});

testGoldens(
'renders error event dialog as expected (${testConfig.theme.name}, isExam: ${testConfig.isExam})',
(tester) async {
Expand Down

0 comments on commit 678d09d

Please sign in to comment.