From e14446f2e34cb737dce76b280c86d1cc8dc23d91 Mon Sep 17 00:00:00 2001 From: Yousef Rabia Date: Fri, 1 Mar 2024 17:18:42 +0200 Subject: [PATCH 1/9] Replace `tester.pumpAndSettle();` with `tester.pump();` Replacing `tester.pumpAndSettle();` with `tester.pump();` resolves an issue where `pumpAndSettle()` waits for all animations to complete, causing an infinite loop with `CircularProgressIndicator`. Using `pump()` ensures efficient frame building without unnecessary animation waiting. --- test/widgets/intro_message_test.dart | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/widgets/intro_message_test.dart b/test/widgets/intro_message_test.dart index 798afad8..11ca1ad5 100644 --- a/test/widgets/intro_message_test.dart +++ b/test/widgets/intro_message_test.dart @@ -13,7 +13,7 @@ void main() { ), ); - await tester.pumpAndSettle(); + await tester.pump(); expect(find.text('Welcome to API Dash ⚡️'), findsOneWidget); expect(find.byType(RichText), findsAtLeastNWidgets(1)); From 1db5d88125d0d584d28f5cd21b1ed00b4c68be2f Mon Sep 17 00:00:00 2001 From: Yousef Rabia Date: Fri, 1 Mar 2024 17:20:40 +0200 Subject: [PATCH 2/9] Ensure introData() Function Works During Testing by Using `setMockInitialValues` --- test/widgets/intro_message_test.dart | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/test/widgets/intro_message_test.dart b/test/widgets/intro_message_test.dart index 11ca1ad5..d5e543bd 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', From 00f008d8a2e479ac20d980530ef10b4cb0bcc884 Mon Sep 17 00:00:00 2001 From: Yousef Rabia Date: Fri, 1 Mar 2024 17:21:13 +0200 Subject: [PATCH 3/9] remove `skip:true` --- test/widgets/intro_message_test.dart | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/widgets/intro_message_test.dart b/test/widgets/intro_message_test.dart index d5e543bd..4e256c82 100644 --- a/test/widgets/intro_message_test.dart +++ b/test/widgets/intro_message_test.dart @@ -32,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); + }); } From f2810865f2d003f64e6f70eb87f74a2cf65a21c2 Mon Sep 17 00:00:00 2001 From: Chinmay Date: Sat, 2 Mar 2024 20:49:06 +0530 Subject: [PATCH 4/9] Csv Added in readme --- README.md | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/README.md b/README.md index 15dc46e1..7907373d 100644 --- a/README.md +++ b/README.md @@ -185,6 +185,10 @@ Here is the complete list of mimetypes that are syntax highlighted in API Dash: | `text/html` | `.html` | Only syntax highlighting, no web preview. | | `text/javascript` | `.js` | | | `text/markdown` | `.md` | | +| `text/csv` | `. +csv` | +Renders CSV in table format. + | ## What's new in v0.3.0? From 30698ffce4f5014a766b4e88b592b60951df2a2d Mon Sep 17 00:00:00 2001 From: Chinmay Date: Sat, 2 Mar 2024 20:52:27 +0530 Subject: [PATCH 5/9] Table format corrected --- README.md | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/README.md b/README.md index 7907373d..6742de06 100644 --- a/README.md +++ b/README.md @@ -185,10 +185,7 @@ Here is the complete list of mimetypes that are syntax highlighted in API Dash: | `text/html` | `.html` | Only syntax highlighting, no web preview. | | `text/javascript` | `.js` | | | `text/markdown` | `.md` | | -| `text/csv` | `. -csv` | -Renders CSV in table format. - | +| `text/csv` | `.csv` | Renders CSV in tabular form | ## What's new in v0.3.0? From d95d497c9c8478217ebf6a1ccdebe2791f665cbc Mon Sep 17 00:00:00 2001 From: Chinmay Date: Sat, 2 Mar 2024 20:53:12 +0530 Subject: [PATCH 6/9] Type fixed --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 6742de06..ab08478a 100644 --- a/README.md +++ b/README.md @@ -185,7 +185,7 @@ Here is the complete list of mimetypes that are syntax highlighted in API Dash: | `text/html` | `.html` | Only syntax highlighting, no web preview. | | `text/javascript` | `.js` | | | `text/markdown` | `.md` | | -| `text/csv` | `.csv` | Renders CSV in tabular form | +| `text/csv` | `.csv` | Renders CSV in tabular format | ## What's new in v0.3.0? From e20ead29344acd6478b4f6cc619d87922aa1ae74 Mon Sep 17 00:00:00 2001 From: Ashita Prasad Date: Sun, 3 Mar 2024 06:35:50 +0530 Subject: [PATCH 7/9] Update README.md --- README.md | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/README.md b/README.md index ab08478a..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,15 +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/csv` | `.csv` | Renders CSV in tabular format | +| `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? From 6a886df6694a42d60a5465988f6b7b1a827e81c5 Mon Sep 17 00:00:00 2001 From: Ankit Mahato Date: Sun, 3 Mar 2024 13:35:07 +0530 Subject: [PATCH 8/9] Update pull_request_template.md --- .github/pull_request_template.md | 1 - 1 file changed, 1 deletion(-) 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 From 189f0b60d46ed4b3b969f54e02ebfdfbd7847735 Mon Sep 17 00:00:00 2001 From: Apoorv Dwivedi Date: Thu, 7 Mar 2024 00:06:00 +0530 Subject: [PATCH 9/9] Added `Troubleshooting Common Issues` section to CONTRIBUTING.md --- CONTRIBUTING.md | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) 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) + +