import 'package:flutter/material.dart';
import 'package:flutter_riverpod/flutter_riverpod.dart';
import 'package:flutter_test/flutter_test.dart';

import 'package:minstrel/auth/login_screen.dart';
import 'package:minstrel/theme/theme_data.dart';

void main() {
  testWidgets('login screen renders both fields and the submit button', (tester) async {
    await tester.pumpWidget(ProviderScope(
      child: MaterialApp(
        theme: buildThemeData(),
        home: const LoginScreen(),
      ),
    ));
    expect(find.byType(TextField), findsNWidgets(2));
    expect(find.text('Sign in'), findsNWidgets(2)); // header + button
  });
}
