diff --git a/.github/pull_request_template.md b/.github/pull_request_template.md index 721b55e6..04873dba 100644 --- a/.github/pull_request_template.md +++ b/.github/pull_request_template.md @@ -16,4 +16,3 @@ _We encourage you to add relevant test cases._ - [ ] Yes - [ ] No, and this is why: _please replace this line with details on why tests have not been included_ -- [ ] I need help with writing tests diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 58fd388d..46a9b053 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -128,3 +128,23 @@ flutter test test/widgets/codegen_previewer_test.dart ### How to add a new package to pubspec.yaml? Instead of copy pasting from pub.dev, it is recommended that you use `flutter pub add package_name` to add a new package to `pubspec.yaml`. You can read more [here](https://docs.flutter.dev/packages-and-plugins/using-packages#adding-a-package-dependency-to-an-app-using-flutter-pub-add). + +## Troubleshooting Common Issues + +### Network Connection Issues on macOS + +If you encounter a network connection error similar to the following while running your Flutter app on macOS: + +``` +ClientException with SocketException: Connection failed (OS Error: Operation not permitted, errno = 1) +``` +Add below key to `macos/Runner/DebugProfile.entitlements` and `macos/Runner/Release.entitlements`. + +``` + com.apple.security.network.client + +``` + +You can read more [here](https://docs.flutter.dev/platform-integration/macos/building#setting-up-entitlements) + + diff --git a/README.md b/README.md index 15dc46e1..d8b258e5 100644 --- a/README.md +++ b/README.md @@ -137,6 +137,7 @@ Here is the complete list of mimetypes that can be directly previewed in API Das | File Type | Mimetype | Extension | Comment | | --------- | -------------------------- | ----------------- | -------- | | PDF | `application/pdf` | `.pdf` | | +| CSV | `text/csv` | `.csv` | Can be improved | | Image | `image/apng` | `.apng` | Animated | | Image | `image/avif` | `.avif` | | | Image | `image/bmp` | `.bmp` | | @@ -177,14 +178,14 @@ Here is the complete list of mimetypes that are syntax highlighted in API Dash: | ------------------ | --------- | ------------------------------------------------------------------------------------------------------------------ | | `application/json` | `.json` | Other mimetypes like `application/geo+json`, `application/vcard+json` that are based on `json` are also supported. | | `application/xml` | `.xml` | Other mimetypes like `application/xhtml+xml`, `application/vcard+xml` that are based on `xml` are also supported. | -| `text/xml` | `.xml` | | -| `application/yaml` | `.yaml` | Others - `application/x-yaml` or `application/x-yml` | -| `text/yaml` | `.yaml` | Others - `text/yml` | -| `application/sql` | `.sql` | | -| `text/css` | `.css` | | -| `text/html` | `.html` | Only syntax highlighting, no web preview. | -| `text/javascript` | `.js` | | -| `text/markdown` | `.md` | | +| `text/xml` | `.xml` | | +| `application/yaml` | `.yaml` | Others - `application/x-yaml` or `application/x-yml` | +| `text/yaml` | `.yaml` | Others - `text/yml` | +| `application/sql` | `.sql` | | +| `text/css` | `.css` | | +| `text/html` | `.html` | Only syntax highlighting, no web preview. | +| `text/javascript` | `.js` | | +| `text/markdown` | `.md` | | ## What's new in v0.3.0? diff --git a/test/widgets/intro_message_test.dart b/test/widgets/intro_message_test.dart index 798afad8..4e256c82 100644 --- a/test/widgets/intro_message_test.dart +++ b/test/widgets/intro_message_test.dart @@ -1,9 +1,16 @@ import 'package:flutter/material.dart'; import 'package:flutter_test/flutter_test.dart'; import 'package:apidash/widgets/intro_message.dart'; +import 'package:package_info_plus/package_info_plus.dart'; void main() { testWidgets('Testing Intro Message', (tester) async { + PackageInfo.setMockInitialValues( + appName: 'API Dash', + packageName: 'dev.apidash.apidash', + version: '1.0.0', + buildNumber: '1', + buildSignature: 'buildSignature'); await tester.pumpWidget( const MaterialApp( title: 'Intro Message', @@ -13,7 +20,7 @@ void main() { ), ); - await tester.pumpAndSettle(); + await tester.pump(); expect(find.text('Welcome to API Dash ⚡️'), findsOneWidget); expect(find.byType(RichText), findsAtLeastNWidgets(1)); @@ -25,5 +32,5 @@ void main() { expect(find.byIcon(Icons.star), findsOneWidget); expect(find.text('Star on GitHub'), findsOneWidget); await tester.tap(find.byIcon(Icons.star)); - }, skip: true); + }); }