import 'package:flutter_test/flutter_test.dart';
import 'package:iop_client/client_bootstrap.dart';
import 'package:iop_client/main.dart';
import 'widget_test.dart';

void main() {
  testWidgets('runIopClient can skip external integrations', (WidgetTester tester) async {
    const options = IopClientBootstrapOptions(
      initializeFirebase: false,
      initializeMattermost: false,
    );

    // This should run without throwing any Firebase or Mattermost exceptions
    await bootstrapIopClient(options: options);

    final fakeClient = FakeClientWireClient(shouldSuccess: true);

    // Verify it doesn't fail basic widget pump
    await tester.pumpWidget(
      IopClientApp(
        testClient: fakeClient,
        statusRepository: null,
      ),
    );
    expect(find.byType(IopClientApp), findsOneWidget);
  });
}
