mirror of
https://github.com/foss42/apidash.git
synced 2025-05-22 16:57:07 +08:00
Create response_widgets_test.dart
This commit is contained in:
32
test/widgets/response_widgets_test.dart
Normal file
32
test/widgets/response_widgets_test.dart
Normal 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);
|
||||||
|
});
|
||||||
|
}
|
Reference in New Issue
Block a user