Skip to content

Commit

Permalink
clean up tests for now
Browse files Browse the repository at this point in the history
  • Loading branch information
julian-CStack committed Jan 20, 2023
1 parent fd5a237 commit 0c1db6f
Show file tree
Hide file tree
Showing 24 changed files with 6,882 additions and 9,524 deletions.
6 changes: 5 additions & 1 deletion lib/db/main_db.dart
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,11 @@ class MainDB {

Isar get isar => _isar!;

Future<bool> isarInit() async {
Future<bool> isarInit({Isar? mock}) async {
if (mock != null) {
_isar = mock;
return true;
}
if (_isar != null && isar.isOpen) return false;
_isar = await Isar.open(
[
Expand Down
5 changes: 5 additions & 0 deletions test/pages/send_view/send_view_test.dart
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ import 'package:stackwallet/utilities/enums/coin_enum.dart';
import 'package:stackwallet/utilities/prefs.dart';
import 'package:stackwallet/utilities/theme/light_colors.dart';
import 'package:stackwallet/utilities/theme/stack_colors.dart';

import 'send_view_test.mocks.dart';

@GenerateMocks([
Expand Down Expand Up @@ -84,6 +85,8 @@ void main() {
),
);

await widgetTester.pumpAndSettle();

expect(find.text("Send to"), findsOneWidget);
expect(find.text("Amount"), findsOneWidget);
expect(find.text("Note (optional)"), findsOneWidget);
Expand Down Expand Up @@ -147,6 +150,8 @@ void main() {
),
);

await widgetTester.pumpAndSettle();

expect(find.text("Send to"), findsOneWidget);
expect(find.text("Amount"), findsOneWidget);
expect(find.text("Note (optional)"), findsOneWidget);
Expand Down
Loading

0 comments on commit 0c1db6f

Please sign in to comment.