Skip to content

Commit

Permalink
test(#636): fix drug page test
Browse files Browse the repository at this point in the history
  • Loading branch information
tamslo committed Dec 22, 2023
1 parent a8f07cd commit 3bfea25
Showing 1 changed file with 10 additions and 9 deletions.
19 changes: 10 additions & 9 deletions app/integration_test/drugs_test.dart
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,7 @@ void main() {

// test the right color of the card
// ignore: omit_local_variable_types
final Card card = tester.firstWidget(
final RoundedCard card = tester.firstWidget(
find.byKey(
ValueKey('annotationCard'),
),
Expand All @@ -136,14 +136,14 @@ void main() {
testDrug.guidelines.first.annotations.warningLevel.color,
);

context = tester.element(find.byType(Tooltip).first);

// test that drug activity can be set
final checkbox = tester.widget(find.byType(CheckboxListTileWrapper))
as CheckboxListTileWrapper;
expect(checkbox.onChanged, isNotNull);
final activitySelection = tester.firstWidget(
find.byType(DropdownButton<bool>)
) as DropdownButton<bool>;
expect(activitySelection.onChanged, isNotNull);

// test tooltips
context = tester.element(find.byType(Tooltip).first);
expect(
find.byTooltip(context.l10n.drugs_page_tooltip_guideline),
findsOneWidget,
Expand Down Expand Up @@ -202,9 +202,10 @@ void main() {
),
);

final checkbox = tester.widget(find.byType(CheckboxListTileWrapper))
as CheckboxListTileWrapper;
expect(checkbox.onChanged, isNull);
final activitySelection = tester.firstWidget(
find.byType(DropdownButton<bool>)
) as DropdownButton<bool>;
expect(activitySelection.onChanged, isNull);
});
});
}

0 comments on commit 3bfea25

Please sign in to comment.