diff --git a/test/utils/http_utils_test.dart b/test/utils/http_utils_test.dart index 6e2019f9..80d63103 100644 --- a/test/utils/http_utils_test.dart +++ b/test/utils/http_utils_test.dart @@ -289,7 +289,7 @@ void main() { test('Testing getResponseBodyViewOptions for application/pdf', () { MediaType mediaType9 = MediaType("application", "pdf"); var result9 = getResponseBodyViewOptions(mediaType9); - expect(result9.$0,kPreviewBodyViewOptions); + expect(result9.$0,kNoBodyViewOptions); expect(result9.$1, "pdf"); }); test('Testing getResponseBodyViewOptions for text/calendar', () { diff --git a/test/widgets/response_widgets_test.dart b/test/widgets/response_widgets_test.dart index 017589ed..2822e0a8 100644 --- a/test/widgets/response_widgets_test.dart +++ b/test/widgets/response_widgets_test.dart @@ -156,7 +156,9 @@ void main() { ), ); - expect(find.text('Error: No Response Data Found. $kUnexpectedRaiseIssue'), + expect( + find.text( + 'Error: Response data does not exist. $kUnexpectedRaiseIssue'), findsOneWidget); }); @@ -231,7 +233,7 @@ void main() { ), ); - expect(find.text('Response body is empty. $kUnexpectedRaiseIssue'), + expect(find.text('Response body is missing (null). $kUnexpectedRaiseIssue'), findsOneWidget); }); @@ -258,7 +260,7 @@ void main() { expect( find.text( - 'Unknown Response content type - ${responseModelNoHeaders.contentType}. $kUnexpectedRaiseIssue'), + 'Unknown Response Content-Type - ${responseModelNoHeaders.contentType}. $kUnexpectedRaiseIssue'), findsOneWidget); }); @@ -285,8 +287,9 @@ void main() { //await Future.delayed(const Duration(seconds: 5)); expect( find.text( - "Viewing response data of Content-Type\n'${responseModelOctet.mediaType?.mimeType}' $kMimeTypeRaiseIssue"), + "${kMimeTypeRaiseIssueStart}application/octet-stream$kMimeTypeRaiseIssue"), findsOneWidget); + expect(find.byIcon(Icons.download), findsOneWidget); }); testWidgets('Testing Response Body for no formatted body', (tester) async { @@ -334,8 +337,9 @@ void main() { expect( find.text( - "$kMimeTypeRaiseIssueStart'application/json' $kMimeTypeRaiseIssueEnd"), + "${kMimeTypeRawRaiseIssueStart}application/json$kMimeTypeRaiseIssue"), findsOneWidget); + expect(find.byIcon(Icons.download), findsOneWidget); }); testWidgets('Testing Body Success for ResponseBodyView.raw', (tester) async { @@ -357,6 +361,7 @@ void main() { await tester.pumpAndSettle(); expect(find.text('Hello from API Dash'), findsOneWidget); + expect(find.byIcon(Icons.download), findsOneWidget); }); testWidgets('Testing Body Success for ResponseBodyView.code', (tester) async {