feat: replace mail protocol with smolmail and rebuild the UI
This commit is contained in:
parent
cb24b68069
commit
e94e4158cc
93 changed files with 6387 additions and 3479 deletions
|
|
@ -1,19 +1,35 @@
|
|||
import "package:flutter/material.dart";
|
||||
import "package:flutter_test/flutter_test.dart";
|
||||
import "dart:io";
|
||||
|
||||
import "package:flash_mail/presentation/app_widget.dart";
|
||||
import "package:flutter_riverpod/flutter_riverpod.dart";
|
||||
import "package:flutter_test/flutter_test.dart";
|
||||
import "package:hive_flutter/hive_flutter.dart";
|
||||
|
||||
import "package:smol_mail/data/providers/providers.dart";
|
||||
import "package:smol_mail/presentation/app_widget.dart";
|
||||
import "package:smol_mail/smol/store.dart";
|
||||
|
||||
late final SmolStore store;
|
||||
|
||||
void main() {
|
||||
testWidgets("Counter increments smoke test", (WidgetTester tester) async {
|
||||
await tester.pumpWidget(const AppWidget());
|
||||
// Hive's box opening is real file IO, which never completes inside a
|
||||
// testWidgets fake-async zone — so it happens here, outside one.
|
||||
setUpAll(() async {
|
||||
TestWidgetsFlutterBinding.ensureInitialized();
|
||||
final dir = await Directory.systemTemp.createTemp("smol-widget-test");
|
||||
Hive.init(dir.path);
|
||||
store = await SmolStore.open();
|
||||
});
|
||||
|
||||
expect(find.text("0"), findsOneWidget);
|
||||
expect(find.text("1"), findsNothing);
|
||||
|
||||
await tester.tap(find.byIcon(Icons.add));
|
||||
await tester.pump();
|
||||
|
||||
expect(find.text("0"), findsNothing);
|
||||
expect(find.text("1"), findsOneWidget);
|
||||
testWidgets("onboarding invites to create or restore an identity",
|
||||
(tester) async {
|
||||
await tester.pumpWidget(
|
||||
ProviderScope(
|
||||
overrides: [storeProvider.overrideWithValue(store)],
|
||||
child: const AppWidget(),
|
||||
),
|
||||
);
|
||||
await tester.pumpAndSettle();
|
||||
expect(find.text("Create Identity"), findsOneWidget);
|
||||
expect(find.text("Restore From Seed"), findsOneWidget);
|
||||
});
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue