Create response_widgets_test.dart

This commit is contained in:
Ashita Prasad
2023-04-21 06:30:01 +05:30
parent 488fe9a90d
commit 01d45e9a17

View File

@ -0,0 +1,32 @@
import 'package:flutter/material.dart';
import 'package:flutter_test/flutter_test.dart';
import 'package:apidash/widgets/response_widgets.dart';
import 'package:lottie/lottie.dart';
void main() {
testWidgets('Testing for lottie', (tester) async {
await tester.pumpWidget(
const MaterialApp(
title: 'Send',
home: Scaffold(
body: SendingWidget(),
),
),
);
expect(find.byType(Lottie), findsOneWidget);
});
testWidgets('Testing for Not Sent', (tester) async {
await tester.pumpWidget(
const MaterialApp(
title: 'Not Sent',
home: Scaffold(
body: NotSentWidget(),
),
),
);
expect(find.byIcon(Icons.north_east_rounded), findsOneWidget);
expect(find.text('Not Sent'), findsOneWidget);
});
}