import 'package:flutter/material.dart';
import 'package:flutter_test/flutter_test.dart';
import 'package:garden_planner/widgets/content_widgets/dashboard_widgets/space/plant_row_space.dart';

void main() {
  testWidgets('PlantRowSpace displays vertical space',
      (WidgetTester tester) async {
    const double verticalSpace = 2.5777777;

    await tester.pumpWidget(
      const MaterialApp(
        home: Scaffold(
          body: PlantRowSpace(verticalSpace: verticalSpace),
        ),
      ),
    );

    // widgets rounds by 2 digets
    expect(find.text('${2.58} m'), findsOneWidget,
        reason: 'VerticalSpace is nor right');
  });
}
