Merge branch 'foss42:main' into add-feature-mobile-layout

This commit is contained in:
Ragul Raj
2024-03-07 15:03:41 +05:30
committed by GitHub
4 changed files with 38 additions and 11 deletions

View File

@@ -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

View File

@@ -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`.
```
<key>com.apple.security.network.client</key>
<true/>
```
You can read more [here](https://docs.flutter.dev/platform-integration/macos/building#setting-up-entitlements)

View File

@@ -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?

View File

@@ -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);
});
}