mirror of
https://github.com/foss42/apidash.git
synced 2025-12-01 18:28:25 +08:00
Merge branch 'foss42:main' into add-ui-tests
This commit is contained in:
@@ -5,6 +5,7 @@ import 'package:apidash/consts.dart';
|
||||
import 'package:flutter/foundation.dart';
|
||||
import 'package:printing/printing.dart' show PdfPreview;
|
||||
import 'package:flutter_svg/flutter_svg.dart' show SvgPicture;
|
||||
import 'package:apidash/widgets/video_previewer.dart';
|
||||
import '../test_consts.dart';
|
||||
|
||||
void main() {
|
||||
@@ -63,10 +64,7 @@ void main() {
|
||||
),
|
||||
),
|
||||
);
|
||||
|
||||
expect(
|
||||
find.text("${kMimeTypeRaiseIssueStart}video/H264$kMimeTypeRaiseIssue"),
|
||||
findsOneWidget);
|
||||
expect(find.byType(VideoPreviewer), findsOneWidget);
|
||||
});
|
||||
|
||||
testWidgets('Testing when type/subtype is model/step+xml', (tester) async {
|
||||
|
||||
@@ -10,13 +10,15 @@ import 'package:apidash/models/models.dart';
|
||||
import '../test_consts.dart';
|
||||
|
||||
void main() {
|
||||
testWidgets('Testing Sending Widget', (tester) async {
|
||||
testWidgets('Testing Sending Widget Without Timer', (tester) async {
|
||||
await tester.pumpWidget(
|
||||
MaterialApp(
|
||||
title: 'Send',
|
||||
theme: kThemeDataDark,
|
||||
home: const Scaffold(
|
||||
body: SendingWidget(),
|
||||
body: SendingWidget(
|
||||
startSendingTime: null,
|
||||
),
|
||||
),
|
||||
),
|
||||
);
|
||||
@@ -24,6 +26,26 @@ void main() {
|
||||
expect(find.byType(Lottie), findsOneWidget);
|
||||
});
|
||||
|
||||
testWidgets('Testing Sending Widget With Timer', (tester) async {
|
||||
await tester.pumpWidget(
|
||||
MaterialApp(
|
||||
title: 'Send',
|
||||
theme: kThemeDataDark,
|
||||
home: Scaffold(
|
||||
body: SendingWidget(
|
||||
startSendingTime: DateTime.now(),
|
||||
),
|
||||
),
|
||||
),
|
||||
);
|
||||
expect(find.text('Time elapsed: 0 ms'), findsOneWidget);
|
||||
expect(find.byType(Lottie), findsOneWidget);
|
||||
|
||||
await tester.pump(const Duration(seconds: 1));
|
||||
|
||||
expect(find.text('Time elapsed: 1.00 s'), findsOneWidget);
|
||||
});
|
||||
|
||||
testWidgets('Testing Not Sent Widget', (tester) async {
|
||||
await tester.pumpWidget(
|
||||
const MaterialApp(
|
||||
|
||||
Reference in New Issue
Block a user