nostr login fetch details and nip05
This commit is contained in:
@@ -92,7 +92,8 @@ void main() {
|
||||
expect(find.textContaining('wss://relay2.example.com'), findsWidgets);
|
||||
// Verify we have relay list items (Cards)
|
||||
expect(find.byType(Card), findsNWidgets(2));
|
||||
expect(find.text('Disconnected'), findsNWidgets(2));
|
||||
// New UI shows "Enabled (not connected)" or "Disabled" instead of "Disconnected"
|
||||
expect(find.textContaining('Enabled'), findsWidgets);
|
||||
});
|
||||
|
||||
testWidgets('adds relay when Add button is pressed',
|
||||
@@ -157,16 +158,15 @@ void main() {
|
||||
testWidgets('displays check health button', (WidgetTester tester) async {
|
||||
await tester.pumpWidget(createTestWidget());
|
||||
|
||||
expect(find.text('Check Health'), findsOneWidget);
|
||||
expect(find.byIcon(Icons.health_and_safety), findsOneWidget);
|
||||
expect(find.text('Test All'), findsOneWidget);
|
||||
expect(find.byIcon(Icons.network_check), findsOneWidget);
|
||||
});
|
||||
|
||||
testWidgets('displays manual sync button when sync engine is configured',
|
||||
(WidgetTester tester) async {
|
||||
testWidgets('displays toggle all button', (WidgetTester tester) async {
|
||||
await tester.pumpWidget(createTestWidget());
|
||||
|
||||
expect(find.text('Manual Sync'), findsOneWidget);
|
||||
expect(find.byIcon(Icons.sync), findsOneWidget);
|
||||
expect(find.text('Turn All On'), findsOneWidget);
|
||||
expect(find.byIcon(Icons.power_settings_new), findsOneWidget);
|
||||
});
|
||||
|
||||
testWidgets('shows loading state during health check',
|
||||
@@ -175,9 +175,9 @@ void main() {
|
||||
await tester.pumpWidget(createTestWidget());
|
||||
await tester.pump();
|
||||
|
||||
// Tap check health button
|
||||
final healthButton = find.text('Check Health');
|
||||
await tester.tap(healthButton);
|
||||
// Tap test all button
|
||||
final testAllButton = find.text('Test All');
|
||||
await tester.tap(testAllButton);
|
||||
await tester.pump();
|
||||
|
||||
// Check for loading indicator (may be brief)
|
||||
@@ -231,12 +231,14 @@ void main() {
|
||||
await tester.pumpWidget(createTestWidget());
|
||||
await tester.pump();
|
||||
|
||||
// Verify relay URL is displayed (may appear in ListTile title)
|
||||
// Verify relay URL is displayed
|
||||
expect(find.textContaining('wss://relay.example.com'), findsWidgets);
|
||||
// Verify status indicator is present
|
||||
expect(find.byType(CircleAvatar), findsWidgets);
|
||||
// Verify we have a relay card
|
||||
// Verify status indicator is present (now a Container with decoration, not CircleAvatar)
|
||||
// The status indicator is a Container with BoxDecoration, so we check for the Card instead
|
||||
expect(find.byType(Card), findsWidgets);
|
||||
// Verify we have test button and toggle switch
|
||||
expect(find.text('Test'), findsWidgets);
|
||||
expect(find.byType(Switch), findsWidgets);
|
||||
});
|
||||
});
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user