diff --git a/test/models/history_models.dart b/test/models/history_models.dart index 5deeb655..e33c2f99 100644 --- a/test/models/history_models.dart +++ b/test/models/history_models.dart @@ -9,6 +9,7 @@ import 'http_response_models.dart'; final historyMetaModel1 = HistoryMetaModel( historyId: 'historyId1', requestId: 'requestId1', + apiType: APIType.rest, url: 'https://api.apidash.dev/humanize/social', method: HTTPVerb.get, timeStamp: DateTime(2024, 1, 1), @@ -26,6 +27,7 @@ final historyRequestModel1 = HistoryRequestModel( final historyMetaModel2 = HistoryMetaModel( historyId: 'historyId2', requestId: 'requestId2', + apiType: APIType.rest, url: 'https://api.apidash.dev/case/lower', method: HTTPVerb.post, timeStamp: DateTime(2024, 1, 1), @@ -43,6 +45,7 @@ final historyRequestModel2 = HistoryRequestModel( final Map historyMetaModelJson1 = { "historyId": "historyId1", "requestId": "requestId1", + "apiType": "rest", "name": "", "url": "https://api.apidash.dev/humanize/social", "method": "get", @@ -60,6 +63,7 @@ final Map historyRequestModelJson1 = { final Map historyMetaModelJson2 = { "historyId": "historyId2", "requestId": "requestId2", + "apiType": "rest", "name": "", "url": "https://api.apidash.dev/case/lower", "method": "post", diff --git a/test/models/http_request_models.dart b/test/models/http_request_models.dart index f50dd2df..e3448c30 100644 --- a/test/models/http_request_models.dart +++ b/test/models/http_request_models.dart @@ -388,6 +388,7 @@ const httpRequestModelGet4Json = { "isParamEnabledList": null, "bodyContentType": "json", "body": null, + "query": null, "formData": null }; @@ -408,6 +409,7 @@ const httpRequestModelPost10Json = { "body": '''{ "text": "I LOVE Flutter" }''', + "query": null, 'formData': [ {'name': 'token', 'value': 'xyz', 'type': 'text'}, {'name': 'imfile', 'value': '/Documents/up/1.png', 'type': 'file'} diff --git a/test/widgets/card_history_request_test.dart b/test/widgets/card_history_request_test.dart index 7c811a88..ba3a074b 100644 --- a/test/widgets/card_history_request_test.dart +++ b/test/widgets/card_history_request_test.dart @@ -13,6 +13,7 @@ void main() { final mockModel = HistoryMetaModel( historyId: 'historyId', requestId: 'requestId', + apiType: APIType.rest, url: 'https://api.apidash.dev', method: HTTPVerb.get, timeStamp: DateTime.now(), diff --git a/test/widgets/card_sidebar_history_test.dart b/test/widgets/card_sidebar_history_test.dart index a4d3c0a1..e3022dd3 100644 --- a/test/widgets/card_sidebar_history_test.dart +++ b/test/widgets/card_sidebar_history_test.dart @@ -11,6 +11,7 @@ void main() { HistoryMetaModel( historyId: 'historyId', requestId: 'requestId', + apiType: APIType.rest, url: 'https://api.apidash.dev', method: HTTPVerb.get, timeStamp: DateTime.now(), @@ -30,6 +31,7 @@ void main() { SidebarHistoryCard( id: '1', models: sampleModels, + apiType: APIType.rest, method: HTTPVerb.get, onTap: () { changedValue = 'Tapped'; @@ -68,6 +70,7 @@ void main() { children: [ SidebarHistoryCard( id: '1', + apiType: APIType.rest, models: sampleModels, method: HTTPVerb.get, onTap: () { diff --git a/test/widgets/card_sidebar_request_test.dart b/test/widgets/card_sidebar_request_test.dart index 2d1f2be9..d31b9061 100644 --- a/test/widgets/card_sidebar_request_test.dart +++ b/test/widgets/card_sidebar_request_test.dart @@ -16,6 +16,7 @@ void main() { children: [ SidebarRequestCard( id: '23', + apiType: APIType.rest, selectedId: '2', url: 'https://api.apidash.dev', method: HTTPVerb.get, @@ -61,6 +62,7 @@ void main() { children: [ SidebarRequestCard( id: '2', + apiType: APIType.rest, selectedId: '2', editRequestId: '2', url: 'https://api.apidash.dev', diff --git a/test/widgets/editor_test.dart b/test/widgets/editor_test.dart index 238b432c..12b4991b 100644 --- a/test/widgets/editor_test.dart +++ b/test/widgets/editor_test.dart @@ -1,3 +1,4 @@ +import 'package:apidash/consts.dart'; import 'package:flutter/material.dart'; import 'package:flutter/services.dart'; import 'package:flutter_test/flutter_test.dart'; @@ -28,7 +29,7 @@ void main() { expect(find.byType(TextFormField), findsOneWidget); expect(find.byKey(const Key("2")), findsOneWidget); - expect(find.text('Enter content (body)'), findsOneWidget); + expect(find.text(kHintContent), findsOneWidget); var txtForm = find.byKey(const Key("2")); await tester.enterText(txtForm, 'entering 123 for testing content body'); await tester.pump(); @@ -40,7 +41,7 @@ void main() { await tester.pump(); await tester.pumpAndSettle(); - expect(changedValue, 'entering 123 for testing content body '); + expect(changedValue, 'entering 123 for testing content body '); }); testWidgets('Testing Editor Dark theme', (tester) async { dynamic changedValue; @@ -66,7 +67,7 @@ void main() { expect(find.text('initial'), findsOneWidget); expect(find.byType(TextFormField), findsOneWidget); expect(find.byKey(const Key("2")), findsOneWidget); - expect(find.text('Enter content (body)'), findsOneWidget); + expect(find.text(kHintContent), findsOneWidget); var txtForm = find.byKey(const Key("2")); await tester.enterText(txtForm, 'entering 123 for testing content body'); await tester.pump(); @@ -78,6 +79,6 @@ void main() { await tester.pump(); await tester.pumpAndSettle(); - expect(changedValue, 'entering 123 for testing content body '); + expect(changedValue, 'entering 123 for testing content body '); }); }