From 2a0b3b5f8e7030ae8705e26f1e4d90741a87c28d Mon Sep 17 00:00:00 2001 From: bassam-deriv Date: Wed, 20 Mar 2024 15:54:04 +0400 Subject: [PATCH] test(deriv_passkeys): added mock data passkeysListResponse --- .../connection/api_manager/mock_api.dart | 3 +++ .../passkeys/passkeys_list_response.dart | 17 +++++++++++++++++ 2 files changed, 20 insertions(+) create mode 100644 lib/services/connection/api_manager/mock_data/passkeys/passkeys_list_response.dart diff --git a/lib/services/connection/api_manager/mock_api.dart b/lib/services/connection/api_manager/mock_api.dart index bfc72f2313..2f5374d02e 100644 --- a/lib/services/connection/api_manager/mock_api.dart +++ b/lib/services/connection/api_manager/mock_api.dart @@ -13,6 +13,7 @@ import 'package:flutter_deriv_api/services/connection/api_manager/connection_inf import 'package:flutter_deriv_api/services/connection/api_manager/exceptions/api_manager_exception.dart'; import 'package:flutter_deriv_api/services/connection/api_manager/mock_data/account/new_account_wallet_response.dart'; import 'package:flutter_deriv_api/services/connection/api_manager/mock_data/cashier/cashier_payments_response.dart'; +import 'package:flutter_deriv_api/services/connection/api_manager/mock_data/passkeys/passkeys_list_response.dart'; import 'package:flutter_deriv_api/services/connection/api_manager/mock_data/passkeys/passkeys_register_options_response.dart'; import 'package:flutter_deriv_api/services/connection/api_manager/mock_data/passkeys/passkeys_register_response.dart'; import 'package:flutter_deriv_api/services/connection/call_manager/base_call_manager.dart'; @@ -381,6 +382,8 @@ class MockAPI extends BaseAPI { return passkeysRegisterOptionsResponse; case 'passkeys_register': return passkeysRegisterResponse; + case 'passkeys_list': + return passkeysListResponse; default: throw APIManagerException( diff --git a/lib/services/connection/api_manager/mock_data/passkeys/passkeys_list_response.dart b/lib/services/connection/api_manager/mock_data/passkeys/passkeys_list_response.dart new file mode 100644 index 0000000000..e3386966e0 --- /dev/null +++ b/lib/services/connection/api_manager/mock_data/passkeys/passkeys_list_response.dart @@ -0,0 +1,17 @@ +/// Wallet migration response mock data. +const String passkeysListResponse = '''{ + "echo_req": { + "passkeysList": 1 + }, + "msg_type": "passkeysList", + "passkeysList": [ + { + "created_at": 10000, + "id": "id", + "last_used": 10000, + "name": "Passkey", + "passkey_id": "passkeyId", + "stored_on": "storedOn" + } + ] +}''';