Skip to content

Commit

Permalink
fix test
Browse files Browse the repository at this point in the history
  • Loading branch information
goxiaoy committed Jul 21, 2023
1 parent 8eba1ac commit 2817ea6
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
2 changes: 1 addition & 1 deletion lib/ui/survey_layout.dart
Original file line number Diff line number Diff line change
Expand Up @@ -176,7 +176,7 @@ class SurveyLayoutState extends State<SurveyLayout> {
controller: pageController,
physics: const NeverScrollableScrollPhysics(),
itemBuilder: itemBuilder,
// itemCount: pages.length,
itemCount: pages.length,
);
}

Expand Down
6 changes: 6 additions & 0 deletions test/questions/check_boxes_test.dart
Original file line number Diff line number Diff line change
Expand Up @@ -109,6 +109,8 @@ void main() {
expect(find.byType(ReactiveTextField), findsNothing);

// check the "Other" option
await tester.ensureVisible(find.text("Other"));
await tester.pumpAndSettle();
await tester.tap(find.text("Other"));
await tester.pump();
await tester.idle();
Expand Down Expand Up @@ -149,6 +151,8 @@ void main() {
expect(find.text("UNN Thomas Prince"), findsOneWidget);

// uncheck the "Other" option
await tester.ensureVisible(find.text("Other"));
await tester.pumpAndSettle();
await tester.tap(find.text("Other"));
await tester.pump();
await tester.idle();
Expand Down Expand Up @@ -254,6 +258,8 @@ void main() {
expect(find.text("required"), findsNothing);

// check the "Other" option but without entering any text, show "required"
await tester.ensureVisible(find.text("Other"));
await tester.pumpAndSettle();
await tester.tap(find.text("Other"));
await tester.tap(find.byType(ElevatedButton));
await tester.pump();
Expand Down

0 comments on commit 2817ea6

Please sign in to comment.