From 31186344abea6b5c4e96eea6488f6b290c3fe492 Mon Sep 17 00:00:00 2001 From: Alex Kutsan Date: Fri, 1 Jul 2016 10:14:05 +0300 Subject: [PATCH 01/64] Common scripts added --- ...itApplication_Unsupported_HMI_Resource.lua | 2128 + test_scripts/API/ATC_RequestType.lua | 593 + ...SetGlobalProperties_vrHelp_vrHelpTitle.lua | 812 + test_scripts/API/ATF_AddCommand.lua | 12515 ++++++ test_scripts/{ => API}/ATF_AddSubMenu.lua | 392 +- .../API/ATF_All_RPCs_and_Notifications.lua | 2905 ++ .../ATF_BasicCommunication_OnDeviceChosen.lua | 100 + ...TF_BasicCommunication_OnEmergencyEvent.lua | 98 + .../ATF_BasicCommunication_OnPhoneCall.lua | 101 + .../API/ATF_BasicCommunication_OnReady.lua | 384 + ...cCommunication_OnStartDeviceDiscovery .lua | 159 + .../API/ATF_CreateInteractionChoiceSet.lua | 7399 +++ test_scripts/API/ATF_DeleteCommand.lua | 4142 ++ test_scripts/API/ATF_DeleteFile.lua | 2529 ++ .../API/ATF_DeleteInteractionChoiceSet.lua | 1774 + test_scripts/API/ATF_DeleteSubMenu.lua | 2248 + test_scripts/API/ATF_DialNumber.lua | 1890 + test_scripts/API/ATF_EndAudioPassThru.lua | 3161 ++ test_scripts/API/ATF_GenericResponse.lua | 515 + test_scripts/API/ATF_GetDTCs.lua | 1929 + test_scripts/API/ATF_ListFiles.lua | 1196 + ...tonSubscription_if_subscription_failed.lua | 514 + ...nSubscription_if_unsubscription_failed.lua | 295 + test_scripts/API/ATF_OnAppDeactivated.lua | 804 + ...InterfaceUnregister_PROTOCOL_VIOLATION.lua | 338 + .../API/ATF_OnAppInterfaceUnregistered.lua | 1777 + ...stered_REQUEST_WHILE_IN_NONE_HMI_LEVEL.lua | 81 + ...nterfaceUnregistered_TOO_MANY_REQUESTS.lua | 268 + test_scripts/API/ATF_OnAppUnregistered.lua | 737 + ...udioDataStreaming_OnVideoDataStreaming.lua | 982 + test_scripts/API/ATF_OnButtonPress.lua | 1301 + test_scripts/API/ATF_OnCommand.lua | 1970 + .../{ => API}/ATF_OnDriverDistraction.lua | 513 +- .../ATF_OnEventChanged_EMERGENCY_EVENT.lua | 1031 + .../API/ATF_OnEventChanged_PHONE_CALL.lua | 1582 + test_scripts/API/ATF_OnHMIStatus.lua | 2862 ++ test_scripts/API/ATF_OnKeyboardInput.lua | 862 + test_scripts/API/ATF_OnPermissionsChange.lua | 2232 + .../API/ATF_OnScreenPresetsAvailable.lua | 1035 + test_scripts/API/ATF_OnTBTClientState.lua | 537 + test_scripts/API/ATF_OnTouchEvent.lua | 1695 + test_scripts/API/ATF_PerformAudioPassThru.lua | 8650 ++++ test_scripts/API/ATF_PerformInteraction.lua | 10028 +++++ test_scripts/API/ATF_PutFile.lua | 5814 +++ test_scripts/API/ATF_ReadDID.lua | 3643 ++ test_scripts/API/ATF_RegisterAppInterface.lua | 13567 ++++++ .../API/ATF_ResetGlobalProperties.lua | 7616 ++++ test_scripts/API/ATF_ScrollableMessage.lua | 5050 +++ test_scripts/API/ATF_SetAppIcon.lua | 2417 + test_scripts/API/ATF_SetDisplayLayout.lua | 11958 +++++ test_scripts/API/ATF_SetGlobalProperties.lua | 37116 ++++++++++++++++ .../{ => API}/ATF_SetMediaClockTimer.lua | 1956 +- .../API/ATF_SetMediaClockTimer_nonMedia.lua | 2193 + test_scripts/API/ATF_Show.lua | 5050 +++ test_scripts/API/ATF_ShowConstantTBT.lua | 3727 ++ test_scripts/{ => API}/ATF_Slider.lua | 1356 +- test_scripts/{ => API}/ATF_Speak.lua | 1026 +- .../API/ATF_StopStream_StopAudioStream.lua | 392 + test_scripts/API/ATF_SubscribeButton.lua | 2303 + test_scripts/API/ATF_SubscribeVehicleData.lua | 3573 ++ test_scripts/API/ATF_SystemRequest.lua | 2643 ++ test_scripts/API/ATF_UIChangeRegistration.lua | 2066 + .../API/ATF_UnregisterAppInterface.lua | 789 + .../ATF_UnregisterAppInterface_nonMedia.lua | 857 + test_scripts/API/ATF_UnsubscribeButton.lua | 1444 + test_scripts/API/ATF_UpdateTurnList.lua | 4921 ++ test_scripts/API/ATF_VehicleInfo_IsReady.lua | 1100 + .../ATF_VehicleType_in_RAI_APPLINK-9945.lua | 517 + test_scripts/API/ATF_WARNINGS_result_code.lua | 4605 ++ test_scripts/ATF_UpdateDeviceList.lua | 1433 - .../ATF_Buttons_GetCapabilities.lua | 683 + ...ATF_Buttons_GetCapabilities_ButtonName.lua | 525 + ...uttonsCapabilities_array_APPLINK-11829.lua | 1717 + .../Languages/ATF_OnLanguageChange.lua | 922 + ..._OnLanguageChange_additional_languages.lua | 1335 + test_scripts/Languages/GetLanguage_EL-GR.lua | 341 + test_scripts/Languages/GetLanguage_FI-FI.lua | 340 + test_scripts/Languages/GetLanguage_HU-HU.lua | 339 + test_scripts/Languages/GetLanguage_NL-BE.lua | 340 + test_scripts/Languages/GetLanguage_SK-SK.lua | 340 + .../ATF_Configure_ResumingTimeout.lua | 2412 + .../Resumption/ATF_Resumption_HMI_level.lua | 2423 + .../ATF_Resumption_HMI_level_postpone.lua | 7163 +++ .../ATF_Resumption_MultiDevices.lua | 760 + .../Resumption/ATF_Resumption_MutilApps.lua | 11457 +++++ ...F_AddCommand_TOO_MANY_PENDING_REQUESTS.lua | 128 + ...F_AddSubMenu_TOO_MANY_PENDING_REQUESTS.lua | 78 + ...lertManeuver_TOO_MANY_PENDING_REQUESTS.lua | 131 + ...Registration_TOO_MANY_PENDING_REQUESTS.lua | 160 + ...ionChoiceSet_TOO_MANY_PENDING_REQUESTS.lua | 168 + ...eleteCommand_TOO_MANY_PENDING_REQUESTS.lua | 246 + ...F_DeleteFile_TOO_MANY_PENDING_REQUESTS.lua | 86 + ...ionChoiceSet_TOO_MANY_PENDING_REQUESTS.lua | 225 + ...eleteSubMenu_TOO_MANY_PENDING_REQUESTS.lua | 130 + ...osticMessage_TOO_MANY_PENDING_REQUESTS.lua | 104 + ...F_DialNumber_TOO_MANY_PENDING_REQUESTS.lua | 148 + ...udioPassThru_TOO_MANY_PENDING_REQUESTS.lua | 94 + .../ATF_GetDTCs_TOO_MANY_PENDING_REQUESTS.lua | 86 + ...tVehicleData_TOO_MANY_PENDING_REQUESTS.lua | 236 + ...TF_ListFiles_TOO_MANY_PENDING_REQUESTS.lua | 70 + ...udioPassThru_TOO_MANY_PENDING_REQUESTS.lua | 151 + ...mInteraction_TOO_MANY_PENDING_REQUESTS.lua | 273 + .../ATF_PutFile_TOO_MANY_PENDING_REQUESTS.lua | 85 + .../ATF_ReadDID_TOO_MANY_PENDING_REQUESTS.lua | 79 + ...AppInterface_TOO_MANY_PENDING_REQUESTS.lua | 231 + ...alProperties_TOO_MANY_PENDING_REQUESTS.lua | 168 + ...lableMessage_TOO_MANY_PENDING_REQUESTS.lua | 94 + ...SendLocation_TOO_MANY_PENDING_REQUESTS.lua | 84 + ...F_SetAppIcon_TOO_MANY_PENDING_REQUESTS.lua | 78 + ...isplayLayout_TOO_MANY_PENDING_REQUESTS.lua | 139 + ...alProperties_TOO_MANY_PENDING_REQUESTS.lua | 204 + ...iaClockTimer_TOO_MANY_PENDING_REQUESTS.lua | 153 + ...wConstantTBT_TOO_MANY_PENDING_REQUESTS.lua | 161 + .../ATF_Show_TOO_MANY_PENDING_REQUESTS.lua | 149 + .../ATF_Slider_TOO_MANY_PENDING_REQUEST.lua | 114 + .../ATF_Speak_TOO_MANY_PENDING_REQUESTS.lua | 113 + ...scribeButton_TOO_MANY_PENDING_REQUESTS.lua | 130 + ...eVehicleData_TOO_MANY_PENDING_REQUESTS.lua | 219 + ...ystemRequest_TOO_MANY_PENDING_REQUESTS.lua | 260 + ...AppInterface_TOO_MANY_PENDING_REQUESTS.lua | 777 + ...scribeButton_TOO_MANY_PENDING_REQUESTS.lua | 156 + ...eVehicleData_TOO_MANY_PENDING_REQUESTS.lua | 252 + ...ibeWayPoints_TOO_MANY_PENDING_REQUESTS.lua | 134 + ...dateTurnList_TOO_MANY_PENDING_REQUESTS.lua | 265 + ...erAppInterface_UNSUPPORTED_RESOURCE_01.lua | 90 + ...erAppInterface_UNSUPPORTED_RESOURCE_02.lua | 90 + ...erAppInterface_UNSUPPORTED_RESOURCE_03.lua | 90 + ...erAppInterface_UNSUPPORTED_RESOURCE_04.lua | 90 + ...gisterAppInterface_UNSUPPORTED_VERSION.lua | 102 + ...ScrollableMessage_UNSUPPORTED_RESOURCE.lua | 109 + ...F_ShowConstantTBT_UNSUPPORTED_RESOURCE.lua | 79 + .../ATF_Slider_UNSUPPORTED_RESOURCE.lua | 76 + test_scripts/ivsu/ATC_IVSU_01.lua | 214 + test_scripts/ivsu/ATC_IVSU_02.lua | 82 + test_scripts/ivsu/ATC_IVSU_03.lua | 146 + test_scripts/ivsu/ATC_IVSU_04.lua | 90 + test_scripts/ivsu/ATC_IVSU_05.lua | 90 + test_scripts/ivsu/ATC_IVSU_06.lua | 90 + test_scripts/ivsu/ATC_IVSU_07.lua | 92 + test_scripts/ivsu/ATC_IVSU_08.lua | 116 + test_scripts/ivsu/ATC_IVSU_09.lua | 84 + 141 files changed, 251570 insertions(+), 4012 deletions(-) create mode 100644 test_scripts/API/ATC_OnExitApplication_Unsupported_HMI_Resource.lua create mode 100644 test_scripts/API/ATC_RequestType.lua create mode 100644 test_scripts/API/ATC_SetGlobalProperties_vrHelp_vrHelpTitle.lua create mode 100644 test_scripts/API/ATF_AddCommand.lua rename test_scripts/{ => API}/ATF_AddSubMenu.lua (90%) create mode 100644 test_scripts/API/ATF_All_RPCs_and_Notifications.lua create mode 100644 test_scripts/API/ATF_BasicCommunication_OnDeviceChosen.lua create mode 100644 test_scripts/API/ATF_BasicCommunication_OnEmergencyEvent.lua create mode 100644 test_scripts/API/ATF_BasicCommunication_OnPhoneCall.lua create mode 100644 test_scripts/API/ATF_BasicCommunication_OnReady.lua create mode 100644 test_scripts/API/ATF_BasicCommunication_OnStartDeviceDiscovery .lua create mode 100644 test_scripts/API/ATF_CreateInteractionChoiceSet.lua create mode 100644 test_scripts/API/ATF_DeleteCommand.lua create mode 100644 test_scripts/API/ATF_DeleteFile.lua create mode 100644 test_scripts/API/ATF_DeleteInteractionChoiceSet.lua create mode 100644 test_scripts/API/ATF_DeleteSubMenu.lua create mode 100644 test_scripts/API/ATF_DialNumber.lua create mode 100644 test_scripts/API/ATF_EndAudioPassThru.lua create mode 100644 test_scripts/API/ATF_GenericResponse.lua create mode 100644 test_scripts/API/ATF_GetDTCs.lua create mode 100644 test_scripts/API/ATF_ListFiles.lua create mode 100644 test_scripts/API/ATF_No_OnButtonSubscription_if_subscription_failed.lua create mode 100644 test_scripts/API/ATF_No_OnButtonSubscription_if_unsubscription_failed.lua create mode 100644 test_scripts/API/ATF_OnAppDeactivated.lua create mode 100644 test_scripts/API/ATF_OnAppInterfaceUnregister_PROTOCOL_VIOLATION.lua create mode 100644 test_scripts/API/ATF_OnAppInterfaceUnregistered.lua create mode 100644 test_scripts/API/ATF_OnAppInterfaceUnregistered_REQUEST_WHILE_IN_NONE_HMI_LEVEL.lua create mode 100644 test_scripts/API/ATF_OnAppInterfaceUnregistered_TOO_MANY_REQUESTS.lua create mode 100644 test_scripts/API/ATF_OnAppUnregistered.lua create mode 100644 test_scripts/API/ATF_OnAudioDataStreaming_OnVideoDataStreaming.lua create mode 100644 test_scripts/API/ATF_OnButtonPress.lua create mode 100644 test_scripts/API/ATF_OnCommand.lua rename test_scripts/{ => API}/ATF_OnDriverDistraction.lua (86%) create mode 100644 test_scripts/API/ATF_OnEventChanged_EMERGENCY_EVENT.lua create mode 100644 test_scripts/API/ATF_OnEventChanged_PHONE_CALL.lua create mode 100644 test_scripts/API/ATF_OnHMIStatus.lua create mode 100644 test_scripts/API/ATF_OnKeyboardInput.lua create mode 100644 test_scripts/API/ATF_OnPermissionsChange.lua create mode 100644 test_scripts/API/ATF_OnScreenPresetsAvailable.lua create mode 100644 test_scripts/API/ATF_OnTBTClientState.lua create mode 100644 test_scripts/API/ATF_OnTouchEvent.lua create mode 100644 test_scripts/API/ATF_PerformAudioPassThru.lua create mode 100644 test_scripts/API/ATF_PerformInteraction.lua create mode 100644 test_scripts/API/ATF_PutFile.lua create mode 100644 test_scripts/API/ATF_ReadDID.lua create mode 100644 test_scripts/API/ATF_RegisterAppInterface.lua create mode 100644 test_scripts/API/ATF_ResetGlobalProperties.lua create mode 100644 test_scripts/API/ATF_ScrollableMessage.lua create mode 100644 test_scripts/API/ATF_SetAppIcon.lua create mode 100644 test_scripts/API/ATF_SetDisplayLayout.lua create mode 100644 test_scripts/API/ATF_SetGlobalProperties.lua rename test_scripts/{ => API}/ATF_SetMediaClockTimer.lua (88%) create mode 100644 test_scripts/API/ATF_SetMediaClockTimer_nonMedia.lua create mode 100644 test_scripts/API/ATF_Show.lua create mode 100644 test_scripts/API/ATF_ShowConstantTBT.lua rename test_scripts/{ => API}/ATF_Slider.lua (91%) rename test_scripts/{ => API}/ATF_Speak.lua (91%) create mode 100644 test_scripts/API/ATF_StopStream_StopAudioStream.lua create mode 100644 test_scripts/API/ATF_SubscribeButton.lua create mode 100644 test_scripts/API/ATF_SubscribeVehicleData.lua create mode 100644 test_scripts/API/ATF_SystemRequest.lua create mode 100644 test_scripts/API/ATF_UIChangeRegistration.lua create mode 100644 test_scripts/API/ATF_UnregisterAppInterface.lua create mode 100644 test_scripts/API/ATF_UnregisterAppInterface_nonMedia.lua create mode 100644 test_scripts/API/ATF_UnsubscribeButton.lua create mode 100644 test_scripts/API/ATF_UpdateTurnList.lua create mode 100644 test_scripts/API/ATF_VehicleInfo_IsReady.lua create mode 100644 test_scripts/API/ATF_VehicleType_in_RAI_APPLINK-9945.lua create mode 100644 test_scripts/API/ATF_WARNINGS_result_code.lua delete mode 100644 test_scripts/ATF_UpdateDeviceList.lua create mode 100644 test_scripts/Capabilities/ATF_Buttons_GetCapabilities.lua create mode 100644 test_scripts/Capabilities/ATF_Buttons_GetCapabilities_ButtonName.lua create mode 100644 test_scripts/Capabilities/ATF_SoftButtonsCapabilities_array_APPLINK-11829.lua create mode 100644 test_scripts/Languages/ATF_OnLanguageChange.lua create mode 100644 test_scripts/Languages/ATF_OnLanguageChange_additional_languages.lua create mode 100644 test_scripts/Languages/GetLanguage_EL-GR.lua create mode 100644 test_scripts/Languages/GetLanguage_FI-FI.lua create mode 100644 test_scripts/Languages/GetLanguage_HU-HU.lua create mode 100644 test_scripts/Languages/GetLanguage_NL-BE.lua create mode 100644 test_scripts/Languages/GetLanguage_SK-SK.lua create mode 100644 test_scripts/Resumption/ATF_Configure_ResumingTimeout.lua create mode 100644 test_scripts/Resumption/ATF_Resumption_HMI_level.lua create mode 100644 test_scripts/Resumption/ATF_Resumption_HMI_level_postpone.lua create mode 100644 test_scripts/Resumption/ATF_Resumption_MultiDevices.lua create mode 100644 test_scripts/Resumption/ATF_Resumption_MutilApps.lua create mode 100644 test_scripts/TOO_MANY_PENDING_REQUESTS/ATF_AddCommand_TOO_MANY_PENDING_REQUESTS.lua create mode 100644 test_scripts/TOO_MANY_PENDING_REQUESTS/ATF_AddSubMenu_TOO_MANY_PENDING_REQUESTS.lua create mode 100644 test_scripts/TOO_MANY_PENDING_REQUESTS/ATF_AlertManeuver_TOO_MANY_PENDING_REQUESTS.lua create mode 100644 test_scripts/TOO_MANY_PENDING_REQUESTS/ATF_ChangeRegistration_TOO_MANY_PENDING_REQUESTS.lua create mode 100644 test_scripts/TOO_MANY_PENDING_REQUESTS/ATF_CreateInteractionChoiceSet_TOO_MANY_PENDING_REQUESTS.lua create mode 100644 test_scripts/TOO_MANY_PENDING_REQUESTS/ATF_DeleteCommand_TOO_MANY_PENDING_REQUESTS.lua create mode 100644 test_scripts/TOO_MANY_PENDING_REQUESTS/ATF_DeleteFile_TOO_MANY_PENDING_REQUESTS.lua create mode 100644 test_scripts/TOO_MANY_PENDING_REQUESTS/ATF_DeleteInteractionChoiceSet_TOO_MANY_PENDING_REQUESTS.lua create mode 100644 test_scripts/TOO_MANY_PENDING_REQUESTS/ATF_DeleteSubMenu_TOO_MANY_PENDING_REQUESTS.lua create mode 100644 test_scripts/TOO_MANY_PENDING_REQUESTS/ATF_DiagnosticMessage_TOO_MANY_PENDING_REQUESTS.lua create mode 100644 test_scripts/TOO_MANY_PENDING_REQUESTS/ATF_DialNumber_TOO_MANY_PENDING_REQUESTS.lua create mode 100644 test_scripts/TOO_MANY_PENDING_REQUESTS/ATF_EndAudioPassThru_TOO_MANY_PENDING_REQUESTS.lua create mode 100644 test_scripts/TOO_MANY_PENDING_REQUESTS/ATF_GetDTCs_TOO_MANY_PENDING_REQUESTS.lua create mode 100644 test_scripts/TOO_MANY_PENDING_REQUESTS/ATF_GetVehicleData_TOO_MANY_PENDING_REQUESTS.lua create mode 100644 test_scripts/TOO_MANY_PENDING_REQUESTS/ATF_ListFiles_TOO_MANY_PENDING_REQUESTS.lua create mode 100644 test_scripts/TOO_MANY_PENDING_REQUESTS/ATF_PerformAudioPassThru_TOO_MANY_PENDING_REQUESTS.lua create mode 100644 test_scripts/TOO_MANY_PENDING_REQUESTS/ATF_PerformInteraction_TOO_MANY_PENDING_REQUESTS.lua create mode 100644 test_scripts/TOO_MANY_PENDING_REQUESTS/ATF_PutFile_TOO_MANY_PENDING_REQUESTS.lua create mode 100644 test_scripts/TOO_MANY_PENDING_REQUESTS/ATF_ReadDID_TOO_MANY_PENDING_REQUESTS.lua create mode 100644 test_scripts/TOO_MANY_PENDING_REQUESTS/ATF_RegisterAppInterface_TOO_MANY_PENDING_REQUESTS.lua create mode 100644 test_scripts/TOO_MANY_PENDING_REQUESTS/ATF_ResetGlobalProperties_TOO_MANY_PENDING_REQUESTS.lua create mode 100644 test_scripts/TOO_MANY_PENDING_REQUESTS/ATF_ScrollableMessage_TOO_MANY_PENDING_REQUESTS.lua create mode 100644 test_scripts/TOO_MANY_PENDING_REQUESTS/ATF_SendLocation_TOO_MANY_PENDING_REQUESTS.lua create mode 100644 test_scripts/TOO_MANY_PENDING_REQUESTS/ATF_SetAppIcon_TOO_MANY_PENDING_REQUESTS.lua create mode 100644 test_scripts/TOO_MANY_PENDING_REQUESTS/ATF_SetDisplayLayout_TOO_MANY_PENDING_REQUESTS.lua create mode 100644 test_scripts/TOO_MANY_PENDING_REQUESTS/ATF_SetGlobalProperties_TOO_MANY_PENDING_REQUESTS.lua create mode 100644 test_scripts/TOO_MANY_PENDING_REQUESTS/ATF_SetMediaClockTimer_TOO_MANY_PENDING_REQUESTS.lua create mode 100644 test_scripts/TOO_MANY_PENDING_REQUESTS/ATF_ShowConstantTBT_TOO_MANY_PENDING_REQUESTS.lua create mode 100644 test_scripts/TOO_MANY_PENDING_REQUESTS/ATF_Show_TOO_MANY_PENDING_REQUESTS.lua create mode 100644 test_scripts/TOO_MANY_PENDING_REQUESTS/ATF_Slider_TOO_MANY_PENDING_REQUEST.lua create mode 100644 test_scripts/TOO_MANY_PENDING_REQUESTS/ATF_Speak_TOO_MANY_PENDING_REQUESTS.lua create mode 100644 test_scripts/TOO_MANY_PENDING_REQUESTS/ATF_SubscribeButton_TOO_MANY_PENDING_REQUESTS.lua create mode 100644 test_scripts/TOO_MANY_PENDING_REQUESTS/ATF_SubscribeVehicleData_TOO_MANY_PENDING_REQUESTS.lua create mode 100644 test_scripts/TOO_MANY_PENDING_REQUESTS/ATF_SystemRequest_TOO_MANY_PENDING_REQUESTS.lua create mode 100644 test_scripts/TOO_MANY_PENDING_REQUESTS/ATF_UnregisterAppInterface_TOO_MANY_PENDING_REQUESTS.lua create mode 100644 test_scripts/TOO_MANY_PENDING_REQUESTS/ATF_UnsubscribeButton_TOO_MANY_PENDING_REQUESTS.lua create mode 100644 test_scripts/TOO_MANY_PENDING_REQUESTS/ATF_UnsubscribeVehicleData_TOO_MANY_PENDING_REQUESTS.lua create mode 100644 test_scripts/TOO_MANY_PENDING_REQUESTS/ATF_UnsubscribeWayPoints_TOO_MANY_PENDING_REQUESTS.lua create mode 100644 test_scripts/TOO_MANY_PENDING_REQUESTS/ATF_UpdateTurnList_TOO_MANY_PENDING_REQUESTS.lua create mode 100644 test_scripts/UNSUPPORTED_RESOURCE_VERSION/ATF_RegisterAppInterface_UNSUPPORTED_RESOURCE_01.lua create mode 100644 test_scripts/UNSUPPORTED_RESOURCE_VERSION/ATF_RegisterAppInterface_UNSUPPORTED_RESOURCE_02.lua create mode 100644 test_scripts/UNSUPPORTED_RESOURCE_VERSION/ATF_RegisterAppInterface_UNSUPPORTED_RESOURCE_03.lua create mode 100644 test_scripts/UNSUPPORTED_RESOURCE_VERSION/ATF_RegisterAppInterface_UNSUPPORTED_RESOURCE_04.lua create mode 100644 test_scripts/UNSUPPORTED_RESOURCE_VERSION/ATF_RegisterAppInterface_UNSUPPORTED_VERSION.lua create mode 100644 test_scripts/UNSUPPORTED_RESOURCE_VERSION/ATF_ScrollableMessage_UNSUPPORTED_RESOURCE.lua create mode 100644 test_scripts/UNSUPPORTED_RESOURCE_VERSION/ATF_ShowConstantTBT_UNSUPPORTED_RESOURCE.lua create mode 100644 test_scripts/UNSUPPORTED_RESOURCE_VERSION/ATF_Slider_UNSUPPORTED_RESOURCE.lua create mode 100644 test_scripts/ivsu/ATC_IVSU_01.lua create mode 100644 test_scripts/ivsu/ATC_IVSU_02.lua create mode 100644 test_scripts/ivsu/ATC_IVSU_03.lua create mode 100644 test_scripts/ivsu/ATC_IVSU_04.lua create mode 100644 test_scripts/ivsu/ATC_IVSU_05.lua create mode 100644 test_scripts/ivsu/ATC_IVSU_06.lua create mode 100644 test_scripts/ivsu/ATC_IVSU_07.lua create mode 100644 test_scripts/ivsu/ATC_IVSU_08.lua create mode 100644 test_scripts/ivsu/ATC_IVSU_09.lua diff --git a/test_scripts/API/ATC_OnExitApplication_Unsupported_HMI_Resource.lua b/test_scripts/API/ATC_OnExitApplication_Unsupported_HMI_Resource.lua new file mode 100644 index 0000000000..e51799df98 --- /dev/null +++ b/test_scripts/API/ATC_OnExitApplication_Unsupported_HMI_Resource.lua @@ -0,0 +1,2128 @@ +-- Uncomment TODO in script after fixing APPLINK-20884 + +-- Related test is https://adc.luxoft.com/jira/browse/APPLINK-20898 +Test = require('connecttest') +require('cardinalities') + +local mobile_session = require('mobile_session') +local mobile = require('mobile_connection') +local tcp = require('tcp_connection') +local file_connection = require('file_connection') + +config.deviceMAC = "12ca17b49af2289436f303e0166030a21e525d266e209267433801a8fd4071a0" +config.preloaded = config.pathToSDL .. 'sdl_preloaded_pt.json' +local defaultSection = "\t\"default\": {\n\t\"keep_context\": false,\n\t\"steal_focus\": false,\n\t\"priority\": \"NONE\",\n\t\"default_hmi\": \"NONE\",\n\t\"groups\": [\"Base-4\", \"Location-1\"]\n\t}" +local preDataSection = "\t\"pre_DataConsent\": {\n\t\"keep_context\": false,\n\t\"steal_focus\": false,\n\t\"priority\": \"NONE\",\n\t\"default_hmi\": \"NONE\",\n\t\"groups\": [\"BaseBeforeDataConsent\", \"Location-1\"]\n\t}" +local policiesParentSection = tostring("app_policies") + +local mobileResponseTimeout = 10000 +local indexOfTests = 1 +Test.HMIappId = nil +Test.HMIappIdTwo = nil +Test.HMIappIdThree = nil + +local applicationData = +{ + mediaApp = { + syncMsgVersion = + { + majorVersion = 3, + minorVersion = 3 + }, + appName = "TestAppMedia", + isMediaApplication = true, + languageDesired = 'EN-US', + hmiDisplayLanguageDesired = 'EN-US', + appHMIType = { "DEFAULT" }, + appID = "0000002", + deviceInfo = + { + os = "Android", + carrier = "Megafon", + firmwareRev = "Name: Linux, Version: 3.4.0-perf", + osVersion = "4.4.2", + maxNumberRFCOMMPorts = 1 + } + }, + nonmediaApp = { + syncMsgVersion = + { + majorVersion = 3, + minorVersion = 3 + }, + appName = "TestAppNonMedia", + isMediaApplication = false, + languageDesired = 'EN-US', + hmiDisplayLanguageDesired = 'EN-US', + appHMIType = { "DEFAULT" }, + appID = "0000003", + deviceInfo = + { + os = "Android", + carrier = "Megafon", + firmwareRev = "Name: Linux, Version: 3.4.0-perf", + osVersion = "4.4.2", + maxNumberRFCOMMPorts = 1 + } + }, + navigationAppOne = { + syncMsgVersion = + { + majorVersion = 3, + minorVersion = 3 + }, + appName = "NavigationApp1", + isMediaApplication = false, + languageDesired = 'EN-US', + hmiDisplayLanguageDesired = 'EN-US', + appHMIType = { "NAVIGATION" }, + appID = "0000004", + deviceInfo = + { + os = "Android", + carrier = "Megafon", + firmwareRev = "Name: Linux, Version: 3.4.0-perf", + osVersion = "4.4.2", + maxNumberRFCOMMPorts = 1 + } + }, + navigationAppTwo = { + syncMsgVersion = + { + majorVersion = 3, + minorVersion = 3 + }, + appName = "NavigationApp2", + isMediaApplication = false, + languageDesired = 'EN-US', + hmiDisplayLanguageDesired = 'EN-US', + appHMIType = { "NAVIGATION" }, + appID = "0000005", + deviceInfo = + { + os = "Android", + carrier = "Megafon", + firmwareRev = "Name: Linux, Version: 3.4.0-perf", + osVersion = "4.4.2", + maxNumberRFCOMMPorts = 1 + } + } +} + +--------------------------------------------------------------------------------------------- +-------------------------------------------Common function----------------------------------- +--------------------------------------------------------------------------------------------- + + +local commonSteps = require('user_modules/shared_testcases/commonSteps') +local commonFunctions = require('user_modules/shared_testcases/commonFunctions') +local commonPreconditions = require('user_modules/shared_testcases/commonPreconditions') +local policyTable = require('user_modules/shared_testcases/testCasesForPolicyTable') +require('user_modules/AppTypes') + + + +local function sleep(sec) + -- body + os.execute("sleep " .. sec) +end + +local function userPrint( color, message) + print ("\27[" .. tostring(color) .. "m " .. tostring(message) .. " \27[0m") +end + +local function info(message) + -- body + userPrint(33, message) +end + +local function preconditionHead() + -- body + userPrint(35, "================= Precondition ==================") +end + +local function preconditionMessage(message) + -- body + userPrint(35, message) +end + +local function testHead() + -- body + userPrint(34, "=================== Test Case ===================") +end + +local function testMessage(message) + -- body + userPrint(34, message) +end + +function DelayedExp(time) + time = time or 2000 + + local event = events.Event() + event.matches = function(self, e) return self == e end + EXPECT_EVENT(event, "Delayed event") + :Timeout(time+500) + RUN_AFTER(function() + RAISE_EVENT(event, event) + end, time) +end + +local function IsStringInAppInfoDat(str) + -- body + local iniFilePath = config.pathToSDL .. "app_info.dat" + local iniFile = io.open(iniFilePath) + if iniFile then + for line in iniFile:lines() do + if line:match(str) then + return true + end + end + else + return false + end +end + +--------------------------------------------------------------------------------------------- +--------------------------------------End Common function------------------------------------ +--------------------------------------------------------------------------------------------- + + +--------------------------------------------------------------------------------------------- +-------------------------------------Test Common function------------------------------------ +--------------------------------------------------------------------------------------------- + +function Test:replaceSection(parentSection, dest_section, src_section) + -- body + local preloadedFilePath = config.preloaded + local preloadedFile = io.open(preloadedFilePath, "r") + sContent = "" + local continue = false + local appPoliciesFlag = false + if preloadedFile then + for line in preloadedFile:lines() do + if continue == false then + if line:match(parentSection) then + -- we are at app_policies section + appPoliciesFlag = true + end + if line:match(dest_section) and appPoliciesFlag == true then + if line:match("},") then + -- we are at the end of the section located in the middle of parent section + sContent = sContent .. src_section .. ',\n' + continue = false + elseif line:match("}") then + -- we are at the end of the section located in the end of parent section + sContent = sContent .. src_section .. '\n' + continue = false + else + continue = true + end + else + sContent = sContent .. line .. '\n' + end + -- section is located in several strings + else + if line:match("},") then + -- we are at the end of the section located in the middle of parent section + sContent = sContent .. src_section .. ',\n' + continue = false + elseif line:match("}") then + -- we are at the end of the section located in the end of parent section + sContent = sContent .. src_section .. '\n' + continue = false + else + continue = true + end + end + end + end + preloadedFile:close() + + preloadedFile = io.open(preloadedFilePath, "w") + preloadedFile:write(sContent) + preloadedFile:close() +end + +function Test:registerApp(session, params, expNumOfApps) + preconditionHead() + preconditionMessage("Register Application") + + -- session = session or self.mobileSession + params = params or config.application1.registerAppInterfaceParams + expNumOfApps = expNumOfApps or 1 + + --mobile side: sending request + local cidRAI = session:SendRPC("RegisterAppInterface", params) + + --hmi side: expect BasicCommunication.OnAppRegistered request + EXPECT_HMINOTIFICATION("BasicCommunication.OnAppRegistered") + :Do(function(_,data) + local appId = data.params.application.appID + if session == self.mobileSession then + self.HMIappId = appId + info("Test.HMIappId: " .. self.HMIappId) + elseif session == self.mobileSession2 then + self.HMIappIdTwo = appId + info("Test.HMIappIdTwo: " .. self.HMIappIdTwo) + else + self.HMIappIdThree = appId + info("Test.HMIappIdThree: " .. self.HMIappIdThree) + end + end) + + --hmi side: BasicCommunication.UpdateAppList + EXPECT_HMICALL("BasicCommunication.UpdateAppList") + :ValidIf(function(_,data) + if #data.params.applications == expNumOfApps then + return true + else + print(" \27[36m Application array in BasicCommunication.UpdateAppList contains " .. + tostring(#data.params.applications)..", expected " .. expNumOfApps .. "\27[0m") + return false + end + end) + :Do(function(_,data) + --hmi side: sending BasicCommunication.UpdateAppList response + self.hmiConnection:SendResponse(data.id, data.method, "SUCCESS", {}) + end) + + --mobile side: expect response + session:ExpectResponse(cidRAI, + { + hmiDisplayLanguage = config.application1.hmiDisplayLanguageDesired, + language = config.application1.languageDesired, + resultCode = "SUCCESS", + success = true + }) + :Timeout(2000) + + --mobile side: expect notification + session:ExpectNotification("OnHMIStatus", + { + systemContext = "MAIN", hmiLevel = "NONE", audioStreamingState = "NOT_AUDIBLE" + }) + :Timeout(2000) + :Times(1) + + -- --mobile side: expect notification + -- session:ExpectNotification("OnPermissionsChange") + -- :Timeout(2000) + -- :Times(1) + + DelayedExp() +end + +function Test:sendUnsupportedHMIResource(session, applicationID, timeToWait) + -- body + -- session = session or self.mobileSession + timeToWait = timeToWait or 1500 + -- applicationID = applicationID or tostring(self.HMIappId) + info(applicationID) + + --hmi side: sending BasicCommunication.OnExitApplication notification + self.hmiConnection:SendNotification("BasicCommunication.OnExitApplication",{ appID = applicationID, reason = "UNSUPPORTED_HMI_RESOURCE" }) + + --mobile side: expect notification + session:ExpectNotification("OnAppInterfaceUnregistered", + { + reason = "UNSUPPORTED_HMI_RESOURCE" + }) + :Timeout(2000) + :Times(1) + + --mobile side: expect notification + EXPECT_HMINOTIFICATION("BasicCommunication.OnAppUnregistered", {appID = applicationID, unexpectedDisconnect = false}) + :Times(1) + + -- TODO start: uncommment after fixing bug APPLINK-20884 + --req. APPLINK-20647 + --hmi side: BasicCommunication.UpdateAppList + -- EXPECT_HMICALL("BasicCommunication.UpdateAppList") + -- :ValidIf(function(_,data) + -- if #data.params.applications == 0 then + -- return true + -- else + -- print(" \27[36m Application array in BasicCommunication.UpdateAppList contains "..tostring(#data.params.applications)..", expected 0 \27[0m") + -- return false + -- end + -- end) + -- :Do(function(_,data) + -- --hmi side: sending BasicCommunication.UpdateAppList response + -- self.hmiConnection:SendResponse(data.id, data.method, "SUCCESS", {}) + -- end) + -- TODO end: uncommment after fixing bug APPLINK-20884 + + DelayedExp(timeToWait) +end + +function Test:activateApplication(applicationID) + + preconditionHead() + preconditionMessage("App activation") + + --hmi side: sending SDL.ActivateApp request + RequestId = self.hmiConnection:SendRequest("SDL.ActivateApp", { appID = applicationID}) + + --hmi side: expect SDL.ActivateApp response + EXPECT_HMIRESPONSE(RequestId) + :Do(function(_,data) + --In case when app is not allowed, it is needed to allow app + if + data.result.isSDLAllowed ~= true then + + --hmi side: sending SDL.GetUserFriendlyMessage request + local RequestId = self.hmiConnection:SendRequest("SDL.GetUserFriendlyMessage", + {language = "EN-US", messageCodes = {"DataConsent"}}) + + --hmi side: expect SDL.GetUserFriendlyMessage response + --TODO: Update after resolving APPLINK-16094 EXPECT_HMIRESPONSE(RequestId,{result = {code = 0, method = "SDL.GetUserFriendlyMessage"}}) + EXPECT_HMIRESPONSE(RequestId) + :Do(function(_,data) + + --hmi side: send request SDL.OnAllowSDLFunctionality + self.hmiConnection:SendNotification("SDL.OnAllowSDLFunctionality", + {allowed = true, source = "GUI", device = {id = config.deviceMAC, name = "127.0.0.1"}}) + + + --hmi side: expect BasicCommunication.ActivateApp request + EXPECT_HMICALL("BasicCommunication.ActivateApp") + :Do(function(_,data) + + --hmi side: sending BasicCommunication.ActivateApp response + self.hmiConnection:SendResponse(data.id,"BasicCommunication.ActivateApp", "SUCCESS", {}) + + end) + -- according APPLINK-9283 we send "device" parameter, so expect "BasicCommunication.ActivateApp" one time + :Times(1) + + + end) + + end + end) + + --mobile side: expect notification + EXPECT_NOTIFICATION("OnHMIStatus", {hmiLevel = "FULL", systemContext = "MAIN"}) +end + +function Test:secondConnect() + local tcpConnection = tcp.Connection(config.mobileHost, config.mobilePort) + local fileConnection = file_connection.FileConnection("mobile2.out", tcpConnection) + self.mobileConnection2 = mobile.MobileConnection(fileConnection) + self.mobileSession2 = mobile_session.MobileSession( + self, self.mobileConnection2, config.application2.registerAppInterfaceParams) + event_dispatcher:AddConnection(self.mobileConnection2) + self.mobileSession2:ExpectEvent(events.connectedEvent, "Connection started") + self.mobileConnection2:Connect() + + self.mobileSession2:StartService(7) +end + +function Test:thirdConnect() + local tcpConnection = tcp.Connection(config.mobileHost, config.mobilePort) + local fileConnection = file_connection.FileConnection("mobile3.out", tcpConnection) + self.mobileConnection3 = mobile.MobileConnection(fileConnection) + self.mobileSession3 = mobile_session.MobileSession( + self, self.mobileConnection3, config.application2.registerAppInterfaceParams) + event_dispatcher:AddConnection(self.mobileConnection3) + self.mobileSession3:ExpectEvent(events.connectedEvent, "Connection started") + self.mobileConnection3:Connect() + + self.mobileSession3:StartService(7) +end + +function Test:tenPendingRequestsFromTwoApps() + -- body + testHead() + testMessage("HMI respond to requests after UNSUPPORTED_HMI_RESOURCE was sent") + info("Expected: SDL unregister App, ignore HMI responses") + + for i=1,10 do + local cid = self.mobileSession:SendRPC("AddCommand",{cmdID = i, menuParams = {menuName = "Play" .. tostring(i)} }) + end + + for i=1,10 do + local cid = self.mobileSession2:SendRPC("AddCommand",{cmdID = i, menuParams = {menuName = "Mustang" .. tostring(i)} }) + end + + local cmdCID = {} + arrayIndex = 1 + + --hmi side: UI.AddCommand + EXPECT_HMICALL("UI.AddCommand") + :Times(20) + :Do(function(exp,data) + local cmdMethod = data.method + info("Occur: " .. exp.occurences) + if exp.occurences < 20 then + --do + cmdCID[arrayIndex] = data.id + arrayIndex = arrayIndex + 1 + else + --do + cmdCID[arrayIndex] = data.id + arrayIndex = arrayIndex + 1 + + info("SENDING UNSUPPORTED_HMI_RESOURCE") + + --hmi side: sending BasicCommunication.OnExitApplication notification + self.hmiConnection:SendNotification("BasicCommunication.OnExitApplication",{ appID = self.HMIappId, reason = "UNSUPPORTED_HMI_RESOURCE" }) + self.hmiConnection:SendNotification("BasicCommunication.OnExitApplication",{ appID = self.HMIappIdTwo, reason = "UNSUPPORTED_HMI_RESOURCE" }) + + --mobile side: expect notification + self.mobileSession:ExpectNotification("OnAppInterfaceUnregistered", + { + reason = "UNSUPPORTED_HMI_RESOURCE" + }) + :Timeout(2000) + :Times(1) + + --mobile side: expect notification + self.mobileSession2:ExpectNotification("OnAppInterfaceUnregistered", + { + reason = "UNSUPPORTED_HMI_RESOURCE" + }) + :Timeout(2000) + :Times(1) + + --mobile side: expect notification + EXPECT_HMINOTIFICATION("BasicCommunication.OnAppUnregistered") + :Times(2) + :Do(function (_,data) + -- body + for i=1,20 do + self.hmiConnection:SendResponse(cmdCID[i], cmdMethod, "SUCCESS", {}) + end + end) + end + + -- TODO: uncommment after fixing bug APPLINK-20884 + + -- --req. APPLINK-20647 + -- --hmi side: BasicCommunication.UpdateAppList + -- EXPECT_HMICALL("BasicCommunication.UpdateAppList") + -- :ValidIf(function(_,data) + -- if #data.params.applications == 0 then + -- return true + -- else + -- print(" \27[36m Application array in BasicCommunication.UpdateAppList contains "..tostring(#data.params.applications)..", expected 0 \27[0m") + -- return false + -- end + -- end) + -- :Do(function(_,data) + -- --hmi side: sending BasicCommunication.UpdateAppList response + -- self.hmiConnection:SendResponse(data.id, data.method, "SUCCESS", {}) + -- end) + DelayedExp(2500) + end) +end + +--------------------------------------------------------------------------------------------- +-----------------------------------Test Common function END---------------------------------- +--------------------------------------------------------------------------------------------- + + +--------------------------------------------------------------------------------------------- +-------------------------------------------Preconditions------------------------------------- +--------------------------------------------------------------------------------------------- + + commonSteps:DeleteLogsFileAndPolicyTable() + + --Print new line to separate new test cases group + commonFunctions:newTestCasesGroup("Preconditions") + + --Update policy to allow request + --TODO: Will be updated after policy flow implementation + policyTable:Precondition_updatePolicy_By_overwriting_preloaded_pt("files/sdl_preloaded_pt.json") + + + +--------------------------------------------------------------------------------------------- +-----------------------------------------I TEST BLOCK---------------------------------------- +--------App registered 1st time: Checks for one App when UNSUPPORTED_HMI_RESOURCE come------- +--------------------------------------------------------------------------------------------- + +-- Begin Test suit OneAppDuringFirstRegistration + +-- Description: TC's checks processing +-- HMI respond UNSUPPORTED_HMI_RESOURCE immediately +-- HMI respond UNSUPPORTED_HMI_RESOURCE in 500ms +-- HMI respond UNSUPPORTED_HMI_RESOURCE during work +-- HMI respond to requests after UNSUPPORTED_HMI_RESOURCE was sent +-- HMI respond UNSUPPORTED_HMI_RESOURCE while 10 requests are pending for responses + +-- ////////////////////////////////////////////////////////////////////////////////////////// +-- HMI respond UNSUPPORTED_HMI_RESOURCE immediately +-- ////////////////////////////////////////////////////////////////////////////////////////// + +-- Precondition to entire test - backup sdl_preloaded_pt.json, update original for API passing i needed HMI levels +function Test:StopSDLForPermissionsChange(self) + preconditionHead() + preconditionMessage("StopSDL") + StopSDL() +end + +function Test:BackupPreloadedFile(...) + -- body + os.execute('cp ' .. config.preloaded .. " " .. config.pathToSDL .."~sdl_preloaded_pt.json") +end + +function Test:AddLocationToDefaultAndPreDataConsent() + self:replaceSection(policiesParentSection, tostring("default\""), defaultSection) + self:replaceSection(policiesParentSection, tostring("pre_DataConsent\""), preDataSection) +end + +function Test:StartFromScratch(...) + -- body + os.execute('rm -rf ' .. config.pathToSDL .. '/storage app_info.dat') +end + +function Test:StartSDL() + StartSDL(config.pathToSDL, config.ExitOnCrash) + sleep(2) +end + +function Test:InitializeTheHMI() + self:initHMI() +end + +function Test:TheHMIisReady() + self:initHMI_onReady() +end + +function Test:ConnectMobile() + self:connectMobile() +end +function Test:StartSession() + self.mobileSession = mobile_session.MobileSession(self, self.mobileConnection) +end + +function Test:RegisterApp() + self.mobileSession:StartService(7) + :Do(function (_,data) + self:registerApp(self.mobileSession) + end) +end + +function Test:UnregisterApplication() + preconditionHead() + preconditionMessage("Precondition: unregister Application") + local cid = self.mobileSession:SendRPC("UnregisterAppInterface",{}) + + EXPECT_HMINOTIFICATION("BasicCommunication.OnAppUnregistered") + :Times(1) + + EXPECT_RESPONSE(cid, { success = true, resultCode = "SUCCESS"}) + :Timeout(2000) + + --hmi side: BasicCommunication.UpdateAppList + EXPECT_HMICALL("BasicCommunication.UpdateAppList") + :ValidIf(function(_,data) + if #data.params.applications == 0 then + return true + else + print(" \27[36m Application array in BasicCommunication.UpdateAppList contains "..tostring(#data.params.applications)..", expected 0 \27[0m") + return false + end + end) + :Do(function(_,data) + --hmi side: sending BasicCommunication.UpdateAppList response + self.hmiConnection:SendResponse(data.id, data.method, "SUCCESS", {}) + end) + + DelayedExp(5000) + +end + +function Test:SDLUnregisterAfterUHR() + testHead() + testMessage("HMI respond UNSUPPORTED_HMI_RESOURCE immediately") + info("Expected: SDL unregister Application") + + --mobile side: sending request + local cidRAI = self.mobileSession:SendRPC("RegisterAppInterface", applicationData.mediaApp) + + --hmi side: expect BasicCommunication.OnAppRegistered request + EXPECT_HMINOTIFICATION("BasicCommunication.OnAppRegistered", + { + application = + { + appName = applicationData.mediaApp.appName + } + }) + :Do(function(_,data) + self.HMIappId = data.params.application.appID + info("HMI AppID: " .. self.HMIappId) + + --hmi side: sending BasicCommunication.OnExitApplication notification + self.hmiConnection:SendNotification("BasicCommunication.OnExitApplication", + { appID = self.HMIappId, reason = "UNSUPPORTED_HMI_RESOURCE" }) + + --mobile side: expect notification + self.mobileSession:ExpectNotification("OnAppInterfaceUnregistered", + { reason = "UNSUPPORTED_HMI_RESOURCE"}) + :Timeout(2000) + :Times(1) + + --hmi side: expect BasicCommunication.OnAppUnregistered + EXPECT_HMINOTIFICATION("BasicCommunication.OnAppUnregistered", {appID = self.HMIappId, unexpectedDisconnect = false}) + :Times(1) + end) + + --mobile side: expect response + self.mobileSession:ExpectResponse(cidRAI, + { + hmiDisplayLanguage = config.application1.hmiDisplayLanguageDesired, + language = config.application1.languageDesired, + resultCode = "SUCCESS", + success = true + }) + :Timeout(2000) + + --mobile side: expect notification + self.mobileSession:ExpectNotification("OnHMIStatus", + { + systemContext = "MAIN", hmiLevel = "NONE", audioStreamingState = "NOT_AUDIBLE" + }) + :Timeout(2000) + :Times(1) + + --hmi side: BasicCommunication.UpdateAppList + EXPECT_HMICALL("BasicCommunication.UpdateAppList") + :ValidIf(function(_,data) + if #data.params.applications == 0 then + return true + else + print(" \27[36m Application array in BasicCommunication.UpdateAppList contains "..tostring(#data.params.applications)..", expected 0 \27[0m") + return false + end + end) + :Do(function(_,data) + --hmi side: sending BasicCommunication.UpdateAppList response + self.hmiConnection:SendResponse(data.id, data.method, "SUCCESS", {}) + end) + + DelayedExp(5000) +end +-- ////////////////////////////////////////////////////////////////////////////////////////// +-- HMI respond UNSUPPORTED_HMI_RESOURCE in 500ms +-- ////////////////////////////////////////////////////////////////////////////////////////// + +-- -- restore connection +-- function Test:ConnectMobile() +-- self:connectMobile() +-- end + +-- function Test:StartSession() +-- CreateSession(self) +-- end + +function Test:PrecondRegisterApp() + self:registerApp(self.mobileSession) +end + +function Test:Wait500ms(...) + -- body + DelayedExp() +end + +function Test:SDLUnregisterAfterUHRin500ms(...) + testHead() + testMessage("HMI respond UNSUPPORTED_HMI_RESOURCE in 500ms") + info("Expected: SDL unregister Application") + + self:sendUnsupportedHMIResource(self.mobileSession, Test.HMIappId) +end + +-- ////////////////////////////////////////////////////////////////////////////////////////// +-- HMI respond UNSUPPORTED_HMI_RESOURCE during work +-- ////////////////////////////////////////////////////////////////////////////////////////// + +-- Begin Precondition.1 +-- Description: Register Application +function Test:PrecondRegisterApp() + self:registerApp(self.mobileSession, applicationData.mediaApp) +end +-- End Precondition.1 + +-- Begin Precondition.2 +-- Description: Activation +function Test:PrecondActivation() + self:activateApplication(Test.HMIappId) +end +-- End Precondition.2 + +-- Begin Precondition.3 +-- Description: wait 10 seconds +function Test:PrecondWait10Sec(...) + -- body + preconditionHead() + preconditionMessage("Precondition: Wait 10 seconds.") + + DelayedExp(9500) +end +-- End Precondition.3 + +-- BEGIN TEST CASE +-- Description: HMI respond UNSUPPORTED_HMI_RESOURCE during work +function Test:UHRduringwork(...) + -- body + testHead() + testMessage("HMI respond UNSUPPORTED_HMI_RESOURCE during work") + info("Expected: SDL unregister App.") + + --hmi side: sending BasicCommunication.OnExitApplication notification + self.hmiConnection:SendNotification("BasicCommunication.OnExitApplication",{ appID = self.HMIappId, reason = "UNSUPPORTED_HMI_RESOURCE" }) + + --mobile side: expect notification + self.mobileSession:ExpectNotification("OnAppInterfaceUnregistered", + { + reason = "UNSUPPORTED_HMI_RESOURCE" + }) + :Timeout(2000) + :Times(1) + + EXPECT_HMINOTIFICATION("BasicCommunication.OnAppUnregistered", {appID = self.HMIappId, unexpectedDisconnect = false}) + :Times(1)--mobile side: expect notification + + -- TODO: uncommment after fixing bug APPLINK-20884 + -- --req. APPLINK-20647 + -- --hmi side: BasicCommunication.UpdateAppList + -- EXPECT_HMICALL("BasicCommunication.UpdateAppList") + -- :ValidIf(function(_,data) + -- if #data.params.applications == 0 then + -- return true + -- else + -- print(" \27[36m Application array in BasicCommunication.UpdateAppList contains "..tostring(#data.params.applications)..", expected 0 \27[0m") + -- return false + -- end + -- end) + -- :Do(function(_,data) + -- --hmi side: sending BasicCommunication.UpdateAppList response + -- self.hmiConnection:SendResponse(data.id, data.method, "SUCCESS", {}) + -- end) + + DelayedExp(500) +end +-- END TESTCASE + + +-- ////////////////////////////////////////////////////////////////////////////////////////// +-- HMI respond to requests after UNSUPPORTED_HMI_RESOURCE was sent +-- ////////////////////////////////////////////////////////////////////////////////////////// + +-- Begin Precondition.1 +-- Description: App's registration +function Test:PrecondRegisterApp(...) + -- body + self:registerApp(self.mobileSession, applicationData.mediaApp) +end +-- End Precondition.1 + +-- Begin Precondition.2 +-- Description: Actiation App +function Test:PrecondActivation(...) + -- body + self:activateApplication(Test.HMIappId) +end +-- End Precondition.2 + +function Test:UHRsentWhileOneReqPendingResp(...) + -- body + testHead() + testMessage("HMI respond to requests after UNSUPPORTED_HMI_RESOURCE was sent") + info("Expected: SDL unregister App, ignore HMI responses") + + local cid = self.mobileSession:SendRPC("AddCommand",{cmdID = 1, menuParams = {menuName = "Play"}}) + + --hmi side: UI.AddCommand + EXPECT_HMICALL("UI.AddCommand") + :Timeout(2000) + :Do(function(_,data) + local cmdCID = data.id + local cmdMethod = data.method + --hmi side: sending BasicCommunication.OnExitApplication notification + self.hmiConnection:SendNotification("BasicCommunication.OnExitApplication",{ appID = self.HMIappId, reason = "UNSUPPORTED_HMI_RESOURCE" }) + + --mobile side: expect notification + self.mobileSession:ExpectNotification("OnAppInterfaceUnregistered", + { + reason = "UNSUPPORTED_HMI_RESOURCE" + }) + :Timeout(2000) + :Times(1) + + --mobile side: expect notification + EXPECT_HMINOTIFICATION("BasicCommunication.OnAppUnregistered", {appID = self.HMIappId, unexpectedDisconnect = false}) + :Times(1) + :Do(function (_,data) + -- body + self.hmiConnection:SendResponse(cmdCID, cmdMethod, "SUCCESS", {}) + end) + + -- TODO: uncommment after fixing bug APPLINK-20884 + + -- --req. APPLINK-20647 + -- --hmi side: BasicCommunication.UpdateAppList + -- EXPECT_HMICALL("BasicCommunication.UpdateAppList") + -- :ValidIf(function(_,data) + -- if #data.params.applications == 0 then + -- return true + -- else + -- print(" \27[36m Application array in BasicCommunication.UpdateAppList contains "..tostring(#data.params.applications)..", expected 0 \27[0m") + -- return false + -- end + -- end) + -- :Do(function(_,data) + -- --hmi side: sending BasicCommunication.UpdateAppList response + -- self.hmiConnection:SendResponse(data.id, data.method, "SUCCESS", {}) + -- end) + end) +end + + +-- ////////////////////////////////////////////////////////////////////////////////////////// +-- HMI respond UNSUPPORTED_HMI_RESOURCE while 10 requests are pending for responses +-- ////////////////////////////////////////////////////////////////////////////////////////// + + +-- Begin Precondition.1 +-- Description: App's registration +function Test:PrecondRegisterApp(...) + -- body + self:registerApp(self.mobileSession, applicationData.mediaApp) +end +-- End Precondition.1 + +-- Begin Precondition.2 +-- Description: Actiation App +function Test:PrecondActivation(...) + -- body + self:activateApplication(Test.HMIappId) +end +-- End Precondition.2 + +function Test:UHRsentWhileTenReqPendingResp(...) + -- body + testHead() + testMessage("HMI respond to requests after UNSUPPORTED_HMI_RESOURCE was sent") + info("Expected: SDL unregister App, ignore HMI responses") + + for i=1,10 do + local cid = self.mobileSession:SendRPC("AddCommand",{cmdID = i, menuParams = {menuName = "Play" .. tostring(i)} }) + end + + local cmdCID = {} + arrayIndex = 1 + + --hmi side: UI.AddCommand + EXPECT_HMICALL("UI.AddCommand") + :Times(10) + :Do(function(exp,data) + local cmdMethod = data.method + info("Occur: " .. exp.occurences) + if exp.occurences < 10 then + --do + cmdCID[arrayIndex] = data.id + arrayIndex = arrayIndex + 1 + else + --do + cmdCID[arrayIndex] = data.id + arrayIndex = arrayIndex + 1 + + info("SENDING UNSUPPORTED_HMI_RESOURCE") + --hmi side: sending BasicCommunication.OnExitApplication notification + self.hmiConnection:SendNotification("BasicCommunication.OnExitApplication",{ appID = self.HMIappId, reason = "UNSUPPORTED_HMI_RESOURCE" }) + + --mobile side: expect notification + self.mobileSession:ExpectNotification("OnAppInterfaceUnregistered", + { + reason = "UNSUPPORTED_HMI_RESOURCE" + }) + :Timeout(2000) + :Times(1) + + --mobile side: expect notification + EXPECT_HMINOTIFICATION("BasicCommunication.OnAppUnregistered", {appID = self.HMIappId, unexpectedDisconnect = false}) + :Times(1) + :Do(function (_,data) + -- body + for i=1,10 do + self.hmiConnection:SendResponse(cmdCID[i], cmdMethod, "SUCCESS", {}) + end + end) + end + + -- TODO: uncommment after fixing bug APPLINK-20884 + + -- --req. APPLINK-20647 + -- --hmi side: BasicCommunication.UpdateAppList + -- EXPECT_HMICALL("BasicCommunication.UpdateAppList") + -- :ValidIf(function(_,data) + -- if #data.params.applications == 0 then + -- return true + -- else + -- print(" \27[36m Application array in BasicCommunication.UpdateAppList contains "..tostring(#data.params.applications)..", expected 0 \27[0m") + -- return false + -- end + -- end) + -- :Do(function(_,data) + -- --hmi side: sending BasicCommunication.UpdateAppList response + -- self.hmiConnection:SendResponse(data.id, data.method, "SUCCESS", {}) + -- end) + DelayedExp(6000) + end) +end + +--------------------------------------------------------------------------------------------- +--------------------------------------I TEST BLOCK - END------------------------------------- +--------------------------------------------------------------------------------------------- + + + + + + +--------------------------------------------------------------------------------------------- +----------------------------------------II TEST BLOCK---------------------------------------- +--App with persistent data: Checks for one App with data when UNSUPPORTED_HMI_RESOURCE come-- +--------------------------------------------------------------------------------------------- + +-- Begin Test suit OneAppWithPersistentData + +-- Description: TC's checks processing +-- SDL clears all App's data after HMI's UNSUPPORTED_HMI_RESOURCE +-- No resumption after UNSUPPORTED_HMI_RESOURCE + + +-- ////////////////////////////////////////////////////////////////////////////////////////// +-- SDL clears all App's data after HMI's UNSUPPORTED_HMI_RESOURCE +-- ////////////////////////////////////////////////////////////////////////////////////////// + +-- Begin Precondition.1 +-- Description: App's registration +function Test:PrecondRegisterApp() + self:registerApp(self.mobileSession, applicationData.mediaApp) +end +-- End Precondition.1 + +function Test:PrecondActivation(...) + -- body + self:activateApplication(Test.HMIappId) +end + +-- Begin Precondition.2 +-- Description: App adds persistan data +function Test:PrecondAddData(...) + -- body + local cidCmd1 = self.mobileSession:SendRPC("AddCommand", {cmdID = 1, menuParams = {menuName = "Play"} }) + local cidCmd2 = self.mobileSession:SendRPC("AddCommand", {cmdID = 2, vrCommands = {"Stop"} }) + local cidMenu = self.mobileSession:SendRPC("AddSubMenu", {menuID = 1, menuName = "Main"}) + local cidChoice = self.mobileSession:SendRPC("CreateInteractionChoiceSet", {interactionChoiceSetID = 1, + choiceSet = { {choiceID = 101, menuName = "Stations", vrCommands = {"Stations"} } } }) + local cidProperties = self.mobileSession:SendRPC("SetGlobalProperties", + { helpPrompt = {{text = "Speak", type = "TEXT"}}, + timeoutPrompt = {{text = "Hello", type = "TEXT"}}, + vrHelpTitle = "Options", + vrHelp = {{position = 1, text = "OK"}} }) + local cidButton = self.mobileSession:SendRPC("SubscribeButton", {buttonName = "PRESET_1"}) + local cid = self.mobileSession:SendRPC("SubscribeVehicleData", {speed = true}) + + + --hmi side: UI.AddCommand + EXPECT_HMICALL("UI.AddCommand", {appID = self.HMIappId, cmdID = 1, menuParams = {menuName = "Play"} }) + :Do(function(_,data) + -- body + self.hmiConnection:SendResponse(data.id, data.method, "SUCCESS", {}) + end) + + --hmi side: VR.AddCommand + EXPECT_HMICALL("VR.AddCommand") + :Times(2) + :Do(function(exp,data) + -- body + self.hmiConnection:SendResponse(data.id, data.method, "SUCCESS", {}) + end) + + --hmi side: UI.AddSubMenu + EXPECT_HMICALL("UI.AddSubMenu") + :Times(1) + :Do(function(_,data) + -- body + self.hmiConnection:SendResponse(data.id, data.method, "SUCCESS", {}) + end) + + --hmi side: UI.SetGlobalProperties + EXPECT_HMICALL("UI.SetGlobalProperties") + :Do(function(_,data) + -- body + self.hmiConnection:SendResponse(data.id, data.method, "SUCCESS", {}) + end) + + --hmi side: TTS.SetGlobalProperties + EXPECT_HMICALL("TTS.SetGlobalProperties") + :Do(function(_,data) + -- body + self.hmiConnection:SendResponse(data.id, data.method, "SUCCESS", {}) + end) + + --hmi side: VehicleInfo.SubscribeVehicleData + EXPECT_HMICALL("VehicleInfo.SubscribeVehicleData") + :Do(function(_,data) + -- body + self.hmiConnection:SendResponse(data.id, data.method, "SUCCESS", {}) + end) + + --hmi side: Buttons.OnButtonSubscription + EXPECT_HMINOTIFICATION("Buttons.OnButtonSubscription", {isSubscribed = true, name = "PRESET_1"}) + :Times(AtMost(1)) + + --mobile side: expect notification + EXPECT_NOTIFICATION("OnHashChange") + :Times(7) + +end +-- End Precondition.2 + + +-- Begin Precondition.3 +-- Description: wait 10 seconds +function Test:PrecondCheckAppInfoDat(...) + -- body + preconditionHead() + preconditionMessage("Precondition: Wait for app_info.dat") + + local iniFilePath = config.pathToSDL .. "app_info.dat" + print("Path to app_info.dat: " ..iniFilePath) + local cond = true + local Timeout = 100 + repeat + Timeout = Timeout - 1 + --do + --if IsStringInAppInfoDat("appID\" : " .. "\"" .. config.application1.registerAppInterfaceParams.appID) then + if IsStringInAppInfoDat("appID\" : " .. "\"" .. applicationData.mediaApp.appID) then + + cond = false + else + info(".") + sleep(1) + end + until cond or Timeout > 0 + + cond = true + Timeout = 100 + repeat + --do + Timeout = Timeout - 1 + + if IsStringInAppInfoDat("menuName\" : \"Stations") then + cond = false + else + info(".") + sleep(1) + end + until cond or Timeout > 0 + +end +-- End Precondition.3 + +function Test:UHRFromHMI(...) + testHead() + testMessage("SDL clears all App's data after HMI's UNSUPPORTED_HMI_RESOURCE") + info("Expected: SDL clears all App's data after HMI's UNSUPPORTED_HMI_RESOURCE") + + self:sendUnsupportedHMIResource(self.mobileSession, Test.HMIappId) +end + +function Test:CheckAppInfoDatAfterUHR(...) + -- body + if IsStringInAppInfoDat("appID\" : " .. "\"" .. config.application1.registerAppInterfaceParams.appID) then + self:FailTestCase("App's data is present") + end +end + + +-- ////////////////////////////////////////////////////////////////////////////////////////// +-- No resumption after UNSUPPORTED_HMI_RESOURCE +-- ////////////////////////////////////////////////////////////////////////////////////////// + + +function Test:NoResumptionAfterUHR(...) + -- body + testHead() + testMessage("No resumption occurs after UNSUPPORTED_HMI_RESOURCE") + info("Expected: SDL do not resume App that was unregistered by SDL due to UNSUPPORTED_HMI_RESOURCE") + + self:registerApp(self.mobileSession, applicationData.mediaApp) +end + +--------------------------------------------------------------------------------------------- +-------------------------------------II TEST BLOCK - END------------------------------------- +--------------------------------------------------------------------------------------------- + + +--------------------------------------------------------------------------------------------- +---------------------------------------III TEST BLOCK---------------------------------------- +-------------------------------2 Apps on different connections------------------------------- +--------------------------------------------------------------------------------------------- + +-- Begin Test suit TwoAppsOnDifferentConnections + +-- Description: TC's checks processing +-- HMI sends UNSUPPORTED_HMI_RESOURCE to App1 (+ requests from another App) +-- HMI sends UNSUPPORTED_HMI_RESOURCE to both Apps +-- 2 connections just added - UNSUPPORTED_HMI_RESOURCE to both Apps +-- HMI sends UNSUPPORTED_HMI_RESOURCE to both Apps while 10 requests are pending for responses +-- HMI sends UNSUPPORTED_HMI_RESOURCE to App1 2 times + + +-- ////////////////////////////////////////////////////////////////////////////////////////// +-- HMI sends UNSUPPORTED_HMI_RESOURCE to App1 (+ requests from another App) +-- ////////////////////////////////////////////////////////////////////////////////////////// + +-- Begin Precondition.1 +-- Description: Start 2nd connection +function Test:PrecondStartSecondConnection(...) + -- body + preconditionHead() + preconditionMessage("Start 2nd connection") + self:secondConnect() +end +-- End Precondition.1 + +-- Begin Precondition.2 +-- Description: Register Application on 2nd connection +function Test:PrecondRegisterAppOnSecondConnection(...) + -- body + preconditionHead() + preconditionMessage("Register Application on 2nd connection") + self:registerApp(self.mobileSession2, applicationData.nonmediaApp, 2) +end +-- End Precondition.2 + +function Test:SendUHRToAppOne(...) + -- body + testHead() + testMessage("HMI sends UNSUPPORTED_HMI_RESOURCE to App1") + info("Expected: SDL unregister App1") + + self:sendUnsupportedHMIResource(self.mobileSession, Test.HMIappId) +end + +function Test:SecondAppIsStillAlive_1(...) + -- body + info("Expected: App2 still alive and SDL processes all messages from App2") + + local cid = self.mobileSession2:SendRPC("ListFiles", {}) + --mobile side: expect ListFiles response + self.mobileSession2:ExpectResponse(cid, { success = true, resultCode = "SUCCESS" }) +end + + +-- ////////////////////////////////////////////////////////////////////////////////////////// +-- HMI sends UNSUPPORTED_HMI_RESOURCE to both Apps +-- ////////////////////////////////////////////////////////////////////////////////////////// + +-- Begin Precondition.1 +-- Description: Start Session1 +function Test:StartSession() + preconditionHead() + preconditionMessage("Start Session1") + self.mobileSession = mobile_session.MobileSession( + self, self.mobileConnection, applicationData.mediaApp) + self.mobileSession:StartService(7) +end +-- End Precondition.1 + +-- Begin Precondition.2 +-- Description: Register Application on connection 1 +function Test:PrecondRegisterAppOne_1(...) + -- body + self:registerApp(self.mobileSession, applicationData.mediaApp, 2) +end +-- End Precondition.2 + +function Test:UhrToBothAppsStepOne(...) + -- body + testHead() + testMessage("HMI sends UNSUPPORTED_HMI_RESOURCE to both Apps") + info("Expected: SDL unregister both Apps") + + self:sendUnsupportedHMIResource(self.mobileSession, Test.HMIappId) +end + +function Test:UhrToBothAppsStepTwo(...) + -- body + self:sendUnsupportedHMIResource(self.mobileSession2, Test.HMIappIdTwo) +end + +-- ////////////////////////////////////////////////////////////////////////////////////////// +-- 2 connections just added - UNSUPPORTED_HMI_RESOURCE to both Apps +-- ////////////////////////////////////////////////////////////////////////////////////////// + +-- Begin Precondition.1 +-- Description: Close connections of App2 +function Test:CloseConnectionTwo(...) + -- body + preconditionHead() + preconditionMessage("Close connection of App2") + self.mobileConnection2:Close() +end +-- End Precondition.1 + +-- Begin Precondition.5 +-- Description: Open connection 2 +function Test:OpenConnectionOne(...) + -- body + preconditionHead() + preconditionMessage("Open connection1, start session on connection1") + self:secondConnect() +end +-- End Precondition.5 + +-- Begin Precondition.5 +-- Description: Open connection 3 +function Test:OpenConnectionTwo(...) + -- body + preconditionHead() + preconditionMessage("Open connection2, start session on connection2") + self:thirdConnect() +end +-- End Precondition.5 + +-- Begin Precondition.6 +-- Description: Register Apps on both connections +function Test:RegisterAppOnConnOne(...) + -- body + preconditionHead() + preconditionMessage("Register Apps on both connections") + + self:registerApp(self.mobileSession2, applicationData.mediaApp, 1) +end +-- End Precondition.6 + +-- Begin Precondition.7 +-- Description: Register Apps on both connections +function Test:RegisterAppsOnConnTwo(...) + -- body + self:registerApp(self.mobileSession3, applicationData.nonmediaApp, 2) +end +-- End Precondition.7 + +function Test:UHRtoJustAddedConnectionsStepOne(...) + -- body + testHead() + testMessage("2 connections just added - UNSUPPORTED_HMI_RESOURCE to both Apps") + self:sendUnsupportedHMIResource(self.mobileSession2, Test.HMIappIdTwo) +end + +function Test:UHRtoJustAddedConnectionsStepTwo(...) + -- body + self:sendUnsupportedHMIResource(self.mobileSession3, Test.HMIappIdThree) +end + +-- postcondition: Close connection3 +function Test:Postcondition(...) + -- body + self.mobileConnection3:Close() +end + +-- ////////////////////////////////////////////////////////////////////////////////////////// +-- HMI sends UNSUPPORTED_HMI_RESOURCE to both Apps while 10 requests are pending for responses +-- ////////////////////////////////////////////////////////////////////////////////////////// + +-- Begin Precondition.1 +-- Description: Register Apps on both connections +function Test:RegisterAppOnConnOne_1(...) + -- body + preconditionHead() + preconditionMessage("Register Apps on both connections") + + self:registerApp(self.mobileSession, applicationData.mediaApp, 1) +end +-- End Precondition.1 + +-- Begin Precondition.2 +-- Description: Register Apps on both connections +function Test:RegisterAppOnConnTwo_1(...) + -- body + self:registerApp(self.mobileSession2, applicationData.nonmediaApp, 2) +end +-- End Precondition.2 + +function Test:PrecondActivation_App1(...) + -- body + self:activateApplication(Test.HMIappId) +end + +function Test:PrecondActivation_App2(...) + -- body + self:activateApplication(Test.HMIappIdTwo) +end + +function Test:UHRsentWhileTenReqPendingResp(...) + -- body + self:tenPendingRequestsFromTwoApps() +end + +-- ////////////////////////////////////////////////////////////////////////////////////////// +-- HMI sends UNSUPPORTED_HMI_RESOURCE to App1 2 times +-- ////////////////////////////////////////////////////////////////////////////////////////// + +-- Begin Precondition.1 +-- Description: Register Apps on both connections +function Test:RegisterAppOnConnOne_2(...) + -- body + preconditionHead() + preconditionMessage("Register Apps on both connections") + + self:registerApp(self.mobileSession, applicationData.mediaApp, 1) +end +-- End Precondition.1 + +-- Begin Precondition.2 +-- Description: Register Apps on both connections +function Test:RegisterAppOnConnTwo_2(...) + -- body + self:registerApp(self.mobileSession2, applicationData.nonmediaApp, 2) +end +-- End Precondition.2 + +function Test:UHRtoAppOneTwoTimesStepOne(...) + -- body + self:sendUnsupportedHMIResource(self.mobileSession, Test.HMIappId) +end + +function Test:UHRtoAppOneTwoTimesStepTwo(...) + -- body + self.hmiConnection:SendNotification("BasicCommunication.OnExitApplication",{ appID = self.HMIappId, reason = "UNSUPPORTED_HMI_RESOURCE" }) + + --mobile side: expect notification + self.mobileSession:ExpectNotification("OnAppInterfaceUnregistered", + { + reason = "UNSUPPORTED_HMI_RESOURCE" + }) + :Times(0) + + --mobile side: expect notification + EXPECT_HMINOTIFICATION("BasicCommunication.OnAppUnregistered", {appID = applicationID, unexpectedDisconnect = false}) + :Times(0) + + DelayedExp(1500) +end + +function Test:RegisterAppOnConnOneAgain(...) + -- body + testHead() + testMessage("App1 could be registered successfully again") + + self:registerApp(self.mobileSession, applicationData.mediaApp, 2) +end + +function Test:SDLProcessesApp1Requests(...) + -- body + info("Expected: App2 still alive and SDL processes all messages from App2") + + local cid = self.mobileSession:SendRPC("ListFiles", {}) + --mobile side: expect ListFiles response + self.mobileSession:ExpectResponse(cid, { success = true, resultCode = "SUCCESS" }) +end + +function Test:SDLProcessesApp2Requests(...) + -- body + info("Expected: App2 still alive and SDL processes all messages from App2") + + local cid = self.mobileSession2:SendRPC("ListFiles", {}) + --mobile side: expect ListFiles response + self.mobileSession2:ExpectResponse(cid, { success = true, resultCode = "SUCCESS" }) +end + +function Test:Postcondition(...) + -- body + preconditionHead() + preconditionMessage("Close 2nd conection") + self.mobileConnection2:Close() + EXPECT_HMINOTIFICATION("BasicCommunication.OnAppUnregistered") + :Times(1) + :Timeout(2000) + +end + +--------------------------------------------------------------------------------------------- +------------------------------------III TEST BLOCK - END------------------------------------- +--------------------------------------------------------------------------------------------- + + +--------------------------------------------------------------------------------------------- +----------------------------------------IV TEST BLOCK---------------------------------------- +--------------------------------2 Apps on the same connection-------------------------------- +--------------------------------------------------------------------------------------------- + +-- Begin Test suit OneAppWithPersistentData + +-- Description: TC's checks processing +-- HMI sends UNSUPPORTED_HMI_RESOURCE to App1 (+ requests from App1) +-- HMI sends UNSUPPORTED_HMI_RESOURCE to both Apps +-- HMI sends UNSUPPORTED_HMI_RESOURCE to both Apps while 10 requests are pending for responses +-- HMI sends UNSUPPORTED_HMI_RESOURCE to App1 2 times + + +-- ////////////////////////////////////////////////////////////////////////////////////////// +-- HMI sends UNSUPPORTED_HMI_RESOURCE to App1 (+ requests from App1) +-- ////////////////////////////////////////////////////////////////////////////////////////// + +-- Begin Precondition.1 +-- Description: Register new App +function Test:StartSession2TheSameConnection() + preconditionHead() + preconditionMessage("Start new session on the same connection") + self.mobileSession2 = mobile_session.MobileSession(self, self.mobileConnection, applicationData.nonmediaApp) +end +-- End Precondition.1 + +-- Begin Precondition.2 +-- Description: Register App on 2nd session +function Test:RegisterMediaApp() + preconditionHead() + preconditionMessage("Register App on 2nd session") + + info("StartPoint") + self.mobileSession2:StartService(7) + :Do(function(_,data) + -- body + self:registerApp(self.mobileSession2, applicationData.nonmediaApp, 2) + end) +end +-- End Precondition.2 + +function Test:SendUHRToAppOne(...) + -- body + testHead() + testMessage("HMI sends UNSUPPORTED_HMI_RESOURCE to App1") + info("Expected: SDL unregister App1") + + self:sendUnsupportedHMIResource(self.mobileSession, Test.HMIappId) +end + +function Test:SecondAppIsStillAlive_2(...) + -- body + info("Expected: App2 still alive and SDL processes all messages from App2") + + local cid = self.mobileSession2:SendRPC("ListFiles", {}) + --mobile side: expect ListFiles response + self.mobileSession2:ExpectResponse(cid, { success = true, resultCode = "SUCCESS" }) +end + +-- ////////////////////////////////////////////////////////////////////////////////////////// +-- HMI sends UNSUPPORTED_HMI_RESOURCE to both Apps +-- ////////////////////////////////////////////////////////////////////////////////////////// + +-- Begin Precondition.1 +-- Description: Start Session1 +function Test:StartSession() + preconditionHead() + preconditionMessage("Start Session1") + self.mobileSession = mobile_session.MobileSession( + self, self.mobileConnection, applicationData.mediaApp) + self.mobileSession:StartService(7) +end +-- End Precondition.1 + +-- Begin Precondition.2 +-- Description: Register Application on connection 1 +function Test:PrecondRegisterAppOne_2(...) + -- body + self:registerApp(self.mobileSession, applicationData.mediaApp, 1) +end +-- End Precondition.2 +function Test:PrecondRegisterAppOne_3(...) + -- body + self:registerApp(self.mobileSession, applicationData.mediaApp, 1) +end +function Test:UhrToBothAppsStep1(...) + -- body + testHead() + testMessage("HMI sends UNSUPPORTED_HMI_RESOURCE to both Apps") + info("Expected: SDL unregister both Apps") + + self:sendUnsupportedHMIResource(self.mobileSession, Test.HMIappId) +end + +function Test:UhrToBothAppsStep2(...) + -- body + self:sendUnsupportedHMIResource(self.mobileSession2, Test.HMIappIdTwo) +end + +-- ////////////////////////////////////////////////////////////////////////////////////////// +-- HMI sends UNSUPPORTED_HMI_RESOURCE to both Apps while 10 requests are pending for responses +-- ////////////////////////////////////////////////////////////////////////////////////////// + +-- Begin Precondition.1 +-- Description: Register Apps on both connections +function Test:RegisterApp1(...) + -- body + preconditionHead() + preconditionMessage("Register Apps on both connections") + + self:registerApp(self.mobileSession, applicationData.mediaApp, 1) +end +-- End Precondition.1 + +-- Begin Precondition.2 +-- Description: Register Apps on both connections +function Test:RegisterApp2(...) + -- body + self:registerApp(self.mobileSession2, applicationData.nonmediaApp, 2) +end +-- End Precondition.2 + +function Test:UHRsentWhileTenReqPendingResp(...) + -- body + self:tenPendingRequestsFromTwoApps() +end + +-- ////////////////////////////////////////////////////////////////////////////////////////// +-- HMI sends UNSUPPORTED_HMI_RESOURCE to App1 2 times +-- ////////////////////////////////////////////////////////////////////////////////////////// + +-- Begin Precondition.1 +-- Description: Register Apps +function Test:RegisterApp1(...) + -- body + preconditionHead() + preconditionMessage("Register Apps on both connections") + + self:registerApp(self.mobileSession, applicationData.mediaApp, 1) +end +-- End Precondition.1 + +-- Begin Precondition.2 +-- Description: Register Apps on both connections +function Test:RegisterApp2(...) + -- body + self:registerApp(self.mobileSession2, applicationData.nonmediaApp, 2) +end +-- End Precondition.2 + +function Test:UHRtoAppOneTwoTimesStepOne(...) + -- body + self:sendUnsupportedHMIResource(self.mobileSession, Test.HMIappId) +end + +function Test:UHRtoAppOneTwoTimesStepTwo(...) + -- body + self:sendUnsupportedHMIResource(self.mobileSession, Test.HMIappId) + + self.hmiConnection:SendNotification("BasicCommunication.OnExitApplication",{ appID = self.HMIappId, reason = "UNSUPPORTED_HMI_RESOURCE" }) + + --mobile side: expect notification + self.mobileSession:ExpectNotification("OnAppInterfaceUnregistered", + { + reason = "UNSUPPORTED_HMI_RESOURCE" + }) + :Times(0) + + --mobile side: expect notification + EXPECT_HMINOTIFICATION("BasicCommunication.OnAppUnregistered") + :Times(0) + + DelayedExp(1500) +end + +function Test:RegisterApp1Again(...) + -- body + testHead() + testMessage("App1 could be registered successfully again") + + self:registerApp(self.mobileSession, applicationData.mediaApp, 2) +end + +function Test:SDLProcessesApp1Requests(...) + -- body + info("Expected: App2 still alive and SDL processes all messages from App2") + + local cid = self.mobileSession:SendRPC("ListFiles", {}) + --mobile side: expect ListFiles response + self.mobileSession:ExpectResponse(cid, { success = true, resultCode = "SUCCESS" }) +end + +function Test:SDLProcessesApp2Requests(...) + -- body + info("Expected: App2 still alive and SDL processes all messages from App2") + + local cid = self.mobileSession2:SendRPC("ListFiles", {}) + --mobile side: expect ListFiles response + self.mobileSession2:ExpectResponse(cid, { success = true, resultCode = "SUCCESS" }) +end + +function Test:Postcondition(...) + -- body + self.mobileSession2:Stop() + EXPECT_HMINOTIFICATION("BasicCommunication.OnAppUnregistered") + :Times(1) + :Timeout(2000) +end + +--------------------------------------------------------------------------------------------- +------------------------------------IV TEST BLOCK - END-------------------------------------- +--------------------------------------------------------------------------------------------- + + +--------------------------------------------------------------------------------------------- +----------------------------------------V TEST BLOCK----------------------------------------- +---------------------------------------Negative checks--------------------------------------- +--------------------------------------------------------------------------------------------- + +-- Begin Test suit OneAppWithPersistentData + +-- Description: TC's checks processing +-- UNSUPPORTED_HMI_RESOURCE with unknown +-- UNSUPPORTED_HMI_RESOURCE with policy +-- UNSUPPORTED_HMI_RESOURCE two times in a row +-- UNSUPPORTED_HMI_RESOURCE ten times in a row +-- HMI sends notifications to after UNSUPPORTED_HMI_RESOURCE +-- HMI sends UNSUPPORTED_HMI_RESOURCE when there are no registered Apps +-- HMI sends UNSUPPORTED_HMI_RESOURCE to only one Navi App from 2 registered Navi Apps + + +-- ////////////////////////////////////////////////////////////////////////////////////////// +-- UNSUPPORTED_HMI_RESOURCE with unknown +-- ////////////////////////////////////////////////////////////////////////////////////////// + +function Test:UhrWithUnknownAppID(...) + -- body + testHead() + testMessage("UNSUPPORTED_HMI_RESOURCE with unknown ") + info("Expected: SDL ignores notification") + + --hmi side: sending BasicCommunication.OnExitApplication notification + self.hmiConnection:SendNotification("BasicCommunication.OnExitApplication",{ appID = "Igor", reason = "UNSUPPORTED_HMI_RESOURCE" }) + + --mobile side: expect notification + self.mobileSession:ExpectNotification("OnAppInterfaceUnregistered", + { + reason = "UNSUPPORTED_HMI_RESOURCE" + }) + :Times(0) + + --mobile side: expect notification + EXPECT_HMINOTIFICATION("BasicCommunication.OnAppUnregistered", {appID = "applicationID", unexpectedDisconnect = false}) + :Times(0) + + -- TODO: uncommment after fixing bug APPLINK-20884 + --req. APPLINK-20647 + --hmi side: BasicCommunication.UpdateAppList + -- EXPECT_HMICALL("BasicCommunication.UpdateAppList") + -- :ValidIf(function(_,data) + -- if #data.params.applications == 0 then + -- return true + -- else + -- print(" \27[36m Application array in BasicCommunication.UpdateAppList contains "..tostring(#data.params.applications)..", expected 0 \27[0m") + -- return false + -- end + -- end) + -- :Do(function(_,data) + -- --hmi side: sending BasicCommunication.UpdateAppList response + -- self.hmiConnection:SendResponse(data.id, data.method, "SUCCESS", {}) + -- end) + + DelayedExp(1500) +end + +function Test:SDLProcessesAppRequests(...) + -- body + info("Expected: App still alive and SDL processes all messages from it") + + local cid = self.mobileSession:SendRPC("ListFiles", {}) + --mobile side: expect ListFiles response + self.mobileSession:ExpectResponse(cid, { success = true, resultCode = "SUCCESS" }) +end + +-- ////////////////////////////////////////////////////////////////////////////////////////// +-- UNSUPPORTED_HMI_RESOURCE with policy +-- ////////////////////////////////////////////////////////////////////////////////////////// + +function Test:UhrWithUnknownAppID(...) + -- body + testHead() + testMessage("UNSUPPORTED_HMI_RESOURCE with policy ") + info("Expected: SDL ignores notification") + + --hmi side: sending BasicCommunication.OnExitApplication notification + self.hmiConnection:SendNotification("BasicCommunication.OnExitApplication", + { appID = applicationData.mediaApp.appId, reason = "UNSUPPORTED_HMI_RESOURCE" }) + + --mobile side: expect notification + self.mobileSession:ExpectNotification("OnAppInterfaceUnregistered", + { + reason = "UNSUPPORTED_HMI_RESOURCE" + }) + :Times(0) + + --mobile side: expect notification + EXPECT_HMINOTIFICATION("BasicCommunication.OnAppUnregistered") + :Times(0) + + DelayedExp(1000) +end + +function Test:SDLProcessesAppRequests(...) + -- body + info("Expected: App still alive and SDL processes all messages from it") + + local cid = self.mobileSession:SendRPC("ListFiles", {}) + --mobile side: expect ListFiles response + self.mobileSession:ExpectResponse(cid, { success = true, resultCode = "SUCCESS" }) +end + +-- ////////////////////////////////////////////////////////////////////////////////////////// +-- UNSUPPORTED_HMI_RESOURCE two times in a row +-- ////////////////////////////////////////////////////////////////////////////////////////// + +function Test:UhrTwoTimesInARowStep1(...) + -- body + testHead() + testMessage("UNSUPPORTED_HMI_RESOURCE two times in a row") + info("Expected: SDL 2nd notification") + + self:sendUnsupportedHMIResource(self.mobileSession, Test.HMIappId) +end + +function Test:UhrTwoTimesInARowStep2(...) + -- body + self.hmiConnection:SendNotification("BasicCommunication.OnExitApplication",{ appID = self.HMIappId, reason = "UNSUPPORTED_HMI_RESOURCE" }) + + --mobile side: expect notification + self.mobileSession:ExpectNotification("OnAppInterfaceUnregistered", + { + reason = "UNSUPPORTED_HMI_RESOURCE" + }) + :Times(0) + + --mobile side: expect notification + EXPECT_HMINOTIFICATION("BasicCommunication.OnAppUnregistered", {appID = applicationID, unexpectedDisconnect = false}) + :Times(0) + + DelayedExp(1000) +end + +-- ////////////////////////////////////////////////////////////////////////////////////////// +-- UNSUPPORTED_HMI_RESOURCE ten times in a row +-- ////////////////////////////////////////////////////////////////////////////////////////// + +function Test:PrecondRegisterApp() + preconditionHead() + preconditionMessage("App's registration") + self:registerApp(self.mobileSession) +end + +function Test:UhrTwoTimesInARowStep1(...) + -- body + testHead() + testMessage("UNSUPPORTED_HMI_RESOURCE ten times in a row") + info("Expected: SDL unregister App and ignores all next notifications") + + self:sendUnsupportedHMIResource(self.mobileSession, Test.HMIappId) +end + +function Test:UhrTwoTimesInARowStep2(...) + -- body + for i=1,9 do + self.hmiConnection:SendNotification("BasicCommunication.OnExitApplication",{ appID = self.HMIappId, reason = "UNSUPPORTED_HMI_RESOURCE" }) + end + + --mobile side: expect notification + self.mobileSession:ExpectNotification("OnAppInterfaceUnregistered", + { + reason = "UNSUPPORTED_HMI_RESOURCE" + }) + :Times(0) + + --mobile side: expect notification + EXPECT_HMINOTIFICATION("BasicCommunication.OnAppUnregistered", {appID = applicationID, unexpectedDisconnect = false}) + :Times(0) + + DelayedExp(1000) +end + +function Test:AbleToRegisterApp() + self:registerApp(self.mobileSession) +end + +-- ////////////////////////////////////////////////////////////////////////////////////////// +-- HMI sends notifications to after UNSUPPORTED_HMI_RESOURCE +-- ////////////////////////////////////////////////////////////////////////////////////////// + +-- Begin Precondition.1 +-- Description: Activation +function Test:PrecondActivation(...) + -- body + self:activateApplication(Test.HMIappId) +end +-- End Precondition.1 + + +-- Begin Precondition.2 +-- Description: Addind data +function Test:PrecondAddData(...) + -- body + preconditionHead() + preconditionMessage("Addind data") + + local cidCmd = self.mobileSession:SendRPC("AddCommand", {cmdID = 1, menuParams = {menuName = "Play"} }) + local cidButton = self.mobileSession:SendRPC("SubscribeButton", {buttonName = "PRESET_1"}) + local cidVehicle = self.mobileSession:SendRPC("SubscribeVehicleData", {speed = true}) + + + --hmi side: UI.AddCommand + EXPECT_HMICALL("UI.AddCommand", {appID = self.HMIappId, cmdID = 1, menuParams = {menuName = "Play"} }) + :Do(function(_,data) + -- body + self.hmiConnection:SendResponse(data.id, data.method, "SUCCESS", {}) + end) + + --hmi side: VehicleInfo.SubscribeVehicleData + EXPECT_HMICALL("VehicleInfo.SubscribeVehicleData") + :Do(function(_,data) + -- body + self.hmiConnection:SendResponse(data.id, data.method, "SUCCESS", {}) + end) + + --hmi side: Buttons.OnButtonSubscription + EXPECT_HMINOTIFICATION("Buttons.OnButtonSubscription", {isSubscribed = true, name = "PRESET_1"}) + :Times(AtMost(1)) + + --mobile side: expect notification + EXPECT_NOTIFICATION("OnHashChange") + :Times(3) + + --mobile side: expect AddCommand response + EXPECT_RESPONSE(cidCmd, { success = true, resultCode = "SUCCESS" }) + + --mobile side: expect SubscribeButton response + EXPECT_RESPONSE(cidButton, { success = true, resultCode = "SUCCESS" }) + + --mobile side: expect SubscribeVehicleData response + EXPECT_RESPONSE(cidVehicle, { success = true, resultCode = "SUCCESS" }) + + DelayedExp(5000) + +end +-- End Precondition.2 + +function Test:UhrTwoTimesInARowStep1(...) + -- body + testHead() + testMessage("HMI sends notifications to after UNSUPPORTED_HMI_RESOURCE") + info("Expected: SDL ignores all such notifications") + + self:sendUnsupportedHMIResource(self.mobileSession, Test.HMIappId) +end + +function Test:UhrTwoTimesInARowStep2(...) + -- body + --hmi side: sending Buttons.OnButtonPress notification + self.hmiConnection:SendNotification("Buttons.OnButtonPress",{ appID = self.HMIappId, name = "PRESET_1" }) + + EXPECT_NOTIFICATION("OnButtonPress") + :Times(0) + + DelayedExp(500) +end + +function Test:UhrTwoTimesInARowStep3(...) + -- body + --hmi side: sending Buttons.OnButtonEvent notification + self.hmiConnection:SendNotification("Buttons.OnButtonEvent",{ appID = self.HMIappId, name = "PRESET_1" }) + + EXPECT_NOTIFICATION("OnButtonEvent") + :Times(0) + + DelayedExp(500) +end + +function Test:UhrTwoTimesInARowStep4(...) + -- body + --hmi side: sending VehicleInfo.OnVehicleData notification + self.hmiConnection:SendNotification("VehicleInfo.OnVehicleData",{ speed = 60.1 }) + + EXPECT_NOTIFICATION("OnVehicleData") + :Times(0) + + DelayedExp(500) +end + +function Test:UhrTwoTimesInARowStep5(...) + -- body + --hmi side: sending UI.OnCommand notification + self.hmiConnection:SendNotification("UI.OnCommand",{ appID = self.HMIappId, cmdID = 1 }) + + EXPECT_NOTIFICATION("OnCommand") + :Times(0) + + DelayedExp(500) +end + +-- ////////////////////////////////////////////////////////////////////////////////////////// +-- HMI sends UNSUPPORTED_HMI_RESOURCE when there are no registered Apps +-- ////////////////////////////////////////////////////////////////////////////////////////// + +function Test:UhrNoApps(...) + -- body + testHead() + testMessage("HMI sends UNSUPPORTED_HMI_RESOURCE when there are no registered Apps") + info("Expected: SDL ignores it") + + self.hmiConnection:SendNotification("BasicCommunication.OnExitApplication",{ appID = self.HMIappId, reason = "UNSUPPORTED_HMI_RESOURCE" }) + + --mobile side: expect notification + self.mobileSession:ExpectNotification("OnAppInterfaceUnregistered", + { + reason = "UNSUPPORTED_HMI_RESOURCE" + }) + :Times(0) + + --mobile side: expect notification + EXPECT_HMINOTIFICATION("BasicCommunication.OnAppUnregistered", {appID = applicationID, unexpectedDisconnect = false}) + :Times(0) + + DelayedExp(1000) +end + +-- ////////////////////////////////////////////////////////////////////////////////////////// +-- HMI sends UNSUPPORTED_HMI_RESOURCE to only one Navi App from 2 registered Navi Apps +-- ////////////////////////////////////////////////////////////////////////////////////////// + +-- Begin Precondition.1 +-- Description: Register Navi App1 +function Test:PrecondRegisterNaviApp1() + preconditionHead() + preconditionMessage("Register Navi App1") + self:registerApp(self.mobileSession, applicationData.navigationAppOne) +end +-- End Precondition.1 + +-- Begin Precondition.2 +-- Description: Register new App +function Test:StartSession2() + preconditionHead() + preconditionMessage("Start new session on the same connection") + self.mobileSession2 = mobile_session.MobileSession(self, self.mobileConnection, applicationData.navigationAppTwo) +end +-- End Precondition.2 + +-- Begin Precondition.3 +-- Description: Register App on 2nd session +function Test:PrecondRegisterNaviApp2() + preconditionHead() + preconditionMessage("Register App on 2nd session") + + info("StartPoint") + self.mobileSession2:StartService(7) + :Do(function(_,data) + -- body + self:registerApp(self.mobileSession2, applicationData.navigationAppTwo, 2) + end) +end +-- End Precondition.3 + +function Test:SendUHRToNaviAppOne(...) + -- body + testHead() + testMessage("HMI sends UNSUPPORTED_HMI_RESOURCE to only one Navi App from 2 registered Navi Apps") + info("Expected: SDL unregisters only specified App") + + self:sendUnsupportedHMIResource(self.mobileSession, Test.HMIappId) +end + +function Test:SecondAppIsStillAlive_3(...) + -- body + info("Expected: App2 still alive and SDL processes all messages from App2") + + local cid = self.mobileSession2:SendRPC("ListFiles", {}) + --mobile side: expect ListFiles response + self.mobileSession2:ExpectResponse(cid, { success = true, resultCode = "SUCCESS" }) +end + +function Test:Postcondition(...) + -- body + self.mobileSession2:Stop() + EXPECT_HMINOTIFICATION("BasicCommunication.OnAppUnregistered") + :Times(1) + :Timeout(2000) +end + +--------------------------------------------------------------------------------------------- +---------------------------------------VI TEST BLOCK----------------------------------------- +--------------------------------------Endurance checks--------------------------------------- +--------------------------------------------------------------------------------------------- + +-- Begin Test suit Endurace_UNSUPPORTED_HMI_RESOURCE + +-- Description: TC's checks processing +-- Repeated registration-unregistration of one App by reason UNSUPPORTED_HMI_RESOURCE (25 times) +-- Repeated registration-unregistration of two Apps by reason UNSUPPORTED_HMI_RESOURCE (25 times) + + +-- ////////////////////////////////////////////////////////////////////////////////////////// +-- Repeated registration-unregistration of one App by reason UNSUPPORTED_HMI_RESOURCE (25 times) +-- ////////////////////////////////////////////////////////////////////////////////////////// + +for i=1,10 do + + function Test:SendUnsupportedHmiResource(...) + -- body + self:sendUnsupportedHMIResource(self.mobileSession, Test.HMIappId, 100) + end + + function Test:RegisterApp(...) + self:registerApp(self.mobileSession, applicationData.mediaApp) + end +end + +function Test:Postcondition(...) + -- body + local cid = self.mobileSession:SendRPC("UnregisterAppInterface",{}) + + EXPECT_HMINOTIFICATION("BasicCommunication.OnAppUnregistered") + :Times(1) + + EXPECT_RESPONSE(cid, { success = true, resultCode = "SUCCESS"}) + :Timeout(500) +end + +-- ////////////////////////////////////////////////////////////////////////////////////////// +-- Repeated registration-unregistration of two Apps by reason UNSUPPORTED_HMI_RESOURCE (25 times) +-- ////////////////////////////////////////////////////////////////////////////////////////// + +--------------------------------------------------------------------------------------------- +-----------------------------------VI TEST BLOCK - END--------------------------------------- +--------------------------------------------------------------------------------------------- + + +-- Postcondition to entire test - restore sdl_preloaded_pt.json from backup, delete backup file +function Test:StopSDLForPermissionsChange() + preconditionHead() + preconditionMessage("Stop SDL for restore original sdl_preloaded_pt.json") + StopSDL() +end + +function Test:PostConditionRestoreBackUpPreloaded(...) + -- body + os.execute('cp ' .. config.pathToSDL .. "~sdl_preloaded_pt.json" .. " " .. config.preloaded) + os.execute('rm ' .. config.pathToSDL .. "~sdl_preloaded_pt.json") +end + + + +--------------------------------------------------------------------------------------------- +-------------------------------------------Postcondition------------------------------------- +--------------------------------------------------------------------------------------------- + +--TODO: Will be updated after policy flow implementation +-- Postcondition: restore sdl_preloaded_pt.json +policyTable:Restore_preloaded_pt() + +return Test + diff --git a/test_scripts/API/ATC_RequestType.lua b/test_scripts/API/ATC_RequestType.lua new file mode 100644 index 0000000000..f0c05ac6c6 --- /dev/null +++ b/test_scripts/API/ATC_RequestType.lua @@ -0,0 +1,593 @@ +-- Known issues -- +-- ATF - APPLINK-14546 (ATF sometimes doesn't send HMI request. - last Test will fails die to this issue) +-- SDL - APPLINK-14550 (SDL rejects SystemRequest if specified file was uploaded before as system file.) - +-- APPLINK-14550 is not applicable because of APPLINK-11677. +-- Known issues -- + + +------------------------------------------------------------------------------------------------- +-------------------------------------------Updates of files ------------------------------------- +------------------------------------------------------------------------------------------------- +local commonSteps = require('user_modules/shared_testcases/commonSteps') +local commonPreconditions = require('user_modules/shared_testcases/commonPreconditions') + + +function DeleteLog_app_info_dat_policy() + commonSteps:CheckSDLPath() + local SDLStoragePath = config.pathToSDL .. "storage/" + + --Delete app_info.dat and log files and storage + if commonSteps:file_exists(config.pathToSDL .. "app_info.dat") == true then + os.remove(config.pathToSDL .. "app_info.dat") + end + + if commonSteps:file_exists(config.pathToSDL .. "SmartDeviceLinkCore.log") == true then + os.remove(config.pathToSDL .. "SmartDeviceLinkCore.log") + end + + if commonSteps:file_exists(SDLStoragePath .. "policy.sqlite") == true then + os.remove(SDLStoragePath .. "policy.sqlite") + end + + if commonSteps:file_exists(config.pathToSDL .. "policy.sqlite") == true then + os.remove(config.pathToSDL .. "policy.sqlite") + end + + os.execute("rm -r " ..config.pathToSDL .. "storage") +end + +-- Function will delete all needed files and folders => SDL will start very first ignition cycle. +DeleteLog_app_info_dat_policy() + + +---------------------------------------------------------------------------------------------- +-- make reserve copy of file (FileName) in specified folder +local function BackupSpecificFile(FileFolder , FileName) + os.execute(" cp " .. FileFolder .. FileName .. " " .. FileFolder .. FileName .. "_origin" ) +end + +-- restore origin of file (FileName) in specified folder +local function RestoreSpecificFile(FileFolder, FileName) + os.execute(" cp " .. FileFolder .. FileName .. "_origin " .. FileFolder .. FileName ) + os.execute( " rm -f " .. FileFolder .. FileName .. "_origin" ) +end + +function UpdatePolicy() + commonPreconditions:BackupFile("sdl_preloaded_pt.json") + + local src_preloaded_json = config.pathToSDL .."sdl_preloaded_pt.json" + local dest = "files/OnAppregistered/sdl_preloaded_pt.json" + + local filecopy = "cp " .. dest .." " .. src_preloaded_json + + os.execute(filecopy) +end + +UpdatePolicy() + + +------------------------------------------------------------------------------------------------- +-------------------------------------------END Updates of files --------------------------------- +------------------------------------------------------------------------------------------------- + +Test = require('connecttest') +require('cardinalities') +local events = require('events') +local mobile_session = require('mobile_session') +local config = require('config') + +config.deviceMAC = "12ca17b49af2289436f303e0166030a21e525d266e209267433801a8fd4071a0" +config.SDLStoragePath = config.pathToSDL .."storage/" +--ToDo: shall be removed when APPLINK-16610 is fixed +config.defaultProtocolVersion = 2 + +config.application1 = +{ + registerAppInterfaceParams = + { + syncMsgVersion = + { + majorVersion = 3, + minorVersion = 0 + }, + appName = "Test Application", + isMediaApplication = true, + languageDesired = 'EN-US', + hmiDisplayLanguageDesired = 'EN-US', + appHMIType = { "NAVIGATION" }, + appID = "123456", + deviceInfo = + { + os = "Android", + carrier = "Megafon", + firmwareRev = "Name: Linux, Version: 3.4.0-perf", + osVersion = "4.4.2", + maxNumberRFCOMMPorts = 1 + } + } +} + +local storagePath = config.SDLStoragePath..config.application1.registerAppInterfaceParams.appID.. "_" .. config.deviceMAC.. "/" +local applicationID +local registerAppInterfaceParams = {syncMsgVersion = + { + majorVersion = 2, + minorVersion = 2, + }, + appName ="SyncProxyTester", + isMediaApplication = true, + languageDesired ="EN-US", + hmiDisplayLanguageDesired ="EN-US", + appID ="123456"} + +function DelayedExp(timeToWait) + timeToWait = timeToWait or 2000 + local event = events.Event() + event.matches = function(self, e) return self == e end + EXPECT_EVENT(event, "Delayed event") + RUN_AFTER(function() + RAISE_EVENT(event, event) + end, timeToWait) +end + +--------------------------------------------------------------------------------------------- +-- Functions used in test cases +--------------------------------------------------------------------------------------------- + +--UPDATED: Added new function +local function DelayedExp(time) + + local event = events.Event() + event.matches = function(self, e) return self == e end + + EXPECT_EVENT(event, "Delayed event") + :Timeout(time+1000) + + RUN_AFTER(function() + RAISE_EVENT(event, event) + end, time) +end + + +-- Function for precondition tests +local function UnregisterApplication(self, hmi_app_id) + --mobile side: UnregisterAppInterface request + local CorIdUAI = self.mobileSession:SendRPC("UnregisterAppInterface",{}) + + --hmi side: expect OnAppUnregistered notification + EXPECT_HMINOTIFICATION("BasicCommunication.OnAppUnregistered", {appID = hmi_app_id, unexpectedDisconnect = false}) + + + --mobile side: UnregisterAppInterface response + EXPECT_RESPONSE(CorIdUAI, { success = true, resultCode = "SUCCESS"}) + :Timeout(2000) +end + +--------------------------------------------------------------------------------------------- +-------------------------------------------Preconditions------------------------------------- +--------------------------------------------------------------------------------------------- + --Begin Precondition.1 + --Description: Activation App by sending SDL.ActivateApp + function Test:ActivationApp() + --hmi side: sending SDL.ActivateApp request + applicationID = self.applications["Test Application"] + local RequestId = self.hmiConnection:SendRequest("SDL.ActivateApp", { appID = applicationID}) + + --hmi side: expect SDL.ActivateApp response + EXPECT_HMIRESPONSE(RequestId) + :Do(function(_,data) + --In case when app is not allowed, it is needed to allow app + if data.result.isSDLAllowed ~= true then + + --hmi side: sending SDL.GetUserFriendlyMessage request + local RequestId = self.hmiConnection:SendRequest("SDL.GetUserFriendlyMessage", + {language = "EN-US", messageCodes = {"DataConsent"}}) + + --hmi side: expect SDL.GetUserFriendlyMessage response + EXPECT_HMIRESPONSE(RequestId,{result = {code = 0, method = "SDL.GetUserFriendlyMessage"}}) + :Do(function(_,data) + + --hmi side: send request SDL.OnAllowSDLFunctionality + self.hmiConnection:SendNotification("SDL.OnAllowSDLFunctionality", + {allowed = true, source = "GUI", device = {id = 1, name = "127.0.0.1"}}) + + end) + --hmi side: expect SDL.OnAppPermissionChanged notification from SDL about new request type for the App + EXPECT_HMINOTIFICATION("SDL.OnAppPermissionChanged", + {appID = applicationID, requestType = {"PROPRIETARY", "HTTP", "QUERY_APPS"}}) + :ValidIf(function (self, data) + -- body + if #data.params.requestType == 3 then + return true + else + return false + end + end) + + --hmi side: expect BasicCommunication.ActivateApp request + EXPECT_HMICALL("BasicCommunication.ActivateApp") + :Times(AnyNumber()) + :Do(function(_,data) + + --hmi side: sending BasicCommunication.ActivateApp response + self.hmiConnection:SendResponse(data.id,"BasicCommunication.ActivateApp", "SUCCESS", {}) + + end) + -- :Times(2) + end + end) + + --mobile side: expect notification + EXPECT_NOTIFICATION("OnHMIStatus", {hmiLevel = "FULL"}) + end + --End Precondition.1 + + +--------------------------------------------------------------------------------------------- +-----------------------------------------I TEST BLOCK---------------------------------------- +--CommonRequestCheck: Check of mandatory/conditional request's parameters (mobile protocol)-- +--------------------------------------------------------------------------------------------- +--Begin Test suit PositiveRequestCheck + +--Description: TC's checks processing + -- request type is sent in OnAppRegistered + -- request type is sent in OnAppRegistered between ignition cycles + -- SDL notifies HMI about changes of requestType with SDL.OnAppPermissionChanged notification + + +--Begin Test case CommonRequestCheck.1 +--Description:This test is intended to check positive cases and when all parameters are in boundary conditions + +--Requirement id in JAMA: + -- SDLAQ-CRS-3073 + -- SDLAQ-CRS-3074 + -- SDLAQ-CRS-2757 + +--Verification criteria: + --SDL->HMI: BC.OnAppRegistered (params: aplications with 'requestType') + +--Begin Precondition.1 +--Description: The application should be unregistered before next test. + +function Test:UnregisterAppInterface_Success() + + UnregisterApplication(self, applicationID) + +end + +--End Precondition.1 + + +--Begin Test case CommonRequestCheck.1.1 +--Description: Check processing request with app parameters +function Test:RTypeTheSameBetweenRegistrations() + -- body + + local CorIdRAI = self.mobileSession:SendRPC("RegisterAppInterface", registerAppInterfaceParams) + + -- hmi side: SDL notifies HMI about registered App + EXPECT_HMINOTIFICATION("BasicCommunication.OnAppRegistered", { + application = { + appName = "SyncProxyTester", + requestType = {"PROPRIETARY", "HTTP", "QUERY_APPS"} + } + }) + :ValidIf(function (self, data) + -- body + if #data.params.application.requestType == 3 then + return true + else + return false + end + end) + + self.mobileSession:ExpectResponse(CorIdRAI, { success = true, resultCode = "SUCCESS"}) + :Timeout(2000) + +end + +--ToDo: Shall be removed when APPLINK-24902: Genivi: Unexpected unregistering application at resumption after closing session. +function Test:RegisterAppAgain() + -- body + + local CorIdRAI = self.mobileSession:SendRPC("RegisterAppInterface", registerAppInterfaceParams) + + -- hmi side: SDL notifies HMI about registered App + EXPECT_HMINOTIFICATION("BasicCommunication.OnAppRegistered", { + application = { + appName = "SyncProxyTester", + requestType = {"PROPRIETARY", "HTTP", "QUERY_APPS"} + } + }) + + :ValidIf(function (self, data) + -- body + if #data.params.application.requestType == 3 then + return true + else + return false + end + end) + + self.mobileSession:ExpectResponse(CorIdRAI, { success = true, resultCode = "SUCCESS"}) + :Timeout(2000) + +end +--ToDo: Shall be removed when APPLINK-24902: Genivi: Unexpected unregistering application at resumption after closing session. +function Test:ActivateAppAgain() + applicationID = self.applications["SyncProxyTester"] + local RequestId = self.hmiConnection:SendRequest("SDL.ActivateApp", { appID = applicationID}) + DelayedExp(10000) +end + +--End Test case CommonRequestCheck.1.1 +--------------------------------------------------------------------------------------------- + +--Begin Test case CommonRequestCheck.1.2 +--Description: Check that SDL resend RequestType parameter in SystemRequest to the App +function Test:RTypeIsPresentInSystemRequest() + applicationID = self.applications["SyncProxyTester"] + --mobile side: sending SystemRequest request + local cid = self.mobileSession:SendRPC("SystemRequest", + {requestType = "HTTP", + fileName = "IVSU"}, + "files/file.json") + -- hmi side: SDL resend SystemRequest to HMI + EXPECT_HMICALL("BasicCommunication.SystemRequest", + { + requestType = "HTTP", + -- fileName = "IVSU", + -- appID = applicationID + }) + :Do(function (_,data) + -- body + --print("We are Here!!!") + --print(data.id) + self.hmiConnection:SendResponse(data.id, "BasicCommunication.SystemRequest", "SUCCESS", {}) + end) + + self.mobileSession:ExpectResponse(cid, { success = true, resultCode = "SUCCESS"}) + :Timeout(2000) + +end +--End Test case CommonRequestCheck.1.2 + +--------------------------------------------------------------------------------------------- + +--Begin Test case CommonRequestCheck.1.3 +--Description: Check that SDL resend RequestType parameter in SystemRequest without binary data, uploaded before as usual file + +--Begin Precondition.1 + --Description: The application should be unregistered before next test. + + function Test:PreCondUploadUsualBinaryData() + + local cid = self.mobileSession:SendRPC("PutFile", + { + syncFileName = "ptu1", + fileType = "JSON", + systemFile = false + }, "files/file.json") + EXPECT_RESPONSE(cid, { success = true }) + + end + +--End Precondition.1 + +function Test:RTypeInSystemRequestWOBinaryData() + --mobile side: sending SystemRequest request + local cid = self.mobileSession:SendRPC("SystemRequest", + {requestType = "PROPRIETARY", + fileName = "ptu1"}) + + -- hmi side: SDL resend SystemRequest to HMI + EXPECT_HMICALL("BasicCommunication.SystemRequest", + { + requestType = "PROPRIETARY", + -- fileName = "IVSU", + -- appID = applicationID + }) + :Do(function (_,data) + -- body + self.hmiConnection:SendResponse(data.id, "BasicCommunication.SystemRequest", "SUCCESS", {}) + end) + + self.mobileSession:ExpectResponse(cid, { success = true, resultCode = "SUCCESS"}) + + + +end +--End Test case CommonRequestCheck.1.3 + +--------------------------------------------------------------------------------------------- + +--Begin Test case CommonRequestCheck.1.4 +--Description: Check that SDL resend RequestType parameter in SystemRequest without binary data, uploaded before as system file + +--Begin Precondition.1 + --Description: The application should be unregistered before next test. + + function Test:PreCondUploadSystemBinaryData() + + local cid = self.mobileSession:SendRPC("PutFile", + { + syncFileName = "ptu2", + fileType = "JSON", + systemFile = true + }, "files/file.json") + EXPECT_RESPONSE(cid, { success = true }) + + + + end + +--End Precondition.1 + +--UPDATED according to APPLINK-11677 +function Test:RTypeInSystemRequestWOBinaryData() + --mobile side: sending SystemRequest request + local cid = self.mobileSession:SendRPC("SystemRequest", + {requestType = "PROPRIETARY", + fileName = "ptu2"}) + + EXPECT_HMINOTIFICATION("BasicCommunication.OnPutFile", {syncFileName = "/tmp/fs/mp/images/ivsu_cache/ptu2"}) + --:Timeout(20000) + -- hmi side: SDL resend SystemRequest to HMI + + -- EXPECT_HMICALL("BasicCommunication.SystemRequest", + -- { + -- requestType = "PROPRIETARY", + -- -- fileName = "IVSU", + -- -- appID = applicationID + -- }) + -- :Do(function (_,data) + -- -- body + -- self.hmiConnection:SendResponse(data.id, "BasicCommunication.SystemRequest", "SUCCESS", {}) + -- end) + + -- self.mobileSession:ExpectResponse(cid, { success = true, resultCode = "SUCCESS"}) + + EXPECT_HMICALL("BasicCommunication.SystemRequest",{}): + Times(0) + +end +--End Test case CommonRequestCheck.1.4 + +--------------------------------------------------------------------------------------------- + +--Begin Test case CommonRequestCheck.1.5 +--Description: Check that SDL reject SystemRequest without binary data, if specified file was not uploaded before and absent in request + +function Test:SystemRequestWODataRejected() + --mobile side: sending SystemRequest request + local cid = self.mobileSession:SendRPC("SystemRequest", + {requestType = "PROPRIETARY", + fileName = "ptu3"}) + + self.mobileSession:ExpectResponse(cid, { success = false, resultCode = "REJECTED"}) + :Timeout(2000) + +end + +--End Test case CommonRequestCheck.1.5 + +--------------------------------------------------------------------------------------------- + +--Begin Test case CommonRequestCheck.1.6 +--Description: Check that SDL notify HMI with OnAppPermssionChange if App receive new Request Type after PTU. + +--Begin Precondition.2 + --Description: Policy update for RegisterAppInterface API + function Test:PolicyUpdateGetUrls() + --hmi side: sending SDL.GetURLS request + local RequestIdGetURLS = self.hmiConnection:SendRequest("SDL.GetURLS", { service = 7 }) + + --hmi side: expect SDL.GetURLS response from HMI + --ToDo: Shall be uncommented when APPLINK-16052 "ATF: TC is failed in case receiving message with nested struct" is fixed + -- EXPECT_HMIRESPONSE(RequestIdGetURLS,{result = {code = 0, method = "SDL.GetURLS", urls = { + -- { + -- appID = self.applications["Test Application"], + -- url = "http://policies.telematics.ford.com/api/policies" + -- } + -- }}}) + end + + function Test:PolicyUpdateOnSystemRequest() + -- body + self.hmiConnection:SendNotification("BasicCommunication.OnSystemRequest", + { + requestType = "PROPRIETARY", + fileName = "PolicyTableUpdate" + } + ) + + --ToDo: Shall be uncommented when APPLINK-24972 is resolved + --mobile side: expect OnSystemRequest notification + --EXPECT_NOTIFICATION("OnSystemRequest", { requestType = "PROPRIETARY" }) + --:Timeout(2000) + end + + function Test:PolicyUpdateSystemRequest() + + local CorIdSystemRequest = self.mobileSession:SendRPC("SystemRequest", + { + fileName = "PolicyTableUpdate", + requestType = "PROPRIETARY" + }, + "files/ptu.json") + + local systemRequestId + --hmi side: expect SystemRequest request + EXPECT_HMICALL("BasicCommunication.SystemRequest") + :Do(function(_,data) + systemRequestId = data.id + print("BasicCommunication.SystemRequest is received") + print(systemRequestId) + --hmi side: sending SystemRequest response + self.hmiConnection:SendResponse(systemRequestId,"BasicCommunication.SystemRequest", "SUCCESS", {}) + end) + + EXPECT_RESPONSE(CorIdSystemRequest, { success = true, resultCode = "SUCCESS"}) + :Timeout(5000) + end + + function Test:PtuSuccess() + -- body + -- hmi side: sending BasicCommunication.OnSystemRequest request to SDL + self.hmiConnection:SendNotification("SDL.OnReceivedPolicyUpdate", + { + policyfile = "/tmp/fs/mp/images/ivsu_cache/PolicyTableUpdate" + }) + + --hmi side: expect SDL.OnStatusUpdate + EXPECT_HMINOTIFICATION("SDL.OnStatusUpdate", { status = "UP_TO_DATE"}) + :Do(function(_,data) + print("SDL.OnStatusUpdate is received") + end) + :Timeout(2000) + + EXPECT_HMINOTIFICATION("SDL.OnAppPermissionChanged", + --{appID = self.applications["Test Application"], requestType = {"TRAFFIC_MESSAGE_CHANNEL", "PROPRIETARY", "HTTP", "QUERY_APPS"}}) + {appID = self.applications["SyncProxyTester"], requestType = {"TRAFFIC_MESSAGE_CHANNEL", "PROPRIETARY", "HTTP", "QUERY_APPS"}}) + :ValidIf(function (self, data) + -- body + if #data.params.requestType == 4 then + return true + else + return false + end + end) + :Timeout(2000) + end + +--End Test case CommonRequestCheck.1.6 + +--------------------------------------------------------------------------------------------- + +--Begin Test case CommonRequestCheck.1.7 +--Description: Check that SDL resend requestType in OnSystemRequest + +function Test:RTInOnSystemRequest() + -- body + self.hmiConnection:SendNotification("BasicCommunication.OnSystemRequest", { + requestType = "HTTP", + fileName = "/tmp/fs/mp/images/ivsu_cache/PolicyTableUpdate" + }) + -- mobile side: SDL should resend to mobile OnSystemRequest + EXPECT_NOTIFICATION("OnSystemRequest", { requestType = "HTTP" }) + :Timeout(2000) +end + +--End Test case CommonRequestCheck.1.7 + + +--------------------------------------------------------------------------------------------- +-------------------------------------------Postconditions------------------------------------- +--------------------------------------------------------------------------------------------- + +function Test:PostconditionsRestoreFile() + + commonPreconditions:RestoreFile("sdl_preloaded_pt.json") +end + +return Test diff --git a/test_scripts/API/ATC_SetGlobalProperties_vrHelp_vrHelpTitle.lua b/test_scripts/API/ATC_SetGlobalProperties_vrHelp_vrHelpTitle.lua new file mode 100644 index 0000000000..f3133cc6da --- /dev/null +++ b/test_scripts/API/ATC_SetGlobalProperties_vrHelp_vrHelpTitle.lua @@ -0,0 +1,812 @@ +local commonSteps = require('user_modules/shared_testcases/commonSteps') +local commonPreconditions = require('user_modules/shared_testcases/commonPreconditions') + + +function DeleteLog_app_info_dat_policy() + commonSteps:CheckSDLPath() + local SDLStoragePath = config.pathToSDL .. "storage/" + + --Delete app_info.dat and log files and storage + if commonSteps:file_exists(config.pathToSDL .. "app_info.dat") == true then + os.remove(config.pathToSDL .. "app_info.dat") + end + + if commonSteps:file_exists(config.pathToSDL .. "SmartDeviceLinkCore.log") == true then + os.remove(config.pathToSDL .. "SmartDeviceLinkCore.log") + end + + if commonSteps:file_exists(SDLStoragePath .. "policy.sqlite") == true then + os.remove(SDLStoragePath .. "policy.sqlite") + end + + if commonSteps:file_exists(config.pathToSDL .. "policy.sqlite") == true then + os.remove(config.pathToSDL .. "policy.sqlite") + end + + os.execute("rm -r " ..config.pathToSDL .. "storage") +end + +-- Function will delete all needed files and folders => SDL will start very first ignition cycle. +DeleteLog_app_info_dat_policy() + +Test = require('connecttest') +require('cardinalities') + +local mobile_session = require('mobile_session') +local custom = require('user_modules/custom') +local mobileResponseTimeout = 10000 +local indexOfTests = 1 +local HMIAppID = nil +local actualVrHelpItem = nil +local actualVrHelpTitle = nil +local appid + +config.deviceMAC = "12ca17b49af2289436f303e0166030a21e525d266e209267433801a8fd4071a0" +--ToDo: shall be removed when APPLINK-16610 is fixed +config.defaultProtocolVersion = 2 + +local function sleep(sec) + -- body + os.execute("sleep " .. sec) +end + + + + +-- /////////////////////////////////////////////////////////////////////////////////////////////////// +-- App sends the very first SetGlobalProperties_request in current ignition cycle WITH and params +-- /////////////////////////////////////////////////////////////////////////////////////////////////// + +-- function Test:PreconditionUploadingAppsFiles(...) +-- -- body +-- custom.testHead() +-- local cid = self.mobileSession:SendRPC("PutFile", +-- { +-- syncFileName = "action.png", +-- fileType = "GRAPHIC_PNG", +-- persistentFile = true +-- }, "user_modules/icon.png") + +-- EXPECT_RESPONSE(cid, { success = true, resultCode = "SUCCESS"}) +-- end + +Test["PreconditionRegisterApp" .. tostring(indexOfTests)] = function (self) + -- body + custom.preconditionHead() + custom.preconditionMessage("Registration of App") +end +indexOfTests = indexOfTests + 1 + +function Test:AppSendsFirstSGPWithVrHelpItems(...) + -- body + custom.testHead() + custom.testMessage("App sends the very first SetGlobalProperties_request in current ignition cycle WITH and params") + custom.info("Expected: SDL transfers vrHelp and vrHelpTitle via UI.SetGlobalProperties") + + -- custom.userPrint(33, custom.SGP_with_vr_help_start) + local cid = self.mobileSession:SendRPC("SetGlobalProperties", custom.SGP_with_vr_help_start) + + EXPECT_HMICALL("UI.SetGlobalProperties", { + vrHelp = custom.SGP_with_vr_help_start.vrHelp, + vrHelpTitle = custom.SGP_with_vr_help_start.vrHelpTitle}) + :Do(function(_,data) + --hmi side: sending UI.SetGlobalProperties response + self.hmiConnection:SendResponse(data.id, data.method, "SUCCESS", {}) + actualVrHelpItem = custom.SGP_with_vr_help_start.vrHelp + actualVrHelpTitle = custom.SGP_with_vr_help_start.vrHelpTitle + end) + + --mobile side: expect SetGlobalProperties response + EXPECT_RESPONSE(cid, { success = true, resultCode = "SUCCESS"}) + :Timeout(mobileResponseTimeout) +end + + +-- /////////////////////////////////////////////////////////////////////////////////////////////////// +-- App sends the very first SetGlobalProperties_request in current ignition cycle WITHOUT and params +-- /////////////////////////////////////////////////////////////////////////////////////////////////// + +-- Begin Precondition.1 +-- Description: RestartSDL + +function Test:UnregisterApp(...) + -- body + custom.preconditionHead() + custom.preconditionMessage("Graceful unregister of Application") + + local cid = self.mobileSession:SendRPC("UnregisterAppInterface",{}) + + EXPECT_RESPONSE(cid, { success = true, resultCode = "SUCCESS"}) + :Timeout(2000) + +end + +Test["Stub"..tostring(indexOfTests)] = function (self) + -- body + custom.preconditionHead() + custom.preconditionMessage("RestartSDL") +end + +Test["StopSDL"..tostring(indexOfTests)] = function (self) + StopSDL() +end + +Test["StartSDL" .. tostring(indexOfTests)] = function (self) + StartSDL(config.pathToSDL, config.ExitOnCrash) +end + +Test["TestInitHMI" .. tostring(indexOfTests)] = function (self) + self:initHMI() +end + +Test["TestInitHMIOnReady" .. tostring(indexOfTests)] = function (self) + self:initHMI_onReady() +end + +Test["ConnectMobile" .. tostring(indexOfTests)] = function (self) + self:connectMobile() +end + +Test["StartSession" .. tostring(indexOfTests)] = function (self) + self.mobileSession = mobile_session.MobileSession(self, self.mobileConnection) +end +-- End Precondition.1 + +-- Begin Precondition.2 +-- Description: ResgisterApp +Test["PreconditionRegisterApp" .. tostring(indexOfTests)] = function (self) + -- body + custom.preconditionHead() + + -- Register App + custom.preconditionMessage("Register Application without vrSynonyms and commands") + self.mobileSession:StartService(7) + :Do(function (_,data) + local correlationId = self.mobileSession:SendRPC("RegisterAppInterface", config.application1.registerAppInterfaceParams) + + EXPECT_HMINOTIFICATION("BasicCommunication.OnAppRegistered") + :Do(function(_,data) + HMIAppID = data.params.application.appID + end) + + -- self.mobileSession:ExpectResponse(correlationId, { success = true }) + EXPECT_RESPONSE(correlationId, { success = true }) + + EXPECT_NOTIFICATION("OnHMIStatus") + :Timeout(mobileResponseTimeout) + + EXPECT_NOTIFICATION("OnPermissionsChange") + :Timeout(mobileResponseTimeout) + end) +end +indexOfTests = indexOfTests + 1 +-- End Precondition.2 + +function Test:AppSendsFirstSGPWithoutVrHelpItems1(...) + -- body + custom.testHead() + custom.testMessage("App sends the very first SetGlobalProperties_request in current ignition cycle WITHOUT and params") + custom.info("Expected: SDL sends UI.SetGlobalProperties with DEFAULT vrHelpTitle constructed from appName") + + local cid = self.mobileSession:SendRPC("SetGlobalProperties", custom.SGP_without_vr_help_start) + + EXPECT_HMICALL("UI.SetGlobalProperties", + { + vrHelpTitle = tostring(config.application1.registerAppInterfaceParams.appName) + }) + :Do(function(_,data) + --hmi side: sending UI.SetGlobalProperties response + self.hmiConnection:SendResponse(data.id, data.method, "SUCCESS", {}) + actualVrHelpItem = nil + actualVrHelpTitle = tostring(config.application1.registerAppInterfaceParams.appName) + if data.params.vrHelp then + self:FailTestCase("vrHelp is present") + end + end) + + --mobile side: expect SetGlobalProperties response + EXPECT_RESPONSE(cid, { success = true, resultCode = "SUCCESS"}) + :Timeout(mobileResponseTimeout) + +end + + +-- /////////////////////////////////////////////////////////////////////////////////////////////////// +-- App sends the very first SetGlobalProperties_request in current ignition cycle WITHOUT and params +-- /////////////////////////////////////////////////////////////////////////////////////////////////// + +-- Begin Precondition.1 +-- Description: RestartSDL + +function Test:UnregisterApp(...) + -- body + custom.preconditionHead() + custom.preconditionMessage("Graceful unregister of Application") + + local cid = self.mobileSession:SendRPC("UnregisterAppInterface",{}) + + EXPECT_RESPONSE(cid, { success = true, resultCode = "SUCCESS"}) + :Timeout(2000) + +end + +Test["Stub"..tostring(indexOfTests)] = function (self) + -- body + custom.preconditionHead() + custom.preconditionMessage("RestartSDL") +end + +Test["StopSDL"..tostring(indexOfTests)] = function (self) + StopSDL() +end + +Test["StartSDL" .. tostring(indexOfTests)] = function (self) + StartSDL(config.pathToSDL, config.ExitOnCrash) +end + +Test["TestInitHMI" .. tostring(indexOfTests)] = function (self) + self:initHMI() +end + +Test["TestInitHMIOnReady" .. tostring(indexOfTests)] = function (self) + self:initHMI_onReady() +end + +Test["ConnectMobile" .. tostring(indexOfTests)] = function (self) + self:connectMobile() +end + +Test["StartSession" .. tostring(indexOfTests)] = function (self) + self.mobileSession = mobile_session.MobileSession(self, self.mobileConnection) +end +-- End Precondition.1 + +-- Begin Precondition.2 +-- Description: ResgisterApp +Test["PreconditionRegisterApp" .. tostring(indexOfTests)] = function (self) + -- body + custom.preconditionHead() + -- Register App + custom.preconditionMessage("Register Application with vrSynonyms but without commands") + + local appWithvrSynonyms = { + syncMsgVersion = + { + majorVersion = 3, + minorVersion = 0 + }, + appName = "Test Application", + isMediaApplication = true, + languageDesired = 'EN-US', + hmiDisplayLanguageDesired = 'EN-US', + appHMIType = { "NAVIGATION" }, + appID = "0000001", + deviceInfo = + { + os = "Android", + carrier = "Megafon", + firmwareRev = "Name: Linux, Version: 3.4.0-perf", + osVersion = "4.4.2", + maxNumberRFCOMMPorts = 1 + }, + vrSynonyms = {"Test", "Tester"} + } + + self.mobileSession:StartService(7) + :Do(function (_,data) + local correlationId = self.mobileSession:SendRPC("RegisterAppInterface", appWithvrSynonyms) + + EXPECT_HMINOTIFICATION("BasicCommunication.OnAppRegistered") + :Do(function(_,data) + HMIAppID = data.params.application.appID + end) + + -- self.mobileSession:ExpectResponse(correlationId, { success = true }) + EXPECT_RESPONSE(correlationId, { success = true }) + + EXPECT_NOTIFICATION("OnHMIStatus") + :Timeout(mobileResponseTimeout) + + EXPECT_NOTIFICATION("OnPermissionsChange") + :Timeout(mobileResponseTimeout) + end) +end +indexOfTests = indexOfTests + 1 +-- End Precondition.2 + +function Test:AppSendsFirstSGPWithoutVrHelpItems2(...) + -- body + custom.testHead() + custom.testMessage("App sends the very first SetGlobalProperties_request in current ignition cycle WITHOUT and params") + custom.info("Expected: SDL sends DEFAULT vrHelp constructed from App's synonyms and DEFAULT vrHelpTitle constructed from appName") + + local cid = self.mobileSession:SendRPC("SetGlobalProperties", custom.SGP_without_vr_help_start) + + EXPECT_HMICALL("UI.SetGlobalProperties", + { + vrHelpTitle = tostring(config.application1.registerAppInterfaceParams.appName) + }) + :Do(function(_,data) + --hmi side: sending UI.SetGlobalProperties response + self.hmiConnection:SendResponse(data.id, data.method, "SUCCESS", {}) + actualVrHelpTitle = tostring(config.application1.registerAppInterfaceParams.appName) + if data.params.vrHelp then + if (data.params.vrHelp[1].text == "Test") and (data.params.vrHelp[2].text == "Tester") then + return true + end + else + self:FailTestCase("vrHelp is absent") + end + end) + + --mobile side: expect SetGlobalProperties response + EXPECT_RESPONSE(cid, { success = true, resultCode = "SUCCESS"}) + :Timeout(mobileResponseTimeout) + +end + + +-- /////////////////////////////////////////////////////////////////////////////////////////////////// +-- App sends the very first SetGlobalProperties_request in current ignition cycle WITHOUT and params +-- /////////////////////////////////////////////////////////////////////////////////////////////////// + +-- Begin Precondition.1 +-- Description: RestartSDL + +function Test:UnregisterApp(...) + -- body + custom.preconditionHead() + custom.preconditionMessage("Graceful unregister of Application") + + local cid = self.mobileSession:SendRPC("UnregisterAppInterface",{}) + + EXPECT_RESPONSE(cid, { success = true, resultCode = "SUCCESS"}) + :Timeout(2000) + +end + +Test["Stub"..tostring(indexOfTests)] = function (self) + -- body + custom.preconditionHead() + custom.preconditionMessage("RestartSDL") +end + +Test["StopSDL"..tostring(indexOfTests)] = function (self) + StopSDL() +end + +Test["StartSDL" .. tostring(indexOfTests)] = function (self) + StartSDL(config.pathToSDL, config.ExitOnCrash) +end + +Test["TestInitHMI" .. tostring(indexOfTests)] = function (self) + self:initHMI() +end + +Test["TestInitHMIOnReady" .. tostring(indexOfTests)] = function (self) + self:initHMI_onReady() +end + +Test["ConnectMobile" .. tostring(indexOfTests)] = function (self) + self:connectMobile() +end + +Test["StartSession" .. tostring(indexOfTests)] = function (self) + self.mobileSession = mobile_session.MobileSession(self, self.mobileConnection) +end +-- End Precondition.1 + +-- Begin Precondition.2 +-- Description: ResgisterApp +Test["PreconditionRegisterApp" .. tostring(indexOfTests)] = function (self) + -- body + custom.preconditionHead() + -- Register App + custom.preconditionMessage("Register Application with vrSynonyms and commands containing vrSynonyms") + + local appWithvrSynonyms = { + syncMsgVersion = + { + majorVersion = 3, + minorVersion = 0 + }, + appName = "Test Application", + isMediaApplication = true, + languageDesired = 'EN-US', + hmiDisplayLanguageDesired = 'EN-US', + appHMIType = { "NAVIGATION" }, + appID = "0000001", + deviceInfo = + { + os = "Android", + carrier = "Megafon", + firmwareRev = "Name: Linux, Version: 3.4.0-perf", + osVersion = "4.4.2", + maxNumberRFCOMMPorts = 1 + }, + vrSynonyms = {"Test", "Tester"} + } + + self.mobileSession:StartService(7) + :Do(function (_,data) + local correlationId = self.mobileSession:SendRPC("RegisterAppInterface", appWithvrSynonyms) + + EXPECT_HMINOTIFICATION("BasicCommunication.OnAppRegistered") + :Do(function(_,data) + HMIAppID = data.params.application.appID + end) + + -- self.mobileSession:ExpectResponse(correlationId, { success = true }) + EXPECT_RESPONSE(correlationId, { success = true }) + + EXPECT_NOTIFICATION("OnHMIStatus") + :Timeout(mobileResponseTimeout) + + EXPECT_NOTIFICATION("OnPermissionsChange") + :Timeout(mobileResponseTimeout) + end) +print ("HMIAppID = " ..HMIAppID) +end + +indexOfTests = indexOfTests + 1 +-- End Precondition.2 + +-- UPDATED: To Have AddCommand SUCCESS shall be allowed by policy, in NONE has DISALLOWED; Will be activated. +-- Description: Activation App by sending SDL.ActivateApp +function Test:ActivateApp() + --hmi side: sending SDL.ActivateApp request + local RequestId = self.hmiConnection:SendRequest("SDL.ActivateApp", { appID = HMIAppID}) + + --hmi side: expect SDL.ActivateApp response + EXPECT_HMIRESPONSE(RequestId) + :Do(function(_,data) + --In case when app is not allowed, it is needed to allow app + if data.result.isSDLAllowed ~= true then + --hmi side: sending SDL.GetUserFriendlyMessage request + local RequestId = self.hmiConnection:SendRequest("SDL.GetUserFriendlyMessage", + {language = "EN-US", messageCodes = {"DataConsent"}}) + + --hmi side: expect SDL.GetUserFriendlyMessage response + --TODO: Update after resolving APPLINK-16094 EXPECT_HMIRESPONSE(RequestId,{result = {code = 0, method = "SDL.GetUserFriendlyMessage"}}) + EXPECT_HMIRESPONSE(RequestId) + :Do(function(_,data) + + --hmi side: send request SDL.OnAllowSDLFunctionality + self.hmiConnection:SendNotification("SDL.OnAllowSDLFunctionality", + {allowed = true, source = "GUI", device = {id = config.deviceMAC, name = "127.0.0.1"}}) + + --hmi side: expect BasicCommunication.ActivateApp request + EXPECT_HMICALL("BasicCommunication.ActivateApp") + :Do(function(_,data) + + --hmi side: sending BasicCommunication.ActivateApp response + self.hmiConnection:SendResponse(data.id,"BasicCommunication.ActivateApp", "SUCCESS", {}) + end) + :Times(2) + end) + + end + end) + + --mobile side: expect notification + EXPECT_NOTIFICATION("OnHMIStatus", {hmiLevel = "FULL", systemContext = "MAIN" }) +end + +-- Begin Precondition.3 +-- Description: Adding Commands +function Test:PreconditionAddCommand(...) + -- body + --mobile side: sending AddCommand request + local cid = self.mobileSession:SendRPC("AddCommand", + { + cmdID = 1, + menuParams = + { + menuName ="Options" + }, + vrCommands = {"Options", "Settings"} + }) + --hmi side: expect UI.AddCommand request + EXPECT_HMICALL("UI.AddCommand", + { + cmdID = 1, + menuParams = + { + menuName ="Options" + } + }) + :Do(function(exp,data) + --hmi side: send UI.AddCommand response + self.hmiConnection:SendResponse(data.id, data.method, "SUCCESS", {}) + end) + + --hmi side: expect VR.AddCommand request + EXPECT_HMICALL("VR.AddCommand", + { + cmdID = 1, + type = "Command", + vrCommands = {"Options", "Settings"} + }) + :Do(function(exp,data) + --hmi side: sending VR.AddCommand response + self.hmiConnection:SendResponse(data.id, data.method, "SUCCESS", {}) + end) + + EXPECT_RESPONSE(cid, { success = true}) + :Timeout(mobileResponseTimeout) +end +-- End Precondition.3 + +function Test:AppSendsFirstSGPWithoutVrHelpItems3(...) + -- body + custom.testHead() + custom.testMessage("App sends the very first SetGlobalProperties_request in current ignition cycle WITHOUT and params") + custom.info("Expected: SDL sends DEFAULT vrHelp constructed from App's synonyms and 1st synonyms of commands and DEFAULT vrHelpTitle") + + local cid = self.mobileSession:SendRPC("SetGlobalProperties", custom.SGP_without_vr_help_start) + + EXPECT_HMICALL("UI.SetGlobalProperties", + { + vrHelpTitle = tostring(config.application1.registerAppInterfaceParams.appName) + }) + :Do(function(_,data) + --hmi side: sending UI.SetGlobalProperties response + self.hmiConnection:SendResponse(data.id, data.method, "SUCCESS", {}) + actualVrHelpTitle = tostring(config.application1.registerAppInterfaceParams.appName) + if data.params.vrHelp then + custom.info("Point0") + if (data.params.vrHelp[1].text == "Test") and + (data.params.vrHelp[2].text == "Tester") and + (data.params.vrHelp[3].text == "Options") + then + custom.info("Point1") + custom.info(data.params.vrHelp[1].text) + custom.info(data.params.vrHelp[2].text) + custom.info(data.params.vrHelp[3].text) + return true + else + self:FailTestCase("one or more from expected vrHelp items is(are) absent") + end + else + self:FailTestCase("vrHelp is absent") + end + end) + + --mobile side: expect SetGlobalProperties response + EXPECT_RESPONSE(cid, { success = true, resultCode = "SUCCESS"}) + :Timeout(mobileResponseTimeout) + +end + +function Test:Sleep(...) + -- body + sleep(2) +end + +-- /////////////////////////////////////////////////////////////////////////////////////////////////// +-- App sends next (not first) SetGlobalProperties_request in current ignition cycle WITH and params +-- /////////////////////////////////////////////////////////////////////////////////////////////////// + +function Test:AppSendsNextSGPWithVrHelpItemsAfterDefaultProperties(...) + -- body + custom.testHead() + custom.testMessage("App sends next (not first) SetGlobalProperties_request in current ignition cycle WITH and params") + custom.info("Expected: SDL sends UI.SetGlobalProperties with vrHelp and vrHelpTitle from last SetGlobalProperties") + + local cid = self.mobileSession:SendRPC("SetGlobalProperties", custom.SGP_with_vr_help_next) + + -- custom.info(custom.SGP_with_vr_help_next.vrHelp) + -- custom.info(custom.SGP_with_vr_help_next.vrHelpTitle) + + EXPECT_HMICALL("UI.SetGlobalProperties", + { + vrHelp = custom.SGP_with_vr_help_next.vrHelp, + vrHelpTitle = custom.SGP_with_vr_help_next.vrHelpTitle + }) + :Do(function(_,data) + --hmi side: sending UI.SetGlobalProperties response + self.hmiConnection:SendResponse(data.id, data.method, "SUCCESS", {}) + actualVrHelpItem = custom.SGP_with_vr_help_next.vrHelp + actualVrHelpTitle = custom.SGP_with_vr_help_next.vrHelpTitle + end) + + --mobile side: expect SetGlobalProperties response + EXPECT_RESPONSE(cid, { success = true, resultCode = "SUCCESS"}) + :Timeout(mobileResponseTimeout) +end + + +function Test:Sleep(...) + -- body + sleep(2) +end + +-- /////////////////////////////////////////////////////////////////////////////////////////////////// +-- App sends next (not first) SetGlobalProperties_request in current ignition cycle WITHOUT and params +-- /////////////////////////////////////////////////////////////////////////////////////////////////// + +function Test:AppSendsNextSGPWithoutVrHelpItems(...) + -- body + custom.testHead() + custom.testMessage("App sends next (not first) SetGlobalProperties_request in current ignition cycle WITHOUT and params") + custom.info("Expected: SDL sends UI.SetGlobalProperties WITHOUT vrHelp and vrHelpTitle") + + local cid = self.mobileSession:SendRPC("SetGlobalProperties", custom.SGP_without_vr_help_next) + + -- custom.info(custom.SGP_without_vr_help_next.vrHelp) + -- custom.info(custom.SGP_without_vr_help_next.vrHelpTitle) + + EXPECT_HMICALL("UI.SetGlobalProperties") + :Do(function(_,data) + --hmi side: sending UI.SetGlobalProperties response + self.hmiConnection:SendResponse(data.id, data.method, "SUCCESS", {}) + if data.params.vrHelp then + self:FailTestCase("vrHelp is present") + end + if data.params.vrHelpTitle then + custom.info("vrHelpTitle is: " .. tostring(data.params.vrHelpTitle)) + self:FailTestCase("vrHelpTitle is present") + end + end) + + --mobile side: expect SetGlobalProperties response + EXPECT_RESPONSE(cid, { success = true, resultCode = "SUCCESS"}) + :Timeout(mobileResponseTimeout) +end + + +-- /////////////////////////////////////////////////////////////////////////////////////////////////// +-- App successfully registers and satisfies all conditions for resumption +-- /////////////////////////////////////////////////////////////////////////////////////////////////// + +-- Begin Precondition.1 +-- Description: RestartSDL + +Test["Stub"..tostring(indexOfTests)] = function (self) + -- body + custom.preconditionHead() + custom.preconditionMessage("RestartSDL") +end + +Test["SUSPEND"..tostring(indexOfTests)] = function (self) + self.hmiConnection:SendNotification("BasicCommunication.OnExitAllApplications", {reason = "SUSPEND"}) + EXPECT_HMINOTIFICATION("BasicCommunication.OnSDLPersistenceComplete") +end + +Test["StopSDL"..tostring(indexOfTests)] = function (self) + + StopSDL() + + self.hmiConnection:SendNotification("BasicCommunication.OnExitAllApplications",{reason = "IGNITION_OFF"}) + + -- hmi side: expect OnSDLClose notification + EXPECT_HMINOTIFICATION("BasicCommunication.OnSDLClose") + + -- hmi side: expect OnAppUnregistered notification + EXPECT_HMINOTIFICATION("BasicCommunication.OnAppUnregistered") + :Times(1) + +end + +Test["StartSDL" .. tostring(indexOfTests)] = function (self) + StartSDL(config.pathToSDL, config.ExitOnCrash) +end + +Test["TestInitHMI" .. tostring(indexOfTests)] = function (self) + self:initHMI() +end + +Test["TestInitHMIOnReady" .. tostring(indexOfTests)] = function (self) + self:initHMI_onReady() +end + +Test["ConnectMobile" .. tostring(indexOfTests)] = function (self) + self:connectMobile() +end + +Test["StartSession" .. tostring(indexOfTests)] = function (self) + self.mobileSession = mobile_session.MobileSession(self, self.mobileConnection) +end +indexOfTests = indexOfTests + 1 +-- End Precondition.1 + +-- Begin Precondition.2 +-- Description: ResgisterApp +function Test:GlobalPropertiesAfterResumption(...) + -- body + custom.testHead() + + -- Register App + custom.testMessage("App successfully registers and satisfies all conditions for resumption") + custom.info("Expected: SDL sends UI.SetGlobalProperties with stored App's global properties") + + self.mobileSession:StartService(7) + :Do(function (_,data) + local correlationId = self.mobileSession:SendRPC("RegisterAppInterface", config.application1.registerAppInterfaceParams) + + EXPECT_HMINOTIFICATION("BasicCommunication.OnAppRegistered") + :Do(function(_,data) + HMIAppID = data.params.application.appID + end) + + -- self.mobileSession:ExpectResponse(correlationId, { success = true }) + EXPECT_RESPONSE(correlationId, { success = true }) + + EXPECT_NOTIFICATION("OnHMIStatus") + :Timeout(mobileResponseTimeout) + :Times(2) + + EXPECT_NOTIFICATION("OnPermissionsChange") + :Timeout(mobileResponseTimeout) + + EXPECT_HMICALL("UI.SetGlobalProperties", + { + vrHelp = actualVrHelpItem, + vrHelpTitle = actualVrHelpTitle + }) + end) +end +-- End Precondition.2 + +-- /////////////////////////////////////////////////////////////////////////////////////////////////// +-- After resumption App sends next SetGlobalProperties WITHOUT vrHelp and vrHelpTitle +-- /////////////////////////////////////////////////////////////////////////////////////////////////// + +function Test:AfterResumptionNextSGPWithoutVrHelpItems(...) + -- body + custom.testHead() + custom.testMessage("After resumption App sends next SetGlobalProperties WITHOUT vrHelp and vrHelpTitle") + custom.info("Expected: SDL omit vrHelp and vrHelpTitle in UI.SetGlobalProperties") + + local cid = self.mobileSession:SendRPC("SetGlobalProperties", custom.SGP_without_vr_help_next) + + EXPECT_HMICALL("UI.SetGlobalProperties") + :Do(function(_,data) + --hmi side: sending UI.SetGlobalProperties response + self.hmiConnection:SendResponse(data.id, data.method, "SUCCESS", {}) + if (data.params.vrHelp) or (data.params.vrHelpTitle) then + self:FailTestCase("vrHelp or vrHelpTitle is present") + end + end) + + --mobile side: expect SetGlobalProperties response + EXPECT_RESPONSE(cid, { success = true, resultCode = "SUCCESS"}) + :Timeout(mobileResponseTimeout) +end + + +function Test:Sleep(...) + -- body + sleep(2) +end + +-- /////////////////////////////////////////////////////////////////////////////////////////////////// +-- After resumption App sends next SetGlobalProperties WITH vrHelp and vrHelpTitle +-- /////////////////////////////////////////////////////////////////////////////////////////////////// + +function Test:AfterResumptionNextSGPWithVrHelpItems(...) + -- body + custom.testHead() + custom.testMessage("After resumption App sends next SetGlobalProperties WITH vrHelp and vrHelpTitle") + custom.info("SDL sends UI.SetGlobalProperties with vrHelp and vrHelpTitle from last SetGlobalProperties") + + local cid = self.mobileSession:SendRPC("SetGlobalProperties", custom.SGP_with_vr_help_next) + + + EXPECT_HMICALL("UI.SetGlobalProperties", + { + vrHelp = custom.SGP_with_vr_help_next.vrHelp, + vrHelpTitle = custom.SGP_with_vr_help_next.vrHelpTitle + }) + :Do(function(_,data) + --hmi side: sending UI.SetGlobalProperties response + self.hmiConnection:SendResponse(data.id, data.method, "SUCCESS", {}) + actualVrHelpItem = custom.SGP_with_vr_help_next.vrHelp + actualVrHelpTitle = custom.SGP_with_vr_help_next.vrHelpTitle + end) + + --mobile side: expect SetGlobalProperties response + EXPECT_RESPONSE(cid, { success = true, resultCode = "SUCCESS"}) + :Timeout(mobileResponseTimeout) + +end \ No newline at end of file diff --git a/test_scripts/API/ATF_AddCommand.lua b/test_scripts/API/ATF_AddCommand.lua new file mode 100644 index 0000000000..ba446d07af --- /dev/null +++ b/test_scripts/API/ATF_AddCommand.lua @@ -0,0 +1,12515 @@ +Test = require('connecttest') +require('cardinalities') +local events = require('events') +local mobile_session = require('mobile_session') + +local commonFunctions = require('user_modules/shared_testcases/commonFunctions') +local commonSteps = require('user_modules/shared_testcases/commonSteps') +local commonTestCases = require('user_modules/shared_testcases/commonTestCases') +require('user_modules/AppTypes') + +config.deviceMAC = "12ca17b49af2289436f303e0166030a21e525d266e209267433801a8fd4071a0" +--ToDo: shall be removed when APPLINK-16610 is fixed +config.defaultProtocolVersion = 2 + +local storagePath = config.pathToSDL .. "storage/" ..config.application1.registerAppInterfaceParams.appID.. "_" .. config.deviceMAC.. "/" +local imageValues = {"i", "icon.png", "qwertyuiopasdfghjklzxcvbnm1234567890[]'.!@#$%^&*()_+-=qwertyuiopasdfghjklzxcvbnm1234567890[]'.!@#$%^&*()_+-=QWERTYUIOPASDFGHJKLZXCVBNM{}|?>: "" -> "groups": group_1) + c) AddCommand is omitted in "group_1" + + 1) Send AddCommand from mobile app. + 2) SDL->app: AddCommand_response (DISALLOWED) + 2. SDL disallowed AddCommand request with DISALLOWED resultCode when current HMI level is NONE. + ]] + + --Begin Test case ResultCodeCheck.5.1 + --Description: SDL send DISALLOWED when HMI level is NONE + function Test:Precondition_DeactivateApp() + --hmi side: sending BasicCommunication.OnExitApplication notification + self.hmiConnection:SendNotification("BasicCommunication.OnExitApplication", {appID = self.applications["Test Application"], reason = "USER_EXIT"}) + + EXPECT_NOTIFICATION("OnHMIStatus", + { systemContext = "MAIN", hmiLevel = "NONE", audioStreamingState = "NOT_AUDIBLE"}) + end + + function Test:AddCommand_DisallowedHMINone() + --mobile side: sending AddCommand request + local cid = self.mobileSession:SendRPC("AddCommand", + { + cmdID = 110, + menuParams = + { + position = 0, + menuName ="Command110" + }, + vrCommands = + { + "CommandOneOneZero" + }, + cmdIcon = + { + value ="icon.png", + imageType ="DYNAMIC" + } + }) + + EXPECT_RESPONSE(cid, { success = false, resultCode = "DISALLOWED" }) + + --mobile side: expect OnHashChange notification is not send to mobile + EXPECT_NOTIFICATION("OnHashChange") + :Times(0) + + DelayedExp() + end + + --Begin Test case ResultCodeCheck.5.1 + + ----------------------------------------------------------------------------------------- + + --Begin Test case ResultCodeCheck.5.2 + --Description: AddCommand is omitted in the PolicyTable group(s) + + commonSteps:ActivationApp() + --TODO: Should be uncommented when APPLINK-25363 is resolved + --Description: Update Policy with AddCommand is DISALLOWED by user + function Test:Precondition_OmittedAddCommandPolicyUpdate() + --hmi side: sending SDL.GetURLS request + local RequestIdGetURLS = self.hmiConnection:SendRequest("SDL.GetURLS", { service = 7 }) + + -- --hmi side: expect SDL.GetURLS response from HMI + -- EXPECT_HMIRESPONSE(RequestIdGetURLS,{result = {code = 0, method = "SDL.GetURLS", urls = {{url = "http://policies.telematics.ford.com/api/policies"}}}}) + -- :Do(function(_,data) + -- --print("SDL.GetURLS response is received") + -- --hmi side: sending BasicCommunication.OnSystemRequest request to SDL + -- self.hmiConnection:SendNotification("BasicCommunication.OnSystemRequest", + -- { + -- requestType = "PROPRIETARY", + -- fileName = "filename" + -- } + -- ) + --mobile side: expect OnSystemRequest notification + -- EXPECT_NOTIFICATION("OnSystemRequest", { requestType = "PROPRIETARY" }) + -- :Do(function(_,data) + -- --print("OnSystemRequest notification is received") + -- --mobile side: sending SystemRequest request + -- local CorIdSystemRequest = self.mobileSession:SendRPC("SystemRequest", + -- { + -- fileName = "PolicyTableUpdate", + -- requestType = "PROPRIETARY" + -- }, + -- "files/PTU_OmittedAddCommand.json") + + -- local systemRequestId + -- --hmi side: expect SystemRequest request + -- EXPECT_HMICALL("BasicCommunication.SystemRequest") + -- :Do(function(_,data) + -- systemRequestId = data.id + -- --print("BasicCommunication.SystemRequest is received") + + -- --hmi side: sending BasicCommunication.OnSystemRequest request to SDL + -- self.hmiConnection:SendNotification("SDL.OnReceivedPolicyUpdate", + -- { + -- policyfile = "/tmp/fs/mp/images/ivsu_cache/PolicyTableUpdate" + -- } + -- ) + -- function to_run() + -- --hmi side: sending SystemRequest response + -- self.hmiConnection:SendResponse(systemRequestId,"BasicCommunication.SystemRequest", "SUCCESS", {}) + -- end + + -- RUN_AFTER(to_run, 500) + -- end) + + -- --hmi side: expect SDL.OnStatusUpdate + -- EXPECT_HMINOTIFICATION("SDL.OnStatusUpdate") + -- :ValidIf(function(exp,data) + -- if + -- exp.occurences == 1 and + -- data.params.status == "UP_TO_DATE" then + -- return true + -- elseif + -- exp.occurences == 1 and + -- data.params.status == "UPDATING" then + -- return true + -- elseif + -- exp.occurences == 2 and + -- data.params.status == "UP_TO_DATE" then + -- return true + -- else + -- if + -- exp.occurences == 1 then + -- print ("\27[31m SDL.OnStatusUpdate came with wrong values. Expected in first occurrences status 'UP_TO_DATE' or 'UPDATING', got '" .. tostring(data.params.status) .. "' \27[0m") + -- elseif exp.occurences == 2 then + -- print ("\27[31m SDL.OnStatusUpdate came with wrong values. Expected in second occurrences status 'UP_TO_DATE', got '" .. tostring(data.params.status) .. "' \27[0m") + -- end + -- return false + -- end + -- end) + -- :Times(Between(1,2)) + + -- --mobile side: expect SystemRequest response + -- EXPECT_RESPONSE(CorIdSystemRequest, { success = true, resultCode = "SUCCESS"}) + -- :Do(function(_,data) + -- --print("SystemRequest is received") + -- --hmi side: sending SDL.GetUserFriendlyMessage request to SDL + -- local RequestIdGetUserFriendlyMessage = self.hmiConnection:SendRequest("SDL.GetUserFriendlyMessage", {language = "EN-US", messageCodes = {"StatusUpToDate"}}) + + -- --hmi side: expect SDL.GetUserFriendlyMessage response + -- -- TODO: update after resolving APPLINK-16094 EXPECT_HMIRESPONSE(RequestIdGetUserFriendlyMessage,{result = {code = 0, method = "SDL.GetUserFriendlyMessage", messages = {{line1 = "Up-To-Date", messageCode = "StatusUpToDate", textBody = "Up-To-Date"}}}}) + -- EXPECT_HMIRESPONSE(RequestIdGetUserFriendlyMessage) + -- :Do(function(_,data) + -- print("SDL.GetUserFriendlyMessage is received") + -- end) + -- end) + + -- end) + -- end) + end + --TODO: Should be uncommented when APPLINK-25363 is resolved + -- --Check of DISALLOWED response code + -- function Test:AddCommand_UserDisallowed() + -- --mobile side: sending AddCommand request + -- local cid = self.mobileSession:SendRPC("AddCommand", + -- { + -- cmdID = 112, + -- menuParams = + -- { + -- position = 0, + -- menuName ="Command112" + -- }, + -- vrCommands = + -- { + -- "CommandOneOneTwo" + -- }, + -- cmdIcon = + -- { + -- value ="icon.png", + -- imageType ="DYNAMIC" + -- } + -- }) + + -- EXPECT_RESPONSE(cid, { success = false, resultCode = "DISALLOWED" }) + -- :Timeout(20000) + + -- --mobile side: expect OnHashChange notification is not send to mobile + -- EXPECT_NOTIFICATION("OnHashChange") + -- :Times(0) + -- end + --Begin Test case ResultCodeCheck.5.2 + --End Test case ResultCodeCheck.5 + + ----------------------------------------------------------------------------------------- + + --Begin Test case ResultCodeCheck.6 + --Description: USER-DISALLOWED response code is sent by SDL when the request isn't allowed by user. + + --Requirement id in JAMA: + --SDLAQ-CRS-413 + + --Verification criteria: + -- SDL sends USER-DISALLOWED code when the request isn't allowed by user. + --Description: Update Policy with AddCommand is DISALLOWED by user + --TODO: Should be uncommented when APPLINK-25363 is resolved + -- local idGroup + -- function Test:Precondition_UserDisallowedPolicyUpdate() + -- --hmi side: sending SDL.GetURLS request + -- local RequestIdGetURLS = self.hmiConnection:SendRequest("SDL.GetURLS", { service = 7 }) + + -- --hmi side: expect SDL.GetURLS response from HMI + -- EXPECT_HMIRESPONSE(RequestIdGetURLS,{result = {code = 0, method = "SDL.GetURLS", urls = {{url = "http://policies.telematics.ford.com/api/policies"}}}}) + -- :Do(function(_,data) + -- --print("SDL.GetURLS response is received") + -- --hmi side: sending BasicCommunication.OnSystemRequest request to SDL + -- self.hmiConnection:SendNotification("BasicCommunication.OnSystemRequest", + -- { + -- requestType = "PROPRIETARY", + -- fileName = "filename" + -- } + -- ) + -- --mobile side: expect OnSystemRequest notification + -- EXPECT_NOTIFICATION("OnSystemRequest", { requestType = "PROPRIETARY" }) + -- :Do(function(_,data) + -- --print("OnSystemRequest notificfation is received") + -- --mobile side: sending SystemRequest request + -- local CorIdSystemRequest = self.mobileSession:SendRPC("SystemRequest", + -- { + -- fileName = "PolicyTableUpdate", + -- requestType = "PROPRIETARY" + -- }, + -- "files/PTU_ForAddCommand.json") + + -- local systemRequestId + -- --hmi side: expect SystemRequest request + -- EXPECT_HMICALL("BasicCommunication.SystemRequest") + -- :Do(function(_,data) + -- systemRequestId = data.id + -- --print("BasicCommunication.SystemRequest is received") + + -- --hmi side: sending BasicCommunication.OnSystemRequest request to SDL + -- self.hmiConnection:SendNotification("SDL.OnReceivedPolicyUpdate", + -- { + -- policyfile = "/tmp/fs/mp/images/ivsu_cache/PolicyTableUpdate" + -- } + -- ) + -- function to_run() + -- --hmi side: sending SystemRequest response + -- self.hmiConnection:SendResponse(systemRequestId,"BasicCommunication.SystemRequest", "SUCCESS", {}) + -- end + + -- RUN_AFTER(to_run, 500) + -- end) + + -- --hmi side: expect SDL.OnStatusUpdate + -- EXPECT_HMINOTIFICATION("SDL.OnStatusUpdate") + -- :ValidIf(function(exp,data) + -- if + -- exp.occurences == 1 and + -- data.params.status == "UP_TO_DATE" then + -- return true + -- elseif + -- exp.occurences == 1 and + -- data.params.status == "UPDATING" then + -- return true + -- elseif + -- exp.occurences == 2 and + -- data.params.status == "UP_TO_DATE" then + -- return true + -- else + -- if + -- exp.occurences == 1 then + -- print ("\27[31m SDL.OnStatusUpdate came with wrong values. Expected in first occurrences status 'UP_TO_DATE' or 'UPDATING', got '" .. tostring(data.params.status) .. "' \27[0m") + -- elseif exp.occurences == 2 then + -- print ("\27[31m SDL.OnStatusUpdate came with wrong values. Expected in second occurrences status 'UP_TO_DATE', got '" .. tostring(data.params.status) .. "' \27[0m") + -- end + -- return false + -- end + -- end) + -- :Times(Between(1,2)) + + -- --mobile side: expect SystemRequest response + -- EXPECT_RESPONSE(CorIdSystemRequest, { success = true, resultCode = "SUCCESS"}) + -- :Do(function(_,data) + -- --print("SystemRequest is received") + -- --hmi side: sending SDL.GetUserFriendlyMessage request to SDL + -- local RequestIdGetUserFriendlyMessage = self.hmiConnection:SendRequest("SDL.GetUserFriendlyMessage", {language = "EN-US", messageCodes = {"StatusUpToDate"}}) + + -- --hmi side: expect SDL.GetUserFriendlyMessage response + -- EXPECT_HMIRESPONSE(RequestIdGetUserFriendlyMessage,{result = {code = 0, method = "SDL.GetUserFriendlyMessage", messages = {{line1 = "Up-To-Date", messageCode = "StatusUpToDate", textBody = "Up-To-Date"}}}}) + -- :Do(function(_,data) + -- print("SDL.GetUserFriendlyMessage is received") + -- --hmi side: sending SDL.GetListOfPermissions request to SDL + -- local RequestIdGetListOfPermissions = self.hmiConnection:SendRequest("SDL.GetListOfPermissions", {appID = self.applications["Test Application"]}) + + -- -- hmi side: expect SDL.GetListOfPermissions response + -- -- -- TODO: update after resolving APPLINK-16094 EXPECT_HMIRESPONSE(RequestIdGetListOfPermissions,{result = {code = 0, method = "SDL.GetListOfPermissions"}}) + -- EXPECT_HMIRESPONSE(RequestIdGetListOfPermissions) + -- :Do(function(_,data) + -- print("SDL.GetListOfPermissions response is received") + + -- idGroup = data.result.allowedFunctions[1].id + -- --hmi side: sending SDL.OnAppPermissionConsent + -- self.hmiConnection:SendNotification("SDL.OnAppPermissionConsent", { appID = self.applications["Test Application"], consentedFunctions = {{ allowed = false, id = idGroup, name = "New"}}, source = "GUI"}) + -- end) + -- end) + -- end) + -- :Timeout(2000) + + + -- end) + -- end) + -- end + + -- --Check of USER_DISALLOWED response code + -- function Test:AddCommand_UserDisallowed() + -- --mobile side: sending AddCommand request + -- local cid = self.mobileSession:SendRPC("AddCommand", + -- { + -- cmdID = 11333, + -- menuParams = + -- { + -- position = 0, + -- menuName ="Command113" + -- }, + -- vrCommands = + -- { + -- "CommandOneOneThree" + -- }, + -- cmdIcon = + -- { + -- value ="icon.png", + -- imageType ="DYNAMIC" + -- } + -- }) + + -- EXPECT_RESPONSE(cid, { success = false, resultCode = "USER_DISALLOWED" }) + -- :Timeout(20000) + + -- --mobile side: expect OnHashChange notification is not send to mobile + -- EXPECT_NOTIFICATION("OnHashChange") + -- :Times(0) + -- end + + -- --Description: Update Policy with AddCommand is Allowed by user + -- function Test:AllowedAddCommand() + -- DelayedExp() + -- self.hmiConnection:SendNotification("SDL.OnAppPermissionConsent", { appID = self.applications["Test Application"], consentedFunctions = {{ allowed = true, id = idGroup, name = "New"}}, source = "GUI"}) + -- end + -- --End Test case ResultCodeCheck.6 + + --End Test suit ResultCodeCheck + + +---------------------------------------------------------------------------------------------- +-----------------------------------------V TEST BLOCK----------------------------------------- +---------------------------------------HMI negative cases------------------------------------- +---------------------------------------------------------------------------------------------- + + --------Checks----------- + -- requests without responses from HMI + -- invalid structure os response + -- several responses from HMI to one request + -- fake parameters + -- HMI correlation id check + -- wrong response with correct HMI id + + --Begin Test suit HMINegativeCheck + --Description: Check processing responses with invalid structure, fake parameters, HMI correlation id check, wrong response with correct HMI correlation id, check sdl behavior in case of absence the response from HMI + + --Begin Test case HMINegativeCheck.1 + --Description: + -- Check SDL behaviour in case of absence of responses from HMI + + --Requirement id in JAMA: + --SDLAQ-CRS-412 + --APPLINK-10501 + --APPLINK-8585 + --SDLAQ-CRS-2928 + --SDLAQ-CRS-2929 + + --Verification criteria: + -- no UI response during SDL`s watchdog. + -- In case SDL sends both UI.AddCommand and VR.AddCommand with one and the same cmdID to HMI AND UI.AddCommand gets successful response from HMI in return AND VR.AddCommand gets no response from HMI during SDL's default timeout - SDL must send UI.DeleteCommand for the successfully added cmdID to HMI. + -- In case SDL sends both UI.AddCommand and VR.AddCommand with one and the same cmdID to HMI AND VR.AddCommand gets successful response from HMI in return AND UI.AddCommand gets no response from HMI during SDL's default timeout - SDL must send VR.DeleteCommand for the successfully added cmdID to HMI. + -- SDL must return (GENERIC_ERROR, success:false) to mobile app in case app's request was split into several HMI interfaces by SDL and HMI does not respond at least one of them. + + --Begin HMINegativeCheck.1.1 + --Description: No response from UI + function Test:AddCommand_NoResponseFromUI() + --mobile side: sending AddCommand request + local cid = self.mobileSession:SendRPC("AddCommand", + { + cmdID = 301, + menuParams = + { + menuName ="Command301" + } + }) + --hmi side: expect UI.AddCommand request + EXPECT_HMICALL("UI.AddCommand", + { + cmdID = 301, + menuParams = + { + menuName ="Command301" + } + }) + + --mobile side: expect response + EXPECT_RESPONSE(cid, { success = false, resultCode = "GENERIC_ERROR"}) + :Timeout(12000) + + --mobile side: expect OnHashChange notification is not send to mobile + EXPECT_NOTIFICATION("OnHashChange") + :Times(0) + end + --End HMINegativeCheck.1.1 + + ----------------------------------------------------------------------------------------- + + --Begin HMINegativeCheck.1.2 + --Description: Response from UI but no response from VR + function Test:AddCommand_ResponseFromUINoResponseFromVR() + --mobile side: sending AddCommand request + local cid = self.mobileSession:SendRPC("AddCommand", + { + cmdID = 302, + menuParams = + { + menuName ="Command302" + }, + vrCommands = + { + "VRCommand302" + } + }) + --hmi side: expect UI.AddCommand request + EXPECT_HMICALL("UI.AddCommand", + { + cmdID = 302, + menuParams = + { + menuName ="Command302" + } + }) + :Do(function(_,data) + --hmi side: sending UI.AddCommand response + self.hmiConnection:SendResponse(data.id, data.method, "SUCCESS", {}) + end) + + --hmi side: expect VR.AddCommand request + EXPECT_HMICALL("VR.AddCommand", + { + cmdID = 302, + type = "Command", + vrCommands = + { + "VRCommand302" + } + }) + :Do(function(_,data) + --Do nothing + end) + + --hmi side: expect UI.DeleteCommand request + EXPECT_HMICALL("UI.DeleteCommand", + {cmdID = 302}) + :Timeout(12000) + :Do(function(exp,data) + self.hmiConnection:SendResponse(data.id,"UI.DeleteCommand", "SUCCESS", {}) + end) + + --mobile side: expect response + EXPECT_RESPONSE(cid, { success = false, resultCode = "GENERIC_ERROR" }) + :Timeout(12000) + + --mobile side: expect OnHashChange notification is not send to mobile + EXPECT_NOTIFICATION("OnHashChange") + :Times(0) + end + --End HMINegativeCheck.1.2 + + ----------------------------------------------------------------------------------------- + + --Begin HMINegativeCheck.1.3 + --Description: Response from VR but no response from UI + function Test:AddCommand_ResponseFromVRNoResponseFromUI() + --mobile side: sending AddCommand request + local cid = self.mobileSession:SendRPC("AddCommand", + { + cmdID = 303, + menuParams = + { + menuName ="Command303" + }, + vrCommands = + { + "VRCommand303" + } + }) + --hmi side: expect UI.AddCommand request + EXPECT_HMICALL("UI.AddCommand", + { + cmdID = 303, + menuParams = + { + menuName ="Command303" + } + }) + :Do(function(_,data) + --Do nothing + end) + + --hmi side: expect VR.AddCommand request + EXPECT_HMICALL("VR.AddCommand", + { + cmdID = 303, + type = "Command", + vrCommands = + { + "VRCommand303" + } + }) + :Do(function(exp,data) + self.hmiConnection:SendResponse(data.id,"VR.AddCommand", "SUCCESS", {}) + end) + + --hmi side: expect VR.DeleteCommand request + EXPECT_HMICALL("VR.DeleteCommand", + {cmdID = 303}) + :Timeout(12000) + :Do(function(exp,data) + self.hmiConnection:SendResponse(data.id,"VR.DeleteCommand", "SUCCESS", {}) + end) + + --mobile side: expect response + EXPECT_RESPONSE(cid, { success = false, resultCode = "GENERIC_ERROR" }) + :Timeout(12000) + + --mobile side: expect OnHashChange notification is not send to mobile + EXPECT_NOTIFICATION("OnHashChange") + :Times(0) + end + --End HMINegativeCheck.1.3 + + ----------------------------------------------------------------------------------------- + + --Begin HMINegativeCheck.1.4 + --Description: No Response from UI and VR + function Test:AddCommand_NoResponseFromUIVR() + --mobile side: sending AddCommand request + local cid = self.mobileSession:SendRPC("AddCommand", + { + cmdID = 303, + menuParams = + { + menuName ="Command303" + }, + vrCommands = + { + "VRCommand303" + } + }) + --hmi side: expect UI.AddCommand request + EXPECT_HMICALL("UI.AddCommand", + { + cmdID = 303, + menuParams = + { + menuName ="Command303" + } + }) + :Do(function(_,data) + --Do nothing + end) + + --hmi side: expect VR.AddCommand request + EXPECT_HMICALL("VR.AddCommand", + { + cmdID = 303, + type = "Command", + vrCommands = + { + "VRCommand303" + } + }) + :Do(function(exp,data) + --Do nothing + end) + + --mobile side: expect response + EXPECT_RESPONSE(cid, { success = false, resultCode = "GENERIC_ERROR" }) + :Timeout(12000) + + --mobile side: expect OnHashChange notification is not send to mobile + EXPECT_NOTIFICATION("OnHashChange") + :Times(0) + end + --End HMINegativeCheck.1.4 + --End Test case HMINegativeCheck.1 + + ----------------------------------------------------------------------------------------- + + --Begin Test case HMINegativeCheck.2 + --Description: + -- Invalid structure of response + + --Requirement id in JAMA: + --SDLAQ-CRS-22 + + --Verification criteria: + --The response contains 2 mandatory parameters "success" and "resultCode", "info" is sent if there is any additional information about the resultCode and "tryAgainTime" if provided by SDL. + + --Begin Test case HMINegativeCheck.2.1 + --Description: UI&VR.AddCommand response with invalid structure + function Test: AddCommand_ResponseInvalidStructure() + local cid = self.mobileSession:SendRPC("AddCommand", + { + cmdID = 303, + menuParams = + { + menuName ="Command303" + }, + vrCommands = + { + "VRCommand303" + } + }) + --hmi side: expect UI.AddCommand request + EXPECT_HMICALL("UI.AddCommand", + { + cmdID = 303, + menuParams = + { + menuName ="Command303" + } + }) + :Do(function(_,data) + --hmi side: sending UI.AddCommand response + self.hmiConnection:Send('{"id":'..tostring(data.id)..',"jsonrpc":"2.0","code":0,"result":{"method":"UI.AddCommand"}}') + end) + + --hmi side: expect VR.AddCommand request + EXPECT_HMICALL("VR.AddCommand", + { + cmdID = 303, + type = "Command", + vrCommands = + { + "VRCommand303" + } + }) + :Do(function(_,data) + --hmi side: sending VR.AddCommand response + self.hmiConnection:Send('{"id":'..tostring(data.id)..',"jsonrpc":"2.0","code":0,"result":{"method":"VR.AddCommand"}}') + end) + + --mobile side: expect response + EXPECT_RESPONSE(cid, { success = false, resultCode = "INVALID_DATA"}) + + --mobile side: expect OnHashChange notification is not send to mobile + EXPECT_NOTIFICATION("OnHashChange") + :Times(0) + end + --End Test case HMINegativeCheck.2.1 + + ----------------------------------------------------------------------------------------- + + --Begin Test case HMINegativeCheck.2.2 + --Description: UI.AddCommand response with invalid structure + function Test: AddCommand_InvalidResponseUI() + --mobile side: sending AddCommand request + local cid = self.mobileSession:SendRPC("AddCommand", + { + cmdID = 304, + menuParams = + { + menuName ="Command304" + }, + vrCommands = + { + "VRCommand304" + } + }) + --hmi side: expect UI.AddCommand request + EXPECT_HMICALL("UI.AddCommand", + { + cmdID = 304, + menuParams = + { + menuName ="Command304" + } + }) + :Do(function(_,data) + --hmi side: sending UI.AddCommand response + self.hmiConnection:Send('{"error":{"code":4,"message":"UI.AddCommand is REJECTED"},"id":'..tostring(data.id)..',"jsonrpc":"2.0","result":{"code":0,"method":"UI.AddCommand"}}') + end) + + --hmi side: expect VR.AddCommand request + EXPECT_HMICALL("VR.AddCommand", + { + cmdID = 304, + type = "Command", + vrCommands = + { + "VRCommand304" + } + }) + :Do(function(_,data) + --hmi side: sending VR.AddCommand response + self.hmiConnection:SendResponse(data.id, data.method, "SUCCESS", {}) + end) + + --mobile side: expect response + EXPECT_RESPONSE(cid, { success = false, resultCode = "GENERIC_ERROR"}) + :Timeout(12000) + + --mobile side: expect OnHashChange notification is not send to mobile + EXPECT_NOTIFICATION("OnHashChange") + :Times(0) + end + --End Test case HMINegativeCheck.2.2 + + ----------------------------------------------------------------------------------------- + + --Begin Test case HMINegativeCheck.2.3 + --Description: VR.AddCommand response with invalid structure + function Test: AddCommand_InvalidResponseVR() + --mobile side: sending AddCommand request + local cid = self.mobileSession:SendRPC("AddCommand", + { + cmdID = 304, + menuParams = + { + menuName ="Command304" + }, + vrCommands = + { + "VRCommand304" + } + }) + --hmi side: expect UI.AddCommand request + EXPECT_HMICALL("UI.AddCommand", + { + cmdID = 304, + menuParams = + { + menuName ="Command304" + } + }) + :Do(function(_,data) + --hmi side: sending UI.AddCommand response + self.hmiConnection:SendResponse(data.id, data.method, "SUCCESS", {}) + end) + + --hmi side: expect VR.AddCommand request + EXPECT_HMICALL("VR.AddCommand", + { + cmdID = 304, + type = "Command", + vrCommands = + { + "VRCommand304" + } + }) + :Do(function(_,data) + --hmi side: sending VR.AddCommand response + self.hmiConnection:Send('{"error":{"code":4,"message":"UI.AddCommand is REJECTED"},"id":'..tostring(data.id)..',"jsonrpc":"2.0","result":{"code":0,"method":"VR.AddCommand"}}') + end) + + --mobile side: expect response + EXPECT_RESPONSE(cid, { success = false, resultCode = "GENERIC_ERROR"}) + :Timeout(12000) + + --mobile side: expect OnHashChange notification is not send to mobile + EXPECT_NOTIFICATION("OnHashChange") + :Times(0) + end + --End Test case HMINegativeCheck.2.3 + + --End Test case HMINegativeCheck.2 + + ----------------------------------------------------------------------------------------- + + --Begin Test case HMINegativeCheck.3 + --Description: + -- Several response to one request + + --Requirement id in JAMA: + --SDLAQ-CRS-22 + + --Verification criteria: + --The response contains 2 mandatory parameters "success" and "resultCode", "info" is sent if there is any additional information about the resultCode. + + function Test:AddCommand_SeveralResponseToOneRequest() + --mobile side: sending AddCommand request + local cid = self.mobileSession:SendRPC("AddCommand", + { + cmdID = 222, + menuParams = + { + menuName ="Command222" + } + }) + --hmi side: expect UI.AddCommand request + EXPECT_HMICALL("UI.AddCommand", + { + cmdID = 222, + menuParams = + { + menuName ="Command222" + } + }) + :Do(function(_,data) + --hmi side: sending response + self.hmiConnection:SendResponse( data.id , "UI.AddCommand" , "INVALID_DATA", {}) + self.hmiConnection:SendResponse( data.id , "UI.AddCommand" , "SUCCESS", {}) + self.hmiConnection:SendResponse( data.id , "UI.AddCommand" , "INVALID_ID", {}) + end) + + --mobile side: expect response + EXPECT_RESPONSE(cid, { success = false, resultCode = "INVALID_DATA"}) + + --mobile side: expect OnHashChange notification is not send to mobile + EXPECT_NOTIFICATION("OnHashChange") + :Times(0) + end + + --End Test case HMINegativeCheck.3 + + ----------------------------------------------------------------------------------------- + + --Begin Test case HMINegativeCheck.4 + --Description: + -- Check processing response with fake parameters + + --Requirement id in JAMA: + --SDLAQ-CRS-22 + + --Verification criteria: + -- When expected HMI function is received, send responses from HMI with fake parameter + + --Begin Test case HMINegativeCheck.4.1 + --Description: Parameter not from API + function Test:AddCommand_FakeParamsInResponse() + --mobile side: sending AddCommand request + local cid = self.mobileSession:SendRPC("AddCommand", + { + cmdID = 305, + menuParams = + { + menuName ="Command305" + } + }) + --hmi side: expect UI.AddCommand request + EXPECT_HMICALL("UI.AddCommand", + { + cmdID = 305, + menuParams = + { + menuName ="Command305" + } + }) + :Do(function(_,data) + --hmi side: sending UI.AddCommand response + self.hmiConnection:SendResponse(data.id, data.method, "SUCCESS", {fake = "fake"}) + end) + + EXPECT_RESPONSE(cid, { success = true, resultCode = "SUCCESS" }) + :ValidIf (function(_,data) + if data.payload.fake then + print(" SDL resend fake parameter to mobile app ") + return false + else + return true + end + end) + + --mobile side: expect OnHashChange notification + EXPECT_NOTIFICATION("OnHashChange") + end + --End Test case HMINegativeCheck.4.1 + + ----------------------------------------------------------------------------------------- + + --Begin Test case HMINegativeCheck.4.2 + --Description: Parameter from another API + function Test:AddCommand_ParamsFromOtherAPIInResponse() + --mobile side: sending AddCommand request + local cid = self.mobileSession:SendRPC("AddCommand", + { + cmdID = 306, + menuParams = + { + menuName ="Command306" + } + }) + --hmi side: expect UI.AddCommand request + EXPECT_HMICALL("UI.AddCommand", + { + cmdID = 306, + menuParams = + { + menuName ="Command306" + } + }) + :Do(function(_,data) + --hmi side: sending UI.AddCommand response + self.hmiConnection:SendResponse(data.id, data.method, "SUCCESS", {sliderPosition = 5}) + end) + + --mobile side: expect response + EXPECT_RESPONSE(cid, { success = true, resultCode = "SUCCESS"}) + :ValidIf (function(_,data) + if data.payload.sliderPosition then + print(" SDL resend fake parameter to mobile app ") + return false + else + return true + end + end) + + --mobile side: expect OnHashChange notification + EXPECT_NOTIFICATION("OnHashChange") + end + --End Test case HMINegativeCheck.4.2 + --End Test case HMINegativeCheck.4 + + ----------------------------------------------------------------------------------------- + + --Begin Test case HMINegativeCheck.5 + --Description: + -- Wrong response with correct HMI correlation id + + --Requirement id in JAMA: + --SDLAQ-CRS-22 + + --Verification criteria: + --The response contains 2 mandatory parameters "success" and "resultCode", "info" is sent if there is any additional information about the resultCode. + + --Begin Test case HMINegativeCheck.5.1 + --Description: Send response to VR.AddCommand instead of UI.AddCommand + function Test:AddCommand_WrongResponseToUI() + --mobile side: sending request + local cid = self.mobileSession:SendRPC("AddCommand", + { + cmdID = 2004, + menuParams = + { + menuName ="Command2004" + } + }) + + --hmi side: expect UI.AddCommand request + EXPECT_HMICALL("UI.AddCommand", + { + cmdID = 2004, + menuParams = + { + menuName ="Command2004" + } + }) + :Do(function(_,data) + --hmi side: sending response + self.hmiConnection:SendResponse( data.id , "VR.AddCommand" , "SUCCESS", {}) + end) + + --mobile side: expect response + EXPECT_RESPONSE(cid, { success = false, resultCode = "GENERIC_ERROR"}) + :Timeout(12000) + + --mobile side: expect OnHashChange notification is not send to mobile + EXPECT_NOTIFICATION("OnHashChange") + :Times(0) + end + --End Test case HMINegativeCheck.5.1 + + ----------------------------------------------------------------------------------------- + + --Begin Test case HMINegativeCheck.5.2 + --Description: Send response to UI.AddCommand instead of VR.AddCommand + function Test:AddCommand_WrongResponseToVR() + --mobile side: sending request + local cid = self.mobileSession:SendRPC("AddCommand", + { + cmdID = 2005, + menuParams = + { + menuName ="Command2005" + }, + vrCommands = + { + "VRCommand2005" + } + }) + + --hmi side: expect UI.AddCommand request + EXPECT_HMICALL("UI.AddCommand", + { + cmdID = 2005, + menuParams = + { + menuName ="Command2005" + } + }) + :Do(function(_,data) + --hmi side: sending response + self.hmiConnection:SendResponse( data.id , "UI.AddCommand" , "SUCCESS", {}) + end) + + --hmi side: expect VR.AddCommand request + EXPECT_HMICALL("VR.AddCommand", + { + cmdID = 2005, + type = "Command", + vrCommands = + { + "VRCommand2005" + } + }) + :Do(function(_,data) + --hmi side: sending VR.AddCommand response + self.hmiConnection:SendResponse( data.id , "UI.AddCommand" , "SUCCESS", {}) + end) + + --hmi side: expect UI.DeleteCommand request + EXPECT_HMICALL("UI.DeleteCommand", + {cmdID = 2005}) + :Timeout(15000) + :Do(function(exp,data) + self.hmiConnection:SendResponse(data.id,"UI.DeleteCommand", "SUCCESS", {}) + end) + + --mobile side: expect response + EXPECT_RESPONSE(cid, { success = false, resultCode = "GENERIC_ERROR"}) + :Timeout(12000) + + --mobile side: expect OnHashChange notification is not send to mobile + EXPECT_NOTIFICATION("OnHashChange") + :Times(0) + end + --End Test case HMINegativeCheck.5.2 + --End Test case HMINegativeCheck.5 + + ----------------------------------------------------------------------------------------- + + --Begin Test case HMINegativeCheck.6 + --Description: + -- Checking in case UI & VR gets any erroneous response from HMI + + --Requirement id in JAMA: + --APPLINK-10501 + --SDLAQ-CRS-2930 + --SDLAQ-CRS-2931 + --SDLAQ-CRS-2932 + --SDLAQ-CRS-2933 + + --Verification criteria: + --In case SDL sends both UI.AddCommand and VR.AddCommand with one and the same cmdID to HMI AND UI.AddCommand gets successful response from HMI in return AND VR.AddCommand gets any erroneous response (except REJECTED) from HMI - SDL must send UI.AddCommand for the successfully added cmdID to HMI. + --In case SDL sends both UI.AddCommand and VR.AddCommand with one and the same cmdID to HMI AND UI.AddCommand gets successful response from HMI in return AND VR.AddCommand gets any REJECTED from HMI - SDL must send AddCommand_response(REJECTED) to mobile app. + --In case SDL sends both UI.AddCommand and VR.AddCommand with one and the same cmdID to HMI AND VR.AddCommand gets successful response from HMI in return AND UI.AddCommand gets erroneous response except of WARNINGS and UNSUPPORTED_RESOURCE and REJECTED from HMI - SDL must send AddCommand_response(GENERIC_ERROR) to mobile app. + --In case SDL sends both UI.AddCommand and VR.AddCommand with one and the same cmdID to HMI AND VR.AddCommand gets successful response from HMI in return AND UI.AddCommand gets REJECTED from HMI - SDL must send AddCommand_response(REJECTED) to mobile app. + + --Begin Test case HMINegativeCheck.6.1 + --Description: UI.AddCommand gets successful response AND VR.AddCommand gets any erroneous response + local erroneousValues = {"INVALID_DATA", "OUT_OF_MEMORY", "TOO_MANY_PENDING_REQUESTS", "INVALID_ID", "DUPLICATE_NAME", "APPLICATION_NOT_REGISTERED", "GENERIC_ERROR", "REJECTED", "DISALLOWED", "UNSUPPORTED_RESOURCE", "WARNINGS"} + for i = 1, #erroneousValues do + Test["AddCommand_VRErroneousResponse" .. tostring(erroneousValues[i])] = function(self) + self:addCommand_VRErroneousResponse(erroneousValues[i]) + end + end + --End Test case HMINegativeCheck.6.1 + + ----------------------------------------------------------------------------------------- + + --Begin Test case HMINegativeCheck.6.2 + --Description: VR.AddCommand gets successful response AND UI.AddCommand gets any erroneous response + for i = 1, #erroneousValues do + Test["AddCommand_UIErroneousResponse" .. tostring(erroneousValues[i])] = function(self) + self:addCommand_UIErroneousResponse(erroneousValues[i], 2010+i) + end + end + --End Test case HMINegativeCheck.6.2 + --End Test case HMINegativeCheck.6 + --End Test case HMINegativeCheck +---------------------------------------------------------------------------------------------- +-----------------------------------------VI TEST BLOCK---------------------------------------- +-------------------------Sequence with emulating of user's action(s)-------------------------- +---------------------------------------------------------------------------------------------- + + --Begin Test suit SequenceCheck + --Description: TC's checks SDL behaviour by processing + -- different request sequence with timeout + -- with emulating of user's actions + + --Begin Test case SequenceCheck.1 + --Description: Checking execution of command + + --Requirement id in JAMA: + --SDLAQ-CRS-177 + --Verification criteria: + -- When the user triggers any command on persistent display command menu, OnCommand notification is returned to the app with corresponding command identifier and MENU trigger source. + -- When the user triggers any command via VR, OnCommand notification is returned to the app with corresponding command identifier and VR trigger source. + + --Description: Add command for execution + function Test:AddCommand_PositiveCase() + --mobile side: sending AddCommand request + local cid = self.mobileSession:SendRPC("AddCommand", + { + cmdID = 4001, + menuParams = + { + position = 0, + menuName ="Command4001" + }, + vrCommands = + { + "VRCommand4001" + } + }) + --hmi side: expect UI.AddCommand request + EXPECT_HMICALL("UI.AddCommand", + { + cmdID = 4001, + menuParams = + { + menuName ="Command4001" + } + }) + :Do(function(_,data) + --hmi side: sending UI.AddCommand response + self.hmiConnection:SendResponse(data.id, data.method, "SUCCESS", {}) + end) + + --hmi side: expect VR.AddCommand request + EXPECT_HMICALL("VR.AddCommand", + { + cmdID = 4001, + type = "Command", + vrCommands = + { + "VRCommand4001" + } + }) + :Do(function(_,data) + --hmi side: sending VR.AddCommand response + grammarIDValue = data.params.grammarID + self.hmiConnection:SendResponse(data.id, data.method, "SUCCESS", {}) + end) + + --mobile side: expect AddCommand response + EXPECT_RESPONSE(cid, { success = true, resultCode = "SUCCESS" }) + + --mobile side: expect OnHashChange notification + EXPECT_NOTIFICATION("OnHashChange") + end + + --Begin Test case SequenceCheck.1.1 + --Description: Execution command via HMI + function Test:AddCommand_ExecutionCommandViaHMI() + --hmi side: sending UI.OnSystemContext notification + SendOnSystemContext(self,"MENU") + + --hmi side: sending UI.OnCommand notification + self.hmiConnection:SendNotification("UI.OnCommand", + { + cmdID = 4001, + appID = self.applications["Test Application"], + grammarID = grammarIDValue + }) + + --hmi side: sending UI.OnSystemContext notification + SendOnSystemContext(self,"MAIN") + + + --mobile side: expected OnHMIStatus notification + if + self.isMediaApplication == true or + self.appHMITypes["NAVIGATION"] == true then + EXPECT_NOTIFICATION("OnHMIStatus", + { systemContext = "MENU", hmiLevel = "FULL", audioStreamingState = "AUDIBLE" }, + { systemContext = "MAIN", hmiLevel = "FULL", audioStreamingState = "AUDIBLE" }) + :Times(2) + elseif + self.isMediaApplication == true then + + EXPECT_NOTIFICATION("OnHMIStatus", + { systemContext = "MENU", hmiLevel = "FULL", audioStreamingState = "NOT_AUDIBLE" }, + { systemContext = "MAIN", hmiLevel = "FULL", audioStreamingState = "NOT_AUDIBLE" }) + :Times(2) + + end + --mobile side: expected OnCommand notification + EXPECT_NOTIFICATION("OnCommand", {cmdID = 4001, triggerSource= "MENU"}) + end + --End Test case SequenceCheck.1.1 + + ----------------------------------------------------------------------------------------- + + --Begin Test case SequenceCheck.1.2 + --Description: Execution command via VR + function Test:AddCommand_ExecutionCommandViaVR() + --hmi side: Start VR and sending UI.OnSystemContext notification + self.hmiConnection:SendNotification("VR.Started",{}) + SendOnSystemContext(self,"VRSESSION") + + --hmi side: sending UI.OnCommand notification + self.hmiConnection:SendNotification("VR.OnCommand", + { + cmdID = 4001, + appID = self.applications["Test Application"], + grammarID = grammarIDValue + }) + + --hmi side: Stop VR and sending UI.OnSystemContext notification + self.hmiConnection:SendNotification("VR.Stopped",{}) + SendOnSystemContext(self,"MAIN") + + --mobile side: expected OnHMIStatus notification + if + self.isMediaApplication == true or + self.appHMITypes["NAVIGATION"] == true then + EXPECT_NOTIFICATION("OnHMIStatus", + { systemContext = "MAIN", hmiLevel = "FULL", audioStreamingState = "NOT_AUDIBLE" }, + { systemContext = "VRSESSION", hmiLevel = "FULL", audioStreamingState = "NOT_AUDIBLE" }, + { systemContext = "VRSESSION", hmiLevel = "FULL", audioStreamingState = "AUDIBLE" }, + { systemContext = "MAIN", hmiLevel = "FULL", audioStreamingState = "AUDIBLE" }) + :Times(4) + elseif + self.isMediaApplication == false then + EXPECT_NOTIFICATION("OnHMIStatus", + { systemContext = "VRSESSION", hmiLevel = "FULL", audioStreamingState = "NOT_AUDIBLE" }, + { systemContext = "MAIN", hmiLevel = "FULL", audioStreamingState = "NOT_AUDIBLE" }) + :Times(2) + end + + --mobile side: expect OnCommand notification + EXPECT_NOTIFICATION("OnCommand", {cmdID = 4001, triggerSource= "VR"}) + end + --End Test case SequenceCheck.1.2 + --End Test case SequenceCheck.1 + + ----------------------------------------------------------------------------------------- + + --Begin Test case SequenceCheck.2 + --Description: + -- GrammarID should be generated by SDL for every application. + -- All top-level commands added by the application (via AddCommand) must have the same GrammarID value. + -- GrammarID values should be unique across all the applications top-level Commands and ChoiceSet GrammarIDs. + + --Requirement id in JAMA: + --SDLAQ-CRS-2797 + --APPLINK-6474 + + --Verification criteria: + -- SDL generates GrammarID for all VR application commands. + -- All top-level commands have the same GrammarID values. + -- GrammarID values of the commands and ChoiceSets of different applications are unique across all the applications. + for i=1, 10 do + Test["AddCommand_CheckGeneratedGrammarID"..tostring(i)] = function(self) + local idValue = i + 5000 + --mobile side: sending AddCommand request + local cid = self.mobileSession:SendRPC("AddCommand", + { + cmdID = idValue, + menuParams = + { + position = 0, + menuName ="Command"..tostring(idValue) + }, + vrCommands = + { + "VRCommand"..tostring(idValue).."1", + "VRCommand"..tostring(idValue).."2", + "VRCommand"..tostring(idValue).."3" + } + }) + --hmi side: expect UI.AddCommand request + EXPECT_HMICALL("UI.AddCommand", + { + cmdID = idValue, + menuParams = + { + menuName ="Command"..tostring(idValue) + } + }) + :Do(function(_,data) + --hmi side: sending UI.AddCommand response + self.hmiConnection:SendResponse(data.id, data.method, "SUCCESS", {}) + end) + + --hmi side: expect VR.AddCommand request + EXPECT_HMICALL("VR.AddCommand", + { + cmdID = idValue, + type = "Command", + vrCommands = + { + "VRCommand"..tostring(idValue).."1", + "VRCommand"..tostring(idValue).."2", + "VRCommand"..tostring(idValue).."3" + } + }) + :Do(function(_,data) + --hmi side: sending VR.AddCommand response + if data.params.grammarID ~= grammarIDValue then + print("GrammarID is generated not the same") + end + self.hmiConnection:SendResponse(data.id, data.method, "SUCCESS", {}) + end) + + --mobile side: expect AddCommand response + EXPECT_RESPONSE(cid, { success = true, resultCode = "SUCCESS" }) + + --mobile side: expect OnHashChange notification + EXPECT_NOTIFICATION("OnHashChange") + end + end + --End Test case SequenceCheck.2 + + ----------------------------------------------------------------------------------------- + + --Begin Test case SequenceCheck.3 + --Description: Cover TC_GrammarID_01 + + --Requirement id in JAMA: + --SDLAQ-TC-343 + --Verification criteria: + --SDL assign grammarID parameter for all added commands. + -- Precondition 1: Register new media app + function Test:AddNewSession() + -- Connected expectation + self.mobileSession2 = mobile_session.MobileSession( + self, + self.mobileConnection) + + self.mobileSession2:StartService(7) + end + + function Test:RegisterAppInterface_MediaApp2() + --mobile side: RegisterAppInterface request + local CorIdRAI = self.mobileSession2:SendRPC("RegisterAppInterface", + { + syncMsgVersion = + { + majorVersion = 2, + minorVersion = 2, + }, + appName ="MediaApp2", + isMediaApplication = true, + languageDesired ="EN-US", + hmiDisplayLanguageDesired ="EN-US", + appHMIType = {"COMMUNICATION","NAVIGATION"}, + appID ="6", + ttsName = + { + { + text ="MediaApp2", + type ="TEXT", + }, + }, + vrSynonyms = + { + "vrMediaApp2", + } + }) + + --hmi side: expect BasicCommunication.OnAppRegistered request + EXPECT_HMINOTIFICATION("BasicCommunication.OnAppRegistered", + { + application = + { + appName = "MediaApp2" + } + }) + :Do(function(_,data) + self.applications["MediaApp2"] = data.params.application.appID + end) + + --mobile side: RegisterAppInterface response + self.mobileSession2:ExpectResponse(CorIdRAI, { success = true, resultCode = "SUCCESS"}) + :Timeout(2000) + + self.mobileSession2:ExpectNotification("OnHMIStatus", {hmiLevel = "NONE", audioStreamingState = "NOT_AUDIBLE", systemContext = "MAIN"}) + end + + function Test:Activate_App2() + --hmi side: sending SDL.ActivateApp request + local RequestId = self.hmiConnection:SendRequest("SDL.ActivateApp", { appID = self.applications["MediaApp2"]}) + + --hmi side: expect SDL.ActivateApp response + EXPECT_HMIRESPONSE(RequestId) + :Do(function(_,data) + --In case when app is not allowed, it is needed to allow app + if + data.result.isSDLAllowed ~= true then + + --hmi side: sending SDL.GetUserFriendlyMessage request + local RequestId = self.hmiConnection:SendRequest("SDL.GetUserFriendlyMessage", + {language = "EN-US", messageCodes = {"DataConsent"}}) + + --hmi side: expect SDL.GetUserFriendlyMessage response + EXPECT_HMIRESPONSE(RequestId,{result = {code = 0, method = "SDL.GetUserFriendlyMessage"}}) + :Do(function(_,data) + + --hmi side: send request SDL.OnAllowSDLFunctionality + self.hmiConnection:SendNotification("SDL.OnAllowSDLFunctionality", + {allowed = true, source = "GUI", device = {id = config.deviceMAC, name = "127.0.0.1"}}) + + --hmi side: expect BasicCommunication.ActivateApp request + EXPECT_HMICALL("BasicCommunication.ActivateApp") + :Do(function(_,data) + + --hmi side: sending BasicCommunication.ActivateApp response + self.hmiConnection:SendResponse(data.id,"BasicCommunication.ActivateApp", "SUCCESS", {}) + + end) + :Times(2) + end) + + end + end) + + self.mobileSession2:ExpectNotification("OnHMIStatus", {hmiLevel = "FULL", audioStreamingState = "AUDIBLE", systemContext = "MAIN"}) + :Timeout(12000) + end + + function Test:AddCommand_FirstCommandApp2() + --mobile side: sending AddCommand request + local cid = self.mobileSession2:SendRPC("AddCommand", + { + cmdID = 2001, + menuParams = + { + position = 1000, + menuName ="Item to add" + }, + vrCommands = + { + "synonym1","synonym2" + } + }) + --hmi side: expect UI.AddCommand request + EXPECT_HMICALL("UI.AddCommand", + { + cmdID = 2001, + menuParams = + { + menuName ="Item to add" + } + }) + :Do(function(_,data) + --hmi side: sending UI.AddCommand response + self.hmiConnection:SendResponse(data.id, data.method, "SUCCESS", {}) + end) + + --hmi side: expect VR.AddCommand request + EXPECT_HMICALL("VR.AddCommand", + { + cmdID = 2001, + type = "Command", + vrCommands = + { + "synonym1","synonym2" + } + }) + :Do(function(_,data) + --hmi side: sending VR.AddCommand response + grammarIDApp2 = data.params.grammarID + self.hmiConnection:SendResponse(data.id, data.method, "SUCCESS", {}) + end) + :ValidIf(function(_,data) + if grammarIDValue == data.params.grammarID then + commonFunctions:printError("GrammarID of application2 is similar with grammarID of application1") + return false + else + return true + end + end) + --mobile side: expect AddCommand response + self.mobileSession2:ExpectResponse(cid, { success = true, resultCode = "SUCCESS" }) + + --mobile side: expect OnHashChange notification + self.mobileSession2:ExpectNotification("OnHashChange",{}) + end + + function Test:AddCommand_SecondCommandApp2() + --mobile side: sending AddCommand request + local cid = self.mobileSession2:SendRPC("AddCommand", + { + cmdID = 2002, + menuParams = + { + position = 1000, + menuName ="Item" + }, + vrCommands = + { + "Synonym" + } + }) + --hmi side: expect UI.AddCommand request + EXPECT_HMICALL("UI.AddCommand", + { + cmdID = 2002, + menuParams = + { + menuName ="Item" + } + }) + :Do(function(_,data) + --hmi side: sending UI.AddCommand response + self.hmiConnection:SendResponse(data.id, data.method, "SUCCESS", {}) + end) + + --hmi side: expect VR.AddCommand request + EXPECT_HMICALL("VR.AddCommand", + { + cmdID = 2002, + type = "Command", + vrCommands = + { + "Synonym" + } + }) + :Do(function(_,data) + --hmi side: sending VR.AddCommand response + self.hmiConnection:SendResponse(data.id, data.method, "SUCCESS", {}) + end) + :ValidIf(function(_,data) + if grammarIDApp2 ~= data.params.grammarID then + commonFunctions:printError("GrammarID is differrence for the same app") + return false + else + return true + end + end) + --mobile side: expect AddCommand response + self.mobileSession2:ExpectResponse(cid, { success = true, resultCode = "SUCCESS" }) + + --mobile side: expect OnHashChange notification + self.mobileSession2:ExpectNotification("OnHashChange",{}) + end + --End Test case SequenceCheck.3 + + ----------------------------------------------------------------------------------------- + + --Begin Test case SequenceCheck.4 + --Description: Cover TC_GrammarID_04 + + --Requirement id in JAMA: + --SDLAQ-TC-1247 + --Verification criteria: + --The goal is to test that SDL calculates appID depending on proper grammarID provided by HMI in case multiple apps are registered + + -- Precondition 1: Register new media app + commonFunctions:newTestCasesGroup("Test case: Precondition TC_GrammarID_04") + + function Test:AddNewSession() + -- Connected expectation + self.mobileSession3 = mobile_session.MobileSession( + self, + self.mobileConnection) + + self.mobileSession3:StartService(7) + end + + function Test:RegisterAppInterface_MediaApp3() + --mobile side: RegisterAppInterface request + local CorIdRAI = self.mobileSession3:SendRPC("RegisterAppInterface", + { + syncMsgVersion = + { + majorVersion = 2, + minorVersion = 2, + }, + appName ="MediaApp3", + isMediaApplication = true, + languageDesired ="EN-US", + hmiDisplayLanguageDesired ="EN-US", + appID ="3", + ttsName = + { + { + text ="MediaApp3", + type ="TEXT", + }, + }, + vrSynonyms = + { + "vrMediaApp3", + } + }) + + --hmi side: expect BasicCommunication.OnAppRegistered request + EXPECT_HMINOTIFICATION("BasicCommunication.OnAppRegistered", + { + application = + { + appName = "MediaApp3" + } + }) + :Do(function(_,data) + self.applications["MediaApp3"] = data.params.application.appID + end) + + --mobile side: RegisterAppInterface response + self.mobileSession3:ExpectResponse(CorIdRAI, { success = true, resultCode = "SUCCESS"}) + :Timeout(2000) + + self.mobileSession3:ExpectNotification("OnHMIStatus", {hmiLevel = "NONE", audioStreamingState = "NOT_AUDIBLE", systemContext = "MAIN"}) + end + + function Test:AddNewSession() + -- Connected expectation + self.mobileSession4 = mobile_session.MobileSession( + self, + self.mobileConnection) + + self.mobileSession4:StartService(7) + end + + function Test:RegisterAppInterface_MediaApp4() + --mobile side: RegisterAppInterface request + local CorIdRAI = self.mobileSession4:SendRPC("RegisterAppInterface", + { + syncMsgVersion = + { + majorVersion = 2, + minorVersion = 2, + }, + appName ="MediaApp4", + isMediaApplication = true, + languageDesired ="EN-US", + hmiDisplayLanguageDesired ="EN-US", + appID ="4", + ttsName = + { + { + text ="MediaApp4", + type ="TEXT", + }, + }, + vrSynonyms = + { + "vrMediaApp4", + } + }) + + --hmi side: expect BasicCommunication.OnAppRegistered request + EXPECT_HMINOTIFICATION("BasicCommunication.OnAppRegistered", + { + application = + { + appName = "MediaApp4" + } + }) + :Do(function(_,data) + self.applications["MediaApp4"] = data.params.application.appID + end) + + --mobile side: RegisterAppInterface response + self.mobileSession4:ExpectResponse(CorIdRAI, { success = true, resultCode = "SUCCESS"}) + :Timeout(2000) + + self.mobileSession4:ExpectNotification("OnHMIStatus", {hmiLevel = "NONE", audioStreamingState = "NOT_AUDIBLE", systemContext = "MAIN"}) + end + + function Test:AddNewSession() + -- Connected expectation + self.mobileSession5 = mobile_session.MobileSession( + self, + self.mobileConnection) + + self.mobileSession5:StartService(7) + end + + function Test:RegisterAppInterface_MediaApp5() + --mobile side: RegisterAppInterface request + local CorIdRAI = self.mobileSession5:SendRPC("RegisterAppInterface", + { + syncMsgVersion = + { + majorVersion = 2, + minorVersion = 2, + }, + appName ="MediaApp5", + isMediaApplication = true, + languageDesired ="EN-US", + hmiDisplayLanguageDesired ="EN-US", + appID ="5", + ttsName = + { + { + text ="MediaApp5", + type ="TEXT", + }, + }, + vrSynonyms = + { + "vrMediaApp5", + } + }) + + --hmi side: expect BasicCommunication.OnAppRegistered request + EXPECT_HMINOTIFICATION("BasicCommunication.OnAppRegistered", + { + application = + { + appName = "MediaApp5" + } + }) + :Do(function(_,data) + self.applications["MediaApp5"] = data.params.application.appID + end) + + --mobile side: RegisterAppInterface response + self.mobileSession5:ExpectResponse(CorIdRAI, { success = true, resultCode = "SUCCESS"}) + :Timeout(2000) + + self.mobileSession5:ExpectNotification("OnHMIStatus", {hmiLevel = "NONE", audioStreamingState = "NOT_AUDIBLE", systemContext = "MAIN"}) + end + + function Test:Activate_App3() + --hmi side: sending SDL.ActivateApp request + local RequestId = self.hmiConnection:SendRequest("SDL.ActivateApp", { appID = self.applications["MediaApp3"]}) + + --hmi side: expect SDL.ActivateApp response + EXPECT_HMIRESPONSE(RequestId) + :Do(function(_,data) + --In case when app is not allowed, it is needed to allow app + if + data.result.isSDLAllowed ~= true then + + --hmi side: sending SDL.GetUserFriendlyMessage request + local RequestId = self.hmiConnection:SendRequest("SDL.GetUserFriendlyMessage", + {language = "EN-US", messageCodes = {"DataConsent"}}) + + --hmi side: expect SDL.GetUserFriendlyMessage response + EXPECT_HMIRESPONSE(RequestId,{result = {code = 0, method = "SDL.GetUserFriendlyMessage"}}) + :Do(function(_,data) + + --hmi side: send request SDL.OnAllowSDLFunctionality + self.hmiConnection:SendNotification("SDL.OnAllowSDLFunctionality", + {allowed = true, source = "GUI", device = {id = config.deviceMAC, name = "127.0.0.1"}}) + + --hmi side: expect BasicCommunication.ActivateApp request + EXPECT_HMICALL("BasicCommunication.ActivateApp") + :Do(function(_,data) + + --hmi side: sending BasicCommunication.ActivateApp response + self.hmiConnection:SendResponse(data.id,"BasicCommunication.ActivateApp", "SUCCESS", {}) + + end) + :Times(2) + :Timeout(11000) + end) + + end + end) + + self.mobileSession3:ExpectNotification("OnHMIStatus", {hmiLevel = "FULL", audioStreamingState = "AUDIBLE", systemContext = "MAIN"}) + :Timeout(12000) + end + + function Test:AddCommand_App3() + --mobile side: sending AddCommand request + local cid = self.mobileSession3:SendRPC("AddCommand", + { + cmdID = 2003, + menuParams = + { + position = 1000, + menuName ="Item to add App3" + }, + vrCommands = + { + "synonym App3" + } + }) + --hmi side: expect UI.AddCommand request + EXPECT_HMICALL("UI.AddCommand", + { + cmdID = 2003, + menuParams = + { + menuName ="Item to add App3" + } + }) + :Do(function(_,data) + --hmi side: sending UI.AddCommand response + self.hmiConnection:SendResponse(data.id, data.method, "SUCCESS", {}) + end) + + --hmi side: expect VR.AddCommand request + EXPECT_HMICALL("VR.AddCommand", + { + cmdID = 2003, + type = "Command", + vrCommands = + { + "synonym App3" + } + }) + :Do(function(_,data) + --hmi side: sending VR.AddCommand response + grammarIDApp3 = data.params.grammarID + self.hmiConnection:SendResponse(data.id, data.method, "SUCCESS", {}) + end) + + --mobile side: expect AddCommand response + self.mobileSession3:ExpectResponse(cid, { success = true, resultCode = "SUCCESS" }) + + --mobile side: expect OnHashChange notification + self.mobileSession3:ExpectNotification("OnHashChange",{}) + end + + function Test:Activate_App4() + --hmi side: sending SDL.ActivateApp request + local RequestId = self.hmiConnection:SendRequest("SDL.ActivateApp", { appID = self.applications["MediaApp4"]}) + + --hmi side: expect SDL.ActivateApp response + EXPECT_HMIRESPONSE(RequestId) + :Do(function(_,data) + --In case when app is not allowed, it is needed to allow app + if + data.result.isSDLAllowed ~= true then + + --hmi side: sending SDL.GetUserFriendlyMessage request + local RequestId = self.hmiConnection:SendRequest("SDL.GetUserFriendlyMessage", + {language = "EN-US", messageCodes = {"DataConsent"}}) + + --hmi side: expect SDL.GetUserFriendlyMessage response + EXPECT_HMIRESPONSE(RequestId,{result = {code = 0, method = "SDL.GetUserFriendlyMessage"}}) + :Do(function(_,data) + + --hmi side: send request SDL.OnAllowSDLFunctionality + self.hmiConnection:SendNotification("SDL.OnAllowSDLFunctionality", + {allowed = true, source = "GUI", device = {id = config.deviceMAC, name = "127.0.0.1"}}) + + --hmi side: expect BasicCommunication.ActivateApp request + EXPECT_HMICALL("BasicCommunication.ActivateApp") + :Do(function(_,data) + + --hmi side: sending BasicCommunication.ActivateApp response + self.hmiConnection:SendResponse(data.id,"BasicCommunication.ActivateApp", "SUCCESS", {}) + + end) + :Times(2) + :Timeout(11000) + end) + + end + end) + + self.mobileSession4:ExpectNotification("OnHMIStatus", {hmiLevel = "FULL", audioStreamingState = "AUDIBLE", systemContext = "MAIN"}) + :Timeout(12000) + end + + function Test:AddCommand_App4() + --mobile side: sending AddCommand request + local cid = self.mobileSession4:SendRPC("AddCommand", + { + cmdID = 2004, + menuParams = + { + position = 1000, + menuName ="Item to add App4" + }, + vrCommands = + { + "synonym App4" + } + }) + --hmi side: expect UI.AddCommand request + EXPECT_HMICALL("UI.AddCommand", + { + cmdID = 2004, + menuParams = + { + menuName ="Item to add App4" + } + }) + :Do(function(_,data) + --hmi side: sending UI.AddCommand response + self.hmiConnection:SendResponse(data.id, data.method, "SUCCESS", {}) + end) + + --hmi side: expect VR.AddCommand request + EXPECT_HMICALL("VR.AddCommand", + { + cmdID = 2004, + type = "Command", + vrCommands = + { + "synonym App4" + } + }) + :Do(function(_,data) + --hmi side: sending VR.AddCommand response + grammarIDApp4 = data.params.grammarID + self.hmiConnection:SendResponse(data.id, data.method, "SUCCESS", {}) + end) + + --mobile side: expect AddCommand response + self.mobileSession4:ExpectResponse(cid, { success = true, resultCode = "SUCCESS" }) + + --mobile side: expect OnHashChange notification + self.mobileSession4:ExpectNotification("OnHashChange",{}) + end + + function Test:Activate_App5() + --hmi side: sending SDL.ActivateApp request + local RequestId = self.hmiConnection:SendRequest("SDL.ActivateApp", { appID = self.applications["MediaApp5"]}) + + --hmi side: expect SDL.ActivateApp response + EXPECT_HMIRESPONSE(RequestId) + :Do(function(_,data) + --In case when app is not allowed, it is needed to allow app + if + data.result.isSDLAllowed ~= true then + + --hmi side: sending SDL.GetUserFriendlyMessage request + local RequestId = self.hmiConnection:SendRequest("SDL.GetUserFriendlyMessage", + {language = "EN-US", messageCodes = {"DataConsent"}}) + + --hmi side: expect SDL.GetUserFriendlyMessage response + EXPECT_HMIRESPONSE(RequestId,{result = {code = 0, method = "SDL.GetUserFriendlyMessage"}}) + :Do(function(_,data) + + --hmi side: send request SDL.OnAllowSDLFunctionality + self.hmiConnection:SendNotification("SDL.OnAllowSDLFunctionality", + {allowed = true, source = "GUI", device = {id = config.deviceMAC, name = "127.0.0.1"}}) + + --hmi side: expect BasicCommunication.ActivateApp request + EXPECT_HMICALL("BasicCommunication.ActivateApp") + :Do(function(_,data) + + --hmi side: sending BasicCommunication.ActivateApp response + self.hmiConnection:SendResponse(data.id,"BasicCommunication.ActivateApp", "SUCCESS", {}) + + end) + :Times(2) + :Timeout(11000) + end) + + end + end) + + self.mobileSession5:ExpectNotification("OnHMIStatus", {hmiLevel = "FULL", audioStreamingState = "AUDIBLE", systemContext = "MAIN"}) + :Timeout(12000) + end + + function Test:AddCommand_App5() + --mobile side: sending AddCommand request + local cid = self.mobileSession5:SendRPC("AddCommand", + { + cmdID = 2005, + menuParams = + { + position = 1000, + menuName ="Item to add App5" + }, + vrCommands = + { + "synonym App5" + } + }) + --hmi side: expect UI.AddCommand request + EXPECT_HMICALL("UI.AddCommand", + { + cmdID = 2005, + menuParams = + { + menuName ="Item to add App5" + } + }) + :Do(function(_,data) + --hmi side: sending UI.AddCommand response + self.hmiConnection:SendResponse(data.id, data.method, "SUCCESS", {}) + end) + + --hmi side: expect VR.AddCommand request + EXPECT_HMICALL("VR.AddCommand", + { + cmdID = 2005, + type = "Command", + vrCommands = + { + "synonym App5" + } + }) + :Do(function(_,data) + --hmi side: sending VR.AddCommand response + grammarIDApp5 = data.params.grammarID + self.hmiConnection:SendResponse(data.id, data.method, "SUCCESS", {}) + end) + + --mobile side: expect AddCommand response + self.mobileSession5:ExpectResponse(cid, { success = true, resultCode = "SUCCESS" }) + + --mobile side: expect OnHashChange notification + self.mobileSession5:ExpectNotification("OnHashChange",{}) + end + + commonFunctions:newTestCasesGroup("Test case: TC_GrammarID_04") + + function Test:Activate_App1() + --hmi side: sending SDL.ActivateApp request + local RequestId = self.hmiConnection:SendRequest("SDL.ActivateApp", { appID = self.applications["Test Application"]}) + + --hmi side: expect SDL.ActivateApp response + EXPECT_HMIRESPONSE(RequestId) + :Do(function(_,data) + --In case when app is not allowed, it is needed to allow app + if + data.result.isSDLAllowed ~= true then + + --hmi side: sending SDL.GetUserFriendlyMessage request + local RequestId = self.hmiConnection:SendRequest("SDL.GetUserFriendlyMessage", + {language = "EN-US", messageCodes = {"DataConsent"}}) + + --hmi side: expect SDL.GetUserFriendlyMessage response + EXPECT_HMIRESPONSE(RequestId,{result = {code = 0, method = "SDL.GetUserFriendlyMessage"}}) + :Do(function(_,data) + + --hmi side: send request SDL.OnAllowSDLFunctionality + self.hmiConnection:SendNotification("SDL.OnAllowSDLFunctionality", + {allowed = true, source = "GUI", device = {id = config.deviceMAC, name = "127.0.0.1"}}) + + --hmi side: expect BasicCommunication.ActivateApp request + EXPECT_HMICALL("BasicCommunication.ActivateApp") + :Do(function(_,data) + + --hmi side: sending BasicCommunication.ActivateApp response + self.hmiConnection:SendResponse(data.id,"BasicCommunication.ActivateApp", "SUCCESS", {}) + + end) + :Times(2) + :Timeout(11000) + end) + + end + end) + + self.mobileSession:ExpectNotification("OnHMIStatus", {hmiLevel = "FULL", audioStreamingState = "AUDIBLE", systemContext = "MAIN"}) + end + + function Test:AddCommand_ExecutionCommandViaVR_App1() + --hmi side: Start VR and sending UI.OnSystemContext notification + self.hmiConnection:SendNotification("VR.Started",{}) + SendOnSystemContext(self,"VRSESSION") + + --hmi side: sending UI.OnCommand notification + self.hmiConnection:SendNotification("VR.OnCommand", + { + cmdID = 4001, + appID = self.applications["Test Application"], + grammarID = grammarIDValue + }) + + --hmi side: Stop VR and sending UI.OnSystemContext notification + self.hmiConnection:SendNotification("VR.Stopped",{}) + SendOnSystemContext(self,"MAIN") + + --mobile side: expected OnHMIStatus notification + if + self.isMediaApplication == true or + self.appHMITypes["NAVIGATION"] == true then + EXPECT_NOTIFICATION("OnHMIStatus", + { systemContext = "MAIN", hmiLevel = "FULL", audioStreamingState = "NOT_AUDIBLE" }, + { systemContext = "VRSESSION", hmiLevel = "FULL", audioStreamingState = "NOT_AUDIBLE" }, + { systemContext = "VRSESSION", hmiLevel = "FULL", audioStreamingState = "AUDIBLE" }, + { systemContext = "MAIN", hmiLevel = "FULL", audioStreamingState = "AUDIBLE" }) + :Times(4) + elseif + self.isMediaApplication == false then + EXPECT_NOTIFICATION("OnHMIStatus", + { systemContext = "VRSESSION", hmiLevel = "FULL", audioStreamingState = "NOT_AUDIBLE" }, + { systemContext = "MAIN", hmiLevel = "FULL", audioStreamingState = "NOT_AUDIBLE" }) + :Times(2) + end + + --mobile side: expect OnCommand notification + EXPECT_NOTIFICATION("OnCommand", {cmdID = 4001, triggerSource= "VR"}) + end + + function Test:Activate_App2() + --hmi side: sending SDL.ActivateApp request + local RequestId = self.hmiConnection:SendRequest("SDL.ActivateApp", { appID = self.applications["MediaApp2"]}) + + --hmi side: expect SDL.ActivateApp response + EXPECT_HMIRESPONSE(RequestId) + :Do(function(_,data) + --In case when app is not allowed, it is needed to allow app + if + data.result.isSDLAllowed ~= true then + + --hmi side: sending SDL.GetUserFriendlyMessage request + local RequestId = self.hmiConnection:SendRequest("SDL.GetUserFriendlyMessage", + {language = "EN-US", messageCodes = {"DataConsent"}}) + + --hmi side: expect SDL.GetUserFriendlyMessage response + EXPECT_HMIRESPONSE(RequestId,{result = {code = 0, method = "SDL.GetUserFriendlyMessage"}}) + :Do(function(_,data) + + --hmi side: send request SDL.OnAllowSDLFunctionality + self.hmiConnection:SendNotification("SDL.OnAllowSDLFunctionality", + {allowed = true, source = "GUI", device = {id = config.deviceMAC, name = "127.0.0.1"}}) + + --hmi side: expect BasicCommunication.ActivateApp request + EXPECT_HMICALL("BasicCommunication.ActivateApp") + :Do(function(_,data) + + --hmi side: sending BasicCommunication.ActivateApp response + self.hmiConnection:SendResponse(data.id,"BasicCommunication.ActivateApp", "SUCCESS", {}) + + end) + :Times(2) + :Timeout(11000) + end) + + end + end) + + self.mobileSession2:ExpectNotification("OnHMIStatus", {hmiLevel = "FULL", audioStreamingState = "AUDIBLE", systemContext = "MAIN"}) + end + + function Test:AddCommand_ExecutionCommandViaVR_App2() + --hmi side: Start VR and sending UI.OnSystemContext notification + self.hmiConnection:SendNotification("VR.Started",{}) + SendOnSystemContext(self,"VRSESSION", self.applications["MediaApp2"]) + + --hmi side: sending UI.OnCommand notification + self.hmiConnection:SendNotification("VR.OnCommand", + { + cmdID = 2001, + appID = self.applications["MediaApp2"], + grammarID = grammarIDApp2 + }) + + --hmi side: Stop VR and sending UI.OnSystemContext notification + self.hmiConnection:SendNotification("VR.Stopped",{}) + SendOnSystemContext(self,"MAIN", self.applications["MediaApp2"]) + + self.mobileSession2:ExpectNotification("OnHMIStatus", + { systemContext = "MAIN", hmiLevel = "FULL", audioStreamingState = "NOT_AUDIBLE" }, + { systemContext = "VRSESSION", hmiLevel = "FULL", audioStreamingState = "NOT_AUDIBLE" }, + { systemContext = "VRSESSION", hmiLevel = "FULL", audioStreamingState = "AUDIBLE" }, + { systemContext = "MAIN", hmiLevel = "FULL", audioStreamingState = "AUDIBLE" }) + :Times(4) + + --mobile side: expect OnCommand notification + self.mobileSession2:ExpectNotification("OnCommand", {cmdID = 2001, triggerSource= "VR"}) + end + + function Test:Activate_App3() + --hmi side: sending SDL.ActivateApp request + local RequestId = self.hmiConnection:SendRequest("SDL.ActivateApp", { appID = self.applications["MediaApp3"]}) + + --hmi side: expect SDL.ActivateApp response + EXPECT_HMIRESPONSE(RequestId) + :Do(function(_,data) + --In case when app is not allowed, it is needed to allow app + if + data.result.isSDLAllowed ~= true then + + --hmi side: sending SDL.GetUserFriendlyMessage request + local RequestId = self.hmiConnection:SendRequest("SDL.GetUserFriendlyMessage", + {language = "EN-US", messageCodes = {"DataConsent"}}) + + --hmi side: expect SDL.GetUserFriendlyMessage response + EXPECT_HMIRESPONSE(RequestId,{result = {code = 0, method = "SDL.GetUserFriendlyMessage"}}) + :Do(function(_,data) + + --hmi side: send request SDL.OnAllowSDLFunctionality + self.hmiConnection:SendNotification("SDL.OnAllowSDLFunctionality", + {allowed = true, source = "GUI", device = {id = config.deviceMAC, name = "127.0.0.1"}}) + + --hmi side: expect BasicCommunication.ActivateApp request + EXPECT_HMICALL("BasicCommunication.ActivateApp") + :Do(function(_,data) + + --hmi side: sending BasicCommunication.ActivateApp response + self.hmiConnection:SendResponse(data.id,"BasicCommunication.ActivateApp", "SUCCESS", {}) + + end) + :Times(2) + :Timeout(11000) + end) + + end + end) + + self.mobileSession3:ExpectNotification("OnHMIStatus", {hmiLevel = "FULL", audioStreamingState = "AUDIBLE", systemContext = "MAIN"}) + end + + function Test:AddCommand_ExecutionCommandViaVR_App3() + --hmi side: Start VR and sending UI.OnSystemContext notification + self.hmiConnection:SendNotification("VR.Started",{}) + SendOnSystemContext(self,"VRSESSION", self.applications["MediaApp3"]) + + --hmi side: sending UI.OnCommand notification + self.hmiConnection:SendNotification("VR.OnCommand", + { + cmdID = 2003, + appID = self.applications["MediaApp3"], + grammarID = grammarIDApp3 + }) + + --hmi side: Stop VR and sending UI.OnSystemContext notification + self.hmiConnection:SendNotification("VR.Stopped",{}) + SendOnSystemContext(self,"MAIN", self.applications["MediaApp3"]) + + self.mobileSession3:ExpectNotification("OnHMIStatus", + { systemContext = "MAIN", hmiLevel = "FULL", audioStreamingState = "NOT_AUDIBLE" }, + { systemContext = "VRSESSION", hmiLevel = "FULL", audioStreamingState = "NOT_AUDIBLE" }, + { systemContext = "VRSESSION", hmiLevel = "FULL", audioStreamingState = "AUDIBLE" }, + { systemContext = "MAIN", hmiLevel = "FULL", audioStreamingState = "AUDIBLE" }) + :Times(4) + + --mobile side: expect OnCommand notification + self.mobileSession3:ExpectNotification("OnCommand", {cmdID = 2003, triggerSource= "VR"}) + end + + function Test:Activate_App4() + --hmi side: sending SDL.ActivateApp request + local RequestId = self.hmiConnection:SendRequest("SDL.ActivateApp", { appID = self.applications["MediaApp4"]}) + + --hmi side: expect SDL.ActivateApp response + EXPECT_HMIRESPONSE(RequestId) + :Do(function(_,data) + --In case when app is not allowed, it is needed to allow app + if + data.result.isSDLAllowed ~= true then + + --hmi side: sending SDL.GetUserFriendlyMessage request + local RequestId = self.hmiConnection:SendRequest("SDL.GetUserFriendlyMessage", + {language = "EN-US", messageCodes = {"DataConsent"}}) + + --hmi side: expect SDL.GetUserFriendlyMessage response + EXPECT_HMIRESPONSE(RequestId,{result = {code = 0, method = "SDL.GetUserFriendlyMessage"}}) + :Do(function(_,data) + + --hmi side: send request SDL.OnAllowSDLFunctionality + self.hmiConnection:SendNotification("SDL.OnAllowSDLFunctionality", + {allowed = true, source = "GUI", device = {id = config.deviceMAC, name = "127.0.0.1"}}) + + --hmi side: expect BasicCommunication.ActivateApp request + EXPECT_HMICALL("BasicCommunication.ActivateApp") + :Do(function(_,data) + + --hmi side: sending BasicCommunication.ActivateApp response + self.hmiConnection:SendResponse(data.id,"BasicCommunication.ActivateApp", "SUCCESS", {}) + + end) + :Times(2) + :Timeout(11000) + end) + end + end) + + self.mobileSession4:ExpectNotification("OnHMIStatus", {hmiLevel = "FULL", audioStreamingState = "AUDIBLE", systemContext = "MAIN"}) + end + + function Test:AddCommand_ExecutionCommandViaVR_App4() + --hmi side: Start VR and sending UI.OnSystemContext notification + self.hmiConnection:SendNotification("VR.Started",{}) + SendOnSystemContext(self,"VRSESSION", self.applications["MediaApp4"]) + + --hmi side: sending UI.OnCommand notification + self.hmiConnection:SendNotification("VR.OnCommand", + { + cmdID = 2004, + appID = self.applications["MediaApp4"], + grammarID = grammarIDApp4 + }) + + --hmi side: Stop VR and sending UI.OnSystemContext notification + self.hmiConnection:SendNotification("VR.Stopped",{}) + SendOnSystemContext(self,"MAIN", self.applications["MediaApp4"]) + + self.mobileSession4:ExpectNotification("OnHMIStatus", + { systemContext = "MAIN", hmiLevel = "FULL", audioStreamingState = "NOT_AUDIBLE" }, + { systemContext = "VRSESSION", hmiLevel = "FULL", audioStreamingState = "NOT_AUDIBLE" }, + { systemContext = "VRSESSION", hmiLevel = "FULL", audioStreamingState = "AUDIBLE" }, + { systemContext = "MAIN", hmiLevel = "FULL", audioStreamingState = "AUDIBLE" }) + :Times(4) + + --mobile side: expect OnCommand notification + self.mobileSession4:ExpectNotification("OnCommand", {cmdID = 2004, triggerSource= "VR"}) + end + + function Test:Activate_App5() + --hmi side: sending SDL.ActivateApp request + local RequestId = self.hmiConnection:SendRequest("SDL.ActivateApp", { appID = self.applications["MediaApp5"]}) + + --hmi side: expect SDL.ActivateApp response + EXPECT_HMIRESPONSE(RequestId) + :Do(function(_,data) + --In case when app is not allowed, it is needed to allow app + if + data.result.isSDLAllowed ~= true then + + --hmi side: sending SDL.GetUserFriendlyMessage request + local RequestId = self.hmiConnection:SendRequest("SDL.GetUserFriendlyMessage", + {language = "EN-US", messageCodes = {"DataConsent"}}) + + --hmi side: expect SDL.GetUserFriendlyMessage response + EXPECT_HMIRESPONSE(RequestId,{result = {code = 0, method = "SDL.GetUserFriendlyMessage"}}) + :Do(function(_,data) + + --hmi side: send request SDL.OnAllowSDLFunctionality + self.hmiConnection:SendNotification("SDL.OnAllowSDLFunctionality", + {allowed = true, source = "GUI", device = {id = config.deviceMAC, name = "127.0.0.1"}}) + + --hmi side: expect BasicCommunication.ActivateApp request + EXPECT_HMICALL("BasicCommunication.ActivateApp") + :Do(function(_,data) + + --hmi side: sending BasicCommunication.ActivateApp response + self.hmiConnection:SendResponse(data.id,"BasicCommunication.ActivateApp", "SUCCESS", {}) + + end) + :Times(2) + :Timeout(11000) + end) + end + end) + + self.mobileSession5:ExpectNotification("OnHMIStatus", {hmiLevel = "FULL", audioStreamingState = "AUDIBLE", systemContext = "MAIN"}) + end + + function Test:AddCommand_ExecutionCommandViaVR_App5() + --hmi side: Start VR and sending UI.OnSystemContext notification + self.hmiConnection:SendNotification("VR.Started",{}) + SendOnSystemContext(self,"VRSESSION", self.applications["MediaApp5"]) + + --hmi side: sending UI.OnCommand notification + self.hmiConnection:SendNotification("VR.OnCommand", + { + cmdID = 2005, + appID = self.applications["MediaApp5"], + grammarID = grammarIDApp5 + }) + + --hmi side: Stop VR and sending UI.OnSystemContext notification + self.hmiConnection:SendNotification("VR.Stopped",{}) + SendOnSystemContext(self,"MAIN", self.applications["MediaApp5"]) + + self.mobileSession5:ExpectNotification("OnHMIStatus", + { systemContext = "MAIN", hmiLevel = "FULL", audioStreamingState = "NOT_AUDIBLE" }, + { systemContext = "VRSESSION", hmiLevel = "FULL", audioStreamingState = "NOT_AUDIBLE" }, + { systemContext = "VRSESSION", hmiLevel = "FULL", audioStreamingState = "AUDIBLE" }, + { systemContext = "MAIN", hmiLevel = "FULL", audioStreamingState = "AUDIBLE" }) + :Times(4) + + --mobile side: expect OnCommand notification + self.mobileSession5:ExpectNotification("OnCommand", {cmdID = 2005, triggerSource= "VR"}) + end + --End Test case SequenceCheck.4 + + ----------------------------------------------------------------------------------------- + commonFunctions:newTestCasesGroup("Test case: Precondition TC_GrammarID_05") + --Begin Test case SequenceCheck.5 + --Description: Cover TC_GrammarID_05 + + --Requirement id in JAMA: + --SDLAQ-TC-1248 + --Verification criteria: + --The goal is to test that commandID is calculated properly from grammarID if command is chosen by VR + function Test:Activate_App1() + --hmi side: sending SDL.ActivateApp request + local RequestId = self.hmiConnection:SendRequest("SDL.ActivateApp", { appID = self.applications["Test Application"]}) + + --hmi side: expect SDL.ActivateApp response + EXPECT_HMIRESPONSE(RequestId) + :Do(function(_,data) + --In case when app is not allowed, it is needed to allow app + if + data.result.isSDLAllowed ~= true then + + --hmi side: sending SDL.GetUserFriendlyMessage request + local RequestId = self.hmiConnection:SendRequest("SDL.GetUserFriendlyMessage", + {language = "EN-US", messageCodes = {"DataConsent"}}) + + --hmi side: expect SDL.GetUserFriendlyMessage response + EXPECT_HMIRESPONSE(RequestId,{result = {code = 0, method = "SDL.GetUserFriendlyMessage"}}) + :Do(function(_,data) + + --hmi side: send request SDL.OnAllowSDLFunctionality + self.hmiConnection:SendNotification("SDL.OnAllowSDLFunctionality", + {allowed = true, source = "GUI", device = {id = config.deviceMAC, name = "127.0.0.1"}}) + + --hmi side: expect BasicCommunication.ActivateApp request + EXPECT_HMICALL("BasicCommunication.ActivateApp") + :Do(function(_,data) + + --hmi side: sending BasicCommunication.ActivateApp response + self.hmiConnection:SendResponse(data.id,"BasicCommunication.ActivateApp", "SUCCESS", {}) + + end) + :Times(2) + :Timeout(11000) + end) + + end + end) + + self.mobileSession:ExpectNotification("OnHMIStatus", {hmiLevel = "FULL", audioStreamingState = "AUDIBLE", systemContext = "MAIN"}) + end +--[[TODO: Check after APPLINK-17207 is resolved + function Test:AddCommand_ExecutionCommandViaVR_WithOutAppID() + --hmi side: Start VR and sending UI.OnSystemContext notification + self.hmiConnection:SendNotification("VR.Started",{}) + SendOnSystemContext(self,"VRSESSION") + + --hmi side: sending UI.OnCommand notification + self.hmiConnection:SendNotification("VR.OnCommand", + { + cmdID = 4001, + grammarID = grammarIDValue + }) + + --hmi side: Stop VR and sending UI.OnSystemContext notification + self.hmiConnection:SendNotification("VR.Stopped",{}) + SendOnSystemContext(self,"MAIN") + + --mobile side: expected OnHMIStatus notification + if + self.isMediaApplication == true or + self.appHMITypes["NAVIGATION"] == true then + EXPECT_NOTIFICATION("OnHMIStatus", + { systemContext = "MAIN", hmiLevel = "FULL", audioStreamingState = "NOT_AUDIBLE" }, + { systemContext = "VRSESSION", hmiLevel = "FULL", audioStreamingState = "NOT_AUDIBLE" }, + { systemContext = "VRSESSION", hmiLevel = "FULL", audioStreamingState = "AUDIBLE" }, + { systemContext = "MAIN", hmiLevel = "FULL", audioStreamingState = "AUDIBLE" }) + :Times(4) + elseif + self.isMediaApplication == false then + EXPECT_NOTIFICATION("OnHMIStatus", + { systemContext = "VRSESSION", hmiLevel = "FULL", audioStreamingState = "NOT_AUDIBLE" }, + { systemContext = "MAIN", hmiLevel = "FULL", audioStreamingState = "NOT_AUDIBLE" }) + :Times(2) + end + + --mobile side: expect OnCommand notification + EXPECT_NOTIFICATION("OnCommand", {cmdID = 4001, triggerSource= "VR"}) + end + --End Test case SequenceCheck.5 +--]] + + -------------------------------------------------------------------------------------------- + --Begin Test case SequenceCheck.6 + --Description: Covers TC APPLINK-18308. + + --Requirement id in JAMA: + --SDLAQ-CRS-1305 + + --Verification criteria: + --This test is to check the ability to add commands with same names to different menus (root/submenu). + local function APPLINK_18308() + --Begin Precondition + --Description: Adding SubMenu(AddSubMenus) + local menuIDValues = {11, 22, 33} + for i=1,#menuIDValues do + Test["AddSubMenuWithId"..menuIDValues[i]] = function(self) + local cid = self.mobileSession:SendRPC("AddSubMenu", + { + menuID = menuIDValues[i], + menuName = "SubMenu_0"..tostring(i) + }) + + EXPECT_HMICALL("UI.AddSubMenu", + { + menuID = menuIDValues[i], + menuParams = { menuName = "SubMenu_0"..tostring(i) } + }) + :Do(function(_,data) + --hmi side: sending response + self.hmiConnection:SendResponse(data.id, data.method, "SUCCESS", {}) + --commonFunctions:printTable(data) + end) + + EXPECT_RESPONSE(cid, { success = true, resultCode = "SUCCESS" }) + EXPECT_NOTIFICATION("OnHashChange") + end + end + --End Precondition + + --Send AddCommand "Command_01" VrSynonyms = command1 + function Test:AddCommand_CommandID01_NoSubmenu() + --mobile side: sending AddCommand request + local cid = self.mobileSession:SendRPC("AddCommand", + { + cmdID = 01, + menuParams = + { + menuName ="Command_01" + }, + vrCommands = + { + "command1" + } + }) + + --hmi side: expect VR.AddCommand request + EXPECT_HMICALL("VR.AddCommand", + { + cmdID = 01, + type = "Command", + vrCommands = + { + "command1" + } + }) + :Do(function(_,data) + --hmi side: sending response + self.hmiConnection:SendResponse(data.id, data.method, "SUCCESS", {}) + end) + + --hmi side: expect UI.AddCommand request + EXPECT_HMICALL("UI.AddCommand", + { + cmdID = 01, + menuParams = + { + menuName ="Command_01" + } + }) + :Do(function(_,data) + --hmi side: sending UI.AddCommand response + self.hmiConnection:SendResponse(data.id, data.method, "SUCCESS", {}) + end) + + EXPECT_RESPONSE(cid, { success = true, resultCode = "SUCCESS" }) + EXPECT_NOTIFICATION("OnHashChange") + end + --End + + + --Send AddCommand "Command_01" + addItem to "Submenu_01" VrSynonyms = command2 + + function Test:AddCommand_SameCommandID01_Submenu() + --mobile side: sending AddCommand request + local cid = self.mobileSession:SendRPC("AddCommand", + { + cmdID = 02, + menuParams = + { + parentID = 11, + position = 1000, + menuName ="Command_01" + }, + vrCommands = + { + "command2" + } + }) + --hmi side: expect VR.AddCommand request + EXPECT_HMICALL("VR.AddCommand", + { + cmdID = 02, + type = "Command", + vrCommands = + { + "command2" + } + }) + :Do(function(_,data) + --hmi side: sending response + self.hmiConnection:SendResponse(data.id, data.method, "SUCCESS", {}) + end) + + --hmi side: expect UI.AddCommand request + EXPECT_HMICALL("UI.AddCommand", + { + cmdID = 02, + menuParams = + { + parentID = 11, + position = 1000, + menuName ="Command_01" + } + }) + :Do(function(_,data) + --hmi side: sending UI.AddCommand response + self.hmiConnection:SendResponse(data.id, data.method, "SUCCESS", {}) + end) + + EXPECT_RESPONSE(cid, { success = true, resultCode = "SUCCESS" }) + EXPECT_NOTIFICATION("OnHashChange") + end + --End + + --Send AddCommand "Command_01" + addItem to "Submenu_02" VrSynonyms = disabled + function Test:AddCommand_SameCommandID01_DifferentSubmenu_VrSynonymsDisabled() + --mobile side: sending AddCommand request + local cid = self.mobileSession:SendRPC("AddCommand", + { + cmdID = 03, + menuParams = + { + parentID = 22, + position = 1000, + menuName ="Command_01" + } + }) + + --hmi side: expect UI.AddCommand request + EXPECT_HMICALL("UI.AddCommand", + { + cmdID = 03, + menuParams = + { + parentID = 22, + position = 1000, + menuName ="Command_01" + } + }) + :Do(function(_,data) + --hmi side: sending UI.AddCommand response + self.hmiConnection:SendResponse(data.id, data.method, "SUCCESS", {}) + end) + + EXPECT_RESPONSE(cid, { success = true, resultCode = "SUCCESS" }) + EXPECT_NOTIFICATION("OnHashChange") + end + + --Send AddCommand "Command_01" + addItem to "Submenu_03" VrSynonyms = command3 + + function Test:AddCommand_SameCommandID01_DifferentSubmenu_VrSynonumEnabled() + --mobile side: sending AddCommand request + local cid = self.mobileSession:SendRPC("AddCommand", + { + cmdID = 04, + menuParams = + { + parentID = 33, + position = 1000, + menuName ="Command_01" + }, + vrCommands = + { + "command3" + } + }) + --hmi side: expect VR.AddCommand request + EXPECT_HMICALL("VR.AddCommand", + { + cmdID = 04, + type = "Command", + vrCommands = + { + "command3" + } + }) + :Do(function(_,data) + --hmi side: sending response + self.hmiConnection:SendResponse(data.id, data.method, "SUCCESS", {}) + end) + + --hmi side: expect UI.AddCommand request + EXPECT_HMICALL("UI.AddCommand", + { + cmdID = 04, + menuParams = + { + parentID = 33, + position = 1000, + menuName ="Command_01" + } + }) + :Do(function(_,data) + --hmi side: sending UI.AddCommand response + self.hmiConnection:SendResponse(data.id, data.method, "SUCCESS", {}) + end) + + EXPECT_RESPONSE(cid, { success = true, resultCode = "SUCCESS" }) + EXPECT_NOTIFICATION("OnHashChange") + end + --End + + end + APPLINK_18308() + + --End Test case SequenceCheck.6 + ------------------------------------------------------------------------------------------- + --End Test suit SequenceCheck + + +---------------------------------------------------------------------------------------------- +-----------------------------------------VII TEST BLOCK---------------------------------------- +--------------------------------------Different HMIStatus------------------------------------- +---------------------------------------------------------------------------------------------- + --Description: processing of request/response in different HMIlevels, SystemContext, AudioStreamingState + + --Begin Test suit DifferentHMIlevel + --Description: processing API in different HMILevel + + --Begin Test case DifferentHMIlevel.1 + --Description: Default values taken from Policy Table + + --Requirement id in JAMA: + --SDLAQ-CRS-752 + --Verification criteria: + -- SDL doesn't reject AddCommand request when current HMI is FULL. + -- SDL doesn't reject AddCommand request when current HMI is LIMITED. + -- SDL doesn't reject AddCommand request when current HMI is BACKGROUND. + + --Begin Test case DifferentHMIlevel.1.1 + --Description: SDL doesn't reject AddCommand request when current HMI is LIMITED. + + if + Test.isMediaApplication == true or + Test.appHMITypes["NAVIGATION"] then + + function Test:ChangeHMIToLimited() + --hmi side: sending BasicCommunication.OnAppDeactivated request + local cid = self.hmiConnection:SendNotification("BasicCommunication.OnAppDeactivated", + { + appID = self.applications["Test Application"], + reason = "GENERAL" + }) + + --mobile side: expect OnHMIStatus notification + EXPECT_NOTIFICATION("OnHMIStatus",{hmiLevel = "LIMITED", systemContext = "MAIN", audioStreamingState = "AUDIBLE"}) + end + + function Test:AddCommand_HMILevelLimited() + AddCommand_cmdID(self, 1125, true, "SUCCESS") + end + --End Test case DifferentHMIlevel.1.1 + + ----------------------------------------------------------------------------------------- + + --Begin Test case DifferentHMIlevel.1.2 + --Description: SDL doesn't reject AddCommand request when current HMI is BACKGROUND. + + --Description: Activate second app + function Test:Activate_App2() + --hmi side: sending SDL.ActivateApp request + local RequestId = self.hmiConnection:SendRequest("SDL.ActivateApp", { appID = self.applications["MediaApp2"]}) + + --hmi side: expect SDL.ActivateApp response + EXPECT_HMIRESPONSE(RequestId) + :Do(function(_,data) + --In case when app is not allowed, it is needed to allow app + if + data.result.isSDLAllowed ~= true then + --hmi side: sending SDL.GetUserFriendlyMessage request + local RequestId = self.hmiConnection:SendRequest("SDL.GetUserFriendlyMessage", + {language = "EN-US", messageCodes = {"DataConsent"}}) + + --hmi side: expect SDL.GetUserFriendlyMessage response + EXPECT_HMIRESPONSE(RequestId,{result = {code = 0, method = "SDL.GetUserFriendlyMessage"}}) + :Do(function(_,data) + + --hmi side: send request SDL.OnAllowSDLFunctionality + self.hmiConnection:SendNotification("SDL.OnAllowSDLFunctionality", + {allowed = true, source = "GUI", device = {id = config.deviceMAC, name = "127.0.0.1"}}) + + --hmi side: expect BasicCommunication.ActivateApp request + EXPECT_HMICALL("BasicCommunication.ActivateApp") + :Do(function(_,data) + + --hmi side: sending BasicCommunication.ActivateApp response + self.hmiConnection:SendResponse(data.id,"BasicCommunication.ActivateApp", "SUCCESS", {}) + + end) + :Times(AnyNumber()) + :Timeout(11000) + end) + end + end) + + self.mobileSession2:ExpectNotification("OnHMIStatus", {hmiLevel = "FULL", audioStreamingState = "AUDIBLE", systemContext = "MAIN"}) + --mobile side: expect OnHMIStatus notification + EXPECT_NOTIFICATION("OnHMIStatus",{hmiLevel = "BACKGROUND", systemContext = "MAIN", audioStreamingState = "NOT_AUDIBLE"}) + end + + --Description: AddCommand when HMI level BACKGROUND + function Test:AddCommand_HMILevelBackground() + AddCommand_cmdID(self, 1126, true, "SUCCESS") + end + elseif Test.isMediaApplication == false then + + function Test:ChangeHMIToBackground() + --hmi side: sending BasicCommunication.OnAppDeactivated request + local cid = self.hmiConnection:SendNotification("BasicCommunication.OnAppDeactivated", + { + appID = self.applications["Test Application"], + reason = "GENERAL" + }) + + --mobile side: expect OnHMIStatus notification + EXPECT_NOTIFICATION("OnHMIStatus",{hmiLevel = "BACKGROUND", systemContext = "MAIN", audioStreamingState = "NOT_AUDIBLE"}) + end + + function Test:AddCommand_HMILevelBackground() + AddCommand_cmdID(self, 1125, true, "SUCCESS") + end + + end + --End Test case DifferentHMIlevel.1.2 + --End Test case DifferentHMIlevel.1 + --End Test suit DifferentHMIlevel + + + +--------------------------------------------------------------------------------------------------------------------- +---------------------------VIII ADD COVERAGE TO ATF_AddCmmand(SDLAQ-TC-1375)----------------------------------------- +-------AddCommand: [RTC 525037] No VR/UI deletecommand request sent when one of them times out (Job-1)--------------- +--------------------------------------------------------------------------------------------------------------------- +--Requirement id in JAMA or JIRA: APPLINK-10501 + --SDLAQ-CRS-2928: UI.AddCommand - success, VR.AddCommand - no response + --SDLAQ-CRS-2929: VR.AddCommand - success, UI.AddCommand - no response + --SDLAQ-CRS-2930: UI.AddCommand - success, VR.AddCommand - error (except of REJECTED) + --SDLAQ-CRS-2931: UI.AddCommand - success, VR.AddCommand - REJECTED (SDLAQ-CRS-2931) + --SDLAQ-CRS-2932: VR.AddCommand - success, UI.AddCommand - error (except of WARNINGS, UNSUPPORTED_RESOURCE, REJECTED) + --SDLAQ-CRS-2933: VR.AddCommand - success, UI.AddCommand - REJECTED (SDLAQ-CRS-2933) +--------------------------------------------------------------------------------------------------------------------- + +local function SequenceAddCoverageAPPLINK_10501() + +---------------------------------------------------------------------------------------------------------------------- +---------------------------------------------------Common function---------------------------------------------------- +---------------------------------------------------------------------------------------------------------------------- + + --Description: + -- In case VR.AddCommand gets any erroneous response except REJECTED from HMI - SDL must send AddCommand_response(GENERIC_ERROR) to mobile app. + -- In case VR.AddCommand gets any REJECTED from HMI - SDL must send AddCommand_response(REJECTED) to mobile app. + -- In case SDL sends UI.DeleteCommand to HMI + function Test:addCommand_VRErroneousResponseUpdated (vrResultResponse, cmdIDValue) + local resultCodeValue + if vrResultResponse == "REJECTED" or vrResultResponse == "WARNINGS" then + resultCodeValue = vrResultResponse + else + resultCodeValue = "GENERIC_ERROR" + end + + --mobile side: sending AddCommand request + local cid = self.mobileSession:SendRPC("AddCommand", + { + cmdID = cmdIDValue, + menuParams = + { + menuName ="Command"..cmdIDValue + }, + vrCommands = + { + "VRCommand"..cmdIDValue + } + }) + --hmi side: expect UI.AddCommand request + EXPECT_HMICALL("UI.AddCommand", + { + cmdID = cmdIDValue, + menuParams = + { + menuName ="Command"..cmdIDValue + } + }) + :Do(function(exp,data) + --hmi side: send UI.AddCommand response + self.hmiConnection:SendResponse(data.id, data.method, "SUCCESS", {}) + end) + + --hmi side: expect VR.AddCommand request + EXPECT_HMICALL("VR.AddCommand", + { + cmdID = cmdIDValue, + type = "Command", + vrCommands = + { + "VRCommand"..cmdIDValue + } + }) + :Do(function(exp,data) + if (vrResultResponse ~= "TIMED_OUT") then + --hmi side: sending VR.AddCommand response + self.hmiConnection:SendError(data.id, data.method, vrResultResponse, "Error Messages") + end + end) + + if vrResultResponse ~= "WARNINGS" then + --hmi side: expect UI.DeleteCommand request + EXPECT_HMICALL("UI.DeleteCommand", {cmdID = cmdIDValue}) + :Timeout(15000) + :Do(function(exp,data) + --hmi side: sending UI.DeleteCommand response + self.hmiConnection:SendResponse(data.id,"UI.DeleteCommand", "SUCCESS", {}) + end) + + --mobile side: expect response + EXPECT_RESPONSE(cid, { success = false, resultCode = resultCodeValue }) + :Timeout(12000) + + --mobile side: expect OnHashChange notification is not send to mobile + EXPECT_NOTIFICATION("OnHashChange") + :Times(0) + else + --mobile side: expect response + EXPECT_RESPONSE(cid, { success = true, resultCode = resultCodeValue }) + + --mobile side: expect OnHashChange notification + EXPECT_NOTIFICATION("OnHashChange") + + commonTestCases:DelayedExp(1000) + + end + end + + -------------------------------------------------------------------------------------------------------------- + + --Description: + -- In case UI.AddCommand gets erroneous response except of WARNINGS and UNSUPPORTED_RESOURCE and REJECTED from HMI - SDL must send AddCommand_response(GENERIC_ERROR) to mobile app. + -- In case UI.AddCommand gets REJECTED from HMI - SDL must send AddCommand_response(REJECTED) to mobile app. + -- In case of WARNINGS or UNSUPPORTED_RESOURCE from HMI, SDL must transfer the resultCode from HMI's response with adding "success: true" to mobile app. + -- In case SDL sends VR.DeleteCommand to HMI + function Test:addCommand_UIErroneousResponseUpdated (uiResultResponse, cmdIDValue) + local resultCodeValue, succcessValue + if uiResultResponse == "REJECTED" or uiResultResponse == "WARNINGS" or uiResultResponse == "UNSUPPORTED_RESOURCE" then + resultCodeValue = uiResultResponse + if uiResultResponse ~= "REJECTED" then + succcessValue = true + else + succcessValue = false + end + else + resultCodeValue = "GENERIC_ERROR" + succcessValue = false + end + + --mobile side: sending AddCommand request + local cid = self.mobileSession:SendRPC("AddCommand", + { + cmdID = cmdIDValue, + menuParams = + { + menuName ="Command"..cmdIDValue + }, + vrCommands = + { + "VRCommand"..cmdIDValue + } + }) + --hmi side: expect UI.AddCommand request + EXPECT_HMICALL("UI.AddCommand", + { + cmdID = cmdIDValue, + menuParams = + { + menuName ="Command"..cmdIDValue + } + }) + :Do(function(exp,data) + if (uiResultResponse ~= "TIMED_OUT") then --no response + --hmi side: send UI.AddCommand response + self.hmiConnection:SendError(data.id, data.method, uiResultResponse, "Error Messages") + end + end) + + --hmi side: expect VR.AddCommand request + EXPECT_HMICALL("VR.AddCommand", + { + cmdID = cmdIDValue, + type = "Command", + vrCommands = + { + "VRCommand"..cmdIDValue + } + }) + :Do(function(exp,data) + --hmi side: sending VR.AddCommand response + self.hmiConnection:SendResponse(data.id, data.method, "SUCCESS", {}) + end) + + if uiResultResponse ~= "WARNINGS" and uiResultResponse ~= "UNSUPPORTED_RESOURCE" then + --hmi side: expect VR.DeleteCommand request + EXPECT_HMICALL("VR.DeleteCommand", {cmdID = cmdIDValue}) + :Timeout(15000) + :Do(function(exp,data) + --hmi side: sending VR.DeleteCommand response + self.hmiConnection:SendResponse(data.id,"VR.DeleteCommand", "SUCCESS", {}) + end) + + --mobile side: expect notification + EXPECT_NOTIFICATION("OnHashChange") + :Times(0) + else + --hmi side: expect VR.DeleteCommand request + EXPECT_HMICALL("VR.DeleteCommand", {cmdID = cmdIDValue}) + :Times(0) + + --mobile side: expect notification + EXPECT_NOTIFICATION("OnHashChange") + end + + --mobile side: expect response + EXPECT_RESPONSE(cid, { success = succcessValue, resultCode = resultCodeValue }) + :Timeout(12000) + + commonTestCases:DelayedExp(1000) + end + + ------------------------------------------------------------------------------------------------------------- + +--------------------------------------------------------------------------------------------------------------------- +------------------------------------------------End Common function-------------------------------------------------- +--------------------------------------------------------------------------------------------------------------------- + + --Print new line to separate new test cases group + commonFunctions:newTestCasesGroup("-----------------------VIII ADD COVERAGE TO ATF_AddCmmand(SDLAQ-TC-1375)------------------------------") + + local function APPLINK_10501() + + ------------------------------------------------------------------------------------------------------------- + + -- Description: Activation app + commonSteps:ActivationApp( _, "APPLINK_10501_ActivationApp") + + ------------------------------------------------------------------------------------------------------------- + + -- Description: UI.AddCommand - success, VR.AddCommand - no response (TIMED_OUT) + --JamaID: SDLAQ-CRS-2928 + function Test:APPLINK_10501_UISuccess_VRTIMED_OUT() + + self:addCommand_VRErroneousResponseUpdated("TIMED_OUT", 2015) + + end + + ------------------------------------------------------------------------------------------------------------- + + -- Description: UI.AddCommand - success, VR.AddCommand - no response (TIMED_OUT) + --JamaID: SDLAQ-CRS-2929 + function Test:APPLINK_10501_VRSuccess_UITIMED_OUT() + + self:addCommand_UIErroneousResponseUpdated("TIMED_OUT", 2016) + + end + + ------------------------------------------------------------------------------------------------------------- + + -- Description: UI.AddCommand - success, VR.AddCommand - error except REJECTED (GENERIC_ERROR) + --JamaID: SDLAQ-CRS-2930 + function Test:APPLINK_10501_UISuccess_VRGENERIC_ERROR() + + self:addCommand_VRErroneousResponseUpdated("GENERIC_ERROR", 2017) + + end + + ------------------------------------------------------------------------------------------------------------- + + -- Description: UI.AddCommand - success, VR.AddCommand - response REJECTED + --JamaID: SDLAQ-CRS-2931 + function Test:APPLINK_10501_UISuccess_VRREJECTED() + + self:addCommand_VRErroneousResponseUpdated("REJECTED", 2018) + + end + + ------------------------------------------------------------------------------------------------------------- + + -- Description: VR.AddCommand - success, UI.AddCommand - error except of WARNINGS, UNSUPPORTED_RESOURCE, REJECTED (GENERIC_ERROR) + --JamaID: SDLAQ-CRS-2932 + function Test:APPLINK_10501_VRSuccess_UIGENERIC_ERROR() + + self:addCommand_UIErroneousResponseUpdated("GENERIC_ERROR", 2019) + + end + + ------------------------------------------------------------------------------------------------------------- + + -- Description: VR.AddCommand - success, UI.AddCommand - REJECTED + --JamaID: SDLAQ-CRS-2933 + function Test:APPLINK_10501_VRSuccess_UIREJECTED() + + self:addCommand_UIErroneousResponseUpdated("REJECTED", 2014) + + end + + ------------------------------------------------------------------------------------------------------------- + end + + --Main to execute test cases + APPLINK_10501() + +end + +SequenceAddCoverageAPPLINK_10501() \ No newline at end of file diff --git a/test_scripts/ATF_AddSubMenu.lua b/test_scripts/API/ATF_AddSubMenu.lua similarity index 90% rename from test_scripts/ATF_AddSubMenu.lua rename to test_scripts/API/ATF_AddSubMenu.lua index 9c3f293952..2362f2c08e 100644 --- a/test_scripts/ATF_AddSubMenu.lua +++ b/test_scripts/API/ATF_AddSubMenu.lua @@ -2,23 +2,86 @@ Test = require('connecttest') require('cardinalities') local events = require('events') local mobile_session = require('mobile_session') - -config.deviceMAC = "12ca17b49af2289436f303e0166030a21e525d266e209267433801a8fd4071a0" +local commonFunctions = require('user_modules/shared_testcases/commonFunctions') +local commonSteps = require('user_modules/shared_testcases/commonSteps') +local commonTestCases = require('user_modules/shared_testcases/commonTestCases') +local policyTable = require('user_modules/shared_testcases/testCasesForPolicyTable') local infoMessage = string.rep("a",1000) +APIName = "AddSubMenu" require('user_modules/AppTypes') + + local AddedSubMenus = {} -function DelayedExp() - local event = events.Event() - event.matches = function(self, e) return self == e end - EXPECT_EVENT(event, "Delayed event") - RUN_AFTER(function() - RAISE_EVENT(event, event) - end, 2000) + +--------------------------------------------------------------------------------------------- +-------------------------- Overwrite These Functions For This Script------------------------- +--------------------------------------------------------------------------------------------- +--Specific functions for this script +--1. createRequest() +--2. createResponse(Request) +--3. verify_SUCCESS_Case(Request) +--------------------------------------------------------------------------------------------- + +--Use this variable in createRequest function +icreasingNumber = 1 + +--Create default request +function Test:createRequest() + icreasingNumber = icreasingNumber + 1 + return { + menuID = 520+ icreasingNumber, + position = 520 + icreasingNumber, + menuName ="SubMenupositive999_" .. tostring(icreasingNumber) + } end + +--Create UI.AddSubMenu expected result based on parameters from the request +function Test:createResponse(Request) + + --local Req = commonFunctions:cloneTable(Request) + + local Response = {} + if Request["menuID"] ~= nil then + Response["menuID"] = Request["menuID"] + end + + if Request["menuName"] ~= nil then + Response["menuParams"] = + { + position = Request["position"], + menuName = Request["menuName"] + } + end + + return Response + +end + +--This function sends a request from mobile and verify result on HMI and mobile for SUCCESS resultCode cases. +function Test:verify_SUCCESS_Case(Request) + + --mobile side: sending the request + local cid = self.mobileSession:SendRPC(APIName, Request) + + --hmi side: expect UI.AddSubMenu request + local Response = self:createResponse(Request) + EXPECT_HMICALL("UI.AddSubMenu", Response) + :Do(function(_,data) + --hmi side: sending response + self.hmiConnection:SendResponse(data.id, data.method, "SUCCESS", {}) + end) + + --mobile side: expect AddSubMenu response + EXPECT_RESPONSE(cid, { success = true, resultCode = "SUCCESS" }) + + --mobile side: expect OnHashChange notification + EXPECT_NOTIFICATION("OnHashChange") +end + local function SendOnSystemContext(self, ctx) self.hmiConnection:SendNotification("UI.OnSystemContext",{ appID = self.applications["Test Application"], systemContext = ctx }) @@ -27,54 +90,20 @@ end --------------------------------------------------------------------------------------------- -------------------------------------------Preconditions------------------------------------- --------------------------------------------------------------------------------------------- - --Begin Precondition.1 - --Description: Activation App by sending SDL.ActivateApp - function Test:ActivationApp() - --hmi side: sending SDL.ActivateApp request - local RequestId = self.hmiConnection:SendRequest("SDL.ActivateApp", { appID = self.applications["Test Application"]}) - - --hmi side: expect SDL.ActivateApp response - EXPECT_HMIRESPONSE(RequestId) - :Do(function(_,data) - --In case when app is not allowed, it is needed to allow app - if - data.result.isSDLAllowed ~= true then - - --hmi side: sending SDL.GetUserFriendlyMessage request - local RequestId = self.hmiConnection:SendRequest("SDL.GetUserFriendlyMessage", - {language = "EN-US", messageCodes = {"DataConsent"}}) - - --hmi side: expect SDL.GetUserFriendlyMessage response - --TODO: Update after resolving APPLINK-16094 EXPECT_HMIRESPONSE(RequestId,{result = {code = 0, method = "SDL.GetUserFriendlyMessage"}}) - EXPECT_HMIRESPONSE(RequestId) - :Do(function(_,data) - - --hmi side: send request SDL.OnAllowSDLFunctionality - self.hmiConnection:SendNotification("SDL.OnAllowSDLFunctionality", - {allowed = true, source = "GUI", device = {id = config.deviceMAC, name = "127.0.0.1"}}) - - --hmi side: expect BasicCommunication.ActivateApp request - EXPECT_HMICALL("BasicCommunication.ActivateApp") - :Do(function(_,data) - - --hmi side: sending BasicCommunication.ActivateApp response - self.hmiConnection:SendResponse(data.id,"BasicCommunication.ActivateApp", "SUCCESS", {}) + + commonSteps:DeleteLogsFileAndPolicyTable() + + --Print new line to separate new test cases group + commonFunctions:newTestCasesGroup("Preconditions") - end) - :Times(2) + --1. Activate application + commonSteps:ActivationApp() - end) + --2. Update policy to allow request + --TODO: Will be updated after policy flow implementation + policyTable:precondition_updatePolicy_AllowFunctionInHmiLeves({"BACKGROUND", "FULL", "LIMITED"}) - end - end) - - --mobile side: expect notification - EXPECT_NOTIFICATION("OnHMIStatus", {hmiLevel = "FULL", systemContext = "MAIN" }) - end - --End Precondition.1 - - ----------------------------------------------------------------------------------------- - + --------------------------------------------------------------------------------------------- -----------------------------------------I TEST BLOCK---------------------------------------- --CommonRequestCheck: Check of mandatory/conditional request's parameters (mobile protocol)-- @@ -2135,7 +2164,7 @@ end end end - function Test: AddSubMenu_REJECTED() + function Test:AddSubMenu_REJECTED() --mobile side: sending AddSubMenu request local cid = self.mobileSession:SendRPC("AddSubMenu", { @@ -2169,6 +2198,100 @@ end ----------------------------------------------------------------------------------------- + --Begin Test case ResultCodeCheck.3 + --Description: A command can not be executed because no application has been registered with RegisterApplication. + + --Requirement id in JAMA: + --SDLAQ-CRS-434 + + --Verification criteria: + --SDL sends APPLICATION_NOT_REGISTERED code when the app sends a request within the same connection before RegisterAppInterface has been performed yet. + + --Description: Unregistered application + function Test:UnregisterAppInterface_Success() + local cid = self.mobileSession:SendRPC("UnregisterAppInterface",{}) + + EXPECT_RESPONSE(cid, { success = true, resultCode = "SUCCESS"}) + :Timeout(2000) + end + + --Description: Send AddSubMenu when application not registered yet. + function Test:AddSubMenu_AppNotRegistered() + --mobile side: sending AddSubMenu request + local cid = self.mobileSession:SendRPC("AddSubMenu", + { + menuID = 223, + position = 500, + menuName ="SubMenu223" + }) + + --mobile side: expect DeleteCommand response + EXPECT_RESPONSE(cid, { success = false, resultCode = "APPLICATION_NOT_REGISTERED" }) + + --mobile side: expect OnHashChange notification is not send to mobile + EXPECT_NOTIFICATION("OnHashChange") + :Times(0) + end + --End Test case ResultCodeCheck.3 + + ----------------------------------------------------------------------------------------- + + --Begin Test case ResultCodeCheck.4 + --Description: Policies manager must validate an RPC request as "disallowed" if it is not allowed by the backend. + + --Requirement id in JAMA: + --SDLAQ-CRS-2396 + + --Verification criteria: + --An RPC request is not allowed by the backend. Policies Manager validates it as "disallowed". + + commonSteps:RegisterAppInterface("RegisterAppInterface1") + commonSteps:RegisterAppInterface("RegisterAppInterface_WorkAround") + + --Description: Send AddSubMenu when HMI leve is NONE + function Test:AddSubMenu_DisallowedHMINone() + --mobile side: sending AddSubMenu request + local cid = self.mobileSession:SendRPC("AddSubMenu", + { + menuID = 201, + position = 50, + menuName ="SubMenu201" + }) + + --mobile side: expect AddSubMenu response + EXPECT_RESPONSE(cid, { success = false, resultCode = "DISALLOWED" }) + + --mobile side: expect OnHashChange notification is not send to mobile + EXPECT_NOTIFICATION("OnHashChange") + :Times(0) + + commonTestCases:DelayedExp(2000) + end + --End Test case ResultCodeCheck.4 + + ----------------------------------------------------------------------------------------- + + --Begin Test case ResultCodeCheck.5 + --Description: Policies Manager must validate an RPC request as "userDisallowed" if the request is allowed by the backend but disallowed by the use + + --Requirement id in JAMA: + --SDLAQ-CRS-2394 + + --Verification criteria: + --An RPC request is allowed by the backend but disallowed by the user. Policy Manager validates it as "userDisallowed" + + --Description: Activate application + commonSteps:ActivationApp() + + --Check AddSubMenu is Disallowed when it is not in PT + policyTable:checkPolicyWhenAPIIsNotExist() + + --Check AddSubMenu is DISALLOWED/USER_DISALLOWED when it is in PT and it has not been allowed yet/user disallows. + policyTable:checkPolicyWhenUserDisallowed({"FULL", "LIMITED", "BACKGROUND"}) + + --End Test case ResultCodeCheck.5 + + --End Test suit ResultCodeCheck ---------------------------------------------------------------------------------------------- @@ -2578,7 +2701,7 @@ end --mobile side: expected OnHMIStatus notification if self.isMediaApplication == true or - Test.appHMITypes["NAVIGATION"] == true then + self.appHMITypes["NAVIGATION"] == true then EXPECT_NOTIFICATION("OnHMIStatus", { systemContext = "MENU", hmiLevel = "FULL", audioStreamingState = "AUDIBLE" }, { systemContext = "MAIN", hmiLevel = "FULL", audioStreamingState = "AUDIBLE" }) @@ -2619,154 +2742,11 @@ end --SDL doesn't reject AddSubMenu request when current HMI is FULL. --SDL doesn't reject AddSubMenu request when current HMI is LIMITED. --SDL doesn't reject AddSubMenu request when current HMI is BACKGROUND. - - if - Test.isMediaApplication == true or - Test.appHMITypes["NAVIGATION"] == true then - --Begin DifferentHMIlevel.1.1 - --Description: SDL doesn't reject AddSubMenu request when current HMI is LIMITED (for media/navi app) - function Test:ChangeHMIToLimited() - local cid = self.hmiConnection:SendNotification("BasicCommunication.OnAppDeactivated", - { - appID = self.applications["Test Application"], - reason = "GENERAL" - }) - - EXPECT_NOTIFICATION("OnHMIStatus",{hmiLevel = "LIMITED", systemContext = "MAIN", audioStreamingState = "AUDIBLE" }) - end - - function Test:AddSubMenu_HMILevelLimited() - --mobile side: sending AddSubMenu request - local cid = self.mobileSession:SendRPC("AddSubMenu", - { - menuID = 213, - position = 10, - menuName ="SubMenu213" - }) - --hmi side: expect UI.AddSubMenu request - EXPECT_HMICALL("UI.AddSubMenu", - { - menuID = 213, - menuParams = { - position = 10, - menuName ="SubMenu213" - } - }) - :Do(function(_,data) - --hmi side: sending UI.AddSubMenu response - self.hmiConnection:SendResponse(data.id, data.method, "SUCCESS", {}) - end) - - --mobile side: expect AddSubMenu response - EXPECT_RESPONSE(cid, { success = true, resultCode = "SUCCESS" }) - - --mobile side: expect OnHashChange notification - EXPECT_NOTIFICATION("OnHashChange") - end - --End DifferentHMIlevel.1.1 - - --Begin DifferentHMIlevel.1.2 - --Description: SDL doesn't reject AddSubMenu request when current HMI is BACKGROUND. - - --Precondition for media app type - --Description:Start second session - function Test:Case_SecondSession() - self.mobileSession1 = mobile_session.MobileSession( - self, - self.mobileConnection) - end - - --Description "Register second app" - function Test:Case_AppRegistrationInSecondSession() - self.mobileSession1:StartService(7) - :Do(function() - local CorIdRegister = self.mobileSession1:SendRPC("RegisterAppInterface", - { - syncMsgVersion = - { - majorVersion = 3, - minorVersion = 0 - }, - appName = "Test Application2", - isMediaApplication = true, - languageDesired = 'EN-US', - hmiDisplayLanguageDesired = 'EN-US', - appHMIType = { "NAVIGATION" }, - appID = "1" - }) - - EXPECT_HMINOTIFICATION("BasicCommunication.OnAppRegistered", - { - application = - { - appName = "Test Application2" - } - }) - :Do(function(_,data) - appId2 = data.params.application.appID - end) - - self.mobileSession1:ExpectResponse(CorIdRegister, { success = true, resultCode = "SUCCESS" }) - :Timeout(2000) - - self.mobileSession1:ExpectNotification("OnHMIStatus",{hmiLevel = "NONE", audioStreamingState = "NOT_AUDIBLE", systemContext = "MAIN"}) - - end) - end - - --Description: Activate second app - function Test:ActivateSecondApp() - local rid = self.hmiConnection:SendRequest("SDL.ActivateApp",{appID = appId2}) - EXPECT_HMIRESPONSE(rid) - - self.mobileSession1:ExpectNotification("OnHMIStatus",{hmiLevel = "FULL", audioStreamingState = "AUDIBLE", systemContext = "MAIN"}) - self.mobileSession:ExpectNotification("OnHMIStatus",{hmiLevel = "BACKGROUND", audioStreamingState = "NOT_AUDIBLE", systemContext = "MAIN"}) - end - - elseif - Test.isMediaApplication == false then - --Precondition for non-media app type - - function Test:ChangeHMIToBackground() - local cid = self.hmiConnection:SendNotification("BasicCommunication.OnAppDeactivated", - { - appID = self.applications["Test Application"], - reason = "GENERAL" - }) - - EXPECT_NOTIFICATION("OnHMIStatus",{hmiLevel = "BACKGROUND", audioStreamingState = "NOT_AUDIBLE", systemContext = "MAIN"}) - end - - end - --Description: AddSubMenu when HMI level BACKGROUND - function Test:AddSubMenu_HMILevelBackground() - --mobile side: sending AddSubMenu request - local cid = self.mobileSession:SendRPC("AddSubMenu", - { - menuID = 214, - position = 20, - menuName ="SubMenu214" - }) - --hmi side: expect UI.AddSubMenu request - EXPECT_HMICALL("UI.AddSubMenu", - { - menuID = 214, - menuParams = { - position = 20, - menuName ="SubMenu214" - } - }) - :Do(function(_,data) - --hmi side: sending UI.AddSubMenu response - self.hmiConnection:SendResponse(data.id, data.method, "SUCCESS", {}) - end) - - --mobile side: expect AddSubMenu response - EXPECT_RESPONSE(cid, { success = true, resultCode = "SUCCESS" }) + + --Verify resultCode in NONE, LIMITED, BACKGROUND HMI level + commonTestCases:verifyDifferentHMIStatus("DISALLOWED", "SUCCESS", "SUCCESS") + + --Postcondition: restore sdl_preloaded_pt.json + policyTable:Restore_preloaded_pt() - --mobile side: expect OnHashChange notification - EXPECT_NOTIFICATION("OnHashChange") - end - --End Test case DifferentHMIlevel.1.2 - --End Test case DifferentHMIlevel.1 - --End Test suit DifferentHMIlevel +return Test \ No newline at end of file diff --git a/test_scripts/API/ATF_All_RPCs_and_Notifications.lua b/test_scripts/API/ATF_All_RPCs_and_Notifications.lua new file mode 100644 index 0000000000..f22746d08d --- /dev/null +++ b/test_scripts/API/ATF_All_RPCs_and_Notifications.lua @@ -0,0 +1,2905 @@ +------------------------------------------------------------------------------------------------- +-------------------------------------------Updates of files ------------------------------------- +------------------------------------------------------------------------------------------------- +print("") +print ("\27[31m !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! \27[0m") +print ("\27[31m !!!!!!!!!!!!!!! Update of files sdl_preloaded_pt.json before start of SDL !!!!!!!!!!!!!!! \27[0m") +print ("\27[31m !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! \27[0m") +print("") + local commonSteps = require('user_modules/shared_testcases/commonSteps') + local commonPreconditions = require('user_modules/shared_testcases/commonPreconditions') + + +function DeleteLog_app_info_dat_policy() + commonSteps:CheckSDLPath() + local SDLStoragePath = config.pathToSDL .. "storage/" + + --Delete app_info.dat and log files and storage + if commonSteps:file_exists(config.pathToSDL .. "app_info.dat") == true then + os.remove(config.pathToSDL .. "app_info.dat") + end + + if commonSteps:file_exists(config.pathToSDL .. "SmartDeviceLinkCore.log") == true then + os.remove(config.pathToSDL .. "SmartDeviceLinkCore.log") + end + + if commonSteps:file_exists(SDLStoragePath .. "policy.sqlite") == true then + os.remove(SDLStoragePath .. "policy.sqlite") + end + + if commonSteps:file_exists(config.pathToSDL .. "policy.sqlite") == true then + os.remove(config.pathToSDL .. "policy.sqlite") + end +print("path = " .."rm -r " ..config.pathToSDL .. "storage") + os.execute("rm -r " ..config.pathToSDL .. "storage") +end + +DeleteLog_app_info_dat_policy() + +---------------------------------------------------------------------------------------------- +-- make reserve copy of file (FileName) in specified folder +local function BackupSpecificFile(FileFolder , FileName) + os.execute(" cp " .. FileFolder .. FileName .. " " .. FileFolder .. FileName .. "_origin" ) +end + +-- restore origin of file (FileName) in specified folder +local function RestoreSpecificFile(FileFolder, FileName) + os.execute(" cp " .. FileFolder .. FileName .. "_origin " .. FileFolder .. FileName ) + os.execute( " rm -f " .. FileFolder .. FileName .. "_origin" ) +end + + +--UPDATED: For each rpc that will be verified in test check and update BASE4 Group of sdl_preloaded_pt.json in bin of SDL +function UpdatePolicy() + commonPreconditions:BackupFile("sdl_preloaded_pt.json") + + local src_preloaded_json = config.pathToSDL .."sdl_preloaded_pt.json" + local dest = "user_modules/shared_testcases/PolicyTables/PolicyTable_All_RPCs.json" + + local filecopy = "cp " .. dest .." " .. src_preloaded_json + + os.execute(filecopy) +end + +UpdatePolicy() + +function CopyConfigurationFiles() + local str_print + -- backup initial sdl_preloaded_pt.json and copy the one from SDL build directory + + local src_preloaded_json = config.pathToSDL .."sdl_preloaded_pt.json" + local dest = "files/sdl_preloaded_pt.json" + local dirPath = "files/" + local filecopy = "cp " .. src_preloaded_json .." " .. dest + + if (commonSteps:file_exists(dest) == true) then + print("\27[33m File " ..dest .. " exists \27[0m") + FileExist_PreloadedPT = true + BackupSpecificFile(dirPath, "sdl_preloaded_pt.json") + else + print("\27[33m File " ..dest .. " doesn't exist \27[0m") + end + + os.execute(filecopy) +end +CopyConfigurationFiles() +------------------------------------------------------------------------------------------------- +-------------------------------------------END Updates of files --------------------------------- +------------------------------------------------------------------------------------------------- + + +Test = require('connecttest') +require('cardinalities') +local hmi_connection = require('hmi_connection') +local websocket = require('websocket_connection') +local module = require('testbase') +local events = require('events') +local mobile_session = require('mobile_session') +local mobile = require('mobile_connection') +local tcp = require('tcp_connection') +local file_connection = require('file_connection') +local config = require('config') +local RPC_ResponseTimeout = 10000 + +local iTimeout = 5000 + + + +config.deviceMAC = "12ca17b49af2289436f303e0166030a21e525d266e209267433801a8fd4071a0" +--ToDo: shall be removed when APPLINK-16610 is fixed +config.defaultProtocolVersion = 2 + +local storagePath = config.pathToSDL .. "storage/"..config.application1.registerAppInterfaceParams.appID.. "_" .. config.deviceMAC.. "/" + +local function SendOnSystemContext(self, ctx) + self.hmiConnection:SendNotification("UI.OnSystemContext",{ appID = self.applications["Test Application"], systemContext = ctx }) +end + +local FileExist_PreloadedPT = false + + +local function RestartSDL_ActivateApp() + + function Test:Precondition_StopSDL() + print("") + print ("\27[31m !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! \27[0m") + print ("\27[31m !!!!!!!!!!!!!!!!!!!!!!!!! Restart SDL and load new policy!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! \27[0m") + print ("\27[31m !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! \27[0m") + print("") + StopSDL() + end + + local function DeleteSDLFiles() + + local SDLStoragePath = config.pathToSDL .. "storage/" + + --Delete app_info.dat and log files and storage + if commonSteps:file_exists(config.pathToSDL .. "app_info.dat") == true then + os.remove(config.pathToSDL .. "app_info.dat") + end + + + if commonSteps:file_exists(SDLStoragePath .. "policy.sqlite") == true then + os.remove(SDLStoragePath .. "policy.sqlite") + end + + if commonSteps:file_exists(config.pathToSDL .. "policy.sqlite") == true then + os.remove(config.pathToSDL .. "policy.sqlite") + end + end + function Test:Precondition_UpdatePolicy() + DeleteSDLFiles() + end + + function Test:Precondition_LoadNewPolicy() + local src_preloaded_json = config.pathToSDL .."sdl_preloaded_pt.json" + local dest = "user_modules/shared_testcases/PolicyTables/PolicyTable_All_RPCs_1.json" + + local filecopy = "cp " .. dest .." " .. src_preloaded_json + + os.execute(filecopy) + end + + function Test:Precondition_StartSDL() + StartSDL(config.pathToSDL, config.ExitOnCrash) + end + + function Test:Precondition_InitHMI() + self:initHMI() + end + + function Test:Precondition_InitHMI_onReady() + self:initHMI_onReady() + end + + function Test:Precondition_ConnectMobile() + self:connectMobile() + end + + function Test:Precondition_StartSession() + self.mobileSession = mobile_session.MobileSession( self, self.mobileConnection) + self.mobileSession:StartService(7) + end + + function Test:RegisterAppInterface() + local app_ID + --mobile side: RegisterAppInterface request + local CorIdRAI = self.mobileSession:SendRPC("RegisterAppInterface", + { + syncMsgVersion = + { + majorVersion = 2, + minorVersion = 2, + }, + appName ="SyncProxyTester", + ttsName ={ + { + text ="SyncProxyTester", + type ="TEXT", + }, + }, + ngnMediaScreenAppName ="SPT", + vrSynonyms = + { + "VRSyncProxyTester", + }, + isMediaApplication = true, + languageDesired ="EN-US", + hmiDisplayLanguageDesired ="EN-US", + appHMIType = + { + "NAVIGATION", + }, + appID ="12345", + deviceInfo = + { + hardware = "hardware", + firmwareRev = "firmwareRev", + os = "os", + osVersion = "osVersion", + carrier = "carrier", + maxNumberRFCOMMPorts = 5 + } + + }) + + + --hmi side: expected BasicCommunication.OnAppRegistered + EXPECT_HMINOTIFICATION("BasicCommunication.OnAppRegistered", + { + application = + { + appName = "SyncProxyTester", + ngnMediaScreenAppName ="SPT", + --ToDo: Shall be uncommented when APPLINK-16052 "ATF: TC is failed in case receiving message with nested struct" is fixed + --UPDATED + -- deviceInfo = + -- { + -- transportType = "WIFI", + -- isSDLAllowed = true, + -- id = config.deviceMAC, + -- name = "127.0.0.1" + -- }, + -- deviceInfo = + -- { + -- hardware = "hardware", + -- firmwareRev = "firmwareRev", + -- os = "os", + -- osVersion = "osVersion", + -- carrier = "carrier", + -- maxNumberRFCOMMPorts = 5 + -- }, + policyAppID = "12345", + hmiDisplayLanguageDesired ="EN-US", + isMediaApplication = true, + --UPDATED + --appHMIType = + appType = + { + "NAVIGATION" + }, + }, + ttsName = + { + + { + text ="SyncProxyTester", + type ="TEXT", + } + }, + vrSynonyms = + { + "VRSyncProxyTester", + } + }) + -- Set self.applications["SyncProxyTester"] variable + :Do(function(_,data) + + app_ID = data.params.application.appID + self.applications["SyncProxyTester"] = data.params.application.appID + print ("self.applications[SyncProxyTester] = " .. app_ID) + + local RequestId = self.hmiConnection:SendRequest("SDL.ActivateApp", { appID = app_ID } ) + + EXPECT_HMIRESPONSE(RequestId) + end) +--print ("2: self.applications[SyncProxyTester1] = " .. app_ID) + --mobile side: RegisterAppInterface response + -- EXPECT_RESPONSE(CorIdRAI, { success = true, resultCode = "SUCCESS"}) + -- :Timeout(2000) + -- :Do(function(_,data) + -- if(self.applications["SyncProxyTester1"] ~= nil) then + -- print ("self.applications[SyncProxyTester1] = " .. self.applications["SyncProxyTester1"]) + -- else + -- print("App id is empty!!!!!!!!!!!!!!!") + -- end + -- local RequestId = self.hmiConnection:SendRequest("SDL.ActivateApp", { appID = app_ID } ) + + -- EXPECT_HMIRESPONSE(RequestId) + -- end) + end + + +end + +--------------------------------------------------------------------------------------------- +-------------------------------------------Preconditions------------------------------------- +--------------------------------------------------------------------------------------------- +function Test:Activation() + + EXPECT_NOTIFICATION("OnHMIStatus") + local RequestId = self.hmiConnection:SendRequest("SDL.ActivateApp", { appID = self.applications["Test Application"]}) + EXPECT_HMIRESPONSE(RequestId) + +end +--End Precondition.1 + + ----------------------------------------------------------------------------------------- + + --Begin Precondition.2 + --Description: Putting file(PutFiles) + function Test:PutFile_Precondition() + local cid = self.mobileSession:SendRPC("PutFile", + { + syncFileName = "action.png", + fileType = "GRAPHIC_PNG", + persistentFile = false, + systemFile = false + }, "files/action.png") + EXPECT_RESPONSE(cid, { success = true}) + end + --End Precondition.2 + + ----------------------------------------------------------------------------------------- + + +--------------------------------------------------------------------------------------------- +-----------------------------------------I TEST BLOCK---------------------------------------- +-------------------All_RPSs_and_Notifications: script sends all RPS, ------------------------ +-------------------gets corresponding responses, sends all notifications -------------------- +-------------------for checking correct SDL logging according to APPLINK-12699 -------------- +--------------------------------------------------------------------------------------------- + + --Begin Test suit All_RPSs_and_Responses + --Description: + -- in script sends all RPS, gets corresponding responses for checking correct SDL logging according to APPLINK-12699 + + + --Begin Test case All_RPSs_and_Responses.1 + --Description: Send RPCs with all parameters, positive scenarios + + +function Test:SetGlobalProperties() + print ("-----Requests and Responses-------") + --mobile side: sending SetGlobalProperties request + + local cid = self.mobileSession:SendRPC("SetGlobalProperties", + { + menuTitle = "Menu Title", + timeoutPrompt = + { + { + text = "Timeout prompt", + type = "TEXT" + } + }, + vrHelp = + { + { + position = 1, + image = + { + value = "action.png", + imageType = "DYNAMIC" + }, + text = "VR help item" + } + }, + menuIcon = + { + value = "action.png", + imageType = "DYNAMIC" + }, + helpPrompt = + { + { + text = "Help prompt", + type = "TEXT" + } + }, + vrHelpTitle = "VR help title", + keyboardProperties = + { + keyboardLayout = "QWERTY", + keypressMode = "SINGLE_KEYPRESS", + limitedCharacterList = + { + "a", "b", "c" + }, + language = "EN-US", + autoCompleteText = "Daemon, Freedom" + } + + }) + + + --hmi side: expect TTS.SetGlobalProperties request + EXPECT_HMICALL("TTS.SetGlobalProperties", + { + timeoutPrompt = + { + { + text = "Timeout prompt", + type = "TEXT" + } + }, + helpPrompt = + { + { + text = "Help prompt", + type = "TEXT" + } + } + }) + :Do(function(_,data) + --hmi side: sending UI.SetGlobalProperties response + self.hmiConnection:SendResponse(data.id, data.method, "SUCCESS", {}) + end) + + --hmi side: expect UI.SetGlobalProperties request + + EXPECT_HMICALL("UI.SetGlobalProperties", + { + menuTitle = "Menu Title", + vrHelp = + { + { + position = 1, + --ToDo: Shall be uncommented when APPLINK-16052 "ATF: TC is failed in case receiving message with nested struct" is fixed + --image = + --{ + -- imageType = "DYNAMIC", + -- value = storagePath .. "action.png" + --}, + text = "VR help item" + } + }, + -- menuIcon = + -- { + -- imageType = "DYNAMIC", + -- value = storagePath .. "action.png" + -- }, + vrHelpTitle = "VR help title", + keyboardProperties = + { + keyboardLayout = "QWERTY", + keypressMode = "SINGLE_KEYPRESS", + --ToDo: Shall be uncommented when APPLINK-16047 "ATF: Wrong validation of some arrays" is fixed. + --limitedCharacterList = + --{ + -- "a", "b", "c" + --}, + language = "EN-US", + autoCompleteText = "Daemon, Freedom", + }, + -- UPDATED: added appID check + appID = self.applications["Test Application"] + }) + :ValidIf(function(_,data) + local path = "bin/storage/"..config.application1.registerAppInterfaceParams.appID.. "_" .. config.deviceMAC.. "/" + local value_menuIcon = path .. "action.png" + + if(data.params.menuIcon.imageType == "DYNAMIC") then + return true + else + print("\27[31m imageType of menuIcon is WRONG. Expected: DYNAMIC; Real: " .. data.params.menuIcon.imageType .. "\27[0m") + return false + end + + if(string.find(data.params.menuIcon.value, value_menuIcon) ) then + return true + else + print("\27[31m value of menuIcon is WRONG. Expected: ~".. value_menuIcon .. "; Real: " .. data.params.menuIcon.value .. "\27[0m") + return false + end + end) + :Timeout(iTimeout) + :Do(function(_,data) + --hmi side: sending UI.SetGlobalProperties response + self.hmiConnection:SendResponse(data.id, data.method, "SUCCESS", {}) + end) + + --mobile side: expect SetGlobalProperties response + EXPECT_RESPONSE(cid, { success = true, resultCode = "SUCCESS"}) + end + + --End Test case + --------------------------------------------------------------------------------------- + + +function Test:ResetGlobalProperties() + + --mobile side: sending ResetGlobalProperties request + local cid = self.mobileSession:SendRPC("ResetGlobalProperties", + { + properties = + { + "VRHELPTITLE", + "MENUNAME", + "MENUICON", + "KEYBOARDPROPERTIES", + "VRHELPITEMS", + "HELPPROMPT", + "TIMEOUTPROMPT" + } + }) + --hmi side: expect TTS.SetGlobalProperties request + EXPECT_HMICALL("TTS.SetGlobalProperties", + { + timeoutPrompt = + { + { + type = "TEXT", + text = "Please speak one of the following commands," + }, + { + type = "TEXT", + text = "Please say a command," + } + } + }) + :Timeout(iTimeout) + :Do(function(_,data) + --hmi side: sending TTS.SetGlobalProperties response + self.hmiConnection:SendResponse(data.id, data.method, "SUCCESS", {}) + end) + + --hmi side: expect UI.SetGlobalProperties request + EXPECT_HMICALL("UI.SetGlobalProperties", + { + menuTitle = "", + vrHelpTitle = "Test Application", + keyboardProperties = + { + keyboardLayout = "QWERTY", + autoCompleteText = "", + language = "EN-US" + } + }) + + :Do(function(_,data) + --hmi side: sending UI.SetGlobalProperties response + self.hmiConnection:SendResponse(data.id, data.method, "SUCCESS", {}) + end) + + + + --mobile side: expect SetGlobalProperties response + EXPECT_RESPONSE(cid, { success = true, resultCode = "SUCCESS"}) + end + + --End Test case + --------------------------------------------------------------------------------------- + + function Test:AddCommand() + --mobile side: sending AddCommand request + local cid = self.mobileSession:SendRPC("AddCommand", + { + cmdID = 1, + menuParams = + { + position = 0, + menuName ="Command" + }, + vrCommands = + { + "VRCommandonepositive" + } + }) + + --hmi side: expect UI.AddCommand request + EXPECT_HMICALL("UI.AddCommand", + { + cmdID = 1, + menuParams = + { + position = 0, + menuName ="Command" + } + }) + :Do(function(_,data) + --hmi side: sending UI.AddCommand response + self.hmiConnection:SendResponse(data.id, data.method, "SUCCESS", {}) + end) + + --hmi side: expect VR.AddCommand request + EXPECT_HMICALL("VR.AddCommand", + { + cmdID = 1, + type = "Command", + vrCommands = + { + "VRCommandonepositive" + } + }) + :Do(function(_,data) + --hmi side: sending VR.AddCommand response + self.hmiConnection:SendResponse(data.id, data.method, "SUCCESS", {}) + end) + + --mobile side: expect AddCommand response + EXPECT_RESPONSE(cid, { success = true, resultCode = "SUCCESS" }) + end + + --End Test case + ----------------------------------------------------------------------------------------- + + + function Test:DeleteCommand() + --mobile side: sending DeleteCommand request + local cid = self.mobileSession:SendRPC("DeleteCommand", + { + cmdID = 1 + }) + + --hmi side: expect UI.DeleteCommand request + EXPECT_HMICALL("UI.DeleteCommand", + { + cmdID = 1 + }) + :Do(function(_,data) + --hmi side: sending UI.DeleteCommand response + self.hmiConnection:SendResponse(data.id, data.method, "SUCCESS", {}) + end) + + --hmi side: expect VR.DeleteCommand request + EXPECT_HMICALL("VR.DeleteCommand", + { + cmdID = 1 + }) + :Do(function(_,data) + --hmi side: sending VR.DeleteCommand response + self.hmiConnection:SendResponse(data.id, data.method, "SUCCESS", {}) + end) + + --mobile side: expect DeleteCommand response + EXPECT_RESPONSE(cid, { success = true, resultCode = "SUCCESS" }) + end + + --End Test case + ----------------------------------------------------------------------------------------- + + + function Test:AddSubMenu() + --mobile side: sending AddSubMenu request + local cid = self.mobileSession:SendRPC("AddSubMenu", + { + menuID = 1000, + position = 500, + menuName ="SubMenupositive" + }) + --hmi side: expect UI.AddSubMenu request + EXPECT_HMICALL("UI.AddSubMenu", + { + menuID = 1000, + menuParams = { + position = 500, + menuName ="SubMenupositive" + } + }) + :Do(function(_,data) + --hmi side: sending UI.AddSubMenu response + self.hmiConnection:SendResponse(data.id, data.method, "SUCCESS", {}) + end) + + --mobile side: expect AddSubMenu response + EXPECT_RESPONSE(cid, { success = true, resultCode = "SUCCESS" }) + + end + + --End Test case + ----------------------------------------------------------------------------------------- + + +function Test:DeleteSubMenu() + --mobile side: sending DeleteSubMenu request + local cid = self.mobileSession:SendRPC("DeleteSubMenu", + { + menuID = 1000 + }) + --hmi side: expect UI.DeleteSubMenu request + EXPECT_HMICALL("UI.DeleteSubMenu", + { + menuID = 1000 + }) + :Do(function(_,data) + --hmi side: sending UI.DeleteSubMenu response + self.hmiConnection:SendResponse(data.id, data.method, "SUCCESS", {}) + end) + + --mobile side: expect DeleteSubMenu response + EXPECT_RESPONSE(cid, { success = true, resultCode = "SUCCESS" }) + end + + --End Test case + ----------------------------------------------------------------------------------------- + + + function Test:CreateInteractionChoiceSet() + --mobile side: sending CreateInteractionChoiceSet request + local cid = self.mobileSession:SendRPC("CreateInteractionChoiceSet", + { + interactionChoiceSetID = 1001, + choiceSet = + { + + { + choiceID = 1001, + menuName ="Choice1001", + vrCommands = + { + "Choice1001", + }, + image = + { + value ="action.png", + imageType ="DYNAMIC", + }, + } + } + }) + + + --hmi side: expect VR.AddCommand request + EXPECT_HMICALL("VR.AddCommand", + { + cmdID = 1001, + appID = applicationID, + type = "Choice", + vrCommands = {"Choice1001" } + }) + :Do(function(_,data) + --hmi side: sending VR.AddCommand response + grammarIDValue = data.params.grammarID + self.hmiConnection:SendResponse(data.id, data.method, "SUCCESS", {}) + end) + + --mobile side: expect CreateInteractionChoiceSet response + EXPECT_RESPONSE(cid, { success = true, resultCode = "SUCCESS" }) + end + + --End Test case + ----------------------------------------------------------------------------------------- + + +function Test:PerformInteraction() + --mobile side: sending PerformInteraction request + local cid = self.mobileSession:SendRPC("PerformInteraction",{ + initialText ="StartPerformInteraction", + + initialPrompt = + { + { + text ="Makeyourchoice", + type ="TEXT", + }, + }, + + interactionMode ="BOTH", + + interactionChoiceSetIDList = + { + 1001, + }, + + helpPrompt = + { + { + text ="ChoosethevariantonUI", + type ="TEXT", + }, + }, + + timeoutPrompt = + { + { + text ="Timeisout", + type ="TEXT", + }, + }, + + timeout = 5000, + + vrHelp = + { + { + text = "Help2", + position = 1, + image = + { + value ="action.png", + imageType ="DYNAMIC", + } + }, + }, + interactionLayout = "ICON_ONLY" + } + ) + + -- --hmi side: expect VR.PerformInteraction request + EXPECT_HMICALL("VR.PerformInteraction", {}) + + :Do(function(_,data) + self.hmiConnection:SendResponse(data.id, data.method, "SUCCESS", {}) + end) + + + --hmi side: expect UI.PerformInteraction request + EXPECT_HMICALL("UI.PerformInteraction", {}) + + :Do(function(_,data) + self.hmiConnection:SendResponse(data.id, data.method, "SUCCESS", {}) + end) + +-- --mobile side: expect PerformInteraction response + EXPECT_RESPONSE(cid, { success = true, resultCode = "SUCCESS" }) +end + + --End Test case +------------------------------------------------------------------- + + + function Test:DeleteInteractionChoiceSet() + --mobile side: sending DeleteInteractionChoiceSet request + local cid = self.mobileSession:SendRPC("DeleteInteractionChoiceSet", + { + interactionChoiceSetID = 1001 + }) + + --hmi side: expect VR.DeleteCommand request + EXPECT_HMICALL("VR.DeleteCommand", + {cmdID = 1001, type = "Choice"}) + :Do(function(_,data) + --hmi side: sending VR.DeleteCommand response + self.hmiConnection:SendResponse(data.id, data.method, "SUCCESS", {}) + end) + + --mobile side: expect DeleteInteractionChoiceSet response + EXPECT_RESPONSE(cid, { success = true, resultCode = "SUCCESS" }) + end + + --End Test case + ----------------------------------------------------------------------------------------- + + + function Test:Alert() + + --mobile side: Alert request + local CorIdAlert = self.mobileSession:SendRPC("Alert", + { + + alertText1 = "alertText1", + alertText2 = "alertText2", + alertText3 = "alertText3", + ttsChunks = + { + + { + text = "TTSChunk", + type = "TEXT", + } + }, + duration = 3000, + playTone = true, + progressIndicator = true, + softButtons = + { + + { + type = "BOTH", + text = "Close", + + image = + { + value = "action.png", + imageType = "DYNAMIC", + }, + isHighlighted = true, + softButtonID = 3, + systemAction = "DEFAULT_ACTION", + } + } + + }) + + local AlertId + --hmi side: UI.Alert request + EXPECT_HMICALL("UI.Alert", + { + alertStrings = + { + {fieldName = "alertText1", fieldText = "alertText1"}, + {fieldName = "alertText2", fieldText = "alertText2"}, + {fieldName = "alertText3", fieldText = "alertText3"} + }, + alertType = "BOTH", + duration = 0, + progressIndicator = true, + softButtons = + { + + { + type = "BOTH", + text = "Close", + --ToDo: Shall be uncommented when APPLINK-16052 "ATF: TC is failed in case receiving message with nested struct" is fixed + --image = + --{ + -- value = storagePath .. "action.png", + -- imageType = "DYNAMIC" + --}, + isHighlighted = true, + softButtonID = 3, + systemAction = "DEFAULT_ACTION" + } + } + }) + :Do(function(_,data) + SendOnSystemContext(self,"ALERT") + AlertId = data.id + + local function alertResponse() + self.hmiConnection:SendResponse(AlertId, "UI.Alert", "SUCCESS", { }) + + SendOnSystemContext(self,"MAIN") + end + + RUN_AFTER(alertResponse, 3000) + end) + + local SpeakId + --hmi side: TTS.Speak request + EXPECT_HMICALL("TTS.Speak", + { + ttsChunks = + { + + { + text = "TTSChunk", + type = "TEXT" + } + }, + speakType = "ALERT" + }) + :Do(function(_,data) + self.hmiConnection:SendNotification("TTS.Started") + SpeakId = data.id + + local function speakResponse() + self.hmiConnection:SendResponse(SpeakId, "TTS.Speak", "SUCCESS", { }) + + self.hmiConnection:SendNotification("TTS.Stopped") + end + + RUN_AFTER(speakResponse, 2000) + + end) + :ValidIf(function(_,data) + if #data.params.ttsChunks == 1 then + return true + else + print("ttsChunks array in TTS.Speak request has wrong element number. Expected 1, actual "..tostring(#data.params.ttsChunks)) + return false + end + end) + + + --UPDATED: According to APPLINK-17388 BC.PlayTone is removed from HMI_API.xml + --hmi side: BC.PlayTone request + --EXPECT_HMINOTIFICATION("BasicCommunication.PlayTone",{ methodName = "ALERT"}) + + + --mobile side: Alert response + EXPECT_RESPONSE(CorIdAlert, { success = true, resultCode = "SUCCESS" }) + end + + --End Test case + ------------------------------------------------------------------------------------------ + + + function Test:Show() + + --mobile side: sending Show request + local cid = self.mobileSession:SendRPC("Show", + { + mediaClock = "12:34", + mainField1 = "Show Line 1", + mainField2 = "Show Line 2", + mainField3 = "Show Line 3", + mainField4 = "Show Line 4", + graphic = + { + value = "action.png", + imageType = "DYNAMIC" + }, + softButtons = + { + { + text = "Close", + systemAction = "KEEP_CONTEXT", + type = "BOTH", + isHighlighted = true, + image = + { + imageType = "DYNAMIC", + value = "action.png" + }, + softButtonID = 1 + } + }, + secondaryGraphic = + { + value = "action.png", + imageType = "DYNAMIC" + }, + statusBar = "status bar", + mediaTrack = "Media Track", + alignment = "CENTERED", + customPresets = + { + "Preset1", + "Preset2", + "Preset3" + } + }) + --hmi side: expect UI.Show request + EXPECT_HMICALL("UI.Show", + { + alignment = "CENTERED", + customPresets = + { + "Preset1", + "Preset2", + "Preset3" + }, + -- Checks are done below + -- graphic = + -- { + -- imageType = "DYNAMIC", + -- value = storagePath .. "action.png" + -- }, + -- secondaryGraphic = + -- { + -- imageType = "DYNAMIC", + -- value = storagePath .. "action.png" + -- }, + showStrings = + { + { + fieldName = "mainField1", + fieldText = "Show Line 1" + }, + { + fieldName = "mainField2", + fieldText = "Show Line 2" + }, + { + fieldName = "mainField3", + fieldText = "Show Line 3" + }, + { + fieldName = "mainField4", + fieldText = "Show Line 4" + }, + { + fieldName = "mediaClock", + fieldText = "12:34" + }, + { + fieldName = "mediaTrack", + fieldText = "Media Track" + }, + { + fieldName = "statusBar", + fieldText = "status bar" + } + }, + softButtons = + { + { + text = "Close", + systemAction = "KEEP_CONTEXT", + type = "BOTH", + isHighlighted = true, + --ToDo: Shall be uncommented when APPLINK-16052 "ATF: TC is failed in case receiving message with nested struct" is fixed + --image = + --{ + -- imageType = "DYNAMIC", + -- value = storagePath .. "action.png" + --}, + softButtonID = 1 + } + } + }) + :ValidIf(function(_,data) + local path = "bin/storage/"..config.application1.registerAppInterfaceParams.appID.. "_" .. config.deviceMAC.. "/" + local value_menuIcon = path .. "action.png" + -- params graphic + if(data.params.graphic.imageType == "DYNAMIC") then + return true + else + print("\27[31m imageType of menuIcon is WRONG. Expected: DYNAMIC; Real: " .. data.params.menuIcon.imageType .. "\27[0m") + return false + end + + if(string.find(data.params.graphic.value, value_menuIcon) ) then + return true + else + print("\27[31m value of menuIcon is WRONG. Expected: ~".. value_menuIcon .. "; Real: " .. data.params.menuIcon.value .. "\27[0m") + return false + end + -- params secondaryGraphic + if(data.params.secondaryGraphic.imageType == "DYNAMIC") then + return true + else + print("\27[31m imageType of menuIcon is WRONG. Expected: DYNAMIC; Real: " .. data.params.menuIcon.imageType .. "\27[0m") + return false + end + + if(string.find(data.params.secondaryGraphic.value, value_menuIcon) ) then + return true + else + print("\27[31m value of menuIcon is WRONG. Expected: ~".. value_menuIcon .. "; Real: " .. data.params.menuIcon.value .. "\27[0m") + return false + end + end) + :Do(function(_,data) + --hmi side: sending UI.Show response + self.hmiConnection:SendResponse(data.id, data.method, "SUCCESS", {}) + end) + + --mobile side: expect Show response + EXPECT_RESPONSE(cid, { success = true, resultCode = "SUCCESS" }) + end + + --End Test case + ------------------------------------------------------------------------------------- + + function Test:Speak() + --mobile side: sending Speak request + local cid = self.mobileSession:SendRPC("Speak", + { + ttsChunks = + { + + { + text ="SpeakFirst", + type ="TEXT" + }, + + { + text ="SpeakSecond", + type ="TEXT" + } + } + } + ) + + --hmi side: expect TTS.Speak request + EXPECT_HMICALL("TTS.Speak", + { + ttsChunks = + { + + { + text ="SpeakFirst", + type ="TEXT" + }, + + { + text ="SpeakSecond", + type ="TEXT" + } + } + }) + :Do(function(_,data) + self.hmiConnection:SendNotification("TTS.Started") + SpeakId = data.id + + local function speakResponse() + self.hmiConnection:SendResponse(SpeakId, "TTS.Speak", "SUCCESS", { }) + + self.hmiConnection:SendNotification("TTS.Stopped") + end + RUN_AFTER(speakResponse, 2000) + end) + + + --mobile side: expect Speak response + EXPECT_RESPONSE(cid, { success = true, resultCode = "SUCCESS" }) + end + + --End Test case + ----------------------------------------------------------------------------------------- + + + function Test:SetMediaClockTimer() + + --mobile side: sending SetMediaClockTimer request + local cid = self.mobileSession:SendRPC("SetMediaClockTimer", + { + startTime = + { + hours = 0, + minutes = 1, + seconds = 33 + }, + endTime = + { + hours = 0, + minutes = 1 , + seconds = 35 + }, + updateMode = "COUNTUP" + }) + + --hmi side: expect UI.SetMediaClockTimer request + EXPECT_HMICALL("UI.SetMediaClockTimer", + { + startTime = + { + hours = 0, + minutes = 1, + seconds = 33 + }, + endTime = + { + hours = 0, + minutes = 1, + seconds = 35 + }, + updateMode = "COUNTUP" + }) + + :Timeout(iTimeout) + :Do(function(_,data) + --hmi side: sending UI.SetMediaClockTimer response + self.hmiConnection:SendResponse(data.id, data.method, "SUCCESS", {}) + end) + + --mobile side: expect SetMediaClockTimer response + EXPECT_RESPONSE(cid, { success = true, resultCode = "SUCCESS"}) + end + + --End Test case + ----------------------------------------------------------------------------------------- + + + function Test:PerformAudioPassThru() + local time_cid = 0 + local time_response = 0 + + --mobile side: PerformAudioPassThru request + local cid = self.mobileSession:SendRPC("PerformAudioPassThru", + { + initialPrompt = + { + { + text ="Makeyourchoice", + type ="TEXT", + }, + }, + audioPassThruDisplayText1 ="DisplayText1", + audioPassThruDisplayText2 ="DisplayText2", + samplingRate ="8KHZ", + maxDuration = 1000, + bitsPerSample ="8_BIT", + audioType ="PCM", + muteAudio = true, + }) + + time_cid = timestamp() + + --hmi side: expect PerformAudioPassThru request + EXPECT_HMICALL("UI.PerformAudioPassThru", + { + audioPassThruDisplayTexts = { + { + fieldName = "audioPassThruDisplayText1", + fieldText = "DisplayText1" + }, + { + fieldName = "audioPassThruDisplayText2", + fieldText = "DisplayText2" + } + }, + maxDuration = 1000, + muteAudio = true + }) + :Do(function(_,data) + --hmi side: sending PerformAudioPassThru response + self.hmiConnection:SendResponse(data.id, data.method, "SUCCESS", {}) + end) + + --mobile side: expect PerformAudioPassThru response + --UPDATED: according to APPLINK-17008 and APPLINK-17728 + EXPECT_RESPONSE(cid, { success = false, resultCode = "GENERIC_ERROR"}) + :Do(function(_,data) + time_response = timestamp() + if( ( (time_response - time_cid) > RPC_ResponseTimeout) or ((time_response - time_cid) <= 0) ) then + print ("\27[33m WARNING: Response of RPC is not in specified time("..RPC_ResponseTimeout.."msec). Real: ".. (time_response - time_cid).." \27[0m") + else + print ("\27[33m INFO: Response of RPC is in specified time("..RPC_ResponseTimeout.."msec). Real: ".. (time_response - time_cid).." \27[0m") + end + end) + :Timeout(11000) + + + +end + + --End Test case + ----------------------------------------------------------------------------------------- + + + function Test:EndAudioPassThru() + + --mobile side: EndAudioPassThru request + local cid = self.mobileSession:SendRPC("EndAudioPassThru", {}) + + --hmi side: expect UI.EndAudioPassThru request + -- EXPECT_HMICALL("UI.EndAudioPassThru") + -- :Do(function(_,data) + -- --hmi side: sending UI.EndAudioPassThru response + -- self.hmiConnection:SendError(data.id, data.method, "REJECTED") + -- end) + + -- --mobile side: expect EndAudioPassThru response + -- EXPECT_RESPONSE(cid, { success = false, resultCode = "REJECTED"}) + -- end + -- UPDATED: Because of previous step return Result code is INVALID_DATA + --hmi side: expect UI.EndAudioPassThru request + EXPECT_HMICALL("UI.EndAudioPassThru") + :Do(function(_,data) + --hmi side: sending UI.EndAudioPassThru response + self.hmiConnection:SendError(data.id, data.method, "INVALID_DATA") + end) + + --mobile side: expect EndAudioPassThru response + EXPECT_RESPONSE(cid, { success = false, resultCode = "INVALID_DATA"}) + end + + --End Test case + ----------------------------------------------------------------------------------------- + + + function Test:SubscribeButton() + --mobile side: sending SubscribeButton request + local cid = self.mobileSession:SendRPC("SubscribeButton", + { + buttonName = "TUNEDOWN" + + }) + + --mobile side: expect SubscribeButton response + EXPECT_RESPONSE(cid, {success = true, resultCode = "SUCCESS"}) + end + + --End Test case + ----------------------------------------------------------------------------------------- + + + function Test:UnsubscribeButton() + --mobile side: sending UnsubscribeButton request + local cid = self.mobileSession:SendRPC("UnsubscribeButton", + { + buttonName = "TUNEDOWN" + + }) + + --mobile side: expect UnsubscribeButton response + EXPECT_RESPONSE(cid, {success = true, resultCode = "SUCCESS"}) + end + + --End Test case + ----------------------------------------------------------------------------------------- + + + function Test:SubscribeVehicleData() + --mobile side: sending SubscribeVehicleData request + local cid = self.mobileSession:SendRPC("SubscribeVehicleData", + { + gps = true + }) + --hmi side: expect VehicleInfo.SubscribeVehicleData request + EXPECT_HMICALL("VehicleInfo.SubscribeVehicleData", + { + gps = true + } + ) + :Do(function(_,data) + --hmi side: sending VehicleInfo.SubscribeVehicleData response + self.hmiConnection:SendResponse(data.id, data.method, "SUCCESS", {}) + end) + + --mobile side: expect SubscribeVehicleData response + EXPECT_RESPONSE(cid, { success = true, resultCode = "SUCCESS" }) + end + + --End Test case + ----------------------------------------------------------------------------------------- + + + function Test:UnsubscribeVehicleData() + --mobile side: sending UnsubscribeVehicleData request + local cid = self.mobileSession:SendRPC("UnsubscribeVehicleData", + { + gps = true + }) + --hmi side: expect VehicleInfo.UnsubscribeVehicleData request + EXPECT_HMICALL("VehicleInfo.UnsubscribeVehicleData", + { + gps = true + } + ) + :Do(function(_,data) + --hmi side: sending VehicleInfo.UnsubscribeVehicleData response + self.hmiConnection:SendResponse(data.id, data.method, "SUCCESS", {}) + end) + + --mobile side: expect SubscribeVehicleData response + EXPECT_RESPONSE(cid, { success = true, resultCode = "SUCCESS" }) + end + + --End Test case + ----------------------------------------------------------------------------------------- + + + function Test:GetVehicleData() + local time_hmicall = 0 + --mobile side: sending GetVehicleData request + local cid = self.mobileSession:SendRPC("GetVehicleData", + { + speed = true + }) + local time_cid = timestamp() + --hmi side: expect VehicleInfo.GetVehicleData request + EXPECT_HMICALL("VehicleInfo.GetVehicleData", + { + speed = true + } + ) + :Do(function(_,data) + --hmi side: sending VehicleInfo.GetVehicleData response + time_hmicall = timestamp() + if( ( (time_hmicall - time_cid) > RPC_ResponseTimeout) or ((time_hmicall - time_cid) <= 0) ) then + print ("\27[33m WARNING: Response of RPC is not in specified time("..RPC_ResponseTimeout.."msec). Real: ".. (time_hmicall - time_cid).." \27[0m") + else + print ("\27[33m INFO: Response of RPC is in specified time("..RPC_ResponseTimeout.."msec). Real: ".. (time_hmicall - time_cid).." \27[0m") + end + + self.hmiConnection:SendResponse(data.id, data.method, "SUCCESS", {actual = false, + speed = 34.24 + }) + --print("time_hmicall = "..time_hmicall) + end):Timeout(11000) +--:ValidIf(function(exp,data) + + -- end) + + --mobile side: expect GetVehicleData response + EXPECT_RESPONSE(cid, { success = true, resultCode = "SUCCESS" }) + + + + + + + end + + --End Test case + ----------------------------------------------------------------------------------------- + + function Test:ReadDID() + --mobile side: sending ReadDID request + local cid = self.mobileSession:SendRPC("ReadDID", + { + didLocation = { 56832 }, + ecuName = 2000 + }) + --hmi side: expect VehicleInfo.ReadDID request + EXPECT_HMICALL("VehicleInfo.ReadDID", + { + didLocation = { 56832 }, + ecuName = 2000 + } + ) + :Do(function(_,data) + --hmi side: sending VehicleInfo.ReadDID response + self.hmiConnection:SendResponse(data.id, data.method, "SUCCESS", { + didResult = {{ + resultCode = "SUCCESS", + didLocation = 22, + data = "dsasdas" + } + }}) + end) + + --mobile side: expect ReadDID response + EXPECT_RESPONSE(cid, { success = true, resultCode = "SUCCESS" }) + end + + --End Test case + ----------------------------------------------------------------------------------------- + + + function Test:GetDTCs() + --mobile side: sending GetDTCs request + local cid = self.mobileSession:SendRPC("GetDTCs", + { + dtcMask = 100 , + ecuName = 2000 + }) + --hmi side: expect VehicleInfo.GetDTCs request + EXPECT_HMICALL("VehicleInfo.GetDTCs", + { + dtcMask = 100, + ecuName = 2000 + } + ) + :Do(function(_,data) + --hmi side: sending VehicleInfo.GetDTCs response + self.hmiConnection:SendResponse(data.id, data.method, "SUCCESS", {dtc = { "line 0", "line 1", "line 2" }, ecuHeader = 2}) + end) + + --mobile side: expect GetDTCs response + EXPECT_RESPONSE(cid, { success = true, resultCode = "SUCCESS" }) + end + + --End Test case + ----------------------------------------------------------------------------------------- + + + function Test:ScrollableMessage() + --mobile side: sending ScrollableMessage request + local cid = self.mobileSession:SendRPC("ScrollableMessage", + { + scrollableMessageBody = "dkdkdksldsdljlsjdglkjlskjdfspdfosjpdfdsjkllkj", + timeout = 1000 + }) + --hmi side: expect UI.ScrollableMessage request + EXPECT_HMICALL("UI.ScrollableMessage", + { + messageText = { + fieldName = "scrollableMessageBody", + fieldText = "dkdkdksldsdljlsjdglkjlskjdfspdfosjpdfdsjkllkj" + }, + timeout = 1000 + } + ) + :Do(function(_,data) + --hmi side: sending UI.ScrollableMessage response + self.hmiConnection:SendResponse(data.id, data.method, "SUCCESS", {}) + end) + + --mobile side: expect ScrollableMessage response + EXPECT_RESPONSE(cid, { success = true, resultCode = "SUCCESS" }) + end + + --End Test case + ----------------------------------------------------------------------------------------- + + + function Test:Slider() + local cid = self.mobileSession:SendRPC ("Slider", + { + numTicks = 7, + position = 6, + sliderHeader ="sliderHeader" + } + ) + + --hmi side: Slider request + EXPECT_HMICALL("UI.Slider", + { + numTicks = 7, + position = 6, + sliderHeader ="sliderHeader" + } + ) + :Do(function(_,data) + --hmi side: sending UI.Slider response + self.hmiConnection:SendResponse(data.id, data.method, "SUCCESS", {}) + end) + --mobile side: expect Slider response + EXPECT_RESPONSE(cid, { success = true, resultCode = "SUCCESS" }) + end + + --End Test case + --------------------------------------------------------------------------------- + + + function Test:ShowConstantTBT() + local cid = self.mobileSession:SendRPC ("ShowConstantTBT", { + navigationText1 ="navigationText1", + navigationText2 ="navigationText2", + eta ="12:34", + totalDistance ="100miles", + turnIcon = + { + value ="action.png", + imageType ="DYNAMIC" + }, + nextTurnIcon = + { + value ="action.png", + imageType ="DYNAMIC", + }, + distanceToManeuver = 50.50, + distanceToManeuverScale = 100.6, + maneuverComplete = false, + softButtons = + { + { + type ="BOTH", + text ="Close", + image = + { + value ="action.png", + imageType ="DYNAMIC", + }, + isHighlighted = true, + softButtonID = 44, + systemAction ="DEFAULT_ACTION", + }, + } + } + ) + + + + --hmi side: Navigation.ShowConstantTBT request + EXPECT_HMICALL("Navigation.ShowConstantTBT", + { + navigationTexts = { + { + fieldName = "navigationText1", + fieldText = "navigationText1" + }, + { + fieldName = "navigationText2", + fieldText = "navigationText2" + }, + { + fieldName = "ETA", + fieldText = "12:34" + }, + { + fieldName = "totalDistance", + fieldText = "100miles" + } + }, + --Checked below + -- turnIcon = + -- { + -- --UPDATED + -- --value ="/home/sdl/Project/FORD/github/develop/bin/storage/8675308_12ca17b49af2289436f303e0166030a21e525d266e209267433801a8fd4071a0/action.png", + -- value = storagePath .."action.png", + -- imageType ="DYNAMIC" + -- }, + -- nextTurnIcon = + -- { + -- --UPDATED + -- --value ="/home/sdl/Project/FORD/github/develop/bin/storage/8675308_12ca17b49af2289436f303e0166030a21e525d266e209267433801a8fd4071a0/action.png", + -- value = storagePath .."action.png", + -- imageType ="DYNAMIC" + -- }, + distanceToManeuver = 50.50, + distanceToManeuverScale = 100.6, + maneuverComplete = false, + softButtons = + { + { + type ="BOTH", + text ="Close", + --ToDo: Shall be uncommented when APPLINK-16052 "ATF: TC is failed in case receiving message with nested struct" is fixed + -- image = + -- { + -- value ="/home/sdl/Project/FORD/github/develop/bin/storage/8675308_12ca17b49af2289436f303e0166030a21e525d266e209267433801a8fd4071a0/action.png", + -- imageType ="DYNAMIC", + -- }, + isHighlighted = true, + softButtonID = 44, + systemAction ="DEFAULT_ACTION", + }, + } + } + ) + :ValidIf(function(_,data) + local path = "bin/storage/"..config.application1.registerAppInterfaceParams.appID.. "_" .. config.deviceMAC.. "/" + local value_menuIcon = path .. "action.png" + -- params turnIcon + if(data.params.turnIcon.imageType == "DYNAMIC") then + return true + else + print("\27[31m imageType of menuIcon is WRONG. Expected: DYNAMIC; Real: " .. data.params.menuIcon.imageType .. "\27[0m") + return false + end + + if(string.find(data.params.turnIcon.value, value_menuIcon) ) then + return true + else + print("\27[31m value of menuIcon is WRONG. Expected: ~".. value_menuIcon .. "; Real: " .. data.params.menuIcon.value .. "\27[0m") + return false + end + -- params nextTurnIcon + if(data.params.nextTurnIcon.imageType == "DYNAMIC") then + return true + else + print("\27[31m imageType of menuIcon is WRONG. Expected: DYNAMIC; Real: " .. data.params.menuIcon.imageType .. "\27[0m") + return false + end + + if(string.find(data.params.nextTurnIcon.value, value_menuIcon) ) then + return true + else + print("\27[31m value of menuIcon is WRONG. Expected: ~".. value_menuIcon .. "; Real: " .. data.params.menuIcon.value .. "\27[0m") + return false + end + end) + :Do(function(_,data) + --hmi side: sending Navigation.ShowConstantTBT response + self.hmiConnection:SendResponse(data.id, data.method, "SUCCESS", {}) + end) + --mobile side: expect ShowConstantTBT response + EXPECT_RESPONSE(cid, { success = true, resultCode = "SUCCESS" }) + end + + --End Test case + --------------------------------------------------------------------------------- + + + function Test:AlertManeuver() + local cid = self.mobileSession:SendRPC ("AlertManeuver", { + ttsChunks = + { + + { + text ="FirstAlert", + type ="TEXT", + }, + + { + text ="SecondAlert", + type ="TEXT", + }, + }, + } + ) + + --hmi side: Navigation.AlertManeuver request + EXPECT_HMICALL("Navigation.AlertManeuver", + {} + ) + :Do(function(_,data) + --hmi side: sending UI.Slider response + self.hmiConnection:SendResponse(data.id, data.method, "SUCCESS", {}) + end) + + --hmi side: TTS.Speak request + EXPECT_HMICALL("TTS.Speak", + { + speakType = "ALERT_MANEUVER", + ttsChunks = + { + + { + text ="FirstAlert", + type ="TEXT" + }, + + { + text ="SecondAlert", + type ="TEXT" + } + } + }) + :Do(function(_,data) + self.hmiConnection:SendNotification("TTS.Started") + SpeakId = data.id + + local function speakResponse() + self.hmiConnection:SendResponse(SpeakId, "TTS.Speak", "SUCCESS", { }) + + self.hmiConnection:SendNotification("TTS.Stopped") + end + RUN_AFTER(speakResponse, 2000) + end) + + :Do(function(_,data) + --hmi side: sending Navigation.AlertManeuver response + self.hmiConnection:SendResponse(data.id, data.method, "SUCCESS", {}) + end) + --mobile side: expect AlertManeuver response + EXPECT_RESPONSE(cid, { success = true, resultCode = "SUCCESS" }) + end + + --End Test case + --------------------------------------------------------------------------------- + + + function Test:UpdateTurnList() + local cid = self.mobileSession:SendRPC ("UpdateTurnList", + { + turnList = + { + { + navigationText ="Text", + turnIcon = + { + value ="action.png", + imageType ="DYNAMIC", + }, + }, + }, + softButtons = + { + { + type ="BOTH", + text ="Close", + image = + { + value ="action.png", + imageType ="DYNAMIC", + }, + isHighlighted = true, + softButtonID = 111, + systemAction ="DEFAULT_ACTION", + }, + }, + } + ) + + --hmi side: Navigation.UpdateTurnList request + EXPECT_HMICALL("Navigation.UpdateTurnList", + { + --ToDo: Shall be uncommented when APPLINK-16052 "ATF: TC is failed in case receiving message with nested struct" is fixed + -- turnList = + -- { + -- { + -- navigationText = + -- { + -- fieldName = "turnText", + -- fieldText ="Text" + -- }, + -- turnIcon = + -- { + -- value =config.SDLStoragePath .."action.png", + -- imageType ="DYNAMIC", + -- }, + -- }, + -- }, + softButtons = + { + { + type ="BOTH", + text ="Close", + --ToDo: Shall be uncommented when APPLINK-16052 "ATF: TC is failed in case receiving message with nested struct" is fixed + --image = + --{ + --value ="/home/sdl/Project/FORD/github/develop/bin/storage/8675308_12ca17b49af2289436f303e0166030a21e525d266e209267433801a8fd4071a0/action.png", + --imageType ="DYNAMIC", + --}, + isHighlighted = true, + softButtonID = 111, + systemAction ="DEFAULT_ACTION", + }, + }, + } + ) + :Do(function(_,data) + --hmi side: sending Navigation.UpdateTurnList response + self.hmiConnection:SendResponse(data.id, data.method, "SUCCESS", {}) + end) + --mobile side: expect UpdateTurnList response + EXPECT_RESPONSE(cid, { success = true, resultCode = "SUCCESS" }) + end + + --End Test case + --------------------------------------------------------------------------------- + + + function Test:ChangeRegistration() + local cid = self.mobileSession:SendRPC ("ChangeRegistration", + { + language ="EN-US", + hmiDisplayLanguage ="EN-US", + appName ="SyncProxyTester", + ttsName = + { + + { + text ="SyncProxyTester", + type ="TEXT", + }, + }, + ngnMediaScreenAppName ="SPT", + vrSynonyms = + { + "VRSyncProxyTester", + }, + } + ) + + --hmi side: UI.ChangeRegistration request + EXPECT_HMICALL("UI.ChangeRegistration", + { + appName ="SyncProxyTester", + language ="EN-US", + ngnMediaScreenAppName ="SPT" + } + ) + :Do(function(_,data) + --hmi side: sending UI.ChangeRegistration response + self.hmiConnection:SendResponse(data.id, data.method, "SUCCESS", {}) + end) + + --hmi side: VR.ChangeRegistration request + EXPECT_HMICALL("VR.ChangeRegistration", + { + language ="EN-US", + vrSynonyms = + { + "VRSyncProxyTester", + } + } + ) + :Do(function(_,data) + --hmi side: sending VR.ChangeRegistration response + self.hmiConnection:SendResponse(data.id, data.method, "SUCCESS", {}) + end) + + --hmi side: VR.ChangeRegistration request + EXPECT_HMICALL("TTS.ChangeRegistration", + { + language ="EN-US", + ttsName = + { + + { + text ="SyncProxyTester", + type ="TEXT", + }, + } + } + ) + :Do(function(_,data) + --hmi side: sending VR.ChangeRegistration response + self.hmiConnection:SendResponse(data.id, data.method, "SUCCESS", {}) + end) + + --mobile side: expect ChangeRegistration response + EXPECT_RESPONSE(cid, { success = true, resultCode = "SUCCESS" }) + end + + --End Test case + --------------------------------------------------------------------------------- + + + function Test:PutFile() + local cid = self.mobileSession:SendRPC("PutFile", + { + syncFileName = "action.png", + fileType = "GRAPHIC_PNG", + persistentFile = false, + systemFile = false + }, "files/action.png") + EXPECT_RESPONSE(cid, { success = true}) + end + + --End Test case + --------------------------------------------------------------------------------- + + + function Test:ListFiles() + local cid = self.mobileSession:SendRPC("ListFiles", {}) + + EXPECT_RESPONSE(cid, { success = true, resultCode = "SUCCESS", filenames = {"action.png"} }) + end + + --End Test case + --------------------------------------------------------------------------------- + + + function Test:SetAppIcon() + + --mobile side: sending SetAppIcon request + local cid = self.mobileSession:SendRPC("SetAppIcon",{ syncFileName = "action.png" }) + + --hmi side: expect UI.SetAppIcon request + EXPECT_HMICALL("UI.SetAppIcon", + { + -- syncFileName = + -- { + -- imageType = "DYNAMIC", + -- value = storagePath .. "action.png" + -- } + }) + :ValidIf(function(_,data) + local path = "bin/storage/"..config.application1.registerAppInterfaceParams.appID.. "_" .. config.deviceMAC.. "/" + local value_menuIcon = path .. "action.png" + + if(data.params.syncFileName.imageType == "DYNAMIC") then + return true + else + print("\27[31m imageType of menuIcon is WRONG. Expected: DYNAMIC; Real: " .. data.params.menuIcon.imageType .. "\27[0m") + return false + end + + if(string.find(data.params.syncFileName.value, value_menuIcon) ) then + return true + else + print("\27[31m value of menuIcon is WRONG. Expected: ~".. value_menuIcon .. "; Real: " .. data.params.menuIcon.value .. "\27[0m") + return false + end + end) + + :Timeout(iTimeout) + :Do(function(_,data) + --hmi side: sending UI.SetAppIcon response + self.hmiConnection:SendResponse(data.id, data.method, "SUCCESS", {}) + end) + + --mobile side: expect SetAppIcon response + EXPECT_RESPONSE(cid, { resultCode = "SUCCESS", success = true }) + end + + --End Test case + --------------------------------------------------------------------------------- + + + function Test:DeleteFile() + local cid = self.mobileSession:SendRPC("DeleteFile", + { + syncFileName = "action.png" + } + ) + EXPECT_RESPONSE(cid, { success = true}) + end + + --End Test case + --------------------------------------------------------------------------------- + + + function Test:SetDisplayLayout() + + --mobile side: sending SetDisplayLayout request + local cid = self.mobileSession:SendRPC("SetDisplayLayout", + { + displayLayout = "ONSCREEN_PRESETS" + }) + + + --hmi side: expect UI.SetDisplayLayout request + EXPECT_HMICALL("UI.SetDisplayLayout", + { + displayLayout = "ONSCREEN_PRESETS" + }) + :Timeout(iTimeout) + :Do(function(_,data) + --hmi side: sending UI.SetDisplayLayout response + --local responsedParams = createDefaultResponseParamsValues() + self.hmiConnection:SendResponse(data.id, data.method, "SUCCESS", {}) + end) + + --mobile side: expect SetDisplayLayout response + --local expectedParams = createExpectedResultParamsValuesOnMobile(true, "SUCCESS") + + EXPECT_RESPONSE(cid, { resultCode = "SUCCESS", success = true }) + end + + --End Test case + --------------------------------------------------------------------------------- + + + function Test:DiagnosticMessage() + local time_cid = 0 + local time_response = 0 + local cid = self.mobileSession:SendRPC ("DiagnosticMessage", + { + targetID = 7, + messageLength = 1, + messageData = + { + 1 + } + } + ) + + time_cid = timestamp() + --hmi side: VehicleInfo.DiagnosticMessage request + EXPECT_HMICALL("VehicleInfo.DiagnosticMessage", + { + targetID = 7, + messageLength = 1, + messageData = + { + 1 + } + } + ) + :Do(function(_,data) + --hmi side: sending VehicleInfo.DiagnosticMessage response + self.hmiConnection:SendResponse(data.id, data.method, "SUCCESS", {messageDataResult = {12}}) + end) + --mobile side: expect DiagnosticMessage response + EXPECT_RESPONSE(cid, { success = true, resultCode = "SUCCESS" }) + : Do(function(_,data) + time_response = timestamp() + if( ( (time_response - time_cid) > RPC_ResponseTimeout) or ((time_response - time_cid) <= 0) ) then + print ("\27[33m WARNING: Response of RPC is not in specified time("..RPC_ResponseTimeout.."msec). Real: ".. (time_response - time_cid).." \27[0m") + else + print ("\27[33m INFO: Response of RPC is in specified time("..RPC_ResponseTimeout.."msec). Real: ".. (time_response - time_cid).." \27[0m") + end + end) + :Timeout(11000) + end + + --End Test case + --------------------------------------------------------------------------------- + + + function Test:SystemRequest() + local cid = self.mobileSession:SendRPC ("SystemRequest", + { + requestType = "HTTP", + fileName = "sdl_preloaded_pt.json" + }, "files/sdl_preloaded_pt.json" + ) + + --mobile side: expect DiagnosticMessage response + EXPECT_RESPONSE(cid, { success = false, resultCode = "DISALLOWED" }) + end + + --End Test case + --------------------------------------------------------------------------------- + + + function Test:SendLocation() + local cid = self.mobileSession:SendRPC ("SendLocation", + { + longitudeDegrees = 1.1, + latitudeDegrees = 1.1 + } + ) + + --hmi side: Navigation.SendLocation request + EXPECT_HMICALL("Navigation.SendLocation", + { + longitudeDegrees = 1.1, + latitudeDegrees = 1.1 + } + ) + + :Do(function(_,data) + --hmi side: sending Navigation.SendLocation response + self.hmiConnection:SendResponse(data.id, data.method, "SUCCESS", {}) + end) + --mobile side: expect SendLocation response + EXPECT_RESPONSE(cid, { success = true, resultCode = "SUCCESS" }) + end + + --End Test case + --------------------------------------------------------------------------------- + +--TODO: Uncomment after APPLINK-25154(cloned from APPLINK-17601) will be fixed + + + -- function Test:GenericResponse() + -- --mobile side: sending GenericResponse request + + + -- local msg = + -- { + -- serviceType = 7, + -- frameInfo = 0, + -- rpcType = 0, + -- rpcFunctionId = 31, + -- rpcCorrelationId = 3, + -- payload = '{}' + -- } + + -- self.mobileSession:Send(msg) + + + -- --mobile side: expect GenericResponse response + -- EXPECT_RESPONSE(3, { success = false, resultCode = "INVALID_DATA" }) + -- end + + --End Test case + --------------------------------------------------------------------------------------- + + + -- Note!: The DialNumber is not supported by ATF 2.1.3-r1 version. For WA add string: '["DialNumber"] =40,' below string '["SendLocation"] = 39,' in /modules/function_id.lua file + function Test:DialNumber() + --request from mobile side + local CorIdDialNumber = self.mobileSession:SendRPC("DialNumber", + { + DialNumber = 40, + SendLocation = 39, + number = "#3804567654*" + }) + + --hmi side: request, response + EXPECT_HMICALL("BasicCommunication.DialNumber", + + { + number = "#3804567654*", + appID = self.applications["Test Application"] + }) + :Do(function(_,data) + self.hmiConnection:SendResponse(data.id,"BasicCommunication.DialNumber", "SUCCESS", {}) + end) + + --response on mobile side + EXPECT_RESPONSE(CorIdDialNumber, { success = true, resultCode = "SUCCESS"}) + :Timeout(2000) + end + + --End Test case + ----------------------------------------------------------------------------------------- + + + function Test:UnregisterAppInterface() + + --mobile side: UnregisterAppInterface request + local CorIdURAI = self.mobileSession:SendRPC("UnregisterAppInterface", {}) + + --hmi side: expected BasicCommunication.OnAppUnregistered + EXPECT_HMINOTIFICATION("BasicCommunication.OnAppUnregistered", {appID = self.appID, unexpectedDisconnect = false}) + + --mobile side: UnregisterAppInterface response + EXPECT_RESPONSE("UnregisterAppInterface", {success = true , resultCode = "SUCCESS"}) + end + + --End Test case + ----------------------------------------------------------------------------------------- + + + function Test:RegisterAppInterface() + + --mobile side: RegisterAppInterface request + local CorIdRAI = self.mobileSession:SendRPC("RegisterAppInterface", + { + + syncMsgVersion = + { + majorVersion = 2, + minorVersion = 2, + }, + appName ="SyncProxyTester", + ttsName = + { + + { + text ="SyncProxyTester", + type ="TEXT", + }, + }, + ngnMediaScreenAppName ="SPT", + vrSynonyms = + { + "VRSyncProxyTester", + }, + isMediaApplication = true, + languageDesired ="EN-US", + hmiDisplayLanguageDesired ="EN-US", + appHMIType = + { + "NAVIGATION", + }, + appID ="8675308", + deviceInfo = + { + hardware = "hardware", + firmwareRev = "firmwareRev", + os = "os", + osVersion = "osVersion", + carrier = "carrier", + maxNumberRFCOMMPorts = 5 + } + + }) + + + --hmi side: expected BasicCommunication.OnAppRegistered + EXPECT_HMINOTIFICATION("BasicCommunication.OnAppRegistered", + { + application = + { + appName = "SyncProxyTester", + ngnMediaScreenAppName ="SPT", + --ToDo: Shall be uncommented when APPLINK-16052 "ATF: TC is failed in case receiving message with nested struct" is fixed + --UPDATED + -- deviceInfo = + -- { + -- transportType = "WIFI", + -- isSDLAllowed = true, + -- id = config.deviceMAC, + -- name = "127.0.0.1" + -- }, + -- deviceInfo = + -- { + -- hardware = "hardware", + -- firmwareRev = "firmwareRev", + -- os = "os", + -- osVersion = "osVersion", + -- carrier = "carrier", + -- maxNumberRFCOMMPorts = 5 + -- }, + policyAppID = "8675308", + hmiDisplayLanguageDesired ="EN-US", + isMediaApplication = true, + --UPDATED + --appHMIType = + appType = + { + "NAVIGATION" + }, + }, + ttsName = + { + + { + text ="SyncProxyTester", + type ="TEXT", + } + }, + vrSynonyms = + { + "VRSyncProxyTester", + } + }) + -- Set self.applications["SyncProxyTester"] variable + :Do(function(_,data) + self.applications["SyncProxyTester"] = data.params.application.appID + end) + + --ToDo: Shall be uncommented when APPLINK-24902: Genivi: Unexpected unregistering application at resumption after closing session. is fixed + --mobile side: RegisterAppInterface response + -- EXPECT_RESPONSE(CorIdRAI, { success = true, resultCode = "SUCCESS"}) + -- :Timeout(2000) + -- :Do(function(_,data) + -- local RequestId = self.hmiConnection:SendRequest("SDL.ActivateApp", { appID = self.applications["SyncProxyTester"]}) + -- EXPECT_HMIRESPONSE(RequestId) + -- end) + end + --End Test case + + + function Test:RegisterAppInterfaceAgain() + + --mobile side: RegisterAppInterface request + local CorIdRAI = self.mobileSession:SendRPC("RegisterAppInterface", + { + + syncMsgVersion = + { + majorVersion = 2, + minorVersion = 2, + }, + appName ="SyncProxyTester", + ttsName = + { + + { + text ="SyncProxyTester", + type ="TEXT", + }, + }, + ngnMediaScreenAppName ="SPT", + vrSynonyms = + { + "VRSyncProxyTester", + }, + isMediaApplication = true, + languageDesired ="EN-US", + hmiDisplayLanguageDesired ="EN-US", + appHMIType = + { + "NAVIGATION", + }, + appID ="8675308", + deviceInfo = + { + hardware = "hardware", + firmwareRev = "firmwareRev", + os = "os", + osVersion = "osVersion", + carrier = "carrier", + maxNumberRFCOMMPorts = 5 + } + + }) + + + --hmi side: expected BasicCommunication.OnAppRegistered + EXPECT_HMINOTIFICATION("BasicCommunication.OnAppRegistered", + { + application = + { + appName = "SyncProxyTester", + ngnMediaScreenAppName ="SPT", + --ToDo: Shall be uncommented when APPLINK-16052 "ATF: TC is failed in case receiving message with nested struct" is fixed + --UPDATED + -- deviceInfo = + -- { + -- transportType = "WIFI", + -- isSDLAllowed = true, + -- id = config.deviceMAC, + -- name = "127.0.0.1" + -- }, + -- deviceInfo = + -- { + -- hardware = "hardware", + -- firmwareRev = "firmwareRev", + -- os = "os", + -- osVersion = "osVersion", + -- carrier = "carrier", + -- maxNumberRFCOMMPorts = 5 + -- }, + policyAppID = "8675308", + hmiDisplayLanguageDesired ="EN-US", + isMediaApplication = true, + --UPDATED + --appHMIType = + appType = + { + "NAVIGATION" + }, + }, + ttsName = + { + + { + text ="SyncProxyTester", + type ="TEXT", + } + }, + vrSynonyms = + { + "VRSyncProxyTester", + } + }) + -- Set self.applications["SyncProxyTester"] variable + :Do(function(_,data) + self.applications["SyncProxyTester"] = data.params.application.appID + end) + + --mobile side: RegisterAppInterface response + EXPECT_RESPONSE(CorIdRAI, { success = true, resultCode = "SUCCESS"}) + :Timeout(2000) + :Do(function(_,data) + local RequestId = self.hmiConnection:SendRequest("SDL.ActivateApp", { appID = self.applications["SyncProxyTester"]}) + EXPECT_HMIRESPONSE(RequestId) + end) + end + + --End Test case + -- ----------------------------------------------------------------------------------------- + -- ---------------Description: Test part of checking notifications logging------------------ + + + --ToDo: Shall be removed when APPLINK-25060 is fixed and update file PolicyTable_All_RPCs.json with all required RPCs + RestartSDL_ActivateApp() + + function Test:Notification_OnHashChange() + print ("------------Notifications-------------") + --mobile side: sending AddCommand request + local cid = self.mobileSession:SendRPC("AddCommand", + { + cmdID = 0, + menuParams = + { + parentID = 0, + position = 0, + menuName ="Null" + }, + vrCommands = + { + "Null" + }, + + }) + + --hmi side: expect UI.AddCommand request + EXPECT_HMICALL("UI.AddCommand", + { + cmdID = 0, + + menuParams = + { + parentID = 0, + position = 0, + menuName ="Null" + } + }) + :Do(function(_,data) + --hmi side: sending UI.AddCommand response + self.hmiConnection:SendResponse(data.id, data.method, "SUCCESS", {}) + end) + + --hmi side: expect VR.AddCommand request + EXPECT_HMICALL("VR.AddCommand", + { + cmdID = 0, + type = "Command", + vrCommands = + { + "Null" + } + }) + :Do(function(_,data) + --hmi side: sending response + self.hmiConnection:SendResponse(data.id, data.method, "SUCCESS", {}) + end) + + EXPECT_RESPONSE(cid, { success = true, resultCode = "SUCCESS" }) + EXPECT_NOTIFICATION("OnHashChange") + end + + --End Test case + ----------------------------------------------------------------------------------------- + + --ToDo: Shall be removed when APPLINK-25060 is fixed and update file PolicyTable_All_RPCs.json with all required RPCs + function Test:Precondition_AddCommand() + --mobile side: sending AddCommand request + local cid = self.mobileSession:SendRPC("AddCommand", + { + cmdID = 1, + menuParams = + { + position = 0, + menuName ="Command" + }, + vrCommands = + { + "VRCommandonepositive" + } + }) + + --hmi side: expect UI.AddCommand request + EXPECT_HMICALL("UI.AddCommand", + { + cmdID = 1, + menuParams = + { + position = 0, + menuName ="Command" + } + }) + :Do(function(_,data) + --hmi side: sending UI.AddCommand response + self.hmiConnection:SendResponse(data.id, data.method, "SUCCESS", {}) + end) + + --hmi side: expect VR.AddCommand request + EXPECT_HMICALL("VR.AddCommand", + { + cmdID = 1, + type = "Command", + vrCommands = + { + "VRCommandonepositive" + } + }) + :Do(function(_,data) + --hmi side: sending VR.AddCommand response + self.hmiConnection:SendResponse(data.id, data.method, "SUCCESS", {}) + end) + + --mobile side: expect AddCommand response + EXPECT_RESPONSE(cid, { success = true, resultCode = "SUCCESS" }) + end + + --End Test case + ----------------------------------------------------------------------------------------- + + function Test:Notification_OnCommand() + --UPDATED: + self.hmiConnection:SendNotification("UI.OnCommand",{ cmdID = 1, appID = self.applications["SyncProxyTester"]}) + --hmi side: UI.OnCommand notification + -- self.hmiConnection:SendNotification("UI.OnCommand",{ cmdID = 0, appID = self.applications["SyncProxyTester"]}) + + + --mobile side: OnCommand notifications + EXPECT_NOTIFICATION("OnCommand") + end + + --End Test case + ----------------------------------------------------------------------------------------- + + + function Test:Notification_OnHMIStatus() + --mobile side: sending AddCommand request + + --hmi side: sending response + SendOnSystemContext(self,"VRSESSION") + + --mobile side: OnHMIStatus notifications + EXPECT_NOTIFICATION("OnHMIStatus", + + { systemContext = "VRSESSION", hmiLevel = "FULL" }) + end + + --End Test case + ----------------------------------------------------------------------------------------- + + + function Test:Notification_OnButtonEvent() + + --Precondition, mobile side: sending SubscribeButton request + local cid = self.mobileSession:SendRPC("SubscribeButton", + { + buttonName = "TUNEDOWN" + + }) + + --Precondition, mobile side: expect SubscribeButton response + EXPECT_RESPONSE(cid, {success = true, resultCode = "SUCCESS"}) + :Do(function(_,data) + + --hmi side: OnButtonEvent notification + self.hmiConnection:SendNotification("Buttons.OnButtonEvent",{name = "TUNEDOWN", mode = "BUTTONDOWN"}) + end) + + --mobile side: OnButtonEvent notifications + EXPECT_NOTIFICATION("OnButtonEvent") + end + + + --End Test case + ----------------------------------------------------------------------------------------- + + + function Test:Notification_OnButtonPress() + + --hmi side: Buttons.OnButtonPress notification + self.hmiConnection:SendNotification("Buttons.OnButtonPress",{ name = "TUNEDOWN", mode = "LONG"}) + + + --mobile side: OnButtonPress notifications + EXPECT_NOTIFICATION("OnButtonPress") + end + + --End Test case + ----------------------------------------------------------------------------------------- + + + function Test:Notification_OnVehicleData() + + --Precondition, mobile side: sending SubscribeVehicleData request + local cid = self.mobileSession:SendRPC("SubscribeVehicleData", + { + speed = true + }) + --Precondition, hmi side: expect VehicleInfo.SubscribeVehicleData request + EXPECT_HMICALL("VehicleInfo.SubscribeVehicleData", + { + speed = true + } + ) + :Do(function(_,data) + --Precondition, hmi side: sending VehicleInfo.SubscribeVehicleData response + self.hmiConnection:SendResponse(data.id, data.method, "SUCCESS", {}) + end) + + --Precondition, mobile side: expect SubscribeVehicleData response + EXPECT_RESPONSE(cid, { success = true, resultCode = "SUCCESS" }) + :Do(function(_,data) + + --hmi side: VehicleInfo.OnVehicleData notification + self.hmiConnection:SendNotification("VehicleInfo.OnVehicleData",{ speed = 22.33}) + end) + + --mobile side: OnVehicleData notification + EXPECT_NOTIFICATION("OnVehicleData"):Timeout(11000) + end + + --End Test case + ----------------------------------------------------------------------------------------- + + + function Test:Notification_OnTBTClientState() + + --hmi side: Navigation.OnTBTClientState notification + self.hmiConnection:SendNotification("Navigation.OnTBTClientState",{ state = "ROUTE_ACCEPTED"}) + + --mobile side: OnTBTClientState notifications + EXPECT_NOTIFICATION("OnTBTClientState") + end + + --End Test case + ----------------------------------------------------------------------------------------- + + + function Test:Notification_OnDriverDistraction() + + --hmi side: UI.OnTBTClientState notification + self.hmiConnection:SendNotification("UI.OnDriverDistraction",{ state = "DD_OFF"}) + + --mobile side: OnDriverDistraction notifications + EXPECT_NOTIFICATION("OnDriverDistraction") + end + + --End Test case + ----------------------------------------------------------------------------------------- + + + function Test:Notification_OnTouchEvent() + + --hmi side: UI.OnTBTClientState notification + self.hmiConnection:SendNotification("UI.OnTouchEvent",{ type = "BEGIN", event = {{id = 1, ts = {111,111}, c = {{x = 5, y = 5}}}}}) + + --mobile side: OnTouchEvent notifications + EXPECT_NOTIFICATION("OnTouchEvent") + end + + --End Test case + ----------------------------------------------------------------------------------------- + + + function Test:Notification_OnKeyboardInput() + + --hmi side: UI.OnKeyboardInput notification + self.hmiConnection:SendNotification("UI.OnKeyboardInput",{ data = "ffff", event = "KEYPRESS"}) + + --mobile side: OnKeyboardInput notifications + EXPECT_NOTIFICATION("OnKeyboardInput") + end + + --End Test case + ----------------------------------------------------------------------------------------- + + + function Test:Notification_OnAudioPassThru() + local time_response = 0 + --mobile side: PerformAudioPassThru request + local cid = self.mobileSession:SendRPC("PerformAudioPassThru", + { + + audioPassThruDisplayText1 ="DisplayText1", + audioPassThruDisplayText2 ="DisplayText2", + samplingRate ="8KHZ", + maxDuration = 5000, + bitsPerSample ="8_BIT", + audioType ="PCM", + muteAudio = true, + } + ) + local time_cid = timestamp() + + + --hmi side: expect PerformAudioPassThru request + EXPECT_HMICALL("UI.PerformAudioPassThru", + { + audioPassThruDisplayTexts = { + { + fieldName = "audioPassThruDisplayText1", + fieldText = "DisplayText1" + }, + { + fieldName = "audioPassThruDisplayText2", + fieldText = "DisplayText2" + } + }, + maxDuration = 5000, + muteAudio = true, + appID = self.applications["SyncProxyTester"] + + }) + :Do(function(_,data) + --mobile side: expect PerformAudioPassThru response + + time_response = timestamp() + if( ( (time_response - time_cid) > RPC_ResponseTimeout) or ((time_response - time_cid) <= 0) ) then + print ("\27[33m WARNING: Response of RPC is not in specified time("..RPC_ResponseTimeout.."msec). Real: ".. (time_response - time_cid).." \27[0m") + else + print ("\27[33m INFO: Response of RPC is in specified time("..RPC_ResponseTimeout.."msec). Real: ".. (time_response - time_cid).." \27[0m") + end + + local function to_be_run() + self.hmiConnection:SendResponse(data.id, data.method, "SUCCESS", {}) + end + RUN_AFTER(to_be_run,5000) + end) + + + --ToDo: Shall be uncommented when APPLINK-24972 "ATF: ATF returns "Timeout expired" of OnAudioPassThru but it exists in logs of SDL." is fixed" + --mobile side: expect PerformAudioPassThru response + --EXPECT_NOTIFICATION("OnAudioPassThru"): + --Times(AtLeast(1)) + + + end + + --End Test case + ----------------------------------------------------------------------------------------- + + + function Test:Notification_OnLanguageChange() + + --hmi side: UI.OnLanguageChange notification + self.hmiConnection:SendNotification("UI.OnLanguageChange",{ language = "ES-MX"}) + + --mobile side: OnLanguageChange notifications + EXPECT_NOTIFICATION("OnLanguageChange") + end + + --End Test case + ----------------------------------------------------------------------------------------- + + + function Test:Notification_OnAppInterfaceUnregistered() + + --mobile side: RegisterAppInterface request + local CorIdRAI = self.mobileSession:SendRPC("RegisterAppInterface", + { + + syncMsgVersion = + { + majorVersion = 2, + minorVersion = 2, + }, + appName ="SyncProxyTester", + ttsName = + { + + { + text ="SyncProxyTester", + type ="TEXT", + }, + }, + ngnMediaScreenAppName ="SPT", + vrSynonyms = + { + "VRSyncProxyTester", + }, + isMediaApplication = true, + languageDesired ="ES-MX", + hmiDisplayLanguageDesired ="ES-MX", + appHMIType = + { + "NAVIGATION", + }, + appID ="8675308", + deviceInfo = + { + hardware = "hardware", + firmwareRev = "firmwareRev", + os = "os", + osVersion = "osVersion", + carrier = "carrier", + maxNumberRFCOMMPorts = 5 + } + + }) + + --hmi side: expected BasicCommunication.OnAppRegistered + EXPECT_HMINOTIFICATION("BasicCommunication.OnAppRegistered", {}) + + --mobile side: RegisterAppInterface response + EXPECT_RESPONSE(CorIdRAI, { success = true, resultCode = "WRONG_LANGUAGE"}) + :Timeout(2000) + + :Do(function(_,data) + --hmi side: BasicCommunication.OnExitAllApplications notification + self.hmiConnection:SendNotification("BasicCommunication.OnExitAllApplications",{ reason = "MASTER_RESET"}) + end) + + --mobile side: OnAppInterfaceUnregistered notifications + EXPECT_NOTIFICATION("OnAppInterfaceUnregistered") + end + + --End Test case + ----------------------------------------------------------------------------------------- + + +--------------------------------------------------------------------------------------------- +-------------------------------------------Postconditions------------------------------------- +--------------------------------------------------------------------------------------------- + +function Test:RemoveConfigurationFiles() + + -- remove used sdl_preloaded_pt.json from files, restore initial one if exists. + local dirPath = "files/" + + + if (FileExist_PreloadedPT == true) then + FileExist_PreloadedPT = false + RestoreSpecificFile(dirPath, "sdl_preloaded_pt.json") + else + os.execute("rm ".. dirPath .. "sdl_preloaded_pt.json") + end + + commonPreconditions:RestoreFile("sdl_preloaded_pt.json") +end \ No newline at end of file diff --git a/test_scripts/API/ATF_BasicCommunication_OnDeviceChosen.lua b/test_scripts/API/ATF_BasicCommunication_OnDeviceChosen.lua new file mode 100644 index 0000000000..363057f1dc --- /dev/null +++ b/test_scripts/API/ATF_BasicCommunication_OnDeviceChosen.lua @@ -0,0 +1,100 @@ +Test = require('connecttest') +require('cardinalities') +local events = require('events') +local mobile_session = require('mobile_session') + +--------------------------------------------------------------------------------------------- +-----------------------------Required Shared Libraries--------------------------------------- +--------------------------------------------------------------------------------------------- +local commonSteps = require('user_modules/shared_testcases/commonSteps') +local commonFunctions = require('user_modules/shared_testcases/commonFunctions') +local commonTestCases = require('user_modules/shared_testcases/commonTestCases') +require('user_modules/AppTypes') + +local DEVICE_ID = config.deviceMAC +local DEVICE_NAME = "127.0.0.1" + +--------------------------------------------------------------------------------------------- +-------------------------------------------Common function----------------------------------- +--------------------------------------------------------------------------------------------- +function BC_OnDeviceChosen_Notification(self, Description, Method, DeviceInfo) + + self.hmiConnection:SendNotification("BasicCommunication.OnStartDeviceDiscovery") + + EXPECT_HMICALL("BasicCommunication.UpdateDeviceList") + :Do(function(exp,data) + + self.hmiConnection:SendResponse(data.id, data.method, "SUCCESS", {}) + + if (Description == "Invalid Json") then + self.hmiConnection:Send('{"method";"BasicCommunication.OnDeviceChosen","params":{"deviceInfo":{"name":"127.0.0.1","id":"12ca17b49af2289436f303e0166030a21e525d266e209267433801a8fd4071a0"}},"jsonrpc":"2.0"}') + else + self.hmiConnection:SendNotification( Method, { deviceInfo = DeviceInfo }) + end + + end) + + commonTestCases:DelayedExp(5000) + +end + + +--------------------------------------------------------------------------------------------- +-----------------------------------------I TEST BLOCK---------------------------------------- +---------------Check notification BasicCommunication.OnDeviceChosen from HMI----------------- +--------------------------------------------------------------------------------------------- + + --Description: TC's checks processing + --HMI sends BasicCommunication.OnDeviceChosen notification with positive case and (full deviceInfo) + --HMI sends BasicCommunication.OnDeviceChosen notification with Missing deviceInfo + --HMI sends BasicCommunication.OnDeviceChosen notification with Missing deviceID + --HMI sends BasicCommunication.OnDeviceChosen notification with Missing DeviceName + --HMI sends BasicCommunication.OnDeviceChosen notification with Missing ID and Name + --HMI sends BasicCommunication.OnDeviceChosen notification with Missing All Parameters + --HMI sends BasicCommunication.OnDeviceChosen notification with Missing Method + --HMI sends BasicCommunication.OnDeviceChosen notification with Empty deviceInfo + --HMI sends BasicCommunication.OnDeviceChosen notification with Empty deviceID + --HMI sends BasicCommunication.OnDeviceChosen notification with WrongType deviceInfo + --HMI sends BasicCommunication.OnDeviceChosen notification with WrongType deviceID + --HMI sends BasicCommunication.OnDeviceChosen notification with WrongType deviceName + --HMI sends BasicCommunication.OnDeviceChosen notification with WrongType ID and Name + --HMI sends BasicCommunication.OnDeviceChosen notification with Invalid Json + + --Requirement id in JAMA: + --APPLINK-24441: https://adc.luxoft.com/svn/APPLINK/doc/technical/HOW-TOs_and_Guidelines/FORD.SmartDeviceLink.SDL_Integration_Guidelines.docx (6.10) + + ---------------------------------------------------------------------------------------------- + + local TestData = { + {description = "Positive Case", method = "BasicCommunication.OnDeviceChosen", deviceInfo = {id = DEVICE_ID, name = DEVICE_NAME} }, + {description = "Missing deviceInfo", method = "BasicCommunication.OnDeviceChosen", deviceInfo = nil }, + {description = "Missing deviceID", method = "BasicCommunication.OnDeviceChosen", deviceInfo = {id = nil, name = DEVICE_NAME} }, + {description = "Missing DeviceName", method = "BasicCommunication.OnDeviceChosen", deviceInfo = {id = DEVICE_ID, name = nil} }, + {description = "Missing ID and Name", method = "BasicCommunication.OnDeviceChosen", deviceInfo = {id = nil, name = nil} }, + {description = "Missing All Parameters", method = nil, deviceInfo = nil }, + {description = "Missing Method", method = nil, deviceInfo = {id = DEVICE_ID, name = DEVICE_NAME} }, + {description = "Empty deviceInfo", method = "BasicCommunication.OnDeviceChosen", deviceInfo = {} }, + {description = "Empty deviceID", method = "BasicCommunication.OnDeviceChosen", deviceInfo = {name = DEVICE_NAME} }, + {description = "Empty deviceName", method = "BasicCommunication.OnDeviceChosen", deviceInfo = {id = DEVICE_ID} }, + {description = "WrongType deviceInfo", method = "BasicCommunication.OnDeviceChosen", deviceInfo = 1234 }, + {description = "WrongType deviceID", method = "BasicCommunication.OnDeviceChosen", deviceInfo = {id = true, name = DEVICE_NAME} }, + {description = "WrongType deviceName", method = "BasicCommunication.OnDeviceChosen", deviceInfo = {id = DEVICE_ID, name = {1234}} }, + {description = "WrongType ID and Name", method = "BasicCommunication.OnDeviceChosen", deviceInfo = {id = 1234, name = true} }, + {description = "Invalid Json", _, _, } + } + + ---------------------------------------------------------------------------------------------- + + -- commonSteps:ActivationApp() + + --Main executing + for i=1, #TestData do + + --Print new line to separate new test cases group + commonFunctions:newTestCasesGroup("-----------------------I." ..tostring(i).." [" ..TestData[i].description .. "]------------------------------") + + Test["BC_" .. TestData[i].description] = function(self) + BC_OnDeviceChosen_Notification(self, TestData[i].description, TestData[i].method, TestData[i].deviceInfo) + end + + end \ No newline at end of file diff --git a/test_scripts/API/ATF_BasicCommunication_OnEmergencyEvent.lua b/test_scripts/API/ATF_BasicCommunication_OnEmergencyEvent.lua new file mode 100644 index 0000000000..13998fbcce --- /dev/null +++ b/test_scripts/API/ATF_BasicCommunication_OnEmergencyEvent.lua @@ -0,0 +1,98 @@ +Test = require('connecttest') +require('cardinalities') +local events = require('events') +local mobile_session = require('mobile_session') + +--------------------------------------------------------------------------------------------- +-----------------------------Required Shared Libraries--------------------------------------- +--------------------------------------------------------------------------------------------- +local commonSteps = require('user_modules/shared_testcases/commonSteps') +local commonFunctions = require('user_modules/shared_testcases/commonFunctions') +local commonTestCases = require('user_modules/shared_testcases/commonTestCases') +require('user_modules/AppTypes') + +--------------------------------------------------------------------------------------------- +-------------------------------------------Common function----------------------------------- +--------------------------------------------------------------------------------------------- +function BC_OnEmergencyEvent_Notification(self, Description, Method, Params, Case) + + if (Description == "enabled = true" or Description == "enabled = false") then count = 1 else count = 0 end + + if (Case == nil) then + self.hmiConnection:SendNotification( Method, Params) + elseif Case == 1 then + --HMI doen't send BasicCommunication.OnEmergencyEvent notification + elseif Case == 2 then + self.hmiConnection:Send('') + elseif Case == 3 then + self.hmiConnection:Send('{"jsonrpc":"2.0","method":"BasicCommunication","params":{"enabled":false}}') + elseif Case == 4 then + self.hmiConnection:Send('{"jsonrpc":"2.0","method""BasicCommunication.OnEmergencyEvent","params":{"enabled":false}}') + end + + if (Description == "enabled = true") then + audioStreaming = "NOT_AUDIBLE" + else + audioStreaming = "AUDIBLE" + end + + EXPECT_NOTIFICATION("OnHMIStatus", {audioStreamingState = audioStreaming}) + :Times(count) + + commonTestCases:DelayedExp(5000) + +end + + +--------------------------------------------------------------------------------------------- +-----------------------------------------I TEST BLOCK---------------------------------------- +--------------Check notification BasicCommunication.OnEmergencyEvent from HMI---------------- +--------------------------------------------------------------------------------------------- + + --Description: TC's checks processing + --HMI sends BasicCommunication.OnEmergencyEvent with enabled = true + --HMI sends BasicCommunication.OnEmergencyEvent with enabled = false + --HMI sends BasicCommunication.OnEmergencyEvent with Empty method + --HMI sends BasicCommunication.OnEmergencyEvent with Empty enabled + --HMI sends BasicCommunication.OnEmergencyEvent with Missing enabled parameter + --HMI sends BasicCommunication.OnEmergencyEvent with Wrong type of method + --HMI sends BasicCommunication.OnEmergencyEvent with Wrong type of enabled + --HMI doen't BasicCommunication.OnEmergencyEvent notification + --HMI sends BasicCommunication.OnEmergencyEvent with Missing all parameters + --HMI sends BasicCommunication.OnEmergencyEvent with Missing Method parameter + --HMI sends BasicCommunication.OnEmergencyEvent with Invalid Json + + --Requirement id in JAMA: + --APPLINK-24441: https://adc.luxoft.com/svn/APPLINK/doc/technical/HOW-TOs_and_Guidelines/FORD.SmartDeviceLink.SDL_Integration_Guidelines.docx (6.25) + + ---------------------------------------------------------------------------------------------- + + local TestData = { + {description = "enabled = true", method = "BasicCommunication.OnEmergencyEvent" , parameter = {enabled = true} }, + {description = "enabled = false", method = "BasicCommunication.OnEmergencyEvent" , parameter = {enabled = false} }, + {description = "Empty method", method = "" , parameter = {enabled = true} }, + {description = "Empty enabled", method = "BasicCommunication.OnEmergencyEvent" , parameter = {enabled = ""} }, + {description = "Missing enabled parameter", method = "BasicCommunication.OnEmergencyEvent" , parameter = {enabled = nil} }, + {description = "Wrong type of method", method = 1234 , parameter = {enabled = true} }, + {description = "Wrong type of enabled", method = "BasicCommunication.OnEmergencyEvent" , parameter = {enabled = 1234} }, + {description = "HMI doen't respond", _, _, case = 1}, + {description = "Missing all parameters", _, _, case = 2}, + {description = "Missing Method parameter", _, _, case = 3}, + {description = "Invalid Json", _, _, case = 4} + } + + ---------------------------------------------------------------------------------------------- + + commonSteps:ActivationApp() + + --Main executing + for i=1, #TestData do + + --Print new line to separate new test cases group + commonFunctions:newTestCasesGroup("-----------------------I." ..tostring(i).." [" ..TestData[i].description .. "]------------------------------") + + Test["BC_" .. TestData[i].description] = function(self) + BC_OnEmergencyEvent_Notification(self, TestData[i].description, TestData[i].method, TestData[i].parameter, TestData[i].case) + end + + end diff --git a/test_scripts/API/ATF_BasicCommunication_OnPhoneCall.lua b/test_scripts/API/ATF_BasicCommunication_OnPhoneCall.lua new file mode 100644 index 0000000000..4039a5f0dd --- /dev/null +++ b/test_scripts/API/ATF_BasicCommunication_OnPhoneCall.lua @@ -0,0 +1,101 @@ +Test = require('connecttest') +require('cardinalities') +local events = require('events') +local mobile_session = require('mobile_session') + +--------------------------------------------------------------------------------------------- +-----------------------------Required Shared Libraries--------------------------------------- +--------------------------------------------------------------------------------------------- +local commonSteps = require('user_modules/shared_testcases/commonSteps') +local commonFunctions = require('user_modules/shared_testcases/commonFunctions') +local commonTestCases = require('user_modules/shared_testcases/commonTestCases') +require('user_modules/AppTypes') + +--------------------------------------------------------------------------------------------- +-------------------------------------------Common function----------------------------------- +--------------------------------------------------------------------------------------------- +function BC_OnPhoneCall_Notification(self, Description, Method, Params, Case) + + if (Description == "isActive = true" or Description == "isActive = false") then count = 1 else count = 0 end + + if (Case == nil) then + self.hmiConnection:SendNotification( Method, Params) + elseif Case == 1 then + --HMI doen't send BasicCommunication.OnPhoneCall notification + elseif Case == 2 then + self.hmiConnection:Send('') + elseif Case == 3 then + self.hmiConnection:Send('{"jsonrpc":"2.0","method":"BasicCommunication","params":{"isActive":false}}') + elseif Case == 4 then + self.hmiConnection:Send('{"jsonrpc":"2.0","method""BasicCommunication.OnPhoneCall","params":{"isActive":false}}') + end + + --Resume the applications to the previous-to-phonecall state on HMI (as SDL does not send BC.ActivateApp or BC.OnResumeAudioSource to HMI after the phone call is ended + if (Description == "isActive = false") then + EXPECT_HMICALL("BasicCommunication.ActivateApp") + :Times(0) + + EXPECT_HMICALL("BasicCommunication.OnResumeAudioSource") + :Times(0) + end + + EXPECT_NOTIFICATION("OnHMIStatus") + :Times(count) + + commonTestCases:DelayedExp(5000) + +end + + +--------------------------------------------------------------------------------------------- +-----------------------------------------I TEST BLOCK---------------------------------------- +-----------------Check notification BasicCommunication.OnPhoneCall from HMI------------------ +--------------------------------------------------------------------------------------------- + + --Description: TC's checks processing + --HMI sends BasicCommunication.OnPhoneCall with isActive = true + --HMI sends BasicCommunication.OnPhoneCall with isActive = false + --HMI sends BasicCommunication.OnPhoneCall with Empty method + --HMI sends BasicCommunication.OnPhoneCall with Empty isActive + --HMI sends BasicCommunication.OnPhoneCall with Missing isActive parameter + --HMI sends BasicCommunication.OnPhoneCall with Wrong type of method + --HMI sends BasicCommunication.OnPhoneCall with Wrong type of isActive + --HMI doen't BasicCommunication.OnPhoneCall notification + --HMI sends BasicCommunication.OnPhoneCall with Missing all parameters + --HMI sends BasicCommunication.OnPhoneCall with Missing Method parameter + --HMI sends BasicCommunication.OnPhoneCall with Invalid Json + + --Requirement id in JAMA: + --APPLINK-24441: https://adc.luxoft.com/svn/APPLINK/doc/technical/HOW-TOs_and_Guidelines/FORD.SmartDeviceLink.SDL_Integration_Guidelines.docx (6.25) + + ---------------------------------------------------------------------------------------------- + + local TestData = { + {description = "isActive = true", method = "BasicCommunication.OnPhoneCall" , parameter = {isActive = true} }, + {description = "isActive = false", method = "BasicCommunication.OnPhoneCall" , parameter = {isActive = false} }, + {description = "Empty method", method = "" , parameter = {isActive = true} }, + {description = "Empty isActive", method = "BasicCommunication.OnPhoneCall" , parameter = {isActive = ""} }, + {description = "Missing isActive parameter", method = "BasicCommunication.OnPhoneCall" , parameter = {isActive = nil} }, + {description = "Wrong type of method", method = 1234 , parameter = {isActive = true} }, + {description = "Wrong type of isActive", method = "BasicCommunication.OnPhoneCall" , parameter = {isActive = 1234} }, + {description = "HMI doen't respond", _, _, case = 1}, + {description = "Missing all parameters", _, _, case = 2}, + {description = "Missing Method parameter", _, _, case = 3}, + {description = "Invalid Json", _, _, case = 4} + } + + ---------------------------------------------------------------------------------------------- + + commonSteps:ActivationApp() + + --Main executing + for i=1, #TestData do + + --Print new line to separate new test cases group + commonFunctions:newTestCasesGroup("-----------------------I." ..tostring(i).." [" ..TestData[i].description .. "]------------------------------") + + Test["BC_" .. TestData[i].description] = function(self) + BC_OnPhoneCall_Notification(self, TestData[i].description, TestData[i].method, TestData[i].parameter, TestData[i].case) + end + + end diff --git a/test_scripts/API/ATF_BasicCommunication_OnReady.lua b/test_scripts/API/ATF_BasicCommunication_OnReady.lua new file mode 100644 index 0000000000..c6bf3d4560 --- /dev/null +++ b/test_scripts/API/ATF_BasicCommunication_OnReady.lua @@ -0,0 +1,384 @@ +Test = require('connecttest') + +require('cardinalities') +local events = require('events') +local mobile_session = require('mobile_session') +local commonTestCases = require('user_modules/shared_testcases/commonTestCases') +local commonFunctions = require('user_modules/shared_testcases/commonFunctions') +require('user_modules/AppTypes') + +--------------------------------------------------------------------------------------------- +-------------------------------------------Common function----------------------------------- +--------------------------------------------------------------------------------------------- +-- HMI sends BasicCommunication.OnReady notification with InvalidJson, does NOT send and wrongtype +function Test:initHMI_BasicCommunication_OnReady_Invalid(case) + critical(true) + local function ExpectRequest(name, mandatory, params) + xmlReporter.AddMessage(debug.getinfo(1, "n").name, tostring(name)) + local event = events.Event() + event.level = 2 + event.matches = function(self, data) return data.method == name end + return + EXPECT_HMIEVENT(event, name) + :Times(mandatory and 1 or AnyNumber()) + :Do(function(_, data) + self.hmiConnection:SendResponse(data.id, data.method, "SUCCESS", params) + end) + end + + local function ExpectNotification(name, mandatory) + xmlReporter.AddMessage(debug.getinfo(1, "n").name, tostring(name)) + local event = events.Event() + event.level = 2 + event.matches = function(self, data) return data.method == name end + return + EXPECT_HMIEVENT(event, name) + :Times(mandatory and 1 or AnyNumber()) + end + + ExpectRequest("BasicCommunication.MixingAudioSupported", + true, + { attenuatedSupported = true }) + :Times(0) + ExpectRequest("BasicCommunication.GetSystemInfo", false, + { + ccpu_version = "ccpu_version", + language = "EN-US", + wersCountryCode = "wersCountryCode" + }) + :Times(0) + ExpectRequest("UI.GetLanguage", true, { language = "EN-US" }) + :Times(0) + ExpectRequest("VR.GetLanguage", true, { language = "EN-US" }) + :Times(0) + ExpectRequest("TTS.GetLanguage", true, { language = "EN-US" }) + :Times(0) + ExpectRequest("UI.ChangeRegistration", false, { }):Pin() + :Times(0) + ExpectRequest("TTS.SetGlobalProperties", false, { }):Pin() + :Times(0) + ExpectRequest("BasicCommunication.UpdateDeviceList", false, { }):Pin() + :Times(0) + ExpectRequest("VR.ChangeRegistration", false, { }):Pin() + :Times(0) + ExpectRequest("TTS.ChangeRegistration", false, { }):Pin() + :Times(0) + ExpectRequest("VR.GetSupportedLanguages", true, { + languages = + { + "EN-US","ES-MX","FR-CA","DE-DE","ES-ES","EN-GB","RU-RU","TR-TR","PL-PL", + "FR-FR","IT-IT","SV-SE","PT-PT","NL-NL","ZH-TW","JA-JP","AR-SA","KO-KR", + "PT-BR","CS-CZ","DA-DK","NO-NO" + } + }) + :Times(0) + ExpectRequest("TTS.GetSupportedLanguages", true, { + languages = + { + "EN-US","ES-MX","FR-CA","DE-DE","ES-ES","EN-GB","RU-RU","TR-TR","PL-PL", + "FR-FR","IT-IT","SV-SE","PT-PT","NL-NL","ZH-TW","JA-JP","AR-SA","KO-KR", + "PT-BR","CS-CZ","DA-DK","NO-NO" + } + }) + :Times(0) + ExpectRequest("UI.GetSupportedLanguages", true, { + languages = + { + "EN-US","ES-MX","FR-CA","DE-DE","ES-ES","EN-GB","RU-RU","TR-TR","PL-PL", + "FR-FR","IT-IT","SV-SE","PT-PT","NL-NL","ZH-TW","JA-JP","AR-SA","KO-KR", + "PT-BR","CS-CZ","DA-DK","NO-NO" + } + }) + :Times(0) + ExpectRequest("VehicleInfo.GetVehicleType", true, { + vehicleType = + { + make = "Ford", + model = "Fiesta", + modelYear = "2013", + trim = "SE" + } + }) + :Times(0) + ExpectRequest("VehicleInfo.GetVehicleData", true, { vin = "52-452-52-752" }) + :Times(0) + + local function button_capability(name, shortPressAvailable, longPressAvailable, upDownAvailable) + xmlReporter.AddMessage(debug.getinfo(1, "n").name, tostring(name)) + return + { + name = name, + shortPressAvailable = shortPressAvailable == nil and true or shortPressAvailable, + longPressAvailable = longPressAvailable == nil and true or longPressAvailable, + upDownAvailable = upDownAvailable == nil and true or upDownAvailable + } + end + local buttons_capabilities = + { + capabilities = + { + button_capability("PRESET_0"), + button_capability("PRESET_1"), + button_capability("PRESET_2"), + button_capability("PRESET_3"), + button_capability("PRESET_4"), + button_capability("PRESET_5"), + button_capability("PRESET_6"), + button_capability("PRESET_7"), + button_capability("PRESET_8"), + button_capability("PRESET_9"), + button_capability("OK", true, false, true), + button_capability("SEEKLEFT"), + button_capability("SEEKRIGHT"), + button_capability("TUNEUP"), + button_capability("TUNEDOWN") + }, + presetBankCapabilities = { onScreenPresetsAvailable = true } + } + ExpectRequest("Buttons.GetCapabilities", true, buttons_capabilities) + :Times(0) + ExpectRequest("VR.GetCapabilities", true, { vrCapabilities = { "TEXT" } }) + :Times(0) + ExpectRequest("TTS.GetCapabilities", true, { + speechCapabilities = { "TEXT", "PRE_RECORDED" }, + prerecordedSpeechCapabilities = + { + "HELP_JINGLE", + "INITIAL_JINGLE", + "LISTEN_JINGLE", + "POSITIVE_JINGLE", + "NEGATIVE_JINGLE" + } + }) + :Times(0) + + local function text_field(name, characterSet, width, rows) + xmlReporter.AddMessage(debug.getinfo(1, "n").name, tostring(name)) + return + { + name = name, + characterSet = characterSet or "TYPE2SET", + width = width or 500, + rows = rows or 1 + } + end + local function image_field(name, width, heigth) + xmlReporter.AddMessage(debug.getinfo(1, "n").name, tostring(name)) + return + { + name = name, + imageTypeSupported = + { + "GRAPHIC_BMP", + "GRAPHIC_JPEG", + "GRAPHIC_PNG" + }, + imageResolution = + { + resolutionWidth = width or 64, + resolutionHeight = height or 64 + } + } + + end + + ExpectRequest("UI.GetCapabilities", true, { + displayCapabilities = + { + displayType = "GEN2_8_DMA", + textFields = + { + text_field("mainField1"), + text_field("mainField2"), + text_field("mainField3"), + text_field("mainField4"), + text_field("statusBar"), + text_field("mediaClock"), + text_field("mediaTrack"), + text_field("alertText1"), + text_field("alertText2"), + text_field("alertText3"), + text_field("scrollableMessageBody"), + text_field("initialInteractionText"), + text_field("navigationText1"), + text_field("navigationText2"), + text_field("ETA"), + text_field("totalDistance"), + text_field("navigationText"), + text_field("audioPassThruDisplayText1"), + text_field("audioPassThruDisplayText2"), + text_field("sliderHeader"), + text_field("sliderFooter"), + text_field("notificationText"), + text_field("menuName"), + text_field("secondaryText"), + text_field("tertiaryText"), + text_field("timeToDestination"), + text_field("turnText"), + text_field("menuTitle") + }, + imageFields = + { + image_field("softButtonImage"), + image_field("choiceImage"), + image_field("choiceSecondaryImage"), + image_field("vrHelpItem"), + image_field("turnIcon"), + image_field("menuIcon"), + image_field("cmdIcon"), + image_field("showConstantTBTIcon"), + image_field("showConstantTBTNextTurnIcon") + }, + mediaClockFormats = + { + "CLOCK1", + "CLOCK2", + "CLOCK3", + "CLOCKTEXT1", + "CLOCKTEXT2", + "CLOCKTEXT3", + "CLOCKTEXT4" + }, + graphicSupported = true, + imageCapabilities = { "DYNAMIC", "STATIC" }, + templatesAvailable = { "TEMPLATE" }, + screenParams = + { + resolution = { resolutionWidth = 800, resolutionHeight = 480 }, + touchEventAvailable = + { + pressAvailable = true, + multiTouchAvailable = true, + doublePressAvailable = false + } + }, + numCustomPresetsAvailable = 10 + }, + audioPassThruCapabilities = + { + samplingRate = "44KHZ", + bitsPerSample = "8_BIT", + audioType = "PCM" + }, + hmiZoneCapabilities = "FRONT", + softButtonCapabilities = + { + shortPressAvailable = true, + longPressAvailable = true, + upDownAvailable = true, + imageSupported = true + } + }) + :Times(0) + + ExpectRequest("VR.IsReady", true, { available = true }) + :Times(0) + ExpectRequest("TTS.IsReady", true, { available = true }) + :Times(0) + ExpectRequest("UI.IsReady", true, { available = true }) + :Times(0) + ExpectRequest("Navigation.IsReady", true, { available = true }) + :Times(0) + ExpectRequest("VehicleInfo.IsReady", true, { available = true }) + :Times(0) + + self.applications = { } + ExpectRequest("BasicCommunication.UpdateAppList", false, { }) + :Pin() + :Do(function(_, data) + self.hmiConnection:SendResponse(data.id, data.method, "SUCCESS", { }) + self.applications = { } + for _, app in pairs(data.params.applications) do + self.applications[app.appName] = app.appID + end + end) + + if (case == "Wrong Type") then + --HMI send BasicCommunication.OnReady notification with wrongtype: method=1234 + self.hmiConnection:Send('{"jsonrpc":"2.0","method":1234}') + elseif (case == "Invalid Json") then + --HMI send BasicCommunication.OnReady notification with invalidJson. Missing ":" symbol + self.hmiConnection:Send('{"jsonrpc":"2.0","method""BasicCommunication.OnReady"}') + else + --Do NOT send BasicCommunication.OnReady notification + end + + commonTestCases:DelayedExp(1000) + +end +-- Stop SDL, start SDL, HMI initialization with specified modes, create mobile connection. +local function RestartSDL_InitHMI_ConnectMobile(self, Description, Params, case) + + --Stop SDL + Test["BC_StopSDL"] = function(self) + StopSDL() + end + + --Start SDL + Test["BC_StartSDL"] = function(self) + StartSDL(config.pathToSDL, config.ExitOnCrash) + end + + --InitHMI + Test["BC_InitHMI"] = function(self) + self:initHMI() + end + + Test["BC_initHMI_" .. Description] = function(self) + self:initHMI_BasicCommunication_OnReady_Invalid(case) + end + + --ConnectMobile + Test["BC_ConnectMobile"] = function(self) + self:connectMobile() + end + + --StartSession + Test["BC_StartSession"] = function(self) + self.mobileSession= mobile_session.MobileSession( + self, + self.mobileConnection) + self.mobileSession:StartService(7) + end + +end + + + +--------------------------------------------------------------------------------------------- +-----------------------------------------I TEST BLOCK---------------------------------------- +--------CommonRequestCheck: Check notification BasicCommunication.OnReady from HMI----------- +--------------------------------------------------------------------------------------------- + + --Description: TC's checks processing + --HMI sends BasicCommunication.OnReady + --HMI does NOT send BasicCommunication.OnReady + --HMI sends InvalidJson BasicCommunication.OnReady + --HMI sends WrongType BasicCommunication.OnReady + + --Requirement id in JAMA: + --APPLINK-24441: https://adc.luxoft.com/svn/APPLINK/doc/technical/HOW-TOs_and_Guidelines/FORD.SmartDeviceLink.SDL_Integration_Guidelines.docx + + ---------------------------------------------------------------------------------------------- + + local TestData = { + {description = "HMI sends BasicCommunication.OnReady", parameter = {"BasicCommunication.OnReady"}, case = "HMI sends valid OnReady"}, + {description = "HMI does NOT send BasicCommunication.OnReady", parameter = {}, case = "Do Not send"}, + {description = "HMI sends InvalidJson BasicCommunication.OnReady", parameter = {'{"jsonrpc":"2.0","method""BasicCommunication.OnReady"}'}, case = "Invalid Json"}, + {description = "HMI sends WrongType BasicCommunication.OnReady", parameter = {'{"jsonrpc":"2.0","method":1234}'}, case = "Wrong Type"} + + } + + ---------------------------------------------------------------------------------------------- + + --Description: + --Main executing + --i=1 already running when start script in file: "/modules/connecttest" file when InitHMI function executing + for i=2, #TestData do + + --Print new line to separate new test cases group + commonFunctions:newTestCasesGroup("-----------------------I." ..tostring(i).." [" ..TestData[i].description .. "]------------------------------") + + RestartSDL_InitHMI_ConnectMobile(self, TestData[i].description, TestData[i].parameter, TestData[i].case) + + end \ No newline at end of file diff --git a/test_scripts/API/ATF_BasicCommunication_OnStartDeviceDiscovery .lua b/test_scripts/API/ATF_BasicCommunication_OnStartDeviceDiscovery .lua new file mode 100644 index 0000000000..b7b3445cac --- /dev/null +++ b/test_scripts/API/ATF_BasicCommunication_OnStartDeviceDiscovery .lua @@ -0,0 +1,159 @@ +Test = require('connecttest') +require('cardinalities') +local events = require('events') +local mobile_session = require('mobile_session') +local commonFunctions = require('user_modules/shared_testcases/commonFunctions') +require('user_modules/AppTypes') + +--------------------------------------------------------------------------------------------- +------------------------------------------Common functions----------------------------------- +--------------------------------------------------------------------------------------------- +function DelayedExp(time) + local event = events.Event() + event.matches = function(self, e) return self == e end + EXPECT_EVENT(event, "Delayed event") + :Timeout(time+1000) + RUN_AFTER(function() + RAISE_EVENT(event, event) + end, time) +end + +----------------------------------------------------------------------------------------------- +-------------------------------------------TEST BLOCK I---------------------------------------- +--------------------------------Check normal cases of Mobile request--------------------------- +----------------------------------------------------------------------------------------------- + +--Not Applicable + +---------------------------------------------------------------------------------------------- +-----------------------------------------TEST BLOCK II---------------------------------------- +-----------------------------Check special cases of Mobile request---------------------------- +---------------------------------------------------------------------------------------------- + +--Not Applicable + +----------------------------------------------------------------------------------------------- +-------------------------------------------TEST BLOCK III-------------------------------------- +---------------------------------Check normal cases of HMI response---------------------------- +----------------------------------------------------------------------------------------------- + commonFunctions:newTestCasesGroup("Normal cases of HMI response") + --Description: Check the processing in case + --1. HMI sends valid BasicCommunication.OnStartDeviceDiscovery + --Requirement: + --https://adc.luxoft.com/svn/APPLINK/doc/technical/HOW-TOs_and_Guidelines/FORD.SmartDeviceLink.SDL_Integration_Guidelines.docx + ------------------------------------------------------------------------------------------- + + function Test:OnStartDeviceDiscovery_Valid() + self.hmiConnection:Send('{"jsonrpc":"2.0","method":"BasicCommunication.OnStartDeviceDiscovery"}') + EXPECT_HMICALL("BasicCommunication.UpdateDeviceList") + :Do(function(_,data) + self.hmiConnection:SendResponse(data.id, data.method, "SUCCESS", {}) + end) + :Times(1) + + DelayedExp(10000) + end + +---------------------------------------------------------------------------------------------- +-----------------------------------------TEST BLOCK IV---------------------------------------- +----------------------------Check special cases of HMI response--------------------------- +---------------------------------------------------------------------------------------------- + commonFunctions:newTestCasesGroup("Special cases of HMI response") + --Description: Check the processing in case + --1. Invalid Json BasicCommunication.OnStartDeviceDiscovery + --2. Invalid Structure BasicCommunication.OnStartDeviceDiscovery + --3. Wrong Type BasicCommunication.OnStartDeviceDiscovery + --4. Missing parameter in BasicCommunication.OnStartDeviceDiscovery + --5. Missing all parameters in BasicCommunication.OnStartDeviceDiscovery + + --Requirement: + --https://adc.luxoft.com/svn/APPLINK/doc/technical/HOW-TOs_and_Guidelines/FORD.SmartDeviceLink.SDL_Integration_Guidelines.docx + + ------------------------------------------------------------------------------------------- + + -- InvalidJsonSyntax + function Test:OnStartDeviceDiscovery_InvalidJsonSyntax() + self.hmiConnection:Send('{"jsonrpc";"2.0","method":"BasicCommunication.OnStartDeviceDiscovery"}') + + EXPECT_HMICALL("BasicCommunication.UpdateDeviceList") + :Do(function(_,data) + self.hmiConnection:SendResponse(data.id, data.method, "SUCCESS", {}) + end) + :Times(0) + + DelayedExp(1000) + end + + ------------------------------------------------------------------------------------------ + + -- InvalidStructure + function Test:OnStartDeviceDiscovery_InvalidStructure() + self.hmiConnection:Send('{"jsonrpc":"2.0"{"method":"BasicCommunication.OnStartDeviceDiscovery"}}') + + EXPECT_HMICALL("BasicCommunication.UpdateDeviceList") + :Do(function(_,data) + self.hmiConnection:SendResponse(data.id, data.method, "SUCCESS", {}) + end) + :Times(0) + + DelayedExp(1000) + end + + ------------------------------------------------------------------------------------------ + + -- WrongType + function Test:OnStartDeviceDiscovery_WrongType() + self.hmiConnection:Send('{"jsonrpc":"abc","method":"BasicCommunication.OnStartDeviceDiscovery"}}') + + EXPECT_HMICALL("BasicCommunication.UpdateDeviceList") + :Do(function(_,data) + self.hmiConnection:SendResponse(data.id, data.method, "SUCCESS", {}) + end) + :Times(0) + + DelayedExp(1000) + end + + -------------------------------------------------------------------------------------- + + -- Missing parameter + function Test:OnStartDeviceDiscovery_MissingParam() + self.hmiConnection:Send('{"method":"BasicCommunication.OnStartDeviceDiscovery"}') + + EXPECT_HMICALL("BasicCommunication.UpdateDeviceList") + :Do(function(_,data) + self.hmiConnection:SendResponse(data.id, data.method, "SUCCESS", {}) + end) + :Times(0) + + DelayedExp(1000) + end + + -------------------------------------------------------------------------------------- + + -- Missing all parameters + function Test:OnStartDeviceDiscovery_MissingAllParams() + self.hmiConnection:Send('{}') + + EXPECT_HMICALL("BasicCommunication.UpdateDeviceList") + :Do(function(_,data) + self.hmiConnection:SendResponse(data.id, data.method, "SUCCESS", {}) + end) + :Times(0) + + DelayedExp(1000) + end + +----------------------------------------------------------------------------------------------- +-------------------------------------------TEST BLOCK V---------------------------------------- +-------------------------------------Checks All Result Codes----------------------------------- +----------------------------------------------------------------------------------------------- + +--Not applicable + +---------------------------------------------------------------------------------------------- +-----------------------------------------TEST BLOCK VI---------------------------------------- +-------------------------Sequence with emulating of user's action(s)-------------------------- +---------------------------------------------------------------------------------------------- + +--Not applicable \ No newline at end of file diff --git a/test_scripts/API/ATF_CreateInteractionChoiceSet.lua b/test_scripts/API/ATF_CreateInteractionChoiceSet.lua new file mode 100644 index 0000000000..4647a97302 --- /dev/null +++ b/test_scripts/API/ATF_CreateInteractionChoiceSet.lua @@ -0,0 +1,7399 @@ +local commonSteps = require('user_modules/shared_testcases/commonSteps') +local commonPreconditions = require('user_modules/shared_testcases/commonPreconditions') + + +function DeleteLog_app_info_dat_policy() + commonSteps:CheckSDLPath() + local SDLStoragePath = config.pathToSDL .. "storage/" + + --Delete app_info.dat and log files and storage + if commonSteps:file_exists(config.pathToSDL .. "app_info.dat") == true then + os.remove(config.pathToSDL .. "app_info.dat") + end + + if commonSteps:file_exists(config.pathToSDL .. "SmartDeviceLinkCore.log") == true then + os.remove(config.pathToSDL .. "SmartDeviceLinkCore.log") + end + + if commonSteps:file_exists(SDLStoragePath .. "policy.sqlite") == true then + os.remove(SDLStoragePath .. "policy.sqlite") + end + + if commonSteps:file_exists(config.pathToSDL .. "policy.sqlite") == true then + os.remove(config.pathToSDL .. "policy.sqlite") + end + + os.execute("rm -r " ..config.pathToSDL .. "storage") +end + +DeleteLog_app_info_dat_policy() + +Test = require('connecttest') +require('cardinalities') +local events = require('events') +local mobile_session = require('mobile_session') + +config.deviceMAC = "12ca17b49af2289436f303e0166030a21e525d266e209267433801a8fd4071a0" +--ToDo: shall be removed when APPLINK-16610 is fixed +config.defaultProtocolVersion = 2 +config.SDLStoragePath = config.pathToSDL .. "storage/" + +local storagePath = config.SDLStoragePath..config.application1.registerAppInterfaceParams.appID.. "_" .. config.deviceMAC.. "/" +local imageValues = {"a", "icon.png", "qwertyuiopasdfghjklzxcvbnm1234567890[]'.!@#$%^&*()_+-=qwertyuiopasdfghjklzxcvbnm1234567890[]'.!@#$%^&*()_+-=QWERTYUIOPASDFGHJKLZXCVBNM{}|?>: clear internally stored UI-related choices + -> + send VR.DeleteCommands for successfully added VR-choices + -> and respond with (resultCode: GENERIC_ERROR, success:false) for CreateInteractionChoiceSet to mobile app. + + 5. In case SDL fails to store UI-related choices, SDL must + -> NOT send VR.AddCommands to corresponding VR-related choices (that is, SDL must first store UI-choices and in case all UI-choices are stored successfully - send VR-choices to HMI) + -> and respond with (resultCode: GENERIC_ERROR, success:false) for CreateInteractionChoiceSet to mobile app. + ]] + + --Begin Test case HMINegativeCheck.1.1 + --Description: Check that SDL respond to mobile GENERIC_ERROR in case when does not receive VR.AddCommand responsevrCommand duplicate inside choice set + function Test:CreateInteractionChoiceSet_WithoutResponseVRAddCommandOneChoice() + --request from mobile side + local CorIdCICS = self.mobileSession:SendRPC("CreateInteractionChoiceSet", + { + interactionChoiceSetID = 10, + choiceSet = + { + { + choiceID = 201, + menuName = "vrChoice201", + vrCommands = {"vrChoice201"} + } + } + }) + + --hmi side: request, response VR.AddCommand + EXPECT_HMICALL("VR.AddCommand", + { + cmdID = 201, + type = "Choice", + vrCommands = {"vrChoice201"} + }) + + --hmi side: Absence of VR.DeleteCommand + EXPECT_HMICALL("VR.DeleteCommand") + :Timeout(12000) + :Times(0) + + --response on mobile side + EXPECT_RESPONSE(CorIdCICS, { success = false, resultCode = "GENERIC_ERROR"}) + :Timeout(12000) + + --notification on mobile side + EXPECT_NOTIFICATION("OnHashChange") + :Timeout(2000) + :Times(0) + end + --End Test case HMINegativeCheck.1.1 + + ----------------------------------------------------------------------------------------- + + --Begin Test case HMINegativeCheck.1.2 + --Description: Check that SDL responds to mobile GENERIC_ERROR and deletes successfully added choice vr commands + function Test:CreateInteractionChoiceSet_WithoutResponseVRAddCommandSeveralChoices() + --request from mobile side + local CorIdCICS = self.mobileSession:SendRPC("CreateInteractionChoiceSet", + { + interactionChoiceSetID = 2, + choiceSet = + { + { + choiceID = 202, + menuName = "vrChoice202", + vrCommands = {"vrChoice202"} + }, + { + choiceID = 203, + menuName = "vrChoice203", + vrCommands = {"vrChoice203"} + }, + { + choiceID = 204, + menuName = "vrChoice204", + vrCommands = {"vrChoice204"} + } + } + }) + + --hmi side: request, response VR.AddCommand + EXPECT_HMICALL("VR.AddCommand", + {cmdID = 202, type = "Choice", vrCommands = {"vrChoice202"}}, + {cmdID = 203, type = "Choice", vrCommands = {"vrChoice203"}}, + {cmdID = 204, type = "Choice", vrCommands = {"vrChoice204"}}) + :Times(3) + :Do(function(exp,data) + if exp.occurences == 3 then + --Do nothing + else + self.hmiConnection:SendResponse(data.id,"VR.AddCommand", "SUCCESS", {}) + end + end) + + --hmi side: request, response VR.DeleteCommand + EXPECT_HMICALL("VR.DeleteCommand", + {cmdID = 202}, + {cmdID = 203}) + :Times(2) + :Timeout(25000) + :Do(function(exp,data) + self.hmiConnection:SendResponse(data.id,"VR.DeleteCommand", "SUCCESS", {}) + end) + + --response on mobile side + EXPECT_RESPONSE(CorIdCICS, { success = false, resultCode = "GENERIC_ERROR"}) + :Timeout(25000) + + --notification on mobile side + EXPECT_NOTIFICATION("OnHashChange") + :Times(0) + :Timeout(25000) + + end + --End Test case ResultCodeCheck.1.2 + + ----------------------------------------------------------------------------------------- + + --Begin Test case HMINegativeCheck.1.3 + --Description: CreateInteractionChoiceSet request with one choice with error VR.AddCommand response + local resultCodeValues = {{resultCode = "UNSUPPORTED_RESOURCE", code = 2}, {resultCode = "REJECTED", code = 4}, {resultCode = "ABORTED", code = 5}, {resultCode = "IGNORED", code = 6}, {resultCode = "TIMED_OUT", code = 10}, {resultCode = "INVALID_ID", code = 13}, {resultCode = "DUPLICATE_NAME", code = 14}, {resultCode = "WARNINGS", code = 21}, {resultCode = "GENERIC_ERROR", code = 22}, {resultCode = "USER_DISALLOWED", code = 23}, {resultCode = "DISALLOWED", code = 3}} + + for i=1,#resultCodeValues do + Test["CreateInteractionChoiceSet_OneChoiceErrorResponseFromHMI" .. resultCodeValues[i].resultCode ]= function(self) + --request from mobile side + local CorIdCICS = self.mobileSession:SendRPC("CreateInteractionChoiceSet", + { + interactionChoiceSetID = 3+resultCodeValues[i].code, + choiceSet = + { + { + choiceID = 301+resultCodeValues[i].code, + menuName = "vrChoice301", + vrCommands = {"vrChoice301"} + } + } + }) + + --hmi side: request, response VR.AddCommand + EXPECT_HMICALL("VR.AddCommand", + {cmdID = 301+resultCodeValues[i].code, type = "Choice", vrCommands = {"vrChoice301"}}) + :Times(1) + :Do(function(_,data) + -- self.hmiConnection:SendError(data.id,"VR.AddCommand", resultCodeValues[i].resultCode, "message") + self.hmiConnection:SendError(data.id,"VR.AddCommand", resultCodeValues[i].resultCode, "Some error is occured, resultCode "..resultCodeValues[i].resultCode) + end) + + --hmi side: absence of VR.DeleteCommand requests + EXPECT_HMICALL("VR.DeleteCommand") + :Timeout(12000) + :Times(0) + + if resultCodeValues[i].resultCode ~= "WARNINGS" then + --response on mobile side + EXPECT_RESPONSE(CorIdCICS, { success = false, resultCode = resultCodeValues[i].resultCode}) + :Timeout(12000) + + --notification on mobile side + EXPECT_NOTIFICATION("OnHashChange") + :Times(0) + else + --response on mobile side + EXPECT_RESPONSE(CorIdCICS, { success = true, resultCode = "SUCCESS"--[[ TODO SDL issue APPLINK-14569 , info = " Some error is occured, resultCode "..resultCodeValues[i].resultCode]]}) + :Timeout(12000) + + --notification on mobile side + EXPECT_NOTIFICATION("OnHashChange") + end + + DelayedExp(15000) + end + end + --End Test case ResultCodeCheck.1.3 + + ----------------------------------------------------------------------------------------- + + --Begin Test case HMINegativeCheck.1.4 + --Description: CreateInteractionChoiceSet request with several choice with error VR.AddCommand response to one + for i=1,#resultCodeValues do + Test["CreateInteractionChoiceSet_SeveralChoiceErrorResponseFromHMI_" .. resultCodeValues[i].resultCode ]= function(self) + local startID = 200+i*5 + --request from mobile side + local CorIdCICS = self.mobileSession:SendRPC("CreateInteractionChoiceSet", + { + interactionChoiceSetID = 4+i, + choiceSet = self:setChoiseSet(5,startID) + }) + + --hmi side: request, response VR.AddCommand + expectChoiceSet = self:setEXChoiseSet(5,startID) + EXPECT_HMICALL("VR.AddCommand", + expectChoiceSet[1], + expectChoiceSet[2], + expectChoiceSet[3], + expectChoiceSet[4], + expectChoiceSet[5]) + :Times(AtMost(5)) + --AddCommand 1,3 error, AddCommand 2 successfully + :Do(function(exp,data) + if exp.occurences == 1 or + exp.occurences == 3 then + self.hmiConnection:SendError(data.id,"VR.AddCommand", resultCodeValues[i].resultCode, "message") + elseif exp.occurences == 2 then + self.hmiConnection:SendResponse(data.id,"VR.AddCommand", "SUCCESS", {}) + + if resultCodeValues[i].resultCode ~= "WARNINGS" then + --hmi side: request, response VR.DeleteCommand + EXPECT_HMICALL("VR.DeleteCommand", + {cmdID = startID+1}) + :Timeout(25000) + :Do(function(exp,data) + self.hmiConnection:SendResponse(data.id,"VR.DeleteCommand", "SUCCESS", {}) + end) + end + end + end) + + if resultCodeValues[i].resultCode == "WARNINGS" then + EXPECT_HMICALL("VR.DeleteCommand", + {cmdID = startID}, + {cmdID = startID+1}, + {cmdID = startID+2}) + :Timeout(25000) + :Do(function(exp,data) + self.hmiConnection:SendResponse(data.id,"VR.DeleteCommand", "SUCCESS", {}) + end) + :Times(3) + end + + if resultCodeValues[i].resultCode ~= "WARNINGS" then + --response on mobile side + EXPECT_RESPONSE(CorIdCICS, { success = false, resultCode = resultCodeValues[i].resultCode}) + :Timeout(15000) + else + --response on mobile side + EXPECT_RESPONSE(CorIdCICS, { success = false, resultCode = "GENERIC_ERROR"}) + :Timeout(15000) + end + + --notification on mobile side + EXPECT_NOTIFICATION("OnHashChange") + :Times(0) + :Timeout(15000) + + DelayedExp(5000) + end + end + --End Test case ResultCodeCheck.1.4 + + ----------------------------------------------------------------------------------------- + + --Begin Test case HMINegativeCheck.1.5 + --Description: Check that SDL delete all successfully added command + function Test:CreateInteractionChoiceSet_SuccessCodesAfterError() + local startID = 350 + --request from mobile side + local CorIdCICS = self.mobileSession:SendRPC("CreateInteractionChoiceSet", + { + interactionChoiceSetID = 555, + choiceSet = self:setChoiseSet(20,startID) + }) + + local addCommandIds = {} + --hmi side: request, response VR.AddCommand + EXPECT_HMICALL("VR.AddCommand") + :Times(20) + :Do(function(exp,data) + if exp.occurences == 5 then + local function to_run() + self.hmiConnection:SendError(data.id,"VR.AddCommand", "REJECTED", " Command is rejected ") + end + RUN_AFTER(to_run, 5000) + else + self.hmiConnection:SendResponse(data.id,"VR.AddCommand", "SUCCESS", {}) + end + end) + + --hmi side: request, response VR.DeleteCommand + EXPECT_HMICALL("VR.DeleteCommand") + :Timeout(20000) + :Times(19) + :Do(function(_,data) + self.hmiConnection:SendResponse(data.id,"VR.DeleteCommand", "SUCCESS", {}) + end) + + --response on mobile side + EXPECT_RESPONSE(CorIdCICS, { success = false, resultCode = "REJECTED"}) + :Timeout(12000) + + --notification on mobile side + EXPECT_NOTIFICATION("OnHashChange") + :Times(0) + :Timeout(20000) + end + --End Test case ResultCodeCheck.1.5 + + --End Test case HMINegativeCheck.1 + + ----------------------------------------------------------------------------------------- +--[[TODO: update according to APPLINK-14765 + --Begin Test case HMINegativeCheck.2 + --Description: + -- Check processing responses with invalid structure + + --Requirement id in JAMA: + --SDLAQ-CRS-38 + + --Verification criteria: + --The response contains 2 mandatory parameters "success" and "resultCode", "info" is sent if there is any additional information about the resultCode. + function Test: CreateInteractionChoiceSet_ResponseInvalidStructure() + local cid = self.mobileSession:SendRPC("CreateInteractionChoiceSet", + { + interactionChoiceSetID = 2043, + choiceSet = + { + + { + choiceID = 2043, + menuName ="Choice2043", + vrCommands = + { + "Choice2043", + }, + image = + { + value ="icon.png", + imageType ="STATIC", + }, + } + } + }) + + + --hmi side: expect VR.AddCommand request + EXPECT_HMICALL("VR.AddCommand", + { + cmdID = 2043, + appID = applicationID, + type = "Choice", + vrCommands = {"Choice2043" } + }) + :Do(function(_,data) + --hmi side: sending VR.AddCommand response. + --Correct struture: self.hmiConnection:Send('"id":'..tostring(data.id)..',"jsonrpc":"2.0","result":{"code":0, "method":"VR.AddCommand"}}') + self.hmiConnection:Send('"id":'..tostring(data.id)..',"jsonrpc":"2.0","code":0,"result":{"method":"VR.AddCommand"}}') + end) + + --mobile side: expect CreateInteractionChoiceSet response + EXPECT_RESPONSE(cid, { success = false, resultCode = "GENERIC_ERROR" }) + :Timeout(12000) + + --mobile side: expect OnHashChange notification is not send to mobile + EXPECT_NOTIFICATION("OnHashChange") + :Times(0) + end + --End Test case HMINegativeCheck.2 +]] + ----------------------------------------------------------------------------------------- + + --Begin Test case HMINegativeCheck.3 + --Description: + -- Several response to one request + + --Requirement id in JAMA: + --SDLAQ-CRS-38 + + --Verification criteria: + --The response contains 2 mandatory parameters "success" and "resultCode", "info" is sent if there is any additional information about the resultCode. + function Test:CreateInteractionChoiceSet_SeveralResponseToOneRequest() + local cid = self.mobileSession:SendRPC("CreateInteractionChoiceSet", + { + interactionChoiceSetID = 2044, + choiceSet = + { + + { + choiceID = 2044, + menuName ="Choice2044", + vrCommands = + { + "Choice2044", + }, + image = + { + value ="icon.png", + imageType ="STATIC", + }, + } + } + }) + + + --hmi side: expect VR.AddCommand request + EXPECT_HMICALL("VR.AddCommand", + { + cmdID = 2044, + appID = applicationID, + type = "Choice", + vrCommands = {"Choice2044" } + }) + :Do(function(_,data) + --hmi side: sending VR.AddCommand response + self.hmiConnection:SendResponse(data.id, data.method, "SUCCESS", {}) + self.hmiConnection:SendResponse(data.id, data.method, "INVALID_DATA", {}) + self.hmiConnection:SendResponse(data.id, data.method, "REJECTED", {}) + end) + + --mobile side: expect CreateInteractionChoiceSet response + EXPECT_RESPONSE(cid, { success = true, resultCode = "SUCCESS" }) + + --mobile side: expect OnHashChange notification + EXPECT_NOTIFICATION("OnHashChange") + end + --End Test case HMINegativeCheck.3 + + ----------------------------------------------------------------------------------------- + + --Begin Test case HMINegativeCheck.4 + --Description: + -- Check processing response with fake parameters + + --Requirement id in JAMA: + --SDLAQ-CRS-38 + + --Verification criteria: + --The response contains 2 mandatory parameters "success" and "resultCode", "info" is sent if there is any additional information about the resultCode. + + --Begin Test case HMINegativeCheck.4.1 + --Description: Parameter not from API + function Test:CreateInteractionChoiceSet_FakeParamsInResponse() + local cid = self.mobileSession:SendRPC("CreateInteractionChoiceSet", + { + interactionChoiceSetID = 2045, + choiceSet = + { + + { + choiceID = 2045, + menuName ="Choice2045", + vrCommands = + { + "Choice2045", + }, + image = + { + value ="icon.png", + imageType ="STATIC", + }, + } + } + }) + + + --hmi side: expect VR.AddCommand request + EXPECT_HMICALL("VR.AddCommand", + { + cmdID = 2045, + appID = applicationID, + type = "Choice", + vrCommands = {"Choice2045" } + }) + :Do(function(_,data) + --hmi side: sending VR.AddCommand response + self.hmiConnection:SendResponse(data.id, data.method, "SUCCESS", {fake = "fake"}) + end) + + --mobile side: expect CreateInteractionChoiceSet response + EXPECT_RESPONSE(cid, { success = true, resultCode = "SUCCESS" }) + :ValidIf (function(_,data) + if data.payload.fake then + print(" SDL resend fake parameter to mobile app ") + return false + else + return true + end + end) + + --mobile side: expect OnHashChange notification + EXPECT_NOTIFICATION("OnHashChange") + end + --End Test case HMINegativeCheck.4.1 + + ----------------------------------------------------------------------------------------- + + --Begin Test case HMINegativeCheck.4.2 + --Description: Parameter from another API + function Test:CreateInteractionChoiceSet_ParamsFromOtherAPIInResponse() + local cid = self.mobileSession:SendRPC("CreateInteractionChoiceSet", + { + interactionChoiceSetID = 2046, + choiceSet = + { + + { + choiceID = 2046, + menuName ="Choice2046", + vrCommands = + { + "Choice2046", + }, + image = + { + value ="icon.png", + imageType ="STATIC", + }, + } + } + }) + + + --hmi side: expect VR.AddCommand request + EXPECT_HMICALL("VR.AddCommand", + { + cmdID = 2046, + appID = applicationID, + type = "Choice", + vrCommands = {"Choice2046" } + }) + :Do(function(_,data) + --hmi side: sending VR.AddCommand response + self.hmiConnection:SendResponse(data.id, data.method, "SUCCESS", {sliderPosition = 5}) + end) + + --mobile side: expect CreateInteractionChoiceSet response + EXPECT_RESPONSE(cid, { success = true, resultCode = "SUCCESS" }) + :ValidIf (function(_,data) + if data.payload.sliderPosition then + print(" SDL resend fake parameter to mobile app ") + return false + else + return true + end + end) + + --mobile side: expect OnHashChange notification + EXPECT_NOTIFICATION("OnHashChange") + end + --End Test case HMINegativeCheck.4.2 + --End Test case HMINegativeCheck.4 + + ----------------------------------------------------------------------------------------- + + --Begin Test case HMINegativeCheck.5 + --Description: + -- Wrong response with correct HMI correlation id + + --Requirement id in JAMA: + --SDLAQ-CRS-38 + + --Verification criteria: + --The response contains 2 mandatory parameters "success" and "resultCode", "info" is sent if there is any additional information about the resultCode. + + function Test:CreateInteractionChoiceSet_WrongResponseToCorrectID() + local cid = self.mobileSession:SendRPC("CreateInteractionChoiceSet", + { + interactionChoiceSetID = 2049, + choiceSet = + { + + { + choiceID = 2049, + menuName ="Choice2049", + vrCommands = + { + "Choice2049", + }, + image = + { + value ="icon.png", + imageType ="STATIC", + }, + } + } + }) + + + --hmi side: expect VR.AddCommand request + EXPECT_HMICALL("VR.AddCommand", + { + cmdID = 2049, + appID = applicationID, + type = "Choice", + vrCommands = {"Choice2049" } + }) + :Do(function(_,data) + --hmi side: sending VR.AddCommand response + self.hmiConnection:SendResponse(data.id, "UI.AddCommand", "SUCCESS", {}) + end) + + --mobile side: expect CreateInteractionChoiceSet response + EXPECT_RESPONSE(cid, { success = false, resultCode = "GENERIC_ERROR" }) + :Timeout(12000) + + --mobile side: expect OnHashChange notification is not send to mobile + EXPECT_NOTIFICATION("OnHashChange") + :Times(0) + end + --End Test case HMINegativeCheck.5 + --End Test suit HMINegativeCheck + + +---------------------------------------------------------------------------------------------- +-----------------------------------------VI TEST BLOCK---------------------------------------- +-------------------------Sequence with emulating of user's action(s)-------------------------- +---------------------------------------------------------------------------------------------- + + --Begin Test suit SequenceCheck + --Description: TC's checks SDL behavior by processing + -- different request sequence with timeout + -- with emulating of user's actions + + --Begin Test case SequenceCheck.1 + --Description: GrammarID should be generated by SDL for every application and assigned to every VR choiceSet. + + --Requirement id in JAMA: + --SDLAQ-CRS-2799 + + --Verification criteria: + -- One unique grammarID across all apps and commands is assigned for a choice set. + -- Every choice of a choiceSet has the same grammarID, but different unique choiceIDs. + local grammarID01, grammarID02, grammarID03, grammarID04, grammarID05, grammarID06, grammarID07 + function Test:CreateInteractionChoiceSet_SameGrammarIDForEveryChoiceOfAChoiceSet() + --mobile side: sending CreateInteractionChoiceSet request + local cid = self.mobileSession:SendRPC("CreateInteractionChoiceSet", + { + interactionChoiceSetID = 1, + choiceSet = + { + + { + choiceID = 9000, + menuName ="Choice9000", + vrCommands = + { + "super","best" + }, + image = + { + value ="icon.png", + imageType ="STATIC", + }, + }, + { + choiceID = 9001, + menuName ="Choice9001", + vrCommands = + { + "magnificant","incredible" + }, + image = + { + value ="icon.png", + imageType ="STATIC", + }, + } + } + }) + + + --hmi side: expect VR.AddCommand request + EXPECT_HMICALL("VR.AddCommand", + { + cmdID = 9000, + appID = applicationID, + type = "Choice", + vrCommands = {"super","best"} + }, + { + cmdID = 9001, + appID = applicationID, + type = "Choice", + vrCommands = {"magnificant","incredible"} + }) + :Times(2) + :Do(function(exp,data) + --hmi side: sending VR.AddCommand response + if (exp.occurences == 1) then + grammarID01 = data.params.grammarID + self.hmiConnection:SendResponse(data.id, data.method, "SUCCESS", {}) + else + grammarID02 = data.params.grammarID + self.hmiConnection:SendResponse(data.id, data.method, "SUCCESS", {}) + end + end) + + --mobile side: expect CreateInteractionChoiceSet response + EXPECT_RESPONSE(cid, { success = true, resultCode = "SUCCESS" }) + :ValidIf (function(_,data) + if (grammarID01 == grammarID02) then + return true + else + print("GrammarID is different between choice of a choiceSet") + return false + end + end) + --mobile side: expect OnHashChange notification + EXPECT_NOTIFICATION("OnHashChange") + + end + + function Test:CreateInteractionChoiceSet_DiffGrammarIDForDiffChoiceSet() + --mobile side: sending CreateInteractionChoiceSet request + local cid = self.mobileSession:SendRPC("CreateInteractionChoiceSet", + { + interactionChoiceSetID = 2, + choiceSet = + { + + { + choiceID = 9002, + menuName ="Choice9002", + vrCommands = + { + "something","else" + }, + image = + { + value ="icon.png", + imageType ="STATIC", + }, + } + } + }) + + + --hmi side: expect VR.AddCommand request + EXPECT_HMICALL("VR.AddCommand", + { + cmdID = 9002, + appID = applicationID, + type = "Choice", + vrCommands = {"something","else"} + }) + :Do(function(_,data) + --hmi side: sending VR.AddCommand response + grammarID03 = data.params.grammarID + self.hmiConnection:SendResponse(data.id, data.method, "SUCCESS", {}) + end) + + --mobile side: expect CreateInteractionChoiceSet response + EXPECT_RESPONSE(cid, { success = true, resultCode = "SUCCESS" }) + :ValidIf (function(_,data) + if (grammarID03 ~= grammarID02) then + return true + else + print("GrammarID is the same for different choiceSet") + return false + end + end) + --mobile side: expect OnHashChange notification + EXPECT_NOTIFICATION("OnHashChange") + + end + + function Test:Precondition_CreationNewSession() + -- Connected expectation + self.mobileSession1 = mobile_session.MobileSession( + self, + self.mobileConnection) + + self.mobileSession1:StartService(7) + end + + function Test:RegisterSecondApp() + --mobile side: sending request + local CorIdRegister = self.mobileSession1:SendRPC("RegisterAppInterface", config.application2.registerAppInterfaceParams) + + --hmi side: expect BasicCommunication.OnAppRegistered request + EXPECT_HMINOTIFICATION("BasicCommunication.OnAppRegistered", + { + application = + { + appName = "Test Application2" + } + }) + :Do(function(_,data) + self.applications["Test Application2"] = data.params.application.appID + end) + + --print("\27[31m DEFECT: APPLINK-24359\27[0m") + --mobile side: expect response + self.mobileSession1:ExpectResponse(CorIdRegister, + { + syncMsgVersion = + { + majorVersion = 3, + minorVersion = 0 + } + }) + :Timeout(2000) + + --mobile side: expect notification + self.mobileSession1:ExpectNotification("OnHMIStatus", + { + systemContext = "MAIN", hmiLevel = "NONE", audioStreamingState = "NOT_AUDIBLE" + }) + :Timeout(2000) + end + + function Test:Precondition_ActivateApp2() + + local rid = self.hmiConnection:SendRequest("SDL.ActivateApp", { appID = self.applications["Test Application2"]}) + + EXPECT_HMIRESPONSE(rid) + :Do(function(_,data) + if data.result.code ~= 0 then + quit() + end + end) + + --mobile side: expect notification + self.mobileSession1:ExpectNotification("OnHMIStatus", {hmiLevel = "FULL", systemContext = "MAIN"}) + end + + function Test:CreateInteractionChoiceSet_SameVrCommandDiffApp() + --mobile side: sending CreateInteractionChoiceSet request + local cid = self.mobileSession1:SendRPC("CreateInteractionChoiceSet", + { + interactionChoiceSetID = 1, + choiceSet = + { + + { + choiceID = 9004, + menuName ="Choice9004", + vrCommands = + { + "super","best" + }, + image = + { + value ="icon.png", + imageType ="STATIC", + }, + }, + { + choiceID = 9005, + menuName ="Choice9005", + vrCommands = + { + "magnificant","incredible" + }, + image = + { + value ="icon.png", + imageType ="STATIC", + }, + } + } + }) + + + --hmi side: expect VR.AddCommand request + EXPECT_HMICALL("VR.AddCommand", + { + cmdID = 9004, + appID = self.applications["Test Application2"] , + type = "Choice", + vrCommands = {"super","best"} + }, + { + cmdID = 9005, + appID = self.applications["Test Application2"] , + type = "Choice", + vrCommands = {"magnificant","incredible"} + }) + :Times(2) + :Do(function(exp,data) + --hmi side: sending VR.AddCommand response + if (exp.occurences == 1) then + grammarID04 = data.params.grammarID + self.hmiConnection:SendResponse(data.id, data.method, "SUCCESS", {}) + else + grammarID05 = data.params.grammarID + self.hmiConnection:SendResponse(data.id, data.method, "SUCCESS", {}) + end + end) + + --mobile side: expect CreateInteractionChoiceSet response + self.mobileSession1:ExpectResponse(cid, { success = true, resultCode = "SUCCESS" }) + :ValidIf (function(_,data) + if (grammarID04 == grammarID05) then + return true + else + print("GrammarID is different between choice of a choiceSet") + return false + end + + if (grammarID04 ~= grammarID02 and grammarID04 ~= grammarID03) then + return true + else + print("GrammarID is not unique across all apps") + return false + end + end) + + --mobile side: expect OnHashChange notification + self.mobileSession1:ExpectNotification("OnHashChange",{}) + + end + + function Test:CreateInteractionChoiceSet_SameVrCommandDiffChoiceSetDiffApp() + --mobile side: sending CreateInteractionChoiceSet request + local cid = self.mobileSession1:SendRPC("CreateInteractionChoiceSet", + { + interactionChoiceSetID = 2, + choiceSet = + { + + { + choiceID = 9006, + menuName ="The Show", + vrCommands = + { + "something", "else" + }, + image = + { + value ="icon.png", + imageType ="STATIC", + }, + }, + { + choiceID = 9007, + menuName ="The", + vrCommands = + { + "some" + }, + image = + { + value ="icon.png", + imageType ="STATIC", + }, + } + } + }) + + + --hmi side: expect VR.AddCommand request + EXPECT_HMICALL("VR.AddCommand", + { + cmdID = 9006, + appID = self.applications["Test Application2"] , + type = "Choice", + vrCommands = {"something", "else"} + }, + { + cmdID = 9007, + appID = self.applications["Test Application2"] , + type = "Choice", + vrCommands = {"some"} + }) + :Times(2) + :Do(function(exp,data) + --hmi side: sending VR.AddCommand response + if (exp.occurences == 1) then + grammarID06 = data.params.grammarID + self.hmiConnection:SendResponse(data.id, data.method, "SUCCESS", {}) + else + grammarID07 = data.params.grammarID + self.hmiConnection:SendResponse(data.id, data.method, "SUCCESS", {}) + end + end) + + --mobile side: expect CreateInteractionChoiceSet response + self.mobileSession1:ExpectResponse(cid, { success = true, resultCode = "SUCCESS" }) + :ValidIf (function(_,data) + if (grammarID06 == grammarID07) then + return true + else + print("GrammarID is different between choice of a choiceSet") + return false + end + + if (grammarID06 ~= grammarID04) then + return true + else + print("GrammarID is not unique across all apps") + return false + end + end) + --mobile side: expect OnHashChange notification + self.mobileSession1:ExpectNotification("OnHashChange",{}) + + end + + function Test:Precondition_ActivateApp1() + + local rid = self.hmiConnection:SendRequest("SDL.ActivateApp", { appID = self.applications["Test Application"]}) + + EXPECT_HMIRESPONSE(rid) + :Do(function(_,data) + if data.result.code ~= 0 then + quit() + end + end) + + --mobile side: expect notification + self.mobileSession:ExpectNotification("OnHMIStatus", {hmiLevel = "FULL", systemContext = "MAIN"}) + end + + function Test:Precondition_PerformInteractionApp1() + local cid = self.mobileSession:SendRPC("PerformInteraction", + { + initialText = "StartPerformInteraction", + initialPrompt = { + { + text = "Makeyourchoice", + type = "TEXT" + } + }, + interactionMode = "BOTH", + interactionChoiceSetIDList = { 2 }, + timeout = 5000 + }) + + EXPECT_HMICALL("VR.PerformInteraction", + { + grammarID = {grammarID03} + }) + :Do(function(_,data) + self.hmiConnection:SendResponse(data.id, data.method, "SUCCESS", {choiceID = 9002}) + end) + + EXPECT_HMICALL("UI.PerformInteraction", + { }) + :Do(function(_,data) + self.hmiConnection:SendError(data.id, data.method, "ABORTED", "Perform Interaction error response.") + end) + + EXPECT_RESPONSE(cid, { success = true, resultCode = "SUCCESS", choiceID = 9002 }) + + end + + function Test:Precondition_ActivateApp2() + + local rid = self.hmiConnection:SendRequest("SDL.ActivateApp", { appID = self.applications["Test Application2"]}) + + EXPECT_HMIRESPONSE(rid) + :Do(function(_,data) + if data.result.code ~= 0 then + quit() + end + end) + + --mobile side: expect notification + self.mobileSession1:ExpectNotification("OnHMIStatus", {hmiLevel = "FULL", systemContext = "MAIN"}) + end + + function Test:Precondition_PerformInteractionApp2() + local cid = self.mobileSession1:SendRPC("PerformInteraction", + { + initialText = "StartPerformInteraction", + initialPrompt = { + { + text = "Makeyourchoice", + type = "TEXT" + } + }, + interactionMode = "BOTH", + interactionChoiceSetIDList = { 1, 2 }, + timeout = 5000 + }) + + EXPECT_HMICALL("VR.PerformInteraction", + { + grammarID = {grammarID04, grammarID06} + }) + :Do(function(_,data) + self.hmiConnection:SendResponse(data.id, data.method, "SUCCESS", {choiceID = 9004}) + end) + + EXPECT_HMICALL("UI.PerformInteraction") + :Do(function(_,data) + self.hmiConnection:SendError(data.id, data.method, "ABORTED", "Perform Interaction error response.") + end) + + self.mobileSession1:ExpectResponse(cid, { success = true, resultCode = "SUCCESS", choiceID = 9004 }) + + end + + --End Test suit SequenceCheck + +---------------------------------------------------------------------------------------------- +-----------------------------------------VII TEST BLOCK---------------------------------------- +--------------------------------------Different HMIStatus------------------------------------- +---------------------------------------------------------------------------------------------- + --Description: processing of request/response in different HMIlevels, SystemContext, AudioStreamingState + + --Begin Test suit DifferentHMIlevel + --Description: processing API in different HMILevel + + --Begin Test case DifferentHMIlevel.1 + --Description: + + --Requirement id in JAMA: + --SDLAQ-CRS-768 + + --Verification criteria: + --SDL doesn't reject CreateInteractionChoiceSet request when current HMI is FULL. + --SDL doesn't reject CreateInteractionChoiceSet request when current HMI is LIMITED. + --SDL doesn't reject CreateInteractionChoiceSet request when current HMI is BACKGROUND. + + if + Test.isMediaApplication == true or + Test.appHMITypes["NAVIGATION"] == true then + + --Begin DifferentHMIlevel.1.1 + --Description: SDL doesn't reject CreateInteractionChoiceSet request when current HMI is LIMITED (only for media, navi app) + function Test:Precondition_ActivateApp1() + + local rid = self.hmiConnection:SendRequest("SDL.ActivateApp", { appID = self.applications["Test Application"]}) + + EXPECT_HMIRESPONSE(rid) + :Do(function(_,data) + if data.result.code ~= 0 then + quit() + end + end) + + --mobile side: expect notification + self.mobileSession:ExpectNotification("OnHMIStatus", {hmiLevel = "FULL", systemContext = "MAIN", audioStreamingState = "AUDIBLE"}) + + self.mobileSession1:ExpectNotification("OnHMIStatus", {hmiLevel = "BACKGROUND", systemContext = "MAIN", audioStreamingState = "NOT_AUDIBLE"}) + + end + + function Test:Precondition_DeactivateToLimited() + + --hmi side: sending BasicCommunication.OnAppDeactivated notification + self.hmiConnection:SendNotification("BasicCommunication.OnAppDeactivated", {appID = self.applications["Test Application"], reason = "GENERAL"}) + + EXPECT_NOTIFICATION("OnHMIStatus", + { systemContext = "MAIN", hmiLevel = "LIMITED", audioStreamingState = "AUDIBLE"}) + + end + + function Test:CreateInteractionChoiceSet_HMILevelLimited() + --mobile side: sending CreateInteractionChoiceSet request + local cid = self.mobileSession:SendRPC("CreateInteractionChoiceSet", + { + interactionChoiceSetID = 2050, + choiceSet = + { + + { + choiceID = 2050, + menuName ="Choice2050", + vrCommands = + { + "Choice2050", + }, + image = + { + value ="icon.png", + imageType ="STATIC", + }, + } + } + }) + + + --hmi side: expect VR.AddCommand request + EXPECT_HMICALL("VR.AddCommand", + { + cmdID = 2050, + appID = applicationID, + type = "Choice", + vrCommands = {"Choice2050" } + }) + :Do(function(_,data) + --hmi side: sending VR.AddCommand response + self.hmiConnection:SendResponse(data.id, data.method, "SUCCESS", {}) + end) + + --mobile side: expect CreateInteractionChoiceSet response + EXPECT_RESPONSE(cid, { success = true, resultCode = "SUCCESS" }) + + --mobile side: expect OnHashChange notification + EXPECT_NOTIFICATION("OnHashChange") + end + --End DifferentHMIlevel.1.1 + + --Begin DifferentHMIlevel.1.2 + --Description: SDL doesn't reject CreateInteractionChoiceSet request when current HMI is BACKGROUND. + + --Description:Change HMI to BACKGROUND + function Test:Precondition_ActivateApp2() + + local rid = self.hmiConnection:SendRequest("SDL.ActivateApp", { appID = self.applications["Test Application2"]}) + + EXPECT_HMIRESPONSE(rid) + :Do(function(_,data) + if data.result.code ~= 0 then + quit() + end + end) + + --mobile side: expect notification + self.mobileSession1:ExpectNotification("OnHMIStatus", {hmiLevel = "FULL", systemContext = "MAIN", audioStreamingState = "AUDIBLE"}) + + self.mobileSession:ExpectNotification("OnHMIStatus", {hmiLevel = "BACKGROUND", systemContext = "MAIN", audioStreamingState = "NOT_AUDIBLE"}) + end + end + --Description: CreateInteractionChoiceSet when HMI level BACKGROUND + function Test:CreateInteractionChoiceSet_HMILevelBackground() + local cid = self.mobileSession:SendRPC("CreateInteractionChoiceSet", + { + interactionChoiceSetID = 2051, + choiceSet = + { + + { + choiceID = 2051, + menuName ="Choice2051", + vrCommands = + { + "Choice2051", + }, + image = + { + value ="icon.png", + imageType ="STATIC", + }, + } + } + }) + + + --hmi side: expect VR.AddCommand request + EXPECT_HMICALL("VR.AddCommand", + { + cmdID = 2051, + appID = applicationID, + type = "Choice", + vrCommands = {"Choice2051" } + }) + :Do(function(_,data) + --hmi side: sending VR.AddCommand response + self.hmiConnection:SendResponse(data.id, data.method, "SUCCESS", {}) + end) + + --mobile side: expect CreateInteractionChoiceSet response + EXPECT_RESPONSE(cid, { success = true, resultCode = "SUCCESS" }) + + --mobile side: expect OnHashChange notification + EXPECT_NOTIFICATION("OnHashChange") + end + --End Test case DifferentHMIlevel.1.2 + --End Test case DifferentHMIlevel.1 + --End Test suit DifferentHMIlevel diff --git a/test_scripts/API/ATF_DeleteCommand.lua b/test_scripts/API/ATF_DeleteCommand.lua new file mode 100644 index 0000000000..1e871c6d01 --- /dev/null +++ b/test_scripts/API/ATF_DeleteCommand.lua @@ -0,0 +1,4142 @@ +Test = require('connecttest') +require('cardinalities') + +local module = require("testbase") +local mobile_session = require('mobile_session') +require('user_modules/AppTypes') + +--UPDATED: +config.deviceMAC = "12ca17b49af2289436f303e0166030a21e525d266e209267433801a8fd4071a0" +--ToDo: shall be removed when APPLINK-16610 is fixed +config.defaultProtocolVersion = 2 +local storagePath = config.pathToSDL .. "storage/" ..config.application1.registerAppInterfaceParams.appID.. "_" .. config.deviceMAC.. "/" + +local groupID +local infoMessage = string.rep("a",1000) + +function DelayedExp() + local event = events.Event() + event.matches = function(self, e) return self == e end + EXPECT_EVENT(event, "Delayed event") + RUN_AFTER(function() + RAISE_EVENT(event, event) + end, 2000) +end + + + +--------------------------------------------------------------------------------------------- +-------------------------------------------Preconditions------------------------------------- +--------------------------------------------------------------------------------------------- + --Begin Precondition.1 + --Description: Activation App by sending SDL.ActivateApp + function Test:ActivationApp() + appID1 = self.applications["Test Application"] + --hmi side: sending SDL.ActivateApp request + local RequestId = self.hmiConnection:SendRequest("SDL.ActivateApp", { appID = self.applications["Test Application"]}) + EXPECT_HMIRESPONSE(RequestId) + :Do(function(_,data) + if + data.result.isSDLAllowed ~= true then + local RequestId = self.hmiConnection:SendRequest("SDL.GetUserFriendlyMessage", {language = "EN-US", messageCodes = {"DataConsent"}}) + + --hmi side: expect SDL.GetUserFriendlyMessage message response + --TODO: Update after resolving APPLINK-16094 EXPECT_HMIRESPONSE(RequestId,{result = {code = 0, method = "SDL.GetUserFriendlyMessage"}}) + EXPECT_HMIRESPONSE(RequestId) + :Do(function(_,data) + --hmi side: send request SDL.OnAllowSDLFunctionality + self.hmiConnection:SendNotification("SDL.OnAllowSDLFunctionality", {allowed = true, source = "GUI", device = {id = config.deviceMAC, name = "127.0.0.1"}}) + + --hmi side: expect BasicCommunication.ActivateApp request + EXPECT_HMICALL("BasicCommunication.ActivateApp") + :Do(function(_,data) + --hmi side: sending BasicCommunication.ActivateApp response + self.hmiConnection:SendResponse(data.id,"BasicCommunication.ActivateApp", "SUCCESS", {}) + end) + :Times(2) + end) + + end + end) + + --mobile side: expect notification + EXPECT_NOTIFICATION("OnHMIStatus", {hmiLevel = "FULL", systemContext = "MAIN"}) + end + --End Precondition.1 + + ----------------------------------------------------------------------------------------- + + --Begin Precondition.2 + --Description: Putting file(PutFiles) + function Test:PutFile() + --mobile side: sending request + local cid = self.mobileSession:SendRPC("PutFile", + { + syncFileName = "icon.png", + fileType = "GRAPHIC_PNG", + persistentFile = false, + systemFile = false + }, "files/icon.png") + + --mobile side: expect response + EXPECT_RESPONSE(cid, { success = true}) + end + --End Precondition.2 + + ----------------------------------------------------------------------------------------- + + --Begin Precondition.3 + --Description: Adding SubMenu(AddSubMenus) + local menuIDValues = {1, 10} + for i=1,#menuIDValues do + Test["AddSubMenuWithId"..menuIDValues[i]] = function(self) + --mobile side: sending request + local cid = self.mobileSession:SendRPC("AddSubMenu", + { + menuID = menuIDValues[i], + menuName = "SubMenu"..tostring(i) + }) + + --hmi side: expect UI.AddSubMenu request + EXPECT_HMICALL("UI.AddSubMenu", + { + menuID = menuIDValues[i], + menuParams = { menuName = "SubMenu"..tostring(i) } + }) + :Do(function(_,data) + --hmi side: expect UI.AddSubMenu response + self.hmiConnection:SendResponse(data.id, data.method, "SUCCESS", {}) + end) + + --mobile side: expect response and notification + EXPECT_RESPONSE(cid, { success = true, resultCode = "SUCCESS" }) + EXPECT_NOTIFICATION("OnHashChange") + end + end + --End Precondition.3 + + ----------------------------------------------------------------------------------------- + + --Begin Precondition.4 + --Description: AddCommand to Submenu with cmdID = 10 + function Test:AddCommand_11ToSubMenu10() + --mobile side: sending request + local cid = self.mobileSession:SendRPC("AddCommand", + { + cmdID = 11, + menuParams = { parentID = 10, position = 1000, menuName ="Command11"}, + vrCommands ={"VR11"}, + cmdIcon = { value ="icon.png", imageType ="DYNAMIC" } + }) + + --hmi side: expect UI.AddCommand request + EXPECT_HMICALL("UI.AddCommand", + { + cmdID = 11, + --cmdIcon = {value = storagePath.."icon.png",imageType = "DYNAMIC"}, --Verification is done below + menuParams = {parentID = 10, position = 1000, menuName ="Command11"} + }) + :ValidIf(function(_,data) + local path = "bin/storage/"..config.application1.registerAppInterfaceParams.appID.. "_" .. config.deviceMAC.. "/" + local value_Icon = path .. "action.png" + + if(data.params.cmdIcon.imageType == "DYNAMIC") then + return true + else + print("\27[31m imageType of menuIcon is WRONG. Expected: DYNAMIC; Real: " .. data.params.cmdIcon.imageType .. "\27[0m") + return false + end + + if(string.find(data.params.cmdIcon.value, value_Icon) ) then + return true + else + print("\27[31m value of menuIcon is WRONG. Expected: ~".. value_Icon .. "; Real: " .. data.params.cmdIcon.value .. "\27[0m") + return false + end + end) + :Do(function(_,data) + --hmi side: sending UI.AddCommand response + self.hmiConnection:SendResponse(data.id, data.method, "SUCCESS", {}) + end) + + --hmi side: expect VR.AddCommand request + EXPECT_HMICALL("VR.AddCommand", + { + cmdID = 11, + vrCommands = {"VR11"} + }) + :Do(function(_,data) + --hmi side: sending VR.DeleteCommand response + grammarIDValue = data.params.grammarID + self.hmiConnection:SendResponse(data.id, data.method, "SUCCESS", {}) + end) + + --mobile side: expect response and notification + EXPECT_RESPONSE(cid, { success = true, resultCode = "SUCCESS" }) + EXPECT_NOTIFICATION("OnHashChange") + end + --End Precondition.4 + + ----------------------------------------------------------------------------------------- + + --Begin Precondition.5 + --Description: Adding commands to both UI and VR + local commandIDValues = { 0, 22, 33, 44, 55, 66, 77, 88, 99, 100, 101, 102, 103, 104, 333, 444, 555, 666, 777, 888, 999, 1010, 1111, 1212, 1313, 1234567890, 2000000000} + for i=1,#commandIDValues do + Test["AddCommandWithId"..commandIDValues[i]] = function(self) + --mobile side: sending AddCommand request + local cid = self.mobileSession:SendRPC("AddCommand", + { + cmdID = commandIDValues[i], + menuParams = + { + menuName = "CommandID"..tostring(commandIDValues[i]) + }, + vrCommands = + { + "VRCommand"..tostring(commandIDValues[i]) + } + }) + + --hmi side: expect UI.AddCommand request + EXPECT_HMICALL("UI.AddCommand", + { + cmdID = commandIDValues[i], + menuParams = + { + menuName ="CommandID"..tostring(commandIDValues[i]) + } + }) + :Do(function(_,data) + --hmi side: sending UI.DeleteCommand response + self.hmiConnection:SendResponse(data.id, data.method, "SUCCESS", {}) + end) + + --hmi side: expect VR.AddCommand request + EXPECT_HMICALL("VR.AddCommand", + { + cmdID = commandIDValues[i], + vrCommands = + { + "VRCommand"..tostring(commandIDValues[i]) + } + }) + :Do(function(_,data) + --hmi side: sending VR.AddCommand response + self.hmiConnection:SendResponse(data.id, data.method, "SUCCESS", {}) + end) + + --mobile side: expect DeleteCommand response + EXPECT_RESPONSE(cid, { success = true, resultCode = "SUCCESS" }) + EXPECT_NOTIFICATION("OnHashChange") + end + end + --End Precondition.5 + + ----------------------------------------------------------------------------------------- + + --Begin Precondition.6 + --Description: Adding commands to UI only + function Test:AddCommand_UIOnly() + --mobile side: sending AddCommand request + local cid = self.mobileSession:SendRPC("AddCommand", + { + cmdID = 1, + menuParams = + { + menuName ="CommandID"..tostring(1) + } + }) + + --hmi side: expect UI.AddCommand request + EXPECT_HMICALL("UI.AddCommand", + { + cmdID = 1, + menuParams = + { + menuName ="CommandID"..tostring(1) + } + }) + :Do(function(_,data) + --hmi side: sending UI.DeleteCommand response + self.hmiConnection:SendResponse(data.id, data.method, "SUCCESS", {}) + end) + + --mobile side: expect DeleteCommand response + EXPECT_RESPONSE(cid, { success = true, resultCode = "SUCCESS" }) + EXPECT_NOTIFICATION("OnHashChange") + end + --End Precondition.6 + + ----------------------------------------------------------------------------------------- + + --Begin Precondition.7 + --Description: Adding commands to VR only + function Test:AddCommand_VROnly() + --mobile side: sending AddCommand request + local cid = self.mobileSession:SendRPC("AddCommand", + { + cmdID = 2, + vrCommands = + { + "VRCommand"..tostring(2) + } + }) + + --hmi side: expect VR.AddCommand request + EXPECT_HMICALL("VR.AddCommand", + { + cmdID = 2, + vrCommands = + { + "VRCommand"..tostring(2) + } + }) + :Do(function(_,data) + --hmi side: sending VR.AddCommand response + self.hmiConnection:SendResponse(data.id, data.method, "SUCCESS", {}) + end) + + --mobile side: expect DeleteCommand response + EXPECT_RESPONSE(cid, { success = true, resultCode = "SUCCESS" }) + EXPECT_NOTIFICATION("OnHashChange") + end + --End Precondition.7 + +--------------------------------------------------------------------------------------------- +-----------------------------------------I TEST BLOCK---------------------------------------- +--CommonRequestCheck: Check of mandatory/conditional request's parameters (mobile protocol)-- +--------------------------------------------------------------------------------------------- + --Begin Test suit PositiveRequestCheck + + --Description: TC's checks processing + -- request with all parameters + -- request with only mandatory parameters + -- request with all combinations of conditional-mandatory parameters (if exist) + -- request with one by one conditional parameters (each case - one conditional parameter) + -- request with missing mandatory parameters one by one (each case - missing one mandatory parameter) + -- request with all parameters are missing + -- request with fake parameters (fake - not from protocol, from another request) + -- request is sent with invalid JSON structure + -- different conditions of correlationID parameter (invalid, several the same etc.) + + + --Begin Test case CommonRequestCheck.1 + --Description:Positive case and in boundary conditions + + --Requirement id in JAMA: + --SDLAQ-CRS-25, + --SDLAQ-CRS-417 + + --Verification criteria: + --DeleteCommand request removes the command with corresponding cmdID from the application and SDL. + --In case SDL can't delete the command with corresponding cmdID from the application, SDL provides the appropriate data about error occured. + --Deleting the command from VR command menu only is executed successfully. The SUCCESS response code is returned. + --Deleting the command from UI Command menu only is executed successfully. The SUCCESS response code is returned. + --Deleting the command from both UI and VR Command menu is executed successfully. The SUCCESS response code is returned. + + --Begin Test case CommonRequestCheck.1.1 + --Description: DeleteCommand from both UI and VR Command menu in main menu + function Test:DeleteCommand_PositiveMainMenu() + --mobile side: sending DeleteCommand request + local cid = self.mobileSession:SendRPC("DeleteCommand", + { + cmdID = 1234567890 + }) + + --hmi side: expect UI.DeleteCommand request + EXPECT_HMICALL("UI.DeleteCommand", + { + cmdID = 1234567890 + }) + :Do(function(_,data) + --hmi side: sending UI.DeleteCommand response + self.hmiConnection:SendResponse(data.id, data.method, "SUCCESS", {}) + end) + + --hmi side: expect VR.DeleteCommand request + EXPECT_HMICALL("VR.DeleteCommand", + { + cmdID = 1234567890 + }) + :Do(function(_,data) + --hmi side: sending VR.DeleteCommand response + self.hmiConnection:SendResponse(data.id, data.method, "SUCCESS", {}) + end) + + --mobile side: expect DeleteCommand response + EXPECT_RESPONSE(cid, { success = true, resultCode = "SUCCESS" }) + + EXPECT_NOTIFICATION("OnHashChange") + end + --End Test case CommonRequestCheck.1.1 + + ----------------------------------------------------------------------------------------- + + --Begin Test case CommonRequestCheck.1.2 + --Description: DeleteCommand from both UI and VR Command menu in sub menu + function Test:DeleteCommand_PositiveSubMenu() + --mobile side: sending DeleteCommand request + local cid = self.mobileSession:SendRPC("DeleteCommand", + { + cmdID = 11 + }) + + --hmi side: expect UI.DeleteCommand request + EXPECT_HMICALL("UI.DeleteCommand", + { + cmdID = 11 + }) + :Do(function(_,data) + --hmi side: sending UI.DeleteCommand response + self.hmiConnection:SendResponse(data.id, data.method, "SUCCESS", {}) + end) + + --hmi side: expect VR.DeleteCommand request + EXPECT_HMICALL("VR.DeleteCommand", + { + cmdID = 11 + }) + :Do(function(_,data) + --hmi side: sending VR.DeleteCommand response + self.hmiConnection:SendResponse(data.id, data.method, "SUCCESS", {}) + end) + + --mobile side: expect DeleteCommand response + EXPECT_RESPONSE(cid, { success = true, resultCode = "SUCCESS" }) + + EXPECT_NOTIFICATION("OnHashChange") + end + --End Test case CommonRequestCheck.1.2 + + ----------------------------------------------------------------------------------------- + + --Begin Test case CommonRequestCheck.1.3 + --Description: DeleteCommand from UI command menu only + function Test:DeleteCommand_UICommandOnly() + --mobile side: sending DeleteCommand request + local cid = self.mobileSession:SendRPC("DeleteCommand", + { + cmdID = 1 + }) + + --hmi side: expect UI.DeleteCommand request + EXPECT_HMICALL("UI.DeleteCommand", + { + cmdID = 1 + }) + :Do(function(_,data) + --hmi side: sending UI.DeleteCommand response + self.hmiConnection:SendResponse(data.id, data.method, "SUCCESS", {}) + end) + + --mobile side: expect DeleteCommand response + EXPECT_RESPONSE(cid, { success = true, resultCode = "SUCCESS" }) + + EXPECT_NOTIFICATION("OnHashChange") + end + --End Test case CommonRequestCheck.1.3 + + ----------------------------------------------------------------------------------------- + + --Begin Test case CommonRequestCheck.1.4 + --Description: DeleteCommand from VR command menu only + function Test:DeleteCommand_VRCommandOnly() + --mobile side: sending DeleteCommand request + local cid = self.mobileSession:SendRPC("DeleteCommand", + { + cmdID = 2 + }) + + --hmi side: expect VR.DeleteCommand request + EXPECT_HMICALL("VR.DeleteCommand", + { + cmdID = 2 + }) + :Do(function(_,data) + --hmi side: sending VR.DeleteCommand response + self.hmiConnection:SendResponse(data.id, data.method, "SUCCESS", {}) + end) + + --mobile side: expect DeleteCommand response + EXPECT_RESPONSE(cid, { success = true, resultCode = "SUCCESS" }) + + EXPECT_NOTIFICATION("OnHashChange") + end + --End Test case CommonRequestCheck.1.4 + + --End Test case CommonRequestCheck.1 + + ----------------------------------------------------------------------------------------- + + --Begin Test case CommonRequestCheck.2 + --Description:with fake parameters + + --Requirement id in JAMA: + --SDLAQ-CRS-25 + --APPLINK-4518 + + --Verification criteria: + --DeleteCommand request removes the command with corresponding cmdID from the application and SDL. + --In case SDL can't delete the command with corresponding cmdID from the application, SDL provides the appropriate data about error occured. + + --Begin Test case CommonRequestCheck.2.1 + --Description:DeleteCommand with parameter not from protocol + function Test:DeleteCommand_WithFakeParam() + + local cid = self.mobileSession:SendRPC("DeleteCommand", + { + cmdID = 22, + fakeParam ="fakeParam", + }) + + --hmi side: expect UI.DeleteCommand request + EXPECT_HMICALL("UI.DeleteCommand", + { + cmdID = 22 + }) + :Do(function(_,data) + --hmi side: sending UI.DeleteCommand response + self.hmiConnection:SendResponse(data.id, data.method, "SUCCESS", {}) + end) + :ValidIf(function(_,data) + if data.params.fakeParam ~= nil then + print(" \27[36m SDL re-sends fakeParam parameters to HMI \27[0m") + return false + else + return true + end + end) + + --hmi side: expect VR.DeleteCommand request + EXPECT_HMICALL("VR.DeleteCommand", + { + cmdID = 22 + }) + :Do(function(_,data) + --hmi side: sending VR.DeleteCommand response + self.hmiConnection:SendResponse(data.id, data.method, "SUCCESS", {}) + end) + :ValidIf(function(_,data) + if data.params.fakeParam ~= nil then + print(" \27[36m SDL re-sends fakeParam parameters to HMI \27[0m") + return false + else + return true + end + end) + + EXPECT_RESPONSE(cid, { success = true, resultCode = SUCCESS }) + + --mobile side: expect OnHashChange notification + EXPECT_NOTIFICATION("OnHashChange") + end + --End Test case CommonRequestCheck.2.1 + + ----------------------------------------------------------------------------------------- + + --Begin Test case CommonRequestCheck.2.2 + --Description:DeleteCommand with parameter from another request + function Test:DeleteCommand_ParamsAnotherRequest() + local cid = self.mobileSession:SendRPC("DeleteCommand", + { + menuID = 33 + }) + + EXPECT_RESPONSE(cid, { success = false, resultCode = "INVALID_DATA" }) + + --mobile side: expect OnHashChange notification is not send to mobile + EXPECT_NOTIFICATION("OnHashChange") + :Times(0) + end + --End Test case CommonRequestCheck.2.2 + + --End Test case CommonRequestCheck.2 + + ----------------------------------------------------------------------------------------- + + --Begin Test case CommonRequestCheck.3 + --Description: Check processing request with invalid JSON syntax + + --Requirement id in JAMA: + --SDLAQ-CRS-418 + + --Verification criteria: + --The request with wrong JSON syntax is sent, the response comes with INVALID_DATA result code. + + function Test:DeleteCommand_IncorrectJSON() + + self.mobileSession.correlationId = self.mobileSession.correlationId + 1 + + local msg = + { + serviceType = 7, + frameInfo = 0, + rpcType = 0, + rpcFunctionId = 6, + rpcCorrelationId = self.mobileSession.correlationId, + --< The same as CommonRequestCheck.1 + + --End test case PositiveRequestCheck.2 + + + --Skipped CommonRequestCheck.3-4: There next checks are not applicable: + -- request with all combinations of conditional-mandatory parameters (if exist) + -- request with one by one conditional parameters (each case - one conditional parameter) + + + + --Begin test case CommonRequestCheck.5 + --Description: This test is intended to check request with missing mandatory parameters one by one (each case - missing one mandatory parameter) + + --Requirement id in JAMA/or Jira ID: SDLAQ-CRS-715 + + --Verification criteria: SDL responses invalid data + + function Test:DeleteFile_missing_mandatory_parameters_syncFileName_INVALID_DATA() + + --mobile side: sending DeleteFile request + local cid = self.mobileSession:SendRPC("DeleteFile", + { + + }) + + --mobile side: expect DeleteFile response + EXPECT_RESPONSE(cid, { success = false, resultCode = "INVALID_DATA", info = nil}) + :Timeout(iTimeout) + + end + + --End test case CommonRequestCheck.5 + + + + --Begin test case PositiveRequestCheck.6 + --Description: check request with all parameters are missing + --> The same as PositiveRequestCheck.5 + + --End test case PositiveRequestCheck.6 + + + --Begin test case PositiveRequestCheck.7 + --Description: check request with fake parameters (fake - not from protocol, from another request) + + --Begin test case CommonRequestCheck.7.1 + --Description: Check request with fake parameters + + --Requirement id in JAMA/or Jira ID: APPLINK-4518 + + --Verification criteria: According to xml tests by Ford team all fake parameters should be ignored by SDL + + --Precondition: PutFile + putfile(self, "test.png", "GRAPHIC_PNG") + + function Test:DeleteFile_FakeParameters_SUCCESS() + + --mobile side: sending DeleteFile request + local cid = self.mobileSession:SendRPC("DeleteFile", + { + fakeParameter = 123, + syncFileName = "test.png" + + }) + + + --hmi side: expect BasicCommunication.OnFileRemoved request + EXPECT_HMINOTIFICATION("BasicCommunication.OnFileRemoved", + { + fileName = strAppFolder .. "test.png", + fileType = "GRAPHIC_PNG", + appID = self.applications[config.application1.registerAppInterfaceParams.appName] + }) + :ValidIf(function(_,data) + if data.params.fakeParameter then + commonFunctions:printError(" SDL re-sends fake parameters to HMI in BasicCommunication.OnFileRemoved") + return false + else + return true + end + end) + + + --mobile side: expect DeleteFile response + EXPECT_RESPONSE(cid, { success = true, resultCode = "SUCCESS" }) + + end + + --End test case CommonRequestCheck.7.1 + + --Begin test case CommonRequestCheck.7.2 + --Description: Check request with parameters of other request + + --Requirement id in JAMA/or Jira ID: APPLINK-4518 + + --Verification criteria: SDL ignores parameters of other request + + --Precondition: PutFile + putfile(self, "test.png", "GRAPHIC_PNG") + + function Test:DeleteFile_ParametersOfOtherRequest_SUCCESS() + + --mobile side: sending DeleteFile request + local cid = self.mobileSession:SendRPC("DeleteFile", + { + syncFileName = "test.png", + ttsChunks = { + TTSChunk = + { + text ="SpeakFirst", + type ="TEXT", + }, + TTSChunk = + { + text ="SpeakSecond", + type ="TEXT", + } + } + }) + + + --hmi side: expect BasicCommunication.OnFileRemoved request + EXPECT_HMINOTIFICATION("BasicCommunication.OnFileRemoved", + { + fileName = strAppFolder .. "test.png", + fileType = "GRAPHIC_PNG", + appID = self.applications[config.application1.registerAppInterfaceParams.appName] + }) + :ValidIf(function(_,data) + if data.params.ttsChunks then + commonFunctions:printError(" SDL re-sends parameters of other request to HMI in BasicCommunication.OnFileRemoved") + return false + else + return true + end + end) + + + --mobile side: expect DeleteFile response + EXPECT_RESPONSE(cid, { success = true, resultCode = "SUCCESS" }) + + end + + --End test case CommonRequestCheck.7.2 + + --End test case PositiveRequestCheck.7 + + + + + --Begin test case CommonRequestCheck.8. + --Description: Check request is sent with invalid JSON structure + + --Requirement id in JAMA/or Jira ID: SDLAQ-CRS-715 + + --Verification criteria: The request with wrong JSON syntax is sent, the response comes with INVALID_DATA result code. + + --Precondition: PutFile + putfile(self, "test.png", "GRAPHIC_PNG") + + -- missing ':' after syncFileName + --payload = '{"syncFileName":"test.png"}' + local payload = '{"syncFileName" "test.png"}' + commonTestCases:VerifyInvalidJsonRequest(33, payload) + + --End test case CommonRequestCheck.8 + + + --Begin test case CommonRequestCheck.9 + --Description: check request correlation Id is duplicated + + --Requirement id in JAMA/or Jira ID: + + --Verification criteria: SDL responses SUCCESS + + --Precondition: PutFile + putfile(self, "test1.png", "GRAPHIC_PNG") + putfile(self, "test2.png", "GRAPHIC_PNG") + + function Test:DeleteFile_Duplicated_CorrelationID_SUCCESS() + + --mobile side: sending DeleteFile request + local cid = self.mobileSession:SendRPC("DeleteFile", + { + syncFileName = "test1.png" + }) + + + + local msg = + { + serviceType = 7, + frameInfo = 0, + rpcType = 0, + rpcFunctionId = 33, --DeleteFileID + rpcCorrelationId = cid, + payload = '{"syncFileName":"test2.png"}' + } + + --hmi side: expect BasicCommunication.OnFileRemoved request + EXPECT_HMINOTIFICATION("BasicCommunication.OnFileRemoved", + { + fileName = strAppFolder .. "test1.png", + fileType = "GRAPHIC_PNG", + appID = self.applications[config.application1.registerAppInterfaceParams.appName] + }, + { + fileName = strAppFolder .. "test2.png", + fileType = "GRAPHIC_PNG", + appID = self.applications[config.application1.registerAppInterfaceParams.appName] + } + ) + :Times(2) + :Do(function(exp,data) + if exp.occurences == 1 then + self.mobileSession:Send(msg) + end + end) + + + --mobile side: expect DeleteFile response + EXPECT_RESPONSE(cid, { success = true, resultCode = "SUCCESS"}) + :Times(2) + + end + + --End test case CommonRequestCheck.9 + ----------------------------------------------------------------------------------------- + + + --End test suit PositiveRequestCheck + + + + +--------------------------------------------------------------------------------------------- +----------------------------------------II TEST BLOCK---------------------------------------- +----------------------------------------Positive cases--------------------------------------- +--------------------------------------------------------------------------------------------- + + + --=================================================================================-- + --------------------------------Positive request check------------------------------- + --=================================================================================-- + + + --check of each request parameter value in bound and boundary conditions + + + --Write NewTestBlock to ATF log + function Test:NewTestBlock() + commonFunctions:printError("****************************** II TEST BLOCK: Positive request check ******************************") + end + + + --Begin test suit PositiveRequestCheck + --Description: check of each request parameter value in bound and boundary conditions + + --Begin test case PositiveRequestCheck.1 + --Description: Check request with syncFileName parameter value in bound and boundary conditions + + --Requirement id in JAMA/or Jira ID: SDLAQ-CRS-150 + --Verification criteria: DeleteFile response is SUCCESS + + + arrFileType = {"GRAPHIC_BMP", "GRAPHIC_JPEG", "GRAPHIC_PNG", "AUDIO_WAVE", "AUDIO_MP3", "AUDIO_AAC", "BINARY", "JSON"} + arrPersistentFile = {false, true} + arrSystemFile = {false} + arrFileName = { + {fileName = "a", reportName = "min_length_a"}, + {fileName = "test", reportName = "middle_length_test"}, + {fileName = str255Chars, reportName = "max_length_255_characters"} + } + + + for j = 1, #arrFileName do + for n = 1, #arrFileType do + for m = 1, #arrPersistentFile do + for i = 1, #arrSystemFile do + + -- Precondition + Test["ListFiles"] = function(self) + + --mobile side: sending ListFiles request + local cid = self.mobileSession:SendRPC("ListFiles", {} ) + + --mobile side: expect DeleteFile response + EXPECT_RESPONSE(cid, + { + success = true, + resultCode = "SUCCESS" + } + ) + :Do(function(_,data) + --Store spaceAvailable value + iSpaceAvailable_BeforePutFile = data.payload.spaceAvailable + --commonFunctions:printError("ListFiles: spaceAvailable: " .. data.payload.spaceAvailable) + end) + end + + --Precondition: PutFile + putfile(self, arrFileName[j], arrFileType[n], arrPersistentFile[m], arrSystemFile[i]) + + strTestCaseName = "DeleteFile_" .. tostring(arrFileName[j].reportName) .. "_FileType_" .. tostring(arrFileType[n]) .. "_PersistentFile_" .. tostring(arrPersistentFile[m]) .. "_SystemFile_" .. tostring(arrSystemFile[i]) + TC_DeleteFile_Check_spaceAvailable_SUCCESS(self, strTestCaseName, arrFileName[j].fileName, arrFileType[n]) + + end + end + end + end + + + --End test suit PositiveRequestCheck.1 + + + --End test suit PositiveRequestCheck + + + --=================================================================================-- + --------------------------------Positive response check------------------------------ + --=================================================================================-- + + --------Checks----------- + -- parameters with values in boundary conditions + + --Write NewTestBlock to ATF log + function Test:NewTestBlock() + commonFunctions:printError("****************************** II TEST BLOCK: Positive response check ******************************") + commonFunctions:printError("There is no response from HMI for this request. => Skipped this part.") + os.execute("sleep "..tonumber(5)) + end + + + --Begin test suit PositiveResponseCheck + --Description: Check positive responses + + --There is response from HMI => Ignore this check. + + + --End test suit PositiveResponseCheck + + + +---------------------------------------------------------------------------------------------- +----------------------------------------III TEST BLOCK---------------------------------------- +----------------------------------------Negative cases---------------------------------------- +---------------------------------------------------------------------------------------------- + + --=================================================================================-- + ---------------------------------Negative request check------------------------------ + --=================================================================================-- + + --------Checks----------- + -- outbound values + -- invalid values(empty, missing, nonexistent, duplicate, invalid characters) + -- parameters with wrong type + -- invalid json + + --Write NewTestBlock to ATF log + function Test:NewTestBlock() + commonFunctions:printError("****************************** III TEST BLOCK: Negative request check ******************************") + end + + --Begin test suit NegativeRequestCheck + --Description: check of each request parameter value out of bound, missing, with wrong type, empty, duplicate etc. + + --Begin test case NegativeRequestCheck.1 + --Description: check of syncFileName parameter value out bound + + --Requirement id in JAMA/or Jira ID: SDLAQ-CRS-150 -> SDLAQ-CRS-715 + + --Verification criteria: SDL returns INVALID_DATA + + --Begin test case NegativeRequestCheck.1.1 + --Description: check of syncFileName parameter value out lower bound + + function Test:DeleteFile_empty_outLowerBound_INVALID_DATA() + + --mobile side: sending DeleteFile request + local cid = self.mobileSession:SendRPC("DeleteFile", + { + syncFileName = "" + }) + + + --hmi side: expect BasicCommunication.OnFileRemoved request + EXPECT_HMINOTIFICATION("BasicCommunication.OnFileRemoved", {} ) + :Timeout(iTimeout) + :Times(0) + + --mobile side: expect DeleteFile response + EXPECT_RESPONSE(cid, {success = false, resultCode = "INVALID_DATA", info = nil}) + end + + --End test case NegativeRequestCheck.1.1 + + --Begin test case NegativeRequestCheck.1.2 + --Description: check of syncFileName parameter value out upper bound (256 characters) + + function Test:DeleteFile_outUpperBound_OfPutFileName_256_INVALID_DATA() + + --mobile side: sending DeleteFile request + local cid = self.mobileSession:SendRPC("DeleteFile", + { + syncFileName = str255Chars .. "x" + }) + + + --hmi side: expect BasicCommunication.OnFileRemoved request + EXPECT_HMINOTIFICATION("BasicCommunication.OnFileRemoved", {} ) + :Timeout(iTimeout) + :Times(0) + + --mobile side: expect DeleteFile response + EXPECT_RESPONSE(cid, {success = false, resultCode = "INVALID_DATA", info = nil}) + end + + --End test case NegativeRequestCheck.1.2 + + --Begin test case NegativeRequestCheck.1.3 + --Description: check of syncFileName parameter value out upper bound (501 characters) + + function Test:DeleteFile_outUpperBound_501_INVALID_DATA() + + --mobile side: sending DeleteFile request + local cid = self.mobileSession:SendRPC("DeleteFile", + { + syncFileName = str255Chars .. str255Chars .. "x" + }) + + + --hmi side: expect BasicCommunication.OnFileRemoved request + EXPECT_HMINOTIFICATION("BasicCommunication.OnFileRemoved", {} ) + :Timeout(iTimeout) + :Times(0) + + --mobile side: expect DeleteFile response + EXPECT_RESPONSE(cid, {success = false, resultCode = "INVALID_DATA", info = nil}) + end + + --End test case NegativeRequestCheck.1.3 + + --End test case NegativeRequestCheck.1 + + + --Begin test case NegativeRequestCheck.2 + --Description: check of syncFileName parameter is invalid values(empty, missing, nonexistent, duplicate, invalid characters) + + --Requirement id in JAMA/or Jira ID: SDLAQ-CRS-150 -> SDLAQ-CRS-715 + + --Verification criteria: SDL returns INVALID_DATA + + --Begin test case NegativeRequestCheck.2.1 + --Description: check of syncFileName parameter is invalid values(empty) + --It is covered in out lower bound case + + --End test case NegativeRequestCheck.2.1 + + + --Begin test case NegativeRequestCheck.2.2 + --Description: check of syncFileName parameter is invalid values(missing) + + --It is covered by DeleteFile_missing_mandatory_parameters_syncFileName_INVALID_DATA + + --End test case NegativeRequestCheck.2.2 + + --Begin test case NegativeRequestCheck.2.3 + --Description: check of syncFileName parameter is invalid values(nonexistent) + + Test["DeleteFile_syncFileName_nonexistentValue_INVALID_DATA"] = function(self) + + --mobile side: sending DeleteFile request + local cid = self.mobileSession:SendRPC("DeleteFile", + { + syncFileName = "nonexistentValue" + }) + + + --hmi side: expect BasicCommunication.OnFileRemoved request + EXPECT_HMINOTIFICATION("BasicCommunication.OnFileRemoved", {}) + :Timeout(iTimeout) + :Times(0) + + --mobile side: expect DeleteFile response + EXPECT_RESPONSE(cid, {success = false, resultCode = "INVALID_DATA", info = nil}) + :Timeout(iTimeout) + end + + --End test case NegativeRequestCheck.2.3 + + --Begin test case NegativeRequestCheck.2.4 + --Description: check of syncFileName parameter is invalid values(duplicate) + + --It is not applicable + + --End test case NegativeRequestCheck.2.4 + + --Begin test case NegativeRequestCheck.2.5 + --Description: check of syncFileName parameter is invalid values(invalid characters) + + --Requirement id in JAMA/or Jira ID: SDLAQ-CRS-715, APPLINK-8083 + + --Verification criteria: SDL returns INVALID_DATA + + --Begin test case NegativeRequestCheck.2.5.1 + --Description: newline character + + --Precondition + putfile(self, "test1.png", "GRAPHIC_PNG") + + Test["DeleteFile_syncFileName_invalid_characters_newline_INVALID_DATA"] = function(self) + + --mobile side: sending DeleteFile request + local cid = self.mobileSession:SendRPC("DeleteFile", + { + syncFileName = "te\nst1.png" + }) + + --hmi side: expect BasicCommunication.OnFileRemoved request + EXPECT_HMINOTIFICATION("BasicCommunication.OnFileRemoved", {} ) + :Timeout(iTimeout) + :Times(0) + + --mobile side: expect DeleteFile response + EXPECT_RESPONSE(cid, {success = false, resultCode = "INVALID_DATA", info = nil}) + :Timeout(12000) + + end + + --End test case NegativeRequestCheck.2.5.1 + + --Begin test case NegativeRequestCheck.2.5.2 + --Description: newline character + + Test["DeleteFile_syncFileName_invalid_characters_tab_INVALID_DATA"] = function(self) + + --mobile side: sending DeleteFile request + local cid = self.mobileSession:SendRPC("DeleteFile", + { + syncFileName = "te\tst1.png" + }) + + --hmi side: expect BasicCommunication.OnFileRemoved request + EXPECT_HMINOTIFICATION("BasicCommunication.OnFileRemoved", {} ) + :Timeout(iTimeout) + :Times(0) + + --mobile side: expect DeleteFile response + EXPECT_RESPONSE(cid, {success = false, resultCode = "INVALID_DATA", info = nil}) + :Timeout(12000) + end + + --End test case NegativeRequestCheck.2.5.2 + + --End test case NegativeRequestCheck.2.5 + + --End test case NegativeRequestCheck.2 + + + --Begin test case NegativeRequestCheck.3 + --Description: check of syncFileName parameter is wrong type + + --Requirement id in JAMA/or Jira ID: SDLAQ-CRS-150 -> SDLAQ-CRS-715 + + --Verification criteria: SDL returns INVALID_DATA + + Test["DeleteFile_syncFileName_wrongType_INVALID_DATA"] = function(self) + + --mobile side: sending DeleteFile request + local cid = self.mobileSession:SendRPC("DeleteFile", + { + syncFileName = 123 + }) + + + --hmi side: expect BasicCommunication.OnFileRemoved request + EXPECT_HMINOTIFICATION("BasicCommunication.OnFileRemoved", + { + syncFileName = "ON\nSCREEN_PRESETS" + }) + :Timeout(iTimeout) + :Times(0) + + --mobile side: expect DeleteFile response + EXPECT_RESPONSE(cid, {success = false, resultCode = "INVALID_DATA", info = nil}) + :Timeout(iTimeout) + + end + + --End test case NegativeRequestCheck.3 + + + --Begin test case NegativeRequestCheck.4 + --Description: request is invalid json + + --payload = '{"syncFileName":"test.png"}' + local Payload = '{"syncFileName", "test.png"}' + + commonTestCases:VerifyInvalidJsonRequest(33, Payload) + + --End test case NegativeRequestCheck.4 + + --Begin test case NegativeRequestCheck.5 + --Description: Delete system file. + + --Requirement id in JAMA/or Jira ID: APPLINK-14119 + + --Verification criteria: SDL returns INVALID_DATA + + arrFileType = {"GRAPHIC_BMP", "GRAPHIC_JPEG", "GRAPHIC_PNG", "AUDIO_WAVE", "AUDIO_MP3", "AUDIO_AAC", "BINARY", "JSON"} + arrPersistentFile = {false, true} + --Defect: APPLINK-14212: DeleteFile response: spaceAvailable parameter is wrong value + arrSystemFile = {true} + arrFileName = { + {fileName = "a", reportName = "min_length_a"}, + {fileName = "test", reportName = "middle_length_test"}, + {fileName = str255Chars, reportName = "max_length_255_characters"} + } + + + for j = 1, #arrFileName do + for n = 1, #arrFileType do + for m = 1, #arrPersistentFile do + for i = 1, #arrSystemFile do + + + --Precondition: PutFile + putfile(self, arrFileName[j], arrFileType[n], arrPersistentFile[m], arrSystemFile[i]) + + strTestCaseName = "DeleteFile_" .. tostring(arrFileName[j].reportName) .. "_FileType_" .. tostring(arrFileType[n]) .. "_PersistentFile_" .. tostring(arrPersistentFile[m]) .. "_SystemFile_" .. tostring(arrSystemFile[i]) + + Test[strTestCaseName] = function(self) + + --mobile side: sending DeleteFile request + local cid = self.mobileSession:SendRPC("DeleteFile", + { + syncFileName = arrFileName[j].fileName + }) + + + --mobile side: expect DeleteFile response + EXPECT_RESPONSE(cid, { success = false, resultCode = "INVALID_DATA"}) + end + + end + end + end + end + + --End test case NegativeRequestCheck.5 + + --End test suit NegativeRequestCheck + + + --=================================================================================-- + ---------------------------------Negative response check------------------------------ + --=================================================================================-- + + --------Checks----------- + -- outbound values + -- invalid values(empty, missing, nonexistent, invalid characters) + -- parameters with wrong type + -- invalid json + + --Write NewTestBlock to ATF log + function Test:NewTestBlock() + commonFunctions:printError("****************************** III TEST BLOCK: Negative response check ******************************") + commonFunctions:printError("There is no response from HMI for this request. => Skipped this part.") + + end + + + --Begin test suit NegativeResponseCheck + --Description: check of each request parameter value out of bound, missing, with wrong type, empty, duplicate etc. + + --There is no response from HMI for this request. => Skipped this part. + + --End test suit NegativeResponseCheck + + + +---------------------------------------------------------------------------------------------- +----------------------------------------IV TEST BLOCK----------------------------------------- +---------------------------------------Result code check-------------------------------------- +---------------------------------------------------------------------------------------------- + + --Check all uncovered pairs resultCodes+success + + + --Write NewTestBlock to ATF log + function Test:NewTestBlock() + commonFunctions:printError("****************************** IV TEST BLOCK: Result code check ******************************") + end + + + --Begin test suit ResultCodeCheck + --Description: check result code of response to Mobile (SDLAQ-CRS-713) + + --Begin test case ResultCodeCheck.1 + --Description: Check resultCode: SUCCESS + + --It is covered by test case CommonRequestCheck.1 + + --End test case resultCodeCheck.1 + + + --Begin test case resultCodeCheck.2 + --Description: Check resultCode: INVALID_DATA + + --Requirement id in JAMA/or Jira ID: SDLAQ-CRS-715 + + --Verification criteria: SDL response INVALID_DATA resultCode to Mobile + + -- It is covered by DeleteFile_empty_outLowerBound_INVALID_DATA + + --End test case resultCodeCheck.2 + + + --Begin test case resultCodeCheck.3 + --Description: Check resultCode: OUT_OF_MEMORY + + --Requirement id in JAMA/or Jira ID: SDLAQ-CRS-716 + + --Verification criteria: SDL returns OUT_OF_MEMORY result code for DeleteFile request IN CASE SDL lacks memory RAM for executing it. + + --ToDo: Can not check this case. + + --End test case resultCodeCheck.3 + + + --Begin test case resultCodeCheck.4 + --Description: Check resultCode: TOO_MANY_PENDING_REQUESTS + + --Requirement id in JAMA/or Jira ID: SDLAQ-CRS-717 + + --Verification criteria: The system has more than 1000 requests at a time that haven't been responded yet.The system sends the responses with TOO_MANY_PENDING_REQUESTS error code for all further requests, until there are less than 1000 requests at a time that have not been responded by the system yet. + + --Move to another script: ATF_DeleteFile_TOO_MANY_PENDING_REQUESTS.lua + + --End test case resultCodeCheck.4 + + + --Begin test case resultCodeCheck.5 + --Description: Check resultCode: APPLICATION_NOT_REGISTERED + + --Requirement id in JAMA/or Jira ID: SDLAQ-CRS-718 + + --Verification criteria: SDL sends APPLICATION_NOT_REGISTERED result code when the app sends a request within the same connection before RegisterAppInterface has been performed yet. + + -- Unregister application + commonSteps:UnregisterApplication() + + --Send DeleteFile when application not registered yet. + function Test:DeleteFile_resultCode_APPLICATION_NOT_REGISTERED() + + --mobile side: sending DeleteFile request + local cid = self.mobileSession:SendRPC("DeleteFile", + { + syncFileName = "test.png" + }) + + --hmi side: expect BasicCommunication.OnFileRemoved request + EXPECT_HMINOTIFICATION("BasicCommunication.OnFileRemoved", {} ) + :Timeout(iTimeout) + :Times(0) + + + --mobile side: expect DeleteFile response + EXPECT_RESPONSE(cid, {success = false, resultCode = "APPLICATION_NOT_REGISTERED", info = nil}) + :Timeout(iTimeout) + end + + -- Register application again + commonSteps:RegisterAppInterface() + + --ToDo: Work around to help script continnue running due to error with UnregisterApplication and RegisterAppInterface again. Remove it when it is not necessary. + commonSteps:RegisterAppInterface() + + -- Activate app again + commonSteps:ActivationApp() + + --End test case resultCodeCheck.5 + + + --Begin test case resultCodeCheck.6 + --Description: Check resultCode: REJECTED + + --Requirement id in JAMA/or Jira ID: SDLAQ-CRS-719, SDLAQ-CRS-2281 + + --Verification criteria: + --1. In case app in HMI level of NONE sends DeleteFile_request AND the number of requests more than value of 'DeleteFileRequest' param defined in .ini file SDL must respond REJECTED result code to this mobile app + + -- Precondition 1: Put 6 files + putfile(self, "test1.png", "GRAPHIC_PNG") + putfile(self, "test2.png", "GRAPHIC_PNG") + putfile(self, "test3.png", "GRAPHIC_PNG") + putfile(self, "test4.png", "GRAPHIC_PNG") + putfile(self, "test5.png", "GRAPHIC_PNG") + putfile(self, "test6.png", "GRAPHIC_PNG") + + -- Precondition 2: Change app to NONE HMI level + commonSteps:DeactivateAppToNoneHmiLevel() + + -- Precondition 3: Send DeleteFile 5 times + TC_DeleteFile_SUCCESS(self, "DeleteFile_NONE_HMI_LEVEL_test1_png_SUCCESS", "test1.png", "GRAPHIC_PNG") + TC_DeleteFile_SUCCESS(self, "DeleteFile_NONE_HMI_LEVEL_test2_png_SUCCESS", "test2.png", "GRAPHIC_PNG") + TC_DeleteFile_SUCCESS(self, "DeleteFile_NONE_HMI_LEVEL_test3_png_SUCCESS", "test3.png", "GRAPHIC_PNG") + TC_DeleteFile_SUCCESS(self, "DeleteFile_NONE_HMI_LEVEL_test4_png_SUCCESS", "test4.png", "GRAPHIC_PNG") + TC_DeleteFile_SUCCESS(self, "DeleteFile_NONE_HMI_LEVEL_test5_png_SUCCESS", "test5.png", "GRAPHIC_PNG") + + + Test["DeleteFile_NONE_HMI_LEVEL_test6_png_REJECTED"] = function(self) + + --mobile side: sending DeleteFile request + local cid = self.mobileSession:SendRPC("DeleteFile", + { + syncFileName = "test6.png" + }) + + --hmi side: expect BasicCommunication.OnFileRemoved request + EXPECT_HMINOTIFICATION("BasicCommunication.OnFileRemoved", {} ) + :Times(0) + + --mobile side: expect DeleteFile response + EXPECT_RESPONSE(cid, { success = false, resultCode = "REJECTED" }) + end + + -- Activate app again + commonSteps:ActivationApp() + + TC_DeleteFile_SUCCESS(self, "DeleteFile_FULL_HMI_LEVEL_test6_png_SUCCESS", "test6.png", "GRAPHIC_PNG") + + + + + --End test case resultCodeCheck.6 + + + --Begin test case resultCodeCheck.7 + --Description: Check resultCode: GENERIC_ERROR + + --Requirement id in JAMA/or Jira ID: SDLAQ-CRS-720 + + --Verification criteria: GENERIC_ERROR comes as a result code in response when all other codes aren't applicable or the unknown issue occurred. + + --ToDo: Don't know how to produce this case. + + --End test case resultCodeCheck.7 + + + --Begin test case resultCodeCheck.8 + --Description: Check resultCode: UNSUPPORTED_REQUEST + + --Requirement id in JAMA/or Jira ID: SDLAQ-CRS-1041 (APPLINK-9867 question) + + --Verification criteria: The platform doesn't support file operations, the UNSUPPORTED_REQUEST responseCode is obtained. General request result is success=false. + + --ToDo: This requirement is not applicable because current SDL supports DeleteFile API + + --End test case resultCodeCheck.8 + + + --End test suit resultCodeCheck + + + +---------------------------------------------------------------------------------------------- +-----------------------------------------V TEST BLOCK----------------------------------------- +---------------------------------------HMI negative cases------------------------------------- +---------------------------------------------------------------------------------------------- + + --------Checks----------- + -- requests without responses from HMI + -- invalid structure of response + -- several responses from HMI to one request + -- fake parameters + -- HMI correlation id check + -- wrong response with correct HMI id + + + --Write NewTestBlock to ATF log + function Test:NewTestBlock() + commonFunctions:printError("****************************** V TEST BLOCK: HMI negative cases ******************************") + commonFunctions:printError("There is no response from HMI for this request. => Skipped this part.") + end + + --Begin test suit HMINegativeCheck + --Description: Check negative response from HMI + + --There is no response from HMI for this request. => Skipped this part. + + --End test suit HMINegativeCheck + + + +---------------------------------------------------------------------------------------------- +-----------------------------------------VI TEST BLOCK---------------------------------------- +-------------------------Sequence with emulating of user's action(s)-------------------------- +---------------------------------------------------------------------------------------------- + + -- Check different request sequence with timeout, emulating of user's actions + + + --Write NewTestBlock to ATF log + function Test:NewTestBlock() + commonFunctions:printError("****************************** VI TEST BLOCK: Sequence with emulating of user's action(s) ******************************") + end + + --Begin test suit SequenceCheck + --Description: TC's checks SDL behavior by processing + -- different request sequence with timeout + -- with emulating of user's actions + + + --Begin test case SequenceCheck.1 + --Description: Check scenario in test case TC_DeleteFile_01: Delete files from SDL Core with next file types: + -- GRAPHIC_BMP + -- GRAPHIC_JPEG + -- GRAPHIC_PNG + -- AUDIO_WAVE + -- AUDIO_MP3 + + --Requirement id in JAMA/or Jira ID: SDLAQ-CRS-150 + + --Verification criteria: DeleteFile request is sent for a file already stored in the app's local cache on SDL (app's folder on SDL) and not marked as persistent file on SDL during current ignition/session cycle, the result of the request is deleting the corresponding file from the app's folder on SDL. + + + -- Precondition: PutFile icon_bmp.bmp, icon_jpg.jpeg, icon_png.png, tone_wave.wav, tone_mp3.mp3 + putfile(self, "icon_bmp.bmp", "GRAPHIC_BMP", false, false, "icon_bmp.bmp") + putfile(self, "icon_jpg.jpeg", "GRAPHIC_JPEG", false, false, "icon_jpg.jpeg") + putfile(self, "icon_png.png", "GRAPHIC_PNG", false, false, "icon_png.png") + putfile(self, "tone_wave.wav", "AUDIO_WAVE", false, false, "tone_wave.wav") + putfile(self, "tone_mp3.mp3", "AUDIO_MP3", false, false, "tone_mp3.mp3") + + + Test["ListFile_ContainsPutFiles"] = function(self) + + --mobile side: sending ListFiles request + local cid = self.mobileSession:SendRPC("ListFiles", {} ) + + --mobile side: expect DeleteFile response + EXPECT_RESPONSE(cid, + { + success = true, + resultCode = "SUCCESS", + filenames = + { + "icon_bmp.bmp", + "icon_jpg.jpeg", + "icon_png.png", + "tone_mp3.mp3", + "tone_wave.wav" + } + } + ) + end + + + TC_DeleteFile_SUCCESS(self, "TC_DeleteFile_01_icon_bmp.bmp", "icon_bmp.bmp", "GRAPHIC_BMP") + TC_DeleteFile_SUCCESS(self, "TC_DeleteFile_01_icon_jpg.jpeg", "icon_jpg.jpeg", "GRAPHIC_JPEG") + TC_DeleteFile_SUCCESS(self, "TC_DeleteFile_01_icon_png.png", "icon_png.png", "GRAPHIC_PNG") + TC_DeleteFile_SUCCESS(self, "TC_DeleteFile_01_tone_wave.wav", "tone_wave.wav", "AUDIO_WAVE") + TC_DeleteFile_SUCCESS(self, "TC_DeleteFile_01_tone_mp3.mp3", "tone_mp3.mp3", "AUDIO_MP3") + + Test["ListFile_WihtoutDeletedFiles"] = function(self) + + --mobile side: sending ListFiles request + local cid = self.mobileSession:SendRPC("ListFiles", {} ) + + --mobile side: expect DeleteFile response + EXPECT_RESPONSE(cid, + { + success = true, + resultCode = "SUCCESS" + } + ) + :ValidIf(function(_,data) + local removedFileNames = + { + "icon_bmp.bmp", + "icon_jpg.jpeg", + "icon_png.png", + "tone_mp3.mp3", + "tone_wave.wav" + } + local blnResult = true + if data.payload.filenames ~= nil then + for i = 1, #removedFileNames do + for j =1, #data.payload.filenames do + if removedFileNames[i] == data.payload.filenames[j] then + commonFunctions:printError("Failed: " .. removedFileNames[i] .. " is still in result of ListFiles request") + blnResult = false + break + end + end + end + else + print( " \27[32m ListFiles response came without filenames \27[0m " ) + return true + end + + return blnResult + end) + end + + + --End test case SequenceCheck.1 + + ---------------------------------------------------------------------------------------------- + --Print new line to separate new test cases + commonFunctions:newTestCasesGroup("Test case: TC_OnFileRemoved_01") + --Begin test case SequenceCheck.2 + --Description: Cover TC_OnFileRemoved_01 + + --Requirement id in JAMA/or Jira ID: SDLAQ-TC-329 + + --Verification criteria: Checking sending OnFileRemoved notification by Core to HMI and changing app icon to default after deleting file which was set for app icon. (Checking for GRAPHIC_BMP, GRAPHIC_JPEG, GRAPHIC_PNG image types). + local function TC_OnFileRemoved_01(imageFile, imageTypeValue) + putfile(self, imageFile, imageTypeValue,_,_,imageFile) + + function Test:SetAppIcon() + --mobile side: sending SetAppIcon request + local cid = self.mobileSession:SendRPC("SetAppIcon",{ syncFileName = imageFile }) + + --hmi side: expect UI.SetAppIcon request + EXPECT_HMICALL("UI.SetAppIcon", + { + appID = self.applications[config.application1.registerAppInterfaceParams.appName], + syncFileName = + { + imageType = "DYNAMIC", + value = strAppFolder .. imageFile + } + }) + :Do(function(_,data) + --hmi side: sending UI.SetAppIcon response + self.hmiConnection:SendResponse(data.id, data.method, "SUCCESS", {}) + end) + + --mobile side: expect SetAppIcon response + EXPECT_RESPONSE(cid, { resultCode = "SUCCESS", success = true }) + end + + TC_DeleteFile_SUCCESS(self, "DeleteFile_"..imageFile, imageFile, imageTypeValue) + end + local imageFile = {{fileName = "action.png", fileType ="GRAPHIC_PNG"}, + {fileName = "action.bmp", fileType ="GRAPHIC_BMP"}, + {fileName = "action.jpeg", fileType ="GRAPHIC_JPEG"}} + + for i=1,#imageFile do + TC_OnFileRemoved_01(imageFile[i].fileName, imageFile[i].fileType) + end + --End test case SequenceCheck.2 + + ---------------------------------------------------------------------------------------------- + --Print new line to separate new test cases + commonFunctions:newTestCasesGroup("Test case: TC_OnFileRemoved_02") + --Begin test case SequenceCheck.3 + --Description: Cover TC_OnFileRemoved_02 + + --Requirement id in JAMA/or Jira ID: SDLAQ-TC-330 + + --Verification criteria: Checking sending OnFileRemoved notification by Core to HMI and changing Show image to default after deleting file which was set for Show image. (Checking for GRAPHIC_BMP, GRAPHIC_JPEG, GRAPHIC_PNG image types). + local function TC_OnFileRemoved_02(imageFile, imageTypeValue) + putfile(self, imageFile, imageTypeValue,_,_,imageFile) + + function Test:Show() + --mobile side: sending Show request + local cidShow = self.mobileSession:SendRPC("Show", { + mediaClock = "12:34", + mainField1 = "Show Line 1", + mainField2 = "Show Line 2", + mainField3 = "Show Line 3", + mainField4 = "Show Line 4", + graphic = + { + value = imageFile, + imageType = "DYNAMIC" + }, + secondaryGraphic = + { + value = imageFile, + imageType = "DYNAMIC" + }, + statusBar = "new status bar", + mediaTrack = "Media Track" + }) + --hmi side: expect UI.Show request + EXPECT_HMICALL("UI.Show", { + graphic = + { + imageType = "DYNAMIC", + value = strAppFolder..imageFile + }, + secondaryGraphic = + { + imageType = "DYNAMIC", + value = strAppFolder..imageFile + }, + showStrings = + { + { + fieldName = "mainField1", + fieldText = "Show Line 1" + }, + { + fieldName = "mainField2", + fieldText = "Show Line 2" + }, + { + fieldName = "mainField3", + fieldText = "Show Line 3" + }, + { + fieldName = "mainField4", + fieldText = "Show Line 4" + }, + { + fieldName = "mediaClock", + fieldText = "12:34" + }, + { + fieldName = "mediaTrack", + fieldText = "Media Track" + }, + { + fieldName = "statusBar", + fieldText = "new status bar" + } + } + }) + :Do(function(_,data) + --hmi side: sending UI.Show response + self.hmiConnection:SendResponse(data.id, data.method, "SUCCESS", {}) + end) + + --mobile side: expect Show response + EXPECT_RESPONSE(cidShow, { success = true, resultCode = "SUCCESS" }) + end + + TC_DeleteFile_SUCCESS(self, "DeleteFile_"..imageFile, imageFile, imageTypeValue) + end + + local imageFile = {{fileName = "action.png", fileType ="GRAPHIC_PNG"}, + {fileName = "action.bmp", fileType ="GRAPHIC_BMP"}, + {fileName = "action.jpeg", fileType ="GRAPHIC_JPEG"}} + + for i=1,#imageFile do + TC_OnFileRemoved_02(imageFile[i].fileName, imageFile[i].fileType) + end + --End test case SequenceCheck.3 + + ----------------------------------------------------------------------------------------- + --Print new line to separate new test cases + commonFunctions:newTestCasesGroup("Test case: TC_OnFileRemoved_03") + --Begin test case SequenceCheck.4 + --Description: Cover TC_OnFileRemoved_03 + + --Requirement id in JAMA/or Jira ID: SDLAQ-TC-331 + + --Verification criteria: Checking sending OnFileRemoved notification by Core to HMI and changing the Command icon to default after deleting file which was set for the icon of this Command. (Checking for GRAPHIC_BMP, GRAPHIC_JPEG, GRAPHIC_PNG image types). + function Test:AddSubMenu() + --mobile side: sending AddSubMenu request + local cid = self.mobileSession:SendRPC("AddSubMenu", + { + menuID = 10, + position = 500, + menuName ="TestMenu" + }) + --hmi side: expect UI.AddSubMenu request + EXPECT_HMICALL("UI.AddSubMenu", + { + menuID = 10, + menuParams = { + position = 500, + menuName ="TestMenu" + } + }) + :Do(function(_,data) + --hmi side: sending UI.AddSubMenu response + self.hmiConnection:SendResponse(data.id, data.method, "SUCCESS", {}) + end) + + --mobile side: expect AddSubMenu response + EXPECT_RESPONSE(cid, { success = true, resultCode = "SUCCESS" }) + + + --mobile side: expect OnHashChange notification + EXPECT_NOTIFICATION("OnHashChange") + end + local function TC_OnFileRemoved_03(imageFile, imageTypeValue, commandID) + putfile(self, imageFile, imageTypeValue,_,_,imageFile) + + function Test:AddCommand() + --mobile side: sending AddCommand request + local cid = self.mobileSession:SendRPC("AddCommand", + { + cmdID = commandID, + menuParams = + { + parentID = 10, + position = 0, + menuName ="TestCommand"..commandID + }, + cmdIcon = + { + value = imageFile, + imageType ="DYNAMIC" + } + }) + --hmi side: expect UI.AddCommand request + EXPECT_HMICALL("UI.AddCommand", + { + cmdID = commandID, + cmdIcon = + { + value = strAppFolder..imageFile, + imageType = "DYNAMIC" + }, + menuParams = + { + parentID = 10, + position = 0, + menuName ="TestCommand"..commandID + } + }) + :Do(function(_,data) + --hmi side: sending UI.AddCommand response + self.hmiConnection:SendResponse(data.id, data.method, "SUCCESS", {}) + end) + + + --mobile side: expect AddCommand response + EXPECT_RESPONSE(cid, { success = true, resultCode = "SUCCESS" }) + + --mobile side: expect OnHashChange notification + EXPECT_NOTIFICATION("OnHashChange") + end + function Test:OpenOptionsMenu() + SendOnSystemContext(self,"MENU") + EXPECT_NOTIFICATION("OnHMIStatus",{ hmiLevel = "FULL", audioStreamingState = audibleState, systemContext = "MENU"}) + end + + TC_DeleteFile_SUCCESS(self, "DeleteFile_"..imageFile, imageFile, imageTypeValue) + function Test:BackToMain() + SendOnSystemContext(self,"MAIN") + EXPECT_NOTIFICATION("OnHMIStatus",{ hmiLevel = "FULL", audioStreamingState = audibleState, systemContext = "MAIN"}) + end + end + local imageFile = {{fileName = "action.png", fileType ="GRAPHIC_PNG"}, + {fileName = "action.bmp", fileType ="GRAPHIC_BMP"}, + {fileName = "action.jpeg", fileType ="GRAPHIC_JPEG"}} + for i=1,#imageFile do + TC_OnFileRemoved_03(imageFile[i].fileName, imageFile[i].fileType, i+10) + end + --End test case SequenceCheck.4 + + ----------------------------------------------------------------------------------------- + --Print new line to separate new test cases + commonFunctions:newTestCasesGroup("Test case: TC_OnFileRemoved_04") + --Begin test case SequenceCheck.5 + --Description: Cover TC_OnFileRemoved_04 + + --Requirement id in JAMA/or Jira ID: SDLAQ-TC-332 + + --Verification criteria: Checking sending OnFileRemoved notification by Core to HMI and changing the SoftButton icon to default after deleting file which was set for the icon of this SoftButton. (Checking for GRAPHIC_BMP, GRAPHIC_JPEG, GRAPHIC_PNG image types). + local function TC_OnFileRemoved_04(imageFile, imageTypeValue) + putfile(self, imageFile, imageTypeValue,_,_,imageFile) + + function Test:ShowWithSoftButton() + --mobile side: sending Show request + local cidShow = self.mobileSession:SendRPC("Show", { + mediaClock = "12:34", + mainField1 = "Show Line 1", + mainField2 = "Show Line 2", + mainField3 = "Show Line 3", + mainField4 = "Show Line 4", + graphic = + { + value = imageFile, + imageType = "DYNAMIC" + }, + secondaryGraphic = + { + value = imageFile, + imageType = "DYNAMIC" + }, + statusBar = "new status bar", + mediaTrack = "Media Track", + softButtons = + { + { + text = "", + systemAction = "DEFAULT_ACTION", + type = "IMAGE", + isHighlighted = true, + image = + { + imageType = "DYNAMIC", + value = imageFile + }, + softButtonID = 1 + } + } + }) + --hmi side: expect UI.Show request + EXPECT_HMICALL("UI.Show", { + graphic = + { + imageType = "DYNAMIC", + value = strAppFolder..imageFile + }, + secondaryGraphic = + { + imageType = "DYNAMIC", + value = strAppFolder..imageFile + }, + showStrings = + { + { + fieldName = "mainField1", + fieldText = "Show Line 1" + }, + { + fieldName = "mainField2", + fieldText = "Show Line 2" + }, + { + fieldName = "mainField3", + fieldText = "Show Line 3" + }, + { + fieldName = "mainField4", + fieldText = "Show Line 4" + }, + { + fieldName = "mediaClock", + fieldText = "12:34" + }, + { + fieldName = "mediaTrack", + fieldText = "Media Track" + }, + { + fieldName = "statusBar", + fieldText = "new status bar" + } + }, + softButtons = + { + { + systemAction = "DEFAULT_ACTION", + type = "IMAGE", + isHighlighted = true, + --[[ TODO: update after resolving APPLINK-16052 + image = + { + imageType = "DYNAMIC", + value = strAppFolder..imageFile + },]] + softButtonID = 1 + } + } + }) + :Do(function(_,data) + --hmi side: sending UI.Show response + self.hmiConnection:SendResponse(data.id, data.method, "SUCCESS", {}) + end) + + --mobile side: expect Show response + EXPECT_RESPONSE(cidShow, { success = true, resultCode = "SUCCESS" }) + end + + TC_DeleteFile_SUCCESS(self, "DeleteFile_"..imageFile, imageFile, imageTypeValue) + end + + local imageFile = {{fileName = "action.png", fileType ="GRAPHIC_PNG"}, + {fileName = "action.bmp", fileType ="GRAPHIC_BMP"}, + {fileName = "action.jpeg", fileType ="GRAPHIC_JPEG"}} + + for i=1,#imageFile do + TC_OnFileRemoved_04(imageFile[i].fileName, imageFile[i].fileType) + end + --End test case SequenceCheck.5 + + ----------------------------------------------------------------------------------------- + --Print new line to separate new test cases + commonFunctions:newTestCasesGroup("Test case: TC_OnFileRemoved_05") + --Begin test case SequenceCheck.6 + --Description: Cover TC_OnFileRemoved_05 + + --Requirement id in JAMA/or Jira ID: SDLAQ-TC-333 + + --Verification criteria: Checking sending OnFileRemoved notification by Core to HMI and changing the Turn icon of TurnList to default after deleting file which was set for the icon of this Turn. (Checking for GRAPHIC_BMP, GRAPHIC_JPEG, GRAPHIC_PNG image types). + local function TC_OnFileRemoved_05(imageFile, imageTypeValue) + putfile(self, imageFile, imageTypeValue,_,_,imageFile) + + function Test:UpdateTurnList() + --mobile side: send UpdateTurnList request + local CorIdUpdateTurnList = self.mobileSession:SendRPC("UpdateTurnList", { + turnList = + { + { + navigationText ="Text", + turnIcon = + { + value = imageFile, + imageType ="DYNAMIC", + } + } + } + }) + + --hmi side: expect Navigation.UpdateTurnList request + EXPECT_HMICALL("Navigation.UpdateTurnList"--[[ TODO: update after resolving APPLINK-16052, + { + turnList = + { + { + navigationText = + { + fieldText = "Text", + fieldName = "turnText" + }, + turnIcon = + { + value =strAppFolder..imageFile, + imageType ="DYNAMIC", + } + } + } + }]]) + :Do(function(_,data) + --hmi side: send Navigation.UpdateTurnList response + self.hmiConnection:SendResponse(data.id, data.method, "SUCCESS",{}) + end) + + --mobile side: expect UpdateTurnList response + EXPECT_RESPONSE(CorIdUpdateTurnList, { success = true, resultCode = "SUCCESS" }) + end + + TC_DeleteFile_SUCCESS(self, "DeleteFile_"..imageFile, imageFile, imageTypeValue) + end + + local imageFile = {{fileName = "action.png", fileType ="GRAPHIC_PNG"}, + {fileName = "action.bmp", fileType ="GRAPHIC_BMP"}, + {fileName = "action.jpeg", fileType ="GRAPHIC_JPEG"}} + + for i=1,#imageFile do + TC_OnFileRemoved_05(imageFile[i].fileName, imageFile[i].fileType) + end + --End test case SequenceCheck.6 + + ----------------------------------------------------------------------------------------- + --Print new line to separate new test cases + commonFunctions:newTestCasesGroup("Test case: TC_OnFileRemoved_06") + --Begin test case SequenceCheck.7 + --Description: Cover TC_OnFileRemoved_06 + + --Requirement id in JAMA/or Jira ID: SDLAQ-TC-334 + + --Verification criteria: Checking sending OnFileRemoved notification by Core to HMI and changing the Turn icon, Next Turn icon to default after deleting file which was set for the Turn icon and Next Turn icon. (Checking for GRAPHIC_BMP, GRAPHIC_JPEG, GRAPHIC_PNG image types). + local function TC_OnFileRemoved_06(imageFile, imageTypeValue) + putfile(self, imageFile, imageTypeValue,_,_,imageFile) + + function Test:ShowConstantTBT() + --mobile side: sending ShowConstantTBT request + cid = self.mobileSession:SendRPC("ShowConstantTBT", { + navigationText1 ="navigationText1", + navigationText2 ="navigationText2", + eta ="12:34", + totalDistance ="100miles", + turnIcon = + { + value =imageFile, + imageType ="DYNAMIC", + }, + nextTurnIcon = + { + value =imageFile, + imageType ="DYNAMIC", + }, + distanceToManeuver = 50.5, + distanceToManeuverScale = 100.5, + maneuverComplete = false, + softButtons = + { + { + type ="BOTH", + text ="Close", + image = + { + value =imageFile, + imageType ="DYNAMIC", + }, + isHighlighted = true, + softButtonID = 44, + systemAction ="DEFAULT_ACTION", + }, + }, + }) + + --hmi side: expect Navigation.ShowConstantTBT request + EXPECT_HMICALL("Navigation.ShowConstantTBT", { + navigationTexts = { + { + fieldName = "navigationText1", + fieldText = "navigationText1" + }, + { + fieldName = "navigationText2", + fieldText = "navigationText2" + }, + { + fieldName = "ETA", + fieldText = "12:34" + }, + { + fieldName = "totalDistance", + fieldText = "100miles" + } + }, + turnIcon = + { + value =strAppFolder..imageFile, + imageType ="DYNAMIC", + }, + nextTurnIcon = + { + value =strAppFolder..imageFile, + imageType ="DYNAMIC", + }, + distanceToManeuver = 50.5, + distanceToManeuverScale = 100.5, + maneuverComplete = false, + softButtons = + { + { + type ="BOTH", + text ="Close", + --[[ TODO: update after resolving APPLINK-16052 + image = + { + value =strAppFolder..imageFile, + imageType ="DYNAMIC", + }, ]] + isHighlighted = true, + softButtonID = 44, + systemAction ="DEFAULT_ACTION", + }, + }, + }) + :Do(function(_,data) + --hmi side: sending Navigation.ShowConstantTBT response + self.hmiConnection:SendResponse(data.id, data.method, "SUCCESS", {}) + end) + + --mobile side: expect SetGlobalProperties response + EXPECT_RESPONSE(cid, { success = true, resultCode = "SUCCESS" }) + end + + TC_DeleteFile_SUCCESS(self, "DeleteFile_"..imageFile, imageFile, imageTypeValue) + end + + local imageFile = {{fileName = "action.png", fileType ="GRAPHIC_PNG"}, + {fileName = "action.bmp", fileType ="GRAPHIC_BMP"}, + {fileName = "action.jpeg", fileType ="GRAPHIC_JPEG"}} + + for i=1,#imageFile do + TC_OnFileRemoved_06(imageFile[i].fileName, imageFile[i].fileType) + end + --End test case SequenceCheck.7 + + ----------------------------------------------------------------------------------------- + --Print new line to separate new test cases + commonFunctions:newTestCasesGroup("Test case: TC_OnFileRemoved_07") + --Begin test case SequenceCheck.8 + --Description: Cover TC_OnFileRemoved_07 + + --Requirement id in JAMA/or Jira ID: SDLAQ-TC-335 + + --Verification criteria: Checking sending OnFileRemoved notification by Core to HMI and changing the VRHelp Item icon to default after deleting file which was set for the VRHelp Item icon. (Checking for GRAPHIC_BMP, GRAPHIC_JPEG, GRAPHIC_PNG image types). + local function TC_OnFileRemoved_07(imageFile, imageTypeValue) + putfile(self, imageFile, imageTypeValue,_,_,imageFile) + + function Test:SetGlobalProperties() + --mobile side: sending SetGlobalProperties request + cid = self.mobileSession:SendRPC("SetGlobalProperties", { + menuTitle = "Menu Title", + timeoutPrompt = + { + { + text = "Timeout prompt", + type = "TEXT" + } + }, + vrHelp = + { + { + position = 1, + image = + { + value = imageFile, + imageType = "DYNAMIC" + }, + text = "Help me!" + } + }, + menuIcon = + { + value = imageFile, + imageType = "DYNAMIC" + }, + helpPrompt = + { + { + text = "Help prompt", + type = "TEXT" + } + }, + vrHelpTitle = "New VR help title", + keyboardProperties = + { + keyboardLayout = "QWERTY", + keypressMode = "SINGLE_KEYPRESS", + limitedCharacterList = + { + "a" + }, + language = "EN-US", + autoCompleteText = "Daemon, Freedom" + } + }) + + --hmi side: expect TTS.SetGlobalProperties request + EXPECT_HMICALL("TTS.SetGlobalProperties", + { + timeoutPrompt = + { + { + text = "Timeout prompt", + type = "TEXT" + } + }, + helpPrompt = + { + { + text = "Help prompt", + type = "TEXT" + } + } + }) + :Do(function(_,data) + --hmi side: sending TTS.SetGlobalProperties response + self.hmiConnection:SendResponse(data.id, data.method, "SUCCESS", {}) + end) + :Timeout(iTimeout) + + --hmi side: expect UI.SetGlobalProperties request + EXPECT_HMICALL("UI.SetGlobalProperties", + { + menuTitle = "Menu Title", + vrHelp = + { + { + position = 1, + --[[ TODO: update after resolving APPLINK-16052 + image = + { + imageType = "DYNAMIC", + value = strAppFolder .. imageFile + },]] + text = "Help me!" + } + }, + menuIcon = + { + imageType = "DYNAMIC", + value = strAppFolder .. imageFile + }, + vrHelpTitle = "New VR help title", + keyboardProperties = + { + keyboardLayout = "QWERTY", + keypressMode = "SINGLE_KEYPRESS", + --[[ TODO: update after resolving APPLINK-16047 + limitedCharacterList = + { + "a" + },]] + language = "EN-US", + autoCompleteText = "Daemon, Freedom" + } + }) + :Do(function(_,data) + --hmi side: sending UI.SetGlobalProperties response + self.hmiConnection:SendResponse(data.id, data.method, "SUCCESS", {}) + end) + :Timeout(iTimeout) + + --mobile side: expect SetGlobalProperties response + EXPECT_RESPONSE(cid, { success = true, resultCode = "SUCCESS"}) + :Timeout(iTimeout) + end + function Test:OpenVRMenu() + SendOnSystemContext(self,"VRSESSION") + EXPECT_NOTIFICATION("OnHMIStatus",{ hmiLevel = "FULL", audioStreamingState = audibleState, systemContext = "VRSESSION"}) + end + TC_DeleteFile_SUCCESS(self, "DeleteFile_"..imageFile, imageFile, imageTypeValue) + function Test:BackToMain() + SendOnSystemContext(self,"MAIN") + EXPECT_NOTIFICATION("OnHMIStatus",{ hmiLevel = "FULL", audioStreamingState = audibleState, systemContext = "MAIN"}) + end + end + + local imageFile = {{fileName = "action.png", fileType ="GRAPHIC_PNG"}, + {fileName = "action.bmp", fileType ="GRAPHIC_BMP"}, + {fileName = "action.jpeg", fileType ="GRAPHIC_JPEG"}} + + for i=1,#imageFile do + TC_OnFileRemoved_07(imageFile[i].fileName, imageFile[i].fileType) + end + --End test case SequenceCheck.8 + + ----------------------------------------------------------------------------------------- + --Print new line to separate new test cases + commonFunctions:newTestCasesGroup("Test case: TC_OnFileRemoved_08") + --Begin test case SequenceCheck.9 + --Description: Cover TC_OnFileRemoved_08 + + --Requirement id in JAMA/or Jira ID: SDLAQ-TC-336 + + --Verification criteria: Checking sending OnFileRemoved notification by Core to HMI and changing the Choice icon to default after deleting file, which was set for the Choice icon, during PerformInteraction. (Checking for GRAPHIC_BMP, GRAPHIC_JPEG, GRAPHIC_PNG image types). + local function TC_OnFileRemoved_08(imageFile, imageTypeValue, idValue) + putfile(self, imageFile, imageTypeValue,_,_,imageFile) + + function Test:CreateInteractionChoiceSet() + --mobile side: sending CreateInteractionChoiceSet request + local cid = self.mobileSession:SendRPC("CreateInteractionChoiceSet", + { + interactionChoiceSetID = idValue, + choiceSet = + { + { + choiceID = idValue, + menuName ="Choice"..idValue, + vrCommands = + { + "VRChoice"..idValue, + }, + image = + { + value =imageFile, + imageType ="DYNAMIC", + }, + } + } + }) + + + --hmi side: expect VR.AddCommand request + EXPECT_HMICALL("VR.AddCommand", + { + cmdID = idValue, + appID = self.applications[config.application1.registerAppInterfaceParams.appName], + type = "Choice", + vrCommands = {"VRChoice"..idValue} + }) + :Do(function(_,data) + --hmi side: sending VR.AddCommand response + grammarIDValue = data.params.grammarID + self.hmiConnection:SendResponse(data.id, data.method, "SUCCESS", {}) + end) + + --mobile side: expect CreateInteractionChoiceSet response + EXPECT_RESPONSE(cid, { success = true, resultCode = "SUCCESS" }) + + --mobile side: expect OnHashChange notification + EXPECT_NOTIFICATION("OnHashChange") + end + + function Test:PerformInteraction() + local paramsSend = { + initialText = "StartPerformInteraction", + initialPrompt = { + { + text = " Make your choice ", + type = "TEXT", + } + }, + interactionMode = "MANUAL_ONLY", + interactionChoiceSetIDList = + { + idValue + }, + helpPrompt = { + { + text = " Help Prompt ", + type = "TEXT", + } + }, + timeoutPrompt = { + { + text = " Time out ", + type = "TEXT", + } + }, + timeout = 5000, + vrHelp = { + { + text = " New VRHelp ", + position = 1, + image = { + value = strAppFolder..imageFile, + imageType = "DYNAMIC", + } + } + }, + interactionLayout = "ICON_ONLY" + } + + --mobile side: sending PerformInteraction request + cid = self.mobileSession:SendRPC("PerformInteraction", paramsSend) + + --hmi side: expect VR.PerformInteraction request + EXPECT_HMICALL("VR.PerformInteraction", + { + helpPrompt = paramsSend.helpPrompt, + initialPrompt = paramsSend.initialPrompt, + timeout = paramsSend.timeout, + timeoutPrompt = paramsSend.timeoutPrompt + }) + :Do(function(_,data) + --Send notification to start TTS + self.hmiConnection:SendNotification("TTS.Started") + self.hmiConnection:SendError(data.id, data.method, "TIMED_OUT", "Perform Interaction error response.") + end) + + --hmi side: expect UI.PerformInteraction request + EXPECT_HMICALL("UI.PerformInteraction", + { + timeout = paramsSend.timeout, + choiceSet = { + { + choiceID = idValue, + --[[ TODO: update after resolving APPLINK-16052 + image = + { + value = strAppFolder..imageFile, + imageType = "DYNAMIC", + },]] + menuName = "Choice"..idValue + } + }, + initialText = + { + fieldName = "initialInteractionText", + fieldText = paramsSend.initialText + } + }) + :Do(function(_,data) + SendOnSystemContext(self,"HMI_OBSCURED") + + --mobile side: sending DeleteFile request + local cid = self.mobileSession:SendRPC("DeleteFile", + { + syncFileName = imageFile + }) + + --hmi side: expect BasicCommunication.OnFileRemoved request + EXPECT_HMINOTIFICATION("BasicCommunication.OnFileRemoved", + { + fileName = strAppFolder .. imageFile, + fileType = imageTypeValue, + appID = self.applications[config.application1.registerAppInterfaceParams.appName] + }) + + --mobile side: expect DeleteFile response + EXPECT_RESPONSE(cid, { success = true, resultCode = "SUCCESS", info = nil }) + :ValidIf (function(_,data) + if data.payload.spaceAvailable == nil then + commonFunctions:printError("spaceAvailable parameter is missed") + return false + else + if file_check(strAppFolder .. imageFile) == true then + print(" \27[36m File is not delete from storage \27[0m ") + return false + else + return true + end + end + end) + + local function uiResponse() + --hmi side: send UI.PerformInteraction response + self.hmiConnection:SendError(data.id, data.method, "TIMED_OUT", "Perform Interaction error response.") + + --Send notification to stop TTS + self.hmiConnection:SendNotification("TTS.Stopped") + SendOnSystemContext(self,"MAIN") + end + RUN_AFTER(uiResponse, 1000) + end) + + --mobile side: OnHMIStatus notifications + ExpectOnHMIStatusWithAudioStateChanged(self, "MANUAL",_, "FULL") + + --mobile side: expect PerformInteraction response + EXPECT_RESPONSE(cid, { success = false, resultCode = "TIMED_OUT"}) + end + end + + local imageFile = {{fileName = "action.png", fileType ="GRAPHIC_PNG"}, + {fileName = "action.bmp", fileType ="GRAPHIC_BMP"}, + {fileName = "action.jpeg", fileType ="GRAPHIC_JPEG"}} + + for i=1,#imageFile do + TC_OnFileRemoved_08(imageFile[i].fileName, imageFile[i].fileType, i+20) + end + --End test case SequenceCheck.9 + + ----------------------------------------------------------------------------------------- + --Print new line to separate new test cases + commonFunctions:newTestCasesGroup("Test case: TC_OnFileRemoved_09") + --Begin test case SequenceCheck.10 + --Description: Cover TC_OnFileRemoved_09 + + --Requirement id in JAMA/or Jira ID: SDLAQ-TC-338 + + --Verification criteria: Checking sending OnFileRemoved notification by Core to HMI and changing the Choice icon to default after deleting file, which was set for the Choice icon, before PerformInteraction. (Checking for GRAPHIC_BMP, GRAPHIC_JPEG, GRAPHIC_PNG image types). + local function TC_OnFileRemoved_09(imageFile, imageTypeValue, idValue) + putfile(self, imageFile, imageTypeValue,_,_,imageFile) + + function Test:CreateInteractionChoiceSet() + --mobile side: sending CreateInteractionChoiceSet request + local cid = self.mobileSession:SendRPC("CreateInteractionChoiceSet", + { + interactionChoiceSetID = idValue, + choiceSet = + { + { + choiceID = idValue, + menuName ="Choice"..idValue, + vrCommands = + { + "VRChoice"..idValue, + }, + image = + { + value =imageFile, + imageType ="DYNAMIC", + }, + } + } + }) + + + --hmi side: expect VR.AddCommand request + EXPECT_HMICALL("VR.AddCommand", + { + cmdID = idValue, + appID = self.applications[config.application1.registerAppInterfaceParams.appName], + type = "Choice", + vrCommands = {"VRChoice"..idValue} + }) + :Do(function(_,data) + --hmi side: sending VR.AddCommand response + grammarIDValue = data.params.grammarID + self.hmiConnection:SendResponse(data.id, data.method, "SUCCESS", {}) + end) + + --mobile side: expect CreateInteractionChoiceSet response + EXPECT_RESPONSE(cid, { success = true, resultCode = "SUCCESS" }) + + --mobile side: expect OnHashChange notification + EXPECT_NOTIFICATION("OnHashChange") + end + + TC_DeleteFile_SUCCESS(self, "DeleteFile_"..imageFile, imageFile, imageTypeValue) + + function Test:PerformInteraction() + local paramsSend = { + initialText = "StartPerformInteraction", + initialPrompt = { + { + text = " Make your choice ", + type = "TEXT", + } + }, + interactionMode = "MANUAL_ONLY", + interactionChoiceSetIDList = + { + idValue + }, + helpPrompt = { + { + text = " Help Prompt ", + type = "TEXT", + } + }, + timeoutPrompt = { + { + text = " Time out ", + type = "TEXT", + } + }, + timeout = 5000, + interactionLayout = "ICON_ONLY" + } + + --mobile side: sending PerformInteraction request + cid = self.mobileSession:SendRPC("PerformInteraction", paramsSend) + + --hmi side: expect VR.PerformInteraction request + EXPECT_HMICALL("VR.PerformInteraction", + { + helpPrompt = paramsSend.helpPrompt, + initialPrompt = paramsSend.initialPrompt, + timeout = paramsSend.timeout, + timeoutPrompt = paramsSend.timeoutPrompt + }) + :Do(function(_,data) + --Send notification to start TTS + self.hmiConnection:SendNotification("TTS.Started") + self.hmiConnection:SendError(data.id, data.method, "TIMED_OUT", "Perform Interaction error response.") + end) + + --hmi side: expect UI.PerformInteraction request + EXPECT_HMICALL("UI.PerformInteraction", + { + timeout = paramsSend.timeout, + choiceSet = { + { + choiceID = idValue, + --[[ TODO: update after resolving APPLINK-16052 + image = + { + value = strAppFolder..imageFile, + imageType = "DYNAMIC", + },]] + menuName = "Choice"..idValue + } + }, + initialText = + { + fieldName = "initialInteractionText", + fieldText = paramsSend.initialText + } + }) + :Do(function(_,data) + --hmi side: send UI.PerformInteraction response + SendOnSystemContext(self,"HMI_OBSCURED") + self.hmiConnection:SendError(data.id, data.method, "TIMED_OUT", "Perform Interaction error response.") + + --Send notification to stop TTS + self.hmiConnection:SendNotification("TTS.Stopped") + SendOnSystemContext(self,"MAIN") + end) + + --mobile side: OnHMIStatus notifications + ExpectOnHMIStatusWithAudioStateChanged(self, "MANUAL",_, "FULL") + + --mobile side: expect PerformInteraction response + EXPECT_RESPONSE(cid, { success = false, resultCode = "TIMED_OUT"}) + end + end + + local imageFile = {{fileName = "action.png", fileType ="GRAPHIC_PNG"}, + {fileName = "action.bmp", fileType ="GRAPHIC_BMP"}, + {fileName = "action.jpeg", fileType ="GRAPHIC_JPEG"}} + + for i=1,#imageFile do + TC_OnFileRemoved_09(imageFile[i].fileName, imageFile[i].fileType, i+30) + end + --End test case SequenceCheck.10 + --End test suit SequenceCheck + +---------------------------------------------------------------------------------------------- +-----------------------------------------VII TEST BLOCK--------------------------------------- +--------------------------------------Different HMIStatus------------------------------------- +---------------------------------------------------------------------------------------------- + + -- processing of request/response in different HMIlevels, SystemContext, AudioStreamingState + + + + --Write NewTestBlock to ATF log + function Test:NewTestBlock() + commonFunctions:printError("****************************** VII TEST BLOCK: Different HMIStatus ******************************") + end + + + --Begin test suit DifferentHMIlevel + --Description: processing API in different HMILevel + + --Requirement id in JAMA/or Jira ID: SDLAQ-CRS-810 + + --Verification criteria: DeleteFile is allowed in NONE, LIMITED, BACKGROUND and FULL HMI level + + --Begin test case DifferentHMIlevel.1 + --Description: Check DeleteFile request when application is in NONE HMI level + + --Requirement id in JAMA/or Jira ID: SDLAQ-CRS-810 + + --Verification criteria: DeleteFile is allowed in NONE HMI level + + -- Precondition 1: Change app to NONE HMI level + commonSteps:DeactivateAppToNoneHmiLevel() + + -- Precondition 2: PutFile + putfile(self, "test.png", "GRAPHIC_PNG") + + TC_DeleteFile_SUCCESS(self, "DeleteFile_HMI_Level_NONE_SUCCESS", "test.png", "GRAPHIC_PNG") + + --Postcondition: Activate app + commonSteps:ActivationApp() + + --End test case DifferentHMIlevel.1 + + + --Begin test case DifferentHMIlevel.2 + --Description: Check DeleteFile request when application is in LIMITED HMI level + + --Requirement id in JAMA/or Jira ID: SDLAQ-CRS-810 + + --Verification criteria: DeleteFile is allowed in LIMITED HMI level + + if commonFunctions:isMediaApp() then + + -- Precondition 1: Change app to LIMITED + commonSteps:ChangeHMIToLimited() + + -- Precondition 2: Put file + putfile(self, "test.png", "GRAPHIC_PNG") + + TC_DeleteFile_SUCCESS(self, "DeleteFile_HMI_Level_LIMITED_SUCCESS", "test.png", "GRAPHIC_PNG") + + end + + --End test case DifferentHMIlevel.2 + + + --Begin test case DifferentHMIlevel.3 + --Description: Check DeleteFile request when application is in BACKGOUND HMI level + + --Requirement id in JAMA/or Jira ID: SDLAQ-CRS-810 + + --Verification criteria: DeleteFile is allowed in BACKGOUND HMI level + + + -- Precondition 1: Change app to BACKGOUND HMI level + commonTestCases:ChangeAppToBackgroundHmiLevel() + + -- Precondition 2: Put file + putfile(self, "test.png", "GRAPHIC_PNG") + + TC_DeleteFile_SUCCESS(self, "DeleteFile_HMI_Level_BACKGROUND_SUCCESS", "test.png", "GRAPHIC_PNG") + + --End test case DifferentHMIlevel.3 + + --End test suit DifferentHMIlevel + + --Postcondition: restore sdl_preloaded_pt.json + policyTable:Restore_preloaded_pt() + +return Test + diff --git a/test_scripts/API/ATF_DeleteInteractionChoiceSet.lua b/test_scripts/API/ATF_DeleteInteractionChoiceSet.lua new file mode 100644 index 0000000000..116c2e3c88 --- /dev/null +++ b/test_scripts/API/ATF_DeleteInteractionChoiceSet.lua @@ -0,0 +1,1774 @@ +Test = require('connecttest') +require('cardinalities') +local events = require('events') +local mobile_session = require('mobile_session') + +--------------------------------------------------------------------------------------------- +-----------------------------Required Shared Libraries--------------------------------------- +--------------------------------------------------------------------------------------------- +local commonFunctions = require('user_modules/shared_testcases/commonFunctions') +local commonSteps = require('user_modules/shared_testcases/commonSteps') +local commonPreconditions = require('user_modules/shared_testcases/commonPreconditions') +local commonTestCases = require('user_modules/shared_testcases/commonTestCases') +local policyTable = require('user_modules/shared_testcases/testCasesForPolicyTable') +local integerParameter = require('user_modules/shared_testcases/testCasesForIntegerParameter') +local stringParameter = require('user_modules/shared_testcases/testCasesForStringParameter') +local arraySoftButtonsParameter = require('user_modules/shared_testcases/testCasesForArraySoftButtonsParameter') +require('user_modules/AppTypes') +-------------------------------------------------------------------------------------------------- + +local infoMessage = "qqwertyuiopasdfghjklzxcvbnm1234567890[]'.!@#$%^&*()_+-=qwertyuiopasdfghjklzxcvbnm1234567890[]'.!@#$%^&*()_+-=QWERTYUIOPASDFGHJKLZXCVBNM{}|?>:::: SDL must cut off fake parameters + + --Begin Test case HMINegativeCheck.3.1 + --Description: Parameter out of protocol + function Test:DeleteInteractionChoiceSet_ResponseWithFakeParamater() + --mobile side: sending request + local cid = self.mobileSession:SendRPC("DeleteInteractionChoiceSet", + { + interactionChoiceSetID = 42 + }) + + --hmi side: expect VR.DeleteCommand request + EXPECT_HMICALL("VR.DeleteCommand", + { + cmdID = 42 + }) + :Do(function(_,data) + --hmi side: sending VR.DeleteCommand response + self.hmiConnection:SendResponse( data.id, data.method, "SUCCESS", {fakeParam = "fakeParam"}) + end) + + --mobile side: expect response + EXPECT_RESPONSE(cid, { success = true, resultCode = "SUCCESS"}) + :ValidIf (function(_,data) + if data.payload.fakeParam then + print(" SDL resend fake parameter to mobile app ") + return false + else + return true + end + end) + + --mobile side: expect OnHashChange notification + EXPECT_NOTIFICATION("OnHashChange") + end + --End Test case HMINegativeCheck.3.1 + + ----------------------------------------------------------------------------------------- + + --Begin Test case HMINegativeCheck.3.2 + --Description: Parameter from another API + function Test:DeleteInteractionChoiceSet_ParamsFromOtherAPIInResponse() + --mobile side: sending request + local cid = self.mobileSession:SendRPC("DeleteInteractionChoiceSet", + { + interactionChoiceSetID = 43 + }) + + --hmi side: expect VR.DeleteCommand request + EXPECT_HMICALL("VR.DeleteCommand", + { + cmdID = 43 + }) + :Do(function(_,data) + --hmi side: sending VR.DeleteCommand response + self.hmiConnection:SendResponse( data.id, data.method, "SUCCESS", {sliderPosition = 5}) + end) + + --mobile side: expect response + EXPECT_RESPONSE(cid, { success = true, resultCode = "SUCCESS"}) + :ValidIf (function(_,data) + if data.payload.sliderPosition then + print(" SDL resend fake parameter to mobile app ") + return false + else + return true + end + end) + + --mobile side: expect OnHashChange notification + EXPECT_NOTIFICATION("OnHashChange") + end + --End Test case HMINegativeCheck.3.2 + --End Test case HMINegativeCheck.3 + + ----------------------------------------------------------------------------------------- + + --Begin Test case HMINegativeCheck.4 + --Description: + -- Several response to one request + + --Requirement id in JAMA: + --SSDLAQ-CRS-479 + + --Verification criteria: + --Send several response to one request + + function Test:DeleteInteractionChoiceSet_SeveralResponseToOneRequest() + --mobile side: sending request + local cid = self.mobileSession:SendRPC("DeleteInteractionChoiceSet", + { + interactionChoiceSetID = 44 + }) + + --hmi side: expect VR.DeleteCommand request + EXPECT_HMICALL("VR.DeleteCommand", + { + cmdID = 44 + }) + :Do(function(_,data) + --hmi side: sending VR.DeleteCommand response + self.hmiConnection:SendResponse( data.id , "VR.DeleteCommand" , "SUCCESS", {}) + self.hmiConnection:SendResponse( data.id , "VR.DeleteCommand" , "INVALID_DATA", {}) + end) + + --mobile side: expect response + EXPECT_RESPONSE(cid, { success = true, resultCode = "SUCCESS"}) + + --mobile side: expect OnHashChange notification + EXPECT_NOTIFICATION("OnHashChange") + end + + --End Test case HMINegativeCheck.4 +--[[TODO: update according to APPLINK-13849 + ----------------------------------------------------------------------------------------- + + --Begin Test case HMINegativeCheck.5 + --Description: + -- HMI correlation id check + + --Requirement id in JAMA: + --SDLAQ-CRS-46 + + --Verification criteria: + --The response contains 2 mandatory parameters "success" and "resultCode", "info" is sent if there is any additional information about the resultCode and "tryAgainTime" if provided by SDL. + + --Begin Test case HMINegativeCheck.5.1 + --Description: Send response to nonexistent HMI correlation id + function Test:DeleteInteractionChoiceSet_ResponseToWrongCorrelation() + --mobile side: sending request + local cid = self.mobileSession:SendRPC("DeleteInteractionChoiceSet", + { + interactionChoiceSetID = 47 + }) + + --hmi side: expect VR.DeleteCommand request + EXPECT_HMICALL("VR.DeleteCommand", + { + cmdID = 47 + }) + :Do(function(_,data) + --hmi side: sending VR.DeleteCommand response + self.hmiConnection:SendResponse( 5555, data.method, "SUCCESS", {}) + end) + + --mobile side: expect response + EXPECT_RESPONSE(cid, { success = false, resultCode = "GENERIC_ERROR"}) + :Timeout(12000) + + --mobile side: expect OnHashChange notification is not send to mobile + EXPECT_NOTIFICATION("OnHashChange") + :Times(0) + :Timeout(12000) + end + --End Test case HMINegativeCheck.5.1 + + ----------------------------------------------------------------------------------------- + + --Begin Test case HMINegativeCheck.5.2 + --Description: Response to another method + function Test:DeleteInteractionChoiceSet_WrongResponse() + --mobile side: sending request + local cid = self.mobileSession:SendRPC("DeleteInteractionChoiceSet", + { + interactionChoiceSetID = 49 + }) + + --hmi side: expect VR.DeleteCommand request + EXPECT_HMICALL("VR.DeleteCommand", + { + cmdID = 49 + }) + :Do(function(_,data) + --hmi side: sending VR.DeleteCommand response + self.hmiConnection:SendResponse( data.id , "UI.DeleteCommand" , "SUCCESS", {}) + end) + + --mobile side: expect response + EXPECT_RESPONSE(cid, { success = false, resultCode = "GENERIC_ERROR"}) + :Timeout(12000) + + --mobile side: expect OnHashChange notification is not send to mobile + EXPECT_NOTIFICATION("OnHashChange") + :Times(0) + :Timeout(12000) + end + --End Test case HMINegativeCheck.5.2 + --End Test case HMINegativeCheck.5 + --End Test suit HMINegativeCheck +]] +---------------------------------------------------------------------------------------------- +-----------------------------------------VII TEST BLOCK---------------------------------------- +--------------------------------------Different HMIStatus------------------------------------- +---------------------------------------------------------------------------------------------- + --Description: processing of request/response in different HMIlevels, SystemContext, AudioStreamingState + + --Begin Test suit DifferentHMIlevel + --Description: processing API in different HMILevel + + --Begin Test case DifferentHMIlevel.1 + --Description: + + --Requirement id in JAMA: + --SDLAQ-CRS-769 + + --Verification criteria: + --SDL rejects DeleteInteractionChoiceSet request with REJECTED resultCode when current HMI level is NONE. + --SDL doesn't reject DeleteInteractionChoiceSet request when current HMI is FULL. + --SDL doesn't reject DeleteInteractionChoiceSet request when current HMI is LIMITED. + --SDL doesn't reject DeleteInteractionChoiceSet request when current HMI is BACKGROUND. + + --Begin DifferentHMIlevel.1.1 + --Description: SDL reject DeleteInteractionChoiceSet request when current HMI is NONE. + function Test:Precondition_DeactivateToNone() + --hmi side: sending BasicCommunication.OnExitApplication notification + self.hmiConnection:SendNotification("BasicCommunication.OnExitApplication", {appID = self.applications["Test Application"], reason = "USER_EXIT"}) + + EXPECT_NOTIFICATION("OnHMIStatus", + { systemContext = "MAIN", hmiLevel = "NONE", audioStreamingState = "NOT_AUDIBLE"}) + end + + function Test:DeleteInteractionChoiceSet_HMILevelNone() + --mobile side: sending DeleteInteractionChoiceSet request + local cid = self.mobileSession:SendRPC("DeleteInteractionChoiceSet", + { + interactionChoiceSetID = 50 + }) + + EXPECT_RESPONSE(cid, { success = false, resultCode = "DISALLOWED" }) + + --mobile side: expect OnHashChange notification is not send to mobile + EXPECT_NOTIFICATION("OnHashChange") + :Times(0) + end + --End DifferentHMIlevel.1.1 + + ----------------------------------------------------------------------------------------- + if Test.isMediaApplication == true or + appHMITypes["NAVIGATION"] == true then + --Begin DifferentHMIlevel.1.2 + --Description: SDL doesn't reject DeleteInteractionChoiceSet request when current HMI is LIMITED. + function Test:Precondition_ActivateFirstApp() + --hmi side: sending SDL.ActivateApp request + local rid = self.hmiConnection:SendRequest("SDL.ActivateApp",{appID = self.applications["Test Application"]}) + EXPECT_HMIRESPONSE(rid) + + --mobile side: expect notification from 2 app + self.mobileSession:ExpectNotification("OnHMIStatus",{hmiLevel = "FULL", systemContext = "MAIN", audioStreamingState = "AUDIBLE"}) + end + + function Test:Precondition_DeactivateToLimited() + --hmi side: sending BasicCommunication.OnAppDeactivated request + local cid = self.hmiConnection:SendNotification("BasicCommunication.OnAppDeactivated", + { + appID = self.applications["Test Application"], + reason = "GENERAL" + }) + + --mobile side: expect OnHMIStatus notification + EXPECT_NOTIFICATION("OnHMIStatus",{hmiLevel = "LIMITED", systemContext = "MAIN", audioStreamingState = "AUDIBLE" }) + end + + function Test:DeleteInteractionChoiceSet_HMILevelLimited() + --mobile side: sending DeleteInteractionChoiceSet request + local cid = self.mobileSession:SendRPC("DeleteInteractionChoiceSet", + { + interactionChoiceSetID = 50 + }) + + --hmi side: expect VR.DeleteCommand request + EXPECT_HMICALL("VR.DeleteCommand", + { + cmdID = 50 + }) + :Do(function(_,data) + --hmi side: sending VR.DeleteCommand response + self.hmiConnection:SendResponse(data.id, data.method, "SUCCESS", {}) + end) + + --mobile side: expect DeleteInteractionChoiceSet response + EXPECT_RESPONSE(cid, { success = true, resultCode = "SUCCESS" }) + + --mobile side: expect OnHashChange notification + EXPECT_NOTIFICATION("OnHashChange") + end + --End DifferentHMIlevel.1.2 + + ----------------------------------------------------------------------------------------- + + --Begin DifferentHMIlevel.1.3 + --Description: SDL doesn't reject DeleteInteractionChoiceSet request when current HMI is BACKGROUND. + + --Description:Start third session + function Test:Precondition_StartThirdSession() + --mobile side: start new session + self.mobileSession2 = mobile_session.MobileSession( + self, + self.mobileConnection) + end + + --Description "Register third app" + function Test:Precondition_RegisterThirdApp() + --mobile side: start new + self.mobileSession2:StartService(7) + :Do(function() + local CorIdRegister = self.mobileSession2:SendRPC("RegisterAppInterface", + { + syncMsgVersion = + { + majorVersion = 3, + minorVersion = 0 + }, + appName = "Test Application3", + isMediaApplication = true, + languageDesired = 'EN-US', + hmiDisplayLanguageDesired = 'EN-US', + appHMIType = { "NAVIGATION" }, + appID = "3" + }) + + --hmi side: expect BasicCommunication.OnAppRegistered request + EXPECT_HMINOTIFICATION("BasicCommunication.OnAppRegistered", + { + application = + { + appName = "Test Application3" + } + }) + :Do(function(_,data) + self.applications["Test Application3"] = data.params.application.appID + end) + + --mobile side: expect response + self.mobileSession2:ExpectResponse(CorIdRegister, { success = true, resultCode = "SUCCESS" }) + :Timeout(2000) + + self.mobileSession2:ExpectNotification("OnHMIStatus",{hmiLevel = "NONE", audioStreamingState = "NOT_AUDIBLE", systemContext = "MAIN"}) + + end) + end + + --Description: Activate third app + function Test:Precondition_ActivateThirdApp() + --hmi side: sending SDL.ActivateApp request + local rid = self.hmiConnection:SendRequest("SDL.ActivateApp",{appID = self.applications["Test Application3"]}) + EXPECT_HMIRESPONSE(rid) + + --mobile side: expect notification from 2 app + self.mobileSession2:ExpectNotification("OnHMIStatus",{hmiLevel = "FULL", systemContext = "MAIN", audioStreamingState = "AUDIBLE"}) + self.mobileSession:ExpectNotification("OnHMIStatus",{hmiLevel = "BACKGROUND", systemContext = "MAIN", audioStreamingState = "NOT_AUDIBLE"}) + end + elseif + Test.isMediaApplication == false then + --Precondition for non-media app type + + function Test:ChangeHMIToBackground() + local cid = self.hmiConnection:SendNotification("BasicCommunication.OnAppDeactivated", + { + appID = self.applications["Test Application"], + reason = "GENERAL" + }) + + EXPECT_NOTIFICATION("OnHMIStatus",{hmiLevel = "BACKGROUND", systemContext = "MAIN", audioStreamingState = "NOT_AUDIBLE"}) + end + end + --Description: DeleteInteractionChoiceSet when HMI level BACKGROUND + function Test:DeleteInteractionChoiceSet_HMILevelBackground() + --mobile side: sending DeleteInteractionChoiceSet request + local cid = self.mobileSession:SendRPC("DeleteInteractionChoiceSet", + { + interactionChoiceSetID = 51 + }) + + --hmi side: expect VR.DeleteCommand request + EXPECT_HMICALL("VR.DeleteCommand", + { + cmdID = 51 + }) + :Do(function(_,data) + --hmi side: sending VR.DeleteCommand response + self.hmiConnection:SendResponse(data.id, data.method, "SUCCESS", {}) + end) + + --mobile side: expect DeleteInteractionChoiceSet response + EXPECT_RESPONSE(cid, { success = true, resultCode = "SUCCESS" }) + + --mobile side: expect OnHashChange notification + EXPECT_NOTIFICATION("OnHashChange") + end + --End Test case DifferentHMIlevel.1.3 + --End Test case DifferentHMIlevel.1 + --End Test suit DifferentHMIlevel + + +--------------------------------------------------------------------------------------------- +-------------------------------------------Postcondition------------------------------------- +--------------------------------------------------------------------------------------------- + + --Print new line to separate Postconditions + commonFunctions:newTestCasesGroup("Postconditions") + + + --Restore sdl_preloaded_pt.json + policyTable:Restore_preloaded_pt() + + + + return Test diff --git a/test_scripts/API/ATF_DeleteSubMenu.lua b/test_scripts/API/ATF_DeleteSubMenu.lua new file mode 100644 index 0000000000..e3e9bfe70c --- /dev/null +++ b/test_scripts/API/ATF_DeleteSubMenu.lua @@ -0,0 +1,2248 @@ +Test = require('connecttest') +require('cardinalities') +local events = require('events') +local mobile_session = require('mobile_session') + +local storagePath = config.pathToSDL .. "storage/" ..config.application1.registerAppInterfaceParams.appID.. "_" .. config.deviceMAC.. "/" +require('user_modules/AppTypes') + +local infoMessage = string.rep("a",1000) + + +function DelayedExp() + local event = events.Event() + event.matches = function(self, e) return self == e end + EXPECT_EVENT(event, "Delayed event") + RUN_AFTER(function() + RAISE_EVENT(event, event) + end, 2000) +end + +--------------------------------------------------------------------------------------------- +-------------------------------------------Preconditions------------------------------------- +--------------------------------------------------------------------------------------------- + --Begin Precondition.1 + --Description: Activation App by sending SDL.ActivateApp + function Test:ActivationApp() + --hmi side: sending SDL.ActivateApp request + local RequestId = self.hmiConnection:SendRequest("SDL.ActivateApp", { appID = self.applications["Test Application"]}) + + --hmi side: expect SDL.ActivateApp response + EXPECT_HMIRESPONSE(RequestId) + :Do(function(_,data) + --In case when app is not allowed, it is needed to allow app + if + data.result.isSDLAllowed ~= true then + + --hmi side: sending SDL.GetUserFriendlyMessage request + local RequestId = self.hmiConnection:SendRequest("SDL.GetUserFriendlyMessage", + {language = "EN-US", messageCodes = {"DataConsent"}}) + + --hmi side: expect SDL.GetUserFriendlyMessage response + --TODO: Update after resolving APPLINK-16094 EXPECT_HMIRESPONSE(RequestId,{result = {code = 0, method = "SDL.GetUserFriendlyMessage"}}) + EXPECT_HMIRESPONSE(RequestId) + :Do(function(_,data) + + --hmi side: send request SDL.OnAllowSDLFunctionality + self.hmiConnection:SendNotification("SDL.OnAllowSDLFunctionality", + {allowed = true, source = "GUI", device = {id = config.deviceMAC, name = "127.0.0.1"}}) + + --hmi side: expect BasicCommunication.ActivateApp request + EXPECT_HMICALL("BasicCommunication.ActivateApp") + :Do(function(_,data) + + --hmi side: sending BasicCommunication.ActivateApp response + self.hmiConnection:SendResponse(data.id,"BasicCommunication.ActivateApp", "SUCCESS", {}) + + end) + :Times(2) + + end) + + end + end) + + --mobile side: expect notification + EXPECT_NOTIFICATION("OnHMIStatus", {hmiLevel = "FULL", systemContext = "MAIN"}) + end + --End Precondition.1 + + ----------------------------------------------------------------------------------------- + + --Begin Precondition.2 + --Description: Putting file(PutFiles) + function Test:PutFile() + local cid = self.mobileSession:SendRPC("PutFile", + { + syncFileName = "icon.png", + fileType = "GRAPHIC_PNG", + persistentFile = false, + systemFile = false + }, "files/icon.png") + EXPECT_RESPONSE(cid, { success = true}) + end + --End Precondition.2 + + ----------------------------------------------------------------------------------------- + + --Begin Precondition.3 + --Description: Adding SubMenu(AddSubMenus) + local menuIDValues = {1, 500000, 2000000000} + for i=1,#menuIDValues do + Test["AddSubMenuWithId"..menuIDValues[i]] = function(self) + --mobile side: sending request + local cid = self.mobileSession:SendRPC("AddSubMenu", + { + menuID = menuIDValues[i], + menuName = "SubMenu"..tostring(menuIDValues[i]) + }) + + --hmi side: expect UI.AddSubMenu request + EXPECT_HMICALL("UI.AddSubMenu", + { + menuID = menuIDValues[i], + menuParams = { menuName = "SubMenu"..tostring(menuIDValues[i]) } + }) + :Do(function(_,data) + --hmi side: expect UI.AddSubMenu response + self.hmiConnection:SendResponse(data.id, data.method, "SUCCESS", {}) + end) + + --mobile side: expect response and notification + EXPECT_RESPONSE(cid, { success = true, resultCode = "SUCCESS" }) + EXPECT_NOTIFICATION("OnHashChange") + end + end + --End Precondition.3 + + ----------------------------------------------------------------------------------------- + + --Begin Precondition.4 + --Description: Adding SubMenu(AddSubMenus) + for i=18,30 do + Test["AddSubMenuWithId"..i] = function(self) + --mobile side: sending request + local cid = self.mobileSession:SendRPC("AddSubMenu", + { + menuID = i, + menuName = "SubMenu"..tostring(i) + }) + + --hmi side: expect UI.AddSubMenu request + EXPECT_HMICALL("UI.AddSubMenu", + { + menuID = i, + menuParams = { menuName = "SubMenu"..tostring(i) } + }) + :Do(function(_,data) + --hmi side: expect UI.AddSubMenu response + self.hmiConnection:SendResponse(data.id, data.method, "SUCCESS", {}) + end) + + --mobile side: expect response and notification + EXPECT_RESPONSE(cid, { success = true, resultCode = "SUCCESS" }) + EXPECT_NOTIFICATION("OnHashChange") + end + end + --End Precondition.4 + + ----------------------------------------------------------------------------------------- + + --Begin Precondition.5 + --Description: AddCommand id = 11 to Submenu with cmdID = 19 + function Test:AddCommand_11ToSubMenu19() + --mobile side: sending request + local cid = self.mobileSession:SendRPC("AddCommand", + { + cmdID = 11, + menuParams = { parentID = 19, position = 1000, menuName ="Command11"}, + vrCommands ={"VR11"}, + --cmdIcon = { value ="icon.png", imageType ="DYNAMIC" } + }) + + --hmi side: expect UI.AddCommand request + EXPECT_HMICALL("UI.AddCommand", + { + cmdID = 11, + --cmdIcon = {value = storagePath.."icon.png",imageType = "DYNAMIC"}, + menuParams = {parentID = 19, position = 1000, menuName ="Command11"} + }) + :Do(function(_,data) + --hmi side: sending UI.AddCommand response + self.hmiConnection:SendResponse(data.id, data.method, "SUCCESS", {}) + end) + + --hmi side: expect VR.AddCommand request + EXPECT_HMICALL("VR.AddCommand", + { + cmdID = 11, + vrCommands = {"VR11"} + }) + :Do(function(_,data) + --hmi side: sending VR.AddCommand response + grammarIDValue = data.params.grammarID + self.hmiConnection:SendResponse(data.id, data.method, "SUCCESS", {}) + end) + + --mobile side: expect response and notification + EXPECT_RESPONSE(cid, { success = true, resultCode = "SUCCESS" }) + EXPECT_NOTIFICATION("OnHashChange") + end + --End Precondition.5 + + +--------------------------------------------------------------------------------------------- +-----------------------------------------I TEST BLOCK---------------------------------------- +--CommonRequestCheck: Check of mandatory/conditional request's parameters (mobile protocol)-- +--------------------------------------------------------------------------------------------- + --Begin Test suit PositiveRequestCheck + + --Description: TC's checks processing + -- request with all parameters + -- request with only mandatory parameters + -- request with all combinations of conditional-mandatory parameters (if exist) + -- request with one by one conditional parameters (each case - one conditional parameter) + -- request with missing mandatory parameters one by one (each case - missing one mandatory parameter) + -- request with all parameters are missing + -- request with fake parameters (fake - not from protocol, from another request) + -- request is sent with invalid JSON structure + -- different conditions of correlationID parameter (invalid, several the same etc.) + + + --Begin Test case CommonRequestCheck.1 + --Description:This test is intended to check positive cases and when all parameters are in boundary conditions + + --Requirement id in JAMA: + --SDLAQ-CRS-33 + + --Verification criteria: + --Deleting the SubMenu from UI command menu and SDL is executed successfully. The SUCCESS response code is returned. + + --Begin Test case CommonRequestCheck.1.1 + --Description: DeleteSubMenu without Command in it + function Test:DeleteSubMenu_WithoutCommand() + --mobile side: sending DeleteSubMenu request + local cid = self.mobileSession:SendRPC("DeleteSubMenu", + { + menuID = 18 + }) + --hmi side: expect UI.DeleteSubMenu request + EXPECT_HMICALL("UI.DeleteSubMenu", + { + menuID = 18 + }) + :Do(function(_,data) + --hmi side: sending UI.DeleteSubMenu response + self.hmiConnection:SendResponse(data.id, data.method, "SUCCESS", {}) + end) + + --mobile side: expect DeleteSubMenu response + EXPECT_RESPONSE(cid, { success = true, resultCode = "SUCCESS" }) + + --mobile side: expect OnHashChange notification + EXPECT_NOTIFICATION("OnHashChange") + end + --End Test case CommonRequestCheck.1.1 + + ----------------------------------------------------------------------------------------- + + --Begin Test case CommonRequestCheck.1.2 + --Description: DeleteSubMenu with Command in it + function Test:DeleteSubMenu_WithCommand() + --mobile side: sending DeleteSubMenu request + local cid = self.mobileSession:SendRPC("DeleteSubMenu", + { + menuID = 19 + }) + + --hmi side: expect UI.DeleteCommand request + EXPECT_HMICALL("UI.DeleteCommand", + { + cmdID = 11 + }) + :Do(function(_,data) + --hmi side: sending UI.DeleteCommand response + self.hmiConnection:SendResponse(data.id, data.method, "SUCCESS", {}) + end) + + --hmi side: expect VR.DeleteCommand request + EXPECT_HMICALL("VR.DeleteCommand", + { + cmdID = 11 + }) + :Do(function(_,data) + --hmi side: sending VR.DeleteCommand response + self.hmiConnection:SendResponse(data.id, data.method, "SUCCESS", {}) + end) + + + --hmi side: expect UI.DeleteSubMenu request + EXPECT_HMICALL("UI.DeleteSubMenu", + { + menuID = 19 + }) + :Do(function(_,data) + --hmi side: sending UI.DeleteSubMenu response + self.hmiConnection:SendResponse(data.id, data.method, "SUCCESS", {}) + end) + + --mobile side: expect DeleteSubMenu response + EXPECT_RESPONSE(cid, { success = true, resultCode = "SUCCESS" }) + + --mobile side: expect OnHashChange notification + EXPECT_NOTIFICATION("OnHashChange") + end + + ----- + --Send AddCommand "Command_01" + addItem to "Submenu_01" VrSynonyms = command2 + + function Test:AddCommand_SameCommandID01_Submenu() + --mobile side: sending AddCommand request + local cid = self.mobileSession:SendRPC("AddCommand", + { + cmdID = 02, + menuParams = + { + parentID = 11, + position = 1000, + menuName ="Command_01" + }, + vrCommands = + { + "command2" + } + }) + --hmi side: expect VR.AddCommand request + EXPECT_HMICALL("VR.AddCommand", + { + cmdID = 02, + type = "Command", + vrCommands = + { + "command2" + } + }) + :Do(function(_,data) + --hmi side: sending response + self.hmiConnection:SendResponse(data.id, data.method, "SUCCESS", {}) + end) + + --hmi side: expect UI.AddCommand request + EXPECT_HMICALL("UI.AddCommand", + { + cmdID = 02, + menuParams = + { + parentID = 11, + position = 1000, + menuName ="Command_01" + } + }) + :Do(function(_,data) + --hmi side: sending UI.AddCommand response + self.hmiConnection:SendResponse(data.id, data.method, "SUCCESS", {}) + end) + + EXPECT_RESPONSE(cid, { success = true, resultCode = "SUCCESS" }) + EXPECT_NOTIFICATION("OnHashChange") + end + --End + + --End Test case CommonRequestCheck.1.2 + + --End Test case CommonRequestCheck.1 + + ----------------------------------------------------------------------------------------- + + --Begin Test case CommonRequestCheck.2 + --Description: This test is intended to check processing requests without mandatory parameters + + --Requirement id in JAMA: + --SDLAQ-CRS-440 + + --Verification criteria: + --The request without "menuID" is sent, the response with INVALID_DATA result code is returned. + function Test:DeleteSubMenu_MissingAllParams() + --mobile side: DeleteSubMenu request + local cid = self.mobileSession:SendRPC("DeleteSubMenu",{}) + + --mobile side: DeleteSubMenu response + EXPECT_RESPONSE(cid, { success = false, resultCode = "INVALID_DATA" }) + + --mobile side: expect OnHashChange notification is not send to mobile + EXPECT_NOTIFICATION("OnHashChange") + :Times(0) + end + --Begin Test case CommonRequestCheck.2 + + ----------------------------------------------------------------------------------------- + + --Begin Test case CommonRequestCheck.3 + --Description: Check processing request with different fake parameters + + --Requirement id in JAMA: + --APPLINK-4518 + + --Verification criteria: + --According to xml tests by Ford team all fake params should be ignored by SDL + + --Begin Test case CommonRequestCheck.3.1 + --Description: Parameter not from protocol + function Test:DeleteSubMenu_WithFakeParam() + --mobile side: sending DeleteSubMenu request + local cid = self.mobileSession:SendRPC("DeleteSubMenu", + { + menuID = 20, + fakeParam = "fakeParam" + }) + --hmi side: expect UI.DeleteSubMenu request + EXPECT_HMICALL("UI.DeleteSubMenu", + { + menuID = 20 + }) + :Do(function(_,data) + --hmi side: sending UI.DeleteSubMenu response + self.hmiConnection:SendResponse(data.id, data.method, "SUCCESS", {}) + end) + :ValidIf(function(_,data) + if data.params.fakeParam then + print(" SDL re-sends fakeParam parameters to HMI in UI.DeleteSubMenu request") + return false + else + return true + end + end) + + --mobile side: expect DeleteSubMenu response + EXPECT_RESPONSE(cid, { success = true, resultCode = "SUCCESS" }) + + --mobile side: expect OnHashChange notification + EXPECT_NOTIFICATION("OnHashChange") + end + --Begin Test case CommonRequestCheck.3.1 + + ----------------------------------------------------------------------------------------- + + --Begin Test case CommonRequestCheck.3.2 + --Description: Parameters from another request + function Test:DeleteSubMenu_ParamsAnotherRequest() + --mobile side: sending DeleteSubMenu request + local cid = self.mobileSession:SendRPC("DeleteSubMenu", + { + ttsChunks = + { + TTSChunk = + { + text ="SpeakFirst", + type ="TEXT", + }, + TTSChunk = + { + text ="SpeakSecond", + type ="TEXT", + }, + }, + }) + + --mobile side: expect DeleteSubMenu response + EXPECT_RESPONSE(cid, { success = false, resultCode = "INVALID_DATA" }) + + --mobile side: expect OnHashChange notification is not send to mobile + EXPECT_NOTIFICATION("OnHashChange") + :Times(0) + end + --End Test case CommonRequestCheck.3.2 + --End Test case CommonRequestCheck.3 + + ----------------------------------------------------------------------------------------- + + --Begin Test case CommonRequestCheck.4 + --Description: Invalid JSON + + --Requirement id in JAMA: + --SDLAQ-CRS-440 + + --Verification criteria: + --The request with wrong JSON syntax is sent, the response with INVALID_DATA result code is returned. + function Test:DeleteSubMenu_IncorrectJSON() + + self.mobileSession.correlationId = self.mobileSession.correlationId + 1 + + local msg = + { + serviceType = 7, + frameInfo = 0, + rpcType = 0, + rpcFunctionId = 8, + rpcCorrelationId = self.mobileSession.correlationId, + --<> param name="number" type="String" maxlength="40" + -- SDL strips from the “number†all parameter, except the "*", "#", ",", ";" character and digits 0-9 + + --Begin Test case PositiveRequestCheck.1 + --Description: Check processing request with number values in bound + + --Requirement id in JAMA: SDLAQ-CRS-2980, APPLINK-12382, SDLAQ-CRS-2984 + + + --Verification criteria: + -- - The request is sent from mobile application to SDL and then transferred from SDL to HMI. + -- - In case SDL receives *"\n"* symbol in "number" param of DialNumber RPC from mobile app, SDL must return "INVALID_DATA, success: false" to mobile app (without transferring this RPC to HMI). + + -- - In case SDL receives *"\t"* symbol in "number" param of DialNumber RPC from mobile app, SDL must return "INVALID_DATA, success: false" to mobile app (without transferring this RPC to HMI). + + -- - In case SDL receives only ">> missing : + self.hmiConnection:Send('{"id":'..tostring(data.id)..',"jsonrpc":"2.0","result" {"method":"BasicCommunication.DialNumber", "code":0}}') + end) + + --response on mobile side + EXPECT_RESPONSE(CorIdDialNumber, { success = false, resultCode = "GENERIC_ERROR"}) + :Timeout(2000) + end + + --End Test case NegativeResponseCheck4 + + --End Test suit NegativeResponseCheck + +]] +---------------------------------------------------------------------------------------------- +----------------------------------------IV TEST BLOCK----------------------------------------- +---------------------------------------Result codes check-------------------------------------- +---------------------------------------------------------------------------------------------- + + --------Checks----------- + -- Ñheck all pairs resultCode+success + -- check should be made sequentially (if it is possible): + -- case resultCode + success true + -- case resultCode + success false + --For example: + -- first case checks ABORTED + true + -- second case checks ABORTED + false + -- third case checks REJECTED + true + -- fourth case checks REJECTED + false + + --Begin Test suit ResultCodeCheck + --Description:TC's check all resultCodes values in pair with success value + + --Begin Test case ResultCodeCheck.1 + --Description: Check APPLICATION_NOT_REGISTERED resultCode + success false + + --Requirement id in JAMA: SDLAQ-CRS-2988 + + --Verification criteria: SDL sends APPLICATION_NOT_REGISTERED code when the app sends a request within the same connection before RegisterAppInterface has been performed yet. + + function Test:Precondition_CreationNewSession() + -- Connected expectation + self.mobileSession1 = mobile_session.MobileSession( + self, + self.mobileConnection) + + self.mobileSession1:StartService(7) + end + + function Test:DialNumber_resultCodeApplicationNotRegisterSuccessFalse() + + --request from mobile side + local CorIdDialNumber = self.mobileSession1:SendRPC("DialNumber", + { + number = "#3804567654*" + }) + + + --response on mobile side + self.mobileSession1:ExpectResponse(CorIdDialNumber, { success = false, resultCode = "APPLICATION_NOT_REGISTERED"}) + :Timeout(2000) + + end + + --End Test case ResultCodeCheck.1 + + --Begin Test case ResultCodeCheck.2 + --Description: Check GENERIC_ERROR resultCode + success false + + --Requirement id in JAMA: SDLAQ-CRS-2989 + + --Verification criteria: GENERIC_ERROR comes as a result code in response when all other codes aren't applicable or the unknown issue occured. + + function Test:DialNumber_resultCodeGenericErrorSuccessFalse() + + --request from mobile side + local CorIdDialNumber = self.mobileSession:SendRPC("DialNumber", + { + number = "#2345765456*" + }) + + --hmi side: request, response + EXPECT_HMICALL("BasicCommunication.DialNumber", + { + number = "#2345765456*" + }) + :Do(function(_,data) + self.hmiConnection:SendError(data.id,"BasicCommunication.DialNumber", "GENERIC_ERROR", "HMI returns GENERIC_ERROR") + end) + + --response on mobile side + EXPECT_RESPONSE(CorIdDialNumber, { success = false, resultCode = "GENERIC_ERROR"}) + + end + + --End Test case ResultCodeCheck.2 + + --Begin Test case ResultCodeCheck.3 + --Description: Check REJECTED resultCode + success false + + --Requirement id in JAMA: SDLAQ-CRS-2990 + + --Verification criteria:SDL should return REJECTED code in response in case the request with higher priority is active now ( HMI responds REJECTED) + + function Test:DialNumber_resultCodeRejected() + + --request from mobile side + local CorIdDialNumber = self.mobileSession:SendRPC("DialNumber", + { + number = "#2345765456*" + }) + + --hmi side: request, response + EXPECT_HMICALL("BasicCommunication.DialNumber", + { + number = "#2345765456*" + }) + :Do(function(_,data) + self.hmiConnection:SendError(data.id,"BasicCommunication.DialNumber", "REJECTED", "DialNumber is rejected") + end) + + --response on mobile side + EXPECT_RESPONSE(CorIdDialNumber, { success = false, resultCode = "REJECTED"}) + :Timeout(2000) + + end + + --End Test case ResultCodeCheck.3 + + --Begin Test case ResultCodeCheck.4 + --Description: Check absence default timeout, TIMED_OUT resultCode + success false + + --Requirement id in JAMA: SDLAQ-CRS-3055 ,APPLINK-12646 + + --Verification criteria: + -- SDL must not apply "default timeout for RPCs processing" for BasicCommunication.DialNumber RPC + + function Test:DialNumber_resultCodeTimedOut() + --request from mobile side + local CorIdDialNumber = self.mobileSession:SendRPC("DialNumber", + { + number = "#2345765456*" + }) + + --hmi side: request, response + EXPECT_HMICALL("BasicCommunication.DialNumber", + { + number = "#2345765456*" + }) + :Do(function(_,data) + function to_run() + self.hmiConnection:SendError(data.id,"BasicCommunication.DialNumber", "TIMED_OUT", "DialNumber is timed out") + end + + RUN_AFTER(to_run, 20000) + end) + + --response on mobile side + EXPECT_RESPONSE(CorIdDialNumber, { success = false, resultCode = "TIMED_OUT"}) + :Timeout(22000) + end + + --End Test case ResultCodeCheck.4 + + --Begin Test case ResultCodeCheck.5 + --Description: Check absence default timeout, OUT_OF_MEMORY resultCode + success false + + --Requirement id in JAMA: SDLAQ-CRS-2986 + + --Verification criteria: + -- The system could not process the request because the necessary memory RAM couldn't be allocated + + function Test:DialNumber_resultCodeOutOfMemory() + --request from mobile side + local CorIdDialNumber = self.mobileSession:SendRPC("DialNumber", + { + number = "#2345765456*" + }) + + --hmi side: request, response + EXPECT_HMICALL("BasicCommunication.DialNumber", + { + number = "#2345765456*" + }) + :Do(function(_,data) + function to_run() + self.hmiConnection:SendError(data.id,"BasicCommunication.DialNumber", "OUT_OF_MEMORY", "out of memory") + end + + RUN_AFTER(to_run, 20000) + end) + + --response on mobile side + EXPECT_RESPONSE(CorIdDialNumber, { success = false, resultCode = "OUT_OF_MEMORY"}) + :Timeout(22000) + end + + --End Test case ResultCodeCheck.5 + + + --Begin Test case ResultCodeCheck.6 + --Description: Check ABORTED resultCode + + --Requirement id in JAMA: SDLAQ-CRS-3055 ,APPLINK-12646 + + --Verification criteria: + -- SDL must return "ABORTED: success:false" result code to mobile app in case SDL receives "ABORTED" from HMI + + function Test:DialNumber_resultCodeAborted() + --request from mobile side + local CorIdDialNumber = self.mobileSession:SendRPC("DialNumber", + { + number = "#2345765456*" + }) + + --hmi side: request, response + EXPECT_HMICALL("BasicCommunication.DialNumber", + { + number = "#2345765456*" + }) + :Do(function(_,data) + function to_run() + self.hmiConnection:SendError(data.id,"BasicCommunication.DialNumber", "ABORTED", "DialNumber is aborted") + end + + RUN_AFTER(to_run, 20000) + end) + + --response on mobile side + EXPECT_RESPONSE(CorIdDialNumber, { success = false, resultCode = "ABORTED"}) + :Timeout(22000) + end + + --End Test case ResultCodeCheck.6 + + --Begin Test case ResultCodeCheck.7 + --Description: Check DISALLOWED resultCode + success false + + --Requirement id in JAMA: SDLAQ-CRS-2986 + + --Verification criteria: + -- The system could not process the request because the necessary memory RAM couldn't be allocated + + function Test:Precondition_DeactivateApp() + + --hmi side: sending BasicCommunication.OnExitApplication notification + self.hmiConnection:SendNotification("BasicCommunication.OnExitApplication", {appID = self.applications["Test Application"], reason = "USER_EXIT"}) + + EXPECT_NOTIFICATION("OnHMIStatus", + { systemContext = "MAIN", hmiLevel = "NONE", audioStreamingState = "NOT_AUDIBLE"}) + + end + + function Test:DialNumber_DisallowedHMINone() + + --request from mobile side + local CorIdDialNumber = self.mobileSession:SendRPC("DialNumber", + { + number = "#3809456678" + }) + + --response on mobile side + EXPECT_RESPONSE(CorIdDialNumber, { success = false, resultCode = "DISALLOWED"}) + :Timeout(2000) + + end + + --End Test case ResultCodeCheck.7 + + + --End Test suit ResultCodeCheck + +---------------------------------------------------------------------------------------------- +-----------------------------------------V TEST BLOCK----------------------------------------- +---------------------------------------HMI negative cases------------------------------------- +---------------------------------------------------------------------------------------------- + + --------Checks----------- + -- requests without responses from HMI + -- invalid structure of response + -- several responses from HMI to one request + -- fake parameters + -- HMI correlation id check + -- wrong response with correct HMI correlation id + + --Begin Test suit HMINegativeCheck + --Description: Check processing responses with invalid sctructure, fake parameters, HMI correlation id check, wrong response with correct HMI correlation id, check sdl behavior in case of absence the response from HMI + + --Begin Test case HMINegativeCheck.1 + --Description: Check absence response with GENERIC_ERROR resultCode after default timeout is expired + + --Requirement id in JAMA: SDLAQ-CRS-3050 + + --Verification criteria: SDL must not apply "default timeout for RPCs processing" for BasicCommunication.DialNumber RPC (that is, SDL must always wait for HMI response to BC.DialNumber as long as it takes and not return GENERIC_ERROR to mobile app) + + function Test:Precondition_WaitActivation() + EXPECT_NOTIFICATION("OnHMIStatus", {hmiLevel = "FULL", systemContext = "MAIN"}) + + local rid = self.hmiConnection:SendRequest("SDL.ActivateApp", { appID = self.applications["Test Application"]}) + + EXPECT_HMIRESPONSE(rid) + :Do(function(_,data) + if data.result.code ~= 0 then + quit() + end + end) + end + + function Test:DialNumber_NoHMIResponse() + + --request from mobile side + local CorIdDialNumber = self.mobileSession:SendRPC("DialNumber", + { + number = "#2345765456*" + }) + + --hmi side: request, response + EXPECT_HMICALL("BasicCommunication.DialNumber", + { + number = "#2345765456*" + }) + :Do(function(_,data) + + local function to_run() + self.hmiConnection:SendResponse(data.id,"BasicCommunication.DialNumber", "SUCCESS", {}) + end + RUN_AFTER(to_run, 20000) + end) + + --response on mobile side + EXPECT_RESPONSE(CorIdDialNumber, { success = true, resultCode = "SUCCESS"}) + :Timeout(22000) + end + + --End Test case HMINegativeCheck.1 +--[[TODO:update according to APPLINK-14765 + --Begin Test case HMINegativeCheck.2 + --Description: Check processing responses with invalid structure + + --Requirement id in JAMA: + + --Verification criteria: + + function Test:DialNumber_InvalidResponse() + + --request from mobile side + local CorIdDialNumber = self.mobileSession:SendRPC("DialNumber", + { + number = "#2345765456*" + }) + + --hmi side: request, response + EXPECT_HMICALL("BasicCommunication.DialNumber", + { + number = "#2345765456*" + }) + :Do(function(_,data) + + self.hmiConnection:Send('{"error":{"code":4,"message":"DialNumber is REJECTED"},"id":'..tostring(data.id)..',"jsonrpc":"2.0","result":{"code":0,"method":"BasicCommunication.DialNumber"}}') + + end) + + --response on mobile side + EXPECT_RESPONSE(CorIdDialNumber, { success = false, resultCode = "GENERIC_ERROR" }) + :Timeout(22000) + end + + + --End Test case HMINegativeCheck.2 + + + --Begin Test case HMINegativeCheck.3 + --Description: HMI correlation id check + --Requirement id in JAMA/or Jira ID: + + --Verification criteria: + + --Begin Test case HMINegativeCheck.3.1 + --Description: BasicCommunication.DialNumber response with empty correlation id + + function Test:DialNumber_EmptyHMIcorrelationID() + + --request from mobile side + local CorIdDialNumber = self.mobileSession:SendRPC("DialNumber", + { + number = "#2345765456*" + }) + + --hmi side: request, response + EXPECT_HMICALL("BasicCommunication.DialNumber", + { + number = "#2345765456*" + }) + :Do(function(_,data) + + self.hmiConnection:Send('{id": ,"jsonrpc":"2.0","result":{"code":0,"method":"BasicCommunication.DialNumber"}}') + + end) + + --response on mobile side + EXPECT_RESPONSE(CorIdDialNumber, { success = false, resultCode = "GENERIC_ERROR" }) + :Timeout(22000) + end + --End Test case HMINegativeCheck.3.1 + + --Begin Test case HMINegativeCheck.3.2 + --Description: BasicCommunication.DialNumber response with nonexistent HMI correlation id + + function Test:DialNumber_NonexistentHMIcorrelationID() + + --request from mobile side + local CorIdDialNumber = self.mobileSession:SendRPC("DialNumber", + { + number = "#2345765456*" + }) + + --hmi side: request, response + EXPECT_HMICALL("BasicCommunication.DialNumber", + { + number = "#2345765456*" + }) + :Do(function(_,data) + + self.hmiConnection:Send('{id": 3333 ,"jsonrpc":"2.0","result":{"code":0,"method":"BasicCommunication.DialNumber"}}') + + end) + + --response on mobile side + EXPECT_RESPONSE(CorIdDialNumber, { success = false, resultCode = "GENERIC_ERROR" }) + :Timeout(22000) + end + --End Test case HMINegativeCheck.3.2 + + --Begin Test case HMINegativeCheck.3.3 + --Description: BasicCommunication.DialNumber response with wrong type of correlation id + + function Test:DialNumber_WrongTypeHMIcorrelationID() + + --request from mobile side + local CorIdDialNumber = self.mobileSession:SendRPC("DialNumber", + { + number = "#2345765456*" + }) + + --hmi side: request, response + EXPECT_HMICALL("BasicCommunication.DialNumber", + { + number = "#2345765456*" + }) + :Do(function(_,data) + + self.hmiConnection:Send('{id":"3333" ,"jsonrpc":"2.0","result":{"code":0,"method":"BasicCommunication.DialNumber"}}') + + end) + + --response on mobile side + EXPECT_RESPONSE(CorIdDialNumber, { success = false, resultCode = "GENERIC_ERROR" }) + :Timeout(22000) + end + --End Test case HMINegativeCheck.3.3 + + --End Test case HMINegativeCheck.3 +]] + + --Begin Test case HMINegativeCheck.4 + --Description: Check processing response with fake parameters(not from API) + + --Requirement id in JAMA/or Jira ID: SDLAQ-CRS-50, APPLINK-14765 + + --Verification criteria: In case HMI sends request (response, notification) with fake parameters that SDL should transfer to mobile app -> SDL must cut off fake parameters + + function Test:DialNumber_ResponseWithFakeParam() + --request from mobile side + local CorIdDialNumber = self.mobileSession:SendRPC("DialNumber", + { + number = "#2345765456*" + }) + + --hmi side: request, response + EXPECT_HMICALL("BasicCommunication.DialNumber", + { + number = "#2345765456*" + }) + :Do(function(_,data) + self.hmiConnection:SendResponse(data.id,"BasicCommunication.DialNumber", "SUCCESS", { fakeparameter = "123456789"}) + end) + + --response on mobile side + EXPECT_RESPONSE(CorIdDialNumber, { success = true, resultCode = "SUCCESS", fakeparameter = nil }) + :Timeout(2000) + + end + + --End Test case HMINegativeCheck.4 + + --Begin Test case HMINegativeCheck.5 + --Description: Check processing response with parameters from another API + + --Requirement id in JAMA/or Jira ID: SDLAQ-CRS-50, APPLINK-14765 + + --Verification criteria: In case HMI sends request (response, notification) with fake parameters that SDL should transfer to mobile app -> SDL must cut off fake parameters + + function Test:DialNumber_ParamsAnotherRsponse() + --request from mobile side + local CorIdDialNumber = self.mobileSession:SendRPC("DialNumber", + { + number = "#2345765456*" + }) + + --hmi side: request, response + EXPECT_HMICALL("BasicCommunication.DialNumber", + { + number = "#2345765456*" + }) + :Do(function(_,data) + self.hmiConnection:SendResponse(data.id,"BasicCommunication.DialNumber", "SUCCESS", {buttonCapabilities = {name = "OK", shortPressAvailable = true, longPressAvailable = true, upDownAvailable = true}}) + end) + + --response on mobile side + EXPECT_RESPONSE(CorIdDialNumber, { success = true, resultCode = "SUCCESS", buttonCapabilities = nil }) + :Timeout(2000) + + end + + --End Test case HMINegativeCheck.5 + + + --Begin Test case HMINegativeCheck.6 + --Description: Check processing response with right value of correlationId and wrong method + --[[TODO update according to APPLINK-14765 + --Requirement id in JAMA/or Jira ID: SDLAQ-CRS-50 + + --Verification criteria: + + function Test:DialNumber_ResponseWithWrongMethodAndRightCorrId() + + --request from mobile side + local CorIdDialNumber = self.mobileSession:SendRPC("DialNumber", + { + number = "#2345765456*" + }) + + --hmi side: request, response + EXPECT_HMICALL("BasicCommunication.DialNumber", + { + number = "#2345765456*" + }) + :Do(function(_,data) + + self.hmiConnection:SendResponse(data.id,"BasicCommunication.ActivateApp", "SUCCESS", {}) + end) + + --response on mobile side + EXPECT_RESPONSE(CorIdDialNumber, { success = true, resultCode = "SUCCESS"}) + :Timeout(22000) + end + + --End Test case HMINegativeCheck.6 +]] + --Begin Test case HMINegativeCheck.7 + --Description: Check processing several responses to request + --TODO update requirements, verification criteria + --Requirement id in JAMA/or Jira ID: SDLAQ-CRS-50 + + --Verification criteria: + + function Test:DialNumber_ResponseSeveralResponsesToRequest() + + --request from mobile side + local CorIdDialNumber = self.mobileSession:SendRPC("DialNumber", + { + number = "#2345765456*" + }) + + --hmi side: request, response + EXPECT_HMICALL("BasicCommunication.DialNumber", + { + number = "#2345765456*" + }) + :Do(function(_,data) + + self.hmiConnection:SendResponse(data.id,"BasicCommunication.DialNumber", "SUCCESS", {}) + self.hmiConnection:SendResponse(data.id,"BasicCommunication.DialNumber", "SUCCESS", {}) + end) + + --response on mobile side + EXPECT_RESPONSE(CorIdDialNumber, { success = true, resultCode = "SUCCESS"}) + :Timeout(22000) + + DelayedExp(2000) + end + + --End Test case HMINegativeCheck.7 + + --End Test suit HMINegativeCheck + +---------------------------------------------------------------------------------------------- +-----------------------------------------VII TEST BLOCK---------------------------------------- +--------------------------------------Different HMIStatus------------------------------------- +---------------------------------------------------------------------------------------------- + --Description: processing of request/response in different HMIlevels, SystemContext, AudioStreamingState + + --Begin Test suit DifferentHMIlevel + --Description: processing API in different HMILevel +--TODO: fill Requirement, Verification criteria + --Begin Test case DifferentHMIlevel.1 + --Description: Processing DialNumber in Level HMI level (for media and navigation app type) + + --Requirement id in JAMA: + + --Verification criteria: + + if + Test.isMediaApplication == true or + Test.appHMITypes["NAVIGATION"] == true then + + function Test:Presondition_DeactivateToLimited() + + --hmi side: sending BasicCommunication.OnAppDeactivated notification + self.hmiConnection:SendNotification("BasicCommunication.OnAppDeactivated", {appID = self.applications["Test Application"], reason = "GENERAL"}) + + EXPECT_NOTIFICATION("OnHMIStatus", + { systemContext = "MAIN", hmiLevel = "LIMITED", audioStreamingState = "AUDIBLE"}) + + end + + function Test:DialNumber_LimitedHMILevel() + --request from mobile side + local CorIdDialNumber = self.mobileSession:SendRPC("DialNumber", + { + number = "#3804567654*" + }) + + --hmi side: request, response + EXPECT_HMICALL("BasicCommunication.DialNumber", + { + number = "#3804567654*", + appID = self.applications["Test Application"] + }) + :Do(function(_,data) + self.hmiConnection:SendResponse(data.id,"BasicCommunication.DialNumber", "SUCCESS", {}) + end) + + --response on mobile side + EXPECT_RESPONSE(CorIdDialNumber, { success = true, resultCode = "SUCCESS"}) + :Timeout(2000) + end + + + --End Test case DifferentHMIlevel.1 + + --Begin Test case DifferentHMIlevel.1 + --Description: Processing Alert request in Background HMI level +--TODO: fill Requirement, Verification criteria + --Requirement id in JAMA: + + --Verification criteria: +end + + function Test:Presondition_DeactivateToBackground() + + --hmi side: sending BasicCommunication.OnAppDeactivated notification + self.hmiConnection:SendNotification("BasicCommunication.OnAppDeactivated", {appID = self.applications["Test Application"], reason = "PHONECALL"}) + + self.hmiConnection:SendNotification("BasicCommunication.OnPhoneCall", {isActive = true}) + + EXPECT_NOTIFICATION("OnHMIStatus", + { systemContext = "MAIN", hmiLevel = "BACKGROUND", audioStreamingState = "NOT_AUDIBLE"}) + + end + + + + function Test:DialNumber_BackgroundHMILevel() + --request from mobile side + local CorIdDialNumber = self.mobileSession:SendRPC("DialNumber", + { + number = "#3804567654*" + }) + + --hmi side: request, response + EXPECT_HMICALL("BasicCommunication.DialNumber", + { + number = "#3804567654*", + appID = self.applications["Test Application"] + }) + :Do(function(_,data) + self.hmiConnection:SendResponse(data.id,"BasicCommunication.DialNumber", "SUCCESS", {}) + + end) + + --response on mobile side + EXPECT_RESPONSE(CorIdDialNumber, { success = true, resultCode = "SUCCESS"}) + :Timeout(2000) + + end + + function Test:Postcondition_OnPhoneCallFalse() + + self.hmiConnection:SendNotification("BasicCommunication.OnPhoneCall", {isActive = false}) + + if + self.isMediaApplication == true or + self.appHMITypes["NAVIGATION"] == true then + + EXPECT_NOTIFICATION("OnHMIStatus", { systemContext = "MAIN", hmiLevel = "LIMITED"}) + elseif + self.isMediaApplication == false then + EXPECT_NOTIFICATION("OnHMIStatus", { systemContext = "MAIN", hmiLevel = "FULL"}) + end + + end + --End Test case DifferentHMIlevel.2 + + --End Test suit DifferentHMIlevel + +--]] + +--------------------------------------------------------------------------------------------- +-------------------------------------------Postcondition------------------------------------- +--------------------------------------------------------------------------------------------- + + --Print new line to separate Postconditions + commonFunctions:newTestCasesGroup("Postconditions") + + + --Restore sdl_preloaded_pt.json + policyTable:Restore_preloaded_pt() + + + + return Test + + + + + + + + + + + + + + + + + + + + diff --git a/test_scripts/API/ATF_EndAudioPassThru.lua b/test_scripts/API/ATF_EndAudioPassThru.lua new file mode 100644 index 0000000000..ecd683488d --- /dev/null +++ b/test_scripts/API/ATF_EndAudioPassThru.lua @@ -0,0 +1,3161 @@ +Test = require('connecttest') +require('cardinalities') +local events = require('events') +local mobile_session = require('mobile_session') +local mobile = require('mobile_connection') +local tcp = require('tcp_connection') +local config = require('config') +local file_connection = require('file_connection') + +local module = require('testbase') + +--------------------------------------------------------------------------------------------- +-----------------------------Required Shared Libraries--------------------------------------- +--------------------------------------------------------------------------------------------- +require('user_modules/AppTypes') +local commonFunctions = require('user_modules/shared_testcases/commonFunctions') +local commonSteps = require('user_modules/shared_testcases/commonSteps') +local commonTestCases = require('user_modules/shared_testcases/commonTestCases') +local policyTable = require('user_modules/shared_testcases/testCasesForPolicyTable') +local integerParameter = require('user_modules/shared_testcases/testCasesForIntegerParameter') +local stringParameterInResponse = require('user_modules/shared_testcases/testCasesForStringParameterInResponse') +local integerParameterInResponse = require('user_modules/shared_testcases/testCasesForIntegerParameterInResponse') +local arrayStringParameterInResponse = require('user_modules/shared_testcases/testCasesForArrayStringParameterInResponse') + +--------------------------------------------------------------------------------------------- +------------------------------------ Common Variables --------------------------------------- +--------------------------------------------------------------------------------------------- +APIName = "EndAudioPassThru" -- set request name +local infoMessage = string.rep("a", 1000) +local storagePath = config.pathToSDL .. "storage/" .. config.application1.registerAppInterfaceParams.appID .. "_" .. config.deviceMAC .. "/" +local function SendOnSystemContext(self, ctx) + self.hmiConnection:SendNotification("UI.OnSystemContext",{ appID = self.applications["Test Application"], systemContext = ctx }) +end +local function ExpectOnHMIStatusWithAudioStateChanged(self, level, isInitialPrompt,timeout) + if timeout == nil then timeout = 20000 end + if level == nil then level = "FULL" end + + if + level == "FULL" then + if + self.isMediaApplication == true or + Test.appHMITypes["NAVIGATION"] == true then + if isInitialPrompt == true then + EXPECT_NOTIFICATION("OnHMIStatus", + { hmiLevel = level, audioStreamingState = "ATTENUATED", systemContext = "MAIN"}, + { hmiLevel = level, audioStreamingState = "ATTENUATED", systemContext = "HMI_OBSCURED"}, + { hmiLevel = level, audioStreamingState = "AUDIBLE", systemContext = "HMI_OBSCURED"}, + { hmiLevel = level, audioStreamingState = "AUDIBLE", systemContext = "MAIN"}) + :Times(4) + :Timeout(timeout) + else + EXPECT_NOTIFICATION("OnHMIStatus", + { hmiLevel = level, audioStreamingState = "AUDIBLE", systemContext = "HMI_OBSCURED"}, + { hmiLevel = level, audioStreamingState = "AUDIBLE", systemContext = "MAIN"}) + :Times(2) + :Timeout(timeout) + end + elseif + self.isMediaApplication == false then + EXPECT_NOTIFICATION("OnHMIStatus", + { hmiLevel = level, audioStreamingState = "NOT_AUDIBLE", systemContext = "HMI_OBSCURED"}, + { hmiLevel = level, audioStreamingState = "NOT_AUDIBLE", systemContext = "MAIN"}) + :Times(2) + :Timeout(timeout) + end + elseif + level == "LIMITED" then + + if + self.isMediaApplication == true or + Test.appHMITypes["NAVIGATION"] == true then + if isInitialPrompt == true then + EXPECT_NOTIFICATION("OnHMIStatus", + { hmiLevel = level, audioStreamingState = "ATTENUATED", systemContext = "MAIN"}, + { hmiLevel = level, audioStreamingState = "AUDIBLE", systemContext = "MAIN"}) + :Times(2) + :Timeout(timeout) + else + EXPECT_NOTIFICATION("OnHMIStatus") + :Times(0) + :Timeout(timeout) + end + elseif + self.isMediaApplication == false then + + EXPECT_NOTIFICATION("OnHMIStatus") + :Times(0) + + EXPECT_NOTIFICATION("OnAudioPassThru") + :Times(0) + + DelayedExp(1000) + end + elseif + level == "BACKGROUND" then + + EXPECT_NOTIFICATION("OnHMIStatus") + :Times(0) + + EXPECT_NOTIFICATION("OnAudioPassThru") + :Times(0) + + DelayedExp(1000) + end +end +local function printError(errorMessage) + print(" \27[36m " .. errorMessage .. " \27[0m ") +end +function DelayedExp(timeout) + local event = events.Event() + event.matches = function(self, e) return self == e end + EXPECT_EVENT(event, "Delayed event") + RUN_AFTER(function() + RAISE_EVENT(event, event) + end, timeout) +end + +--------------------------------------------------------------------------------------------- +-------------------------- Overwrite These Functions For This Script------------------------- +--------------------------------------------------------------------------------------------- +--Specific functions for this script +--1. createTTSSpeakParameters(RequestParams) +--2. createUIParameters(RequestParams) +--3. policyUpdate() +--------------------------------------------------------------------------------------------- + +--Create TTS.Speak expected result based on parameters from the request +function Test:createTTSSpeakParameters(RequestParams) + local param = {} + + param["speakType"] = "AUDIO_PASS_THRU" + + --initialPrompt + if RequestParams["initialPrompt"] ~= nil then + param["ttsChunks"] = RequestParams["initialPrompt"] + end + + return param +end + + +--Create UI expected result based on parameters from the request +function Test:createUIParameters(Request) + local param = {} + + param["muteAudio"] = Request["muteAudio"] + param["maxDuration"] = Request["maxDuration"] + + local j = 0 + --audioPassThruDisplayText1 + if Request["audioPassThruDisplayText1"] ~= nil then + j = j + 1 + if param["audioPassThruDisplayTexts"] == nil then + param["audioPassThruDisplayTexts"] = {} + end + param["audioPassThruDisplayTexts"][j] = { + fieldName = "audioPassThruDisplayText1", + fieldText = Request["audioPassThruDisplayText1"] + } + end + + --audioPassThruDisplayText2 + if Request["audioPassThruDisplayText2"] ~= nil then + j = j + 1 + if param["audioPassThruDisplayTexts"] == nil then + param["audioPassThruDisplayTexts"] = {} + end + param["audioPassThruDisplayTexts"][j] = { + fieldName = "audioPassThruDisplayText2", + fieldText = Request["audioPassThruDisplayText2"] + } + end + + return param +end +--------------------------------------------------------------------------------------------- + +--Description: Update policy from specific file + --policyFileName: Name of policy file + --bAllowed: true if want to allowed New group policy + -- false if want to disallowed New group policy +local groupID +local groupName = "New" +function Test:policyUpdate(policyFileName, bAllowed) + --hmi side: sending SDL.GetURLS request + local RequestIdGetURLS = self.hmiConnection:SendRequest("SDL.GetURLS", { service = 7 }) + + --hmi side: expect SDL.GetURLS response from HMI + EXPECT_HMIRESPONSE(RequestIdGetURLS,{result = {code = 0, method = "SDL.GetURLS", urls = {{url = "http://policies.telematics.ford.com/api/policies"}}}}) + :Do(function(_,data) + --print("SDL.GetURLS response is received") + --hmi side: sending BasicCommunication.OnSystemRequest request to SDL + self.hmiConnection:SendNotification("BasicCommunication.OnSystemRequest", + { + requestType = "PROPRIETARY", + fileName = "filename" + } + ) + --mobile side: expect OnSystemRequest notification + EXPECT_NOTIFICATION("OnSystemRequest", { requestType = "PROPRIETARY" }) + :Do(function(_,data) + --print("OnSystemRequest notification is received") + --mobile side: sending SystemRequest request + local CorIdSystemRequest = self.mobileSession:SendRPC("SystemRequest", + { + fileName = "PolicyTableUpdate", + requestType = "PROPRIETARY" + }, + "files/"..policyFileName) + + local systemRequestId + --hmi side: expect SystemRequest request + EXPECT_HMICALL("BasicCommunication.SystemRequest") + :Do(function(_,data) + systemRequestId = data.id + --print("BasicCommunication.SystemRequest is received") + + --hmi side: sending BasicCommunication.OnSystemRequest request to SDL + self.hmiConnection:SendNotification("SDL.OnReceivedPolicyUpdate", + { + policyfile = "/tmp/fs/mp/images/ivsu_cache/PolicyTableUpdate" + } + ) + function to_run() + --hmi side: sending SystemRequest response + self.hmiConnection:SendResponse(systemRequestId,"BasicCommunication.SystemRequest", "SUCCESS", {}) + end + + RUN_AFTER(to_run, 500) + end) + + --hmi side: expect SDL.OnStatusUpdate + EXPECT_HMINOTIFICATION("SDL.OnStatusUpdate") + :ValidIf(function(exp,data) + if + exp.occurences == 1 and + data.params.status == "UP_TO_DATE" then + return true + elseif + exp.occurences == 1 and + data.params.status == "UPDATING" then + return true + elseif + exp.occurences == 2 and + data.params.status == "UP_TO_DATE" then + return true + else + if + exp.occurences == 1 then + print ("\27[31m SDL.OnStatusUpdate came with wrong values. Expected in first occurrences status 'UP_TO_DATE' or 'UPDATING', got '" .. tostring(data.params.status) .. "' \27[0m") + elseif exp.occurences == 2 then + print ("\27[31m SDL.OnStatusUpdate came with wrong values. Expected in second occurrences status 'UP_TO_DATE', got '" .. tostring(data.params.status) .. "' \27[0m") + end + return false + end + end) + :Times(Between(1,2)) + + --mobile side: expect SystemRequest response + EXPECT_RESPONSE(CorIdSystemRequest, { success = true, resultCode = "SUCCESS"}) + :Do(function(_,data) + --print("SystemRequest is received") + --hmi side: sending SDL.GetUserFriendlyMessage request to SDL + local RequestIdGetUserFriendlyMessage = self.hmiConnection:SendRequest("SDL.GetUserFriendlyMessage", {language = "EN-US", messageCodes = {"StatusUpToDate"}}) + + --hmi side: expect SDL.GetUserFriendlyMessage response + EXPECT_HMIRESPONSE(RequestIdGetUserFriendlyMessage,{result = {code = 0, method = "SDL.GetUserFriendlyMessage", messages = {{line1 = "Up-To-Date", messageCode = "StatusUpToDate", textBody = "Up-To-Date"}}}}) + :Do(function(_,data) + --print("SDL.GetUserFriendlyMessage is received") + + --hmi side: sending SDL.GetListOfPermissions request to SDL + local RequestIdGetListOfPermissions = self.hmiConnection:SendRequest("SDL.GetListOfPermissions", {appID = self.applications["Test Application"]}) + + -- hmi side: expect SDL.GetListOfPermissions response + -- TODO: update after resolving APPLINK-16094 EXPECT_HMIRESPONSE(RequestIdGetListOfPermissions,{result = {code = 0, method = "SDL.GetListOfPermissions", allowedFunctions = {{name = groupName}}}}) + EXPECT_HMIRESPONSE(RequestIdGetListOfPermissions) + :Do(function(_,data) + if data.result.allowedFunctions[1] ~= nil then + groupID = data.result.allowedFunctions[1].id + --print("SDL.GetListOfPermissions response is received") + end + + --hmi side: sending SDL.OnAppPermissionConsent + self.hmiConnection:SendNotification("SDL.OnAppPermissionConsent", { appID = self.applications["Test Application"], consentedFunctions = {{ allowed = bAllowed, id = groupID, name = groupName}}, source = "GUI"}) + end) + end) + end) + + end) + end) +end + +--Description: Function used to check file is existed on expected path + --file_name: file want to check +function file_check(file_name) + local file_found=io.open(file_name, "r") + + if file_found==nil then + return false + else + os.remove(file_name) + return true + end +end + + +--------------------------------------------------------------------------------------------- +-------------------------------------------Preconditions------------------------------------- +--------------------------------------------------------------------------------------------- + + --Print new line to separate Preconditions + commonFunctions:newTestCasesGroup("Preconditions") + + --Delete app_info.dat, logs and policy table + commonSteps:DeleteLogsFileAndPolicyTable() + + --1. Activate application + commonSteps:ActivationApp() + + + --2. PutFiles ("a", "icon.png", "action.png", strMaxLengthFileName255) + commonSteps:PutFile("PutFile_MinLength", "a") + commonSteps:PutFile("PutFile_icon.png", "icon.png") + commonSteps:PutFile("PutFile_icon.png", "action.png") + commonSteps:PutFile("PutFile_MaxLength_255Characters", strMaxLengthFileName255) + + --3. Update policy to allow request + policyTable:Precondition_updatePolicy_By_overwriting_preloaded_pt("files/PTU_OmittedEndAudioPassThru.json", "files/PTU_ForEndAudioPassThru.json") + + +--------------------------------------------------------------------------------------------- +-----------------------------------------I TEST BLOCK---------------------------------------- +--CommonRequestCheck: Check of mandatory/conditional request's parameters (mobile protocol)-- +--------------------------------------------------------------------------------------------- + --Begin Test suit PositiveRequestCheck + + --Print new line to separate test suite + commonFunctions:newTestCasesGroup("Test Suite For PositiveRequestCheck") + + --Description: TC's checks processing + -- request with all parameters + -- request with only mandatory parameters + -- request with all combinations of conditional-mandatory parameters (if exist) + -- request with one by one conditional parameters (each case - one conditional parameter) + -- request with missing mandatory parameters one by one (each case - missing one mandatory parameter) + -- request with all parameters are missing + -- request with fake parameters (fake - not from protocol, from another request) + -- request is sent with invalid JSON structure + -- different conditions of correlationID parameter (invalid, several the same etc.) + + --Begin Test case CommonRequestCheck.1 + --Description: This test is intended to check positive cases and when all parameters are in boundary conditions + + --Requirement id in JAMA: + -- SDLAQ-CRS-83 + + --Verification criteria: + -- EndAudioPassThru finishes the previously activated PerfromAudioPassThu. First EndAudioPassThru is responded by SDL, then the relevant PerfromAudioPassThu gets the response. + function Test:EndAudioPassThru_Positive() + local uiPerformID + local params ={ + samplingRate ="8KHZ", + maxDuration = 5000, + bitsPerSample ="8_BIT", + audioType ="PCM", + } + --mobile side: sending PerformAudioPassThru request + local cid = self.mobileSession:SendRPC("PerformAudioPassThru", params) + + UIParams = self:createUIParameters(params) + + ExpectOnHMIStatusWithAudioStateChanged(self,_, false) + + --hmi side: expect UI.OnRecordStart + EXPECT_HMINOTIFICATION("UI.OnRecordStart", {appID = self.applications["Test Application"]}) + + --hmi side: expect UI.PerformAudioPassThru request + EXPECT_HMICALL("UI.PerformAudioPassThru", UIParams) + :Do(function(_,data) + SendOnSystemContext(self,"HMI_OBSCURED") + + uiPerformID = data.id + end) + + --mobile side: expect OnAudioPassThru response + EXPECT_NOTIFICATION("OnAudioPassThru") + :Do(function(_,data) + local cidEndAudioPassThru = self.mobileSession:SendRPC("EndAudioPassThru", {}) + + EXPECT_HMICALL("UI.EndAudioPassThru") + :Do(function(_,data) + --hmi side: sending UI.EndAudioPassThru response + self.hmiConnection:SendResponse(data.id, data.method, "SUCCESS", {}) + + --hmi side: sending UI.PerformAudioPassThru response + self.hmiConnection:SendResponse(uiPerformID, "UI.PerformAudioPassThru", "SUCCESS", {}) + + SendOnSystemContext(self,"MAIN") + end) + + --mobile side: expect EndAudioPassThru response + EXPECT_RESPONSE(cidEndAudioPassThru, { success = true, resultCode = "SUCCESS" }) + end) + + --mobile side: expect PerformAudioPassThru response + EXPECT_RESPONSE(cid, { success = true, resultCode = "SUCCESS" }) + :ValidIf (function(_,data) + if file_check(storagePath.."/".."audio.wav") ~= true then + print(" \27[36m Can not found file: audio.wav \27[0m ") + return false + else + return true + end + end) + end + --End Test case CommonRequestCheck.1 + + ----------------------------------------------------------------------------------------- + + --Begin Test case CommonRequestCheck.2 + --Description: This test is intended to check request with mandatory and with or without conditional parameters + + -- Not Applicable + + --End Test case CommonRequestCheck.2 + + ----------------------------------------------------------------------------------------- + + --Begin Test case CommonRequestCheck.3 + --Description: This test is intended to check processing requests without mandatory parameters + + -- Not Applicable + + --End Test case CommonRequestCheck.3 + + ----------------------------------------------------------------------------------------- + + --Begin Test case CommonRequestCheck.4 + --Description: Check processing request with different fake parameters + + --Requirement id in JAMA: + --APPLINK-14765 + + --Verification criteria: + --SDL must cut off the fake parameters from requests, responses and notifications received from HMI + --Begin Test case CommonRequestCheck.4.1 + --Description: Parameter not from protocol + function Test:EndAudioPassThru_FakeParam() + local uiPerformID + local params ={ + samplingRate ="8KHZ", + maxDuration = 5000, + bitsPerSample ="8_BIT", + audioType ="PCM", + } + --mobile side: sending PerformAudioPassThru request + local cid = self.mobileSession:SendRPC("PerformAudioPassThru", params) + + UIParams = self:createUIParameters(params) + + ExpectOnHMIStatusWithAudioStateChanged(self, _, false) + + --hmi side: expect UI.OnRecordStart + EXPECT_HMINOTIFICATION("UI.OnRecordStart", {appID = self.applications["Test Application"]}) + + --hmi side: expect UI.PerformAudioPassThru request + EXPECT_HMICALL("UI.PerformAudioPassThru", UIParams) + :Do(function(_,data) + SendOnSystemContext(self,"HMI_OBSCURED") + + uiPerformID = data.id + end) + + --mobile side: expect OnAudioPassThru response + EXPECT_NOTIFICATION("OnAudioPassThru") + :Do(function(_,data) + local cidEndAudioPassThru = self.mobileSession:SendRPC("EndAudioPassThru", {fakeParam = "fakeParam"}) + + EXPECT_HMICALL("UI.EndAudioPassThru") + :Do(function(_,data) + --hmi side: sending UI.EndAudioPassThru response + self.hmiConnection:SendResponse(data.id, data.method, "SUCCESS", {}) + + --hmi side: sending UI.PerformAudioPassThru response + self.hmiConnection:SendResponse(uiPerformID, "UI.PerformAudioPassThru", "SUCCESS", {}) + + SendOnSystemContext(self,"MAIN") + end) + :ValidIf(function(_,data) + if data.params ~= nil then + print(" \27[36m SDL re-sends fakeParam parameters to HMI \27[0m") + return false + else + return true + end + end) + + --mobile side: expect EndAudioPassThru response + EXPECT_RESPONSE(cidEndAudioPassThru, { success = true, resultCode = "SUCCESS" }) + end) + + --mobile side: expect PerformAudioPassThru response + EXPECT_RESPONSE(cid, { success = true, resultCode = "SUCCESS" }) + :ValidIf (function(_,data) + if file_check(storagePath.."/".."audio.wav") ~= true then + print(" \27[36m Can not found file: audio.wav \27[0m ") + return false + else + return true + end + end) + end + --Begin Test case CommonRequestCheck.4.1 + + ----------------------------------------------------------------------------------------- + + --Begin Test case CommonRequestCheck.4.2 + --Description: Parameters from another request + function Test:EndAudioPassThru_ParamsAnotherRequest() + local uiPerformID + local params ={ + samplingRate ="8KHZ", + maxDuration = 5000, + bitsPerSample ="8_BIT", + audioType ="PCM", + } + --mobile side: sending PerformAudioPassThru request + local cid = self.mobileSession:SendRPC("PerformAudioPassThru", params) + + UIParams = self:createUIParameters(params) + + ExpectOnHMIStatusWithAudioStateChanged(self, _, false) + + --hmi side: expect UI.OnRecordStart + EXPECT_HMINOTIFICATION("UI.OnRecordStart", {appID = self.applications["Test Application"]}) + + --hmi side: expect UI.PerformAudioPassThru request + EXPECT_HMICALL("UI.PerformAudioPassThru", UIParams) + :Do(function(_,data) + SendOnSystemContext(self,"HMI_OBSCURED") + + uiPerformID = data.id + end) + + --mobile side: expect OnAudioPassThru response + EXPECT_NOTIFICATION("OnAudioPassThru") + :Do(function(_,data) + local cidEndAudioPassThru = self.mobileSession:SendRPC("EndAudioPassThru", {syncFileName = "icon.png",}) + + EXPECT_HMICALL("UI.EndAudioPassThru") + :Do(function(_,data) + --hmi side: sending UI.EndAudioPassThru response + self.hmiConnection:SendResponse(data.id, data.method, "SUCCESS", {}) + + --hmi side: sending UI.PerformAudioPassThru response + self.hmiConnection:SendResponse(uiPerformID, "UI.PerformAudioPassThru", "SUCCESS", {}) + + SendOnSystemContext(self,"MAIN") + end) + :ValidIf(function(_,data) + if data.params ~= nil then + print(" \27[36m SDL re-sends fakeParam parameters to HMI \27[0m") + return false + else + return true + end + end) + + --mobile side: expect EndAudioPassThru response + EXPECT_RESPONSE(cidEndAudioPassThru, { success = true, resultCode = "SUCCESS" }) + end) + + --mobile side: expect PerformAudioPassThru response + EXPECT_RESPONSE(cid, { success = true, resultCode = "SUCCESS" }) + :ValidIf (function(_,data) + if file_check(storagePath.."/".."audio.wav") ~= true then + print(" \27[36m Can not found file: audio.wav \27[0m ") + return false + else + return true + end + end) + end + --End Test case CommonRequestCheck.4.2 + --End Test case CommonRequestCheck.4 + ----------------------------------------------------------------------------------------- + + --Begin Test case CommonRequestCheck.5 + --Description: Invalid JSON + + --Requirement id in JAMA: + --SDLAQ-CRS-565 + + --Verification criteria: + --The request with wrong JSON syntax is sent, the response with INVALID_DATA result code is returned. + function Test:EndAudioPassThru_IncorrectJSON() + local uiPerformID + local params ={ + samplingRate ="8KHZ", + maxDuration = 5000, + bitsPerSample ="8_BIT", + audioType ="PCM", + } + --mobile side: sending PerformAudioPassThru request + local cid = self.mobileSession:SendRPC("PerformAudioPassThru", params) + + UIParams = self:createUIParameters(params) + + ExpectOnHMIStatusWithAudioStateChanged(self, _, false) + + --hmi side: expect UI.OnRecordStart + EXPECT_HMINOTIFICATION("UI.OnRecordStart", {appID = self.applications["Test Application"]}) + + --hmi side: expect UI.PerformAudioPassThru request + EXPECT_HMICALL("UI.PerformAudioPassThru", UIParams) + :Do(function(_,data) + SendOnSystemContext(self,"HMI_OBSCURED") + + uiPerformID = data.id + end) + + --mobile side: expect OnAudioPassThru response + EXPECT_NOTIFICATION("OnAudioPassThru") + :Do(function(_,data) + self.mobileSession.correlationId = self.mobileSession.correlationId + 1 + + local msg = + { + serviceType = 7, + frameInfo = 0, + rpcType = 0, + rpcFunctionId = 17, + rpcCorrelationId = self.mobileSession.correlationId, + --< These checks are not applicable. There is no response from HMI to SDL. + + +---------------------------------------------------------------------------------------------- +----------------------------------------IV TEST BLOCK----------------------------------------- +---------------------------------------Result code check-------------------------------------- +---------------------------------------------------------------------------------------------- + + --Check all uncovered pairs resultCodes+success + + --Begin Test suit ResultCodeCheck + --Description: check result code of response to Mobile + + --Begin Test case ResultCodeCheck.1 + --Description: Check resultCode: INVALID_DATA + + --Requirement id in JAMA/or Jira ID: SDLAQ-CRS-139 + + --Verification criteria: SDL response INVALID_DATA resultCode to Mobile + + --Check response with resultCode INVALID_DATA + function Test:GenericResponse_resultcode_INVALID_DATA() + + SendUnsupportedRequestAndVerifyGenericResponse_INVALID_DATA(self, 0x500, '{}') + + end + + --End Test case ResultCodeCheck.1 + ----------------------------------------------------------------------------------------- + + --End Test suit ResultCodeCheck + + +---------------------------------------------------------------------------------------------- +-----------------------------------------V TEST BLOCK----------------------------------------- +---------------------------------------HMI negative cases------------------------------------- +---------------------------------------------------------------------------------------------- + + --------Checks----------- + -- requests without responses from HMI + -- invalid structure os response + -- several responses from HMI to one request + -- fake parameters + -- HMI correlation id check + -- wrong response with correct HMI id + + + -- SubscribeButton API does not have any response from HMI. This test suit is not applicable => Ignore + + + +---------------------------------------------------------------------------------------------- +-----------------------------------------VI TEST BLOCK---------------------------------------- +-------------------------Sequence with emulating of user's action(s)-------------------------- +---------------------------------------------------------------------------------------------- + + --Begin Test suit SequenceCheck + --Description: TC's checks SDL behavior by processing + -- different request sequence with timeout + -- with emulating of user's actions + + --Begin Test case SequenceCheck.1 + --Description: check scenario in test case TC_GenericResponse_01.vsd + + --Requirement id in JAMA/or Jira ID: SDLAQ-CRS-139 + + --Verification criteria: SDL responses GenericResponse with INVALID resultCode + + function Test:GenericResponse_mobile_send_non_existing_request_INVALID_DATA() + + SendUnsupportedRequestAndVerifyGenericResponse_INVALID_DATA(self, 0x501, '{}') + + end + + --End Test case SequenceCheck.1 + ----------------------------------------------------------------------------------------- + + --Note: These is only INVALID_DATA resultCode. No other resultCode is used for GenericResponse response. + + --End Test suit SequenceCheck + + + + + +---------------------------------------------------------------------------------------------- +-----------------------------------------VII TEST BLOCK--------------------------------------- +--------------------------------------Different HMIStatus------------------------------------- +---------------------------------------------------------------------------------------------- + --Description: processing of request/response in different HMIlevels, SystemContext, AudioStreamingState + + --Begin Test suit DifferentHMIlevel + --Description: processing API in different HMILevel + + + --Begin Test case DifferentHMIlevel.1 + --Description: Check GenericRequest request when application is in NONE HMI level + + --Requirement id in JAMA/or Jira ID: SDLAQ-CRS-139 + + --Verification criteria: SDL responses GenericResponse in NONE HMI level + + -- Precondition: Change app to NONE HMI level + commonSteps:DeactivateAppToNoneHmiLevel() + + function Test:GenericResponse_Different_HMIStatus_NONE_INVALID_DATA() + + SendUnsupportedRequestAndVerifyGenericResponse_INVALID_DATA(self, 0x500, '{}') + + end + + --Postcondition: Activate app + commonSteps:ActivationApp() + + --End Test case DifferentHMIlevel.1 + ----------------------------------------------------------------------------------------- + + --Begin Test case DifferentHMIlevel.1 + --Description: Check GenericRequest request when application is in LIMITED HMI level + + --Requirement id in JAMA/or Jira ID: SDLAQ-CRS-139 + + --Verification criteria: SDL responses GenericResponse in LIMITED HMI level + + if commonFunctions:isMediaApp() then + + -- Precondition: Change app to LIMITED + commonSteps:ChangeHMIToLimited() + + function Test:GenericResponse_Different_HMIStatus_LIMITED_INVALID_DATA() + + SendUnsupportedRequestAndVerifyGenericResponse_INVALID_DATA(self, 0x500, '{}') + + end + + end + + --End Test case DifferentHMIlevel.1 + ----------------------------------------------------------------------------------------- + + + + + + --Begin Test case DifferentHMIlevel.3 + --Description: Check GenericRequest request when application is in BACKGOUND HMI level + + --Requirement id in JAMA/or Jira ID: SDLAQ-CRS-139 + + --Verification criteria: SDL responses GenericResponse in BACKGOUND HMI level + + -- Precondition 1: Change app to BACKGOUND HMI level + commonTestCases:ChangeAppToBackgroundHmiLevel() + + function Test:GenericResponse_Different_HMIStatus_BACKGROUND_INVALID_DATA() + + SendUnsupportedRequestAndVerifyGenericResponse_INVALID_DATA(self, 0x500, '{}') + + end + + --End Test case DifferentHMIlevel.3 + ----------------------------------------------------------------------------------------- + + --End Test suit DifferentHMIlevel + + + +return Test + \ No newline at end of file diff --git a/test_scripts/API/ATF_GetDTCs.lua b/test_scripts/API/ATF_GetDTCs.lua new file mode 100644 index 0000000000..10effa55f4 --- /dev/null +++ b/test_scripts/API/ATF_GetDTCs.lua @@ -0,0 +1,1929 @@ +Test = require('connecttest') +require('cardinalities') +local events = require('events') +local mobile_session = require('mobile_session') +local mobile = require('mobile_connection') +local tcp = require('tcp_connection') +local file_connection = require('file_connection') + +local module = require('testbase') + +--------------------------------------------------------------------------------------------- +-----------------------------Required Shared Libraries--------------------------------------- +--------------------------------------------------------------------------------------------- +local commonFunctions = require('user_modules/shared_testcases/commonFunctions') +local commonSteps = require('user_modules/shared_testcases/commonSteps') +local commonTestCases = require('user_modules/shared_testcases/commonTestCases') +local policyTable = require('user_modules/shared_testcases/testCasesForPolicyTable') +local integerParameter = require('user_modules/shared_testcases/testCasesForIntegerParameter') +local stringParameterInResponse = require('user_modules/shared_testcases/testCasesForStringParameterInResponse') +local integerParameterInResponse = require('user_modules/shared_testcases/testCasesForIntegerParameterInResponse') +local arrayStringParameterInResponse = require('user_modules/shared_testcases/testCasesForArrayStringParameterInResponse') +require('user_modules/AppTypes') + + +--------------------------------------------------------------------------------------------- +------------------------------------ Common Variables --------------------------------------- +--------------------------------------------------------------------------------------------- +APIName = "GetDTCs" -- set request name + +--------------------------------------------------------------------------------------------- +-------------------------- Overwrite These Functions For This Script------------------------- +--------------------------------------------------------------------------------------------- +--Specific functions for this script +--1. createRequest() +--2. createResponse(Request) +--3. verify_SUCCESS_Case(Request) +--4. verify_SUCCESS_Response_Case(Response) +--5. verify_GENERIC_ERROR_Response_Case(Response) +--------------------------------------------------------------------------------------------- + +--Create default request +function Test:createRequest() + + + return { + ecuName = 0 + } + +end + +--Create VehicleInfo expected result based on parameters from the request +function Test:createResponse(Request) + + local Req = commonFunctions:cloneTable(Request) + + local Response = {} + if Req["ecuName"] ~= nil then + Response["ecuHeader"] = 2 + end + + if Req["dtcMask"] ~= nil then + Response["dtc"] = {"line 0","line 1","line 2"} + end + + return Response + +end + +--This function sends a request from mobile and verify result on HMI and mobile for SUCCESS resultCode cases. +function Test:verify_SUCCESS_Case(Request) + + --mobile side: sending the request + local cid = self.mobileSession:SendRPC(APIName, Request) + + --hmi side: expect VehicleInfo.GetDTCs request + local Response = self:createResponse(Request) + EXPECT_HMICALL("VehicleInfo.GetDTCs", Request) + :Do(function(_,data) + --hmi side: sending response + self.hmiConnection:SendResponse(data.id, data.method, "SUCCESS", Response) + end) + + --mobile side: expect the response + local ExpectedResponse = commonFunctions:cloneTable(Response) + ExpectedResponse["success"] = true + ExpectedResponse["resultCode"] = "SUCCESS" + EXPECT_RESPONSE(cid, ExpectedResponse) + +end + +--This function is used to send default request and response with specific valid data and verify SUCCESS resultCode +function Test:verify_SUCCESS_Response_Case(Response) + + --mobile side: sending the request + local Request = self:createRequest() + local cid = self.mobileSession:SendRPC(APIName, Request) + + --hmi side: expect VehicleInfo.GetDTCs request + EXPECT_HMICALL("VehicleInfo.GetDTCs", Request) + :Do(function(_,data) + --hmi side: sending response + self.hmiConnection:SendResponse(data.id, data.method, "SUCCESS", Response) + end) + + --mobile side: expect the response + local ExpectedResponse = commonFunctions:cloneTable(Response) + ExpectedResponse["success"] = true + ExpectedResponse["resultCode"] = "SUCCESS" + EXPECT_RESPONSE(cid, ExpectedResponse) + +end + +--This function is used to send default request and response with specific invalid data and verify GENERIC_ERROR resultCode +--TODO: Update after resolving APPLINK-14765 +function Test:verify_GENERIC_ERROR_Response_Case(Response) + + --mobile side: sending the request + local Request = self:createRequest() + local cid = self.mobileSession:SendRPC(APIName, Request) + + --hmi side: expect VehicleInfo.GetDTCs request + EXPECT_HMICALL("VehicleInfo.GetDTCs", Request) + :Do(function(_,data) + --hmi side: sending response + self.hmiConnection:SendResponse(data.id, data.method, "SUCCESS", Response) + end) + + --mobile side: expect the response + -- EXPECT_RESPONSE(cid, { success = false, resultCode = "GENERIC_ERROR", info = "Received invalid data on HMI response" }) + EXPECT_RESPONSE(cid, { success = false, resultCode = "INVALID_DATA"}) + +end + +--------------------------------------------------------------------------------------------- +-------------------------------------------Preconditions------------------------------------- +--------------------------------------------------------------------------------------------- + + + commonSteps:DeleteLogsFileAndPolicyTable() + + --Print new line to separate new test cases group + commonFunctions:newTestCasesGroup("Preconditions") + + --1. Activate application + commonSteps:ActivationApp() + + --2. Update policy to allow request + policyTable:precondition_updatePolicy_AllowFunctionInHmiLeves({"BACKGROUND", "FULL", "LIMITED"}) + + +----------------------------------------------------------------------------------------------- +-------------------------------------------TEST BLOCK I---------------------------------------- +--------------------------------Check normal cases of Mobile request--------------------------- +----------------------------------------------------------------------------------------------- + +--Requirement id in JAMA: + --SDLAQ-CRS-105 (GetDTCs_Request_v2_0) + --SDLAQ-CRS-106 (GetDTCs_Response_v2_0) + --SDLAQ-CRS-630 (SUCCESS) + --SDLAQ-CRS-631 (INVALID_DATA) + + +--Verification criteria: GetDTC request sends exact ECU(electronic control unit) name and dtcMask for getting the vehicle module diagnostic trouble code. The response with response resultCode, ecuHeader and an array of all reported DTCs on module is returned. + +--List of parameters: +--1. ecuName: type=Integer, minvalue="0" maxvalue="65535" mandatory="true" +--2. dtcMask: type=Integer, minvalue="0" maxvalue="255" mandatory="false" +----------------------------------------------------------------------------------------------- + +--Common Test cases check all parameters with lower bound and upper bound +--1. PositiveRequest +--2. Only mandatory parameters +--3. All parameters are lower bound +--4. All parameters are upper bound + + + Test["GetDTCs_PositiveRequest_SUCCESS"] = function(self) + + --mobile side: request parameters + local Request = + { + ecuName = 2, + dtcMask = 3 + } + + self:verify_SUCCESS_Case(Request) + + end + ----------------------------------------------------------------------------------------- + + Test["GetDTCs_OnlyMandatoryParameters_SUCCESS"] = function(self) + + --mobile side: request parameters + local Request = + { + ecuName = 0 + } + + self:verify_SUCCESS_Case(Request) + + end + ----------------------------------------------------------------------------------------- + + Test["GetDTCs_AllParametersLowerBound_SUCCESS"] = function(self) + + --mobile side: request parameters + local Request = + { + ecuName = 0, + dtcMask = 0 + } + + self:verify_SUCCESS_Case(Request) + + end + ----------------------------------------------------------------------------------------- + + Test["GetDTCs_AllParametersUpperBound_SUCCESS"] = function(self) + + --mobile side: request parameters + local Request = + { + ecuName = 65535, + dtcMask = 255 + } + + self:verify_SUCCESS_Case(Request) + + end + ----------------------------------------------------------------------------------------- + + + +----------------------------------------------------------------------------------------------- +--Parameter 1: ecuName: type=Integer, minvalue="0" maxvalue="65535" mandatory="true" +--Parameter 2: dtcMask: type=Integer, minvalue="0" maxvalue="255" mandatory="false" +----------------------------------------------------------------------------------------------- +--List of test cases for Integer type parameter: + --1. IsMissed + --2. IsWrongType + --3. IsLowerBound + --4. IsUpperBound + --5. IsOutLowerBound + --6. IsOutUpperBound +----------------------------------------------------------------------------------------------- + +local Request1 = {dtcMask = 1} +integerParameter:verify_Integer_Parameter(Request1, {"ecuName"}, {0, 65535}, true) + +local Request2 = {ecuName = 2} +integerParameter:verify_Integer_Parameter(Request2, {"dtcMask"}, {0, 255}, false) + + + +---------------------------------------------------------------------------------------------- +----------------------------------------TEST BLOCK II----------------------------------------- +-----------------------------Check special cases of Mobile request---------------------------- +---------------------------------------------------------------------------------------------- + +--Begin Test case SpecialRequestChecks +--Description: Check special requests + + --Requirement id in JAMA: + --SDLAQ-CRS-105 (GetDTCs_Request_v2_0) + --SDLAQ-CRS-106 (GetDTCs_Response_v2_0) + --SDLAQ-CRS-630 (SUCCESS) + --SDLAQ-CRS-631 (INVALID_DATA) + + --Verification criteria: GetDTCs request notifies the user via VehicleInfo engine with some information that the app provides to HMI. After VehicleInfo has prompted, the response with SUCCESS resultCode is returned to mobile app. + +local function SpecialRequestChecks() + + --Print new line to separate new test cases group + commonFunctions:newTestCasesGroup("Test Suite For Special Request Checks") + + --Begin Test case NegativeRequestCheck.1 + --Description: Invalid JSON + + --Requirement id in JAMA: SDLAQ-CRS-631 + --Verification criteria: The request with wrong JSON syntax is sent, the response with INVALID_DATA result code is returned. + + --local Payload = '{"ecuName":1, "dtcMask":2}' -- valid JSON + local Payload = '{"ecuName";1, "dtcMask":2}' + commonTestCases:VerifyInvalidJsonRequest(24, Payload) --GetDTCsID = 24 + + --End Test case NegativeRequestCheck.1 + + + --Begin Test case NegativeRequestCheck.2 + --Description: CorrelationId check( duplicate value) + + + function Test:GetDTCs_CorrelationID_IsDuplicated() + + --mobile side: sending GetDTCs request + local Request = + { + ecuName = 0, + dtcMask = 0 + } + local cid = self.mobileSession:SendRPC(APIName, Request) + + --request from mobile side + local msg = + { + serviceType = 7, + frameInfo = 0, + rpcType = 0, + rpcFunctionId = 24, + rpcCorrelationId = cid, + payload = '{"ecuName":0,"dtcMask":0}}' + } + + --hmi side: expect VehicleInfo.GetDTCs request + local Response = self:createResponse(Request) + EXPECT_HMICALL("VehicleInfo.GetDTCs", { ecuName = 0, dtcMask = 0} ) + :Do(function(exp,data) + if exp.occurences == 1 then + self.mobileSession:Send(msg) + end + + --hmi side: sending response + self.hmiConnection:SendResponse(data.id, data.method, "SUCCESS", Response) + + end) + :Times(2) + + --response on mobile side + local ExpectedResponse = commonFunctions:cloneTable(Response) + ExpectedResponse["success"] = true + ExpectedResponse["resultCode"] = "SUCCESS" + EXPECT_RESPONSE(cid, ExpectedResponse) + :Times(2) + + end + + --End Test case NegativeRequestCheck.2 + + + --Begin Test case NegativeRequestCheck.3 + --Description: Fake parameters check + + --Requirement id in JAMA: APPLINK-14765 + --Verification criteria: SDL must cut off the fake parameters from requests, responses and notifications received from HMI + + --Begin Test case NegativeRequestCheck.3.1 + --Description: Fake parameters is not from any API + + function Test:GetDTCs_FakeParams_IsNotFromAnyAPI() + + --mobile side: sending GetDTCs request + local FakeRequest = + { + fakeParam = "abc", + ecuName = 1, + dtcMask = 2 + } + + local cid = self.mobileSession:SendRPC(APIName, FakeRequest) + + local Request = + { + ecuName = 1, + dtcMask = 2 + } + + --hmi side: expect the request + local Response = self:createResponse(Request) + EXPECT_HMICALL("VehicleInfo.GetDTCs", Request) + :ValidIf(function(_,data) + if data.params.fakeParam then + commonFunctions:printError(" SDL re-sends fakeParam parameters to HMI") + return false + else + return true + end + end) + :Do(function(_,data) + --hmi side: Sending response + self.hmiConnection:SendResponse(data.id, data.method, "SUCCESS", Response) + end) + + --mobile side: expect the response + local ExpectedResult = commonFunctions:cloneTable(Response) + ExpectedResult["success"] = true + ExpectedResult["resultCode"] = "SUCCESS" + EXPECT_RESPONSE(cid, ExpectedResult) + + end + + --End Test case NegativeRequestCheck.3.1 + ----------------------------------------------------------------------------------------- + + --Begin Test case NegativeRequestCheck.3.2 + --Description: Fake parameters is not from another API + + function Test:GetDTCs_FakeParams_ParameterIsFromAnotherAPI() + + --mobile side: sending GetDTCs request + local FakeRequest = + { + syncFileName = "abc", + ecuName = 1, + dtcMask = 2 + } + + local Request = + { + ecuName = 1, + dtcMask = 2 + } + + local cid = self.mobileSession:SendRPC(APIName, FakeRequest) + + + --hmi side: expect the request + local Response = self:createResponse(Request) + EXPECT_HMICALL("VehicleInfo.GetDTCs", Request) + :ValidIf(function(_,data) + if data.params.syncFileName then + commonFunctions:printError(" SDL re-sends fakeParam parameters to HMI") + return false + else + return true + end + end) + :Do(function(_,data) + --hmi side: Sending response + self.hmiConnection:SendResponse(data.id, data.method, "SUCCESS", Response) + end) + + --mobile side: expect the response + local ExpectedResult = commonFunctions:cloneTable(Response) + ExpectedResult["success"] = true + ExpectedResult["resultCode"] = "SUCCESS" + EXPECT_RESPONSE(cid, ExpectedResult) + + end + + --End Test case NegativeRequestCheck.3.2 + ----------------------------------------------------------------------------------------- + + + --Begin Test case NegativeRequestCheck.3.3 + --Description: Fake parameters is not from any API + + function Test:GetDTCs_WithFakeParamsAndInvalidRequest() + + --mobile side: sending GetDTCs request + local FakeRequest = + { + fakeParam = "abc", + --ecuName = 1, + dtcMask = 2 + } + + local cid = self.mobileSession:SendRPC(APIName, FakeRequest) + + + --hmi side: expect the request + EXPECT_HMICALL("VehicleInfo.GetDTCs", {}) + :Times(0) + + --mobile side: expect the response + EXPECT_RESPONSE(cid, { success = false, resultCode = "INVALID_DATA" }) + + end + + --End Test case NegativeRequestCheck.3.3 + ----------------------------------------------------------------------------------------- + + --End Test case NegativeRequestCheck.3 + + + --Begin Test case NegativeRequestCheck.4 + --Description: All parameters missing + + commonTestCases:VerifyRequestIsMissedAllParameters() + + --End Test case NegativeRequestCheck.4 + ----------------------------------------------------------------------------------------- + +end + +SpecialRequestChecks() + +--End Test case NegativeRequestCheck + + +----------------------------------------------------------------------------------------------- +-------------------------------------------TEST BLOCK III-------------------------------------- +----------------------------------Check normal cases of HMI response--------------------------- +----------------------------------------------------------------------------------------------- + +--Requirement id in JAMA: + --SDLAQ-CRS-105 (GetDTCs_Request_v2_0) + --SDLAQ-CRS-106 (GetDTCs_Response_v2_0) + --SDLAQ-CRS-630 (SUCCESS) + --SDLAQ-CRS-631 (INVALID_DATA) + --SDLAQ-CRS-632 (OUT_OF_MEMORY) + --SDLAQ-CRS-633 (TOO_MANY_PENDING_REQUESTS) + --SDLAQ-CRS-634 (APPLICATION_NOT_REGISTERED) + --SDLAQ-CRS-635 (REJECTED) + --SDLAQ-CRS-636 (GENERIC_ERROR) + --SDLAQ-CRS-637 (DISALLOWED) + --SDLAQ-CRS-638 (USER_DISALLOWED) + --SDLAQ-CRS-1096 (TRUNCATED_DATA) + --APPLINK-14765: SDL must cut off the fake parameters from requests, responses and notifications received from HMI ( response (request) is invalid SDL must respond GENERIC_ERROR (success:false, info: "Invalid message received from vehicle") to mobile app) + --APPLINK-14551: SDL behavior: cases when SDL must transfer "info" parameter via corresponding RPC to mobile app + +--Verification Criteria: + --The response contains 3 mandatory parameters "success", "ecuHeader" and "resultCode". + --"info" is sent if there is any additional information about the resultCode. Array of "dtc" data is returned if available. + +--List of parameters: +--Parameter 1: resultCode: type=String Enumeration(Integer), mandatory="true" +--Parameter 2: method: type=String, mandatory="true" (main test case: method is correct or not) +--Parameter 3: info: type=String, minlength="1" maxlength="10" mandatory="false" +--Parameter 4: correlationID: type=Integer, mandatory="true" +--Parameter 5: ecuHeader: type=Integer, minvalue="0" maxvalue="65535" mandatory="true" +--Parameter 6: dtc: type=String, minsize="1" maxsize="15" maxlength="10" array="true" mandatory="false" +----------------------------------------------------------------------------------------------- + + +--Common Test cases for response +--1. Check all mandatory parameters are missed +--2. Check all parameters are missed + +--Print new line to separate new test cases group +commonFunctions:newTestCasesGroup("Test suite: common test cases for response") + +Test[APIName.."_Response_MissingMandatoryParameters_GENERIC_ERROR"] = function(self) + + --mobile side: sending the request + local Request = + { + ecuName = 1, + dtcMask = 2 + } + + local cid = self.mobileSession:SendRPC(APIName, Request) + + + --hmi side: expect the request + local Response = self:createResponse(Request) + EXPECT_HMICALL("VehicleInfo.GetDTCs", Request) + :Do(function(_,data) + --hmi side: Sending response + --self.hmiConnection:Send('{"id":'..tostring(data.id)..',"jsonrpc":"2.0","result":{"method":"VehicleInfo.GetDTCs", "code":0, "dtc":["line 0","line 1","line 2"],"ecuHeader":2}}') + self.hmiConnection:Send('{"jsonrpc":"2.0","result":{"dtc":["line 0","line 1","line 2"]}}') + + end) + + --mobile side: expect the response + EXPECT_RESPONSE(cid, { success = false, resultCode = "GENERIC_ERROR"}) + :Timeout(13000) + +end +----------------------------------------------------------------------------------------- + + +Test[APIName.."_Response_MissingAllParameters_GENERIC_ERROR"] = function(self) + + --mobile side: sending the request + local Request = + { + ecuName = 1, + dtcMask = 2 + } + + local cid = self.mobileSession:SendRPC(APIName, Request) + + + --hmi side: expect the request + local Response = self:createResponse(Request) + EXPECT_HMICALL("VehicleInfo.GetDTCs", Request) + :Do(function(_,data) + --hmi side: Sending response + --self.hmiConnection:Send('{"id":'..tostring(data.id)..',"jsonrpc":"2.0","result":{"method":"VehicleInfo.GetDTCs", "code":0, "dtc":["line 0","line 1","line 2"],"ecuHeader":2}}') + self.hmiConnection:Send('{}') + + end) + + --mobile side: expect the response + EXPECT_RESPONSE(cid, { success = false, resultCode = "GENERIC_ERROR"}) + :Timeout(13000) + +end +----------------------------------------------------------------------------------------- + + +----------------------------------------------------------------------------------------------- +--Parameter 1: resultCode +----------------------------------------------------------------------------------------------- +--List of test cases: + --1. IsMissed + --2. IsValidValue + --3. IsNotExist + --4. IsEmpty + --5. IsWrongType +----------------------------------------------------------------------------------------------- +--ToDo: Update according to APPLINK-16141: Clarify behaviors of SDL when receiving SUCCESS resultCode in erroneous response and non SUCCESS resultCode in response +local function verify_resultCode_parameter() + + + --Print new line to separate new test cases group + commonFunctions:newTestCasesGroup({"resultCode"}) + + ----------------------------------------------------------------------------------------- + + --1. IsMissed + Test[APIName.."_Response_resultCode_IsMissed_GENERIC_ERROR_SendResponse"] = function(self) + + --mobile side: sending the request + local Request = self:createRequest() + local cid = self.mobileSession:SendRPC(APIName, Request) + + + --hmi side: expect the request + EXPECT_HMICALL("VehicleInfo.GetDTCs", Request) + :Do(function(_,data) + --hmi side: sending response + --self.hmiConnection:Send('{"id":'..tostring(data.id)..',"jsonrpc":"2.0","result":{"method":"VehicleInfo.GetDTCs", "code":0, "dtc":["line 0","line 1","line 2"],"ecuHeader":2}}') + + self.hmiConnection:Send('{"id":'..tostring(data.id)..',"jsonrpc":"2.0","result":{"method":"VehicleInfo.GetDTCs", "dtc":["line 0","line 1","line 2"],"ecuHeader":2}}') + + end) + + --mobile side: expect the response + --TODO: update after resolving APPLINK-14765 + -- EXPECT_RESPONSE(cid, { success = false, resultCode = "GENERIC_ERROR", info = "Invalid message received from vehicle"}) + EXPECT_RESPONSE(cid, { success = false, resultCode = "INVALID_DATA"}) + + end + + Test[APIName.."_Response_resultCode_IsMissed_GENERIC_ERROR_SendError"] = function(self) + + --mobile side: sending the request + local Request = self:createRequest() + local cid = self.mobileSession:SendRPC(APIName, Request) + + + --hmi side: expect the request + EXPECT_HMICALL("VehicleInfo.GetDTCs", Request) + :Do(function(_,data) + --hmi side: sending response + --self.hmiConnection:Send('{"id":'..tostring(data.id)..',"jsonrpc":"2.0","error":{"data":{"method":"VehicleInfo.GetDTCs"},"code":4,"message":"abc"}}') + self.hmiConnection:Send('{"id":'..tostring(data.id)..',"jsonrpc":"2.0","error":{"data":{"method":"VehicleInfo.GetDTCs"},"message":"abc"}}') + end) + + --mobile side: expect the response + --TODO: update after resolving APPLINK-14765 + -- EXPECT_RESPONSE(cid, { success = false, resultCode = "GENERIC_ERROR", info = "Invalid message received from vehicle"}) + EXPECT_RESPONSE(cid, { success = false, resultCode = "INVALID_DATA"}) + + end + ----------------------------------------------------------------------------------------- + + + --2. IsValidValue + local resultCodes = { + {resultCode = "SUCCESS", success = true}, + {resultCode = "INVALID_DATA", success = false}, + {resultCode = "OUT_OF_MEMORY", success = false}, + {resultCode = "TOO_MANY_PENDING_REQUESTS", success = false}, + {resultCode = "APPLICATION_NOT_REGISTERED", success = false}, + {resultCode = "REJECTED", success = false}, + {resultCode = "GENERIC_ERROR", success = false}, + {resultCode = "DISALLOWED", success = false}, + {resultCode = "USER_DISALLOWED", success = false}, + {resultCode = "TRUNCATED_DATA", success = true} + } + + for i =1, #resultCodes do + + Test[APIName.."_Response_resultCode_IsValidValue_" .. resultCodes[i].resultCode .."_SendResponse"] = function(self) + + --mobile side: sending the request + local Request = self:createRequest() + local cid = self.mobileSession:SendRPC(APIName, Request) + + --hmi side: expect the request + local Response = self:createResponse(Request) + EXPECT_HMICALL("VehicleInfo.GetDTCs", Request) + :Do(function(_,data) + --hmi side: sending response + self.hmiConnection:SendResponse(data.id, data.method, resultCodes[i].resultCode, Response) + end) + + + --mobile side: expect the response + local ExpectedResponse = commonFunctions:cloneTable(Response) + ExpectedResponse["success"] = resultCodes[i].success + ExpectedResponse["resultCode"] = resultCodes[i].resultCode + EXPECT_RESPONSE(cid, ExpectedResponse) + + end + ----------------------------------------------------------------------------------------- + + Test[APIName.."_Response_resultCode_IsValidValue_" .. resultCodes[i].resultCode .."_SendError"] = function(self) + + --mobile side: sending the request + local Request = self:createRequest() + local cid = self.mobileSession:SendRPC(APIName, Request) + + --hmi side: expect the request + EXPECT_HMICALL("VehicleInfo.GetDTCs", Request) + :Do(function(_,data) + --hmi side: sending the response + self.hmiConnection:SendError(data.id, data.method, resultCodes[i].resultCode, "info") + end) + + --mobile side: expect the response + EXPECT_RESPONSE(cid, { success = resultCodes[i].success, resultCode = resultCodes[i].resultCode, info = "info"}) + end + ----------------------------------------------------------------------------------------- + + end + ----------------------------------------------------------------------------------------- + + + + --3. IsNotExist + --4. IsEmpty + --5. IsWrongType + local testData = { + {value = "ANY", name = "IsNotExist"}, + {value = "", name = "IsEmpty"}, + {value = 123, name = "IsWrongType"}} + + for i =1, #testData do + + Test[APIName.."_Response_resultCode_" .. testData[i].name .."_GENERIC_ERROR_SendResponse"] = function(self) + + --mobile side: sending the request + local Request = self:createRequest() + local cid = self.mobileSession:SendRPC(APIName, Request) + + --hmi side: expect the request + local Response = self:createResponse(Request) + EXPECT_HMICALL("VehicleInfo.GetDTCs", Request) + :Do(function(_,data) + --hmi side: sending the response + self.hmiConnection:SendResponse(data.id, data.method, testData[i].value, Response) + end) + + --mobile side: expect the response + --TODO: update after resolving APPLINK-14765 + -- EXPECT_RESPONSE(cid, { success = false, resultCode = "GENERIC_ERROR", info = "Invalid message received from vehicle"}) + EXPECT_RESPONSE(cid, { success = false, resultCode = "INVALID_DATA"}) + end + ----------------------------------------------------------------------------------------- + + Test[APIName.."_Response_resultCode_" .. testData[i].name .."_GENERIC_ERROR_SendError"] = function(self) + + --mobile side: sending the request + local Request = self:createRequest() + local cid = self.mobileSession:SendRPC(APIName, Request) + + --hmi side: expect the request + EXPECT_HMICALL("VehicleInfo.GetDTCs", Request) + :Do(function(_,data) + --hmi side: sending the response + self.hmiConnection:SendError(data.id, data.method, testData[i].value) + end) + + --mobile side: expect the response + --TODO: update after resolving APPLINK-14765 + -- EXPECT_RESPONSE(cid, { success = false, resultCode = "GENERIC_ERROR", info = "Invalid message received from vehicle"}) + EXPECT_RESPONSE(cid, { success = false, resultCode = "INVALID_DATA"}) + end + ----------------------------------------------------------------------------------------- + + end + ----------------------------------------------------------------------------------------- + +end + +verify_resultCode_parameter() + + +----------------------------------------------------------------------------------------------- +--Parameter 2: method +----------------------------------------------------------------------------------------------- +--List of test cases: + --1. IsMissed + --2. IsValidResponse + --3. IsNotValidResponse + --4. IsOtherResponse + --5. IsEmpty + --6. IsWrongType + --7. IsInvalidCharacter - \n, \t, only spaces +----------------------------------------------------------------------------------------------- + +--ToDo: Update according to answer on APPLINK-16111: Clarify SDL behaviors when HMI responses invalid correlationId or invalid method +local function verify_method_parameter() + + + --Print new line to separate new test cases group + commonFunctions:newTestCasesGroup({"method"}) + + + --1. IsMissed + Test[APIName.."_Response_method_IsMissed_GENERIC_ERROR_SendResponse"] = function(self) + + --mobile side: sending the request + local Request = self:createRequest() + local cid = self.mobileSession:SendRPC(APIName, Request) + + + --hmi side: expect the request + EXPECT_HMICALL("VehicleInfo.GetDTCs", Request) + :Do(function(_,data) + + --hmi side: sending the response + --self.hmiConnection:Send('{"id":'..tostring(data.id)..',"jsonrpc":"2.0","result":{"method":"VehicleInfo.GetDTCs", "code":0, "dtc":["line 0","line 1","line 2"],"ecuHeader":2}}') + self.hmiConnection:Send('{"id":'..tostring(data.id)..',"jsonrpc":"2.0","result":{"code":0, "dtc":["line 0","line 1","line 2"],"ecuHeader":2}}') + end) + + --mobile side: expect the response + EXPECT_RESPONSE(cid, { success = false, resultCode = "GENERIC_ERROR"}) + :Timeout(13000) + + end + + Test[APIName.."_Response_method_IsMissed_GENERIC_ERROR_SendError"] = function(self) + + --mobile side: sending the request + local Request = self:createRequest() + local cid = self.mobileSession:SendRPC(APIName, Request) + + + --hmi side: expect the request + EXPECT_HMICALL("VehicleInfo.GetDTCs", Request) + :Do(function(_,data) + + --hmi side: sending the response + --self.hmiConnection:Send('{"id":'..tostring(data.id)..',"jsonrpc":"2.0","error":{"data":{"method":"VehicleInfo.GetDTCs"},"code":4,"message":"abc"}}') + self.hmiConnection:Send('{"id":'..tostring(data.id)..',"jsonrpc":"2.0","error":{"data":{},"code":4,"message":"abc"}}') + + end) + + --mobile side: expect the response + EXPECT_RESPONSE(cid, { success = false, resultCode = "GENERIC_ERROR"}) + :Timeout(13000) + + end + ----------------------------------------------------------------------------------------- + + --2. IsValidResponse Covered by many test cases + ----------------------------------------------------------------------------------------- + + + --3. IsNotValidResponse + --4. IsOtherResponse + --5. IsEmpty + --6. IsWrongType + --7. IsInvalidCharacter - \n, \t, spaces + local Methods = { + {method = "ANY", name = "IsNotValidResponse"}, + {method = "GetCapabilities", name = "IsOtherResponse"}, + {method = "", name = "IsEmpty"}, + {method = 123, name = "IsWrongType"}, + {method = "a\nb", name = "IsInvalidCharacter_NewLine"}, + {method = "a\tb", name = "IsInvalidCharacter_Tab"}, + {method = " ", name = "IsSpaces"}, + } + + for i =1, #Methods do + + Test[APIName.."_Response_method_" .. Methods[i].name .."_GENERIC_ERROR_SendResponse"] = function(self) + + --mobile side: sending the request + local Request = self:createRequest() + local cid = self.mobileSession:SendRPC(APIName, Request) + + --hmi side: expect the request + local Response = self:createResponse(Request) + EXPECT_HMICALL("VehicleInfo.GetDTCs", Request) + :Do(function(_,data) + --hmi side: sending the response + --self.hmiConnection:SendResponse(data.id, data.method, "SUCCESS", {}) + self.hmiConnection:SendResponse(data.id, Methods[i].method, "SUCCESS", Response) + end) + + --mobile side: expect the response + EXPECT_RESPONSE(cid, { success = false, resultCode = "GENERIC_ERROR"}) + :Timeout(13000) + + end + ----------------------------------------------------------------------------------------- + + Test[APIName.."_Response_method_" .. Methods[i].name .."_GENERIC_ERROR_SendError"] = function(self) + + --mobile side: sending the request + local Request = self:createRequest() + local cid = self.mobileSession:SendRPC(APIName, Request) + + --hmi side: expect the request + EXPECT_HMICALL("VehicleInfo.GetDTCs", Request) + :Do(function(_,data) + --hmi side: sending the response + --self.hmiConnection:SendError(data.id, data.method, "REJECTED", "info") + self.hmiConnection:SendError(data.id, Methods[i].method, "REJECTED", "info") + end) + + --mobile side: expect the response + EXPECT_RESPONSE(cid, { success = false, resultCode = "GENERIC_ERROR"}) + :Timeout(13000) + + + end + ----------------------------------------------------------------------------------------- + + end + ----------------------------------------------------------------------------------------- + +end + +verify_method_parameter() + + +----------------------------------------------------------------------------------------------- +--Parameter 3: info +----------------------------------------------------------------------------------------------- +--List of test cases: + --1. IsMissed + --2. IsLowerBound + --3. IsUpperBound + --4. IsOutUpperBound + --5. IsEmpty/IsOutLowerBound + --6. IsWrongType + --7. InvalidCharacter - \n, \t, only spaces +----------------------------------------------------------------------------------------------- + +local function verify_info_parameter() + + + --Print new line to separate new test cases group + commonFunctions:newTestCasesGroup({"info"}) + + ----------------------------------------------------------------------------------------- + + --1. IsMissed + Test[APIName.."_Response_info_IsMissed_SendResponse"] = function(self) + + --mobile side: sending the request + local Request = self:createRequest() + local cid = self.mobileSession:SendRPC(APIName, Request) + + + --hmi side: expect the request + local Response = self:createResponse(Request) + EXPECT_HMICALL("VehicleInfo.GetDTCs", Request) + :Do(function(_,data) + --hmi side: sending the response + self.hmiConnection:SendResponse(data.id, data.method, "SUCCESS", Response) + end) + + + --mobile side: expect the response + local ExpectedResponse = commonFunctions:cloneTable(Response) + ExpectedResponse["success"] = true + ExpectedResponse["resultCode"] = "SUCCESS" + + EXPECT_RESPONSE(cid, ExpectedResponse) + :ValidIf (function(_,data) + if data.payload.info then + commonFunctions:printError(" SDL resends info parameter to mobile app. info = \"" .. data.payload.info .. "\"") + return false + else + return true + end + end) + end + ----------------------------------------------------------------------------------------- + + Test[APIName.."_Response_info_IsMissed_SendError"] = function(self) + + --mobile side: sending the request + local Request = self:createRequest() + local cid = self.mobileSession:SendRPC(APIName, Request) + + + --hmi side: expect the request + EXPECT_HMICALL("VehicleInfo.GetDTCs", Request) + :Do(function(_,data) + --hmi side: sending the response + self.hmiConnection:SendError(data.id, data.method, "GENERIC_ERROR") + end) + + + --mobile side: expect the response + --TODO: update after resolving APPLINK-14765 + -- EXPECT_RESPONSE(cid, { success = false, resultCode = "GENERIC_ERROR", info = "Invalid message received from vehicle"}) + EXPECT_RESPONSE(cid, { success = false, resultCode = "INVALID_DATA"}) + end + ----------------------------------------------------------------------------------------- + + --2. IsLowerBound + --3. IsUpperBound + local testData = { + {value = "a", name = "IsLowerBound"}, + {value = commonFunctions:createString(1000), name = "IsUpperBound"}} + + for i =1, #testData do + + Test[APIName.."_Response_info_" .. testData[i].name .."_SendResponse"] = function(self) + + --mobile side: sending the request + local Request = self:createRequest() + local cid = self.mobileSession:SendRPC(APIName, Request) + + --hmi side: expect the request + local Response = self:createResponse(Request) + EXPECT_HMICALL("VehicleInfo.GetDTCs", Request) + :Do(function(_,data) + --hmi side: sending the response + Response["info"] = testData[i].value + + self.hmiConnection:SendResponse(data.id, data.method, "SUCCESS", Response) + end) + + --mobile side: expect response + local ExpectedResponse = commonFunctions:cloneTable(Response) + ExpectedResponse["success"] = true + ExpectedResponse["resultCode"] = "SUCCESS" + EXPECT_RESPONSE(cid, ExpectedResponse) + + + end + ----------------------------------------------------------------------------------------- + + Test[APIName.."_Response_info_" .. testData[i].name .."_SendError"] = function(self) + + --mobile side: sending the request + local Request = self:createRequest() + local cid = self.mobileSession:SendRPC(APIName, Request) + + --hmi side: expect the request + local Response = self:createResponse(Request) + EXPECT_HMICALL("VehicleInfo.GetDTCs", Request) + :Do(function(_,data) + --hmi side: sending the response + self.hmiConnection:SendError(data.id, data.method, "GENERIC_ERROR", testData[i].value) + end) + + --mobile side: expect the response + EXPECT_RESPONSE(cid, { success = false, resultCode = "GENERIC_ERROR", info = testData[i].value}) + + end + ----------------------------------------------------------------------------------------- + + end + ----------------------------------------------------------------------------------------- + + --TODO: update after resolving APPLINK-14551 + -- --4. IsOutUpperBound + -- Test[APIName.."_Response_info_IsOutUpperBound_SendResponse"] = function(self) + + -- local infoMaxLength = commonFunctions:createString(1000) + + -- --mobile side: sending the request + -- local Request = self:createRequest() + -- local cid = self.mobileSession:SendRPC(APIName, Request) + + -- --hmi side: expect the request + -- local Response = self:createResponse(Request) + -- EXPECT_HMICALL("VehicleInfo.GetDTCs", Request) + -- :Do(function(_,data) + -- --hmi side: sending the response + -- Response["info"] = infoMaxLength .. "1" + -- self.hmiConnection:SendResponse(data.id, data.method, "SUCCESS", Response) + -- end) + + -- --mobile side: expect the response + -- local ExpectedResponse = commonFunctions:cloneTable(Response) + -- ExpectedResponse["success"] = true + -- ExpectedResponse["resultCode"] = "SUCCESS" + -- ExpectedResponse["info"] = infoMaxLength + + -- EXPECT_RESPONSE(cid, ExpectedResponse) + + -- end + -- ----------------------------------------------------------------------------------------- + + -- Test[APIName.."_Response_info_IsOutUpperBound_SendError"] = function(self) + + -- local infoMaxLength = commonFunctions:createString(1000) + + -- --mobile side: sending the request + -- local Request = self:createRequest() + -- local cid = self.mobileSession:SendRPC(APIName, Request) + + -- --hmi side: expect the request + -- EXPECT_HMICALL("VehicleInfo.GetDTCs", Request) + -- :Do(function(_,data) + -- --hmi side: sending the response + -- self.hmiConnection:SendError(data.id, data.method, "GENERIC_ERROR", infoMaxLength .."1") + -- end) + + -- --mobile side: expect the response + -- EXPECT_RESPONSE(cid, { success = false, resultCode = "GENERIC_ERROR", info = infoMaxLength}) + + -- end + -- ----------------------------------------------------------------------------------------- + + + -- --5. IsEmpty/IsOutLowerBound + -- --6. IsWrongType + -- --7. InvalidCharacter - \n, \t, only spaces + + -- local testData = { + -- {value = "", name = "IsEmpty_IsOutLowerBound"}, + -- {value = 123, name = "IsWrongType"}, + -- {value = "a\nb", name = "IsInvalidCharacter_NewLine"}, + -- {value = "a\tb", name = "IsInvalidCharacter_Tab"}, + -- {value = " ", name = "IsInvalidCharacter_OnlySpaces"}} + + -- for i =1, #testData do + + -- Test[APIName.."_Response_info_" .. testData[i].name .."_SendResponse"] = function(self) + + -- --mobile side: sending the request + -- local Request = self:createRequest() + -- local cid = self.mobileSession:SendRPC(APIName, Request) + + -- --hmi side: expect the request + -- local Response = self:createResponse(Request) + -- EXPECT_HMICALL("VehicleInfo.GetDTCs", Request) + -- :Do(function(_,data) + -- --hmi side: sending the response + -- Response["info"] = testData[i].value + -- self.hmiConnection:SendResponse(data.id, data.method, "SUCCESS", Response) + -- end) + + -- --mobile side: expect the response + -- local ExpectedResponse = commonFunctions:cloneTable(Response) + -- ExpectedResponse["success"] = true + -- ExpectedResponse["resultCode"] = "SUCCESS" + -- ExpectedResponse["info"] = nil + -- EXPECT_RESPONSE(cid, ExpectedResponse) + -- :ValidIf (function(_,data) + -- if data.payload.info then + -- commonFunctions:printError(" SDL resends info parameter to mobile app. info = \"" .. data.payload.info .. "\"") + -- return false + -- else + -- return true + -- end + -- end) + + -- end + -- ----------------------------------------------------------------------------------------- + + -- Test[APIName.."_Response_info_" .. testData[i].name .."_SendError"] = function(self) + + -- --mobile side: sending the request + -- local Request = self:createRequest() + -- local cid = self.mobileSession:SendRPC(APIName, Request) + + -- --hmi side: expect the request + -- EXPECT_HMICALL("VehicleInfo.GetDTCs", Request) + -- :Do(function(_,data) + -- --hmi side: sending the response + -- self.hmiConnection:SendError(data.id, data.method, "GENERIC_ERROR", testData[i].value) + -- end) + + -- --mobile side: expect the response + -- EXPECT_RESPONSE(cid, { success = false, resultCode = "GENERIC_ERROR"}) + -- :ValidIf (function(_,data) + -- if data.payload.info then + -- commonFunctions:printError(" SDL resends info parameter to mobile app. info = \"" .. data.payload.info .. "\"") + -- return false + -- else + -- return true + -- end + + -- end) + + -- end + -- ----------------------------------------------------------------------------------------- + + -- end + ----------------------------------------------------------------------------------------- + +end + +verify_info_parameter() + + +----------------------------------------------------------------------------------------------- +--Parameter 4: correlationID +----------------------------------------------------------------------------------------------- +--List of test cases: + --1. IsMissed + --2. IsNonexistent + --3. IsWrongType + --4. IsNegative +----------------------------------------------------------------------------------------------- +--ToDo: Update according to answer on APPLINK-16111: Clarify SDL behaviors when HMI responses invalid correlationId or invalid method + +local function verify_correlationID_parameter() + + + --Print new line to separate new test cases group + commonFunctions:newTestCasesGroup({"correlationID"}) + + ----------------------------------------------------------------------------------------- + + --1. IsMissed + Test[APIName.."_Response_CorrelationID_IsMissed_SendResponse"] = function(self) + + --mobile side: sending the request + local Request = self:createRequest() + local cid = self.mobileSession:SendRPC(APIName, Request) + + + --hmi side: expect the request + EXPECT_HMICALL("VehicleInfo.GetDTCs", Request) + :Do(function(_,data) + --hmi side: sending the response + --self.hmiConnection:Send('{"id":'..tostring(data.id)..',"jsonrpc":"2.0","result":{"method":"VehicleInfo.GetDTCs","code":0, "dtc":["line 0","line 1","line 2"],"ecuHeader":2}}') + self.hmiConnection:Send('{"jsonrpc":"2.0","result":{"method":"VehicleInfo.GetDTCs", "code":0, "dtc":["line 0","line 1","line 2"],"ecuHeader":2}}') + + end) + + + --mobile side: expect the response + EXPECT_RESPONSE(cid, { success = false, resultCode = "GENERIC_ERROR"}) + :Timeout(13000) + + end + ----------------------------------------------------------------------------------------- + + Test[APIName.."_Response_CorrelationID_IsMissed_SendError"] = function(self) + + --mobile side: sending the request + local Request = self:createRequest() + local cid = self.mobileSession:SendRPC(APIName, Request) + + + --hmi side: expect the request + EXPECT_HMICALL("VehicleInfo.GetDTCs", Request) + :Do(function(_,data) + --hmi side: sending the response + --self.hmiConnection:Send('{"id":'..tostring(data.id)..',"jsonrpc":"2.0","error":{"data":{"method":"VehicleInfo.GetDTCs"},"code":22,"message":"The unknown issue occurred"}}') + self.hmiConnection:Send('{"jsonrpc":"2.0","error":{"data":{"method":"VehicleInfo.GetDTCs"},"code":22,"message":"The unknown issue occurred"}}') + + end) + + + --mobile side: expect the response + EXPECT_RESPONSE(cid, { success = false, resultCode = "GENERIC_ERROR"}) + :Timeout(13000) + + end + ----------------------------------------------------------------------------------------- + + + --2. IsNonexistent + Test[APIName.."_Response_CorrelationID_IsNonexistent_SendResponse"] = function(self) + + --mobile side: sending the request + local Request = self:createRequest() + local cid = self.mobileSession:SendRPC(APIName, Request) + + + --hmi side: expect the request + EXPECT_HMICALL("VehicleInfo.GetDTCs", Request) + :Do(function(_,data) + --hmi side: sending the response + --self.hmiConnection:Send('{"id":'..tostring(data.id)..',"jsonrpc":"2.0","result":{"method":"VehicleInfo.GetDTCs","code":0, "dtc":["line 0","line 1","line 2"],"ecuHeader":2}}') + self.hmiConnection:Send('{"id":'..tostring(5555)..',"jsonrpc":"2.0","result":{"method":"VehicleInfo.GetDTCs","code":0, "dtc":["line 0","line 1","line 2"],"ecuHeader":2}}') + + end) + + + --mobile side: expect the response + EXPECT_RESPONSE(cid, { success = false, resultCode = "GENERIC_ERROR"}) + :Timeout(13000) + + end + ----------------------------------------------------------------------------------------- + + Test[APIName.."_Response_CorrelationID_IsNonexistent_SendError"] = function(self) + + --mobile side: sending the request + local Request = self:createRequest() + local cid = self.mobileSession:SendRPC(APIName, Request) + + + --hmi side: expect the request + EXPECT_HMICALL("VehicleInfo.GetDTCs", Request) + :Do(function(_,data) + --hmi side: sending the response + --self.hmiConnection:Send('{"id":'..tostring(data.id)..',"jsonrpc":"2.0","error":{"data":{"method":"VehicleInfo.GetDTCs"},"code":22,"message":"The unknown issue occurred"}}') + self.hmiConnection:Send('{"id":'..tostring(5555)..',"jsonrpc":"2.0","error":{"data":{"method":"VehicleInfo.GetDTCs"},"code":22,"message":"The unknown issue occurred"}}') + + end) + + + --mobile side: expect the response + EXPECT_RESPONSE(cid, { success = false, resultCode = "GENERIC_ERROR"}) + :Timeout(13000) + + end + ----------------------------------------------------------------------------------------- + + + --3. IsWrongType + Test[APIName.."_Response_CorrelationID_IsWrongType_SendResponse"] = function(self) + + --mobile side: sending the request + local Request = self:createRequest() + local cid = self.mobileSession:SendRPC(APIName, Request) + + + --hmi side: expect the request + local Response = self:createResponse(Request) + EXPECT_HMICALL("VehicleInfo.GetDTCs", Request) + :Do(function(_,data) + --hmi side: sending the response + --self.hmiConnection:SendResponse(data.id, data.method, "SUCCESS", {info = "info message"}) + Response["info"] = "info" + self.hmiConnection:SendResponse(tostring(data.id), data.method, "SUCCESS", Response) + + end) + + + --mobile side: expect the response + EXPECT_RESPONSE(cid, { success = false, resultCode = "GENERIC_ERROR"}) + :Timeout(13000) + + end + ----------------------------------------------------------------------------------------- + + Test[APIName.."_Response_CorrelationID_IsWrongType_SendError"] = function(self) + + --mobile side: sending the request + local Request = self:createRequest() + local cid = self.mobileSession:SendRPC(APIName, Request) + + + --hmi side: expect the request + EXPECT_HMICALL("VehicleInfo.GetDTCs", Request) + :Do(function(_,data) + --hmi side: sending the response + --self.hmiConnection:SendError(data.id, data.method, "REJECTED", "error message") + self.hmiConnection:SendError(tostring(data.id), data.method, "REJECTED", "error message") + + end) + + + --mobile side: expect the response + EXPECT_RESPONSE(cid, { success = false, resultCode = "GENERIC_ERROR"}) + :Timeout(13000) + + end + ----------------------------------------------------------------------------------------- + + --4. IsNegative + Test[APIName.."_Response_CorrelationID_IsNegative_SendResponse"] = function(self) + + --mobile side: sending the request + local Request = self:createRequest() + local cid = self.mobileSession:SendRPC(APIName, Request) + + + --hmi side: expect the request + local Response = self:createResponse(Request) + EXPECT_HMICALL("VehicleInfo.GetDTCs", Request) + :Do(function(_,data) + --hmi side: sending the response + --self.hmiConnection:SendResponse(data.id, data.method, "SUCCESS", {info = "info message"}) + Response["info"] = "info" + self.hmiConnection:SendResponse(-1, data.method, "SUCCESS", Response) + + end) + + + --mobile side: expect the response + EXPECT_RESPONSE(cid, { success = false, resultCode = "GENERIC_ERROR"}) + :Timeout(13000) + + end + ----------------------------------------------------------------------------------------- + + Test[APIName.."_Response_CorrelationID_IsNegative_SendError"] = function(self) + + --mobile side: sending the request + local Request = self:createRequest() + local cid = self.mobileSession:SendRPC(APIName, Request) + + + --hmi side: expect the request + EXPECT_HMICALL("VehicleInfo.GetDTCs", Request) + :Do(function(_,data) + --hmi side: sending the response + --self.hmiConnection:SendError(data.id, data.method, "REJECTED", "error message") + self.hmiConnection:SendError(-1, data.method, "REJECTED", "error message") + + end) + + + --mobile side: expect the response + EXPECT_RESPONSE(cid, { success = false, resultCode = "GENERIC_ERROR"}) + :Timeout(13000) + + end + ----------------------------------------------------------------------------------------- + + --5. IsNull + Test[APIName.."_Response_CorrelationID_IsNull_SendResponse"] = function(self) + + --mobile side: sending the request + local Request = self:createRequest() + local cid = self.mobileSession:SendRPC(APIName, Request) + + + --hmi side: expect the request + local Response = self:createResponse(Request) + EXPECT_HMICALL("VehicleInfo.GetDTCs", Request) + :Do(function(_,data) + --hmi side: sending the response + --self.hmiConnection:Send('{"id":'..tostring(data.id)..',"jsonrpc":"2.0","result":{"method":"VehicleInfo.GetDTCs","code":0, "dtc":["line 0","line 1","line 2"],"ecuHeader":2}}') + self.hmiConnection:Send('{"id":null,"jsonrpc":"2.0","result":{"method":"VehicleInfo.GetDTCs","code":0, "dtc":["line 0","line 1","line 2"],"ecuHeader":2}}') + + end) + + + --mobile side: expect the response + EXPECT_RESPONSE(cid, { success = false, resultCode = "GENERIC_ERROR"}) + :Timeout(13000) + + end + ----------------------------------------------------------------------------------------- + + Test[APIName.."_Response_CorrelationID_IsNull_SendError"] = function(self) + + --mobile side: sending the request + local Request = self:createRequest() + local cid = self.mobileSession:SendRPC(APIName, Request) + + + --hmi side: expect the request + EXPECT_HMICALL("VehicleInfo.GetDTCs", Request) + :Do(function(_,data) + --hmi side: sending the response + --self.hmiConnection:Send('{"id":'..tostring(data.id)..',"jsonrpc":"2.0","error":{"data":{"method":"VehicleInfo.GetDTCs"},"code":22,"message":"The unknown issue occurred"}}') + self.hmiConnection:Send('{"id":null,"jsonrpc":"2.0","error":{"data":{"method":"VehicleInfo.GetDTCs"},"code":22,"message":"The unknown issue occurred"}}') + + end) + + + --mobile side: expect the response + EXPECT_RESPONSE(cid, { success = false, resultCode = "GENERIC_ERROR"}) + :Timeout(13000) + + end + ----------------------------------------------------------------------------------------- + +end + +verify_correlationID_parameter() + + +----------------------------------------------------------------------------------------------- +--Parameter 5: ecuHeader: type=Integer, minvalue="0" maxvalue="65535" mandatory="true" +----------------------------------------------------------------------------------------------- +--List of test cases for Integer type parameter: + --1. IsMissed + --2. IsWrongType + --3. IsLowerBound + --4. IsUpperBound + --5. IsOutLowerBound + --6. IsOutUpperBound +----------------------------------------------------------------------------------------------- +local Response = {ecuHeader = 0, dtc = {"a"}} +integerParameterInResponse:verify_Integer_Parameter(Response, {"ecuHeader"}, {0, 65535}, true) + + +----------------------------------------------------------------------------------------------- +--Parameter 6: dtc: type=String, minsize="1" maxsize="15" maxlength="10" array="true" mandatory="false" +----------------------------------------------------------------------------------------------- +--List of test cases for Integer type parameter: + --1. IsMissed + --2. IsWrongType + --3. IsLowerBound + --4. IsUpperBound + --5. IsOutLowerBound + --6. IsOutUpperBound +----------------------------------------------------------------------------------------------- +local IsSupportedSpecialCharacters = true +arrayStringParameterInResponse:verify_Array_String_Parameter(Response, {"dtc"}, {1, 15}, {1, 10}, false, IsSupportedSpecialCharacters) + + +---------------------------------------------------------------------------------------------- +-----------------------------------------TEST BLOCK IV---------------------------------------- +------------------------------Check special cases of HMI response----------------------------- +---------------------------------------------------------------------------------------------- + +--Begin Test case SpecialResponseChecks +--Description: Check all negative response cases + + --Requirement id in JAMA: + --SDLAQ-CRS-106 (GetDTCs_Response_v2_0) + --SDLAQ-CRS-636 (GENERIC_ERROR) + + +local function SpecialResponseChecks() + + --Print new line to separate new test cases group + commonFunctions:newTestCasesGroup("Test Suite For Special Response Checks") + ---------------------------------------------------------------------------------------------- + + + --Begin Test case NegativeResponseCheck.1 + --Description: Invalid JSON + + + --Requirement id in JAMA: SDLAQ-CRS-106 + --Verification criteria: The response contains 3 mandatory parameters "success", "ecuHeader" and "resultCode". "info" is sent if there is any additional information about the resultCode. Array of "dtc" data is returned if available. + + --[[ToDo: Update after implemented CRS APPLINK-14756: SDL must cut off the fake parameters from requests, responses and notifications received from HMI + + function Test:GetDTCs_Response_IsInvalidJson() + + --mobile side: sending the request + local Request = self:createRequest() + local cid = self.mobileSession:SendRPC(APIName, Request) + + --hmi side: expect the request + EXPECT_HMICALL("VehicleInfo.GetDTCs", Request) + :Do(function(_,data) + --hmi side: sending the response + --":" is changed by ";" after {"id" + --self.hmiConnection:Send('{"id":'..tostring(data.id)..',"jsonrpc":"2.0","result":{"method":"VehicleInfo.GetDTCs", "code":0, "dtc":["line 0","line 1","line 2"],"ecuHeader":2}}') + self.hmiConnection:Send('{"id";'..tostring(data.id)..',"jsonrpc":"2.0","result":{"method":"VehicleInfo.GetDTCs", "code":0, "dtc":["line 0","line 1","line 2"],"ecuHeader":2}}') + end) + + --mobile side: expect the response + EXPECT_RESPONSE(cid, { success = false, resultCode = "GENERIC_ERROR" }) + :Timeout(12000) + + end + + --End Test case NegativeResponseCheck.1 + + + --Begin Test case NegativeResponseCheck.2 + --Description: Check processing response with fake parameters + + --Verification criteria: When expected HMI function is received, send responses from HMI with fake parameter + + --Begin Test case NegativeResponseCheck.2.1 + --Description: Parameter is not from API + + function Test:GetDTCs_Response_FakeParams_IsNotFromAnyAPI() + + --mobile side: sending the request + local Request = self:createRequest() + local cid = self.mobileSession:SendRPC(APIName, Request) + + --hmi side: expect the request + local Response = self:createResponse(Request) + EXPECT_HMICALL("VehicleInfo.GetDTCs", Request) + :Do(function(exp,data) + --hmi side: sending the response + Response["fake"] = "fake" + self.hmiConnection:SendResponse(data.id, data.method, "SUCCESS", Response) + end) + + + --mobile side: expect the response + local ExpectedResponse = commonFunctions:cloneTable(Response) + ExpectedResponse["success"] = true + ExpectedResponse["resultCode"] = "SUCCESS" + ExpectedResponse["fake"] = nil + EXPECT_RESPONSE(cid, ExpectedResponse) + :ValidIf (function(_,data) + if data.payload.fake then + commonFunctions:printError(" SDL resend fake parameter to mobile app ") + return false + else + return true + end + end) + + end + + --End Test case NegativeResponseCheck.2.1 + + + --Begin Test case NegativeResponseCheck.2.2 + --Description: Parameter is not from another API + + function Test:GetDTCs_Response_FakeParams_IsFromAnotherAPI() + + --mobile side: sending the request + local Request = self:createRequest() + local cid = self.mobileSession:SendRPC(APIName, Request) + + --hmi side: expect the request + local Response = self:createResponse(Request) + EXPECT_HMICALL("VehicleInfo.GetDTCs", Request) + :Do(function(exp,data) + --hmi side: sending the response + Response["sliderPosition"] = 5 + self.hmiConnection:SendResponse(data.id, data.method, "SUCCESS", Response) + end) + + + --mobile side: expect the response + local ExpectedResponse = commonFunctions:cloneTable(Response) + ExpectedResponse["success"] = true + ExpectedResponse["resultCode"] = "SUCCESS" + ExpectedResponse["sliderPosition"] = nil + EXPECT_RESPONSE(cid, ExpectedResponse) + :ValidIf (function(_,data) + if data.payload.sliderPosition then + commonFunctions:printError(" SDL resend fake parameter to mobile app ") + return false + else + return true + end + end) + + end + + --End Test case NegativeResponseCheck.2.2 + + --End Test case NegativeResponseCheck.2 +]] + + --[[ToDo: Update when APPLINK resolving APPLINK-14776 SDL behavior in case HMI sends invalid message or message with fake parameters + --Begin NegativeResponseCheck.3 + --Description: Check processing response without all parameters + + function Test:GetDTCs_Response_IsMissedAllPArameters() + + --mobile side: sending the request + local Request = self:createRequest() + local cid = self.mobileSession:SendRPC(APIName, Request) + + + --hmi side: expect the request + EXPECT_HMICALL("VehicleInfo.GetDTCs", Request) + :Do(function(_,data) + --hmi side: sending VehicleInfo.GetDTCs response + --self.hmiConnection:Send('{"id":'..tostring(data.id)..',"jsonrpc":"2.0","result":{"method":"VehicleInfo.GetDTCs", "code":0, "dtc":["line 0","line 1","line 2"],"ecuHeader":2}}') + self.hmiConnection:Send('{}') + end) + + --mobile side: expect the response + EXPECT_RESPONSE(cid, { success = false, resultCode = "GENERIC_ERROR"}) + :Timeout(13000) + + end + + --End NegativeResponseCheck.3 +]] + + --Begin Test case NegativeResponseCheck.4 + --Description: Request without responses from HMI + + --Requirement id in JAMA: SDLAQ-CRS-636 + --Verification criteria: GENERIC_ERROR comes as a result code in response when all other codes aren't applicable or the unknown issue occurred. + + function Test:GetDTCs_NoResponse() + + --mobile side: sending the request + local Request = self:createRequest() + local cid = self.mobileSession:SendRPC(APIName, Request) + + --hmi side: expect the request + EXPECT_HMICALL("VehicleInfo.GetDTCs", Request) + + + --mobile side: expect the response + EXPECT_RESPONSE(cid, { success = false, resultCode = "GENERIC_ERROR"}) + :Timeout(12000) + + end + + --End NegativeResponseCheck.4 + + + --Begin Test case NegativeResponseCheck.5 + --Description: Invalid structure of response + + + + --Requirement id in JAMA: SDLAQ-CRS-106 + --Verification criteria: The response contains 3 mandatory parameters "success", "ecuHeader" and "resultCode". "info" is sent if there is any additional information about the resultCode. Array of "dtc" data is returned if available. + +--[[ToDo: Update when APPLINK resolving APPLINK-14776 SDL behavior in case HMI sends invalid message or message with fake parameters + + function Test:GetDTCs_Response_IsInvalidStructure() + + --mobile side: sending the request + local Request = self:createRequest() + local cid = self.mobileSession:SendRPC(APIName, Request) + + --hmi side: expect the request + EXPECT_HMICALL("VehicleInfo.GetDTCs", Request) + :Do(function(_,data) + --hmi side: sending the response + --self.hmiConnection:Send('{"id":'..tostring(data.id)..',"jsonrpc":"2.0","result":{"method":"VehicleInfo.GetDTCs", "code":0, "dtc":["line 0","line 1","line 2"],"ecuHeader":2}}') + self.hmiConnection:Send('{"id":'..tostring(data.id)..',"jsonrpc":"2.0", "code":0, "result":{"method":"VehicleInfo.GetDTCs"}}') + end) + + --mobile side: expect response + EXPECT_RESPONSE(cid, { success = false, resultCode = "INVALID_DATA"}) + :Timeout(12000) + + end + ]] + --End Test case NegativeResponseCheck.5 + + + --Begin Test case NegativeResponseCheck.6 + --Description: Several response to one request + + --Requirement id in JAMA: SDLAQ-CRS-106 + + --Verification criteria: The response contains 3 mandatory parameters "success", "ecuHeader" and "resultCode". "info" is sent if there is any additional information about the resultCode. Array of "dtc" data is returned if available. + + + --Begin Test case NegativeResponseCheck.6.1 + --Description: Several response to one request + + function Test:GetDTCs_Response_SeveralResponseToOneRequest() + + --mobile side: sending the request + local Request = self:createRequest() + local cid = self.mobileSession:SendRPC(APIName, Request) + + --hmi side: expect the request + local Response = self:createResponse(Request) + EXPECT_HMICALL("VehicleInfo.GetDTCs", Request) + :Do(function(exp,data) + --hmi side: sending the response + self.hmiConnection:SendResponse(data.id, data.method, "INVALID_DATA", Response) + self.hmiConnection:SendResponse(data.id, data.method, "SUCCESS", Response) + + end) + + + --mobile side: expect response + EXPECT_RESPONSE(cid, { success = false, resultCode = "INVALID_DATA"}) + + end + + --End Test case NegativeResponseCheck.6.1 + + + + --Begin Test case NegativeResponseCheck.6.2 + --Description: Several response to one request + --Requirement: APPLINK-15509 have not been implemented yet. + + function Test:GetDTCs_Response_WithConstractionsOfResultCodes() + + --mobile side: sending the request + local Request = self:createRequest() + local cid = self.mobileSession:SendRPC(APIName, Request) + + --hmi side: expect the request + local Response = self:createResponse(Request) + EXPECT_HMICALL("VehicleInfo.GetDTCs", Request) + :Do(function(exp,data) + --hmi side: sending the response + --self.hmiConnection:Send('{"id":'..tostring(data.id)..',"jsonrpc":"2.0","result":{"method":"VehicleInfo.GetDTCs", "code":0, "dtc":["line 0","line 1","line 2"],"ecuHeader":2}}') + + --response both SUCCESS and GENERIC_ERROR resultCodes + self.hmiConnection:Send('{"id":'..tostring(data.id)..',"jsonrpc":"2.0","result":{"method":"VehicleInfo.GetDTCs", "code":0, "dtc":["line 0","line 1","line 2"],"ecuHeader":2}, "error":{"data":{"method":"VehicleInfo.GetDTCs"},"code":22,"message":"The unknown issue occurred"}}') + + end) + + + --mobile side: expect response + EXPECT_RESPONSE(cid, { success = false, resultCode = "GENERIC_ERROR", info = "Invalid message received from vehicle"}) + :Timeout(13000) + + end + + --End Test case NegativeResponseCheck.6.2 + ----------------------------------------------------------------------------------------- + + --End Test case NegativeResponseCheck.6 + +end + +SpecialResponseChecks() + +--End Test case NegativeResponseCheck + + +----------------------------------------------------------------------------------------------- +-------------------------------------------TEST BLOCK V---------------------------------------- +-------------------------------------Checks All Result Codes----------------------------------- +----------------------------------------------------------------------------------------------- + +--Begin Test case ResultCodeChecks +--Description: Check all resultCodes + + --Requirement id in JAMA: + --SDLAQ-CRS-630 (SUCCESS) + --SDLAQ-CRS-631 (INVALID_DATA) + --SDLAQ-CRS-632 (OUT_OF_MEMORY) + --SDLAQ-CRS-633 (TOO_MANY_PENDING_REQUESTS) + --SDLAQ-CRS-634 (APPLICATION_NOT_REGISTERED) + --SDLAQ-CRS-635 (REJECTED) + --SDLAQ-CRS-636 (GENERIC_ERROR) + --SDLAQ-CRS-637 (DISALLOWED) + --SDLAQ-CRS-638 (USER_DISALLOWED) + --SDLAQ-CRS-1096 (TRUNCATED_DATA) + + +local function ResultCodeChecks() + + + --Print new line to separate new test cases group + commonFunctions:newTestCasesGroup("Test Suite For resultCodes Checks") + ---------------------------------------------------------------------------------------------- + + --SUCCESS: Covered by many test cases. + --INVALID_DATA: Covered by many test cases. + --OUT_OF_MEMORY: ToDo: Wait until requirement is clarified + --TOO_MANY_PENDING_REQUESTS: It is moved to other script. + --GENERIC_ERROR: Covered by test case GetDTCs_NoResponse + --REJECTED, TRUNCATED_DATA: Covered by test case resultCode_IsValidValue + ----------------------------------------------------------------------------------------- + + --Begin Test case ResultCodeChecks.1 + --Description: Check resultCode APPLICATION_NOT_REGISTERED + + --Requirement id in JAMA: SDLAQ-CRS-634 + --Verification criteria: SDL sends APPLICATION_NOT_REGISTERED code when the app sends a request within the same connection before RegisterAppInterface has been performed yet. + + commonTestCases:verifyResultCode_APPLICATION_NOT_REGISTERED() + + --End Test case ResultCodeChecks.1 + ----------------------------------------------------------------------------------------- + + --Begin Test case ResultCodeChecks.2 + --Description: Check resultCode DISALLOWED, USER_DISALLOWED + + --Requirement id in JAMA: SDLAQ-CRS-637, SDLAQ-CRS-638 + --Verification criteria: + --1. SDL must return "resultCode: DISALLOWED, success:false" to the RPC in case this RPC is omitted in the PolicyTable group(s) assigned to the app that requests this RPC. + --2. SDL must return "resultCode: DISALLOWED, success:false" to the RPC in case this RPC is included to the PolicyTable group(s) assigned to the app that requests this RPC and the group has not yet received user's consents. + --SDL must return "resultCode: USER_DISALLOWED, success:false" to the RPC in case this RPC exists in the PolicyTable group disallowed by the user. + + + --Begin Test case ResultCodeChecks.2.1 + --Description: 1. SDL must return "resultCode: DISALLOWED, success:false" to the RPC in case this RPC is omitted in the PolicyTable group(s) assigned to the app that requests this RPC. + + policyTable:checkPolicyWhenAPIIsNotExist() + + --End Test case ResultCodeChecks.2.1 + + + --Begin Test case ResultCodeChecks.2.2 + --Description: + --SDL must return "resultCode: DISALLOWED, success:false" to the RPC in case this RPC is included to the PolicyTable group(s) assigned to the app that requests this RPC and the group has not yet received user's consents. + --SDL must return "resultCode: USER_DISALLOWED, success:false" to the RPC in case this RPC exists in the PolicyTable group disallowed by the user. + + policyTable:checkPolicyWhenUserDisallowed({"FULL", "LIMITED", "BACKGROUND"}) + + --End Test case ResultCodeChecks.2.2 + + --End Test case ResultCodeChecks.2 + + ----------------------------------------------------------------------------------------- + +end + +ResultCodeChecks() + +--End Test case ResultCodeChecks + + +---------------------------------------------------------------------------------------------- +-----------------------------------------TEST BLOCK VI---------------------------------------- +-------------------------Sequence with emulating of user's action(s)-------------------------- +---------------------------------------------------------------------------------------------- + +--Begin Test suit SequenceChecks +--Description: TC's checks SDL behavior by processing + -- different request sequence with timeout + -- with emulating of user's actions + +local function SequenceChecks() + + + --Print new line to separate new test cases group + commonFunctions:newTestCasesGroup("Test Suite For Sequence Checks") + ---------------------------------------------------------------------------------------------- + + --Test case TC_GetDTCs_01 is covered by GetDTCs_PositiveRequest_SUCCESS + +end + +SequenceChecks() + +--End Test suit SequenceChecks + + +---------------------------------------------------------------------------------------------- +-----------------------------------------TEST BLOCK VII--------------------------------------- +--------------------------------------Different HMIStatus------------------------------------- +---------------------------------------------------------------------------------------------- + +--SDLAQ-CRS-802: HMI Status Requirements for GetDTCs +--Verification Criteria: + --SDL rejects GetDTCs request with REJECTED resultCode when current HMI level is NONE. + --SDL doesn't reject GetDTCs request when current HMI is FULL. + --SDL doesn't reject GetDTCs request when current HMI is LIMITED. + --SDL doesn't reject GetDTCs request when current HMI is BACKGROUND. + +--Verify resultCode in NONE, LIMITED, BACKGROUND HMI level +commonTestCases:verifyDifferentHMIStatus("DISALLOWED", "SUCCESS", "SUCCESS") + + +policyTable:Restore_preloaded_pt() + + +return Test \ No newline at end of file diff --git a/test_scripts/API/ATF_ListFiles.lua b/test_scripts/API/ATF_ListFiles.lua new file mode 100644 index 0000000000..663766ebba --- /dev/null +++ b/test_scripts/API/ATF_ListFiles.lua @@ -0,0 +1,1196 @@ +Test = require('connecttest') +require('cardinalities') +local events = require('events') +local mobile_session = require('mobile_session') +local mobile = require('mobile_connection') +local tcp = require('tcp_connection') +local file_connection = require('file_connection') + + +--------------------------------------------------------------------------------------------- +-----------------------------Required Shared Libraries--------------------------------------- +--------------------------------------------------------------------------------------------- +require('user_modules/AppTypes') +local commonTestCases = require('user_modules/shared_testcases/commonTestCases') +local commonSteps = require('user_modules/shared_testcases/commonSteps') +local commonFunctions = require('user_modules/shared_testcases/commonFunctions') +local policyTable = require('user_modules/shared_testcases/testCasesForPolicyTable') + +APIName = "ListFiles" -- use for above required scripts. + +local str255Chars = string.rep("a",255) + +--------------------------------------------------------------------------------------------- +-------------------------------------------Common functions------------------------------------- +--------------------------------------------------------------------------------------------- + +-- Test case sending request and checking results in case SUCCESS +local function TC_ListFiles_SUCCESS(self, strTestCaseName, arrFileNames) + + Test[strTestCaseName] = function(self) + + --mobile side: sending ListFiles request + local cid = self.mobileSession:SendRPC("ListFiles", {} ) + + + --mobile side: expect ListFiles response + EXPECT_RESPONSE(cid, { success = true, resultCode = "SUCCESS", filenames = arrFileNames, info = nil }) + :ValidIf (function(_,data) + if data.payload.spaceAvailable == nil then + print("spaceAvailable parameter is missed") + return false + else + return true + end + + if data.payload.info ~= nil then + print("info parameter is not nil") + return false + else + return true + end + + end) + + end +end + +--Test case to verify case that file is deleted successfully +local function TC_DeleteFile_SUCCESS(self, strFileName, strReportName) + + if strReportName == nil then + strReportName = strFileName + end + + Test["DeleteFile_"..strReportName .. "_SUCCESS"] = function(self) + + --mobile side: sending DeleteFile request + local cid = self.mobileSession:SendRPC("DeleteFile", + { + syncFileName = strFileName + }) + + --mobile side: expect DeleteFile response + EXPECT_RESPONSE(cid, { success = true, resultCode = "SUCCESS", info = nil }) + + end +end + +--PutFile to SDL with all parameters. If a parameter is missed, default value will be used. +function putfile(self, strFileName, strFileType, blnPersistentFile, blnSystemFile, strFileNameOnMobile) + + local strTestCaseName, strSyncFileName, strFileNameOnLocal1 + if type(strFileName) == "table" then + strTestCaseName = "PutFile_"..strFileName.reportName + strSyncFileName = strFileName.fileName + elseif type(strFileName) == "string" then + strTestCaseName = "PutFile_"..strFileName + strSyncFileName = strFileName + else + print("Error: PutFile function, strFileName is wrong value type: " .. tostring(strFileName)) + end + + if strFileNameOnMobile ==nil then + strFileNameOnMobile = "bmp_6kb.bmp" + end + + Test[strTestCaseName] = function(self) + + --mobile side: sending PutFile request + local cid = self.mobileSession:SendRPC("PutFile", + { + syncFileName = strSyncFileName, + fileType = strFileType, + persistentFile = blnPersistentFile, + systemFile = blnSystemFile + }, + "files/"..strFileNameOnMobile) + + --mobile side: expect PutFile response + EXPECT_RESPONSE(cid, { success = true}) + + + end +end + +--Description: Function used to check file is existed on expected path + --file_name: file want to check +function file_check(file_name) + local file_found=io.open(file_name, "r") + + if file_found==nil then + return false + else + return true + end +end + + + +--Create default request +function Test:createRequest() + return {} +end + +--This function sends a request from mobile and verify result on HMI and mobile for SUCCESS resultCode cases. +function Test:verify_SUCCESS_Case(Request) + + --mobile side: sending the request + local cid = self.mobileSession:SendRPC(APIName, Request) + + --mobile side: expect AddSubMenu response + EXPECT_RESPONSE(cid, { success = true, resultCode = "SUCCESS" }) +end + +--------------------------------------------------------------------------------------------- +-------------------------------------------Preconditions------------------------------------- +--------------------------------------------------------------------------------------------- + + + commonSteps:DeleteLogsFileAndPolicyTable() + + --Print new line to separate new test cases group + commonFunctions:newTestCasesGroup("Preconditions") + + --1. Activate application + commonSteps:ActivationApp() + + --2. Update policy to allow request + --TODO: Will be updated after policy flow implementation + policyTable:precondition_updatePolicy_AllowFunctionInHmiLeves({"BACKGROUND", "FULL", "LIMITED", "NONE"}) + + +--------------------------------------------------------------------------------------------- +-----------------------------------------I TEST BLOCK---------------------------------------- +--CommonRequestCheck: Check of mandatory/conditional request's parameters (mobile protocol)-- +--------------------------------------------------------------------------------------------- + --Check: + -- request with all parameters + -- request with only mandatory parameters + -- request with all combinations of conditional-mandatory parameters (if exist) + -- request with one by one conditional parameters (each case - one conditional parameter) + -- request with missing mandatory parameters one by one (each case - missing one mandatory parameter) + -- request with all parameters are missing + -- request with fake parameters (fake - not from protocol, from another request) + -- request is sent with invalid JSON structure + -- different conditions of correlationID parameter (invalid, several the same etc.) + + + --Write NewTestBlock to ATF log + function Test:NewTestBlock() + print("****************************** I TEST BLOCK: Check of mandatory/conditional request's parameters (mobile protocol) ******************************") + end + + --Begin test suit CommonRequestCheck + --Description: + -- request with all parameters + -- request with only mandatory parameters + -- request with all combinations of conditional-mandatory parameters (if exist) + -- request with one by one conditional parameters (each case - one conditional parameter) + -- request with missing mandatory parameters one by one (each case - missing one mandatory parameter) + -- request with all parameters are missing + --=> One test case for all above checks + + -- request with fake parameters (fake - not from protocol, from another request) + -- request is sent with invalid JSON structure + -- different conditions of correlationID parameter (invalid, several the same etc.) + + + + --Begin test case CommonRequestCheck.1 + --Description: check request with all parameters + + --Requirement id in JAMA/or Jira ID: SDLAQ-CRS-154 + + --Verification criteria: ListFile request returns the list of the file names which are stored in the app's folder on SDL platform. + + function Test:ListFiles() + + --mobile side: sending ListFiles request + local cid = self.mobileSession:SendRPC("ListFiles", {} ) + + + --mobile side: expect ListFiles response + EXPECT_RESPONSE + ( + cid, + { + success = true, + resultCode = "SUCCESS", + filenames = {config.application1.registerAppInterfaceParams.appID}, + spaceAvailable = 104857600 + } + ) + :Do(function(_,data) + if data.payload.filenames ~= nil then + return false + else + return true + end + + if data.payload.info ~= nil then + return false + else + return true + end + end) + + + end + + --End test case CommonRequestCheck.1 + + + + --Skipped CommonRequestCheck.2-6: There next checks are not applicable: + -- request with only mandatory parameters + -- request with all combinations of conditional-mandatory parameters (if exist) + -- request with one by one conditional parameters (each case - one conditional parameter) + -- request with missing mandatory parameters one by one (each case - missing one mandatory parameter) + -- request with all parameters are missing + + + --Begin test case CommonRequestCheck.7 + --Description: check request with fake parameters (fake - not from protocol, from another request) + + --Requirement id in JAMA/or Jira ID: APPLINK-4518 + + --Verification criteria: According to xml tests by Ford team all fake parameters should be ignored by SDL + + --Begin test case CommonRequestCheck.7.1 + --Description: Check request with fake parameters + + function Test:ListFiles_FakeParameters_SUCCESS() + + --mobile side: sending ListFiles request + local cid = self.mobileSession:SendRPC("ListFiles", + { + fakeParameter1 = 123, + fakeParameter2 = "abc" + + }) + + --mobile side: expect ListFiles response + EXPECT_RESPONSE + ( + cid, + { + success = true, + resultCode = "SUCCESS" + } + ) + + end + + --End test case CommonRequestCheck.7.1 + + --Begin test case CommonRequestCheck.7.2 + --Description: Check request with fake parameters + + function Test:ListFiles_ParametersOfOtherAPI_SUCCESS() + + --mobile side: sending ListFiles request + local cid = self.mobileSession:SendRPC("ListFiles", + { + syncFileName ="icon.png" + }) + + --mobile side: expect ListFiles response + EXPECT_RESPONSE + ( + cid, + { + success = true, + resultCode = "SUCCESS" + } + ) + + end + + --End test case CommonRequestCheck.7.2 + + --End test case CommonRequestCheck.7 + + + + --Begin test case CommonRequestCheck.8 + --Description: Check request is sent with invalid JSON structure + + --Requirement id in JAMA/or Jira ID: SDLAQ-CRS-723 + + --Verification criteria: The request with wrong JSON syntax is sent, the response comes with INVALID_DATA result code. + + local payload = '}' + commonTestCases:VerifyInvalidJsonRequest(34, payload) + + --End test case CommonRequestCheck.8 + + + + --Begin test case CommonRequestCheck.9 + --Description: Check correlationID parameter value is duplicated + + --Requirement id in JAMA/or Jira ID: SDLAQ-CRS-722 + + --Verification criteria: response comes with SUCCESS result code. + + function Test:ListFiles_CorrelationID_IsDuplicated_SUCCESS() + + + --mobile side: sending ListFiles request + local cid = self.mobileSession:SendRPC("ListFiles", {} ) + + + --mobile side: expect ListFiles response + EXPECT_RESPONSE + ( + cid, + { + success = true, + resultCode = "SUCCESS", + filenames = nil, + info = nil + } + ) + :Times(2) + :Do(function(exp,data) + if exp.occurences == 1 then + local msg = + { + serviceType = 7, + frameInfo = 0, + rpcType = 0, + rpcFunctionId = 34, + rpcCorrelationId = cid, + payload = '{}' + } + self.mobileSession:Send(msg) + end + end) + + end + + --End test case CommonRequestCheck.9 + + + --End test suit CommonRequestCheck + + + + +--------------------------------------------------------------------------------------------- +----------------------------------------II TEST BLOCK---------------------------------------- +----------------------------------------Positive cases--------------------------------------- +--------------------------------------------------------------------------------------------- + + +--=================================================================================-- +--------------------------------Positive request check------------------------------- +--=================================================================================-- + + +--check of each request parameter value in bound and boundary conditions + + +--Write NewTestBlock to ATF log +function Test:NewTestBlock() + print("****************************** II TEST BLOCK: Positive request check ******************************") + print("There is no parameter in request => Ignore this part.") +end + + + + +--=================================================================================-- +--------------------------------Positive response check------------------------------ +--=================================================================================-- + +--------Checks----------- +-- parameters with values in boundary conditions + +--Write NewTestBlock to ATF log +function Test:NewTestBlock() + print("****************************** II TEST BLOCK: Positive response check ******************************") +end + + +--Begin test suit PositiveResponseCheck +--Description: Check positive responses + + + --Begin test case PositiveResponseCheck.1 + --Description: Check filenames parameter + + --Requirement id in JAMA/or Jira ID: SDLAQ-CRS-155 + + --Verification criteria: Returns the current list of resident filenames for the registered app along with the current space available. + + + --Begin test case PositiveResponseCheck.1.1 + --Description: + --Check filenames parameter is missed (nil) + --Check filenames parameter is min-size => filenames is omitted if no files currently reside on the system. + + --It is covered by CommonRequestCheck.1 + + --End test case PositiveResponseCheck.1.1 + + --Begin test case PositiveResponseCheck.1.2 + --Description: Check filenames parameter contains one item with min length (1) + + -- Precondition + putfile(self, "a", "GRAPHIC_PNG") + + function Test:ListFiles_filenames_oneItem_minLength_1() + + --mobile side: sending ListFiles request + local cid = self.mobileSession:SendRPC("ListFiles", {} ) + + + --mobile side: expect ListFiles response + EXPECT_RESPONSE + ( + cid, + { + success = true, + resultCode = "SUCCESS", + filenames = {config.application1.registerAppInterfaceParams.appID, "a"}, + info = nil + } + ) + end + + -- Delete put file + TC_DeleteFile_SUCCESS(self, "a") + + --End test case PositiveResponseCheck.1.2 + + --Begin test case PositiveResponseCheck.1.3 + --Description: Check filenames parameter contains one item with max length of PutFile (255) + + -- Precondition + putfile(self, str255Chars, "GRAPHIC_PNG") + + function Test:ListFiles_filenames_oneItem_maxLength_255() + + --mobile side: sending ListFiles request + local cid = self.mobileSession:SendRPC("ListFiles", {} ) + + + --mobile side: expect ListFiles response + EXPECT_RESPONSE + ( + cid, + { + success = true, + resultCode = "SUCCESS", + filenames = {config.application1.registerAppInterfaceParams.appID, str255Chars}, + info = nil + } + ) + end + + -- Delete put file + TC_DeleteFile_SUCCESS(self, str255Chars) + + --End test case PositiveResponseCheck.1.3 + + --Begin test case PositiveResponseCheck.1.4 + --Description: Check filenames parameter contains max size items with max-length (500) + + -- make an array with 1000 elements, each element has 255 characters. + local arrFileNames = {} + local arrFileNames_Report = {} + local str251Characters = "_255_characters_aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa" + + arrFileNames[1] = config.application1.registerAppInterfaceParams.appID + for i = 2, 1000 do + if i<10 then + arrFileNames[i] = "000" ..tostring(i) .. str251Characters + arrFileNames_Report[i] = "000" ..tostring(i) + elseif i<100 then + arrFileNames[i] = "00" ..tostring(i) .. str251Characters + arrFileNames_Report[i] = "00" ..tostring(i) + elseif i<1000 then + arrFileNames[i] = "0" ..tostring(i) .. str251Characters + arrFileNames_Report[i] = "0" ..tostring(i) + else + arrFileNames[i] = tostring(i) .. str251Characters + arrFileNames_Report[i] = tostring(i) + end + end + + --Put 999/1000 files + for j = 2, #arrFileNames do + putfile(self, {fileName = arrFileNames[j], reportName = arrFileNames_Report[j]}, "GRAPHIC_PNG") + end + + function Test:ListFiles_filenames_maxsize_1000_minLength() + + --mobile side: sending ListFiles request + local cid = self.mobileSession:SendRPC("ListFiles", {} ) + + + --mobile side: expect ListFiles response + EXPECT_RESPONSE + ( + cid, + { + success = true, + resultCode = "SUCCESS", + filenames = arrFileNames, + info = nil + } + ) + end + + --End test case PositiveResponseCheck.1.5 + + + --Begin test case PositiveResponseCheck.1.6 + --Description: Check filenames parameter value in case there are more than 1000 files on app folder + + --Note: This is spacial case, move this test case from NegativeResponseCheck to PositiveResponseCheck to reuse precondition: 1000 files was put to SDL. + + + --PutFile 1001th + local FileName1001 = "1001_256.png" + + putfile(self, FileName1001, "GRAPHIC_PNG") + + function Test:ListFiles_filenames_OutUpperBound_1001() + + --mobile side: sending ListFiles request + local cid = self.mobileSession:SendRPC("ListFiles", {} ) + + --mobile side: expect ListFiles response + EXPECT_RESPONSE + ( + cid, + { + success = true, + resultCode = "SUCCESS", + filenames = arrFileNames + } + ) + :ValidIf (function(_,data) + if #data.payload.filenames > 1000 then + print("filenames returns more than 1000 files. Number of files is " .. tostring(#data.payload.filenames)) + return false + else + return true + end + end) + + + end + + --Delete put files + for j = 2, #arrFileNames do + TC_DeleteFile_SUCCESS(self, arrFileNames[j], arrFileNames_Report[j]) + end + + TC_DeleteFile_SUCCESS(self, FileName1001) + + --End test case PositiveResponseCheck.1.6 + + + --End test case PositiveResponseCheck.1 + + + --Begin test case PositiveResponseCheck.2-5 + --Description: + --Check resultCode parameter + --Check method parameter + --Check info parameter + --Check correlationId parameter + + --=> These parameters are responded by SDL. We cannot test. + + --End test case PositiveResponseCheck.2-5 + + + --Begin test case PositiveResponseCheck.6 + --Description: Check spaceAvailable parameter + + --Begin test case PositiveResponseCheck.6.1 + --Description: Check spaceAvailable parameter is upper bound (104857600 - 100 MBs) + + --It is covered by CommonRequestCheck.1 + + --End test case PositiveResponseCheck.6.1 + + + --Begin test case PositiveResponseCheck.6.2 + --Description: Check spaceAvailable parameter is lower bound + +--[[ToDo: Update this test case when APPLINK-14538 is closed. + + --PutFile to make applicaton folder is full. + local addedFiles = {} + for i = 1, 23 do + putfile(self, tostring(i) .."_MP3_4555kb.mp3", "AUDIO_MP3") + + table.insert(addedFiles, tostring(i) .."_MP3_4555kb.mp3") + end + + function Test:ListFiles_spaceAvailable_LowerBound() + + --mobile side: sending ListFiles request + local cid = self.mobileSession:SendRPC("ListFiles", {} ) + + --mobile side: expect ListFiles response + EXPECT_RESPONSE + ( + cid, + { + success = true, + resultCode = "SUCCESS", + spaceAvailable = 0 + } + ) + end + + for j = 1, #addedFiles do + TC_DeleteFile_SUCCESS(self, addedFiles[j], addedFiles[j]) + end + + --End test case PositiveResponseCheck.6.2 + ]] + --End test case PositiveResponseCheck.6 + +--End test suit PositiveResponseCheck + + + +---------------------------------------------------------------------------------------------- +----------------------------------------III TEST BLOCK---------------------------------------- +----------------------------------------Negative cases---------------------------------------- +---------------------------------------------------------------------------------------------- + + --=================================================================================-- + ---------------------------------Negative request check------------------------------ + --=================================================================================-- + + --------Checks----------- + -- outbound values + -- invalid values(empty, missing, nonexistent, duplicate, invalid characters) + -- parameters with wrong type + -- invalid json + + --Write NewTestBlock to ATF log + function Test:NewTestBlock() + print("****************************** III TEST BLOCK: Negative request check ******************************") + print("There is no parameter in request => Ignore this part.") + end + + --Begin test suit NegativeRequestCheck + --Description: check of each request parameter value out of bound, missing, with wrong type, empty, duplicate etc. + + --Begin test case NegativeRequestCheck.1-3 + --Description: + --Check parameter value is out bound + --Check parameter is invalid values(empty, missing, nonexistent, duplicate, invalid characters) + --check syncFileName parameter is wrong type + + --=>These checks are not applicable for this request. => Ignore + + --End test case NegativeRequestCheck.1-3 + + --End test suit NegativeRequestCheck + + + --=================================================================================-- + ---------------------------------Negative response check------------------------------ + --=================================================================================-- + + --------Checks----------- + -- outbound values + -- invalid values(empty, missing, nonexistent, invalid characters) + -- parameters with wrong type + -- invalid json + + --Write NewTestBlock to ATF log + function Test:NewTestBlock() + print("****************************** III TEST BLOCK: Negative response check ******************************") + print("There is no response from HMI => Ignore this part.") + + end + + + --Begin test suit NegativeResponseCheck + --Description: Check of filenames parameter value is out of bound + + --Begin test case NegativeResponseCheck.1 + --Description: Check filenames parameter value in case there are more than 1000 files on app folder + + --This test case is coverted by TC PositiveResponseCheck.1.6 + + --End test suit NegativeResponseCheck + + + + + +---------------------------------------------------------------------------------------------- +----------------------------------------IV TEST BLOCK----------------------------------------- +---------------------------------------Result code check-------------------------------------- +---------------------------------------------------------------------------------------------- + + --Check all uncovered pairs resultCodes+success + + + --Write NewTestBlock to ATF log + function Test:NewTestBlock() + print("****************************** IV TEST BLOCK: Result code check ******************************") + end + + + --Begin test suit ResultCodeCheck + --Description: check result code of response to Mobile + + --Begin test case resultCodeCheck.1 + --Description: Check resultCode: APPLICATION_NOT_REGISTERED + + --Requirement id in JAMA/or Jira ID: SDLAQ-CRS-726 + + --Verification criteria: SDL returns APPLICATION_NOT_REGISTERED code for the request sent within the same connection before RegisterAppInterface has been performed yet. + + --Precondition: Create new session + commonSteps:precondition_AddNewSession() + + function Test:ListFiles_resultCode_APPLICATION_NOT_REGISTERED() + + --mobile side: sending ListFiles request + local cid = self.mobileSession2:SendRPC("ListFiles", {} ) + + --mobile side: expect ListFiles response + self.mobileSession2:ExpectResponse(cid, {success = false, resultCode = "APPLICATION_NOT_REGISTERED", info = nil}) + + end + + --End test case resultCodeCheck.1 + + + --Begin test case resultCodeCheck.2 + --Description: Check resultCode: REJECTED + + --Requirement id in JAMA/or Jira ID: SDLAQ-CRS-727 + + --Verification criteria: . In case app in HMI level of NONE sends ListFiles_request AND the number of requests more than value of 'ListFilesRequest' parameter (defined in .ini file) SDL must respond REJECTED result code to this mobile app + + + -- Precondition: Change app to NONE HMI level + commonSteps:DeactivateAppToNoneHmiLevel() + + -- Precondition: Send ListFiles 5 times + files = {"first_file", "second_file", "third_file", "fourth_file", "fifth_file"} + for i = 1, 5 do + Test["ListFiles_".. files[i] .. "_SUCCESS"] = function(self) + --mobile side: sending ListFiles request + local cid = self.mobileSession:SendRPC("ListFiles", {} ) + + --mobile side: expect ListFiles response + EXPECT_RESPONSE(cid, { success = true, resultCode = "SUCCESS" }) + end + end + + + Test["ListFiles_6th_time_REJECTED"] = function(self) + + --mobile side: sending ListFiles request + local cid = self.mobileSession:SendRPC("ListFiles", {} ) + + --mobile side: expect ListFiles response + EXPECT_RESPONSE(cid, { success = false, resultCode = "REJECTED", info = nil}) + end + + -- Activate app again + commonSteps:ActivationApp() + + --End test case resultCodeCheck.2 + + + + --Begin test case resultCodeCheck.3 + --Description: Check resultCode: UNSUPPORTED_REQUEST + + --Requirement id in JAMA/or Jira ID: SDLAQ-CRS-1042 + --Verification criteria: The platform doesn't support file operations, the UNSUPPORTED_REQUEST responseCode is returned. General request result is success=false. + + --Per APPLINK-9867, current HeadUnit supports ListFiles API so that this requirement is not applicable. + + --End test case resultCodeCheck.3 + + + --End test suit resultCodeCheck + + + +---------------------------------------------------------------------------------------------- +-----------------------------------------V TEST BLOCK----------------------------------------- +---------------------------------------HMI negative cases------------------------------------- +---------------------------------------------------------------------------------------------- + + + --Write NewTestBlock to ATF log + function Test:NewTestBlock() + print("****************************** V TEST BLOCK: HMI negative cases ******************************") + print("There is no response from HMI => Ignore this part.") + end + + + +---------------------------------------------------------------------------------------------- +-----------------------------------------VI TEST BLOCK---------------------------------------- +-------------------------Sequence with emulating of user's action(s)-------------------------- +---------------------------------------------------------------------------------------------- + + -- Check different request sequence with timeout, emulating of user's actions + + + --Write NewTestBlock to ATF log + function Test:NewTestBlock() + print("****************************** VI TEST BLOCK: Sequence with emulating of user's action(s) ******************************") + end + + --Begin test suit SequenceCheck + --Description: TC's checks SDL behavior by processing + -- different request sequence with timeout + -- with emulating of user's actions + + --Begin test case SequenceCheck.1 + --Description: Check scenario in test case TC_ListFiles_01: Check stored files from mobile device on SDL Core using ListFiles request + + --Requirement id in JAMA/or Jira ID: SDLAQ-CRS-154 + + --Verification criteria: ListFiles request returns the list of the file names which are stored in the app's folder on SDL platform. + + + -- Precondition: PutFile action.png, turn_forward.png, turn_left.png, icon.png, turn_right.png + + putfile(self, "1action.png", "GRAPHIC_PNG") + putfile(self, "2turn_forward.png", "GRAPHIC_PNG") + putfile(self, "3turn_left.png", "GRAPHIC_PNG") + putfile(self, "4icon.png", "GRAPHIC_PNG") + putfile(self, "5turn_right.png", "GRAPHIC_PNG") + + + Test["TC_ListFiles_01_Before_PutFile"] = function(self) + + --mobile side: sending ListFiles request + local cid = self.mobileSession:SendRPC("ListFiles", {} ) + + --mobile side: expect DeleteFile response + EXPECT_RESPONSE(cid, + { + success = true, + resultCode = "SUCCESS", + filenames = + { + config.application1.registerAppInterfaceParams.appID, + "1action.png", + "2turn_forward.png", + "3turn_left.png", + "4icon.png", + "5turn_right.png" + } + } + ) + end + + putfile(self, "6image.png", "GRAPHIC_PNG") + + Test["TC_ListFiles_01_After_PutFile"] = function(self) + + --mobile side: sending ListFiles request + local cid = self.mobileSession:SendRPC("ListFiles", {} ) + + --mobile side: expect DeleteFile response + EXPECT_RESPONSE(cid, + { + success = true, + resultCode = "SUCCESS", + filenames = + { + config.application1.registerAppInterfaceParams.appID, + "1action.png", + "2turn_forward.png", + "3turn_left.png", + "4icon.png", + "5turn_right.png", + "6image.png" + } + } + ) + end + + TC_DeleteFile_SUCCESS(self, "6image.png") + + Test["TC_ListFiles_01_After_DeleteFile"] = function(self) + + --mobile side: sending ListFiles request + local cid = self.mobileSession:SendRPC("ListFiles", {} ) + + --mobile side: expect DeleteFile response + EXPECT_RESPONSE(cid, + { + success = true, + resultCode = "SUCCESS", + filenames = + { + config.application1.registerAppInterfaceParams.appID, + "1action.png", + "2turn_forward.png", + "3turn_left.png", + "4icon.png", + "5turn_right.png" + } + } + ) + :ValidIf (function(_,data) + local result = true + for i = 1, #data.payload.filenames do + if "6image.png" == data.payload.filenames[i] then + print("Deleted file is still in response of ListFiles request") + result = false + end + end + return result + + end) + end + + --Post condition + TC_DeleteFile_SUCCESS(self, "1action.png") + TC_DeleteFile_SUCCESS(self, "2turn_forward.png") + TC_DeleteFile_SUCCESS(self, "3turn_left.png") + TC_DeleteFile_SUCCESS(self, "4icon.png") + TC_DeleteFile_SUCCESS(self, "5turn_right.png") + + --End test case SequenceCheck.1 + + -------------------------------------------------------------------------------------------------------- + --Begin test case SequenceCheck.2 + --Description: SDL doesn't list files in ListFiles response, loaded by PutFile with parameter systemRequest=true. ListFiles shows list of file names stored in App's directory, and files loaded as system, stored in separate folder. + + --Requirement id in JAMA/or Jira ID: SDLAQ-CRS-154 + --TC id in Jira: APPLINK-18321 + + --Verification criteria: ListFiles shows list of file names stored in App's directory, and files loaded as system, stored in separate folder. + + local function Task_APPLINK_15934() + function GetParamValue(parameterName) + -- body + local iniFilePath = config.pathToSDL .. "smartDeviceLink.ini" + local iniFile = io.open(iniFilePath) + if iniFile then + for line in iniFile:lines() do + if line:match(parameterName) then + local version = line:match("=.*") + version = string.gsub(version, "=", "") + version = string.gsub(version, "% ", "") + return version + end + end + else + return nil + end + end + + --Precondition:Start new session + function Test:Precondition_NewSession5() + --mobile side: start new session + self.mobileSession5 = mobile_session.MobileSession( + self, + self.mobileConnection) + end + + --Register new app5 + function Test:Precondition_AppRegistrationInNewSession_App5() + --mobile side: start new + self.mobileSession5:StartService(7) + :Do(function() + local cid = self.mobileSession5:SendRPC("RegisterAppInterface", + { + syncMsgVersion = + { + majorVersion = 3, + minorVersion = 0 + }, + appName = "App5", + isMediaApplication = false, + languageDesired = 'EN-US', + hmiDisplayLanguageDesired = 'EN-US', + appHMIType = { "NAVIGATION" }, + appID = "5" + }) + + --hmi side: expect BasicCommunication.OnAppRegistered request + EXPECT_HMINOTIFICATION("BasicCommunication.OnAppRegistered", + { + application = + { + appName = "App5" + } + }) + :Do(function(_,data) + self.applications["App5"] = data.params.application.appID + end) + + --mobile side: expect response + self.mobileSession5:ExpectResponse(cid, { success = true, resultCode = "SUCCESS" }) + :Timeout(2000) + + self.mobileSession5:ExpectNotification("OnHMIStatus", {hmiLevel = "NONE", audioStreamingState = "NOT_AUDIBLE", systemContext = "MAIN"}) + end) + end + + --PutFile on App5 with systemFile = false + + function Test:PutFile_App5_systemFilefalse() + local paramsSend = { + syncFileName ="icon.png", + fileType ="GRAPHIC_PNG", + systemFile = false + } + + --mobile side: sending PutFile request + local cid = self.mobileSession5:SendRPC("PutFile",paramsSend, "files/icon.png") + --mobile side: expected PutFile response + self.mobileSession5:ExpectResponse(cid, { success = true, resultCode = "SUCCESS" }) + + :ValidIf (function(_,data) + app5StoragePath = config.pathToSDL .. GetParamValue("AppStorageFolder").."/" .."5".. "_" .. config.deviceMAC.. "/" + print(app5StoragePath.."icon.png") + if file_check(app5StoragePath.."icon.png") ~= true then + print(" \27[36m Can not found file: icon.png \27[0m ") + return false + else + return true + end + end) + + end + + --Checking files: ListFiles - the list contain icon.png only + function Test:ListFiles_App5_systemFilefalse() + + --mobile side: sending ListFiles request + local cid = self.mobileSession5:SendRPC("ListFiles", {} ) + + --mobile side: expect ListFiles response + self.mobileSession5:ExpectResponse(cid, {success = true, resultCode = "SUCCESS"}) + + end + + --PutFile on App5: systemFile = true + function Test:PutFile_App5_systemFiletrue() + local paramsSend = { + syncFileName ="bmp_6kb.bmp", + fileType ="GRAPHIC_BMP", + systemFile = true + } + --mobile side: sending PutFile request + local cid = self.mobileSession5:SendRPC("PutFile",paramsSend, "files/bmp_6kb.bmp") + --mobile side: expected PutFile response + self.mobileSession5:ExpectResponse(cid, { success = true, resultCode = "SUCCESS" }) + + :ValidIf (function(_,data) + app5StoragePath = config.pathToSDL .. GetParamValue("AppStorageFolder").."/" .."5".. "_" .. config.deviceMAC.. "/" + print(app5StoragePath.."icon.png") + if file_check(app5StoragePath.."bmp_6kb.bmp") == true then + print(" \27[36m Can not found file: bmp_6kb.bmp \27[0m ") + return false + else + return true + end + end) + end + + --Checking files: ListFiles - the list contain icon.png only + function Test:ListFiles_App5_systemFiletrue() + app5StoragePath = config.pathToSDL .. GetParamValue("AppStorageFolder").."/" .."5".. "_" .. config.deviceMAC.. "/" + local listfileresult = os.execute('ls ' .. app5StoragePath .. ">ResultOfListFile.txt") + + --open a file in read mode + local file = io.open("ResultOfListFile.txt", "r") + local Files = {} + i = 1 + while true do + + local line = file:read() + if line == nil then break end + Files[i] = line + i = i + 1 + print(line) + end + file:close() + + --mobile side: sending ListFiles request + local cid = self.mobileSession5:SendRPC("ListFiles", {} ) + --mobile side: expect ListFiles response + self.mobileSession5:ExpectResponse(cid, {success = true, resultCode = "SUCCESS"}) + :ValidIf (function(_,data) + local fileNamesValue = data.payload.filenames + + if fileNamesValue == nil or #fileNamesValue > 1 then + print(" \27[36m Error: "..fileNamesValue[1].." \27[0m ") + return false + else + + if(fileNamesValue[1] == "icon.png") then + print(" \27[36m Response contains only: "..fileNamesValue[1].." \27[0m ") + return true + else + print(" \27[36m Error: "..fileNamesValue[1].." \27[0m ") + return false + + end + + end + + end) + + end + + end + Task_APPLINK_15934() + --End test case SequenceCheck.2 + + --End test suit SequenceCheck + + + +---------------------------------------------------------------------------------------------- +-----------------------------------------VII TEST BLOCK--------------------------------------- +--------------------------------------Different HMIStatus------------------------------------- +---------------------------------------------------------------------------------------------- + + -- processing of request/response in different HMIlevels, SystemContext, AudioStreamingState + + + + --Write NewTestBlock to ATF log + function Test:NewTestBlock() + print("****************************** VII TEST BLOCK: Different HMIStatus ******************************") + end + + + --Begin test suit DifferentHMIlevel + --Description: processing API in different HMILevel + + --Requirement id in JAMA/or Jira ID: SDLAQ-CRS-811 + + --Verification criteria: ListFiles is allowed in FULL, LIMITED, BACKGROUND, NONE + + --Verify resultCode in NONE, LIMITED, BACKGROUND HMI level + commonTestCases:verifyDifferentHMIStatus("SUCCESS", "SUCCESS", "SUCCESS") + + --End test suit DifferentHMIlevel + + --Postcondition: restore sdl_preloaded_pt.json + policyTable:Restore_preloaded_pt() + +return Test + diff --git a/test_scripts/API/ATF_No_OnButtonSubscription_if_subscription_failed.lua b/test_scripts/API/ATF_No_OnButtonSubscription_if_subscription_failed.lua new file mode 100644 index 0000000000..f3608bbb02 --- /dev/null +++ b/test_scripts/API/ATF_No_OnButtonSubscription_if_subscription_failed.lua @@ -0,0 +1,514 @@ +--Test = require('connecttest') +--require('cardinalities') +--local events = require('events') +--local mobile_session = require('mobile_session') +--local mobile = require('mobile_connection') +--local tcp = require('tcp_connection') +--local file_connection = require('file_connection') +--local config = require('config') + + +--function Test:ActivationApp() + --local RequestId = self.hmiConnection:SendRequest("SDL.ActivateApp", { appID = self.applications["Test Application"]}) + + --EXPECT_HMIRESPONSE(RequestId) + --:Do(function(_,data) + --if + --data.result.isSDLAllowed ~= true then + --local RequestId = self.hmiConnection:SendRequest("SDL.GetUserFriendlyMessage", {language = "EN-US", messageCodes = {"DataConsent"}}) + + --EXPECT_HMIRESPONSE(RequestId,{result = {code = 0, method = "SDL.GetUserFriendlyMessage"}}) + -- :Do(function(_,data) + --hmi side: send request SDL.OnAllowSDLFunctionality + -- self.hmiConnection:SendNotification("SDL.OnAllowSDLFunctionality", {allowed = true, source = "GUI", device = {id = 1, name = "127.0.0.1"}}) + -- end) + + -- EXPECT_HMICALL("BasicCommunication.ActivateApp") + -- :Do(function(_,data) + -- self.hmiConnection:SendResponse(data.id,"BasicCommunication.ActivateApp", "SUCCESS", {}) + -- end) + --end + -- end) + + --EXPECT_NOTIFICATION("OnHMIStatus", {hmiLevel = "FULL"}) + +--end + +--Test = require('user_modules/connecttestSubscribeSB') + + +local commonSteps = require('user_modules/shared_testcases/commonSteps') +local commonPreconditions = require('user_modules/shared_testcases/commonPreconditions') + +function DeleteLog_app_info_dat_policy() + commonSteps:CheckSDLPath() + local SDLStoragePath = config.pathToSDL .. "storage/" + + --Delete app_info.dat and log files and storage + if commonSteps:file_exists(config.pathToSDL .. "app_info.dat") == true then + os.remove(config.pathToSDL .. "app_info.dat") + end + + if commonSteps:file_exists(config.pathToSDL .. "SmartDeviceLinkCore.log") == true then + os.remove(config.pathToSDL .. "SmartDeviceLinkCore.log") + end + + if commonSteps:file_exists(SDLStoragePath .. "policy.sqlite") == true then + os.remove(SDLStoragePath .. "policy.sqlite") + end + + if commonSteps:file_exists(config.pathToSDL .. "policy.sqlite") == true then + os.remove(config.pathToSDL .. "policy.sqlite") + end + os.execute("rm -r " ..config.pathToSDL .. "storage") +end + +DeleteLog_app_info_dat_policy() + + + + + +--UPDATED +function UpdateHMICapabilities() + commonPreconditions:BackupFile("hmi_capabilities.json") + + local src = config.pathToSDL .."hmi_capabilities.json" + local dest = "files/hmi_capabilities_SearchButton.json" + + local filecopy = "cp " .. dest .." " .. src + + os.execute(filecopy) +end + +UpdateHMICapabilities() + + +-------------------------------------------------------------------------------- +--Precondition: preparation connecttest_OnButton.lua +commonPreconditions:Connecttest_without_ExitBySDLDisconnect("connecttest_OnButton.lua") +commonPreconditions:Connecttest_OnButtonSubscription("connecttest_OnButton.lua") +--Precondition: preparation connecttest_OnButton.lua + f = assert(io.open('./user_modules/connecttest_OnButton.lua', "r")) + + fileContent = f:read("*all") + f:close() + + local pattern2 = "%{%s-capabilities%s-=%s-%{.-%}" + local pattern2Result = fileContent:match(pattern2) + + if pattern2Result == nil then + print(" \27[31m capabilities array is not found in /user_modules/connecttest_OnButton.lua \27[0m ") + else + fileContent = string.gsub(fileContent, pattern2, '{capabilities = {button_capability("PRESET_0"),button_capability("PRESET_1"),button_capability("PRESET_2"),button_capability("PRESET_3"),button_capability("PRESET_4"),button_capability("PRESET_5"),button_capability("PRESET_6"),button_capability("PRESET_7"),button_capability("PRESET_8"),button_capability("PRESET_9"),button_capability("OK", true, false, true),button_capability("SEEKLEFT"),button_capability("SEEKRIGHT"),button_capability("TUNEUP"),button_capability("TUNEDOWN"),button_capability("CUSTOM_BUTTON")}') + end + + f = assert(io.open('./user_modules/connecttest_OnButton.lua', "w+")) + f:write(fileContent) + f:close() + +Test = require('user_modules/connecttest_OnButton') +require('cardinalities') +local events = require('events') +local mobile_session = require('mobile_session') +local mobile = require('mobile_connection') +local tcp = require('tcp_connection') +local file_connection = require('file_connection') +local config = require('config') + + +config.deviceMAC = "12ca17b49af2289436f303e0166030a21e525d266e209267433801a8fd4071a0" +--ToDo: shall be removed when APPLINK-16610 is fixed +config.defaultProtocolVersion = 2 + +local iTimeout = 5000 +local buttonName = {"OK","SEEKLEFT","SEEKRIGHT","TUNEUP","TUNEDOWN", "PRESET_0","PRESET_1","PRESET_2","PRESET_3","PRESET_4","PRESET_5","PRESET_6","PRESET_7","PRESET_8"} +local buttonNameNonMediaApp = {"OK", "PRESET_0","PRESET_1","PRESET_2","PRESET_3","PRESET_4","PRESET_5","PRESET_6","PRESET_7","PRESET_8"} +local UnsupportButtonName = {"PRESET_9", "SEARCH"} + + +local str1000Chars = + "10123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyza b c aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa" + + +local info = {nil, "unused"} +local OutBound = {"a", "nonexistButton", str1000Chars} +local OutBoundName = {"OneCharacter", "nonexistButton", "String1000Characters"} + +local resultCode = {"SUCCESS", "INVALID_DATA", "OUT_OF_MEMORY", "TOO_MANY_PENDING_REQUESTS", "APPLICATION_NOT_REGISTERED", "REJECTED", "IGNORED", "GENERIC_ERROR", "UNSUPPORTED_RESOURCE", "DISALLOWED"} + +local success = {true, false, false, false, false, false, false, false, false, false} + +local appID0, appId1, appId2 +-- Common functions + +-- Common functions + +function DelayedExp(time) + local event = events.Event() + event.matches = function(self, e) return self == e end + EXPECT_EVENT(event, "Delayed event") + :Timeout(time+1000) + RUN_AFTER(function() + RAISE_EVENT(event, event) + end, time) +end + +local function SendOnSystemContext(self, ctx) + self.hmiConnection:SendNotification("UI.OnSystemContext",{ appID = self.applications["Test Application"], systemContext = ctx }) +end + +local function SendOnSystemContextOnAppID(self, ctx, strAppID) + self.hmiConnection:SendNotification("UI.OnSystemContext",{ appID = strAppID, systemContext = ctx }) +end + +local function Precondition_TC_UnsubscribeButton(self, btnName) + + Test["Precondition_TC_UnsubscribeButton_" .. tostring(btnName)] = function(self) + --mobile side: sending SubscribeButton request + local cid = self.mobileSession:SendRPC("UnsubscribeButton", + { + buttonName = btnName + } + ) + + --mobile side: expect UnsubscribeButton response + EXPECT_RESPONSE("UnsubscribeButton") + :ValidIf(function(_,data) + if data.payload.resultCode == "SUCCESS" then + --mobile side: OnHashChange notification + EXPECT_NOTIFICATION("OnHashChange") + + return true + elseif (data.payload.resultCode == "IGNORED") then + print("\27[32m" .. btnName .. " button has not subscribed yet. resultCode = "..tostring(data.payload.resultCode) .. "\27[0m") + return true + else + print(" \27[36m UnsubscribeButton response came with wrong resultCode "..tostring(data.payload.resultCode) .. "\27[0m") + return false + end + end) + + end + +end + +local function Precondition_TC_SubscribeButton(self, btnName) + + Test["Precondition_TC_SubscribeButton_" .. tostring(btnName)] = function(self) + --mobile side: sending SubscribeButton request + local cid = self.mobileSession:SendRPC("SubscribeButton", + { + buttonName = btnName + } + ) + + --expect Buttons.OnButtonSubscription + EXPECT_HMINOTIFICATION("Buttons.OnButtonSubscription", {appID = self.applications["Test Application"], isSubscribed = true, name = btnName}) + :Timeout(iTimeout) + + --mobile side: expect UnsubscribeButton response + EXPECT_RESPONSE("SubscribeButton") + :ValidIf(function(_,data) + if (data.payload.resultCode == "SUCCESS") then + EXPECT_NOTIFICATION("OnHashChange") + return true + elseif (data.payload.resultCode == "IGNORED") then + print(btnName .. " button has already been subscribed. resultCode = "..tostring(data.payload.resultCode)) + return true + else + print("SubscribeButton response came with wrong resultCode "..tostring(data.payload.resultCode)) + return false + end + end) + end + +end + +local function TC_OnButtonEvent_OnButtonPress_When_SubscribedButton(self, btnName, strMode, strTestCaseName) + + Test[strTestCaseName] = function(self) + + + --hmi side: send request Buttons.OnButtonEvent + self.hmiConnection:SendNotification("Buttons.OnButtonEvent", + { + name = btnName, + mode = "BUTTONDOWN" + }) + + + + local function OnButtonEventBUTTONUP() + --hmi side: send request Buttons.OnButtonEvent + self.hmiConnection:SendNotification("Buttons.OnButtonEvent", + { + name = btnName, + mode = "BUTTONUP" + }) + end + + --hmi side: send request Buttons.OnButtonPress + local function OnButtonPress() + self.hmiConnection:SendNotification("Buttons.OnButtonPress", + { + name = btnName, + mode = strMode + }) + end + + if strMode == "LONG" then + --hmi side: send request Buttons.OnButtonPress + RUN_AFTER(OnButtonPress, 50) + + --hmi side: send request Buttons.OnButtonEvent + RUN_AFTER(OnButtonEventBUTTONUP, 100) + + else + --hmi side: send request Buttons.OnButtonEvent + RUN_AFTER(OnButtonEventBUTTONUP, 50) + + --hmi side: send request Buttons.OnButtonPress + RUN_AFTER(OnButtonPress, 100) + end + + --Mobile expects OnButtonEvent + EXPECT_NOTIFICATION("OnButtonEvent", + {buttonName = btnName, buttonEventMode = "BUTTONDOWN"}, + {buttonName = btnName, buttonEventMode = "BUTTONUP"} + ) + --:Timeout(10000) + :Times(2) + + --Mobile expects OnButtonEvent + EXPECT_NOTIFICATION("OnButtonPress", {buttonName = btnName, buttonPressMode = strMode}) + --:Timeout(10000) + + end + +end + +local function TC_OnButtonEvent_OnButtonPress_When_UnsubscribedButton(self, btnName, strMode, strTestCaseName) + + Test[strTestCaseName] = function(self) + + + --hmi side: send request Buttons.OnButtonEvent + self.hmiConnection:SendNotification("Buttons.OnButtonEvent", + { + name = btnName, + mode = "BUTTONDOWN" + }) + + + + local function OnButtonEventBUTTONUP() + --hmi side: send request Buttons.OnButtonEvent + self.hmiConnection:SendNotification("Buttons.OnButtonEvent", + { + name = btnName, + mode = "BUTTONUP" + }) + end + + --hmi side: send request Buttons.OnButtonPress + local function OnButtonPress() + self.hmiConnection:SendNotification("Buttons.OnButtonPress", + { + name = btnName, + mode = strMode + }) + end + + if strMode == "LONG" then + --hmi side: send request Buttons.OnButtonPress + RUN_AFTER(OnButtonPress, 50) + + --hmi side: send request Buttons.OnButtonEvent + RUN_AFTER(OnButtonEventBUTTONUP, 100) + + else + --hmi side: send request Buttons.OnButtonEvent + RUN_AFTER(OnButtonEventBUTTONUP, 50) + + --hmi side: send request Buttons.OnButtonPress + RUN_AFTER(OnButtonPress, 100) + end + + --Mobile expects OnButtonEvent + EXPECT_NOTIFICATION("OnButtonEvent") + :Times(0) + :Timeout(2000) + + --Mobile expects OnButtonEvent + EXPECT_NOTIFICATION("OnButtonPress") + :Times(0) + :Timeout(2000) + end + +end + +local function TC_SubscribeButtonSUCCESS(self, btnName, strTestCaseName) + + Test[strTestCaseName] = function(self) + + --mobile side: sending SubscribeButton request + local cid = self.mobileSession:SendRPC("SubscribeButton", + { + buttonName = btnName + } + ) + + --hmi side: receiving Buttons.OnButtonSubscription + EXPECT_HMINOTIFICATION("Buttons.OnButtonSubscription", {appID = self.applications["Test Application"], isSubscribed = true, name = btnName}) + :Timeout(iTimeout) + + --mobile side: expect SubscribeButton response + EXPECT_RESPONSE(cid, {resultCode = "SUCCESS", success = true}) + :Timeout(iTimeout) + + EXPECT_NOTIFICATION("OnHashChange") + end +end + +function ActivateApplication(self, strAppName) + --HMI send ActivateApp request + + local RequestId = self.hmiConnection:SendRequest("SDL.ActivateApp", { appID = self.applications[strAppName]}) + EXPECT_HMIRESPONSE(RequestId) + :Do(function(_,data) + if data.result.isSDLAllowed ~= true then + local RequestId = self.hmiConnection:SendRequest("SDL.GetUserFriendlyMessage", {language = "EN-US", messageCodes = {"DataConsent"}}) + EXPECT_HMIRESPONSE(RequestId,{result = {code = 0, method = "SDL.GetUserFriendlyMessage"}}) + :Do(function(_,data) + --hmi side: send request SDL.OnAllowSDLFunctionality + self.hmiConnection:SendNotification("SDL.OnAllowSDLFunctionality", {allowed = true, source = "GUI", device = {id = config.deviceMAC, name = "127.0.0.1"}}) + + EXPECT_HMICALL("BasicCommunication.ActivateApp") + :Do(function(_,data) + self.hmiConnection:SendResponse(data.id,"BasicCommunication.ActivateApp", "SUCCESS", {}) + end) + :Times(2) + end) + end + end) + + EXPECT_NOTIFICATION("OnHMIStatus", {hmiLevel = "FULL", systemContext = "MAIN"}) + :Timeout(12000) + +end + +--------------------------------------------------------------------------------------------- +-------------------------------------------Preconditions------------------------------------- +--------------------------------------------------------------------------------------------- + + --Begin Precondition.1 + -- Description: removing user_modules/connecttest_OnButton.lua + function Test:Remove_user_connecttest() + os.execute( "rm -f ./user_modules/connecttest_OnButton.lua" ) + end + --End Precondition.1 + + --Begin Precondition.2 + --Description: Activation App by sending SDL.ActivateApp + + function Test:Activate_Media_Application() + --HMI send ActivateApp request + ActivateApplication(self, config.application1.registerAppInterfaceParams.appName) + end + + --End Precondition.2 + + ----------------------------------------------------------------------------------------- + + + +--SubscribeButton suit of tests is intended to check sending +--appropriate request with different conditions for parameter +--and receiving proper responses (CRQ APPLINK-11266)--> + + +-- Test suit 1 "Positive cases and in boundary conditions" + +-- This test is intended to check positive cases and when all parameters +-- are in boundary conditions + +-- 1.1 Positive case and in boundary conditions +function Test:SubscribeButton_INVALID_DATA() + --request from mobile side + local CorIdSubscribeButton = self.mobileSession:SendRPC("SubscribeButton", + { + buttonName = "PRESET_15" + }) + + --hmi side: request, response + EXPECT_HMINOTIFICATION("Buttons.OnButtonSubscription") + :Timeout(1000) + :Times(0) + + --response on mobile side + EXPECT_RESPONSE(CorIdSubscribeButton, { success = false, resultCode = "INVALID_DATA"}) + :Timeout(1000) +end + +function Test:SubscribeButton_UNSUPPORTED_RESOURCE() + --request from mobile side + local CorIdSubscribeButton = self.mobileSession:SendRPC("SubscribeButton", + { + --UPDATED + buttonName = "SEARCH" + --buttonName = "PRESET_9" + }) + + --hmi side: request, response + EXPECT_HMINOTIFICATION("Buttons.OnButtonSubscription") + :Timeout(1000) + :Times(0) + + --response on mobile side + EXPECT_RESPONSE(CorIdSubscribeButton, { success = false, resultCode = "UNSUPPORTED_RESOURCE"}) + :Timeout(1000) +end + +--UPDATED +function Test:PreconditionSubscribeButton_IGNORED() + --request from mobile side + local CorIdSubscribeButton = self.mobileSession:SendRPC("SubscribeButton", + { + buttonName = "PRESET_1" + }) + + --hmi side: request, response + EXPECT_HMINOTIFICATION("Buttons.OnButtonSubscription") + :Timeout(1000) + :Times(1) + + --response on mobile side + EXPECT_RESPONSE(CorIdSubscribeButton, { success = true, resultCode = "SUCCESS"}) + :Timeout(1000) +end + +function Test:SubscribeButton_IGNORED() + --request from mobile side + local CorIdSubscribeButton = self.mobileSession:SendRPC("SubscribeButton", + { + buttonName = "PRESET_1" + }) + + --hmi side: request, response + EXPECT_HMINOTIFICATION("Buttons.OnButtonSubscription") + :Timeout(1000) + :Times(0) + + --response on mobile side + EXPECT_RESPONSE(CorIdSubscribeButton, { success = false, resultCode = "IGNORED"}) + :Timeout(1000) +end + +--------------------------------------------------------------------------------------------- +-------------------------------------------Postconditions------------------------------------- +--------------------------------------------------------------------------------------------- + +function Test:RemoveConfigurationFiles() + commonPreconditions:RestoreFile("hmi_capabilities.json") +end \ No newline at end of file diff --git a/test_scripts/API/ATF_No_OnButtonSubscription_if_unsubscription_failed.lua b/test_scripts/API/ATF_No_OnButtonSubscription_if_unsubscription_failed.lua new file mode 100644 index 0000000000..20aec67343 --- /dev/null +++ b/test_scripts/API/ATF_No_OnButtonSubscription_if_unsubscription_failed.lua @@ -0,0 +1,295 @@ +--Test = require('connecttest') +--require('cardinalities') +--local events = require('events') +--local mobile_session = require('mobile_session') +--local mobile = require('mobile_connection') +--local tcp = require('tcp_connection') +--local file_connection = require('file_connection') +--local config = require('config') + + +--function Test:ActivationApp() + --local RequestId = self.hmiConnection:SendRequest("SDL.ActivateApp", { appID = self.applications["Test Application"]}) + + --EXPECT_HMIRESPONSE(RequestId) + --:Do(function(_,data) + --if + --data.result.isSDLAllowed ~= true then + --local RequestId = self.hmiConnection:SendRequest("SDL.GetUserFriendlyMessage", {language = "EN-US", messageCodes = {"DataConsent"}}) + + --EXPECT_HMIRESPONSE(RequestId,{result = {code = 0, method = "SDL.GetUserFriendlyMessage"}}) + -- :Do(function(_,data) + --hmi side: send request SDL.OnAllowSDLFunctionality + -- self.hmiConnection:SendNotification("SDL.OnAllowSDLFunctionality", {allowed = true, source = "GUI", device = {id = 1, name = "127.0.0.1"}}) + -- end) + + -- EXPECT_HMICALL("BasicCommunication.ActivateApp") + -- :Do(function(_,data) + -- self.hmiConnection:SendResponse(data.id,"BasicCommunication.ActivateApp", "SUCCESS", {}) + -- end) + --end + -- end) + + --EXPECT_NOTIFICATION("OnHMIStatus", {hmiLevel = "FULL"}) + +--end + + +local commonSteps = require('user_modules/shared_testcases/commonSteps') +local commonPreconditions = require('user_modules/shared_testcases/commonPreconditions') + +function DeleteLog_app_info_dat_policy() + commonSteps:CheckSDLPath() + local SDLStoragePath = config.pathToSDL .. "storage/" + + --Delete app_info.dat and log files and storage + if commonSteps:file_exists(config.pathToSDL .. "app_info.dat") == true then + os.remove(config.pathToSDL .. "app_info.dat") + end + + if commonSteps:file_exists(config.pathToSDL .. "SmartDeviceLinkCore.log") == true then + os.remove(config.pathToSDL .. "SmartDeviceLinkCore.log") + end + + if commonSteps:file_exists(SDLStoragePath .. "policy.sqlite") == true then + os.remove(SDLStoragePath .. "policy.sqlite") + end + + if commonSteps:file_exists(config.pathToSDL .. "policy.sqlite") == true then + os.remove(config.pathToSDL .. "policy.sqlite") + end + os.execute("rm -r " ..config.pathToSDL .. "storage") +end + +DeleteLog_app_info_dat_policy() + + +--UPDATED +function UpdateHMICapabilities() + commonPreconditions:BackupFile("hmi_capabilities.json") + + local src = config.pathToSDL .."hmi_capabilities.json" + local dest = "files/hmi_capabilities_SearchButton.json" + + local filecopy = "cp " .. dest .." " .. src + + os.execute(filecopy) +end + +UpdateHMICapabilities() + + +-------------------------------------------------------------------------------- +--Precondition: preparation connecttest_OnButton.lua +commonPreconditions:Connecttest_without_ExitBySDLDisconnect("connecttest_OnButton.lua") +commonPreconditions:Connecttest_OnButtonSubscription("connecttest_OnButton.lua") +--Precondition: preparation connecttest_OnButton.lua + f = assert(io.open('./user_modules/connecttest_OnButton.lua', "r")) + + fileContent = f:read("*all") + f:close() + + local pattern2 = "%{%s-capabilities%s-=%s-%{.-%}" + local pattern2Result = fileContent:match(pattern2) + + if pattern2Result == nil then + print(" \27[31m capabilities array is not found in /user_modules/connecttest_OnButton.lua \27[0m ") + else + fileContent = string.gsub(fileContent, pattern2, '{capabilities = {button_capability("PRESET_0"),button_capability("PRESET_1"),button_capability("PRESET_2"),button_capability("PRESET_3"),button_capability("PRESET_4"),button_capability("PRESET_5"),button_capability("PRESET_6"),button_capability("PRESET_7"),button_capability("PRESET_8"),button_capability("PRESET_9"),button_capability("OK", true, false, true),button_capability("SEEKLEFT"),button_capability("SEEKRIGHT"),button_capability("TUNEUP"),button_capability("TUNEDOWN"),button_capability("CUSTOM_BUTTON")}') + end + + f = assert(io.open('./user_modules/connecttest_OnButton.lua', "w+")) + f:write(fileContent) + f:close() + +Test = require('user_modules/connecttest_OnButton') +require('cardinalities') +local events = require('events') +local mobile_session = require('mobile_session') +local mobile = require('mobile_connection') +local tcp = require('tcp_connection') +local file_connection = require('file_connection') +local config = require('config') + +local iTimeout = 5000 +local buttonName = {"OK","SEEKLEFT","SEEKRIGHT","TUNEUP","TUNEDOWN", "PRESET_0","PRESET_1","PRESET_2","PRESET_3","PRESET_4","PRESET_5","PRESET_6","PRESET_7","PRESET_8"} +local buttonNameNonMediaApp = {"OK", "PRESET_0","PRESET_1","PRESET_2","PRESET_3","PRESET_4","PRESET_5","PRESET_6","PRESET_7","PRESET_8"} +local UnsupportButtonName = {"PRESET_9", "SEARCH"} + +config.deviceMAC = "12ca17b49af2289436f303e0166030a21e525d266e209267433801a8fd4071a0" +--ToDo: shall be removed when APPLINK-16610 is fixed +config.defaultProtocolVersion = 2 + +local str1000Chars = + "10123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyza b c aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa" + + +local info = {nil, "unused"} +local OutBound = {"a", "nonexistButton", str1000Chars} +local OutBoundName = {"OneCharacter", "nonexistButton", "String1000Characters"} + +local resultCode = {"SUCCESS", "INVALID_DATA", "OUT_OF_MEMORY", "TOO_MANY_PENDING_REQUESTS", "APPLICATION_NOT_REGISTERED", "REJECTED", "IGNORED", "GENERIC_ERROR", "UNSUPPORTED_RESOURCE", "DISALLOWED"} + +local success = {true, false, false, false, false, false, false, false, false, false} + +local appID0, appId1, appId2 + +-- Common functions + +function ActivateApplication(self, strAppName) + --HMI send ActivateApp request + + local RequestId = self.hmiConnection:SendRequest("SDL.ActivateApp", { appID = self.applications[strAppName]}) + EXPECT_HMIRESPONSE(RequestId) + :Do(function(_,data) + if data.result.isSDLAllowed ~= true then + local RequestId = self.hmiConnection:SendRequest("SDL.GetUserFriendlyMessage", {language = "EN-US", messageCodes = {"DataConsent"}}) + EXPECT_HMIRESPONSE(RequestId,{result = {code = 0, method = "SDL.GetUserFriendlyMessage"}}) + :Do(function(_,data) + --hmi side: send request SDL.OnAllowSDLFunctionality + self.hmiConnection:SendNotification("SDL.OnAllowSDLFunctionality", {allowed = true, source = "GUI", device = {id = config.deviceMAC, name = "127.0.0.1"}}) + + EXPECT_HMICALL("BasicCommunication.ActivateApp") + :Do(function(_,data) + self.hmiConnection:SendResponse(data.id,"BasicCommunication.ActivateApp", "SUCCESS", {}) + end) + :Times(2) + end) + end + end) + + EXPECT_NOTIFICATION("OnHMIStatus", {hmiLevel = "FULL", systemContext = "MAIN"}) + :Timeout(12000) + +end + +--------------------------------------------------------------------------------------------- +-------------------------------------------Preconditions------------------------------------- +--------------------------------------------------------------------------------------------- + --Begin Precondition.1 + -- Description: removing user_modules/connecttest_OnButton.lua + function Test:Remove_user_connecttest() + os.execute( "rm -f ./user_modules/connecttest_OnButton.lua" ) + end + --End Precondition.1 + + --Begin Precondition.2 + --Description: Activation App by sending SDL.ActivateApp + + function Test:Activate_Media_Application() + --HMI send ActivateApp request + ActivateApplication(self, config.application1.registerAppInterfaceParams.appName) + end + + --End Precondition.2 + + ----------------------------------------------------------------------------------------- + + +--UnsubscribeButton suit of tests is intended to check sending +--appropriate request with different conditions for parameter +--and receiving proper responses (CRQ APPLINK-11266)--> + + +-- Test suit 1 "Positive cases and in boundary conditions" + +-- This test is intended to check positive cases and when all parameters +-- are in boundary conditions + +-- 1.1 Positive case and in boundary conditions +function Test:UnsubscribeButton_INVALID_DATA() + --request from mobile side + local CorIdUnsubscribeButton = self.mobileSession:SendRPC("UnsubscribeButton", + { + buttonName = "PRESET_15" + }) + + --hmi side: request, response + EXPECT_HMINOTIFICATION("Buttons.OnButtonSubscription") + :Timeout(1000) + :Times(0) + + --response on mobile side + EXPECT_RESPONSE(CorIdUnsubscribeButton, { success = false, resultCode = "INVALID_DATA"}) + :Timeout(1000) +end + +function Test:UnsubscribeButton_UNSUPPORTED_RESOURCE() + --request from mobile side + local CorIdUnsubscribeButton = self.mobileSession:SendRPC("UnsubscribeButton", + { + buttonName = "SEARCH" + --buttonName = "PRESET_9" + }) + + --hmi side: request, response + EXPECT_HMINOTIFICATION("Buttons.OnButtonSubscription") + :Timeout(1000) + :Times(0) + + --response on mobile side + EXPECT_RESPONSE(CorIdUnsubscribeButton, { success = false, resultCode = "UNSUPPORTED_RESOURCE"}) + :Timeout(1000) +end + +--UPDATED +function Test:PreconditionSubscribeButton_IGNORED() + --request from mobile side + local CorIdSubscribeButton = self.mobileSession:SendRPC("SubscribeButton", + { + buttonName = "PRESET_1" + }) + + --hmi side: request, response + EXPECT_HMINOTIFICATION("Buttons.OnButtonSubscription") + :Timeout(1000) + :Times(1) + + --response on mobile side + EXPECT_RESPONSE(CorIdSubscribeButton, { success = true, resultCode = "SUCCESS"}) + :Timeout(1000) +end + +--UPDATED +function Test:PreconditionUnsubscribeButton_IGNORED() + --request from mobile side + local CorIdUnsubscribeButton = self.mobileSession:SendRPC("UnsubscribeButton", + { + buttonName = "PRESET_1" + }) + + --hmi side: request, response + EXPECT_HMINOTIFICATION("Buttons.OnButtonSubscription") + :Timeout(1000) + :Times(1) + + --response on mobile side + EXPECT_RESPONSE(CorIdUnsubscribeButton, { success = true, resultCode = "SUCCESS"}) + :Timeout(10000) +end + +function Test:UnsubscribeButton_IGNORED() + --request from mobile side + local CorIdUnsubscribeButton = self.mobileSession:SendRPC("UnsubscribeButton", + { + buttonName = "PRESET_1" + }) + + --hmi side: request, response + EXPECT_HMINOTIFICATION("Buttons.OnButtonSubscription") + :Timeout(1000) + :Times(0) + + --response on mobile side + EXPECT_RESPONSE(CorIdUnsubscribeButton, { success = false, resultCode = "IGNORED"}) + :Timeout(1000) +end + + +--------------------------------------------------------------------------------------------- +-------------------------------------------Postconditions------------------------------------- +--------------------------------------------------------------------------------------------- + +function Test:RemoveConfigurationFiles() + commonPreconditions:RestoreFile("hmi_capabilities.json") +end \ No newline at end of file diff --git a/test_scripts/API/ATF_OnAppDeactivated.lua b/test_scripts/API/ATF_OnAppDeactivated.lua new file mode 100644 index 0000000000..56ada95e03 --- /dev/null +++ b/test_scripts/API/ATF_OnAppDeactivated.lua @@ -0,0 +1,804 @@ +Test = require('connecttest') +require('cardinalities') +local events = require('events') +local mobile_session = require('mobile_session') +local mobile = require('mobile_connection') +local tcp = require('tcp_connection') +local file_connection = require('file_connection') + +local module = require('testbase') + +--------------------------------------------------------------------------------------------- +-----------------------------Required Shared Libraries--------------------------------------- +--------------------------------------------------------------------------------------------- +local commonFunctions = require('user_modules/shared_testcases/commonFunctions') +local commonSteps = require('user_modules/shared_testcases/commonSteps') +local commonTestCases = require('user_modules/shared_testcases/commonTestCases') +require('user_modules/AppTypes') +local policyTable = require('user_modules/shared_testcases/testCasesForPolicyTable') +local integerParameter = require('user_modules/shared_testcases/testCasesForIntegerParameter') +local stringParameterInResponse = require('user_modules/shared_testcases/testCasesForStringParameterInResponse') +local integerParameterInResponse = require('user_modules/shared_testcases/testCasesForIntegerParameterInResponse') +local arrayStringParameterInResponse = require('user_modules/shared_testcases/testCasesForArrayStringParameterInResponse') + +--------------------------------------------------------------------------------------------- +------------------------------------ Common Variables --------------------------------------- +--------------------------------------------------------------------------------------------- +APIName = "OnAppDeactivated" -- set request name + +--Debug = {"ecuName"} --use to print request before sending to SDL. +Debug = {} -- empty {}: script will do not print request on console screen. + + +--------------------------------------------------------------------------------------------- +-------------------------------------------Preconditions------------------------------------- +--------------------------------------------------------------------------------------------- + + --Print new line to separate Preconditions + commonFunctions:newTestCasesGroup("Preconditions") + + --Delete app_info.dat, logs and policy table + commonSteps:DeleteLogsFileAndPolicyTable() + + --1. Activate application + commonSteps:ActivationApp() + + --2. Update policy to allow request + policyTable:precondition_updatePolicy_AllowFunctionInHmiLeves({"BACKGROUND", "FULL", "LIMITED"}) + + +--------------------------------------------------------------------------------------------- +-----------------------------------------I TEST BLOCK---------------------------------------- +--CommonRequestCheck: Check of mandatory/conditional request's parameters (mobile protocol)-- +--------------------------------------------------------------------------------------------- + --Begin Test suit PositiveRequestCheck + + --Print new line to separate test suite + commonFunctions:newTestCasesGroup("Test Suite For mandatory/conditional request's parameters (mobile protocol)") + + --Description: TC's checks processing + -- request with all parameters + -- request with only mandatory parameters + -- request with all combinations of conditional-mandatory parameters (if exist) + -- request with one by one conditional parameters (each case - one conditional parameter) + -- request with missing mandatory parameters one by one (each case - missing one mandatory parameter) + -- request with all parameters are missing + -- request with fake parameters (fake - not from protocol, from another request) + -- request is sent with invalid JSON structure + -- different conditions of correlationID parameter (invalid, several the same etc.) + + --Begin Test case CommonRequestCheck.1 + --Description: This test is intended to check positive cases and when all parameters are in boundary conditions + + --Requirement id in JAMA: + + --Verification criteria: + -- All available reason + local reasonValue = {"AUDIO", "PHONECALL", "NAVIGATIONMAP", "PHONEMENU", "SYNCSETTINGS", "GENERAL"} + for i=1,#reasonValue do + Test["OnAppDeactivated_Reason_" .. reasonValue[i]] = function(self) + --hmi side: sending BasicCommunication.OnAppDeactivated request + self.hmiConnection:SendNotification("BasicCommunication.OnAppDeactivated", + { + appID = self.applications["Test Application"], + reason = reasonValue[i] + }) + + if reasonValue[i] == "AUDIO" or + reasonValue[i] == "PHONECALL" then + + --mobile side: expect OnHMIStatus notification + EXPECT_NOTIFICATION("OnHMIStatus",{hmiLevel = "BACKGROUND", audioStreamingState = "NOT_AUDIBLE", systemContext = "MAIN"}) + else + --mobile side: expect OnHMIStatus notification + EXPECT_NOTIFICATION("OnHMIStatus",{hmiLevel = hmiLevelValue, audioStreamingState = audibleState, systemContext = "MAIN"}) + end + end + + commonSteps:ActivationApp() + end + --End Test case CommonRequestCheck.1 + + ----------------------------------------------------------------------------------------- + + --Begin Test case CommonRequestCheck.2 + --Description: This test is intended to check request with mandatory and with or without conditional parameters + + -- Not Applicable + + --End Test case CommonRequestCheck.2 + + ----------------------------------------------------------------------------------------- + + --Begin Test case CommonRequestCheck.3 + --Description: This test is intended to check processing requests without mandatory parameters + function Test:OnAppDeactivated_WithoutMandatoryReason() + --hmi side: sending BasicCommunication.OnAppDeactivated request + self.hmiConnection:SendNotification("BasicCommunication.OnAppDeactivated", + { + appID = self.applications["Test Application"], + }) + + --mobile side: expect OnHMIStatus notification + EXPECT_NOTIFICATION("OnHMIStatus") + :Times(0) + end + + function Test:OnAppDeactivated_WithoutMandatoryAppID() + --hmi side: sending BasicCommunication.OnAppDeactivated request + self.hmiConnection:SendNotification("BasicCommunication.OnAppDeactivated", + { + reason = "GENERAL" + }) + + --mobile side: expect OnHMIStatus notification + EXPECT_NOTIFICATION("OnHMIStatus") + :Times(0) + end + --End Test case CommonRequestCheck.3 + + ----------------------------------------------------------------------------------------- + + --Begin Test case CommonRequestCheck.4 + --Description: Check processing request with different fake parameters + + --Requirement id in JAMA: + --APPLINK-14765 + --Verification criteria: + --SDL must cut off the fake parameters from requests, responses and notifications received from HMI + + --Begin Test case CommonRequestCheck.4.1 + --Description: Parameter not from protocol + function Test:OnAppDeactivated_FakeParam() + --hmi side: sending BasicCommunication.OnAppDeactivated request + self.hmiConnection:SendNotification("BasicCommunication.OnAppDeactivated", + { + appID = self.applications["Test Application"], + reason = "GENERAL", + fakeParam = "fakeParam" + }) + + --mobile side: expect OnHMIStatus notification + EXPECT_NOTIFICATION("OnHMIStatus",{hmiLevel = hmiLevelValue, audioStreamingState = audibleState, systemContext = "MAIN"}) + :ValidIf (function(_,data) + if data.payload.fakeParam ~= nil then + print(" \27[36m SDL resend fake parameter to mobile app \27[0m") + return false + else + return true + end + end) + end + + commonSteps:ActivationApp() + --Begin Test case CommonRequestCheck.4.1 + + ----------------------------------------------------------------------------------------- + + --Begin Test case CommonRequestCheck.4.2 + --Description: Parameters from another request + function Test:OnAppDeactivated_ParamsAnotherRequest() + --hmi side: sending BasicCommunication.OnAppDeactivated request + self.hmiConnection:SendNotification("BasicCommunication.OnAppDeactivated", + { + appID = self.applications["Test Application"], + reason = "GENERAL", + syncFileName = "a" + }) + + --mobile side: expect OnHMIStatus notification + EXPECT_NOTIFICATION("OnHMIStatus",{hmiLevel = hmiLevelValue, audioStreamingState = audibleState, systemContext = "MAIN"}) + :ValidIf (function(_,data) + if data.payload.syncFileName ~= nil then + print(" \27[36m SDL resend fake parameter to mobile app \27[0m") + return false + else + return true + end + end) + end + + commonSteps:ActivationApp() + --End Test case CommonRequestCheck.4.2 + --End Test case CommonRequestCheck.4 + + ----------------------------------------------------------------------------------------- + + --Begin Test case CommonRequestCheck.5 + --Description: Invalid JSON + + function Test:OnAppDeactivated_InvalidJsonSyntax() + --hmi side: send BasicCommunication.OnAppDeactivated + --":" is changed by ";" after "jsonrpc" + self.hmiConnection:Send('{"jsonrpc";"2.0","method":"BasicCommunication.OnAppDeactivated","params":{"appID":'..self.applications["Test Application"]..',"reason":"GENERAL"}}') + + --mobile side: expect OnHMIStatus notification + EXPECT_NOTIFICATION("OnHMIStatus") + :Times(0) + end + + function Test:OnAppDeactivated_InvalidStructure() + --hmi side: send BasicCommunication.OnAppDeactivated + self.hmiConnection:Send('{"jsonrpc":"2.0","params":{"method":"BasicCommunication.OnAppDeactivated", "appID":'..self.applications["Test Application"]..',"reason":"GENERAL"}}') + + --mobile side: expect OnHMIStatus notification + EXPECT_NOTIFICATION("OnHMIStatus") + :Times(0) + end + --End Test case CommonRequestCheck.5 + --End Test suit CommonRequestCheck + +--------------------------------------------------------------------------------------------- +----------------------------------------II TEST BLOCK---------------------------------------- +----------------------------------------Positive cases--------------------------------------- +--------------------------------------------------------------------------------------------- + + --=================================================================================-- + --------------------------------Positive request check------------------------------- + --=================================================================================-- + + --Begin Test suit PositiveRequestCheck + --Description: Check of each request parameter value in bound and boundary conditions + + -- Not Applicable + + --End Test suit PositiveRequestCheck + + --=================================================================================-- + --------------------------------Positive response check------------------------------ + --=================================================================================-- + --Begin Test suit PositiveResponseCheck + --Description: check of each response parameter value in bound and boundary conditions + + -- Not Applicable + + --End Test suit PositiveRequestCheck + + +---------------------------------------------------------------------------------------------- +----------------------------------------III TEST BLOCK---------------------------------------- +----------------------------------------Negative cases---------------------------------------- +---------------------------------------------------------------------------------------------- + + --=================================================================================-- + ---------------------------------Negative request check------------------------------ + --=================================================================================-- + + --------Checks----------- + -- outbound values + -- invalid values(empty, missing, non existent, duplicate, invalid characters) + -- parameters with wrong type + -- invalid json + + --Begin Test suit NegativeRequestCheck + --Description: check of each request parameter value out of bound, missing, with wrong type, empty, duplicate etc. + + --Begin Test case NegativeResponseCheck.1 + --Description: Request with nonexistent reason + function Test:OnAppDeactivated_NonexistentReason() + --hmi side: sending BasicCommunication.OnAppDeactivated request + self.hmiConnection:SendNotification("BasicCommunication.OnAppDeactivated", + { + appID = self.applications["Test Application"], + reason = "REASON" + }) + + --mobile side: expect OnHMIStatus notification + EXPECT_NOTIFICATION("OnHMIStatus") + :Times(0) + end + --End Test case NegativeRequestCheck.1 + + ----------------------------------------------------------------------------------------- + + --Begin Test case NegativeResponseCheck.2 + --Description: Request without method + function Test:OnAppDeactivated_WithoutMethod() + --hmi side: send BasicCommunication.OnAppDeactivated + self.hmiConnection:Send('{"jsonrpc":"2.0","params":{"appID":'..self.applications["Test Application"]..',"reason":"GENERAL"}}') + + --mobile side: expect OnHMIStatus notification + EXPECT_NOTIFICATION("OnHMIStatus") + :Times(0) + end + --End Test case NegativeRequestCheck.2 + + ----------------------------------------------------------------------------------------- + + --Begin Test case NegativeResponseCheck.3 + --Description: Request without params + function Test:OnAppDeactivated_WithoutParams() + --hmi side: send BasicCommunication.OnAppDeactivated + self.hmiConnection:Send('{"jsonrpc":"2.0","method":"BasicCommunication.OnAppDeactivated"}') + + --mobile side: expect OnHMIStatus notification + EXPECT_NOTIFICATION("OnHMIStatus") + :Times(0) + end + --End Test case NegativeRequestCheck.3 + + ----------------------------------------------------------------------------------------- + + --Begin Test case NegativeResponseCheck.4 + --Description: Request with reason is empty + function Test:OnAppDeactivated_ReasonEmpty() + --hmi side: send BasicCommunication.OnAppDeactivated + self.hmiConnection:Send('{"jsonrpc":"2.0","method":"BasicCommunication.OnAppDeactivated","params":{"appID":'..self.applications["Test Application"]..',"reason":""}}') + + --mobile side: expect OnAppDeactivated notification + EXPECT_NOTIFICATION("OnAppDeactivated") + :Times(0) + end + --End Test case NegativeRequestCheck.4 + --End Test suit NegativeRequestCheck + +---------------------------------------------------------------------------------------------- +----------------------------------------IV TEST BLOCK----------------------------------------- +---------------------------------------Result code check-------------------------------------- +---------------------------------------------------------------------------------------------- + +--Not Applicable + +---------------------------------------------------------------------------------------------- +-----------------------------------------V TEST BLOCK----------------------------------------- +---------------------------------------HMI negative cases------------------------------------- +---------------------------------------------------------------------------------------------- + +--Not Applicable + +---------------------------------------------------------------------------------------------- +-----------------------------------------VI TEST BLOCK---------------------------------------- +-------------------------Sequence with emulating of user's action(s)------------------------ +---------------------------------------------------------------------------------------------- + + + --Begin Test suit SequenceCheck + --Description: TC's checks SDL behaviour by processing + -- different request sequence with timeout + -- with emulating of user's actions + + --Begin Test case SequenceCheck.1 + --Description: Cover TC_OnAppDeactivated_01 + + --Requirement id in JAMA: + -- SDLAQ-TC-392 + + --Verification criteria: + -- Check changing HMI level of app from FULL to BACKGROUND if reason of + -- OnAppDeactivated is "AUDIO" (when user switches to one of media entertainment screen i.e FM, CD, AM ... e.t.c) + + -- Cover by CommonRequestCheck.1 + + --End Test case SequenceCheck.1 + + ----------------------------------------------------------------------------------------- + commonFunctions:newTestCasesGroup("Test case: TC_OnAppDeactivated_02") + --Begin Test case SequenceCheck.2 + --Description: Cover TC_OnAppDeactivated_02 + + --Requirement id in JAMA: + -- SDLAQ-TC-393 + + --Verification criteria: + -- Check changing HMI level of app from LIMITED to BACKGROUND if reason of + -- OnAppDeactivated is "AUDIO" (when user switches to one of media entertainment screen i.e FM, CD, AM ... e.t.c) + function Test:AddNewSession() + -- Connected expectation + self.mobileSession2 = mobile_session.MobileSession( + self, + self.mobileConnection) + + self.mobileSession2:StartService(7) + end + + function Test:RegisterAppInterface_MediaApp() + --mobile side: RegisterAppInterface request + local CorIdRAI = self.mobileSession2:SendRPC("RegisterAppInterface", + { + syncMsgVersion = + { + majorVersion = 2, + minorVersion = 2, + }, + appName ="MediaApp", + isMediaApplication = true, + languageDesired ="EN-US", + hmiDisplayLanguageDesired ="EN-US", + appID ="2", + ttsName = + { + { + text ="MediaApp", + type ="TEXT", + }, + }, + vrSynonyms = + { + "vrMediaApp", + } + }) + + --hmi side: expect BasicCommunication.OnAppRegistered request + EXPECT_HMINOTIFICATION("BasicCommunication.OnAppRegistered", + { + application = + { + appName = "MediaApp" + } + }) + :Do(function(_,data) + self.applications["MediaApp"] = data.params.application.appID + end) + + --mobile side: RegisterAppInterface response + self.mobileSession2:ExpectResponse(CorIdRAI, { success = true, resultCode = "SUCCESS"}) + :Timeout(2000) + + self.mobileSession2:ExpectNotification("OnHMIStatus", {hmiLevel = "NONE", audioStreamingState = "NOT_AUDIBLE", systemContext = "MAIN"}) + end + + function Test:Activate_MediaApp() + --hmi side: sending SDL.ActivateApp request + local RequestId = self.hmiConnection:SendRequest("SDL.ActivateApp", { appID = self.applications["MediaApp"]}) + + --hmi side: expect SDL.ActivateApp response + EXPECT_HMIRESPONSE(RequestId) + :Do(function(_,data) + --In case when app is not allowed, it is needed to allow app + if + data.result.isSDLAllowed ~= true then + + --hmi side: sending SDL.GetUserFriendlyMessage request + local RequestId = self.hmiConnection:SendRequest("SDL.GetUserFriendlyMessage", + {language = "EN-US", messageCodes = {"DataConsent"}}) + + --hmi side: expect SDL.GetUserFriendlyMessage response + EXPECT_HMIRESPONSE(RequestId,{result = {code = 0, method = "SDL.GetUserFriendlyMessage"}}) + :Do(function(_,data) + + --hmi side: send request SDL.OnAllowSDLFunctionality + self.hmiConnection:SendNotification("SDL.OnAllowSDLFunctionality", + {allowed = true, source = "GUI", device = {id = config.deviceMAC, name = "127.0.0.1"}}) + + --hmi side: expect BasicCommunication.ActivateApp request + EXPECT_HMICALL("BasicCommunication.ActivateApp") + :Do(function(_,data) + + --hmi side: sending BasicCommunication.ActivateApp response + self.hmiConnection:SendResponse(data.id,"BasicCommunication.ActivateApp", "SUCCESS", {}) + + end) + :Times(2) + end) + + end + end) + + self.mobileSession2:ExpectNotification("OnHMIStatus", {hmiLevel = "FULL", audioStreamingState = "AUDIBLE", systemContext = "MAIN"}) + :Timeout(12000) + end + + function Test:OnAppDeactivated_PressIButton() + --hmi side: sending BasicCommunication.OnAppDeactivated request + self.hmiConnection:SendNotification("BasicCommunication.OnAppDeactivated", + { + appID = self.applications["MediaApp"], + reason = "GENERAL" + }) + + --mobile side: expect OnHMIStatus notification + self.mobileSession2:ExpectNotification("OnHMIStatus",{hmiLevel = "LIMITED", audioStreamingState = "AUDIBLE", systemContext = "MAIN"}) + end + + function Test:OnAppDeactivated_GoToCD() + --hmi side: sending BasicCommunication.OnAppDeactivated request + self.hmiConnection:SendNotification("BasicCommunication.OnAppDeactivated", + { + appID = self.applications["MediaApp"], + reason = "AUDIO" + }) + + --mobile side: expect OnHMIStatus notification + self.mobileSession2:ExpectNotification("OnHMIStatus",{hmiLevel = "BACKGROUND", audioStreamingState = "NOT_AUDIBLE", systemContext = "MAIN"}) + end + --End Test case SequenceCheck.2 + + ----------------------------------------------------------------------------------------- + commonFunctions:newTestCasesGroup("Test case: TC_OnAppDeactivated_03") + --Begin Test case SequenceCheck.3 + --Description: Cover TC_OnAppDeactivated_03 + + --Requirement id in JAMA: + -- SDLAQ-TC-394 + + --Verification criteria: + -- Check changing HMI levels of apps from LIMITED and FULL to BACKGROUND if reason of + -- OnAppDeactivated is "AUDIO" (when user switches to one of media entertainment screen i.e FM, CD, AM ... e.t.c) + function Test:AddNewSession() + -- Connected expectation + self.mobileSession3 = mobile_session.MobileSession( + self, + self.mobileConnection) + + self.mobileSession3:StartService(7) + end + + function Test:RegisterAppInterface_NonMediaApp() + --mobile side: RegisterAppInterface request + local CorIdRAI = self.mobileSession3:SendRPC("RegisterAppInterface", + { + syncMsgVersion = + { + majorVersion = 2, + minorVersion = 2, + }, + appName ="NonMediaApp", + isMediaApplication = false, + languageDesired ="EN-US", + hmiDisplayLanguageDesired ="EN-US", + appID ="3", + ttsName = + { + { + text ="NonMediaApp", + type ="TEXT", + }, + }, + vrSynonyms = + { + "vrNonMediaApp", + } + }) + + --hmi side: expect BasicCommunication.OnAppRegistered request + EXPECT_HMINOTIFICATION("BasicCommunication.OnAppRegistered", + { + application = + { + appName = "NonMediaApp" + } + }) + :Do(function(_,data) + self.applications["NonMediaApp"] = data.params.application.appID + end) + + --mobile side: RegisterAppInterface response + self.mobileSession3:ExpectResponse(CorIdRAI, { success = true, resultCode = "SUCCESS"}) + :Timeout(2000) + + self.mobileSession3:ExpectNotification("OnHMIStatus", {hmiLevel = "NONE", audioStreamingState = "NOT_AUDIBLE", systemContext = "MAIN"}) + end + + function Test:Activate_MediaApp() + --hmi side: sending SDL.ActivateApp request + local RequestId = self.hmiConnection:SendRequest("SDL.ActivateApp", { appID = self.applications["MediaApp"]}) + + --hmi side: expect SDL.ActivateApp response + EXPECT_HMIRESPONSE(RequestId) + :Do(function(_,data) + --In case when app is not allowed, it is needed to allow app + if + data.result.isSDLAllowed ~= true then + + --hmi side: sending SDL.GetUserFriendlyMessage request + local RequestId = self.hmiConnection:SendRequest("SDL.GetUserFriendlyMessage", + {language = "EN-US", messageCodes = {"DataConsent"}}) + + --hmi side: expect SDL.GetUserFriendlyMessage response + EXPECT_HMIRESPONSE(RequestId,{result = {code = 0, method = "SDL.GetUserFriendlyMessage"}}) + :Do(function(_,data) + + --hmi side: send request SDL.OnAllowSDLFunctionality + self.hmiConnection:SendNotification("SDL.OnAllowSDLFunctionality", + {allowed = true, source = "GUI", device = {id = config.deviceMAC, name = "127.0.0.1"}}) + + --hmi side: expect BasicCommunication.ActivateApp request + EXPECT_HMICALL("BasicCommunication.ActivateApp") + :Do(function(_,data) + + --hmi side: sending BasicCommunication.ActivateApp response + self.hmiConnection:SendResponse(data.id,"BasicCommunication.ActivateApp", "SUCCESS", {}) + + end) + :Times(2) + end) + + end + end) + + self.mobileSession2:ExpectNotification("OnHMIStatus", {hmiLevel = "FULL", audioStreamingState = "AUDIBLE", systemContext = "MAIN"}) + :Timeout(12000) + end + + function Test:OnAppDeactivated_PressIButton() + --hmi side: sending BasicCommunication.OnAppDeactivated request + self.hmiConnection:SendNotification("BasicCommunication.OnAppDeactivated", + { + appID = self.applications["MediaApp"], + reason = "GENERAL" + }) + + --mobile side: expect OnHMIStatus notification + self.mobileSession2:ExpectNotification("OnHMIStatus",{hmiLevel = "LIMITED", audioStreamingState = "AUDIBLE", systemContext = "MAIN"}) + end + + function Test:Activate_NonMediaApp() + --hmi side: sending SDL.ActivateApp request + local RequestId = self.hmiConnection:SendRequest("SDL.ActivateApp", { appID = self.applications["NonMediaApp"]}) + + --hmi side: expect SDL.ActivateApp response + EXPECT_HMIRESPONSE(RequestId) + :Do(function(_,data) + --In case when app is not allowed, it is needed to allow app + if + data.result.isSDLAllowed ~= true then + + --hmi side: sending SDL.GetUserFriendlyMessage request + local RequestId = self.hmiConnection:SendRequest("SDL.GetUserFriendlyMessage", + {language = "EN-US", messageCodes = {"DataConsent"}}) + + --hmi side: expect SDL.GetUserFriendlyMessage response + EXPECT_HMIRESPONSE(RequestId,{result = {code = 0, method = "SDL.GetUserFriendlyMessage"}}) + :Do(function(_,data) + + --hmi side: send request SDL.OnAllowSDLFunctionality + self.hmiConnection:SendNotification("SDL.OnAllowSDLFunctionality", + {allowed = true, source = "GUI", device = {id = config.deviceMAC, name = "127.0.0.1"}}) + + --hmi side: expect BasicCommunication.ActivateApp request + EXPECT_HMICALL("BasicCommunication.ActivateApp") + :Do(function(_,data) + + --hmi side: sending BasicCommunication.ActivateApp response + self.hmiConnection:SendResponse(data.id,"BasicCommunication.ActivateApp", "SUCCESS", {}) + + end) + :Times(2) + end) + + end + end) + + self.mobileSession3:ExpectNotification("OnHMIStatus", {hmiLevel = "FULL", audioStreamingState = "AUDIBLE", systemContext = "MAIN"}) + :Timeout(12000) + end + + function Test:OnAppDeactivated_GoToCD() + --hmi side: sending BasicCommunication.OnAppDeactivated request + self.hmiConnection:SendNotification("BasicCommunication.OnAppDeactivated", + { + appID = self.applications["NonMediaApp"], + reason = "AUDIO" + }) + + --mobile side: expect OnHMIStatus notification + self.mobileSession3:ExpectNotification("OnHMIStatus",{hmiLevel = "BACKGROUND", audioStreamingState = "NOT_AUDIBLE", systemContext = "MAIN"}) + self.mobileSession2:ExpectNotification("OnHMIStatus",{hmiLevel = "BACKGROUND", audioStreamingState = "NOT_AUDIBLE", systemContext = "MAIN"}) + end + --End Test case SequenceCheck.3 + --End Test suit SequenceCheck + +---------------------------------------------------------------------------------------------- +-----------------------------------------TEST BLOCK VII--------------------------------------- +--------------------------------------Different HMIStatus------------------------------------- +---------------------------------------------------------------------------------------------- + +--Description: processing of request/response in different HMIlevels, SystemContext, AudioStreamingState + + --Begin Test suit DifferentHMIlevel + --Description: processing API in different HMILevel + commonFunctions:newTestCasesGroup("Test case: Check OnAppDeactivated notification in different HMILevel") + --Begin Test case DifferentHMIlevel.1 + --Description: Check OnAppDeactivated notification when HMI level is NONE + + --Requirement id in JAMA: + + --Verification criteria: + -- There is no notification send to mobile app + + commonSteps:DeactivateAppToNoneHmiLevel() + + for i=1,#reasonValue do + Test["OnAppDeactivated_NONE_Reason_" .. reasonValue[i]] = function(self) + --hmi side: sending BasicCommunication.OnAppDeactivated request + self.hmiConnection:SendNotification("BasicCommunication.OnAppDeactivated", + { + appID = self.applications["Test Application"], + reason = reasonValue[i] + }) + + EXPECT_NOTIFICATION("OnHMIStatus") + :Times(0) + end + end + + --Postcondition: Activate app + commonSteps:ActivationApp() + --End Test case DifferentHMIlevel.1 + + ----------------------------------------------------------------------------------------- + + --Begin Test case DifferentHMIlevelChecks.2 + --Description: Check OnAppDeactivated notification when HMI level is LIMITED + if commonFunctions:isMediaApp() then + + -- Precondition 3: Activate an other media app to change app to BACKGROUND + function Test:Activate_MediaApp() + --hmi side: sending SDL.ActivateApp request + local RequestId = self.hmiConnection:SendRequest("SDL.ActivateApp", { appID = self.applications["MediaApp"]}) + + --hmi side: expect SDL.ActivateApp response + EXPECT_HMIRESPONSE(RequestId) + :Do(function(_,data) + --In case when app is not allowed, it is needed to allow app + if + data.result.isSDLAllowed ~= true then + + --hmi side: sending SDL.GetUserFriendlyMessage request + local RequestId = self.hmiConnection:SendRequest("SDL.GetUserFriendlyMessage", + {language = "EN-US", messageCodes = {"DataConsent"}}) + + --hmi side: expect SDL.GetUserFriendlyMessage response + EXPECT_HMIRESPONSE(RequestId,{result = {code = 0, method = "SDL.GetUserFriendlyMessage"}}) + :Do(function(_,data) + + --hmi side: send request SDL.OnAllowSDLFunctionality + self.hmiConnection:SendNotification("SDL.OnAllowSDLFunctionality", + {allowed = true, source = "GUI", device = {id = config.deviceMAC, name = "127.0.0.1"}}) + + --hmi side: expect BasicCommunication.ActivateApp request + EXPECT_HMICALL("BasicCommunication.ActivateApp") + :Do(function(_,data) + + --hmi side: sending BasicCommunication.ActivateApp response + self.hmiConnection:SendResponse(data.id,"BasicCommunication.ActivateApp", "SUCCESS", {}) + + end) + :Times(2) + end) + + end + end) + + self.mobileSession2:ExpectNotification("OnHMIStatus", {hmiLevel = "FULL", audioStreamingState = "AUDIBLE", systemContext = "MAIN"}) + self.mobileSession:ExpectNotification("OnHMIStatus", {hmiLevel = "BACKGROUND", audioStreamingState = "NOT_AUDIBLE", systemContext = "MAIN"}) + end + else + --Precondition: Deactivate app to BACKGOUND HMI level + commonSteps:DeactivateToBackground() + end + ----------------------------------------------------------------------------------------- +--TODO: Need to be update according to APPLINK-17253 + --Begin Test case DifferentHMIlevelChecks.3 + --Description: Check OnAppDeactivated notification when HMI level is BACKGOUND + for i=1,#reasonValue do + Test["OnAppDeactivated_BACKGROUND_Reason_" .. reasonValue[i]] = function(self) + --hmi side: sending BasicCommunication.OnAppDeactivated request + self.hmiConnection:SendNotification("BasicCommunication.OnAppDeactivated", + { + appID = self.applications["Test Application"], + reason = reasonValue[i] + }) + + EXPECT_NOTIFICATION("OnHMIStatus") + :Times(0) + end + end + --End Test case DifferentHMIlevelChecks.3 + --End Test suit DifferentHMIlevel + + +--------------------------------------------------------------------------------------------- +-------------------------------------------Postcondition------------------------------------- +--------------------------------------------------------------------------------------------- + + --Print new line to separate Postconditions + commonFunctions:newTestCasesGroup("Postconditions") + + + --Restore sdl_preloaded_pt.json + policyTable:Restore_preloaded_pt() + + + + return Test diff --git a/test_scripts/API/ATF_OnAppInterfaceUnregister_PROTOCOL_VIOLATION.lua b/test_scripts/API/ATF_OnAppInterfaceUnregister_PROTOCOL_VIOLATION.lua new file mode 100644 index 0000000000..f57f7e6173 --- /dev/null +++ b/test_scripts/API/ATF_OnAppInterfaceUnregister_PROTOCOL_VIOLATION.lua @@ -0,0 +1,338 @@ +--NOTE:session:ExpectNotification("notification_name", { argument_to_check }) is chanegd to session:ExpectNotification("notification_name", {{ argument_to_check }}) due to defect APPLINK-17030 +--After this defect is done, please reverse to session:ExpectNotification("notification_name", { argument_to_check }) +-------------------------------------------------------------------------------------------- + +-------------------------------------------------------------------------------- +-- Preconditions +-------------------------------------------------------------------------------- +local commonPreconditions = require('user_modules/shared_testcases/commonPreconditions') + +-------------------------------------------------------------------------------- +--Precondition: preparation connecttest_OnAppInterfaceUnregister.lua +commonPreconditions:Connecttest_without_ExitBySDLDisconnect("connecttest_OnAppInterfaceUnregister.lua") + +--ToDo: shall be removed when APPLINK-16610 is fixed +config.defaultProtocolVersion = 2 + +-------------------------------------------------------------------------------- +-------------------------------------------------------------------------------- + +Test = require('user_modules/connecttest_OnAppInterfaceUnregister') +local mobile_session = require('mobile_session') +local mobile = require("mobile_connection") +local tcp = require("tcp_connection") +local file_connection = require("file_connection") +require('cardinalities') +local events = require('events') + +--------------------------------------------------------------------------------------------- +-----------------------------Required Shared Libraries--------------------------------------- +--------------------------------------------------------------------------------------------- +local commonFunctions = require('user_modules/shared_testcases/commonFunctions') +local commonSteps = require('user_modules/shared_testcases/commonSteps') +local commonTestCases = require('user_modules/shared_testcases/commonTestCases') +require('user_modules/AppTypes') + +--------------------------------------------------------------------------------------------- +------------------------------------ Common Functions --------------------------------------- +--------------------------------------------------------------------------------------------- +local function startSession(self) + + self.mobileSession= mobile_session.MobileSession(self, self.mobileConnection) + --start session + self.mobileSession:StartService(7) + +end + +local function StopSDL_StartSDL_InitHMI_ConnectMobile(TestCaseSubfix) + --Postconditions: Stop SDL, start SDL again, start HMI, connect to SDL, start mobile, start new session. + + Test["StopSDL_" .. TestCaseSubfix] = function(self) + StopSDL() + end + + Test["StartSDL_" .. TestCaseSubfix] = function(self) + StartSDL(config.pathToSDL, config.ExitOnCrash) + end + + Test["InitHMI_" .. TestCaseSubfix] = function(self) + self:initHMI() + end + + Test["InitHMI_onReady_" .. TestCaseSubfix] = function(self) + self:initHMI_onReady() + end + + + Test["ConnectMobile_" .. TestCaseSubfix] = function(self) + self:connectMobile() + end + + Test["StartSession_" .. TestCaseSubfix] = function(self) + startSession(self) + end + +end + +function Test:change_App_Params(appType,isMedia) + config.application1.registerAppInterfaceParams.appHMIType = appType + config.application1.registerAppInterfaceParams.isMediaApplication=isMedia +end +------------------------------------------------------------------------------------ +-------------------------------------------Preconditions------------------------------------- +--------------------------------------------------------------------------------------------- + + --Print new line to separate new test cases group + commonFunctions:newTestCasesGroup("Preconditions") + + -- Precondition: removing user_modules/connecttest_OnAppInterfaceUnregister.lua + function Test:Precondition_remove_user_connecttest() + os.execute( "rm -f ./user_modules/connecttest_OnAppInterfaceUnregister.lua" ) + end + + --Delete Policy and Log Files + commonSteps:DeleteLogsFileAndPolicyTable() + commonSteps:UnregisterApplication("Precondition_Unregister") + StopSDL_StartSDL_InitHMI_ConnectMobile("Precondition_StopSDL_StartHMI") +--------------------------------------------------------------------------------------------------------- +-- Requirement Id: https://adc.luxoft.com/svn/APPLINK/doc/technical/requirements/Mobile_Nav/multiple_navi_apps +---------------------------------------------------------------------------------------------------------- + +commonFunctions:newTestCasesGroup("OnAppInterfaceUnregistered(PROTOCOL_VIOLATION) when app continues streaming data at Background") + +local function Unregister_PROTOCOL_VIOLATION_StreamingData_AtBackGround() + + function Test:Case1_Change_App1_To_Navigation() + self:change_App_Params({"NAVIGATION"},false) + end + + commonSteps:RegisterAppInterface("Case1_RegisterApp") + commonSteps:ActivationApp(_,"Case1_ActivateApp") + + function Test:AddNewSession() + self.mobileSession1 = mobile_session.MobileSession( + self, + self.mobileConnection) + self.mobileSession1:StartService(7) + end + + function Test:Case1_RegisterSecondNavigationApp() + + config.application2.registerAppInterfaceParams.appHMIType = {"NAVIGATION"} + config.application2.registerAppInterfaceParams.isMediaApplication=true + + --mobile side: sending request + local CorIdRegister = self.mobileSession1:SendRPC("RegisterAppInterface", config.application2.registerAppInterfaceParams) + + --hmi side: expect BasicCommunication.OnAppRegistered request + EXPECT_HMINOTIFICATION("BasicCommunication.OnAppRegistered", + { + application = + { + appName = config.application2.registerAppInterfaceParams.appName + } + }) + :Do(function(_,data) + self.applications[config.application2.registerAppInterfaceParams.appName] = data.params.application.appID + end) + + --mobile side: expect response + self.mobileSession1:ExpectResponse(CorIdRegister, + { + syncMsgVersion = config.syncMsgVersion + }) + :Timeout(2000) + + --mobile side: expect notification + self.mobileSession1:ExpectNotification("OnHMIStatus", {{systemContext = "MAIN", hmiLevel = "NONE", audioStreamingState = "NOT_AUDIBLE"}}) + :Timeout(2000) + end + + function Test:StartAudioVideoServices_VideoStreaming() + + self.mobileSession:StartService(10) + + EXPECT_HMICALL("Navigation.StartAudioStream") + :Do(function(exp,data) + self.hmiConnection:SendResponse(data.id, data.method, "SUCCESS", { }) + end) + + self.mobileSession:StartService(11) + + EXPECT_HMICALL("Navigation.StartStream") + :Do(function(_,data) + self.hmiConnection:SendResponse(data.id, data.method, "SUCCESS", { }) + function to_run1() + self.mobileSession:StartStreaming(11,"files/Wildlife.wmv") + end + + RUN_AFTER(to_run1, 1500) + end) + end + + function Test:Activate_Second_NavigationApp_Then_Continues_Streaming() + + local rid = self.hmiConnection:SendRequest("SDL.ActivateApp", { appID = self.applications[config.application2.registerAppInterfaceParams.appName]}) + + EXPECT_HMIRESPONSE(rid) + :Do(function(_,data) + if data.result.code ~= 0 then + quit() + end + + function to_run2() + self.mobileSession:StartStreaming(11,"files/Wildlife1.wmv") + end + --continue streaming data after 1 second + RUN_AFTER(to_run2, 1000) + end) + + self.mobileSession:ExpectNotification("OnHMIStatus",{{hmiLevel = "BACKGROUND", audioStreamingState = "NOT_AUDIBLE", systemContext = "MAIN"}}) + self.mobileSession1:ExpectNotification("OnHMIStatus",{{hmiLevel = "FULL", audioStreamingState = "AUDIBLE", systemContext = "MAIN"}}) + + --hmi side: expect BasicCommunication.OnAppUnregistered + EXPECT_HMINOTIFICATION("BasicCommunication.OnAppUnregistered", {appID = self.applications[config.application1.registerAppInterfaceParams.appName], unexpectedDisconnect = false}) + + --mobile side: expect notification + self.mobileSession:ExpectNotification("OnAppInterfaceUnregistered", {{reason = "PROTOCOL_VIOLATION"}}) + end + +end + +Unregister_PROTOCOL_VIOLATION_StreamingData_AtBackGround() + +function Test:StopStreamAtBackGround() + self.mobileSession:StopStreaming("files/Wildlife.wmv") + self.mobileSession:StopStreaming("files/Wildlife1.wmv") +end + +StopSDL_StartSDL_InitHMI_ConnectMobile("Unregister_PROTOCOL_VIOLATION_StreamingData_AtBackGround") +--------------------------------------------------------------------------------------------------------------- + +commonFunctions:newTestCasesGroup("OnAppInterfaceUnregistered(PROTOCOL_VIOLATION) when NoACKResponse_ForEndServive") + +local function Unregister_PROTOCOL_VIOLATION_NoACKResponse_ForEndServive() + + function Test:Change_App1_To_Navigation() + self:change_App_Params({"NAVIGATION"},false) + end + + commonSteps:RegisterAppInterface("Case2_RegisterApp") + commonSteps:ActivationApp(_,"Case2_ActivateApp") + + function Test:StartAudioVideoServices() + + self.mobileSession:StartService(10) + + EXPECT_HMICALL("Navigation.StartAudioStream") + :Do(function(exp,data) + self.hmiConnection:SendResponse(data.id, data.method, "SUCCESS", { }) + end) + + self.mobileSession:StartService(11) + + EXPECT_HMICALL("Navigation.StartStream") + :Do(function(_,data) + self.hmiConnection:SendResponse(data.id, data.method, "SUCCESS", { }) + end) + end + + function Test:ExitApplication() + + --hmi side: send OnExitApplication + self.hmiConnection:SendNotification("BasicCommunication.OnExitApplication", {reason = "USER_EXIT", appID = self.applications[config.application1.registerAppInterfaceParams.appName]}) + + --mobile side: expected OnHMIStatus (NONE, NOT_AUDIBLE) notification + --self.mobileSession:ExpectNotification("OnHMIStatus", {{systemContext = "MAIN", hmiLevel = "NONE", audioStreamingState = "NOT_AUDIBLE"}}) + + -- Event: EndService from SDL for audion and video services + local event = events.Event() + event.matches = function(_, data) + return data.frameType == 0 and + (data.serviceType == 11 or data.serviceType == 10) and + data.sessionId == self.mobileSession.sessionId and + (data.frameInfo == 4) --EndService + end + self.mobileSession:ExpectEvent(event, "EndService") + :Timeout(60000) + :Times(2) + :ValidIf(function(s, data) + if data.frameInfo == 4 and data.serviceType == 11 + then + --Mobile side: mobile send EndVideoService ACK to SDL + self.mobileSession:Send( + { + frameType = 0, + serviceType = 11, + frameInfo = 5, + sessionId = self.mobileSession.sessionId, + }) + return true + + elseif data.frameInfo == 4 and data.serviceType == 10 + then + + print("Mobile doesn't send EndAudioService ACK to SDL") + + return true + + else return false, "End Service not received" end + end) + + --TODO: Uncomment below script after defect APPLINK-13680 is done + + -- EXPECT_HMICALL("Navigation.StopAudioStream") + -- :Do(function(_,data) + -- -- successful StopAudioStream on HMI side + -- self.hmiConnection:SendResponse(data.id,"Navigation.StopAudioStream", "SUCCESS", {}) + -- end) + + EXPECT_HMICALL("Navigation.StopStream") + :Do(function(_,data) + -- successful StopStream on HMI side + self.hmiConnection:SendResponse(data.id,"Navigation.StopStream", "SUCCESS", {}) + end) + + --hmi side: expect BasicCommunication.OnAppUnregistered + EXPECT_HMINOTIFICATION("BasicCommunication.OnAppUnregistered", {appID = self.applications[config.application1.registerAppInterfaceParams.appName], unexpectedDisconnect = false}) + + --mobile side: expect notification + self.mobileSession:ExpectNotification("OnAppInterfaceUnregistered", {{reason = "PROTOCOL_VIOLATION"}}) + end +end + +Unregister_PROTOCOL_VIOLATION_NoACKResponse_ForEndServive() +------------------------------------------------------------------------------------------------------------------ + +--NOTE: This TC can run correctly till APPLINK-14456 is implemeted +commonFunctions:newTestCasesGroup("OnAppInterfaceUnregistered(reason:PROTOCOL_VIOLATION) when received more than 2 malformed message in 1 second ") + +local function Unregister_PROTOCOL_VIOLATION_MalformMessage() + + commonSteps:RegisterAppInterface("CaseMalformMessage_RegisterApp") + commonSteps:ActivationApp(_,"CaseMalformMessage_ActiveApp") + + function Test:SendMalformMessage() + + for i =1, 3 do + self.mobileSession:Send( + { + version =05, + frameType = 03, + dataSize = 05, + messageId = 00, + serviceType = 07, + frameInfo = 5, + sessionId = self.mobileSession.sessionId, + }) + end + + --hmi side: expect BasicCommunication.OnAppUnregistered + EXPECT_HMINOTIFICATION("BasicCommunication.OnAppUnregistered", {appID = self.applications[config.application1.registerAppInterfaceParams.appName], unexpectedDisconnect = false}) + + --mobile side: expect notification + self.mobileSession:ExpectNotification("OnAppInterfaceUnregistered", {{reason = "PROTOCOL_VIOLATION"}}) + end + +end +--Unregister_PROTOCOL_VIOLATION_MalformMessage() diff --git a/test_scripts/API/ATF_OnAppInterfaceUnregistered.lua b/test_scripts/API/ATF_OnAppInterfaceUnregistered.lua new file mode 100644 index 0000000000..dab62cabec --- /dev/null +++ b/test_scripts/API/ATF_OnAppInterfaceUnregistered.lua @@ -0,0 +1,1777 @@ +--NOTE:session:ExpectNotification("notification_name", { argument_to_check }) is chanegd to session:ExpectNotification("notification_name", {{ argument_to_check }}) due to defect APPLINK-17030 +--After this defect is done, please reverse to session:ExpectNotification("notification_name", { argument_to_check }) +------------------------------------------------------------------------------------------- + +-------------------------------------------------------------------------------- +-- Preconditions +-------------------------------------------------------------------------------- +local commonPreconditions = require('user_modules/shared_testcases/commonPreconditions') + +-------------------------------------------------------------------------------- +--Precondition: preparation connecttest_OnAppInterfaceUnregistered.lua +commonPreconditions:Connecttest_without_ExitBySDLDisconnect("connecttest_OnAppInterfaceUnregistered.lua") + +-------------------------------------------------------------------------------- +-------------------------------------------------------------------------------- + +Test = require('user_modules/connecttest_OnAppInterfaceUnregistered') +local mobile_session = require('mobile_session') +local mobile = require("mobile_connection") +local tcp = require("tcp_connection") +local file_connection = require("file_connection") +require('cardinalities') +local events = require('events') + +config.deviceMAC = "12ca17b49af2289436f303e0166030a21e525d266e209267433801a8fd4071a0" + +--------------------------------------------------------------------------------------------- +-----------------------------Required Shared Libraries--------------------------------------- +--------------------------------------------------------------------------------------------- +local commonFunctions = require('user_modules/shared_testcases/commonFunctions') +local commonSteps = require('user_modules/shared_testcases/commonSteps') +local commonTestCases = require('user_modules/shared_testcases/commonTestCases') +require('user_modules/AppTypes') +local testCasesForPolicyTable = require('user_modules/shared_testcases/testCasesForPolicyTable') +--------------------------------------------------------------------------------------------- +------------------------------------ Common Functions --------------------------------------- +--------------------------------------------------------------------------------------------- +local function startSession(self) + + self.mobileSession= mobile_session.MobileSession(self, self.mobileConnection) + --start session + self.mobileSession:StartService(7) + +end + +local function StopSDL_StartSDL_InitHMI_ConnectMobile(TestCaseSubfix) + --Postconditions: Stop SDL, start SDL again, start HMI, connect to SDL, start mobile, start new session. + + Test["StopSDL_" .. TestCaseSubfix] = function(self) + StopSDL() + end + + Test["StartSDL_" .. TestCaseSubfix] = function(self) + StartSDL(config.pathToSDL, config.ExitOnCrash) + end + + Test["InitHMI_" .. TestCaseSubfix] = function(self) + self:initHMI() + end + + Test["InitHMI_onReady_" .. TestCaseSubfix] = function(self) + self:initHMI_onReady() + end + + + Test["ConnectMobile_" .. TestCaseSubfix] = function(self) + self:connectMobile() + end + + Test["StartSession_" .. TestCaseSubfix] = function(self) + --self:startSession_WithoutRegisterApp() + startSession(self) + end + +end + +function Test: onAppInterfaceUnregistered(reason,case) + --hmi side: sending BasicCommunication.OnSystemRequest request to SDL + self.hmiConnection:SendNotification("BasicCommunication.OnExitAllApplications", {reason = reason}) + + if case==nil then + --hmi side: expect BasicCommunication.OnAppUnregistered + EXPECT_HMINOTIFICATION("BasicCommunication.OnAppUnregistered", {appID = self.applications[config.application1.registerAppInterfaceParams.appName], unexpectedDisconnect = false}) + --mobile side: expect notification + self.mobileSession:ExpectNotification("OnAppInterfaceUnregistered", {{reason = reason}}) + end + if case==4 then + + --hmi side: expect BasicCommunication.OnAppUnregistered + EXPECT_HMINOTIFICATION("BasicCommunication.OnAppUnregistered", + {appID = self.applications[config.application1.registerAppInterfaceParams.appName], unexpectedDisconnect = false}, + {appID = self.applications[config.application2.registerAppInterfaceParams.appName], unexpectedDisconnect = false}, + {appID = self.applications[config.application3.registerAppInterfaceParams.appName], unexpectedDisconnect = false}, + {appID = self.applications[config.application4.registerAppInterfaceParams.appName], unexpectedDisconnect = false} + ) + + :Times(4) + + self.mobileSession:ExpectNotification("OnAppInterfaceUnregistered", {{reason = reason}}) + self.mobileSession1:ExpectNotification("OnAppInterfaceUnregistered", {{reason = reason}}) + self.mobileSession2:ExpectNotification("OnAppInterfaceUnregistered", {{reason = reason}}) + self.mobileSession3:ExpectNotification("OnAppInterfaceUnregistered", {{reason = reason}}) + end + --hmi side: expect to BasicCommunication.OnSDLClose + EXPECT_HMINOTIFICATION("BasicCommunication.OnSDLClose",{}) +end + +function Test:add_Sessions() + + self.mobileSession1 = mobile_session.MobileSession( + self, + self.mobileConnection) + self.mobileSession1:StartService(7) + + self.mobileSession2 = mobile_session.MobileSession( + self, + self.mobileConnection) + self.mobileSession2:StartService(7) + + self.mobileSession3 = mobile_session.MobileSession( + self, + self.mobileConnection) + self.mobileSession3:StartService(7) +end + +function Test:exitAppBy_DRIVER_DISTRACTION_VIOLATION(isExit) + + --HMI sends BasicCommunication.OnExitApplication("DRIVER_DISTRACTION_VIOLATION") + self.hmiConnection:SendNotification("BasicCommunication.OnExitApplication", {reason = "DRIVER_DISTRACTION_VIOLATION", appID=self.applications[config.application1.registerAppInterfaceParams.appName]}) + if isExit==true then + self.hmiConnection:SendNotification("BasicCommunication.OnAppDeactivated", {appID=self.applications[config.application1.registerAppInterfaceParams.appName]}) + + --mobile side: Expected OnHMIStatus() notification + EXPECT_NOTIFICATION("OnHMIStatus",{ systemContext = "MAIN", hmiLevel = "NONE", audioStreamingState = "NOT_AUDIBLE" }) + end + + --mobile side: expect notification + self.mobileSession:ExpectNotification("OnAppInterfaceUnregistered", {{}}) + :Times(0) + --hmi side: expect BasicCommunication.OnAppUnregistered + EXPECT_HMINOTIFICATION("BasicCommunication.OnAppUnregistered", {}) + :Times(0) + commonTestCases:DelayedExp(1000) + +end + +function Test:change_App_Params(app,appType,isMedia) + local session + + if app==1 then + session = config.application1.registerAppInterfaceParams + end + + if app==2 then + session = config.application2.registerAppInterfaceParams + end + + if app==3 then + session = config.application3.registerAppInterfaceParams + end + + session.isMediaApplication = isMedia + + if appType=="" then + session.appHMIType = nil + else + session.appHMIType = appType + end +end + +function Test:bring_App_To_LIMITED_OR_BACKGROUND(isMedia) + + local cid = self.hmiConnection:SendNotification("BasicCommunication.OnAppDeactivated", + { + appID = self.applications[config.application1.registerAppInterfaceParams.appName] + }) + + if isMedia==true then + self.mobileSession:ExpectNotification("OnHMIStatus",{{hmiLevel = "LIMITED", audioStreamingState = "AUDIBLE", systemContext = "MAIN"}}) + + else + self.mobileSession:ExpectNotification("OnHMIStatus",{{hmiLevel = "BACKGROUND", audioStreamingState = "NOT_AUDIBLE", systemContext = "MAIN"}}) + end +end + +function Test:registerAppInterface2() + --mobile side: sending request + local CorIdRegister = self.mobileSession1:SendRPC("RegisterAppInterface", config.application2.registerAppInterfaceParams) + + --hmi side: expect BasicCommunication.OnAppRegistered request + EXPECT_HMINOTIFICATION("BasicCommunication.OnAppRegistered", + { + application = + { + appName = config.application2.registerAppInterfaceParams.appName + } + }) + :Do(function(_,data) + self.applications[config.application2.registerAppInterfaceParams.appName] = data.params.application.appID + end) + + --mobile side: expect response + self.mobileSession1:ExpectResponse(CorIdRegister, + { + syncMsgVersion = config.syncMsgVersion + }) + :Timeout(2000) + + --mobile side: expect notification + self.mobileSession1:ExpectNotification("OnHMIStatus", {{systemContext = "MAIN", hmiLevel = "NONE", audioStreamingState = "NOT_AUDIBLE"}}) + :Timeout(2000) +end + +function Test:registerAppInterface3() + --mobile side: sending request + local CorIdRegister = self.mobileSession2:SendRPC("RegisterAppInterface", config.application3.registerAppInterfaceParams) + + --hmi side: expect BasicCommunication.OnAppRegistered request + EXPECT_HMINOTIFICATION("BasicCommunication.OnAppRegistered", + { + application = + { + appName = config.application3.registerAppInterfaceParams.appName + } + }) + :Do(function(_,data) + self.applications[config.application3.registerAppInterfaceParams.appName] = data.params.application.appID + end) + + --mobile side: expect response + self.mobileSession2:ExpectResponse(CorIdRegister, + { + syncMsgVersion = config.syncMsgVersion + }) + :Timeout(2000) + + --mobile side: expect notification + self.mobileSession2:ExpectNotification("OnHMIStatus", { systemContext = "MAIN", hmiLevel = "NONE", audioStreamingState = "NOT_AUDIBLE"}) + :Timeout(2000) +end + +function Test:registerAppInterface4() + --mobile side: sending request + local CorIdRegister = self.mobileSession3:SendRPC("RegisterAppInterface", config.application4.registerAppInterfaceParams) + + --hmi side: expect BasicCommunication.OnAppRegistered request + EXPECT_HMINOTIFICATION("BasicCommunication.OnAppRegistered", + { + application = + { + appName = config.application4.registerAppInterfaceParams.appName + } + }) + :Do(function(_,data) + self.applications[config.application4.registerAppInterfaceParams.appName] = data.params.application.appID + end) + + --mobile side: expect response + self.mobileSession3:ExpectResponse(CorIdRegister, + { + syncMsgVersion = config.syncMsgVersion + }) + :Timeout(2000) + + --mobile side: expect notification + self.mobileSession3:ExpectNotification("OnHMIStatus", {{ systemContext = "MAIN", hmiLevel = "NONE", audioStreamingState = "NOT_AUDIBLE"}}) + :Timeout(2000) +end + +function Test:activate_App(app) + --Activate the first app + if app==1 then + + local rid = self.hmiConnection:SendRequest("SDL.ActivateApp", { appID = self.applications[config.application1.registerAppInterfaceParams.appName]}) + + EXPECT_HMIRESPONSE(rid) + :Do(function(_,data) + if data.result.code ~= 0 then + quit() + end + end) + + self.mobileSession:ExpectNotification("OnHMIStatus",{{hmiLevel = "FULL", audioStreamingState = "AUDIBLE", systemContext = "MAIN"}}) + self.mobileSession1:ExpectNotification("OnHMIStatus",{{hmiLevel = "LIMITED", audioStreamingState = "AUDIBLE", systemContext = "MAIN"}}) + end + + + --Activate the second app + if app==2 then + local rid = self.hmiConnection:SendRequest("SDL.ActivateApp", { appID = self.applications[config.application2.registerAppInterfaceParams.appName]}) + EXPECT_HMIRESPONSE(rid) + :Do(function(_,data) + if data.result.code ~= 0 then + quit() + end + end) + + self.mobileSession:ExpectNotification("OnHMIStatus",{{hmiLevel = "LIMITED", audioStreamingState = "AUDIBLE", systemContext = "MAIN"}}) + self.mobileSession1:ExpectNotification("OnHMIStatus",{{hmiLevel = "FULL", audioStreamingState = "NOT_AUDIBLE", systemContext = "MAIN"}}) + end + + --Activate the third app + if app==3 then + + local rid = self.hmiConnection:SendRequest("SDL.ActivateApp", { appID = self.applications[config.application3.registerAppInterfaceParams.appName]}) + + EXPECT_HMIRESPONSE(rid) + :Do(function(_,data) + if data.result.code ~= 0 then + quit() + end + end) + + self.mobileSession2:ExpectNotification("OnHMIStatus",{{hmiLevel = "FULL", audioStreamingState = "AUDIBLE", systemContext = "MAIN"}}) + self.mobileSession1:ExpectNotification("OnHMIStatus",{{hmiLevel = "BACKGROUND", audioStreamingState = "NOT_AUDIBLE", systemContext = "MAIN"}}) + end + +end + +function Test:add_SecondSession() + + self.mobileSession1 = mobile_session.MobileSession( + self, + self.mobileConnection) + self.mobileSession1:StartService(7) +end + +function Test:add_ThirdSession() + + self.mobileSession2 = mobile_session.MobileSession( + self, + self.mobileConnection) + self.mobileSession2:StartService(7) +end + +function Test:add_FourthSession() + + self.mobileSession3 = mobile_session.MobileSession( + self, + self.mobileConnection) + self.mobileSession3:StartService(7) +end +------------------------------------------------------------------------------------ +-------------------------------------------Preconditions------------------------------------- +--------------------------------------------------------------------------------------------- + --Print new line to separate new test cases group + commonFunctions:newTestCasesGroup("Preconditions") + + --Delete Policy and Log Files + commonSteps:DeleteLogsFileAndPolicyTable() + + -- Precondition: removing user_modules/connecttest_OnAppInterfaceUnregistered.lua + function Test:Precondition_remove_user_connecttest() + os.execute( "rm -f ./user_modules/connecttest_OnAppInterfaceUnregistered.lua" ) + end +----------------------------------------------------------------------------------------------- +-------------------------------------------TEST BLOCK I---------------------------------------- +--------------------------------Check normal cases of Mobile request--------------------------- +----------------------------------------------------------------------------------------------- + +--Not Applicable + +---------------------------------------------------------------------------------------------- +-----------------------------------------TEST BLOCK II---------------------------------------- +-----------------------------Check special cases of Mobile request---------------------------- +---------------------------------------------------------------------------------------------- + +--Not Applicable + +----------------------------------------------------------------------------------------------- +-------------------------------------------TEST BLOCK III-------------------------------------- +----------------------------------Check normal cases of HMI Response----------------------- +----------------------------------------------------------------------------------------------- + +--Not Applicable + +---------------------------------------------------------------------------------------------- +-----------------------------------------TEST BLOCK V--------------------------------------- +--------------------------------------Check All Result Codes------------------------------------- +--------------------------------------------------------------------------------------------- + +--Not Applicable + +---------------------------------------------------------------------------------------------- +-----------------------------------------TEST BLOCK VI---------------------------------------- +-------------------------Sequence with emulating of user's action(s)-------------------------- +---------------------------------------------------------------------------------------------- + +---------------------------------------------------------------------------------------------------------------- +----APPLINK-18538 +----Verification: app is not unregisterd when exit by DRIVER_DISTRACTION_VIOLATION. +-------------------------------------------------------------------------------------------------------------- + +commonFunctions:newTestCasesGroup("TC_APPLINK_18538: Without OnAppInterfaceUnregistered if app is NONE and exited by DRIVER_DISTRACTION_VIOLATION ") + +local function TC_APPLINK_18538_AppIsNONE() + + function Test: ExitAppBy_DRIVER_DISTRACTION_VIOLATION() + self:exitAppBy_DRIVER_DISTRACTION_VIOLATION(false) + end +end + +TC_APPLINK_18538_AppIsNONE() +------------------------------------------------------------------------------------------------------------ +commonFunctions:newTestCasesGroup("TC_APPLINK_18538: Without OnAppInterfaceUnregistered if app is FULL and exited by DRIVER_DISTRACTION_VIOLATION ") + +local function TC_APPLINK_18538_AppIsFULL() + commonSteps:ActivationApp(_,"TC_APPLINK_18538_AppIsFULL_ActivateApp") + + function Test:TC_APPLINK_18538_AppIsFULL_ExitAppBy_DRIVER_DISTRACTION_VIOLATION() + self:exitAppBy_DRIVER_DISTRACTION_VIOLATION(true) + end +end + +TC_APPLINK_18538_AppIsFULL() +------------------------------------------------------------------------------------------------------------------------------------------------- + +commonFunctions:newTestCasesGroup("TC_APPLINK_18538: Without OnAppInterfaceUnregistered if app is LIMITED and exited by DRIVER_DISTRACTION_VIOLATION ") + +local function TC_APPLINK_18538_AppIsLIMITED() + + commonSteps:UnregisterApplication("TC_APPLINK_18538_AppIsLIMITED_Unregister") + StopSDL_StartSDL_InitHMI_ConnectMobile("TC_APPLINK_18538_AppIsLIMITED_Precondition") + + function Test:TC_APPLINK_18538_AppIsLIMITED_Change_App_To_Media() + self:change_App_Params(1,{"MEDIA"},true) + end + + commonSteps:RegisterAppInterface("TC_APPLINK_18538_AppIsLIMITED_RegisterApp") + commonSteps:ActivationApp(_,"TC_APPLINK_18538_AppIsLIMITED_ActivateApp") + + function Test:TC_APPLINK_18538_Bring_App_To_LIMITED() + self:bring_App_To_LIMITED_OR_BACKGROUND(true) + end + + function Test:TC_APPLINK_18538_AppIsLIMITED_RegisterApp_ExitAppBy_DRIVER_DISTRACTION_VIOLATION() + self:exitAppBy_DRIVER_DISTRACTION_VIOLATION(true) + end + +end + +TC_APPLINK_18538_AppIsLIMITED() +------------------------------------------------------------------------------------------------------------------------------------------------- + +commonFunctions:newTestCasesGroup("TC_APPLINK_18538: Without OnAppInterfaceUnregistered if app is BACKGROUND and exited by DRIVER_DISTRACTION_VIOLATION ") + +local function TC_APPLINK_18538_AppIsBACKGROUND() + + commonSteps:UnregisterApplication("TC_APPLINK_18538_AppIsBACKGROUND_Precondition_Unregister") + StopSDL_StartSDL_InitHMI_ConnectMobile("TC_APPLINK_18538_AppIsBACKGROUND_Precondition") + + function Test:Change_App_To_NonMedia() + self:change_App_Params(1,{"DEFAULT"},false) + end + + commonSteps:RegisterAppInterface("TC_APPLINK_18538_AppIsBACKGROUND_RegisterApp") + commonSteps:ActivationApp(_,"TC_APPLINK_18538_AppIsBACKGROUND_ActivateApp") + + function Test:TC_APPLINK_18538_Bring_App_To_BACKGROUND() + self:bring_App_To_LIMITED_OR_BACKGROUND(false) + end + + function Test: TC_APPLINK_18538_ExitAppBy_DRIVER_DISTRACTION_VIOLATION() + self:exitAppBy_DRIVER_DISTRACTION_VIOLATION(true) + end + +end + +TC_APPLINK_18538_AppIsBACKGROUND() +--------------------------------------------------------------------------------------------------------- +-- APPLINK-18414 +-- Verification: OnAppInterfaceUnregistered notification with IGNITION_OFF reason. +---------------------------------------------------------------------------------------------------------- +commonFunctions:newTestCasesGroup("TC_APPLINK_18414: (IGNITION_OFF) with one app is NONE") + +local function TC_APPLINK_18414_AppIsNone() + + function Test: TC_APPLINK_18414_AppIsNone_OnAppInterfaceUnregistered_IGNITION_OFF() + self:onAppInterfaceUnregistered("IGNITION_OFF") + end + + StopSDL_StartSDL_InitHMI_ConnectMobile("TC_APPLINK_18414_AppIsNone_Postcondition") + +end + +TC_APPLINK_18414_AppIsNone() +----------------------------------------------------------------------------------------------------------- +commonFunctions:newTestCasesGroup("TC_APPLINK_18414: OnAppInterfaceUnregistered(IGNITION_OFF) with 4 apps") + +local function TC_APPLINK_18414_Case4Apps() + + function Test:TC_APPLINK_18414_Case4Apps_Add_Second_Session() + self:add_SecondSession() + end + + function Test:TC_APPLINK_18414_Case4Apps_Add_Third_Session() + self:add_ThirdSession() + end + + function Test:TC_APPLINK_18414_Case4Apps_Add_Fourth_Session() + self:add_FourthSession() + end + + function Test:TC_APPLINK_18414_Case4Apps_Change_App1_To_Media() + self:change_App_Params(1,{"MEDIA"},true) + end + + commonSteps:RegisterAppInterface("TC_APPLINK_18414_Case4Apps_RegisterMediaApp") + commonSteps:ActivationApp(_,"TC_APPLINK_18414_Case4Apps_ActivateApp") + + function Test:TC_APPLINK_18414_Case4Apps_Register_NonMedia_App() + self:change_App_Params(2,{"DEFAULT"},false) + self:registerAppInterface2() + end + + function Test:TC_APPLINK_18414_Case4Apps_Activate_NonMedia_App() + self:activate_App(2) + end + + function Test:TC_APPLINK_18414_Case4Apps_Register_NAVIGATION_App() + self:change_App_Params(3,{"NAVIGATION"},false) + self:registerAppInterface3() + end + + function Test:TC_APPLINK_18414_Case4Apps_Active_NAVIGATION_App() + self:activate_App(3) + end + + function Test:TC_APPLINK_18414_Case4Apps_Register_The_Fourth_App() + self:registerAppInterface4() + end + + function Test:TC_APPLINK_18414_Case4Apps_OnAppInterfaceUnregistered_IGNITION_OFF() + self:onAppInterfaceUnregistered("IGNITION_OFF",4) + end + + StopSDL_StartSDL_InitHMI_ConnectMobile("TTC_APPLINK_18414_Case4Apps_postcondition") + +end + +TC_APPLINK_18414_Case4Apps() +------------------------------------------------------------------------------------------------- +commonFunctions:newTestCasesGroup("TC_APPLINK_18414: OnAppInterfaceUnregistered(IGNITION_OFF) with one app is FULL") + +local function TC_APPLINK_18414_AppIsFull() + + commonSteps:RegisterAppInterface("TC_APPLINK_18414_AppIsFull_RegisterApp") + commonSteps:ActivationApp(_,"TC_APPLINK_18414_AppIsFull_ActivateApp") + + function Test: TC_APPLINK_18414_AppIsFull_OnAppInterfaceUnregistered_IGNITION_OFF() + self:onAppInterfaceUnregistered("IGNITION_OFF") + end + + StopSDL_StartSDL_InitHMI_ConnectMobile("TC_APPLINK_18414_AppIsFull_Postcondition") + +end +TC_APPLINK_18414_AppIsFull() +---------------------------------------------------------------------------------------------------------- +commonFunctions:newTestCasesGroup("TC_APPLINK_18414: OnAppInterfaceUnregistered(IGNITION_OFF) with one app is LIMITED") + +local function TC_APPLINK_18414_AppIsLimited() + + function Test:TC_APPLINK_18414_AppIsLimited_Change_App1_To_Media() + self:change_App_Params(1,{"MEDIA"},true) + end + + commonSteps:RegisterAppInterface("TC_APPLINK_18414_AppIsLimited_RegisterApp") + commonSteps:ActivationApp(_,"TC_APPLINK_18414_AppIsLimited_ActivateApp") + + function Test:TC_APPLINK_18414_Bring_App_To_LIMITED() + self:bring_App_To_LIMITED_OR_BACKGROUND(true) + end + + function Test: TC_APPLINK_18414_AppIsLimited_OnAppInterfaceUnregistered_IGNITION_OFF() + self:onAppInterfaceUnregistered("IGNITION_OFF") + end + + StopSDL_StartSDL_InitHMI_ConnectMobile("TC_APPLINK_18414_AppIsLimited_Postcondition") + +end +TC_APPLINK_18414_AppIsLimited() +---------------------------------------------------------------------------------------------------------- +commonFunctions:newTestCasesGroup("TC_APPLINK_18414: OnAppInterfaceUnregistered(IGNITION_OFF) with one app is BACKGROUND") + +local function TC_APPLINK_18414_AppIsBackground() + + function Test:TC_APPLINK_18414_AppIsBackground_Change_App1_To_NonMedia() + self:change_App_Params(1,{"DEFAULT"},false) + end + + commonSteps:RegisterAppInterface("TC_APPLINK_18414_AppIsBackground_RegisterApp") + commonSteps:ActivationApp(_,"TC_APPLINK_18414_AppIsBackground_ActivationApp") + + function Test:TC_APPLINK_18414_Bring_App_To_BACKGROUND() + self:bring_App_To_LIMITED_OR_BACKGROUND(false) + end + + function Test: TC_APPLINK_18414_AppIsBackground_OnAppInterfaceUnregistered_IGNITION_OFF() + self:onAppInterfaceUnregistered("IGNITION_OFF") + end + + StopSDL_StartSDL_InitHMI_ConnectMobile("TC_APPLINK_18414_AppIsBackground_Postcondition") + +end + +TC_APPLINK_18414_AppIsBackground() + +---------------------------------------------------------------------------------------------------------- +--APPLINK-18416 +--Verification: SDL sends OnAppInterfaceUnregistered notification to mobile app when user press Ctrl+C in the console +------------------------------------------------------------------------------------------------------------ + +commonFunctions:newTestCasesGroup("TC_APPLINK_18416: Without OnAppInterfaceUnregistered() when user press Ctrl+C in the console when app is None") + +--TODO: Test case must be updated after resolving APPLINK-21088 +local function TC_APPLINK_18416_AppIsNone() + + commonSteps:RegisterAppInterface("TC_APPLINK_18416_AppIsNone_RegisterApp") + + function Test: TC_APPLINK_18416_AppIsNone_WithoutOnAppInterfaceUnregistered() + + + StopSDL() + + --hmi side: expect BasicCommunication.OnAppUnregistered + EXPECT_HMINOTIFICATION("BasicCommunication.OnAppUnregistered", {appID = self.applications[config.application1.registerAppInterfaceParams.appName], unexpectedDisconnect = true}) + + --mobile side: expect notification + self.mobileSession:ExpectNotification("OnAppInterfaceUnregistered", {{}}) + :Times(0) + + --hmi side: expect to BasicCommunication.OnSDLClose + EXPECT_HMINOTIFICATION("BasicCommunication.OnSDLClose",{}) + + end + + StopSDL_StartSDL_InitHMI_ConnectMobile("TC_APPLINK_18416_AppIsNone_Postcondition") +end + +TC_APPLINK_18416_AppIsNone() +----------------------------------------------------------------------------------------------------------------------------------------- + +commonFunctions:newTestCasesGroup("TC_APPLINK_18416: Without OnAppInterfaceUnregistered() when user press Ctrl+C in the console with 4 apps") + +--TODO: Test case must be updated after resolving APPLINK-21088 +local function TC_APPLINK_18416_Case4Apps() + + function Test:TC_APPLINK_18416_Case4Apps_Add_Second_Session() + self:add_SecondSession() + end + + function Test:TC_APPLINK_18416_Case4Apps_Add_Third_Session() + self:add_ThirdSession() + end + + function Test:TC_APPLINK_18416_Case4Apps_Add_Fourth_Session() + self:add_FourthSession() + end + + function Test:TC_APPLINK_18416_Case4Apps_Change_App1_To_Media() + self:change_App_Params(1,{"MEDIA"},true) + end + + commonSteps:RegisterAppInterface("TC_APPLINK_18416_Case4Apps_RegisterApp") + commonSteps:ActivationApp(_,"TC_APPLINK_18416_Case4Apps_ActivateApp") + + function Test:TC_APPLINK_18416_Case4Apps_Register_NonMedia_App() + self:change_App_Params(2,{"DEFAULT"},false) + self:registerAppInterface2() + end + + function Test:TC_APPLINK_18416_Case4Apps_Activate_NonMedia_App() + self:activate_App(2) + end + + function Test:TC_APPLINK_18416_Case4Apps_Register_NAVIGATION_App() + self:change_App_Params(3,{"NAVIGATION"},false) + self:registerAppInterface3() + end + + function Test:TC_APPLINK_18416_Case4Apps_Active_NAVIGATION_App() + self:activate_App(3) + end + + function Test:TC_APPLINK_18416_Case4Apps_Register_The_Fourth_App() + self:registerAppInterface4() + end + + function Test:TC_APPLINK_18416_Case4Apps_WithoutOnAppInterfaceUnregistered() + --hmi side: sending BasicCommunication.OnSystemRequest request to SDL + --self.hmiConnection:SendNotification("BasicCommunication.OnExitAllApplications", {reason = "IGNITION_OFF"}) + StopSDL() + --hmi side: expect BasicCommunication.OnAppUnregistered + EXPECT_HMINOTIFICATION("BasicCommunication.OnAppUnregistered", {appID = self.applications[config.application1.registerAppInterfaceParams.appName], unexpectedDisconnect = true}, + {appID = self.applications[config.application2.registerAppInterfaceParams.appName], unexpectedDisconnect = true}, + {appID = self.applications[config.application3.registerAppInterfaceParams.appName], unexpectedDisconnect = true}, + {appID = self.applications[config.application4.registerAppInterfaceParams.appName], unexpectedDisconnect = true}) + :Times(4) + + --mobile side: expect notification + self.mobileSession:ExpectNotification("OnAppInterfaceUnregistered", {{}}): Times(0) + self.mobileSession1:ExpectNotification("OnAppInterfaceUnregistered", {{}}):Times(0) + self.mobileSession2:ExpectNotification("OnAppInterfaceUnregistered", {{}}):Times(0) + self.mobileSession3:ExpectNotification("OnAppInterfaceUnregistered", {{}}):Times(0) + + --hmi side: expect to BasicCommunication.OnSDLClose + EXPECT_HMINOTIFICATION("BasicCommunication.OnSDLClose",{}) + end + + StopSDL_StartSDL_InitHMI_ConnectMobile("TC_APPLINK_18416_Case4Apps_postcondition") + +end + +TC_APPLINK_18416_Case4Apps() +------------------------------------------------------------------------------------------------------------------------------ +commonFunctions:newTestCasesGroup("TC_APPLINK_18416: Without OnAppInterfaceUnregistered() when user press Ctrl+C in the console when app is FULL") + +--TODO: Test case must be updated after resolving APPLINK-21088 +local function TC_APPLINK_18416_AppIsFull() + + commonSteps:RegisterAppInterface("TC_APPLINK_18416_AppIsFull_ActivateApp") + commonSteps:ActivationApp(_,"TC_APPLINK_18416_AppIsFull_ActivationApp") + + function Test: TC_APPLINK_18416_AppIsFull_WithoutOnAppInterfaceUnregistered() + StopSDL() + + --hmi side: expect BasicCommunication.OnAppUnregistered + EXPECT_HMINOTIFICATION("BasicCommunication.OnAppUnregistered", {appID = self.applications[config.application1.registerAppInterfaceParams.appName], unexpectedDisconnect = true}) + + --mobile side: expect notification + self.mobileSession:ExpectNotification("OnAppInterfaceUnregistered", {{}}):Times(0) + + --hmi side: expect to BasicCommunication.OnSDLClose + EXPECT_HMINOTIFICATION("BasicCommunication.OnSDLClose",{}) + + end + + StopSDL_StartSDL_InitHMI_ConnectMobile("TC_APPLINK_18416_AppIsFull_Postcondition") +end + +TC_APPLINK_18416_AppIsFull() +----------------------------------------------------------------------------------------------------------------------------------------- +commonFunctions:newTestCasesGroup("TC_APPLINK_18416: Without OnAppInterfaceUnregistered() when user press Ctrl+C in the console when app is LIMITED") + +--TODO: Test case must be updated after resolving APPLINK-21088 +local function TC_APPLINK_18416_AppIsLimited() + + function Test:TC_APPLINK_18416_AppIsLimited_Change_App1_To_Media() + self:change_App_Params(1,{"MEDIA"},true) + end + + commonSteps:RegisterAppInterface("TC_APPLINK_18416_AppIsLimited_ActivateApp") + commonSteps:ActivationApp(_,"TC_APPLINK_18416_AppIsLimited_ActivationApp") + + function Test:TC_APPLINK_18416_Bring_App_To_LIMITED() + self:bring_App_To_LIMITED_OR_BACKGROUND(true) + end + + function Test: TC_APPLINK_18416_AppIsLimited_WithoutOnAppInterfaceUnregistered() + StopSDL() + + --hmi side: expect BasicCommunication.OnAppUnregistered + EXPECT_HMINOTIFICATION("BasicCommunication.OnAppUnregistered", {appID = self.applications[config.application1.registerAppInterfaceParams.appName], unexpectedDisconnect = true}) + + --mobile side: expect notification + self.mobileSession:ExpectNotification("OnAppInterfaceUnregistered", {{}}):Times(0) + + --hmi side: expect to BasicCommunication.OnSDLClose + EXPECT_HMINOTIFICATION("BasicCommunication.OnSDLClose",{}) + + end + + StopSDL_StartSDL_InitHMI_ConnectMobile("TC_APPLINK_18416_AppIsLimited_Postcondition") +end + +TC_APPLINK_18416_AppIsLimited() +----------------------------------------------------------------------------------------------------------------------------------------- +commonFunctions:newTestCasesGroup("TC_APPLINK_18416: Without OnAppInterfaceUnregistered() when user press Ctrl+C in the console when app is BACKGROUND") + +--TODO: Test case must be updated after resolving APPLINK-21088 +local function TC_APPLINK_18416_AppIsBackground() + + function Test:TC_APPLINK_18416_AppIsLimited_Change_App1_To_NonMedia() + self:change_App_Params(1,{"DEFAULT"},false) + end + + commonSteps:RegisterAppInterface("TC_APPLINK_18416_AppIsBackground_ActivateApp") + commonSteps:ActivationApp(_,"TC_APPLINK_18416_AppIsBackground_ActivationApp") + + function Test:TC_APPLINK_18416_Bring_App_To_Background() + self:bring_App_To_LIMITED_OR_BACKGROUND(false) + end + + function Test: TC_APPLINK_18416_AppIsBackground_WithoutOnAppInterfaceUnregistered() + StopSDL() + + --hmi side: expect BasicCommunication.OnAppUnregistered + EXPECT_HMINOTIFICATION("BasicCommunication.OnAppUnregistered", {appID = self.applications[config.application1.registerAppInterfaceParams.appName], unexpectedDisconnect = true}) + + --mobile side: expect notification + self.mobileSession:ExpectNotification("OnAppInterfaceUnregistered", {{}}):Times(0) + + --hmi side: expect to BasicCommunication.OnSDLClose + EXPECT_HMINOTIFICATION("BasicCommunication.OnSDLClose",{}) + + end + + StopSDL_StartSDL_InitHMI_ConnectMobile("TC_APPLINK_18416_AppIsBackground_Postcondition") +end + +TC_APPLINK_18416_AppIsBackground() + +-------------------------------------------------------------------------------------------------------------- +--APPLINK-18417 +--Verification: OnAppInterfaceUnregistered notification with FACTORY_DEFAULTS reason. +------------------------------------------------------------------------------------------------------------ + +commonFunctions:newTestCasesGroup("TC_APPLINK_18417: OnAppInterfaceUnregistered(FACTORY_DEFAULTS) with one app at NONE") + +local function TC_APPLINK_18417_AppIsNone() + + commonSteps:RegisterAppInterface("TC_APPLINK_18417_AppIsNone_RegisterApp") + + function Test:TC_APPLINK_18417_AppIsNone_OnAppInterfaceUnregistered_FACTORY_DEFAULTS() + self:onAppInterfaceUnregistered("FACTORY_DEFAULTS") + end + + StopSDL_StartSDL_InitHMI_ConnectMobile("TC_APPLINK_18417_AppIsNone_Postcondition") + +end + +TC_APPLINK_18417_AppIsNone() +-------------------------------------------------------------------------------------------------------------- +commonFunctions:newTestCasesGroup("TC_APPLINK_18417_Case4Apps: OnAppInterfaceUnregistered(FACTORY_DEFAULTS) with 4 apps") + +local function TC_APPLINK_18417_Case4Apps() + + function Test:TC_APPLINK_18417_Case4Apps_Add_Second_Session() + self:add_SecondSession() + end + + function Test:TC_APPLINK_18417_Case4Apps_Add_Third_Session() + self:add_ThirdSession() + end + + function Test:TC_APPLINK_18417_Case4Apps_Add_Fourth_Session() + self:add_FourthSession() + end + + function Test:TC_APPLINK_18417_Case4Apps_Change_App1_To_Media() + self:change_App_Params(1,{"MEDIA"},true) + end + + commonSteps:RegisterAppInterface("TC_APPLINK_18417_Case4Apps_RegisterApp") + commonSteps:ActivationApp(_,"TC_APPLINK_18417_Case4Apps_ActivateApp") + + function Test:TC_APPLINK_18417_Case4Apps_Register_NonMedia_App() + self:change_App_Params(2,{"DEFAULT"},false) + self:registerAppInterface2() + end + + function Test:TC_APPLINK_18417_Case4Apps_Activate_NonMedia_App() + self:activate_App(2) + end + + function Test:TC_APPLINK_18417_Case4Apps_Register_NAVIGATION_App() + self:change_App_Params(3,{"NAVIGATION"},false) + self:registerAppInterface3() + end + + function Test:TC_APPLINK_18417_Case4Apps_Active_NAVIGATION_App() + self:activate_App(3) + end + + function Test:TC_APPLINK_18417_Case4Apps_Register_The_Fourth_App() + self:registerAppInterface4() + end + + function Test:TC_APPLINK_18417_Case4Apps_OnAppInterfaceUnregistered_FACTORY_DEFAULTS() + self:onAppInterfaceUnregistered("FACTORY_DEFAULTS",4) + end + + StopSDL_StartSDL_InitHMI_ConnectMobile("TC_APPLINK_18417_Case4Apps_postcondition") + +end + +TC_APPLINK_18417_Case4Apps() +------------------------------------------------------------------------------------------------------------- +commonFunctions:newTestCasesGroup("TC_APPLINK_18417: OnAppInterfaceUnregistered(FACTORY_DEFAULTS) with one app at FULL") + +local function TC_APPLINK_18417_AppIsFull() + + commonSteps:RegisterAppInterface("TC_APPLINK_18417_AppIsFull_RegisterApp") + commonSteps:ActivationApp(_,"TC_APPLINK_18417_AppIsFull_ActivateApp") + + function Test: TC_APPLINK_18417_AppIsFull_OnAppInterfaceUnregistered_FACTORY_DEFAULTS() + self:onAppInterfaceUnregistered("FACTORY_DEFAULTS") + end + + StopSDL_StartSDL_InitHMI_ConnectMobile("TC_APPLINK_18417_AppIsFull_Postcondition") + +end + +TC_APPLINK_18417_AppIsFull() +-------------------------------------------------------------------------------------------------------------- +commonFunctions:newTestCasesGroup("TC_APPLINK_18417: OnAppInterfaceUnregistered(FACTORY_DEFAULTS) with one app at LIMITED") + +local function TC_APPLINK_18417_AppIsLimited() + + function Test:TC_APPLINK_18417_AppIsLimited_Change_App1_To_Media() + self:change_App_Params(1,{"MEDIA"},true) + end + + commonSteps:RegisterAppInterface("TC_APPLINK_18417_AppIsLimited_ActivateApp") + commonSteps:ActivationApp(_,"TC_APPLINK_18417_AppIsLimited_ActivationApp") + + function Test:TC_APPLINK_18417_Bring_App_To_LIMITED() + self:bring_App_To_LIMITED_OR_BACKGROUND(true) + end + + function Test: TC_APPLINK_18417_AppIsLimited_OnAppInterfaceUnregistered_FACTORY_DEFAULTS() + self:onAppInterfaceUnregistered("FACTORY_DEFAULTS") + end + + StopSDL_StartSDL_InitHMI_ConnectMobile("TC_APPLINK_18417_AppIsLimited_Postcondition") + +end + +TC_APPLINK_18417_AppIsLimited() +-------------------------------------------------------------------------------------------------------------- +commonFunctions:newTestCasesGroup("TC_APPLINK_18417: OnAppInterfaceUnregistered(FACTORY_DEFAULTS) with one app at BACKGROUND") + +local function TC_APPLINK_18417_AppIsBackground() + + function Test:TC_APPLINK_18417_AppIsLimited_Change_App1_To_Media() + self:change_App_Params(1,{"DEFAULT"},false) + end + + commonSteps:RegisterAppInterface("TC_APPLINK_18417_AppIsBackground_RegisterApp") + commonSteps:ActivationApp(_,"TC_APPLINK_18417_AppIsBackground_ActivateApp") + + function Test:TC_APPLINK_18417_Bring_App_To_Background() + self:bring_App_To_LIMITED_OR_BACKGROUND(false) + end + + function Test: TC_APPLINK_18417_AppIsBackground_OnAppInterfaceUnregistered_FACTORY_DEFAULTS() + self:onAppInterfaceUnregistered("FACTORY_DEFAULTS") + end + + StopSDL_StartSDL_InitHMI_ConnectMobile("TC_APPLINK_18417_AppIsBackground_Postcondition") + +end + +TC_APPLINK_18417_AppIsBackground() + +------------------------------------------------------------------------------------------------------------- +--APPLINK-18419 +--Verification: OnAppInterfaceUnregistered notification with LANGUAGE_CHANGE reason. +------------------------------------------------------------------------------------------------------------ + +commonFunctions:newTestCasesGroup("TC_APPLINK_18419: OnAppInterfaceUnregistered (LANGUAGE_CHANGE) when change TTS +VR language on HMI and app is NONE") + +local function TC_APPLINK_18419_Change_TTSVR_AppIsNone() + + commonSteps:RegisterAppInterface("TC_APPLINK_18419_Change_TTSVR_AppIsNone_RegisterApp") + + function Test: TC_APPLINK_18419_AppIsNone_OnAppInterfaceUnregistered_TTSVR_LANGUAGE_CHANGE() + + --hmi side: sending TTS.OnLanguageChange/VR.OnLanguageChange request to SDL + self.hmiConnection:SendNotification("TTS.OnLanguageChange", {language="FR-FR"}) + self.hmiConnection:SendNotification("VR.OnLanguageChange", {language="FR-FR"}) + + --hmi side: expect OnLanguageChange + self.mobileSession:ExpectNotification("OnLanguageChange", {{language="FR-FR"}}) + + --hmi side: expect BasicCommunication.OnAppUnregistered + EXPECT_HMINOTIFICATION("BasicCommunication.OnAppUnregistered", {appID = self.applications[config.application1.registerAppInterfaceParams.appName], unexpectedDisconnect = false}) + + --mobile side: expect notification + self.mobileSession:ExpectNotification("OnAppInterfaceUnregistered", {{reason = "LANGUAGE_CHANGE"}}) + end + + StopSDL_StartSDL_InitHMI_ConnectMobile("TC_APPLINK_18419_Change_TTSVR_AppIsNone_Postcondition") +end + + TC_APPLINK_18419_Change_TTSVR_AppIsNone() +--------------------------------------------------------------------------------------------------------------- + +commonFunctions:newTestCasesGroup("TC_APPLINK_18419: OnAppInterfaceUnregistered (LANGUAGE_CHANGE) when change TTS +VR language on HMI with 4 apps") + +local function TC_APPLINK_18419_Change_TTS_VR_Case4Apps() + + function Test:TC_APPLINK_18419_Change_TTS_VR_Case4Apps_Add_Second_Session() + self:add_SecondSession() + end + + function Test:TC_APPLINK_18419_Change_TTS_VR_Case4Apps_Add_Third_Session() + self:add_ThirdSession() + end + + function Test:TC_APPLINK_18419_Change_TTS_VR_Case4Apps_Add_Fourth_Session() + self:add_FourthSession() + end + function Test:TC_APPLINK_18419_Change_TTS_VR_Case4Apps_Change_App1_To_Media() + self:change_App_Params(1,{"MEDIA"},true) + end + + commonSteps:RegisterAppInterface("TC_APPLINK_18419_Change_TTS_VR_Case4Apps_RegisterApp") + commonSteps:ActivationApp(_,"TC_APPLINK_18419_Change_TTS_VR_Case4Apps_ActivateApp") + + function Test:TC_APPLINK_18419_Change_TTS_VR_Case4Apps_Register_NonMedia_App() + self:change_App_Params(2,{"DEFAULT"},false) + self:registerAppInterface2() + end + + function Test:TC_APPLINK_18419_Change_TTS_VR_Case4Apps_Activate_NonMedia_App() + self:activate_App(2) + end + + function Test:TC_APPLINK_18419_Change_TTS_VR_Case4Apps_Register_NAVIGATION_App() + self:change_App_Params(3,{"NAVIGATION"},false) + self:registerAppInterface3() + end + + function Test:TC_APPLINK_18419_Change_TTS_VR_Case4Apps_Active_NAVIGATION_App() + self:activate_App(3) + end + + function Test:TC_APPLINK_18419_Change_TTS_VR_Case4Apps_Register_The_Fourth_App() + self:registerAppInterface4() + end + + function Test:TC_APPLINK_18419_Change_TTS_VR_Case4Apps_OnAppInterfaceUnregistered_TTSVR_LANGUAGE_CHANGE() + + --hmi side: sending TTS.OnLanguageChange/VR.OnLanguageChange request to SDL + self.hmiConnection:SendNotification("TTS.OnLanguageChange", {language="FR-FR"}) + self.hmiConnection:SendNotification("VR.OnLanguageChange", {language="FR-FR"}) + + --hmi side: expect OnLanguageChange + self.mobileSession:ExpectNotification("OnLanguageChange", {{language="FR-FR"}}) + + --hmi side: expect BasicCommunication.OnAppUnregistered + EXPECT_HMINOTIFICATION("BasicCommunication.OnAppUnregistered", {appID = self.applications[config.application1.registerAppInterfaceParams.appName], unexpectedDisconnect = false}, + {appID = self.applications[config.application2.registerAppInterfaceParams.appName], unexpectedDisconnect = false}, + {appID = self.applications[config.application3.registerAppInterfaceParams.appName], unexpectedDisconnect = false}, + {appID = self.applications[config.application4.registerAppInterfaceParams.appName], unexpectedDisconnect = false}) + :Times(4) + + --mobile side: expect notification + self.mobileSession:ExpectNotification("OnAppInterfaceUnregistered", {{reason = "LANGUAGE_CHANGE"}}) + self.mobileSession1:ExpectNotification("OnAppInterfaceUnregistered", {{reason = "LANGUAGE_CHANGE"}}) + self.mobileSession2:ExpectNotification("OnAppInterfaceUnregistered", {{reason = "LANGUAGE_CHANGE"}}) + self.mobileSession3:ExpectNotification("OnAppInterfaceUnregistered", {{reason = "LANGUAGE_CHANGE"}}) + + end + + StopSDL_StartSDL_InitHMI_ConnectMobile("TC_APPLINK_18419_Change_TTS_VR_Case4Apps_postcondition") + +end + +TC_APPLINK_18419_Change_TTS_VR_Case4Apps() +--------------------------------------------------------------------------------------------------------------- + +commonFunctions:newTestCasesGroup("TC_APPLINK_18419: OnAppInterfaceUnregistered (LANGUAGE_CHANGE) when change TTS +VR language on HMI and app is FULL") + +local function TC_APPLINK_18419_Change_TTSVR_AppIsFull() + + commonSteps:RegisterAppInterface("TC_APPLINK_18419_Change_TTSVR_AppIsFull_RegisterApp") + commonSteps:ActivationApp(_,"TC_APPLINK_18419_Change_TTSVR_AppIsFull_ActivateApp") + + function Test: TC_APPLINK_18419_AppIsFull_OnAppInterfaceUnregistered_TTSVR_LANGUAGE_CHANGE() + + --hmi side: sending TTS.OnLanguageChange/VR.OnLanguageChange request to SDL + self.hmiConnection:SendNotification("TTS.OnLanguageChange", {language="FR-FR"}) + self.hmiConnection:SendNotification("VR.OnLanguageChange", {language="FR-FR"}) + + --hmi side: expect OnLanguageChange + self.mobileSession:ExpectNotification("OnLanguageChange", {{language="FR-FR"}}) + + --hmi side: expect BasicCommunication.OnAppUnregistered + EXPECT_HMINOTIFICATION("BasicCommunication.OnAppUnregistered", {appID = self.applications[config.application1.registerAppInterfaceParams.appName], unexpectedDisconnect = false}) + + --mobile side: expect notification + self.mobileSession:ExpectNotification("OnAppInterfaceUnregistered", {{reason = "LANGUAGE_CHANGE"}}) + + end + + StopSDL_StartSDL_InitHMI_ConnectMobile("TC_APPLINK_18419_Change_TTSVR_AppIsFull_Postcondition") +end + + TC_APPLINK_18419_Change_TTSVR_AppIsFull() +--------------------------------------------------------------------------------------------------------------- + +commonFunctions:newTestCasesGroup("TC_APPLINK_18419: OnAppInterfaceUnregistered (LANGUAGE_CHANGE) when change TTS +VR language on HMI and app is LIMITED") + +local function TC_APPLINK_18419_Change_TTSVR_AppIsLimted() + + function Test:TC_APPLINK_18419_Change_TTSVR_Change_App1_To_Media() + self:change_App_Params(1,{"MEDIA"},true) + end + + commonSteps:RegisterAppInterface("TC_APPLINK_18419_Change_TTSVR_AppIsLimited_RegisterApp") + commonSteps:ActivationApp(_,"TC_APPLINK_18419_Change_TTSVR_AppIsLimited_ActivateApp") + + function Test:TC_APPLINK_18419_Change_TTSVR_Bring_App_To_LIMITED() + self:bring_App_To_LIMITED_OR_BACKGROUND(true) + end + + function Test: TC_APPLINK_18419_AppIsLimited_OnAppInterfaceUnregistered_TTSVR_LANGUAGE_CHANGE() + + --hmi side: sending TTS.OnLanguageChange/VR.OnLanguageChange request to SDL + self.hmiConnection:SendNotification("TTS.OnLanguageChange", {language="FR-FR"}) + self.hmiConnection:SendNotification("VR.OnLanguageChange", {language="FR-FR"}) + + --hmi side: expect OnLanguageChange + self.mobileSession:ExpectNotification("OnLanguageChange", {{language="FR-FR"}}) + + --hmi side: expect BasicCommunication.OnAppUnregistered + EXPECT_HMINOTIFICATION("BasicCommunication.OnAppUnregistered", {appID = self.applications[config.application1.registerAppInterfaceParams.appName], unexpectedDisconnect = false}) + + --mobile side: expect notification + self.mobileSession:ExpectNotification("OnAppInterfaceUnregistered",{ {reason = "LANGUAGE_CHANGE"}}) + + end + + StopSDL_StartSDL_InitHMI_ConnectMobile("TC_APPLINK_18419_Change_TTSVR_AppIsLimited_Postcondition") +end + + TC_APPLINK_18419_Change_TTSVR_AppIsLimted() +--------------------------------------------------------------------------------------------------------------- + +commonFunctions:newTestCasesGroup("TC_APPLINK_18419: OnAppInterfaceUnregistered (LANGUAGE_CHANGE) when change TTS +VR language on HMI and app is BACKGROUND") + +local function TC_APPLINK_18419_Change_TTSVR_AppIsBackground() + + function Test:TC_APPLINK_18419_Change_TTSVR_Change_App1_To_NonMedia() + self:change_App_Params(1,{"DEFAULT"},false) + end + + commonSteps:RegisterAppInterface("TC_APPLINK_18419_Change_TTSVR__AppIsBackground_RegisterApp") + commonSteps:ActivationApp(_,"TC_APPLINK_18419_Change_TTSVR_AppIsBackground_ActivateApp") + + function Test:TC_APPLINK_18419_Change_TTSVR_Bring_App_To_Background() + self:bring_App_To_LIMITED_OR_BACKGROUND(false) + end + + function Test: TC_APPLINK_18419_AppIsBackground_OnAppInterfaceUnregistered_TTSVR_LANGUAGE_CHANGE() + --hmi side: sending TTS.OnLanguageChange/VR.OnLanguageChange request to SDL + self.hmiConnection:SendNotification("TTS.OnLanguageChange", {language="FR-FR"}) + self.hmiConnection:SendNotification("VR.OnLanguageChange", {language="FR-FR"}) + + --hmi side: expect OnLanguageChange + self.mobileSession:ExpectNotification("OnLanguageChange", {{language="FR-FR"}}) + + --hmi side: expect BasicCommunication.OnAppUnregistered + EXPECT_HMINOTIFICATION("BasicCommunication.OnAppUnregistered", {appID = self.applications[config.application1.registerAppInterfaceParams.appName], unexpectedDisconnect = false}) + + --mobile side: expect notification + self.mobileSession:ExpectNotification("OnAppInterfaceUnregistered", {{reason = "LANGUAGE_CHANGE"}}) + end + + StopSDL_StartSDL_InitHMI_ConnectMobile("TC_APPLINK_18419_Change_TTSVR_AppIsBackground_Postcondition") +end + + TC_APPLINK_18419_Change_TTSVR_AppIsBackground() +------------------------------------------------------------------------------------------------------ + +commonFunctions:newTestCasesGroup("TC_APPLINK_18419: OnAppInterfaceUnregistered(LANGUAGE_CHANGE) when changed UI language on HMI and app is NONE") + +local function TC_APPLINK_18419_Change_UILanguage_AppIsNone() + + commonSteps:RegisterAppInterface("TC_APPLINK_18419_Change_UILanguage_AppIsNone_RegisterApp") + + function Test: TC_APPLINK_18419_AppIsNone_OnAppInterfaceUnregistered_UI_LANGUAGE_CHANGE() + --hmi side: sending UI.OnLanguageChange request to SDL + self.hmiConnection:SendNotification("UI.OnLanguageChange", {language="FR-FR"}) + + --hmi side: expect OnLanguageChange + EXPECT_NOTIFICATION("OnLanguageChange", {hmiDisplayLanguage="FR-FR"}) + + --hmi side: expect BasicCommunication.OnAppUnregistered + EXPECT_HMINOTIFICATION("BasicCommunication.OnAppUnregistered", {appID = self.applications[config.application1.registerAppInterfaceParams.appName], unexpectedDisconnect = false}) + + --mobile side: expect notification + EXPECT_NOTIFICATION("OnAppInterfaceUnregistered", {reason = "LANGUAGE_CHANGE"}) + end + + StopSDL_StartSDL_InitHMI_ConnectMobile("TC_APPLINK_18419_Change_TTSVR_AppIsNone_Postcondition") +end + +TC_APPLINK_18419_Change_UILanguage_AppIsNone() +--------------------------------------------------------------------------------------------------------------- +commonFunctions:newTestCasesGroup("TC_APPLINK_18419: OnAppInterfaceUnregistered(LANGUAGE_CHANGE) when changed UI language on HMI with 4 apps") + +local function TC_APPLINK_18419_Change_UI_Language_Case4Apps() + + function Test:TC_APPLINK_18419_Change_UI_Language_Case4Apps_Add_Second_Session() + self:add_SecondSession() + end + + function Test:TC_APPLINK_18419_Change_UI_Language_Case4Apps_Add_Third_Session() + self:add_ThirdSession() + end + + function Test:TC_APPLINK_18419_Change_UI_Language_Case4Apps_Add_Fourth_Session() + self:add_FourthSession() + end + + function Test:TC_APPLINK_18419_Change_UI_Language_Case4Apps_Change_App1_To_Media() + self:change_App_Params(1,{"MEDIA"},true) + end + + commonSteps:RegisterAppInterface("TC_APPLINK_18419_Change_UI_Language_Case4Apps_RegisterApp") + commonSteps:ActivationApp(_,"TC_APPLINK_18419_Change_UI_Language_Case4Apps_ActivateApp") + + function Test:TC_APPLINK_18419_Change_UI_Language_Case4Apps_Register_NonMedia_App() + self:change_App_Params(2,{"DEFAULT"},false) + self:registerAppInterface2() + end + + function Test:TC_APPLINK_18419_Change_UI_Language_Case4Apps_Activate_NonMedia_App() + self:activate_App(2) + end + + function Test:TC_APPLINK_18419_Change_UI_Language_Case4Apps_Register_NAVIGATION_App() + self:change_App_Params(3,{"NAVIGATION"},false) + self:registerAppInterface3() + end + + function Test:TC_APPLINK_18419_Change_UI_Language_Case4Apps_Active_NAVIGATION_App() + self:activate_App(3) + end + + function Test:TC_APPLINK_18419_Change_UI_Language_Case4Apps_Register_The_Fourth_App() + self:registerAppInterface4() + end + + function Test:TC_APPLINK_18419_Change_UI_Language_Case4Apps_OnAppInterfaceUnregistered_UI_LANGUAGE_CHANGE() + + --hmi side: sending UI.OnLanguageChange request to SDL + self.hmiConnection:SendNotification("UI.OnLanguageChange", {language="FR-FR"}) + + --hmi side: expect OnLanguageChange + self.mobileSession:ExpectNotification("OnLanguageChange", {{hmiDisplayLanguage="FR-FR"}}) + + --hmi side: expect BasicCommunication.OnAppUnregistered + EXPECT_HMINOTIFICATION("BasicCommunication.OnAppUnregistered", {appID = self.applications[config.application1.registerAppInterfaceParams.appName], unexpectedDisconnect = false}, + {appID = self.applications[config.application2.registerAppInterfaceParams.appName], unexpectedDisconnect = false}, + {appID = self.applications[config.application3.registerAppInterfaceParams.appName], unexpectedDisconnect = false}, + {appID = self.applications[config.application4.registerAppInterfaceParams.appName], unexpectedDisconnect = false}) + :Times(4) + + --mobile side: expect notification + self.mobileSession:ExpectNotification("OnAppInterfaceUnregistered", {{reason = "LANGUAGE_CHANGE"}}) + self.mobileSession1:ExpectNotification("OnAppInterfaceUnregistered",{{reason = "LANGUAGE_CHANGE"}}) + self.mobileSession2:ExpectNotification("OnAppInterfaceUnregistered", {{reason = "LANGUAGE_CHANGE"}}) + self.mobileSession3:ExpectNotification("OnAppInterfaceUnregistered", {{reason = "LANGUAGE_CHANGE"}}) + + + end + + StopSDL_StartSDL_InitHMI_ConnectMobile("TC_APPLINK_18419_Change_UI_Language_Case4Apps_postcondition") + +end + +TC_APPLINK_18419_Change_UI_Language_Case4Apps() +--------------------------------------------------------------------------------------------------------------- + +commonFunctions:newTestCasesGroup("TC_APPLINK_18419: OnAppInterfaceUnregistered(LANGUAGE_CHANGE) when changed UI language on HMI and app is FULL") + +local function TC_APPLINK_18419_Change_UILanguage_AppIsFull() + + commonSteps:RegisterAppInterface("TC_APPLINK_18419_Change_UILanguage_AppIsFull_RegisterApp") + commonSteps:ActivationApp(_,"TC_APPLINK_18419_Change_UILanguage_AppIsFull_ActivateApp") + + function Test: TC_APPLINK_18419_AppIsFull_OnAppInterfaceUnregistered_UI_LANGUAGE_CHANGE() + --hmi side: sending UI.OnLanguageChange request to SDL + self.hmiConnection:SendNotification("UI.OnLanguageChange", {language="FR-FR"}) + + --hmi side: expect OnLanguageChange + EXPECT_NOTIFICATION("OnLanguageChange", {hmiDisplayLanguage="FR-FR"}) + + --hmi side: expect BasicCommunication.OnAppUnregistered + EXPECT_HMINOTIFICATION("BasicCommunication.OnAppUnregistered", {appID = self.applications[config.application1.registerAppInterfaceParams.appName], unexpectedDisconnect = false}) + + --mobile side: expect notification + EXPECT_NOTIFICATION("OnAppInterfaceUnregistered", {reason = "LANGUAGE_CHANGE"}) + end + + StopSDL_StartSDL_InitHMI_ConnectMobile("TC_APPLINK_18419_Change_TTSVR_AppIsFull_Postcondition") +end +TC_APPLINK_18419_Change_UILanguage_AppIsFull() +--------------------------------------------------------------------------------------------------------------- + +commonFunctions:newTestCasesGroup("TC_APPLINK_18419: OnAppInterfaceUnregistered(LANGUAGE_CHANGE) when changed UI language on HMI and app is LIMITED") + +local function TC_APPLINK_18419_Change_UILanguage_AppIsLimited() + + function Test:TC_APPLINK_18419_Change_UILanguage_Change_App1_To_Media() + self:change_App_Params(1,{"MEDIA"},true) + end + + commonSteps:RegisterAppInterface("TC_APPLINK_18419_Change_UILanguage_AppIsLimited_RegisterApp") + commonSteps:ActivationApp(_,"TC_APPLINK_18419_Change_UILanguage_AppIsLimited_ActivateApp") + + function Test:TC_APPLINK_18419_Change_UILanguage_Bring_App_To_LIMITED() + self:bring_App_To_LIMITED_OR_BACKGROUND(true) + end + + function Test: TC_APPLINK_18419_AppIsLimited_OnAppInterfaceUnregistered_UI_LANGUAGE_CHANGE() + --hmi side: sending UI.OnLanguageChange request to SDL + self.hmiConnection:SendNotification("UI.OnLanguageChange", {language="FR-FR"}) + + --hmi side: expect OnLanguageChange + EXPECT_NOTIFICATION("OnLanguageChange", {hmiDisplayLanguage="FR-FR"}) + + --hmi side: expect BasicCommunication.OnAppUnregistered + EXPECT_HMINOTIFICATION("BasicCommunication.OnAppUnregistered", {appID = self.applications[config.application1.registerAppInterfaceParams.appName], unexpectedDisconnect = false}) + + --mobile side: expect notification + EXPECT_NOTIFICATION("OnAppInterfaceUnregistered", {reason = "LANGUAGE_CHANGE"}) + end + + StopSDL_StartSDL_InitHMI_ConnectMobile("TC_APPLINK_18419_Change_TTSVR_AppIsLimited_Postcondition") +end +TC_APPLINK_18419_Change_UILanguage_AppIsLimited() +--------------------------------------------------------------------------------------------------------------- + +commonFunctions:newTestCasesGroup("TC_APPLINK_18419: OnAppInterfaceUnregistered(LANGUAGE_CHANGE) when changed UI language on HMI and app is BACKGROUND") + +local function TC_APPLINK_18419_Change_UILanguage_AppIsBackground() + + function Test:TC_APPLINK_18419_Change_UILanguage_Change_App1_To_NonMedia() + self:change_App_Params(1,{"DEFAULT"},false) + end + + commonSteps:RegisterAppInterface("TC_APPLINK_18419_Change_UILanguage_AppIsBackground_RegisterApp") + commonSteps:ActivationApp(_,"TC_APPLINK_18419_Change_UILanguage_AppIsBackground_ActivateApp") + + function Test:TC_APPLINK_18419_Change_UILanguage_Bring_App_To_Background() + self:bring_App_To_LIMITED_OR_BACKGROUND(false) + end + + function Test: TC_APPLINK_18419_AppIsLimited_OnAppInterfaceUnregistered_UI_LANGUAGE_CHANGE() + --hmi side: sending UI.OnLanguageChange request to SDL + self.hmiConnection:SendNotification("UI.OnLanguageChange", {language="FR-FR"}) + + --hmi side: expect OnLanguageChange + EXPECT_NOTIFICATION("OnLanguageChange", {hmiDisplayLanguage="FR-FR"}) + + --hmi side: expect BasicCommunication.OnAppUnregistered + EXPECT_HMINOTIFICATION("BasicCommunication.OnAppUnregistered", {appID = self.applications[config.application1.registerAppInterfaceParams.appName], unexpectedDisconnect = false}) + + --mobile side: expect notification + EXPECT_NOTIFICATION("OnAppInterfaceUnregistered", {reason = "LANGUAGE_CHANGE"}) + end + + StopSDL_StartSDL_InitHMI_ConnectMobile("TC_APPLINK_18419_Change_TTSVR_AppIsBackground_Postcondition") +end +TC_APPLINK_18419_Change_UILanguage_AppIsBackground() + +--------------------------------------------------------------------------------------------------------------- +--APPLINK-18415 +--Verification: OnAppInterfaceUnregistered notification with MASTER_RESET reason. +-------------------------------------------------------------------------------------------------------------- +commonFunctions:newTestCasesGroup("TC_APPLINK_18415: OnAppInterfaceUnregistered(reason:MASTER_RESET) when app is NONE") + +local function TC_APPLINK_18415_AppIsNone() + + commonSteps:RegisterAppInterface("TC_APPLINK_18415_AppIsNone_RegisterApp") + + function Test: TC_APPLINK_18415_OnAppInterfaceUnregistered_MASTER_RESET() + --hmi side: sending BasicCommunication.OnSystemRequest request to SDL + self.hmiConnection:SendNotification("BasicCommunication.OnExitAllApplications", {reason = "MASTER_RESET"}) + + --hmi side: expect BasicCommunication.OnAppUnregistered + EXPECT_HMINOTIFICATION("BasicCommunication.OnAppUnregistered", {appID = self.applications[config.application1.registerAppInterfaceParams.appName], unexpectedDisconnect = false}) + + --mobile side: expect notification + self.mobileSession:ExpectNotification("OnAppInterfaceUnregistered", {{reason = "MASTER_RESET"}}) + + --hmi side: expect to BasicCommunication.OnSDLClose + EXPECT_HMINOTIFICATION("BasicCommunication.OnSDLClose",{}) + end + + StopSDL_StartSDL_InitHMI_ConnectMobile("TC_APPLINK_18415_AppIsNone_Postcondition") +end + +TC_APPLINK_18415_AppIsNone() +-------------------------------------------------------------------------------------------------------------- +commonFunctions:newTestCasesGroup("TC_APPLINK_18415: OnAppInterfaceUnregistered(MASTER_RESET) with 4 apps") + +local function TC_APPLINK_18415_Case4Apps() + + function Test:TC_APPLINK_18415_Case4Apps_Add_Second_Session() + self:add_SecondSession() + end + + function Test:TC_APPLINK_18415_Case4Apps_Add_Third_Session() + self:add_ThirdSession() + end + + function Test:TC_APPLINK_18415_Case4Apps_Add_Fourth_Session() + self:add_FourthSession() + end + + function Test:TC_APPLINK_18415_Case4Apps_Change_App1_To_Media() + self:change_App_Params(1,{"MEDIA"},true) + end + + commonSteps:RegisterAppInterface("TC_APPLINK_18415_Case4Apps_RegisterApp") + commonSteps:ActivationApp(_,"TC_APPLINK_18415_Case4Apps_ActivateApp") + + function Test:TC_APPLINK_18415_Case4Apps_Register_NonMedia_App() + self:change_App_Params(2,{"DEFAULT"},false) + self:registerAppInterface2() + end + + function Test:TC_APPLINK_18415_Case4Apps_Activate_NonMedia_App() + self:activate_App(2) + end + + function Test:TC_APPLINK_18415_Case4Apps_Register_NAVIGATION_App() + self:change_App_Params(3,{"NAVIGATION"},false) + self:registerAppInterface3() + end + + function Test:TC_APPLINK_18415_Case4Apps_Active_NAVIGATION_App() + self:activate_App(3) + end + + function Test:TC_APPLINK_18415_Case4Apps_Register_The_Fourth_App() + self:registerAppInterface4() + end + + function Test:TC_APPLINK_18415_Case4Apps_OnAppInterfaceUnregistered_MASTER_RESET() + self:onAppInterfaceUnregistered("MASTER_RESET",4) + end + + StopSDL_StartSDL_InitHMI_ConnectMobile("TC_APPLINK_18415_Case4Apps_postcondition") + +end + +TC_APPLINK_18415_Case4Apps() +------------------------------------------------------------------------------------------------------------- +commonFunctions:newTestCasesGroup("TC_APPLINK_18415: OnAppInterfaceUnregistered(reason:MASTER_RESET) when app is FULL") + +local function TC_APPLINK_18415_AppIsFull() + + commonSteps:RegisterAppInterface("TC_APPLINK_18415_AppIsFull_RegisterApp") + commonSteps:ActivationApp(_,"TC_APPLINK_18415_AppIsFull_ActivateApp") + + function Test: TC_APPLINK_18415_AppIsFull_OnAppInterfaceUnregistered_MASTER_RESET() + --hmi side: sending BasicCommunication.OnSystemRequest request to SDL + self.hmiConnection:SendNotification("BasicCommunication.OnExitAllApplications", {reason = "MASTER_RESET"}) + + --hmi side: expect BasicCommunication.OnAppUnregistered + EXPECT_HMINOTIFICATION("BasicCommunication.OnAppUnregistered", {appID = self.applications[config.application1.registerAppInterfaceParams.appName], unexpectedDisconnect = false}) + + --mobile side: expect notification + self.mobileSession:ExpectNotification("OnAppInterfaceUnregistered", {{reason = "MASTER_RESET"}}) + + --hmi side: expect to BasicCommunication.OnSDLClose + EXPECT_HMINOTIFICATION("BasicCommunication.OnSDLClose",{}) + end + StopSDL_StartSDL_InitHMI_ConnectMobile("TC_APPLINK_18415_AppIsFull_Postcondition") +end + +TC_APPLINK_18415_AppIsFull() +-------------------------------------------------------------------------------------------------------------- +commonFunctions:newTestCasesGroup("TC_APPLINK_18415: OnAppInterfaceUnregistered(reason:MASTER_RESET) when app is LIMITED") + +local function TC_APPLINK_18415_AppIsLimited() + + function Test:TC_APPLINK_18415_Change_UILanguage_Change_App1_To_Media() + self:change_App_Params(1,{"MEDIA"},true) + end + + commonSteps:RegisterAppInterface ("TC_APPLINK_18415_AppIsLimited_RegisterApp") + commonSteps:ActivationApp(_,"TC_APPLINK_18415_AppIsLimited_Activate_App") + + function Test:TC_APPLINK_18415_Change_UILanguage_Bring_App_To_Limited() + self:bring_App_To_LIMITED_OR_BACKGROUND(true) + end + + function Test: TC_APPLINK_18415_AppIsFull_OnAppInterfaceUnregistered_MASTER_RESET() + --hmi side: sending BasicCommunication.OnSystemRequest request to SDL + self.hmiConnection:SendNotification("BasicCommunication.OnExitAllApplications", {reason = "MASTER_RESET"}) + + --hmi side: expect BasicCommunication.OnAppUnregistered + EXPECT_HMINOTIFICATION("BasicCommunication.OnAppUnregistered", {appID = self.applications[config.application1.registerAppInterfaceParams.appName], unexpectedDisconnect = false}) + + --mobile side: expect notification + self.mobileSession:ExpectNotification("OnAppInterfaceUnregistered", {{reason = "MASTER_RESET"}}) + + --hmi side: expect to BasicCommunication.OnSDLClose + EXPECT_HMINOTIFICATION("BasicCommunication.OnSDLClose",{}) + end + StopSDL_StartSDL_InitHMI_ConnectMobile("TC_APPLINK_18415_AppIsLimited_Postcondition") +end + +TC_APPLINK_18415_AppIsLimited() +-------------------------------------------------------------------------------------------------------------- +commonFunctions:newTestCasesGroup("TC_APPLINK_18415: OnAppInterfaceUnregistered(reason:MASTER_RESET) when app is BACKGROUND") + +local function TC_APPLINK_18415_AppIsBackground() + + function Test:TC_APPLINK_18415_Change_UILanguage_Change_App1_To_NonMedia() + self:change_App_Params(1,{"DEFAULT"},false) + end + + commonSteps:RegisterAppInterface ("TC_APPLINK_18415_AppIsBackground_RegisterAppp") + commonSteps:ActivationApp(_,"TC_APPLINK_18415_AppIsBackground_ActivateApp") + + function Test:TC_APPLINK_18415_Change_UILanguage_Bring_App_To_Background() + self:bring_App_To_LIMITED_OR_BACKGROUND(false) + end + + function Test: TC_APPLINK_18415_AppIsBackground_OnAppInterfaceUnregistered_MASTER_RESET() + --hmi side: sending BasicCommunication.OnSystemRequest request to SDL + self.hmiConnection:SendNotification("BasicCommunication.OnExitAllApplications", {reason = "MASTER_RESET"}) + + --hmi side: expect BasicCommunication.OnAppUnregistered + EXPECT_HMINOTIFICATION("BasicCommunication.OnAppUnregistered", {appID = self.applications[config.application1.registerAppInterfaceParams.appName], unexpectedDisconnect = false}) + + --mobile side: expect notification + self.mobileSession:ExpectNotification("OnAppInterfaceUnregistered", {{reason = "MASTER_RESET"}}) + + --hmi side: expect to BasicCommunication.OnSDLClose + EXPECT_HMINOTIFICATION("BasicCommunication.OnSDLClose",{}) + end + StopSDL_StartSDL_InitHMI_ConnectMobile("TC_APPLINK_18415_AppIsBackground_Postcondition") +end + +TC_APPLINK_18415_AppIsBackground() +------------------------------------------------------------------------------------------------------------ +--APPLINK-18428 +--Verification: OnAppInterfaceUnregistered notification with APP_UNAUTHORIZED reason if appName is wrong after PTU. +---------------------------------------------------------------------------------------------------------- +--NOTE: This TC is blocked on ATF 2.2 by defect APPLINK-19188. Please try ATF on commit f86f26112e660914b3836c8d79002e50c7219f29 + +commonFunctions:newTestCasesGroup("TC_APPLINK_18428: OnAppInterfaceUnregistered(APP_UNAUTHORIZED ) after PTU, appName is wrong") + +local function TC_APPLINK_18428_WrongAppName() + + function Test:TC_APPLINK_18428_WrongAppName_ChangeAppName() + config.application1.registerAppInterfaceParams.appName = "WrongAppName" + config.application1.registerAppInterfaceParams.appID = "18428_1" + end + + commonSteps:RegisterAppInterface("TC_APPLINK_18428_WrongAppName_RegisterApp") + + function Test:TC_APPLINK_18428_WrongAppName_ActivateApp() + + local RequestId = self.hmiConnection:SendRequest("SDL.ActivateApp", { appID = self.applications["WrongAppName"]}) + + EXPECT_HMIRESPONSE(RequestId) + :Do(function(_,data) + if + data.result.isSDLAllowed ~= true then + local RequestId = self.hmiConnection:SendRequest("SDL.GetUserFriendlyMessage", {language = "EN-US", messageCodes = {"DataConsent"}}) + + --hmi side: expect SDL.GetUserFriendlyMessage message response + --TODO: update after resolving APPLINK-16094. + --EXPECT_HMIRESPONSE(RequestId,{result = {code = 0, method = "SDL.GetUserFriendlyMessage"}}) + EXPECT_HMIRESPONSE(RequestId) + :Do(function(_,data) + --hmi side: send request SDL.OnAllowSDLFunctionality + self.hmiConnection:SendNotification("SDL.OnAllowSDLFunctionality", {allowed = true, source = "GUI", device = {id = config.deviceMAC, name = "127.0.0.1"}}) + + --hmi side: expect BasicCommunication.ActivateApp request + EXPECT_HMICALL("BasicCommunication.ActivateApp") + :Do(function(_,data) + --hmi side: sending BasicCommunication.ActivateApp response + self.hmiConnection:SendResponse(data.id,"BasicCommunication.ActivateApp", "SUCCESS", {}) + end) + :Times(AnyNumber()) + end) + + end + end) + + --mobile side: expect notification + EXPECT_NOTIFICATION("OnHMIStatus", {hmiLevel = "FULL", systemContext = "MAIN"}) + end + + function Test: TC_APPLINK_18428_WrongAppName_OnAppInterfaceUnregistered_APP_UNAUTHORIZED() + + --mobile side: sending SystemRequest request + local CorIdSystemRequest = self.mobileSession:SendRPC("SystemRequest", + { + fileName = "PolicyTableUpdate", + requestType = "PROPRIETARY" + }, + "files/PTU_ForOnAppInterfaceUnregistered.json") + + --hmi side: expect SystemRequest request + EXPECT_HMICALL("BasicCommunication.SystemRequest", {requestType = "PROPRIETARY", fileName = "/tmp/fs/mp/images/ivsu_cache/PolicyTableUpdate"}) + :Do(function(_,data) + systemRequestId = data.id + + --hmi side: sending BasicCommunication.OnSystemRequest request to SDL + self.hmiConnection:SendNotification("SDL.OnReceivedPolicyUpdate", {policyfile = "/tmp/fs/mp/images/ivsu_cache/PolicyTableUpdate"}) + + function to_run() + --hmi side: sending SystemRequest response + self.hmiConnection:SendResponse(systemRequestId,"BasicCommunication.SystemRequest", "SUCCESS", {}) + end + + RUN_AFTER(to_run, 500) + end) + + --hmi side: expect SDL.OnAppPermissionChanged + EXPECT_HMINOTIFICATION("SDL.OnAppPermissionChanged", {appID = self.applications["WrongAppName"], appUnauthorized = true, priority = "NONE"}) + :Do(function(_,data) + + --hmi side: sending SDL.GetUserFriendlyMessage request to SDL + local RequestIdGetUserFriendlyMessage = self.hmiConnection:SendRequest("SDL.GetUserFriendlyMessage", {language = "EN-US", messageCodes = {"AppUnauthorized"}}) + + --hmi side: expect SDL.GetUserFriendlyMessage response + EXPECT_HMIRESPONSE(RequestIdGetUserFriendlyMessage,{result = {code = 0, method = "SDL.GetUserFriendlyMessage", messages = {{ + line1 = "Not Authorized", + messageCode = "AppUnauthorized", + textBody = "This version of %appName% is no longer authorized to work with AppLink. Please update to the latest version of %appName%.", + ttsString = "This version of %appName% is not authorized and will not work with SYNC."}}}}) + end) + + --hmi side: expect BasicCommunication.OnAppUnregistered + EXPECT_HMINOTIFICATION("BasicCommunication.OnAppUnregistered", {appID = self.applications["WrongAppName"], unexpectedDisconnect = false}) + + + --mobile side: expect notification + self.mobileSession:ExpectNotification("OnAppInterfaceUnregistered", {{reason = "APP_UNAUTHORIZED"}}) + + EXPECT_HMICALL("BasicCommunication.UpdateAppList") + :Do(function(_, data) + self.hmiConnection:SendResponse(data.id, data.method, "SUCCESS", { }) + end) + :ValidIf (function(_,data) + for _, app in pairs(data.params.applications) do + if app.appID == self.applications["WrongAppName"] then + commonFunctions:printError(" Application is not removed on AppsList ") + return false + end + end + + return true + + end) + + end + + StopSDL_StartSDL_InitHMI_ConnectMobile("TC_APPLINK_18428_WrongAppName") + +end + +TC_APPLINK_18428_WrongAppName() + +------------------------------------------------------------------------------------------------------------ +--Requirement: SDLAQ-CRS-2388 +--Verification: OnAppInterfaceUnregistered notification with APP_UNAUTHORIZED reason if app's permission is NULL after PTU. +---------------------------------------------------------------------------------------------------------- +--NOTE: This TC is blocked on ATF 2.2 by defect APPLINK-19188. Please try ATF on commit f86f26112e660914b3836c8d79002e50c7219f29 +--TODO: This TC need to be updated when APPLINK-21434 is completed. Currently, it works following SDLAQ-CRS-2388 + +commonFunctions:newTestCasesGroup("TC_APPLINK_18428: OnAppInterfaceUnregistered(APP_UNAUTHORIZED) after PTU and app's permission is NULL") + +local function TC_APPLINK_18428_AppPermissionIsNull() + + function Test:TC_APPLINK_18428_AppPermissionIsNull_ChangeAppName() + config.application1.registerAppInterfaceParams.appName = "AppNullPermission" + config.application1.registerAppInterfaceParams.appID = "18428_2" + end + + commonSteps:RegisterAppInterface("TC_APPLINK_18428_AppPermissionIsNull_RegisterApp") + + function Test:TC_APPLINK_18428_AppPermissionIsNull_ActivateApp() + + local RequestId = self.hmiConnection:SendRequest("SDL.ActivateApp", { appID = self.applications["AppNullPermission"]}) + + EXPECT_HMIRESPONSE(RequestId) + :Do(function(_,data) + if + data.result.isSDLAllowed ~= true then + local RequestId = self.hmiConnection:SendRequest("SDL.GetUserFriendlyMessage", {language = "EN-US", messageCodes = {"DataConsent"}}) + + --hmi side: expect SDL.GetUserFriendlyMessage message response + --TODO: update after resolving APPLINK-16094. + --EXPECT_HMIRESPONSE(RequestId,{result = {code = 0, method = "SDL.GetUserFriendlyMessage"}}) + EXPECT_HMIRESPONSE(RequestId) + :Do(function(_,data) + --hmi side: send request SDL.OnAllowSDLFunctionality + self.hmiConnection:SendNotification("SDL.OnAllowSDLFunctionality", {allowed = true, source = "GUI", device = {id = config.deviceMAC, name = "127.0.0.1"}}) + + --hmi side: expect BasicCommunication.ActivateApp request + EXPECT_HMICALL("BasicCommunication.ActivateApp") + :Do(function(_,data) + --hmi side: sending BasicCommunication.ActivateApp response + self.hmiConnection:SendResponse(data.id,"BasicCommunication.ActivateApp", "SUCCESS", {}) + end) + :Times(AnyNumber()) + end) + + end + end) + + --mobile side: expect notification + EXPECT_NOTIFICATION("OnHMIStatus", {hmiLevel = "FULL", systemContext = "MAIN"}) + end + + function Test: TC_APPLINK_18428_AppPermissionIsNull_OnAppInterfaceUnregistered_APP_UNAUTHORIZED() + + --mobile side: sending SystemRequest request + local CorIdSystemRequest = self.mobileSession:SendRPC("SystemRequest", + { + fileName = "PolicyTableUpdate", + requestType = "PROPRIETARY" + }, + "files/PTU_ForOnAppInterfaceUnregistered1.json") + + --hmi side: expect SystemRequest request + EXPECT_HMICALL("BasicCommunication.SystemRequest", {requestType = "PROPRIETARY", fileName = "/tmp/fs/mp/images/ivsu_cache/PolicyTableUpdate"}) + :Do(function(_,data) + systemRequestId = data.id + + --hmi side: sending BasicCommunication.OnSystemRequest request to SDL + self.hmiConnection:SendNotification("SDL.OnReceivedPolicyUpdate", {policyfile = "/tmp/fs/mp/images/ivsu_cache/PolicyTableUpdate"}) + + function to_run() + --hmi side: sending SystemRequest response + self.hmiConnection:SendResponse(systemRequestId,"BasicCommunication.SystemRequest", "SUCCESS", {}) + end + + RUN_AFTER(to_run, 500) + end) + + --hmi side: expect SDL.OnAppPermissionChanged + EXPECT_HMINOTIFICATION("SDL.OnAppPermissionChanged", {appID = self.applications["AppNullPermission"], appRevoked = true, priority = "EMERGENCY"}) + :Do(function(_,data) + --hmi side: sending SDL.GetUserFriendlyMessage request to SDL + local RequestIdGetUserFriendlyMessage = self.hmiConnection:SendRequest("SDL.GetUserFriendlyMessage", {language = "EN-US", messageCodes = {"AppUnsupported"}}) + + --hmi side: expect BC.ActivateApp + EXPECT_HMICALL("BasicCommunication.ActivateApp",{appID=self.applications["AppNullPermission"],level="NONE",priority="NONE"}) + :Do(function(_,data) + self.hmiConnection:SendNotification("BasicCommunication.OnAppDeactivated", + { + appID = self.applications["AppNullPermission"] + }) + + --hmi side: sending Response to SDL + self.hmiConnection:SendResponse(data.id,data.method, "SUCCESS",{}) + end) + EXPECT_HMIRESPONSE(RequestIdGetUserFriendlyMessage,{result = {code = 0, method = "SDL.GetUserFriendlyMessage", messages = {{ + line1 = "Not Supported", + messageCode = "AppUnsupported", + textBody = "Your version of %appName% is not supported by SYNC.", + ttsString = "This version of %appName% is not supported by SYNC."}}}}) + end) + --mobile side: expect notification + EXPECT_NOTIFICATION("OnHMIStatus", {hmiLevel = "NONE", systemContext = "MAIN"}) + end + + StopSDL_StartSDL_InitHMI_ConnectMobile("TC_APPLINK_18428_AppPermissionIsNull_Postcondition") + +end + +TC_APPLINK_18428_AppPermissionIsNull() + +--Write TEST_BLOCK_VI_End to ATF log +commonFunctions:newTestCasesGroup("****************************** END TEST BLOCK VI ******************************") + +--------------------------------------------------------------------------------------------- +-----------------------------------------TEST BLOCK VII--------------------------------------- +--------------------------------------Different HMIStatus------------------------------------- +---------------------------------------------------------------------------------------------- +--All HMILevel is checked on TCs on TEST BLOCK VI \ No newline at end of file diff --git a/test_scripts/API/ATF_OnAppInterfaceUnregistered_REQUEST_WHILE_IN_NONE_HMI_LEVEL.lua b/test_scripts/API/ATF_OnAppInterfaceUnregistered_REQUEST_WHILE_IN_NONE_HMI_LEVEL.lua new file mode 100644 index 0000000000..9f0ce45cc1 --- /dev/null +++ b/test_scripts/API/ATF_OnAppInterfaceUnregistered_REQUEST_WHILE_IN_NONE_HMI_LEVEL.lua @@ -0,0 +1,81 @@ +--NOTE:session:ExpectNotification("notification_name", { argument_to_check }) is chanegd to session:ExpectNotification("notification_name", {{ argument_to_check }}) due to defect APPLINK-17030 +--After this defect is done, please reverse to session:ExpectNotification("notification_name", { argument_to_check }) +------------------------------------------------------------------------------------------------------------------- +--Set "AppHMILevelNoneTimeScaleMaxRequests" = 1 +------------------------------------------------------------------------------------------------------------------- +Test = require('connecttest') +require('cardinalities') +local events = require('events') +local mobile_session = require('mobile_session') +local mobile = require('mobile_connection') +local tcp = require('tcp_connection') +local file_connection = require('file_connection') +local module = require('testbase') +-------------------------------------------------------------------------------------------------- +local commonFunctions = require('user_modules/shared_testcases/commonFunctions') +local commonSteps = require('user_modules/shared_testcases/commonSteps') +local commonTestCases = require('user_modules/shared_testcases/commonTestCases') +require('user_modules/AppTypes') + +function DelayedExp() + local event = events.Event() + event.matches = function(self, e) return self == e end + EXPECT_EVENT(event, "Delayed event") + RUN_AFTER(function() + RAISE_EVENT(event, event) + end, 8000) +end + +--------------------------------------------------------------------------------------------------------------- +-- Requirement Id: APPLINK-16147 and SDLAQ-CRS-886 +--------------------------------------------------------------------------------------------------------------- +--APPLINK-18426 +--Verification: OnAppInterfaceUnregistered notification with REQUEST_WHILE_IN_NONE_HMI_LEVEL reason. +-------------------------------------------------------------------------------------------------------------- +--NOTE: TC will be run correctly (returns OnAppInterfaceUnregistered(REQUEST_WHILE_IN_NONE_HMI_LEVEL)) when APPLINK-22795 is completed + +commonFunctions:newTestCasesGroup("TC_APPLINK_ APPLINK-18426: OnAppInterfaceUnregistered(REQUEST_WHILE_IN_NONE_HMI_LEVEL)") + +function Test:APPLINK_18426() + + local AppNotRegisteredReqCount = 0 + for i = 1,10 do + local cid = self.mobileSession:SendRPC("ListFiles", {} ) + end + + EXPECT_RESPONSE("ListFiles") + :ValidIf(function(exp,data) + if + data.payload.resultCode == "APPLICATION_NOT_REGISTERED" then + AppNotRegisteredReqCount = AppNotRegisteredReqCount+1 + print(" \27[32m ListFiles response came with resultCode APPLICATION_NOT_REGISTERED \27[0m") + return true + elseif + exp.occurences ==10 and AppNotRegisteredReqCount == 0 then + print(" \27[36m Response ListFiles with resultCode APPLICATION_NOT_REGISTERED did not came \27[0m") + return false + elseif + data.payload.resultCode == "SUCCESS" then + print(" \27[32m ListFiles response came with resultCode SUCCESS \27[0m") + return true + else + print(" \27[36m ListFiles response came with resultCode "..tostring(data.payload.resultCode .. "\27[0m" )) + return false + end + end) + :Times(AtMost(10)) + + --hmi side: expect BasicCommunication.OnAppUnregistered + EXPECT_HMINOTIFICATION("BasicCommunication.OnAppUnregistered", {appID = self.applications[config.application1.registerAppInterfaceParams.appName], unexpectedDisconnect = false}) + + --mobile side: expect notification + self.mobileSession:ExpectNotification("OnAppInterfaceUnregistered", {{reason = "REQUEST_WHILE_IN_NONE_HMI_LEVEL"}}) + + DelayedExp() +end + +--NOTE: function RegisterAgain_AfterAppIsUnregistered should work after APPLINK-16147 is implemeted +-- function Test:RegisterAgain_AfterAppIsUnregistered() + -- local cid= self.mobileSession:SendRPC("RegisterAppInterface", config.application1.registerAppInterfaceParams) + -- EXPECT_RESPONSE(cid, { success = false, resultCode = "TOO_MANY_PENDING_REQUESTS"}) +-- end \ No newline at end of file diff --git a/test_scripts/API/ATF_OnAppInterfaceUnregistered_TOO_MANY_REQUESTS.lua b/test_scripts/API/ATF_OnAppInterfaceUnregistered_TOO_MANY_REQUESTS.lua new file mode 100644 index 0000000000..9405c4550e --- /dev/null +++ b/test_scripts/API/ATF_OnAppInterfaceUnregistered_TOO_MANY_REQUESTS.lua @@ -0,0 +1,268 @@ +--NOTE:session:ExpectNotification("notification_name", { argument_to_check }) is chanegd to session:ExpectNotification("notification_name", {{ argument_to_check }}) due to defect APPLINK-17030 +--After this defect is done, please reverse to session:ExpectNotification("notification_name", { argument_to_check }) +---------------------------------------------------------------------------------------------------- +-- AppHMILevelNoneTimeScaleMaxRequests = 10 +-- AppHMILevelNoneRequestsTimeScale = 1 +-- AppTimeScaleMaxRequests = 1 +-- AppRequestsTimeScale = 1000 +-------------------------------------------------------------------------------------------------- + +Test = require('connecttest') +require('cardinalities') +local events = require('events') +local mobile_session = require('mobile_session') +local mobile = require('mobile_connection') +local tcp = require('tcp_connection') +local file_connection = require('file_connection') +local module = require('testbase') + +-------------------------------------------------------------------------------------------------- +local commonFunctions = require('user_modules/shared_testcases/commonFunctions') +local commonSteps = require('user_modules/shared_testcases/commonSteps') +local commonTestCases = require('user_modules/shared_testcases/commonTestCases') +require('user_modules/AppTypes') + +------------------------------------------------------------------------------------------------ +---------------------------------Common functions--------------------------------------------------- +------------------------------------------------------------------------------------------------ +function Test:send_Many_Request(app) + + local session + + if app ==1 then + session =self.mobileSession + appName=config.application1.registerAppInterfaceParams.appName + end + + if app ==2 then + session =self.mobileSession1 + appName=config.application2.registerAppInterfaceParams.appName + end + + if app ==3 then + session =self.mobileSession2 + appName=config.application3.registerAppInterfaceParams.appName + end + + local AppNotRegisteredReqCount=0 + + for i = 1,10 do + --mobile side: sending ListFiles request + local cid =session:SendRPC("ListFiles", {} ) + end + + session:ExpectResponse("ListFiles") + :ValidIf(function(exp,data) + if + data.payload.resultCode == "APPLICATION_NOT_REGISTERED" then + AppNotRegisteredReqCount = AppNotRegisteredReqCount+1 + print(" \27[32m ListFiles response came with resultCode APPLICATION_NOT_REGISTERED \27[0m") + return true + elseif + exp.occurences ==10 and AppNotRegisteredReqCount == 0 then + print(" \27[36m Response ListFiles with resultCode APPLICATION_NOT_REGISTERED did not came \27[0m") + return false + elseif + data.payload.resultCode == "SUCCESS" then + print(" \27[32m ListFiles response came with resultCode SUCCESS \27[0m") + return true + else + print(" \27[36m ListFiles response came with resultCode "..tostring(data.payload.resultCode .. "\27[0m" )) + return false + end + + end) + :Times(AtMost(10)) + + --hmi side: expect BasicCommunication.OnAppUnregistered + EXPECT_HMINOTIFICATION("BasicCommunication.OnAppUnregistered", {appID = self.applications[appName], unexpectedDisconnect = false}) + + --mobile side: expect notification + session:ExpectNotification("OnAppInterfaceUnregistered", {{reason = "TOO_MANY_REQUESTS"}}) + +end + +function Test:change_App(appType,isMedia,appID) + config.application1.registerAppInterfaceParams.appHMIType = appType + config.application1.registerAppInterfaceParams.isMediaApplication = isMedia + config.application1.registerAppInterfaceParams.appID=appID +end + +-------------------------------------------------------Precondition-------------------------------------------------- +function Test:Precondition_SecondSession() + self.mobileSession1 = mobile_session.MobileSession( + self, + self.mobileConnection) + + self.mobileSession1:StartService(7) +end + +function Test:Precondition_ThirdSession() + self.mobileSession2 = mobile_session.MobileSession( + self, + self.mobileConnection) + + self.mobileSession2:StartService(7) +end + +--------------------------------------------------------------------------------------------------------- +--Requirement Id: APPLINK-16207 +---------------------------------------------------------------------------------------------------------- +--APPLINK-18427: Check when App is FULL +--Verification: OnAppInterfaceUnregistered notification with TOO_MANY_REQUESTS reason. +---------------------------------------------------------------------------------------------------------- +commonFunctions:newTestCasesGroup("TC_APPLINK_18427: App is FULL, SDL sends OnAppInterfaceUnregistered(TOO_MANY_REQUESTS) when app sends more than 1 requests in 1 second") + +commonSteps:ActivationApp(_,"APPLINK_18427_Case_AppIsFULL_ActivateApp") + +function Test:APPLINK_18427_Case_AppIsFULL() + self:send_Many_Request(1) +end + +function Test:APPLINK_18427_Case_AppIsFULL_RegisterAppAgain() + local cid= self.mobileSession:SendRPC("RegisterAppInterface", config.application1.registerAppInterfaceParams) + EXPECT_RESPONSE(cid, { success = false, resultCode = "TOO_MANY_PENDING_REQUESTS"}) +end + +---------------------------------------------------------------------------------------------------------- +--APPLINK-18427: Check when App is LIMITED +--Verification: OnAppInterfaceUnregistered notification with TOO_MANY_REQUESTS reason when app is LIMITED +------------------------------------------------------------------------------------------------------ +commonFunctions:newTestCasesGroup("TC_APPLINK_18427: App is LIMITED, SDL sends OnAppInterfaceUnregistered(TOO_MANY_REQUESTS) when app sends more than 1 requests in 1 second") +function Test:Change_App_To_MEDIA() + config.application2.registerAppInterfaceParams.appHMIType = {"MEDIA"} + config.application2.registerAppInterfaceParams.isMediaApplication = true +end + +function Test:RegisterAppInterfaceMediaApp() + --mobile side: sending request + local CorIdRegister = self.mobileSession1:SendRPC("RegisterAppInterface", config.application2.registerAppInterfaceParams) + + --hmi side: expect BasicCommunication.OnAppRegistered request + EXPECT_HMINOTIFICATION("BasicCommunication.OnAppRegistered", + { + application = + { + appName = config.application2.registerAppInterfaceParams.appName + } + }) + :Do(function(_,data) + self.applications[config.application2.registerAppInterfaceParams.appName] = data.params.application.appID + end) + + --mobile side: expect response + self.mobileSession1:ExpectResponse(CorIdRegister, + { + syncMsgVersion = config.syncMsgVersion + }) + :Timeout(2000) + + --mobile side: expect notification + self.mobileSession1:ExpectNotification("OnHMIStatus", + {{ + systemContext = "MAIN", hmiLevel = "NONE", audioStreamingState = "NOT_AUDIBLE" + }}) + :Timeout(2000) +end + +function Test:Activate_MediaApp() + local rid = self.hmiConnection:SendRequest("SDL.ActivateApp", { appID = self.applications[config.application2.registerAppInterfaceParams.appName]}) + EXPECT_HMIRESPONSE(rid) + :Do(function(_,data) + if data.result.code ~= 0 then + quit() + end + end) + + self.mobileSession1:ExpectNotification("OnHMIStatus",{{hmiLevel = "FULL", audioStreamingState = "AUDIBLE", systemContext = "MAIN"}}) +end + +function Test:Bring_App_To_Limited() + local cid = self.hmiConnection:SendNotification("BasicCommunication.OnAppDeactivated", + { + appID = self.applications[config.application2.registerAppInterfaceParams.appName] + }) + + self.mobileSession1:ExpectNotification("OnHMIStatus",{{hmiLevel = "LIMITED", audioStreamingState = "AUDIBLE", systemContext = "MAIN"}}) +end + +function Test:APPLINK_18427_Case_AppIsLIMITED() + self:send_Many_Request(2) +end + +function Test:APPLINK_18427_Case_AppIsLIMITED_RegisterAppAgain() + local cid= self.mobileSession1:SendRPC("RegisterAppInterface", config.application2.registerAppInterfaceParams) + self.mobileSession1:ExpectResponse(cid, { success = false, resultCode = "TOO_MANY_PENDING_REQUESTS"}) +end + +------------------------------------------------------------------------------------------------------------ +--APPLINK-18427: Check when App is BACKGROUND +--Verification: OnAppInterfaceUnregistered notification with TOO_MANY_REQUESTS reason when app is BACKGROUND +-------------------------------------------------------------------------------------------------------- +commonFunctions:newTestCasesGroup("TC_APPLINK_18427: App is BACKGROUND, SDL sends OnAppInterfaceUnregistered(TOO_MANY_REQUESTS) when app sends more than 1 requests in 1 second") + +function Test:Change_App_To_NonMEDIA() + config.application3.registerAppInterfaceParams.appHMIType = {"DEFAULT"} + config.application3.registerAppInterfaceParams.isMediaApplication = false +end + +function Test:RegisterAppInterfaceNonMediaApp() + --mobile side: sending request + local CorIdRegister = self.mobileSession2:SendRPC("RegisterAppInterface", config.application3.registerAppInterfaceParams) + + --hmi side: expect BasicCommunication.OnAppRegistered request + EXPECT_HMINOTIFICATION("BasicCommunication.OnAppRegistered", + { + application = + { + appName = config.application3.registerAppInterfaceParams.appName + } + }) + :Do(function(_,data) + self.applications[config.application3.registerAppInterfaceParams.appName] = data.params.application.appID + end) + + --mobile side: expect response + self.mobileSession2:ExpectResponse(CorIdRegister, + { + syncMsgVersion = config.syncMsgVersion + }) + :Timeout(2000) + + --mobile side: expect notification + self.mobileSession2:ExpectNotification("OnHMIStatus", + {{ + systemContext = "MAIN", hmiLevel = "NONE", audioStreamingState = "NOT_AUDIBLE" + }}) + :Timeout(2000) +end + +function Test:Activate_NonMediaApp() + local rid = self.hmiConnection:SendRequest("SDL.ActivateApp", { appID = self.applications[config.application3.registerAppInterfaceParams.appName]}) + EXPECT_HMIRESPONSE(rid) + :Do(function(_,data) + if data.result.code ~= 0 then + quit() + end + end) + + self.mobileSession2:ExpectNotification("OnHMIStatus",{{hmiLevel = "FULL", audioStreamingState = "NOT_AUDIBLE", systemContext = "MAIN"}}) +end + +function Test:Bring_App_To_Background() + local cid = self.hmiConnection:SendNotification("BasicCommunication.OnAppDeactivated", + { + appID = self.applications[config.application3.registerAppInterfaceParams.appName] + }) + + self.mobileSession2:ExpectNotification("OnHMIStatus",{{hmiLevel = "BACKGROUND", audioStreamingState = "NOT_AUDIBLE", systemContext = "MAIN"}}) +end + +function Test:APPLINK_18427_Case_AppIsBACKGROUND() + self:send_Many_Request(3) +end + +function Test:APPLINK_18427_Case_BACKGROUND_RegisterAppAgain() + local cid= self.mobileSession2:SendRPC("RegisterAppInterface", config.application3.registerAppInterfaceParams) + self.mobileSession2:ExpectResponse(cid, { success = false, resultCode = "TOO_MANY_PENDING_REQUESTS"}) +end diff --git a/test_scripts/API/ATF_OnAppUnregistered.lua b/test_scripts/API/ATF_OnAppUnregistered.lua new file mode 100644 index 0000000000..6878c3a03a --- /dev/null +++ b/test_scripts/API/ATF_OnAppUnregistered.lua @@ -0,0 +1,737 @@ +--------------------------------------------------------------------------------------------- +--ATF version: 2.2 +--Modified date: 01/Dec/2015 +--Author: Ta Thanh Dong +--------------------------------------------------------------------------------------------- +-------------------------------------------------------------------------------- +-- Preconditions +-------------------------------------------------------------------------------- +local commonPreconditions = require('user_modules/shared_testcases/commonPreconditions') + +-------------------------------------------------------------------------------- +--Precondition: preparation connecttest_OnAppUnregistered.lua +commonPreconditions:Connecttest_without_ExitBySDLDisconnect("connecttest_OnAppUnregistered.lua") + +--ToDo: shall be removed when APPLINK-16610 is fixed +config.defaultProtocolVersion = 2 + + function Precondition_ArchivateINI() + commonPreconditions:BackupFile("smartDeviceLink.ini") + end + +-------------------------------------------------------------------------------- +-------------------------------------------------------------------------------- + +Test = require('user_modules/connecttest_OnAppUnregistered') +local mobile_session = require('mobile_session') +local mobile = require("mobile_connection") +local tcp = require("tcp_connection") +local file_connection = require("file_connection") +require('cardinalities') +local events = require('events') + +--------------------------------------------------------------------------------------------- +-----------------------------Required Shared Libraries--------------------------------------- +--------------------------------------------------------------------------------------------- +require('user_modules/AppTypes') +local commonFunctions = require('user_modules/shared_testcases/commonFunctions') +local commonSteps = require('user_modules/shared_testcases/commonSteps') +local policyTable = require('user_modules/shared_testcases/testCasesForPolicyTable') + +config.deviceMAC = "12ca17b49af2289436f303e0166030a21e525d266e209267433801a8fd4071a0" + +local appIDAndDeviceMac = config.application1.registerAppInterfaceParams.appID.. "_" .. config.deviceMAC.. "/" +local storagePath = config.pathToSDL .. "storage/" .. config.application1.registerAppInterfaceParams.appID .. "_" .. config.deviceMAC .. "/" +local strAppFolder = storagePath..appIDAndDeviceMac +local strIvsu_cacheFolder = "/tmp/fs/mp/images/ivsu_cache/" + + +--------------------------------------------------------------------------------------------- +------------------------------------ Common Variables --------------------------------------- +--------------------------------------------------------------------------------------------- + +APIName = "OnAppUnregistered" -- set request name + +--------------------------------------------------------------------------------------------- + + + +NewTestSuiteNumber = 0 -- use as subfix of test case "NewTestSuite" to make different test case name. + + +local function startSession(self) + + self.mobileSession= mobile_session.MobileSession(self, self.mobileConnection) + + --configure HB and protocol + self.mobileSession.version = 3 + self.mobileSession:SetHeartbeatTimeout(7000) + + --start session + self.mobileSession:StartService(7) + --start HB in case you need and protocol version is 3 + self.mobileSession:StartHeartbeat() + +end + + +local function StopSDL_StartSDL_InitHMI_ConnectMobile(TestCaseSubfix) + --Postconditions: Stop SDL, start SDL again, start HMI, connect to SDL, start mobile, start new session. + + Test["StopSDL_" .. TestCaseSubfix] = function(self) + StopSDL() + end + + Test["StartSDL_" .. TestCaseSubfix] = function(self) + StartSDL(config.pathToSDL, config.ExitOnCrash) + end + + Test["InitHMI_" .. TestCaseSubfix] = function(self) + self:initHMI() + end + + Test["InitHMI_onReady_" .. TestCaseSubfix] = function(self) + self:initHMI_onReady() + end + + + Test["ConnectMobile_" .. TestCaseSubfix] = function(self) + self:connectMobile() + end + + Test["StartSession_" .. TestCaseSubfix] = function(self) + --self:startSession_WithoutRegisterApp() + startSession(self) + end + +end + +--------------------------------------------------------------------------------------------- +-------------------------------------------Preconditions------------------------------------- +--------------------------------------------------------------------------------------------- + + --Print new line to separate Preconditions + commonFunctions:newTestCasesGroup("Preconditions") + + --1. Delete policy table + commonSteps:DeletePolicyTable() + + --2. Delete app_info.dat and log files + os.remove(config.pathToSDL .. "app_info.dat") + os.remove(config.pathToSDL .. "*.log") + + + --3. Update policy to allow request + --TODO: Will be updated after policy flow implementation + policyTable:Precondition_updatePolicy_By_overwriting_preloaded_pt("files/PTU_ForOnAppUnregistered_05.json") + + --4. removing user_modules/connecttest_OnAppUnregistered.lua + function Test:Precondition_remove_user_connecttest() + os.execute( "rm -f ./user_modules/connecttest_OnAppUnregistered.lua" ) + end + + + --Print new line to separate test suite + commonFunctions:newTestCasesGroup("Test Suite For TCs") +--------------------------------------------------------------------------------------------- +--SDLAQ-TC-423: TC_OnAppUnregistered_01: +--APPLINK-16314: 23[P][MAN]_TC_OnAppUnregistered_after_HB_timeout_disconnection +--------------------------------------------------------------------------------------------- + + + local function TC_OnAppUnregistered_01() + + --Print new line to separate new test cases group + commonFunctions:newTestCasesGroup("Test case: TC_OnAppUnregistered_01, 23[P][MAN]_TC_OnAppUnregistered_after_HB_timeout_disconnection") + + --Precondition + function Test:Unregister_Application_01() + + local cid = self.mobileSession:SendRPC("UnregisterAppInterface",{}) + + EXPECT_RESPONSE(cid, { success = true, resultCode = "SUCCESS"}) + :Timeout(2000) + end + + function Test:Register_App_Interface_And_Store_appID_01() + + --mobile side: send RegisterAppInterface request + local CorIdRegister = self.mobileSession:SendRPC("RegisterAppInterface", { + syncMsgVersion = + { + majorVersion = 3, + minorVersion = 1 + }, + appName = "SPT", + isMediaApplication = false, + languageDesired = 'EN-US', + hmiDisplayLanguageDesired = 'EN-US', + appHMIType = { "DEFAULT" }, + appID = "1234567", + deviceInfo = + { + os = "Android", + carrier = "Megafon", + firmwareRev = "Name: Linux, Version: 3.4.0-perf", + osVersion = "4.4.2", + maxNumberRFCOMMPorts = 1 + } + }) + + --hmi side: expect BasicCommunication.OnAppRegistered request + EXPECT_HMINOTIFICATION("BasicCommunication.OnAppRegistered", + { + application = + { + appName = "SPT", + policyAppID = "1234567" + } + }) + :Do(function(_,data) + self.applications["SPT"] = data.params.application.appID + end) + + --mobile side: expect response + self.mobileSession:ExpectResponse(CorIdRegister, {success = true, resultCode = "SUCCESS"}) + + --mobile side: expect notification + self.mobileSession:ExpectNotification("OnHMIStatus", { systemContext = "MAIN", hmiLevel = "NONE", audioStreamingState = "NOT_AUDIBLE"}) + + end + + function Test:IgnoreHeartbeatOnMobile_01() + self.mobileSession.sendHeartbeatToSDL = false + self.mobileSession.answerHeartbeatFromSDL = false + end + + function Test:Wait_14_seconds_And_Verify_OnAppUnregistered_01() + + --hmi side: expect BasicCommunication.OnAppUnregistered + EXPECT_HMINOTIFICATION("BasicCommunication.OnAppUnregistered", {appID = self.applications["SPT"], unexpectedDisconnect = true}) + :Timeout(15000) + :Do(function() + self.mobileSession:StopHeartbeat() + end) + + end + + function Test:ConnectMobileAgain_01() + --self:connectMobile() + local tcpConnection = tcp.Connection(config.mobileHost, config.mobilePort) + local fileConnection = file_connection.FileConnection("mobile.out", tcpConnection) + self.mobileConnection = mobile.MobileConnection(fileConnection) + self.mobileSession= mobile_session.MobileSession( + self, + self.mobileConnection) + event_dispatcher:AddConnection(self.mobileConnection) + self.mobileSession:ExpectEvent(events.connectedEvent, "Connection started") + self.mobileConnection:Connect() + end + + function Test:StartSession_01() + startSession(self) + end + + function Test:Register_App_Interface_Again_And_Verify_appID_Is_Not_Changed_01() + + + local CorIdRegister = self.mobileSession:SendRPC("RegisterAppInterface", { + syncMsgVersion = + { + majorVersion = 3, + minorVersion = 1 + }, + appName = "SPT", + isMediaApplication = false, + languageDesired = 'EN-US', + hmiDisplayLanguageDesired = 'EN-US', + appHMIType = { "DEFAULT" }, + appID = "1234567", + deviceInfo = + { + os = "Android", + carrier = "Megafon", + firmwareRev = "Name: Linux, Version: 3.4.0-perf", + osVersion = "4.4.2", + maxNumberRFCOMMPorts = 1 + } + }) + + --hmi side: expect BasicCommunication.OnAppRegistered request + EXPECT_HMINOTIFICATION("BasicCommunication.OnAppRegistered", + { + application = + { + appName = "SPT", + policyAppID = "1234567", + appID = self.applications["SPT"] + } + }) + + --mobile side: expect response + self.mobileSession:ExpectResponse(CorIdRegister, {success = true, resultCode = "SUCCESS"}) + + --mobile side: expect notification + self.mobileSession:ExpectNotification("OnHMIStatus", {systemContext = "MAIN", hmiLevel = "NONE", audioStreamingState = "NOT_AUDIBLE"}) + + end + + end + + TC_OnAppUnregistered_01() + + + +--------------------------------------------------------------------------------------------- +--SDLAQ-TC-424: TC_OnAppUnregistered_02 +--APPLINK-16315: 24[P][MAN]_TC_OnAppUnregistered_after_transport_disconnected +--------------------------------------------------------------------------------------------- + local function TC_OnAppUnregistered_02() + + --Print new line to separate new test cases group + commonFunctions:newTestCasesGroup("Test case: TC_OnAppUnregistered_02, 24[P][MAN]_TC_OnAppUnregistered_after_transport_disconnected") + + --Precondition + function Test:Unregister_Application_02() + + local cid = self.mobileSession:SendRPC("UnregisterAppInterface",{}) + + EXPECT_RESPONSE(cid, { success = true, resultCode = "SUCCESS"}) + :Timeout(2000) + end + + function Test:StopHeartBeat_02() + self.mobileSession:StopHeartbeat() + end + + function Test:Register_App_Interface_And_Store_appID_02() + + --mobile side: send RegisterAppInterface request + local CorIdRegister = self.mobileSession:SendRPC("RegisterAppInterface", { + syncMsgVersion = + { + majorVersion = 3, + minorVersion = 1 + }, + appName = "SPT", + isMediaApplication = false, + languageDesired = 'EN-US', + hmiDisplayLanguageDesired = 'EN-US', + appHMIType = { "DEFAULT" }, + appID = "1234567", + deviceInfo = + { + os = "Android", + carrier = "Megafon", + firmwareRev = "Name: Linux, Version: 3.4.0-perf", + osVersion = "4.4.2", + maxNumberRFCOMMPorts = 1 + } + }) + + --hmi side: expect BasicCommunication.OnAppRegistered request + EXPECT_HMINOTIFICATION("BasicCommunication.OnAppRegistered", + { + application = + { + appName = "SPT", + policyAppID = "1234567" + } + }) + :Do(function(_,data) + self.applications["SPT"] = data.params.application.appID + end) + + --mobile side: expect response + self.mobileSession:ExpectResponse(CorIdRegister, {success = true}) + + --mobile side: expect notification + self.mobileSession:ExpectNotification("OnHMIStatus", { systemContext = "MAIN", hmiLevel = "NONE", audioStreamingState = "NOT_AUDIBLE"}) + + end + + function Test:MobileCloseConnection_Verify_OnAppUnregistered_02() + + --mobile side: close connection + self.mobileConnection:Close() + + --hmi side: expect BasicCommunication.OnAppUnregistered + EXPECT_HMINOTIFICATION("BasicCommunication.OnAppUnregistered", {appID = self.applications["SPT"], unexpectedDisconnect = true}) + + end + + function Test:ConnectMobileAgain_02() + self:connectMobile() + end + + function Test:StartSession_02() + --self:startSession_WithoutRegisterApp() + startSession(self) + end + + function Test:Register_App_Interface_Again_And_Verify_appID_Is_Not_Changed_02() + + + local CorIdRegister = self.mobileSession:SendRPC("RegisterAppInterface", { + syncMsgVersion = + { + majorVersion = 3, + minorVersion = 1 + }, + appName = "SPT", + isMediaApplication = false, + languageDesired = 'EN-US', + hmiDisplayLanguageDesired = 'EN-US', + appHMIType = { "DEFAULT" }, + appID = "1234567", + deviceInfo = + { + os = "Android", + carrier = "Megafon", + firmwareRev = "Name: Linux, Version: 3.4.0-perf", + osVersion = "4.4.2", + maxNumberRFCOMMPorts = 1 + } + }) + + --hmi side: expect BasicCommunication.OnAppRegistered request + EXPECT_HMINOTIFICATION("BasicCommunication.OnAppRegistered", + { + application = + { + appName = "SPT", + policyAppID = "1234567", + appID = self.applications["SPT"] + } + }) + + --mobile side: expect response + self.mobileSession:ExpectResponse(CorIdRegister, {success = true, resultCode = "SUCCESS"}) + + --mobile side: expect notification + self.mobileSession:ExpectNotification("OnHMIStatus", {systemContext = "MAIN", hmiLevel = "NONE", audioStreamingState = "NOT_AUDIBLE"}) + + end + + + end + + TC_OnAppUnregistered_02() + + + +--------------------------------------------------------------------------------------------- +--SDLAQ-TC-429: TC_OnAppUnregistered_05 +--APPLINK-18356: 25[P][MAN]_TC_OnAppUnregistered_if_appName_doesn't_match_nickname_in_PT +--------------------------------------------------------------------------------------------- + local function TC_OnAppUnregistered_05() + --Print new line to separate new test cases group + commonFunctions:newTestCasesGroup("Test case: TC_OnAppUnregistered_05, 25[P][MAN]_TC_OnAppUnregistered_if_appName_doesn't_match_nickname_in_PT") + + --Preconditions: Stop SDL, start SDL again, start HMI, connect to SDL, start mobile, start new session. + StopSDL_StartSDL_InitHMI_ConnectMobile("05_precondition") + --------------------------------------------------------------------------------------------- + + function Test:Register_App_Interface_05() + + + local CorIdRegister = self.mobileSession:SendRPC("RegisterAppInterface", { + syncMsgVersion = + { + majorVersion = 3, + minorVersion = 1 + }, + appName = "SPT", + isMediaApplication = false, + languageDesired = 'EN-US', + hmiDisplayLanguageDesired = 'EN-US', + appHMIType = { "DEFAULT" }, + appID = "1234567", + deviceInfo = + { + os = "Android", + carrier = "Megafon", + firmwareRev = "Name: Linux, Version: 3.4.0-perf", + osVersion = "4.4.2", + maxNumberRFCOMMPorts = 1 + } + }) + + --hmi side: expect BasicCommunication.OnAppRegistered request + EXPECT_HMINOTIFICATION("BasicCommunication.OnAppRegistered", + { + application = + { + appName = "SPT" + } + }) + :Do(function(_,data) + self.applications["SPT"] = data.params.application.appID + end) + + --mobile side: expect response + self.mobileSession:ExpectResponse(CorIdRegister, { success = true, resultCode = "SUCCESS"}) + + --mobile side: expect notification + self.mobileSession:ExpectNotification("OnHMIStatus", + { + systemContext = "MAIN", hmiLevel = "NONE", audioStreamingState = "NOT_AUDIBLE" + }) + + end + + function Test:Activation_App_05() + + local Input_AppId = self.applications["SPT"] + + --hmi side: sending SDL.ActivateApp request + local RequestId = self.hmiConnection:SendRequest("SDL.ActivateApp", { appID = Input_AppId}) + EXPECT_HMIRESPONSE(RequestId) + :Do(function(_,data) + if + data.result.isSDLAllowed ~= true then + local RequestId = self.hmiConnection:SendRequest("SDL.GetUserFriendlyMessage", {language = "EN-US", messageCodes = {"DataConsent"}}) + + --hmi side: expect SDL.GetUserFriendlyMessage message response + --TODO: update after resolving APPLINK-16094. + --EXPECT_HMIRESPONSE(RequestId,{result = {code = 0, method = "SDL.GetUserFriendlyMessage"}}) + EXPECT_HMIRESPONSE(RequestId) + :Do(function(_,data) + --hmi side: send request SDL.OnAllowSDLFunctionality + self.hmiConnection:SendNotification("SDL.OnAllowSDLFunctionality", {allowed = true, source = "GUI", device = {id = config.deviceMAC, name = "127.0.0.1"}}) + + --hmi side: expect BasicCommunication.ActivateApp request + EXPECT_HMICALL("BasicCommunication.ActivateApp") + :Do(function(_,data) + --hmi side: sending BasicCommunication.ActivateApp response + self.hmiConnection:SendResponse(data.id,"BasicCommunication.ActivateApp", "SUCCESS", {}) + end) + :Times(AnyNumber()) + end) + + end + end) + + --mobile side: expect notification + EXPECT_NOTIFICATION("OnHMIStatus", {hmiLevel = "FULL", systemContext = "MAIN"}) + end + + function Test:UpdatePolicyFromMobile_APP_UNAUTHORIZED_05() + + --mobile side: sending SystemRequest request + local CorIdSystemRequest = self.mobileSession:SendRPC("SystemRequest", + { + fileName = "PolicyTableUpdate", + requestType = "HTTP" + }, + "files/PTU_ForOnAppUnregistered_05.json") + + + --hmi side: expect SystemRequest request + EXPECT_HMICALL("BasicCommunication.SystemRequest", {requestType = "HTTP", fileName = "/tmp/fs/mp/images/ivsu_cache/PolicyTableUpdate"}) + :Do(function(_,data) + systemRequestId = data.id + + --hmi side: sending BasicCommunication.OnSystemRequest request to SDL + self.hmiConnection:SendNotification("SDL.OnReceivedPolicyUpdate", {policyfile = "/tmp/fs/mp/images/ivsu_cache/PolicyTableUpdate"}) + + function to_run() + --hmi side: sending SystemRequest response + self.hmiConnection:SendResponse(systemRequestId,"BasicCommunication.SystemRequest", "SUCCESS", {}) + end + + RUN_AFTER(to_run, 500) + end) + + + --hmi side: expect SDL.OnAppPermissionChanged + EXPECT_HMINOTIFICATION("SDL.OnAppPermissionChanged", {appID = self.applications["SPT"], appUnauthorized = true, priority = "NORMAL"}) + :Do(function(_,data) + + --hmi side: sending SDL.GetUserFriendlyMessage request to SDL + local RequestIdGetUserFriendlyMessage = self.hmiConnection:SendRequest("SDL.GetUserFriendlyMessage", {language = "EN-US", messageCodes = {"AppUnauthorized"}}) + + --hmi side: expect SDL.GetUserFriendlyMessage response + EXPECT_HMIRESPONSE(RequestIdGetUserFriendlyMessage,{result = {code = 0, method = "SDL.GetUserFriendlyMessage", messages = {{ + line1 = "Not Authorized", + messageCode = "AppUnauthorized", + textBody = "This version of %appName% is no longer authorized to work with Mobile Apps. Please update to the latest version of %appName%.", + ttsString = "This version of %appName% is not authorized and will not work with SYNC."}}}}) + end) + + + --hmi side: expect BasicCommunication.OnAppUnregistered + EXPECT_HMINOTIFICATION("BasicCommunication.OnAppUnregistered", {appID = self.applications["SPT"], unexpectedDisconnect = false}) + + + --mobile side: expect notification + self.mobileSession:ExpectNotification("OnAppInterfaceUnregistered", {reason = "APP_UNAUTHORIZED"}) + + + EXPECT_HMICALL("BasicCommunication.UpdateAppList") + :Do(function(_, data) + self.hmiConnection:SendResponse(data.id, data.method, "SUCCESS", { }) + end) + :ValidIf (function(_,data) + for _, app in pairs(data.params.applications) do + if app.appID == self.applications["SPT"] then + commonFunctions:printError(" Application is not removed on AppsList ") + return false + end + end + + return true + + end) + + --mobile side: expect response + self.mobileSession:ExpectResponse(CorIdSystemRequest, {success = true, resultCode = "SUCCESS"}) + end + + end + + --TODO: For now TC_OnAppUnregistered_05 ( covering of 25[P][MAN]_TC_OnAppUnregistered_if_appName_doesn't_match_nickname_in_PT(APPLINK-18356)) is blocked by ATF defect APPLINK-19188 + --TC_OnAppUnregistered_05() + + +--------------------------------------------------------------------------------------------- +--SDLAQ-TC-430: TC_OnAppUnregistered_06 +--APPLINK-18357: 26[P][MAN]_TC_OnAppUnregistered_if_IGNOF/MASTER_RESET/FACTORY_DEFAULTS +--------------------------------------------------------------------------------------------- + local function TC_OnAppUnregistered_06() + --Print new line to separate new test cases group + commonFunctions:newTestCasesGroup("Test case: TC_OnAppUnregistered_06, 26[P][MAN]_TC_OnAppUnregistered_if_IGNOF/MASTER_RESET/FACTORY_DEFAULTS") + + + local function Register_App_Interface(TestCaseName) + + Test[TestCaseName] = function(self) + + + local CorIdRegister = self.mobileSession:SendRPC("RegisterAppInterface", { + syncMsgVersion = + { + majorVersion = 3, + minorVersion = 1 + }, + appName = "SPT_05", + isMediaApplication = false, + languageDesired = 'EN-US', + hmiDisplayLanguageDesired = 'EN-US', + appHMIType = { "DEFAULT" }, + appID = "1234567_05", + deviceInfo = + { + os = "Android", + carrier = "Megafon", + firmwareRev = "Name: Linux, Version: 3.4.0-perf", + osVersion = "4.4.2", + maxNumberRFCOMMPorts = 1 + } + }) + + --hmi side: expect BasicCommunication.OnAppRegistered request + EXPECT_HMINOTIFICATION("BasicCommunication.OnAppRegistered", + { + application = + { + appName = "SPT_05" + } + }) + :Do(function(_,data) + self.applications["SPT_05"] = data.params.application.appID + end) + + --mobile side: expect response + self.mobileSession:ExpectResponse(CorIdRegister, { success = true, resultCode = "SUCCESS"}) + + --mobile side: expect notification + self.mobileSession:ExpectNotification("OnHMIStatus", { systemContext = "MAIN", hmiLevel = "NONE", audioStreamingState = "NOT_AUDIBLE"}) + + end + + end + + --Preconditions: Stop SDL, start SDL again, start HMI, connect to SDL, start mobile, start new session. + StopSDL_StartSDL_InitHMI_ConnectMobile("06_1_precondition") + + Register_App_Interface("Register_App_Interface_06_1") + + function Test:OnAppUnregistered_IGNITION_OFF_06() + + --hmi side: sending BasicCommunication.OnSystemRequest request to SDL + self.hmiConnection:SendNotification("BasicCommunication.OnExitAllApplications", {reason = "IGNITION_OFF"}) + + --hmi side: expect BasicCommunication.OnAppUnregistered + EXPECT_HMINOTIFICATION("BasicCommunication.OnAppUnregistered", {appID = self.applications["SPT_05"], unexpectedDisconnect = false}) + + --mobile side: expect notification + self.mobileSession:ExpectNotification("OnAppInterfaceUnregistered", {reason = "IGNITION_OFF"}) + + end + + --Postconditions: Stop SDL, start SDL again, start HMI, connect to SDL, start mobile, start new session. + StopSDL_StartSDL_InitHMI_ConnectMobile("06_1_postcondition") + --------------------------------------------------------------------------------------------- + + Register_App_Interface("Register_App_Interface_06_2") + + function Test:OnAppUnregistered_FACTORY_DEFAULTS_06() + + --hmi side: sending BasicCommunication.OnSystemRequest request to SDL + self.hmiConnection:SendNotification("BasicCommunication.OnExitAllApplications", {reason = "FACTORY_DEFAULTS"}) + + --hmi side: expect BasicCommunication.OnAppUnregistered + EXPECT_HMINOTIFICATION("BasicCommunication.OnAppUnregistered", {appID = self.applications["SPT_05"], unexpectedDisconnect = false}) + + --mobile side: expect notification + self.mobileSession:ExpectNotification("OnAppInterfaceUnregistered", {reason = "FACTORY_DEFAULTS"}) + + end + + + --Postconditions: Stop SDL, start SDL again, start HMI, connect to SDL, start mobile, start new session. + StopSDL_StartSDL_InitHMI_ConnectMobile("06_2_postcondition") + --------------------------------------------------------------------------------------------- + + Register_App_Interface("Register_App_Interface_06_3") + + function Test:OnAppUnregistered_MASTER_RESET_06() + + --hmi side: sending BasicCommunication.OnSystemRequest request to SDL + self.hmiConnection:SendNotification("BasicCommunication.OnExitAllApplications", {reason = "MASTER_RESET"}) + + --hmi side: expect BasicCommunication.OnAppUnregistered + EXPECT_HMINOTIFICATION("BasicCommunication.OnAppUnregistered", {appID = self.applications["SPT_05"], unexpectedDisconnect = false}) + + --mobile side: expect notification + self.mobileSession:ExpectNotification("OnAppInterfaceUnregistered", {reason = "MASTER_RESET"}) + + end + --------------------------------------------------------------------------------------------- + + + + end + + TC_OnAppUnregistered_06() + +--------------------------------------------------------------------------------------------- +-------------------------------------------Postcondition------------------------------------- +--------------------------------------------------------------------------------------------- + + --Print new line to separate Postconditions + commonFunctions:newTestCasesGroup("Postconditions") + + function Test:Postcondition_StopSDL_IfItIsExist() + StopSDL() + end + + --Restore sdl_preloaded_pt.json + policyTable:Restore_preloaded_pt() + + + + return Test + + diff --git a/test_scripts/API/ATF_OnAudioDataStreaming_OnVideoDataStreaming.lua b/test_scripts/API/ATF_OnAudioDataStreaming_OnVideoDataStreaming.lua new file mode 100644 index 0000000000..e805f8f707 --- /dev/null +++ b/test_scripts/API/ATF_OnAudioDataStreaming_OnVideoDataStreaming.lua @@ -0,0 +1,982 @@ +-- ATF version: 2.2 +-- Script is developed by Byanova Irina + +Test = require('connecttest') +require('cardinalities') +local mobile_session = require('mobile_session') + +--------------------------------------------------------------------------------------------- +-----------------------------Required Shared Libraries--------------------------------------- +--------------------------------------------------------------------------------------------- +require('user_modules/AppTypes') +local commonSteps = require('user_modules/shared_testcases/commonSteps') +local commonTestCases = require('user_modules/shared_testcases/commonTestCases') +local commonFunctions = require('user_modules/shared_testcases/commonFunctions') + +--------------------------------------------------------------------------------------------- +-------------------------------------------User functions------------------------------------ +--------------------------------------------------------------------------------------------- + +local function ActivationApp(self, iappID) + + -- hmi side: sending SDL.ActivateApp request + local RequestId = self.hmiConnection:SendRequest("SDL.ActivateApp", { appID = iappID}) + + -- hmi side: expect SDL.ActivateApp response + EXPECT_HMIRESPONSE(RequestId) + :Do(function(_,data) + -- In case when app is not allowed, it is needed to allow app + if + data.result.isSDLAllowed ~= true then + + -- hmi side: sending SDL.GetUserFriendlyMessage request + local RequestId = self.hmiConnection:SendRequest("SDL.GetUserFriendlyMessage", + {language = "EN-US", messageCodes = {"DataConsent"}}) + + -- hmi side: expect SDL.GetUserFriendlyMessage response + -- TODO: comment until resolving APPLINK-16094 + -- EXPECT_HMIRESPONSE(RequestId,{result = {code = 0, method = "SDL.GetUserFriendlyMessage"}}) + EXPECT_HMIRESPONSE(RequestId) + :Do(function(_,data) + + -- hmi side: send request SDL.OnAllowSDLFunctionality + self.hmiConnection:SendNotification("SDL.OnAllowSDLFunctionality", + {allowed = true, source = "GUI", device = {id = config.deviceMAC, name = "127.0.0.1"}}) + -- {allowed = true, source = "GUI", device = {id = 1, name = "127.0.0.1"}}) + + -- hmi side: expect BasicCommunication.ActivateApp request + EXPECT_HMICALL("BasicCommunication.ActivateApp") + :Do(function(_,data) + + -- hmi side: sending BasicCommunication.ActivateApp response + self.hmiConnection:SendResponse(data.id,"BasicCommunication.ActivateApp", "SUCCESS", {}) + + end) + :Times(2) + end) + + end + end) + + self.mobileSession:ExpectNotification("OnHMIStatus", + { systemContext = "MAIN", hmiLevel = "FULL", audioStreamingState = "AUDIBLE"}) +end + + +local function OpenSessionRegisterApp(self) + + config.application1.registerAppInterfaceParams.appHMIType = { "NAVIGATION" } + + self.mobileSession = mobile_session.MobileSession( + self, + self.mobileConnection) + + self.mobileSession:StartService(7) + :Do(function() + local CorIdRAI = self.mobileSession:SendRPC("RegisterAppInterface", config.application1.registerAppInterfaceParams) + + EXPECT_HMINOTIFICATION("BasicCommunication.OnAppRegistered", + { + application = + { + appName = config.application1.registerAppInterfaceParams.appName + } + }) + :Do(function(_,data) + local appId = data.params.application.appID + self.appId = appId + end) + + self.mobileSession:ExpectResponse(CorIdRAI, { + success = true, + resultCode = "SUCCESS" + }) + :Timeout(2000) + + self.mobileSession:ExpectNotification("OnHMIStatus", + { systemContext = "MAIN", hmiLevel = "NONE", audioStreamingState = "NOT_AUDIBLE"}) + :Timeout(2000) + + commonTestCases:DelayedExp(1000) + + end) +end + +local function RestartSDL( prefix, UpdateAudioDataStoppedTimeout, ValueToUpdate, UpdateVideoDataStoppedTimeout, ValueToUpdateVideo) + + Test["StopSDL_" .. tostring(prefix) ] = function(self) + commonFunctions:userPrint(35, "================= Precondition ==================") + StopSDL() + + commonTestCases:DelayedExp(1000) + end + + -- Updaete AudioDataStoppedTimeout value in .ini file + if UpdateAudioDataStoppedTimeout then + Test["UpdateAudioDataStoppedTimeout_" .. tostring(prefix) ] = function(self) + commonFunctions:SetValuesInIniFile("%p?AudioDataStoppedTimeout%s?=%s-[%w%d,-]-%s-\n", "AudioDataStoppedTimeout", ValueToUpdate ) + end + end + + -- Updaete VideoDataStoppedTimeout value in .ini file + if UpdateVideoDataStoppedTimeout then + Test["Precondition_UpdateVideoDataStoppedTimeout_" .. tostring(prefix) ] = function(self) + commonFunctions:SetValuesInIniFile("%p?VideoDataStoppedTimeout%s?=%s-[%w%d,-]-%s-\n", "VideoDataStoppedTimeout", ValueToUpdateVideo ) + end + end + + Test["StartSDL_" .. tostring(prefix) ] = function(self) + StartSDL(config.pathToSDL, config.ExitOnCrash) + end + + Test["InitHMI_" .. tostring(prefix) ] = function(self) + self:initHMI() + end + + Test["InitHMI_onReady_" .. tostring(prefix) ] = function(self) + self:initHMI_onReady() + end + + Test["ConnectMobile_" .. tostring(prefix) ] = function(self) + self:connectMobile() + end + + Test["RegisterApp_" .. tostring(prefix)] = function(self) + OpenSessionRegisterApp(self) + end + +end + +-- Audio streaming +local function StartAudioServiceAndStreaming(self) + self.mobileSession:StartService(10) + + EXPECT_HMICALL("Navigation.StartAudioStream") + :Do(function(exp,data) + self.hmiConnection:SendResponse(data.id, data.method, "SUCCESS", { }) + function to_run2() + -- os.execute( " sleep 1 " ) + self.mobileSession:StartStreaming(10,"files/Kalimba.mp3") + end + + RUN_AFTER(to_run2, 1500) + end) +end + +local StopAudioStreamingTime +local function StopAudioStreaming(self) + self.mobileSession:StopStreaming("files/Kalimba.mp3") + StopAudioStreamingTime = timestamp() +end + + +-- Video streaming +local StopVideoStreamingTime +local function StopVideoStreaming(self) + self.mobileSession:StopStreaming("files/Wildlife.wmv") + StopVideoStreamingTime = timestamp() +end + +local function StartVideoServiceAndStreaming(self) + self.mobileSession:StartService(11) + + EXPECT_HMICALL("Navigation.StartStream") + :Do(function(_,data) + self.hmiConnection:SendResponse(data.id, data.method, "SUCCESS", { }) + function to_run2() + -- os.execute( " sleep 1 " ) + self.mobileSession:StartStreaming(11,"files/Wildlife.wmv") + end + + RUN_AFTER(to_run2, 1500) + end) +end + +local function StreammingsAfterSDLRestart(self, prefix, AudioStream, VideoStream, UpdateAudioDataStoppedTimeout, ValueToUpdate, ValueToExpect, UpdateVideoDataStoppedTimeout, ValueToUpdateVideo, ValueToExpectVideo) + + RestartSDL(prefix,UpdateAudioDataStoppedTimeout, ValueToUpdate, UpdateVideoDataStoppedTimeout, ValueToUpdateVideo ) + + --Precondition: Activate app + Test["ActivateApp_" .. tostring(prefix)] = function(self) + ActivationApp(self, self.appId) + end + + if AudioStream == true then + + Test["StartAudioServiceStreaming_" .. tostring(prefix)] = function(self) + + self.mobileSession:StartService(10) + + EXPECT_HMICALL("Navigation.StartAudioStream") + :Do(function(exp,data) + self.hmiConnection:SendResponse(data.id, data.method, "SUCCESS", { }) + function to_run2() + -- os.execute( " sleep 1 " ) + self.mobileSession:StartStreaming(10,"files/Kalimba.mp3") + end + + RUN_AFTER(to_run2, 300) + end) + + EXPECT_HMINOTIFICATION("Navigation.OnAudioDataStreaming", {available = true}) + + commonTestCases:DelayedExp(2000) + end + + + Test["StopAudioStreaming_" .. tostring(prefix)] = function(self) + + StopAudioStreaming(self) + + EXPECT_HMICALL("Navigation.StopAudioStream") + :Times(0) + + EXPECT_HMINOTIFICATION("Navigation.OnAudioDataStreaming", {available = false}) + :Timeout(11000 + ValueToExpect) + :ValidIf(function(_,data) + local currentTime = timestamp() + local TimeToAvailableFalse = currentTime - StopAudioStreamingTime + + if TimeToAvailableFalse > ValueToExpect then + commonFunctions:userPrint(31, "Time to OnAudioDataStreaming(available = false) is " .. tostring(TimeToAvailableFalse)) + return false + else + commonFunctions:userPrint(33, "Time to OnAudioDataStreaming(available = false) is " .. tostring(TimeToAvailableFalse)) + return true + end + end) + end + + Test["StopAudioService_" .. tostring(prefix)] = function(self) + + self.mobileSession:StopService(10) + + EXPECT_HMICALL("Navigation.StopAudioStream") + :Do(function(_,data) + self.hmiConnection:SendResponse(data.id, data.method, "SUCCESS", { }) + end) + end + end + + ----------------------------------- + + if VideoStream == true then + Test["StartVideoServiceStreaming_" .. tostring(prefix)] = function(self) + + self.mobileSession:StartService(11) + + EXPECT_HMICALL("Navigation.StartStream") + :Do(function(_,data) + self.hmiConnection:SendResponse(data.id, data.method, "SUCCESS", { }) + self.mobileSession:StartStreaming(11,"files/Wildlife.wmv") + end) + + EXPECT_HMINOTIFICATION("Navigation.OnVideoDataStreaming", {available = true}) + :Timeout(11000 + ValueToExpectVideo) + + commonTestCases:DelayedExp(2000) + end + + + Test["StopVideoStreaming_" .. tostring(prefix)] = function(self) + + StopVideoStreaming(self) + + EXPECT_HMINOTIFICATION("Navigation.OnVideoDataStreaming", {available = false}) + :ValidIf(function(_,data) + local currentTime = timestamp() + local TimeToAvailableFalse = currentTime - StopAudioStreamingTime + + if TimeToAvailableFalse > ValueToExpectVideo then + commonFunctions:userPrint(31, "Time to OnVideoDataStreaming(available = false) is " .. tostring(TimeToAvailableFalse)) + return false + else + commonFunctions:userPrint(33, "Time to OnVideoDataStreaming(available = false) is " .. tostring(TimeToAvailableFalse)) + return true + end + end) + end + + Test["StopAudioService_" .. tostring(prefix)] = function(self) + + self.mobileSession:StopService(11) + + EXPECT_HMICALL("Navigation.StopStream") + :Do(function(_,data) + self.hmiConnection:SendResponse(data.id, data.method, "SUCCESS", { }) + end) + end + end + + Test["UnregisterApp_" .. tostring(prefix)] = function(self) + + --mobile side: UnregisterAppInterface request + local CorIdUAI = self.mobileSession:SendRPC("UnregisterAppInterface",{}) + + --hmi side: expect OnAppUnregistered notification + EXPECT_HMINOTIFICATION("BasicCommunication.OnAppUnregistered", {appID = self.appID, unexpectedDisconnect = false}) + + --mobile side: UnregisterAppInterface response + EXPECT_RESPONSE(CorIdUAI, { success = true, resultCode = "SUCCESS"}) + :Timeout(2000) + end + +end + +commonFunctions:userPrint(33, " Audio and Video time measured in script is approximate. Please check SDL log to make sure that time of audio and video timeout is correct. ") + +-- Precondition: Respore .ini file +function Test:RestoreIniFile() + commonSteps:RestoreIniFile() +end + +--////////////////////////////////////////////////////////////////////////////////////////////-- +-- Audio streaming +--////////////////////////////////////////////////////////////////////////////////////////////-- + +-- TODO: APPLINK-22275: According to customer comment from APPLINK-11709 for now SDL does not validate wrong type of AudioDataStoppedTimeout. In case of adding implementation according to type validation please add test cases to set. + +-- APPLINK-18043: 12[P][MAN]_TC_SDL_initializes_ AudioDataStoppedTimeout_from_ini.file +-- APPLINK-18041: 10[P][MAN]_TC_SDL_sends_OnAudioDataStreaming_in_FULL +--======================================================================================-- +-- AudioDataStoppedTimeout = 5000, SDL sends OnAudioDataStreaming(true) by streaming start, OnAudioDataStreaming(false) in 5 seconds after mobile stops send audio data +--======================================================================================-- +commonFunctions:newTestCasesGroup(" AudioDataStoppedTimeout = 5000, SDL sends OnAudioDataStreaming(false) in 5 seconds after mobile stops send audio data") + +StreammingsAfterSDLRestart(self, "OnAudioDataStreaming_in5sec_afterStopStreaming", true, _, true, "5000", 5000) + +-- APPLINK-18043: 12[P][MAN]_TC_SDL_initializes_ AudioDataStoppedTimeout_from_ini.file +--======================================================================================-- +-- AudioDataStoppedTimeout = 10000, SDL sends OnAudioDataStreaming(true) by streaming start, OnAudioDataStreaming(false) in 10 seconds after mobile stops send audio data +--======================================================================================-- +commonFunctions:newTestCasesGroup(" AudioDataStoppedTimeout = 10000, SDL sends OnAudioDataStreaming(false) in 10 seconds after mobile stops send audio data") + +StreammingsAfterSDLRestart(self, "OnAudioDataStreaming_in10sec_afterStopStreaming", true, _, true, "10000", 10000) + +-- APPLINK-18043: 12[P][MAN]_TC_SDL_initializes_ AudioDataStoppedTimeout_from_ini.file +--======================================================================================-- +-- AudioDataStoppedTimeout = -1, SDL apply default value 1 second and sends OnAudioDataStreaming(false) in 1 second after mobile stops send audio data +--======================================================================================-- +commonFunctions:newTestCasesGroup(" AudioDataStoppedTimeout = -1, SDL sends OnAudioDataStreaming(false) in 1 second after mobile stops send audio data") + +StreammingsAfterSDLRestart(self, "AudioTimeoutIsNegativeValue_OnAudioDataStreaming_in1sec_afterStopStreaming", true, _, true, "-1", 1000) + +-- APPLINK-18043: 12[P][MAN]_TC_SDL_initializes_ AudioDataStoppedTimeout_from_ini.file +--======================================================================================-- +-- AudioDataStoppedTimeout = 0, SDL apply value 0 second and sends OnAudioDataStreaming(false) right after mobile stops send audio data +--======================================================================================-- +commonFunctions:newTestCasesGroup(" AudioDataStoppedTimeout = 0, SDL sends OnAudioDataStreaming(false) right after mobile stops send audio data") + +StreammingsAfterSDLRestart(self, "AudioTimeoutIsNill_OnAudioDataStreaming_right_afterStopStreaming", true, _, true, "0", 0) + +--======================================================================================-- +-- AudioDataStoppedTimeout is commented, SDL apply default value 1 second and sends OnAudioDataStreaming(false) in 1 second after mobile stops send audio data +--======================================================================================-- +commonFunctions:newTestCasesGroup(" AudioDataStoppedTimeout is commented, SDL sends OnAudioDataStreaming(false) in 1 second after mobile stops send audio data") + +StreammingsAfterSDLRestart(self, "AudioTimeoutIsAbsentInIniFile_OnAudioDataStreaming_in1sec_afterStopStreaming", true, _, true, ";", 1000) + +--======================================================================================-- +-- AudioDataStoppedTimeout = 10000, SDL does not send OnAudioDataStreaming in case mobile app stops and resumes audio streaming before AudioDataStoppedTimeout is expired +--======================================================================================-- +commonFunctions:newTestCasesGroup(" SDL does not send OnAudioDataStreaming in case mobile app stops and resumes audio streaming before AudioDataStoppedTimeout is expired ") + +RestartSDL("SetAudioTimeout_to10000",true, "10000" ) + +--Precondition: Activate app +function Test:ActivateApp_AbsenceOnAudioDataStreamingByStartStopStreamingInAudioDataStoppedTimeout() + ActivationApp(self, self.appId) +end + +function Test:StartAudioServiceStreaming_AbsenceOnAudioDataStreamingByStartStopStreamingInAudioDataStoppedTimeout() + + StartAudioServiceAndStreaming(self) + + EXPECT_HMINOTIFICATION("Navigation.OnAudioDataStreaming", {available = true}) + :Timeout(17000) + + commonTestCases:DelayedExp(7000) +end + +function Test:AbsenceOnAudioDataStreamingByStartStopStreamingInAudioDataStoppedTimeout() + + EXPECT_HMINOTIFICATION("Navigation.OnAudioDataStreaming") + :Times(0) + + function StopStream1() + self.mobileSession:StopStreaming("files/Kalimba.mp3") + end + + function StartStream1() + self.mobileSession:StartStreaming(10,"files/Kalimba.mp3") + end + + function StopStream2() + self.mobileSession:StopStreaming("files/Kalimba.mp3") + end + + function StartStream2() + self.mobileSession:StartStreaming(10,"files/Kalimba.mp3") + end + + RUN_AFTER(StopStream1,5000) + RUN_AFTER(StartStream1,10000) + RUN_AFTER(StopStream2,15000) + RUN_AFTER(StartStream2,20000) + + commonTestCases:DelayedExp(25000) + +end + +function Test:StopAudioStreaming_AbsenceOnAudioDataStreamingByStartStopStreamingInAudioDataStoppedTimeout() + StopAudioStreaming(self) + + EXPECT_HMICALL("Navigation.StopAudioStream") + :Times(0) + + EXPECT_HMINOTIFICATION("Navigation.OnAudioDataStreaming", {available = false}) + :Timeout(21000) + :Do(function(_,data) + + local currentTime = timestamp() + local TimeToAvailableFalse = currentTime - StopAudioStreamingTime + + if TimeToAvailableFalse > 1000 then + commonFunctions:userPrint(31, "Time to OnAudioDataStreaming(available = false) is " .. tostring(TimeToAvailableFalse)) + else + commonFunctions:userPrint(33, "Time to OnAudioDataStreaming(available = false) is " .. tostring(TimeToAvailableFalse)) + end + end) +end + +function Test:StopAudioService_AbsenceOnAudioDataStreamingByStartStopStreamingInAudioDataStoppedTimeout() + + self.mobileSession:StopService(10) + + EXPECT_HMICALL("Navigation.StopAudioStream") + :Do(function(_,data) + self.hmiConnection:SendResponse(data.id, data.method, "SUCCESS", { }) + end) +end + +function Test:UnregisterApp_AbsenceOnAudioDataStreamingByStartStopStreamingInAudioDataStoppedTimeout() + --mobile side: UnregisterAppInterface request + local CorIdUAI = self.mobileSession:SendRPC("UnregisterAppInterface",{}) + + --hmi side: expect OnAppUnregistered notification + EXPECT_HMINOTIFICATION("BasicCommunication.OnAppUnregistered", {appID = self.appID, unexpectedDisconnect = false}) + + --mobile side: UnregisterAppInterface response + EXPECT_RESPONSE(CorIdUAI, { success = true, resultCode = "SUCCESS"}) + :Timeout(2000) + +end + +--////////////////////////////////////////////////////////////////////////////////////////////-- +-- Video streaming +--////////////////////////////////////////////////////////////////////////////////////////////-- + +-- TODO: APPLINK-22275: According to customer comment from APPLINK-11709 for now SDL does not validate wrong type of VideoDataStoppedTimeout. In case of adding implementation according to type validation please add test cases to set. + +-- APPLINK-18042: 11[P][MAN]_TC_SDL_initializes_VideoDataStoppedTimeout_from_ini.file +-- APPLINK-18039: 09[P][MAN]_TC_SDL_sends_OnVideoDataStreaming_in_FULL +--======================================================================================-- +-- VideoDataStoppedTimeout = 5000, SDL sends OnVideoDataStreaming(true) by streaming start, OnVideoDataStreaming(false) in 5 seconds after mobile stops send video data +--======================================================================================-- +commonFunctions:newTestCasesGroup(" VideoDataStoppedTimeout = 5000, SDL sends OnVideoDataStreaming(false) in 5 seconds after mobile stops send video data") + +StreammingsAfterSDLRestart(self, "OnVideoDataStreaming_in5sec_afterStopStreaming", _, true, _, _, _, true, "5000", 5000) + +-- APPLINK-18042: 11[P][MAN]_TC_SDL_initializes_VideoDataStoppedTimeout_from_ini.file +--======================================================================================-- +-- VideoDataStoppedTimeout = 10000, SDL sends OnVideoDataStreaming(true) by streaming start, OnVideoDataStreaming(false) in 10 seconds after mobile stops send video data +--======================================================================================-- +commonFunctions:newTestCasesGroup(" VideoDataStoppedTimeout = 10000, SDL sends OnVideoDataStreaming(false) in 10 seconds after mobile stops send video data") + +StreammingsAfterSDLRestart(self, "OnVideoDataStreaming_in10sec_afterStopStreaming", _, true, _, _, _, true, "10000", 10000) + +-- APPLINK-18042: 11[P][MAN]_TC_SDL_initializes_VideoDataStoppedTimeout_from_ini.file +--======================================================================================-- +-- VideoDataStoppedTimeout = -1, SDL apply default value 1 second and sends OnVideoDataStreaming(false) in 1 second after mobile stops send video data +--======================================================================================-- +commonFunctions:newTestCasesGroup(" VideoDataStoppedTimeout = -1, SDL sends OnVideoDataStreaming(false) in 1 second after mobile stops send video data") + +StreammingsAfterSDLRestart(self, "VideoTimeoutIsNegativeValue_OnVideoDataStreaming_in1sec_afterStopStreaming", _, true, _, _, _, true, "-1", 1000) + +-- APPLINK-18042: 11[P][MAN]_TC_SDL_initializes_VideoDataStoppedTimeout_from_ini.file +--======================================================================================-- +-- VideoDataStoppedTimeout = 0, SDL apply value 0 second and sends OnVideoDataStreaming(false) right after mobile stops send video data +--======================================================================================-- +commonFunctions:newTestCasesGroup(" VideoDataStoppedTimeout = 0, SDL sends OnVideoDataStreaming(false) right after mobile stops send video data") + +StreammingsAfterSDLRestart(self, "VideoTimeoutIsNill_OnVideoDataStreaming_right_afterStopStreaming", _, true, _, _, _, true, "0", 0) + +--======================================================================================-- +-- VideoDataStoppedTimeout is commented, SDL apply default value 1 second and sends OnVideoDataStreaming(false) in 1 second after mobile stops send video data +--======================================================================================-- +commonFunctions:newTestCasesGroup(" VideoDataStoppedTimeout is commented, SDL sends OnVideoDataStreaming(false) in 1 second after mobile stops send video data") + +StreammingsAfterSDLRestart(self, "VideoTimeoutIsAbsentInIniFile_OnVideoDataStreaming_in1sec_afterStopStreaming", _, true, _, _, _, true, ";", 1000) + +--======================================================================================-- +-- VideoDataStoppedTimeout = 10000, SDL does not send OnVideoDataStreaming(false) in case mobile app stops and resumes video streaming before VideoDataStoppedTimeout is expired +--======================================================================================-- +commonFunctions:newTestCasesGroup(" SDL does not send OnVideoDataStreaming(false) in case mobile app stops and resumes video streaming before VideoDataStoppedTimeout is expired ") + +RestartSDL("SetVideoTimeout_to10000", _, _, true, "10000") + +--Precondition: Activate app +function Test:ActivateApp_AbsenceOnVideoDataStreamingByStartStopStreamingInVideoDataStoppedTimeout() + ActivationApp(self, self.appId) +end + +function Test:StartVideoServiceStreaming_AbsenceOnVideoDataStreamingByStartStopStreamingInVideoDataStoppedTimeout() + + StartVideoServiceAndStreaming(self) + + EXPECT_HMINOTIFICATION("Navigation.OnVideoDataStreaming", {available = true}) + :Timeout(17000) + + commonTestCases:DelayedExp(7000) +end + +function Test:AbsenceOnVideoDataStreamingByStartStopStreamingInVideoDataStoppedTimeout() + + EXPECT_HMINOTIFICATION("Navigation.OnVideoDataStreaming") + :Times(0) + + function StopStream1() + self.mobileSession:StopStreaming("files/Wildlife.wmv") + end + + function StartStream1() + self.mobileSession:StartStreaming(11,"files/Wildlife.wmv") + end + + function StopStream2() + self.mobileSession:StopStreaming("files/Wildlife.wmv") + end + + function StartStream2() + self.mobileSession:StartStreaming(11,"files/Wildlife.wmv") + end + + RUN_AFTER(StopStream1,5000) + RUN_AFTER(StartStream1,10000) + RUN_AFTER(StopStream2,15000) + RUN_AFTER(StartStream2,20000) + + commonTestCases:DelayedExp(25000) + +end + +function Test:StopVideoStreaming_AbsenceOnVideoDataStreamingByStartStopStreamingInVideoDataStoppedTimeout() + StopVideoStreaming(self) + + EXPECT_HMICALL("Navigation.StopStream") + :Times(0) + + EXPECT_HMINOTIFICATION("Navigation.OnVideoDataStreaming", {available = false}) + :Timeout(21000) + :Do(function(_,data) + + local currentTime = timestamp() + local TimeToAvailableFalse = currentTime - StopAudioStreamingTime + + if TimeToAvailableFalse > 1000 then + commonFunctions:userPrint(31, "Time to OnVideoDataStreaming(available = false) is " .. tostring(TimeToAvailableFalse)) + else + commonFunctions:userPrint(33, "Time to OnVideoDataStreaming(available = false) is " .. tostring(TimeToAvailableFalse)) + end + end) +end + +function Test:StopVideoService_AbsenceOnVideoDataStreamingByStartStopStreamingInVideoDataStoppedTimeout() + + self.mobileSession:StopService(11) + + EXPECT_HMICALL("Navigation.StopStream") + :Do(function(_,data) + self.hmiConnection:SendResponse(data.id, data.method, "SUCCESS", { }) + end) +end + +function Test:UnregisterApp_AbsenceOnVideoDataStreamingByStartStopStreamingInVideoDataStoppedTimeout() + --mobile side: UnregisterAppInterface request + local CorIdUAI = self.mobileSession:SendRPC("UnregisterAppInterface",{}) + + --hmi side: expect OnAppUnregistered notification + EXPECT_HMINOTIFICATION("BasicCommunication.OnAppUnregistered", {appID = self.appID, unexpectedDisconnect = false}) + + --mobile side: UnregisterAppInterface response + EXPECT_RESPONSE(CorIdUAI, { success = true, resultCode = "SUCCESS"}) + :Timeout(2000) + +end + +--////////////////////////////////////////////////////////////////////////////////////////////-- +-- Video, Audio streaming +--////////////////////////////////////////////////////////////////////////////////////////////-- + +--======================================================================================-- +-- Start Video streaming in case Audio streaming is in process +--======================================================================================-- +commonFunctions:newTestCasesGroup(" SDL sends OnVideoDataStreaming(available = true) in case audio streaming is processed ") + +RestartSDL("SetVideoAudioTimeout_to5000", true, "5000", true, "5000") + +function Test:ActivateApp_StartVideoService_WhenAudioDataProcesses() + ActivationApp(self, self.appId) +end + +function Test:StartAudioVideoServices() + + self.mobileSession:StartService(10) + + EXPECT_HMICALL("Navigation.StartAudioStream") + :Do(function(_,data) + self.hmiConnection:SendResponse(data.id, data.method, "SUCCESS", { }) + end) + + self.mobileSession:StartService(11) + + EXPECT_HMICALL("Navigation.StartStream") + :Do(function(_,data) + self.hmiConnection:SendResponse(data.id, data.method, "SUCCESS", { }) + end) + +end + +function Test:StartAudioStreaming() + + self.mobileSession:StartStreaming(10,"files/Kalimba.mp3") + + EXPECT_HMINOTIFICATION("Navigation.OnAudioDataStreaming", {available = true}) + +end + +function Test:StartVideoService_WhenAudioDataProcesses() + + self.mobileSession:StartStreaming(11,"files/Wildlife.wmv") + + EXPECT_HMINOTIFICATION("Navigation.OnVideoDataStreaming", {available = true}) + +end + +--======================================================================================-- +-- Start Audio streaming in case Video streaming is in process +--======================================================================================-- +commonFunctions:newTestCasesGroup(" SDL sends OnAudioDataStreaming(available = true) in case video streaming is processed ") + +function Test:StopAudioService() + + self.mobileSession:StopStreaming("files/Kalimba.mp3") + + EXPECT_HMINOTIFICATION("Navigation.OnAudioDataStreaming", {available = false}) + +end + +function Test:StartAudioStreaming_WhenVideoDataProcesses() + + self.mobileSession:StartStreaming(10,"files/Kalimba.mp3") + + EXPECT_HMINOTIFICATION("Navigation.OnAudioDataStreaming", {available = true}) + +end + + +function Test:StopVideoAudioServices() + + self.mobileSession:StopService(11) + self.mobileSession:StopService(10) + + EXPECT_HMICALL("Navigation.StopStream") + :Do(function(_,data) + self.hmiConnection:SendResponse(data.id, data.method, "SUCCESS", { }) + end) + + EXPECT_HMICALL("Navigation.StopAudioStream") + :Do(function(_,data) + self.hmiConnection:SendResponse(data.id, data.method, "SUCCESS", { }) + end) +end + +function Test:UnregisterApp_AbsenceOnVideoDataStreamingByStartStopStreamingInVideoDataStoppedTimeout() + --mobile side: UnregisterAppInterface request + local CorIdUAI = self.mobileSession:SendRPC("UnregisterAppInterface",{}) + + --hmi side: expect OnAppUnregistered notification + EXPECT_HMINOTIFICATION("BasicCommunication.OnAppUnregistered", {appID = self.appID, unexpectedDisconnect = false}) + + --mobile side: UnregisterAppInterface response + EXPECT_RESPONSE(CorIdUAI, { success = true, resultCode = "SUCCESS"}) + :Timeout(2000) + +end + +--======================================================================================-- +-- SDL does not sends OnVideoDataStreaming, OnAudioDataStreaming to HMI in case mobile app starts streaming without opened service +--======================================================================================-- +commonFunctions:newTestCasesGroup(" SDL does not sends OnVideoDataStreaming, OnAudioDataStreaming to HMI in case mobile app starts streaming without opened service ") + +RestartSDL("SetVideoAudioTimeout_to5000", true, "5000", true, "5000") + +function Test:ActivateApp_WihoutStartingService() + ActivationApp(self, self.appId) +end + +function Test:StartAudioStreaming_WihoutStartingService() + + self.mobileSession:StartStreaming(10,"files/Kalimba.mp3") + + EXPECT_HMINOTIFICATION("Navigation.OnAudioDataStreaming") + :Times(0) + + commonTestCases:DelayedExp(1000) + +end + +function Test:StartVideoService_WhenAudioDataProcesses_WihoutStartingService() + + self.mobileSession:StartStreaming(11,"files/Wildlife.wmv") + + EXPECT_HMINOTIFICATION("Navigation.OnVideoDataStreaming") + :Times(0) + + commonTestCases:DelayedExp(1000) + +end + +--======================================================================================-- +-- SDL sends OnVideoDataStreaming, OnAudioDataStreaming in LIMITED HMI level +--======================================================================================-- + +commonFunctions:newTestCasesGroup(" SDL sends OnVideoDataStreaming, OnAudioDataStreaming in LIMITED HMI level ") + +RestartSDL("SetVideoAudioTimeout_to5000", true, "5000", true, "5000") + +function Test:BringAppToLimited() + -- hmi side: sending SDL.ActivateApp request + local RequestId = self.hmiConnection:SendRequest("SDL.ActivateApp", { appID = self.appId}) + + -- hmi side: expect SDL.ActivateApp response + EXPECT_HMIRESPONSE(RequestId) + :Do(function(_,data) + -- In case when app is not allowed, it is needed to allow app + if + data.result.isSDLAllowed ~= true then + + -- hmi side: sending SDL.GetUserFriendlyMessage request + local RequestId = self.hmiConnection:SendRequest("SDL.GetUserFriendlyMessage", + {language = "EN-US", messageCodes = {"DataConsent"}}) + + -- hmi side: expect SDL.GetUserFriendlyMessage response + -- TODO: comment until resolving APPLINK-16094 + -- EXPECT_HMIRESPONSE(RequestId,{result = {code = 0, method = "SDL.GetUserFriendlyMessage"}}) + EXPECT_HMIRESPONSE(RequestId) + :Do(function(_,data) + + -- hmi side: send request SDL.OnAllowSDLFunctionality + self.hmiConnection:SendNotification("SDL.OnAllowSDLFunctionality", + {allowed = true, source = "GUI", device = {id = config.deviceMAC, name = "127.0.0.1"}}) + -- {allowed = true, source = "GUI", device = {id = 1, name = "127.0.0.1"}}) + + -- hmi side: expect BasicCommunication.ActivateApp request + EXPECT_HMICALL("BasicCommunication.ActivateApp") + :Do(function(_,data) + + -- hmi side: sending BasicCommunication.ActivateApp response + self.hmiConnection:SendResponse(data.id,"BasicCommunication.ActivateApp", "SUCCESS", {}) + + end) + :Times(2) + end) + + end + end) + + self.mobileSession:ExpectNotification("OnHMIStatus", + { systemContext = "MAIN", hmiLevel = "FULL", audioStreamingState = "AUDIBLE"}, + { systemContext = "MAIN", hmiLevel = "LIMITED", audioStreamingState = "AUDIBLE"}) + :Do(function(_, data) + -- hmi side: sending BasicCommunication.OnAppDeactivated notification + self.hmiConnection:SendNotification("BasicCommunication.OnAppDeactivated", {appID = self.appId}) + end) + :Times(2) +end + +function Test:StartAudioVideoServices_Limited() + + self.mobileSession:StartService(10) + + EXPECT_HMICALL("Navigation.StartAudioStream") + :Do(function(_,data) + self.hmiConnection:SendResponse(data.id, data.method, "SUCCESS", { }) + end) + + self.mobileSession:StartService(11) + + EXPECT_HMICALL("Navigation.StartStream") + :Do(function(_,data) + self.hmiConnection:SendResponse(data.id, data.method, "SUCCESS", { }) + end) + +end + + +function Test:StartAudioVideoStreaming_Limited() + + self.mobileSession:StartStreaming(10,"files/Kalimba.mp3") + self.mobileSession:StartStreaming(11,"files/Wildlife.wmv") + + EXPECT_HMINOTIFICATION("Navigation.OnAudioDataStreaming", {available = true}) + EXPECT_HMINOTIFICATION("Navigation.OnVideoDataStreaming", {available = true}) + +end + +function Test:StopStreamings_Limited() + self.mobileSession:StopStreaming("files/Kalimba.mp3") + + EXPECT_HMINOTIFICATION("Navigation.OnAudioDataStreaming", {available = false}) + + self.mobileSession:StopStreaming("files/Wildlife.wmv") + + EXPECT_HMINOTIFICATION("Navigation.OnVideoDataStreaming", {available = false}) + +end + +-- APPLINK-18037: 07[N][MAN]_TC_Video_streaming_is_not_available_in_BACKGROUND +-- APPLINK-18038: 08[N][MAN]_TC_Audio_streaming_is_not_available_in_BACKGROUND +--======================================================================================-- +-- SDL doe not send OnVideoDataStreaming, OnAudioDataStreaming in Background HMI level +--======================================================================================-- +commonFunctions:newTestCasesGroup(" SDL doe not send OnVideoDataStreaming, OnAudioDataStreaming in Background HMI level ") + +function Test:BringAppToBackground() + config.application2.registerAppInterfaceParams.appHMIType = { "NAVIGATION" } + + self.mobileSession1 = mobile_session.MobileSession( + self, + self.mobileConnection) + + self.mobileSession1:StartService(7) + :Do(function() + local CorIdRAI = self.mobileSession1:SendRPC("RegisterAppInterface", config.application2.registerAppInterfaceParams) + + EXPECT_HMINOTIFICATION("BasicCommunication.OnAppRegistered", + { + application = + { + appName = config.application2.registerAppInterfaceParams.appName + } + }) + :Do(function(_,data) + local appId = data.params.application.appID + self.appId2 = appId + end) + + self.mobileSession1:ExpectResponse(CorIdRAI, { + success = true, + resultCode = "SUCCESS" + }) + :Timeout(2000) + + self.mobileSession1:ExpectNotification("OnHMIStatus", + { systemContext = "MAIN", hmiLevel = "NONE", audioStreamingState = "NOT_AUDIBLE"}, + { systemContext = "MAIN", hmiLevel = "FULL", audioStreamingState = "AUDIBLE"}) + :Times(2) + :DoOnce(function(_,data) + -- hmi side: sending SDL.ActivateApp request + local RequestId = self.hmiConnection:SendRequest("SDL.ActivateApp", { appID = self.appId2 }) + + -- hmi side: expect SDL.ActivateApp response + EXPECT_HMIRESPONSE(RequestId) + :Do(function(_,data) + -- In case when app is not allowed, it is needed to allow app + if + data.result.isSDLAllowed ~= true then + + -- hmi side: sending SDL.GetUserFriendlyMessage request + local RequestId = self.hmiConnection:SendRequest("SDL.GetUserFriendlyMessage", + {language = "EN-US", messageCodes = {"DataConsent"}}) + + -- hmi side: expect SDL.GetUserFriendlyMessage response + -- TODO: comment until resolving APPLINK-16094 + -- EXPECT_HMIRESPONSE(RequestId,{result = {code = 0, method = "SDL.GetUserFriendlyMessage"}}) + EXPECT_HMIRESPONSE(RequestId) + :Do(function(_,data) + + -- hmi side: send request SDL.OnAllowSDLFunctionality + self.hmiConnection:SendNotification("SDL.OnAllowSDLFunctionality", + {allowed = true, source = "GUI", device = {id = config.deviceMAC, name = "127.0.0.1"}}) + -- {allowed = true, source = "GUI", device = {id = 1, name = "127.0.0.1"}}) + + -- hmi side: expect BasicCommunication.ActivateApp request + EXPECT_HMICALL("BasicCommunication.ActivateApp") + :Do(function(_,data) + + -- hmi side: sending BasicCommunication.ActivateApp response + self.hmiConnection:SendResponse(data.id,"BasicCommunication.ActivateApp", "SUCCESS", {}) + + end) + :Times(2) + end) + + end + end) + + self.mobileSession:ExpectNotification("OnHMIStatus", + { systemContext = "MAIN", hmiLevel = "BACKGROUND", audioStreamingState = "NOT_AUDIBLE"}) + end) + + end) +end + +function Test:StartAudioVideoStreaming_Background() + + self.mobileSession:StartStreaming(10,"files/Kalimba.mp3") + self.mobileSession:StartStreaming(11,"files/Wildlife.wmv") + + EXPECT_HMINOTIFICATION("Navigation.OnAudioDataStreaming") + :Times(0) + + EXPECT_HMINOTIFICATION("Navigation.OnVideoDataStreaming") + :Times(0) + + + local event = events.Event() + event.matches = function(_, data) + return data.frameType == 0 and + (data.serviceType == 11 or + data.serviceType == 10) and + data.sessionId == self.mobileSession.sessionId and + (data.frameInfo == 5 or -- End Service ACK + data.frameInfo == 6) -- End Service NACK + end + self.mobileSession:ExpectEvent(event, "EndService ACK") + :Timeout(60000) + :Times(2) + :ValidIf(function(s, data) + if data.frameInfo == 5 then return true + else return false, "EndService NACK received" end + end) + + commonTestCases:DelayedExp(1000) + +end + +function Test:StopStreamings_Background() + self.mobileSession:StopStreaming("files/Kalimba.mp3") + + EXPECT_HMINOTIFICATION("Navigation.OnAudioDataStreaming") + :Times(0) + + self.mobileSession:StartStreaming(10,"files/Kalimba.mp3") + + EXPECT_HMINOTIFICATION("Navigation.OnAudioDataStreaming") + :Times(0) + +end + + + diff --git a/test_scripts/API/ATF_OnButtonPress.lua b/test_scripts/API/ATF_OnButtonPress.lua new file mode 100644 index 0000000000..4635a501c9 --- /dev/null +++ b/test_scripts/API/ATF_OnButtonPress.lua @@ -0,0 +1,1301 @@ +--------------------------------------------------------------------------------------------- +--ATF version: 2.2 +--Last modified date: 03/Dec/2015 +--Author: Ta Thanh Dong +--------------------------------------------------------------------------------------------- + +-------------------------------------------------------------------------------- +-- Preconditions +-------------------------------------------------------------------------------- +local commonPreconditions = require('user_modules/shared_testcases/commonPreconditions') + +-------------------------------------------------------------------------------- +--Precondition: preparation connecttest_OnButton.lua +commonPreconditions:Connecttest_without_ExitBySDLDisconnect("connecttest_OnButton.lua") +commonPreconditions:Connecttest_OnButtonSubscription("connecttest_OnButton.lua") +--Precondition: preparation connecttest_OnButton.lua + f = assert(io.open('./user_modules/connecttest_OnButton.lua', "r")) + + fileContent = f:read("*all") + f:close() + + local pattern2 = "%{%s-capabilities%s-=%s-%{.-%}" + local pattern2Result = fileContent:match(pattern2) + + if pattern2Result == nil then + print(" \27[31m capabilities array is not found in /user_modules/connecttest_OnButton.lua \27[0m ") + else + fileContent = string.gsub(fileContent, pattern2, '{capabilities = {button_capability("PRESET_0"),button_capability("PRESET_1"),button_capability("PRESET_2"),button_capability("PRESET_3"),button_capability("PRESET_4"),button_capability("PRESET_5"),button_capability("PRESET_6"),button_capability("PRESET_7"),button_capability("PRESET_8"),button_capability("PRESET_9"),button_capability("OK", true, false, true),button_capability("SEEKLEFT"),button_capability("SEEKRIGHT"),button_capability("TUNEUP"),button_capability("TUNEDOWN"),button_capability("SEARCH")}') + end + + f = assert(io.open('./user_modules/connecttest_OnButton.lua', "w+")) + f:write(fileContent) + f:close() + +Test = require('user_modules/connecttest_OnButton') +require('cardinalities') +local events = require('events') +local mobile_session = require('mobile_session') + +--------------------------------------------------------------------------------------------- +-----------------------------Required Shared Libraries--------------------------------------- +--------------------------------------------------------------------------------------------- +local commonFunctions = require('user_modules/shared_testcases/commonFunctions') +local commonSteps = require('user_modules/shared_testcases/commonSteps') +local commonTestCases = require('user_modules/shared_testcases/commonTestCases') +local testCasesForPolicyTable = require('user_modules/shared_testcases/testCasesForPolicyTable') +require('user_modules/AppTypes') + +APIName = "OnButtonPress" -- set API name +NewTestSuiteNumber = 0 -- use as subfix of test case "NewTestSuite" to make different test case name. + +config.deviceMAC = "12ca17b49af2289436f303e0166030a21e525d266e209267433801a8fd4071a0" + +Apps = {} +Apps[1] = {} +Apps[1].storagePath = config.pathToSDL .. "storage/"..config.application1.registerAppInterfaceParams.appID.. "_" .. config.deviceMAC.. "/" +Apps[1].appName = config.application1.registerAppInterfaceParams.appName +Apps[1].isMedia = commonFunctions:isMediaApp() +Apps[2] = {} +Apps[2].appName = config.application2.registerAppInterfaceParams.appName +Apps[3] = {} +Apps[3].appName = config.application3.registerAppInterfaceParams.appName + +if config.application1.registerAppInterfaceParams.isMediaApplication == true then + + ButtonNames_WithoutCUSTOM_BUTTON = { + "OK", + "SEEKLEFT", + "SEEKRIGHT", + "TUNEUP", + "TUNEDOWN", + "PRESET_0", + "PRESET_1", + "PRESET_2", + "PRESET_3", + "PRESET_4", + "PRESET_5", + "PRESET_6", + "PRESET_7", + "PRESET_8", + "PRESET_9", + "SEARCH" + } + + ButtonNames_WithoutCUSTOM_BUTTON_OK = { + "SEEKLEFT", + "SEEKRIGHT", + "TUNEUP", + "TUNEDOWN", + "PRESET_0", + "PRESET_1", + "PRESET_2", + "PRESET_3", + "PRESET_4", + "PRESET_5", + "PRESET_6", + "PRESET_7", + "PRESET_8", + "PRESET_9", + "SEARCH" + } + +else --Non-media app + +-- According to APPLINK-14516: The media buttons are Tune Up\Down, Seek Right\Left, and PRESET_0-PRESET_9. + ButtonNames_WithoutCUSTOM_BUTTON = { + "OK", + "SEARCH" + } + + ButtonNames_WithoutCUSTOM_BUTTON_OK = { + "SEARCH" + } +end + +-- group of media buttons, this group should be update also with PRESETS 0-9 due to APPLINK-14516 (APPLINK-14503) +local MediaButtons = { + "SEEKLEFT", + "SEEKRIGHT", + "TUNEUP", + "TUNEDOWN", + -- "PRESET_0", + -- "PRESET_1", + -- "PRESET_2", + -- "PRESET_3", + -- "PRESET_4", + -- "PRESET_5", + -- "PRESET_6", + -- "PRESET_7", + -- "PRESET_8", + -- "PRESET_9" + } + +local ButtonNames_OK = {"OK"} +local ButtonNames_CUSTOM_BUTTON = {"CUSTOM_BUTTON"} +local ButtonPressModes = {"SHORT", "LONG"} +local CustomButtonIDs = {0, 65535} + +--------------------------------------------------------------------------------------------- +------------------------------------------Common functions----------------------------------- +--------------------------------------------------------------------------------------------- +--Parameter: AppNumber is optional +local function ActivationApp(TestCaseName, AppNumber, SessionNumber) + + Test[TestCaseName] = function(self) + + local Input_AppId = Apps[AppNumber].appID + + --hmi side: sending SDL.ActivateApp request + local RequestId = self.hmiConnection:SendRequest("SDL.ActivateApp", { appID = Input_AppId}) + EXPECT_HMIRESPONSE(RequestId) + :Do(function(_,data) + if + data.result.isSDLAllowed ~= true then + local RequestId = self.hmiConnection:SendRequest("SDL.GetUserFriendlyMessage", {language = "EN-US", messageCodes = {"DataConsent"}}) + + --hmi side: expect SDL.GetUserFriendlyMessage message response + EXPECT_HMIRESPONSE(RequestId) + :Do(function(_,data) + --hmi side: send request SDL.OnAllowSDLFunctionality + self.hmiConnection:SendNotification("SDL.OnAllowSDLFunctionality", {allowed = true, source = "GUI", device = {id = config.deviceMAC, name = "127.0.0.1"}}) + + --hmi side: expect BasicCommunication.ActivateApp request + EXPECT_HMICALL("BasicCommunication.ActivateApp") + :Do(function(_,data) + --hmi side: sending BasicCommunication.ActivateApp response + self.hmiConnection:SendResponse(data.id,"BasicCommunication.ActivateApp", "SUCCESS", {}) + end) + :Times(AnyNumber()) + end) + end + end) + + --mobile side: expect notification + if SessionNumber == 1 then + self.mobileSession1:ExpectNotification("OnHMIStatus", {hmiLevel = "FULL", systemContext = "MAIN"}) + elseif SessionNumber == 2 then + self.mobileSession2:ExpectNotification("OnHMIStatus", {hmiLevel = "FULL", systemContext = "MAIN"}) + elseif SessionNumber == 3 then + self.mobileSession3:ExpectNotification("OnHMIStatus", {hmiLevel = "FULL", systemContext = "MAIN"}) + elseif SessionNumber == 4 then + self.mobileSession4:ExpectNotification("OnHMIStatus", {hmiLevel = "FULL", systemContext = "MAIN"}) + end + end +end +--------------------------------------------------------------------------------------------- + +--Functions to simulate action press button on HMI and verification on Mobile and HMI +--------------------------------------------------------------------------------------------- +--1. Press button +function Test.pressButton(Input_Name, Input_ButtonPressMode) + + --hmi side: send OnButtonEvent, OnButtonPress + Test.hmiConnection:SendNotification("Buttons.OnButtonEvent",{name = Input_Name, mode = "BUTTONDOWN"}) + + if Input_ButtonPressMode == "SHORT" then + + Test.hmiConnection:SendNotification("Buttons.OnButtonEvent",{name = Input_Name, mode = "BUTTONUP"}) + Test.hmiConnection:SendNotification("Buttons.OnButtonPress",{name = Input_Name, mode = Input_ButtonPressMode}) + + else + + Test.hmiConnection:SendNotification("Buttons.OnButtonPress",{name = Input_Name, mode = Input_ButtonPressMode}) + Test.hmiConnection:SendNotification("Buttons.OnButtonEvent",{name = Input_Name, mode = "BUTTONUP"}) + end +end + +--2. Press CUSTOM_BUTTON +function Test.pressButton_CUSTOM_BUTTON(Input_Name, Input_ButtonPressMode, Input_customButtonID, Input_appID) + + --hmi side: send OnButtonEvent, OnButtonPress + Test.hmiConnection:SendNotification("Buttons.OnButtonEvent",{name = Input_Name, mode = "BUTTONDOWN", customButtonID = Input_customButtonID, appID = Input_appID}) + + if Input_ButtonPressMode == "SHORT" then + + Test.hmiConnection:SendNotification("Buttons.OnButtonEvent",{name = Input_Name, mode = "BUTTONUP", customButtonID = Input_customButtonID, appID = Input_appID}) + Test.hmiConnection:SendNotification("Buttons.OnButtonPress",{name = Input_Name, mode = Input_ButtonPressMode, customButtonID = Input_customButtonID, appID = Input_appID}) + + else + + Test.hmiConnection:SendNotification("Buttons.OnButtonPress",{name = Input_Name, mode = Input_ButtonPressMode, customButtonID = Input_customButtonID, appID = Input_appID}) + Test.hmiConnection:SendNotification("Buttons.OnButtonEvent",{name = Input_Name, mode = "BUTTONUP", customButtonID = Input_customButtonID, appID = Input_appID}) + + end +end + +--Functions to verify result on Mobile +--------------------------------------------------------------------------------------------- +--1. Verify press button result on mobile +function Test.verifyPressButtonResult(Input_Name, Input_ButtonPressMode) + + --mobile side: expected OnButtonEvent notification + EXPECT_NOTIFICATION("OnButtonEvent", + {buttonName = Input_Name, buttonEventMode = "BUTTONUP"}, + {buttonName = Input_Name, buttonEventMode = "BUTTONDOWN"}) + :Times(2) + + --mobile side: expected OnButtonPress notification + EXPECT_NOTIFICATION("OnButtonPress", {buttonName = Input_Name, buttonPressMode = Input_ButtonPressMode}) +end + +--2. Verify press button result on mobile for CUSTOM_BUTTON +function Test.verifyPressButtonResult_CUSTOM_BUTTON(Input_Name, Input_ButtonPressMode, Input_customButtonID, Input_appID) + + --mobile side: expected OnButtonEvent notification + EXPECT_NOTIFICATION("OnButtonEvent", + {buttonName = Input_Name, buttonEventMode = "BUTTONUP", customButtonID = Input_customButtonID}, + {buttonName = Input_Name, buttonEventMode = "BUTTONDOWN", customButtonID = Input_customButtonID}) + :Times(2) + + + --mobile side: expected OnButtonPress notification + EXPECT_NOTIFICATION("OnButtonPress", {buttonName = Input_Name, buttonPressMode = Input_ButtonPressMode, customButtonID = Input_customButtonID}) +end + +--3. Verify SDL ignores notification +function Test.verifySDLIgnoresNotification(OnButtonEventNumber) + + commonTestCases:DelayedExp(1000) + + if OnButtonEventNumber == nil then + OnButtonEventNumber = 0 + end + --mobile side: expected OnButtonEvent notification + EXPECT_NOTIFICATION("OnButtonEvent", {}) + :Times(OnButtonEventNumber) + + --mobile side: expected OnButtonPress notification + EXPECT_NOTIFICATION("OnButtonPress", {}) + :Times(0) +end + +--Functions to create common test cases +--------------------------------------------------------------------------------------------- + +--1. Press button and SDL forwards the notification to Mobile +local function SendOnButtonPress(Input_Name, Input_ButtonPressMode, TestCaseName) + + if Input_Name == "OK" and Input_ButtonPressMode == "LONG" then + --Do nothing + --SDLAQ-CRS-876: OnButtonPress LONG (3. HMI doesn't send the notification with a ButtonPressMode of LONG to SDL when "OK" button is pressed for 2 or more seconds. Only SHORT can be sent for "OK" button and it is not dependent from press duration) + else + Test[TestCaseName .. "_name_" .. Input_Name .."_mode_" .. Input_ButtonPressMode] = function(self) + + --Press button on HMI + self.pressButton(Input_Name, Input_ButtonPressMode) + + --Verify result on Mobile + self.verifyPressButtonResult(Input_Name, Input_ButtonPressMode) + end + end +end + +--2. Press button and SDL ignores the notification +local function SendOnButtonPress_IsIgnored(Input_Name, Input_ButtonPressMode, TestCaseName, OnButtonEventNumber) + Test[TestCaseName .. "_name_" .. Input_Name .."_mode_" .. Input_ButtonPressMode] = function(self) + + --Press button on HMI + self.pressButton(Input_Name, Input_ButtonPressMode) + + --Verify result on Mobile + self.verifySDLIgnoresNotification(OnButtonEventNumber) + + end +end + +--3. Press CUSTOM_BUTTON and SDL forwards the notification to Mobile +local function SendOnButtonPress_CUSTOM_BUTTON(Input_Name, Input_ButtonPressMode, Input_customButtonID, Input_appNumber, TestCaseName) + Test[TestCaseName .. "_name_" .. Input_Name .."_mode_" .. Input_ButtonPressMode .. "_customButtonID_" .. Input_customButtonID] = function(self) + + --Press button on HMI + self.pressButton_CUSTOM_BUTTON(Input_Name, Input_ButtonPressMode, Input_customButtonID, Apps[Input_appNumber].appID) + + --Verify result on Mobile + self.verifyPressButtonResult_CUSTOM_BUTTON(Input_Name, Input_ButtonPressMode, Input_customButtonID, Apps[Input_appNumber].appID) + + end +end + +--4. Press CUSTOM_BUTTON and SDL ignores the notification +local function SendOnButtonPress_CUSTOM_BUTTON_IsIgnored(Input_Name, Input_ButtonPressMode, Input_customButtonID, Input_appNumber, TestCaseName) + Test[TestCaseName .. "_name_" .. Input_Name .."_mode_" .. Input_ButtonPressMode .. "_customButtonID_" .. Input_customButtonID] = function(self) + + --Press button on HMI + self.pressButton_CUSTOM_BUTTON(Input_Name, Input_ButtonPressMode, Input_customButtonID, Apps[Input_appNumber].appID) + + --Verify result on Mobile + self.verifySDLIgnoresNotification() + + end +end + +--------------------------------------------------------------------------------------------- +-------------------------------------------Preconditions------------------------------------- +--------------------------------------------------------------------------------------------- + + commonSteps:DeleteLogsFileAndPolicyTable() + + -- Precondition: removing user_modules/connecttest_OnButton.lua + function Test:Remove_user_connecttest() + os.execute( "rm -f ./user_modules/connecttest_OnButton.lua" ) + end + + --Print new line to separate new test cases group + commonFunctions:newTestCasesGroup("Preconditions") + + --1. Activate application + commonSteps:ActivationApp() + + --2. Create PT that allowed OnButtonEvent in Base-4 group and update PT + local PermissionLinesForBase4 = +[[ "OnButtonEvent": { + "hmi_levels": [ + "BACKGROUND", + "LIMITED", + "FULL" + ] + }, + "OnButtonPress": { + "hmi_levels": [ + "BACKGROUND", + "LIMITED", + "FULL" + ] + }, + "Show": { + "hmi_levels": [ + "FULL" + ] + }, + "SubscribeButton": { + "hmi_levels": [ + "BACKGROUND", + "LIMITED", + "NONE", + "FULL" + ] + },]] .. "\n" + + local PermissionLinesForGroup1 = nil + local PermissionLinesForApplication = nil + --This TC is blocked on ATF 2.2 by defect APPLINK-19188. Please try ATF on commit f86f26112e660914b3836c8d79002e50c7219f29 above code for PTU + local PTName = testCasesForPolicyTable:createPolicyTableFile(PermissionLinesForBase4, PermissionLinesForGroup1, PermissionLinesForApplication, {"OnButtonEvent", "OnButtonPress", "Show", "SubscribeButton"}) + testCasesForPolicyTable:updatePolicy(PTName) + + --3. Get appID Value on HMI side + function Test:GetAppID() + Apps[1].appID = self.applications[Apps[1].appName] + end + + --4. Send Show request with buttonIDs are lower and upper bounds + Test["Show_buttonID_IsLowerUpperBound"] = function(self) + + --mobile side: request parameters + local Request = + { + softButtons = + { + { + text = "Button1", + systemAction = "DEFAULT_ACTION", + type = "TEXT", + isHighlighted = false, + softButtonID = CustomButtonIDs[1] + }, + { + text = "Button2", + systemAction = "DEFAULT_ACTION", + type = "TEXT", + isHighlighted = false, + softButtonID = CustomButtonIDs[2] + } + } + } + + --mobile side: sending Show request + local cid = self.mobileSession:SendRPC("Show", Request) + + --hmi side: expect UI.Show request + EXPECT_HMICALL("UI.Show") + :Do(function(_,data) + --hmi side: sending UI.Show response + self.hmiConnection:SendResponse(data.id, data.method, "SUCCESS", {}) + end) + + --mobile side: expect SetGlobalProperties response + EXPECT_RESPONSE(cid, { success = true, resultCode = "SUCCESS" }) + end + + --5. SubscribeButton + for i=1,#ButtonNames_WithoutCUSTOM_BUTTON do + Test["SubscribeButton_" .. tostring(ButtonNames_WithoutCUSTOM_BUTTON[i])] = function(self) + + --mobile side: sending SubscribeButton request + local cid = self.mobileSession:SendRPC("SubscribeButton", + { + buttonName = ButtonNames_WithoutCUSTOM_BUTTON[i] + + }) + + --expect Buttons.OnButtonSubscription + EXPECT_HMINOTIFICATION("Buttons.OnButtonSubscription", {appID = Apps[1].appID, isSubscribed = true, name = ButtonNames_WithoutCUSTOM_BUTTON[i]}) + + --mobile side: expect SubscribeButton response + EXPECT_RESPONSE(cid, {success = true, resultCode = "SUCCESS"}) + + EXPECT_NOTIFICATION("OnHashChange", {}) + end + end + +----------------------------------------------------------------------------------------------- +-------------------------------------------TEST BLOCK I---------------------------------------- +--------------------------------Check normal cases of Mobile request--------------------------- +----------------------------------------------------------------------------------------------- + +--Not Applicable + +---------------------------------------------------------------------------------------------- +-----------------------------------------TEST BLOCK II---------------------------------------- +-----------------------------Check special cases of Mobile request---------------------------- +---------------------------------------------------------------------------------------------- + +--Not Applicable + +----------------------------------------------------------------------------------------------- +-------------------------------------------TEST BLOCK III-------------------------------------- +----------------------------------Check normal cases of HMI notification--------------------------- +----------------------------------------------------------------------------------------------- +--Requirement id in JAMA or JIRA: + --SDLAQ-CRS-175: OnButtonPress_v2_0: Notifies application of LONG/SHORT press events for buttons to which the application is subscribed. + --SDLAQ-CRS-875: OnButtonPress SHORT + --SDLAQ-CRS-876: OnButtonPress LONG + --APPLINK-9736: SDL must ignore the invalid notifications from HMI + + --Verification criteria: + --1. OnButtonPress of LONG is sent by SDL on each long press of every subscribed hardware or SW preset HMI button. + --2. OnButtonPress of LONG is sent by SDL on each long press of every subscribed custom HMI button. + --3. OnButtonPress of SHORT is sent by SDL on each short press of every subscribed hardware or SW preset HMI button. + --4. OnButtonPress of SHORT is sent by SDL on each short press of every subscribed custom HMI button. +---------------------------------------------------------------------------------------------- + + --List of parameters: + --1. buttonName: type=ButtonName + --2. buttonPressMode: type=ButtonPressMode + --3. customButtonID: type=Integer, minvalue=0, maxvalue=65536 + --4. appID +---------------------------------------------------------------------------------------------- + + --Print new line to separate new test cases group + commonFunctions:newTestCasesGroup("Test suite: Check normal cases of HMI notification") + +---------------------------------------------------------------------------------------------- +--Test case #1: Checks OnButtonPress notification with valid values of buttonName, buttonPressMode and customButtonID parameters +---------------------------------------------------------------------------------------------- + + local function verifyOnButtonPressNotification_validValues(TestCaseName) + + --Verify buttonName and buttonPressMode parameters + for i =1, #ButtonNames_WithoutCUSTOM_BUTTON do + for j =1, #ButtonPressModes do + SendOnButtonPress(ButtonNames_WithoutCUSTOM_BUTTON[i], ButtonPressModes[j], TestCaseName) + end + end + + + --Verify customButtonID parameter + for i =1, #ButtonNames_CUSTOM_BUTTON do + for j =1, #ButtonPressModes do + for n = 1, #CustomButtonIDs do + SendOnButtonPress_CUSTOM_BUTTON(ButtonNames_CUSTOM_BUTTON[i], ButtonPressModes[j], CustomButtonIDs[n], 1, TestCaseName) + end + end + end + end + + verifyOnButtonPressNotification_validValues("OnButtonPress") + +---------------------------------------------------------------------------------------------- +--Test case #2: Checks OnButtonPress is NOT sent to application after SDL received OnButtonPress with invalid buttonName and buttonPressMode +---------------------------------------------------------------------------------------------- + + local function verifyOnButtonPressNotification_InvalidValues() + + --Verify buttonName is invalid value + local InvalidButtonNames = { + {value = "", name = "IsEmtpy"}, + {value = "ANY", name = "NonExist"}, + {value = 123, name = "WrongDataType"} + } + + for i =1, #InvalidButtonNames do + for j =1, #ButtonPressModes do + SendOnButtonPress_IsIgnored(InvalidButtonNames[i].value, ButtonPressModes[j], "OnButtonPress_buttonName_IsInvalid_" .. InvalidButtonNames[i].name) + end + end + + + --Verify buttonPressMode is invalid value + local InvalidButtonPressModes = { + {value = "", name = "IsEmtpy"}, + {value = "ANY", name = "NonExist"}, + {value = 123, name = "WrongDataType"} + } + + + for j =1, #InvalidButtonPressModes do + for i =1, #ButtonNames_WithoutCUSTOM_BUTTON do + SendOnButtonPress_IsIgnored(ButtonNames_WithoutCUSTOM_BUTTON[i], InvalidButtonPressModes[j].value, "OnButtonPress_buttonPressMode_IsInvalid_" .. InvalidButtonPressModes[j].name, 2) + end + end + + + --Verify customButtonID is invalid value + local InvalidCustomButtonIDs = { + {value = CustomButtonIDs[1]-1, name = "IsOutLowerBound"}, + {value = CustomButtonIDs[2] + 1, name = "IsOutUpperBound"}, + {value = "123", name = "WrongDataType"} + } + local appNumber = 1 + for i =1, #ButtonNames_CUSTOM_BUTTON do + for j =1, #ButtonPressModes do + for n = 1, #InvalidCustomButtonIDs do + SendOnButtonPress_CUSTOM_BUTTON_IsIgnored(ButtonNames_CUSTOM_BUTTON[i], ButtonPressModes[j], InvalidCustomButtonIDs[n].value, appNumber, "OnButtonPress_customButtonID_IsInvalid") + end + end + end + + --Verify appID is invalid value. + --Print new line to separate new test cases group + commonFunctions:newTestCasesGroup("Test suite: Check invalid appID") + local Invalid_appIDs = { + {value = 66666, name = "IsNonexistent"}, + {value = "1", name = "IsWrongDataType"}, + {value = "", name = "IsEmpty"} + } + for i = 1, #Invalid_appIDs do + Test["OnButtonPress_appID_" .. Invalid_appIDs[i].name] = function(self) + + --Press button on HMI + self.pressButton_CUSTOM_BUTTON("PRESET_0", "SHORT", 1, Invalid_appIDs[i].value) + + --Verify result on Mobile + self.verifySDLIgnoresNotification() + + end + end + end + + verifyOnButtonPressNotification_InvalidValues() + +---------------------------------------------------------------------------------------------- +-----------------------------------------TEST BLOCK IV---------------------------------------- +----------------------------Check special cases of HMI notification--------------------------- +---------------------------------------------------------------------------------------------- +--Requirement id in JAMA or JIRA: + --APPLINK-14765: SDL must cut off the fake parameters from requests, responses and notifications received from HMI + --APPLINK-9736: SDL must ignore the invalid notifications from HMI +----------------------------------------------------------------------------------------------- + +--List of test cases for special cases of HMI notification: + --1. InvalidJsonSyntax + --2. InvalidStructure + --3. FakeParams + --4. FakeParameterIsFromAnotherAPI + --5. MissedmandatoryParameters + --6. MissedAllPArameters + --7. SeveralNotifications with the same values + --8. SeveralNotifications with different values +---------------------------------------------------------------------------------------------- + +local function SpecialResponseChecks() + + --Print new line to separate new test cases group + commonFunctions:newTestCasesGroup("Test suite: Check special cases of HMI notification") + + --1. Verify OnButtonPress with invalid Json syntax + ---------------------------------------------------------------------------------------------- + function Test:OnButtonPress_InvalidJsonSyntax() + --hmi side: send OnButtonPress + --":" is changed by ";" after "jsonrpc" + self.hmiConnection:Send('{"jsonrpc";"2.0","params":{"mode":"SHORT","name":"SEARCH"},"method":"Buttons.OnButtonPress"}') + + self.verifySDLIgnoresNotification() + end + + --2. Verify OnButtonPress with invalid structure + ---------------------------------------------------------------------------------------------- + function Test:OnButtonPress_InvalidStructure() + --hmi side: send OnButtonPress + --method is moved into params parameter + self.hmiConnection:Send('{"jsonrpc":"2.0","params":{"mode":"SHORT","name":"SEARCH","method":"Buttons.OnButtonPress"}}') + + self.verifySDLIgnoresNotification() + end + + --3. Verify OnButtonPress with FakeParams + ---------------------------------------------------------------------------------------------- + function Test:OnButtonPress_FakeParams() + + --hmi side: send OnButtonEvent, OnButtonPress + self.hmiConnection:SendNotification("Buttons.OnButtonEvent",{name = "SEARCH", mode = "BUTTONDOWN"}) + self.hmiConnection:SendNotification("Buttons.OnButtonEvent",{name = "SEARCH", mode = "BUTTONUP"}) + self.hmiConnection:SendNotification("Buttons.OnButtonPress",{name = "SEARCH", mode = "SHORT", fake = 123}) + + --mobile side: expected OnButtonEvent notification + EXPECT_NOTIFICATION("OnButtonEvent", {buttonName = "SEARCH", buttonEventMode = "BUTTONDOWN"}, + {buttonName = "SEARCH", buttonEventMode = "BUTTONUP"}) + :Times(2) + + --mobile side: expected OnButtonPress notification + EXPECT_NOTIFICATION("OnButtonPress", {buttonName = "SEARCH", buttonPressMode = "SHORT"}) + :ValidIf(function(_,data) + + if data.payload.fake then + commonFunctions:printError(" SDL forwards fake parameter to mobile ") + return false + else + return true + end + end) + + end + + --4. Verify OnButtonPress with FakeParameterIsFromAnotherAPI + function Test:OnButtonPress_FakeParameterIsFromAnotherAPI() + + --hmi side: send OnButtonEvent, OnButtonPress + self.hmiConnection:SendNotification("Buttons.OnButtonEvent",{name = "SEARCH", mode = "BUTTONDOWN"}) + self.hmiConnection:SendNotification("Buttons.OnButtonEvent",{name = "SEARCH", mode = "BUTTONUP"}) + self.hmiConnection:SendNotification("Buttons.OnButtonPress",{name = "SEARCH", mode = "SHORT", sliderPosition = 1}) + + --mobile side: expected OnButtonEvent notification + EXPECT_NOTIFICATION("OnButtonEvent", {buttonName = "SEARCH", buttonEventMode = "BUTTONDOWN"}, + {buttonName = "SEARCH", buttonEventMode = "BUTTONUP"}) + :Times(2) + + --mobile side: expected OnButtonPress notification + EXPECT_NOTIFICATION("OnButtonPress", {buttonName = "SEARCH", buttonPressMode = "SHORT"}) + :ValidIf(function(_,data) + + if data.payload.sliderPosition then + commonFunctions:printError(" SDL forwards fake parameter to mobile ") + return false + else + return true + end + end) + + end + + --5. Verify OnButtonPress misses mandatory parameter + ---------------------------------------------------------------------------------------------- + function Test:OnButtonPress_name_IsMissed() + --hmi side: send OnButtonEvent, OnButtonPress + self.hmiConnection:SendNotification("Buttons.OnButtonEvent",{name = "SEARCH", mode = "BUTTONDOWN"}) + self.hmiConnection:SendNotification("Buttons.OnButtonEvent",{name = "SEARCH", mode = "BUTTONUP"}) + self.hmiConnection:SendNotification("Buttons.OnButtonPress",{mode = "SHORT"}) + + --Verify result on Mobile + self.verifySDLIgnoresNotification(2) + end + + function Test:OnButtonPress_mode_IsMissed() + --hmi side: send OnButtonEvent, OnButtonPress + self.hmiConnection:SendNotification("Buttons.OnButtonEvent",{name = "SEARCH", mode = "BUTTONDOWN"}) + self.hmiConnection:SendNotification("Buttons.OnButtonEvent",{name = "SEARCH", mode = "BUTTONUP"}) + self.hmiConnection:SendNotification("Buttons.OnButtonPress",{name = "SEARCH"}) + + --Verify result on Mobile + self.verifySDLIgnoresNotification(2) + end + + function Test:OnButtonPress_appID_IsMissed() + + --hmi side: send OnButtonEvent, OnButtonPress + Test.hmiConnection:SendNotification("Buttons.OnButtonEvent",{name = "CUSTOM_BUTTON", mode = "BUTTONDOWN", customButtonID = CustomButtonIDs[1]}) + Test.hmiConnection:SendNotification("Buttons.OnButtonEvent",{name = "CUSTOM_BUTTON", mode = "BUTTONUP", customButtonID = CustomButtonIDs[1]}) + Test.hmiConnection:SendNotification("Buttons.OnButtonPress",{name = "CUSTOM_BUTTON", mode = "SHORT", customButtonID = CustomButtonIDs[1]}) + + --Verify result on Mobile + self.verifySDLIgnoresNotification() + end + + function Test:OnButtonPress_customButtonID_IsMissed() + + --hmi side: send OnButtonEvent, OnButtonPress + Test.hmiConnection:SendNotification("Buttons.OnButtonEvent",{name = "CUSTOM_BUTTON", mode = "BUTTONDOWN", appID = Apps[1].appID}) + Test.hmiConnection:SendNotification("Buttons.OnButtonEvent",{name = "CUSTOM_BUTTON", mode = "BUTTONUP", appID = Apps[1].appID}) + Test.hmiConnection:SendNotification("Buttons.OnButtonPress",{name = "CUSTOM_BUTTON", mode = "SHORT", appID = Apps[1].appID}) + + --Verify result on Mobile + self.verifySDLIgnoresNotification() + end + + function Test:OnButtonPress_customButtonID_and_appID_AreMissed() + + --hmi side: send OnButtonEvent, OnButtonPress + Test.hmiConnection:SendNotification("Buttons.OnButtonEvent",{name = "CUSTOM_BUTTON", mode = "BUTTONDOWN"}) + Test.hmiConnection:SendNotification("Buttons.OnButtonEvent",{name = "CUSTOM_BUTTON", mode = "BUTTONUP"}) + Test.hmiConnection:SendNotification("Buttons.OnButtonPress",{name = "CUSTOM_BUTTON", mode = "SHORT"}) + + --Verify result on Mobile + self.verifySDLIgnoresNotification() + end + + --6. Verify OnButtonPress MissedAllPArameters: The same as case 5. + ---------------------------------------------------------------------------------------------- + function Test:OnButtonPress_AllParameters_AreMissed() + --hmi side: send OnButtonEvent, OnButtonPress + self.hmiConnection:SendNotification("Buttons.OnButtonEvent",{name = "SEARCH", mode = "BUTTONDOWN"}) + self.hmiConnection:SendNotification("Buttons.OnButtonEvent",{name = "SEARCH", mode = "BUTTONUP"}) + self.hmiConnection:SendNotification("Buttons.OnButtonPress",{}) + + --Verify result on Mobile + self.verifySDLIgnoresNotification(2) + end + + --7. Verify OnButtonPress with SeveralNotifications_WithTheSameValues + ---------------------------------------------------------------------------------------------- + function Test:OnButtonPress_SeveralNotifications_WithTheSameValues() + --hmi side: send OnButtonEvent, OnButtonPress + self.hmiConnection:SendNotification("Buttons.OnButtonEvent",{name = "SEARCH", mode = "BUTTONDOWN"}) + self.hmiConnection:SendNotification("Buttons.OnButtonEvent",{name = "SEARCH", mode = "BUTTONUP"}) + self.hmiConnection:SendNotification("Buttons.OnButtonPress",{name = "SEARCH", mode = "SHORT"}) + self.hmiConnection:SendNotification("Buttons.OnButtonPress",{name = "SEARCH", mode = "SHORT"}) + self.hmiConnection:SendNotification("Buttons.OnButtonPress",{name = "SEARCH", mode = "SHORT"}) + + --mobile side: expected OnButtonEvent notification + EXPECT_NOTIFICATION("OnButtonEvent", {buttonName = "SEARCH", buttonEventMode = "BUTTONDOWN"}, + {buttonName = "SEARCH", buttonEventMode = "BUTTONUP"}) + :Times(2) + + --mobile side: expected OnButtonPress notification + EXPECT_NOTIFICATION("OnButtonPress", {buttonName = "SEARCH", buttonPressMode = "SHORT"}) + :Times(3) + + end + + --8. Verify UI.OnButtonPress with SeveralNotifications_WithDifferentValues + ---------------------------------------------------------------------------------------------- + function Test:OnButtonPress_SeveralNotifications_WithDifferentValues() + --hmi side: send OnButtonEvent, OnButtonPress + self.hmiConnection:SendNotification("Buttons.OnButtonEvent",{name = "SEARCH", mode = "BUTTONDOWN"}) + self.hmiConnection:SendNotification("Buttons.OnButtonEvent",{name = "SEARCH", mode = "BUTTONUP"}) + self.hmiConnection:SendNotification("Buttons.OnButtonPress",{name = "SEARCH", mode = "SHORT"}) + self.hmiConnection:SendNotification("Buttons.OnButtonPress",{name = "SEARCH", mode = "LONG"}) + + --mobile side: expected OnButtonEvent notification + EXPECT_NOTIFICATION("OnButtonEvent", {buttonName = "SEARCH", buttonEventMode = "BUTTONDOWN"}, + {buttonName = "SEARCH", buttonEventMode = "BUTTONUP"}) + :Times(2) + + --mobile side: expected OnButtonPress notification + EXPECT_NOTIFICATION("OnButtonPress", {buttonName = "SEARCH", buttonPressMode = "SHORT"}, + {buttonName = "SEARCH", buttonPressMode = "LONG"}) + :Times(2) + end +end + +SpecialResponseChecks() + +----------------------------------------------------------------------------------------------- +-------------------------------------------TEST BLOCK V---------------------------------------- +-------------------------------------Checks All Result Codes----------------------------------- +----------------------------------------------------------------------------------------------- +--Description: Check all resultCodes + +--Requirement id in JAMA: + --N/A + +--Verification criteria: Verify SDL behaviors in different states of policy table: + --1. Notification is not exist in PT => DISALLOWED in policy table, SDL ignores the notification + --2. Notification is exist in PT but it has not consented yet by user => DISALLOWED in policy table, SDL ignores the notification + --3. Notification is exist in PT but user does not allow function group that contains this notification => USER_DISALLOWED in policy table, SDL ignores the notification + --4. Notification is exist in PT and user allow function group that contains this notification +---------------------------------------------------------------------------------------------- + + local function ResultCodeChecks() + + --Print new line to separate new test cases group + commonFunctions:newTestCasesGroup("Test suite: Checks All Result Codes") + + --Send notification and check it is ignored + local function TC_OnButtonPress_DISALLOWED_USER_DISALLOWED(TestCaseName) + Test[TestCaseName] = function(self) + + commonTestCases:DelayedExp(1000) + + --hmi side: send OnButtonEvent, OnButtonPress + self.hmiConnection:SendNotification("Buttons.OnButtonEvent",{name = "PRESET_0", mode = "BUTTONDOWN"}) + self.hmiConnection:SendNotification("Buttons.OnButtonEvent",{name = "PRESET_0", mode = "BUTTONUP"}) + self.hmiConnection:SendNotification("Buttons.OnButtonPress",{name = "PRESET_0", mode = "SHORT"}) + + --mobile side: expected OnButtonEvent notification + EXPECT_NOTIFICATION("OnButtonEvent", {buttonName = "PRESET_0", buttonEventMode = "BUTTONDOWN"}, + {buttonName = "PRESET_0", buttonEventMode = "BUTTONUP"}) + :Times(2) + + --mobile side: expected OnButtonPress notification + EXPECT_NOTIFICATION("OnButtonPress", {}) + :Times(0) + end + end + + --1. Notification is not exist in PT => DISALLOWED in policy table, SDL ignores the notification + ---------------------------------------------------------------------------------------------- + --Precondition: Build policy table file + local PTFileName = testCasesForPolicyTable:createPolicyTableWithoutAPI("OnButtonPress") + + --Precondition: Update policy table + testCasesForPolicyTable:updatePolicy(PTFileName) + TC_OnButtonPress_DISALLOWED_USER_DISALLOWED("OnButtonPress_IsNotExistInPT_DISALLOWED") + + ---------------------------------------------------------------------------------------------- + + --2. Notification is exist in PT but it has not consented yet by user => DISALLOWED in policy table, SDL ignores the notification + ---------------------------------------------------------------------------------------------- + --Precondition: Build policy table file + local PermissionLinesForBase4 = +[[ "OnButtonEvent": { + "hmi_levels": [ + "FULL", + "LIMITED" + ] + }]] .. ",\n" + + local PermissionLinesForGroup1 = +[[ "OnButtonPress": { + "hmi_levels": [ + "FULL", + "LIMITED" + ] + }]] .. "\n" + + local appID = config.application1.registerAppInterfaceParams.appID + local PermissionLinesForApplication = + [[ "]]..appID ..[[" : { + "keep_context" : false, + "steal_focus" : false, + "priority" : "NONE", + "default_hmi" : "NONE", + "groups" : ["Base-4", "group1"] + }, + ]] + + local PTName = testCasesForPolicyTable:createPolicyTableFile(PermissionLinesForBase4, PermissionLinesForGroup1, PermissionLinesForApplication, {"OnButtonEvent", "OnButtonPress"}) + + testCasesForPolicyTable:updatePolicy(PTName) + + --Send notification and check it is ignored + TC_OnButtonPress_DISALLOWED_USER_DISALLOWED("OnButtonPress_UserHasNotConsentedYet_DISALLOWED") + + ---------------------------------------------------------------------------------------------- + + --3. Notification is exist in PT but user does not allow function group that contains this notification => USER_DISALLOWED in policy table, SDL ignores the notification + ---------------------------------------------------------------------------------------------- + --Precondition: User does not allow function group + testCasesForPolicyTable:userConsent(false, "group1") + + --Send notification and check it is ignored + TC_OnButtonPress_DISALLOWED_USER_DISALLOWED("OnButtonPress_USER_DISALLOWED") + + ---------------------------------------------------------------------------------------------- + + --4. Notification is exist in PT and user allow function group that contains this notification + ---------------------------------------------------------------------------------------------- + --Precondition: User allows function group + testCasesForPolicyTable:userConsent(true, "group1") + + function Test:OnButtonPress_USER_ALLOWED() + + commonTestCases:DelayedExp(1000) + + --hmi side: send OnButtonEvent, OnButtonPress + self.hmiConnection:SendNotification("Buttons.OnButtonEvent",{name = "PRESET_0", mode = "BUTTONDOWN"}) + self.hmiConnection:SendNotification("Buttons.OnButtonEvent",{name = "PRESET_0", mode = "BUTTONUP"}) + self.hmiConnection:SendNotification("Buttons.OnButtonPress",{name = "PRESET_0", mode = "SHORT"}) + + --mobile side: expected OnButtonEvent notification + EXPECT_NOTIFICATION("OnButtonEvent", + {buttonName = "PRESET_0", buttonEventMode = "BUTTONUP"}, + {buttonName = "PRESET_0", buttonEventMode = "BUTTONDOWN"}) + :Times(2) + + --mobile side: expected OnButtonPress notification + EXPECT_NOTIFICATION("OnButtonPress", {buttonName = "PRESET_0", buttonPressMode = "SHORT"}) + end + ---------------------------------------------------------------------------------------------- + end + + --This TC is blocked on ATF 2.2 by defect APPLINK-19188. Please try ATF on commit f86f26112e660914b3836c8d79002e50c7219f29 for PTU + ResultCodeChecks() + +---------------------------------------------------------------------------------------------- +-----------------------------------------TEST BLOCK VI---------------------------------------- +-------------------------Sequence with emulating of user's action(s)-------------------------- +---------------------------------------------------------------------------------------------- + +--Description: TC's checks SDL behavior by processing + -- different request sequence with timeout + -- with emulating of user's actions + +--Requirement id in JAMA: + --1. SDLAQ-CRS-2909: OnButtonPress with unknown buttonID from HMI + --2. APPLINK-20216: Send No OnButtonPress/OnButtonEvent to FullHmiLevelApplication in case buttons of this app is not subcribled + --3. SDLAQ-CRS-3068: OnButtonPress to media app in FULL + --4. SDLAQ-CRS-3069: OnButtonPress to media app in LIMITED + + --Print new line to separate new test cases group + commonFunctions:newTestCasesGroup("Test suite: Sequence with emulating of user's action(s)") + ---------------------------------------------------------------------------------------------- + commonFunctions:newTestCasesGroup("SDLAQ-CRS-2909: OnButtonPress with unknown buttonID from HMI") + --1. SDLAQ-CRS-2909: OnButtonPress with unknown buttonID from HMI + function Test:OnButtonPress_WithUnknownButtonID() + + local UnknowButtonID = 2 + + --hmi side: send OnButtonEvent, OnButtonPress + Test.hmiConnection:SendNotification("Buttons.OnButtonEvent",{name = "CUSTOM_BUTTON", mode = "BUTTONDOWN", customButtonID = UnknowButtonID, appID = Apps[1].appID}) + Test.hmiConnection:SendNotification("Buttons.OnButtonEvent",{name = "CUSTOM_BUTTON", mode = "BUTTONUP", customButtonID = UnknowButtonID, appID = Apps[1].appID}) + Test.hmiConnection:SendNotification("Buttons.OnButtonPress",{name = "CUSTOM_BUTTON", mode = "SHORT", customButtonID = UnknowButtonID, appID = Apps[1].appID}) + + --Verify result on Mobile + self.verifySDLIgnoresNotification() + end + + ---------------------------------------------------------------------------------------------- + + --2. APPLINK-20216: Send No OnButtonPress/OnButtonEvent to FullHmiLevelApplication in case buttons of this app is not subcribled + commonFunctions:newTestCasesGroup("APPLINK-20216: Send No OnButtonPress/OnButtonEvent to FullHmiLevelApplication in case buttons of this app is not subcribled") + + -- Precondition 1: Opening new session + function Test:AddNewSession2() + + -- Connected expectation + self.mobileSession2 = mobile_session.MobileSession(Test,Test.mobileConnection) + + self.mobileSession2:StartService(7) + end + + function Test:Register_Media_App2() + + --mobile side: RegisterAppInterface request + config.application2.registerAppInterfaceParams.isMediaApplication = true + config.application2.registerAppInterfaceParams.appHMIType = nil + + local CorIdRAI = self.mobileSession2:SendRPC("RegisterAppInterface", config.application2.registerAppInterfaceParams) + + --hmi side: expect BasicCommunication.OnAppRegistered request + EXPECT_HMINOTIFICATION("BasicCommunication.OnAppRegistered", + { + application = + { + appName = config.application2.registerAppInterfaceParams.appName, + isMediaApplication = true + } + }) + :Do(function(_,data) + Apps[2].appID = data.params.application.appID + self.applications[Apps[2].appName] = data.params.application.appID + end) + + --mobile side: RegisterAppInterface response + self.mobileSession2:ExpectResponse(CorIdRAI, { success = true, resultCode = "SUCCESS"}) + :Timeout(2000) + + self.mobileSession2:ExpectNotification("OnHMIStatus",{hmiLevel = "NONE", audioStreamingState = "NOT_AUDIBLE", systemContext = "MAIN"}) + end + + ActivationApp("Activation_Media_App2", 2, 2) + + local function OnButtonPress_NotComeToFullHmiLevelApplicationDueToNotSubcrible(TestCaseName, ButtonName, buttonPressMode) + Test[TestCaseName] = function(self) + + commonTestCases:DelayedExp(1000) + + --hmi side: send OnButtonEvent, OnButtonPress + self.hmiConnection:SendNotification("Buttons.OnButtonEvent",{name = ButtonName, mode = "BUTTONDOWN"}) + self.hmiConnection:SendNotification("Buttons.OnButtonEvent",{name = ButtonName, mode = "BUTTONUP"}) + self.hmiConnection:SendNotification("Buttons.OnButtonPress",{name = ButtonName, mode = buttonPressMode}) + + --Verify result on Mobile for app1 + self.verifySDLIgnoresNotification(0) + + --Verify result on Mobile for app2 in Full + --mobile side: expected OnButtonEvent notification + self.mobileSession2:ExpectNotification("OnButtonEvent", {}) + :Times(0) + + --mobile side: expected OnButtonPress notification + self.mobileSession2:ExpectNotification("OnButtonPress", {}) + :Times(0) + end + end + for i,v in ipairs({"SHORT", "LONG"}) do + for i=1,#MediaButtons do + OnButtonPress_NotComeToFullHmiLevelApplicationDueToNotSubcrible("NotComeToFullHmiLevelApplicationDueToNotSubcrible" .. MediaButtons[i] .. '_' .. tostring(v), MediaButtons[i], tostring(v)) + end + end + + commonFunctions:newTestCasesGroup("SDLAQ-CRS-3068: OnButtonPress to media app in FULL") + --3. SDLAQ-CRS-3068: OnButtonPress to media app in FULL + local function SubscribeMediaButton(TestCaseName, ButtonName, session) + Test[TestCaseName] = function(self) + + if session == 2 then + --mobile side: sending SubscribeButton request + cid = self.mobileSession2:SendRPC("SubscribeButton",{ buttonName = ButtonName}) + + --expect Buttons.OnButtonSubscription + EXPECT_HMINOTIFICATION("Buttons.OnButtonSubscription", {appID = Apps[2].appID, isSubscribed = true, name = ButtonName}) + :Times(1) + + --mobile side: expect SubscribeButton response + self.mobileSession2:ExpectResponse(cid, {success = true, resultCode = "SUCCESS"}) + + self.mobileSession2:ExpectNotification("OnHashChange", {}) + :Times(1) + end + + if session == 3 then + --mobile side: sending SubscribeButton request + cid = self.mobileSession3:SendRPC("SubscribeButton",{ buttonName = ButtonName}) + + --expect Buttons.OnButtonSubscription + EXPECT_HMINOTIFICATION("Buttons.OnButtonSubscription", {appID = Apps[3].appID, isSubscribed = true, name = ButtonName}) + :Times(1) + + --mobile side: expect SubscribeButton response + self.mobileSession3:ExpectResponse(cid, {success = true, resultCode = "SUCCESS"}) + + self.mobileSession3:ExpectNotification("OnHashChange", {}) + :Times(1) + end + end + end + + for i=1, #MediaButtons do + SubscribeMediaButton("App2SubscribeButton"..MediaButtons[i], MediaButtons[i], 2) + end + + --Change app2 to NONE hmi level + function Test:Deactivate_App2_To_None_Hmi_Level() + + --hmi side: sending BasicCommunication.OnExitApplication notification + self.hmiConnection:SendNotification("BasicCommunication.OnExitApplication", {appID = Apps[2].appID, reason = "USER_EXIT"}) + + self.mobileSession2:ExpectNotification("OnHMIStatus", { systemContext = "MAIN", hmiLevel = "NONE", audioStreamingState = "NOT_AUDIBLE"}) + end + + -- Precondition 2: Opening new session + function Test:AddNewSession3() + + -- Connected expectation + self.mobileSession3 = mobile_session.MobileSession(Test,Test.mobileConnection) + + self.mobileSession3:StartService(7) + end + + function Test:Register_Media_App3() + + --mobile side: RegisterAppInterface request + config.application3.registerAppInterfaceParams.isMediaApplication = true + config.application3.registerAppInterfaceParams.appHMIType = nil + + local CorIdRAI = self.mobileSession3:SendRPC("RegisterAppInterface", config.application3.registerAppInterfaceParams) + + --hmi side: expect BasicCommunication.OnAppRegistered request + EXPECT_HMINOTIFICATION("BasicCommunication.OnAppRegistered", + { + application = + { + appName = config.application3.registerAppInterfaceParams.appName, + isMediaApplication = true + } + }) + :Do(function(_,data) + Apps[3].appID = data.params.application.appID + self.applications[Apps[3].appName] = data.params.application.appID + end) + + --mobile side: RegisterAppInterface response + self.mobileSession3:ExpectResponse(CorIdRAI, { success = true, resultCode = "SUCCESS"}) + :Timeout(3000) + + self.mobileSession3:ExpectNotification("OnHMIStatus",{hmiLevel = "NONE", audioStreamingState = "NOT_AUDIBLE", systemContext = "MAIN"}) + end + + ActivationApp("Activation_Media_App3", 3, 3) + + -- Subscribe App3 to MediaButtons + for i=1, #MediaButtons do + SubscribeMediaButton("App3SubscribeButton"..MediaButtons[i], MediaButtons[i], 3) + end + + function Test:Activation_App1() + + --hmi side: sending SDL.ActivateApp request + local RequestId = self.hmiConnection:SendRequest("SDL.ActivateApp", { appID = Apps[1].appID}) + EXPECT_HMIRESPONSE(RequestId) + + --mobile side: expect notification + EXPECT_NOTIFICATION("OnHMIStatus", {hmiLevel = "FULL", systemContext = "MAIN"}) + end + + local function OnButtonPress_OnlyComesToFullOrLimitedHmiLevelApplication(TestCaseName, ButtonName, buttonPressMode) + Test[TestCaseName] = function(self) + + commonTestCases:DelayedExp(1000) + + --hmi side: send OnButtonEvent, OnButtonPress + self.hmiConnection:SendNotification("Buttons.OnButtonEvent",{name = ButtonName, mode = "BUTTONDOWN"}) + self.hmiConnection:SendNotification("Buttons.OnButtonEvent",{name = ButtonName, mode = "BUTTONUP"}) + self.hmiConnection:SendNotification("Buttons.OnButtonPress",{name = ButtonName, mode = buttonPressMode}) + + --Verify result on Mobile for app1 + self.verifyPressButtonResult(ButtonName, buttonPressMode) + + --Verify result on Mobile for app2 in NONE + + --mobile side: expected OnButtonEvent notification + self.mobileSession2:ExpectNotification("OnButtonEvent", {}) + :Times(0) + + --mobile side: expected OnButtonPress notification + self.mobileSession2:ExpectNotification("OnButtonPress", {}) + :Times(0) + + --Verify result on Mobile for app3 in BACKGROUND + + --mobile side: expected OnButtonEvent notification + self.mobileSession3:ExpectNotification("OnButtonEvent", {}) + :Times(0) + + --mobile side: expected OnButtonPress notification + self.mobileSession3:ExpectNotification("OnButtonPress", {}) + :Times(0) + + end + end + + for i,v in ipairs({"SHORT", "LONG"}) do + for i=1,#ButtonNames_WithoutCUSTOM_BUTTON do + OnButtonPress_OnlyComesToFullOrLimitedHmiLevelApplication("OnlyFullApplicationReceivesOnButtonPress" .. ButtonNames_WithoutCUSTOM_BUTTON[i] .. '_' .. tostring(v), ButtonNames_WithoutCUSTOM_BUTTON[i], tostring(v)) + end + end + ---------------------------------------------------------------------------------------------- + commonFunctions:newTestCasesGroup("SDLAQ-CRS-3069: OnButtonPress to media app in LIMITED") + --4. SDLAQ-CRS-3069: OnButtonPress to media app in LIMITED + + if commonFunctions:isMediaApp() then + --Change app1 to LIMITED + commonSteps:ChangeHMIToLimited() + for i,v in ipairs({"SHORT", "LONG"}) do + for i=1,#ButtonNames_WithoutCUSTOM_BUTTON do + OnButtonPress_OnlyComesToFullOrLimitedHmiLevelApplication("OnlyLimitedApplicationReceivesOnButtonPress"..ButtonNames_WithoutCUSTOM_BUTTON[i] .. '_' .. tostring(v), ButtonNames_WithoutCUSTOM_BUTTON[i], tostring(v)) + end + end + end + + function Test:PostCondition_UnregisterApp2AndApp3() + --Unregister App2 + local cid = self.mobileSession2:SendRPC("UnregisterAppInterface",{}) + self.mobileSession2:ExpectResponse(cid, { success = true, resultCode = "SUCCESS"}) + + --Unregister App3 + local cid = self.mobileSession3:SendRPC("UnregisterAppInterface",{}) + self.mobileSession3:ExpectResponse(cid, { success = true, resultCode = "SUCCESS"}) + end +---------------------------------------------------------------------------------------------- +-----------------------------------------TEST BLOCK VII--------------------------------------- +--------------------------------------Different HMIStatus------------------------------------- +---------------------------------------------------------------------------------------------- + +--Description: Check different HMIStatus + +--Requirement id in JAMA: + --SDLAQ-CRS-1303: HMI Status Requirements for OnButtonPress(FULL, LIMITED) + +--Verification criteria: + --1. None of the applications receives OnButtonPress notification in HMI NONE. + --2. None of the applications receives OnButtonPress notification in HMI BACKGROUND. + --3. In case the app is of media/non-media type HMI Level is FULL the app obtains OnButtonPress notifications from all subscribed buttons. + --4. In case the app is of media type and HMI Level is LIMITED the app obtains OnButtonPress notifications from media subscribed HW buttons only (all except OK). + + --Print new line to separate new test cases group + commonFunctions:newTestCasesGroup("Test suite: Different HMI Level Checks") + ---------------------------------------------------------------------------------------------- + + --1. HMI level is NONE + --Precondition: Deactivate app to NONE HMI level + commonSteps:DeactivateAppToNoneHmiLevel("DeactivateAppToNoneHmiLevel_5_1") + + local function verifyOnButtonPressNotification_IsIgnored(TestCaseName) + + --Verify buttonName and buttonPressMode parameters + for i =1, #ButtonNames_WithoutCUSTOM_BUTTON do + for j =1, #ButtonPressModes do + SendOnButtonPress_IsIgnored(ButtonNames_WithoutCUSTOM_BUTTON[i], ButtonPressModes[j], TestCaseName) + end + end + + --Verify customButtonID parameter + for i =1, #ButtonNames_CUSTOM_BUTTON do + for j =1, #ButtonPressModes do + for n = 1, #CustomButtonIDs do + SendOnButtonPress_CUSTOM_BUTTON_IsIgnored(ButtonNames_CUSTOM_BUTTON[i], ButtonPressModes[j], CustomButtonIDs[n], 1, TestCaseName) + end + end + end + end + + verifyOnButtonPressNotification_IsIgnored("OnButtonPress_InNoneHmiLevel_IsIgnored") + + --Postcondition: + commonSteps:ActivationApp(_, "Activation_App_5_1") + + ---------------------------------------------------------------------------------------------- + + --2. HMI level is LIMITED + + if commonFunctions:isMediaApp() then + -- Precondition: Change app to LIMITED + commonSteps:ChangeHMIToLimited("ChangeHMIToLimited_5_2") + + + --Verify buttonName and buttonPressMode parameters + for i =1, #ButtonNames_WithoutCUSTOM_BUTTON_OK do + for j =1, #ButtonPressModes do + SendOnButtonPress(ButtonNames_WithoutCUSTOM_BUTTON_OK[i], ButtonPressModes[j], "OnButtonPress_InLimitedHmilLevel") + end + end + + --4. In case the app is of media type and HMI Level is LIMITED the app obtains OnButtonPress notifications from media subscribed HW buttons only (all except OK). + for i =1, #ButtonNames_OK do + for j =1, #ButtonPressModes do + SendOnButtonPress_IsIgnored(ButtonNames_OK[i], ButtonPressModes[j], "OnButtonPress_InLimitedHmilLevel_OK_ButtonIsIgnored") + end + end + + --Verify customButtonID parameter + for i =1, #ButtonNames_CUSTOM_BUTTON do + for j =1, #ButtonPressModes do + for n = 1, #CustomButtonIDs do + SendOnButtonPress_CUSTOM_BUTTON(ButtonNames_CUSTOM_BUTTON[i], ButtonPressModes[j], CustomButtonIDs[n], 1, "OnButtonPress_InLimitedHmilLevel") + end + end + end + + --Postcondition: + commonSteps:ActivationApp(_, "Activation_App_5_2") + end + ---------------------------------------------------------------------------------------------- + + --3. HMI level is BACKGROUND + commonTestCases:ChangeAppToBackgroundHmiLevel() + verifyOnButtonPressNotification_IsIgnored("OnButtonPress_InBackgoundHmiLevel_IsIgnored") + +---------------------------------------------------------------------------------------------- + +return Test diff --git a/test_scripts/API/ATF_OnCommand.lua b/test_scripts/API/ATF_OnCommand.lua new file mode 100644 index 0000000000..ab3d44d558 --- /dev/null +++ b/test_scripts/API/ATF_OnCommand.lua @@ -0,0 +1,1970 @@ +Test = require('connecttest') +require('cardinalities') +local events = require('events') +local mobile_session = require('mobile_session') + +--------------------------------------------------------------------------------------------- +-----------------------------Required Shared Libraries--------------------------------------- +--------------------------------------------------------------------------------------------- +local commonFunctions = require('user_modules/shared_testcases/commonFunctions') +local commonSteps = require('user_modules/shared_testcases/commonSteps') +local commonTestCases = require('user_modules/shared_testcases/commonTestCases') +local policyTable = require('user_modules/shared_testcases/testCasesForPolicyTable') +require('user_modules/AppTypes') + +APIName = "OnCommand" -- set API name +local TestCaseNumber = 0 --used to add sub-fix for test cases have the same name. + +--Parameters for OnCommand notification +local appIDValue --appID on HMI side +local grammarIDValue +local cmdIDValue + +local storagePath = config.pathToSDL .."storage/"..config.application1.registerAppInterfaceParams.appID.. "_" .. config.deviceMAC.. "/" +local appNameValue = config.application1.registerAppInterfaceParams.appName + +--Set AudioStreamingState +if commonFunctions:isMediaApp() then + CurrentAudioStreamingState = "AUDIBLE" +else + CurrentAudioStreamingState = "NOT_AUDIBLE" +end + + + +--------------------------------------------------------------------------------------------- +------------------------------------------Common functions----------------------------------- +--------------------------------------------------------------------------------------------- + +local function SendOnSystemContext(self, Input_SystemContext) + self.hmiConnection:SendNotification("UI.OnSystemContext",{ appID = appIDValue, systemContext = Input_SystemContext}) +end + + +--AddCommand with id = cmdIDValue +--Return: grammarIDValue +local function AddCommand(cmdIDValue) + TestCaseNumber = TestCaseNumber + 1 + Test["AddCommand_" .. tostring(TestCaseNumber)] = function(self) + + --mobile side: sending AddCommand request + local cid = self.mobileSession:SendRPC("AddCommand", + { + cmdID = cmdIDValue, + menuParams = + { + menuName ="Command1_onMenu" .. tostring(cmdIDValue) + }, + vrCommands = + { + "Command1_OnVR" .. tostring(cmdIDValue), + "Command2_OnVR" .. tostring(cmdIDValue) + } + }) + + --hmi side: expect UI.AddCommand request + EXPECT_HMICALL("UI.AddCommand", + { + cmdID = cmdIDValue, + menuParams = + { + menuName ="Command1_onMenu" .. tostring(cmdIDValue) + } + }) + :Do(function(_,data) + --hmi side: sending UI.AddCommand response + self.hmiConnection:SendResponse(data.id, data.method, "SUCCESS", {}) + end) + + --hmi side: expect VR.AddCommand request + EXPECT_HMICALL("VR.AddCommand", + { + cmdID = cmdIDValue, + type = "Command", + vrCommands = + { + "Command1_OnVR" .. tostring(cmdIDValue), + "Command2_OnVR" .. tostring(cmdIDValue) + } + }) + :Do(function(_,data) + grammarIDValue = data.params.grammarID + --hmi side: sending VR.AddCommand response + self.hmiConnection:SendResponse(data.id, data.method, "SUCCESS", {}) + end) + + --mobile side: expect AddCommand response + EXPECT_RESPONSE(cid, { success = true, resultCode = "SUCCESS" }) + + --mobile side: expect OnHashChange notification + EXPECT_NOTIFICATION("OnHashChange") + + end +end + +local function DeleteCommand(cmdIDValue) + TestCaseNumber = TestCaseNumber + 1 + Test["DeleteCommand_".. tostring(TestCaseNumber)] = function(self) + --mobile side: sending DeleteCommand request + local cid = self.mobileSession:SendRPC("DeleteCommand", + { + cmdID = cmdIDValue + }) + + --hmi side: expect UI.DeleteCommand request + EXPECT_HMICALL("UI.DeleteCommand", + { + cmdID = cmdIDValue + }) + :Do(function(_,data) + --hmi side: sending UI.DeleteCommand response + self.hmiConnection:SendResponse(data.id, data.method, "SUCCESS", {}) + end) + + --hmi side: expect VR.DeleteCommand request + EXPECT_HMICALL("VR.DeleteCommand", + { + cmdID = cmdIDValue + }) + :Do(function(_,data) + --hmi side: sending VR.DeleteCommand response + self.hmiConnection:SendResponse(data.id, data.method, "SUCCESS", {}) + end) + + --mobile side: expect DeleteCommand response + EXPECT_RESPONSE(cid, { success = true, resultCode = "SUCCESS" }) + + EXPECT_NOTIFICATION("OnHashChange") + end +end + + +local function OpenUIMenu() + TestCaseNumber = TestCaseNumber + 1 + Test["OpenUIMenu_" .. tostring(TestCaseNumber)] = function(self) + + --hmi side: sending UI.OnSystemContext notification + SendOnSystemContext(self,"MENU") + + --mobile side: expected OnHMIStatus notification + EXPECT_NOTIFICATION("OnHMIStatus", { systemContext = "MENU", hmiLevel = "FULL", audioStreamingState = CurrentAudioStreamingState }) + + end +end + +local function CloseUIMenu() + TestCaseNumber = TestCaseNumber + 1 + Test["CloseUIMenu_" .. tostring(TestCaseNumber)] = function(self) + + --hmi side: sending UI.OnSystemContext notification + SendOnSystemContext(self,"MAIN") + + --mobile side: expected OnHMIStatus notification + EXPECT_NOTIFICATION("OnHMIStatus", { systemContext = "MAIN", hmiLevel = "FULL", audioStreamingState = CurrentAudioStreamingState }) + + end +end + +--Send UI.OnCommand with cmdIDValue and appIDValue parameters(TriggerSource=MENU). +local function SendUIOnCommand(TestCaseName) + Test[TestCaseName] = function(self) + + + --hmi side: sending UI.OnCommand notification + self.hmiConnection:SendNotification("UI.OnCommand", + { + cmdID = cmdIDValue, + appID = appIDValue + }) + + --mobile side: expected OnCommand notification + EXPECT_NOTIFICATION("OnCommand", {cmdID = cmdIDValue, triggerSource= "MENU"}) + + end +end + + +local function OpenVRMenu() + TestCaseNumber = TestCaseNumber + 1 + Test["OpenVRMenu_" .. tostring(TestCaseNumber)] = function(self) + + --hmi side: Start VR and sending UI.OnSystemContext notification + self.hmiConnection:SendNotification("VR.Started",{}) + SendOnSystemContext(self,"VRSESSION") + + --mobile side: expected OnHMIStatus notification + if commonFunctions:isMediaApp() then + EXPECT_NOTIFICATION("OnHMIStatus", + { systemContext = "MAIN", hmiLevel = "FULL", audioStreamingState = "NOT_AUDIBLE" }, + { systemContext = "VRSESSION", hmiLevel = "FULL", audioStreamingState = "NOT_AUDIBLE" }) + :Times(2) + else + EXPECT_NOTIFICATION("OnHMIStatus",{ systemContext = "VRSESSION", hmiLevel = "FULL", audioStreamingState = "NOT_AUDIBLE"}) + end + + end +end + +local function CloseVRMenu() + TestCaseNumber = TestCaseNumber + 1 + Test["CloseVRMenu_" .. tostring(TestCaseNumber)] = function(self) + + --hmi side: Stop VR and sending UI.OnSystemContext notification + self.hmiConnection:SendNotification("VR.Stopped",{}) + SendOnSystemContext(self,"MAIN") + + --mobile side: expected OnHMIStatus notification + + if commonFunctions:isMediaApp() then + EXPECT_NOTIFICATION("OnHMIStatus", + { systemContext = "VRSESSION", hmiLevel = "FULL", audioStreamingState = "AUDIBLE" }, + { systemContext = "MAIN", hmiLevel = "FULL", audioStreamingState = "AUDIBLE" }) + :Times(2) + else + EXPECT_NOTIFICATION("OnHMIStatus",{ systemContext = "MAIN", hmiLevel = "FULL", audioStreamingState = "NOT_AUDIBLE"}) + end + end +end + +--Send VR.OnCommand with cmdIDValue, appIDValue and grammarIDValue parameters(TriggerSource=VR) +local function SendVROnCommand(TestCaseName) + Test[TestCaseName] = function(self) + + --hmi side: sending VR.OnCommand notification + self.hmiConnection:SendNotification("VR.OnCommand", + { + cmdID = cmdIDValue, + appID = appIDValue, + grammarID = grammarIDValue + }) + + --mobile side: expect OnCommand notification + EXPECT_NOTIFICATION("OnCommand", {cmdID = cmdIDValue, triggerSource= "VR"}) + end +end + +local function SetTestingCommandID(id) + Test["SetTestingCommandID_" .. id] = function(self) + cmdIDValue = id + print("") + print("------------------------------------------------------------------") + end +end + + + +--Send UI.OnCommand and verify that SDL ignores this notification +local function UIOnCommand_IsIgnored(appIDValue, cmdIDValue, TestCaseName) + Test[TestCaseName] = function(self) + + commonTestCases:DelayedExp(1000) + + --hmi side: sending UI.OnCommand notification + self.hmiConnection:SendNotification("UI.OnCommand", + { + cmdID = cmdIDValue, + appID = appIDValue + }) + + --mobile side: expected OnCommand notification + EXPECT_NOTIFICATION("OnCommand", {cmdID = cmdIDValue, triggerSource= "MENU"}) + :Times(0) + + end +end + +--Send VR.OnCommand and verify that SDL ignores this notification +local function VROnCommand_IsIgnored(appIDValue, cmdIDValue, grammarIDValue, TestCaseName) + Test[TestCaseName] = function(self) + + commonTestCases:DelayedExp(1000) + + --hmi side: sending VR.OnCommand notification + self.hmiConnection:SendNotification("VR.OnCommand", + { + cmdID = cmdIDValue, + appID = appIDValue, + grammarID = grammarIDValue + }) + + --mobile side: expect OnCommand notification + EXPECT_NOTIFICATION("OnCommand", {cmdID = cmdIDValue, triggerSource= "VR"}) + :Times(0) + + end +end + +--Send both UI.OnCommand and VR.OnCommand and verify that SDL ignores this notification +local function OnCommand_IsIgnored(cmdIDValue1, TestCaseName) + + OpenUIMenu() + UIOnCommand_IsIgnored(appIDValue, cmdIDValue1, "UI"..TestCaseName) + CloseUIMenu() + + OpenVRMenu() + VROnCommand_IsIgnored(appIDValue, cmdIDValue1, grammarIDValue, "VR"..TestCaseName) + CloseVRMenu() +end + + +--Send VR.OnCommand with invalid appID and verify that SDL ignores this notification +local function OnCommand_appID_IsInvalid_IsIgnored(appIDValue1, TestCaseName) + + OpenUIMenu() + UIOnCommand_IsIgnored(appIDValue1, cmdIDValue, "UI"..TestCaseName) + CloseUIMenu() + + OpenVRMenu() + VROnCommand_IsIgnored(appIDValue1, cmdIDValue, grammarIDValue, "VR"..TestCaseName) + CloseVRMenu() +end + +--Send VR.OnCommand with invalid grammarID and verify that SDL ignores this notification +local function OnCommand_grammarID_IsInvalid_IsIgnored(grammarIDValue1, TestCaseName) + + OpenVRMenu() + VROnCommand_IsIgnored(appIDValue, cmdIDValue, grammarIDValue1, "VR"..TestCaseName) + CloseVRMenu() +end + +--TriggerSource: MENU, VR (KEYBOARD is not used for OnCommand) +local function verifyOnCommandwithValidCommandID(id, TestCaseName) + + SetTestingCommandID(id) + + AddCommand(id) + + OpenUIMenu() + SendUIOnCommand("UI" .. TestCaseName) + CloseUIMenu() + + OpenVRMenu() + SendVROnCommand("VR" .. TestCaseName) + CloseVRMenu() + + DeleteCommand(id) + +end + + +--------------------------------------------------------------------------------------------- +-------------------------------------------Preconditions------------------------------------- +--------------------------------------------------------------------------------------------- + + commonSteps:DeleteLogsFileAndPolicyTable() + + --Print new line to separate new test cases group + commonFunctions:newTestCasesGroup("Preconditions") + + --1. Activate application + commonSteps:ActivationApp() + + --2. Update policy to allow request + local keep_context = true + local steal_focus = true + --TODO: PT is blocked by ATF defect APPLINK-19188 + --policyTable:precondition_updatePolicyAndAllowFunctionGroup({"FULL", "LIMITED"}, keep_context, steal_focus) + + --TODO: Will be updated after policy flow implementation + --policyTable:precondition_updatePolicy_AllowFunctionInHmiLeves({"BACKGROUND", "FULL", "LIMITED", "NONE"}) -- This function will create a policy table, backup sdl_preloaded_pt.json in sdl/bin folder, overwrite sdl_preloaded_pt.json by new policy table. + policyTable:Precondition_updatePolicy_By_overwriting_preloaded_pt("files/ptu_general.json") + + + ----Get appID Value on HMI side + function Test:GetAppID() + appIDValue = self.applications[appNameValue] + print("appID value on HMI side: "..appIDValue) + end + + + +----------------------------------------------------------------------------------------------- +-------------------------------------------TEST BLOCK I---------------------------------------- +--------------------------------Check normal cases of Mobile request--------------------------- +----------------------------------------------------------------------------------------------- + +--Not Applicable + + +---------------------------------------------------------------------------------------------- +-----------------------------------------TEST BLOCK II---------------------------------------- +-----------------------------Check special cases of Mobile request---------------------------- +---------------------------------------------------------------------------------------------- + +--Not Applicable + + +----------------------------------------------------------------------------------------------- +-------------------------------------------TEST BLOCK III-------------------------------------- +----------------------------------Check normal cases of HMI notification--------------------------- +----------------------------------------------------------------------------------------------- +--Requirement id in JAMA or JIRA: + --SDLAQ-CRS-177: OnCommand_v2_0 + + --Verification criteria: + --1. When the user triggers any command on persistent display command menu, OnCommand notification is returned to the app with corresponding command identifier and MENU trigger source. + --2. When the user triggers any command via VR, OnCommand notification is returned to the app with corresponding command identifier and VR trigger source. +---------------------------------------------------------------------------------------------- + + --List of parameters: + --1. cmdID: type=Integer, minvalue=0, maxvalue=2000000000 + --2. triggerSource: type=TriggerSource: MENU, VR (KEYBOARD is not used for OnCommand) +---------------------------------------------------------------------------------------------- + + + --Print new line to separate new test cases group + commonFunctions:newTestCasesGroup("Test suite: Check normal cases of HMI notification") + + +---------------------------------------------------------------------------------------------- +--Test case #1: Checks OnCommand is sent to application SDL after receiving UI.OnCommand and VR.OnCommand with CommandID is valid values +---------------------------------------------------------------------------------------------- + + verifyOnCommandwithValidCommandID(0, "OnCommand_cmdID_IsLowerBound") + verifyOnCommandwithValidCommandID(2000000000, "OnCommand_cmdID_IsUpperBound") + + + +---------------------------------------------------------------------------------------------- +--Test case #2: Checks OnCommand is NOT sent to application SDL after receiving UI.OnCommand and VR.OnCommand with CommandID, appID, grammarID are invalid values +---------------------------------------------------------------------------------------------- + + --Precondition + local CommandID = 1 + SetTestingCommandID(CommandID) + AddCommand(CommandID) + + --Verify CommandID is invalid + local InvalidcmdIDs = { {value = -1, name = "IsOutLowerBound_IsNegative"}, + {value = 2000000001, name = "IsOutUpperBound"}, + {value = 2, name = "IsNonExist"}, + {value = "1", name = "IsWrongType"}} + + for i =1, #InvalidcmdIDs do + OnCommand_IsIgnored(InvalidcmdIDs[i].value, "OnCommand_cmdID_" ..InvalidcmdIDs[i].name .. "_IsIgnored") + end + ---------------------------------------------------------------------------------------------- + + + --Verify appID is invalid: nonexistent, empty, wrong type values + local Invalid_appIDs = { {value = 123321, name = "IsNonexistent"}, + {value = "", name = "IsEmpty"}} + + for i =1, #Invalid_appIDs do + OnCommand_appID_IsInvalid_IsIgnored(Invalid_appIDs[i].value, "OnCommand_appID_" ..Invalid_appIDs[i].name .. "_IsIgnored") + end + + --Verify appIDValue is wrong type + --{value = tostring(appIDValue), name = "IsWrongType"} + OpenUIMenu() + + Test["UIOnCommand_appID_IsWrongType_IsIgnored"] = function(self) + + commonTestCases:DelayedExp(1000) + + --hmi side: sending UI.OnCommand notification + self.hmiConnection:SendNotification("UI.OnCommand", + { + cmdID = cmdIDValue, + appID = tostring(appIDValue) + }) + + --mobile side: expected OnCommand notification + EXPECT_NOTIFICATION("OnCommand", {cmdID = cmdIDValue, triggerSource= "MENU"}) + :Times(0) + + end + + CloseUIMenu() + + OpenVRMenu() + + Test["VROnCommand_appID_IsWrongType_IsIgnored"] = function(self) + + commonTestCases:DelayedExp(1000) + + --hmi side: sending VR.OnCommand notification + self.hmiConnection:SendNotification("VR.OnCommand", + { + cmdID = 2, + appID = tostring(appIDValue), + grammarID = grammarIDValue + }) + + --mobile side: expect OnCommand notification + EXPECT_NOTIFICATION("OnCommand", {cmdID = cmdIDValue, triggerSource= "VR"}) + :Times(0) + + end + CloseVRMenu() + + + ---------------------------------------------------------------------------------------------- + + --Verify grammarID is invalid: nonexistent, empty, wrong type values + local Invalid_grammarIDs = { {value = 123321, name = "IsNonexistent"}, + {value = "", name = "IsEmpty"}} + + for i =1, #Invalid_grammarIDs do + OnCommand_grammarID_IsInvalid_IsIgnored(Invalid_grammarIDs[i].value, "OnCommand_grammarID_" ..Invalid_grammarIDs[i].name .. "_IsIgnored") + end + + + --Verify appIDValue is wrong type + --{value = tostring(grammarIDValue), name = "IsWrongType"} + OpenVRMenu() + + Test["VROnCommand_grammarID_IsWrongType_IsIgnored"] = function(self) + + commonTestCases:DelayedExp(1000) + + --hmi side: sending VR.OnCommand notification + self.hmiConnection:SendNotification("VR.OnCommand", + { + cmdID = 2, + appID = appIDValue, + grammarID = tostring(grammarIDValue) + }) + + --mobile side: expect OnCommand notification + EXPECT_NOTIFICATION("OnCommand", {cmdID = cmdIDValue, triggerSource= "VR"}) + :Times(0) + + end + + CloseVRMenu() + ---------------------------------------------------------------------------------------------- + + +---------------------------------------------------------------------------------------------- +-----------------------------------------TEST BLOCK IV---------------------------------------- +----------------------------Check special cases of HMI notification--------------------------- +---------------------------------------------------------------------------------------------- +--Requirement id in JAMA or JIRA: + --APPLINK-14765: SDL must cut off the fake parameters from requests, responses and notifications received from HMI + +----------------------------------------------------------------------------------------------- + +--List of test cases for special cases of HMI notification: + --1. InvalidJsonSyntax + --2. InvalidStructure + --3. FakeParams + --4. FakeParameterIsFromAnotherAPI + --5. MissedmandatoryParameters + --6. MissedAllPArameters + --7. SeveralNotifications with the same values + --8. SeveralNotifications with different values +---------------------------------------------------------------------------------------------- + +local function SpecialResponseChecks() + + --Print new line to separate new test cases group + commonFunctions:newTestCasesGroup("Test suite: Check special cases of HMI notification") + + + + --1.1. Verify UI.OnCommand with invalid Json syntax + ---------------------------------------------------------------------------------------------- + OpenUIMenu() + + function Test:UIOnCommand_InvalidJsonSyntax() + + commonTestCases:DelayedExp(1000) + + --hmi side: send UI.OnCommand + --":" is changed by ";" after "jsonrpc" + --self.hmiConnection:Send('{"jsonrpc":"2.0","method":"UI.OnCommand","params":{"appID":'.. appIDValue ..',"cmdID":1}}') + self.hmiConnection:Send('{"jsonrpc";"2.0","method":"UI.OnCommand","params":{"appID":'.. appIDValue ..',"cmdID":1}}') + + --mobile side: expect OnCommand notification + EXPECT_NOTIFICATION("OnCommand", {}) + :Times(0) + end + + CloseUIMenu() + + + + --1.2. Verify VR.OnCommand with invalid Json syntax + ---------------------------------------------------------------------------------------------- + OpenVRMenu() + + function Test:VROnCommand_InvalidJsonSyntax() + + commonTestCases:DelayedExp(1000) + + --hmi side: send UI.OnCommand + --":" is changed by ";" after "jsonrpc" + --self.hmiConnection:Send('{"jsonrpc":"2.0","method":"VR.OnCommand","params":{"appID":'.. appIDValue ..',"cmdID":1,"grammarID":'..grammarIDValue..'}}') + self.hmiConnection:Send('{"jsonrpc";"2.0","method":"VR.OnCommand","params":{"appID":'.. appIDValue ..',"cmdID":1,"grammarID":'..grammarIDValue..'}}') + + --mobile side: expect OnCommand notification + EXPECT_NOTIFICATION("OnCommand", {}) + :Times(0) + end + + CloseVRMenu() + + + + --2.1. Verify UI.OnCommand with invalid structure + ---------------------------------------------------------------------------------------------- + OpenUIMenu() + + function Test:UIOnCommand_InvalidStructure() + + commonTestCases:DelayedExp(1000) + + --hmi side: send UI.OnCommand + --self.hmiConnection:Send('{"jsonrpc":"2.0","method":"UI.OnCommand","params":{"appID":'.. appIDValue ..',"cmdID":1}}') + self.hmiConnection:Send('{"jsonrpc":"2.0","params":{"method":"UI.OnCommand","appID":'.. appIDValue ..',"cmdID":1}}') + + --mobile side: expect OnCommand notification + EXPECT_NOTIFICATION("OnCommand", {}) + :Times(0) + end + + CloseUIMenu() + + + + --2.2. Verify VR.OnCommand with invalid structure + ---------------------------------------------------------------------------------------------- + OpenVRMenu() + + function Test:VROnCommand_InvalidStructure() + + commonTestCases:DelayedExp(1000) + + --hmi side: send UI.OnCommand + --self.hmiConnection:Send('{"jsonrpc":"2.0","method":"VR.OnCommand","params":{"appID":'.. appIDValue ..',"cmdID":1,"grammarID":'..grammarIDValue..'}}') + self.hmiConnection:Send('{"jsonrpc":"2.0","params":{"method":"VR.OnCommand","appID":'.. appIDValue ..',"cmdID":1,"grammarID":'..grammarIDValue..'}}') + + --mobile side: expect OnCommand notification + EXPECT_NOTIFICATION("OnCommand", {}) + :Times(0) + end + + CloseVRMenu() + + + + + --3.1. Verify UI.OnCommand with FakeParams + ---------------------------------------------------------------------------------------------- + OpenUIMenu() + + function Test:UIOnCommand_FakeParams() + + --hmi side: sending UI.OnCommand notification + self.hmiConnection:SendNotification("UI.OnCommand", + { + cmdID = cmdIDValue, + appID = appIDValue, + fake = 123 + }) + + --mobile side: expected OnCommand notification + EXPECT_NOTIFICATION("OnCommand", {cmdID = cmdIDValue, triggerSource= "MENU"}) + :ValidIf (function(_,data) + if data.payload.fake then + commonFunctions:printError(" SDL resends fake parameter to mobile app ") + return false + else + return true + end + end) + + end + + CloseUIMenu() + + + + --3.2. Verify VR.OnCommand with FakeParams + ---------------------------------------------------------------------------------------------- + OpenVRMenu() + + function Test:VROnCommand_FakeParams() + --hmi side: sending VR.OnCommand notification + self.hmiConnection:SendNotification("VR.OnCommand", + { + cmdID = cmdIDValue, + appID = appIDValue, + grammarID = grammarIDValue, + fake = 123 + }) + + --mobile side: expect OnCommand notification + EXPECT_NOTIFICATION("OnCommand", {cmdID = cmdIDValue, triggerSource= "VR"}) + :ValidIf (function(_,data) + if data.payload.fake then + commonFunctions:printError(" SDL resends fake parameter to mobile app ") + return false + else + return true + end + end) + + end + + CloseVRMenu() + + + + + --3.1. Verify UI.OnCommand with FakeParameterIsFromAnotherAPI + ---------------------------------------------------------------------------------------------- + OpenUIMenu() + + function Test:UIOnCommand_FakeParameterIsFromAnotherAPI() + + --hmi side: sending UI.OnCommand notification + self.hmiConnection:SendNotification("UI.OnCommand", + { + cmdID = cmdIDValue, + appID = appIDValue, + sliderPosition = 5 + }) + + --mobile side: expected OnCommand notification + EXPECT_NOTIFICATION("OnCommand", {cmdID = cmdIDValue, triggerSource= "MENU"}) + :ValidIf (function(_,data) + if data.payload.sliderPosition then + commonFunctions:printError(" SDL resends sliderPosition parameter to mobile app ") + return false + else + return true + end + end) + + end + + CloseUIMenu() + + + + --3.2. Verify VR.OnCommand with FakeParameterIsFromAnotherAPI + ---------------------------------------------------------------------------------------------- + OpenVRMenu() + + function Test:VROnCommand_FakeParameterIsFromAnotherAPI() + --hmi side: sending VR.OnCommand notification + self.hmiConnection:SendNotification("VR.OnCommand", + { + cmdID = cmdIDValue, + appID = appIDValue, + grammarID = grammarIDValue, + sliderPosition = 5 + }) + + --mobile side: expect OnCommand notification + EXPECT_NOTIFICATION("OnCommand", {cmdID = cmdIDValue, triggerSource= "VR"}) + :ValidIf (function(_,data) + if data.payload.sliderPosition then + commonFunctions:printError(" SDL resends sliderPosition parameter to mobile app ") + return false + else + return true + end + end) + + end + + CloseVRMenu() + + --4.1. Verify UI.OnCommand mandatory parameter + ---------------------------------------------------------------------------------------------- + OpenUIMenu() + + function Test:UIOnCommand_cmdID_IsMissed() + + commonTestCases:DelayedExp(1000) + + --hmi side: send UI.OnCommand + self.hmiConnection:SendNotification("UI.OnCommand", + { + --cmdID = cmdIDValue, + appID = appIDValue + }) + + --mobile side: expect OnCommand notification + EXPECT_NOTIFICATION("OnCommand", {}) + :Times(0) + end + + CloseUIMenu() + + OpenUIMenu() + function Test:UIOnCommand_appID_IsMissed() + + commonTestCases:DelayedExp(1000) + + --hmi side: send UI.OnCommand + self.hmiConnection:SendNotification("UI.OnCommand", + { + cmdID = cmdIDValue + --appID = appIDValue + }) + + --mobile side: expect OnCommand notification + EXPECT_NOTIFICATION("OnCommand", {}) + :Times(0) + end + + CloseUIMenu() + + + + --4.2. Verify VR.OnCommand mandatory parameter + ---------------------------------------------------------------------------------------------- + OpenVRMenu() + + function Test:VROnCommand_cmdID_IsMissed() + + commonTestCases:DelayedExp(1000) + + --hmi side: send UI.OnCommand + self.hmiConnection:SendNotification("VR.OnCommand", + { + --cmdID = cmdIDValue, + appID = appIDValue, + grammarID = grammarIDValue + }) + + --mobile side: expect OnCommand notification + EXPECT_NOTIFICATION("OnCommand", {}) + :Times(0) + end + + CloseVRMenu() + + OpenVRMenu() + function Test:VROnCommand_appID_IsMissed() + + commonTestCases:DelayedExp(1000) + + --hmi side: send UI.OnCommand + self.hmiConnection:SendNotification("VR.OnCommand", + { + cmdID = cmdIDValue, + --appID = appIDValue, + grammarID = grammarIDValue + }) + + --mobile side: expect OnCommand notification + EXPECT_NOTIFICATION("OnCommand", {}) + :Times(0) + end + + CloseVRMenu() + + OpenVRMenu() + + function Test:VROnCommand_grammarID_IsMissed() + + commonTestCases:DelayedExp(1000) + + --hmi side: send UI.OnCommand + self.hmiConnection:SendNotification("VR.OnCommand", + { + cmdID = cmdIDValue, + appID = appIDValue + --grammarID = grammarIDValue + }) + + --mobile side: expect OnCommand notification + EXPECT_NOTIFICATION("OnCommand", {}) + :Times(0) + end + + CloseVRMenu() + + + --5.1. Verify UI.OnCommand MissedAllPArameters + ---------------------------------------------------------------------------------------------- + OpenUIMenu() + + function Test:UIOnCommand_MissedAllPArameters() + + commonTestCases:DelayedExp(1000) + + --hmi side: send UI.OnCommand + self.hmiConnection:SendNotification("UI.OnCommand", + { + --cmdID = cmdIDValue, + --appID = appIDValue + }) + + --mobile side: expect OnCommand notification + EXPECT_NOTIFICATION("OnCommand", {}) + :Times(0) + end + + CloseUIMenu() + + + + --5.2. Verify VR.OnCommand MissedAllPArameters + ---------------------------------------------------------------------------------------------- + OpenVRMenu() + + function Test:VROnCommand_MissedAllPArameters() + + commonTestCases:DelayedExp(1000) + + --hmi side: send UI.OnCommand + self.hmiConnection:SendNotification("VR.OnCommand", + { + --cmdID = cmdIDValue, + --appID = appIDValue, + --grammarID = grammarIDValue + }) + + --mobile side: expect OnCommand notification + EXPECT_NOTIFICATION("OnCommand", {}) + :Times(0) + end + + CloseVRMenu() + + + + + --6.1. Verify UI.OnCommand with SeveralNotifications_WithTheSameValues + ---------------------------------------------------------------------------------------------- + OpenUIMenu() + + function Test:UIOnCommand_SeveralNotifications_WithTheSameValues() + + --hmi side: sending UI.OnCommand notification + self.hmiConnection:SendNotification("UI.OnCommand", {cmdID = 1, appID = appIDValue}) + self.hmiConnection:SendNotification("UI.OnCommand", {cmdID = 1, appID = appIDValue}) + self.hmiConnection:SendNotification("UI.OnCommand", {cmdID = 1, appID = appIDValue}) + + --mobile side: expected OnCommand notification + EXPECT_NOTIFICATION("OnCommand", + {cmdID = 1, triggerSource= "MENU"}, + {cmdID = 1, triggerSource= "MENU"}, + {cmdID = 1, triggerSource= "MENU"}) + :Times(3) + + + end + + CloseUIMenu() + + + + --6.2. Verify VR.OnCommand with SeveralNotifications_WithTheSameValues + ---------------------------------------------------------------------------------------------- + OpenVRMenu() + + function Test:VROnCommand_SeveralNotifications_WithTheSameValues() + --hmi side: sending VR.OnCommand notification + self.hmiConnection:SendNotification("VR.OnCommand", {cmdID = 1, appID = appIDValue,grammarID = grammarIDValue}) + self.hmiConnection:SendNotification("VR.OnCommand", {cmdID = 1, appID = appIDValue,grammarID = grammarIDValue}) + self.hmiConnection:SendNotification("VR.OnCommand", {cmdID = 1, appID = appIDValue,grammarID = grammarIDValue}) + + + --mobile side: expect OnCommand notification + EXPECT_NOTIFICATION("OnCommand", + {cmdID = 1, triggerSource= "VR"}, + {cmdID = 1, triggerSource= "VR"}, + {cmdID = 1, triggerSource= "VR"}) + :Times(3) + + end + + CloseVRMenu() + + + + --7.1. Verify UI.OnCommand with SeveralNotifications_WithDifferentValues + ---------------------------------------------------------------------------------------------- + AddCommand(2) + AddCommand(3) + + OpenUIMenu() + + function Test:UIOnCommand_SeveralNotifications_WithDifferentValues() + + --hmi side: sending UI.OnCommand notification + self.hmiConnection:SendNotification("UI.OnCommand", {cmdID = 1, appID = appIDValue}) + self.hmiConnection:SendNotification("UI.OnCommand", {cmdID = 2, appID = appIDValue}) + self.hmiConnection:SendNotification("UI.OnCommand", {cmdID = 3, appID = appIDValue}) + + --mobile side: expected OnCommand notification + EXPECT_NOTIFICATION("OnCommand", + {cmdID = 1, triggerSource= "MENU"}, + {cmdID = 2, triggerSource= "MENU"}, + {cmdID = 3, triggerSource= "MENU"}) + :Times(3) + + + end + + CloseUIMenu() + + + + --7.2. Verify VR.OnCommand with SeveralNotifications_WithDifferentValues + ---------------------------------------------------------------------------------------------- + OpenVRMenu() + + function Test:VROnCommand_SeveralNotifications_WithDifferentValues() + --hmi side: sending VR.OnCommand notification + self.hmiConnection:SendNotification("VR.OnCommand", {cmdID = 1, appID = appIDValue,grammarID = grammarIDValue}) + self.hmiConnection:SendNotification("VR.OnCommand", {cmdID = 2, appID = appIDValue,grammarID = grammarIDValue}) + self.hmiConnection:SendNotification("VR.OnCommand", {cmdID = 3, appID = appIDValue,grammarID = grammarIDValue}) + + + --mobile side: expect OnCommand notification + EXPECT_NOTIFICATION("OnCommand", + {cmdID = 1, triggerSource= "VR"}, + {cmdID = 2, triggerSource= "VR"}, + {cmdID = 3, triggerSource= "VR"}) + :Times(3) + + end + + CloseVRMenu() + + + +end + +SpecialResponseChecks() + + +----------------------------------------------------------------------------------------------- +-------------------------------------------TEST BLOCK V---------------------------------------- +-------------------------------------Checks All Result Codes----------------------------------- +----------------------------------------------------------------------------------------------- + +--Description: Check all resultCodes + +local function ResultCodeChecks() + + --Print new line to separate new test cases group + commonFunctions:newTestCasesGroup("Test suite: Policy table does not allow notification send to mobile") + + + ---------------------------------------------------------------------------------------------- + --Test case #1: API is not in policy table, SDL does not send it to mobile + ---------------------------------------------------------------------------------------------- + + --Precondition: Build policy table file + local PTName = policyTable:createPolicyTableWithoutAPI(APIName) + + --Precondition: Update policy table + policyTable:updatePolicy(PTName) + + OnCommand_IsIgnored(1, "OnCommand_IsNotInPolicyTable_IsIgnored") + + + + ---------------------------------------------------------------------------------------------- + --Test case #2: API is in policy table but user has not consented yet, SDL does not send it to mobile + ---------------------------------------------------------------------------------------------- + + + --Precondition: Build policy table file + local keep_context = true + local steal_focus = true + local PTName = policyTable:createPolicyTable(APIName, {"FULL", "LIMITED"}, keep_context, steal_focus) + + --Precondition: Update policy table + policyTable:updatePolicy(PTName) + + OnCommand_IsIgnored(1, "OnCommand_UserHasNotConsentedYet_IsIgnored") + + + ---------------------------------------------------------------------------------------------- + --Test case #3: API is in policy table but user disallows, SDL does not send it to mobile + ---------------------------------------------------------------------------------------------- + + --Precondition: User does not allow function group + policyTable:userConsent(false) + + OnCommand_IsIgnored(1, "OnCommand_UserDisallowed_IsIgnored") + + --Postcondition: User allows function group + policyTable:userConsent(true) + +end +--TODO: PT is blocked by ATF defect APPLINK-19188 +--ResultCodeChecks() + +---------------------------------------------------------------------------------------------- +-----------------------------------------TEST BLOCK VI---------------------------------------- +-------------------------Sequence with emulating of user's action(s)-------------------------- +---------------------------------------------------------------------------------------------- + +--Description: TC's checks SDL behavior by processing + -- different request sequence with timeout + -- with emulating of user's actions + +--Requirement id in JAMA: Mentions in each test case + + +local function SequenceChecks() + + + --Print new line to separate new test cases group + commonFunctions:newTestCasesGroup("Test suite: Sequence with emulating of user's action(s)") + --------------------------------------------------------------------------------------------------------------------------------------------- + + + --TC_GrammarID_03 (SDLAQ-TC-1246) is covered by TC OnCommand_cmdID_IsLowerBound, OnCommand_cmdID_IsUpperBound,.. + + --39[P][MAN]_TC_CommandID_is_calculated_from_grammarID(APPLINK-18431) is covered by TC TC OnCommand_cmdID_IsLowerBound, OnCommand_cmdID_IsUpperBound,.. + + --TC_AddCommand_01(SDLAQ-TC-31): is covered by AddCommand_PositiveCase (BLOCK VI) of ATF_AddCommand.lua + + ----------------------------------------------------------------------------------------------------------------------------------------- + + ----------------------------------------------------------------------------------------------------------------------------------------- + -- Functions and variables. + ----------------------------------------------------------------------------------------------------------------------------------------- + + local GetAppID_Number = 0 + local function GetAppID(AppName) + GetAppID_Number = GetAppID_Number + 1 + Test["GetAppID_" .. tostring(GetAppID_Number)]=function(self) + appIDValue = self.applications[AppName] + print("appID value on HMI side: "..appIDValue) + end + + end + + function Test:registerAppInterface2() + --mobile side: sending request + local CorIdRegister = self.mobileSession1:SendRPC("RegisterAppInterface", config.application2.registerAppInterfaceParams) + + --hmi side: expect BasicCommunication.OnAppRegistered request + EXPECT_HMINOTIFICATION("BasicCommunication.OnAppRegistered", + { + application = + { + appName = config.application2.registerAppInterfaceParams.appName + } + }) + :Do(function(_,data) + self.applications[config.application2.registerAppInterfaceParams.appName] = data.params.application.appID + end) + + --mobile side: expect response + self.mobileSession1:ExpectResponse(CorIdRegister, {syncMsgVersion = config.syncMsgVersion}) + :Timeout(2000) + + --mobile side: expect notification + self.mobileSession1:ExpectNotification("OnHMIStatus", {systemContext = "MAIN", hmiLevel = "NONE", audioStreamingState = "NOT_AUDIBLE"}) + :Timeout(2000) + end + + function Test:registerAppInterface3() + --mobile side: sending request + local CorIdRegister = self.mobileSession2:SendRPC("RegisterAppInterface", config.application3.registerAppInterfaceParams) + + --hmi side: expect BasicCommunication.OnAppRegistered request + EXPECT_HMINOTIFICATION("BasicCommunication.OnAppRegistered", + { + application = + { + appName = config.application3.registerAppInterfaceParams.appName + } + }) + :Do(function(_,data) + self.applications[config.application3.registerAppInterfaceParams.appName] = data.params.application.appID + end) + + --mobile side: expect response + self.mobileSession2:ExpectResponse(CorIdRegister, {syncMsgVersion = config.syncMsgVersion}) + :Timeout(2000) + + --mobile side: expect notification + self.mobileSession2:ExpectNotification("OnHMIStatus", {systemContext = "MAIN", hmiLevel = "NONE", audioStreamingState = "NOT_AUDIBLE"}) + :Timeout(2000) + end + + function Test:registerAppInterface4() + --mobile side: sending request + local CorIdRegister = self.mobileSession3:SendRPC("RegisterAppInterface", config.application4.registerAppInterfaceParams) + + --hmi side: expect BasicCommunication.OnAppRegistered request + EXPECT_HMINOTIFICATION("BasicCommunication.OnAppRegistered", + { + application = + { + appName = config.application4.registerAppInterfaceParams.appName + } + }) + :Do(function(_,data) + self.applications[config.application4.registerAppInterfaceParams.appName] = data.params.application.appID + end) + + --mobile side: expect response + self.mobileSession3:ExpectResponse(CorIdRegister, {syncMsgVersion = config.syncMsgVersion}) + :Timeout(2000) + + --mobile side: expect notification + self.mobileSession3:ExpectNotification("OnHMIStatus", + { + systemContext = "MAIN", hmiLevel = "NONE", audioStreamingState = "NOT_AUDIBLE" + }) + :Timeout(2000) + end + + function Test:registerAppInterface5() + --mobile side: sending request + local CorIdRegister = self.mobileSession4:SendRPC("RegisterAppInterface", config.application5.registerAppInterfaceParams) + + --hmi side: expect BasicCommunication.OnAppRegistered request + EXPECT_HMINOTIFICATION("BasicCommunication.OnAppRegistered", + { + application = + { + appName = config.application5.registerAppInterfaceParams.appName + } + }) + :Do(function(_,data) + self.applications[config.application5.registerAppInterfaceParams.appName] = data.params.application.appID + end) + + --mobile side: expect response + self.mobileSession4:ExpectResponse(CorIdRegister, {syncMsgVersion = config.syncMsgVersion}) + :Timeout(2000) + + --mobile side: expect notification + self.mobileSession4:ExpectNotification("OnHMIStatus", { systemContext = "MAIN", hmiLevel = "NONE", audioStreamingState = "NOT_AUDIBLE"}) + :Timeout(2000) + end + + + ----------------------------------------------------------------------------------------------------------------------------------------- + -- Preconditions. + ----------------------------------------------------------------------------------------------------------------------------------------- + + --Create second session + function Test:Precondition_SecondSession() + + -- Connected expectation + --mobile side: start new session + self.mobileSession1 = mobile_session.MobileSession( + self, + self.mobileConnection) + self.mobileSession1:StartService(7) + + end + + --Create third Session + function Test:Precondition_ThirdSession() + --mobile side: start new session + self.mobileSession2 = mobile_session.MobileSession( + self, + self.mobileConnection) + self.mobileSession2:StartService(7) + end + + --Create fourth Session + function Test:Precondition_Fourth_Session() + --mobile side: start new session + self.mobileSession3 = mobile_session.MobileSession( + self, + self.mobileConnection) + self.mobileSession3:StartService(7) + end + + --Create fiffth Session + function Test:Precondition_Fiffth_Session() + --mobile side: start new session + self.mobileSession4 = mobile_session.MobileSession( + self, + self.mobileConnection) + self.mobileSession4:StartService(7) + end + + + function Test:Precondition_Register_Second_App() + self:registerAppInterface2() + end + + function Test:Precondition_Register_Third_App() + self:registerAppInterface3() + end + + function Test:Precondition_Register_Fourth_App() + self:registerAppInterface4() + end + + function Test:Precondition_Register_Fiffth_App() + self:registerAppInterface5() + end + + AddCommand(1001) + + ------------------------------------------------------------------------------------------------------ + + + commonFunctions:newTestCasesGroup("***APPLINK-18430:SDL calculates appID depending on proper grammarID provided by HMI in case multiple apps are registered***") + + + commonFunctions:newTestCasesGroup("******************************Step1:Sends VR.OnCommand() to App1******************************") + + OpenVRMenu() + + --Send VR.OnCommand() to App1 + function Test:Send_VROnCommand_To_App1() + + --hmi side: sending UI.OnCommand notification + self.hmiConnection:SendNotification("VR.OnCommand", + { + + cmdID = 1001, + appID = appIDValue, + grammarID = grammarIDValue + + }) + + + --mobile side: expect OnCommand notification + EXPECT_NOTIFICATION("OnCommand", {cmdID = 1001, triggerSource= "VR"}) + + end + + CloseVRMenu() + ------------------------------------------------------------------------------------------------------------------------- + + commonFunctions:newTestCasesGroup("******************************Step2:Sends VR.OnCommand() to App2******************************") + + --Activate App2 + function Test:Step2_Activate_App2() + + local rid = self.hmiConnection:SendRequest("SDL.ActivateApp", { appID = self.applications[config.application2.registerAppInterfaceParams.appName]}) + + EXPECT_HMIRESPONSE(rid) + :Do(function(_,data) + if data.result.code ~= 0 then + quit() + end + end) + + if config.application2.registerAppInterfaceParams.isMediaApplication == true or + config.application2.registerAppInterfaceParams.appHMIType[1]=="NAVIGATION" or + config.application2.registerAppInterfaceParams.appHMIType[1]=="COMMUNICATION" + then + self.mobileSession1:ExpectNotification("OnHMIStatus",{hmiLevel = "FULL", audioStreamingState = "AUDIBLE", systemContext = "MAIN"}) + else + self.mobileSession1:ExpectNotification("OnHMIStatus",{hmiLevel = "FULL", audioStreamingState = "NOT_AUDIBLE", systemContext = "MAIN"}) + end + end + ------------------------------------------------------------------------------------------------------- + + --Add a command to App2 + function Test:Step2_AddCommand_To_App2() + + --mobile side: sending AddCommand request + local cid = self.mobileSession1:SendRPC("AddCommand", + { + cmdID = 2001, + menuParams = + { + position = 0, + menuName ="Command2001" + }, + vrCommands = + { + "VRCommand2001" + } + }) + --hmi side: expect UI.AddCommand request + EXPECT_HMICALL("UI.AddCommand", + { + cmdID = 2001, + menuParams = + { + menuName ="Command2001" + } + }) + :Do(function(_,data) + --hmi side: sending UI.AddCommand response + self.hmiConnection:SendResponse(data.id, data.method, "SUCCESS", {}) + end) + + --hmi side: expect VR.AddCommand request + EXPECT_HMICALL("VR.AddCommand", + { + cmdID = 2001, + type = "Command", + vrCommands = + { + "VRCommand2001" + } + }) + :Do(function(_,data) + --hmi side: sending VR.AddCommand response + grammarIDValue2 = data.params.grammarID + + self.hmiConnection:SendResponse(data.id, data.method, "SUCCESS", {}) + end) + + -- --mobile side: expect AddCommand response + self.mobileSession1:ExpectResponse(cid, { success = true, resultCode = "SUCCESS" }) + + --mobile side: expect OnHashChange notification + self.mobileSession1:ExpectNotification("OnHashChange",{}) + end + ------------------------------------------------------------------------------------------- + GetAppID(config.application2.registerAppInterfaceParams.appName) + ------------------------------------------------------------------------------------------- + + --Send VR.OnCommand() to App2 + function Test:Send_VROnCommand_To_App2() + + --hmi side: Start VR and sending UI.OnSystemContext notification + self.hmiConnection:SendNotification("VR.Started",{}) + self.hmiConnection:SendNotification("UI.OnSystemContext",{ appID = self.applications[config.application2.registerAppInterfaceParams.appName], systemContext = "VRSESSION" }) + + --hmi side: sending several VR.OnCommand notifications + self.hmiConnection:SendNotification("VR.OnCommand", + { + cmdID = 2001, + appID = appIDValue, + grammarID = grammarIDValue2, + }) + + --hmi side: Stop VR and sending UI.OnSystemContext notification + self.hmiConnection:SendNotification("VR.Stopped",{}) + self.hmiConnection:SendNotification("UI.OnSystemContext",{ appID = self.applications[config.application2.registerAppInterfaceParams.appName], systemContext = "MAIN" }) + + -- --mobile side: expected OnHMIStatus notification + if config.application2.registerAppInterfaceParams.isMediaApplication == true or + config.application2.registerAppInterfaceParams.appHMIType[1]=="NAVIGATION" or + config.application2.registerAppInterfaceParams.appHMIType[1]=="COMMUNICATION" then + + self.mobileSession1:ExpectNotification("OnHMIStatus", + { systemContext = "MAIN", hmiLevel = "FULL", audioStreamingState = "NOT_AUDIBLE"}, + { systemContext = "VRSESSION", hmiLevel = "FULL", audioStreamingState = "NOT_AUDIBLE"}, + { systemContext = "VRSESSION", hmiLevel = "FULL", audioStreamingState = "AUDIBLE"}, + { systemContext = "MAIN", hmiLevel = "FULL", audioStreamingState = "AUDIBLE"}) + :Times(4) + else + + self.mobileSession1:ExpectNotification("OnHMIStatus",{ systemContext = "VRSESSION", hmiLevel = "FULL", audioStreamingState = "NOT_AUDIBLE"},{ systemContext = "MAIN", hmiLevel = "FULL", audioStreamingState = "NOT_AUDIBLE"} ): Times(2) + end + --mobile side: expect OnCommand notification + self.mobileSession1:ExpectNotification("OnCommand", {cmdID = 2001, triggerSource= "VR"}) + + + end + ------------------------------------------------------------------------------------------------------------------------- + + commonFunctions:newTestCasesGroup("******************************Step3:Sends VR.OnCommand() to App3******************************") + + --Activate App3 + function Test:Step3_Activate_App3() + + local rid = self.hmiConnection:SendRequest("SDL.ActivateApp", { appID = self.applications[config.application3.registerAppInterfaceParams.appName]}) + + EXPECT_HMIRESPONSE(rid) + :Do(function(_,data) + if data.result.code ~= 0 then + quit() + end + end) + + if config.application3.registerAppInterfaceParams.isMediaApplication == true or + config.application3.registerAppInterfaceParams.appHMIType[1]=="NAVIGATION" or + config.application3.registerAppInterfaceParams.appHMIType[1]=="COMMUNICATION" then + + self.mobileSession2:ExpectNotification("OnHMIStatus",{hmiLevel = "FULL", audioStreamingState = "AUDIBLE", systemContext = "MAIN"}) + + else + + self.mobileSession2:ExpectNotification("OnHMIStatus",{hmiLevel = "FULL", audioStreamingState = "NOT_AUDIBLE", systemContext = "MAIN"}) + + end + end + ------------------------------------------------------------------------------------------------------- + + --Add a Command for App3 + function Test:Step3_AddCommand_To_App3() + + --mobile side: sending AddCommand request + local cid = self.mobileSession2:SendRPC("AddCommand", + { + cmdID = 3001, + menuParams = + { + position = 0, + menuName ="Command3001" + }, + vrCommands = + { + "VRCommand3001" + } + }) + --hmi side: expect UI.AddCommand request + EXPECT_HMICALL("UI.AddCommand", + { + cmdID = 3001, + menuParams = + { + menuName ="Command3001" + } + }) + :Do(function(_,data) + --hmi side: sending UI.AddCommand response + self.hmiConnection:SendResponse(data.id, data.method, "SUCCESS", {}) + end) + + --hmi side: expect VR.AddCommand request + EXPECT_HMICALL("VR.AddCommand", + { + cmdID = 3001, + type = "Command", + vrCommands = + { + "VRCommand3001" + } + }) + :Do(function(_,data) + --hmi side: sending VR.AddCommand response + grammarIDValue3 = data.params.grammarID + self.hmiConnection:SendResponse(data.id, data.method, "SUCCESS", {}) + end) + + -- --mobile side: expect AddCommand response + self.mobileSession2:ExpectResponse(cid, { success = true, resultCode = "SUCCESS" }) + + --mobile side: expect OnHashChange notification + self.mobileSession2:ExpectNotification("OnHashChange",{}) + end + + ------------------------------------------------------------------------------------------------------------ + GetAppID(config.application3.registerAppInterfaceParams.appName) + ------------------------------------------------------------------------------------------------------------ + + --Send VR.OnCommand() to App3 + function Test:Send_VR_OnCommand_To_App3() + + --hmi side: Start VR and sending UI.OnSystemContext notification + self.hmiConnection:SendNotification("VR.Started",{}) + self.hmiConnection:SendNotification("UI.OnSystemContext",{ appID = self.applications[config.application3.registerAppInterfaceParams.appName], systemContext = "VRSESSION" }) + + --hmi side: sending several VR.OnCommand notifications + self.hmiConnection:SendNotification("VR.OnCommand", + { + cmdID = 3001, + appID = appIDValue, + grammarID = grammarIDValue3, + }) + + --hmi side: Stop VR and sending UI.OnSystemContext notification + self.hmiConnection:SendNotification("VR.Stopped",{}) + self.hmiConnection:SendNotification("UI.OnSystemContext",{ appID = self.applications[config.application3.registerAppInterfaceParams.appName], systemContext = "MAIN" }) + + --mobile side: expected OnHMIStatus notification + if config.application3.registerAppInterfaceParams.isMediaApplication == true or + config.application3.registerAppInterfaceParams.appHMIType[1]=="NAVIGATION" or + config.application3.registerAppInterfaceParams.appHMIType[1]=="COMMUNICATION"then + + self.mobileSession2:ExpectNotification("OnHMIStatus", + { systemContext = "MAIN", hmiLevel = "FULL", audioStreamingState = "NOT_AUDIBLE"}, + { systemContext = "VRSESSION", hmiLevel = "FULL", audioStreamingState = "NOT_AUDIBLE"}, + { systemContext = "VRSESSION", hmiLevel = "FULL", audioStreamingState = "AUDIBLE"}, + { systemContext = "MAIN", hmiLevel = "FULL", audioStreamingState = "AUDIBLE"}) + :Times(4) + + else + + self.mobileSession2:ExpectNotification("OnHMIStatus",{ systemContext = "VRSESSION", hmiLevel = "FULL", audioStreamingState = "NOT_AUDIBLE"},{ systemContext = "MAIN", hmiLevel = "FULL", audioStreamingState = "NOT_AUDIBLE"} ): Times(2) + end + + --mobile side: expect OnCommand notification + self.mobileSession2:ExpectNotification("OnCommand", {cmdID = 3001, triggerSource= "VR"}) + + end + ------------------------------------------------------------------------------------------------------------------------- + + commonFunctions:newTestCasesGroup("******************************Step4:Sends VR.OnCommand() to App4******************************") + + --Activate App4 + function Test:Step4_Activate_App4() + + local rid = self.hmiConnection:SendRequest("SDL.ActivateApp", { appID = self.applications[config.application4.registerAppInterfaceParams.appName]}) + + EXPECT_HMIRESPONSE(rid) + :Do(function(_,data) + if data.result.code ~= 0 then + quit() + end + end) + + if config.application4.registerAppInterfaceParams.isMediaApplication == true or + config.application4.registerAppInterfaceParams.appHMIType[1]=="NAVIGATION" or + config.application4.registerAppInterfaceParams.appHMIType[1]=="COMMUNICATION" then + + self.mobileSession3:ExpectNotification("OnHMIStatus",{hmiLevel = "FULL", audioStreamingState = "AUDIBLE", systemContext = "MAIN"}) + + else + + self.mobileSession3:ExpectNotification("OnHMIStatus",{hmiLevel = "FULL", audioStreamingState = "NOT_AUDIBLE", systemContext = "MAIN"}) + + end + end + ------------------------------------------------------------------------------------------------------- + + --Add a Command for App4 + function Test:Step4_AddCommand_To_App4() + + --mobile side: sending AddCommand request + local cid = self.mobileSession3:SendRPC("AddCommand", + { + cmdID = 4001, + menuParams = + { + position = 0, + menuName ="Command4001" + }, + vrCommands = + { + "VRCommand4001" + } + }) + --hmi side: expect UI.AddCommand request + EXPECT_HMICALL("UI.AddCommand", + { + cmdID = 4001, + menuParams = + { + menuName ="Command4001" + } + }) + :Do(function(_,data) + --hmi side: sending UI.AddCommand response + self.hmiConnection:SendResponse(data.id, data.method, "SUCCESS", {}) + end) + + --hmi side: expect VR.AddCommand request + EXPECT_HMICALL("VR.AddCommand", + { + cmdID = 4001, + type = "Command", + vrCommands = + { + "VRCommand4001" + } + }) + :Do(function(_,data) + + --hmi side: sending VR.AddCommand response + grammarIDValue4 = data.params.grammarID + self.hmiConnection:SendResponse(data.id, data.method, "SUCCESS", {}) + end) + + --mobile side: expect AddCommand response + self.mobileSession3:ExpectResponse(cid, { success = true, resultCode = "SUCCESS" }) + + --mobile side: expect OnHashChange notification + self.mobileSession3:ExpectNotification("OnHashChange",{}) + end + + ------------------------------------------------------------------------------------------------------------ + GetAppID(config.application4.registerAppInterfaceParams.appName) + ------------------------------------------------------------------------------------------------------------ + + --Send VR.OnCommand() to App4 + function Test:Send_VR_OnCommand_To_App4() + + --hmi side: Start VR and sending UI.OnSystemContext notification + self.hmiConnection:SendNotification("VR.Started",{}) + self.hmiConnection:SendNotification("UI.OnSystemContext",{ appID = self.applications[config.application4.registerAppInterfaceParams.appName], systemContext = "VRSESSION" }) + + --hmi side: sending several VR.OnCommand notifications + self.hmiConnection:SendNotification("VR.OnCommand", + { + cmdID = 4001, + appID = appIDValue, + grammarID = grammarIDValue4, + }) + + --hmi side: Stop VR and sending UI.OnSystemContext notification + self.hmiConnection:SendNotification("VR.Stopped",{}) + self.hmiConnection:SendNotification("UI.OnSystemContext",{ appID = self.applications[config.application4.registerAppInterfaceParams.appName], systemContext = "MAIN" }) + + --mobile side: expected OnHMIStatus notification + if config.application4.registerAppInterfaceParams.isMediaApplication == true or + config.application4.registerAppInterfaceParams.appHMIType[1]=="NAVIGATION" or + config.application4.registerAppInterfaceParams.appHMIType[1]=="COMMUNICATION"then + + self.mobileSession3:ExpectNotification("OnHMIStatus", + { systemContext = "MAIN", hmiLevel = "FULL", audioStreamingState = "NOT_AUDIBLE"}, + { systemContext = "VRSESSION", hmiLevel = "FULL", audioStreamingState = "NOT_AUDIBLE"}, + { systemContext = "VRSESSION", hmiLevel = "FULL", audioStreamingState = "AUDIBLE"}, + { systemContext = "MAIN", hmiLevel = "FULL", audioStreamingState = "AUDIBLE"}) + :Times(4) + + else + + self.mobileSession3:ExpectNotification("OnHMIStatus",{ systemContext = "VRSESSION", hmiLevel = "FULL", audioStreamingState = "NOT_AUDIBLE"},{ systemContext = "MAIN", hmiLevel = "FULL", audioStreamingState = "NOT_AUDIBLE"} ): Times(2) + end + + --mobile side: expect OnCommand notification + self.mobileSession3:ExpectNotification("OnCommand", {cmdID = 4001, triggerSource= "VR"}) + :Times(1) + + end +-------------------------------------------------------------------------------------------------------------------------- + + commonFunctions:newTestCasesGroup("******************************Step5:Sends VR.OnCommand() to App5******************************") + + --Activate App5 + function Test:Step5_Activate_App5() + + local rid = self.hmiConnection:SendRequest("SDL.ActivateApp", { appID = self.applications[config.application5.registerAppInterfaceParams.appName]}) + + EXPECT_HMIRESPONSE(rid) + :Do(function(_,data) + if data.result.code ~= 0 then + quit() + end + end) + + if config.application5.registerAppInterfaceParams.isMediaApplication == true or + config.application5.registerAppInterfaceParams.appHMIType[1]=="NAVIGATION" or + config.application5.registerAppInterfaceParams.appHMIType[1]=="COMMUNICATION" then + + self.mobileSession4:ExpectNotification("OnHMIStatus",{hmiLevel = "FULL", audioStreamingState = "AUDIBLE", systemContext = "MAIN"}) + + else + + self.mobileSession4:ExpectNotification("OnHMIStatus",{hmiLevel = "FULL", audioStreamingState = "NOT_AUDIBLE", systemContext = "MAIN"}) + + end + end + ------------------------------------------------------------------------------------------------------- + + --Add a Command for App5 + function Test:Step5_AddCommand_To_App5() + + --mobile side: sending AddCommand request + local cid = self.mobileSession4:SendRPC("AddCommand", + { + cmdID = 5001, + menuParams = + { + position = 0, + menuName ="Command5001" + }, + vrCommands = + { + "VRCommand5001" + } + }) + --hmi side: expect UI.AddCommand request + EXPECT_HMICALL("UI.AddCommand", + { + cmdID = 5001, + menuParams = + { + menuName ="Command5001" + } + }) + :Do(function(_,data) + --hmi side: sending UI.AddCommand response + self.hmiConnection:SendResponse(data.id, data.method, "SUCCESS", {}) + end) + + --hmi side: expect VR.AddCommand request + EXPECT_HMICALL("VR.AddCommand", + { + cmdID = 5001, + type = "Command", + vrCommands = + { + "VRCommand5001" + } + }) + :Do(function(_,data) + + --hmi side: sending VR.AddCommand response + grammarIDValue5 = data.params.grammarID + self.hmiConnection:SendResponse(data.id, data.method, "SUCCESS", {}) + end) + + --mobile side: expect AddCommand response + self.mobileSession4:ExpectResponse(cid, { success = true, resultCode = "SUCCESS" }) + + --mobile side: expect OnHashChange notification + self.mobileSession4:ExpectNotification("OnHashChange",{}) + end + + ------------------------------------------------------------------------------------------------------------ + GetAppID(config.application5.registerAppInterfaceParams.appName) + ------------------------------------------------------------------------------------------------------------ + + --Send VR.OnCommand() to App5 + function Test:Send_VR_OnCommand_To_App5() + + --hmi side: Start VR and sending UI.OnSystemContext notification + self.hmiConnection:SendNotification("VR.Started",{}) + self.hmiConnection:SendNotification("UI.OnSystemContext",{ appID = self.applications[config.application5.registerAppInterfaceParams.appName], systemContext = "VRSESSION" }) + + --hmi side: sending several VR.OnCommand notifications + self.hmiConnection:SendNotification("VR.OnCommand", + { + cmdID = 5001, + appID = appIDValue, + grammarID = grammarIDValue5, + }) + + --hmi side: Stop VR and sending UI.OnSystemContext notification + self.hmiConnection:SendNotification("VR.Stopped",{}) + self.hmiConnection:SendNotification("UI.OnSystemContext",{ appID = self.applications[config.application5.registerAppInterfaceParams.appName], systemContext = "MAIN" }) + + --mobile side: expected OnHMIStatus notification + if config.application5.registerAppInterfaceParams.isMediaApplication == true or + config.application5.registerAppInterfaceParams.appHMIType[1]=="NAVIGATION" or + config.application5.registerAppInterfaceParams.appHMIType[1]=="COMMUNICATION" + then + self.mobileSession4:ExpectNotification("OnHMIStatus", + { systemContext = "MAIN", hmiLevel = "FULL", audioStreamingState = "NOT_AUDIBLE"}, + { systemContext = "VRSESSION", hmiLevel = "FULL", audioStreamingState = "NOT_AUDIBLE"}, + { systemContext = "VRSESSION", hmiLevel = "FULL", audioStreamingState = "AUDIBLE"}, + { systemContext = "MAIN", hmiLevel = "FULL", audioStreamingState = "AUDIBLE"}) + :Times(4) + + else + + self.mobileSession4:ExpectNotification("OnHMIStatus",{ systemContext = "VRSESSION", hmiLevel = "FULL", audioStreamingState = "NOT_AUDIBLE"},{ systemContext = "MAIN", hmiLevel = "FULL", audioStreamingState = "NOT_AUDIBLE"} ) + :Times(2) + end + + --mobile side: expect OnCommand notification + self.mobileSession4:ExpectNotification("OnCommand", {cmdID = 5001, triggerSource= "VR"}) + + end + --------------------------------------------------------------------------------------------------------------------------- + function Test:PostCondition_UnregisterApps() + + --Unregister App3 + local cid = self.mobileSession2:SendRPC("UnregisterAppInterface",{}) + self.mobileSession2:ExpectResponse(cid, { success = true, resultCode = "SUCCESS"}) + + --Unregister App4 + local cid = self.mobileSession3:SendRPC("UnregisterAppInterface",{}) + self.mobileSession3:ExpectResponse(cid, { success = true, resultCode = "SUCCESS"}) + + --Unregister App5 + local cid = self.mobileSession4:SendRPC("UnregisterAppInterface",{}) + self.mobileSession4:ExpectResponse(cid, { success = true, resultCode = "SUCCESS"}) + + end + + -------------------------------------------------------------------------------------------------------------------------- + --Postcondition: + function Test:Postcondition_GetAppID1() + appIDValue = self.applications[appNameValue] + print("appID value on HMI side: "..appIDValue) + end +end + +SequenceChecks() + + + + +---------------------------------------------------------------------------------------------- +-----------------------------------------TEST BLOCK VII--------------------------------------- +--------------------------------------Different HMIStatus------------------------------------- +---------------------------------------------------------------------------------------------- + +--Description: Check different HMIStatus + +--Requirement id in JAMA: + --SDLAQ-CRS-1305: HMI Status Requirements for OnCommand (FULL, LIMITED) + + --Verification criteria: + --1. None of the applications in HMI NONE or BACKGROUND receives OnCommand request. + --2. The applications in HMI FULL don't reject OnCommand request. + --3. The applications in HMI LIMITED don't reject OnCommand request. + + +local function verifyDifferentHMIStatus() + + --Print new line to separate new test cases group + commonFunctions:newTestCasesGroup("Test suite: Different HMI Level Checks") + ---------------------------------------------------------------------------------------------- + + + --1. HMI level is NONE + + --Precondition: Deactivate app to NONE HMI level + commonSteps:DeactivateAppToNoneHmiLevel() + + UIOnCommand_IsIgnored(appIDValue, cmdIDValue, "UIOnCommand_InNONE_HmiLevel_IsIgnored") + VROnCommand_IsIgnored(appIDValue, cmdIDValue, grammarIDValue, "VROnCommand_InNONE_HmiLevel_IsIgnored") + + --Postcondition: Activate app + commonSteps:ActivationApp(_, "ActivationApp_NONE_postcondition") + ---------------------------------------------------------------------------------------------- + + + --2. HMI level is LIMITED + if commonFunctions:isMediaApp() then + -- Precondition: Change app to LIMITED + commonSteps:ChangeHMIToLimited() + + SendUIOnCommand("UIOnCommand_InLIMITED_HmiLevel_IsIgnored") + + Test["OpenVRMenu_LIMITED"] = function(self) + + commonTestCases:DelayedExp(1000) + + --hmi side: Start VR and sending UI.OnSystemContext notification + self.hmiConnection:SendNotification("VR.Started",{}) + + --mobile side: expected OnHMIStatus notification + EXPECT_NOTIFICATION("OnHMIStatus", { systemContext = "MAIN", hmiLevel = "LIMITED", audioStreamingState = "NOT_AUDIBLE"}) + + end + + SendVROnCommand("VROnCommand_InLIMITED_HmiLevel_IsIgnored") + + Test["CloseVRMenu_LIMITED"] = function(self) + + commonTestCases:DelayedExp(1000) + + --hmi side: Stop VR and sending UI.OnSystemContext notification + self.hmiConnection:SendNotification("VR.Stopped",{}) + + --mobile side: expected OnHMIStatus notification + EXPECT_NOTIFICATION("OnHMIStatus", { systemContext = "MAIN", hmiLevel = "LIMITED", audioStreamingState = "AUDIBLE"}) + end + + --Postcondition: Activate app + commonSteps:ActivationApp(_, "ActivationApp_LIMITED_postcondition") + end + ---------------------------------------------------------------------------------------------- + + + --3. HMI level is BACKGROUND + commonTestCases:ChangeAppToBackgroundHmiLevel() + + UIOnCommand_IsIgnored(appIDValue, cmdIDValue, "UIOnCommand_InBACKGROUND_HmiLevel_IsIgnored") + VROnCommand_IsIgnored(appIDValue, cmdIDValue, grammarIDValue, "VROnCommand_InBACKGROUND_HmiLevel_IsIgnored") + ---------------------------------------------------------------------------------------------- +end + +verifyDifferentHMIStatus() + + --------------------------------------------------------------------------------------------- + -------------------------------------------Post-conditions----------------------------------- + --------------------------------------------------------------------------------------------- + + --Postcondition: restore sdl_preloaded_pt.json + policyTable:Restore_preloaded_pt() + +return Test \ No newline at end of file diff --git a/test_scripts/ATF_OnDriverDistraction.lua b/test_scripts/API/ATF_OnDriverDistraction.lua similarity index 86% rename from test_scripts/ATF_OnDriverDistraction.lua rename to test_scripts/API/ATF_OnDriverDistraction.lua index b062bfeb53..81229ecc00 100644 --- a/test_scripts/ATF_OnDriverDistraction.lua +++ b/test_scripts/API/ATF_OnDriverDistraction.lua @@ -8,17 +8,16 @@ local file_connection = require('file_connection') local module = require('testbase') -config.deviceMAC = "12ca17b49af2289436f303e0166030a21e525d266e209267433801a8fd4071a0" - --------------------------------------------------------------------------------------------- -----------------------------Required Shared Libraries--------------------------------------- --------------------------------------------------------------------------------------------- local commonFunctions = require('user_modules/shared_testcases/commonFunctions') local commonSteps = require('user_modules/shared_testcases/commonSteps') local commonTestCases = require('user_modules/shared_testcases/commonTestCases') +local policyTable = require('user_modules/shared_testcases/testCasesForPolicyTable') require('user_modules/AppTypes') - + --------------------------------------------------------------------------------------------- ------------------------------------ Common Variables --------------------------------------- --------------------------------------------------------------------------------------------- @@ -43,7 +42,7 @@ function Test:createRequest() return { state = "DD_ON" } - + end --------------------------------------------------------------------------------------------- @@ -53,34 +52,34 @@ function Test:verify_SUCCESS_Case(Request) --hmi side: sending OnDriverDistraction notification self.hmiConnection:SendNotification("UI.OnDriverDistraction",Request) - if + if Request.fake or Request.syncFileName then local state = Request.state Request = {} - Request = + Request = { state = state } end - + --mobile side: expect the response EXPECT_NOTIFICATION("OnDriverDistraction", Request) :ValidIf (function(_,data) if data.payload.fake ~= nil or data.payload.syncFileName ~= nil then print(" \27[36m SDL resend fake parameter to mobile app \27[0m") return false - else + else return true end end) end --This function sends a invalid notification from HMI and then the notification is not sent to mobile -function Test:verify_INVALID_Case(Request) +function Test:verify_INVALID_Case(Request) --hmi side: sending OnDriverDistraction notification self.hmiConnection:SendNotification("UI.OnDriverDistraction",Request) - + --mobile side: expect the response EXPECT_NOTIFICATION("OnDriverDistraction") :Times(0) @@ -90,18 +89,33 @@ end --------------------------------------------------------------------------------------------- -------------------------------------------Preconditions------------------------------------- --------------------------------------------------------------------------------------------- - + + --Print new line to separate Preconditions + commonFunctions:newTestCasesGroup("Preconditions") + + --Delete app_info.dat, logs and policy table + commonSteps:DeleteLogsFileAndPolicyTable() + + --1. Activate application commonSteps:ActivationApp() - - + + --2. Update policy to allow request + policyTable:Precondition_updatePolicy_By_overwriting_preloaded_pt("files/ptu_general.json") + + --------------------------------------------------------------------------------------------- -----------------------------------------I TEST BLOCK---------------------------------------- --CommonRequestCheck: Check of mandatory/conditional request's parameters (mobile protocol)-- --------------------------------------------------------------------------------------------- + + + --Print new line to separate test suite + commonFunctions:newTestCasesGroup("Test Suite For mandatory/conditional request's parameters (mobile protocol)") + --Begin Test suit PositiveRequestCheck - --Description: TC's checks processing + --Description: TC's checks processing -- request with all parameters -- request with only mandatory parameters -- request with all combinations of conditional-mandatory parameters (if exist) @@ -111,11 +125,11 @@ end -- request with fake parameters (fake - not from protocol, from another request) -- request is sent with invalid JSON structure -- different conditions of correlationID parameter (invalid, several the same etc.) - + --Begin Test case CommonRequestCheck.1 --Description: This test is intended to check positive cases and when all parameters are in boundary conditions - --Requirement id in JAMA: + --Requirement id in JAMA: -- SDLAQ-CRS-182 -- SDLAQ-CRS-909 @@ -124,7 +138,7 @@ end -- When DD_OFF notification is invoked, SDL sends notification to all connected applications on any device if current app HMI Level corresponds to the allowed one in policy table. -- DriverDistractionState describes possible states of driver distraction. -- DD_ON - -- DD_OFF + -- DD_OFF local onDriverDistractionValue = {"DD_ON", "DD_OFF"} for i=1,#onDriverDistractionValue do Test["OnDriverDistraction_State_" .. onDriverDistractionValue[i]] = function(self) @@ -133,87 +147,87 @@ end end end --End Test case CommonRequestCheck.1 - + ----------------------------------------------------------------------------------------- - + --Begin Test case CommonRequestCheck.2 --Description: This test is intended to check request with mandatory and with or without conditional parameters - + -- Not Applicable - + --End Test case CommonRequestCheck.2 - + ----------------------------------------------------------------------------------------- - + --Begin Test case CommonRequestCheck.3 --Description: This test is intended to check processing requests without mandatory parameters function Test:OnDriverDistraction_WithoutState() self:verify_INVALID_Case({}) - end - + end + --End Test case CommonRequestCheck.3 - + ----------------------------------------------------------------------------------------- - + --Begin Test case CommonRequestCheck.4 --Description: Check processing request with different fake parameters - --Requirement id in JAMA: + --Requirement id in JAMA: --APPLINK-14765 --Verification criteria: --SDL must cut off the fake parameters from requests, responses and notifications received from HMI - + --Begin Test case CommonRequestCheck.4.1 - --Description: Parameter not from protocol + --Description: Parameter not from protocol function Test:OnDriverDistraction_FakeParam() local request = { state = "DD_ON", fake = "fake" - } + } self:verify_SUCCESS_Case(request) - end + end --Begin Test case CommonRequestCheck.4.1 - + ----------------------------------------------------------------------------------------- - + --Begin Test case CommonRequestCheck.4.2 --Description: Parameters from another request function Test:OnDriverDistraction_ParamsAnotherRequest() local request = { state = "DD_ON", syncFileName = "a" - } - self:verify_SUCCESS_Case(request) + } + self:verify_SUCCESS_Case(request) end - --End Test case CommonRequestCheck.4.2 + --End Test case CommonRequestCheck.4.2 --End Test case CommonRequestCheck.4 ----------------------------------------------------------------------------------------- --Begin Test case CommonRequestCheck.5 --Description: Invalid JSON - function Test:OnDriverDistraction_InvalidJsonSyntax() - --hmi side: send UI.OnDriverDistraction + function Test:OnDriverDistraction_InvalidJsonSyntax() + --hmi side: send UI.OnDriverDistraction --":" is changed by ";" after "jsonrpc" --self.hmiConnection:Send('{"jsonrpc":"2.0","method":"UI.OnDriverDistraction","params":{"state":"DD_ON"}}') self.hmiConnection:Send('{"jsonrpc";"2.0","method":"UI.OnDriverDistraction","params":{"state":"DD_ON"}}') - + --mobile side: expect OnDriverDistraction notification EXPECT_NOTIFICATION("OnDriverDistraction", {state = "DD_ON"}) - :Times(0) + :Times(0) end - + function Test:OnDriverDistraction_InvalidStructure() - - --hmi side: send UI.OnDriverDistraction + + --hmi side: send UI.OnDriverDistraction --self.hmiConnection:Send('{"jsonrpc":"2.0","method":"UI.OnDriverDistraction","params":{"state":"DD_ON"}}') self.hmiConnection:Send('{"jsonrpc":"2.0","params":{"method":"UI.OnDriverDistraction","state":"DD_ON"}}') --mobile side: expect OnDriverDistraction notification EXPECT_NOTIFICATION("OnDriverDistraction", {state = "DD_ON"}) - :Times(0) - end - --End Test case CommonRequestCheck.5 + :Times(0) + end + --End Test case CommonRequestCheck.5 --End Test suit CommonRequestCheck --------------------------------------------------------------------------------------------- @@ -227,22 +241,22 @@ end --Begin Test suit PositiveRequestCheck --Description: Check of each request parameter value in bound and boundary conditions - + -- Not Applicable - + --End Test suit PositiveRequestCheck - + --=================================================================================-- --------------------------------Positive response check------------------------------ --=================================================================================-- --Begin Test suit PositiveResponseCheck --Description: check of each response parameter value in bound and boundary conditions - + -- Not Applicable - + --End Test suit PositiveRequestCheck - + ---------------------------------------------------------------------------------------------- ----------------------------------------III TEST BLOCK---------------------------------------- ----------------------------------------Negative cases---------------------------------------- @@ -263,72 +277,72 @@ end --Begin Test case NegativeResponseCheck.1 --Description: Request with nonexistent state - function Test:OnDriverDistraction_NonexistentState() + function Test:OnDriverDistraction_NonexistentState() local request = { - state = "DD_STATE", - } + state = "DD_STATE", + } self:verify_INVALID_Case(request) end - --End Test case NegativeRequestCheck.1 - + --End Test case NegativeRequestCheck.1 + ----------------------------------------------------------------------------------------- - + --Begin Test case NegativeResponseCheck.2 --Description: Request without method - function Test:OnDriverDistraction_WithoutMethod() - --hmi side: send UI.OnDriverDistraction + function Test:OnDriverDistraction_WithoutMethod() + --hmi side: send UI.OnDriverDistraction self.hmiConnection:Send('{"jsonrpc":"2.0","params":{"state":"DD_ON"}}') - + --mobile side: expect OnDriverDistraction notification EXPECT_NOTIFICATION("OnDriverDistraction", {state = "DD_ON"}) - :Times(0) + :Times(0) end --End Test case NegativeRequestCheck.2 - + ----------------------------------------------------------------------------------------- - + --Begin Test case NegativeResponseCheck.3 --Description: Request without params - function Test:OnDriverDistraction_WithoutParams() - --hmi side: send UI.OnDriverDistraction + function Test:OnDriverDistraction_WithoutParams() + --hmi side: send UI.OnDriverDistraction self.hmiConnection:Send('{"jsonrpc":"2.0","method":"UI.OnDriverDistraction"}') - + --mobile side: expect OnDriverDistraction notification EXPECT_NOTIFICATION("OnDriverDistraction") - :Times(0) + :Times(0) end - --End Test case NegativeRequestCheck.3 - + --End Test case NegativeRequestCheck.3 + ----------------------------------------------------------------------------------------- - + --Begin Test case NegativeResponseCheck.4 --Description: Request without state - function Test:OnDriverDistraction_WithoutState() - --hmi side: send UI.OnDriverDistraction + function Test:OnDriverDistraction_WithoutState() + --hmi side: send UI.OnDriverDistraction self.hmiConnection:Send('{"jsonrpc":"2.0","method":"UI.OnDriverDistraction","params":{}}') - + --mobile side: expect OnDriverDistraction notification EXPECT_NOTIFICATION("OnDriverDistraction") - :Times(0) + :Times(0) end - --End Test case NegativeRequestCheck.4 - + --End Test case NegativeRequestCheck.4 + ----------------------------------------------------------------------------------------- - + --Begin Test case NegativeResponseCheck.5 --Description: Request with state is empty - function Test:OnDriverDistraction_StateEmpty() - --hmi side: send UI.OnDriverDistraction + function Test:OnDriverDistraction_StateEmpty() + --hmi side: send UI.OnDriverDistraction self.hmiConnection:Send('{"jsonrpc":"2.0","method":"UI.OnDriverDistraction","params":{"state":""}}') - + --mobile side: expect OnDriverDistraction notification EXPECT_NOTIFICATION("OnDriverDistraction") - :Times(0) + :Times(0) end --End Test case NegativeRequestCheck.5 - --End Test suit NegativeRequestCheck + --End Test suit NegativeRequestCheck + - ---------------------------------------------------------------------------------------------- ----------------------------------------IV TEST BLOCK----------------------------------------- ---------------------------------------Result code check-------------------------------------- @@ -354,15 +368,15 @@ end --Description: TC's checks SDL behaviour by processing -- different request sequence with timeout -- with emulating of user's actions - + --Begin Test case SequenceCheck.1 - --Description: - --Requirement id in JAMA: + --Description: + --Requirement id in JAMA: -- SDLAQ-CRS-182 - + --Verification criteria: -- When the state is changed (DD_ON/DD_OFF) the notification is sent to all applicabe apps (according to policy table restrictions). - + commonFunctions:newTestCasesGroup("Test case: Check OnDriverDistraction notification with several app") -- Precondition 1: Register new media app function Test:AddNewSession() @@ -370,41 +384,41 @@ end self.mobileSession3 = mobile_session.MobileSession( self, self.mobileConnection) - + self.mobileSession3:StartService(7) end - + function Test:RegisterAppInterface_MediaApp() - --mobile side: RegisterAppInterface request + --mobile side: RegisterAppInterface request local CorIdRAI = self.mobileSession3:SendRPC("RegisterAppInterface", { - syncMsgVersion = - { + syncMsgVersion = + { majorVersion = 2, minorVersion = 2, - }, + }, appName ="MediaApp", isMediaApplication = true, languageDesired ="EN-US", hmiDisplayLanguageDesired ="EN-US", appID ="6", - ttsName = - { - { + ttsName = + { + { text ="MediaApp", type ="TEXT", - }, - }, - vrSynonyms = - { + }, + }, + vrSynonyms = + { "vrMediaApp", } - }) - + }) + --hmi side: expect BasicCommunication.OnAppRegistered request - EXPECT_HMINOTIFICATION("BasicCommunication.OnAppRegistered", + EXPECT_HMINOTIFICATION("BasicCommunication.OnAppRegistered", { - application = + application = { appName = "MediaApp" } @@ -412,55 +426,55 @@ end :Do(function(_,data) self.applications["MediaApp"] = data.params.application.appID end) - - --mobile side: RegisterAppInterface response + + --mobile side: RegisterAppInterface response self.mobileSession3:ExpectResponse(CorIdRAI, { success = true, resultCode = "SUCCESS"}) :Timeout(2000) self.mobileSession3:ExpectNotification("OnHMIStatus", {hmiLevel = "NONE", audioStreamingState = "NOT_AUDIBLE", systemContext = "MAIN"}) end - + -- Precondition 2: Register new non-media app 1 function Test:AddNewSession() -- Connected expectation self.mobileSession4 = mobile_session.MobileSession( self, self.mobileConnection) - + self.mobileSession4:StartService(7) end - + function Test:RegisterAppInterface_NonMediaApp1() - --mobile side: RegisterAppInterface request + --mobile side: RegisterAppInterface request local CorIdRAI = self.mobileSession4:SendRPC("RegisterAppInterface", { - syncMsgVersion = - { + syncMsgVersion = + { majorVersion = 2, minorVersion = 2, - }, + }, appName ="NonMediaApp1", isMediaApplication = false, languageDesired ="EN-US", hmiDisplayLanguageDesired ="EN-US", appID ="3", - ttsName = - { - { + ttsName = + { + { text ="NonMediaApp1", type ="TEXT", - }, - }, - vrSynonyms = - { + }, + }, + vrSynonyms = + { "vrNonMediaApp1", } - }) - + }) + --hmi side: expect BasicCommunication.OnAppRegistered request - EXPECT_HMINOTIFICATION("BasicCommunication.OnAppRegistered", + EXPECT_HMINOTIFICATION("BasicCommunication.OnAppRegistered", { - application = + application = { appName = "NonMediaApp1" } @@ -468,55 +482,55 @@ end :Do(function(_,data) self.applications["NonMediaApp1"] = data.params.application.appID end) - - --mobile side: RegisterAppInterface response + + --mobile side: RegisterAppInterface response self.mobileSession4:ExpectResponse(CorIdRAI, { success = true, resultCode = "SUCCESS"}) :Timeout(2000) self.mobileSession4:ExpectNotification("OnHMIStatus", {hmiLevel = "NONE", audioStreamingState = "NOT_AUDIBLE", systemContext = "MAIN"}) end - + -- Precondition 3: Register new non-media app 2 function Test:AddNewSession() -- Connected expectation self.mobileSession5 = mobile_session.MobileSession( self, self.mobileConnection) - + self.mobileSession5:StartService(7) end - + function Test:RegisterAppInterface_NonMediaApp2() - --mobile side: RegisterAppInterface request + --mobile side: RegisterAppInterface request local CorIdRAI = self.mobileSession5:SendRPC("RegisterAppInterface", { - syncMsgVersion = - { + syncMsgVersion = + { majorVersion = 2, minorVersion = 2, - }, + }, appName ="NonMediaApp2", isMediaApplication = false, languageDesired ="EN-US", hmiDisplayLanguageDesired ="EN-US", appID ="4", - ttsName = - { - { + ttsName = + { + { text ="NonMediaApp2", type ="TEXT", - }, - }, - vrSynonyms = - { + }, + }, + vrSynonyms = + { "vrNonMediaApp2", } - }) - + }) + --hmi side: expect BasicCommunication.OnAppRegistered request - EXPECT_HMINOTIFICATION("BasicCommunication.OnAppRegistered", + EXPECT_HMINOTIFICATION("BasicCommunication.OnAppRegistered", { - application = + application = { appName = "NonMediaApp2" } @@ -524,55 +538,55 @@ end :Do(function(_,data) self.applications["NonMediaApp2"] = data.params.application.appID end) - - --mobile side: RegisterAppInterface response + + --mobile side: RegisterAppInterface response self.mobileSession5:ExpectResponse(CorIdRAI, { success = true, resultCode = "SUCCESS"}) :Timeout(2000) self.mobileSession5:ExpectNotification("OnHMIStatus", {hmiLevel = "NONE", audioStreamingState = "NOT_AUDIBLE", systemContext = "MAIN"}) end - + -- Precondition 4: Register new non-media app 3 function Test:AddNewSession() -- Connected expectation self.mobileSession6 = mobile_session.MobileSession( self, self.mobileConnection) - + self.mobileSession6:StartService(7) end - + function Test:RegisterAppInterface_NonMediaApp3() - --mobile side: RegisterAppInterface request + --mobile side: RegisterAppInterface request local CorIdRAI = self.mobileSession6:SendRPC("RegisterAppInterface", { - syncMsgVersion = - { + syncMsgVersion = + { majorVersion = 2, minorVersion = 2, - }, + }, appName ="NonMediaApp3", isMediaApplication = false, languageDesired ="EN-US", hmiDisplayLanguageDesired ="EN-US", appID ="5", - ttsName = - { - { + ttsName = + { + { text ="NonMediaApp3", type ="TEXT", - }, - }, - vrSynonyms = - { + }, + }, + vrSynonyms = + { "vrNonMediaApp3", } - }) - + }) + --hmi side: expect BasicCommunication.OnAppRegistered request - EXPECT_HMINOTIFICATION("BasicCommunication.OnAppRegistered", + EXPECT_HMINOTIFICATION("BasicCommunication.OnAppRegistered", { - application = + application = { appName = "NonMediaApp3" } @@ -580,15 +594,15 @@ end :Do(function(_,data) self.applications["NonMediaApp3"] = data.params.application.appID end) - - --mobile side: RegisterAppInterface response + + --mobile side: RegisterAppInterface response self.mobileSession6:ExpectResponse(CorIdRAI, { success = true, resultCode = "SUCCESS"}) :Timeout(2000) self.mobileSession6:ExpectNotification("OnHMIStatus", {hmiLevel = "NONE", audioStreamingState = "NOT_AUDIBLE", systemContext = "MAIN"}) end - - + + --Precondition 5: Activate application to make sure HMI status of 4 apps: FULL, BACKGOUND, LIMITED and NONE function Test:Activate_MediaApp() --hmi side: sending SDL.ActivateApp request @@ -602,7 +616,7 @@ end data.result.isSDLAllowed ~= true then --hmi side: sending SDL.GetUserFriendlyMessage request - local RequestId = self.hmiConnection:SendRequest("SDL.GetUserFriendlyMessage", + local RequestId = self.hmiConnection:SendRequest("SDL.GetUserFriendlyMessage", {language = "EN-US", messageCodes = {"DataConsent"}}) --hmi side: expect SDL.GetUserFriendlyMessage response @@ -610,7 +624,7 @@ end :Do(function(_,data) --hmi side: send request SDL.OnAllowSDLFunctionality - self.hmiConnection:SendNotification("SDL.OnAllowSDLFunctionality", + self.hmiConnection:SendNotification("SDL.OnAllowSDLFunctionality", {allowed = true, source = "GUI", device = {id = config.deviceMAC, name = "127.0.0.1"}}) --hmi side: expect BasicCommunication.ActivateApp request @@ -626,11 +640,11 @@ end end end) - - self.mobileSession3:ExpectNotification("OnHMIStatus", {hmiLevel = "FULL", audioStreamingState = "AUDIBLE", systemContext = "MAIN"}) - :Timeout(12000) + + self.mobileSession3:ExpectNotification("OnHMIStatus", {hmiLevel = "FULL", audioStreamingState = "AUDIBLE", systemContext = "MAIN"}) + :Timeout(12000) end - + function Test:ChangeMediaAppToLimited() --hmi side: sending BasicCommunication.OnAppDeactivated request local cid = self.hmiConnection:SendNotification("BasicCommunication.OnAppDeactivated", @@ -642,7 +656,7 @@ end --mobile side: expect OnHMIStatus notification self.mobileSession3:ExpectNotification("OnHMIStatus",{hmiLevel = "LIMITED", systemContext = "MAIN", audioStreamingState = "AUDIBLE"}) end - + function Test:Activate_NonMedia_App1() --hmi side: sending SDL.ActivateApp request local RequestId = self.hmiConnection:SendRequest("SDL.ActivateApp", { appID = self.applications["NonMediaApp1"]}) @@ -655,7 +669,7 @@ end data.result.isSDLAllowed ~= true then --hmi side: sending SDL.GetUserFriendlyMessage request - local RequestId = self.hmiConnection:SendRequest("SDL.GetUserFriendlyMessage", + local RequestId = self.hmiConnection:SendRequest("SDL.GetUserFriendlyMessage", {language = "EN-US", messageCodes = {"DataConsent"}}) --hmi side: expect SDL.GetUserFriendlyMessage response @@ -663,7 +677,7 @@ end :Do(function(_,data) --hmi side: send request SDL.OnAllowSDLFunctionality - self.hmiConnection:SendNotification("SDL.OnAllowSDLFunctionality", + self.hmiConnection:SendNotification("SDL.OnAllowSDLFunctionality", {allowed = true, source = "GUI", device = {id = config.deviceMAC, name = "127.0.0.1"}}) --hmi side: expect BasicCommunication.ActivateApp request @@ -678,11 +692,11 @@ end end) end end) - - self.mobileSession4:ExpectNotification("OnHMIStatus", {hmiLevel = "FULL", audioStreamingState = "NOT_AUDIBLE", systemContext = "MAIN"}) - :Timeout(12000) + + self.mobileSession4:ExpectNotification("OnHMIStatus", {hmiLevel = "FULL", audioStreamingState = "NOT_AUDIBLE", systemContext = "MAIN"}) + :Timeout(12000) end - + function Test:Activate_NonMedia_App2() --hmi side: sending SDL.ActivateApp request local RequestId = self.hmiConnection:SendRequest("SDL.ActivateApp", { appID = self.applications["NonMediaApp2"]}) @@ -695,7 +709,7 @@ end data.result.isSDLAllowed ~= true then --hmi side: sending SDL.GetUserFriendlyMessage request - local RequestId = self.hmiConnection:SendRequest("SDL.GetUserFriendlyMessage", + local RequestId = self.hmiConnection:SendRequest("SDL.GetUserFriendlyMessage", {language = "EN-US", messageCodes = {"DataConsent"}}) --hmi side: expect SDL.GetUserFriendlyMessage response @@ -703,7 +717,7 @@ end :Do(function(_,data) --hmi side: send request SDL.OnAllowSDLFunctionality - self.hmiConnection:SendNotification("SDL.OnAllowSDLFunctionality", + self.hmiConnection:SendNotification("SDL.OnAllowSDLFunctionality", {allowed = true, source = "GUI", device = {id = config.deviceMAC, name = "127.0.0.1"}}) --hmi side: expect BasicCommunication.ActivateApp request @@ -719,17 +733,17 @@ end end) end - end) - self.mobileSession4:ExpectNotification("OnHMIStatus", {hmiLevel = "BACKGOUND", audioStreamingState = "NOT_AUDIBLE", systemContext = "MAIN"}) - self.mobileSession5:ExpectNotification("OnHMIStatus", {hmiLevel = "FULL", audioStreamingState = "NOT_AUDIBLE", systemContext = "MAIN"}) - :Timeout(12000) + end) + self.mobileSession4:ExpectNotification("OnHMIStatus", {hmiLevel = "BACKGOUND", audioStreamingState = "NOT_AUDIBLE", systemContext = "MAIN"}) + self.mobileSession5:ExpectNotification("OnHMIStatus", {hmiLevel = "FULL", audioStreamingState = "NOT_AUDIBLE", systemContext = "MAIN"}) + :Timeout(12000) end - + --Sending OnDriverDistraction notification function Test:OnDriverDistraction_SeveralApp() --hmi side: sending OnDriverDistraction notification self.hmiConnection:SendNotification("UI.OnDriverDistraction",{state = "DD_ON"}) - + --mobile side: expect the response self.mobileSession3:ExpectNotification("OnDriverDistraction",{state = "DD_ON"}) self.mobileSession4:ExpectNotification("OnDriverDistraction",{state = "DD_ON"}) @@ -737,7 +751,7 @@ end end --End Test case SequenceCheck.1 --End Test suit SequenceCheck - + ---------------------------------------------------------------------------------------------- -----------------------------------------TEST BLOCK VII--------------------------------------- --------------------------------------Different HMIStatus------------------------------------- @@ -752,80 +766,80 @@ end --Requirement id in JAMA: -- SDLAQ-CRS-1309 - - --Verification criteria: + + --Verification criteria: -- SDL doesn't send OnDriverDistraction notification to the app when current app's HMI level is NONE. - + commonSteps:DeactivateAppToNoneHmiLevel() - + function Test:OnDriverDistraction_HMIStatus_NONE() local request = { - state = "DD_ON", - } + state = "DD_ON", + } self:verify_INVALID_Case(request) - end - + end + --Postcondition: Activate app - commonSteps:ActivationApp() + commonSteps:ActivationApp() --End Test case DifferentHMIlevel.1 - + ----------------------------------------------------------------------------------------- - + --Begin Test case DifferentHMIlevelChecks.2 --Description: Check OnDriverDistraction notification when HMI level is LIMITED - if commonFunctions:isMediaApp() then - --Precondition: Deactivate app to LIMITED HMI level + if commonFunctions:isMediaApp() then + --Precondition: Deactivate app to LIMITED HMI level commonSteps:ChangeHMIToLimited() - + for i=1,#onDriverDistractionValue do Test["OnDriverDistraction_LIMITED_State_" .. onDriverDistractionValue[i]] = function(self) local request = {state = onDriverDistractionValue[i]} self:verify_SUCCESS_Case(request) end - end + end --End Test case DifferentHMIlevelChecks.2 - - -- Precondition 1: Opening new session + + -- Precondition 1: Opening new session function Test:AddNewSession() -- Connected expectation self.mobileSession2 = mobile_session.MobileSession( self, self.mobileConnection) - + self.mobileSession2:StartService(7) end - -- Precondition 2: Register app2 + -- Precondition 2: Register app2 function Test:RegisterAppInterface_App2() - --mobile side: RegisterAppInterface request + --mobile side: RegisterAppInterface request local CorIdRAI = self.mobileSession2:SendRPC("RegisterAppInterface", { - syncMsgVersion = - { + syncMsgVersion = + { majorVersion = 2, minorVersion = 2, - }, + }, appName ="SPT2", isMediaApplication = true, languageDesired ="EN-US", hmiDisplayLanguageDesired ="EN-US", appID ="2", - ttsName = - { - { + ttsName = + { + { text ="SyncProxyTester2", type ="TEXT", - }, - }, - vrSynonyms = - { + }, + }, + vrSynonyms = + { "vrSPT2", } - }) - + }) + --hmi side: expect BasicCommunication.OnAppRegistered request - EXPECT_HMINOTIFICATION("BasicCommunication.OnAppRegistered", + EXPECT_HMINOTIFICATION("BasicCommunication.OnAppRegistered", { - application = + application = { appName = "SPT2" } @@ -833,14 +847,14 @@ end :Do(function(_,data) appId2 = data.params.application.appID end) - - --mobile side: RegisterAppInterface response + + --mobile side: RegisterAppInterface response self.mobileSession2:ExpectResponse(CorIdRAI, { success = true, resultCode = "SUCCESS"}) :Timeout(2000) self.mobileSession2:ExpectNotification("OnHMIStatus", {hmiLevel = "NONE", audioStreamingState = "NOT_AUDIBLE", systemContext = "MAIN"}) end - + -- Precondition 3: Activate an other media app to change app to BACKGROUND function Test:Activate_Media_App2() --hmi side: sending SDL.ActivateApp request @@ -854,7 +868,7 @@ end data.result.isSDLAllowed ~= true then --hmi side: sending SDL.GetUserFriendlyMessage request - local RequestId = self.hmiConnection:SendRequest("SDL.GetUserFriendlyMessage", + local RequestId = self.hmiConnection:SendRequest("SDL.GetUserFriendlyMessage", {language = "EN-US", messageCodes = {"DataConsent"}}) --hmi side: expect SDL.GetUserFriendlyMessage response @@ -862,7 +876,7 @@ end :Do(function(_,data) --hmi side: send request SDL.OnAllowSDLFunctionality - self.hmiConnection:SendNotification("SDL.OnAllowSDLFunctionality", + self.hmiConnection:SendNotification("SDL.OnAllowSDLFunctionality", {allowed = true, source = "GUI", device = {id = config.deviceMAC, name = "127.0.0.1"}}) --hmi side: expect BasicCommunication.ActivateApp request @@ -879,20 +893,20 @@ end end end) - - self.mobileSession2:ExpectNotification("OnHMIStatus", {hmiLevel = "FULL", audioStreamingState = "AUDIBLE", systemContext = "MAIN"}) + + self.mobileSession2:ExpectNotification("OnHMIStatus", {hmiLevel = "FULL", audioStreamingState = "AUDIBLE", systemContext = "MAIN"}) :Timeout(12000) - - self.mobileSession:ExpectNotification("OnHMIStatus", {hmiLevel = "BACKGROUND", audioStreamingState = "NOT_AUDIBLE", systemContext = "MAIN"}) - - end - + + self.mobileSession:ExpectNotification("OnHMIStatus", {hmiLevel = "BACKGROUND", audioStreamingState = "NOT_AUDIBLE", systemContext = "MAIN"}) + + end + elseif Test.isMediaApplication == false then - --Precondition: Deactivate app to BACKGOUND HMI level + --Precondition: Deactivate app to BACKGOUND HMI level commonSteps:DeactivateToBackground(self) end ----------------------------------------------------------------------------------------- - + --Begin Test case DifferentHMIlevelChecks.3 --Description: Check OnDriverDistraction notification when HMI level is BACKGOUND for i=1,#onDriverDistractionValue do @@ -902,4 +916,19 @@ end end end --End Test case DifferentHMIlevelChecks.3 - --End Test suit DifferentHMIlevel \ No newline at end of file + --End Test suit DifferentHMIlevel + +--------------------------------------------------------------------------------------------- +-------------------------------------------Postcondition------------------------------------- +--------------------------------------------------------------------------------------------- + + --Print new line to separate Postconditions + commonFunctions:newTestCasesGroup("Postconditions") + + + --Restore sdl_preloaded_pt.json + policyTable:Restore_preloaded_pt() + + + + return Test diff --git a/test_scripts/API/ATF_OnEventChanged_EMERGENCY_EVENT.lua b/test_scripts/API/ATF_OnEventChanged_EMERGENCY_EVENT.lua new file mode 100644 index 0000000000..bdb3eaeae7 --- /dev/null +++ b/test_scripts/API/ATF_OnEventChanged_EMERGENCY_EVENT.lua @@ -0,0 +1,1031 @@ +---------------------------------------------------------------------------------------------------------- +--These TCs are created by APPLINK-8535 +---------------------------------------------------------------------------------------------------------- +Test = require('connecttest') +require('cardinalities') +local events = require('events') +local mobile_session = require('mobile_session') +local mobile = require('mobile_connection') +local tcp = require('tcp_connection') +local file_connection = require('file_connection') +local module = require('testbase') + +--------------------------------------------------------------------------------------------- +-----------------------------Required Shared Libraries--------------------------------------- +--------------------------------------------------------------------------------------------- +local commonFunctions = require('user_modules/shared_testcases/commonFunctions') +local commonSteps = require('user_modules/shared_testcases/commonSteps') +local commonTestCases = require('user_modules/shared_testcases/commonTestCases') +require('user_modules/AppTypes') + +--------------------------------------------------------------------------------------------- +------------------------------------ Common Variables --------------------------------------- +--------------------------------------------------------------------------------------------- + + +--------------------------------------------------------------------------------------------- +----------------------------------- Common Fuctions------------------------------------------ +function Test:onEventChanged(enable,hmilevel,case) + + --hmi side: send OnEventChanged (ON/OFF) notification to SDL + self.hmiConnection:SendNotification("BasicCommunication.OnEventChanged",{isActive= enable, eventName="EMERGENCY_EVENT"}) + + --Set default HMILevel = FULL + if hmilevel ==nil then hmilevel= "FULL" end + + if enable==true then + + --Case: There are 3 applications + if case== nil then + + --mobile side: expected OnHMIStatus + self.mobileSession:ExpectNotification("OnHMIStatus",{hmiLevel = hmilevel, audioStreamingState = "NOT_AUDIBLE", systemContext = "MAIN"}) + self.mobileSession1:ExpectNotification("OnHMIStatus",{hmiLevel = "LIMITED", audioStreamingState = "NOT_AUDIBLE", systemContext = "MAIN"}) + self.mobileSession2:ExpectNotification("OnHMIStatus",{hmiLevel = "FULL", audioStreamingState = "NOT_AUDIBLE", systemContext = "MAIN"}) + end + + --Case: There is one application + if case== 1 then + self.mobileSession:ExpectNotification("OnHMIStatus",{hmiLevel = hmilevel, audioStreamingState = "NOT_AUDIBLE", systemContext = "MAIN"}) + end + + end + + if enable==false then + + --Case: There are 3 applications + if case==nil then + --mobile side: expected OnHMIStatus + self.mobileSession:ExpectNotification("OnHMIStatus",{hmiLevel = hmilevel, audioStreamingState = "AUDIBLE", systemContext = "MAIN"}) + self.mobileSession1:ExpectNotification("OnHMIStatus",{hmiLevel = "LIMITED", audioStreamingState = "AUDIBLE", systemContext = "MAIN"}) + self.mobileSession2:ExpectNotification("OnHMIStatus",{hmiLevel = "FULL", audioStreamingState = "AUDIBLE", systemContext = "MAIN"}) + end + + --Case: There is one application + if case== 1 then + self.mobileSession:ExpectNotification("OnHMIStatus",{hmiLevel = hmilevel, audioStreamingState = "AUDIBLE", systemContext = "MAIN"}) + end + end + +end +----------------------------------------------------------------------------------------- + +function Test:change_App_Params(appName,appType,isMedia) + + if appName == config.application1.registerAppInterfaceParams.appName then + + config.application1.registerAppInterfaceParams.isMediaApplication = isMedia + + if appType=="" then + config.application1.registerAppInterfaceParams.appHMIType = nil + else + config.application1.registerAppInterfaceParams.appHMIType = appType + end + end + + + if appName == config.application2.registerAppInterfaceParams.appName then + + config.application2.registerAppInterfaceParams.isMediaApplication=isMedia + + if appType=="" then + config.application2.registerAppInterfaceParams.appHMIType = nil + else + + config.application2.registerAppInterfaceParams.appHMIType = appType + end + end + + if appName == config.application3.registerAppInterfaceParams.appName then + + config.application3.registerAppInterfaceParams.isMediaApplication = isMedia + + if appType=="" then + config.application3.registerAppInterfaceParams.appHMIType = nil + else + + config.application3.registerAppInterfaceParams.appHMIType = appType + end + end +end +----------------------------------------------------------------------------------------- + +function Test:registerAppInterface2() + --mobile side: sending request + local CorIdRegister = self.mobileSession1:SendRPC("RegisterAppInterface", config.application2.registerAppInterfaceParams) + + --hmi side: expect BasicCommunication.OnAppRegistered request + EXPECT_HMINOTIFICATION("BasicCommunication.OnAppRegistered", + { + application = + { + appName = config.application2.registerAppInterfaceParams.appName + } + }) + :Do(function(_,data) + self.applications[config.application2.registerAppInterfaceParams.appName] = data.params.application.appID + end) + + --mobile side: expect response + self.mobileSession1:ExpectResponse(CorIdRegister, + { + syncMsgVersion = config.syncMsgVersion + }) + :Timeout(2000) + + --mobile side: expect notification + self.mobileSession1:ExpectNotification("OnHMIStatus", {systemContext = "MAIN", hmiLevel = "NONE", audioStreamingState = "NOT_AUDIBLE"}) + :Timeout(2000) +end +------------------------------------------------------------------------------------------------ + +function Test:registerAppInterface3() + + --mobile side: sending request + local CorIdRegister = self.mobileSession2:SendRPC("RegisterAppInterface", config.application3.registerAppInterfaceParams) + + --hmi side: expect BasicCommunication.OnAppRegistered request + EXPECT_HMINOTIFICATION("BasicCommunication.OnAppRegistered", + { + application = + { + appName = config.application3.registerAppInterfaceParams.appName + } + }) + :Do(function(_,data) + self.applications[config.application3.registerAppInterfaceParams.appName] = data.params.application.appID + end) + + --mobile side: expect response + self.mobileSession2:ExpectResponse(CorIdRegister, + { + syncMsgVersion = config.syncMsgVersion + }) + :Timeout(2000) + + --mobile side: expect notification + self.mobileSession2:ExpectNotification("OnHMIStatus", { systemContext = "MAIN", hmiLevel = "NONE", audioStreamingState = "NOT_AUDIBLE"}) + :Timeout(2000) +end +------------------------------------------------------------------------------------------------ + +function Test:unregisterAppInterface(appName) + + if appName == config.application2.registerAppInterfaceParams.appName then + + local cid = self.mobileSession1:SendRPC("UnregisterAppInterface",{}) + + self.mobileSession1:ExpectResponse(cid, { success = true, resultCode = "SUCCESS"}) + :Timeout(2000) + + end + + if appName == config.application3.registerAppInterfaceParams.appName then + + local cid = self.mobileSession2:SendRPC("UnregisterAppInterface",{}) + + self.mobileSession2:ExpectResponse(cid, { success = true, resultCode = "SUCCESS"}) + :Timeout(2000) + + end + + if appName == config.application1.registerAppInterfaceParams.appName then + + local cid = self.mobileSession:SendRPC("UnregisterAppInterface",{}) + + self.mobileSession:ExpectResponse(cid, { success = true, resultCode = "SUCCESS"}) + :Timeout(2000) + + end + +end +------------------------------------------------------------------------------------------------ + +------------------------------------------------------------------------------------------ +-------------------------------------------Preconditions------------------------------------- +--------------------------------------------------------------------------------------------- + + --Print new line to separate new test cases group + commonFunctions:newTestCasesGroup("****************************** Preconditions ******************************") + + --1.Delete Policy and Log Files + commonSteps:DeleteLogsFileAndPolicyTable() + + --2. Unregister app + commonSteps:UnregisterApplication() + + --3.Set new value for app1 + function Test:Change_App1_Params() + --Chaneg app1's params + self:change_App_Params(config.application1.registerAppInterfaceParams.appName, {"MEDIA"}, true) + end + + --4.Register app1 + commonSteps:RegisterAppInterface() + + --5. Activate application + commonSteps:ActivationApp() + + --6. Create second session + function Test:Precondition_SecondSession() + + -- Connected expectation + self.mobileSession1 = mobile_session.MobileSession( + self, + self.mobileConnection) + self.mobileSession1:StartService(7) + + end + + --7. Create third Session + function Test:Precondition_ThirdSession() + --mobile side: start new session + self.mobileSession2 = mobile_session.MobileSession( + self, + self.mobileConnection) + self.mobileSession2:StartService(7) + end + + --8. Changed app2 to Non Media Navigation + function Test:Register_Non_Media_Navigation_App() + --Change app2's params + self:change_App_Params(config.application2.registerAppInterfaceParams.appName, {"NAVIGATION"}, false) + + --Register app2 + self:registerAppInterface2() + end + + --9. Register app3 + function Test:Register_Non_Media_Communication_App() + --Change app2's params + self:change_App_Params(config.application3.registerAppInterfaceParams.appName, {"COMMUNICATION"}, false) + + --Register app2 + self:registerAppInterface3() + end + + --10. Activate app2 + function Test:Activate_App2() + + local rid = self.hmiConnection:SendRequest("SDL.ActivateApp", { appID = self.applications[config.application2.registerAppInterfaceParams.appName]}) + + EXPECT_HMIRESPONSE(rid) + :Do(function(_,data) + if data.result.code ~= 0 then + quit() + end + end) + + self.mobileSession:ExpectNotification("OnHMIStatus",{hmiLevel = "LIMITED", audioStreamingState = "AUDIBLE", systemContext = "MAIN"}) + self.mobileSession1:ExpectNotification("OnHMIStatus",{hmiLevel = "FULL", audioStreamingState = "AUDIBLE", systemContext = "MAIN"}) + end + + --11. Activate app3 + function Test:Activate_App3() + + local rid = self.hmiConnection:SendRequest("SDL.ActivateApp", { appID = self.applications[config.application3.registerAppInterfaceParams.appName]}) + + EXPECT_HMIRESPONSE(rid) + :Do(function(_,data) + if data.result.code ~= 0 then + quit() + end + end) + + self.mobileSession1:ExpectNotification("OnHMIStatus",{hmiLevel = "LIMITED", audioStreamingState = "AUDIBLE", systemContext = "MAIN"}) + self.mobileSession2:ExpectNotification("OnHMIStatus",{hmiLevel = "FULL", audioStreamingState = "AUDIBLE", systemContext = "MAIN"}) + end + +----------------------------------------------------------------------------------------------- +-------------------------------------------TEST BLOCK I---------------------------------------- +--------------------------------Check normal cases of Mobile request--------------------------- +----------------------------------------------------------------------------------------------- + +--Not Applicable + + +---------------------------------------------------------------------------------------------- +-----------------------------------------TEST BLOCK II---------------------------------------- +-----------------------------Check special cases of Mobile request---------------------------- +---------------------------------------------------------------------------------------------- + +--Not Applicable + + +----------------------------------------------------------------------------------------------- +-------------------------------------------TEST BLOCK III-------------------------------------- +----------------------------------Check normal cases of HMI notification----------------------- +----------------------------------------------------------------------------------------------- + --Begin test suit HMIResponseCheck + --Description: Verify OnEventChanged(): + --with valid "enabled" values (true/false) + --without "enabled" value + --with "enabled" is invalid/not existed/empty/wrongtype + + --Write TEST BLOCK III to ATF log + commonFunctions:newTestCasesGroup("****************************** TEST BLOCK III: Check normal cases of HMI notification ******************************") + + --Begin test case HMIResponseCheck3.1 + --Description: This test is intended to check when HMI response with "enabled":true + + --Verification criteria: SDL must change the AudioStreamingState of all apps to NOT_AUDIBLE in case SDL receives notification OnEventChanged(ON,Emergency_Event) from HMI. + + function Test:Emergency_Event_ON_AudioStreamingState_NOT_AUDIBLE() + self:onEventChanged(true, "LIMITED") + end + + --End test case HMIResponseCheck3.1 + --------------------------------------------------------------------------------------------------------- + + --Begin test case HMIResponseCheck3.2 + --Description: This test is intended to check when HMI response with "enabled":false + + --Verification criteria: SDL must return AudioStreamingState of all apps to previous state(AUDIBLE) in case SDL receives notification notification Emergency_Event(OFF) from HMI. + + function Test:Emergency_Event_OFF_AudioStreamingState_AUDIBLE() + self:onEventChanged(false, "LIMITED") + end + + --End test case HMIResponseCheck3.2 + --------------------------------------------------------------------------------------------------------- + + --Begin test case HMIResponseCheck3.3 + --Description: This test is intended to check when HMI response with "enabled" is valid/invalid/not existed/empty/wrongtype + + --Verification criteria: SDL doesn't change the AudioStreamingState of all apps to NOT_AUDIBLE + + local InvalidValues = { {value = nil, name = "IsMissed"}, + {value = "", name = "IsEmtpy"}, + {value = "ANY", name = "NonExist"}, + {value = 123, name = "WrongDataType"}} + + for i = 1, #InvalidValues do + Test["Emergency_Event_isActive_" .. InvalidValues[i].name .."_IsIgnored"] = function(self) + + commonTestCases:DelayedExp(1000) + --hmi side: send OnExitApplication + self.hmiConnection:SendNotification("BasicCommunication.OnEventChanged",{isActive= InvalidValues[i].value, eventName="EMERGENCY_EVENT"}) + + + --mobile side: not expected OnHMIStatus + self.mobileSession:ExpectNotification("OnHMIStatus",{hmiLevel = "LIMITED", audioStreamingState = "NOT_AUDIBLE", systemContext = "MAIN"}) + :Times(0) + + self.mobileSession1:ExpectNotification("OnHMIStatus",{hmiLevel = "LIMITED", audioStreamingState = "NOT_AUDIBLE", systemContext = "MAIN"}) + :Times(0) + + self.mobileSession2:ExpectNotification("OnHMIStatus",{hmiLevel = "FULL", audioStreamingState = "NOT_AUDIBLE", systemContext = "MAIN"}) + :Times(0) + + end + end + + --End test case HMIResponseCheck3.3 + + --------------------------------------------------------------------------------------------------------- + + --End Test suit PositiveRequestCheck +---------------------------------------------------------------------------------------------------------------------- + +----------------------------------------------------------------------------------------------- +-------------------------------------------TEST BLOCK IV-------------------------------------- +----------------------------------Check special cases of HMI notification----------------------- +----------------------------------------------------------------------------------------------- + --Begin test suit HMISpecialResponseCheck + --Description: Verify OnEventChanged(): + --InvalidJsonSyntax + --InvalidStructure + --Fake Params + --Fake Parameter Is From Another API + --Missed mandatory Parameters + --Missed All PArameters + --Several Notifications with the same values + --Several otifications with different values + + --Write TEST BLOCK IV to ATF log + commonFunctions:newTestCasesGroup("****************************** TEST BLOCK IV: Check special cases of HMI notification ******************************") + + --Begin test case HMISpecialResponseCheck4.1 + --Description: This test is intended to check when HMI sends notification with InvalidJsonSyntax + + --Verification criteria: SDL doesn't change the AudioStreamingState of all apps to NOT_AUDIBLE + + function Test:Emergency_Event_ON_InvalidJSonSyntax() + + commonTestCases:DelayedExp(1000) + + --self.hmiConnection:Send('{"jsonrpc":"2.0","method":"BasicCommunication.OnEventChanged","params":{"isActive":true,"eventName":"EMERGENCY_EVENT"}}') + self.hmiConnection:Send('{"jsonrpc";"2.0","method":"BasicCommunication.OnEventChanged","params":{"isActive":true,"eventName":"EMERGENCY_EVENT"}}') + + --mobile side: not expected OnHMIStatus + self.mobileSession:ExpectNotification("OnHMIStatus",{hmiLevel = "LIMITED", audioStreamingState = "NOT_AUDIBLE", systemContext = "MAIN"}) + :Times(0) + self.mobileSession1:ExpectNotification("OnHMIStatus",{hmiLevel = "LIMITED", audioStreamingState = "NOT_AUDIBLE", systemContext = "MAIN"}) + :Times(0) + self.mobileSession2:ExpectNotification("OnHMIStatus",{hmiLevel = "FULL", audioStreamingState = "NOT_AUDIBLE", systemContext = "MAIN"}) + :Times(0) + + end + + --End test case HMISpecialResponseCheck4.1 + --------------------------------------------------------------------------------------------------------- + + --Begin test case HMISpecialResponseCheck4.2 + --Description: This test is intended to check when HMI sends notification with InvalidStructure + + --Verification criteria: SDL doesn't change the AudioStreamingState of all apps to NOT_AUDIBLE + + function Test:Emergency_Event_ON_InvalidStructure() + + commonTestCases:DelayedExp(1000) + --method is moved into params parameter + --self.hmiConnection:Send('{"jsonrpc":"2.0","method":"BasicCommunication.OnEventChanged","params":{"isActive":true,"eventName":"EMERGENCY_EVENT"}}') + self.hmiConnection:Send('{"jsonrpc":"2.0","params":{"method":"BasicCommunication.OnEventChanged","isActive":true,"eventName":"EMERGENCY_EVENT"}}') + + --mobile side: not expected OnHMIStatus + self.mobileSession:ExpectNotification("OnHMIStatus",{hmiLevel = "LIMITED", audioStreamingState = "NOT_AUDIBLE", systemContext = "MAIN"}) + :Times(0) + self.mobileSession1:ExpectNotification("OnHMIStatus",{hmiLevel = "LIMITED", audioStreamingState = "NOT_AUDIBLE", systemContext = "MAIN"}) + :Times(0) + self.mobileSession2:ExpectNotification("OnHMIStatus",{hmiLevel = "FULL", audioStreamingState = "NOT_AUDIBLE", systemContext = "MAIN"}) + :Times(0) + + end + --End test case HMISpecialResponseCheck4.2 + --------------------------------------------------------------------------------------------------------- + + --Begin test case HMISpecialResponseCheck4.3 + --Description: This test is intended to check when HMI sends notification with fake param + + --Verification criteria: SDL must change the AudioStreamingState of all apps to NOT_AUDIBLE + + function Test:Emergency_Event_ON_FakeParams() + + --HMI side: sending BasicCommunication.OnEventChanged with fake param + self.hmiConnection:Send('{"jsonrpc":"2.0","method":"BasicCommunication.OnEventChanged","params":{"isActive":true,"eventName":"EMERGENCY_EVENT","fakeparam":123}}') + + --mobile side: not expected OnHMIStatus + self.mobileSession:ExpectNotification("OnHMIStatus",{hmiLevel = "LIMITED", audioStreamingState = "NOT_AUDIBLE", systemContext = "MAIN"}) + + self.mobileSession1:ExpectNotification("OnHMIStatus",{hmiLevel = "LIMITED", audioStreamingState = "NOT_AUDIBLE", systemContext = "MAIN"}) + + self.mobileSession2:ExpectNotification("OnHMIStatus",{hmiLevel = "FULL", audioStreamingState = "NOT_AUDIBLE", systemContext = "MAIN"}) + + + end + + --Verification criteria: SDL must change the AudioStreamingState of all apps to AUDIBLE + + function Test:PostCondition_Emergency_Event_OFF() + + self.hmiConnection:SendNotification("BasicCommunication.OnEventChanged",{isActive= false, eventName="EMERGENCY_EVENT"}) + + --mobile side: not expected OnHMIStatus + self.mobileSession:ExpectNotification("OnHMIStatus",{hmiLevel = "LIMITED", audioStreamingState = "AUDIBLE", systemContext = "MAIN"}) + + self.mobileSession1:ExpectNotification("OnHMIStatus",{hmiLevel = "LIMITED", audioStreamingState = "AUDIBLE", systemContext = "MAIN"}) + + self.mobileSession2:ExpectNotification("OnHMIStatus",{hmiLevel = "FULL", audioStreamingState = "AUDIBLE", systemContext = "MAIN"}) + + end + + --End test case HMISpecialResponseCheck4.3 + --------------------------------------------------------------------------------------------------------- + + --Begin test case HMISpecialResponseCheck4.4 + --Description: This test is intended to check when HMI sends notification without any params + + --Verification criteria: SDL doesn't change the AudioStreamingState of all apps to NOT_AUDIBLE + function Test:Emergency_Event_ON_Without_Any_Params() + + commonTestCases:DelayedExp(1000) + --HMI side: sending BasicCommunication.OnEventChanged without any param + self.hmiConnection:Send('{"jsonrpc":"2.0","method":"BasicCommunication.OnEventChanged","params":{}}') + + --mobile side: not expected OnHMIStatus + self.mobileSession:ExpectNotification("OnHMIStatus",{hmiLevel = "LIMITED", audioStreamingState = "NOT_AUDIBLE", systemContext = "MAIN"}) + :Times(0) + + self.mobileSession1:ExpectNotification("OnHMIStatus",{hmiLevel = "LIMITED", audioStreamingState = "NOT_AUDIBLE", systemContext = "MAIN"}) + :Times(0) + + self.mobileSession2:ExpectNotification("OnHMIStatus",{hmiLevel = "FULL", audioStreamingState = "NOT_AUDIBLE", systemContext = "MAIN"}) + :Times(0) + + end + --End test case HMISpecialResponseCheck4.4 + --------------------------------------------------------------------------------------------------------- + + --Begin test case HMISpecialResponseCheck4.5 + --Description: This test is intended to check when HMI sends the same several notifications to SDL + + --Verification criteria: SDL must change the AudioStreamingState of all apps to NOT_AUDIBLE + function Test:Several_Emergency_Event_ON_To_SDL() + + --HMI side: sending several BasicCommunication.OnEventChanged without any param + self.hmiConnection:SendNotification("BasicCommunication.OnEventChanged",{isActive= true, eventName="EMERGENCY_EVENT"}) + self.hmiConnection:SendNotification("BasicCommunication.OnEventChanged",{isActive= true, eventName="EMERGENCY_EVENT"}) + self.hmiConnection:SendNotification("BasicCommunication.OnEventChanged",{isActive= true, eventName="EMERGENCY_EVENT"}) + + --mobile side: not expected OnHMIStatus + self.mobileSession:ExpectNotification("OnHMIStatus",{hmiLevel = "LIMITED", audioStreamingState = "NOT_AUDIBLE", systemContext = "MAIN"}) + + self.mobileSession1:ExpectNotification("OnHMIStatus",{hmiLevel = "LIMITED", audioStreamingState = "NOT_AUDIBLE", systemContext = "MAIN"}) + + self.mobileSession2:ExpectNotification("OnHMIStatus",{hmiLevel = "FULL", audioStreamingState = "NOT_AUDIBLE", systemContext = "MAIN"}) + + end + + --Verification criteria: SDL must change the AudioStreamingState of all apps to AUDIBLE + function Test:Several_Emergency_Event_OFF_To_SDL() + + --HMI side: sending several BasicCommunication.OnEventChanged without any param + self.hmiConnection:SendNotification("BasicCommunication.OnEventChanged",{isActive= false, eventName="EMERGENCY_EVENT"}) + self.hmiConnection:SendNotification("BasicCommunication.OnEventChanged",{isActive= false, eventName="EMERGENCY_EVENT"}) + self.hmiConnection:SendNotification("BasicCommunication.OnEventChanged",{isActive= false, eventName="EMERGENCY_EVENT"}) + + --mobile side: not expected OnHMIStatus + self.mobileSession:ExpectNotification("OnHMIStatus",{hmiLevel = "LIMITED", audioStreamingState = "AUDIBLE", systemContext = "MAIN"}) + + self.mobileSession1:ExpectNotification("OnHMIStatus",{hmiLevel = "LIMITED", audioStreamingState = "AUDIBLE", systemContext = "MAIN"}) + + self.mobileSession2:ExpectNotification("OnHMIStatus",{hmiLevel = "FULL", audioStreamingState = "AUDIBLE", systemContext = "MAIN"}) + + + end + --End test case HMISpecialResponseCheck4.5 + --------------------------------------------------------------------------------------------------------- + + --Begin test case HMISpecialResponseCheck4.6 + --Description: This test is intended to check when HMI sends notification with different values + + --Verification criteria: SDL must change the AudioStreamingState of all apps to NOT_AUDIBLE + + function Test:Several_Emergency_Event_WithDifferentValues_To_SDL() + + --HMI side: sending several BasicCommunication.OnEventChanged without any param + self.hmiConnection:SendNotification("BasicCommunication.OnEventChanged",{isActive= true, eventName="EMERGENCY_EVENT"}) + self.hmiConnection:SendNotification("BasicCommunication.OnEventChanged",{isActive= false, eventName="EMERGENCY_EVENT"}) + self.hmiConnection:SendNotification("BasicCommunication.OnEventChanged",{isActive= true, eventName="EMERGENCY_EVENT"}) + + --mobile side: not expected OnHMIStatus + self.mobileSession:ExpectNotification("OnHMIStatus",{hmiLevel = "LIMITED", audioStreamingState = "NOT_AUDIBLE", systemContext = "MAIN"}, + {hmiLevel = "LIMITED", audioStreamingState = "AUDIBLE", systemContext = "MAIN"}, + {hmiLevel = "LIMITED", audioStreamingState = "NOT_AUDIBLE", systemContext = "MAIN"}) + :Times(3) + + self.mobileSession1:ExpectNotification("OnHMIStatus",{hmiLevel = "LIMITED", audioStreamingState = "NOT_AUDIBLE", systemContext = "MAIN"}, + {hmiLevel = "LIMITED", audioStreamingState = "AUDIBLE", systemContext = "MAIN"}, + {hmiLevel = "LIMITED", audioStreamingState = "NOT_AUDIBLE", systemContext = "MAIN"}) + :Times(3) + + self.mobileSession2:ExpectNotification("OnHMIStatus",{hmiLevel = "FULL", audioStreamingState = "NOT_AUDIBLE", systemContext = "MAIN"}, + {hmiLevel = "FULL", audioStreamingState = "AUDIBLE", systemContext = "MAIN"}, + {hmiLevel = "FULL", audioStreamingState = "NOT_AUDIBLE", systemContext = "MAIN"}) + :Times(3) + end + + --Begin test case HMISpecialResponseCheck4.6 + + function Test:Postcondition_Unregister_All_Apps() + + self.hmiConnection:SendNotification("BasicCommunication.OnEventChanged",{isActive= false, eventName="EMERGENCY_EVENT"}) + + local cid = self.mobileSession:SendRPC("UnregisterAppInterface",{}) + self.mobileSession:ExpectResponse(cid, { success = true, resultCode = "SUCCESS"}) + :Timeout(2000) + + local cid = self.mobileSession1:SendRPC("UnregisterAppInterface",{}) + self.mobileSession1:ExpectResponse(cid, { success = true, resultCode = "SUCCESS"}) + :Timeout(2000) + + local cid = self.mobileSession2:SendRPC("UnregisterAppInterface",{}) + self.mobileSession2:ExpectResponse(cid, { success = true, resultCode = "SUCCESS"}) + :Timeout(2000) + + end + + + --End Test suit PositiveRequestCheck +---------------------------------------------------------------------------------------------------------------------- + +----------------------------------------------------------------------------------------------- +-------------------------------------------TEST BLOCK V---------------------------------------- +-------------------------------------Checks All Result Codes----------------------------------- +----------------------------------------------------------------------------------------------- + +--Description: Check all resultCodes + +--Not Applicable + +---------------------------------------------------------------------------------------------- +-----------------------------------------TEST BLOCK VI---------------------------------------- +-------------------------Sequence with emulating of user's action(s)-------------------------- +---------------------------------------------------------------------------------------------- + +--Begin Test suit SequenceChecks +--Description: TC's checks SDL behavior by processing + + --Write TEST BLOCK VI to ATF log + commonFunctions:newTestCasesGroup("****************************** TEST BLOCK VI: Sequence with emulating of user's action(s) ******************************") + + --Begin test case SequenceChecks6.1 + --Description: This test is intended to check that SDL changes the AudioStreamingState application in case SDL receives OnEventChanged(ON/OFF) from HMI + + --Requirement id in JAMA/or Jira ID: APPLINK-16838 + --Verification: SDL must change AudioStreamingState to NOT_AUDIBLE when receives OnEventChanged(Emergency_Event, isActive= true) and returns AUDIBLE when received OnEventChanged(Emergency_Event, isActive= false) + + commonFunctions:newTestCasesGroup("********************APPLINK-16838_TC_SDL_changes_audio_state(playing_audio)_upon_Emergency_Event******************") + --Register app + commonSteps:RegisterAppInterface("APPLINK_16838_RegisterAppInterface") + + --Activate app + commonSteps:ActivationApp(_, "APPLINK_16838_ActivationApp") + + --Send OnEventChanged(Emergency_Event, isActive= true) to SDL + function Test:APPLINK_16838_Emergency_Event_ON() + + self:onEventChanged(true, "FULL",1) + + end + + --Send OnEventChanged(Emergency_Event, isActive= fase) to SDL + function Test:APPLINK_16838_Emergency_Event_OFF() + + self:onEventChanged(false, "FULL",1) + + end + + --End test case SequenceChecks6.1 + --------------------------------------------------------------------------------------------------------- + + --Begin test case SequenceChecks6.2 + --Description: This test is intended to check that SDL changes the AudioStreamingState application in case SDL receives OnEventChanged(Emergency_Event, isActive= true/false)from HMI while phone call + + --Requirement id in JAMA/or Jira ID: APPLINK-16840 + --Verification: SDL must change AudioStreamingState to NOT_AUDIBLE when receives OnEventChanged(Emergency_Event, isActive= true) and returns AUDIBLE when received OnEventChanged(Emergency_Event, isActive= false) when it is in VRSESSION + + commonFunctions:newTestCasesGroup("********************APPLINK-16840_TC_SDL_changes_audio_state(OnPhoneCall)_upon_Emergency_Event******************") + + --Start Phone Call + function Test:Start_PhoneCall() + + self.hmiConnection:SendNotification("BasicCommunication.OnAppDeactivated", {appID = self.applications[config.application1.registerAppInterfaceParams.appName], reason = "PHONEMENU"}) + + self.mobileSession:ExpectNotification("OnHMIStatus",{hmiLevel = "LIMITED", audioStreamingState = "AUDIBLE", systemContext = "MAIN"}) + + end + + --Send OnEventChanged(Emergency_Event, isActive= true) to SDL + function Test:Emergency_Event_ON_While_PhoneCall() + + self:onEventChanged(true, "LIMITED", 1) + + end + + --Send OnEventChanged(Emergency_Event, isActive= false) to SDL + function Test:Emergency_Event_OFF_While_PhoneCall() + + self:onEventChanged(false, "LIMITED", 1) + + end + + --End test case SequenceChecks6.2 + --------------------------------------------------------------------------------------------------------- + + --Begin test case SequenceChecks6.3 + --Description: This test is intended to check that SDL changes the AudioStreamingState application in case SDL receives Emergency_Event(ON/OFF) from HMI in case app is at VRSESSION + + --Requirement id in JAMA/or Jira ID: APPLINK-16841 + --Verification: SDL must change AudioStreamingState to NOT_AUDIBLE when receives Emergency_Event(ON) and returns AUDIBLE when received Emergency_Event(OFF) + + commonFunctions:newTestCasesGroup("********************APPLINK-16841_TC_SDL_changes_audio_state(VR_session)_upon_Emergency_Event******************") + + commonSteps:ActivationApp(_, "Step1_Precondition_Activation_App") + + + --Start VRSESSION + function Test:Step2_Start_VRSESSION() + + --hmi side: send OnSystemContext + self.hmiConnection:SendNotification("VR.Started") + self.hmiConnection:SendNotification("UI.OnSystemContext", {systemContext = "VRSESSION",appID = self.applications[config.application1.registerAppInterfaceParams.appName]}) + + --mobile side: SDL send two notifications to mobile app + self.mobileSession:ExpectNotification("OnHMIStatus",{hmiLevel = "FULL", audioStreamingState = "NOT_AUDIBLE", systemContext = "MAIN"}, + {hmiLevel = "FULL", audioStreamingState = "NOT_AUDIBLE", systemContext = "VRSESSION"}) + :Times(2) + + end + + --Send Emergency_Event(ON) to SDL + function Test:Step3_Send_Emergency_Event_ON_While_VRSESSION() + + commonTestCases:DelayedExp(1000) + --hmi side:send Emergency_Event (ON) notification to SDL + self.hmiConnection:SendNotification("BasicCommunication.OnEventChanged",{isActive= true, eventName="EMERGENCY_EVENT"}) + + --mobile side: SDL doesn't send any notifications to mobile app + self.mobileSession:ExpectNotification("OnHMIStatus",{hmiLevel = "FULL", audioStreamingState = "NOT_AUDIBLE", systemContext = "MAIN"}) + :Times(0) + + end + + --Stop VRSESSION + function Test:Stop_VRSESSION() + + --hmi side: send OnSystemContext + self.hmiConnection:SendNotification("VR.Stopped") + self.hmiConnection:SendNotification("UI.OnSystemContext", {systemContext = "MAIN",appID = self.applications[config.application1.registerAppInterfaceParams.appName]}) + + --mobile side: SDL send 1 notification to mobile app + self.mobileSession:ExpectNotification("OnHMIStatus",{hmiLevel = "FULL", audioStreamingState = "NOT_AUDIBLE", systemContext = "MAIN"}) + + end + + --Send Emergency_Event(OFF) to SDL + function Test:Send_Emergency_Event_OFF_After_Stopped_VRSESSION() + + self:onEventChanged(false, "FULL", 1) + + end + + --End test case SequenceChecks6.3 + --------------------------------------------------------------------------------------------------------- + + --Begin test case SequenceChecks6.4 + --Description: This test is intended to check that SDL changes the AudioStreamingState application in case SDL receives Emergency_Event(ON/OFF) from HMI during tts session + + --Requirement id in JAMA/or Jira ID: APPLINK-16842 + --Verification: SDL must change AudioStreamingState to NOT_AUDIBLE when receives Emergency_Event(ON) and returns AUDIBLE when received Emergency_Event(OFF) + + commonFunctions:newTestCasesGroup("********************APPLINK-16842_TC_SDL_changes_audio_state(tts_session)_upon_Emergency_Event******************") + + local CorIdAlert + local AlertId + local SpeakId + + --Send Emergency_Event(ON) during Alert() + function Test:Send_Alert() + + --mobile side: Alert request + CorIdAlert = self.mobileSession:SendRPC("Alert", + { + alertText1 = "alertText1", + alertText2 = "alertText2", + alertText3 = "alertText3", + ttsChunks = + { + + { + text = "TTSChunk", + type = "TEXT", + } + }, + duration = 5000, + playTone = false, + progressIndicator = true + }) + + + --hmi side: UI.Alert request + EXPECT_HMICALL("UI.Alert", + { + alertStrings = + { + {fieldName = "alertText1", fieldText = "alertText1"}, + {fieldName = "alertText2", fieldText = "alertText2"}, + {fieldName = "alertText3", fieldText = "alertText3"} + }, + alertType = "BOTH", + duration = 5000, + progressIndicator = true + }) + :Do(function(_,data) + self.hmiConnection:SendNotification("UI.OnSystemContext",{ appID = self.applications[config.application1.registerAppInterfaceParams.appName], systemContext="ALERT"}) + + --store id for response in next Test. + AlertId = data.id + + end) + + --hmi side: TTS.Speak request + EXPECT_HMICALL("TTS.Speak", + { + ttsChunks = + { + + { + text = "TTSChunk", + type = "TEXT" + } + }, + speakType = "ALERT" + }) + :Do(function(_,data) + + --store id for response in next Test. + SpeakId = data.id + + local function TTS_Started() + self.hmiConnection:SendNotification("TTS.Started") + end + + RUN_AFTER(TTS_Started, 500) + + end) + :ValidIf(function(_,data) + if #data.params.ttsChunks == 1 then + return true + else + print("ttsChunks array in TTS.Speak request has wrong element number. Expected 1, actual "..tostring(#data.params.ttsChunks)) + return false + end + end) + + --mobile side: Expected OnHMIStatus() notification + EXPECT_NOTIFICATION("OnHMIStatus", + { systemContext = "ALERT", hmiLevel = "FULL", audioStreamingState = "AUDIBLE" }, + { systemContext = "ALERT", hmiLevel = "FULL", audioStreamingState = "ATTENUATED"}) + :Times(2) + + end + + --Send Emergency_Event(ON) during Alert() + function Test:Send_Emergency_Event_ON_During_Alert() + + self.hmiConnection:SendNotification("BasicCommunication.OnEventChanged",{isActive= true, eventName="EMERGENCY_EVENT"}) + + --mobile side: Expected OnHMIStatus() notification + EXPECT_NOTIFICATION("OnHMIStatus", { systemContext = "ALERT", hmiLevel = "FULL", audioStreamingState = "NOT_AUDIBLE"}) + + + end + + --Send Emergency_Event(ON) during Alert() + function Test:HMI_Response_Alert() + + + --UI response + self.hmiConnection:SendResponse(AlertId, "UI.Alert", "SUCCESS", { }) + + self.hmiConnection:SendNotification("UI.OnSystemContext",{ appID = self.applications[config.application1.registerAppInterfaceParams.appName], systemContext="MAIN"}) + --SendOnSystemContext(self,"MAIN") + + + --TTS response + self.hmiConnection:SendResponse(SpeakId, "TTS.Speak", "SUCCESS", { }) + + self.hmiConnection:SendNotification("TTS.Stopped") + + --HMI receiced StopSpeaking + EXPECT_HMICALL("TTS.StopSpeaking") + :Do(function(_,data) + + --TTS StopSpeaking response + self.hmiConnection:SendResponse(data.id,"TTS.StopSpeaking", "SUCCESS",{}) + end) + + --mobile side: Expected OnHMIStatus() notification + EXPECT_NOTIFICATION("OnHMIStatus", + { systemContext = "MAIN", hmiLevel = "FULL", audioStreamingState = "NOT_AUDIBLE"}) + + --mobile side: Alert response + EXPECT_RESPONSE(CorIdAlert, { success = true, resultCode = "SUCCESS" }) + + end + + + --Send Emergency_Event(OFF) + function Test:Send_Emergency_Event_OFF() + + self:onEventChanged(false, "FULL", 1) + + end + + --End test case SequenceChecks6.4 + --------------------------------------------------------------------------------------------------------- + + --Begin test case SequenceChecks6.5 + --Description: This test is intended to check that SDL changes the AudioStreamingState only of "audible" application. + + --Requirement id in JAMA/or Jira ID: APPLINK-16843 + --Verification: SDL must change AudioStreamingState only of "audible" application to NOT_AUDIBLE when receives Emergency_Event(ON) + + commonFunctions:newTestCasesGroup("********************APPLINK-16843_TC_SDL_changes_audio_state_for_audible_app_only******************") + + --Register second media app + function Test:Register_Second_Media_App() + --Change app2's params + self:change_App_Params(config.application2.registerAppInterfaceParams.appName, {"MEDIA"}, true) + + --Register app2 + self:registerAppInterface2() + end + + --Send Emergency_Event(ON) and SDL must change AudioStreamingState only of first application to NOT_AUDIBLE + function Test:Send_Emergency_Event_ON() + + commonTestCases:DelayedExp(1000) + + self:onEventChanged(true, "FULL", 1) + + self.mobileSession1:ExpectNotification("OnHMIStatus",{hmiLevel = "NONE", audioStreamingState = "NOT_AUDIBLE", systemContext = "MAIN"}) + :Times(0) + + end + + --PostCondition: Unregister all apps + function Test:Postcondition_Unregister_All_Apps() + + self.hmiConnection:SendNotification("BasicCommunication.OnEventChanged",{isActive= false, eventName="EMERGENCY_EVENT"}) + + local cid = self.mobileSession:SendRPC("UnregisterAppInterface",{}) + self.mobileSession:ExpectResponse(cid, { success = true, resultCode = "SUCCESS"}) + :Timeout(2000) + + local cid = self.mobileSession1:SendRPC("UnregisterAppInterface",{}) + self.mobileSession1:ExpectResponse(cid, { success = true, resultCode = "SUCCESS"}) + :Timeout(2000) + + end + + --End test case SequenceChecks6.5 + --------------------------------------------------------------------------------------------------------- + +--End Test suit SequenceChecks +---------------------------------------------------------------------------------------------------------------------- + +--------------------------------------------------------------------------------------------- +-----------------------------------------TEST BLOCK VII--------------------------------------- +--------------------------------------Different HMIStatus------------------------------------- +---------------------------------------------------------------------------------------------- + + --Begin Check with Different HMIStatus + --Description: Check when HMILevel is + --LIMITED: Already check by some TCs such as HMIResponseCheck3.1 and SequenceChecks6.2 + --NONE: Already check by SequenceChecks6.5 (APPLINK-16843) + --BACKGROUND + + --Write TEST BLOCK VII to ATF log + commonFunctions:newTestCasesGroup("****************************** TEST BLOCK VII: Check with Different HMIStatus ******************************") + + --Begin test case HMIStatus7.1 + --Description: This test is intended to check that SDL changes the AudioStreamingState only of "audible" application. + + --Verification: SDL must change AudioStreamingState only of "audible" application to NOT_AUDIBLE when receives Emergency_Event(ON) + + + --Precondition1: Register the first app + commonSteps:RegisterAppInterface(_, "Case_Background_RegisterAppInterface") + + --Precondition2: Activate the first app + commonSteps:ActivationApp(_, "Case_Background_ActivationApp") + + --Precondition3: Activate the second media app + function Test:Precondition_Register_Second_Media_App() + --Change app2's params + self:change_App_Params(config.application2.registerAppInterfaceParams.appName, config.application1.registerAppInterfaceParams.appHMIType, config.application1.registerAppInterfaceParams.isMediaApplication) + + --Register app2 + self:registerAppInterface2() + end + + --Precondition4: Activate the second media app, the first app is changed to Background + function Test:Precondition_Change_App1_To_BACKGROUND() + + local rid = self.hmiConnection:SendRequest("SDL.ActivateApp", { appID = self.applications[config.application2.registerAppInterfaceParams.appName]}) + EXPECT_HMIRESPONSE(rid) + :Do(function(_,data) + if data.result.code ~= 0 then + quit() + end + end) + + self.mobileSession1:ExpectNotification("OnHMIStatus",{hmiLevel = "FULL", audioStreamingState = "AUDIBLE", systemContext = "MAIN"}) + self.mobileSession:ExpectNotification("OnHMIStatus",{hmiLevel = "BACKGROUND", audioStreamingState = "NOT_AUDIBLE", systemContext = "MAIN"}) + + end + + --Send BasicCommunication.OnEventChanged(isActive= true, eventName="EMERGENCY_EVENT) + function Test:Emergency_Event_In_BACKGROUND() + + --hmi side: send OnEventChanged(Emergency_Event, isActive= true) notification to SDL + self.hmiConnection:SendNotification("BasicCommunication.OnEventChanged",{isActive= true, eventName="EMERGENCY_EVENT"}) + + --nHMIStatus notification is sent to FULL app + self.mobileSession1:ExpectNotification("OnHMIStatus",{hmiLevel = "FULL", audioStreamingState = "NOT_AUDIBLE", systemContext = "MAIN"}) + + --Expectation: OnHMIStatus notification is not sent to BACKGROUND app + self.mobileSession:ExpectNotification("OnHMIStatus",{hmiLevel = "BACKGROUND", audioStreamingState = "NOT_AUDIBLE", systemContext = "MAIN"}) + :Times(0) + commonTestCases:DelayedExp(1000) + + + end + --End test case Different HMIStatus7.1 + + + --End Test suit Different HMIStatus + +return Test \ No newline at end of file diff --git a/test_scripts/API/ATF_OnEventChanged_PHONE_CALL.lua b/test_scripts/API/ATF_OnEventChanged_PHONE_CALL.lua new file mode 100644 index 0000000000..abc3807b55 --- /dev/null +++ b/test_scripts/API/ATF_OnEventChanged_PHONE_CALL.lua @@ -0,0 +1,1582 @@ +---------------------------------------------------------------------------------------------------------- +--These TCs are created by APPLINK-15427, APPLINK-15164, APPLINK-9891 and APPLINK-18854. APPLINK-15164 is not implemeted now +--ATF version 2.2 +---------------------------------------------------------------------------------------------------------- +Test = require('connecttest') +require('cardinalities') +local events = require('events') +local mobile_session = require('mobile_session') +local mobile = require('mobile_connection') +local tcp = require('tcp_connection') +local file_connection = require('file_connection') +local module = require('testbase') + +--------------------------------------------------------------------------------------------- +-----------------------------Required Shared Libraries--------------------------------------- +--------------------------------------------------------------------------------------------- +local commonFunctions = require('user_modules/shared_testcases/commonFunctions') +local commonSteps = require('user_modules/shared_testcases/commonSteps') +local commonTestCases = require('user_modules/shared_testcases/commonTestCases') +local policyTable = require('user_modules/shared_testcases/testCasesForPolicyTable') +require('user_modules/AppTypes') + +--------------------------------------------------------------------------------------------- +------------------------------------ Common Variables --------------------------------------- +--------------------------------------------------------------------------------------------- +local CorIdAlert +local AlertId +local SpeakId +APIName = "onEventChanged" -- use for above required scripts. + +--------------------------------------------------------------------------------------------- +----------------------------------- Common Fuctions------------------------------------------ +function Test:onEventChanged(enable,hmiLevel, audioStreamingState,case) + --hmi side: send OnEventChanged (ON/OFF) notification to SDL + self.hmiConnection:SendNotification("BasicCommunication.OnEventChanged",{isActive= enable, eventName="PHONE_CALL"}) + + if enable==true then + --Case: There are 3 applications + if case== 3 then + --mobile side: expected OnHMIStatus + self.mobileSession:ExpectNotification("OnHMIStatus",{hmiLevel = hmilevel, audioStreamingState = "NOT_AUDIBLE", systemContext = "MAIN"}) + self.mobileSession1:ExpectNotification("OnHMIStatus",{hmiLevel = "BACKGROUND", audioStreamingState = "NOT_AUDIBLE", systemContext = "MAIN"}) + self.mobileSession2:ExpectNotification("OnHMIStatus",{hmiLevel = "BACKGROUND", audioStreamingState = "NOT_AUDIBLE", systemContext = "MAIN"}) + end + + --Case: There is one application + if case== 1 then + self.mobileSession:ExpectNotification("OnHMIStatus",{hmiLevel = hmiLevel, audioStreamingState = audioStreamingState, systemContext = "MAIN"}) + end + end + + if enable==false then + --Case: There are 3 applications + if case==3 then + --mobile side: expected OnHMIStatus + self.mobileSession:ExpectNotification("OnHMIStatus",{hmiLevel = hmilevel, audioStreamingState = "AUDIBLE", systemContext = "MAIN"}) + self.mobileSession1:ExpectNotification("OnHMIStatus",{hmiLevel = "LIMITED", audioStreamingState = "AUDIBLE", systemContext = "MAIN"}) + self.mobileSession2:ExpectNotification("OnHMIStatus",{hmiLevel = "LIMITED", audioStreamingState = "AUDIBLE", systemContext = "MAIN"}) + end + + --Case: There is one application + if case== 1 then + self.mobileSession:ExpectNotification("OnHMIStatus",{hmiLevel = hmilevel, audioStreamingState = audioStreamingState, systemContext = "MAIN"}) + end + end +end +----------------------------------------------------------------------------------------- + +function Test:change_App_Params(app,appType,isMedia) + local session + + if app==1 then + session = config.application1.registerAppInterfaceParams + end + + if app==2 then + session = config.application2.registerAppInterfaceParams + end + + if app==3 then + session = config.application3.registerAppInterfaceParams + end + + session.isMediaApplication = isMedia + + if appType=="" then + session.appHMIType = nil + else + session.appHMIType = appType + end +end +----------------------------------------------------------------------------------------- + +function Test:registerAppInterface2() + --mobile side: sending request + local CorIdRegister = self.mobileSession1:SendRPC("RegisterAppInterface", config.application2.registerAppInterfaceParams) + + --hmi side: expect BasicCommunication.OnAppRegistered request + EXPECT_HMINOTIFICATION("BasicCommunication.OnAppRegistered", + { + application = + { + appName = config.application2.registerAppInterfaceParams.appName + } + }) + :Do(function(_,data) + self.applications[config.application2.registerAppInterfaceParams.appName] = data.params.application.appID + end) + + --mobile side: expect response + self.mobileSession1:ExpectResponse(CorIdRegister, + { + syncMsgVersion = config.syncMsgVersion + }) + :Timeout(2000) + + --mobile side: expect notification + self.mobileSession1:ExpectNotification("OnHMIStatus", {systemContext = "MAIN", hmiLevel = "NONE", audioStreamingState = "NOT_AUDIBLE"}) + :Timeout(2000) +end +------------------------------------------------------------------------------------------------ + +function Test:registerAppInterface3() + --mobile side: sending request + local CorIdRegister = self.mobileSession2:SendRPC("RegisterAppInterface", config.application3.registerAppInterfaceParams) + + --hmi side: expect BasicCommunication.OnAppRegistered request + EXPECT_HMINOTIFICATION("BasicCommunication.OnAppRegistered", + { + application = + { + appName = config.application3.registerAppInterfaceParams.appName + } + }) + :Do(function(_,data) + self.applications[config.application3.registerAppInterfaceParams.appName] = data.params.application.appID + end) + + --mobile side: expect response + self.mobileSession2:ExpectResponse(CorIdRegister, + { + syncMsgVersion = config.syncMsgVersion + }) + :Timeout(2000) + + --mobile side: expect notification + self.mobileSession2:ExpectNotification("OnHMIStatus", { systemContext = "MAIN", hmiLevel = "NONE", audioStreamingState = "NOT_AUDIBLE"}) + :Timeout(2000) +end +------------------------------------------------------------------------------------------------ + +function Test: bring_App_To_LIMITED() + local cid = self.hmiConnection:SendNotification("BasicCommunication.OnAppDeactivated", + { + appID = self.applications[config.application1.registerAppInterfaceParams.appName] + }) + self.mobileSession:ExpectNotification("OnHMIStatus",{hmiLevel = "LIMITED", audioStreamingState = "AUDIBLE", systemContext = "MAIN"}) +end +------------------------------------------------------------------------------------------------ + +function Test:start_VRSESSION(hmiLevel) + self.hmiConnection:SendNotification("VR.Started") + self.hmiConnection:SendNotification("UI.OnSystemContext", {systemContext = "VRSESSION",appID = self.applications[config.application1.registerAppInterfaceParams.appName]}) + + --mobile side: SDL send two notifications to mobile app + self.mobileSession:ExpectNotification("OnHMIStatus",{hmiLevel = hmiLevel, audioStreamingState = "NOT_AUDIBLE", systemContext = "VRSESSION"}) +end +------------------------------------------------------------------------------------------------ + +function Test:stop_VRSESSION(hmiLevel,audioStreamingState) + --hmi side: send OnSystemContext + self.hmiConnection:SendNotification("VR.Stopped") + self.hmiConnection:SendNotification("UI.OnSystemContext", {systemContext = "MAIN",appID = self.applications[config.application1.registerAppInterfaceParams.appName]}) + + --mobile side: SDL send 1 notification to mobile app + self.mobileSession:ExpectNotification("OnHMIStatus",{hmiLevel = hmiLevel, audioStreamingState = audioStreamingState, systemContext = "MAIN"}) +end +------------------------------------------------------------------------------------------------ + +function Test:send_Alert(hmiLevel) + --mobile side: Alert request + CorIdAlert = self.mobileSession:SendRPC("Alert", + { + alertText1 = "alertText1", + alertText2 = "alertText2", + alertText3 = "alertText3", + ttsChunks = + { + + { + text = "TTSChunk", + type = "TEXT", + } + }, + duration = 5000, + playTone = false, + progressIndicator = true + }) + + --hmi side: UI.Alert request + EXPECT_HMICALL("UI.Alert", + { + alertStrings = + { + {fieldName = "alertText1", fieldText = "alertText1"}, + {fieldName = "alertText2", fieldText = "alertText2"}, + {fieldName = "alertText3", fieldText = "alertText3"} + }, + alertType = "BOTH", + duration = 5000, + progressIndicator = true + }) + :Do(function(_,data) + self.hmiConnection:SendNotification("UI.OnSystemContext",{ appID = self.applications[config.application1.registerAppInterfaceParams.appName], systemContext="ALERT"}) + + --store id for response in next Test. + AlertId = data.id + + end) + + --hmi side: TTS.Speak request + EXPECT_HMICALL("TTS.Speak", + { + ttsChunks = + { + + { + text = "TTSChunk", + type = "TEXT" + } + }, + speakType = "ALERT" + }) + :Do(function(_,data) + + --store id for response in next Test. + SpeakId = data.id + + local function TTS_Started() + self.hmiConnection:SendNotification("TTS.Started") + end + + RUN_AFTER(TTS_Started, 500) + + end) + :ValidIf(function(_,data) + if #data.params.ttsChunks == 1 then + return true + else + print("ttsChunks array in TTS.Speak request has wrong element number. Expected 1, actual "..tostring(#data.params.ttsChunks)) + return false + end + end) + + --mobile side: Expected OnHMIStatus() notification + EXPECT_NOTIFICATION("OnHMIStatus", + { systemContext = "ALERT", hmiLevel = hmiLevel, audioStreamingState = "AUDIBLE" }, + { systemContext = "ALERT", hmiLevel = hmiLevel, audioStreamingState = "ATTENUATED"}) + :Times(2) +end + + +--------------------------------------------------------------------------------------------- +-------------------------------------------Preconditions------------------------------------- +--------------------------------------------------------------------------------------------- + + --Print new line to separate Preconditions + commonFunctions:newTestCasesGroup("Preconditions") + + --Delete app_info.dat, logs and policy table + commonSteps:DeleteLogsFileAndPolicyTable() + + --1.Unregister app + commonSteps:UnregisterApplication() + + --2. Update policy to allow request + policyTable:Precondition_updatePolicy_By_overwriting_preloaded_pt("files/ptu_general.json") + + --3.Create second session + function Test:Precondition_SecondSession() + self.mobileSession1 = mobile_session.MobileSession( + self, + self.mobileConnection) + self.mobileSession1:StartService(7) + end + + --4.Create third session + function Test:Precondition_SecondSession() + self.mobileSession2 = mobile_session.MobileSession( + self, + self.mobileConnection) + self.mobileSession2:StartService(7) + end +----------------------------------------------------------------------------------------------- +-------------------------------------------TEST BLOCK I---------------------------------------- +--------------------------------Check normal cases of Mobile request--------------------------- +----------------------------------------------------------------------------------------------- + +--Not Applicable + +---------------------------------------------------------------------------------------------- +-----------------------------------------TEST BLOCK II---------------------------------------- +-----------------------------Check special cases of Mobile request---------------------------- +---------------------------------------------------------------------------------------------- + +--Not Applicable + +----------------------------------------------------------------------------------------------- +-------------------------------------------TEST BLOCK III-------------------------------------- +----------------------------------Check normal cases of HMI notification----------------------- +----------------------------------------------------------------------------------------------- + + +--Verify OnEventChanged(): +---- 1."isActive" is true/false +---- 2.Without "isActive" value +---- 3.With "isActive" is invalid/not existed/empty/wrongtype + + commonFunctions:newTestCasesGroup("Check normal cases of HMI notification") + + --After receiving BasicCommunication.OnEventChanged(PHONE_CALL,true) from HMI, SDL deactivates Navigation app from (FULL, AUDIBLE) to (LIMITED, NOT_AUDIBLE) + --and deactivates Media/Communication/Non Media app to (BACKGROUND, NOT_AUDIBLE). Then SDL restore app's state when received OnEventChanged(PHONE_CALL, false). + + local testData ={ + {app = "NAVIGATION", appType ={"NAVIGATION"}, isMedia=false, hmiLevel="LIMITED", audioStreamingState="NOT_AUDIBLE"}, + {app= "MEDIA", appType ={"MEDIA"}, isMedia=true, hmiLevel="BACKGROUND", audioStreamingState="NOT_AUDIBLE"}, + {app="COMMUNICATION", appType ={"COMMUNICATION"}, isMedia=false, hmiLevel="BACKGROUND", audioStreamingState="NOT_AUDIBLE"}, + {app="NON MEDIA", appType ={"DEFAULT"}, isMedia=false, hmiLevel="BACKGROUND", audioStreamingState="NOT_AUDIBLE"} + } + + for i =1, #testData do + + commonFunctions:newTestCasesGroup(testData[i].app.." app is FULL. HMI sends OnEventChanged(PHONE_CALL) with isActive: true then false") + + local function App_IsFull_PhoneCall_IsOn() + + Test["Change_App1_Params_To" .. testData[i].app .."_CaseAppIsFULL_isActiveIsValid"] = function(self) + self:change_App_Params(1,testData[i].appType,testData[i].isMedia) + end + + commonSteps:RegisterAppInterface(testData[i].app .."_CaseAppIsFULL_isActiveIsValid_RegisterApp") + commonSteps:ActivationApp(_,testData[i].app .."_CaseAppIsFULL_isActiveIsValid_ActivateApp") + + Test[testData[i].app .."_CaseAppIsFULL_PhoneCallEvent_isActiveIsTrue"] = function(self) + self:onEventChanged(true, testData[i].hmiLevel, testData[i].audioStreamingState,1) + end + + Test[testData[i].app .."_CaseAppIsFULL_PhoneCallEvent_isActiveIsFalse"] = function(self) + self:onEventChanged(false, "FULL", "AUDIBLE",1) + end + end + + App_IsFull_PhoneCall_IsOn() + + commonSteps:UnregisterApplication(testData[i].app .."_CaseAppIsFULL_PhoneCallEvent_isActiveIsValid_Postcondition") + end + ------------------------------------------------------------------------------------------------------------------------------------------------------------- + + --After receiving BasicCommunication.OnEventChanged(PHONE_CALL,true) from HMI, SDL deactivates Navigation app from (LIMITED, AUDIBLE) to (LIMITED, NOT_AUDIBLE) + --and deactivates Media/Communication/Non Media app to (BACKGROUND, NOT_AUDIBLE). Then SDL restore app's state when received OnEventChanged(PHONE_CALL, false). + + for i =1, #testData-1 do + + commonFunctions:newTestCasesGroup(testData[i].app.." app is LIMITED. HMI sends OnEventChanged(PHONE_CALL) with isActive: true then false") + + local function App_IsFull_PhoneCall_IsOn() + + Test["Change_App1_Params_To" .. testData[i].app .."_CaseAppIsLIMITED_isActiveIsValid"] = function(self) + self:change_App_Params(1,testData[i].appType,testData[i].isMedia) + end + + commonSteps:RegisterAppInterface(testData[i].app .."_CaseAppIsLIMITED_isActiveIsValid_RegisterApp") + commonSteps:ActivationApp(_,testData[i].app .."_CaseAppIsLIMITED_isActiveIsValid_ActivateApp") + + Test[testData[i].app .."_CaseAppIsLIMITED_BringAppToLimited"]= function(self) + self:bring_App_To_LIMITED() + end + + Test[testData[i].app .."_CaseAppIsLIMITED_PhoneCallEvent_isActiveIsTrue"]= function(self) + self:onEventChanged(true, testData[i].hmiLevel, testData[i].audioStreamingState,1) + end + + --NOTE: This step only can run after APPLINK-15164 is DONE + --Test[testData[i].app .."_CaseAppIsLIMITED_ActivateApp_WhilePhoneCallIsOn"]= function(self) + -- local rid = self.hmiConnection:SendRequest("SDL.ActivateApp", { appID = self.applications[config.application1.registerAppInterfaceParams.appName]}) + + -- EXPECT_HMIRESPONSE(rid) + -- :Do(function(_,data) + -- if data.result.code ~= 0 then + -- quit() + -- end + -- end) + + -- --HMI expectes to receive OnHMIStatus(FULL,NOT_AUDIBLE,MAIN) till APPLINK-15164 is DONE + -- self.mobileSession:ExpectNotification("OnHMIStatus",{hmiLevel = "FULL", audioStreamingState = "NOT_AUDIBLE", systemContext = "MAIN"}) + -- end + + Test[testData[i].app .."_CaseAppIsLIMITED_PhoneCallEvent_isActiveIsFalse"]= function(self) + self:onEventChanged(false, "LIMITED", "AUDIBLE",1) + --NOTE: Currently, app returns LIMITED but after APPLINK-15164 is DONE, it should be FULL as below + --self:onEventChanged(false, "FULL", "AUDIBLE",1) + end + + end + + App_IsFull_PhoneCall_IsOn() + + --Poscontidion: Unregister app + commonSteps:UnregisterApplication(testData[i].app .."_CaseAppIsLIMITED_PhoneCallEvent_isActiveIsValid_Postcondition") + end + ---------------------------------------------------------------------------------------------------------------------------------- + + --SDL doesn't deactivate Navigation app when receives BasicCommunication.OnEventChanged(PHONE_CALL) from HMI with invalid "isActive" + + local invalidValues = { {value = nil, name = "IsMissed"}, + {value = "", name = "IsEmtpy"}, + {value = "ANY", name = "NonExist"}, + {value = 123, name = "IsWrongDataType"}} + + for i = 1, #invalidValues do + + for j=1,#testData do + + commonFunctions:newTestCasesGroup(testData[j].app.." app is FULL. HMI sends OnEventChanged(PHONE_CALL) with isActive is " ..invalidValues[i].name) + + Test["Change_App1_Params_To" .. testData[j].app .."_isActive_"..invalidValues[i].name] = function(self) + self:change_App_Params(1,testData[j].appType,testData[j].isMedia) + end + + commonSteps:RegisterAppInterface(testData[j].app .."_isActive"..invalidValues[i].name.."_RegisterApp") + commonSteps:ActivationApp(_,testData[j].app .."_isActive"..invalidValues[i].name.."_ActivateApp") + + Test[testData[j].app.."_PhoneCallEvent_isActive" .. invalidValues[i].name] = function(self) + commonTestCases:DelayedExp(1000) + --hmi side: send OnExitApplication + self.hmiConnection:SendNotification("BasicCommunication.OnEventChanged",{isActive= invalidValues[i].value, eventName="PHONE_CALL"}) + + --mobile side: not expected OnHMIStatus + self.mobileSession:ExpectNotification("OnHMIStatus",{hmiLevel=testData[j].hmiLevel, audioStreamingState=testData[j].audioStreamingState, systemContext = "MAIN"}) + :Times(0) + end + + --Poscontidion:Unregister app + commonSteps:UnregisterApplication(testData[j].app .."_PhoneCallEvent_isActive"..invalidValues[i].name.."_Postcondition") + end + end + +---------------------------------------------------------------------------------------------------------------------- + +----------------------------------------------------------------------------------------------- +-------------------------------------------TEST BLOCK IV-------------------------------------- +----------------------------------Check special cases of HMI notification----------------------- +----------------------------------------------------------------------------------------------- +--Verify OnEventChanged() with: +----1.InvalidJsonSyntax +----2.InvalidStructure +----3.Fake Params +----4.Fake Parameter Is From Another API +----5.Missed mandatory Parameters +----6.Missed All PArameters +----7.Several Notifications with the same values +----8.Several otifications with different values + +--Write TEST BLOCK IV to ATF log +commonFunctions:newTestCasesGroup("****************************** TEST BLOCK IV: Check special cases of HMI notification ******************************") + + --SDL must not deactive app when receives BasicCommunication.OnEventChanged(PHONE_CALL) from HMI with InvalidJSonSyntax + for i =1, #testData do + + commonFunctions:newTestCasesGroup(testData[i].app.." app is FULL. HMI sends OnEventChanged(PHONE_CALL) is InvalidJSonSyntax") + + Test["Change_App1_Params_To" .. testData[i].app .."_CaseOnEventChanged_IsInvalidJSonSyntax"] = function(self) + self:change_App_Params(1,testData[i].appType,testData[i].isMedia) + end + + commonSteps:RegisterAppInterface(testData[i].app .."_CaseOnEventChanged_IsInvalidJSonSyntax_RegisterApp") + commonSteps:ActivationApp(_,testData[i].app .."_CaseOnEventChanged_IsInvalidJSonSyntax_ActivateApp") + + Test[testData[i].app .."_OnEventChanged_IsInvalidJSonSyntax"] = function(self) + commonTestCases:DelayedExp(1000) + + --self.hmiConnection:Send('{"jsonrpc":"2.0","method":"BasicCommunication.OnEventChanged","params":{"isActive":true,"eventName":"PHONE_CALL"}}') + self.hmiConnection:Send('{"jsonrpc";"2.0","method":"BasicCommunication.OnEventChanged","params":{"isActive":true,"eventName":"PHONE_CALL"}}') + + --mobile side: not expected OnHMIStatus + self.mobileSession:ExpectNotification("OnHMIStatus",{hmiLevel=testData[i].hmiLevel, audioStreamingState=testData[i].audioStreamingState, systemContext = "MAIN"}) + :Times(0) + end + + --Postcondition: Unregister app + commonSteps:UnregisterApplication(testData[i].app .."_CaseOnEventChanged_IsInvalidJSonSyntax_Postcondition") + end + --------------------------------------------------------------------------------------------------------- + + --SDL must not deactive app when receives BasicCommunication.OnEventChanged(PHONE_CALL) from HMI with InvalidStructure + for i =1, #testData do + + commonFunctions:newTestCasesGroup(testData[i].app.." app is FULL. HMI sends OnEventChanged(PHONE_CALL) is InvalidStructure") + + Test["Change_App1_Params_To" .. testData[i].app .."_CaseOnEventChanged_IsInvalidStructure"] = function(self) + self:change_App_Params(1,testData[i].appType,testData[i].isMedia) + end + + commonSteps:RegisterAppInterface(testData[i].app .."_CaseOnEventChanged_IsInvalidStructure_RegisterApp") + commonSteps:ActivationApp(_,testData[i].app .."_CaseOnEventChanged_IsInvalidStructure_ActivateApp") + + Test[testData[i].app .."_OnEventChanged_InvalidStructure"] = function(self) + commonTestCases:DelayedExp(1000) + + --method is moved into params parameter + --self.hmiConnection:Send('{"jsonrpc":"2.0","method":"BasicCommunication.OnEventChanged","params":{"isActive":true,"eventName":"PHONE_CALL"}}') + self.hmiConnection:Send('{"jsonrpc":"2.0","params":{"method":"BasicCommunication.OnEventChanged","isActive":true,"eventName":"PHONE_CALL"}}') + + --mobile side: not expected OnHMIStatus + self.mobileSession:ExpectNotification("OnHMIStatus",{hmiLevel=testData[i].hmiLevel, audioStreamingState=testData[i].audioStreamingState, systemContext = "MAIN"}) + :Times(0) + end + + --Postcondition: Unregister app + commonSteps:UnregisterApplication(testData[i].app .."_CaseOnEventChanged_InvalidStructure_Postcondition") + end + --------------------------------------------------------------------------------------------------------- + + --SDL must deactive app when receives BasicCommunication.OnEventChanged(PHONE_CALL,ON) from HMI with fake param + for i =1, #testData do + + commonFunctions:newTestCasesGroup(testData[i].app.." app is FULL. HMI sends OnEventChanged(PHONE_CALL) with fake param") + + Test["Change_App1_Params_To" .. testData[i].app .."_CaseOnEventChanged_WithFakeParam"] = function(self) + self:change_App_Params(1,testData[i].appType,testData[i].isMedia) + end + + commonSteps:RegisterAppInterface(testData[i].app .."_CaseOnEventChanged_WithFakeParam_RegisterApp") + commonSteps:ActivationApp(_,testData[i].app .."_CaseOnEventChanged_WithFakeParam_ActivateApp") + + Test[testData[i].app .."_OnEventChanged_WithFakeParam"] = function(self) + --HMI side: sending BasicCommunication.OnEventChanged with fake param + self.hmiConnection:Send('{"jsonrpc":"2.0","method":"BasicCommunication.OnEventChanged","params":{"isActive":true,"eventName":"PHONE_CALL","fakeparam":123}}') + + --mobile side: not expected OnHMIStatus + self.mobileSession:ExpectNotification("OnHMIStatus",{hmiLevel=testData[i].hmiLevel, audioStreamingState=testData[i].audioStreamingState, systemContext = "MAIN"}) + end + + --Postcondition1: Send BC.OnEventChanged(PHONE_CALL,OFF) + Test[testData[i].app .."_CaseOnEventChanged_WithFakeParam_Postcondition1"] = function(self) + self.hmiConnection:SendNotification("BasicCommunication.OnEventChanged",{isActive= false, eventName="PHONE_CALL"}) + + --mobile side: not expected OnHMIStatus + self.mobileSession:ExpectNotification("OnHMIStatus",{hmiLevel = "FULL", audioStreamingState = "AUDIBLE", systemContext = "MAIN"}) + end + + --Postcondition2: Unregister app + commonSteps:UnregisterApplication(testData[i].app .."_CaseOnEventChanged_WithFakeParam_Postcondition2") + end + --------------------------------------------------------------------------------------------------------- + + --SDL must not put deactivates app when receives BasicCommunication.OnEventChanged() from HMI without any params + for i =1, #testData do + + commonFunctions:newTestCasesGroup(testData[i].app.." app is FULL. HMI sends OnEventChanged(PHONE_CALL) without any params") + + Test["Change_App1_Params_To" .. testData[i].app .."_CaseOnEventChanged_WithoutParams"] = function(self) + self:change_App_Params(1,testData[i].appType,testData[i].isMedia) + end + + commonSteps:RegisterAppInterface(testData[i].app .."_CaseOnEventChanged_WithoutParams_RegisterApp") + commonSteps:ActivationApp(_,testData[i].app .."_CaseOnEventChanged_WithoutParams_ActivateApp") + + Test[testData[i].app .."_OnEventChanged_WithoutParams"] = function(self) + commonTestCases:DelayedExp(1000) + --HMI side: sending BasicCommunication.OnEventChanged without any params + self.hmiConnection:Send('{"jsonrpc":"2.0","method":"BasicCommunication.OnEventChanged","params":{}}') + + --mobile side: not expected OnHMIStatus + self.mobileSession:ExpectNotification("OnHMIStatus",{hmiLevel=testData[i].hmiLevel, audioStreamingState=testData[i].audioStreamingState, systemContext = "MAIN"}) + :Times(0) + end + + --Postcondition: Unregister app + commonSteps:UnregisterApplication(testData[i].app .."_OnEventChanged_WithoutParams_Postcondition") + end + --------------------------------------------------------------------------------------------------------- + + --After receiving several BasicCommunication.OnEventChanged(PHONE_CALL,ON) from HMI,SDL must deactivates app.Then SDL restores app when it receives several BasicCommunication.OnEventChanged(PHONE_CALL,OFF) from HMI + for i =1, #testData do + + commonFunctions:newTestCasesGroup(testData[i].app.." app is FULL. HMI sends OnEventChanged(PHONE_CALL) with isActive:true/false") + + Test["Change_App1_Params_To" .. testData[i].app .."_CaseOnEventChanged_PhoneCall_SeveralTimes"] = function(self) + self:change_App_Params(1,testData[i].appType,testData[i].isMedia) + end + + commonSteps:RegisterAppInterface(testData[i].app .."_CaseOnEventChanged_PhoneCall_SeveralTimes_RegisterApp") + commonSteps:ActivationApp(_,testData[i].app .."_CaseOnEventChanged_PhoneCall_SeveralTimes_ActivateApp") + + --Send several BasicCommunication.OnEventChanged(PHONE_CALL,true) + Test[testData[i].app .."_Send_OnEventChanged_PhoneCallOn_SeveralTimes"] = function(self) + --HMI side: sending several BasicCommunication.OnEventChanged without any param + self.hmiConnection:SendNotification("BasicCommunication.OnEventChanged",{isActive= true, eventName="PHONE_CALL"}) + self.hmiConnection:SendNotification("BasicCommunication.OnEventChanged",{isActive= true, eventName="PHONE_CALL"}) + self.hmiConnection:SendNotification("BasicCommunication.OnEventChanged",{isActive= true, eventName="PHONE_CALL"}) + + --mobile side: not expected OnHMIStatus + self.mobileSession:ExpectNotification("OnHMIStatus",{hmiLevel=testData[i].hmiLevel, audioStreamingState=testData[i].audioStreamingState, systemContext = "MAIN"}) + end + + --Send several BasicCommunication.OnEventChanged(PHONE_CALL,false) + Test[testData[i].app .."_Send_OnEventChanged_PhoneCallOff_SeveralTimes"] = function(self) + --HMI side: sending several BasicCommunication.OnEventChanged + self.hmiConnection:SendNotification("BasicCommunication.OnEventChanged",{isActive= false, eventName="PHONE_CALL"}) + self.hmiConnection:SendNotification("BasicCommunication.OnEventChanged",{isActive= false, eventName="PHONE_CALL"}) + self.hmiConnection:SendNotification("BasicCommunication.OnEventChanged",{isActive= false, eventName="PHONE_CALL"}) + + --mobile side: expect OnHMIStatus + self.mobileSession:ExpectNotification("OnHMIStatus",{hmiLevel = "FULL", audioStreamingState = "AUDIBLE", systemContext = "MAIN"}) + end + + --Postcondition: Unregister app + commonSteps:UnregisterApplication(testData[i].app .."_CaseOnEventChanged_PhoneCall_SeveralTimes_Postcondition") + + end + --------------------------------------------------------------------------------------------------------- + + --Description: SDL must put app to (LIMITED/BACKGROUND, NOT_AUDIBLE,MAIN) and restore to (FULL,AUDIBLE,MAIN) and then put (LIMITED/BACKGROUND, NOT_AUDIBLE,MAIN) again when it receives several different BasicCommunication.OnEventChanged(PHONE_CALL,ON/OFF/ON) from HMI + for i =1, #testData do + + commonFunctions:newTestCasesGroup(testData[i].app.." app is FULL. HMI sends OnEventChanged(PHONE_CALL) with isActive:true/false/true") + + Test["Change_App1_Params_To" .. testData[i].app .."_CaseOnEventChanged_PhoneCallOnOffOn"] = function(self) + self:change_App_Params(1,testData[i].appType,testData[i].isMedia) + end + + commonSteps:RegisterAppInterface(testData[i].app .."_CaseOnEventChanged_PhoneCallOnOffOn_RegisterApp") + commonSteps:ActivationApp(_,testData[i].app .."_CaseOnEventChanged_PhoneCallOnOffOn_ActivateApp") + + --Send several BasicCommunication.OnEventChanged(PHONE_CALL) with different "isActive" param + Test[testData[i].app .."_SendOnEventChanged_PhoneCallOnOffOn"] = function(self) + --HMI side: sending several BasicCommunication.OnEventChanged + self.hmiConnection:SendNotification("BasicCommunication.OnEventChanged",{isActive= true, eventName="PHONE_CALL"}) + self.hmiConnection:SendNotification("BasicCommunication.OnEventChanged",{isActive= false, eventName="PHONE_CALL"}) + self.hmiConnection:SendNotification("BasicCommunication.OnEventChanged",{isActive= true, eventName="PHONE_CALL"}) + + --mobile side: not expected OnHMIStatus + self.mobileSession:ExpectNotification("OnHMIStatus",{hmiLevel=testData[i].hmiLevel, audioStreamingState=testData[i].audioStreamingState, systemContext = "MAIN"}, + {hmiLevel = "FULL", audioStreamingState = "AUDIBLE", systemContext = "MAIN"}, + {hmiLevel=testData[i].hmiLevel, audioStreamingState=testData[i].audioStreamingState, systemContext = "MAIN"}) + :Times(3) + end + + --Postcondition1: Send BC.OnEventChanged(PHONE_CALL,false) + Test[testData[i].app .."_SendOnEventChanged_PhoneCallOnOffOn_Postcondition1"] = function(self) + self.hmiConnection:SendNotification("BasicCommunication.OnEventChanged",{isActive= false, eventName="PHONE_CALL"}) + + --mobile side: not expected OnHMIStatus + self.mobileSession:ExpectNotification("OnHMIStatus",{hmiLevel = "FULL", audioStreamingState = "AUDIBLE", systemContext = "MAIN"}) + end + + --Postcondition2: Unregister app + commonSteps:UnregisterApplication(testData[i].app .."_SendOnEventChanged_PhoneCallOnOffOn_Postcondition2") + + end + +---------------------------------------------------------------------------------------------------------------------- + +----------------------------------------------------------------------------------------------- +-------------------------------------------TEST BLOCK V---------------------------------------- +-------------------------------------Checks All Result Codes----------------------------------- +----------------------------------------------------------------------------------------------- + +--Not Applicable + +---------------------------------------------------------------------------------------------- +-----------------------------------------TEST BLOCK VI---------------------------------------- +-------------------------Sequence with emulating of user's action(s)-------------------------- +---------------------------------------------------------------------------------------------- + +--Not Applicable + +----------------------------------------------------------------------------------------------- + +--------------------------------------------------------------------------------------------- +-----------------------------------------TEST BLOCK VII--------------------------------------- +--------------------------------------Different HMIStatus------------------------------------- +---------------------------------------------------------------------------------------------- +--Verification: +----1.(FULL,AUDIBLE,MAIN): Already checked by HMIResponseCheck3.1 +----2.(LIMITED,AUDIBLE,MAIN): Already checked by HMIResponseCheck3.2 +----3.(FULL,NOT_AUDIBLE,VRSESSION) +----4.(LIMITED,NOT_AUDIBLE,VRSESSION) +----5.(FULL,ATTENUATED,ALERT) +----6.(LIMITED,ATTENUATED,ALERT) +----7.(BACKGROUND,NOT_AUDIBLE,MAIN) +----8.Three apps are at (LIMITED,AUDIBLE,MAIN) +----9.Two apps are at (LIMITED,AUDIBLE,MAIN), one app is at (FULL,AUDIBLE,MAIN) + + --Write TEST BLOCK VII to ATF log + commonFunctions:newTestCasesGroup("****************************** TEST BLOCK VII: Check with Different HMIStatus ******************************") + + --Navi app is at(FULL,NOT_AUDIBLE,VRSESSION), SDL must deactives navigation app to LIMITED and restore app to FULL when it receices OnEventChanged(PHONE_CALL,ON/OFF) from HMI + + for i =1, #testData do + + commonFunctions:newTestCasesGroup(testData[i].app.." app is (FULL,NOT_AUDIBLE,VRSESSION). HMI sends OnEventChanged(PHONE_CALL) with isActive:true/false") + + Test["Change_App1_Params_To" .. testData[i].app .."_CaseAppIsFULL_VRSESSION"] = function(self) + self:change_App_Params(1,testData[i].appType,testData[i].isMedia) + end + + commonSteps:RegisterAppInterface(testData[i].app .."_CaseAppIsFULL_VRSESSION_RegisterApp") + commonSteps:ActivationApp(_,testData[i].app .."_CaseAppIsFULL_VRSESSION_ActivateApp") + + Test[testData[i].app .."_CaseAppIsFULL_VRSESSION_StartVRSESSION"] = function(self) + self:start_VRSESSION("FULL") + end + + --Send OnventChanged(PHONE_CALL,ON) to SDL: App is changed to (LIMITED/BACKGROUND,NOT_AUDIBLE,VRSESSION) + Test[testData[i].app .."_CaseAppIsFULL_VRSESSION_PhonCallIsOn"] = function(self) + self:onEventChanged(true,testData[i].hmiLevel, testData[i].audioStreamingState,1) + end + + --Send OnventChanged(PHONE_CALL,OFF) to SDL: App is changed to (FULL,NOT_AUDIBLE,VRSESSION) + Test[testData[i].app .."_CaseAppIsFULL_VRSESSION_PhonCallIsOff"] = function(self) + self:onEventChanged(false,"FULL","NOT_AUDIBLE",1) + end + + Test[testData[i].app .."_CaseAppIsFULL_VRSESSION_StopVRSESSION"] = function(self) + if i==4 then + self:stop_VRSESSION("FULL","NOT_AUDIBLE") + else self:stop_VRSESSION("FULL","AUDIBLE") end + end + + --Postcondition: Unregister app + commonSteps:UnregisterApplication(testData[i].app .."_CaseAppIsFULL_VRSESSION_Postcondition") + end + ---------------------------------------------------------------------------------------------------------- + + --Media/Commnucation app is at (LIMITED,NOT_AUDIBLE,VRSESSION), SDL must change app to(BACKGROUND,NOT_AUDIBLE,VRSESSION) and restore when it receices OnEventChanged(PHONE_CALL,ON/OFF) from HMI + + for i =2, #testData-1 do + + commonFunctions:newTestCasesGroup(testData[i].app.." app is (LIMITED,NOT_AUDIBLE,VRSESSION). HMI sends OnEventChanged(PHONE_CALL) with isActive:true/false") + + Test["Change_App1_Params_To" .. testData[i].app .."_CaseAppIsLIMITED_VRSESSION"] = function(self) + self:change_App_Params(1,testData[i].appType,testData[i].isMedia) + end + + commonSteps:RegisterAppInterface(testData[i].app .."_CaseAppIsLIMITED_VRSESSION_RegisterApp") + commonSteps:ActivationApp(_,testData[i].app .."_CaseAppIsFULL_VRSESSION_ActivateApp") + + Test[testData[i].app .."_CaseAppIsLIMITED_VRSESSION_BringAppToLimited"] = function(self) + self:bring_App_To_LIMITED() + end + + Test[testData[i].app .."_CaseAppIsLIMITED_VRSESSION_StartVRSESSION"] = function(self) + self:start_VRSESSION("LIMITED") + end + + --Send OnventChanged(PHONE_CALL,ON) to SDL: App is changed to (BACKGROUND,NOT_AUDIBLE,VRSESSION) + Test[testData[i].app .."_CaseAppIsLIMITED_VRSESSION_PhonCallIsOn"] = function(self) + self:onEventChanged(true,testData[i].hmiLevel, testData[i].audioStreamingState,1) + end + + --Send OnventChanged(PHONE_CALL,OFF) to SDL: App is (LIMITED,NOT_AUDIBLE,VRSESSION) + Test[testData[i].app .."_CaseAppIsLIMITED_VRSESSION_PhonCallIsOff"] = function(self) + self:onEventChanged(false,"LIMITED", "NOT_AUDIBLE",1) + end + + Test[testData[i].app .."_CaseAppIsLIMITED_VRSESSION_StopVRSESSION"] = function(self) + self:stop_VRSESSION("LIMITED","AUDIBLE") + end + + --Postcondition: Unregister app + commonSteps:UnregisterApplication(testData[i].app .."_CaseAppIsLIMITED_VRSESSION_Poscontidion") + + end + ----------------------------------------------------------------------------------------------------------- + + --Navigation app is at (LIMITED,NOT_AUDIBLE,VRSESSION), SDL must not change app's state when it receices OnEventChanged(PHONE_CALL,ON/OFF) from HMI + + commonFunctions:newTestCasesGroup("Navigation app is at (LIMITED,NOT_AUDIBLE,VRSESSION)") + + Test["Change_App1_Params_To_NAVIGATION_CaseAppIsLIMITED_VRSESSION"] = function(self) + self:change_App_Params(1,{"NAVIGATION"},false) + end + + commonSteps:RegisterAppInterface("NAVIGATION_CaseAppIsLIMITED_VRSESSION_RegisterApp") + commonSteps:ActivationApp(_,"NAVIGATION_CaseAppIsLIMITED_VRSESSION_ActivateApp") + + Test["NAVIGATION_CaseAppIsLIMITED_VRSESSION_BringAppToLIMITED"] = function(self) + self:bring_App_To_LIMITED() + end + + --Start VRSESSION: App is changed to (LIMITED,NOT_AUDIBLE,VRSESSION) + Test["NAVIGATION_CaseAppIsLIMITED_VRSESSION_StartVRSESSION"] = function(self) + self:start_VRSESSION("LIMITED") + end + + --Send OnventChanged(PHONE_CALL,ON) to SDL: App still be(LIMITED,NOT_AUDIBLE,VRSESSION) + Test["NAVIGATION_CaseAppIsLIMITED_VRSESSION_PhoneCallIsOn"] = function(self) + self.hmiConnection:SendNotification("BasicCommunication.OnEventChanged",{isActive= true, eventName="PHONE_CALL"}) + self.mobileSession:ExpectNotification("OnHMIStatus",{hmiLevel = "LIMITED", audioStreamingState = "NOT_AUDIBLE", systemContext = "VRSESSION"}) + :Times(0) + commonTestCases:DelayedExp(1000) + end + + --Send OnventChanged(PHONE_CALL,OFF) to SDL: App is changed to (LIMITED,NOT_AUDIBLE,VRSESSION) + Test["NAVIGATION_CaseAppIsLIMITED_VRSESSION_PhoneCallIsOff"] = function(self) + self.hmiConnection:SendNotification("BasicCommunication.OnEventChanged",{isActive= false, eventName="PHONE_CALL"}) + self.mobileSession:ExpectNotification("OnHMIStatus",{hmiLevel = "LIMITED", audioStreamingState = "NOT_AUDIBLE", systemContext = "VRSESSION"}) + :Times(0) + commonTestCases:DelayedExp(1000) + end + + Test["NAVIGATION_CaseAppIsLIMITED_VRSESSION_StopVRSESSION"] = function(self) + self:stop_VRSESSION("LIMITED") + end + + --Postcondition: Unregister app + commonSteps:UnregisterApplication("NAVIGATION_CaseAppIsLIMITED_VRSESSION_Postcondition") + ----------------------------------------------------------------------------------------------------------- + --App is (LIMITED,ATTENUATED,ALERT), SDL must change app's state to (LIMITED/BACKGROUND,NOT_AUDIBLE,ALERT) when it receices OnEventChanged(PHONE_CALL,ON/OFF) from HMI + + for i =1, #testData-1 do + + commonFunctions:newTestCasesGroup(testData[i].app.." app is (LIMITED,ATTENUATED,ALERT). HMI sends OnEventChanged(PHONE_CALL) with isActive:true/false") + + Test["Change_App1_Params_To" .. testData[i].app .."_CaseAppIsLIMITED_ATTENUATED"] = function(self) + self:change_App_Params(1,testData[i].appType,testData[i].isMedia) + end + + commonSteps:RegisterAppInterface(testData[i].app .."_CaseAppIsLIMITED_ATTENUATED_RegisterApp") + commonSteps:ActivationApp(_,testData[i].app .."_CaseAppIsLIMITED_ATTENUATED_ActivateApp") + + Test[testData[i].app .."_CaseAppIsLIMITED_ATTENUATED_BringAppToLIMITED"] = function(self) + self:bring_App_To_LIMITED() + end + + --Send Alert() to bring app to (LIMITED,ATTENUATED,ALERT) + Test[testData[i].app .."_CaseAppIsLIMITED_ATTENUATED_SendAlert"] = function(self) + --mobile side: Alert request + CorIdAlert = self.mobileSession:SendRPC("Alert", + { + alertText1 = "alertText1", + alertText2 = "alertText2", + alertText3 = "alertText3", + ttsChunks = + { + + { + text = "TTSChunk", + type = "TEXT", + } + }, + duration = 5000, + playTone = false, + progressIndicator = true + }) + + + --hmi side: UI.Alert request + EXPECT_HMICALL("UI.Alert", + { + alertStrings = + { + {fieldName = "alertText1", fieldText = "alertText1"}, + {fieldName = "alertText2", fieldText = "alertText2"}, + {fieldName = "alertText3", fieldText = "alertText3"} + }, + alertType = "BOTH", + duration = 5000, + progressIndicator = true + }) + :Do(function(_,data) + self.hmiConnection:SendNotification("UI.OnSystemContext",{ appID = self.applications[config.application1.registerAppInterfaceParams.appName], systemContext="ALERT"}) + + --store id for response in next Test. + AlertId = data.id + + end) + + --hmi side: TTS.Speak request + EXPECT_HMICALL("TTS.Speak", + { + ttsChunks = + { + + { + text = "TTSChunk", + type = "TEXT" + } + }, + speakType = "ALERT" + }) + :Do(function(_,data) + + --store id for response in next Test. + SpeakId = data.id + + local function TTS_Started() + self.hmiConnection:SendNotification("TTS.Started") + end + + RUN_AFTER(TTS_Started, 500) + + end) + :ValidIf(function(_,data) + if #data.params.ttsChunks == 1 then + return true + else + print("ttsChunks array in TTS.Speak request has wrong element number. Expected 1, actual "..tostring(#data.params.ttsChunks)) + return false + end + end) + + --mobile side: Expected OnHMIStatus() notification + EXPECT_NOTIFICATION("OnHMIStatus", + { systemContext = "ALERT", hmiLevel = "LIMITED", audioStreamingState = "AUDIBLE" }, + { systemContext = "ALERT", hmiLevel = "LIMITED", audioStreamingState = "ATTENUATED"}) + :Times(2) + end + + --Send Emergency_Event(ON) during Alert(): App is changed to (LIMITED,NOT_AUDIBLE,ALERT) or (BACKGROUND,NOT_AUDIBLE,ALERT) + Test[testData[i].app .."_CaseAppIsLIMITED_ATTENUATED_PhonCallIsOn"] = function(self) + self.hmiConnection:SendNotification("BasicCommunication.OnEventChanged",{isActive= true, eventName="PHONE_CALL"}) + + --mobile side: Expected OnHMIStatus() notification + EXPECT_NOTIFICATION("OnHMIStatus", { systemContext = "ALERT", hmiLevel=testData[i].hmiLevel,audioStreamingState=testData[i].audioStreamingState}) + end + + --Send Response to Alert(): App is changed to (LIMITED,NOT_AUDIBLE,MAIN) or (BACKGROUND,NOT_AUDIBLE,MAIN) + Test[testData[i].app .."_CaseAppIsLIMITED_ATTENUATED_PhonCallIsOn_HMI_Response_ForAlert"] = function(self) + --UI response + self.hmiConnection:SendResponse(AlertId, "UI.Alert", "SUCCESS", { }) + + self.hmiConnection:SendNotification("UI.OnSystemContext",{ appID = self.applications[config.application1.registerAppInterfaceParams.appName], systemContext="MAIN"}) + --SendOnSystemContext(self,"MAIN") + + + --TTS response + self.hmiConnection:SendResponse(SpeakId, "TTS.Speak", "SUCCESS", { }) + + self.hmiConnection:SendNotification("TTS.Stopped") + + --HMI receiced StopSpeaking + EXPECT_HMICALL("TTS.StopSpeaking") + :Do(function(_,data) + + --TTS StopSpeaking response + self.hmiConnection:SendResponse(data.id,"TTS.StopSpeaking", "SUCCESS",{}) + end) + + --mobile side: Expected OnHMIStatus() notification + EXPECT_NOTIFICATION("OnHMIStatus", { systemContext = "MAIN", hmiLevel=testData[i].hmiLevel,audioStreamingState=testData[i].audioStreamingState}) + + --mobile side: Alert response + EXPECT_RESPONSE(CorIdAlert, { success = true, resultCode = "SUCCESS" }) + + end + + --Send Emergency_Event(OFF): App is changed to (FULL,AUDIBLE,MAIN) + Test[testData[i].app .."_CaseAppIsLIMITED_ATTENUATED_PhonCallIsOff"] = function(self) + self:onEventChanged(false,"LIMITED", "AUDIBLE",1) + end + + --Postcondition: Unregister app + commonSteps:UnregisterApplication(testData[i].app .."_CaseAppIsLIMITED_ATTENUATED_Postcondition") + end + -------------------------------------------------------------------------------------------------------------------- + --App is (FULL,ATTENUATED/NOT_AUDIBLE,ALERT), SDL must change app's state to (LIMITED/BACKGROUND,NOT_AUDIBLE,ALERT) when it receices OnEventChanged(PHONE_CALL,ON/OFF) from HMI + for i =1, #testData do + + commonFunctions:newTestCasesGroup(testData[i].app.." app is (FULL,ATTENUATED,ALERT). HMI sends OnEventChanged(PHONE_CALL) with isActive:true/false") + + Test["Change_App1_Params_To" .. testData[i].app .."_CaseAppIsFULL_ATTENUATED"] = function(self) + self:change_App_Params(1,testData[i].appType,testData[i].isMedia) + end + + commonSteps:RegisterAppInterface(testData[i].app .."_CaseAppIsFULL_ATTENUATED_RegisterApp") + commonSteps:ActivationApp(_,testData[i].app .."_CaseAppIsFULL_ATTENUATED_ActivateApp") + + --Send Alert() to bring app to (FULL,ATTENUATED,ALERT) + Test[testData[i].app .."_CaseAppIsFULL_ATTENUATED_SendAlert"] = function(self) + --mobile side: Alert request + CorIdAlert = self.mobileSession:SendRPC("Alert", + { + alertText1 = "alertText1", + alertText2 = "alertText2", + alertText3 = "alertText3", + ttsChunks = + { + + { + text = "TTSChunk", + type = "TEXT", + } + }, + duration = 5000, + playTone = false, + progressIndicator = true + }) + + + --hmi side: UI.Alert request + EXPECT_HMICALL("UI.Alert", + { + alertStrings = + { + {fieldName = "alertText1", fieldText = "alertText1"}, + {fieldName = "alertText2", fieldText = "alertText2"}, + {fieldName = "alertText3", fieldText = "alertText3"} + }, + alertType = "BOTH", + duration = 5000, + progressIndicator = true + }) + :Do(function(_,data) + self.hmiConnection:SendNotification("UI.OnSystemContext",{ appID = self.applications[config.application1.registerAppInterfaceParams.appName], systemContext="ALERT"}) + + --store id for response in next Test. + AlertId = data.id + + end) + + --hmi side: TTS.Speak request + EXPECT_HMICALL("TTS.Speak", + { + ttsChunks = + { + + { + text = "TTSChunk", + type = "TEXT" + } + }, + speakType = "ALERT" + }) + :Do(function(_,data) + + --store id for response in next Test. + SpeakId = data.id + + local function TTS_Started() + self.hmiConnection:SendNotification("TTS.Started") + end + + RUN_AFTER(TTS_Started, 500) + + end) + :ValidIf(function(_,data) + if #data.params.ttsChunks == 1 then + return true + else + print("ttsChunks array in TTS.Speak request has wrong element number. Expected 1, actual "..tostring(#data.params.ttsChunks)) + return false + end + end) + + if i==4 then + EXPECT_NOTIFICATION("OnHMIStatus",{ systemContext = "ALERT", hmiLevel = "FULL", audioStreamingState = "NOT_AUDIBLE"}) + else + --mobile side: Expected OnHMIStatus() notification + EXPECT_NOTIFICATION("OnHMIStatus", + { systemContext = "ALERT", hmiLevel = "FULL", audioStreamingState = "AUDIBLE" }, + { systemContext = "ALERT", hmiLevel = "FULL", audioStreamingState = "ATTENUATED"}) + :Times(2) + end + end + + --Send OnEventChanged(PHONE_CALL,ON) during Alert(): App is changed to (LIMITED,NOT_AUDIBLE,ALERT) or (BACKGROUND,NOT_AUDIBLE,ALERT) + Test[testData[i].app .."_CaseAppIsFULL_ATTENUATED_PhonCallIsOn"] = function(self) + self.hmiConnection:SendNotification("BasicCommunication.OnEventChanged",{isActive= true, eventName="PHONE_CALL"}) + --mobile side: Expected OnHMIStatus() notification + EXPECT_NOTIFICATION("OnHMIStatus", { systemContext = "ALERT", hmiLevel=testData[i].hmiLevel,audioStreamingState=testData[i].audioStreamingState}) + end + + --Send Response to Alert(): App is changed to (LIMITED,NOT_AUDIBLE,MAIN) or (BACKGROUND,NOT_AUDIBLE,MAIN) + Test[testData[i].app .."_CaseAppIsFULL_ATTENUATED_PhonCallIsOn_HMI_Response_ForAlert"] = function(self) + --UI response + self.hmiConnection:SendResponse(AlertId, "UI.Alert", "SUCCESS", { }) + self.hmiConnection:SendNotification("UI.OnSystemContext",{ appID = self.applications[config.application1.registerAppInterfaceParams.appName], systemContext="MAIN"}) + + --TTS response + self.hmiConnection:SendResponse(SpeakId, "TTS.Speak", "SUCCESS", { }) + self.hmiConnection:SendNotification("TTS.Stopped") + + --HMI receiced StopSpeaking + EXPECT_HMICALL("TTS.StopSpeaking") + :Do(function(_,data) + + --TTS StopSpeaking response + self.hmiConnection:SendResponse(data.id,"TTS.StopSpeaking", "SUCCESS",{}) + end) + + --mobile side: Expected OnHMIStatus() notification + EXPECT_NOTIFICATION("OnHMIStatus", { systemContext = "MAIN", hmiLevel=testData[i].hmiLevel,audioStreamingState=testData[i].audioStreamingState}) + + --mobile side: Alert response + EXPECT_RESPONSE(CorIdAlert, { success = true, resultCode = "SUCCESS" }) + end + + --Send --Send OnEventChanged(PHONE_CALL,OFF): App is changed to (FULL,AUDIBLE,MAIN) + Test[testData[i].app .."_CaseAppIsFULL_ATTENUATED_PhonCallIsOff"] = function(self) + if i==4 then + self:onEventChanged(false,"FULL", "NOT_AUDIBLE",1) + else self:onEventChanged(false,"FULL", "AUDIBLE",1) end + end + + --Postcondition: Unregister app + commonSteps:UnregisterApplication(testData[i].app .."_CaseAppIsFULL_ATTENUATED_Postcondition") + end + -------------------------------------------------------------------------------------------------------------------- + + --App is at BACKGROUND, SDL must not send OnHMIStatus() to app when it receices OnEventChanged(PHONE_CALL,ON/OFF) from HMI + commonFunctions:newTestCasesGroup("App is at (BACKGROUND,NOT_AUDIBLE,MAIN)") + + function Test:Change_App1_Params_To_NonMedia() + self:change_App_Params(1,{"SOCIAL"},false) + end + + commonSteps:RegisterAppInterface("RegisterSocialApp") + commonSteps:ActivationApp(_,"ActivateSocialApp") + + function Test:Change_Social_To_BACKGROUND() + local cid = self.hmiConnection:SendNotification("BasicCommunication.OnAppDeactivated", + { + appID = self.applications[config.application1.registerAppInterfaceParams.appName] + }) + + self.mobileSession:ExpectNotification("OnHMIStatus",{hmiLevel = "BACKGROUND", audioStreamingState = "NOT_AUDIBLE", systemContext = "MAIN"}) + end + + function Test:CaseSocialApp_PhoneCallOn_In_BACKGROUND() + --hmi side: send OnEventChanged(Phone_Call, isActive= true) notification to SDL + self.hmiConnection:SendNotification("BasicCommunication.OnEventChanged",{isActive= true, eventName="PHONE_CALL"}) + + --Expect OnHMIStatus notification is not sent to BACKGROUND app + self.mobileSession:ExpectNotification("OnHMIStatus",{hmiLevel = "BACKGROUND", audioStreamingState = "NOT_AUDIBLE", systemContext = "MAIN"}) + :Times(0) + commonTestCases:DelayedExp(1000) + end + + function Test:CaseSocialApp_PhoneCallOff_In_BACKGROUND() + --hmi side: send OnEventChanged(Phone_Call, isActive= true) notification to SDL + self.hmiConnection:SendNotification("BasicCommunication.OnEventChanged",{isActive= false, eventName="PHONE_CALL"}) + + --Expect OnHMIStatus notification is not sent to BACKGROUND app + self.mobileSession:ExpectNotification("OnHMIStatus",{hmiLevel = "BACKGROUND", audioStreamingState = "NOT_AUDIBLE", systemContext = "MAIN"}) + :Times(0) + commonTestCases:DelayedExp(1000) + end + + commonSteps:UnregisterApplication("CaseSocialApp_PhoneCallOff_In_BACKGROUND_Postcondition") + ------------------------------------------------------------------------------------------------------------------ + + --NAVI,MEDIA and VOICE COM apps are LIMITED and try to activate Navi app during PHONE CALL >> SDL sends OnHMIStatus(FULL,NOT_AUDIBLE,MAIN) to Navi app. + --After PHONE_CALL is OFF, SDL sends OnHMIStatus(FULL,AUDIBLE,MAIN) to Navi app + + commonFunctions:newTestCasesGroup("Navi,Media and Communication apps are(LIMITED,AUDIBLE,MAIN) and try to activate Navi app during PHONE CALL") + + function Test:Change_App1_To_NavigationApp() + self:change_App_Params(1,{"NAVIGATION"},false) + end + + commonSteps:RegisterAppInterface("Register_Navigation_App") + commonSteps:ActivationApp(_,"Activate_Navigation_App") + + function Test: Register_Communication_App() + self:change_App_Params(2,{"COMMUNICATION"},false) + self:registerAppInterface2() + end + + function Test: Activate_Communication_App() + + local rid = self.hmiConnection:SendRequest("SDL.ActivateApp", { appID = self.applications[config.application2.registerAppInterfaceParams.appName]}) + + EXPECT_HMIRESPONSE(rid) + :Do(function(_,data) + if data.result.code ~= 0 then + quit() + end + end) + + self.mobileSession:ExpectNotification("OnHMIStatus",{hmiLevel = "LIMITED", audioStreamingState = "AUDIBLE", systemContext = "MAIN"}) + self.mobileSession1:ExpectNotification("OnHMIStatus",{hmiLevel = "FULL", audioStreamingState = "AUDIBLE", systemContext = "MAIN"}) + + end + + function Test: Register_Media_App() + self:change_App_Params(3,{"MEDIA"},true) + self:registerAppInterface3() + end + + function Test: Activate_Media_App() + local rid = self.hmiConnection:SendRequest("SDL.ActivateApp", { appID = self.applications[config.application3.registerAppInterfaceParams.appName]}) + + EXPECT_HMIRESPONSE(rid) + :Do(function(_,data) + if data.result.code ~= 0 then + quit() + end + end) + + self.mobileSession1:ExpectNotification("OnHMIStatus",{hmiLevel = "LIMITED", audioStreamingState = "AUDIBLE", systemContext = "MAIN"}) + self.mobileSession2:ExpectNotification("OnHMIStatus",{hmiLevel = "FULL", audioStreamingState = "AUDIBLE", systemContext = "MAIN"}) + end + + function Test: Bring_MediaApp_To_LIMITED() + local cid = self.hmiConnection:SendNotification("BasicCommunication.OnAppDeactivated", + { + appID = self.applications[config.application3.registerAppInterfaceParams.appName] + }) + + self.mobileSession2:ExpectNotification("OnHMIStatus",{hmiLevel = "LIMITED", audioStreamingState = "AUDIBLE", systemContext = "MAIN"}) + end + + + function Test:CaseAppsAreLIMITED_PhoneCallIsOn() + self:onEventChanged(true,"LIMITED", "AUDIBLE",3) + end + + --NOTE: This step only can run after APPLINK-15164 is DONE + -- function Test: CaseAppsAreLIMITED_Activate_Navigation_App_During_PHONE_CALL() + -- local rid = self.hmiConnection:SendRequest("SDL.ActivateApp", { appID = self.applications[config.application1.registerAppInterfaceParams.appName]}) + + -- EXPECT_HMIRESPONSE(rid) + -- :Do(function(_,data) + -- if data.result.code ~= 0 then + -- quit() + -- end + -- end) + + -- --HMI expectes to receive OnHMIStatus(FULL,NOT_AUDIBLE,MAIN) till APPLINK-15164 is DONE + -- self.mobileSession:ExpectNotification("OnHMIStatus",{hmiLevel = "FULL", audioStreamingState = "NOT_AUDIBLE", systemContext = "MAIN"}) + -- end + + function Test:CaseAppsAreLIMITED_PhoneCallIsOff() + self:onEventChanged(false,"LIMITED", "AUDIBLE",3) + --NOTE: After APPLINK-15164 is DONE, the expected notification should be like below + --self:onEventChanged(false, "FULL", "AUDIBLE",3) + end + + function Test:CaseAppsAreLIMITED_Postcondition_Unregister_All_Apps() + local cid = self.mobileSession:SendRPC("UnregisterAppInterface",{}) + self.mobileSession:ExpectResponse(cid, { success = true, resultCode = "SUCCESS"}) + :Timeout(2000) + + local cid = self.mobileSession1:SendRPC("UnregisterAppInterface",{}) + self.mobileSession1:ExpectResponse(cid, { success = true, resultCode = "SUCCESS"}) + :Timeout(2000) + + local cid = self.mobileSession2:SendRPC("UnregisterAppInterface",{}) + self.mobileSession2:ExpectResponse(cid, { success = true, resultCode = "SUCCESS"}) + :Timeout(2000) + end + ------------------------------------------------------------------------------------------------------------------------------- + + --MEDIA and VOICE COM apps are LIMITED. NAVI app is FULL and try to activate Media app during PHONE CALL >> SDL sends OnHMIStatus(FULL,NOT_AUDIBLE,MAIN) to MEDIA app. + --After PHONE_CALL is OFF, SDL sends OnHMIStatus(FULL,AUDIBLE,MAIN) to MEDIA app + + commonFunctions:newTestCasesGroup("Media and Communication apps are(LIMITED,AUDIBLE,MAIN). Navi app is(FULL, AUDIBLE,MAIN) and try to activate Media app during PHONE CALL.") + + function Test:CaseActivateMedia_Change_App1_ToNaviApp() + self:change_App_Params(1,{"NAVIGATION"},false) + end + + commonSteps:RegisterAppInterface("CaseActivateMedia_RegisterNaviApp") + + function Test:CaseActivateMedia_Register_Communication_App() + self:change_App_Params(2,{"COMMUNICATION"},false) + self:registerAppInterface2() + end + + function Test:CaseActivateMedia_Activate_Communication_App() + local rid = self.hmiConnection:SendRequest("SDL.ActivateApp", { appID = self.applications[config.application2.registerAppInterfaceParams.appName]}) + + EXPECT_HMIRESPONSE(rid) + :Do(function(_,data) + if data.result.code ~= 0 then + quit() + end + end) + + self.mobileSession1:ExpectNotification("OnHMIStatus",{hmiLevel = "FULL", audioStreamingState = "AUDIBLE", systemContext = "MAIN"}) + end + + function Test:CaseActivateMedia_Register_MEDIA_App() + self:change_App_Params(3,{"MEDIA"},true) + self:registerAppInterface3() + end + + function Test:CaseActivateMedia_Activate_MEDIA_App() + local rid = self.hmiConnection:SendRequest("SDL.ActivateApp", { appID = self.applications[config.application3.registerAppInterfaceParams.appName]}) + + EXPECT_HMIRESPONSE(rid) + :Do(function(_,data) + if data.result.code ~= 0 then + quit() + end + end) + + self.mobileSession1:ExpectNotification("OnHMIStatus",{hmiLevel = "LIMITED", audioStreamingState = "AUDIBLE", systemContext = "MAIN"}) + self.mobileSession2:ExpectNotification("OnHMIStatus",{hmiLevel = "FULL", audioStreamingState = "AUDIBLE", systemContext = "MAIN"}) + end + + function Test:CaseActivateMedia_Activate_NAVIGATION_App() + local rid = self.hmiConnection:SendRequest("SDL.ActivateApp", { appID = self.applications[config.application1.registerAppInterfaceParams.appName]}) + + EXPECT_HMIRESPONSE(rid) + :Do(function(_,data) + if data.result.code ~= 0 then + quit() + end + end) + + self.mobileSession2:ExpectNotification("OnHMIStatus",{hmiLevel = "LIMITED", audioStreamingState = "AUDIBLE", systemContext = "MAIN"}) + self.mobileSession:ExpectNotification("OnHMIStatus",{hmiLevel = "FULL", audioStreamingState = "AUDIBLE", systemContext = "MAIN"}) + end + + function Test:CaseActivateMedia_PhoneCallIsON() + self:onEventChanged(true,"LIMITED", "NOT_AUDIBLE",3) + end + + --NOTE: This step only can run after APPLINK-15164 is DONE + -- function Test:CaseNaviAppIsFULL_Activate_Media_App_During_PHONE_CALL() + -- local rid = self.hmiConnection:SendRequest("SDL.ActivateApp", { appID = self.applications[config.application3.registerAppInterfaceParams.appName]}) + + -- EXPECT_HMIRESPONSE(rid) + -- :Do(function(_,data) + -- if data.result.code ~= 0 then + -- quit() + -- end + -- end) + + -- --HMI expectes to receive OnHMIStatus(FULL,NOT_AUDIBLE,MAIN) till APPLINK-15164 is DONE + -- self.mobileSession2:ExpectNotification("OnHMIStatus",{hmiLevel = "FULL", audioStreamingState = "NOT_AUDIBLE", systemContext = "MAIN"}) + -- end + + function Test:CaseActivateMedia_PhoneCallIsOff() + self:onEventChanged(false,"FULL", "AUDIBLE",3) + + --NOTE: After APPLINK-15164 is DONE, the expected notification should be like below + -- self.hmiConnection:SendNotification("BasicCommunication.OnEventChanged",{isActive= false, eventName="PHONE_CALL"}) + + --Expect notifications on mobile sides + -- self.mobileSession2:ExpectNotification("OnHMIStatus",{hmiLevel = "FULL", audioStreamingState = "AUDIBLE", systemContext = "MAIN"}) + -- self.mobileSession1:ExpectNotification("OnHMIStatus",{hmiLevel = "LIMITED", audioStreamingState = "AUDIBLE", systemContext = "MAIN"}) + -- self.mobileSession:ExpectNotification("OnHMIStatus",{hmiLevel = "LIMITED", audioStreamingState = "AUDIBLE", systemContext = "MAIN"}) + end + + function Test:CaseActivateMedia_Postcondition_Unregister_All_Apps() + local cid = self.mobileSession:SendRPC("UnregisterAppInterface",{}) + self.mobileSession:ExpectResponse(cid, { success = true, resultCode = "SUCCESS"}) + :Timeout(2000) + + local cid = self.mobileSession1:SendRPC("UnregisterAppInterface",{}) + self.mobileSession1:ExpectResponse(cid, { success = true, resultCode = "SUCCESS"}) + :Timeout(2000) + + local cid = self.mobileSession2:SendRPC("UnregisterAppInterface",{}) + self.mobileSession2:ExpectResponse(cid, { success = true, resultCode = "SUCCESS"}) + :Timeout(2000) + end + -------------------------------------------------------------------------------------------------- + --MEDIA and VOICE COM apps are LIMITED. NAVI app is FULL and try to activate VOICE COM app during PHONE CALL >> SDL sends OnHMIStatus(FULL,NOT_AUDIBLE,MAIN) to VOICE COM app. + --After PHONE_CALL is OFF, SDL sends OnHMIStatus(FULL,AUDIBLE,MAIN) to VOICE COM app + + commonFunctions:newTestCasesGroup("Media and Communication apps are(LIMITED,AUDIBLE,MAIN). Navi app is(FULL, AUDIBLE,MAIN) and try to activate VOICE COM app during PHONE CALL.") + + function Test:CaseActivateVOICECOM_Change_App1_ToNaviApp() + self:change_App_Params(1,{"NAVIGATION"},false) + end + + commonSteps:RegisterAppInterface("CaseActivateVOICECOM_RegisterNaviApp") + + function Test:CaseActivateVOICECOM_Register_COMMUNICATION_App() + self:change_App_Params(2,{"COMMUNICATION"},false) + self:registerAppInterface2() + end + + function Test:CaseActivateVOICECOM_Activate_COMMUNICATION_App() + local rid = self.hmiConnection:SendRequest("SDL.ActivateApp", { appID = self.applications[config.application2.registerAppInterfaceParams.appName]}) + + EXPECT_HMIRESPONSE(rid) + :Do(function(_,data) + if data.result.code ~= 0 then + quit() + end + end) + + self.mobileSession1:ExpectNotification("OnHMIStatus",{hmiLevel = "FULL", audioStreamingState = "AUDIBLE", systemContext = "MAIN"}) + end + + function Test:CaseActivateVOICECOM_Register_MEDIA_App() + self:change_App_Params(3,{"MEDIA"},true) + self:registerAppInterface3() + end + + function Test:CaseActivateVOICECOM_Activate_MEDIA_App() + local rid = self.hmiConnection:SendRequest("SDL.ActivateApp", { appID = self.applications[config.application3.registerAppInterfaceParams.appName]}) + + EXPECT_HMIRESPONSE(rid) + :Do(function(_,data) + if data.result.code ~= 0 then + quit() + end + end) + + self.mobileSession1:ExpectNotification("OnHMIStatus",{hmiLevel = "LIMITED", audioStreamingState = "AUDIBLE", systemContext = "MAIN"}) + self.mobileSession2:ExpectNotification("OnHMIStatus",{hmiLevel = "FULL", audioStreamingState = "AUDIBLE", systemContext = "MAIN"}) + end + + function Test:CaseActivateVOICECOM_Activate_NAVIGATION_App() + local rid = self.hmiConnection:SendRequest("SDL.ActivateApp", { appID = self.applications[config.application1.registerAppInterfaceParams.appName]}) + + EXPECT_HMIRESPONSE(rid) + :Do(function(_,data) + if data.result.code ~= 0 then + quit() + end + end) + + self.mobileSession2:ExpectNotification("OnHMIStatus",{hmiLevel = "LIMITED", audioStreamingState = "AUDIBLE", systemContext = "MAIN"}) + self.mobileSession:ExpectNotification("OnHMIStatus",{hmiLevel = "FULL", audioStreamingState = "AUDIBLE", systemContext = "MAIN"}) + end + + function Test:CaseActivateVOICECOM_PhoneCallIsOn() + self:onEventChanged(true,"LIMITED", "NOT_AUDIBLE",3) + end + + --NOTE: This step only can run after APPLINK-15164 is DONE + -- function Test:CaseActivateVOICECOM_Activate_VOICECOM_App_During_PHONE_CALL() + -- local rid = self.hmiConnection:SendRequest("SDL.ActivateApp", { appID = self.applications[config.application2.registerAppInterfaceParams.appName]}) + + -- EXPECT_HMIRESPONSE(rid) + -- :Do(function(_,data) + -- if data.result.code ~= 0 then + -- quit() + -- end + -- end) + + -- --HMI expectes to receive OnHMIStatus(FULL,NOT_AUDIBLE,MAIN) till APPLINK-15164 is DONE + -- self.mobileSession1:ExpectNotification("OnHMIStatus",{hmiLevel = "FULL", audioStreamingState = "NOT_AUDIBLE", systemContext = "MAIN"}) + -- end + + function Test:CaseActivateVOICECOM_PhoneCallIsOff() + self:onEventChanged(false,"FULL", "AUDIBLE",3) + + --NOTE: After APPLINK-15164 is DONE, the expected notification should be like below + -- self.hmiConnection:SendNotification("BasicCommunication.OnEventChanged",{isActive= false, eventName="PHONE_CALL"}) + + --Expect notifications on mobile sides + --self.mobileSession1:ExpectNotification("OnHMIStatus",{hmiLevel = "FULL", audioStreamingState = "AUDIBLE", systemContext = "MAIN"}) + --self.mobileSession2:ExpectNotification("OnHMIStatus",{hmiLevel = "LIMITED", audioStreamingState = "AUDIBLE", systemContext = "MAIN"}) + -- self.mobileSession:ExpectNotification("OnHMIStatus",{hmiLevel = "LIMITED", audioStreamingState = "AUDIBLE", systemContext = "MAIN"}) + end + + function Test:CaseActivateVOICECOM_Postcondition_Unregister_All_Apps() + local cid = self.mobileSession:SendRPC("UnregisterAppInterface",{}) + self.mobileSession:ExpectResponse(cid, { success = true, resultCode = "SUCCESS"}) + :Timeout(2000) + + local cid = self.mobileSession1:SendRPC("UnregisterAppInterface",{}) + self.mobileSession1:ExpectResponse(cid, { success = true, resultCode = "SUCCESS"}) + :Timeout(2000) + + local cid = self.mobileSession2:SendRPC("UnregisterAppInterface",{}) + self.mobileSession2:ExpectResponse(cid, { success = true, resultCode = "SUCCESS"}) + :Timeout(2000) + end + --------------------------------------------------------------------------------------------------------------------------------- + + --VOICE COM app is at LIMITED, NAVI is FULL, NON MEDIA is BACKGROUND and try to activate NON MEDIA app >> SDL sends OnHMIStatus(FULL,NOT_AUDIBLE,MAIN) NON MEDIA app + + commonFunctions:newTestCasesGroup("Communication apps are(LIMITED,AUDIBLE,MAIN). Navi app is(FULL, AUDIBLE,MAIN), Non Media is(BACKGROUND,NOT_AUDIBLE, MAIN) and try to activate NON MEDIA app during PHONE CALL.") + + function Test:CaseActivateNONMEDIA_Change_App1_ToNaviApp() + self:change_App_Params(1,{"NAVIGATION"},false) + end + + commonSteps:RegisterAppInterface("CaseActivateNONMEDIA_RegisterNaviApp") + + function Test:CaseActivateNONMEDIA_Register_COMMUNICATION_App() + self:change_App_Params(2,{"COMMUNICATION"},false) + self:registerAppInterface2() + end + + function Test:CaseActivateNONMEDIA_Activate_COMMUNICATION_App() + local rid = self.hmiConnection:SendRequest("SDL.ActivateApp", { appID = self.applications[config.application2.registerAppInterfaceParams.appName]}) + + EXPECT_HMIRESPONSE(rid) + :Do(function(_,data) + if data.result.code ~= 0 then + quit() + end + end) + + self.mobileSession1:ExpectNotification("OnHMIStatus",{hmiLevel = "FULL", audioStreamingState = "AUDIBLE", systemContext = "MAIN"}) + end + + function Test:CaseActivateNONMEDIA_Register_NONMEDIA_App() + self:change_App_Params(3,{"DEFAULT"},false) + self:registerAppInterface3() + end + + function Test:CaseActivateNONMEDIA_Activate_NONMEDIA_App() + local rid = self.hmiConnection:SendRequest("SDL.ActivateApp", { appID = self.applications[config.application3.registerAppInterfaceParams.appName]}) + + EXPECT_HMIRESPONSE(rid) + :Do(function(_,data) + if data.result.code ~= 0 then + quit() + end + end) + + self.mobileSession1:ExpectNotification("OnHMIStatus",{hmiLevel = "LIMITED", audioStreamingState = "AUDIBLE", systemContext = "MAIN"}) + self.mobileSession2:ExpectNotification("OnHMIStatus",{hmiLevel = "FULL", audioStreamingState = "NOT_AUDIBLE", systemContext = "MAIN"}) + end + + function Test:CaseActivateNONMEDIA_Activate_NAVIGATION_App() + local rid = self.hmiConnection:SendRequest("SDL.ActivateApp", { appID = self.applications[config.application1.registerAppInterfaceParams.appName]}) + + EXPECT_HMIRESPONSE(rid) + :Do(function(_,data) + if data.result.code ~= 0 then + quit() + end + end) + + self.mobileSession2:ExpectNotification("OnHMIStatus",{hmiLevel = "BACKGROUND", audioStreamingState = "NOT_AUDIBLE", systemContext = "MAIN"}) + self.mobileSession:ExpectNotification("OnHMIStatus",{hmiLevel = "FULL", audioStreamingState = "AUDIBLE", systemContext = "MAIN"}) + end + + function Test:CaseActivateNONMEDIA_PhoneCallIsOn() + self.hmiConnection:SendNotification("BasicCommunication.OnEventChanged",{isActive= true, eventName="PHONE_CALL"}) + + self.mobileSession1:ExpectNotification("OnHMIStatus",{hmiLevel = "LIMITED", audioStreamingState = "NOT_AUDIBLE", systemContext = "MAIN"}) + self.mobileSession:ExpectNotification("OnHMIStatus",{hmiLevel = "LIMITED", audioStreamingState = "NOT_AUDIBLE", systemContext = "MAIN"}) + end + + --NOTE: This step only can run after APPLINK-15164 is DONE + -- function Test:CaseActivateNONMEDIA_Activate_NONMEDIA_App_During_PHONE_CALL() + -- local rid = self.hmiConnection:SendRequest("SDL.ActivateApp", { appID = self.applications[config.application2.registerAppInterfaceParams.appName]}) + + -- EXPECT_HMIRESPONSE(rid) + -- :Do(function(_,data) + -- if data.result.code ~= 0 then + -- quit() + -- end + -- end) + + -- --HMI expectes to receive OnHMIStatus(FULL,NOT_AUDIBLE,MAIN) till APPLINK-15164 is DONE + -- self.mobileSession1:ExpectNotification("OnHMIStatus",{hmiLevel = "FULL", audioStreamingState = "NOT_AUDIBLE", systemContext = "MAIN"}) + -- end + + function Test:CaseActivateVOICECOM_PhoneCallIsOff() + self.hmiConnection:SendNotification("BasicCommunication.OnEventChanged",{isActive= false, eventName="PHONE_CALL"}) + + --Expect notifications on mobile sides + self.mobileSession1:ExpectNotification("OnHMIStatus",{hmiLevel = "LIMITED", audioStreamingState = "AUDIBLE", systemContext = "MAIN"}) + self.mobileSession:ExpectNotification("OnHMIStatus",{hmiLevel = "FULL", audioStreamingState = "AUDIBLE", systemContext = "MAIN"}) + + --NOTE: After APPLINK-15164 is DONE, the expected notification should be like below + --Expect notifications on mobile sides + --self.mobileSession2:ExpectNotification("OnHMIStatus",{hmiLevel = "LIMITED", audioStreamingState = "AUDIBLE", systemContext = "MAIN"}) + --self.mobileSession:ExpectNotification("OnHMIStatus",{hmiLevel = "LIMITED", audioStreamingState = "AUDIBLE", systemContext = "MAIN"}) + end + + +--------------------------------------------------------------------------------------------- +-------------------------------------------Postcondition------------------------------------- +--------------------------------------------------------------------------------------------- + + --Print new line to separate Postconditions + commonFunctions:newTestCasesGroup("Postconditions") + + + --Restore sdl_preloaded_pt.json + policyTable:Restore_preloaded_pt() + + + + return Test diff --git a/test_scripts/API/ATF_OnHMIStatus.lua b/test_scripts/API/ATF_OnHMIStatus.lua new file mode 100644 index 0000000000..1cc149f5eb --- /dev/null +++ b/test_scripts/API/ATF_OnHMIStatus.lua @@ -0,0 +1,2862 @@ +Test = require('user_modules/connecttest_OnHMIStatus') +require('cardinalities') + +require('user_modules/AppTypes') +local mobile_session = require('mobile_session') +local testCasesForPolicyTable = require('user_modules/shared_testcases/testCasesForPolicyTable') + +local MediaApp = false +local NaviComApp = false +local audioState + +---------------------------------------------------------------------------- +--Set audio state according to app type +if + Test.isMediaApplication == true then + MediaApp = true + audioState = "AUDIBLE" +elseif + Test.appHMITypes["COMMUNICATION"] == true or + Test.appHMITypes["NAVIGATION"] == true then + NaviComApp = true + audioState = "AUDIBLE" +else + audioState = "NOT_AUDIBLE" +end +---------------------------------------------------------------------------- + +---------------------------------------------------------------------------- +--Set deactivated notification for app according to app type +local expectedNotification + +if MediaApp or NaviComApp then + expectedNotification = {hmiLevel = "LIMITED", audioStreamingState = "AUDIBLE", systemContext = "MAIN"} +else + expectedNotification = {hmiLevel = "BACKGROUND", audioStreamingState = "NOT_AUDIBLE", systemContext = "MAIN"} +end +---------------------------------------------------------------------------- + + +---------------------------------------------------------------------------- +-- User functions +function DelayedExp(time) + local event = events.Event() + event.matches = function(self, e) return self == e end + EXPECT_EVENT(event, "Delayed event") + :Timeout(time+1000) + RUN_AFTER(function() + RAISE_EVENT(event, event) + end, time) +end + +local function userPrint( color, message) + print ("\27[" .. tostring(color) .. "m " .. tostring(message) .. " \27[0m") +end + +-- Unregistration of one app +local function UnregisterApplication_Success(self, session, appId) + --mobile side: UnregisterAppInterface request + local CorIdUAI = session:SendRPC("UnregisterAppInterface",{}) + + --hmi side: expect OnAppUnregistered notification + EXPECT_HMINOTIFICATION("BasicCommunication.OnAppUnregistered", {appID = appId, unexpectedDisconnect = false}) + + + --mobile side: UnregisterAppInterface response + session:ExpectResponse(CorIdUAI, { success = true, resultCode = "SUCCESS"}) + :Do(function() + session:Stop() + end) +end + +-- Unregistration of two apps +local function UnregisterTwoApplication_Success(self, prefix) + + Test["Postcondition_UnregisterFirstApp_" .. tostring(prefix) ] = function(self) + UnregisterApplication_Success(self,self.mobileSession) + end + + Test["Postcondition_UnregisterSecondApp_" .. tostring(prefix) ] = function(self) + UnregisterApplication_Success(self, self.mobileSession1) + end + +end + +-- Activation of application +function ActivationApp(self, appId) + + --hmi side: sending SDL.ActivateApp request + local RequestId = self.hmiConnection:SendRequest("SDL.ActivateApp", { appID = appId}) + + --hmi side: expect SDL.ActivateApp response + EXPECT_HMIRESPONSE(RequestId) + :Do(function(_,data) + --In case when app is not allowed, it is needed to allow app + if + data.result.isSDLAllowed ~= true then + + --hmi side: sending SDL.GetUserFriendlyMessage request + local RequestId = self.hmiConnection:SendRequest("SDL.GetUserFriendlyMessage", + {language = "EN-US", messageCodes = {"DataConsent"}}) + + --hmi side: expect SDL.GetUserFriendlyMessage response + --TODO: Update after resolving APPLINK-16094 EXPECT_HMIRESPONSE(RequestId,{result = {code = 0, method = "SDL.GetUserFriendlyMessage"}}) + EXPECT_HMIRESPONSE(RequestId) + :Do(function(_,data) + + --hmi side: send request SDL.OnAllowSDLFunctionality + self.hmiConnection:SendNotification("SDL.OnAllowSDLFunctionality", + {allowed = true, source = "GUI", device = {id = config.deviceMAC, name = "127.0.0.1"}}) + + --hmi side: expect BasicCommunication.ActivateApp request + EXPECT_HMICALL("BasicCommunication.ActivateApp") + :Do(function(_,data) + + --hmi side: sending BasicCommunication.ActivateApp response + self.hmiConnection:SendResponse(data.id,"BasicCommunication.ActivateApp", "SUCCESS", {}) + + end) + :Times(2) + end) + else + -- hmi side: expect of absence BasicCommunication.ActivateApp + EXPECT_HMICALL("BasicCommunication.ActivateApp") + :Times(0) + end + end) + + DelayedExp(500) + +end + +-- Registration of application +function RegisterAppInterface_Success(self, session, RAIParameters, RAIParamsToCheck) + + --mobile side: RegisterAppInterface request + local CorIdRAI = session:SendRPC("RegisterAppInterface", RAIParameters) + + + --hmi side: expected BasicCommunication.OnAppRegistered + EXPECT_HMINOTIFICATION("BasicCommunication.OnAppRegistered", RAIParamsToCheck) + :Do(function(_,data) + self.applications[data.params.application.appName] = data.params.application.appID + end) + + --mobile side: RegisterAppInterface response + session:ExpectResponse(CorIdRAI, { success = true, resultCode = "SUCCESS"}) + +end + +-- Sending UI.OnSystemContext from HMI +local function SendOnSystemContext(self, ctx, appIDValue) + if not appIDValue then + self.hmiConnection:SendNotification("UI.OnSystemContext",{ appID = self.applications[config.application2.registerAppInterfaceParams.appName], systemContext = ctx }) + elseif + appIDValue == "empty" then + self.hmiConnection:SendNotification("UI.OnSystemContext",{ systemContext = ctx }) + else + self.hmiConnection:SendNotification("UI.OnSystemContext",{ appID = appIDValue, systemContext = ctx }) + end +end + +-- Update policy +function UpdatePolicy(self, PTName) + + --hmi side: sending SDL.GetURLS request + local RequestIdGetURLS = self.hmiConnection:SendRequest("SDL.GetURLS", { service = 7 }) + + --hmi side: expect SDL.GetURLS response from HMI + EXPECT_HMIRESPONSE(RequestIdGetURLS,{result = {code = 0, method = "SDL.GetURLS", urls = {{url = "http://policies.telematics.ford.com/api/policies"}}}}) + :Do(function(_,data) + --print("SDL.GetURLS response is received") + --hmi side: sending BasicCommunication.OnSystemRequest request to SDL + self.hmiConnection:SendNotification("BasicCommunication.OnSystemRequest", + { + requestType = "PROPRIETARY", + fileName = "filename", + appID = self.applications[config.application2.registerAppInterfaceParams.appName] + } + ) + --mobile side: expect OnSystemRequest notification + EXPECT_NOTIFICATION("OnSystemRequest", { requestType = "PROPRIETARY" }) + :Do(function(_,data) + --print("OnSystemRequest notification is received") + --mobile side: sending SystemRequest request + local CorIdSystemRequest = self.mobileSession:SendRPC("SystemRequest", + { + fileName = "PolicyTableUpdate", + requestType = "PROPRIETARY" + }, + PTName) + + local systemRequestId + --hmi side: expect SystemRequest request + EXPECT_HMICALL("BasicCommunication.SystemRequest") + :Do(function(_,data) + systemRequestId = data.id + --print("BasicCommunication.SystemRequest is received") + + --hmi side: sending BasicCommunication.OnSystemRequest request to SDL + self.hmiConnection:SendNotification("SDL.OnReceivedPolicyUpdate", + { + policyfile = "/tmp/fs/mp/images/ivsu_cache/PolicyTableUpdate" + } + ) + function to_run() + --hmi side: sending SystemRequest response + self.hmiConnection:SendResponse(systemRequestId,"BasicCommunication.SystemRequest", "SUCCESS", {}) + end + + RUN_AFTER(to_run, 500) + end) + + --hmi side: expect SDL.OnStatusUpdate + EXPECT_HMINOTIFICATION("SDL.OnStatusUpdate") + :ValidIf(function(exp,data) + if + exp.occurences == 1 and + data.params.status == "UP_TO_DATE" then + return true + elseif + exp.occurences == 1 and + data.params.status == "UPDATING" then + return true + elseif + exp.occurences == 2 and + data.params.status == "UP_TO_DATE" then + return true + else + if + exp.occurences == 1 then + print ("\27[31m SDL.OnStatusUpdate came with wrong values. Expected in first occurrences status 'UP_TO_DATE' or 'UPDATING', got '" .. tostring(data.params.status) .. "' \27[0m") + elseif exp.occurences == 2 then + print ("\27[31m SDL.OnStatusUpdate came with wrong values. Expected in second occurrences status 'UP_TO_DATE', got '" .. tostring(data.params.status) .. "' \27[0m") + end + return false + end + end) + :Times(Between(1,2)) + + --mobile side: expect SystemRequest response + EXPECT_RESPONSE(CorIdSystemRequest, { success = true, resultCode = "SUCCESS"}) + :Do(function(_,data) + --print("SystemRequest is received") + --hmi side: sending SDL.GetUserFriendlyMessage request to SDL + local RequestIdGetUserFriendlyMessage = self.hmiConnection:SendRequest("SDL.GetUserFriendlyMessage", {language = "EN-US", messageCodes = {"StatusUpToDate"}}) + + --hmi side: expect SDL.GetUserFriendlyMessage response + EXPECT_HMIRESPONSE(RequestIdGetUserFriendlyMessage,{result = {code = 0, method = "SDL.GetUserFriendlyMessage", messages = {{line1 = "Up-To-Date", messageCode = "StatusUpToDate", textBody = "Up-To-Date"}}}}) + end) + + end) + end) + + +end + +--Check pathToSDL, in case last symbol is not'/' add '/' +local function checkSDLPathValue() + findresult = string.find (config.pathToSDL, '.$') + + if string.sub(config.pathToSDL,findresult) ~= "/" then + config.pathToSDL = config.pathToSDL..tostring("/") + end +end + +-- Check direcrory existence +local function Directory_exist(DirectoryPath) + local returnValue + + local Command = assert( io.popen( "[ -d " .. tostring(DirectoryPath) .. " ] && echo \"Exist\" || echo \"NotExist\"" , 'r')) + local CommandResult = tostring(Command:read( '*l' )) + + if + CommandResult == "NotExist" then + returnValue = false + elseif + CommandResult == "Exist" then + returnValue = true + else + userPrint(31," Some unexpected result in Directory_exist function, CommandResult = " .. tostring(CommandResult)) + returnValue = false + end + + return returnValue +end + +-- Stop SDL, delete storage folder, start SDL and HMI +function DeletingDatabase_RestartSDL(prefix, MixingAudioValue) + checkSDLPathValue() + + SDLStoragePath = config.pathToSDL .. "storage/" + + local SDLini = config.pathToSDL .. tostring("smartDeviceLink.ini") + + Test["StopSDL_" .. tostring(prefix)] = function(self) + StopSDL() + end + + Test["Precondition_DeletingDatabase_" .. tostring(prefix)] = function(self) + local ExistResult = Directory_exist( tostring(config.pathToSDL .. "storage")) + if ExistResult == true then + local RmDB = assert( os.execute( "rm -rf " .. tostring(config.pathToSDL .. "storage" ))) + if RmDB ~= true then + userPrint(31,"Storage folder is not deleted") + end + end + DelayedExp(1000) + end + + + Test["StartSDL_" .. tostring(prefix)] = function(self) + StartSDL(config.pathToSDL, config.ExitOnCrash) + DelayedExp(1000) + end + + Test["InitHMI_" .. tostring(prefix)] = function(self) + self:initHMI() + end + + Test["InitHMIonReady_" .. tostring(prefix)] = function(self) + self:initHMI_onReady(MixingAudioValue) + end + + Test["ConnectMobile_" .. tostring(prefix)] = function(self) + self:connectMobile() + end +end + +---------------------------------------------------------------------------- + +function Test:Precondition_UnregisterRegisteredApp() + UnregisterApplication_Success(self, self.mobileSession, self.applications[config.application2.registerAppInterfaceParams.appName]) +end + +-- Remove storage folder, restart SDL +DeletingDatabase_RestartSDL("GeneralPreconditiion", true) + +-- 29[P][MAN]_TC_HMILevel_FULL_activating_app_by_user_via_VR_synonym +--===================================================================================-- +-- HMI level to FULL by dint of activating app by user via VR synonym (from VR menu) and the receiving onHMIStatus notification in mobile application +--===================================================================================-- + +function Test:ActivationApp_viaVR() + userPrint(34, "=================================== Test Case ===================================") + + local RAIParams = config.application1.registerAppInterfaceParams + RAIParams.vrSynonyms = {"ApplicationVrSynonym"} + + self.mobileSession = mobile_session.MobileSession( + self, + self.mobileConnection) + + self.mobileSession:StartService(7) + :Do(function(_,data) + + RegisterAppInterface_Success(self, self.mobileSession, RAIParams, {application = {appName = RAIParams.appName}, vrSynonyms = {"ApplicationVrSynonym"}}) + + EXPECT_NOTIFICATION("OnHMIStatus", + {hmiLevel = "NONE", audioStreamingState = "NOT_AUDIBLE", systemContext = "MAIN"}, + {hmiLevel = "FULL", audioStreamingState = audioState, systemContext = "MAIN"}) + :Do(function(exp,data) + if exp.occurences == 1 then + + -- Openning VR menu + self.hmiConnection:SendNotification("VR.Started",{}) + + SendOnSystemContext(self, "VRSESSION") + + function to_run() + --activate app + ActivationApp(self, self.applications[RAIParams.appName]) + + --Closing VR menu + self.hmiConnection:SendNotification("VR.Stopped",{}) + + SendOnSystemContext(self, "MAIN") + end + + RUN_AFTER(to_run, 1000) + end + end) + :Times(2) + end) + + DelayedExp(1000) + +end + +function Test:Postcondition_UnregisteApp_ActivatedViaVR() + UnregisterApplication_Success(self, self.mobileSession, self.applications[config.application1.registerAppInterfaceParams.appName]) +end + +--[==[ uncomment after resolving APPLINK-18854 +-- 29[P][MAN]_TC_HMILevel_FULL_activating_app_by_user_via_VR_synonym +--===================================================================================-- +-- SDL sets level from FULL/LIMITED to BACKGROUND when receives BC.OnEventChanged (isActive: true, eventName: PHONE_CALL) and the receiving onHMIStatus notification in mobile application +-- SDL restores HMI level to FULL/LIMITED from BACKGROUND when SDL receives BC.OnEventChanged (isActive: false, eventName: PHONE_CALL) and the receiving onHMIStatus notification in mobile application +--===================================================================================-- + +function Test:DeactivationAppDuringPhoneCall_RestoreLevelAfterPhoneCall() + userPrint(34, "=================================== Test Case ===================================") + + local RAIParams = config.application1.registerAppInterfaceParams + + local NaviApp = false + + for i=1,#RAIParams.appHMIType do + if RAIParams.appHMIType[i] == "NAVIGATION" then + NaviApp = true + end + end + + self.mobileSession = mobile_session.MobileSession( + self, + self.mobileConnection) + + self.mobileSession:StartService(7) + :Do(function(_,data) + + RegisterAppInterface_Success(self, self.mobileSession, RAIParams) + + if NaviApp then + EXPECT_NOTIFICATION("OnHMIStatus", + {hmiLevel = "NONE", audioStreamingState = "NOT_AUDIBLE", systemContext = "MAIN"}, + {hmiLevel = "FULL", audioStreamingState = "AUDIBLE", systemContext = "MAIN"}, + {hmiLevel = "LIMITED", audioStreamingState = "NOT_AUDIBLE", systemContext = "MAIN"}, + {hmiLevel = "FULL", audioStreamingState = "AUDIBLE", systemContext = "MAIN"}) + :Do(function(exp,data) + if exp.occurences == 1 then + --activate app + ActivationApp(self, self.applications[RAIParams.appName]) + elseif + exp.occurences == 2 then + -- phone call is active + self.hmiConnection:SendNotification("BasicCommunication.OnEventChanged", + { + eventName = "PHONE_CALL", + isActive = true + }) + self.hmiConnection:SendNotification("BasicCommunication.OnPhoneCall", {isActive = true}) + elseif + exp.occurences == 3 then + -- phone call is not active + self.hmiConnection:SendNotification("BasicCommunication.OnEventChanged", + { + eventName = "PHONE_CALL", + isActive = false + }) + self.hmiConnection:SendNotification("BasicCommunication.OnPhoneCall", {isActive = false}) + end + end) + :Times(4) + else + EXPECT_NOTIFICATION("OnHMIStatus", + {hmiLevel = "NONE", audioStreamingState = "NOT_AUDIBLE", systemContext = "MAIN"}, + {hmiLevel = "FULL", audioStreamingState = audioState, systemContext = "MAIN"}, + {hmiLevel = "BACKGROUND", audioStreamingState = "NOT_AUDIBLE", systemContext = "MAIN"}, + {hmiLevel = "FULL", audioStreamingState = audioState, systemContext = "MAIN"}) + :Do(function(exp,data) + if exp.occurences == 1 then + --activate app + ActivationApp(self, self.applications[RAIParams.appName]) + elseif + exp.occurences == 2 then + -- phone call is active + self.hmiConnection:SendNotification("BasicCommunication.OnEventChanged", + { + eventName = "PHONE_CALL", + isActive = true + }) + elseif + exp.occurences == 3 then + -- phone call is not active + self.hmiConnection:SendNotification("BasicCommunication.OnEventChanged", + { + eventName = "PHONE_CALL", + isActive = false + }) + end + end) + :Times(4) + end + end) + + DelayedExp(1000) + +end + +function Test:Postcondition_UnregisteApp_DeactivationAppDuringPhoneCall_ResporeLevelAfterPhoneCall() + UnregisterApplication_Success(self, self.mobileSession, self.applications[config.application1.registerAppInterfaceParams.appName]) +end + +-- 35[P][MAN]_TC_Change_HMIlevel_ when_SDL_receives_BC.OnPhoneCall +-- 34[P][MAN]_TC_Change_HMIlevel_from_FULL/LIMITED_to_BACKGROUND +--===================================================================================-- +-- Changing HMI level of navifation app FULL, AUDIBLE->LIMITED, NOT_AUDIBLE, of communication app LIMITED, AUDIBLE->BACKGROUND, NOT_AUDIBLE , media app BACKGROUND-> without changes and the receiving onHMIStatus notification in mobile application when SDL receives BC.OnEventChanged (isActive: true, eventName: PHONE_CALL) and BC.OnEventChanged (isActive: false, eventName: PHONE_CALL) +--===================================================================================-- + +function Test:Precondition_RegisterMediaApplication_ChangingLevelDuringPhoneCall() + userPrint(34, "=================================== Test Case ===================================") + self.mobileSession = mobile_session.MobileSession( + self, + self.mobileConnection) + + self.mobileSession:StartService(7) + :Do(function(_,data) + local RAIParams = config.application2.registerAppInterfaceParams + RAIParams.isMediaApplication = true + RAIParams.appHMIType = {"MEDIA"} + + --mobile side: RegisterAppInterface request + local CorIdRAI = self.mobileSession:SendRPC("RegisterAppInterface", RAIParams) + + --hmi side: expected BasicCommunication.OnAppRegistered + EXPECT_HMINOTIFICATION("BasicCommunication.OnAppRegistered") + :Do(function(_,data) + self.applications[data.params.application.appName] = data.params.application.appID + end) + + --mobile side: RegisterAppInterface response + self.mobileSession:ExpectResponse(CorIdRAI, { success = true, resultCode = "SUCCESS"}) + + self.mobileSession:ExpectNotification("OnHMIStatus", + {hmiLevel = "NONE", audioStreamingState = "NOT_AUDIBLE", systemContext = "MAIN"}) + end) +end + +function Test:Precondition_RegisterNavigationApplication_ChangingLevelDuringPhoneCall() + + self.mobileSession1 = mobile_session.MobileSession( + self, + self.mobileConnection) + + self.mobileSession1:StartService(7) + :Do(function(_,data) + local RAIParams = config.application3.registerAppInterfaceParams + RAIParams.isMediaApplication = false + RAIParams.appHMIType = {"NAVIGATION"} + + --mobile side: RegisterAppInterface request + local CorIdRAI = self.mobileSession1:SendRPC("RegisterAppInterface", RAIParams) + + --hmi side: expected BasicCommunication.OnAppRegistered + EXPECT_HMINOTIFICATION("BasicCommunication.OnAppRegistered") + :Do(function(_,data) + self.applications[data.params.application.appName] = data.params.application.appID + end) + + --mobile side: RegisterAppInterface response + self.mobileSession1:ExpectResponse(CorIdRAI, { success = true, resultCode = "SUCCESS"}) + + self.mobileSession1:ExpectNotification("OnHMIStatus", + {hmiLevel = "NONE", audioStreamingState = "NOT_AUDIBLE", systemContext = "MAIN"}) + end) + +end + +function Test:Precondition_RegisterCommunicationApplication_ChangingLevelDuringPhoneCall() + + self.mobileSession2 = mobile_session.MobileSession( + self, + self.mobileConnection) + + self.mobileSession2:StartService(7) + :Do(function(_,data) + local RAIParams = config.application4.registerAppInterfaceParams + RAIParams.isMediaApplication = false + RAIParams.appHMIType = {"COMMUNICATION"} + + --mobile side: RegisterAppInterface request + local CorIdRAI = self.mobileSession2:SendRPC("RegisterAppInterface", RAIParams) + + --hmi side: expected BasicCommunication.OnAppRegistered + EXPECT_HMINOTIFICATION("BasicCommunication.OnAppRegistered") + :Do(function(_,data) + self.applications[data.params.application.appName] = data.params.application.appID + end) + + --mobile side: RegisterAppInterface response + self.mobileSession2:ExpectResponse(CorIdRAI, { success = true, resultCode = "SUCCESS"}) + + self.mobileSession2:ExpectNotification("OnHMIStatus", + {hmiLevel = "NONE", audioStreamingState = "NOT_AUDIBLE", systemContext = "MAIN"}) + end) +end + +function Test:DeactivationAppFromFULLToLIMITED_LIMITEDToBACKGROUND_App_BACKGROUND_StaysWithoutChanges_DuringPhoneCall_RestoreLevelAfterPhoneCall() + + -- Activate media app + ActivationApp(self, self.applications[config.application2.registerAppInterfaceParams.appName]) + + --mobile side: expect OnHMIStatus notification on media app + self.mobileSession:ExpectNotification("OnHMIStatus", + {hmiLevel = "FULL", audioStreamingState = "AUDIBLE", systemContext = "MAIN"}, + {hmiLevel = "LIMITED", audioStreamingState = "AUDIBLE", systemContext = "MAIN"}, + {hmiLevel = "BACKGROUND", audioStreamingState = "NOT_AUDIBLE", systemContext = "MAIN"}) + :Do(function(exp,data) + if exp.occurences == 1 or + exp.occurences == 3 then + -- Activate navigation app + ActivationApp(self, self.applications[config.application3.registerAppInterfaceParams.appName]) + end + end) + :Times(3) + + --mobile side: expect OnHMIStatus notification on navigation app + self.mobileSession1:ExpectNotification("OnHMIStatus", + {hmiLevel = "FULL", audioStreamingState = "AUDIBLE", systemContext = "MAIN"}, + {hmiLevel = "LIMITED", audioStreamingState = "AUDIBLE", systemContext = "MAIN"}, + {hmiLevel = "FULL", audioStreamingState = "AUDIBLE", systemContext = "MAIN"}, + {hmiLevel = "LIMITED", audioStreamingState = "NOT_AUDIBLE", systemContext = "MAIN"}, + {hmiLevel = "FULL", audioStreamingState = "AUDIBLE", systemContext = "MAIN"}) + :Do(function(exp,data) + if exp.occurences == 1 then + -- Activate communication app + ActivationApp(self, self.applications[config.application4.registerAppInterfaceParams.appName]) + elseif + exp.occurences == 3 then + -- phone call is active + self.hmiConnection:SendNotification("BasicCommunication.OnEventChanged", + { + eventName = "PHONE_CALL", + isActive = true + }) + elseif + exp.occurences == 4 then + -- phone call is not active + self.hmiConnection:SendNotification("BasicCommunication.OnEventChanged", + { + eventName = "PHONE_CALL", + isActive = false + }) + end + end) + :Times(5) + + --mobile side: expect OnHMIStatus notification on communication app + self.mobileSession2:ExpectNotification("OnHMIStatus", + {hmiLevel = "FULL", audioStreamingState = "AUDIBLE", systemContext = "MAIN"}, + {hmiLevel = "LIMITED", audioStreamingState = "AUDIBLE", systemContext = "MAIN"}, + {hmiLevel = "BACKGROUND", audioStreamingState = "NOT_AUDIBLE", systemContext = "MAIN"}, + {hmiLevel = "LIMITED", audioStreamingState = "AUDIBLE", systemContext = "MAIN"}) + :Do(function(exp,data) + print (" third session " .. tostring(data.payload.hmiLevel, data.payload.audioStreamingState, data.payload.systemContext ) ) + if exp.occurences == 1 then + -- audio sorce is not active + self.hmiConnection:SendNotification("BasicCommunication.OnEventChanged", + { + eventName = "AUDIO_SOURCE", + isActive = true + }) + end + end) + :Times(4) +end + +function Test:Postcondition_UnregisterMediaApp_ChangingLevelDuringPhoneCall() + UnregisterApplication_Success(self, self.mobileSession, self.applications[config.application2.registerAppInterfaceParams.appName]) +end + +function Test:Postcondition_UnregisterNavigationApp_ChangingLevelDuringPhoneCall() + UnregisterApplication_Success(self, self.mobileSession1, self.applications[config.application3.registerAppInterfaceParams.appName]) +end + +function Test:Postcondition_UnregisterCommunicationApp_ChangingLevelDuringPhoneCall() + UnregisterApplication_Success(self, self.mobileSession2, self.applications[config.application4.registerAppInterfaceParams.appName]) +end + +-- 34[P][MAN]_TC_Change_HMIlevel_from_FULL/LIMITED_to_BACKGROUND +--===================================================================================-- +-- Changing HMI level of navifation app LIMITED, AUDIBLE->LIMITED, NOT_AUDIBLE, of media app FULL, AUDIBLE->BACKGROUND, NOT_AUDIBLE , non-media app BACKGROUND-> without changes and the receiving onHMIStatus notification in mobile application when SDL receives BC.OnEventChanged (isActive: true, eventName: PHONE_CALL) and BC.OnEventChanged (isActive: false, eventName: PHONE_CALL) +--===================================================================================-- + +function Test:Precondition_RegisterMediaApplication_ChangingLevelDuringPhoneCall_2() + userPrint(34, "=================================== Test Case ===================================") + self.mobileSession = mobile_session.MobileSession( + self, + self.mobileConnection) + + self.mobileSession:StartService(7) + :Do(function(_,data) + local RAIParams = config.application2.registerAppInterfaceParams + RAIParams.isMediaApplication = true + RAIParams.appHMIType = {"MEDIA"} + + --mobile side: RegisterAppInterface request + local CorIdRAI = self.mobileSession:SendRPC("RegisterAppInterface", RAIParams) + + --hmi side: expected BasicCommunication.OnAppRegistered + EXPECT_HMINOTIFICATION("BasicCommunication.OnAppRegistered") + :Do(function(_,data) + self.applications[data.params.application.appName] = data.params.application.appID + end) + + --mobile side: RegisterAppInterface response + self.mobileSession:ExpectResponse(CorIdRAI, { success = true, resultCode = "SUCCESS"}) + + self.mobileSession:ExpectNotification("OnHMIStatus", + {hmiLevel = "NONE", audioStreamingState = "NOT_AUDIBLE", systemContext = "MAIN"}) + end) +end + +function Test:Precondition_RegisterNavigationApplication_ChangingLevelDuringPhoneCall_2() + + self.mobileSession1 = mobile_session.MobileSession( + self, + self.mobileConnection) + + self.mobileSession1:StartService(7) + :Do(function(_,data) + local RAIParams = config.application3.registerAppInterfaceParams + RAIParams.isMediaApplication = false + RAIParams.appHMIType = {"NAVIGATION"} + + --mobile side: RegisterAppInterface request + local CorIdRAI = self.mobileSession1:SendRPC("RegisterAppInterface", RAIParams) + + --hmi side: expected BasicCommunication.OnAppRegistered + EXPECT_HMINOTIFICATION("BasicCommunication.OnAppRegistered") + :Do(function(_,data) + self.applications[data.params.application.appName] = data.params.application.appID + end) + + --mobile side: RegisterAppInterface response + self.mobileSession1:ExpectResponse(CorIdRAI, { success = true, resultCode = "SUCCESS"}) + + self.mobileSession1:ExpectNotification("OnHMIStatus", + {hmiLevel = "NONE", audioStreamingState = "NOT_AUDIBLE", systemContext = "MAIN"}) + end) + +end + +function Test:Precondition_RegisterNonMediaApplication_ChangingLevelDuringPhoneCall() + + self.mobileSession2 = mobile_session.MobileSession( + self, + self.mobileConnection) + + self.mobileSession2:StartService(7) + :Do(function(_,data) + local RAIParams = config.application4.registerAppInterfaceParams + RAIParams.isMediaApplication = false + RAIParams.appHMIType = {"DEFAULT"} + + --mobile side: RegisterAppInterface request + local CorIdRAI = self.mobileSession2:SendRPC("RegisterAppInterface", RAIParams) + + --hmi side: expected BasicCommunication.OnAppRegistered + EXPECT_HMINOTIFICATION("BasicCommunication.OnAppRegistered") + :Do(function(_,data) + self.applications[data.params.application.appName] = data.params.application.appID + end) + + --mobile side: RegisterAppInterface response + self.mobileSession2:ExpectResponse(CorIdRAI, { success = true, resultCode = "SUCCESS"}) + + self.mobileSession2:ExpectNotification("OnHMIStatus", + {hmiLevel = "NONE", audioStreamingState = "NOT_AUDIBLE", systemContext = "MAIN"}) + end) +end + +function Test:DeactivationAppFromFULLToBACKGROUND_LIMITEDToNOT_AUDIBLE_App_BACKGROUND_StaysWithoutChanges_DuringPhoneCall_RestoreLevelAfterPhoneCall() + + -- Activate non-media app + ActivationApp(self, self.applications[config.application4.registerAppInterfaceParams.appName]) + + --mobile side: expect OnHMIStatus notification on non-media app + self.mobileSession2:ExpectNotification("OnHMIStatus", + {hmiLevel = "FULL", audioStreamingState = "AUDIBLE", systemContext = "MAIN"}, + {hmiLevel = "BACKGROUND", audioStreamingState = "NOT_AUDIBLE", systemContext = "MAIN"}) + :Do(function(exp,data) + if exp.occurences == 1 then + -- Activate navigation app + ActivationApp(self, self.applications[config.application3.registerAppInterfaceParams.appName]) + end + end) + :Times(2) + + --mobile side: expect OnHMIStatus notification on navigation app + self.mobileSession1:ExpectNotification("OnHMIStatus", + {hmiLevel = "FULL", audioStreamingState = "AUDIBLE", systemContext = "MAIN"}, + {hmiLevel = "LIMITED", audioStreamingState = "AUDIBLE", systemContext = "MAIN"}, + {hmiLevel = "LIMITED", audioStreamingState = "NOT_AUDIBLE", systemContext = "MAIN"}, + {hmiLevel = "LIMITED", audioStreamingState = "AUDIBLE", systemContext = "MAIN"}) + :Do(function(exp,data) + if exp.occurences == 1 then + -- Activate media app + ActivationApp(self, self.applications[config.application2.registerAppInterfaceParams.appName]) + end + end) + :Times(4) + + --mobile side: expect OnHMIStatus notification on non-media app + self.mobileSession:ExpectNotification("OnHMIStatus", + {hmiLevel = "FULL", audioStreamingState = "AUDIBLE", systemContext = "MAIN"}, + {hmiLevel = "BACKGROUND", audioStreamingState = "NOT_AUDIBLE", systemContext = "MAIN"}, + {hmiLevel = "FULL", audioStreamingState = "AUDIBLE", systemContext = "MAIN"}) + :Do(function(exp,data) + if exp.occurences == 1 then + -- phone call is active + self.hmiConnection:SendNotification("BasicCommunication.OnEventChanged", + { + eventName = "PHONE_CALL", + isActive = true + }) + elseif + exp.occurences == 2 then + -- phone call is not active + self.hmiConnection:SendNotification("BasicCommunication.OnEventChanged", + { + eventName = "PHONE_CALL", + isActive = false + }) + end + end) + :Times(3) +end + +function Test:Postcondition_UnregisterMediaApp_ChangingLevelDuringPhoneCall_2() + UnregisterApplication_Success(self, self.mobileSession, self.applications[config.application2.registerAppInterfaceParams.appName]) +end + +function Test:Postcondition_UnregisterNavigationApp_ChangingLevelDuringPhoneCall_2() + UnregisterApplication_Success(self, self.mobileSession1, self.applications[config.application3.registerAppInterfaceParams.appName]) +end + +function Test:Postcondition_UnregisterNonMediaApp_ChangingLevelDuringPhoneCall() + UnregisterApplication_Success(self, self.mobileSession2, self.applications[config.application4.registerAppInterfaceParams.appName]) +end +]==] + +-- 30[P][MAN]_TC_Change_HMIlevel_from_FULL_to_LIMITED +--===================================================================================-- +-- Changing HMI level from FULL to LIMITED (BACKGROUND for non-media app) when user switches to any non-media SDL app and the receiving onHMIStatus notification in mobile application. +--===================================================================================-- + +function Test:Precondition_RegisterActivateApp_ChangingHMILevel_ByAcvivationNonMedia() + userPrint(34, "=================================== Test Case ===================================") + local RAIParams = config.application1.registerAppInterfaceParams + + self.mobileSession = mobile_session.MobileSession( + self, + self.mobileConnection) + + self.mobileSession:StartService(7) + :Do(function(_,data) + + RegisterAppInterface_Success(self, self.mobileSession, RAIParams) + + function to_run() + ActivationApp(self, self.applications[config.application1.registerAppInterfaceParams.appName]) + end + + RUN_AFTER(to_run, 500) + + EXPECT_NOTIFICATION("OnHMIStatus", + {hmiLevel = "NONE", audioStreamingState = "NOT_AUDIBLE", systemContext = "MAIN"}, + {hmiLevel = "FULL", audioStreamingState = audioState , systemContext = "MAIN"}) + :Times(2) + end) + + DelayedExp(1000) + +end + +function Test:ChangingHMILevel_ByAcvivationNonMedia() + self.mobileSession1 = mobile_session.MobileSession( + self, + self.mobileConnection) + + local RAIParams = config.application2.registerAppInterfaceParams + RAIParams.isMediaApplication = false + RAIParams.appHMIType = {"DEFAULT"} + + self.mobileSession1:StartService(7) + :Do(function(_,data) + RegisterAppInterface_Success(self, self.mobileSession1, RAIParams) + + self.mobileSession1:ExpectNotification("OnHMIStatus", + {hmiLevel = "NONE", audioStreamingState = "NOT_AUDIBLE", systemContext = "MAIN"}, + {hmiLevel = "FULL", audioStreamingState = "NOT_AUDIBLE", systemContext = "MAIN"}) + :Times(2) + :Do(function(exp,data) + if exp.occurences == 1 then + -- Openning VR menu + self.hmiConnection:SendNotification("VR.Started",{}) + + SendOnSystemContext(self, "VRSESSION") + end + end) + + if MediaApp or NaviComApp then + + EXPECT_NOTIFICATION("OnHMIStatus", + {hmiLevel = "FULL", audioStreamingState = "NOT_AUDIBLE", systemContext = "MAIN"}, + {hmiLevel = "FULL", audioStreamingState = "NOT_AUDIBLE", systemContext = "VRSESSION"}, + {hmiLevel = "FULL", audioStreamingState = "AUDIBLE", systemContext = "VRSESSION"}, + {hmiLevel = "FULL", audioStreamingState = "AUDIBLE", systemContext = "MAIN"}, + expectedNotification) + :Do(function(exp,data) + if exp.occurences == 2 then + + --Closing VR menu + self.hmiConnection:SendNotification("VR.Stopped",{}) + + SendOnSystemContext(self, "MAIN") + + --activate app + ActivationApp(self, self.applications[RAIParams.appName]) + + end + end) + :Times(5) + else + + EXPECT_NOTIFICATION("OnHMIStatus", + {hmiLevel = "FULL", audioStreamingState = "NOT_AUDIBLE", systemContext = "VRSESSION"}, + {hmiLevel = "FULL", audioStreamingState = "NOT_AUDIBLE", systemContext = "MAIN"}, + expectedNotification) + :Do(function(exp,data) + if exp.occurences == 1 then + + --Closing VR menu + self.hmiConnection:SendNotification("VR.Stopped",{}) + + SendOnSystemContext(self, "MAIN") + + --activate app + ActivationApp(self, self.applications[RAIParams.appName]) + + end + end) + :Times(3) + end + + DelayedExp(1000) + + end) +end + +UnregisterTwoApplication_Success(self, "ChangingHMILevel_ByAcvivationNonMedia") + +--33[P][MAN]_TC_Change_HMIlevel_from_FULL_to_BACKGROUND +--===================================================================================-- +-- Changing HMI level from FULL to BACKGROUND when user activates other SDL media app and the receiving onHMIStatus notification in mobile application. +--===================================================================================-- + +function Test:Precondition_RegisterActivateApp_ChangingHMILevel_ByAcvivationMedia() + userPrint(34, "=================================== Test Case ===================================") + local RAIParams = config.application1.registerAppInterfaceParams + + self.mobileSession = mobile_session.MobileSession( + self, + self.mobileConnection) + + self.mobileSession:StartService(7) + :Do(function(_,data) + + RegisterAppInterface_Success(self, self.mobileSession, RAIParams) + + function to_run() + ActivationApp(self, self.applications[config.application1.registerAppInterfaceParams.appName]) + end + + RUN_AFTER(to_run, 500) + + EXPECT_NOTIFICATION("OnHMIStatus", + {hmiLevel = "NONE", audioStreamingState = "NOT_AUDIBLE", systemContext = "MAIN"}, + {hmiLevel = "FULL", audioStreamingState = audioState , systemContext = "MAIN"}) + :Times(2) + + end) + + DelayedExp(1000) + +end + +function Test:ChangingHMILevel_ByAcvivationMedia() + self.mobileSession1 = mobile_session.MobileSession( + self, + self.mobileConnection) + + local RAIParams = config.application2.registerAppInterfaceParams + RAIParams.isMediaApplication = true + RAIParams.appHMIType = {"DEFAULT"} + + self.mobileSession1:StartService(7) + :Do(function(_,data) + RegisterAppInterface_Success(self, self.mobileSession1, RAIParams) + + self.mobileSession1:ExpectNotification("OnHMIStatus", + {hmiLevel = "NONE", audioStreamingState = "NOT_AUDIBLE", systemContext = "MAIN"}, + {hmiLevel = "FULL", audioStreamingState = "AUDIBLE", systemContext = "MAIN"}) + :Times(2) + :Do(function(exp,data) + if exp.occurences == 1 then + -- Openning VR menu + self.hmiConnection:SendNotification("VR.Started",{}) + + SendOnSystemContext(self, "VRSESSION") + end + end) + + if MediaApp then + EXPECT_NOTIFICATION("OnHMIStatus", + {hmiLevel = "FULL", audioStreamingState = "NOT_AUDIBLE", systemContext = "MAIN"}, + {hmiLevel = "FULL", audioStreamingState = "NOT_AUDIBLE", systemContext = "VRSESSION"}, + {hmiLevel = "BACKGROUND", audioStreamingState = "NOT_AUDIBLE", systemContext = "MAIN"}) + :Do(function(exp,data) + if exp.occurences == 2 then + --activate app + ActivationApp(self, self.applications[RAIParams.appName]) + + --Closing VR menu + self.hmiConnection:SendNotification("VR.Stopped",{}) + + SendOnSystemContext(self, "MAIN") + + end + end) + :Times(3) + elseif NaviComApp then + EXPECT_NOTIFICATION("OnHMIStatus", + {hmiLevel = "FULL", audioStreamingState = "NOT_AUDIBLE", systemContext = "MAIN"}, + {hmiLevel = "FULL", audioStreamingState = "NOT_AUDIBLE", systemContext = "VRSESSION"}, + {hmiLevel = "LIMITED", audioStreamingState = "NOT_AUDIBLE", systemContext = "MAIN"}, + {hmiLevel = "LIMITED", audioStreamingState = "AUDIBLE", systemContext = "MAIN"}) + :Do(function(exp,data) + if exp.occurences == 2 then + --activate app + ActivationApp(self, self.applications[RAIParams.appName]) + + --Closing VR menu + self.hmiConnection:SendNotification("VR.Stopped",{}) + + SendOnSystemContext(self, "MAIN") + + end + end) + :Times(3) + else + EXPECT_NOTIFICATION("OnHMIStatus", + {hmiLevel = "FULL", audioStreamingState = "NOT_AUDIBLE", systemContext = "VRSESSION"}, + {hmiLevel = "BACKGROUND", audioStreamingState = "NOT_AUDIBLE", systemContext = "MAIN"}) + :Do(function(exp,data) + if exp.occurences == 1 then + --activate app + ActivationApp(self, self.applications[RAIParams.appName]) + + --Closing VR menu + self.hmiConnection:SendNotification("VR.Stopped",{}) + + SendOnSystemContext(self, "MAIN") + end + end) + :Times(2) + end + + DelayedExp(1000) + end) +end + +UnregisterTwoApplication_Success(self, "ChangingHMILevel_ByAcvivationMedia") + +--31[P][MAN]_TC_Change_HMIlevel_from_LIMITED_to_BACKGROUND +--===================================================================================-- +-- Returning the app from HMI Level LIMITED (BACKGROUND for non-media app) to FULL when +-- selects an app in applicaton menu or via VR command and the receiving onHMIStatus notification in mobile application. +--===================================================================================-- + +if MediaApp or NaviComApp then + + function Test:Precondition_RegisterActivateApp_DeactivationAppFromLimitedToBackground_ByAcvivationMedia() + userPrint(34, "=================================== Test Case ===================================") + local RAIParams = config.application1.registerAppInterfaceParams + + self.mobileSession = mobile_session.MobileSession( + self, + self.mobileConnection) + + self.mobileSession:StartService(7) + :Do(function(_,data) + + RegisterAppInterface_Success(self, self.mobileSession, RAIParams) + + function to_run() + ActivationApp(self, self.applications[config.application1.registerAppInterfaceParams.appName]) + end + + RUN_AFTER(to_run, 500) + + EXPECT_NOTIFICATION("OnHMIStatus", + {hmiLevel = "NONE", audioStreamingState = "NOT_AUDIBLE", systemContext = "MAIN"}, + {hmiLevel = "FULL", audioStreamingState = "AUDIBLE" , systemContext = "MAIN"}, + {hmiLevel = "LIMITED", audioStreamingState = "AUDIBLE" , systemContext = "MAIN"}) + :Times(3) + :Do(function(exp,data) + if exp.occurences == 2 then + self.hmiConnection:SendNotification("BasicCommunication.OnAppDeactivated", + { + appID = self.applications[RAIParams.appName], + }) + end + end) + end) + + DelayedExp(1000) + + end + + function Test:DeactivationAppFromLimitedToBackground_ByAcvivationMedia() + self.mobileSession1 = mobile_session.MobileSession( + self, + self.mobileConnection) + + local RAIParams = config.application2.registerAppInterfaceParams + RAIParams.isMediaApplication = true + RAIParams.appHMIType = {"DEFAULT"} + + self.mobileSession1:StartService(7) + :Do(function(_,data) + RegisterAppInterface_Success(self, self.mobileSession1, RAIParams) + + self.mobileSession1:ExpectNotification("OnHMIStatus", + {hmiLevel = "NONE", audioStreamingState = "NOT_AUDIBLE", systemContext = "MAIN"}, + {hmiLevel = "FULL", audioStreamingState = "AUDIBLE", systemContext = "MAIN"}) + :Times(2) + :Do(function(exp,data) + if exp.occurences == 1 then + -- Openning VR menu + self.hmiConnection:SendNotification("VR.Started",{}) + + SendOnSystemContext(self, "VRSESSION") + end + end) + + if MediaApp then + EXPECT_NOTIFICATION("OnHMIStatus", + {hmiLevel = "LIMITED", audioStreamingState = "NOT_AUDIBLE", systemContext = "MAIN"}, + {hmiLevel = "BACKGROUND", audioStreamingState = "NOT_AUDIBLE", systemContext = "MAIN"}) + :Do(function(exp,data) + if exp.occurences == 1 then + --activate app + ActivationApp(self, self.applications[RAIParams.appName]) + + --Closing VR menu + self.hmiConnection:SendNotification("VR.Stopped",{}) + + SendOnSystemContext(self, "MAIN") + + self.hmiConnection:SendNotification("BasicCommunication.OnAppDeactivated", + { + appID = self.applications[config.application1.registerAppInterfaceParams.appName] + }) + end + end) + :Times(2) + else + EXPECT_NOTIFICATION("OnHMIStatus", + {hmiLevel = "LIMITED", audioStreamingState = "NOT_AUDIBLE", systemContext = "MAIN"}, + {hmiLevel = "LIMITED", audioStreamingState = "AUDIBLE", systemContext = "MAIN"}) + :Do(function(exp,data) + if exp.occurences == 1 then + --activate app + ActivationApp(self, self.applications[RAIParams.appName]) + + --Closing VR menu + self.hmiConnection:SendNotification("VR.Stopped",{}) + + SendOnSystemContext(self, "MAIN") + + self.hmiConnection:SendNotification("BasicCommunication.OnAppDeactivated", + { + appID = self.applications[config.application1.registerAppInterfaceParams.appName] + }) + end + end) + :Times(2) + end + + end) + + DelayedExp(1000) + end + + UnregisterTwoApplication_Success(self, "DeactivationAppFromLimitedToBackground_ByAcvivationMedia") + +end + +-- 32[P][MAN]_TC_Change_HMIlevel_from_LIMITED/BACKGROUND_to_FULL +-- 36[P][MAN]_TC_LIMITED_HMI_level_to_media_application +--===================================================================================-- +-- Returning the app from HMI Level LIMITED (BACKGROUND for non-media app) to FULL when +-- selects an app in applicaton menu or via VR command and the receiving onHMIStatus notification in mobile application. +--===================================================================================-- + + + +function Test:Precondition_RegisterActivateDeactivateApp() + userPrint(34, "=================================== Test Case ===================================") + + local RAIParams = config.application1.registerAppInterfaceParams + + self.mobileSession = mobile_session.MobileSession( + self, + self.mobileConnection) + + self.mobileSession:StartService(7) + :Do(function() + RegisterAppInterface_Success(self, self.mobileSession, RAIParams) + + EXPECT_NOTIFICATION("OnHMIStatus", + {hmiLevel = "NONE", audioStreamingState = "NOT_AUDIBLE", systemContext = "MAIN"}, + {hmiLevel = "FULL", audioStreamingState = audioState , systemContext = "MAIN"}, + expectedNotification) + :Times(3) + :Do(function(exp,data) + if + exp.occurences == 1 then + ActivationApp(self, self.applications[config.application1.registerAppInterfaceParams.appName]) + elseif + exp.occurences == 2 then + self.hmiConnection:SendNotification("BasicCommunication.OnAppDeactivated", + { + appID = self.applications[RAIParams.appName] + }) + end + end) + end) +end + +function Test:ActivateDeactivatedAppToFULL() + ActivationApp(self, self.applications[config.application1.registerAppInterfaceParams.appName]) + + EXPECT_NOTIFICATION("OnHMIStatus", + {hmiLevel = "FULL", audioStreamingState = audioState, systemContext = "MAIN"}) +end + +function Test:Precondition_DeactivateActivatedApp() + self.hmiConnection:SendNotification("BasicCommunication.OnAppDeactivated", + { + appID = self.applications[config.application1.registerAppInterfaceParams.appName] + }) + + EXPECT_NOTIFICATION("OnHMIStatus", expectedNotification ) + +end + +function Test:ActivateDeactivatedAppToFULL_ByVR() + + -- Openning VR menu + self.hmiConnection:SendNotification("VR.Started",{}) + + SendOnSystemContext(self, "VRSESSION") + + ActivationApp(self, self.applications[config.application1.registerAppInterfaceParams.appName]) + + --Closing VR menu + self.hmiConnection:SendNotification("VR.Stopped",{}) + + SendOnSystemContext(self, "MAIN") + + if MediaApp or NaviComApp then + + EXPECT_NOTIFICATION("OnHMIStatus", + {hmiLevel = "LIMITED", audioStreamingState = "NOT_AUDIBLE", systemContext = "MAIN"}, + {hmiLevel = "FULL", audioStreamingState = "AUDIBLE", systemContext = "MAIN"}) + :Times(2) + else + EXPECT_NOTIFICATION("OnHMIStatus", + {hmiLevel = "FULL", audioStreamingState = "NOT_AUDIBLE", systemContext = "MAIN"}) + end + + +end + +function Test:Postcondition_UnregisterRegisteredApp() + UnregisterApplication_Success(self, self.mobileSession, self.applications[config.application1.registerAppInterfaceParams.appName]) +end + +-- 37[P][MAN]_TC_LIMITED_and_MEDIA_media/NAVIGATION_non-media/COMMUNICATION_non-media +--===================================================================================-- +-- SDL support the apps of the following AppHMIType to be in LIMITED at one and the same time: MEDIA media, NAVIGATION non-media, COMMUNICATION non-media +--===================================================================================-- + +function Test:Precondition_RegisterMediaApplication() + userPrint(34, "=================================== Test Case ===================================") + self.mobileSession = mobile_session.MobileSession( + self, + self.mobileConnection) + + self.mobileSession:StartService(7) + :Do(function(_,data) + local RAIParams = config.application2.registerAppInterfaceParams + RAIParams.isMediaApplication = true + RAIParams.appHMIType = {"MEDIA"} + + --mobile side: RegisterAppInterface request + local CorIdRAI = self.mobileSession:SendRPC("RegisterAppInterface", RAIParams) + + --hmi side: expected BasicCommunication.OnAppRegistered + EXPECT_HMINOTIFICATION("BasicCommunication.OnAppRegistered") + :Do(function(_,data) + self.applications[data.params.application.appName] = data.params.application.appID + end) + + --mobile side: RegisterAppInterface response + self.mobileSession:ExpectResponse(CorIdRAI, { success = true, resultCode = "SUCCESS"}) + + self.mobileSession:ExpectNotification("OnHMIStatus", + {hmiLevel = "NONE", audioStreamingState = "NOT_AUDIBLE", systemContext = "MAIN"}) + end) +end + +function Test:Precondition_RegisterNavigationApplication() + + self.mobileSession1 = mobile_session.MobileSession( + self, + self.mobileConnection) + + self.mobileSession1:StartService(7) + :Do(function(_,data) + local RAIParams = config.application3.registerAppInterfaceParams + RAIParams.isMediaApplication = false + RAIParams.appHMIType = {"NAVIGATION"} + + --mobile side: RegisterAppInterface request + local CorIdRAI = self.mobileSession1:SendRPC("RegisterAppInterface", RAIParams) + + --hmi side: expected BasicCommunication.OnAppRegistered + EXPECT_HMINOTIFICATION("BasicCommunication.OnAppRegistered") + :Do(function(_,data) + self.applications[data.params.application.appName] = data.params.application.appID + end) + + --mobile side: RegisterAppInterface response + self.mobileSession1:ExpectResponse(CorIdRAI, { success = true, resultCode = "SUCCESS"}) + + self.mobileSession1:ExpectNotification("OnHMIStatus", + {hmiLevel = "NONE", audioStreamingState = "NOT_AUDIBLE", systemContext = "MAIN"}) + end) + +end + +function Test:Precondition_RegisterCommunicationApplication() + + self.mobileSession2 = mobile_session.MobileSession( + self, + self.mobileConnection) + + self.mobileSession2:StartService(7) + :Do(function(_,data) + local RAIParams = config.application4.registerAppInterfaceParams + RAIParams.isMediaApplication = false + RAIParams.appHMIType = {"COMMUNICATION"} + + --mobile side: RegisterAppInterface request + local CorIdRAI = self.mobileSession2:SendRPC("RegisterAppInterface", RAIParams) + + --hmi side: expected BasicCommunication.OnAppRegistered + EXPECT_HMINOTIFICATION("BasicCommunication.OnAppRegistered") + :Do(function(_,data) + self.applications[data.params.application.appName] = data.params.application.appID + end) + + --mobile side: RegisterAppInterface response + self.mobileSession2:ExpectResponse(CorIdRAI, { success = true, resultCode = "SUCCESS"}) + + self.mobileSession2:ExpectNotification("OnHMIStatus", + {hmiLevel = "NONE", audioStreamingState = "NOT_AUDIBLE", systemContext = "MAIN"}) + end) +end + +function Test:SDLallows_MediaFULL_NavigationLIMITED_CommunicationLIMITED() + + -- Activate media app + ActivationApp(self, self.applications[config.application2.registerAppInterfaceParams.appName]) + + --mobile side: expect OnHMIStatus notification on media app + self.mobileSession:ExpectNotification("OnHMIStatus", + {hmiLevel = "FULL", audioStreamingState = "AUDIBLE", systemContext = "MAIN"}, + {hmiLevel = "LIMITED", audioStreamingState = "AUDIBLE", systemContext = "MAIN"}, + {hmiLevel = "BACKGROUND", audioStreamingState = "NOT_AUDIBLE", systemContext = "MAIN"}) + :Do(function(exp,data) + if exp.occurences == 1 then + -- Activate navigation app + ActivationApp(self, self.applications[config.application3.registerAppInterfaceParams.appName]) + end + end) + :Times(3) + + --mobile side: expect OnHMIStatus notification on navigation app + self.mobileSession1:ExpectNotification("OnHMIStatus", + {hmiLevel = "FULL", audioStreamingState = "AUDIBLE", systemContext = "MAIN"}, + {hmiLevel = "LIMITED", audioStreamingState = "AUDIBLE", systemContext = "MAIN"}) + :Do(function(exp,data) + if exp.occurences == 1 then + -- Activate communication app + ActivationApp(self, self.applications[config.application4.registerAppInterfaceParams.appName]) + end + end) + :Times(2) + + --mobile side: expect OnHMIStatus notification on communication app + self.mobileSession2:ExpectNotification("OnHMIStatus", + {hmiLevel = "FULL", audioStreamingState = "AUDIBLE", systemContext = "MAIN"}, + {hmiLevel = "LIMITED", audioStreamingState = "AUDIBLE", systemContext = "MAIN"}) + :Do(function(exp,data) + if exp.occurences == 1 then + -- audio sorce is not active + self.hmiConnection:SendNotification("BasicCommunication.OnEventChanged", + { + eventName = "AUDIO_SOURCE", + isActive = true + }) + end + end) + :Times(2) +end + +function Test:Postcondition_UnregisterMediaApp() + UnregisterApplication_Success(self, self.mobileSession, self.applications[config.application2.registerAppInterfaceParams.appName]) +end + +function Test:Postcondition_UnregisterNavigationApp() + UnregisterApplication_Success(self, self.mobileSession1, self.applications[config.application3.registerAppInterfaceParams.appName]) +end + +function Test:Postcondition_UnregisterCommunicationApp() + UnregisterApplication_Success(self, self.mobileSession2, self.applications[config.application4.registerAppInterfaceParams.appName]) +end + +-- 38[P][MAN]_TC_Only_one_level_FULL_or_LIMITED_is_allowed +--===================================================================================-- +-- SDL allow only one level: either FULL or LIMITED at the given moment of time for two apps of one and the same AppHMIType (MEDIA, media). +--===================================================================================-- + +function Test:Precondition_RegisterActivateMEDIAApp() + userPrint(34, "=================================== Test Case ===================================") + local RAIParams = config.application2.registerAppInterfaceParams + RAIParams.isMediaApplication = true + RAIParams.appHMIType = {"MEDIA"} + + self.mobileSession = mobile_session.MobileSession( + self, + self.mobileConnection) + + self.mobileSession:StartService(7) + :Do(function(_,data) + + RegisterAppInterface_Success(self, self.mobileSession, RAIParams) + + EXPECT_NOTIFICATION("OnHMIStatus", + {hmiLevel = "NONE", audioStreamingState = "NOT_AUDIBLE", systemContext = "MAIN"}, + {hmiLevel = "FULL", audioStreamingState = "AUDIBLE" , systemContext = "MAIN"}) + :Times(2) + :Do(function(exp,data) + if exp.occurences == 1 then + ActivationApp(self, self.applications[config.application2.registerAppInterfaceParams.appName]) + end + end) + end) + +end + +function Test:SDLSets_MEDIAApp_ToBACKGROUND_ByAcvivationAnotherMEDIA() + self.mobileSession1 = mobile_session.MobileSession( + self, + self.mobileConnection) + + local RAIParams = config.application3.registerAppInterfaceParams + RAIParams.isMediaApplication = true + RAIParams.appHMIType = {"MEDIA"} + + self.mobileSession1:StartService(7) + :Do(function(_,data) + RegisterAppInterface_Success(self, self.mobileSession1, RAIParams) + + self.mobileSession1:ExpectNotification("OnHMIStatus", + {hmiLevel = "NONE", audioStreamingState = "NOT_AUDIBLE", systemContext = "MAIN"}, + {hmiLevel = "FULL", audioStreamingState = "AUDIBLE", systemContext = "MAIN"}) + :Times(2) + :Do(function(exp,data) + if exp.occurences == 1 then + --activate registered not activated app + ActivationApp(self, self.applications[RAIParams.appName]) + + end + end) + + + EXPECT_NOTIFICATION("OnHMIStatus", + {hmiLevel = "BACKGROUND", audioStreamingState = "NOT_AUDIBLE", systemContext = "MAIN"}) + + DelayedExp(1000) + + end) +end + +UnregisterTwoApplication_Success(self, "SDLSetsMEDIAAppToBACKGROUND_ByAcvivationAnotherMEDIA") + +-- 39[P][MAN]_TC_Only_one_level_FULL_or_BACKGROUND_is_allowed +--===================================================================================-- +-- SDL allow only one level: either FULL or BACKGROUND at the given moment of time for two apps of one and the same AppHMIType (NAVIGATION non-media) +--===================================================================================-- + +function Test:Precondition_RegisterActivateNAVIGATIONApp() + userPrint(34, "=================================== Test Case ===================================") + local RAIParams = config.application2.registerAppInterfaceParams + RAIParams.isMediaApplication = false + RAIParams.appHMIType = {"NAVIGATION"} + + self.mobileSession = mobile_session.MobileSession( + self, + self.mobileConnection) + + self.mobileSession:StartService(7) + :Do(function(_,data) + + RegisterAppInterface_Success(self, self.mobileSession, RAIParams) + + EXPECT_NOTIFICATION("OnHMIStatus", + {hmiLevel = "NONE", audioStreamingState = "NOT_AUDIBLE", systemContext = "MAIN"}, + {hmiLevel = "FULL", audioStreamingState = "AUDIBLE" , systemContext = "MAIN"}) + :Times(2) + :Do(function(exp,data) + if exp.occurences == 1 then + ActivationApp(self, self.applications[config.application2.registerAppInterfaceParams.appName]) + end + end) + end) + +end + +function Test:SDLSets_NAVIGATIONApp_ToBACKGROUND_ByAcvivationAnotherNAVIGATION() + + self.mobileSession1 = mobile_session.MobileSession( + self, + self.mobileConnection) + + local RAIParams = config.application3.registerAppInterfaceParams + RAIParams.isMediaApplication = false + RAIParams.appHMIType = {"NAVIGATION"} + + self.mobileSession1:StartService(7) + :Do(function(_,data) + RegisterAppInterface_Success(self, self.mobileSession1, RAIParams) + + self.mobileSession1:ExpectNotification("OnHMIStatus", + {hmiLevel = "NONE", audioStreamingState = "NOT_AUDIBLE", systemContext = "MAIN"}, + {hmiLevel = "FULL", audioStreamingState = "AUDIBLE", systemContext = "MAIN"}) + :Times(2) + :Do(function(exp,data) + if exp.occurences == 1 then + --activate registered not activated app + ActivationApp(self, self.applications[RAIParams.appName]) + + end + end) + + + EXPECT_NOTIFICATION("OnHMIStatus", + {hmiLevel = "BACKGROUND", audioStreamingState = "NOT_AUDIBLE", systemContext = "MAIN"}) + + DelayedExp(1000) + + end) +end + +UnregisterTwoApplication_Success(self, "DeactivationNAVIGATIONApp_ByAcvivationAnotherNAVIGATION") + + +-- 41[P][MAN]_TC_Only_one_level_FULL_or_LIMITED_for_COMMUNICATION_app +--===================================================================================-- +-- SDL allow only one level: either FULL or LIMITED at the given moment of time for two apps of one and the same AppHMIType (COMMUNICATION, non-media). +--===================================================================================-- + +function Test:Precondition_RegisterActivateCOMMUNICATIONApp() + userPrint(34, "=================================== Test Case ===================================") + local RAIParams = config.application2.registerAppInterfaceParams + RAIParams.isMediaApplication = false + RAIParams.appHMIType = {"COMMUNICATION"} + + self.mobileSession = mobile_session.MobileSession( + self, + self.mobileConnection) + + self.mobileSession:StartService(7) + :Do(function(_,data) + + RegisterAppInterface_Success(self, self.mobileSession, RAIParams) + + EXPECT_NOTIFICATION("OnHMIStatus", + {hmiLevel = "NONE", audioStreamingState = "NOT_AUDIBLE", systemContext = "MAIN"}, + {hmiLevel = "FULL", audioStreamingState = "AUDIBLE" , systemContext = "MAIN"}) + :Times(2) + :Do(function(exp,data) + if exp.occurences == 1 then + ActivationApp(self, self.applications[config.application2.registerAppInterfaceParams.appName]) + end + end) + end) + +end + +function Test:SDLSets_COMMUNICATIONApp_ToBACKGROUND_ByAcvivationAnotherCOMMUNICATION() + + self.mobileSession1 = mobile_session.MobileSession( + self, + self.mobileConnection) + + local RAIParams = config.application3.registerAppInterfaceParams + RAIParams.isMediaApplication = false + RAIParams.appHMIType = {"COMMUNICATION"} + + self.mobileSession1:StartService(7) + :Do(function(_,data) + RegisterAppInterface_Success(self, self.mobileSession1, RAIParams) + + self.mobileSession1:ExpectNotification("OnHMIStatus", + {hmiLevel = "NONE", audioStreamingState = "NOT_AUDIBLE", systemContext = "MAIN"}, + {hmiLevel = "FULL", audioStreamingState = "AUDIBLE", systemContext = "MAIN"}) + :Times(2) + :Do(function(exp,data) + if exp.occurences == 1 then + --activate registered not activated app + ActivationApp(self, self.applications[RAIParams.appName]) + + end + end) + + + EXPECT_NOTIFICATION("OnHMIStatus", + {hmiLevel = "BACKGROUND", audioStreamingState = "NOT_AUDIBLE", systemContext = "MAIN"}) + + DelayedExp(1000) + + end) +end + +UnregisterTwoApplication_Success(self, "DeactivationCOMMUNICATIONApp_ByAcvivationAnotherCOMMUNICATION") + +-- 40[P][MAN]_TC_Only_one_level_FULL_or_LIMITED_for_Navigation_app +--===================================================================================-- +-- Presence of Navigation Application HMI Type doesn't affect rule that 2 media Apps can't have FULL and LIMITED at the same time (APPLINK-9482) +--===================================================================================-- + +function Test:Precondition_RegisterActivateMediaApplicationWithoutHMIType() + userPrint(34, "=================================== Test Case ===================================") + + local RAIParams = config.application2.registerAppInterfaceParams + RAIParams.isMediaApplication = true + RAIParams.appHMIType = nil + + self.mobileSession = mobile_session.MobileSession( + self, + self.mobileConnection) + + self.mobileSession:StartService(7) + :Do(function(_,data) + + RegisterAppInterface_Success(self, self.mobileSession, RAIParams) + + EXPECT_NOTIFICATION("OnHMIStatus", + {hmiLevel = "NONE", audioStreamingState = "NOT_AUDIBLE", systemContext = "MAIN"}, + {hmiLevel = "FULL", audioStreamingState = "AUDIBLE" , systemContext = "MAIN"}) + :Times(2) + :Do(function(exp,data) + if exp.occurences == 1 then + ActivationApp(self, self.applications[config.application2.registerAppInterfaceParams.appName]) + end + end) + end) + +end + +function Test:SDLAllowOnlyOneApp_WithisMediaApplicationFlagTrue_DespiteHMIType() + + self.mobileSession1 = mobile_session.MobileSession( + self, + self.mobileConnection) + + local RAIParams = config.application3.registerAppInterfaceParams + RAIParams.isMediaApplication = true + RAIParams.appHMIType = {"NAVIGATION"} + + self.mobileSession1:StartService(7) + :Do(function(_,data) + RegisterAppInterface_Success(self, self.mobileSession1, RAIParams) + + self.mobileSession1:ExpectNotification("OnHMIStatus", + {hmiLevel = "NONE", audioStreamingState = "NOT_AUDIBLE", systemContext = "MAIN"}, + {hmiLevel = "FULL", audioStreamingState = "AUDIBLE", systemContext = "MAIN"}, + {hmiLevel = "BACKGROUND", audioStreamingState = "NOT_AUDIBLE", systemContext = "MAIN"}) + :Times(3) + :Do(function(exp,data) + if exp.occurences == 1 then + --activate registered not activated app + ActivationApp(self, self.applications[RAIParams.appName]) + + end + end) + + EXPECT_NOTIFICATION("OnHMIStatus", + {hmiLevel = "BACKGROUND", audioStreamingState = "NOT_AUDIBLE", systemContext = "MAIN"}, + {hmiLevel = "FULL", audioStreamingState = "AUDIBLE", systemContext = "MAIN"}) + :Do(function(exp,data) + if exp.occurences == 1 then + ActivationApp(self, self.applications[config.application2.registerAppInterfaceParams.appName]) + end + end) + :Times(2) + + + DelayedExp(1000) + + end) +end + +UnregisterTwoApplication_Success(self, "SDLAllowOnlyOneApp_WithisMediaApplicationFlagTrue_DespiteHMIType") + + +-- 42[P][MAN]_TC_Only_one_level_FULL_or_LIMITED_for_COMMUNICATION_and_NAVIGATION_app +--===================================================================================-- +-- SDL allow only one level: either FULL or LIMITED at the given moment of time for two apps of one and the same AppHMIType with mixed apps type (COMMUNICATION and NAVIGATION, non-media). +--===================================================================================-- + +function Test:Precondition_RegisterActivateCommunicationApplicationWithisMediaApplicationFlagFalse() + userPrint(34, "=================================== Test Case ===================================") + + local RAIParams = config.application2.registerAppInterfaceParams + RAIParams.isMediaApplication = false + RAIParams.appHMIType = {"COMMUNICATION"} + + self.mobileSession = mobile_session.MobileSession( + self, + self.mobileConnection) + + self.mobileSession:StartService(7) + :Do(function(_,data) + + RegisterAppInterface_Success(self, self.mobileSession, RAIParams) + + EXPECT_NOTIFICATION("OnHMIStatus", + {hmiLevel = "NONE", audioStreamingState = "NOT_AUDIBLE", systemContext = "MAIN"}, + {hmiLevel = "FULL", audioStreamingState = "AUDIBLE" , systemContext = "MAIN"}) + :Times(2) + :Do(function(exp,data) + if exp.occurences == 1 then + ActivationApp(self, self.applications[config.application2.registerAppInterfaceParams.appName]) + end + end) + end) + +end + +function Test:SDLAllowOnlyOneApp_WithisMediaApplicationFlagFalse_WithMixedHMIType() + + self.mobileSession1 = mobile_session.MobileSession( + self, + self.mobileConnection) + + local RAIParams = config.application3.registerAppInterfaceParams + RAIParams.isMediaApplication = false + RAIParams.appHMIType = {"NAVIGATION", "COMMUNICATION"} + + self.mobileSession1:StartService(7) + :Do(function(_,data) + RegisterAppInterface_Success(self, self.mobileSession1, RAIParams) + + self.mobileSession1:ExpectNotification("OnHMIStatus", + {hmiLevel = "NONE", audioStreamingState = "NOT_AUDIBLE", systemContext = "MAIN"}, + {hmiLevel = "FULL", audioStreamingState = "AUDIBLE", systemContext = "MAIN"}, + {hmiLevel = "BACKGROUND", audioStreamingState = "NOT_AUDIBLE", systemContext = "MAIN"}) + :Times(3) + :Do(function(exp,data) + if exp.occurences == 1 then + --activate registered not activated app + ActivationApp(self, self.applications[RAIParams.appName]) + + end + end) + + EXPECT_NOTIFICATION("OnHMIStatus", + {hmiLevel = "BACKGROUND", audioStreamingState = "NOT_AUDIBLE", systemContext = "MAIN"}, + {hmiLevel = "FULL", audioStreamingState = "AUDIBLE", systemContext = "MAIN"}) + :Do(function(exp,data) + if exp.occurences == 1 then + ActivationApp(self, self.applications[config.application2.registerAppInterfaceParams.appName]) + end + end) + :Times(2) + + + DelayedExp(1000) + + end) +end + +UnregisterTwoApplication_Success(self, "SDLAllowOnlyOneApp_WithisMediaApplicationFlagFalse_WithMixedHMIType") + + +-- 46[P][MAN]_TC_SDL_allows_only_FULL_or_LIMITED_if_app_registered_with_several_appHMITypes +--===================================================================================-- +-- SDL allow only one level: either FULL or LIMITED if app registered with several "appHMITypes" +--===================================================================================-- + +function Test:Precondition_RegisterActivateCommunicationNavigationAppWithisMediaApplicationFlagFalse() + userPrint(34, "=================================== Test Case ===================================") + + local RAIParams = config.application2.registerAppInterfaceParams + RAIParams.isMediaApplication = false + RAIParams.appHMIType = {"COMMUNICATION", "NAVIGATION"} + + self.mobileSession = mobile_session.MobileSession( + self, + self.mobileConnection) + + self.mobileSession:StartService(7) + :Do(function(_,data) + + RegisterAppInterface_Success(self, self.mobileSession, RAIParams) + + EXPECT_NOTIFICATION("OnHMIStatus", + {hmiLevel = "NONE", audioStreamingState = "NOT_AUDIBLE", systemContext = "MAIN"}, + {hmiLevel = "FULL", audioStreamingState = "AUDIBLE" , systemContext = "MAIN"}) + :Times(2) + :Do(function(exp,data) + if exp.occurences == 1 then + ActivationApp(self, self.applications[config.application2.registerAppInterfaceParams.appName]) + end + end) + end) + +end + +function Test:SDLAllowOnlyOneApp_WithisMediaApplicationFlagFalse_WithseveralHMIType() + + self.mobileSession1 = mobile_session.MobileSession( + self, + self.mobileConnection) + + local RAIParams = config.application3.registerAppInterfaceParams + RAIParams.isMediaApplication = false + RAIParams.appHMIType = {"COMMUNICATION"} + + self.mobileSession1:StartService(7) + :Do(function(_,data) + RegisterAppInterface_Success(self, self.mobileSession1, RAIParams) + + self.mobileSession1:ExpectNotification("OnHMIStatus", + {hmiLevel = "NONE", audioStreamingState = "NOT_AUDIBLE", systemContext = "MAIN"}, + {hmiLevel = "FULL", audioStreamingState = "AUDIBLE", systemContext = "MAIN"}, + {hmiLevel = "BACKGROUND", audioStreamingState = "NOT_AUDIBLE", systemContext = "MAIN"}) + :Times(3) + :Do(function(exp,data) + if exp.occurences == 1 then + --activate registered not activated app + ActivationApp(self, self.applications[RAIParams.appName]) + + end + end) + + EXPECT_NOTIFICATION("OnHMIStatus", + {hmiLevel = "BACKGROUND", audioStreamingState = "NOT_AUDIBLE", systemContext = "MAIN"}, + {hmiLevel = "FULL", audioStreamingState = "AUDIBLE", systemContext = "MAIN"}) + :Do(function(exp,data) + if exp.occurences == 1 then + ActivationApp(self, self.applications[config.application2.registerAppInterfaceParams.appName]) + end + end) + :Times(2) + + + DelayedExp(1000) + + end) +end + +UnregisterTwoApplication_Success(self, "SDLAllowOnlyOneApp_WithisMediaApplicationFlagFalse_WithseveralHMIType") + +-- 43[P][MAN]_TC_FULL_or_LIMITED_app_to_BACKGROUND_after_update +-- 44[P][MAN]_TC_SDL_sends_app's_allowed_AppHMITypes_via_UI.ChangeRegistration +--===================================================================================-- +-- After the app's AppHMIType received due to Policies update is different from app's AppHMIType requested during registration, SDL put such FULL or LIMITED app to BACKGROUND. +-- SDL send the updated list of app's allowed AppHMITypes via UI.ChangeRegistration(appID, AppHMIType) to HMI in case the app's AppHMIType received due to Policies update is different from app's AppHMIType requested during registration. +--===================================================================================-- +--[==[TODO: TC is disables until resolving ATF issue APPLINK-19188 +function Test:Precondition_RegisterActivateCommunicationNavigationAppWithisMediaApplicationFlagFalse() + userPrint(34, "=================================== Test Case ===================================") + + local RAIParams = config.application2.registerAppInterfaceParams + RAIParams.isMediaApplication = false + RAIParams.appHMIType = {"NAVIGATION"} + RAIParams.appID = "584421907" + RAIParams.appName = "SyncProxyTester" + + self.mobileSession = mobile_session.MobileSession( + self, + self.mobileConnection) + + self.mobileSession:StartService(7) + :Do(function(_,data) + + RegisterAppInterface_Success(self, self.mobileSession, RAIParams) + + EXPECT_NOTIFICATION("OnHMIStatus", + {hmiLevel = "NONE", audioStreamingState = "NOT_AUDIBLE", systemContext = "MAIN"}, + {hmiLevel = "FULL", audioStreamingState = "AUDIBLE" , systemContext = "MAIN"}) + :Times(2) + :Do(function(exp,data) + if exp.occurences == 1 then + ActivationApp(self, self.applications["SyncProxyTester"]) + end + end) + end) + +end + +function Test:SDLsetsAppToBackgroundLevel_AfterPerformingPTUwithAnotherHMIType() + + userPrint(33, " Because of ATF defect APPLINK-16052 check of deviceInfo params in BC.UpdateAppList is commented ") + + self.mobileSession1 = mobile_session.MobileSession( + self, + self.mobileConnection) + + local RAIParams = config.application3.registerAppInterfaceParams + RAIParams.isMediaApplication = false + RAIParams.appHMIType = {"COMMUNICATION"} + + self.mobileSession1:StartService(7) + :Do(function(_,data) + RegisterAppInterface_Success(self, self.mobileSession1, RAIParams) + + self.mobileSession1:ExpectNotification("OnHMIStatus", + {hmiLevel = "NONE", audioStreamingState = "NOT_AUDIBLE", systemContext = "MAIN"}, + {hmiLevel = "FULL", audioStreamingState = "AUDIBLE", systemContext = "MAIN"}) + :Times(2) + :Do(function(exp,data) + if exp.occurences == 1 then + --activate registered not activated app + local RequestId = self.hmiConnection:SendRequest("SDL.ActivateApp", { appID = self.applications[RAIParams.appName]}) + + --hmi side: expect SDL.ActivateApp response + --TODO: Update after resolving APPLINK-16094 EXPECT_HMIRESPONSE(RequestId,{result = {code = 0, method = "SDL.ActivateApp"}}) + EXPECT_HMIRESPONSE(RequestId) + elseif + exp.occurences == 2 then + UpdatePolicy(self, "files/PTU_AppHMIType.json") + + EXPECT_HMICALL("BasicCommunication.ActivateApp", { appID = self.applications["SyncProxyTester"],level = "BACKGROUND" }) + EXPECT_HMICALL("UI.ChangeRegistration", { appHMIType = {"COMMUNICATION"}, appID = self.applications["SyncProxyTester"] , language = "EN-US" }) + + EXPECT_HMICALL("BasicCommunication.UpdateAppList", + {applications = { + { + appName = "SyncProxyTester", + --[=[TODO: remove after resolving APPLINK-16052 + deviceInfo = { + id = "12ca17b49af2289436f303e0166030a21e525d266e209267433801a8fd4071a0", + isSDLAllowed = true, + name = "127.0.0.1", + transportType = "WIFI" + },]=] + appType = {"COMMUNICATION"} + }, + { + appName = RAIParams.appName, + --[=[TODO: remove after resolving APPLINK-16052 + deviceInfo = { + id = "12ca17b49af2289436f303e0166030a21e525d266e209267433801a8fd4071a0", + isSDLAllowed = true, + name = "127.0.0.1", + transportType = "WIFI" + },]=] + appType = {"COMMUNICATION"} + } + }}) + :Do(function(_,data) + self.hmiConnection:SendResponse(data.id, data.method, "SUCCESS", { }) + end) + end + end) + + EXPECT_NOTIFICATION("OnHMIStatus", + {hmiLevel = "LIMITED", audioStreamingState = "AUDIBLE", systemContext = "MAIN"}, + {hmiLevel = "BACKGROUND", audioStreamingState = "NOT_AUDIBLE", systemContext = "MAIN"}) + :Times(2) + + DelayedExp(1000) + + end) +end + +UnregisterTwoApplication_Success(self, "SDLsetsAppToBackgroundLevel_AfterPerformingPTUwithAnotherHMIType") +]==] +--===================================================================================-- +-- SDL sets app to NOT_AUDIBLE state in case VR session is active, to ATTENUATED state during speak is active when mixing audio is supported +--===================================================================================-- + +function Test:AudioStreaming_NOT_AUDIBLE_ATTENUATED_inFULL_MixingAudio_is_supported() + userPrint(34, "=================================== Test Case ===================================") + + local RAIParams = config.application1.registerAppInterfaceParams + + self.mobileSession = mobile_session.MobileSession( + self, + self.mobileConnection) + + self.mobileSession:StartService(7) + :Do(function(_,data) + + RegisterAppInterface_Success(self, self.mobileSession, RAIParams) + if MediaApp or NaviComApp then + + EXPECT_NOTIFICATION("OnHMIStatus", + {hmiLevel = "NONE", audioStreamingState = "NOT_AUDIBLE", systemContext = "MAIN"}, + {hmiLevel = "FULL", audioStreamingState = "AUDIBLE" , systemContext = "MAIN"}, + {hmiLevel = "FULL", audioStreamingState = "NOT_AUDIBLE" , systemContext = "MAIN"}, + {hmiLevel = "FULL", audioStreamingState = "AUDIBLE" , systemContext = "MAIN"}, + {hmiLevel = "FULL", audioStreamingState = "ATTENUATED" , systemContext = "MAIN"}, + {hmiLevel = "FULL", audioStreamingState = "AUDIBLE" , systemContext = "MAIN"}) + :Times(6) + :Do(function(exp,data) + if exp.occurences == 1 then + ActivationApp(self, self.applications[RAIParams.appName]) + elseif + exp.occurences == 2 then + + -- Openning VR menu + self.hmiConnection:SendNotification("VR.Started",{}) + + function StopVRSession() + --Closing VR menu + self.hmiConnection:SendNotification("VR.Stopped",{}) + end + + RUN_AFTER(StopVRSession, 500) + elseif + exp.occurences == 4 then + + --mobile side: sending the request + local cid = self.mobileSession:SendRPC("Speak", { + ttsChunks = + { + { + text ="Speak request", + type ="TEXT" + } + }}) + + --hmi side: expect TTS.Speak request + EXPECT_HMICALL("TTS.Speak", { + ttsChunks = + { + { + text ="Speak request", + type ="TEXT" + } + }}) + :Do(function(_,data) + self.hmiConnection:SendNotification("TTS.Started") + + local function speakResponse() + self.hmiConnection:SendResponse(data.id, data.method, "SUCCESS", { }) + + self.hmiConnection:SendNotification("TTS.Stopped") + end + RUN_AFTER(speakResponse, 500) + end) + + --mobile side: expect the response + EXPECT_RESPONSE(cid, { success = true, resultCode = "SUCCESS" }) + + end + end) + else + EXPECT_NOTIFICATION("OnHMIStatus", + {hmiLevel = "NONE", audioStreamingState = "NOT_AUDIBLE", systemContext = "MAIN"}, + {hmiLevel = "FULL", audioStreamingState = "NOT_AUDIBLE" , systemContext = "MAIN"}) + :Times(2) + :Do(function(exp,data) + if exp.occurences == 1 then + ActivationApp(self, self.applications[RAIParams.appName]) + elseif + exp.occurences == 2 then + + -- Openning VR menu + self.hmiConnection:SendNotification("VR.Started",{}) + + function StopVRSession() + --Closing VR menu + self.hmiConnection:SendNotification("VR.Stopped",{}) + end + + RUN_AFTER(StopVRSession, 500) + + function Speak() + --mobile side: sending the request + local cid = self.mobileSession:SendRPC("Speak", { + ttsChunks = + { + { + text ="Speak request", + type ="TEXT" + } + }}) + + --hmi side: expect TTS.Speak request + EXPECT_HMICALL("TTS.Speak", { + ttsChunks = + { + { + text ="Speak request", + type ="TEXT" + } + }}) + :Do(function(_,data) + self.hmiConnection:SendNotification("TTS.Started") + + local function speakResponse() + self.hmiConnection:SendResponse(data.id, data.method, "SUCCESS", { }) + + self.hmiConnection:SendNotification("TTS.Stopped") + end + RUN_AFTER(speakResponse, 500) + end) + + --mobile side: expect the response + EXPECT_RESPONSE(cid, { success = true, resultCode = "SUCCESS" }) + end + + RUN_AFTER(Speak,1500) + + end + end) + + end + end) +end + +function Test:Postcondition_UnregisteApp_AudioStreaming_NOT_AUDIBLE_ATTENUATED_inFULL_MixingAudio_is_supported() + UnregisterApplication_Success(self, self.mobileSession, self.applications[config.application1.registerAppInterfaceParams.appName]) +end + +if MediaApp or NaviComApp then + + function Test:AudioStreaming_NOT_AUDIBLE_ATTENUATED_inLIMITED_MixingAudio_is_supported() + local RAIParams = config.application1.registerAppInterfaceParams + + self.mobileSession = mobile_session.MobileSession( + self, + self.mobileConnection) + + self.mobileSession:StartService(7) + :Do(function(_,data) + + RegisterAppInterface_Success(self, self.mobileSession, RAIParams) + + EXPECT_NOTIFICATION("OnHMIStatus", + {hmiLevel = "NONE", audioStreamingState = "NOT_AUDIBLE", systemContext = "MAIN"}, + {hmiLevel = "FULL", audioStreamingState = "AUDIBLE" , systemContext = "MAIN"}, + {hmiLevel = "LIMITED", audioStreamingState = "AUDIBLE" , systemContext = "MAIN"}, + {hmiLevel = "LIMITED", audioStreamingState = "NOT_AUDIBLE" , systemContext = "MAIN"}, + {hmiLevel = "LIMITED", audioStreamingState = "AUDIBLE" , systemContext = "MAIN"}, + {hmiLevel = "LIMITED", audioStreamingState = "ATTENUATED" , systemContext = "MAIN"}, + {hmiLevel = "LIMITED", audioStreamingState = "AUDIBLE" , systemContext = "MAIN"}) + :Times(7) + :Do(function(exp,data) + if exp.occurences == 1 then + ActivationApp(self, self.applications[RAIParams.appName]) + elseif + exp.occurences == 2 then + -- Deactivate app ti LIMITED level + self.hmiConnection:SendNotification("BasicCommunication.OnAppDeactivated", + { + appID = self.applications[RAIParams.appName] + }) + elseif + exp.occurences == 3 then + + -- Openning VR menu + self.hmiConnection:SendNotification("VR.Started",{}) + + function StopVRSession() + --Closing VR menu + self.hmiConnection:SendNotification("VR.Stopped",{}) + end + + RUN_AFTER(StopVRSession, 500) + elseif + exp.occurences == 5 then + + --mobile side: sending the request + local cid = self.mobileSession:SendRPC("Speak", { + ttsChunks = + { + { + text ="Speak request", + type ="TEXT" + } + }}) + + --hmi side: expect TTS.Speak request + EXPECT_HMICALL("TTS.Speak", { + ttsChunks = + { + { + text ="Speak request", + type ="TEXT" + } + }}) + :Do(function(_,data) + self.hmiConnection:SendNotification("TTS.Started") + + local function speakResponse() + self.hmiConnection:SendResponse(data.id, data.method, "SUCCESS", { }) + + self.hmiConnection:SendNotification("TTS.Stopped") + end + RUN_AFTER(speakResponse, 500) + end) + + --mobile side: expect the response + EXPECT_RESPONSE(cid, { success = true, resultCode = "SUCCESS" }) + + end + end) + end) + end + + function Test:Postcondition_UnregisteApp_AudioStreaming_NOT_AUDIBLE_ATTENUATED_inLIMITED_MixingAudio_is_supported() + UnregisterApplication_Success(self, self.mobileSession, self.applications[config.application1.registerAppInterfaceParams.appName]) + end + +end + +-- 45[P][MAN]_TC_AudioStreaming_status_if_mixing_audio_not_supported +--===================================================================================-- +-- SDL sets app to NOT_AUDIBLE state in case VR session is active, to ATTENUATED state during speak is active when mixing audio is not supported +--===================================================================================-- + +DeletingDatabase_RestartSDL("MixingAudioIsNotSupported", false) + +function Test:AudioStreaming_NOT_AUDIBLE_inFULL_MixingAudio_is_not_supported() + userPrint(34, "=================================== Test Case ===================================") + + local RAIParams = config.application1.registerAppInterfaceParams + + self.mobileSession = mobile_session.MobileSession( + self, + self.mobileConnection) + + self.mobileSession:StartService(7) + :Do(function(_,data) + + RegisterAppInterface_Success(self, self.mobileSession, RAIParams) + if MediaApp or NaviComApp then + + EXPECT_NOTIFICATION("OnHMIStatus", + {hmiLevel = "NONE", audioStreamingState = "NOT_AUDIBLE", systemContext = "MAIN"}, + {hmiLevel = "FULL", audioStreamingState = "AUDIBLE" , systemContext = "MAIN"}, + {hmiLevel = "FULL", audioStreamingState = "NOT_AUDIBLE" , systemContext = "MAIN"}, + {hmiLevel = "FULL", audioStreamingState = "AUDIBLE" , systemContext = "MAIN"}, + {hmiLevel = "FULL", audioStreamingState = "NOT_AUDIBLE" , systemContext = "MAIN"}, + {hmiLevel = "FULL", audioStreamingState = "AUDIBLE" , systemContext = "MAIN"}) + :Times(6) + :Do(function(exp,data) + if exp.occurences == 1 then + function Activate() + ActivationApp(self, self.applications[RAIParams.appName]) + end + RUN_AFTER(Activate, 500) + elseif + exp.occurences == 2 then + + -- Openning VR menu + self.hmiConnection:SendNotification("VR.Started",{}) + + function StopVRSession() + --Closing VR menu + self.hmiConnection:SendNotification("VR.Stopped",{}) + end + + RUN_AFTER(StopVRSession, 500) + elseif + exp.occurences == 4 then + + --mobile side: sending the request + local cid = self.mobileSession:SendRPC("Speak", { + ttsChunks = + { + { + text ="Speak request", + type ="TEXT" + } + }}) + + --hmi side: expect TTS.Speak request + EXPECT_HMICALL("TTS.Speak", { + ttsChunks = + { + { + text ="Speak request", + type ="TEXT" + } + }}) + :Do(function(_,data) + self.hmiConnection:SendNotification("TTS.Started") + + local function speakResponse() + self.hmiConnection:SendResponse(data.id, data.method, "SUCCESS", { }) + + self.hmiConnection:SendNotification("TTS.Stopped") + end + RUN_AFTER(speakResponse, 500) + end) + + --mobile side: expect the response + EXPECT_RESPONSE(cid, { success = true, resultCode = "SUCCESS" }) + + end + end) + else + EXPECT_NOTIFICATION("OnHMIStatus", + {hmiLevel = "NONE", audioStreamingState = "NOT_AUDIBLE", systemContext = "MAIN"}, + {hmiLevel = "FULL", audioStreamingState = "NOT_AUDIBLE" , systemContext = "MAIN"}) + :Times(2) + :Do(function(exp,data) + if exp.occurences == 1 then + ActivationApp(self, self.applications[RAIParams.appName]) + elseif + exp.occurences == 2 then + + -- Openning VR menu + self.hmiConnection:SendNotification("VR.Started",{}) + + function StopVRSession() + --Closing VR menu + self.hmiConnection:SendNotification("VR.Stopped",{}) + end + + RUN_AFTER(StopVRSession, 500) + + function Speak() + --mobile side: sending the request + local cid = self.mobileSession:SendRPC("Speak", { + ttsChunks = + { + { + text ="Speak request", + type ="TEXT" + } + }}) + + --hmi side: expect TTS.Speak request + EXPECT_HMICALL("TTS.Speak", { + ttsChunks = + { + { + text ="Speak request", + type ="TEXT" + } + }}) + :Do(function(_,data) + self.hmiConnection:SendNotification("TTS.Started") + + local function speakResponse() + self.hmiConnection:SendResponse(data.id, data.method, "SUCCESS", { }) + + self.hmiConnection:SendNotification("TTS.Stopped") + end + RUN_AFTER(speakResponse, 500) + end) + + --mobile side: expect the response + EXPECT_RESPONSE(cid, { success = true, resultCode = "SUCCESS" }) + end + + RUN_AFTER(Speak,1500) + + end + end) + + end + end) +end + +function Test:Postcondition_UnregisteApp_AudioStreaming_NOT_AUDIBLE_inFULL_MixingAudio_is_not_supported() + UnregisterApplication_Success(self, self.mobileSession, self.applications[config.application1.registerAppInterfaceParams.appName]) +end + +if MediaApp or NaviComApp then + + function Test:AudioStreaming_NOT_AUDIBLE_inLIMITED_MixingAudio_is_not_supported() + local RAIParams = config.application1.registerAppInterfaceParams + + self.mobileSession = mobile_session.MobileSession( + self, + self.mobileConnection) + + self.mobileSession:StartService(7) + :Do(function(_,data) + + RegisterAppInterface_Success(self, self.mobileSession, RAIParams) + + EXPECT_NOTIFICATION("OnHMIStatus", + {hmiLevel = "NONE", audioStreamingState = "NOT_AUDIBLE", systemContext = "MAIN"}, + {hmiLevel = "FULL", audioStreamingState = "AUDIBLE" , systemContext = "MAIN"}, + {hmiLevel = "LIMITED", audioStreamingState = "AUDIBLE" , systemContext = "MAIN"}, + {hmiLevel = "LIMITED", audioStreamingState = "NOT_AUDIBLE" , systemContext = "MAIN"}, + {hmiLevel = "LIMITED", audioStreamingState = "AUDIBLE" , systemContext = "MAIN"}, + {hmiLevel = "LIMITED", audioStreamingState = "NOT_AUDIBLE" , systemContext = "MAIN"}, + {hmiLevel = "LIMITED", audioStreamingState = "AUDIBLE" , systemContext = "MAIN"}) + :Times(7) + :Do(function(exp,data) + if exp.occurences == 1 then + ActivationApp(self, self.applications[RAIParams.appName]) + elseif + exp.occurences == 2 then + -- Deactivate app ti LIMITED level + self.hmiConnection:SendNotification("BasicCommunication.OnAppDeactivated", + { + appID = self.applications[RAIParams.appName] + }) + elseif + exp.occurences == 3 then + + -- Openning VR menu + self.hmiConnection:SendNotification("VR.Started",{}) + + function StopVRSession() + --Closing VR menu + self.hmiConnection:SendNotification("VR.Stopped",{}) + end + + RUN_AFTER(StopVRSession, 500) + elseif + exp.occurences == 5 then + + --mobile side: sending the request + local cid = self.mobileSession:SendRPC("Speak", { + ttsChunks = + { + { + text ="Speak request", + type ="TEXT" + } + }}) + + --hmi side: expect TTS.Speak request + EXPECT_HMICALL("TTS.Speak", { + ttsChunks = + { + { + text ="Speak request", + type ="TEXT" + } + }}) + :Do(function(_,data) + self.hmiConnection:SendNotification("TTS.Started") + + local function speakResponse() + self.hmiConnection:SendResponse(data.id, data.method, "SUCCESS", { }) + + self.hmiConnection:SendNotification("TTS.Stopped") + end + RUN_AFTER(speakResponse, 500) + end) + + --mobile side: expect the response + EXPECT_RESPONSE(cid, { success = true, resultCode = "SUCCESS" }) + + end + end) + end) + end + + function Test:Postcondition_UnregisteApp_AudioStreaming_NOT_AUDIBLE_inLIMITED_MixingAudio_is_not_supported() + UnregisterApplication_Success(self, self.mobileSession, self.applications[config.application1.registerAppInterfaceParams.appName]) + end + +end + +-- 08[P][MAN]_TC_Change_systemContext_to_VRSESSION +-- 09[P][MAN]_TC_Change_systemContext_to_HMI_OBSCURED +-- 10[P][MAN]_TC_Change_systemContext_for_both_Apps +--===================================================================================-- +-- SDL sends OnHMIStatus notification to mobile app about change of systemContext only for FULL App +--===================================================================================-- + +function Test:Precondition_RegisterNonMediaApplication_SystemContextToFullApp() + userPrint(34, "=================================== Test Case ===================================") + self.mobileSession = mobile_session.MobileSession( + self, + self.mobileConnection) + + self.mobileSession:StartService(7) + :Do(function(_,data) + local RAIParams = config.application2.registerAppInterfaceParams + RAIParams.isMediaApplication = false + RAIParams.appHMIType = {"DEFAULT"} + + --mobile side: RegisterAppInterface request + local CorIdRAI = self.mobileSession:SendRPC("RegisterAppInterface", RAIParams) + + --hmi side: expected BasicCommunication.OnAppRegistered + EXPECT_HMINOTIFICATION("BasicCommunication.OnAppRegistered") + :Do(function(_,data) + self.applications[data.params.application.appName] = data.params.application.appID + end) + + --mobile side: RegisterAppInterface response + self.mobileSession:ExpectResponse(CorIdRAI, { success = true, resultCode = "SUCCESS"}) + + self.mobileSession:ExpectNotification("OnHMIStatus", + {hmiLevel = "NONE", audioStreamingState = "NOT_AUDIBLE", systemContext = "MAIN"}) + end) +end + +function Test:Precondition_RegisterNavigationApplication_SystemContextToFullApp() + + self.mobileSession1 = mobile_session.MobileSession( + self, + self.mobileConnection) + + self.mobileSession1:StartService(7) + :Do(function(_,data) + local RAIParams = config.application3.registerAppInterfaceParams + RAIParams.isMediaApplication = false + RAIParams.appHMIType = {"NAVIGATION"} + + --mobile side: RegisterAppInterface request + local CorIdRAI = self.mobileSession1:SendRPC("RegisterAppInterface", RAIParams) + + --hmi side: expected BasicCommunication.OnAppRegistered + EXPECT_HMINOTIFICATION("BasicCommunication.OnAppRegistered") + :Do(function(_,data) + self.applications[data.params.application.appName] = data.params.application.appID + end) + + --mobile side: RegisterAppInterface response + self.mobileSession1:ExpectResponse(CorIdRAI, { success = true, resultCode = "SUCCESS"}) + + self.mobileSession1:ExpectNotification("OnHMIStatus", + {hmiLevel = "NONE", audioStreamingState = "NOT_AUDIBLE", systemContext = "MAIN"}) + end) + +end + +function Test:Precondition_RegisterCommunicationApplication_SystemContextToFullApp() + + self.mobileSession2 = mobile_session.MobileSession( + self, + self.mobileConnection) + + self.mobileSession2:StartService(7) + :Do(function(_,data) + local RAIParams = config.application4.registerAppInterfaceParams + RAIParams.isMediaApplication = false + RAIParams.appHMIType = {"COMMUNICATION"} + + --mobile side: RegisterAppInterface request + local CorIdRAI = self.mobileSession2:SendRPC("RegisterAppInterface", RAIParams) + + --hmi side: expected BasicCommunication.OnAppRegistered + EXPECT_HMINOTIFICATION("BasicCommunication.OnAppRegistered") + :Do(function(_,data) + self.applications[data.params.application.appName] = data.params.application.appID + end) + + --mobile side: RegisterAppInterface response + self.mobileSession2:ExpectResponse(CorIdRAI, { success = true, resultCode = "SUCCESS"}) + + self.mobileSession2:ExpectNotification("OnHMIStatus", + {hmiLevel = "NONE", audioStreamingState = "NOT_AUDIBLE", systemContext = "MAIN"}) + end) +end + +function Test:SetAppsTo_FULL_LIMITED_BACKGROUND() + + -- Activate non-media app + ActivationApp(self, self.applications[config.application2.registerAppInterfaceParams.appName]) + + --mobile side: expect OnHMIStatus notification on non-media app + self.mobileSession:ExpectNotification("OnHMIStatus", + {hmiLevel = "FULL", audioStreamingState = "NOT_AUDIBLE", systemContext = "MAIN"}, + {hmiLevel = "BACKGROUND", audioStreamingState = "NOT_AUDIBLE", systemContext = "MAIN"}) + :Do(function(exp,data) + if exp.occurences == 1 then + -- Activate navigation app + ActivationApp(self, self.applications[config.application3.registerAppInterfaceParams.appName]) + end + end) + :Times(2) + + --mobile side: expect OnHMIStatus notification on navigation app + self.mobileSession1:ExpectNotification("OnHMIStatus", + {hmiLevel = "FULL", audioStreamingState = "AUDIBLE", systemContext = "MAIN"}, + {hmiLevel = "LIMITED", audioStreamingState = "AUDIBLE", systemContext = "MAIN"}) + :Do(function(exp,data) + if exp.occurences == 1 then + -- Activate communication app + ActivationApp(self, self.applications[config.application4.registerAppInterfaceParams.appName]) + end + end) + :Times(2) + + --mobile side: expect OnHMIStatus notification on communication app + self.mobileSession2:ExpectNotification("OnHMIStatus", + {hmiLevel = "FULL", audioStreamingState = "AUDIBLE", systemContext = "MAIN"}) +end + +local SystemContext = {"VRSESSION", "MENU", "HMI_OBSCURED"} +for i=1, #SystemContext do + Test["SystemContextTo" .. tostring(SystemContext[i]) .. "WithoutAppIDOnHMIStatusOnlyToFullApp"] = function(self) + SendOnSystemContext(self, SystemContext[i], "empty") + + --mobile side: expect OnHMIStatus notification on non-media app + self.mobileSession:ExpectNotification("OnHMIStatus", {}) + :Times(0) + + --mobile side: expect OnHMIStatus notification on navigation app + self.mobileSession1:ExpectNotification("OnHMIStatus", {}) + :Times(0) + + --mobile side: expect OnHMIStatus notification on communication app + self.mobileSession2:ExpectNotification("OnHMIStatus", + {hmiLevel = "FULL", audioStreamingState = "AUDIBLE", systemContext = SystemContext[i]}, + {hmiLevel = "FULL", audioStreamingState = "AUDIBLE", systemContext = "MAIN"}) + :Times(2) + + function SystemReq() + SendOnSystemContext(self, "MAIN", "empty") + end + + RUN_AFTER(SystemReq, 1000) + + DelayedExp(2000) + end +end + +for i=1, #SystemContext do + Test["SystemContextTo" .. tostring(SystemContext[i]) .. "WithAppIDOnHMIStatusOnlyToFullApp"] = function(self) + + SendOnSystemContext(self, SystemContext[i], self.applications[config.application3.registerAppInterfaceParams.appName]) + + --mobile side: expect OnHMIStatus notification on non-media app + self.mobileSession:ExpectNotification("OnHMIStatus", {}) + :Times(0) + + --mobile side: expect OnHMIStatus notification on navigation app + self.mobileSession1:ExpectNotification("OnHMIStatus", {}) + :Times(0) + + --mobile side: expect OnHMIStatus notification on communication app + self.mobileSession2:ExpectNotification("OnHMIStatus", + {hmiLevel = "FULL", audioStreamingState = "AUDIBLE", systemContext = SystemContext[i]}, + {hmiLevel = "FULL", audioStreamingState = "AUDIBLE", systemContext = "MAIN"}) + :Times(2) + + function SystemReq() + SendOnSystemContext(self, "MAIN", self.applications[config.application3.registerAppInterfaceParams.appName]) + end + + RUN_AFTER(SystemReq, 1000) + + DelayedExp(2000) + end +end + +function Test:Postcondition_UnregisterNonMediaApp_WithAppIDOnHMIStatusOnlyToFullApp() + UnregisterApplication_Success(self, self.mobileSession, self.applications[config.application2.registerAppInterfaceParams.appName]) +end + +function Test:Postcondition_UnregisterNavigationApp_WithAppIDOnHMIStatusOnlyToFullApp() + UnregisterApplication_Success(self, self.mobileSession1, self.applications[config.application3.registerAppInterfaceParams.appName]) +end + +function Test:Postcondition_UnregisterCommunicationApp_WithAppIDOnHMIStatusOnlyToFullApp() + UnregisterApplication_Success(self, self.mobileSession2, self.applications[config.application4.registerAppInterfaceParams.appName]) +end + +local function APPLINK_10706() + +--SDL must send OnHMIStatus notification with "AudioStreamingState: NOT_AUDIBLE" to mobile app in case VR session is active for the system that can audio-mix ("MixingAudioSupported = true" in .ini file) +--===================================================================================-- + + --Precondition: Make sure that MixingAudioSupported = true in ini file + function Test:Precondition_SetMixingAudioSupported() + local commonFunctions = require('user_modules/shared_testcases/commonFunctions') + commonFunctions:SetValuesInIniFile("%p?MixingAudioSupported%s?=%s-[%w%d,-]-%s-\n", "MixingAudioSupported", true) + end + + --Precondition: Restart SDL after updating ini file + local function RestartSDL_InitHMI_ConnectMobile(self, Note) + + --Stop SDL + Test[tostring(Note) .. "_StopSDL"] = function(self) + StopSDL() + end + --Start SDL + Test[tostring(Note) .. "_StartSDL"] = function(self) + StartSDL(config.pathToSDL, config.ExitOnCrash) + end + --InitHMI + Test[tostring(Note) .. "_InitHMI"] = function(self) + self:initHMI() + end + --InitHMIonReady + Test[tostring(Note) .. "_InitHMIonReady"] = function(self) + self:initHMI_onReady() + end + --ConnectMobile + Test[tostring(Note) .. "_ConnectMobile"] = function(self) + self:connectMobile() + end + + end + + RestartSDL_InitHMI_ConnectMobile(self, "Precondition") + + --Case: HMILevel = FULL + function Test:AudioStreaming_NOT_AUDIBLE_inFULL_MixingAudio_is_supported() + userPrint(34, "=================================== Test Case ===================================") + + --Precondition: Add new session + local RAIParams = config.application1.registerAppInterfaceParams + + self.mobileSession = mobile_session.MobileSession( + self, + self.mobileConnection) + + self.mobileSession:StartService(7) + :Do(function(_,data) + + --Precondition: Register App + RegisterAppInterface_Success(self, self.mobileSession, RAIParams) + if MediaApp or NaviComApp then + + EXPECT_NOTIFICATION("OnHMIStatus", + {hmiLevel = "NONE", audioStreamingState = "NOT_AUDIBLE", systemContext = "MAIN"}, + {hmiLevel = "FULL", audioStreamingState = "AUDIBLE" , systemContext = "MAIN"}, + {hmiLevel = "FULL", audioStreamingState = "NOT_AUDIBLE" , systemContext = "MAIN"}, + {hmiLevel = "FULL", audioStreamingState = "AUDIBLE" , systemContext = "MAIN"}) + :Times(4) + + --Precondition: Activate app + :Do(function(exp,data) + if exp.occurences == 1 then + ActivationApp(self, self.applications[RAIParams.appName]) + elseif + exp.occurences == 2 then + + -- Openning VR menu + self.hmiConnection:SendNotification("VR.Started",{}) + + function StopVRSession() + --Closing VR menu + self.hmiConnection:SendNotification("VR.Stopped",{}) + end + + RUN_AFTER(StopVRSession, 500) + + end + end) + else + EXPECT_NOTIFICATION("OnHMIStatus", + {hmiLevel = "NONE", audioStreamingState = "NOT_AUDIBLE", systemContext = "MAIN"}, + {hmiLevel = "FULL", audioStreamingState = "NOT_AUDIBLE" , systemContext = "MAIN"}) + :Times(2) + :Do(function(exp,data) + if exp.occurences == 1 then + ActivationApp(self, self.applications[RAIParams.appName]) + elseif + exp.occurences == 2 then + + -- Openning VR menu + self.hmiConnection:SendNotification("VR.Started",{}) + + function StopVRSession() + --Closing VR menu + self.hmiConnection:SendNotification("VR.Stopped",{}) + end + + RUN_AFTER(StopVRSession, 500) + + end + end) + + end + end) + end + + --Postcondition: Unregister App + function Test:Postcondition_UnregisteApp_AudioStreaming_NOT_AUDIBLE_inFULL_MixingAudio_is_supported() + UnregisterApplication_Success(self, self.mobileSession, self.applications[config.application1.registerAppInterfaceParams.appName]) + end + + --Case: HMILevel = LIMITED + if MediaApp or NaviComApp then + + function Test:AudioStreaming_NOT_AUDIBLE_inLIMITED_MixingAudio_is_supported() + local RAIParams = config.application1.registerAppInterfaceParams + --Precondition: Add new session + self.mobileSession = mobile_session.MobileSession( + self, + self.mobileConnection) + + self.mobileSession:StartService(7) + :Do(function(_,data) + --Precondition: Register App + RegisterAppInterface_Success(self, self.mobileSession, RAIParams) + + EXPECT_NOTIFICATION("OnHMIStatus", + {hmiLevel = "NONE", audioStreamingState = "NOT_AUDIBLE", systemContext = "MAIN"}, + {hmiLevel = "FULL", audioStreamingState = "AUDIBLE" , systemContext = "MAIN"}, + {hmiLevel = "LIMITED", audioStreamingState = "AUDIBLE" , systemContext = "MAIN"}, + {hmiLevel = "LIMITED", audioStreamingState = "NOT_AUDIBLE" , systemContext = "MAIN"}, + {hmiLevel = "LIMITED", audioStreamingState = "AUDIBLE" , systemContext = "MAIN"}) + :Times(5) + --Precondition: Activate app + :Do(function(exp,data) + if exp.occurences == 1 then + ActivationApp(self, self.applications[RAIParams.appName]) + + elseif + exp.occurences == 2 then + -- Deactivate app ti LIMITED level + self.hmiConnection:SendNotification("BasicCommunication.OnAppDeactivated", + { + appID = self.applications[RAIParams.appName] + }) + elseif + exp.occurences == 3 then + + -- Openning VR menu + self.hmiConnection:SendNotification("VR.Started",{}) + + function StopVRSession() + --Closing VR menu + self.hmiConnection:SendNotification("VR.Stopped",{}) + end + + RUN_AFTER(StopVRSession, 500) + + end + end) + end) + end + + --Postcondition: Unregister App + function Test:Postcondition_UnregisteApp_AudioStreaming_NOT_AUDIBLE_inLIMITED_MixingAudio_is_supported() + UnregisterApplication_Success(self, self.mobileSession, self.applications[config.application1.registerAppInterfaceParams.appName]) + end + + end + +end + +APPLINK_10706() diff --git a/test_scripts/API/ATF_OnKeyboardInput.lua b/test_scripts/API/ATF_OnKeyboardInput.lua new file mode 100644 index 0000000000..9d6dca4ae7 --- /dev/null +++ b/test_scripts/API/ATF_OnKeyboardInput.lua @@ -0,0 +1,862 @@ +Test = require('connecttest') +require('cardinalities') +local events = require('events') +local mobile_session = require('mobile_session') + +--------------------------------------------------------------------------------------------- +-------------------------------------------Common function----------------------------------- +--------------------------------------------------------------------------------------------- + +local commonSteps = require('user_modules/shared_testcases/commonSteps') +local commonFunctions = require('user_modules/shared_testcases/commonFunctions') +local commonPreconditions = require('user_modules/shared_testcases/commonPreconditions') +local policyTable = require('user_modules/shared_testcases/testCasesForPolicyTable') +require('user_modules/AppTypes') + + +local config2 = require('user_modules/config_on_input_keyboard') +config.application1 = config2.application1 +config.application2 = config2.application2 +config.application3 = config2.application3 +config.application4 = config2.application4 +config.application5 = config2.application5 + + +APIName = "OnKeyboardInput" + +function DelayedExp() + local event = events.Event() + event.matches = function(self, e) return self == e end + EXPECT_EVENT(event, "Delayed event") + RUN_AFTER(function() + RAISE_EVENT(event, event) + end, 2000) +end + +local function userPrint(color, message) + print ("\27[" .. tostring(color) .. "m " .. tostring(message) .. " \27[0m") +end + +local function testName(name, testType) + if testType == "test" then + testType = "=== Test - " + elseif testType == "pre" then + testType = "=== Precondition - " + else + testType = "=== Test - " + end + userPrint(33, testType .. name .. " ===") +end + +local function removePolicyDB() + os.execute("rm -rf " .. config.pathToSDL .. "storage/") +end + +local function setInitialPrompt() + local temp = {{ + text = "Make a choice", + type = "TEXT", + }} + + return temp +end + +local function setHelpPrompt() + local temp = {{ + text = "say yes or no", + type = "TEXT", + }} + + return temp +end + +local function setTimeoutPrompt(size, character, outChar) + local temp = {{ + text = "time out", + type = "TEXT", + }} + return temp +end + +local function setVrHelp(size, character, outChar) + local temp = {{ + text = "help", + position = 1, + -- image = setImage() + }} + + return temp +end + +function setChoiseSet(choiceIDValue, size) + if (size == nil) then + local cs = {{ + choiceID = choiceIDValue, + menuName ="Choice" .. tostring(choiceIDValue), + vrCommands = + { + "VrChoice" .. tostring(choiceIDValue), + } + }} + return cs + else + local cs = {} + for i = 1, size do + cs[i] = { + choiceID = choiceIDValue+i-1, + menuName ="Choice" .. tostring(choiceIDValue+i-1), + vrCommands = + { + "VrChoice" .. tostring(choiceIDValue+i-1), + } + } + end + return temp + end +end + +function createInteractionChoiceSet(self, choiceSetID, choiceID, session) + session = session or 1 + --mobile side: sending CreateInteractionChoiceSet request + local cid = nil + if session == 1 then + cid = self.mobileSession:SendRPC( + "CreateInteractionChoiceSet", + { + interactionChoiceSetID = choiceSetID, + choiceSet = setChoiseSet(choiceID), + }) + else + cid = self.mobileSession1:SendRPC( + "CreateInteractionChoiceSet", + { + interactionChoiceSetID = choiceSetID, + choiceSet = setChoiseSet(choiceID), + }) + end + + --hmi side: expect VR.AddCommand + EXPECT_HMICALL( + "VR.AddCommand", + { + cmdID = choiceID, + type = "Choice", + vrCommands = {"VrChoice"..tostring(choiceID) } + }) + :Do(function(_,data) + --hmi side: sending VR.AddCommand response + self.hmiConnection:SendResponse(data.id, data.method, "SUCCESS", {}) + end) + + --mobile side: expect CreateInteractionChoiceSet response + if session == 1 then + EXPECT_RESPONSE(cid, { resultCode = "SUCCESS", success = true }) + else + self.mobileSession1:ExpectResponse(cid, { resultCode = "SUCCESS", success = true }) + end +end + +function createPerformInteraction(layout) + layout = layout or "KEYBOARD" + local temp = { + initialText = "Make a Choice!", + initialPrompt = setInitialPrompt(), + interactionMode = "MANUAL_ONLY", + interactionChoiceSetIDList = {100}, + helpPrompt = setHelpPrompt(), + timeoutPrompt = setTimeoutPrompt(), + timeout = 5000, + -- vrHelp = setVrHelp(), + interactionLayout = layout + } + return temp +end + +local function SendOnSystemContext(self, ctx, session) + session = session or 1 + if session == 1 then + self.hmiConnection:SendNotification("UI.OnSystemContext",{ appID = self.applications["Test Application"], systemContext = ctx }) + else + self.hmiConnection:SendNotification("UI.OnSystemContext",{ appID = self.applications["Test Application2"], systemContext = ctx }) + end +end + +local function SendPerformInteraction(self, name, keyEvent, level, layout, session) + session = session or 1 + layout = layout or "KEYBOARD" + + testName(name .. "(" ..keyEvent ..")") + local parametersToSend = createPerformInteraction(layout) + local cid = nil + if session == 1 then + cid = self.mobileSession:SendRPC("PerformInteraction", parametersToSend) + else + cid = self.mobileSession1:SendRPC("PerformInteraction", parametersToSend) + end + + EXPECT_HMICALL( + "UI.PerformInteraction", + { + timeout = parametersToSend.timeout, + -- choiceSet = setExChoiseSet(parametersToSend.interactionChoiceSetIDList), + initialText = + { + fieldName = "initialInteractionText", + fieldText = parametersToSend.initialText + } + }) + :Do(function(_,data) + --hmi side: send UI.PerformInteraction response + SendOnSystemContext(self,"HMI_OBSCURED", session) + self.hmiConnection:SendNotification("UI.OnKeyboardInput",{data="abc", event=keyEvent}) + self.hmiConnection:SendResponse(data.id, data.method, "SUCCESS", {manualTextEntry="abc"}) + + --Send notification to stop TTS + self.hmiConnection:SendNotification("TTS.Stopped") + SendOnSystemContext(self,"MAIN", session) + end) + + --mobile side: OnHMIStatus notifications + if ( (level == "FULL") and (session == 1) ) then + userPrint(33, "expext OnHMIStatus on 1st session") + EXPECT_NOTIFICATION( + "OnHMIStatus", + { hmiLevel = level, audioStreamingState = "AUDIBLE", systemContext = "HMI_OBSCURED"}, + { hmiLevel = level, audioStreamingState = "AUDIBLE", systemContext = "MAIN"}) + :Times(2) + elseif level == "FULL" then + userPrint(33, "expext OnHMIStatus on 2nd session") + self.mobileSession1:ExpectNotification( + "OnHMIStatus", + { hmiLevel = level, audioStreamingState = "AUDIBLE", systemContext = "HMI_OBSCURED"}, + { hmiLevel = level, audioStreamingState = "AUDIBLE", systemContext = "MAIN"}) + :Times(2) + end + --mobile side: expect PerformInteraction response + if session == 1 then + EXPECT_RESPONSE(cid, { success = true, resultCode = "SUCCESS", manualTextEntry="abc" }) + else + self.mobileSession1:ExpectResponse(cid, { success = true, resultCode = "SUCCESS", manualTextEntry="abc" }) + end + + if session == 1 then + if layout == "KEYBOARD" then + EXPECT_NOTIFICATION("OnKeyboardInput", {data="abc", event=keyEvent}) + :Times(1) + + DelayedExp(100) + elseif level == "FULL" then + EXPECT_NOTIFICATION("OnKeyboardInput", {data="abc", event=keyEvent}) + :Times(1) + + DelayedExp(100) + else + EXPECT_NOTIFICATION("OnKeyboardInput", {data="abc", event=keyEvent}) + :Times(0) + + DelayedExp(100) + end + else + if layout == "KEYBOARD" then + self.mobileSession1:ExpectNotification("OnKeyboardInput", {data="abc", event=keyEvent}) + :Times(1) + + DelayedExp(100) + elseif level == "FULL" then + self.mobileSession1:ExpectNotification("OnKeyboardInput", {data="abc", event=keyEvent}) + :Times(1) + + DelayedExp(100) + else + self.mobileSession1:ExpectNotification("OnKeyboardInput", {data="abc", event=keyEvent}) + :Times(0) + + DelayedExp(100) + end + end +end + +function Test:activateApp(applicationID, session) + session = session or 1 + userPrint(33, "session: " .. session) + local deviceMAC = "12ca17b49af2289436f303e0166030a21e525d266e209267433801a8fd4071a0" + --hmi side: sending SDL.ActivateApp request + local cid = self.hmiConnection:SendRequest("SDL.ActivateApp", { appID = applicationID}) + + --hmi side: expect SDL.ActivateApp response + -- TODO: next if could be dropped after fixing APPLINK-16094 + if session == 1 then + EXPECT_HMIRESPONSE(cid) + :Do(function(_,data) + --In case when app is not allowed, it is needed to allow app + if data.result.isSDLAllowed ~= true then + --hmi side: sending SDL.GetUserFriendlyMessage request + local cid = self.hmiConnection:SendRequest("SDL.GetUserFriendlyMessage", + {language = "EN-US", messageCodes = {"DataConsent"}}) + + --hmi side: expect SDL.GetUserFriendlyMessage response + --TODO: Update after resolving APPLINK-16094 EXPECT_HMIRESPONSE(cid,{result = {code = 0, method = "SDL.GetUserFriendlyMessage"}}) + EXPECT_HMIRESPONSE(cid) + :Do(function(_,data) + + --hmi side: send request SDL.OnAllowSDLFunctionality + self.hmiConnection:SendNotification("SDL.OnAllowSDLFunctionality", + {allowed = true, source = "GUI", device = {id = deviceMAC, name = "127.0.0.1"}}) + + + --hmi side: expect BasicCommunication.ActivateApp request + EXPECT_HMICALL("BasicCommunication.ActivateApp") + :Do(function(_,data) + + --hmi side: sending BasicCommunication.ActivateApp response + self.hmiConnection:SendResponse(data.id,"BasicCommunication.ActivateApp", "SUCCESS", {}) + + end) + --:Times(2) - according APPLINK-9283 we send "device" parameter, so expect "BasicCommunication.ActivateApp" one time + :Times(1) + end) + + end + end) + end + + --mobile side: expect notification + if session == 1 then + EXPECT_NOTIFICATION("OnHMIStatus", {hmiLevel = "FULL", systemContext = "MAIN"}) + else + self.mobileSession1:ExpectNotification("OnHMIStatus",{hmiLevel = "FULL", systemContext = "MAIN"}) + end +end + + +local HMIappID = nil + +--------------------------------------------------------------------------------------------- +---------------------------------------End Common function----------------------------------- +--------------------------------------------------------------------------------------------- + + + +--------------------------------------------------------------------------------------------- +-------------------------------------------Preconditions------------------------------------- +--------------------------------------------------------------------------------------------- + + commonSteps:DeleteLogsFileAndPolicyTable() + + --Print new line to separate new test cases group + commonFunctions:newTestCasesGroup("Preconditions") + + --1. Activate application + commonSteps:ActivationApp() + + --2. Update policy to allow request + --TODO: Will be updated after policy flow implementation + --policyTable:precondition_updatePolicy_AllowFunctionInHmiLeves({"BACKGROUND", "FULL", "LIMITED", "NONE"}) + policyTable:Precondition_updatePolicy_By_overwriting_preloaded_pt("files/jsons/CRQ_APPLINK-13177/sdl_preloaded_pt.json") + + +--------------------------------------------------------------------------------------------- +-----------------------------------------I TEST BLOCK---------------------------------------- +------------OnKeyboardInput: PerformInteraction(KEYBOARD) with one registered App------------ +--------------------------------------------------------------------------------------------- + --Begin Test suit PositiveRequestCheck + + --Description: TC's checks that + -- SDL must transfer OnKeyboardInput notification to the app associated with active PerfromInteraction (KEYBOARD) request + -- SDL must transfer OnKeyboardInput notification to any app that is currently in FULL if there is no active PerformInteraction (KEYBOARD) + + + --Begin Test case CommonRequestCheck.1 + --Description: This test is intended to check positive cases and when all parameters are in boundary conditions + + --Requirement id in JAMA: + -- TBD + + --Verification criteria: + +-- BEGIN TEST CASE 1.1 +-- Description: SDL must transfer OnKeyboardInput notification to the associated App (FULL) + +local tKeyboardEvent = {"KEYPRESS", "ENTRY_SUBMITTED", "ENTRY_VOICE", "ENTRY_CANCELLED", "ENTRY_ABORTED"} + +function Test:PreconditionChoiceSet() + testName("Create choice set", "pre") + createInteractionChoiceSet(self, 100, 100) +end + +for i,v in ipairs(tKeyboardEvent) do + Test["PerfromInteractionFromFull" .. v] = function (self) + SendPerformInteraction(self, "SDL transfer OnKeyboardInput to associated App in FULL", v, "FULL") + end +end +-- END TESTCASE 1.1 + +-- BEGIN TEST CASE 1.2. +-- Description: SDL must transfer OnKeyboardInput notification to the associated App (LIMITED) +function Test:PreconditionSwitchToAnotherPage() + testName("Switch to another page", "pre") + self.hmiConnection:SendNotification("BasicCommunication.OnAppDeactivated", {appID = self.applications["Test Application"], reason = "GENERAL"}) + EXPECT_NOTIFICATION( + "OnHMIStatus", + { hmiLevel = "LIMITED", audioStreamingState = "AUDIBLE", systemContext = "MAIN"}) + :Times(1) +end + +for i,v in ipairs(tKeyboardEvent) do + Test["PerfromInteractionFromLIMITED" .. v] = function (self) + SendPerformInteraction(self, "SDL transfer OnKeyboardInput to associated App in LIMITED", v, "LIMITED") + end +end +-- END TESTCASE 1.2 + +-- BEGIN TEST CASE 1.3 +-- Description: SDL must transfer OnKeyboard notification to the associated App (BACKGROUND) +function Test:PreconditionDeactivateApp1() + testName("Deactivate App", "pre") + + -- according to CRQ APPLINK-17839 + -- self.hmiConnection:SendNotification("BasicCommunication.OnAppDeactivated", {appID = self.applications["Test Application"], reason = "AUDIO"} + + self.hmiConnection:SendNotification("BasicCommunication.OnEventChanged", {eventName="AUDIO_SOURCE",isActive = true}) + EXPECT_NOTIFICATION( + "OnHMIStatus", + { hmiLevel = "BACKGROUND", audioStreamingState = "NOT_AUDIBLE", systemContext = "MAIN"}) + :Times(1) +end + +for i,v in ipairs(tKeyboardEvent) do + Test["PerfromInteractionFromBACKGROUND" .. v] = function (self) + SendPerformInteraction(self, "SDL transfer OnKeyboardInput to associated App in BACKGROUND", v, "BACKGROUND") + end +end +-- END TESTCASE 1.3 + +-- BEGIN TEST CASE 1.4 +-- Description: SDL transfer OnKeyboardInput notification only to active App if there is no Apps associated with PerformInteraction(KEYBOARD) +local tLayouts = {"ICON_ONLY", "ICON_WITH_SEARCH", "LIST_ONLY", "LIST_WITH_SEARCH"} + +--Begin Precondition.1 +--Description: AudioSource - end +function Test:EndAudioSource( ... ) + -- body + self.hmiConnection:SendNotification("BasicCommunication.OnEventChanged", {eventName="AUDIO_SOURCE",isActive = false}) + EXPECT_NOTIFICATION("OnHMIStatus", { hmiLevel = "LIMITED", audioStreamingState = "AUDIBLE", systemContext = "MAIN"}) + :Times(1) +end + +--Begin Precondition.2 +--Description: Activation App by sending SDL.ActivateApp +commonSteps:ActivationApp() + +--End Precondition.1 + +for i,layoutValue in ipairs(tLayouts) do + for i,keyboardValue in ipairs(tKeyboardEvent) do + Test["PerformInteraction_"..layoutValue.."_"..keyboardValue] = function (self) + SendPerformInteraction(self, "SDL transfer OnKeyboardInput only to App in FULL", keyboardValue, "FULL", layoutValue) + end + end +end +-- END TESTCASE 1.4 + +-- BEGIN TEST CASE 1.5 +-- Description: SDL doesn't transfer OnKeyboardInput notification to LIMITED App if there is no Apps associated with PerformInteraction(KEYBOARD) +function Test:PreconditionSwitchToAnotherPage() + testName("Switch to another page", "pre") + self.hmiConnection:SendNotification("BasicCommunication.OnAppDeactivated", {appID = self.applications["Test Application"], reason = "GENERAL"}) + EXPECT_NOTIFICATION( + "OnHMIStatus", + { hmiLevel = "LIMITED", audioStreamingState = "AUDIBLE", systemContext = "MAIN"}) + :Times(1) +end + +for i,layoutValue in ipairs(tLayouts) do + for i,keyboardValue in ipairs(tKeyboardEvent) do + Test["PerformInteraction_"..layoutValue.."_"..keyboardValue] = function (self) + SendPerformInteraction(self, "SDL transfer OnKeyboardInput only to App in LIMITED", keyboardValue, "LIMITED", layoutValue) + end + end +end +-- END TESTCASE 1.5 + +-- BEGIN TEST CASE 1.6 +-- Description: SDL doesn't transfer OnKeyboardInput notification to BACKGROUND App if there is no Apps associated with PerformInteraction(KEYBOARD) +function Test:PreconditionDeactivateApp1() + testName("Deactivate App", "pre") + + -- according to CRQ APPLINK-17839 + -- self.hmiConnection:SendNotification("BasicCommunication.OnAppDeactivated", {appID = self.applications["Test Application"], reason = "AUDIO"} + + self.hmiConnection:SendNotification("BasicCommunication.OnEventChanged", {eventName="AUDIO_SOURCE",isActive = true}) + EXPECT_NOTIFICATION( + "OnHMIStatus", + { hmiLevel = "BACKGROUND", audioStreamingState = "NOT_AUDIBLE", systemContext = "MAIN"}) + :Times(1) +end + +for i,layoutValue in ipairs(tLayouts) do + for i,keyboardValue in ipairs(tKeyboardEvent) do + Test["PerformInteraction" .. layoutValue .. keyboardValue] = function (self) + SendPerformInteraction(self, "SDL transfer OnKeyboardInput only to App in BACKGROUND", keyboardValue, "BACKGROUND", layoutValue) + end + end +end +-- END TESTCASE 1.6 + +-- BEGIN TEST CASE 1.7 +-- Description: One App - no PerformInteraction at all + +for i,v in ipairs(tKeyboardEvent) do + Test["NoPerformInteractionOneApp" .. v] = function (self) + self.hmiConnection:SendNotification("UI.OnKeyboardInput",{data="abc", event=v}) + EXPECT_NOTIFICATION("OnKeyboardInput") + :Times(0) + + DelayedExp(1000) + end +end +-- END TESTCASE 1.7 + + + +--------------------------------------------------------------------------------------------- +-------------------------------------END TEST BLOCK I---------------------------------------- +------------OnKeyboardInput: PerformInteraction(KEYBOARD) with one registered App------------ +--------------------------------------------------------------------------------------------- + + + +--------------------------------------------------------------------------------------------- +--------------------------------------II TEST BLOCK------------------------------------------ +------------OnKeyboardInput: PerformInteraction(KEYBOARD) with two registered Apps----------- +--------------------------------------------------------------------------------------------- + --Begin Test suit PositiveRequestCheck + + --Description: TC's checks that + -- SDL must transfer OnKeyboardInput notification to the app associated with active PerfromInteraction (KEYBOARD) request + -- SDL must transfer OnKeyboardInput notification to any app that is currently in FULL if there is no active PerformInteraction (KEYBOARD) + + + --Begin Test case CommonRequestCheck.1 + --Description: This test is intended to check positive cases and when all parameters are in boundary conditions + + --Requirement id in JAMA: + -- TBD + + --Verification criteria: + + +-- BEGIN TEST CASE 1.7 +-- Description: SDL must transfer OnKeyboardInput notification to associated App in FULL (2 Apps are registered) + +-- Start 2n session +local HMIappID2 = nil + +function Test:Precondition_SecondSession() + testName("Register second Application", "pre") + --mobile side: start new session + self.mobileSession1 = mobile_session.MobileSession( + self, + self.mobileConnection) +end + +-- Register 2nd App +function Test:Precondition_AppRegistrationInSecondSession() + --mobile side: start new + self.mobileSession1:StartService(7) + :Do(function() + local cid = self.mobileSession1:SendRPC( + "RegisterAppInterface", + { + syncMsgVersion = + { + majorVersion = 3, + minorVersion = 0 + }, + appName = "Test Application2", + isMediaApplication = true, + languageDesired = 'EN-US', + hmiDisplayLanguageDesired = 'EN-US', + appID = "0000002" + }) + + --hmi side: expect BasicCommunication.OnAppRegistered request + EXPECT_HMINOTIFICATION( + "BasicCommunication.OnAppRegistered", + { + application = + { + appName = "Test Application2" + } + }) + :Do(function(_,data) + HMIappID2 = data.params.application.appID + end) + + --mobile side: expect response + self.mobileSession1:ExpectResponse(cid, { success = true, resultCode = "SUCCESS" }) + :Timeout(2000) + + self.mobileSession1:ExpectNotification("OnHMIStatus",{hmiLevel = "NONE", audioStreamingState = "NOT_AUDIBLE", systemContext = "MAIN"}) + + end) +end + +function Test:EventChanged_Audio_not_active() + -- HMI sends EventChanged "AUDIO_SOURCE" + self.hmiConnection:SendNotification("BasicCommunication.OnEventChanged", {eventName="AUDIO_SOURCE",isActive = false}) + + self.mobileSession:ExpectNotification("OnHMIStatus",{hmiLevel = "FULL", audioStreamingState = "AUDIBLE", systemContext = "MAIN"}) + :Times(1) + + self.mobileSession1:ExpectNotification("OnHMIStatus", {}) + :Times(0) + + DelayedExp(100) +end + +-- Activate App2 +function Test:ActivateApp2() + + self:activateApp(HMIappID2, 2) + DelayedExp(100) + + self.mobileSession:ExpectNotification("OnHMIStatus",{hmiLevel = "BACKGROUND", audioStreamingState = "NOT_AUDIBLE", systemContext = "MAIN"}) + :Times(1) + +end + +-- Begin Precondition: choice set +function Test:PreconditionCreateChoiseSetSession2() + testName("Create choice set on session 2", "pre") + createInteractionChoiceSet(self, 100, 100, 2) +end +-- End Precondition + +-- PerformInteraction from App1 +for i,v in ipairs(tKeyboardEvent) do + Test["PerfromInteractionFromFULL" .. v] = function (self) + SendPerformInteraction(self, "SDL transfer OnKeyboardInput to associated App in FULL, 2 Apps are registered", v, "FULL", "KEYBOARD",2) + end +end +-- END TESTCASE 1.7 + + + +-- BEGIN TEST CASE 1.5 +-- Description: SDL must transfer OnKeyboardInput notification to associated App in LIMITED (2 Apps are registered) +function Test:PreconditionSwitchToAnotherPage2() + testName("Switch to another page", "pre") + self.hmiConnection:SendNotification("BasicCommunication.OnAppDeactivated", {appID = HMIappID2, reason = "GENERAL"}) + self.mobileSession1:ExpectNotification( + "OnHMIStatus", + {hmiLevel = "LIMITED", audioStreamingState = "AUDIBLE", systemContext = "MAIN"}) + :Times(1) + + EXPECT_NOTIFICATION("OnHMIStatus") + :Times(0) + + DelayedExp(100) +end + +for i,v in ipairs(tKeyboardEvent) do + Test["PerfromInteractionFromLIMITED" .. v] = function (self) + SendPerformInteraction(self, "SDL transfer OnKeyboardInput to associated App in LIMITED, 2 Apps are registered", v, "LIMITED", "KEYBOARD",2) + end +end +-- END TESTCASE 1.5 + + + +-- BEGIN TEST CASE 1.6 +-- Description: SDL must transfer OnKeyboardInput notification to associated App in BACKGROUND (2 Apps are registered) +function Test:PreconditionDeactivateApp2() + testName("Deactivate App", "pre") + + -- according to CRQ APPLINK-17839 + -- self.hmiConnection:SendNotification("BasicCommunication.OnAppDeactivated", {appID = self.applications["Test Application"], reason = "AUDIO"} + + self.hmiConnection:SendNotification("BasicCommunication.OnEventChanged", {eventName="AUDIO_SOURCE",isActive = true}) + self.mobileSession1:ExpectNotification( + "OnHMIStatus", + {hmiLevel = "BACKGROUND", audioStreamingState = "NOT_AUDIBLE", systemContext = "MAIN"}) + :Times(1) + + EXPECT_NOTIFICATION("OnHMIStatus") + :Times(0) + + DelayedExp(100) +end + +for i,v in ipairs(tKeyboardEvent) do + Test["PerfromInteractionFromBACKGROUND" .. v] = function (self) + SendPerformInteraction(self, "SDL transfer OnKeyboardInput to associated App in BACKGROUND, 2 Apps are registered", v, "BACKGROUND", "KEYBOARD",2) + end +end +-- END TESTCASE 1.6 + +-- BEGIN TEST CASE 2.5 +-- Description: OnKeyboardInputNotification while there is no active PerfromInteraction(KEYBOARD), One App in FULL + +--Begin Precondition.1 +--Description: AudioSource - end +function Test:EndAudioSource( ... ) + -- body + self.hmiConnection:SendNotification("BasicCommunication.OnEventChanged", {eventName="AUDIO_SOURCE",isActive = false}) + EXPECT_NOTIFICATION("OnHMIStatus", {}) + :Times(0) + + self.mobileSession1:ExpectNotification("OnHMIStatus", { hmiLevel = "LIMITED", audioStreamingState = "AUDIBLE", systemContext = "MAIN" }) + :Times(1) +end + +-- Activate App2 +function Test:ActivateApp2() + self:activateApp(HMIappID2, 2) + EXPECT_NOTIFICATION("OnHMIStatus") + :Times(0) + + DelayedExp(100) +end + +for i,layoutValue in ipairs(tLayouts) do + for i,keyboardValue in ipairs(tKeyboardEvent) do + Test["PerformInteraction_"..layoutValue.."_"..keyboardValue] = function (self) + SendPerformInteraction(self, "SDL transfer OnKeyboardInput only to App in FULL", keyboardValue, "FULL", layoutValue, 2) + end + end +end + +-- END TESTCASE 2.5 + + + +-- BEGIN TEST CASE 2.6 +-- Description: OnKeyboardInputNotification while there is no active PerfromInteraction(KEYBOARD), App1 - BACK, App2 - LIMITED +function Test:PreconditionSwitchToAnotherPage3() + testName("Switch to another page", "pre") + self.hmiConnection:SendNotification("BasicCommunication.OnAppDeactivated", {appID = HMIappID2, reason = "GENERAL"}) + self.mobileSession1:ExpectNotification("OnHMIStatus", + {hmiLevel = "LIMITED", audioStreamingState = "AUDIBLE", systemContext = "MAIN"}) + :Times(1) + + EXPECT_NOTIFICATION("OnHMIStatus") + :Times(0) +end + +for i,layoutValue in ipairs(tLayouts) do + for i,keyboardValue in ipairs(tKeyboardEvent) do + Test["PerformInteraction_"..layoutValue.."_"..keyboardValue] = function (self) + SendPerformInteraction(self, "SDL transfer OnKeyboardInput only to App in LIMITED", keyboardValue, "LIMITED", layoutValue, 2) + end + end +end +-- END TESTCASE 2.6 + + + +-- BEGIN TEST CASE 2.7 +-- Description: OnKeyboardInputNotification while there is no active PerfromInteraction(KEYBOARD), App1 and App2 - BACKGROUND +function Test:PreconditionDeactivateApp3() + testName("Deactivate App", "pre") + + -- according to CRQ APPLINK-17839 + -- self.hmiConnection:SendNotification("BasicCommunication.OnAppDeactivated", {appID = self.applications["Test Application"], reason = "AUDIO"} + + self.hmiConnection:SendNotification("BasicCommunication.OnEventChanged", {eventName="AUDIO_SOURCE",isActive = true}) + self.mobileSession1:ExpectNotification( + "OnHMIStatus", + {hmiLevel = "BACKGROUND", audioStreamingState = "NOT_AUDIBLE", systemContext = "MAIN"}) + :Times(1) + + EXPECT_NOTIFICATION("OnHMIStatus") + :Times(0) + + DelayedExp(100) +end + +for i,layoutValue in ipairs(tLayouts) do + for i,keyboardValue in ipairs(tKeyboardEvent) do + Test["PerformInteraction_"..layoutValue.."_"..keyboardValue] = function (self) + SendPerformInteraction(self, "SDL transfer OnKeyboardInput only to App in BACKGROUND", keyboardValue, "BACKGROUND", layoutValue, 2) + end + end +end +-- END TESTCASE 2.7 + + + +-- BEGIN TEST CASE 2.8 +-- Description: No active PerformInteraction at all - two Apps are registered +for i,v in ipairs(tKeyboardEvent) do + Test["NoPerformInteractionTwoApps" .. v] = function (self) + self.hmiConnection:SendNotification("UI.OnKeyboardInput",{data="abc", event=v}) + EXPECT_NOTIFICATION("OnKeyboardInput") + :Times(0) + + DelayedExp(1000) + end +end +-- END TESTCASE 2.8 + + + +-- BEGIN TEST CASE 2.9 +-- Description: OnKeyboardInput, no registered Apps at all + +-- Precondition: Unregister both Apps +function Test:UnregisterApplicationApp1() + --mobile side: UnregisterAppInterface request + local cid1 = self.mobileSession:SendRPC("UnregisterAppInterface",{}) + + --hmi side: expect OnAppUnregistered notification + + EXPECT_HMINOTIFICATION("BasicCommunication.OnAppUnregistered", {appID = HMIappID, unexpectedDisconnect = false}) + :Times(1) + + --mobile side: UnregisterAppInterface response + EXPECT_RESPONSE(cid1, { success = true, resultCode = "SUCCESS"}) + :Timeout(2000) + +end + +function Test:UnregisterApplicationApp2() + --mobile side: UnregisterAppInterface request + local cid2 = self.mobileSession1:SendRPC("UnregisterAppInterface", {}) + + --hmi side: expect OnAppUnregistered notification + + EXPECT_HMINOTIFICATION("BasicCommunication.OnAppUnregistered", {appID = HMIappID2, unexpectedDisconnect = false}) + :Times(1) + + --mobile side: UnregisterAppInterface response + self.mobileSession1:ExpectResponse(cid2, { success = true, resultCode = "SUCCESS"}) + :Timeout(2000) + +end + +for i,v in ipairs(tKeyboardEvent) do + Test["OnKeyboardInputNoApps" .. v] = function (self) + self.hmiConnection:SendNotification("UI.OnKeyboardInput", {data="abc", event=v}) + + DelayedExp(100) + end +end +-- END TESTCASE 2.9 + +--------------------------------------------------------------------------------------------- +------------------------------------END TEST BLOCK II---------------------------------------- +--CommonRequestCheck: Check of mandatory/conditional request's parameters (mobile protocol)-- +--------------------------------------------------------------------------------------------- + + + +--------------------------------------------------------------------------------------------- +-------------------------------------------Postcondition------------------------------------- +--------------------------------------------------------------------------------------------- + +--TODO: Will be updated after policy flow implementation +-- Postcondition: restore sdl_preloaded_pt.json +policyTable:Restore_preloaded_pt() + +return Test \ No newline at end of file diff --git a/test_scripts/API/ATF_OnPermissionsChange.lua b/test_scripts/API/ATF_OnPermissionsChange.lua new file mode 100644 index 0000000000..caae375686 --- /dev/null +++ b/test_scripts/API/ATF_OnPermissionsChange.lua @@ -0,0 +1,2232 @@ +--Note: For now please use ATF version "atf-2.1.3-r1" for running this script because ATF2.2 cannot compare 2 array data table (OnPermissionsChange data on mobile app) +-------------------------------------------------------------- +Test = require('connecttest') +require('cardinalities') +local events = require('events') +local mobile_session = require('mobile_session') + +local commonFunctions = require('user_modules/shared_testcases/commonFunctions') +local commonTestCases = require('user_modules/shared_testcases/commonTestCases') +local testCasesForPolicyTable = require('user_modules/shared_testcases/testCasesForPolicyTable') +require('user_modules/AppTypes') + +--List all application's permissions for checking on mobile app +local arrayRegisterNewApp = { + permissionItem = + { + { + hmiPermissions = { + userDisallowed = {}, + allowed = { "BACKGROUND", "FULL", "LIMITED", "NONE" } + }, + parameterPermissions = { + userDisallowed = {}, + allowed = {} + }, + rpcName = "ChangeRegistration" + }, + { + hmiPermissions = { + userDisallowed = {}, + allowed = { "BACKGROUND", "FULL", "LIMITED", "NONE" } + }, + parameterPermissions = { + userDisallowed = {}, + allowed = {} + }, + rpcName = "DeleteFile" + }, + { + hmiPermissions = { + userDisallowed = {}, + allowed = { "BACKGROUND", "FULL", "LIMITED", "NONE" } + }, + parameterPermissions = { + userDisallowed = {}, + allowed = {} + }, + rpcName = "EncodedSyncPData" + }, + { + hmiPermissions = { + userDisallowed = {}, + allowed = { "BACKGROUND", "FULL", "LIMITED", "NONE" } + }, + parameterPermissions = { + userDisallowed = {}, + allowed = {} + }, + rpcName = "ListFiles" + }, + { + hmiPermissions = { + userDisallowed = {}, + allowed = { "BACKGROUND", "FULL", "LIMITED", "NONE" } + }, + parameterPermissions = { + userDisallowed = {}, + allowed = {} + }, + rpcName = "OnAppInterfaceUnregistered" + }, + { + hmiPermissions = { + userDisallowed = {}, + allowed = { "BACKGROUND", "FULL", "LIMITED", "NONE" } + }, + parameterPermissions = { + userDisallowed = {}, + allowed = {} + }, + rpcName = "OnEncodedSyncPData" + }, + { + hmiPermissions = { + userDisallowed = {}, + allowed = { "BACKGROUND", "FULL", "LIMITED", "NONE" } + }, + parameterPermissions = { + userDisallowed = {}, + allowed = {} + }, + rpcName = "OnHMIStatus" + }, + { + hmiPermissions = { + userDisallowed = {}, + allowed = { "BACKGROUND", "FULL", "LIMITED", "NONE" } + }, + parameterPermissions = { + userDisallowed = {}, + allowed = {} + }, + rpcName = "OnHashChange" + }, + { + hmiPermissions = { + userDisallowed = {}, + allowed = { "BACKGROUND", "FULL", "LIMITED", "NONE" } + }, + parameterPermissions = { + userDisallowed = {}, + allowed = {} + }, + rpcName = "OnLanguageChange" + }, + { + hmiPermissions = { + userDisallowed = {}, + allowed = { "BACKGROUND", "FULL", "LIMITED", "NONE" } + }, + parameterPermissions = { + userDisallowed = {}, + allowed = {} + }, + rpcName = "OnPermissionsChange" + }, + { + hmiPermissions = { + userDisallowed = {}, + allowed = { "BACKGROUND", "FULL", "LIMITED", "NONE" } + }, + parameterPermissions = { + userDisallowed = {}, + allowed = {} + }, + rpcName = "OnSystemRequest" + }, + { + hmiPermissions = { + userDisallowed = {}, + allowed = { "BACKGROUND", "FULL", "LIMITED", "NONE" } + }, + parameterPermissions = { + userDisallowed = {}, + allowed = {} + }, + rpcName = "PutFile" + }, + { + hmiPermissions = { + userDisallowed = {}, + allowed = { "BACKGROUND", "FULL", "LIMITED", "NONE" } + }, + parameterPermissions = { + userDisallowed = {}, + allowed = {} + }, + rpcName = "RegisterAppInterface" + }, + { + hmiPermissions = { + userDisallowed = {}, + allowed = { "BACKGROUND", "FULL", "LIMITED", "NONE" } + }, + parameterPermissions = { + userDisallowed = {}, + allowed = {} + }, + rpcName = "ResetGlobalProperties" + }, + { + hmiPermissions = { + userDisallowed = {}, + allowed = { "BACKGROUND", "FULL", "LIMITED", "NONE" } + }, + parameterPermissions = { + userDisallowed = {}, + allowed = {} + }, + rpcName = "SetAppIcon" + }, + { + hmiPermissions = { + userDisallowed = {}, + allowed = { "BACKGROUND", "FULL", "LIMITED", "NONE" } + }, + parameterPermissions = { + userDisallowed = {}, + allowed = {} + }, + rpcName = "SetDisplayLayout" + }, + { + hmiPermissions = { + userDisallowed = {}, + allowed = { "BACKGROUND", "FULL", "LIMITED", "NONE" } + }, + parameterPermissions = { + userDisallowed = {}, + allowed = {} + }, + rpcName = "SetGlobalProperties" + }, + { + hmiPermissions = { + userDisallowed = {}, + allowed = { "BACKGROUND", "FULL", "LIMITED", "NONE" } + }, + parameterPermissions = { + userDisallowed = {}, + allowed = {} + }, + rpcName = "SystemRequest" + }, + { + hmiPermissions = { + userDisallowed = {}, + allowed = { "BACKGROUND", "FULL", "LIMITED", "NONE" } + }, + parameterPermissions = { + userDisallowed = {}, + allowed = {} + }, + rpcName = "UnregisterAppInterface" + } + } + } +local arrayUpdatePolicyAddGroup = { + permissionItem = + { + { + hmiPermissions = { + userDisallowed = {}, + allowed = { "BACKGROUND", "FULL", "LIMITED" } + }, + parameterPermissions = { + userDisallowed = {}, + allowed = {} + }, + rpcName = "AddCommand" + }, + { + hmiPermissions = { + userDisallowed = {}, + allowed = { "BACKGROUND", "FULL", "LIMITED" } + }, + parameterPermissions = { + userDisallowed = {}, + allowed = {} + }, + rpcName = "AddSubMenu" + }, + { + hmiPermissions = { + userDisallowed = {}, + allowed = { "FULL", "LIMITED" } + }, + rpcName = "Alert" + }, + { + hmiPermissions = { + userDisallowed = {}, + allowed = {} + }, + rpcName = "AlertManeuver" + }, + { + hmiPermissions = { + userDisallowed = {}, + allowed = { "BACKGROUND", "FULL", "LIMITED", "NONE" } + }, + parameterPermissions = { + userDisallowed = {}, + allowed = {} + }, + rpcName = "ChangeRegistration" + }, + { + parameterPermissions = { + userDisallowed = {}, + allowed = {} + }, + rpcName = "CreateInteractionChoiceSet" + }, + { + hmiPermissions = { + userDisallowed = {}, + allowed = { "BACKGROUND", "FULL", "LIMITED" } + }, + parameterPermissions = { + userDisallowed = {}, + allowed = {} + }, + rpcName = "DeleteCommand" + }, + { + hmiPermissions = { + userDisallowed = {}, + allowed = { "BACKGROUND", "FULL", "LIMITED", "NONE" } + }, + parameterPermissions = { + userDisallowed = {}, + allowed = {} + }, + rpcName = "DeleteFile" + }, + { + hmiPermissions = { + userDisallowed = {}, + allowed = { "BACKGROUND", "FULL", "LIMITED" } + }, + parameterPermissions = { + userDisallowed = {}, + allowed = {} + }, + rpcName = "DeleteInteractionChoiceSet" + }, + { + hmiPermissions = { + userDisallowed = {}, + allowed = { "BACKGROUND", "FULL", "LIMITED" } + }, + parameterPermissions = { + userDisallowed = {}, + allowed = {} + }, + rpcName = "DeleteSubMenu" + }, + { + hmiPermissions = { + userDisallowed = {}, + allowed = { "BACKGROUND", "FULL", "LIMITED" } + }, + parameterPermissions = { + userDisallowed = {}, + allowed = {} + }, + rpcName = "DiagnosticMessage" + }, + { + hmiPermissions = { + userDisallowed = {}, + allowed = { "BACKGROUND", "FULL", "LIMITED", "NONE" } + }, + parameterPermissions = { + userDisallowed = {}, + allowed = {} + }, + rpcName = "EncodedSyncPData" + }, + { + hmiPermissions = { + userDisallowed = {}, + allowed = { "BACKGROUND", "FULL", "LIMITED" } + }, + parameterPermissions = { + userDisallowed = {}, + allowed = {} + }, + rpcName = "EndAudioPassThru" + }, + { + hmiPermissions = { + userDisallowed = {}, + allowed = { "BACKGROUND", "FULL", "LIMITED" } + }, + parameterPermissions = { + userDisallowed = {}, + allowed = {} + }, + rpcName = "GenericResponse" + }, + { + hmiPermissions = { + userDisallowed = {}, + allowed = { "BACKGROUND", "FULL", "LIMITED" } + }, + parameterPermissions = { + userDisallowed = {}, + allowed = {} + }, + rpcName = "GetDTCs" + }, + { + hmiPermissions = { + userDisallowed = {}, + allowed = { "BACKGROUND", "FULL", "LIMITED", "NONE" } + }, + parameterPermissions = { + userDisallowed = {}, + allowed = {} + }, + rpcName = "ListFiles" + }, + { + hmiPermissions = { + userDisallowed = {}, + allowed = { "BACKGROUND", "FULL", "LIMITED", "NONE" } + }, + parameterPermissions = { + userDisallowed = {}, + allowed = {} + }, + rpcName = "OnAppInterfaceUnregistered" + }, + { + hmiPermissions = { + userDisallowed = {}, + allowed = { "BACKGROUND", "FULL", "LIMITED" } + }, + parameterPermissions = { + userDisallowed = {}, + allowed = {} + }, + rpcName = "OnAudioPassThru" + }, + { + hmiPermissions = { + userDisallowed = {}, + allowed = { "BACKGROUND", "FULL", "LIMITED" } + }, + parameterPermissions = { + userDisallowed = {}, + allowed = {} + }, + rpcName = "OnButtonEvent" + }, + { + hmiPermissions = { + userDisallowed = {}, + allowed = { "BACKGROUND", "FULL", "LIMITED" } + }, + parameterPermissions = { + userDisallowed = {}, + allowed = {} + }, + rpcName = "OnButtonPress" + }, + { + hmiPermissions = { + userDisallowed = {}, + allowed = { "BACKGROUND", "FULL", "LIMITED" } + }, + parameterPermissions = { + userDisallowed = {}, + allowed = {} + }, + rpcName = "OnCommand" + }, + { + hmiPermissions = { + userDisallowed = {}, + allowed = { "BACKGROUND", "FULL", "LIMITED" } + }, + parameterPermissions = { + userDisallowed = {}, + allowed = {} + }, + rpcName = "OnDriverDistraction" + }, + { + hmiPermissions = { + userDisallowed = {}, + allowed = { "BACKGROUND", "FULL", "LIMITED", "NONE" } + }, + parameterPermissions = { + userDisallowed = {}, + allowed = {} + }, + rpcName = "OnEncodedSyncPData" + }, + { + hmiPermissions = { + userDisallowed = {}, + allowed = { "BACKGROUND", "FULL", "LIMITED", "NONE" } + }, + parameterPermissions = { + userDisallowed = {}, + allowed = {} + }, + rpcName = "OnHMIStatus" + }, + { + hmiPermissions = { + userDisallowed = {}, + allowed = { "BACKGROUND", "FULL", "LIMITED", "NONE" } + }, + parameterPermissions = { + userDisallowed = {}, + allowed = {} + }, + rpcName = "OnHashChange" + }, + { + hmiPermissions = { + userDisallowed = {}, + allowed = { "BACKGROUND", "FULL", "LIMITED", "NONE" } + }, + parameterPermissions = { + userDisallowed = {}, + allowed = {} + }, + rpcName = "OnLanguageChange" + }, + { + hmiPermissions = { + userDisallowed = {}, + allowed = { "BACKGROUND", "FULL", "LIMITED", "NONE" } + }, + parameterPermissions = { + userDisallowed = {}, + allowed = {} + }, + rpcName = "OnPermissionsChange" + }, + { + hmiPermissions = { + userDisallowed = {}, + allowed = { "BACKGROUND", "FULL", "LIMITED", "NONE" } + }, + parameterPermissions = { + userDisallowed = {}, + allowed = {} + }, + rpcName = "OnSystemRequest" + }, + { + hmiPermissions = { + userDisallowed = {}, + allowed = { "FULL", "LIMITED" } + }, + parameterPermissions = { + userDisallowed = {}, + allowed = {} + }, + rpcName = "PerformAudioPassThru" + }, + { + hmiPermissions = { + userDisallowed = {}, + allowed = { "FULL", "LIMITED" } + }, + parameterPermissions = { + userDisallowed = {}, + allowed = {} + }, + rpcName = "PerformInteraction" + }, + { + hmiPermissions = { + userDisallowed = {}, + allowed = { "BACKGROUND", "FULL", "LIMITED", "NONE" } + }, + parameterPermissions = { + userDisallowed = {}, + allowed = {} + }, + rpcName = "PutFile" + }, + { + hmiPermissions = { + userDisallowed = {}, + allowed = { "BACKGROUND", "FULL", "LIMITED" } + }, + parameterPermissions = { + userDisallowed = {}, + allowed = {} + }, + rpcName = "ReadDID" + }, + { + hmiPermissions = { + userDisallowed = {}, + allowed = { "BACKGROUND", "FULL", "LIMITED", "NONE" } + }, + parameterPermissions = { + userDisallowed = {}, + allowed = {} + }, + rpcName = "RegisterAppInterface" + }, + { + hmiPermissions = { + userDisallowed = {}, + allowed = { "BACKGROUND", "FULL", "LIMITED", "NONE" } + }, + parameterPermissions = { + userDisallowed = {}, + allowed = {} + }, + rpcName = "ResetGlobalProperties" + }, + { + hmiPermissions = { + userDisallowed = {}, + allowed = { "FULL" } + }, + parameterPermissions = { + userDisallowed = {}, + allowed = {} + }, + rpcName = "ScrollableMessage" + }, + { + hmiPermissions = { + userDisallowed = {}, + allowed = { "BACKGROUND", "FULL", "LIMITED", "NONE" } + }, + parameterPermissions = { + userDisallowed = {}, + allowed = {} + }, + rpcName = "SetAppIcon" + }, + { + hmiPermissions = { + userDisallowed = {}, + allowed = { "BACKGROUND", "FULL", "LIMITED", "NONE" } + }, + parameterPermissions = { + userDisallowed = {}, + allowed = {} + }, + rpcName = "SetDisplayLayout" + }, + { + hmiPermissions = { + userDisallowed = {}, + allowed = { "BACKGROUND", "FULL", "LIMITED", "NONE" } + }, + parameterPermissions = { + userDisallowed = {}, + allowed = {} + }, + rpcName = "SetGlobalProperties" + }, + { + hmiPermissions = { + userDisallowed = {}, + allowed = { "BACKGROUND", "FULL", "LIMITED" } + }, + parameterPermissions = { + userDisallowed = {}, + allowed = {} + }, + rpcName = "SetMediaClockTimer" + }, + { + hmiPermissions = { + userDisallowed = {}, + allowed = { "BACKGROUND", "FULL", "LIMITED" } + }, + parameterPermissions = { + userDisallowed = {}, + allowed = {} + }, + rpcName = "Show" + }, + { + hmiPermissions = { + userDisallowed = {}, + allowed = { "BACKGROUND", "FULL", "LIMITED" } + }, + parameterPermissions = { + userDisallowed = {}, + allowed = {} + }, + rpcName = "ShowConstantTBT" + }, + { + hmiPermissions = { + userDisallowed = {}, + allowed = { "FULL" } + }, + parameterPermissions = { + userDisallowed = {}, + allowed = {} + }, + rpcName = "Slider" + }, + { + hmiPermissions = { + userDisallowed = {}, + allowed = { "FULL", "LIMITED" } + }, + parameterPermissions = { + userDisallowed = {}, + allowed = {} + }, + rpcName = "Speak" + }, + { + hmiPermissions = { + userDisallowed = {}, + allowed = { "BACKGROUND", "FULL", "LIMITED" } + }, + parameterPermissions = { + userDisallowed = {}, + allowed = {} + }, + rpcName = "SubscribeButton" + }, + { + hmiPermissions = { + userDisallowed = {}, + allowed = { "BACKGROUND", "FULL", "LIMITED", "NONE" } + }, + parameterPermissions = { + userDisallowed = {}, + allowed = {} + }, + rpcName = "SystemRequest" + }, + { + hmiPermissions = { + userDisallowed = {}, + allowed = { "BACKGROUND", "FULL", "LIMITED", "NONE" } + }, + parameterPermissions = { + userDisallowed = {}, + allowed = {} + }, + rpcName = "UnregisterAppInterface" + }, + { + hmiPermissions = { + userDisallowed = {}, + allowed = { "BACKGROUND", "FULL", "LIMITED" } + }, + parameterPermissions = { + userDisallowed = {}, + allowed = {} + }, + rpcName = "UnsubscribeButton" + }, + { + hmiPermissions = { + userDisallowed = {}, + allowed = { "BACKGROUND", "FULL", "LIMITED" } + }, + parameterPermissions = { + userDisallowed = {}, + allowed = {} + }, + rpcName = "UpdateTurnList" + } + } + } +local arrayUpdatePolicyRemoveGroup = { + permissionItem = + { + { + hmiPermissions = { + userDisallowed = {}, + allowed = { "BACKGROUND", "FULL", "LIMITED" } + }, + parameterPermissions = { + userDisallowed = {}, + allowed = {} + }, + rpcName = "AddCommand" + }, + { + hmiPermissions = { + userDisallowed = {}, + allowed = { "BACKGROUND", "FULL", "LIMITED" } + }, + parameterPermissions = { + userDisallowed = {}, + allowed = {} + }, + rpcName = "AddSubMenu" + }, + { + hmiPermissions = { + userDisallowed = {}, + allowed = { "FULL", "LIMITED" } + }, + rpcName = "Alert" + }, + { + hmiPermissions = { + userDisallowed = {}, + allowed = { "BACKGROUND", "FULL", "LIMITED", "NONE" } + }, + parameterPermissions = { + userDisallowed = {}, + allowed = {} + }, + rpcName = "ChangeRegistration" + }, + { + parameterPermissions = { + userDisallowed = {}, + allowed = {} + }, + rpcName = "CreateInteractionChoiceSet" + }, + { + hmiPermissions = { + userDisallowed = {}, + allowed = { "BACKGROUND", "FULL", "LIMITED" } + }, + parameterPermissions = { + userDisallowed = {}, + allowed = {} + }, + rpcName = "DeleteCommand" + }, + { + hmiPermissions = { + userDisallowed = {}, + allowed = { "BACKGROUND", "FULL", "LIMITED", "NONE" } + }, + parameterPermissions = { + userDisallowed = {}, + allowed = {} + }, + rpcName = "DeleteFile" + }, + { + hmiPermissions = { + userDisallowed = {}, + allowed = { "BACKGROUND", "FULL", "LIMITED" } + }, + parameterPermissions = { + userDisallowed = {}, + allowed = {} + }, + rpcName = "DeleteInteractionChoiceSet" + }, + { + hmiPermissions = { + userDisallowed = {}, + allowed = { "BACKGROUND", "FULL", "LIMITED" } + }, + parameterPermissions = { + userDisallowed = {}, + allowed = {} + }, + rpcName = "DeleteSubMenu" + }, + { + hmiPermissions = { + userDisallowed = { "BACKGROUND", "FULL", "LIMITED" }, + allowed = {} + }, + parameterPermissions = { + userDisallowed = {}, + allowed = {} + }, + rpcName = "DiagnosticMessage" + }, + { + hmiPermissions = { + userDisallowed = {}, + allowed = { "BACKGROUND", "FULL", "LIMITED", "NONE" } + }, + parameterPermissions = { + userDisallowed = {}, + allowed = {} + }, + rpcName = "EncodedSyncPData" + }, + { + hmiPermissions = { + userDisallowed = {}, + allowed = { "BACKGROUND", "FULL", "LIMITED" } + }, + parameterPermissions = { + userDisallowed = {}, + allowed = {} + }, + rpcName = "EndAudioPassThru" + }, + { + hmiPermissions = { + userDisallowed = {}, + allowed = { "BACKGROUND", "FULL", "LIMITED" } + }, + parameterPermissions = { + userDisallowed = {}, + allowed = {} + }, + rpcName = "GenericResponse" + }, + { + hmiPermissions = { + userDisallowed = { "BACKGROUND", "FULL", "LIMITED" }, + allowed = {} + }, + parameterPermissions = { + userDisallowed = {}, + allowed = {} + }, + rpcName = "GetDTCs" + }, + { + hmiPermissions = { + userDisallowed = {}, + allowed = { "BACKGROUND", "FULL", "LIMITED", "NONE" } + }, + parameterPermissions = { + userDisallowed = {}, + allowed = {} + }, + rpcName = "ListFiles" + }, + { + hmiPermissions = { + userDisallowed = {}, + allowed = { "BACKGROUND", "FULL", "LIMITED", "NONE" } + }, + parameterPermissions = { + userDisallowed = {}, + allowed = {} + }, + rpcName = "OnAppInterfaceUnregistered" + }, + { + hmiPermissions = { + userDisallowed = {}, + allowed = { "BACKGROUND", "FULL", "LIMITED" } + }, + parameterPermissions = { + userDisallowed = {}, + allowed = {} + }, + rpcName = "OnAudioPassThru" + }, + { + hmiPermissions = { + userDisallowed = {}, + allowed = { "BACKGROUND", "FULL", "LIMITED" } + }, + parameterPermissions = { + userDisallowed = {}, + allowed = {} + }, + rpcName = "OnButtonEvent" + }, + { + hmiPermissions = { + userDisallowed = {}, + allowed = { "BACKGROUND", "FULL", "LIMITED" } + }, + parameterPermissions = { + userDisallowed = {}, + allowed = {} + }, + rpcName = "OnButtonPress" + }, + { + hmiPermissions = { + userDisallowed = {}, + allowed = { "BACKGROUND", "FULL", "LIMITED" } + }, + parameterPermissions = { + userDisallowed = {}, + allowed = {} + }, + rpcName = "OnCommand" + }, + { + hmiPermissions = { + userDisallowed = {}, + allowed = { "BACKGROUND", "FULL", "LIMITED" } + }, + parameterPermissions = { + userDisallowed = {}, + allowed = {} + }, + rpcName = "OnDriverDistraction" + }, + { + hmiPermissions = { + userDisallowed = {}, + allowed = { "BACKGROUND", "FULL", "LIMITED", "NONE" } + }, + parameterPermissions = { + userDisallowed = {}, + allowed = {} + }, + rpcName = "OnEncodedSyncPData" + }, + { + hmiPermissions = { + userDisallowed = {}, + allowed = { "BACKGROUND", "FULL", "LIMITED", "NONE" } + }, + parameterPermissions = { + userDisallowed = {}, + allowed = {} + }, + rpcName = "OnHMIStatus" + }, + { + hmiPermissions = { + userDisallowed = {}, + allowed = { "BACKGROUND", "FULL", "LIMITED", "NONE" } + }, + parameterPermissions = { + userDisallowed = {}, + allowed = {} + }, + rpcName = "OnHashChange" + }, + { + hmiPermissions = { + userDisallowed = {}, + allowed = { "BACKGROUND", "FULL", "LIMITED", "NONE" } + }, + parameterPermissions = { + userDisallowed = {}, + allowed = {} + }, + rpcName = "OnLanguageChange" + }, + { + hmiPermissions = { + userDisallowed = {}, + allowed = { "BACKGROUND", "FULL", "LIMITED", "NONE" } + }, + parameterPermissions = { + userDisallowed = {}, + allowed = {} + }, + rpcName = "OnPermissionsChange" + }, + { + hmiPermissions = { + userDisallowed = {}, + allowed = { "BACKGROUND", "FULL", "LIMITED", "NONE" } + }, + parameterPermissions = { + userDisallowed = {}, + allowed = {} + }, + rpcName = "OnSystemRequest" + }, + { + hmiPermissions = { + userDisallowed = {}, + allowed = { "FULL", "LIMITED" } + }, + parameterPermissions = { + userDisallowed = {}, + allowed = {} + }, + rpcName = "PerformAudioPassThru" + }, + { + hmiPermissions = { + userDisallowed = {}, + allowed = { "FULL", "LIMITED" } + }, + parameterPermissions = { + userDisallowed = {}, + allowed = {} + }, + rpcName = "PerformInteraction" + }, + { + hmiPermissions = { + userDisallowed = {}, + allowed = { "BACKGROUND", "FULL", "LIMITED", "NONE" } + }, + parameterPermissions = { + userDisallowed = {}, + allowed = {} + }, + rpcName = "PutFile" + }, + { + hmiPermissions = { + userDisallowed = { "BACKGROUND", "FULL", "LIMITED" }, + allowed = {} + }, + parameterPermissions = { + userDisallowed = {}, + allowed = {} + }, + rpcName = "ReadDID" + }, + { + hmiPermissions = { + userDisallowed = {}, + allowed = { "BACKGROUND", "FULL", "LIMITED", "NONE" } + }, + parameterPermissions = { + userDisallowed = {}, + allowed = {} + }, + rpcName = "RegisterAppInterface" + }, + { + hmiPermissions = { + userDisallowed = {}, + allowed = { "BACKGROUND", "FULL", "LIMITED", "NONE" } + }, + parameterPermissions = { + userDisallowed = {}, + allowed = {} + }, + rpcName = "ResetGlobalProperties" + }, + { + hmiPermissions = { + userDisallowed = {}, + allowed = { "FULL" } + }, + parameterPermissions = { + userDisallowed = {}, + allowed = {} + }, + rpcName = "ScrollableMessage" + }, + { + hmiPermissions = { + userDisallowed = {}, + allowed = { "BACKGROUND", "FULL", "LIMITED", "NONE" } + }, + parameterPermissions = { + userDisallowed = {}, + allowed = {} + }, + rpcName = "SetAppIcon" + }, + { + hmiPermissions = { + userDisallowed = {}, + allowed = { "BACKGROUND", "FULL", "LIMITED", "NONE" } + }, + parameterPermissions = { + userDisallowed = {}, + allowed = {} + }, + rpcName = "SetDisplayLayout" + }, + { + hmiPermissions = { + userDisallowed = {}, + allowed = { "BACKGROUND", "FULL", "LIMITED", "NONE" } + }, + parameterPermissions = { + userDisallowed = {}, + allowed = {} + }, + rpcName = "SetGlobalProperties" + }, + { + hmiPermissions = { + userDisallowed = {}, + allowed = { "BACKGROUND", "FULL", "LIMITED" } + }, + parameterPermissions = { + userDisallowed = {}, + allowed = {} + }, + rpcName = "SetMediaClockTimer" + }, + { + hmiPermissions = { + userDisallowed = {}, + allowed = { "BACKGROUND", "FULL", "LIMITED" } + }, + parameterPermissions = { + userDisallowed = {}, + allowed = {} + }, + rpcName = "Show" + }, + { + hmiPermissions = { + userDisallowed = {}, + allowed = { "FULL" } + }, + parameterPermissions = { + userDisallowed = {}, + allowed = {} + }, + rpcName = "Slider" + }, + { + hmiPermissions = { + userDisallowed = {}, + allowed = { "FULL", "LIMITED" } + }, + parameterPermissions = { + userDisallowed = {}, + allowed = {} + }, + rpcName = "Speak" + }, + { + hmiPermissions = { + userDisallowed = {}, + allowed = { "BACKGROUND", "FULL", "LIMITED" } + }, + parameterPermissions = { + userDisallowed = {}, + allowed = {} + }, + rpcName = "SubscribeButton" + }, + { + hmiPermissions = { + userDisallowed = {}, + allowed = { "BACKGROUND", "FULL", "LIMITED", "NONE" } + }, + parameterPermissions = { + userDisallowed = {}, + allowed = {} + }, + rpcName = "SystemRequest" + }, + { + hmiPermissions = { + userDisallowed = {}, + allowed = { "BACKGROUND", "FULL", "LIMITED", "NONE" } + }, + parameterPermissions = { + userDisallowed = {}, + allowed = {} + }, + rpcName = "UnregisterAppInterface" + }, + { + hmiPermissions = { + userDisallowed = {}, + allowed = { "BACKGROUND", "FULL", "LIMITED" } + }, + parameterPermissions = { + userDisallowed = {}, + allowed = {} + }, + rpcName = "UnsubscribeButton" + } + } + } +local arrayUserConsentChange = { + permissionItem = + { + { + hmiPermissions = { + userDisallowed = {}, + allowed = { "BACKGROUND", "FULL", "LIMITED" } + }, + parameterPermissions = { + userDisallowed = {}, + allowed = {} + }, + rpcName = "AddCommand" + }, + { + hmiPermissions = { + userDisallowed = {}, + allowed = { "BACKGROUND", "FULL", "LIMITED" } + }, + parameterPermissions = { + userDisallowed = {}, + allowed = {} + }, + rpcName = "AddSubMenu" + }, + { + hmiPermissions = { + userDisallowed = {}, + allowed = { "FULL", "LIMITED" } + }, + rpcName = "Alert" + }, + { + hmiPermissions = { + userDisallowed = {}, + allowed = { "BACKGROUND", "FULL", "LIMITED", "NONE" } + }, + parameterPermissions = { + userDisallowed = {}, + allowed = {} + }, + rpcName = "ChangeRegistration" + }, + { + parameterPermissions = { + userDisallowed = {}, + allowed = {} + }, + rpcName = "CreateInteractionChoiceSet" + }, + { + hmiPermissions = { + userDisallowed = {}, + allowed = { "BACKGROUND", "FULL", "LIMITED" } + }, + parameterPermissions = { + userDisallowed = {}, + allowed = {} + }, + rpcName = "DeleteCommand" + }, + { + hmiPermissions = { + userDisallowed = {}, + allowed = { "BACKGROUND", "FULL", "LIMITED", "NONE" } + }, + parameterPermissions = { + userDisallowed = {}, + allowed = {} + }, + rpcName = "DeleteFile" + }, + { + hmiPermissions = { + userDisallowed = {}, + allowed = { "BACKGROUND", "FULL", "LIMITED" } + }, + parameterPermissions = { + userDisallowed = {}, + allowed = {} + }, + rpcName = "DeleteInteractionChoiceSet" + }, + { + hmiPermissions = { + userDisallowed = {}, + allowed = { "BACKGROUND", "FULL", "LIMITED" } + }, + parameterPermissions = { + userDisallowed = {}, + allowed = {} + }, + rpcName = "DeleteSubMenu" + }, + { + hmiPermissions = { + userDisallowed = {}, + allowed = { "BACKGROUND", "FULL", "LIMITED", "NONE" } + }, + parameterPermissions = { + userDisallowed = {}, + allowed = {} + }, + rpcName = "EncodedSyncPData" + }, + { + hmiPermissions = { + userDisallowed = {}, + allowed = { "BACKGROUND", "FULL", "LIMITED" } + }, + parameterPermissions = { + userDisallowed = {}, + allowed = {} + }, + rpcName = "EndAudioPassThru" + }, + { + hmiPermissions = { + userDisallowed = {}, + allowed = { "BACKGROUND", "FULL", "LIMITED" } + }, + parameterPermissions = { + userDisallowed = {}, + allowed = {} + }, + rpcName = "GenericResponse" + }, + { + hmiPermissions = { + userDisallowed = { "BACKGROUND", "FULL", "LIMITED" }, + allowed = {} + }, + parameterPermissions = { + userDisallowed = { "accPedalPosition", "beltStatus", "driverBraking", "myKey", "prndl", "rpm", "steeringWheelAngle"}, + allowed = {} + }, + rpcName = "GetVehicleData" + }, + { + hmiPermissions = { + userDisallowed = {}, + allowed = { "BACKGROUND", "FULL", "LIMITED", "NONE" } + }, + parameterPermissions = { + userDisallowed = {}, + allowed = {} + }, + rpcName = "ListFiles" + }, + { + hmiPermissions = { + userDisallowed = {}, + allowed = { "BACKGROUND", "FULL", "LIMITED", "NONE" } + }, + parameterPermissions = { + userDisallowed = {}, + allowed = {} + }, + rpcName = "OnAppInterfaceUnregistered" + }, + { + hmiPermissions = { + userDisallowed = {}, + allowed = { "BACKGROUND", "FULL", "LIMITED" } + }, + parameterPermissions = { + userDisallowed = {}, + allowed = {} + }, + rpcName = "OnAudioPassThru" + }, + { + hmiPermissions = { + userDisallowed = {}, + allowed = { "BACKGROUND", "FULL", "LIMITED" } + }, + parameterPermissions = { + userDisallowed = {}, + allowed = {} + }, + rpcName = "OnButtonEvent" + }, + { + hmiPermissions = { + userDisallowed = {}, + allowed = { "BACKGROUND", "FULL", "LIMITED" } + }, + parameterPermissions = { + userDisallowed = {}, + allowed = {} + }, + rpcName = "OnButtonPress" + }, + { + hmiPermissions = { + userDisallowed = {}, + allowed = { "BACKGROUND", "FULL", "LIMITED" } + }, + parameterPermissions = { + userDisallowed = {}, + allowed = {} + }, + rpcName = "OnCommand" + }, + { + hmiPermissions = { + userDisallowed = {}, + allowed = { "BACKGROUND", "FULL", "LIMITED" } + }, + parameterPermissions = { + userDisallowed = {}, + allowed = {} + }, + rpcName = "OnDriverDistraction" + }, + { + hmiPermissions = { + userDisallowed = {}, + allowed = { "BACKGROUND", "FULL", "LIMITED", "NONE" } + }, + parameterPermissions = { + userDisallowed = {}, + allowed = {} + }, + rpcName = "OnEncodedSyncPData" + }, + { + hmiPermissions = { + userDisallowed = {}, + allowed = { "BACKGROUND", "FULL", "LIMITED", "NONE" } + }, + parameterPermissions = { + userDisallowed = {}, + allowed = {} + }, + rpcName = "OnHMIStatus" + }, + { + hmiPermissions = { + userDisallowed = {}, + allowed = { "BACKGROUND", "FULL", "LIMITED", "NONE" } + }, + parameterPermissions = { + userDisallowed = {}, + allowed = {} + }, + rpcName = "OnHashChange" + }, + { + hmiPermissions = { + userDisallowed = {}, + allowed = { "BACKGROUND", "FULL", "LIMITED", "NONE" } + }, + parameterPermissions = { + userDisallowed = {}, + allowed = {} + }, + rpcName = "OnLanguageChange" + }, + { + hmiPermissions = { + userDisallowed = {}, + allowed = { "BACKGROUND", "FULL", "LIMITED", "NONE" } + }, + parameterPermissions = { + userDisallowed = {}, + allowed = {} + }, + rpcName = "OnPermissionsChange" + }, + { + hmiPermissions = { + userDisallowed = {}, + allowed = { "BACKGROUND", "FULL", "LIMITED", "NONE" } + }, + parameterPermissions = { + userDisallowed = {}, + allowed = {} + }, + rpcName = "OnSystemRequest" + }, + { + hmiPermissions = { + userDisallowed = { "BACKGROUND", "FULL", "LIMITED" }, + allowed = {} + }, + parameterPermissions = { + userDisallowed = { "accPedalPosition", "beltStatus", "driverBraking", "myKey", "prndl", "rpm", "steeringWheelAngle"}, + allowed = {} + }, + rpcName = "OnVehicleData" + }, + { + hmiPermissions = { + userDisallowed = {}, + allowed = { "FULL", "LIMITED" } + }, + parameterPermissions = { + userDisallowed = {}, + allowed = {} + }, + rpcName = "PerformAudioPassThru" + }, + { + hmiPermissions = { + userDisallowed = {}, + allowed = { "FULL", "LIMITED" } + }, + parameterPermissions = { + userDisallowed = {}, + allowed = {} + }, + rpcName = "PerformInteraction" + }, + { + hmiPermissions = { + userDisallowed = {}, + allowed = { "BACKGROUND", "FULL", "LIMITED", "NONE" } + }, + parameterPermissions = { + userDisallowed = {}, + allowed = {} + }, + rpcName = "PutFile" + }, + { + hmiPermissions = { + userDisallowed = {}, + allowed = { "BACKGROUND", "FULL", "LIMITED", "NONE" } + }, + parameterPermissions = { + userDisallowed = {}, + allowed = {} + }, + rpcName = "RegisterAppInterface" + }, + { + hmiPermissions = { + userDisallowed = {}, + allowed = { "BACKGROUND", "FULL", "LIMITED", "NONE" } + }, + parameterPermissions = { + userDisallowed = {}, + allowed = {} + }, + rpcName = "ResetGlobalProperties" + }, + { + hmiPermissions = { + userDisallowed = {}, + allowed = { "FULL" } + }, + parameterPermissions = { + userDisallowed = {}, + allowed = {} + }, + rpcName = "ScrollableMessage" + }, + { + hmiPermissions = { + userDisallowed = {}, + allowed = { "BACKGROUND", "FULL", "LIMITED", "NONE" } + }, + parameterPermissions = { + userDisallowed = {}, + allowed = {} + }, + rpcName = "SetAppIcon" + }, + { + hmiPermissions = { + userDisallowed = {}, + allowed = { "BACKGROUND", "FULL", "LIMITED", "NONE" } + }, + parameterPermissions = { + userDisallowed = {}, + allowed = {} + }, + rpcName = "SetDisplayLayout" + }, + { + hmiPermissions = { + userDisallowed = {}, + allowed = { "BACKGROUND", "FULL", "LIMITED", "NONE" } + }, + parameterPermissions = { + userDisallowed = {}, + allowed = {} + }, + rpcName = "SetGlobalProperties" + }, + { + hmiPermissions = { + userDisallowed = {}, + allowed = { "BACKGROUND", "FULL", "LIMITED" } + }, + parameterPermissions = { + userDisallowed = {}, + allowed = {} + }, + rpcName = "SetMediaClockTimer" + }, + { + hmiPermissions = { + userDisallowed = {}, + allowed = { "BACKGROUND", "FULL", "LIMITED" } + }, + parameterPermissions = { + userDisallowed = {}, + allowed = {} + }, + rpcName = "Show" + }, + { + hmiPermissions = { + userDisallowed = {}, + allowed = { "FULL" } + }, + parameterPermissions = { + userDisallowed = {}, + allowed = {} + }, + rpcName = "Slider" + }, + { + hmiPermissions = { + userDisallowed = {}, + allowed = { "FULL", "LIMITED" } + }, + parameterPermissions = { + userDisallowed = {}, + allowed = {} + }, + rpcName = "Speak" + }, + { + hmiPermissions = { + userDisallowed = {}, + allowed = { "BACKGROUND", "FULL", "LIMITED" } + }, + parameterPermissions = { + userDisallowed = {}, + allowed = {} + }, + rpcName = "SubscribeButton" + }, + { + hmiPermissions = { + userDisallowed = { "BACKGROUND", "FULL", "LIMITED" }, + allowed = {} + }, + parameterPermissions = { + userDisallowed = { "accPedalPosition", "beltStatus", "driverBraking", "myKey", "prndl", "rpm", "steeringWheelAngle"}, + allowed = {} + }, + rpcName = "SubscribeVehicleData" + }, + { + hmiPermissions = { + userDisallowed = {}, + allowed = { "BACKGROUND", "FULL", "LIMITED", "NONE" } + }, + parameterPermissions = { + userDisallowed = {}, + allowed = {} + }, + rpcName = "SystemRequest" + }, + { + hmiPermissions = { + userDisallowed = {}, + allowed = { "BACKGROUND", "FULL", "LIMITED" } + }, + parameterPermissions = { + userDisallowed = {}, + allowed = {} + }, + rpcName = "UnregisterAppInterface" + }, + { + hmiPermissions = { + userDisallowed = {}, + allowed = { "BACKGROUND", "FULL", "LIMITED" } + }, + parameterPermissions = { + userDisallowed = {}, + allowed = {} + }, + rpcName = "UnsubscribeButton" + }, + { + hmiPermissions = { + userDisallowed = { "BACKGROUND", "FULL", "LIMITED" }, + allowed = {} + }, + parameterPermissions = { + userDisallowed = { "accPedalPosition", "beltStatus", "driverBraking", "myKey", "prndl", "rpm", "steeringWheelAngle"}, + allowed = {} + }, + rpcName = "UnsubscribeVehicleData" + } + } + } + +--Use "atf-2.1.3-r1" for running this script because ATF2.2 cannot compare 2 array data tables (OnPermissionsChange data on mobile app) +--------------------------------------------------------------------------------------------------------------------- +-----------------------I - SCRIPT TO COVERAGE onPermissionsChange NOTIFICATION--------------------------------------- +-------SDL sends onPermissionsChange notification to mobile app when application's permissions are changed---------- +--------------------------------------------------------------------------------------------------------------------- +--Requirement id in JAMA or JIRA: + --APPLINK-19918: [OnPermissionsChange] send after successful registration + --APPLINK-19922: [OnPermissionsChange] send after app's permissions change by Policy Table Update + --APPLINK-19930: [OnPermissionsChange] send after user's consent change for app's permissions +--------------------------------------------------------------------------------------------------------------------- + +local function SequenceOnPemissionsChange() + +---------------------------------------------------------------------------------------------------------------------- +---------------------------------------------------Common function---------------------------------------------------- +---------------------------------------------------------------------------------------------------------------------- + + --Description: Using to activate app with specified session + function Test:activateApp(applicationID, session) + + --hmi side: sending SDL.ActivateApp request + local RequestId=self.hmiConnection:SendRequest("SDL.ActivateApp", { appID=applicationID}) + + --hmi side: expect SDL.ActivateApp response + EXPECT_HMIRESPONSE(RequestId) + :Do(function(_,data) + --In case when app is not allowed, it is needed to allow app + if + data.result.isSDLAllowed ~= true then + + --hmi side: sending SDL.GetUserFriendlyMessage request + local RequestId=self.hmiConnection:SendRequest("SDL.GetUserFriendlyMessage", + {language="EN-US", messageCodes={"DataConsent"}}) + + --hmi side: expect SDL.GetUserFriendlyMessage response + --TODO: Update after resolving APPLINK-16094 EXPECT_HMIRESPONSE(RequestId,{result={code=0, method="SDL.GetUserFriendlyMessage"}}) + EXPECT_HMIRESPONSE(RequestId) + :Do(function(_,data) + + --hmi side: send request SDL.OnAllowSDLFunctionality + self.hmiConnection:SendNotification("SDL.OnAllowSDLFunctionality", + {allowed=true, source="GUI", device={id=config.deviceMAC, name="127.0.0.1"}}) + + --hmi side: expect BasicCommunication.ActivateApp request + EXPECT_HMICALL("BasicCommunication.ActivateApp") + :Do(function(_,data) + --hmi side: sending BasicCommunication.ActivateApp response + self.hmiConnection:SendResponse(data.id,"BasicCommunication.ActivateApp", "SUCCESS", {}) + end) + :Times(AnyNumber()) + end) + end + end) + + if (session == 1) then + --mobile side: expect OnHMIStatus notification + self.mobileSession:ExpectNotification("OnHMIStatus", {hmiLevel="FULL", systemContext="MAIN"}) + else + self.mobileSession1:ExpectNotification("OnHMIStatus", {hmiLevel="FULL", systemContext="MAIN"}) + end + end + + ----------------------------------------------------------------------------------------------------------------- + + --Description: Using to update policy and check OnPermissionChange with specified App + function Test:updatePolicy_CheckOnPermissionChange_SpecifiedApp(policyFile, arrayOnPermissionsChange) + + --hmi side: sending SDL.GetURLS request + local RequestIdGetURLS = self.hmiConnection:SendRequest("SDL.GetURLS", { service = 7 }) + + --hmi side: expect SDL.GetURLS response from HMI + EXPECT_HMIRESPONSE(RequestIdGetURLS,{result = {code = 0, method = "SDL.GetURLS", urls = {{url = "http://policies.telematics.ford.com/api/policies"}}}}) + :Do(function(_,data) + --hmi side: sending BasicCommunication.OnSystemRequest request to SDL + self.hmiConnection:SendNotification("BasicCommunication.OnSystemRequest", + { + appID = appId, + fileName = "/tmp/fs/mp/images/ivsu_cache/sdl_snapshot.json", + fileType="JSON", + length=10000, + offset=1000, + policyAppID="default", + requestType = "HTTP", + timeout=500, + url="http://policies.telematics.ford.com/api/policies" + } + ) + --mobile side: expect OnSystemRequest notification + self.mobileSession1:ExpectNotification("OnSystemRequest", { requestType = "HTTP" }) + :Do(function(_,data) + --mobile side: sending SystemRequest request + local CorIdSystemRequest = self.mobileSession1:SendRPC("SystemRequest", + { + fileName = "PolicyTableUpdate", + requestType = "HTTP" + }, + "files/" .. policyFile) + + local systemRequestId + --hmi side: expect SystemRequest request + EXPECT_HMICALL("BasicCommunication.SystemRequest") + :Do(function(_,data) + systemRequestId = data.id + --hmi side: sending BasicCommunication.OnSystemRequest request to SDL + self.hmiConnection:SendNotification("SDL.OnReceivedPolicyUpdate", + { + policyfile = "/tmp/fs/mp/images/ivsu_cache/PolicyTableUpdate" + } + ) + function to_run() + --hmi side: sending SystemRequest response + self.hmiConnection:SendResponse(systemRequestId,"BasicCommunication.SystemRequest", "SUCCESS", {}) + end + + RUN_AFTER(to_run, 500) + end) + + --hmi side: expect SDL.OnStatusUpdate + EXPECT_HMINOTIFICATION("SDL.OnStatusUpdate") + :ValidIf(function(exp,data) + if + exp.occurences == 1 and + data.params.status == "UP_TO_DATE" then + return true + elseif + exp.occurences == 1 and + data.params.status == "UPDATING" then + return true + elseif + exp.occurences == 2 and + data.params.status == "UP_TO_DATE" then + return true + else + if + exp.occurences == 1 then + print ("\27[31m SDL.OnStatusUpdate came with wrong values. Expected in first occurrences status 'UP_TO_DATE' or 'UPDATING', got '" .. tostring(data.params.status) .. "' \27[0m") + elseif exp.occurences == 2 then + print ("\27[31m SDL.OnStatusUpdate came with wrong values. Expected in second occurrences status 'UP_TO_DATE', got '" .. tostring(data.params.status) .. "' \27[0m") + end + return false + end + end) + :Times(Between(1,2)) + + --mobile side: expect SystemRequest response + self.mobileSession1:ExpectResponse(CorIdSystemRequest, { success = true, resultCode = "SUCCESS"}) + :Do(function(_,data) + --hmi side: sending SDL.GetUserFriendlyMessage request to SDL + local RequestIdGetUserFriendlyMessage = self.hmiConnection:SendRequest("SDL.GetUserFriendlyMessage", {language = "EN-US", messageCodes = {"StatusUpToDate"}}) + + --hmi side: expect SDL.GetUserFriendlyMessage response + EXPECT_HMIRESPONSE(RequestIdGetUserFriendlyMessage,{result = {code = 0, method = "SDL.GetUserFriendlyMessage", messages = {{line1 = "Up-To-Date", messageCode = "StatusUpToDate", textBody = "Up-To-Date"}}}}) + :Do(function(_,data) + end) + end) + + end) + + --mobile side: Expect OnPermissionsChange notification (specific policy) + self.mobileSession1:ExpectNotification("OnPermissionsChange", arrayOnPermissionsChange ) + -- :Do(function(_,data) --TODO: USING FOR UPDATING SCRIPT AFTER FIXING APPLINK-20213 DEFECT + -- commonFunctions:printTable(data.payload) + -- end) + + --mobile side: Expect doesn't receive OnPermissionsChange notification (default policy) + self.mobileSession:ExpectNotification("OnPermissionsChange", arrayOnPermissionsChange ) + :Times(0) + + commonTestCases:DelayedExp(5000) + + end) + + end + + ----------------------------------------------------------------------------------------------------------------- + + --Description: Using to update policy and check OnPermissionChange with default App + function Test:updatePolicy_CheckOnPermissionChange_DefaultApp(policyFile, arrayOnPermissionsChange) + + --hmi side: sending SDL.GetURLS request + local RequestIdGetURLS = self.hmiConnection:SendRequest("SDL.GetURLS", { service = 7 }) + + --hmi side: expect SDL.GetURLS response from HMI + EXPECT_HMIRESPONSE(RequestIdGetURLS,{result = {code = 0, method = "SDL.GetURLS", urls = {{url = "http://policies.telematics.ford.com/api/policies"}}}}) + :Do(function(_,data) + --hmi side: sending BasicCommunication.OnSystemRequest request to SDL + self.hmiConnection:SendNotification("BasicCommunication.OnSystemRequest", + { + requestType = "PROPRIETARY", + fileName = "filename" + } + ) + --mobile side: expect OnSystemRequest notification + EXPECT_NOTIFICATION("OnSystemRequest", { requestType = "PROPRIETARY" }) + :Do(function(_,data) + --mobile side: sending SystemRequest request + local CorIdSystemRequest = self.mobileSession:SendRPC("SystemRequest", + { + fileName = "PolicyTableUpdate", + requestType = "PROPRIETARY" + }, + "files/" .. policyFile) + + local systemRequestId + --hmi side: expect SystemRequest request + EXPECT_HMICALL("BasicCommunication.SystemRequest") + :Do(function(_,data) + systemRequestId = data.id + --hmi side: sending BasicCommunication.OnSystemRequest request to SDL + self.hmiConnection:SendNotification("SDL.OnReceivedPolicyUpdate", + { + policyfile = "/tmp/fs/mp/images/ivsu_cache/PolicyTableUpdate" + } + ) + function to_run() + --hmi side: sending SystemRequest response + self.hmiConnection:SendResponse(systemRequestId,"BasicCommunication.SystemRequest", "SUCCESS", {}) + end + + RUN_AFTER(to_run, 500) + end) + + --hmi side: expect SDL.OnStatusUpdate + EXPECT_HMINOTIFICATION("SDL.OnStatusUpdate") + :ValidIf(function(exp,data) + if + exp.occurences == 1 and + data.params.status == "UP_TO_DATE" then + return true + elseif + exp.occurences == 1 and + data.params.status == "UPDATING" then + return true + elseif + exp.occurences == 2 and + data.params.status == "UP_TO_DATE" then + return true + else + if + exp.occurences == 1 then + print ("\27[31m SDL.OnStatusUpdate came with wrong values. Expected in first occurrences status 'UP_TO_DATE' or 'UPDATING', got '" .. tostring(data.params.status) .. "' \27[0m") + elseif exp.occurences == 2 then + print ("\27[31m SDL.OnStatusUpdate came with wrong values. Expected in second occurrences status 'UP_TO_DATE', got '" .. tostring(data.params.status) .. "' \27[0m") + end + return false + end + end) + :Times(Between(1,2)) + + --mobile side: expect SystemRequest response + EXPECT_RESPONSE(CorIdSystemRequest, { success = true, resultCode = "SUCCESS"}) + :Do(function(_,data) + --hmi side: sending SDL.GetUserFriendlyMessage request to SDL + local RequestIdGetUserFriendlyMessage = self.hmiConnection:SendRequest("SDL.GetUserFriendlyMessage", {language = "EN-US", messageCodes = {"StatusUpToDate"}}) + + --hmi side: expect SDL.GetUserFriendlyMessage response + EXPECT_HMIRESPONSE(RequestIdGetUserFriendlyMessage,{result = {code = 0, method = "SDL.GetUserFriendlyMessage", messages = {{line1 = "Up-To-Date", messageCode = "StatusUpToDate", textBody = "Up-To-Date"}}}}) + :Do(function(_,data) + end) + end) + + end) + --mobile side: Expect OnPermissionsChange notification (specific policy) + self.mobileSession1:ExpectNotification("OnPermissionsChange", arrayOnPermissionsChange ) + :Times(0) + + --mobile side: Expect OnPermissionsChange notification (default policy) + self.mobileSession:ExpectNotification("OnPermissionsChange", arrayOnPermissionsChange ) + -- :Do(function(_,data) --TODO: USING FOR UPDATING SCRIPT AFTER FIXING APPLINK-20213 DEFECT + -- commonFunctions:printTable(data.payload) + -- end) + + + commonTestCases:DelayedExp(5000) + + end) + + end + + ----------------------------------------------------------------------------------------------------------------- + +--------------------------------------------------------------------------------------------------------------------- +------------------------------------------------End Common function-------------------------------------------------- +--------------------------------------------------------------------------------------------------------------------- + + --Print new line to separate new test cases group + commonFunctions:newTestCasesGroup("-----------------------I - SCRIPT TO COVERAGE onPermissionsChange NOTIFICATION------------------------------") + + local function APPLINK_19918() + + --Print new line to separate new test cases group + commonFunctions:newTestCasesGroup("Test cases APPLINK_19918: [OnPermissionsChange] send after successful registration") + + --Description: Create new session to register new application + function Test:APPLINK_19918_Pre_CreationNewSession() + -- Connected expectation + self.mobileSession1 = mobile_session.MobileSession( + self.expectations_list, + self.mobileConnection) + self.mobileSession1:StartService(7) + end + + ------------------------------------------------------------------------------------------------------------- + + -- Description: RegisterAppInterface and checking the OnPemissionChange notification + function Test:APPLINK_19918_RegisterApp_CheckOnPermissionChange() + + config.application2.registerAppInterfaceParams.appID = "0000002" + --mobile side: sending request + local CorIdRegister = self.mobileSession1:SendRPC("RegisterAppInterface", config.application2.registerAppInterfaceParams) + + --hmi side: expect BasicCommunication.OnAppRegistered request + EXPECT_HMINOTIFICATION("BasicCommunication.OnAppRegistered", + { + application = + { + appName = config.application2.registerAppInterfaceParams.appName + } + }) + :Do(function(_,data) + appId = data.params.application.appID + self.appId = appId + end) + + --mobile side: expect notification + self.mobileSession1:ExpectNotification("OnHMIStatus", + { + systemContext = "MAIN", hmiLevel = "NONE", audioStreamingState = "NOT_AUDIBLE" + }) + :Timeout(2000) + + --mobile side: Expect OnPermissionsChange notification + self.mobileSession1:ExpectNotification("OnPermissionsChange", arrayRegisterNewApp ) + + end + + end + + local function APPLINK_19922() + + --Print new line to separate new test cases group + commonFunctions:newTestCasesGroup("Test cases APPLINK_19922: [OnPermissionsChange] send after app's permissions change by Policy Table Update") + + ------------------------------------------------------------------------------------------------------------- + + -- Description: Activation specified app + function Test:APPLINK_19922_ActivationSpecifiedApp() + self:activateApp(appId, 2) + end + + ------------------------------------------------------------------------------------------------------------- + + --TODO debbug after resolving APPLINK-13101 + -- Description: UpdatePolicy and checking the OnPemissionChange notification + function Test:APPLINK_19922_UPT_AddedGroup_CheckOnPermissionChange() + + self:updatePolicy_CheckOnPermissionChange_SpecifiedApp("PTU_OnPermissionChange_AddedGroup.json", arrayUpdatePolicyAddGroup) + + end + + ------------------------------------------------------------------------------------------------------------- + + --TODO debbug after resolving APPLINK-13101 + -- Description: UpdatePolicy and checking the OnPemissionChange notification on specific policy + function Test:APPLINK_19922_UPT_RemovedGroup_CheckOnPermissionChange() + + self:updatePolicy_CheckOnPermissionChange_SpecifiedApp("PTU_OnPermissionChange_RemovedGroup.json", arrayUpdatePolicyRemoveGroup) + + end + + ------------------------------------------------------------------------------------------------------------- + + -- Description: Activation app + function Test:APPLINK_19922_ActivationDefaultApp() + + local HMIappID=self.applications[config.application1.registerAppInterfaceParams.appName] + self:activateApp(HMIappID, 1) + + end + + ------------------------------------------------------------------------------------------------------------- + + --TODO debbug after resolving APPLINK-13101 + -- Description: UpdatePolicy and checking the OnPemissionChange notification on default policy option 1 (Register app with appId is not exist in PT) + function Test:APPLINK_19922_UPT_AddedGroup_Default_CheckOnPermissionChange_Option1() + + self:updatePolicy_CheckOnPermissionChange_DefaultApp("PTU_OnPermissionChange_Default_AddedGroup.json", arrayUpdatePolicyAddGroup) + + end + + ------------------------------------------------------------------------------------------------------------- + + --TODO debbug after resolving APPLINK-13101 + -- Description: UpdatePolicy and checking the OnPemissionChange notification on default policy option 1 (Register app with appId is not exist in PT) + function Test:APPLINK_19922_UPT_RemovedGroup_Default_CheckOnPermissionChange_Option1() + + self:updatePolicy_CheckOnPermissionChange_DefaultApp("PTU_OnPermissionChange_Default_RemovedGroup.json", arrayUpdatePolicyRemoveGroup) + + end + + ------------------------------------------------------------------------------------------------------------- + + --TODO debbug after resolving APPLINK-13101 + -- Description: UpdatePolicy and checking the OnPemissionChange notification on default policy option 2 (Register app with appId is exist in PT and assigned to default permission (example "0000002": "default",)) + function Test:APPLINK_19922_UPT_AddedGroup_Default_CheckOnPermissionChange_Option2() + + self:updatePolicy_CheckOnPermissionChange_DefaultApp("PTU_OnPermissionChange_Default_AddedGroup_1.json", arrayUpdatePolicyAddGroup) + + end + + ------------------------------------------------------------------------------------------------------------- + + --TODO debbug after resolving APPLINK-13101 + -- Description: UpdatePolicy and checking the OnPemissionChange notification on default policy option 2 (Register app with appId is exist in PT and assigned to default permission (example "0000002": "default",)) + function Test:APPLINK_19922_UPT_RemovedGroup_Default_CheckOnPermissionChange_Option2() + + self:updatePolicy_CheckOnPermissionChange_DefaultApp("PTU_OnPermissionChange_Default_RemovedGroup_1.json", arrayUpdatePolicyRemoveGroup) + + end + + ------------------------------------------------------------------------------------------------------------- + + end + + local function APPLINK_19930() + + --Print new line to separate new test cases group + commonFunctions:newTestCasesGroup("Test cases APPLINK_19930: [OnPermissionsChange] send after user's consent change for app's permissions") + + ------------------------------------------------------------------------------------------------------------- + + -- Description: Activation app + function Test:APPLINK_19930_ActivationSpecifiedApp() + self:activateApp(appId, 2) + end + + ------------------------------------------------------------------------------------------------------------- + + -- Description: UpdatePolicy and checking the OnPemissionChange notification on specific policy + function Test:APPLINK_19930_UserConsentChange_CheckOnPermissionChange() + + self:updatePolicy_CheckOnPermissionChange_SpecifiedApp("PTU_OnPermissionChange_UserConsentGroup.json", arrayUserConsentChange) + + end + + ------------------------------------------------------------------------------------------------------------- + + -- Description: Activation app + function Test:APPLINK_19930_ActivationDefaultApp() + local HMIappID=self.applications[config.application1.registerAppInterfaceParams.appName] + self:activateApp(HMIappID, 1) + end + + ------------------------------------------------------------------------------------------------------------- + + -- Description: UpdatePolicy and checking the OnPemissionChange notification on default policy option 1 (Register app with appId is not exist in PT) + function Test:APPLINK_19930_UserConsentChange_Default_CheckOnPermissionChange_Option1() + + self:updatePolicy_CheckOnPermissionChange_DefaultApp("PTU_OnPermissionChange_Default_UserConsentGroup.json", arrayUserConsentChange) + + end + + ------------------------------------------------------------------------------------------------------------- + + --Description: Update Policy for precondition + testCasesForPolicyTable:updatePolicy("files/ptu_general.json") + + ------------------------------------------------------------------------------------------------------------- + + -- Description: UpdatePolicy and checking the OnPemissionChange notification on specific policy option 2 (Register app with appId is exist in PT and assigned to default permission (example "0000002": "default",)) + function Test:APPLINK_19930_UserConsentChange_Default_CheckOnPermissionChange_Option2() + + self:updatePolicy_CheckOnPermissionChange_DefaultApp("PTU_OnPermissionChange_Default_UserConsentGroup_1.json", arrayUserConsentChange) + + end + + ------------------------------------------------------------------------------------------------------------- + + end + + --Main to execute test cases + APPLINK_19918() + APPLINK_19922() + APPLINK_19930() + +end + +SequenceOnPemissionsChange() diff --git a/test_scripts/API/ATF_OnScreenPresetsAvailable.lua b/test_scripts/API/ATF_OnScreenPresetsAvailable.lua new file mode 100644 index 0000000000..b9c613b26d --- /dev/null +++ b/test_scripts/API/ATF_OnScreenPresetsAvailable.lua @@ -0,0 +1,1035 @@ +Test = require('user_modules/connecttest_onScreenPresetsAvailable') +require('cardinalities') +local events = require('events') +local mobile_session = require('mobile_session') +local mobile = require('mobile_connection') +local tcp = require('tcp_connection') +local file_connection = require('file_connection') +local config = require('config') +local commonFunctions = require('user_modules/shared_testcases/commonFunctions') +local commonSteps = require('user_modules/shared_testcases/commonSteps') +require('user_modules/AppTypes') +local bOnScreenPresetsAvailable = true +--local storagePath = config.SDLStoragePath..config.application1.registerAppInterfaceParams.appID.. "_" .. config.deviceMAC.. "/" +local SDLConfig = require('user_modules/shared_testcases/SmartDeviceLinkConfigurations') +local storagePath = config.pathToSDL .. SDLConfig:GetValue("AppStorageFolder") .. "/" .. tostring(config.application1.registerAppInterfaceParams.appID .. "_" .. tostring(config.deviceMAC) .. "/") +local resultCodes = { + {resultCode = "SUCCESS", success = true}, + {resultCode = "INVALID_DATA", success = false}, + {resultCode = "OUT_OF_MEMORY", success = false}, + {resultCode = "TOO_MANY_PENDING_REQUESTS", success = false}, + {resultCode = "APPLICATION_NOT_REGISTERED", success = false}, + {resultCode = "GENERIC_ERROR", success = false}, + {resultCode = "REJECTED", success = false}, + {resultCode = "DISALLOWED", success = false}, + {resultCode = "UNSUPPORTED_RESOURCE", success = false}, + {resultCode = "ABORTED", success = false} + } + +--------------------------------------------------------------------------------------------- +--------------------------------------- Common functions ------------------------------------ +--------------------------------------------------------------------------------------------- + +function DelayedExp(timeout) + local event = events.Event() + event.matches = function(self, e) return self == e end + EXPECT_EVENT(event, "Delayed event") + RUN_AFTER(function() + RAISE_EVENT(event, event) + end, timeout) +end + +function Test:initHMI_onReady(bOnScreenPresetsAvailable) + local function ExpectRequest(name, mandatory, params) + local event = events.Event() + event.level = 2 + event.matches = function (self, data)return data.method == name end + return + EXPECT_HMIEVENT(event, name) + : Times(mandatory and 1 or AnyNumber()) + :Do(function (_, data) + self.hmiConnection:SendResponse(data.id, data.method, "SUCCESS", params) + end) + end + + local function ExpectNotification(name, mandatory) + local event = events.Event() + event.level = 2 + event.matches = function (self, data)return data.method == name end + return + EXPECT_HMIEVENT(event, name) + :Times(mandatory and 1 or AnyNumber()) + end + + ExpectRequest("BasicCommunication.MixingAudioSupported", + true, { + attenuatedSupported = true + }) + ExpectRequest("BasicCommunication.GetSystemInfo", false, { + ccpu_version = "ccpu_version", + language = "EN-US", + wersCountryCode = "wersCountryCode" + }) + ExpectRequest("UI.GetLanguage", true, { + language = "EN-US" + }) + ExpectRequest("VR.GetLanguage", true, { + language = "EN-US" + }) + ExpectRequest("TTS.GetLanguage", true, { + language = "EN-US" + }) + ExpectRequest("UI.ChangeRegistration", false, {}):Pin() + ExpectRequest("TTS.SetGlobalProperties", false, {}):Pin() + ExpectRequest("BasicCommunication.UpdateDeviceList", false, {}):Pin() + ExpectRequest("VR.ChangeRegistration", false, {}):Pin() + ExpectRequest("TTS.ChangeRegistration", false, {}):Pin() + ExpectRequest("VR.GetSupportedLanguages", true, { + languages = { + "EN-US", + "ES-MX", + "FR-CA", + "DE-DE", + "ES-ES", + "EN-GB", + "RU-RU", + "TR-TR", + "PL-PL", + "FR-FR", + "IT-IT", + "SV-SE", + "PT-PT", + "NL-NL", + "ZH-TW", + "JA-JP", + "AR-SA", + "KO-KR", + "PT-BR", + "CS-CZ", + "DA-DK", + "NO-NO", + "NL-BE", + "EL-GR", + "HU-HU", + "FI-FI", + "SK-SK" + } + }):Pin() + ExpectRequest("TTS.GetSupportedLanguages", true, { + languages = { + "EN-US", + "ES-MX", + "FR-CA", + "DE-DE", + "ES-ES", + "EN-GB", + "RU-RU", + "TR-TR", + "PL-PL", + "FR-FR", + "IT-IT", + "SV-SE", + "PT-PT", + "NL-NL", + "ZH-TW", + "JA-JP", + "AR-SA", + "KO-KR", + "PT-BR", + "CS-CZ", + "DA-DK", + "NO-NO", + "NL-BE", + "EL-GR", + "HU-HU", + "FI-FI", + "SK-SK" + } + }):Pin() + ExpectRequest("UI.GetSupportedLanguages", true, { + languages = { + "EN-US", + "ES-MX", + "FR-CA", + "DE-DE", + "ES-ES", + "EN-GB", + "RU-RU", + "TR-TR", + "PL-PL", + "FR-FR", + "IT-IT", + "SV-SE", + "PT-PT", + "NL-NL", + "ZH-TW", + "JA-JP", + "AR-SA", + "KO-KR", + "PT-BR", + "CS-CZ", + "DA-DK", + "NO-NO", + "NL-BE", + "EL-GR", + "HU-HU", + "FI-FI", + "SK-SK" + } + }):Pin() + ExpectRequest("VehicleInfo.GetVehicleType", false, { + vehicleType = { + make = "Ford", + model = "Fiesta", + modelYear = "2013", + trim = "SE" + } + }):Pin() + ExpectRequest("VehicleInfo.GetVehicleData", true, { + vin = "52-452-52-752" + }) + + local function button_capability(name, shortPressAvailable, longPressAvailable, upDownAvailable) + return { + name = name, + shortPressAvailable = shortPressAvailable == nil and true or shortPressAvailable, + longPressAvailable = longPressAvailable == nil and true or longPressAvailable, + upDownAvailable = upDownAvailable == nil and true or upDownAvailable + } + end + local buttons_capabilities = { + capabilities = { + button_capability("PRESET_0"), + button_capability("PRESET_1"), + button_capability("PRESET_2"), + button_capability("PRESET_3"), + button_capability("PRESET_4"), + button_capability("PRESET_5"), + button_capability("PRESET_6"), + button_capability("PRESET_7"), + button_capability("PRESET_8"), + button_capability("PRESET_9"), + button_capability("OK", true, false, true), + button_capability("SEEKLEFT"), + button_capability("SEEKRIGHT"), + button_capability("TUNEUP"), + button_capability("TUNEDOWN") + }, + presetBankCapabilities = { + onScreenPresetsAvailable = bOnScreenPresetsAvailable + } + } + ExpectRequest("Buttons.GetCapabilities", true, buttons_capabilities):Pin() + ExpectRequest("VR.GetCapabilities", true, { + vrCapabilities = { + "TEXT" + } + }):Pin() + ExpectRequest("TTS.GetCapabilities", true, { + speechCapabilities = { + "TEXT" + }, + prerecordedSpeechCapabilities = { + "HELP_JINGLE", + "INITIAL_JINGLE", + "LISTEN_JINGLE", + "POSITIVE_JINGLE", + "NEGATIVE_JINGLE" + } + }):Pin() + + local function text_field(name, characterSet, width, rows) + return { + name = name, + characterSet = characterSet or "TYPE2SET", + width = width or 500, + rows = rows or 1 + } + end + local function image_field(name, width, heigth) + return { + name = name, + imageTypeSupported = { + "GRAPHIC_BMP", + "GRAPHIC_JPEG", + "GRAPHIC_PNG" + }, + imageResolution = { + resolutionWidth = width or 64, + resolutionHeight = height or 64 + } + } + + end + + ExpectRequest("UI.GetCapabilities", true, { + displayCapabilities = { + displayType = "GEN2_8_DMA", + textFields = { + text_field("mainField1"), + text_field("mainField2"), + text_field("mainField3"), + text_field("mainField4"), + text_field("statusBar"), + text_field("mediaClock"), + text_field("mediaTrack"), + text_field("alertText1"), + text_field("alertText2"), + text_field("alertText3"), + text_field("scrollableMessageBody"), + text_field("initialInteractionText"), + text_field("navigationText1"), + text_field("navigationText2"), + text_field("ETA"), + text_field("totalDistance"), + text_field("navigationText"), + text_field("audioPassThruDisplayText1"), + text_field("audioPassThruDisplayText2"), + text_field("sliderHeader"), + text_field("sliderFooter"), + text_field("notificationText"), + text_field("menuName"), + text_field("secondaryText"), + text_field("tertiaryText"), + text_field("timeToDestination"), + text_field("menuTitle"), + text_field("locationName"), + text_field("locationDescription"), + text_field("addressLines"), + text_field("phoneNumber"), + text_field("turnText"), + }, + imageFields = { + image_field("softButtonImage"), + image_field("choiceImage"), + image_field("choiceSecondaryImage"), + image_field("vrHelpItem"), + image_field("turnIcon"), + image_field("menuIcon"), + image_field("cmdIcon"), + image_field("showConstantTBTIcon"), + image_field("showConstantTBTNextTurnIcon"), + image_field("locationImage") + }, + mediaClockFormats = { + "CLOCK1", + "CLOCK2", + "CLOCK3", + "CLOCKTEXT1", + "CLOCKTEXT2", + "CLOCKTEXT3", + "CLOCKTEXT4" + }, + graphicSupported = true, + imageCapabilities = { + "DYNAMIC", + "STATIC" + }, + templatesAvailable = { + "TEMPLATE" + }, + screenParams = { + resolution = { + resolutionWidth = 800, + resolutionHeight = 480 + }, + touchEventAvailable = { + pressAvailable = true, + multiTouchAvailable = true, + doublePressAvailable = false + } + }, + numCustomPresetsAvailable = 10 + }, + audioPassThruCapabilities = { + samplingRate = "44KHZ", + bitsPerSample = "8_BIT", + audioType = "PCM" + }, + hmiZoneCapabilities = "FRONT", + softButtonCapabilities = { + shortPressAvailable = true, + longPressAvailable = true, + upDownAvailable = true, + imageSupported = true + } + }):Pin() + + ExpectRequest("VR.IsReady", true, { + available = true + }) + ExpectRequest("TTS.IsReady", true, { + available = true + }) + ExpectRequest("UI.IsReady", true, { + available = true + }) + ExpectRequest("Navigation.IsReady", true, { + available = true + }) + ExpectRequest("VehicleInfo.IsReady", true, { + available = true + }) + + self.applications = {} + ExpectRequest("BasicCommunication.UpdateAppList", false, {}) + : Pin() + : Do(function (_, data) + self.applications = {} + for _, app in pairs(data.params.applications)do + self.applications[app.appName] = app.appID + end + end) + + self.hmiConnection:SendNotification("BasicCommunication.OnReady") +end + +function Test:connectMobileStartSession() + local tcpConnection = tcp.Connection(config.mobileHost, config.mobilePort) + local fileConnection = file_connection.FileConnection("mobile.out", tcpConnection) + self.mobileConnection = mobile.MobileConnection(fileConnection) + self.mobileSession= mobile_session.MobileSession( + self, + self.mobileConnection) + event_dispatcher:AddConnection(self.mobileConnection) + self.mobileSession:ExpectEvent(events.connectedEvent, "Connection started") + self.mobileConnection:Connect() + self.mobileSession:StartService(7) +end + +--Create UI expected result based on parameters from the request +function Test:createUIParameters(Request) + + local param = {} + + param["alignment"] = Request["alignment"] + param["customPresets"] = Request["customPresets"] + + --Convert showStrings parameter + local j = 0 + for i = 1, 4 do + if Request["mainField" .. i] ~= nil then + j = j + 1 + if param["showStrings"] == nil then + param["showStrings"] = {} + end + param["showStrings"][j] = { + fieldName = "mainField" .. i, + fieldText = Request["mainField" .. i] + } + end + end + + --mediaClock + if Request["mediaClock"] ~= nil then + j = j + 1 + if param["showStrings"] == nil then + param["showStrings"] = {} + end + param["showStrings"][j] = { + fieldName = "mediaClock", + fieldText = Request["mediaClock"] + } + end + + --mediaTrack + if Request["mediaTrack"] ~= nil then + j = j + 1 + if param["showStrings"] == nil then + param["showStrings"] = {} + end + param["showStrings"][j] = { + fieldName = "mediaTrack", + fieldText = Request["mediaTrack"] + } + end + + --statusBar + if Request["statusBar"] ~= nil then + j = j + 1 + if param["showStrings"] == nil then + param["showStrings"] = {} + end + param["showStrings"][j] = { + fieldName = "statusBar", + fieldText = Request["statusBar"] + } + end + + + + param["graphic"] = Request["graphic"] + if param["graphic"] ~= nil and + param["graphic"].imageType ~= "STATIC" and + param["graphic"].value ~= nil and + param["graphic"].value ~= "" then + param["graphic"].value = storagePath ..param["graphic"].value + end + + param["secondaryGraphic"] = Request["secondaryGraphic"] + if param["secondaryGraphic"] ~= nil and + param["secondaryGraphic"].imageType ~= "STATIC" and + param["secondaryGraphic"].value ~= nil and + param["secondaryGraphic"].value ~= "" then + param["secondaryGraphic"].value = storagePath ..param["secondaryGraphic"].value + end + + --softButtons + if Request["softButtons"] ~= nil then + param["softButtons"] = Request["softButtons"] + for i = 1, #param["softButtons"] do + + --if type = TEXT, image = nil, else type = IMAGE, text = nil + if param["softButtons"][i].type == "TEXT" then + param["softButtons"][i].image = nil + + elseif param["softButtons"][i].type == "IMAGE" then + param["softButtons"][i].text = nil + end + + + + --if image.imageType ~=STATIC, add app folder to image value + if param["softButtons"][i].image ~= nil and + param["softButtons"][i].image.imageType ~= "STATIC" then + + param["softButtons"][i].image.value = storagePath ..param["softButtons"][i].image.value + end + + end + end + + + return param + + + +end + +local function ActivationApp(self, appID, session) + --hmi side: sending SDL.ActivateApp request + local RequestId = self.hmiConnection:SendRequest("SDL.ActivateApp", { appID = appID}) + EXPECT_HMIRESPONSE(RequestId) + :Do(function(_,data) + if + data.result.isSDLAllowed ~= true then + local RequestId = self.hmiConnection:SendRequest("SDL.GetUserFriendlyMessage", {language = "EN-US", messageCodes = {"DataConsent"}}) + + --hmi side: expect SDL.GetUserFriendlyMessage message response + EXPECT_HMIRESPONSE(RequestId,{result = {code = 0, method = "SDL.GetUserFriendlyMessage"}}) + :Do(function(_,data) + --hmi side: send request SDL.OnAllowSDLFunctionality + self.hmiConnection:SendNotification("SDL.OnAllowSDLFunctionality", {allowed = true, source = "GUI", device = {id = config.deviceMAC, name = "127.0.0.1"}}) + + --hmi side: expect BasicCommunication.ActivateApp request + EXPECT_HMICALL("BasicCommunication.ActivateApp") + :Do(function(_,data) + --hmi side: sending BasicCommunication.ActivateApp response + self.hmiConnection:SendResponse(data.id,"BasicCommunication.ActivateApp", "SUCCESS", {}) + end) + :Times(2) + end) + + end + end) + + --mobile side: expect notification + session:ExpectNotification("OnHMIStatus", {hmiLevel = "FULL", systemContext = "MAIN"}) +end + +function Test:show(successValue, resultCodeValue) + --mobile side: request parameters + local RequestParams = + { + mainField1 ="Show1", + mainField2 ="Show2", + mainField3 ="Show3", + mainField4 ="Show4", + alignment ="CENTERED", + statusBar ="statusBar", + mediaClock ="00:00:01", + mediaTrack ="mediaTrack", + customPresets = + { + "Preset1", + "Preset2", + "Preset3", + }, + } + + --mobile side: sending Show request + local cid = self.mobileSession:SendRPC("Show", RequestParams) + + UIParams = self:createUIParameters(RequestParams) + + --hmi side: expect UI.Show request + EXPECT_HMICALL("UI.Show", UIParams) + :Do(function(_,data) + if resultCodeValue == "SUCCESS" then + --hmi side: sending UI.Show response + self.hmiConnection:SendResponse(data.id, data.method, resultCodeValue, {}) + else + --hmi side: sending UI.Show response + self.hmiConnection:SendError(data.id, data.method, resultCodeValue, "") + end + end) + + --mobile side: expect Show response + EXPECT_RESPONSE(cid, { success = successValue, resultCode = resultCodeValue }) +end + +----------------------------------------------------------------------------------------- + +--Begin Test case suite +--Description: + --Custom presets availability should be sent by HMI during start up as a parameter PresetBankCapabilities. + --PresetBankCapabilities should contain information about on-screen preset availability for use. + + --Requirement id in JAMA: SDLAQ-CRS-910, SDLAQ-CRS-2678 + + --Verification criteria: + --PresetCapabilities data is obtained as "onScreenPresetsAvailable: true" from HMI by SDL during SDL starting in case HMI supports custom presets. + --PresetCapabilities data is obtained as "onScreenPresetsAvailable: false" from HMI by SDL during SDL starting in case HMI supports custom presets. + --In case SDL does not receive the value of 'presetBankCapabilities' via GetCapabilities_response from HMI -> SDL must use the default value from HMI_capabilities.json file + + --Print new line to separate new test cases + commonFunctions:newTestCasesGroup("Test case: PresetCapabilities data is obtained as onScreenPresetsAvailable: true") + + --Begin Test case 01 + --Description: PresetCapabilities data is obtained as "onScreenPresetsAvailable: true" + function Test:InitHMI_onReady() + self:initHMI_onReady(bOnScreenPresetsAvailable) + + DelayedExp(2000) + end + + function Test:ConnectMobileStartSession() + self:connectMobileStartSession() + end + + function Test:RegisterAppInterface_OnScreenPresetsAvailableTrue() + --mobile side: RegisterAppInterface request + local CorIdRAI = self.mobileSession:SendRPC("RegisterAppInterface",config.application1.registerAppInterfaceParams) + + + --hmi side: expected BasicCommunication.OnAppRegistered + EXPECT_HMINOTIFICATION("BasicCommunication.OnAppRegistered", + { + application = + { + appName = config.application1.registerAppInterfaceParams.appName + } + }) + :Do(function(_,data) + self.applications[config.application1.registerAppInterfaceParams.appName] = data.params.application.appID + end) + + --mobile side: RegisterAppInterface response + EXPECT_RESPONSE(CorIdRAI, { success = true, resultCode = "SUCCESS", presetBankCapabilities = {onScreenPresetsAvailable = bOnScreenPresetsAvailable}}) + :Timeout(2000) + + --mobile side: expect notification + EXPECT_NOTIFICATION("OnHMIStatus", {hmiLevel = "NONE", systemContext = "MAIN", audioStreamingState = "NOT_AUDIBLE"}) + + end + + function Test:Precondition_ActivateApp() + ActivationApp(self, self.applications[config.application1.registerAppInterfaceParams.appName], self.mobileSession) + end + + for i =1, #resultCodes do + Test["Show_resultCode_" .. resultCodes[i].resultCode] = function(self) + self:show(resultCodes[i].success, resultCodes[i].resultCode) + end + end + --End Test case 01 + + ----------------------------------------------------------------------------------------- + --Print new line to separate new test cases + commonFunctions:newTestCasesGroup("Test case: PresetCapabilities data is obtained as onScreenPresetsAvailable: false") + + --Begin Test case 02 + --Description: PresetCapabilities data is obtained as "onScreenPresetsAvailable: false" + function Test:StopSDL() + StopSDL() + end + + function Test:StartSDL() + StartSDL(config.pathToSDL, config.ExitOnCrash) + end + + function Test:InitHMI2() + self:initHMI() + end + + function Test:InitHMI_onReady2() + bOnScreenPresetsAvailable = false + self:initHMI_onReady(bOnScreenPresetsAvailable) + + DelayedExp(2000) + end + + function Test:ConnectMobileStartSession2() + self:connectMobileStartSession() + end + + function Test:RegisterAppInterface_OnScreenPresetsAvailableFalse() + + --mobile side: RegisterAppInterface request + local CorIdRAI = self.mobileSession:SendRPC("RegisterAppInterface",config.application1.registerAppInterfaceParams) + + + --hmi side: expected BasicCommunication.OnAppRegistered + EXPECT_HMINOTIFICATION("BasicCommunication.OnAppRegistered", + { + application = + { + appName = config.application1.registerAppInterfaceParams.appName + } + }) + :Do(function(_,data) + self.applications[config.application1.registerAppInterfaceParams.appName] = data.params.application.appID + end) + + --mobile side: RegisterAppInterface response + EXPECT_RESPONSE(CorIdRAI, { success = true, resultCode = "SUCCESS", presetBankCapabilities = { onScreenPresetsAvailable = bOnScreenPresetsAvailable}}) + :Timeout(2000) + + --mobile side: expect notification + EXPECT_NOTIFICATION("OnHMIStatus", {hmiLevel = "NONE", systemContext = "MAIN", audioStreamingState = "NOT_AUDIBLE"}) + end + + function Test:Precondition_ActivateApp() + ActivationApp(self, self.applications[config.application1.registerAppInterfaceParams.appName], self.mobileSession) + end + + for i =1, #resultCodes do + Test["Show_resultCode_" .. resultCodes[i].resultCode] = function(self) + self:show(resultCodes[i].success, resultCodes[i].resultCode) + end + end + --End Test case 02 + + ----------------------------------------------------------------------------------------- + --Print new line to separate new test cases + commonFunctions:newTestCasesGroup("Test case: OnScreenPresetsAvailable data is not send") + + --Begin Test case 03 + --Description: OnScreenPresetsAvailable data is not send + function Test:StopSDL() + StopSDL() + end + + function Test:StartSDL() + StartSDL(config.pathToSDL, config.ExitOnCrash) + end + + function Test:InitHMI3() + self:initHMI() + end + + function Test:InitHMI_onReady3_WithOutOnScreenPresetsAvailable() + local function ExpectRequest(name, mandatory, params) + local event = events.Event() + event.level = 2 + event.matches = function(self, data) return data.method == name end + return + EXPECT_HMIEVENT(event, name) + :Times(mandatory and 1 or AnyNumber()) + :Do(function(_, data) + self.hmiConnection:SendResponse(data.id, data.method, "SUCCESS", params) + end) + end + + local function ExpectNotification(name, mandatory) + local event = events.Event() + event.level = 2 + event.matches = function(self, data) return data.method == name end + return + EXPECT_HMIEVENT(event, name) + :Times(mandatory and 1 or AnyNumber()) + end + + ExpectRequest("BasicCommunication.MixingAudioSupported", + true, + { attenuatedSupported = true }) + ExpectRequest("BasicCommunication.GetSystemInfo", false, + { + ccpu_version = "ccpu_version", + language = "EN-US", + wersCountryCode = "wersCountryCode" + }) + ExpectRequest("UI.GetLanguage", true, { language = "EN-US" }) + ExpectRequest("VR.GetLanguage", true, { language = "EN-US" }) + ExpectRequest("TTS.GetLanguage", true, { language = "EN-US" }) + ExpectRequest("UI.ChangeRegistration", false, { }):Pin() + ExpectRequest("TTS.SetGlobalProperties", false, { }):Pin() + ExpectRequest("BasicCommunication.UpdateDeviceList", false, { }):Pin() + ExpectRequest("VR.ChangeRegistration", false, { }):Pin() + ExpectRequest("TTS.ChangeRegistration", false, { }):Pin() + ExpectRequest("VR.GetSupportedLanguages", true, { + languages = + { + "EN-US","ES-MX","FR-CA","DE-DE","ES-ES","EN-GB","RU-RU","TR-TR","PL-PL", + "FR-FR","IT-IT","SV-SE","PT-PT","NL-NL","ZH-TW","JA-JP","AR-SA","KO-KR", + "PT-BR","CS-CZ","DA-DK","NO-NO","NL-BE","EL-GR","HU-HU","FI-FI","SK-SK" + } + }):Pin() + ExpectRequest("TTS.GetSupportedLanguages", true, { + languages = + { + "EN-US","ES-MX","FR-CA","DE-DE","ES-ES","EN-GB","RU-RU","TR-TR","PL-PL", + "FR-FR","IT-IT","SV-SE","PT-PT","NL-NL","ZH-TW","JA-JP","AR-SA","KO-KR", + "PT-BR","CS-CZ","DA-DK","NO-NO","NL-BE","EL-GR","HU-HU","FI-FI","SK-SK" + } + }):Pin() + ExpectRequest("UI.GetSupportedLanguages", true, { + languages = + { + "EN-US","ES-MX","FR-CA","DE-DE","ES-ES","EN-GB","RU-RU","TR-TR","PL-PL", + "FR-FR","IT-IT","SV-SE","PT-PT","NL-NL","ZH-TW","JA-JP","AR-SA","KO-KR", + "PT-BR","CS-CZ","DA-DK","NO-NO","NL-BE","EL-GR","HU-HU","FI-FI","SK-SK" + } + }):Pin() + ExpectRequest("VehicleInfo.GetVehicleType", false, { + vehicleType = + { + make = "Ford", + model = "Fiesta", + modelYear = "2013", + trim = "SE" + } + }):Pin() + ExpectRequest("VehicleInfo.GetVehicleData", true, { vin = "52-452-52-752" }) + + local function button_capability(name, shortPressAvailable, longPressAvailable, upDownAvailable) + return + { + name = name, + shortPressAvailable = shortPressAvailable == nil and true or shortPressAvailable, + longPressAvailable = longPressAvailable == nil and true or longPressAvailable, + upDownAvailable = upDownAvailable == nil and true or upDownAvailable + } + end + local buttons_capabilities = + { + capabilities = + { + button_capability("PRESET_0"), + button_capability("PRESET_1"), + button_capability("PRESET_2"), + button_capability("PRESET_3"), + button_capability("PRESET_4"), + button_capability("PRESET_5"), + button_capability("PRESET_6"), + button_capability("PRESET_7"), + button_capability("PRESET_8"), + button_capability("PRESET_9"), + button_capability("OK", true, false, true), + button_capability("SEEKLEFT"), + button_capability("SEEKRIGHT"), + button_capability("TUNEUP"), + button_capability("TUNEDOWN") + }, + } + ExpectRequest("Buttons.GetCapabilities", true, buttons_capabilities):Pin() + ExpectRequest("VR.GetCapabilities", true, { vrCapabilities = { "TEXT" } }):Pin() + ExpectRequest("TTS.GetCapabilities", true, { + speechCapabilities = { "TEXT"}, + prerecordedSpeechCapabilities = + { + "HELP_JINGLE", + "INITIAL_JINGLE", + "LISTEN_JINGLE", + "POSITIVE_JINGLE", + "NEGATIVE_JINGLE" + } + }):Pin() + + local function text_field(name, characterSet, width, rows) + return + { + name = name, + characterSet = characterSet or "TYPE2SET", + width = width or 500, + rows = rows or 1 + } + end + local function image_field(name, width, heigth) + return + { + name = name, + imageTypeSupported = + { + "GRAPHIC_BMP", + "GRAPHIC_JPEG", + "GRAPHIC_PNG" + }, + imageResolution = + { + resolutionWidth = width or 64, + resolutionHeight = height or 64 + } + } + + end + + ExpectRequest("UI.GetCapabilities", true, { + displayCapabilities = + { + displayType = "GEN2_8_DMA", + textFields = + { + text_field("mainField1"), + text_field("mainField2"), + text_field("mainField3"), + text_field("mainField4"), + text_field("statusBar"), + text_field("mediaClock"), + text_field("mediaTrack"), + text_field("alertText1"), + text_field("alertText2"), + text_field("alertText3"), + text_field("scrollableMessageBody"), + text_field("initialInteractionText"), + text_field("navigationText1"), + text_field("navigationText2"), + text_field("ETA"), + text_field("totalDistance"), + text_field("navigationText"), + text_field("audioPassThruDisplayText1"), + text_field("audioPassThruDisplayText2"), + text_field("sliderHeader"), + text_field("sliderFooter"), + text_field("notificationText"), + text_field("menuName"), + text_field("secondaryText"), + text_field("tertiaryText"), + text_field("timeToDestination"), + text_field("menuTitle"), + text_field("locationName"), + text_field("locationDescription"), + text_field("addressLines"), + text_field("phoneNumber"), + text_field("turnText"), + }, + imageFields = + { + image_field("softButtonImage"), + image_field("choiceImage"), + image_field("choiceSecondaryImage"), + image_field("vrHelpItem"), + image_field("turnIcon"), + image_field("menuIcon"), + image_field("cmdIcon"), + image_field("showConstantTBTIcon"), + image_field("showConstantTBTNextTurnIcon"), + image_field("locationImage") + }, + mediaClockFormats = + { + "CLOCK1", + "CLOCK2", + "CLOCK3", + "CLOCKTEXT1", + "CLOCKTEXT2", + "CLOCKTEXT3", + "CLOCKTEXT4" + }, + graphicSupported = true, + imageCapabilities = { "DYNAMIC", "STATIC" }, + templatesAvailable = { "TEMPLATE" }, + screenParams = + { + resolution = { resolutionWidth = 800, resolutionHeight = 480 }, + touchEventAvailable = + { + pressAvailable = true, + multiTouchAvailable = true, + doublePressAvailable = false + } + }, + numCustomPresetsAvailable = 10 + }, + audioPassThruCapabilities = + { + samplingRate = "44KHZ", + bitsPerSample = "8_BIT", + audioType = "PCM" + }, + hmiZoneCapabilities = "FRONT", + softButtonCapabilities = + { + shortPressAvailable = true, + longPressAvailable = true, + upDownAvailable = true, + imageSupported = true + } + }):Pin() + + ExpectRequest("VR.IsReady", true, { available = true }) + ExpectRequest("TTS.IsReady", true, { available = true }) + ExpectRequest("UI.IsReady", true, { available = true }) + ExpectRequest("Navigation.IsReady", true, { available = true }) + ExpectRequest("VehicleInfo.IsReady", true, { available = true }) + + self.applications = { } + ExpectRequest("BasicCommunication.UpdateAppList", false, { }) + :Pin() + :Do(function(_, data) + self.applications = { } + for _, app in pairs(data.params.applications) do + self.applications[app.appName] = app.appID + end + end) + + self.hmiConnection:SendNotification("BasicCommunication.OnReady") + + DelayedExp(2000) + end + + function Test:ConnectMobileStartSession3() + self:connectMobileStartSession() + end + + function Test:RegisterAppInterface_OnScreenPresetsAvailableDefault() + --mobile side: RegisterAppInterface request + local CorIdRAI = self.mobileSession:SendRPC("RegisterAppInterface",config.application1.registerAppInterfaceParams) + + + --hmi side: expected BasicCommunication.OnAppRegistered + EXPECT_HMINOTIFICATION("BasicCommunication.OnAppRegistered", + { + application = + { + appName = config.application1.registerAppInterfaceParams.appName + } + }) + :Do(function(_,data) + self.applications[config.application1.registerAppInterfaceParams.appName] = data.params.application.appID + end) + + --mobile side: RegisterAppInterface response + EXPECT_RESPONSE(CorIdRAI, { success = true, resultCode = "SUCCESS", presetBankCapabilities = {onScreenPresetsAvailable = true} }) + :Timeout(2000) + + --mobile side: expect notification + EXPECT_NOTIFICATION("OnHMIStatus", {hmiLevel = "NONE", systemContext = "MAIN", audioStreamingState = "NOT_AUDIBLE"}) + + end + + function Test:Precondition_ActivateApp() + ActivationApp(self, self.applications[config.application1.registerAppInterfaceParams.appName], self.mobileSession) + end + + for i =1, #resultCodes do + Test["Show_resultCode_" .. resultCodes[i].resultCode] = function(self) + self:show(resultCodes[i].success, resultCodes[i].resultCode) + end + end + + function Test:StopSDL() + StopSDL() + end + --End Test case 03 +--End Test case suite \ No newline at end of file diff --git a/test_scripts/API/ATF_OnTBTClientState.lua b/test_scripts/API/ATF_OnTBTClientState.lua new file mode 100644 index 0000000000..a5932821bb --- /dev/null +++ b/test_scripts/API/ATF_OnTBTClientState.lua @@ -0,0 +1,537 @@ +Test = require('connecttest') +require('cardinalities') +local events = require('events') +local mobile_session = require('mobile_session') + +--------------------------------------------------------------------------------------------- +-----------------------------Required Shared Libraries--------------------------------------- +--------------------------------------------------------------------------------------------- +local commonFunctions = require('user_modules/shared_testcases/commonFunctions') +local commonSteps = require('user_modules/shared_testcases/commonSteps') +local commonTestCases = require('user_modules/shared_testcases/commonTestCases') +local policyTable = require('user_modules/shared_testcases/testCasesForPolicyTable') +require('user_modules/AppTypes') + +APIName = "OnTBTClientState" -- set API name +NewTestSuiteNumber = 0 -- use as subfix of test case "NewTestSuite" to make different test case name. +Apps = {} +Apps[1] = {} +Apps[1].storagePath = config.pathToSDL .. "storage/"..config.application1.registerAppInterfaceParams.appID.. "_" .. config.deviceMAC.. "/" +Apps[1].appName = config.application1.registerAppInterfaceParams.appName +Apps[2] = {} +Apps[2].appName = config.application2.registerAppInterfaceParams.appName +--------------------------------------------------------------------------------------------- +------------------------------------------Common functions----------------------------------- +--------------------------------------------------------------------------------------------- + +--Test case: HMI sends OnTBTClientState and SDL forwards it to Mobile +local function OnTBTClientState_ValidValue_SUCCESS(Input_state, TestCaseName) + Test[TestCaseName] = function(self) + + --hmi side: send request Navigation.OnTBTClientState + self.hmiConnection:SendNotification("Navigation.OnTBTClientState", {state = Input_state}) + + --mobile side: expect OnTBTClientState notification + EXPECT_NOTIFICATION("OnTBTClientState", {state = Input_state}) + end +end + + +--Test case: HMI sends OnTBTClientState but SDL does not send it to Mobile +local function OnTBTClientState_IsIgnored(Input_state, TestCaseName) + Test[TestCaseName] = function(self) + + commonTestCases:DelayedExp(1000) + + --hmi side: send request Navigation.OnTBTClientState + self.hmiConnection:SendNotification("Navigation.OnTBTClientState", {state = Input_state}) + + --mobile side: expect OnTBTClientState notification + EXPECT_NOTIFICATION("OnTBTClientState", {state = Input_state}) + :Times(0) + end +end + + + +--------------------------------------------------------------------------------------------- +-------------------------------------------Preconditions------------------------------------- +--------------------------------------------------------------------------------------------- + + commonSteps:DeleteLogsFileAndPolicyTable() + + --Configure app params in config.lua to navigation application + config.application1.registerAppInterfaceParams.appHMIType = {"NAVIGATION"} + + --Print new line to separate new test cases group + commonFunctions:newTestCasesGroup("Preconditions") + + + --1. Activate application + commonSteps:ActivationApp() + + --2. Update policy to allow request + policyTable:precondition_updatePolicy_AllowFunctionInHmiLeves({"BACKGROUND", "FULL", "LIMITED"}) + + + + --List of state + local TBTState = + { + "ROUTE_UPDATE_REQUEST", + "ROUTE_ACCEPTED", + "ROUTE_REFUSED", + "ROUTE_CANCELLED", + "ETA_REQUEST", + "NEXT_TURN_REQUEST", + "ROUTE_STATUS_REQUEST", + "ROUTE_SUMMARY_REQUEST", + "TRIP_STATUS_REQUEST", + "ROUTE_UPDATE_REQUEST_TIMEOUT" + } + + + + + +----------------------------------------------------------------------------------------------- +-------------------------------------------TEST BLOCK I---------------------------------------- +--------------------------------Check normal cases of Mobile request--------------------------- +----------------------------------------------------------------------------------------------- + +--Not Applicable + + +---------------------------------------------------------------------------------------------- +-----------------------------------------TEST BLOCK II---------------------------------------- +-----------------------------Check special cases of Mobile request---------------------------- +---------------------------------------------------------------------------------------------- + +--Not Applicable + + +----------------------------------------------------------------------------------------------- +-------------------------------------------TEST BLOCK III-------------------------------------- +----------------------------------Check normal cases of HMI notification--------------------------- +----------------------------------------------------------------------------------------------- +--Requirement id in JAMA or JIRA: + --SDLAQ-CRS-181: OnTBTClientState_v2_0 + + --Verification criteria: SDL sends OnTBTClientState to all mobile applications that have stated 'appHMItype: Navigation' in RegisterAppInterface_request IN CASE SDL receives Navigation.OnTBTClientState notification from HMI. +---------------------------------------------------------------------------------------------- + + --List of parameters: + --1. state: type=TBTState +---------------------------------------------------------------------------------------------- + + + --Print new line to separate new test cases group + commonFunctions:newTestCasesGroup("Test suite: Check normal cases of HMI notification") + + +---------------------------------------------------------------------------------------------- +--Test case #1: Checks OnTBTClientState is sent to application SDL after receiving Navigation.OnTBTClientState(state = valid_value) +---------------------------------------------------------------------------------------------- + + for i = 1, #TBTState do + OnTBTClientState_ValidValue_SUCCESS(TBTState[i], "OnTBTClientState_state_IsValidValue_".. TBTState[i] .. "_SUCCESS") + end + + +---------------------------------------------------------------------------------------------- +--Test case #2: Checks OnTBTClientState is NOT sent to application SDL after receiving Navigation.OnTBTClientState(state = invalid_value) +---------------------------------------------------------------------------------------------- + local Invalid_states = { {value = "ANY", name = "IsNonexistent"}, + {value = 123, name = "IsWrongType"}, + {value = "", name = "IsEmpty"}} + + for i = 1, #Invalid_states do + OnTBTClientState_IsIgnored(Invalid_states[i].value, "OnTBTClientState_state_IsInvalidValue_" .. Invalid_states[i].name .."_IsIgnored") + end + + + +---------------------------------------------------------------------------------------------- +-----------------------------------------TEST BLOCK IV---------------------------------------- +----------------------------Check special cases of HMI notification--------------------------- +---------------------------------------------------------------------------------------------- +--Requirement id in JAMA or JIRA: + --APPLINK-14765: SDL must cut off the fake parameters from requests, responses and notifications received from HMI + +----------------------------------------------------------------------------------------------- + +--List of test cases for special cases of HMI notification: + --1. InvalidJsonSyntax + --2. InvalidStructure + --3. FakeParams + --4. FakeParameterIsFromAnotherAPI + --5. MissedAllPArameters + --6. SeveralNotifications with the same values + --7. SeveralNotifications with different values +---------------------------------------------------------------------------------------------- + +local function SpecialResponseChecks() + + --Print new line to separate new test cases group + commonFunctions:newTestCasesGroup("Test suite: Check special cases of HMI notification") + + function Test:OnTBTClientState_InvalidJsonSyntax() + + commonTestCases:DelayedExp(1000) + + --hmi side: send Navigation.OnTBTClientState + --":" is changed by ";" after "jsonrpc" + --self.hmiConnection:Send('{"jsonrpc":"2.0","method":"Navigation.OnTBTClientState","params":{"state":"ROUTE_UPDATE_REQUEST"}}') + self.hmiConnection:Send('{"jsonrpc";"2.0","method":"Navigation.OnTBTClientState","params":{"state":"ROUTE_UPDATE_REQUEST"}}') + + + --mobile side: expect OnTBTClientState notification + EXPECT_NOTIFICATION("OnTBTClientState", {state = "ROUTE_UPDATE_REQUEST"}) + :Times(0) + + end + + function Test:OnTBTClientState_InvalidStructure() + + commonTestCases:DelayedExp(1000) + + --hmi side: send Navigation.OnTBTClientState + --self.hmiConnection:Send('{"jsonrpc":"2.0","method":"Navigation.OnTBTClientState","params":{"state":"ROUTE_UPDATE_REQUEST"}}') + self.hmiConnection:Send('{"jsonrpc":"2.0","params":{"method":"Navigation.OnTBTClientState","state":"ROUTE_UPDATE_REQUEST"}}') + + --mobile side: expect OnTBTClientState notification + EXPECT_NOTIFICATION("OnTBTClientState", {}) + :Times(0) + + end + + function Test:OnTBTClientState_FakeParams() + + --hmi side: send Navigation.OnTBTClientState + self.hmiConnection:SendNotification("Navigation.OnTBTClientState", {state = TBTState[1], fake = 123}) + + --mobile side: expect OnTBTClientState notification + EXPECT_NOTIFICATION("OnTBTClientState", {state = TBTState[1]}) + :ValidIf (function(_,data) + if data.payload.fake then + commonFunctions:printError(" SDL resends fake parameter to mobile app ") + return false + else + return true + end + end) + + end + + function Test:OnTBTClientState_FakeParameterIsFromAnotherAPI() + + --hmi side: send Navigation.OnTBTClientState + self.hmiConnection:SendNotification("Navigation.OnTBTClientState", {state = TBTState[1], sliderPosition = 5}) + + --mobile side: expect OnTBTClientState notification + EXPECT_NOTIFICATION("OnTBTClientState", {state = TBTState[1]}) + :ValidIf (function(_,data) + if data.payload.sliderPosition then + commonFunctions:printError(" SDL resends sliderPosition parameter to mobile app ") + return false + else + return true + end + end) + + end + + function Test:OnTBTClientState_MissedAllPArameters() + + commonTestCases:DelayedExp(1000) + + --hmi side: send Navigation.OnTBTClientState + --self.hmiConnection:Send('{"jsonrpc":"2.0","method":"Navigation.OnTBTClientState","params":{"state":"ROUTE_UPDATE_REQUEST"}}') + self.hmiConnection:Send('{"jsonrpc":"2.0","method":"Navigation.OnTBTClientState","params":{}}') + + + --mobile side: expect OnTBTClientState notification + EXPECT_NOTIFICATION("OnTBTClientState", {}) + :Times(0) + + end + + function Test:OnTBTClientState_SeveralNotifications_WithTheSameValues() + + --hmi side: send Navigation.OnTBTClientState + self.hmiConnection:SendNotification("Navigation.OnTBTClientState", {state = TBTState[1]}) + self.hmiConnection:SendNotification("Navigation.OnTBTClientState", {state = TBTState[1]}) + self.hmiConnection:SendNotification("Navigation.OnTBTClientState", {state = TBTState[1]}) + + + --mobile side: expect OnTBTClientState notification + EXPECT_NOTIFICATION("OnTBTClientState", + {state = TBTState[1]}, + {state = TBTState[1]}, + {state = TBTState[1]} + ) + :Times(3) + + end + + function Test:OnTBTClientState_SeveralNotifications_WithDifferentValues() + + --hmi side: send Navigation.OnTBTClientState + self.hmiConnection:SendNotification("Navigation.OnTBTClientState", {state = TBTState[1]}) + self.hmiConnection:SendNotification("Navigation.OnTBTClientState", {state = TBTState[2]}) + + --mobile side: expect OnTBTClientState notification + EXPECT_NOTIFICATION("OnTBTClientState", + {state = TBTState[1]}, + {state = TBTState[2]} + ) + :Times(2) + end + +end + +SpecialResponseChecks() + + +----------------------------------------------------------------------------------------------- +-------------------------------------------TEST BLOCK V---------------------------------------- +-------------------------------------Checks All Result Codes----------------------------------- +----------------------------------------------------------------------------------------------- + +--Description: Check all resultCodes + +local function ResultCodeChecks() + + --Print new line to separate new test cases group + commonFunctions:newTestCasesGroup("Test suite: Policy table does not allow notification send to mobile") + + + ---------------------------------------------------------------------------------------------- + --Test case #1: API is not in policy table, SDL does not send it to mobile + ---------------------------------------------------------------------------------------------- + + --Precondition: Build policy table file + local PTName = policyTable:createPolicyTableWithoutAPI(APIName) + + --Precondition: Update policy table + policyTable:updatePolicy(PTName) + + for i = 1, #TBTState do + OnTBTClientState_IsIgnored(TBTState[i], "OnTBTClientState_IsNotInPolicyTable_IsIgnored_state_".. TBTState[i]) + end + + + + + ---------------------------------------------------------------------------------------------- + --Test case #2: API is in policy table but user has not consented yet, SDL does not send it to mobile + ---------------------------------------------------------------------------------------------- + + + --Precondition: Build policy table file + local keep_context = true + local steal_focus = true + local PTName = policyTable:createPolicyTable(APIName, {"FULL", "BACKGROUND", "LIMITED"}, keep_context, steal_focus) + + --Precondition: Update policy table + policyTable:updatePolicy(PTName) + + for i = 1, #TBTState do + OnTBTClientState_IsIgnored(TBTState[i], "OnTBTClientState_HaveNotConsentedYet_IsIgnored_state_".. TBTState[i]) + end + + + ---------------------------------------------------------------------------------------------- + --Test case #3: API is in policy table but user disallows, SDL does not send it to mobile + ---------------------------------------------------------------------------------------------- + + --Precondition: User does not allow function group + policyTable:userConsent(false) + + for i = 1, #TBTState do + OnTBTClientState_IsIgnored(TBTState[i], "OnTBTClientState_UserDisallowed_IsIgnored_state_".. TBTState[i]) + end + + --Postcondition: User allows function group + policyTable:userConsent(true) + +end + +ResultCodeChecks() + +---------------------------------------------------------------------------------------------- +-----------------------------------------TEST BLOCK VI---------------------------------------- +-------------------------Sequence with emulating of user's action(s)-------------------------- +---------------------------------------------------------------------------------------------- + +--Description: TC's checks SDL behavior by processing + -- different request sequence with timeout + -- with emulating of user's actions + +--Requirement id in JAMA: SDLAQ-CRS-181 + +--Verification criteria: Notifications should be sent to all applications which would be impacted by the change (which supports Navi). + + --Print new line to separate new test cases group + commonFunctions:newTestCasesGroup("Test suite: Sequence with emulating of user's action(s)") + + -- Precondition 1: Opening new session, register app, activate + function Test:AddNewSession2() + + -- Connected expectation + self.mobileSession2 = mobile_session.MobileSession(Test,Test.mobileConnection) + + self.mobileSession2:StartService(7) + end + + function Test:Register_Non_Navi_App2() + + --mobile side: RegisterAppInterface request + config.application2.registerAppInterfaceParams.isMediaApplication = false + config.application2.registerAppInterfaceParams.appHMIType = nil + + local CorIdRAI = self.mobileSession2:SendRPC("RegisterAppInterface", config.application2.registerAppInterfaceParams) + + --hmi side: expect BasicCommunication.OnAppRegistered request + EXPECT_HMINOTIFICATION("BasicCommunication.OnAppRegistered", + { + application = + { + appName = config.application2.registerAppInterfaceParams.appName, + isMediaApplication = false + } + }) + :Do(function(_,data) + Apps[2].appID = data.params.application.appID + self.applications[Apps[2].appName] = data.params.application.appID + end) + + --mobile side: RegisterAppInterface response + self.mobileSession2:ExpectResponse(CorIdRAI, { success = true, resultCode = "SUCCESS"}) + :Timeout(2000) + + self.mobileSession2:ExpectNotification("OnHMIStatus",{hmiLevel = "NONE", audioStreamingState = "NOT_AUDIBLE", systemContext = "MAIN"}) + end + + function Test:Activate_Non_Navi_App2() + + --hmi side: sending SDL.ActivateApp request + local RequestId = self.hmiConnection:SendRequest("SDL.ActivateApp", { appID = Apps[2].appID}) + EXPECT_HMIRESPONSE(RequestId) + :Do(function(_,data) + if + data.result.isSDLAllowed ~= true then + local RequestId = self.hmiConnection:SendRequest("SDL.GetUserFriendlyMessage", {language = "EN-US", messageCodes = {"DataConsent"}}) + + --hmi side: expect SDL.GetUserFriendlyMessage message response + EXPECT_HMIRESPONSE(RequestId) + :Do(function(_,data) + --hmi side: send request SDL.OnAllowSDLFunctionality + self.hmiConnection:SendNotification("SDL.OnAllowSDLFunctionality", {allowed = true, source = "GUI", device = {id = config.deviceMAC, name = "127.0.0.1"}}) + + --hmi side: expect BasicCommunication.ActivateApp request + EXPECT_HMICALL("BasicCommunication.ActivateApp") + :Do(function(_,data) + --hmi side: sending BasicCommunication.ActivateApp response + self.hmiConnection:SendResponse(data.id,"BasicCommunication.ActivateApp", "SUCCESS", {}) + end) + :Times(AnyNumber()) + end) + + end + end) + + --mobile side: expect notification + self.mobileSession2:ExpectNotification("OnHMIStatus", {hmiLevel = "FULL", systemContext = "MAIN"}) + + end + + function Test:OnTBTClientState_Not_Send_To_Non_Navi_App() + + commonTestCases:DelayedExp(1000) + + --hmi side: send request Navigation.OnTBTClientState + self.hmiConnection:SendNotification("Navigation.OnTBTClientState", {state = TBTState[1]}) + + --mobile side: expect OnTBTClientState notification + self.mobileSession2:ExpectNotification("OnTBTClientState", {}) + :Times(0) + end + + --Postcondition: + function Test:Unregister_Non_Navi_App2() + + local cid = self.mobileSession2:SendRPC("UnregisterAppInterface",{}) + + self.mobileSession2:ExpectResponse(cid, { success = true, resultCode = "SUCCESS"}) + :Timeout(2000) + end + +---------------------------------------------------------------------------------------------- +-----------------------------------------TEST BLOCK VII--------------------------------------- +--------------------------------------Different HMIStatus------------------------------------- +---------------------------------------------------------------------------------------------- + +--Description: Check different HMIStatus + +--Requirement id in JAMA: + --SDLAQ-CRS-1308: HMI Status Requirements for OnTBTClientState (FULL, LIMITED or BACKGROUND) + + --Verification criteria: + --1. SDL doesn't send OnTBTClientState notification to the app when current app's HMI level is NONE. + --2. SDL sends OnTBTClientState notification to the app when current app's HMI is FULL. + --3. SDL sends OnTBTClientState notification to the app when current app's HMI is LIMITED. + --4. SDL sends OnTBTClientState notification to the app when current app's HMI is BACKGROUND. + + +local function verifyDifferentHMIStatus() + + --Print new line to separate new test cases group + commonFunctions:newTestCasesGroup("Test suite: Different HMI Level Checks") + ---------------------------------------------------------------------------------------------- + + + --1. HMI level is NONE + + --Precondition: Deactivate app to NONE HMI level + commonSteps:DeactivateAppToNoneHmiLevel() + + for i = 1, #TBTState do + OnTBTClientState_IsIgnored(TBTState[i], "OnTBTClientState_InNONE_HmiLevel_IsIgnored_state_"..TBTState[i]) + end + + + --Postcondition: Activate app + commonSteps:ActivationApp() + ---------------------------------------------------------------------------------------------- + + + --2. HMI level is LIMITED + if commonFunctions:isMediaApp() then + -- Precondition: Change app to LIMITED + commonSteps:ChangeHMIToLimited() + + for i = 1, #TBTState do + OnTBTClientState_ValidValue_SUCCESS(TBTState[i], "OnTBTClientState_InLIMITED_HmiLevel_SUCCESS_state_"..TBTState[i]) + end + + end + ---------------------------------------------------------------------------------------------- + + + --3. HMI level is BACKGROUND + commonTestCases:ChangeAppToBackgroundHmiLevel() + + for i = 1, #TBTState do + OnTBTClientState_ValidValue_SUCCESS(TBTState[i], "OnTBTClientState_InBACKGROUND_HmiLevel_SUCCESS_state"..TBTState[i]) + end + ---------------------------------------------------------------------------------------------- +end + +verifyDifferentHMIStatus() +---------------------------------------------------------------------------------------------- + +--Postcondition: Restore_preloaded_pt +policyTable:Restore_preloaded_pt() + +return Test \ No newline at end of file diff --git a/test_scripts/API/ATF_OnTouchEvent.lua b/test_scripts/API/ATF_OnTouchEvent.lua new file mode 100644 index 0000000000..69b496838c --- /dev/null +++ b/test_scripts/API/ATF_OnTouchEvent.lua @@ -0,0 +1,1695 @@ +--------------------------------------------------------------------------------------------- +--ATF version: 2.2 +--Last modified date: 25/Oct/2015 +--Author: Ta Thanh Dong +--------------------------------------------------------------------------------------------- +Test = require('connecttest') +require('cardinalities') +local events = require('events') +local mobile_session = require('mobile_session') +local config = require('config') + + +--------------------------------------------------------------------------------------------- +-----------------------------Required Shared Libraries--------------------------------------- +--------------------------------------------------------------------------------------------- +local commonFunctions = require('user_modules/shared_testcases/commonFunctions') +local commonSteps = require('user_modules/shared_testcases/commonSteps') +local commonTestCases = require('user_modules/shared_testcases/commonTestCases') +local testCasesForPolicyTable = require('user_modules/shared_testcases/testCasesForPolicyTable') +require('user_modules/AppTypes') + +APIName = "OnTouchEvent" -- set API name + +Apps = {} +Apps[1] = {} +Apps[2] = {} + +function DelayedExp(time) + local event = events.Event() + event.matches = function(self, e) return self == e end + EXPECT_EVENT(event, "Delayed event") + :Timeout(time+1000) + RUN_AFTER(function() + RAISE_EVENT(event, event) + end, time) +end + +local function OnTouchEvent_Notification_IsIgnored(TestCaseName) + Test[TestCaseName] = function(self) + + DelayedExp(2000) + local parameter = { + type = "BEGIN", + event = { {c = {{x = 1, y = 1}}, id = 0, ts = {900} } } + } + + --hmi side: send OnTouchEvent + self.hmiConnection:SendNotification("UI.OnTouchEvent", parameter) + + --mobile side: expected OnTouchEvent notification + --EXPECT_NOTIFICATION("OnTouchEvent", parameter) + EXPECT_NOTIFICATION("OnTouchEvent", {}) + :Times(0) + end +end + +--------------------------------------------------------------------------------------------- +-------------------------------------------Preconditions------------------------------------- +--------------------------------------------------------------------------------------------- + + -- commonSteps:DeleteLogsFileAndPolicyTable() + + + --Print new line to separate new test cases group + commonFunctions:newTestCasesGroup("Preconditions") + + + function Test:StopSDLToBackUpPreloadedPt( ... ) + -- body + StopSDL() + DelayedExp(1000) + end + + function Test:BackUpPreloadedPt() + -- body + os.execute('cp ' .. config.pathToSDL .. 'sdl_preloaded_pt.json' .. ' ' .. config.pathToSDL .. 'backup_sdl_preloaded_pt.json') + os.execute('rm ' .. config.pathToSDL .. 'policy.sqlite') + end + + function Test:SetParameterInJson(pathToFile) + -- body + pathToFile = config.pathToSDL .. 'sdl_preloaded_pt.json' + local file = io.open(pathToFile, "r") + local json_data = file:read("*all") -- may be abbreviated to "*a"; + file:close() + + local json = require("modules/json") + + local data = json.decode(json_data) + for k,v in pairs(data.policy_table.functional_groupings) do + if (data.policy_table.functional_groupings[k].rpcs == nil) then + --do + data.policy_table.functional_groupings[k] = nil + else + --do + local count = 0 + for _ in pairs(data.policy_table.functional_groupings[k].rpcs) do count = count + 1 end + if (count < 30) then + --do + data.policy_table.functional_groupings[k] = nil + end + end + end + + data.policy_table.functional_groupings.OnTouchEventGroup = {} + data.policy_table.functional_groupings.OnTouchEventGroup.rpcs = {} + data.policy_table.functional_groupings.OnTouchEventGroup.rpcs.OnTouchEvent = {} + data.policy_table.functional_groupings.OnTouchEventGroup.rpcs.OnTouchEvent.hmi_levels = {'FULL'} + + data.policy_table.app_policies.default.groups = {"Base-4", "OnTouchEventGroup"} + + data = json.encode(data) + -- print(data) + -- for i=1, #data.policy_table.app_policies.default.groups do + -- print(data.policy_table.app_policies.default.groups[i]) + -- end + file = io.open(pathToFile, "w") + file:write(data) + file:close() + end + + local function StartSDLAfterChangePreloaded() + -- body + + Test["Precondition_StartSDL"] = function(self) + StartSDL(config.pathToSDL, config.ExitOnCrash) + DelayedExp(1000) + end + + Test["Precondition_InitHMI_1"] = function(self) + self:initHMI() + end + + Test["Precondition_InitHMI_onReady_1"] = function(self) + self:initHMI_onReady() + end + + Test["Precondition_ConnectMobile_1"] = function(self) + self:connectMobile() + end + + Test["Precondition_StartSession_1"] = function(self) + self.mobileSession = mobile_session.MobileSession(self, self.mobileConnection) + end + + end + + StartSDLAfterChangePreloaded() + + function Test:RestorePreloadedPt() + -- body + os.execute('cp ' .. config.pathToSDL .. 'backup_sdl_preloaded_pt.json' .. ' ' .. config.pathToSDL .. 'sdl_preloaded_pt.json') + os.execute('rm ' .. config.pathToSDL .. 'backup_sdl_preloaded_pt.json') + end + --End Precondition.1 + + --Begin Precondition.2 + --Description: Activation application + local GlobalVarAppID = 0 + function RegisterApplication(self) + -- body + config.application1.registerAppInterfaceParams.appHMIType = {'NAVIGATION'} + local corrID = self.mobileSession:SendRPC("RegisterAppInterface", config.application1.registerAppInterfaceParams) + + EXPECT_HMINOTIFICATION("BasicCommunication.OnAppRegistered") + :Do(function (_, data) + -- body + GlobalVarAppID = data.params.application.appID + end) + + EXPECT_RESPONSE(corrID, {success = true}) + + -- delay - bug of ATF - it is not wait for UpdateAppList and later + -- line appID = self.applications["Test Application"]} will not assign appID + DelayedExp(1000) + end + + function Test:RegisterApp() + -- body + self.mobileSession:StartService(7) + :Do(function (_, data) + -- body + RegisterApplication(self) + end) + end + --End Precondition.2 + + --1. Activate application + --Begin Precondition.1 + --Description: Activation application + function Test:ActivationApp() + --hmi side: sending SDL.ActivateApp request + -- local RequestId = self.hmiConnection:SendRequest("SDL.ActivateApp", { appID = self.applications["Test Application"]}) + local RequestId = self.hmiConnection:SendRequest("SDL.ActivateApp", { appID = GlobalVarAppID}) + EXPECT_HMIRESPONSE(RequestId) + + --mobile side: expect notification + EXPECT_NOTIFICATION("OnHMIStatus", {hmiLevel = "FULL", systemContext = "MAIN"}) + end + --End Precondition.1 + + --2. Create PT that allowed OnTouchEvent in Base-4 group and update PT + local PermissionLines_OnTouchEvent = +[[ "OnTouchEvent": { + "hmi_levels": [ + "BACKGROUND", + "LIMITED", + "NONE", + "FULL" + ] + }]] .. ", \n" + + + + local PermissionLinesForBase4 = PermissionLines_OnTouchEvent + local PermissionLinesForGroup1 = nil + local PermissionLinesForApplication = nil + --TODO: PT is blocked by ATF defect APPLINK-19188 + --local PTName = testCasesForPolicyTable:createPolicyTableFile(PermissionLinesForBase4, PermissionLinesForGroup1, PermissionLinesForApplication) + --testCasesForPolicyTable:updatePolicy(PTName) + -- PAY ATTENTION - now sdl_preloaded is used, may be this TODO is not required + + + +----------------------------------------------------------------------------------------------- +-------------------------------------------TEST BLOCK I---------------------------------------- +--------------------------------Check normal cases of Mobile request--------------------------- +----------------------------------------------------------------------------------------------- + +--Not Applicable + + +---------------------------------------------------------------------------------------------- +-----------------------------------------TEST BLOCK II---------------------------------------- +-----------------------------Check special cases of Mobile request---------------------------- +---------------------------------------------------------------------------------------------- + +--Not Applicable + + +----------------------------------------------------------------------------------------------- +-------------------------------------------TEST BLOCK III-------------------------------------- +----------------------------------Check normal cases of HMI notification--------------------------- +----------------------------------------------------------------------------------------------- +--Requirement id in JAMA or JIRA: + --SDLAQ-N_CRS-5: OnTouchEvent + --SDLAQ-N_CRS-155: TouchType + --SDLAQ-N_CRS-149: TouchEvent + --SDLAQ-N_CRS-154: TouchCoord + +--Verification criteria: + --1. Notifies about touch events on the screen's prescribed area + +--TODO: Update this script according to answer on APPLINK-17560 +---------------------------------------------------------------------------------------------- + + --List of parameters: + --1. type: type=TouchType(BEGIN, MOVE, END), mandatory=true + --2. event: type=TouchEvent, mandatory="true" minsize="1" maxsize="10" array="true" + --TouchEvent: + --id: Integer, minvalue=0, maxvalue=9, mandatory=true + --ts: Integer, mandatory=true, array=true, minvalue=0, maxvalue=2147483647 minsize=1, maxsize=1000 + --c: TouchCoord, mandatory=true, array=true, minsize=1, maxsize=1000 + --TouchCoord: + --x: Integer, minvalue=0, maxvalue=10000, mandatory=true + --y: Integer, minvalue=0, maxvalue=10000, mandatory=true +---------------------------------------------------------------------------------------------- + + local function TCs_verify_normal_cases() + + --Print new line to separate new test cases group + commonFunctions:newTestCasesGroup("Test suite: Check normal cases of HMI notification") + + ---------------------------------------------------------------------------------------------- + --Parameter #1: Checks type parameter: type=TouchType(BEGIN, MOVE, END), mandatory=true + ---------------------------------------------------------------------------------------------- + local function TCs_verify_type_parameter() + + --Print new line to separate new test cases group + commonFunctions:newTestCasesGroup("Test suite: Check type parameter") + + --1. IsInBoundValues + local types = {"BEGIN", "MOVE", "END"} + for i = 1, #types do + Test["OnTouchEvent_type_" .. types[i]] = function(self) + + + local parameter = { + type = types[i], + event = { {c = {{x = 1, y = 1}}, id = 1, ts = {9908} } } + } + + --hmi side: send OnTouchEvent + self.hmiConnection:SendNotification("UI.OnTouchEvent", parameter) + + --mobile side: expected OnTouchEvent notification + EXPECT_NOTIFICATION("OnTouchEvent", parameter) + + end + end + + + --2. IsMissed + --3. IsEmtpy + --4. NonExist + --5. WrongDataType + local InvalidType = { {value = nil, name = "IsMissed"}, + {value = "", name = "IsEmtpy"}, + {value = "ANY", name = "NonExist"}, + {value = 123, name = "WrongDataType"}} + + for i = 1, #InvalidType do + Test["OnTouchEvent_type_" .. InvalidType[i].name] = function(self) + + DelayedExp(2000) + + local parameter = { + type = InvalidType[i].value, + event = { {c = {{x = 1, y = 1}}, id = 1, ts = {9908} } } + } + + --hmi side: send OnTouchEvent + self.hmiConnection:SendNotification("UI.OnTouchEvent", parameter) + + --mobile side: expected OnTouchEvent notification + EXPECT_NOTIFICATION("OnTouchEvent") + :Times(0) + end + end + + end + + TCs_verify_type_parameter() + + + + ---------------------------------------------------------------------------------------------- + --Parameter #2: Checks event.c.x parameter: type=Integer, minvalue=0, maxvalue=10000, mandatory=true + ---------------------------------------------------------------------------------------------- + local function TCs_verify_event_c_x_parameter() + + --Print new line to separate new test cases group + commonFunctions:newTestCasesGroup("Test suite: Check event.c.x parameter") + + --1. IsLowerBound + --2. IsMiddle + --3. IsUpperBound + local ValidValues = { {value = 0, name = "IsLowerBound"}, + {value = 5000, name = "IsMiddle"}, + {value = 10000, name = "IsUpperBound"}} + + for i = 1, #ValidValues do + Test["OnTouchEvent_event_c_x_" .. ValidValues[i].name] = function(self) + + local parameter = { + type = "BEGIN", + event = { {c = {{x = ValidValues[i].value, y = 1}}, id = 1, ts = {9908} } } + } + + --hmi side: send OnTouchEvent + self.hmiConnection:SendNotification("UI.OnTouchEvent", parameter) + + --mobile side: expected OnTouchEvent notification + EXPECT_NOTIFICATION("OnTouchEvent", parameter) + + end + end + + + --4. IsMissed + --5. IsOutLowerBound + --6. IsOutUpperBound + --7. IsWrongType + local InvalidValues = { {value = nil, name = "IsMissed"}, + {value = -1, name = "IsOutLowerBound"}, + {value = 10001, name = "IsOutUpperBound"}, + {value = "2", name = "WrongDataType"}} + + for i = 1, #InvalidValues do + Test["OnTouchEvent_event_c_x_" .. InvalidValues[i].name] = function(self) + DelayedExp(2000) + local parameter = { + type = "BEGIN", + event = { {c = {{x = InvalidValues[i].value, y = 1}}, id = 1, ts = {9908} } } + } + + --hmi side: send OnTouchEvent + self.hmiConnection:SendNotification("UI.OnTouchEvent", parameter) + + --mobile side: expected OnTouchEvent notification + EXPECT_NOTIFICATION("OnTouchEvent") + :Times(0) + end + end + + + end + + TCs_verify_event_c_x_parameter() + + + + ---------------------------------------------------------------------------------------------- + --Parameter #3: Checks event.c.y parameter: type=Integer, minvalue=0, maxvalue=10000, mandatory=true + ---------------------------------------------------------------------------------------------- + local function TCs_verify_event_c_y_parameter() + + --Print new line to separate new test cases group + commonFunctions:newTestCasesGroup("Test suite: Check event.c.y parameter") + + --1. IsLowerBound + --2. IsMiddle + --3. IsUpperBound + local ValidValues = { {value = 0, name = "IsLowerBound"}, + {value = 5000, name = "IsMiddle"}, + {value = 10000, name = "IsUpperBound"}} + + for i = 1, #ValidValues do + Test["OnTouchEvent_event_c_y_" .. ValidValues[i].name] = function(self) + + local parameter = { + type = "BEGIN", + event = { {c = {{x = 1, y = ValidValues[i].value}}, id = 1, ts = {9908} } } + } + + --hmi side: send OnTouchEvent + self.hmiConnection:SendNotification("UI.OnTouchEvent", parameter) + + --mobile side: expected OnTouchEvent notification + EXPECT_NOTIFICATION("OnTouchEvent", parameter) + + end + end + + + --4. IsMissed + --5. IsOutLowerBound + --6. IsOutUpperBound + --7. IsWrongType + local InvalidValues = { {value = nil, name = "IsMissed"}, + {value = -1, name = "IsOutLowerBound"}, + {value = 10001, name = "IsOutUpperBound"}, + {value = "2", name = "WrongDataType"}} + + for i = 1, #InvalidValues do + Test["OnTouchEvent_event_c_y_" .. InvalidValues[i].name] = function(self) + DelayedExp(2000) + local parameter = { + type = "BEGIN", + event = { {c = {{x = 1, y = InvalidValues[i].value}}, id = 1, ts = {9908} } } + } + + --hmi side: send OnTouchEvent + self.hmiConnection:SendNotification("UI.OnTouchEvent", parameter) + + --mobile side: expected OnTouchEvent notification + EXPECT_NOTIFICATION("OnTouchEvent") + :Times(0) + end + end + + end + + TCs_verify_event_c_y_parameter() + + + + ---------------------------------------------------------------------------------------------- + --Parameter #4 Checks event.c parameter: type=TouchCoord, mandatory=true, array=true, minsize=1, maxsize=1000 + ---------------------------------------------------------------------------------------------- + local function TCs_verify_event_c_parameter() + + --Print new line to separate new test cases group + commonFunctions:newTestCasesGroup("Test suite: Check event.c parameter") + + --1. IsLowerBound + --2. IsUpperBound + + --Create array 1000 items. + local c_upperbound = {} + for i = 1, 1000 do + table.insert(c_upperbound, {x = i, y = 1}) + end + + + local ValidValues = { + {name = "IsLowerBound", value = {{x = 1, y = 1}}}, + {name = "IsUpperBound", value = c_upperbound}} + + for i = 1, #ValidValues do + Test["OnTouchEvent_event_c_" .. ValidValues[i].name] = function(self) + + local parameter = { + type = "BEGIN", + event = { {c = ValidValues[i].value, id = 1, ts = {9908} } } + } + + --hmi side: send OnTouchEvent + self.hmiConnection:SendNotification("UI.OnTouchEvent", parameter) + + --mobile side: expected OnTouchEvent notification + EXPECT_NOTIFICATION("OnTouchEvent", parameter) + + end + end + + + + --3. IsMissed + --4. IsOutLowerBound + --5. IsOutUpperBound + --6. IsWrongType + + --Create array 1001 items + local c_outupperbound = {} + for i = 1, 1001 do + table.insert(c_outupperbound, {x = i, y = 1}) + end + + local InvalidValues = { {name = "IsMissed", value = nil}, + {name = "IsOutLowerBound", value = {}}, + {name = "IsOutUpperBound", value = c_outupperbound}, + {name = "WrongDataType", value = 123}} + + for i = 1, #InvalidValues do + Test["OnTouchEvent_event_c_" .. InvalidValues[i].name] = function(self) + DelayedExp(2000) + local parameter = { + type = "BEGIN", + event = { {c = InvalidValues[i].value, id = 1, ts = {9908} } } + } + + --hmi side: send OnTouchEvent + self.hmiConnection:SendNotification("UI.OnTouchEvent", parameter) + + --mobile side: expected OnTouchEvent notification + EXPECT_NOTIFICATION("OnTouchEvent") + :Times(0) + end + end + + end + + TCs_verify_event_c_parameter() + + + + ---------------------------------------------------------------------------------------------- + --Parameter #5: Checks event.ts parameter: type=Integer, mandatory=true, array=true, minvalue=0, maxvalue=2147483647 minsize=1, maxsize=1000 + ---------------------------------------------------------------------------------------------- + local function TCs_verify_event_ts_parameter() + + --Print new line to separate new test cases group + commonFunctions:newTestCasesGroup("Test suite: Check event.ts element parameter") + + --1. IsLowerBound + --2. IsMiddle + --2. IsUpperBound + + local ValidValues = { + {name = "IsLowerBound", value = 0}, + {name = "IsMiddle", value = 1147483647}, + {name = "IsUpperBound", value = 2147483647}} + + for i = 1, #ValidValues do + Test["OnTouchEvent_event_ts_" .. ValidValues[i].name] = function(self) + + local parameter = { + type = "BEGIN", + event = { {c = {{x = 1, y = 1}}, id = 1, ts = {ValidValues[i].value} } } + } + + --hmi side: send OnTouchEvent + self.hmiConnection:SendNotification("UI.OnTouchEvent", parameter) + + --mobile side: expected OnTouchEvent notification + EXPECT_NOTIFICATION("OnTouchEvent", parameter) + + end + end + + + + --4. IsMissed + --5. IsOutLowerBound + --6. IsOutUpperBound + --7. IsWrongType + + local InvalidValues = { {name = "IsMissed", value = nil}, + {name = "IsOutLowerBound", value = -1}, + {name = "IsOutUpperBound", value = 2147483648}, + {name = "WrongDataType", value = "123"}} + + for i = 1, #InvalidValues do + Test["OnTouchEvent_event_ts_" .. InvalidValues[i].name] = function(self) + DelayedExp(2000) + local parameter = { + type = "BEGIN", + event = { {c = {{x = 1, y = 1}}, id = 1, ts = {InvalidValues[i].value} } } + } + + --hmi side: send OnTouchEvent + self.hmiConnection:SendNotification("UI.OnTouchEvent", parameter) + + --mobile side: expected OnTouchEvent notification + EXPECT_NOTIFICATION("OnTouchEvent") + :Times(0) + end + end + + + + --Print new line to separate new test cases group + commonFunctions:newTestCasesGroup("Test suite: Check event.ts array parameter") + + + --1. IsLowerBound: covered by above TCs OnTouchEvent_event_ts_IsLowerBound/IsMiddle/IsUpperBound + --2. IsUpperBound + + --Create array 1000 items. + local ts_upperbound = {} + for i = 1, 1000 do + table.insert(ts_upperbound, i) + end + + + local ValidValues = { + --{name = "IsLowerBound", value = {1}}, --1. IsLowerBound: covered by above TCs OnTouchEvent_event_ts_IsLowerBound/IsMiddle/IsUpperBound + {name = "IsUpperBound", value = ts_upperbound}} + + for i = 1, #ValidValues do + Test["OnTouchEvent_event_ts_array_" .. ValidValues[i].name] = function(self) + + local parameter = { + type = "BEGIN", + event = { {c = {{x =1, y = 1}}, id = 1, ts = ValidValues[i].value } } + } + + --hmi side: send OnTouchEvent + self.hmiConnection:SendNotification("UI.OnTouchEvent", parameter) + + --mobile side: expected OnTouchEvent notification + EXPECT_NOTIFICATION("OnTouchEvent", parameter) + + end + end + + + + --3. IsMissed + --4. IsOutLowerBound + --5. IsOutUpperBound + --6. IsWrongType + + --Create array 1001 items + local ts_outupperbound = {} + for i = 1, 1001 do + table.insert(ts_outupperbound, i) + end + + local InvalidValues = { {name = "IsMissed", value = nil}, + {name = "IsOutLowerBound", value = {}}, + {name = "IsOutUpperBound", value = ts_outupperbound}, + {name = "WrongDataType", value = 123}} + + for i = 1, #InvalidValues do + Test["OnTouchEvent_event_ts_array_" .. InvalidValues[i].name] = function(self) + DelayedExp(2000) + local parameter = { + type = "BEGIN", + event = { {c = {{x =1, y = 1}}, id = 1, ts = InvalidValues[i].value } } + } + + --hmi side: send OnTouchEvent + self.hmiConnection:SendNotification("UI.OnTouchEvent", parameter) + + --mobile side: expected OnTouchEvent notification + EXPECT_NOTIFICATION("OnTouchEvent") + :Times(0) + end + end + + + end + + TCs_verify_event_ts_parameter() + + + + ---------------------------------------------------------------------------------------------- + --Parameter #5: Checks event.id parameter: type=Integer, minvalue=0, maxvalue=9, mandatory=true + ---------------------------------------------------------------------------------------------- + local function TCs_verify_event_id_parameter() + + --Print new line to separate new test cases group + commonFunctions:newTestCasesGroup("Test suite: Check event.id parameter") + + --1. IsLowerBound + --2. IsMiddle + --2. IsUpperBound + + local ValidValues = { + {name = "IsLowerBound", value = 0}, + {name = "IsMiddle", value = 5}, + {name = "IsUpperBound", value = 9}} + + for i = 1, #ValidValues do + Test["OnTouchEvent_event_id_" .. ValidValues[i].name] = function(self) + + local parameter = { + type = "BEGIN", + event = { {c = {{x = 1, y = 1}}, id = ValidValues[i].value, ts = {1} } } + } + + --hmi side: send OnTouchEvent + self.hmiConnection:SendNotification("UI.OnTouchEvent", parameter) + + --mobile side: expected OnTouchEvent notification + EXPECT_NOTIFICATION("OnTouchEvent", parameter) + + end + end + + + + --4. IsMissed + --5. IsOutLowerBound + --6. IsOutUpperBound + --7. IsWrongType + + local InvalidValues = { {name = "IsMissed", value = nil}, + {name = "IsOutLowerBound", value = -1}, + {name = "IsOutUpperBound", value = 10}, + {name = "WrongDataType", value = "2"}} + + for i = 1, #InvalidValues do + Test["OnTouchEvent_event_ts_" .. InvalidValues[i].name] = function(self) + DelayedExp(2000) + local parameter = { + type = "BEGIN", + event = { {c = {{x = 1, y = 1}}, id = InvalidValues[i].value, ts = {1} } } + } + + --hmi side: send OnTouchEvent + self.hmiConnection:SendNotification("UI.OnTouchEvent", parameter) + + --mobile side: expected OnTouchEvent notification + EXPECT_NOTIFICATION("OnTouchEvent") + :Times(0) + end + end + + end + + TCs_verify_event_id_parameter() + + + + ---------------------------------------------------------------------------------------------- + --Parameter #6: Checks event parameter: type=TouchEvent, mandatory="true" minsize="1" maxsize="10" array="true" + ---------------------------------------------------------------------------------------------- + local function TCs_verify_event_parameter() + + --Print new line to separate new test cases group + commonFunctions:newTestCasesGroup("Test suite: Check event array parameter") + + + --1. IsLowerBound: covered by above TCs + --2. IsUpperBound + + --Create array 10 items. + local event_upperbound = {} + for i = 0, 9 do + table.insert(event_upperbound, {c = {{x = i + 1, y = 1}}, id = i, ts = {9908} }) + end + + + local ValidValues = { + {name = "IsUpperBound", value = event_upperbound}} + + for i = 1, #ValidValues do + Test["OnTouchEvent_event_array_" .. ValidValues[i].name] = function(self) + + local parameter = { + type = "BEGIN", + event = ValidValues[i].value + } + + --hmi side: send OnTouchEvent + self.hmiConnection:SendNotification("UI.OnTouchEvent", parameter) + + --mobile side: expected OnTouchEvent notification + EXPECT_NOTIFICATION("OnTouchEvent", parameter) + + end + end + + + + --3. IsMissed + --4. IsOutLowerBound + --5. IsOutUpperBound + --6. IsWrongType + + --Create array 11 items + local event_outupperbound = {} + for i = 0, 9 do + table.insert(event_outupperbound, {c = {{x = i+1, y = 1}}, id = i, ts = {9908}} ) + end + table.insert(event_outupperbound, {c = {{x = 1, y = 1}}, id = 1, ts = {9908} }) + + local InvalidValues = { {name = "IsMissed", value = nil}, + {name = "IsOutLowerBound", value = {}}, + {name = "IsOutUpperBound", value = event_outupperbound}, + {name = "WrongDataType", value = 123}} + + for i = 1, #InvalidValues do + Test["OnTouchEvent_event_array_" .. InvalidValues[i].name] = function(self) + DelayedExp(2000) + local parameter = { + type = "BEGIN", + event = InvalidValues[i].value + } + + --hmi side: send OnTouchEvent + self.hmiConnection:SendNotification("UI.OnTouchEvent", parameter) + + --mobile side: expected OnTouchEvent notification + EXPECT_NOTIFICATION("OnTouchEvent") + :Times(0) + end + end + + + end + + TCs_verify_event_parameter() + + end + + TCs_verify_normal_cases() + +---------------------------------------------------------------------------------------------- +-----------------------------------------TEST BLOCK IV---------------------------------------- +----------------------------Check special cases of HMI notification--------------------------- +---------------------------------------------------------------------------------------------- +--Requirement id in JAMA or JIRA: + --APPLINK-14765: SDL must cut off the fake parameters from requests, responses and notifications received from HMI + +----------------------------------------------------------------------------------------------- + +--List of test cases for special cases of HMI notification: + --1. InvalidJsonSyntax + --2. InvalidStructure + --3. FakeParams + --4. FakeParameterIsFromAnotherAPI + --5. MissedmandatoryParameters + --6. MissedAllPArameters + --7. SeveralNotifications with the same values + --8. SeveralNotifications with different values +---------------------------------------------------------------------------------------------- + + local function SpecialResponseChecks() + + --Print new line to separate new test cases group + commonFunctions:newTestCasesGroup("Test suite: Check special cases of HMI notification") + + + + --1. Verify OnTouchEvent with invalid Json syntax + ---------------------------------------------------------------------------------------------- + function Test:OnTouchEvent_InvalidJsonSyntax() + DelayedExp(2000) + --hmi side: send OnTouchEvent + --":" is changed by ";" after "jsonrpc" + self.hmiConnection:Send('{"jsonrpc";"2.0","method":"UI.OnTouchEvent","params":{"type":"BEGIN","event":[{"c":[{"x":251,"y":194}],"id":0,"ts":[9908]}]}}') + + EXPECT_NOTIFICATION("OnTouchEvent") + :Times(0) + + end + + + --2. Verify OnTouchEvent with invalid structure + ---------------------------------------------------------------------------------------------- + function Test:OnTouchEvent_InvalidStructure() + DelayedExp(2000) + --hmi side: send OnTouchEvent + --method is moved into params parameter + self.hmiConnection:Send('{"jsonrpc":"2.0","params":{"method":"UI.OnTouchEvent","type":"BEGIN","event":[{"c":[{"x":251,"y":194}],"id":0,"ts":[9908]}]}}') + + EXPECT_NOTIFICATION("OnTouchEvent") + :Times(0) + end + + + + --3. Verify OnTouchEvent with FakeParams + ---------------------------------------------------------------------------------------------- + function Test:OnTouchEvent_FakeParams() + + + --hmi side: send OnTouchEvent + self.hmiConnection:SendNotification("UI.OnTouchEvent", + { + type = "BEGIN", + fake = 123, + event = {{fake = 123, c = {{fake = 123, x = 1, y = 1}}, id = 1, ts = {9908} } } + }) + + --mobile side: expected OnTouchEvent notification + EXPECT_NOTIFICATION("OnTouchEvent", + { + type = "BEGIN", + event = {{c = {{x = 1, y = 1}}, id = 1, ts = {9908} } } + }) + :ValidIf(function(_,data) + + if data.payload.fake or + data.payload.event[1].fake or + data.payload.event[1].c[1].fake then + print(" SDL forwards fake parameter to mobile ") + return false + else + return true + end + end) + + end + + + --4. Verify OnTouchEvent with FakeParameterIsFromAnotherAPI + function Test:OnTouchEvent_FakeParameterIsFromAnotherAPI() + + + --hmi side: send OnTouchEvent + self.hmiConnection:SendNotification("UI.OnTouchEvent", + { + type = "BEGIN", + sliderPosition = 123, + event = {{sliderPosition = 123, c = {{sliderPosition = 123, x = 1, y = 1}}, id = 1, ts = {9908} } } + }) + + --mobile side: expected OnTouchEvent notification + EXPECT_NOTIFICATION("OnTouchEvent", + { + type = "BEGIN", + event = {{c = {{x = 1, y = 1}}, id = 1, ts = {9908} } } + }) + :ValidIf(function(_,data) + + if data.payload.sliderPosition or + data.payload.event[1].sliderPosition or + data.payload.event[1].c[1].sliderPosition then + print(" SDL forwards fake parameter to mobile ") + return false + else + return true + end + end) + + end + + + + --5. Verify OnTouchEvent misses mandatory parameter + ---------------------------------------------------------------------------------------------- + --It is covered when verifying each parameter + + + --6. Verify OnTouchEvent MissedAllPArameters + ---------------------------------------------------------------------------------------------- + function Test:OnTouchEvent_AllParameters_AreMissed() + DelayedExp(2000) + --hmi side: send OnTouchEvent + self.hmiConnection:SendNotification("UI.OnTouchEvent",{}) + + + --mobile side: expected OnTouchEvent notification + EXPECT_NOTIFICATION("OnTouchEvent") + :Times(0) + + end + + --7. Verify OnTouchEvent with SeveralNotifications_WithTheSameValues + ---------------------------------------------------------------------------------------------- + function Test:OnTouchEvent_SeveralNotifications_WithTheSameValues() + + --hmi side: send OnTouchEvent + local parameter = { + type = "BEGIN", + event = { {c = {{x = 1, y = 1}}, id = 1, ts = {9908} } } + } + + --hmi side: send OnTouchEvent + self.hmiConnection:SendNotification("UI.OnTouchEvent", parameter) + self.hmiConnection:SendNotification("UI.OnTouchEvent", parameter) + self.hmiConnection:SendNotification("UI.OnTouchEvent", parameter) + + --mobile side: expected OnTouchEvent notification + EXPECT_NOTIFICATION("OnTouchEvent", parameter) + :Times(3) + + end + + + --8. Verify OnTouchEvent with SeveralNotifications_WithDifferentValues + ---------------------------------------------------------------------------------------------- + function Test:OnTouchEvent_SeveralNotifications_WithDifferentValues() + + --hmi side: send OnTouchEvent + local parameter1 = { + type = "BEGIN", + event = { {c = {{x = 1, y = 1}}, id = 1, ts = {9908} } } + } + + local parameter2 = { + type = "BEGIN", + event = { {c = {{x = 2, y = 1}}, id = 1, ts = {9908} } } + } + + local parameter3 = { + type = "BEGIN", + event = { {c = {{x = 3, y = 1}}, id = 1, ts = {9908} } } + } + + --hmi side: send OnTouchEvent + self.hmiConnection:SendNotification("UI.OnTouchEvent", parameter1) + self.hmiConnection:SendNotification("UI.OnTouchEvent", parameter2) + self.hmiConnection:SendNotification("UI.OnTouchEvent", parameter3) + + --mobile side: expected OnTouchEvent notification + EXPECT_NOTIFICATION("OnTouchEvent", parameter1, parameter2, parameter3) + :Times(3) + + end + + + end + + SpecialResponseChecks() + + + + +----------------------------------------------------------------------------------------------- +-------------------------------------------TEST BLOCK V---------------------------------------- +-------------------------------------Checks All Result Codes----------------------------------- +----------------------------------------------------------------------------------------------- + +--Description: Check all resultCodes + +--TODO: Update this script according to answer on APPLINK-17560 + +--Requirement id in JAMA: + --N/A + +--Verification criteria: Verify SDL behaviors in different states of policy table: + --1. Notification is not exist in PT => DISALLOWED in policy table, SDL ignores the notification + --2. Notification is exist in PT but it has not consented yet by user => DISALLOWED in policy table, SDL ignores the notification + --3. Notification is exist in PT but user does not allow function group that contains this notification => USER_DISALLOWED in policy table, SDL ignores the notification + --4. Notification is exist in PT and user allow function group that contains this notification +---------------------------------------------------------------------------------------------- + + local function ResultCodeChecks() + + --Print new line to separate new test cases group + commonFunctions:newTestCasesGroup("Test suite: Checks All Result Codes") + + + --1. Notification is not exist in PT => DISALLOWED in policy table, SDL ignores the notification + ---------------------------------------------------------------------------------------------- + --Precondition: Build policy table file + local PTFileName = testCasesForPolicyTable:createPolicyTableWithoutAPI("OnTouchEvent") + + --Precondition: Update policy table + testCasesForPolicyTable:updatePolicy(PTFileName) + + OnTouchEvent_Notification_IsIgnored("OnTouchEvent_IsNotExistInPT_IsIgnored") + ---------------------------------------------------------------------------------------------- + + + --2. Notification is exist in PT but it has not consented yet by user => DISALLOWED in policy table, SDL ignores the notification + ---------------------------------------------------------------------------------------------- + --Precondition: Build policy table file + local PermissionLinesForBase4 = nil + local PermissionLinesForGroup1 = +[[ "OnTouchEvent": { + "hmi_levels": [ + "FULL" + ] + }]] .. "\n" + + local appID = config.application1.registerAppInterfaceParams.appID + local PermissionLinesForApplication = + [[ "]]..appID ..[[" : { + "keep_context" : false, + "steal_focus" : false, + "priority" : "NONE", + "default_hmi" : "NONE", + "groups" : ["Base-4", "group1"] + }, + ]] + + local PTName = testCasesForPolicyTable:createPolicyTableFile(PermissionLinesForBase4, PermissionLinesForGroup1, PermissionLinesForApplication) + testCasesForPolicyTable:updatePolicy(PTName) + + --Send notification and check it is ignored + OnTouchEvent_Notification_IsIgnored("OnTouchEvent_UserHasNotConsentedYet_IsIgnored") + ---------------------------------------------------------------------------------------------- + + + --3. Notification is exist in PT but user does not allow function group that contains this notification => USER_DISALLOWED in policy table, SDL ignores the notification + ---------------------------------------------------------------------------------------------- + --Precondition: User does not allow function group + testCasesForPolicyTable:userConsent(false, "group1") + + --Send notification and check it is ignored + OnTouchEvent_Notification_IsIgnored("OnTouchEvent_UserDisallowed_IsIgnored") + ---------------------------------------------------------------------------------------------- + + --4. Notification is exist in PT and user allow function group that contains this notification + ---------------------------------------------------------------------------------------------- + --Precondition: User allows function group + testCasesForPolicyTable:userConsent(true, "group1") + + function Test:OnTouchEvent_Notification_IsAllowed() + local parameter = { + type = "BEGIN", + event = { {c = {{x = 1, y = 1}}, id = 0, ts = {900} } } + } + + --hmi side: send OnTouchEvent + self.hmiConnection:SendNotification("UI.OnTouchEvent", parameter) + + --mobile side: expected OnTouchEvent notification + EXPECT_NOTIFICATION("OnTouchEvent", parameter) + end + + ---------------------------------------------------------------------------------------------- + end + --TODO: PT is blocked by ATF defect APPLINK-19188 + --ResultCodeChecks() + +---------------------------------------------------------------------------------------------- +-----------------------------------------TEST BLOCK VI---------------------------------------- +-------------------------Sequence with emulating of user's action(s)-------------------------- +---------------------------------------------------------------------------------------------- + +--Requirement id in JAMA or JIRA: + --SDLAQ-TC-218: TC_OnTouchEvent_navi_01 + --APPLINK-18023: 04[P][MAN]_TC_OnTouchEvent + +--Verification criteria: + --1. Click on navigation area + --2. Click on navigation area with 2 fingers at the same time + --3. Move on navigation area with 1 finger + --4. Move on navigation area with 2 fingers at the same time +---------------------------------------------------------------------------------------------- + local function SequenceCheck1() + + + --Print new line to separate new test cases group + commonFunctions:newTestCasesGroup("Test suite: Sequence with emulating of user's action(s)") + + + --1. Click on navigation area + function Test:OnTouchEvent_type_BEGIN() + print() + print("Step 1. Click on navigation area") + + local parameter = { + type = "BEGIN", + event = { {c = {{x = 1, y = 1}}, id = 0, ts = {900} } } + } + + --hmi side: send OnTouchEvent + self.hmiConnection:SendNotification("UI.OnTouchEvent", parameter) + + --mobile side: expected OnTouchEvent notification + EXPECT_NOTIFICATION("OnTouchEvent", parameter) + + end + + function Test:OnTouchEvent_type_END() + + local parameter = { + type = "END", + event = { {c = {{x = 1, y = 1}}, id = 0, ts = {1000} } } + } + + --hmi side: send OnTouchEvent + self.hmiConnection:SendNotification("UI.OnTouchEvent", parameter) + + --mobile side: expected OnTouchEvent notification + EXPECT_NOTIFICATION("OnTouchEvent", parameter) + + end + + + --2. Click on navigation area with 2 fingers at the same time + function Test:OnTouchEvent_type_BEGIN_2Fingers() + print() + print("Step 2. Click on navigation area with 2 fingers at the same time") + + local parameter1 = { + type = "BEGIN", + event = { {c = {{x = 1, y = 1}}, id = 0, ts = {900} } } + } + + local parameter2 = { + type = "BEGIN", + event = { {c = {{x = 2, y = 1}}, id = 1, ts = {900} } } + } + + --hmi side: send OnTouchEvent + self.hmiConnection:SendNotification("UI.OnTouchEvent", parameter1) + self.hmiConnection:SendNotification("UI.OnTouchEvent", parameter2) + + + --mobile side: expected OnTouchEvent notification + EXPECT_NOTIFICATION("OnTouchEvent", parameter1, parameter2) + :Times(2) + + end + + function Test:OnTouchEvent_type_END_2Fingers() + + local parameter1 = { + type = "END", + event = { {c = {{x = 1, y = 1}}, id = 0, ts = {900} } } + } + + local parameter2 = { + type = "END", + event = { {c = {{x = 2, y = 1}}, id = 1, ts = {900} } } + } + + --hmi side: send OnTouchEvent + self.hmiConnection:SendNotification("UI.OnTouchEvent", parameter1) + self.hmiConnection:SendNotification("UI.OnTouchEvent", parameter2) + + + --mobile side: expected OnTouchEvent notification + EXPECT_NOTIFICATION("OnTouchEvent", parameter1, parameter2) + :Times(2) + + end + + + --3. Move on navigation area with 1 finger + function Test:OnTouchEvent_type_BEGIN() + print() + print("Step 3. Move on navigation area with 1 finger") + + local parameter = { + type = "BEGIN", + event = { {c = {{x = 1, y = 1}}, id = 0, ts = {900} } } + } + + --hmi side: send OnTouchEvent + self.hmiConnection:SendNotification("UI.OnTouchEvent", parameter) + + --mobile side: expected OnTouchEvent notification + EXPECT_NOTIFICATION("OnTouchEvent", parameter) + + end + + for i = 2, 100 do + Test["OnTouchEvent_type_MOVE_x_" .. i .. "_y_" .. i - 1 ] = function(self) + + local parameter = { + type = "MOVE", + event = { {c = {{x = i, y = i - 1}}, id = 0, ts = {900 + i} } } + } + + --hmi side: send OnTouchEvent + self.hmiConnection:SendNotification("UI.OnTouchEvent", parameter) + + --mobile side: expected OnTouchEvent notification + EXPECT_NOTIFICATION("OnTouchEvent", parameter) + + end + end + + + function Test:OnTouchEvent_type_END() + + local parameter = { + type = "END", + event = { {c = {{x = 2, y = 1}}, id = 0, ts = {1000} } } + } + + --hmi side: send OnTouchEvent + self.hmiConnection:SendNotification("UI.OnTouchEvent", parameter) + + --mobile side: expected OnTouchEvent notification + EXPECT_NOTIFICATION("OnTouchEvent", parameter) + + end + + + --4. Move on navigation area with 2 fingers + function Test:OnTouchEvent_type_BEGIN_2Fingers() + print() + print("Step 4. Move on navigation area with 2 fingers") + local parameter1 = { + type = "BEGIN", + event = { {c = {{x = 1, y = 1}}, id = 0, ts = {900} } } + } + + local parameter2 = { + type = "BEGIN", + event = { {c = {{x = 2, y = 1}}, id = 1, ts = {900} } } + } + + --hmi side: send OnTouchEvent + self.hmiConnection:SendNotification("UI.OnTouchEvent", parameter1) + self.hmiConnection:SendNotification("UI.OnTouchEvent", parameter2) + + + --mobile side: expected OnTouchEvent notification + EXPECT_NOTIFICATION("OnTouchEvent", parameter1, parameter2) + :Times(2) + + end + + for i = 1, 100 do + Test["OnTouchEvent_type_MOVE_2Fingers_Time_" .. i ] = function(self) + + local parameter1 = { + type = "MOVE", + event = { {c = {{x = 1 + i, y = 1 + i }}, id = 0, ts = {900 + i} } } + } + + local parameter2 = { + type = "MOVE", + event = { {c = {{x = 2 + i, y = 1 + i}}, id = 1, ts = {900 + i} } } + } + + --hmi side: send OnTouchEvent + self.hmiConnection:SendNotification("UI.OnTouchEvent", parameter1) + self.hmiConnection:SendNotification("UI.OnTouchEvent", parameter2) + + + --mobile side: expected OnTouchEvent notification + EXPECT_NOTIFICATION("OnTouchEvent", parameter1, parameter2) + :Times(2) + + end + end + + + + function Test:OnTouchEvent_type_END_2Fingers() + + local parameter1 = { + type = "END", + event = { {c = {{x = 101, y = 101}}, id = 0, ts = {900 + 101} } } + } + + local parameter2 = { + type = "END", + event = { {c = {{x = 102, y = 102}}, id = 1, ts = {900 + 101} } } + } + + --hmi side: send OnTouchEvent + self.hmiConnection:SendNotification("UI.OnTouchEvent", parameter1) + self.hmiConnection:SendNotification("UI.OnTouchEvent", parameter2) + + + --mobile side: expected OnTouchEvent notification + EXPECT_NOTIFICATION("OnTouchEvent", parameter1, parameter2) + :Times(2) + + end + + end + + SequenceCheck1() + + +---------------------------------------------------------------------------------------------- +--Checks of absence notifications in case of not navi app and processing in case of navi app. +---------------------------------------------------------------------------------------------- + local function SequenceCheck2() + + + function Test:Precondition_Add_New_Session() + + -- Connected expectation + Test.mobileSession2 = mobile_session.MobileSession(Test, Test.mobileConnection) + + Test.mobileSession2:StartService(7) + end + + function Test:Register_Second_App_Non_Nav() + + config.application2.registerAppInterfaceParams.appHMIType = {"DEFAULT"} + CorIdRegister = self.mobileSession2:SendRPC("RegisterAppInterface", config.application2.registerAppInterfaceParams) + strAppName = config.application2.registerAppInterfaceParams.appName + + --hmi side: expect BasicCommunication.OnAppRegistered request + EXPECT_HMINOTIFICATION("BasicCommunication.OnAppRegistered", + { + application = + { + appName = strAppName + } + }) + :Do(function(_,data) + --self.appName = data.params.application.appName + self.applications[strAppName] = data.params.application.appID + Apps[2].appID = data.params.application.appID + end) + + --mobile side: expect response + self.mobileSession2:ExpectResponse(CorIdRegister, + { + resultCode = 'SUCCESS' + }) + :Timeout(12000) + + --mobile side: expect notification + self.mobileSession2:ExpectNotification("OnHMIStatus", + { + systemContext = "MAIN", hmiLevel = "NONE", audioStreamingState = "NOT_AUDIBLE" + }) + :Timeout(12000) + end + + + function Test_Activation_App2() + + --hmi side: sending SDL.ActivateApp request + local RequestId = self.hmiConnection:SendRequest("SDL.ActivateApp", { appID = Apps[2].appID}) + EXPECT_HMIRESPONSE(RequestId) + :Do(function(_,data) + if + data.result.isSDLAllowed ~= true then + local RequestId = self.hmiConnection:SendRequest("SDL.GetUserFriendlyMessage", {language = "EN-US", messageCodes = {"DataConsent"}}) + + --hmi side: expect SDL.GetUserFriendlyMessage message response + --TODO: update after resolving APPLINK-16094. + --EXPECT_HMIRESPONSE(RequestId,{result = {code = 0, method = "SDL.GetUserFriendlyMessage"}}) + EXPECT_HMIRESPONSE(RequestId) + :Do(function(_,data) + --hmi side: send request SDL.OnAllowSDLFunctionality + self.hmiConnection:SendNotification("SDL.OnAllowSDLFunctionality", {allowed = true, source = "GUI", device = {id = config.deviceMAC, name = "127.0.0.1"}}) + + --hmi side: expect BasicCommunication.ActivateApp request + EXPECT_HMICALL("BasicCommunication.ActivateApp") + :Do(function(_,data) + --hmi side: sending BasicCommunication.ActivateApp response + self.hmiConnection:SendResponse(data.id,"BasicCommunication.ActivateApp", "SUCCESS", {}) + end) + :Times(AnyNumber()) + end) + + end + end) + + --mobile side: expect notification + self.mobileSession2:ExpectNotification("OnHMIStatus", {hmiLevel = "FULL", systemContext = "MAIN"}) + EXPECT_NOTIFICATION("OnHMIStatus", {hmiLevel = "FULL", systemContext = "MAIN"}) + end + + function Test:OnTouchEvent_Non_Navi_BEGIN() + print() + DelayedExp(2000) + local parameter = { + type = "BEGIN", + event = { {c = {{x = 1, y = 1}}, id = 0, ts = {900} } } + } + + --hmi side: send OnTouchEvent + self.hmiConnection:SendNotification("UI.OnTouchEvent", parameter) + + --mobile side: expected OnTouchEvent notification + EXPECT_NOTIFICATION("OnTouchEvent", parameter) + + --mobile side: app2 expects notification + self.mobileSession2:ExpectNotification("OnTouchEvent", parameter) + :Times(0) + end + + function Test:OnTouchEvent_Non_Navi_MOVE() + DelayedExp(2000) + local parameter = { + type = "MOVE", + event = { {c = {{x = 2, y = 2}}, id = 0, ts = {901} } } + } + + --hmi side: send OnTouchEvent + self.hmiConnection:SendNotification("UI.OnTouchEvent", parameter) + + --mobile side: expected OnTouchEvent notification + EXPECT_NOTIFICATION("OnTouchEvent", parameter) + + --mobile side: app2 expects notification + self.mobileSession2:ExpectNotification("OnTouchEvent", parameter) + :Times(0) + + end + + function Test:OnTouchEvent_Non_Navi_END() + DelayedExp(2000) + local parameter = { + type = "END", + event = { {c = {{x = 2, y = 2}}, id = 0, ts = {902} } } + } + + --hmi side: send OnTouchEvent + self.hmiConnection:SendNotification("UI.OnTouchEvent", parameter) + + --mobile side: expected OnTouchEvent notification + EXPECT_NOTIFICATION("OnTouchEvent", parameter) + + --mobile side: app2 expects notification + self.mobileSession2:ExpectNotification("OnTouchEvent", parameter) + :Times(0) + + end + + --Postcondition: + function Test:Unregister_App2() + + local cid = self.mobileSession2:SendRPC("UnregisterAppInterface",{}) + + self.mobileSession2:ExpectResponse(cid, { success = true, resultCode = "SUCCESS"}) + :Timeout(2000) + end + + + end + + SequenceCheck2() + + +---------------------------------------------------------------------------------------------- +-----------------------------------------TEST BLOCK VII--------------------------------------- +--------------------------------------Different HMIStatus------------------------------------- +---------------------------------------------------------------------------------------------- + +--Description: Check different HMIStatus + +--Requirement id in JAMA: + --N/A + + --Verification criteria: + --The applications in HMI FULL don't reject OnTouchEvent request. + --None of the applications in HMI NONE receives OnTouchEvent request. + --The applications in HMI LIMITED rejects OnTouchEvent request. + --The applications in HMI BACKGROUND rejects OnTouchEvent request. + + local function DifferentHMIlevelChecks() + + --Print new line to separate new test cases group + commonFunctions:newTestCasesGroup("Test suite: Different HMI Level Checks") + ---------------------------------------------------------------------------------------------- + + --1. HMI level is NONE + ---------------------------------------------------------------------------------------------- + --Precondition: Deactivate app to NONE HMI level + commonSteps:DeactivateAppToNoneHmiLevel() + + OnTouchEvent_Notification_IsIgnored("OnTouchEvent_Notification_InNoneHmiLevel") + + --Postcondition: Activate app + commonSteps:ActivationApp() + ---------------------------------------------------------------------------------------------- + + + --2. HMI level is LIMITED + ---------------------------------------------------------------------------------------------- + if commonFunctions:isMediaApp() then + -- Precondition: Change app to LIMITED + commonSteps:ChangeHMIToLimited() + + OnTouchEvent_Notification_IsIgnored("OnTouchEvent_Notification_InLimitedHmiLevel") + + --Postcondition: Activate app + commonSteps:ActivationApp() + end + ---------------------------------------------------------------------------------------------- + + + --3. HMI level is BACKGROUND + ---------------------------------------------------------------------------------------------- + + if config.application1.registerAppInterfaceParams.isMediaApplication == true then + + commonTestCases:ChangeAppToBackgroundHmiLevel() + + OnTouchEvent_Notification_IsIgnored("OnTouchEvent_Notification_InBackgroundHmiLevel") + + else + --APPLINK-8531 + --2. SDL must allow only one level: either FULL or LIMITED at the given moment of time for two apps of one and the same AppHMIType for the following AppHMITypes: MEDIA media, NAVIGATION non-media, COMMUNICATION non-media (per APPLINK-9802). + + -- Precondition 1: Opening new session + commonSteps:precondition_AddNewSession() + + -- Precondition 2: Register app2 + function Test:Register_The_Second_NAVIGATION_non_media() + + --mobile side: RegisterAppInterface request + local CorIdRAI = self.mobileSession2:SendRPC("RegisterAppInterface", + { + syncMsgVersion = + { + majorVersion = 3, + minorVersion = 1, + }, + appName ="SPT2", + isMediaApplication = false, + appHMIType = { "NAVIGATION" }, + languageDesired ="EN-US", + hmiDisplayLanguageDesired ="EN-US", + appID ="2", + ttsName = + { + { + text ="SyncProxyTester2", + type ="TEXT", + }, + }, + vrSynonyms = + { + "vrSPT2", + } + }) + + --hmi side: expect BasicCommunication.OnAppRegistered request + EXPECT_HMINOTIFICATION("BasicCommunication.OnAppRegistered", + { + application = + { + appName = "SPT2" + } + }) + :Do(function(_,data) + --appId2 = data.params.application.appID + Apps[2].appID = data.params.application.appID + end) + + --mobile side: RegisterAppInterface response + self.mobileSession2:ExpectResponse(CorIdRAI, { success = true, resultCode = "SUCCESS"}) + :Timeout(2000) + + self.mobileSession2:ExpectNotification("OnHMIStatus",{hmiLevel = "NONE", audioStreamingState = "NOT_AUDIBLE", systemContext = "MAIN"}) + end + + -- Precondition 3: Activate an other media app to change app to BACKGROUND + function Test:Activate_The_Second_Media_App() + + --HMI send ActivateApp request + local RequestId = self.hmiConnection:SendRequest("SDL.ActivateApp", { appID = Apps[2].appID}) + EXPECT_HMIRESPONSE(RequestId) + :Do(function(_,data) + + if data.result.isSDLAllowed ~= true then + local RequestId = self.hmiConnection:SendRequest("SDL.GetUserFriendlyMessage", {language = "EN-US", messageCodes = {"DataConsent"}}) + EXPECT_HMIRESPONSE(RequestId,{result = {code = 0, method = "SDL.GetUserFriendlyMessage"}}) + :Do(function(_,data) + --hmi side: send request SDL.OnAllowSDLFunctionality + self.hmiConnection:SendNotification("SDL.OnAllowSDLFunctionality", {allowed = true, source = "GUI", device = {id = 1, name = "127.0.0.1"}}) + end) + + EXPECT_HMICALL("BasicCommunication.ActivateApp") + :Do(function(_,data) + self.hmiConnection:SendResponse(data.id,"BasicCommunication.ActivateApp", "SUCCESS", {}) + end) + :Times(2) + end + end) + + self.mobileSession2:ExpectNotification("OnHMIStatus", {hmiLevel = "FULL", audioStreamingState = "AUDIBLE", systemContext = "MAIN"}) + :Timeout(12000) + + self.mobileSession:ExpectNotification("OnHMIStatus", {hmiLevel = "BACKGROUND", audioStreamingState = "NOT_AUDIBLE", systemContext = "MAIN"}) + end + + + OnTouchEvent_Notification_IsIgnored("OnTouchEvent_Notification_InBackgroundHmiLevel") + + end + ---------------------------------------------------------------------------------------------- + end + DifferentHMIlevelChecks() + + +return Test + + \ No newline at end of file diff --git a/test_scripts/API/ATF_PerformAudioPassThru.lua b/test_scripts/API/ATF_PerformAudioPassThru.lua new file mode 100644 index 0000000000..7151913777 --- /dev/null +++ b/test_scripts/API/ATF_PerformAudioPassThru.lua @@ -0,0 +1,8650 @@ +Test = require('connecttest') +require('cardinalities') +local events = require('events') +local mobile_session = require('mobile_session') +local mobile = require('mobile_connection') +local tcp = require('tcp_connection') +local file_connection = require('file_connection') + +local module = require('testbase') + +--------------------------------------------------------------------------------------------- +-----------------------------Required Shared Libraries--------------------------------------- +--------------------------------------------------------------------------------------------- +local commonFunctions = require('user_modules/shared_testcases/commonFunctions') +local commonSteps = require('user_modules/shared_testcases/commonSteps') +local commonTestCases = require('user_modules/shared_testcases/commonTestCases') +local policyTable = require('user_modules/shared_testcases/testCasesForPolicyTable') +local integerParameter = require('user_modules/shared_testcases/testCasesForIntegerParameter') +local stringParameterInResponse = require('user_modules/shared_testcases/testCasesForStringParameterInResponse') +local integerParameterInResponse = require('user_modules/shared_testcases/testCasesForIntegerParameterInResponse') +local arrayStringParameterInResponse = require('user_modules/shared_testcases/testCasesForArrayStringParameterInResponse') +require('user_modules/AppTypes') + +--------------------------------------------------------------------------------------------- +------------------------------------ Common Variables --------------------------------------- +--------------------------------------------------------------------------------------------- +APIName = "PerformAudioPassThru" -- set request name + +local infoMessage = string.rep("a", 1000) +local SDLConfig = require('user_modules/shared_testcases/SmartDeviceLinkConfigurations') +local storagePath = config.pathToSDL .. SDLConfig:GetValue("AppStorageFolder") .. "/" .. tostring(config.application1.registerAppInterfaceParams.appID .. "_" .. tostring(config.deviceMAC) .. "/") +local function SendOnSystemContext(self, ctx) + self.hmiConnection:SendNotification("UI.OnSystemContext",{ appID = self.applications["Test Application"], systemContext = ctx }) +end +local function ExpectOnHMIStatusWithAudioStateChanged(self, level, isInitialPrompt,timeout) + if timeout == nil then timeout = 20000 end + if level == nil then level = "FULL" end + + if + level == "FULL" then + if + self.isMediaApplication == true or + Test.appHMITypes["NAVIGATION"] == true then + if isInitialPrompt == true then + EXPECT_NOTIFICATION("OnHMIStatus", + { hmiLevel = level, audioStreamingState = "ATTENUATED", systemContext = "MAIN"}, + { hmiLevel = level, audioStreamingState = "ATTENUATED", systemContext = "HMI_OBSCURED"}, + { hmiLevel = level, audioStreamingState = "AUDIBLE", systemContext = "HMI_OBSCURED"}, + { hmiLevel = level, audioStreamingState = "AUDIBLE", systemContext = "MAIN"}) + :Times(4) + :Timeout(timeout) + else + EXPECT_NOTIFICATION("OnHMIStatus", + { hmiLevel = level, audioStreamingState = "AUDIBLE", systemContext = "HMI_OBSCURED"}, + { hmiLevel = level, audioStreamingState = "AUDIBLE", systemContext = "MAIN"}) + :Times(2) + :Timeout(timeout) + end + elseif + self.isMediaApplication == false then + EXPECT_NOTIFICATION("OnHMIStatus", + { hmiLevel = level, audioStreamingState = "NOT_AUDIBLE", systemContext = "HMI_OBSCURED"}, + { hmiLevel = level, audioStreamingState = "NOT_AUDIBLE", systemContext = "MAIN"}) + :Times(2) + :Timeout(timeout) + end + elseif + level == "LIMITED" then + + if + self.isMediaApplication == true or + Test.appHMITypes["NAVIGATION"] == true then + if isInitialPrompt == true then + EXPECT_NOTIFICATION("OnHMIStatus", + { hmiLevel = level, audioStreamingState = "ATTENUATED", systemContext = "MAIN"}, + { hmiLevel = level, audioStreamingState = "AUDIBLE", systemContext = "MAIN"}) + :Times(2) + :Timeout(timeout) + else + EXPECT_NOTIFICATION("OnHMIStatus") + :Times(0) + :Timeout(timeout) + end + elseif + self.isMediaApplication == false then + + EXPECT_NOTIFICATION("OnHMIStatus") + :Times(0) + + EXPECT_NOTIFICATION("OnAudioPassThru") + :Times(0) + + DelayedExp(1000) + end + elseif + level == "BACKGROUND" then + + EXPECT_NOTIFICATION("OnHMIStatus") + :Times(0) + + EXPECT_NOTIFICATION("OnAudioPassThru") + :Times(0) + + DelayedExp(1000) + end +end +local function printError(errorMessage) + print(" \27[36m " .. errorMessage .. " \27[0m ") +end +function DelayedExp(timeout) + local event = events.Event() + event.matches = function(self, e) return self == e end + EXPECT_EVENT(event, "Delayed event") + RUN_AFTER(function() + RAISE_EVENT(event, event) + end, timeout) +end + +--------------------------------------------------------------------------------------------- +-------------------------- Overwrite These Functions For This Script------------------------- +--------------------------------------------------------------------------------------------- +--Specific functions for this script +--1. createRequest() +--2. createUIParameters(RequestParams) +--3. verify_SUCCESS_Case(RequestParams) +--4. verify_INVALID_DATA_Case(RequestParams) +--------------------------------------------------------------------------------------------- + +--Create default request parameters +function createRequest() + + return { + samplingRate ="8KHZ", + maxDuration = 2000, + bitsPerSample ="8_BIT", + audioType = "PCM" + } + +end +--------------------------------------------------------------------------------------------- + +--Create TTS.Speak expected result based on parameters from the request +function Test:createTTSSpeakParameters(RequestParams) + local param = {} + + param["speakType"] = "AUDIO_PASS_THRU" + + --initialPrompt + if RequestParams["initialPrompt"] ~= nil then + param["ttsChunks"] = { + { + text = RequestParams.initialPrompt[1].text, + type = RequestParams.initialPrompt[1].type, + }, + } + end + + return param +end + + +--Create UI expected result based on parameters from the request +function Test:createUIParameters(Request) + local param = {} + + param["muteAudio"] = Request["muteAudio"] + param["maxDuration"] = Request["maxDuration"] + + local j = 0 + --audioPassThruDisplayText1 + if Request["audioPassThruDisplayText1"] ~= nil then + j = j + 1 + if param["audioPassThruDisplayTexts"] == nil then + param["audioPassThruDisplayTexts"] = {} + end + param["audioPassThruDisplayTexts"][j] = { + fieldName = "audioPassThruDisplayText1", + fieldText = Request["audioPassThruDisplayText1"] + } + end + + --audioPassThruDisplayText2 + if Request["audioPassThruDisplayText2"] ~= nil then + j = j + 1 + if param["audioPassThruDisplayTexts"] == nil then + param["audioPassThruDisplayTexts"] = {} + end + param["audioPassThruDisplayTexts"][j] = { + fieldName = "audioPassThruDisplayText2", + fieldText = Request["audioPassThruDisplayText2"] + } + end + + return param +end +--------------------------------------------------------------------------------------------- + +--This function sends a request from mobile and verify result on HMI and mobile for SUCCESS resultCode cases. +function Test:verify_SUCCESS_Case(RequestParams, level) + if level == nil then level = "FULL" end + + --mobile side: sending PerformAudioPassThru request + local cid = self.mobileSession:SendRPC(APIName, RequestParams) + + --commonFunctions:printTable(RequestParams) + + UIParams = self:createUIParameters(RequestParams) + TTSSpeakParams = self:createTTSSpeakParameters(RequestParams) + + if RequestParams["initialPrompt"] ~= nil then + --hmi side: expect TTS.Speak request + EXPECT_HMICALL("TTS.Speak", TTSSpeakParams) + :Do(function(_,data) + --Send notification to start TTS + self.hmiConnection:SendNotification("TTS.Started") + + local function ttsSpeakResponse() + --hmi side: sending TTS.Speak response + self.hmiConnection:SendResponse(data.id, data.method, "SUCCESS", {}) + + --Send notification to stop TTS + self.hmiConnection:SendNotification("TTS.Stopped") + + --hmi side: expect UI.OnRecordStart + EXPECT_HMINOTIFICATION("UI.OnRecordStart", {appID = self.applications["Test Application"]}) + end + + RUN_AFTER(ttsSpeakResponse, 50) + end) + end + + --hmi side: expect UI.PerformAudioPassThru request + EXPECT_HMICALL("UI.PerformAudioPassThru", UIParams) + :Do(function(_,data) + SendOnSystemContext(self,"HMI_OBSCURED") + + + local function uiResponse() + --hmi side: sending UI.PerformAudioPassThru response + self.hmiConnection:SendResponse(data.id, data.method, "SUCCESS", {}) + + SendOnSystemContext(self,"MAIN") + end + + RUN_AFTER(uiResponse, 1500) + end) + + ExpectOnHMIStatusWithAudioStateChanged(self, level, RequestParams["initialPrompt"] ~= nil) + + --mobile side: expect OnAudioPassThru response + EXPECT_NOTIFICATION("OnAudioPassThru") + :Times(AtLeast(1)) + :Timeout(10000) + + --mobile side: expect PerformAudioPassThru response + EXPECT_RESPONSE(cid, { success = true, resultCode = "SUCCESS" }) + + --:ValidIf (function(_,data) + -- if file_check(storagePath.."audio.wav") ~= true then + -- print(" \27[36m Can not found file: audio.wav \27[0m ") + -- return false + -- else + -- return true + -- end +-- end) + + DelayedExp(1000) +end + +--This function sends a request from mobile with INVALID_DATA and verify result on mobile. +function Test:verify_INVALID_DATA_Case(RequestParams) + cid = self.mobileSession:SendRPC(APIName, RequestParams) + + --mobile side: expect PerformAudioPassThru response + EXPECT_RESPONSE(cid, { success = false, resultCode = "INVALID_DATA" }) + + DelayedExp(1000) +end + +--This function to create number of initialPrompt +function createInitialPrompt(n) + temp = {} + for i = 1, n do + temp[i] = { + text = tostring(i)..string.rep("a",500-string.len(tostring(i))), + type = "TEXT", + } + end + return temp +end + +--Description: Update policy from specific file + --policyFileName: Name of policy file + --bAllowed: true if want to allowed New group policy + -- false if want to disallowed New group policy +local groupID = 193465391 +local groupName = "New" +function Test:policyUpdate(policyFileName, consent, bAllowed) + --hmi side: sending SDL.GetURLS request + local RequestIdGetURLS = self.hmiConnection:SendRequest("SDL.GetURLS", { service = 7 }) + + --hmi side: expect SDL.GetURLS response from HMI + EXPECT_HMIRESPONSE(RequestIdGetURLS,{result = {code = 0, method = "SDL.GetURLS", urls = {{url = "http://policies.telematics.ford.com/api/policies"}}}}) + :Do(function(_,data) + --print("SDL.GetURLS response is received") + --hmi side: sending BasicCommunication.OnSystemRequest request to SDL + self.hmiConnection:SendNotification("BasicCommunication.OnSystemRequest", + { + requestType = "PROPRIETARY", + fileName = "filename" + } + ) + --mobile side: expect OnSystemRequest notification + EXPECT_NOTIFICATION("OnSystemRequest", { requestType = "PROPRIETARY" }) + :Do(function(_,data) + --print("OnSystemRequest notification is received") + --mobile side: sending SystemRequest request + local CorIdSystemRequest = self.mobileSession:SendRPC("SystemRequest", + { + fileName = "PolicyTableUpdate", + requestType = "PROPRIETARY" + }, + "files/"..policyFileName) + + local systemRequestId + --hmi side: expect SystemRequest request + EXPECT_HMICALL("BasicCommunication.SystemRequest") + :Do(function(_,data) + systemRequestId = data.id + --print("BasicCommunication.SystemRequest is received") + + --hmi side: sending BasicCommunication.OnSystemRequest request to SDL + self.hmiConnection:SendNotification("SDL.OnReceivedPolicyUpdate", + { + policyfile = "/tmp/fs/mp/images/ivsu_cache/PolicyTableUpdate" + } + ) + function to_run() + --hmi side: sending SystemRequest response + self.hmiConnection:SendResponse(systemRequestId,"BasicCommunication.SystemRequest", "SUCCESS", {}) + end + + RUN_AFTER(to_run, 500) + end) + + --hmi side: expect SDL.OnStatusUpdate + EXPECT_HMINOTIFICATION("SDL.OnStatusUpdate") + :ValidIf(function(exp,data) + if + exp.occurences == 1 and + data.params.status == "UP_TO_DATE" then + return true + elseif + exp.occurences == 1 and + data.params.status == "UPDATING" then + return true + elseif + exp.occurences == 2 and + data.params.status == "UP_TO_DATE" then + return true + else + if + exp.occurences == 1 then + print ("\27[31m SDL.OnStatusUpdate came with wrong values. Expected in first occurrences status 'UP_TO_DATE' or 'UPDATING', got '" .. tostring(data.params.status) .. "' \27[0m") + elseif exp.occurences == 2 then + print ("\27[31m SDL.OnStatusUpdate came with wrong values. Expected in second occurrences status 'UP_TO_DATE', got '" .. tostring(data.params.status) .. "' \27[0m") + end + return false + end + end) + :Times(Between(1,2)) + + --mobile side: expect SystemRequest response + EXPECT_RESPONSE(CorIdSystemRequest, { success = true, resultCode = "SUCCESS"}) + :Do(function(_,data) + --print("SystemRequest is received") + --hmi side: sending SDL.GetUserFriendlyMessage request to SDL + local RequestIdGetUserFriendlyMessage = self.hmiConnection:SendRequest("SDL.GetUserFriendlyMessage", {language = "EN-US", messageCodes = {"StatusUpToDate"}}) + + --hmi side: expect SDL.GetUserFriendlyMessage response + EXPECT_HMIRESPONSE(RequestIdGetUserFriendlyMessage,{result = {code = 0, method = "SDL.GetUserFriendlyMessage", messages = {{line1 = "Up-To-Date", messageCode = "StatusUpToDate", textBody = "Up-To-Date"}}}}) + :Do(function(_,data) + --print("SDL.GetUserFriendlyMessage is received") + if consent == true then + --hmi side: sending SDL.GetListOfPermissions request to SDL + local RequestIdGetListOfPermissions = self.hmiConnection:SendRequest("SDL.GetListOfPermissions", {appID = self.applications["Test Application"]}) + + -- hmi side: expect SDL.GetListOfPermissions response + -- TODO: update after resolving APPLINK-16094 EXPECT_HMIRESPONSE(RequestIdGetListOfPermissions,{result = {code = 0, method = "SDL.GetListOfPermissions", allowedFunctions = {{name = groupName}}}}) + EXPECT_HMIRESPONSE(RequestIdGetListOfPermissions) + :Do(function(_,data) + --hmi side: sending SDL.OnAppPermissionConsent + self.hmiConnection:SendNotification("SDL.OnAppPermissionConsent", { appID = self.applications["Test Application"], consentedFunctions = {{ allowed = bAllowed, id = groupID, name = groupName}}, source = "GUI"}) + end) + end + end) + end) + + end) + end) +end + +--Description: Function used to check file is existed on expected path + --file_name: file want to check +function file_check(file_name) + local file_found=io.open(file_name, "r") + + if file_found==nil then + return false + else + return true + end +end + +--------------------------------------------------------------------------------------------- +-------------------------------------------Preconditions------------------------------------- +--------------------------------------------------------------------------------------------- + + --Print new line to separate Preconditions + commonFunctions:newTestCasesGroup("Preconditions") + + --1. Delete Logs + commonSteps:DeleteLogsFileAndPolicyTable() + + --2. Activate application + commonSteps:ActivationApp() + + --3. Update policy to allow request + policyTable:Precondition_updatePolicy_By_overwriting_preloaded_pt("files/PTU_OmittedPerformAudioPassThru.json", "files/PTU_ForPerformAudioPassThru.json") + + +--------------------------------------------------------------------------------------------- +-----------------------------------------I TEST BLOCK---------------------------------------- +--CommonRequestCheck: Check of mandatory/conditional request's parameters (mobile protocol)-- +--------------------------------------------------------------------------------------------- + --Begin Test suit PositiveRequestCheck + + --Print new line to separate test suite + commonFunctions:newTestCasesGroup("Test Suite For PositiveRequestCheck") + + --Description: TC's checks processing + -- request with all parameters + -- request with only mandatory parameters + -- request with all combinations of conditional-mandatory parameters (if exist) + -- request with one by one conditional parameters (each case - one conditional parameter) + -- request with missing mandatory parameters one by one (each case - missing one mandatory parameter) + -- request with all parameters are missing + -- request with fake parameters (fake - not from protocol, from another request) + -- request is sent with invalid JSON structure + -- different conditions of correlationID parameter (invalid, several the same etc.) + + --Begin Test case CommonRequestCheck.1 + --Description: This test is intended to check positive cases and when all parameters are in boundary conditions + + --Requirement id in JAMA: + --SDLAQ-CRS-81 + --SDLAQ-CRS-553 + --SDLAQ-CRS-2999 + + --Verification criteria: + -- PerformAudioPassThru takes audio from microphone connected to SDL platform. Audio data has been written into the directory on SDL (one level upper then app's directory). The audio stream starts transferring data from the stored file with OnAudioPassThru notification as soon as possible and playing it on the mobile device. + -- In case SDL receives PerformAudioPassThru request with valid "initialPrompt" param from mobile app, SDL must send TTS.Speak with "speakType"=AUDIO_PASS_THRU param (and other values from app's "initialPrompt" and send UI.PerformAudioPassThru as assigned by previously-confirmed requirements). + function Test:PerformAudioPassThru_Positive() + local params = { + initialPrompt = + { + { + text ="Makeyourchoice", + type ="TEXT", + }, + }, + audioPassThruDisplayText1 ="DisplayText1", + audioPassThruDisplayText2 ="DisplayText2", + samplingRate ="8KHZ", + maxDuration = 2000, + bitsPerSample ="8_BIT", + audioType ="PCM", + muteAudio = true, + } + self:verify_SUCCESS_Case(params) + end + --End Test case CommonRequestCheck.1 + + ----------------------------------------------------------------------------------------- + + --Begin Test case CommonRequestCheck.2 + --Description: This test is intended to check request with mandatory and with or without conditional parameters + + --Requirement id in JAMA/or Jira ID: SDLAQ-CRS-81 + + --Verification criteria: PerformAudioPassThru takes audio from microphone connected to SDL platform. Audio data has been written into the directory on SDL (one level upper then app's directory). The audio stream starts transferring data from the stored file with OnAudioPassThru notification as soon as possible and playing it on the mobile device. + + --Begin Test case CommonRequestCheck.2.1 + --Description: Request with only mandatory parameters + function Test:PerformAudioPassThru_MandatoryOnly() + local params = createRequest() + self:verify_SUCCESS_Case(params) + end + --End Test case CommonRequestCheck.2.1 + + ----------------------------------------------------------------------------------------- + + --Begin Test case CommonRequestCheck.2.2 + --Description: Request with conditional parameter: initialPrompt + function Test:PerformAudioPassThru_WithConditional_initialPrompt() + local params = createRequest() + params["initialPrompt"] = { + { + text ="Makeyourchoice", + type ="TEXT", + }, + } + + self:verify_SUCCESS_Case(params) + end + --End Test case CommonRequestCheck.2.2 + + ----------------------------------------------------------------------------------------- + + --Begin Test case CommonRequestCheck.2.3 + --Description: Request with conditional parameter: audioPassThruDisplayText1 + function Test:PerformAudioPassThru_WithConditional_audioPassThruDisplayText1() + local params = createRequest() + params["audioPassThruDisplayText1"] = "audioPassThruDisplayText1" + self:verify_SUCCESS_Case(params) + end + --End Test case CommonRequestCheck.2.3 + + ----------------------------------------------------------------------------------------- + + --Begin Test case CommonRequestCheck.2.4 + --Description: Request with conditional parameter: audioPassThruDisplayText2 + function Test:PerformAudioPassThru_WithConditional_audioPassThruDisplayText2() + local params = createRequest() + params["audioPassThruDisplayText2"] = "audioPassThruDisplayText2" + self:verify_SUCCESS_Case(params) + end + --End Test case CommonRequestCheck.2.4 + + ----------------------------------------------------------------------------------------- + + --Begin Test case CommonRequestCheck.2.5 + --Description: Request with conditional parameter: muteAudio + function Test:PerformAudioPassThru_WithConditional_muteAudio() + local params = createRequest() + params["muteAudio"] = true + self:verify_SUCCESS_Case(params) + end + --End Test case CommonRequestCheck.2.5 + --End Test case CommonRequestCheck.2 + + ----------------------------------------------------------------------------------------- + + --Begin Test case CommonRequestCheck.3 + --Description: This test is intended to check processing requests without mandatory parameters + + --Requirement id in JAMA: + --SDLAQ-CRS-554 + + --Verification criteria: + -- The request without "samplingRate" is sent, the response with INVALID_DATA result code is returned. + -- The request without "maxDuration" is sent, the response with INVALID_DATA result code is returned. + -- The request without "bitsPerSample" is sent, the response with INVALID_DATA result code is returned. + -- The request without "audioType" is sent, the response with INVALID_DATA result code is returned. + + --Begin Test case CommonRequestCheck.3.1 + --Description: Mandatory missing - samplingRate + function Test:PerformAudioPassThru_samplingRateMissing() + local params = createRequest() + params["samplingRate"] = nil + self:verify_INVALID_DATA_Case(params) + end + --End Test case CommonRequestCheck.3.1 + + ----------------------------------------------------------------------------------------- + + --Begin Test case CommonRequestCheck.3.2 + --Description: Mandatory missing - maxDuration + function Test:PerformAudioPassThru_maxDurationMissing() + local params = createRequest() + params["maxDuration"] = nil + self:verify_INVALID_DATA_Case(params) + end + --End Test case CommonRequestCheck.3.2 + + ----------------------------------------------------------------------------------------- + + --Begin Test case CommonRequestCheck.3.3 + --Description: Mandatory missing - bitsPerSample + function Test:PerformAudioPassThru_bitsPerSampleMissing() + local params = createRequest() + params["bitsPerSample"] = nil + self:verify_INVALID_DATA_Case(params) + end + --End Test case CommonRequestCheck.3.3 + + ----------------------------------------------------------------------------------------- + + --Begin Test case CommonRequestCheck.3.4 + --Description: Mandatory missing - audioType + function Test:PerformAudioPassThru_audioTypeMissing() + local params = createRequest() + params["audioType"] = nil + self:verify_INVALID_DATA_Case(params) + end + --End Test case CommonRequestCheck.3.4 + + ----------------------------------------------------------------------------------------- + + --Begin Test case CommonRequestCheck.3.5 + --Description: Mandatory missing - initialPrompt - text missing + function Test:PerformAudioPassThru_initialPromptTextMissing() + local params = createRequest() + params["initialPrompt"] = { + { + type ="TEXT", + }, + } + self:verify_INVALID_DATA_Case(params) + end + --End Test case CommonRequestCheck.3.5 + + ----------------------------------------------------------------------------------------- + + --Begin Test case CommonRequestCheck.3.6 + --Description: Mandatory missing - initialPrompt - type missing + function Test:PerformAudioPassThru_initialPromptTypeMissing() + local params = createRequest() + params["initialPrompt"] = { + { + text = "ABC" + }, + } + self:verify_INVALID_DATA_Case(params) + end + --End Test case CommonRequestCheck.3.6 + + ----------------------------------------------------------------------------------------- + + --Begin Test case CommonRequestCheck.3.7 + --Description: Missing all params + function Test:PerformAudioPassThru_AllParamsMissing() + local params = {} + self:verify_INVALID_DATA_Case(params) + end + --End Test case CommonRequestCheck.3.7 + --End Test case CommonRequestCheck.3 + + ----------------------------------------------------------------------------------------- + + --Begin Test case CommonRequestCheck.4 + --Description: Check processing request with different fake parameters + + --Requirement id in JAMA: + --APPLINK-14765 + + --Verification criteria: + --SDL must cut off the fake parameters from requests, responses and notifications received from HMI + + --Begin Test case CommonRequestCheck.4.1 + --Description: Parameter not from protocol + function Test:PerformAudioPassThru_FakeParam() + local params = { + initialPrompt = + { + { + text ="Makeyourchoice", + type ="TEXT", + fakeParam ="fakeParam", + }, + }, + fakeParam ="fakeParam", + audioPassThruDisplayText1 ="DisplayText1", + audioPassThruDisplayText2 ="DisplayText2", + samplingRate ="8KHZ", + maxDuration = 2000, + bitsPerSample ="8_BIT", + audioType ="PCM", + muteAudio = true, + } + + --mobile side: sending PerformAudioPassThru request + local cid = self.mobileSession:SendRPC(APIName, params) + + UIParams = self:createUIParameters(params) + TTSSpeakParams = self:createTTSSpeakParameters(params) + + --hmi side: expect TTS.Speak request + EXPECT_HMICALL("TTS.Speak", TTSSpeakParams) + :Do(function(_,data) + --Send notification to start TTS + self.hmiConnection:SendNotification("TTS.Started") + + local function ttsSpeakResponse() + --hmi side: sending TTS.Speak response + self.hmiConnection:SendResponse(data.id, data.method, "SUCCESS", {}) + + --Send notification to stop TTS + self.hmiConnection:SendNotification("TTS.Stopped") + + --hmi side: expect UI.OnRecordStart + EXPECT_HMINOTIFICATION("UI.OnRecordStart", {appID = self.applications["Test Application"]}) + end + + RUN_AFTER(ttsSpeakResponse, 50) + end) + :ValidIf(function(_,data) + if data.params.fakeParam or + data.params.ttsChunks[1].fakeParam then + printError(" SDL re-sends fakeParam parameters to HMI in TTS.Speak request") + return false + else + return true + end + end) + + --hmi side: expect UI.PerformAudioPassThru request + EXPECT_HMICALL("UI.PerformAudioPassThru", UIParams) + :Do(function(_,data) + SendOnSystemContext(self,"HMI_OBSCURED") + + local function uiResponse() + --hmi side: sending UI.PerformAudioPassThru response + self.hmiConnection:SendResponse(data.id, data.method, "SUCCESS", {}) + + SendOnSystemContext(self,"MAIN") + end + + RUN_AFTER(uiResponse, 1500) + end) + :ValidIf(function(_,data) + if data.params.fakeParam then + printError(" SDL re-sends fakeParam parameters to HMI in TTS.Speak request") + return false + else + return true + end + end) + + ExpectOnHMIStatusWithAudioStateChanged(self, level, true) + + --mobile side: expect PerformAudioPassThru response + EXPECT_RESPONSE(cid, { success = true, resultCode = "SUCCESS" }) + + DelayedExp(1000) + end + --Begin Test case CommonRequestCheck.4.1 + + ----------------------------------------------------------------------------------------- + + --Begin Test case CommonRequestCheck.4.2 + --Description: Parameters from another request + function Test:PerformAudioPassThru_ParamsAnotherRequest() + local params = { + initialPrompt = + { + { + text ="Makeyourchoice", + type ="TEXT", + gps = true + }, + }, + gps = true, + audioPassThruDisplayText1 ="DisplayText1", + audioPassThruDisplayText2 ="DisplayText2", + samplingRate ="8KHZ", + maxDuration = 2000, + bitsPerSample ="8_BIT", + audioType ="PCM", + muteAudio = true, + } + + --mobile side: sending PerformAudioPassThru request + local cid = self.mobileSession:SendRPC(APIName, params) + + UIParams = self:createUIParameters(params) + TTSSpeakParams = self:createTTSSpeakParameters(params) + + --hmi side: expect TTS.Speak request + EXPECT_HMICALL("TTS.Speak", TTSSpeakParams) + :Do(function(_,data) + --Send notification to start TTS + self.hmiConnection:SendNotification("TTS.Started") + + local function ttsSpeakResponse() + --hmi side: sending TTS.Speak response + self.hmiConnection:SendResponse(data.id, data.method, "SUCCESS", {}) + + --Send notification to stop TTS + self.hmiConnection:SendNotification("TTS.Stopped") + + --hmi side: expect UI.OnRecordStart + EXPECT_HMINOTIFICATION("UI.OnRecordStart", {appID = self.applications["Test Application"]}) + end + + RUN_AFTER(ttsSpeakResponse, 50) + end) + :ValidIf(function(_,data) + if data.params.gps or + data.params.ttsChunks[1].gps then + printError(" SDL re-sends fakeParam parameters to HMI in TTS.Speak request") + return false + else + return true + end + end) + + --hmi side: expect UI.PerformAudioPassThru request + EXPECT_HMICALL("UI.PerformAudioPassThru", UIParams) + :Do(function(_,data) + SendOnSystemContext(self,"HMI_OBSCURED") + + local function uiResponse() + --hmi side: sending UI.PerformAudioPassThru response + self.hmiConnection:SendResponse(data.id, data.method, "SUCCESS", {}) + + SendOnSystemContext(self,"MAIN") + end + + RUN_AFTER(uiResponse, 1500) + end) + :ValidIf(function(_,data) + if data.params.gps then + printError(" SDL re-sends fakeParam parameters to HMI in UI.PerformAudioPassThru request") + return false + else + return true + end + end) + + ExpectOnHMIStatusWithAudioStateChanged(self, level, true) + + --mobile side: expect PerformAudioPassThru response + EXPECT_RESPONSE(cid, { success = true, resultCode = "SUCCESS" }) + + DelayedExp(1000) + end + --End Test case CommonRequestCheck.4.2 + --End Test case CommonRequestCheck.4 + + ----------------------------------------------------------------------------------------- + + --Begin Test case CommonRequestCheck.5 + --Description: Invalid JSON + + --Requirement id in JAMA: + --SDLAQ-CRS-554 + + --Verification criteria: + --The request with wrong JSON syntax is sent, the response with INVALID_DATA result code is returned. + function Test:PerformAudioPassThru_IncorrectJSON() + local msg = + { + serviceType = 7, + frameInfo = 0, + rpcType = 0, + rpcFunctionId = 16, + rpcCorrelationId = self.mobileSession.correlationId, + --< check VR response + vr_ui: 1 --> check UI response + vr_ui: 2 --> check VR & UI response +]] +function Test:performInteraction_NegativeResponse(vr_ui,corId, methodName, resultCode, params, exResultCode) + local paramsSend = performInteractionAllParams() + paramsSend.interactionMode = "BOTH" + + --mobile side: sending PerformInteraction request + local cid = self.mobileSession:SendRPC("PerformInteraction",paramsSend) + + --hmi side: expect VR.PerformInteraction request + EXPECT_HMICALL("VR.PerformInteraction", + { + helpPrompt = paramsSend.helpPrompt, + initialPrompt = paramsSend.initialPrompt, + timeout = paramsSend.timeout, + timeoutPrompt = paramsSend.timeoutPrompt + }) + :Do(function(_,data) + --self.hmiConnection:SendError(data.id, data.method, "TIMED_OUT", "") + if vr_ui == 0 or vr_ui == 2 then + local idValue, methodNameValue, resultCodeValue, parmsValue + + if corId ~= nil then idValue = corId else idValue = data.id end + if methodName ~= nil then methodNameValue = methodName else methodNameValue = data.method end + if resultCode ~= nil then resultCodeValue = resultCode else resultCodeValue = "TIMED_OUT" end + if params ~= nil then parmsValue = params else parmsValue = {} end + + if resultCodeValue ~= "SUCCESS" then + self.hmiConnection:SendError(idValue, methodNameValue, resultCodeValue, "") + else + self.hmiConnection:SendResponse(idValue, methodNameValue, resultCodeValue, parmsValue) + end + end + end) + + --hmi side: expect UI.PerformInteraction request + EXPECT_HMICALL("UI.PerformInteraction", + { + timeout = paramsSend.timeout, + choiceSet = setExChoiseSet(paramsSend.interactionChoiceSetIDList), + initialText = + { + fieldName = "initialInteractionText", + fieldText = paramsSend.initialText + }, + vrHelp = paramsSend.vrHelp, + vrHelpTitle = paramsSend.initialText + }) + :Do(function(_,data) + --self.hmiConnection:SendError(data.id, data.method, "TIMED_OUT", "") + if vr_ui == 1 or vr_ui == 2 then + local idValue, methodNameValue, resultCodeValue, parmsValue + + if corId ~= nil then idValue = corId else idValue = data.id end + if methodName ~= nil then methodNameValue = methodName else methodNameValue = data.method end + if resultCode ~= nil then resultCodeValue = resultCode else resultCodeValue = "TIMED_OUT" end + if params ~= nil then parmsValue = params else parmsValue = {} end + + if resultCodeValue ~= "SUCCESS" then + self.hmiConnection:SendError(idValue, methodNameValue, resultCodeValue, "") + else + self.hmiConnection:SendResponse(idValue, methodNameValue, resultCodeValue, parmsValue) + end + end + end) + + --mobile side: expect PerformInteraction response + EXPECT_RESPONSE(cid, { success = false, resultCode = "INVALID_DATA" }) +end +function Test:activationApp(appIDValue) + --hmi side: sending SDL.ActivateApp request + local RequestId = self.hmiConnection:SendRequest("SDL.ActivateApp", { appID = appIDValue}) + + --hmi side: expect SDL.ActivateApp response + EXPECT_HMIRESPONSE(RequestId) + :Do(function(_,data) + --In case when app is not allowed, it is needed to allow app + if + data.result.isSDLAllowed ~= true then + + --hmi side: sending SDL.GetUserFriendlyMessage request + local RequestId = self.hmiConnection:SendRequest("SDL.GetUserFriendlyMessage", + {language = "EN-US", messageCodes = {"DataConsent"}}) + + --hmi side: expect SDL.GetUserFriendlyMessage response + EXPECT_HMIRESPONSE(RequestId,{result = {code = 0, method = "SDL.GetUserFriendlyMessage"}}) + :Do(function(_,data) + + --hmi side: send request SDL.OnAllowSDLFunctionality + self.hmiConnection:SendNotification("SDL.OnAllowSDLFunctionality", + {allowed = true, source = "GUI", device = {id = config.deviceMAC, name = "127.0.0.1"}}) + + --hmi side: expect BasicCommunication.ActivateApp request + EXPECT_HMICALL("BasicCommunication.ActivateApp") + :Do(function(_,data) + + --hmi side: sending BasicCommunication.ActivateApp response + self.hmiConnection:SendResponse(data.id,"BasicCommunication.ActivateApp", "SUCCESS", {}) + + end) + :Times(2) + + end) + + end + end) + end + + +--------------------------------------------------------------------------------------------- +-------------------------------------------Preconditions------------------------------------- +--------------------------------------------------------------------------------------------- + + --Begin Precondition.1 + --Description: Allow OnKeyboardInput in all levels + function Test:StopSDLToBackUpPreloadedPt( ... ) + -- body + StopSDL() + DelayedExp(1000) + end + + function Test:BackUpPreloadedPt() + -- body + os.execute('cp ' .. config.pathToSDL .. 'sdl_preloaded_pt.json' .. ' ' .. config.pathToSDL .. 'backup_sdl_preloaded_pt.json') + os.execute('rm ' .. config.pathToSDL .. 'policy.sqlite') + end + + function Test:UpdatePreloadedJson(pathToFile) + -- body + pathToFile = config.pathToSDL .. 'sdl_preloaded_pt.json' + local file = io.open(pathToFile, "r") + local json_data = file:read("*all") -- may be abbreviated to "*a"; + file:close() + + local json = require("modules/json") + + local data = json.decode(json_data) + for k,v in pairs(data.policy_table.functional_groupings) do + + if (data.policy_table.functional_groupings[k].rpcs == nil) then + --do + data.policy_table.functional_groupings[k] = nil + else + --do + local count = 0 + for _ in pairs(data.policy_table.functional_groupings[k].rpcs) do count = count + 1 end + if (count < 30) then + --do + data.policy_table.functional_groupings[k] = nil + end + end + end + + --PerformInteraction hmi_level = BACKGROUND + --data.policy_table.functional_groupings.Base4.rpcs.PerformInteraction.hmi_levels = {'FULL','LIMITED','BACKGROUND'} + + --OnKeyboardInputGroup + + data.policy_table.functional_groupings.OnKeyboardInputGroup = {} + data.policy_table.functional_groupings.OnKeyboardInputGroup.rpcs = {} + data.policy_table.functional_groupings.OnKeyboardInputGroup.rpcs.OnKeyboardInput = {} + data.policy_table.functional_groupings.OnKeyboardInputGroup.rpcs.OnKeyboardInput.hmi_levels = {'FULL'} + + data.policy_table.functional_groupings.PerformInteractionGroup = {} + data.policy_table.functional_groupings.PerformInteractionGroup.rpcs = {} + data.policy_table.functional_groupings.PerformInteractionGroup.rpcs.PerformInteraction = {} + data.policy_table.functional_groupings.PerformInteractionGroup.rpcs.PerformInteraction.hmi_levels = {'FULL', 'LIMITED', 'BACKGROUND'} + + data.policy_table.app_policies.default.groups = {"Base-4", "OnKeyboardInputGroup", "PerformInteractionGroup"} + + data = json.encode(data) + --print(data) + -- for i=1, #data.policy_table.app_policies.default.groups do + -- print(data.policy_table.app_policies.default.groups[i]) + -- end + file = io.open(pathToFile, "w") + file:write(data) + file:close() + end + + local function StartSDLAfterChangePreloaded() + -- body + + Test["Precondition_StartSDL"] = function(self) + StartSDL(config.pathToSDL, config.ExitOnCrash) + DelayedExp(1000) + end + + Test["Precondition_InitHMI_1"] = function(self) + self:initHMI() + end + + Test["Precondition_InitHMI_onReady_1"] = function(self) + self:initHMI_onReady() + end + + Test["Precondition_ConnectMobile_1"] = function(self) + self:connectMobile() + end + + Test["Precondition_StartSession_1"] = function(self) + self.mobileSession = mobile_session.MobileSession(self, self.mobileConnection) + end + + end + + StartSDLAfterChangePreloaded() + + function Test:RestorePreloadedPt() + -- body + os.execute('cp ' .. config.pathToSDL .. 'backup_sdl_preloaded_pt.json' .. ' ' .. config.pathToSDL .. 'sdl_preloaded_pt.json') + os.execute('rm ' .. config.pathToSDL .. 'backup_sdl_preloaded_pt.json') + end + --End Precondition.1 + + --Begin Precondition.2 + --Description: Activation application + function RegisterApplication(self) + -- body + local corrID = self.mobileSession:SendRPC("RegisterAppInterface", config.application1.registerAppInterfaceParams) + + EXPECT_HMINOTIFICATION("BasicCommunication.OnAppRegistered") + :Do(function (_, data) + -- body + applicationID = data.params.application.appID + end) + + EXPECT_RESPONSE(corrID, {success = true}) + + -- delay - bug of ATF - it is not wait for UpdateAppList and later + -- line appID = self.applications["Test Application"]} will not assign appID + DelayedExp(1000) + end + + function Test:RegisterApp() + -- body + self.mobileSession:StartService(7) + :Do(function (_, data) + -- body + RegisterApplication(self) + end) + end + --End Precondition.2 + + + --Begin Precondition.3 + --Description: Activation App by sending SDL.ActivateApp + function Test:ActivationApp() + --hmi side: sending SDL.ActivateApp request + -- applicationID = self.applications[ config.application1.registerAppInterfaceParams.appName] + self:activationApp(applicationID) + + --mobile side: expect notification + EXPECT_NOTIFICATION("OnHMIStatus", {hmiLevel = "FULL", systemContext = "MAIN"}) + end + --End Precondition.3 + + ----------------------------------------------------------------------------------------- + + --Begin Precondition.2 + --Description: Putting file(PutFiles) + function Test:PutFile() + for i=1,#imageValues do + local cid = self.mobileSession:SendRPC("PutFile", + { + syncFileName = imageValues[i], + fileType = "GRAPHIC_PNG", + persistentFile = false, + systemFile = false + }, "files/icon.png") + EXPECT_RESPONSE(cid, { success = true}) + end + end + --End Precondition.2 + + ----------------------------------------------------------------------------------------- + + --Begin Precondition.3 + --Description: CreateInteractionChoiceSet + choiceSetIDValues = {0, 100, 200, 300, 2000000000} + for i=1, #choiceSetIDValues do + Test["CreateInteractionChoiceSet" .. choiceSetIDValues[i]] = function(self) + if (choiceSetIDValues[i] == 2000000000) then + self:createInteractionChoiceSet(choiceSetIDValues[i], 65535) + else + self:createInteractionChoiceSet(choiceSetIDValues[i], choiceSetIDValues[i]) + end + end + end + --End Precondition.3 + + ----------------------------------------------------------------------------------------- +--[[TODO: update according to APPLINK-13476 + --Begin Precondition.4 + --Description: Create choice id 222 have the same name with choice id 200 + function Test:CreateInteractionChoiceSet_SameName() + --mobile side: sending CreateInteractionChoiceSet request + local cid = self.mobileSession:SendRPC("CreateInteractionChoiceSet", + { + interactionChoiceSetID = 222, + choiceSet = + { + + { + choiceID = 222, + menuName ="Choice200", + vrCommands = + { + "VrChoice222", + }, + image = + { + value ="icon.png", + imageType ="DYNAMIC", + }, + } + } + }) + + + --hmi side: expect VR.AddCommand request + EXPECT_HMICALL("VR.AddCommand", + { + cmdID = 222, + appID = applicationID, + type = "Choice", + vrCommands = {"VrChoice222" } + }) + :Do(function(_,data) + --hmi side: sending VR.AddCommand response + self.hmiConnection:SendResponse(data.id, data.method, "SUCCESS", {}) + end) + + --mobile side: expect CreateInteractionChoiceSet response + EXPECT_RESPONSE(cid, { success = true, resultCode = "SUCCESS" }) + + --mobile side: expect OnHashChange notification + EXPECT_NOTIFICATION("OnHashChange") + end + --End Precondition.4 + + ----------------------------------------------------------------------------------------- + + --Begin Precondition.5 + --Description: Create choice id 333 have the same vrCommand with choice id 300 + function Test:CreateInteractionChoiceSet_SameVrCommand() + --mobile side: sending CreateInteractionChoiceSet request + local cid = self.mobileSession:SendRPC("CreateInteractionChoiceSet", + { + interactionChoiceSetID = 333, + choiceSet = + { + + { + choiceID = 333, + menuName ="Choice333", + vrCommands = + { + "VrChoice300", + }, + image = + { + value ="icon.png", + imageType ="DYNAMIC", + }, + } + } + }) + + + --hmi side: expect VR.AddCommand request + EXPECT_HMICALL("VR.AddCommand", + { + cmdID = 333, + appID = applicationID, + type = "Choice", + vrCommands = {"VrChoice333" } + }) + :Do(function(_,data) + --hmi side: sending VR.AddCommand response + self.hmiConnection:SendResponse(data.id, data.method, "SUCCESS", {}) + end) + + --mobile side: expect CreateInteractionChoiceSet response + EXPECT_RESPONSE(cid, { success = true, resultCode = "SUCCESS" }) + + --mobile side: expect OnHashChange notification + EXPECT_NOTIFICATION("OnHashChange") + end + --End Precondition.4 +]] + ----------------------------------------------------------------------------------------- + + --Begin Precondition.6 + --Description: CreateInteractionChoiceSet + for i=1, 100 do + Test["CreateInteractionChoiceSet" .. 400+i-1] = function(self) + self:createInteractionChoiceSet(400+i-1, 400+i-1) + end + end + --End Precondition.6 + +-- ---------------------------------------------------------------------------------------------- +-- -----------------------------------------VI TEST BLOCK---------------------------------------- +-- -------------------------Sequence with emulating of user's action(s)------------------------ +-- ---------------------------------------------------------------------------------------------- + + --Begin Test suit SequenceCheck + --Description: TC's checks SDL behaviour by processing + -- different request sequence with timeout + -- with emulating of user's actions + + + +--Begin Test case SequenceCheck.1 + --Description: In case app sends PerformInteraction (KEYBOARD) AND SDL receives OnKeyboardInput notification from HMI SDL must transfer OnKeyboardInput notification to the app associated with active PerfromInteraction (KEYBOARD) request + + --Requirement id in JAMA: + -- SDLAQ-CRS-3108 + -- SDLAQ-CRS-3109 + -- APPLINK-13177 + + --Verification criteria: + --App send PerformInteraction(KEYBOARD) + --The User is manually opens HMI keyboard on screen without request + + --Begin Test case SequenceCheck.1.1 + --Description: OnKeyboardInput notification to app that is currently in FULL + + --Start second session + function Test:Precondition_SecondSession() + --mobile side: start new session + self.mobileSession1 = mobile_session.MobileSession( + self, + self.mobileConnection) + end + + --"Register second app" + function Test:Precondition_AppRegistrationInSecondSession() + --mobile side: start new + self.mobileSession1:StartService(7) + :Do(function() + local CorIdRegister = self.mobileSession1:SendRPC("RegisterAppInterface", + { + syncMsgVersion = + { + majorVersion = 3, + minorVersion = 0 + }, + appName = "Test Application2", + isMediaApplication = true, + languageDesired = 'EN-US', + hmiDisplayLanguageDesired = 'EN-US', + appHMIType = { "NAVIGATION" }, + appID = "2" + }) + + --hmi side: expect BasicCommunication.OnAppRegistered request + EXPECT_HMICALL("BasicCommunication.OnAppRegistered") + :Do(function(_,data) + if data.params.application.appName ~= "Test Application2" then + --do + print("Undefined App was registered") + return false + else + self.applications["Test Application2"] = data.params.application.appID + end + --UPDATED: Line is commented appID2 = data.params.application.appID check and uncomment + end) + + --mobile side: expect response + self.mobileSession1:ExpectResponse(CorIdRegister, { success = true, resultCode = "SUCCESS" }) + :Timeout(2000) + + self.mobileSession1:ExpectNotification("OnHMIStatus",{hmiLevel = "NONE", audioStreamingState = "NOT_AUDIBLE", systemContext = "MAIN"}) + + end) + end + + --Activate second app + function Test:Precondition_ActivateSecondApp() + --hmi side: sending SDL.ActivateApp request + self:activationApp(self.applications["Test Application2"]) + + --mobile side: expect notification from 2 app + self.mobileSession1:ExpectNotification("OnHMIStatus",{hmiLevel = "FULL", systemContext = "MAIN", audioStreamingState = "AUDIBLE"}) + self.mobileSession:ExpectNotification("OnHMIStatus",{hmiLevel = "BACKGROUND", systemContext = "MAIN", audioStreamingState = "NOT_AUDIBLE"}) + end + + --User manually initiates opening keyboard on screen and input text + function Test:PI_OnKeyboardInputToFullApplicationOnly() + + self.hmiConnection:SendNotification("UI.OnKeyboardInput",{data="abc", event="ENTRY_SUBMITTED"}) + + self.mobileSession:ExpectNotification("OnKeyboardInput", {data="abc", event="ENTRY_SUBMITTED"}) + :Times(0) + + self.mobileSession1:ExpectNotification("OnKeyboardInput", {data="abc", event="ENTRY_SUBMITTED"}) + end + + --Activate first app + function Test:PostCondition_ActivateFirstApp() + --hmi side: sending SDL.ActivateApp request + self:activationApp(applicationID) + + --mobile side: expect notification + EXPECT_NOTIFICATION("OnHMIStatus", {hmiLevel = "FULL", systemContext = "MAIN"}) + end + --End Test case SequenceCheck.1.1 + ----------------------------------------------------------------------------------------- + --Begin Test case SequenceCheck.1.2 + --Description: App receives OnKeyboardInput when user perform PerformInteraction(KEYBOARD) + function Test:PI_OnKeyboardInputFromPerformInteraction() + local paramsSend = performInteractionAllParams() + paramsSend.interactionMode = "MANUAL_ONLY" + paramsSend.interactionLayoutExpectOnHMIStatusWithAudioStateChanged = "KEYBOARD" + --mobile side: sending PerformInteraction request + local cid = self.mobileSession:SendRPC("PerformInteraction", paramsSend) + + --hmi side: expect VR.PerformInteraction request + EXPECT_HMICALL("VR.PerformInteraction", + { + helpPrompt = paramsSend.helpPrompt, + initialPrompt = paramsSend.initialPrompt, + timeout = paramsSend.timeout, + timeoutPrompt = paramsSend.timeoutPrompt + }) + :Do(function(_,data) + --Send notification to start TTS + self.hmiConnection:SendNotification("TTS.Started") + self.hmiConnection:SendError(data.id, data.method, "TIMED_OUT", "Perform Interaction error response.") + end) + setExChoiseSet(paramsSend.interactionChoiceSetIDList) + --hmi side: expect UI.PerformInteraction request + EXPECT_HMICALL("UI.PerformInteraction", + { + timeout = paramsSend.timeout, + --choiceSet = setExChoiseSet(paramsSend.interactionChoiceSetIDList), --Updated: Line is commented due to APPLINK-16052, please uncomment once resolved + initialText = + { + fieldName = "initialInteractionText", + fieldText = paramsSend.initialText + } + }) + :Do(function(_,data) + --hmi side: send UI.PerformInteraction response + SendOnSystemContext(self,"HMI_OBSCURED") + self.hmiConnection:SendNotification("Buttons.OnButtonEvent",{mode = "BUTTONDOWN",name = "SEARCH"}) + self.hmiConnection:SendNotification("Buttons.OnButtonEvent",{mode = "BUTTONUP",name = "SEARCH"}) + self.hmiConnection:SendNotification("Buttons.OnButtonPress",{mode = "SHORT",name = "SEARCH"}) + self.hmiConnection:SendNotification("UI.OnKeyboardInput",{data="abc", event="ENTRY_SUBMITTED"}) + self.hmiConnection:SendResponse(data.id, data.method, "SUCCESS", {manualTextEntry="abc"}) + + --Send notification to stop TTS + self.hmiConnection:SendNotification("TTS.Stopped") + SendOnSystemContext(self,"MAIN") + end) + + --mobile side: OnHMIStatus notifications + ExpectOnHMIStatusWithAudioStateChanged(self, "MANUAL") + + --mobile side: expect PerformInteraction response + EXPECT_RESPONSE(cid, { success = true, resultCode = "SUCCESS", manualTextEntry="abc" }) + + EXPECT_NOTIFICATION("OnKeyboardInput", {data="abc", event="ENTRY_SUBMITTED"}) + end + --End Test case SequenceCheck.1.2 + --Begin Test case SequenceCheck.1 + --End Test suit SequenceCheck + +---------------------------------------------------------------------------------------------- +-----------------------------------------VII TEST BLOCK---------------------------------------- +--------------------------------------Different HMIStatus------------------------------------- +---------------------------------------------------------------------------------------------- + --Description: processing of request/response in different HMIlevels, SystemContext, AudioStreamingState + + --Begin Test suit DifferentHMIlevel + --Description: processing API in different HMILevel + + --Begin Test case DifferentHMIlevel.1 + --Description: + + --Requirement id in JAMA: + --SDLAQ-CRS-814 + + --Verification criteria: + -- SDL rejects PerformInteraction request according to HMI level provided in the policy table and doesn't reject the request for HMI levels allowed by the policy table. + -- SDL rejects PerformInteraction request for all HMI levels that are not provided in the policy table. + -- SDL rejects PerformInteraction request with REJECTED resultCode when current HMI level is NONE, LIMITED and BACKGROUND. + -- SDL doesn't reject PerformInteraction request when current HMI is FULL. + + --Begin DifferentHMIlevel.1.1 + --Description: SDL reject PerformInteraction request when current HMI is NONE + + function Test:Precondition_DeactivateToNone() + --hmi side: sending BasicCommunication.OnExitApplication notification + self.hmiConnection:SendNotification("BasicCommunication.OnExitApplication", {appID = applicationID, reason = "USER_EXIT"}) + + EXPECT_NOTIFICATION("OnHMIStatus", + { systemContext = "MAIN", hmiLevel = "NONE", audioStreamingState = "NOT_AUDIBLE"}) + end + + function Test:PI_DisallowedHMINone() + --mobile side: sending PerformInteraction request + local cid = self.mobileSession:SendRPC("PerformInteraction",performInteractionAllParams()) + + --mobile side: expect PerformInteraction response + EXPECT_RESPONSE(cid, { success = false, resultCode = "DISALLOWED" }) + end + + --End DifferentHMIlevel.1.1 + + ----------------------------------------------------------------------------------------- + + --Begin DifferentHMIlevel.1.2 + --Description: SDL reject PerformInteraction request when current HMI is LIMITED(only for media app) + + function Test:Precondition_ActivateFirstApp() + --mobile side: activate application in session 1 + self:activationApp(applicationID) + + --mobile side: expected notification + EXPECT_NOTIFICATION("OnHMIStatus",{hmiLevel = "FULL", systemContext = "MAIN"}) + end + + if + Test.isMediaApplication == true or + Test.appHMITypes["NAVIGATION"] == true then + + function Test:Precondition_DeactivateToLimited() + --hmi side: sending BasicCommunication.OnAppDeactivated request + local cid = self.hmiConnection:SendNotification("BasicCommunication.OnAppDeactivated", + { + appID = applicationID, + reason = "GENERAL" + }) + + --mobile side: expect OnHMIStatus notification + EXPECT_NOTIFICATION("OnHMIStatus",{hmiLevel = "LIMITED", systemContext = "MAIN", audioStreamingState = "AUDIBLE"}) + end + + function Test:PI_HMILevelLimited() + self:performInteraction_ViaBOTH(performInteractionAllParams(), "LIMITED") + end + --End DifferentHMIlevel.1.2 + + ----------------------------------------------------------------------------------------- + + --Begin DifferentHMIlevel.1.3 + --Description: SDL reject PerformInteraction request when current HMI is BACKGROUND. + + --Precondition for media app + --Description:Start third session + function Test:Precondition_ThirdSession() + --mobile side: start new session + self.mobileSession2 = mobile_session.MobileSession( + self, + self.mobileConnection) + end + + --Description "Register third app" + function Test:Precondition_AppRegistrationInSecondSession() + --mobile side: start new + self.mobileSession2:StartService(7) + :Do(function() + local CorIdRegister = self.mobileSession2:SendRPC("RegisterAppInterface", + { + syncMsgVersion = + { + majorVersion = 3, + minorVersion = 0 + }, + appName = "Test Application3", + isMediaApplication = true, + languageDesired = 'EN-US', + hmiDisplayLanguageDesired = 'EN-US', + appHMIType = { "NAVIGATION" }, + appID = "3" + }) + + --hmi side: expect BasicCommunication.OnAppRegistered request + EXPECT_HMICALL("BasicCommunication.OnAppRegistered") + -- { + -- application = + -- { + -- appName = "Test Application3" + -- } + -- }) + :Do(function(_,data) + if data.params.application.appName ~= "Test Application3" then + --do + print("Undefined App was registered") + return false + else + -- self.applications["Test Application3"] = data.params.application.appID + appID3 = data.params.application.appID + end + + end) + + --mobile side: expect response + self.mobileSession2:ExpectResponse(CorIdRegister, { success = true, resultCode = "SUCCESS" }) + :Timeout(2000) + + self.mobileSession2:ExpectNotification("OnHMIStatus",{hmiLevel = "NONE", audioStreamingState = "NOT_AUDIBLE", systemContext = "MAIN"}) + end) + end + + --Description: Activate third app + function Test:Precondition_ActivateThirdApp() + --mobile side: activate application in session 3 + self:activationApp(appID3) + + --mobile side: expect notification from 2 app + self.mobileSession2:ExpectNotification("OnHMIStatus",{hmiLevel = "FULL", systemContext = "MAIN", audioStreamingState = "AUDIBLE"}) + self.mobileSession:ExpectNotification("OnHMIStatus",{hmiLevel = "BACKGROUND", systemContext = "MAIN", audioStreamingState = "NOT_AUDIBLE"}) + end + elseif + Test.isMediaApplication == false then + + -- Precondition for non-media app + function Test:Precondition_DeactivateToBackground() + --hmi side: sending BasicCommunication.OnAppDeactivated request + local cid = self.hmiConnection:SendNotification("BasicCommunication.OnAppDeactivated", + { + appID = applicationID, + reason = "GENERAL" + }) + + --mobile side: expect OnHMIStatus notification + EXPECT_NOTIFICATION("OnHMIStatus",{hmiLevel = "BACKGROUND", systemContext = "MAIN", audioStreamingState = "NOT_AUDIBLE"}) + end + end + + + --Description: PerformInteraction when HMI level BACKGROUND + function Test:PI_HMILevelBackground() + self:performInteraction_ViaBOTH(performInteractionAllParams(), "BACKGROUND") + end + + --Activate first app + --Activate first app + function Test:PostCondition_ActivateFirstApp() + --hmi side: sending SDL.ActivateApp request + self:activationApp(applicationID) + + --mobile side: expect notification + EXPECT_NOTIFICATION("OnHMIStatus", {hmiLevel = "FULL", systemContext = "MAIN"}) + end + --End DifferentHMIlevel.1.3 + --End Test case DifferentHMIlevel.1 + --End Test suit DifferentHMIlevel + +--------------------------------------------------------------------------------------------- +-----------------------------------------I TEST BLOCK---------------------------------------- +--CommonRequestCheck: Check of mandatory/conditional request's parameters (mobile protocol)-- +--------------------------------------------------------------------------------------------- + --Begin Test suit PositiveRequestCheck + + --Description: TC's checks processing + -- request with all parameters + -- request with only mandatory parameters + -- request with all combinations of conditional-mandatory parameters (if exist) + -- request with one by one conditional parameters (each case - one conditional parameter) + -- request with missing mandatory parameters one by one (each case - missing one mandatory parameter) + -- request with all parameters are missing + -- request with fake parameters (fake - not from protocol, from another request) + -- request is sent with invalid JSON structure + -- different conditions of correlationID parameter (invalid, several the same etc.) + +--Begin Test case CommonRequestCheck.1 + --Description:This test is intended to check positive cases and when all parameters are in boundary conditions + + --Requirement id in JAMA: + --SDLAQ-CRS-41 + --SDLAQ-CRS-549 + + --Verification criteria: + -- In case the user has not made a choice until "timeout" has run out, the response TIMED_OUT is returned by SDL for the request and the general "success" result equals to "false". + + --Begin Test case CommonRequestCheck.1.1 + --Description: PerformInteraction request via VR_ONLY + function Test:PI_PerformViaVR_ONLY() + self:performInteraction_ViaVR_ONLY(performInteractionAllParams()) + end + --End Test case CommonRequestCheck.1.1 + + ----------------------------------------------------------------------------------------- + + --Begin Test case CommonRequestCheck.1.2 + --Description: PerformInteraction request via MANUAL_ONLY + function Test:PI_PerformViaMANUAL_ONLY() + self:performInteraction_ViaMANUAL_ONLY(performInteractionAllParams()) + end + --End Test case CommonRequestCheck.1.2 + + ----------------------------------------------------------------------------------------- + + --Begin Test case CommonRequestCheck.1.3 + --Description: PerformInteraction request via BOTH + function Test:PI_PerformViaBOTH() + self:performInteraction_ViaBOTH(performInteractionAllParams()) + end + --End Test case CommonRequestCheck.1.3 + + --End Test case CommonRequestCheck.1 + + ----------------------------------------------------------------------------------------- + + --Begin Test case CommonRequestCheck.2 + --Description: This test is intended to check processing requests with only mandatory parameters + + --Requirement id in JAMA: + --SDLAQ-CRS-41 + --SDLAQ-CRS-549 + --SDLAQ-CRS-861 + + --Verification criteria: + --In case the user has not made a choice until "timeout" has run out, the response TIMED_OUT is returned by SDL for the request and the general "success" result equals to "false". + --In case the timeoutPrompt isn't provided in the request and helpPrompt is provided, the value of timeoutPrompt is set to helpPrompt value by SDL. + --In case the timeoutPrompt isn't provided in the request and helpPrompt is also not provided, the value of timeoutPrompt is set by SDL to default PerformInteraction "helpPrompt" value, which is constructed by SDL from the first vrCommand of each choice of all the Choice Sets specified in the interactionChoiceSetIDList parameter. + --In case helpPrompt and timeoutPrompt are generated by SDL (not provided by mobile application), they are delimited by commas. + + --Begin Test case CommonRequestCheck.2.1 + --Description: PerformInteraction request with mandatory parameter only via VR_ONLY + function Test:PI_MandatoryOnlyViaVR_ONLY() + local choiceIDList = {100, 200, 300} + --mobile side: sending PerformInteraction request + local cid = self.mobileSession:SendRPC("PerformInteraction", + { + initialText = "StartPerformInteraction", + initialPrompt = setInitialPrompt(), + interactionMode = "VR_ONLY", + interactionChoiceSetIDList = choiceIDList + }) + + --hmi side: expect VR.PerformInteraction request + EXPECT_HMICALL("VR.PerformInteraction", + { + helpPrompt = setExHelpPrompt(choiceIDList), + initialPrompt = setInitialPrompt(), + timeout = 10000, + timeoutPrompt = setExHelpPrompt(choiceIDList) + }) + :Do(function(_,data) + --Send notification to start TTS & VR + self.hmiConnection:SendNotification("TTS.Started") + self.hmiConnection:SendNotification("VR.Started") + SendOnSystemContext(self,"VRSESSION") + + --Send VR.PerformInteraction response + self.hmiConnection:SendError(data.id, data.method, "TIMED_OUT", "Perform Interaction error response.") + + --Send notification to stop TTS & VR + self.hmiConnection:SendNotification("TTS.Stopped") + self.hmiConnection:SendNotification("VR.Stopped") + SendOnSystemContext(self,"MAIN") + end) + + --hmi side: expect UI.PerformInteraction request + EXPECT_HMICALL("UI.PerformInteraction", + { + vrHelp = setExVrHelp(choiceIDList), + vrHelpTitle = "StartPerformInteraction", + }) + :Do(function(_,data) + local function uiResponse() + self.hmiConnection:SendError(data.id, data.method, "TIMED_OUT", "Perform Interaction error response.") + end + RUN_AFTER(uiResponse, 10) + end) + + --mobile side: OnHMIStatus notifications + ExpectOnHMIStatusWithAudioStateChanged(self, "VR") + + --mobile side: expect PerformInteraction response + EXPECT_RESPONSE(cid, { success = false, resultCode = "TIMED_OUT" }) + end + --End Test case CommonRequestCheck.2.1 + + ----------------------------------------------------------------------------------------- + + --Begin Test case CommonRequestCheck.2.2 + --Description: PerformInteraction request with mandatory parameter only via MANUAL_ONLY + function Test:PI_MandatoryOnlyViaMANUAL_ONLY() + local choiceIDList = {100, 200, 300} + --mobile side: sending PerformInteraction request + local cid = self.mobileSession:SendRPC("PerformInteraction", + { + initialText = "StartPerformInteraction", + initialPrompt = setInitialPrompt(), + interactionMode = "MANUAL_ONLY", + interactionChoiceSetIDList = choiceIDList + }) + + --hmi side: expect VR.PerformInteraction request + EXPECT_HMICALL("VR.PerformInteraction", + { + helpPrompt = setExHelpPrompt(choiceIDList), + initialPrompt = setInitialPrompt(), + timeout = 10000, + timeoutPrompt = setExHelpPrompt(choiceIDList) + }) + :Do(function(_,data) + --Send notification to start TTS + self.hmiConnection:SendNotification("TTS.Started") + self.hmiConnection:SendError(data.id, data.method, "TIMED_OUT", "Perform Interaction error response.") + end) + + --hmi side: expect UI.PerformInteraction request + EXPECT_HMICALL("UI.PerformInteraction", + { --Updated: Line is commented due to APPLINK-16052, please uncomment once resolved + --choiceSet = setExChoiseSet(choiceIDList), + initialText = + { + fieldName = "initialInteractionText", + fieldText = "StartPerformInteraction" + }, + timeout = 10000 + }) + :Do(function(_,data) + --hmi side: send UI.PerformInteraction response + SendOnSystemContext(self,"HMI_OBSCURED") + self.hmiConnection:SendError(data.id, data.method, "TIMED_OUT", "Perform Interaction error response.") + + --Send notification to stop TTS + self.hmiConnection:SendNotification("TTS.Stopped") + SendOnSystemContext(self,"MAIN") + end) + + --mobile side: OnHMIStatus notifications + ExpectOnHMIStatusWithAudioStateChanged(self, "MANUAL") + + --mobile side: expect PerformInteraction response + EXPECT_RESPONSE(cid, { success = false, resultCode = "TIMED_OUT"}) + end + --End Test case CommonRequestCheck.2.2 + + ----------------------------------------------------------------------------------------- + + --Begin Test case CommonRequestCheck.2.3 + --Description: PerformInteraction request with mandatory parameter only via BOTH + function Test:PI_MandatoryOnlyViaBOTH() + local choiceIDList = {100, 200, 300} + --mobile side: sending PerformInteraction request + local cid = self.mobileSession:SendRPC("PerformInteraction", + { + initialText = "StartPerformInteraction", + initialPrompt = setInitialPrompt(), + interactionMode = "BOTH", + interactionChoiceSetIDList = choiceIDList + }) + + --hmi side: expect VR.PerformInteraction request + EXPECT_HMICALL("VR.PerformInteraction", + { + helpPrompt = setExHelpPrompt(choiceIDList), + initialPrompt = setInitialPrompt(), + timeout = 10000, + timeoutPrompt = setExHelpPrompt(choiceIDList) + }) + :Do(function(_,data) + --Send notification to start TTS & VR + self.hmiConnection:SendNotification("VR.Started") + self.hmiConnection:SendNotification("TTS.Started") + SendOnSystemContext(self,"VRSESSION") + + --First speak timeout and second speak started + local function firstSpeakTimeOut() + self.hmiConnection:SendNotification("TTS.Stopped") + self.hmiConnection:SendNotification("TTS.Started") + end + RUN_AFTER(firstSpeakTimeOut, 5) + + local function vrResponse() + --hmi side: send VR.PerformInteraction response + self.hmiConnection:SendError(data.id, data.method, "TIMED_OUT", "Perform Interaction error response.") + self.hmiConnection:SendNotification("VR.Stopped") + end + RUN_AFTER(vrResponse, 10) + end) + + --hmi side: expect UI.PerformInteraction request + EXPECT_HMICALL("UI.PerformInteraction", + { --Updated: Lines are commented due to APPLINK-16052, please uncomment once resolved + timeout = 10000, + --choiceSet = setExChoiseSet(choiceIDList), + initialText = + { + fieldName = "initialInteractionText", + fieldText = "StartPerformInteraction" + }, + --vrHelp = setExVrHelp(choiceIDList), + --vrHelpTitle = "StartPerformInteraction" + }) + :Do(function(_,data) + --Choice icon list is displayed + local function choiceIconDisplayed() + SendOnSystemContext(self,"HMI_OBSCURED") + end + RUN_AFTER(choiceIconDisplayed, 15) + + --hmi side: send UI.PerformInteraction response + local function uiResponse() + self.hmiConnection:SendNotification("TTS.Stopped") + self.hmiConnection:SendError(data.id, data.method, "TIMED_OUT", "Perform Interaction error response.") + SendOnSystemContext(self,"MAIN") + end + RUN_AFTER(uiResponse, 20) + end) + + --mobile side: OnHMIStatus notifications + ExpectOnHMIStatusWithAudioStateChanged(self) + + --mobile side: expect PerformInteraction response + EXPECT_RESPONSE(cid, { success = false, resultCode = "TIMED_OUT" }) + end + --End Test case CommonRequestCheck.2.3 + + --Begin Test case CommonRequestCheck.2 + + ----------------------------------------------------------------------------------------- + + --Begin Test case CommonRequestCheck.3 + --Description: This test is intended to check processing requests without mandatory parameters + + --Requirement id in JAMA: + --SDLAQ-CRS-460 + + --Verification criteria: + --The request without "initialText" is sent, the INVALID_DATA response code is returned. + --The request without "interactionMode" is sent, the INVALID_DATA response code is returned. + --The request without "interactionChoiceSetIDList" is sent, the INVALID_DATA response code is returned. + + --Begin Test case CommonRequestCheck.3.1 + --Description: Mandatory missing - initialText + function Test:PI_initialTextMissing() + local params = performInteractionAllParams() + params["initialText"] = nil + self:performInteractionInvalidData(params) + end + --End Test case CommonRequestCheck.3.1 + + ----------------------------------------------------------------------------------------- + + --Begin Test case CommonRequestCheck.3.2 + --Description: Mandatory missing - interactionMode + function Test:PI_interactionModeMissing() + local params = performInteractionAllParams() + params["interactionMode"] = nil + self:performInteractionInvalidData(params) + end + --End Test case CommonRequestCheck.3.2 + + ----------------------------------------------------------------------------------------- + + --Begin Test case CommonRequestCheck.3.3 + --Description: Mandatory missing - interactionChoiceSetIDList + function Test:PI_interactionChoiceSetIDListMissing() + local params = performInteractionAllParams() + params["interactionChoiceSetIDList"] = nil + self:performInteractionInvalidData(params) + end + --End Test case CommonRequestCheck.3.3 + + ----------------------------------------------------------------------------------------- + + --Begin Test case CommonRequestCheck.3.4 + --Description: Missing all params + function Test:PI_AllParamsMissing() + local params = {} + self:performInteractionInvalidData(params) + end + --End Test case CommonRequestCheck.3.4 + + --Begin Test case CommonRequestCheck.3 + ----------------------------------------------------------------------------------------- + + --Begin Test case CommonRequestCheck.4 + --Description: Check processing request with different fake parameters + + --Requirement id in JAMA: + --APPLINK-4518 + + --Verification criteria: + --According to xml tests by Ford team all fake params should be ignored by SDL + + --Begin Test case CommonRequestCheck.4.1 + --Description: Parameter not from protocol + function Test:PI_WithFakeParamViaVR_ONLY() + local params = + { + initialText = "StartPerformInteraction", + fakeParam = "fakeParam", + initialPrompt = { + { + fakeParam = "fakeParam", + text = "Makeyourchoice", + type = "TEXT", + }, + }, + interactionMode = "BOTH", + interactionChoiceSetIDList = {100}, + helpPrompt = { + { + text = "Selectthevariant", + type = "TEXT", + fakeParam = "fakeParam", + }, + }, + timeoutPrompt = { + { + text = "TimeoutPrompt", + type = "TEXT", + fakeParam = "fakeParam", + }, + }, + timeout = 5000, + vrHelp = setVrHelp() + } + self:performInteraction_ViaVR_ONLY(params) + end + + function Test:PI_WithFakeParamViaMANUAL_ONLY() + local params = + { + initialText = "StartPerformInteraction", + fakeParam = "fakeParam", + initialPrompt = { + { + fakeParam = "fakeParam", + text = "Makeyourchoice", + type = "TEXT", + }, + }, + interactionMode = "BOTH", + interactionChoiceSetIDList = {100}, + helpPrompt = { + { + text = "Selectthevariant", + type = "TEXT", + fakeParam = "fakeParam", + }, + }, + timeoutPrompt = { + { + text = "TimeoutPrompt", + type = "TEXT", + fakeParam = "fakeParam", + }, + }, + timeout = 5000, + vrHelp = setVrHelp() + } + self:performInteraction_ViaMANUAL_ONLY(params) + end + + function Test:PI_WithFakeParamViaBOTH() + local params = + { + initialText = "StartPerformInteraction", + fakeParam = "fakeParam", + initialPrompt = { + { + fakeParam = "fakeParam", + text = "Makeyourchoice", + type = "TEXT", + }, + }, + interactionMode = "BOTH", + interactionChoiceSetIDList = {100}, + helpPrompt = { + { + text = "Selectthevariant", + type = "TEXT", + fakeParam = "fakeParam", + }, + }, + timeoutPrompt = { + { + text = "TimeoutPrompt", + type = "TEXT", + fakeParam = "fakeParam", + }, + }, + timeout = 5000, + vrHelp = setVrHelp() + } + self:performInteraction_ViaBOTH(params) + end + + --Begin Test case CommonRequestCheck.4.1 + + ----------------------------------------------------------------------------------------- + + --Begin Test case CommonRequestCheck.4.2 + --Description: Parameters from another request + function Test:PI_ParamsAnotherRequestViaVR_ONLY() + local params = performInteractionAllParams() + params["ttsChunks"] = { + { + text ="SpeakFirst", + type ="TEXT", + }, + { + text ="SpeakSecond", + type ="TEXT", + }, + } + self:performInteraction_ViaVR_ONLY(params) + end + + function Test:PI_ParamsAnotherRequestMANUAL_ONLY() + local params = performInteractionAllParams() + params["ttsChunks"] = { + { + text ="SpeakFirst", + type ="TEXT", + }, + { + text ="SpeakSecond", + type ="TEXT", + }, + } + self:performInteraction_ViaMANUAL_ONLY(params) + end + + function Test:PI_ParamsAnotherRequestViaBOTH() + local params = performInteractionAllParams() + params["ttsChunks"] = { + { + text ="SpeakFirst", + type ="TEXT", + }, + { + text ="SpeakSecond", + type ="TEXT", + }, + } + self:performInteraction_ViaBOTH(params) + end + --End Test case CommonRequestCheck.4.2 + + --End Test case CommonRequestCheck.4 + + ----------------------------------------------------------------------------------------- + + --Begin Test case CommonRequestCheck.5 + --Description: Invalid JSON + + --Requirement id in JAMA: + --SDLAQ-CRS-460 + + --Verification criteria: + --The request with wrong JSON syntax is sent, the response with INVALID_DATA result code is returned. + function Test:PI_IncorrectJSON() + local msg = + { + serviceType = 7, + frameInfo = 0, + rpcType = 0, + rpcFunctionId = 10, + rpcCorrelationId = self.mobileSession.correlationId, + --< postcondition of this script: user allows the function group + + --End Test case ResultCodeChecks.2.2 + + --Begin Test case ResultCodeChecks.2.3 + --Description: Check resultCode DISALLOWED when request is assigned to app, user allows but "keep_context" : false, "steal_focus" : false + + --Postcondition: Update PT to allow ScrollableMessage request + local keep_context = false + local steal_focus = false + policyTable:updatePolicyAndAllowFunctionGroup({"FULL"}, keep_context, steal_focus) + + function Test:ScrollableMessage_DisallowedKeepContext() + + --mobile side: sending ScrollableMessage request + local cid = self.mobileSession:SendRPC("ScrollableMessage", + { + scrollableMessageBody = "abc", + softButtons = + { + { + softButtonID = 1, + text = "Button1", + type = "TEXT", + isHighlighted = false, + systemAction = "KEEP_CONTEXT" + } + }, + timeout = 30000 + } + ) + + --mobile side: expect the response + EXPECT_RESPONSE(cid, { success = false, resultCode = "DISALLOWED"}) + end + + function Test:ScrollableMessage_DisallowedStealFocus() + + --mobile side: sending ScrollableMessage request + local cid = self.mobileSession:SendRPC("ScrollableMessage", + { + scrollableMessageBody = "abc", + softButtons = + { + { + softButtonID = 1, + text = "Button1", + type = "TEXT", + isHighlighted = false, + systemAction = "STEAL_FOCUS" + } + }, + timeout = 30000 + } + ) + + --mobile side: expect the response + EXPECT_RESPONSE(cid, { success = false, resultCode = "DISALLOWED"}) + end + + + --Postcondition: Update PT to allow ScrollableMessage request + local keep_context = true + local steal_focus = true + policyTable:updatePolicyAndAllowFunctionGroup({"FULL"}, keep_context, steal_focus) + + --End Test case ResultCodeChecks.2.4 + + --End Test case ResultCodeChecks.2 + + ----------------------------------------------------------------------------------------- +]=] +end + +ResultCodeChecks() + + +---------------------------------------------------------------------------------------------- +-----------------------------------------TEST BLOCK VI---------------------------------------- +-------------------------Sequence with emulating of user's action(s)-------------------------- +---------------------------------------------------------------------------------------------- + +--Description: TC's checks SDL behavior by processing + -- different request sequence with timeout + -- with emulating of user's actions + +--Requirement id in JAMA: Mentions in each test case + +local function SequenceChecks() + + --Print new line to separate new test cases group + commonFunctions:newTestCasesGroup("Test suite: Sequence with emulating of user's action(s)") + + --TC_ScrollableMessage_01, TC_ScrollableMessage_05, TC_ScrollableMessage_07: Covered by ABORTED resultCode in resultCode_IsValidValues test case + --TC_ScrollableMessage_04: Covered when verify timeout parameter with minvalue + --TC_SoftButtons_01: short and long click on TEXT soft button , reflecting on UI only if text is defined + --TC_SoftButtons_02: short and long click on IMAGE soft button, reflecting on UI only if image is defined + --TC_SoftButtons_03: short click on BOTH soft button, reflecting on UI + --TC_SoftButtons_04: long click on BOTH soft button + + --Begin Test case SequenceCheck.1 + --Description: Check for test case TC_ScrollableMessage_02 + + --Requirement id in JAMA: SDLAQ-TC-70 + + --Verification criteria: + --Call ScrollableMessage request from mobile app on HMI with one and maximum (8) SoftButtons + --Check DEFAUL_ACTION and KEEP_CONTEXT SoftButton's actions as applied to ScrollableMessage pop-up + + function Test:ScrollableMessage_DEFAUL_ACTION_And_KEEP_CONTEXT() + RequestParams = + { + scrollableMessageBody = "a", + softButtons = + { + { + softButtonID = 1, + text = "Close", + type = "TEXT", + isHighlighted = false, + systemAction = "DEFAULT_ACTION" + }, + { + softButtonID = 2, + text = "Break", + type = "TEXT", + isHighlighted = true, + systemAction = "DEFAULT_ACTION" + }, + { + softButtonID = 3, + text = "Keep", + type = "TEXT", + isHighlighted = false, + systemAction = "KEEP_CONTEXT" + }, + { + softButtonID = 4, + text = "Stay", + type = "TEXT", + isHighlighted = true, + systemAction = "KEEP_CONTEXT" + }, + { + softButtonID = 5, + type = "IMAGE", + image = + { + value = "icon.png", + imageType = "DYNAMIC" + }, + isHighlighted = false, + systemAction = "DEFAULT_ACTION" + }, + { + softButtonID = 6, + type = "IMAGE", + image = + { + value = "icon.png", + imageType = "DYNAMIC" + }, + isHighlighted = false, + systemAction = "DEFAULT_ACTION" + }, + { + softButtonID = 7, + type = "IMAGE", + image = + { + value = "icon.png", + imageType = "DYNAMIC" + }, + isHighlighted = false, + systemAction = "KEEP_CONTEXT" + }, + { + softButtonID = 8, + type = "IMAGE", + image = + { + value = "icon.png", + imageType = "DYNAMIC" + }, + isHighlighted = false, + systemAction = "KEEP_CONTEXT" + } + } + } + + --mobile side: sending the request + local cid = self.mobileSession:SendRPC("ScrollableMessage", RequestParams) + + local UIParams = self:createUIParameters(RequestParams) + + --hmi side: expect UI.ScrollableMessage request + EXPECT_HMICALL("UI.ScrollableMessage", UIParams) + :Do(function(_,data) + + --HMI sends UI.OnSystemContext + self.hmiConnection:SendNotification("UI.OnSystemContext",{ appID = self.applications["Test Application"], systemContext = "HMI_OBSCURED" }) + scrollableMessageId = data.id + + --Press button Keep (3) + local function ButtonEventPress() + self.hmiConnection:SendNotification("Buttons.OnButtonEvent", {name = "CUSTOM_BUTTON", mode = "BUTTONDOWN", customButtonID = 3, appID = self.applications["Test Application"]}) + self.hmiConnection:SendNotification("Buttons.OnButtonEvent", {name = "CUSTOM_BUTTON", mode = "BUTTONUP", customButtonID = 3, appID = self.applications["Test Application"]}) + self.hmiConnection:SendNotification("Buttons.OnButtonPress", {name = "CUSTOM_BUTTON", mode = "SHORT", customButtonID = 3, appID = self.applications["Test Application"]}) + end + + RUN_AFTER(ButtonEventPress, 1000) + + --Press button Close (1) + local function ButtonEventPress2() + self.hmiConnection:SendNotification("Buttons.OnButtonEvent", {name = "CUSTOM_BUTTON", mode = "BUTTONDOWN", customButtonID = 1, appID = self.applications["Test Application"]}) + self.hmiConnection:SendNotification("Buttons.OnButtonEvent", {name = "CUSTOM_BUTTON", mode = "BUTTONUP", customButtonID = 1, appID = self.applications["Test Application"]}) + self.hmiConnection:SendNotification("Buttons.OnButtonPress", {name = "CUSTOM_BUTTON", mode = "SHORT", customButtonID = 1, appID = self.applications["Test Application"]}) + end + + RUN_AFTER(ButtonEventPress2, 3000) + + --Send ScrollableMessage response + local function scrollableMessageResponse() + + --hmi sends response + self.hmiConnection:SendResponse(scrollableMessageId, "UI.ScrollableMessage", "ABORTED", {}) + + --HMI sends UI.OnSystemContext + self.hmiConnection:SendNotification("UI.OnSystemContext",{ appID = self.applications["Test Application"], systemContext = "MAIN" }) + end + + RUN_AFTER(scrollableMessageResponse, 5000) + + end) + + + + --mobile side: OnButtonEvent notifications + EXPECT_NOTIFICATION("OnButtonEvent", + {buttonName = "CUSTOM_BUTTON", buttonEventMode = "BUTTONDOWN", customButtonID = 3}, + {buttonName = "CUSTOM_BUTTON", buttonEventMode = "BUTTONUP", customButtonID = 3}, + {buttonName = "CUSTOM_BUTTON", buttonEventMode = "BUTTONDOWN", customButtonID = 1}, + {buttonName = "CUSTOM_BUTTON", buttonEventMode = "BUTTONUP", customButtonID = 1}) + :Times(4) + + --mobile side: OnButtonPress notifications + EXPECT_NOTIFICATION("OnButtonPress", + {buttonName = "CUSTOM_BUTTON", buttonPressMode = "SHORT", customButtonID = 3}, + {buttonName = "CUSTOM_BUTTON", buttonPressMode = "SHORT", customButtonID = 1}) + :Times(2) + + + --mobile side: expect OnHMIStatus notification + EXPECT_NOTIFICATION("OnHMIStatus", + {systemContext = "HMI_OBSCURED", hmiLevel = "FULL", audioStreamingState = audibleState}, + {systemContext = "MAIN", hmiLevel = "FULL", audioStreamingState = audibleState} + ) + :Times(2) + + --mobile side: expect the response + EXPECT_RESPONSE(cid, { success = false, resultCode = "ABORTED" }) + + end + --End Test case SequenceCheck.1 + ----------------------------------------------------------------------------------------- + + + --Begin Test case SequenceCheck.2 + --Description: Check for test case TC_ScrollableMessage_06 + + --Requirement id in JAMA: SDLAQ-TC-249 + + --Verification criteria: Checking that the scrolling message resets timeout. SDLAQ-CRS-109. + --Scrolling down message body. + --Checking renewing timeout. + + function Test:ScrollableMessage_OnResetTimeout() + + --mobile side: sending ScrollableMessage request + local cid = self.mobileSession:SendRPC("ScrollableMessage", {scrollableMessageBody = "abc"}) + + + + --hmi side: expect UI.ScrollableMessage request + EXPECT_HMICALL("UI.ScrollableMessage", {messageText={fieldName="scrollableMessageBody",fieldText="abc"}}) + :Do(function(_,data) + + --HMI sends UI.OnSystemContext + self.hmiConnection:SendNotification("UI.OnSystemContext",{ appID = self.applications["Test Application"], systemContext = "HMI_OBSCURED" }) + scrollableMessageId = data.id + + + local function SendOnResetTimeout() + self.hmiConnection:SendNotification("UI.OnResetTimeout", {appID = self.applications["Test Application"], methodName = "UI.ScrollableMessage"}) + end + + --send UI.OnResetTimeout notification after 2 seconds + RUN_AFTER(SendOnResetTimeout, 2000) + + --send UI.OnResetTimeout notification after 10 seconds + RUN_AFTER(SendOnResetTimeout, 10000) + + + local function scrollableMessageResponse() + + --hmi sends response + self.hmiConnection:SendResponse(scrollableMessageId, "UI.ScrollableMessage", "SUCCESS", {}) + + --HMI sends UI.OnSystemContext + self.hmiConnection:SendNotification("UI.OnSystemContext",{ appID = self.applications["Test Application"], systemContext = "MAIN" }) + end + --RUN_AFTER(scrollableMessageResponse, 19000) + RUN_AFTER(scrollableMessageResponse, 30000) + + + end) + + + --mobile side: expect OnHMIStatus notification + EXPECT_NOTIFICATION("OnHMIStatus", + {systemContext = "HMI_OBSCURED", hmiLevel = "FULL", audioStreamingState = audibleState}, + {systemContext = "MAIN", hmiLevel = "FULL", audioStreamingState = audibleState} + ) + :Times(2) + :Timeout(21000) + + --mobile side: expect the response + EXPECT_RESPONSE(cid, { success = true, resultCode = "SUCCESS"}) + :Timeout(21000) + + end + --End Test case SequenceCheck.2 + ----------------------------------------------------------------------------------------- + + --Begin Test case SequenceCheck.3 + --Description: Check test case TC_SoftButtons_01(SDLAQ-TC-68) + + --Requirement id in JAMA: SDLAQ-CRS-869, SDLAQ-CRS-921->6 + + --Verification criteria: + -- Checking short click on TEXT soft button + -- Mobile sends SoftButtons with Type=TEXT and valid image, SDL must omit image in request to HMI, the resultCode returned to mobile app must depend on resultCode from HMI`s response. + + function Test:SM_TEXTSoftButtons_ShortClick() + RequestParams = + { + scrollableMessageBody = "a", + softButtons = + { + { + softButtonID = 1, + text = "First", + type = "TEXT", + isHighlighted = false, + systemAction = "KEEP_CONTEXT" + }, + { + softButtonID = 2, + text = "Second", + type = "TEXT", + isHighlighted = true, + systemAction = "DEFAULT_ACTION" + }, + { + softButtonID = 3, + text = "Third", + type = "TEXT", + image = + { + value = "icon.png", + imageType = "DYNAMIC" + }, + isHighlighted = true, + systemAction = "DEFAULT_ACTION" + } + + } + } + + --mobile side: sending the request + local cid = self.mobileSession:SendRPC("ScrollableMessage", RequestParams) + + local UIParams = self:createUIParameters(RequestParams) + + --hmi side: expect UI.ScrollableMessage request + EXPECT_HMICALL("UI.ScrollableMessage", UIParams) + :Do(function(_,data) + + --HMI sends UI.OnSystemContext + self.hmiConnection:SendNotification("UI.OnSystemContext",{ appID = self.applications["Test Application"], systemContext = "HMI_OBSCURED" }) + scrollableMessageId = data.id + + --Press button "Second" (id=2) + local function ButtonEventPress() + self.hmiConnection:SendNotification("Buttons.OnButtonEvent", {name = "CUSTOM_BUTTON", mode = "BUTTONDOWN", customButtonID = 2, appID = self.applications["Test Application"]}) + self.hmiConnection:SendNotification("Buttons.OnButtonEvent", {name = "CUSTOM_BUTTON", mode = "BUTTONUP", customButtonID = 2, appID = self.applications["Test Application"]}) + self.hmiConnection:SendNotification("Buttons.OnButtonPress", {name = "CUSTOM_BUTTON", mode = "SHORT", customButtonID = 2, appID = self.applications["Test Application"]}) + end + + RUN_AFTER(ButtonEventPress, 3000) + + + --Send ScrollableMessage response + local function scrollableMessageResponse() + + --hmi sends response + self.hmiConnection:SendResponse(scrollableMessageId, "UI.ScrollableMessage", "ABORTED", {}) + + --HMI sends UI.OnSystemContext + self.hmiConnection:SendNotification("UI.OnSystemContext",{ appID = self.applications["Test Application"], systemContext = "MAIN" }) + end + + RUN_AFTER(scrollableMessageResponse, 5000) + + end) + + + + --mobile side: OnButtonEvent notifications + EXPECT_NOTIFICATION("OnButtonEvent", + {buttonName = "CUSTOM_BUTTON", buttonEventMode = "BUTTONDOWN", customButtonID = 2}, + {buttonName = "CUSTOM_BUTTON", buttonEventMode = "BUTTONUP", customButtonID = 2}) + :Times(2) + + --mobile side: OnButtonPress notifications + EXPECT_NOTIFICATION("OnButtonPress", + {buttonName = "CUSTOM_BUTTON", buttonPressMode = "SHORT", customButtonID = 2}) + :Times(1) + + + --mobile side: expect OnHMIStatus notification + EXPECT_NOTIFICATION("OnHMIStatus", + {systemContext = "HMI_OBSCURED", hmiLevel = "FULL", audioStreamingState = audibleState}, + {systemContext = "MAIN", hmiLevel = "FULL", audioStreamingState = audibleState} + ) + :Times(2) + + --mobile side: expect the response + EXPECT_RESPONSE(cid, { success = false, resultCode = "ABORTED" }) + + end + + --End Test case SequenceCheck.3 + ----------------------------------------------------------------------------------------- + + --Begin Test case SequenceCheck.4 + --Description: Check test case TC_SoftButtons_01(SDLAQ-TC-68) + + --Requirement id in JAMA: SDLAQ-CRS-870 + + --Verification criteria: Checking long click on TEXT soft button + + function Test:SM_TEXTSoftButtons_LongClick() + RequestParams = + { + scrollableMessageBody = "a", + softButtons = + { + { + softButtonID = 1, + text = "First", + type = "TEXT", + isHighlighted = false, + systemAction = "KEEP_CONTEXT" + }, + { + softButtonID = 2, + text = "Second", + type = "TEXT", + isHighlighted = true, + systemAction = "STEAL_FOCUS" + }, + { + softButtonID = 3, + text = "Third", + type = "TEXT", + isHighlighted = true, + systemAction = "DEFAULT_ACTION" + } + + } + } + + --mobile side: sending the request + local cid = self.mobileSession:SendRPC("ScrollableMessage", RequestParams) + + local UIParams = self:createUIParameters(RequestParams) + + --hmi side: expect UI.ScrollableMessage request + EXPECT_HMICALL("UI.ScrollableMessage", UIParams) + :Do(function(_,data) + + --HMI sends UI.OnSystemContext + self.hmiConnection:SendNotification("UI.OnSystemContext",{ appID = self.applications["Test Application"], systemContext = "HMI_OBSCURED" }) + scrollableMessageId = data.id + + --Long press button "Third" (id=3) + local function ButtonEventPress() + self.hmiConnection:SendNotification("Buttons.OnButtonEvent", {name = "CUSTOM_BUTTON", mode = "BUTTONDOWN", customButtonID = 3, appID = self.applications["Test Application"]}) + self.hmiConnection:SendNotification("Buttons.OnButtonEvent", {name = "CUSTOM_BUTTON", mode = "BUTTONUP", customButtonID = 3, appID = self.applications["Test Application"]}) + self.hmiConnection:SendNotification("Buttons.OnButtonPress", {name = "CUSTOM_BUTTON", mode = "LONG", customButtonID = 3, appID = self.applications["Test Application"]}) + end + + RUN_AFTER(ButtonEventPress, 3000) + + + --Send ScrollableMessage response + local function scrollableMessageResponse() + + --hmi sends response + self.hmiConnection:SendResponse(scrollableMessageId, "UI.ScrollableMessage", "ABORTED", {}) + + --HMI sends UI.OnSystemContext + self.hmiConnection:SendNotification("UI.OnSystemContext",{ appID = self.applications["Test Application"], systemContext = "MAIN" }) + end + + RUN_AFTER(scrollableMessageResponse, 5000) + + end) + + + + --mobile side: OnButtonEvent notifications + EXPECT_NOTIFICATION("OnButtonEvent", + {buttonName = "CUSTOM_BUTTON", buttonEventMode = "BUTTONDOWN", customButtonID = 3}, + {buttonName = "CUSTOM_BUTTON", buttonEventMode = "BUTTONUP", customButtonID = 3}) + :Times(2) + + --mobile side: OnButtonPress notifications + EXPECT_NOTIFICATION("OnButtonPress", + {buttonName = "CUSTOM_BUTTON", buttonPressMode = "LONG", customButtonID = 3}) + :Times(1) + + + --mobile side: expect OnHMIStatus notification + EXPECT_NOTIFICATION("OnHMIStatus", + {systemContext = "HMI_OBSCURED", hmiLevel = "FULL", audioStreamingState = audibleState}, + {systemContext = "MAIN", hmiLevel = "FULL", audioStreamingState = audibleState} + ) + :Times(2) + + --mobile side: expect the response + EXPECT_RESPONSE(cid, { success = false, resultCode = "ABORTED" }) + + end + + --End Test case SequenceCheck.4 + ----------------------------------------------------------------------------------------- + + --Begin Test case SequenceCheck.5 + --Description: Check test case TC_SoftButtons_01(SDLAQ-TC-68) + + --Requirement id in JAMA: SDLAQ-CRS-200 + + --Verification criteria: Checking TEXT soft button reflecting on UI only if text is defined + + function Test:SM_SoftButtonTypeTEXTAndTextWithWhitespace() + + --mobile side: sending the request + local Request = + { + scrollableMessageBody = "abc", + softButtons = { + { + softButtonID = 1, + text = " ", + type = "TEXT", + isHighlighted = false, + systemAction = "DEFAULT_ACTION" + } + }, + timeout = 30000 + } + + local cid = self.mobileSession:SendRPC(APIName, Request) + + local UIParams = self:createUIParameters(Request) + + --hmi side: expect UI.ScrollableMessage request + EXPECT_HMICALL("UI.ScrollableMessage", UIParams) + :Times(0) + + + --mobile side: expect the response + EXPECT_RESPONSE(cid, { success = false, resultCode = "INVALID_DATA" }) + end + + + --End Test case SequenceCheck.5 + ----------------------------------------------------------------------------------------- + + --Begin Test case SequenceCheck.6 + --Description: Check test case TC_SoftButtons_02(SDLAQ-TC-75) + --Info: This TC will be failing till resolving APPLINK-16052 + + --Requirement id in JAMA: SDLAQ-CRS-869, SDLAQ-CRS-921->7 + + --Verification criteria: + -- Checking short click on IMAGE soft button + -- Mobile sends SoftButtons with Type=IMAGE and valid text, SDL must omit text in request to HMI, the resultCode returned to mobile app must depend on resultCode from HMI`s response. + + function Test:SM_IMAGESoftButtons_ShortClick() + RequestParams = + { + scrollableMessageBody = "a", + softButtons = + { + + { + softButtonID = 1, + type = "IMAGE", + image = + { + value = "icon.png", + imageType = "DYNAMIC" + }, + isHighlighted = true, + systemAction = "KEEP_CONTEXT" + }, + { + softButtonID = 2, + text = "Second", + type = "IMAGE", + image = + { + value = "action.png", + imageType = "DYNAMIC" + }, + isHighlighted = true, + systemAction = "DEFAULT_ACTION" + } + + } + } + + --mobile side: sending the request + local cid = self.mobileSession:SendRPC("ScrollableMessage", RequestParams) + + local UIParams = self:createUIParameters(RequestParams) + + --hmi side: expect UI.ScrollableMessage request + EXPECT_HMICALL("UI.ScrollableMessage", UIParams) + :Do(function(_,data) + + --HMI sends UI.OnSystemContext + self.hmiConnection:SendNotification("UI.OnSystemContext",{ appID = self.applications["Test Application"], systemContext = "HMI_OBSCURED" }) + scrollableMessageId = data.id + + --Press button "action.png" (id=2) + local function ButtonEventPress() + self.hmiConnection:SendNotification("Buttons.OnButtonEvent", {name = "CUSTOM_BUTTON", mode = "BUTTONDOWN", customButtonID = 2, appID = self.applications["Test Application"]}) + self.hmiConnection:SendNotification("Buttons.OnButtonEvent", {name = "CUSTOM_BUTTON", mode = "BUTTONUP", customButtonID = 2, appID = self.applications["Test Application"]}) + self.hmiConnection:SendNotification("Buttons.OnButtonPress", {name = "CUSTOM_BUTTON", mode = "SHORT", customButtonID = 2, appID = self.applications["Test Application"]}) + end + + RUN_AFTER(ButtonEventPress, 3000) + + + --Send ScrollableMessage response + local function scrollableMessageResponse() + + --hmi sends response + self.hmiConnection:SendResponse(scrollableMessageId, "UI.ScrollableMessage", "ABORTED", {}) + + --HMI sends UI.OnSystemContext + self.hmiConnection:SendNotification("UI.OnSystemContext",{ appID = self.applications["Test Application"], systemContext = "MAIN" }) + end + + RUN_AFTER(scrollableMessageResponse, 5000) + + end) + + + + --mobile side: OnButtonEvent notifications + EXPECT_NOTIFICATION("OnButtonEvent", + {buttonName = "CUSTOM_BUTTON", buttonEventMode = "BUTTONDOWN", customButtonID = 2}, + {buttonName = "CUSTOM_BUTTON", buttonEventMode = "BUTTONUP", customButtonID = 2}) + :Times(2) + + --mobile side: OnButtonPress notifications + EXPECT_NOTIFICATION("OnButtonPress", + {buttonName = "CUSTOM_BUTTON", buttonPressMode = "SHORT", customButtonID = 2}) + :Times(1) + + + --mobile side: expect OnHMIStatus notification + EXPECT_NOTIFICATION("OnHMIStatus", + {systemContext = "HMI_OBSCURED", hmiLevel = "FULL", audioStreamingState = audibleState}, + {systemContext = "MAIN", hmiLevel = "FULL", audioStreamingState = audibleState} + ) + :Times(2) + + --mobile side: expect the response + EXPECT_RESPONSE(cid, { success = false, resultCode = "ABORTED" }) + + end + + --End Test case SequenceCheck.6 + ----------------------------------------------------------------------------------------- + + --Begin Test case SequenceCheck.7 + --Description: Check test case TC_SoftButtons_02(SDLAQ-TC-75) + --Info: This TC will be failing till resolving APPLINK-16052 + + --Requirement id in JAMA: SDLAQ-CRS-870 + + --Verification criteria: Checking long click on IMAGE soft button + + function Test:SM_IMAGESoftButtons_LongClick() + RequestParams = + { + scrollableMessageBody = "a", + softButtons = + { + { + softButtonID = 1, + type = "IMAGE", + image = + { + value = "icon.png", + imageType = "DYNAMIC" + }, + isHighlighted = true, + systemAction = "KEEP_CONTEXT" + }, + { + softButtonID = 2, + type = "IMAGE", + image = + { + value = "action.png", + imageType = "DYNAMIC" + }, + isHighlighted = false, + systemAction = "DEFAULT_ACTION" + } + + } + } + + --mobile side: sending the request + local cid = self.mobileSession:SendRPC("ScrollableMessage", RequestParams) + + local UIParams = self:createUIParameters(RequestParams) + + --hmi side: expect UI.ScrollableMessage request + EXPECT_HMICALL("UI.ScrollableMessage", UIParams) + :Do(function(_,data) + + --HMI sends UI.OnSystemContext + self.hmiConnection:SendNotification("UI.OnSystemContext",{ appID = self.applications["Test Application"], systemContext = "HMI_OBSCURED" }) + scrollableMessageId = data.id + + --Long press button "action" (id=2) + local function ButtonEventPress() + self.hmiConnection:SendNotification("Buttons.OnButtonEvent", {name = "CUSTOM_BUTTON", mode = "BUTTONDOWN", customButtonID = 2, appID = self.applications["Test Application"]}) + self.hmiConnection:SendNotification("Buttons.OnButtonEvent", {name = "CUSTOM_BUTTON", mode = "BUTTONUP", customButtonID = 2, appID = self.applications["Test Application"]}) + self.hmiConnection:SendNotification("Buttons.OnButtonPress", {name = "CUSTOM_BUTTON", mode = "LONG", customButtonID = 2, appID = self.applications["Test Application"]}) + end + + RUN_AFTER(ButtonEventPress, 3000) + + + --Send ScrollableMessage response + local function scrollableMessageResponse() + + --hmi sends response + self.hmiConnection:SendResponse(scrollableMessageId, "UI.ScrollableMessage", "ABORTED", {}) + + --HMI sends UI.OnSystemContext + self.hmiConnection:SendNotification("UI.OnSystemContext",{ appID = self.applications["Test Application"], systemContext = "MAIN" }) + end + + RUN_AFTER(scrollableMessageResponse, 5000) + + end) + + + + --mobile side: OnButtonEvent notifications + EXPECT_NOTIFICATION("OnButtonEvent", + {buttonName = "CUSTOM_BUTTON", buttonEventMode = "BUTTONDOWN", customButtonID = 2}, + {buttonName = "CUSTOM_BUTTON", buttonEventMode = "BUTTONUP", customButtonID = 2}) + :Times(2) + + --mobile side: OnButtonPress notifications + EXPECT_NOTIFICATION("OnButtonPress", + {buttonName = "CUSTOM_BUTTON", buttonPressMode = "LONG", customButtonID = 3}) + :Times(1) + + + --mobile side: expect OnHMIStatus notification + EXPECT_NOTIFICATION("OnHMIStatus", + {systemContext = "HMI_OBSCURED", hmiLevel = "FULL", audioStreamingState = audibleState}, + {systemContext = "MAIN", hmiLevel = "FULL", audioStreamingState = audibleState} + ) + :Times(2) + + --mobile side: expect the response + EXPECT_RESPONSE(cid, { success = false, resultCode = "ABORTED" }) + + end + + --End Test case SequenceCheck.7 + + ----------------------------------------------------------------------------------------- + + --Begin Test case SequenceCheck.8 + --Description: Check test case TC_SoftButtons_02(SDLAQ-TC-75) + + --Requirement id in JAMA: SDLAQ-CRS-200 + + --Verification criteria: Checking IMAGE soft button reflecting on UI only if image is defined + + function Test:SM_SoftButtonTypeIMAGEAndImageNotExists() + + --mobile side: sending the request + local Request = + { + scrollableMessageBody = "abc", + softButtons = { + { + softButtonID = 1, + text = "First", + type = "IMAGE", + isHighlighted = false, + systemAction = "KEEP_CONTEXT" + }, + { + softButtonID = 2, + type = "IMAGE", + image = + { + value = "aaa.png", + imageType = "DYNAMIC" + }, + isHighlighted = true, + systemAction = "KEEP_CONTEXT" + } + }, + timeout = 30000 + } + + local cid = self.mobileSession:SendRPC(APIName, Request) + + local UIParams = self:createUIParameters(Request) + + --hmi side: expect UI.ScrollableMessage request + EXPECT_HMICALL("UI.ScrollableMessage", UIParams) + :Times(0) + + + --mobile side: expect the response + EXPECT_RESPONSE(cid, { success = false, resultCode = "INVALID_DATA" }) + end + + + --End Test case SequenceCheck.8 + ---------------------------------------------------------------------------------------------- + + --Begin Test case SequenceCheck.9 + --Description: Check test case TC_SoftButtons_03(SDLAQ-TC-156) + --Info: This TC will be failing till resolving APPLINK-16052 + + --Requirement id in JAMA: SDLAQ-CRS-869 + + --Verification criteria: Checking short click on BOTH soft button + + function Test:SM_SoftButtonTypeBOTH_ShortClick() + RequestParams = + { + scrollableMessageBody = "a", + softButtons = + { + { + softButtonID = 1, + text = "First", + type = "BOTH", + image = + { + value = "icon.png", + imageType = "DYNAMIC" + }, + isHighlighted = false, + systemAction = "DEFAULT_ACTION" + }, + { + softButtonID = 2, + text = "Second", + type = "BOTH", + image = + { + value = "icon.png", + imageType = "DYNAMIC" + }, + isHighlighted = true, + systemAction = "KEEP_CONTEXT" + }, + { + softButtonID = 3, + text = "Third", + type = "BOTH", + image = + { + value = "action.png", + imageType = "DYNAMIC" + }, + isHighlighted = true, + systemAction = "DEFAULT_ACTION" + } + + + } + } + + --mobile side: sending the request + local cid = self.mobileSession:SendRPC("ScrollableMessage", RequestParams) + + local UIParams = self:createUIParameters(RequestParams) + + --hmi side: expect UI.ScrollableMessage request + EXPECT_HMICALL("UI.ScrollableMessage", UIParams) + :Do(function(_,data) + + --HMI sends UI.OnSystemContext + self.hmiConnection:SendNotification("UI.OnSystemContext",{ appID = self.applications["Test Application"], systemContext = "HMI_OBSCURED" }) + scrollableMessageId = data.id + + --Press button "Third" (id=3) + local function ButtonEventPress() + self.hmiConnection:SendNotification("Buttons.OnButtonEvent", {name = "CUSTOM_BUTTON", mode = "BUTTONDOWN", customButtonID = 3, appID = self.applications["Test Application"]}) + self.hmiConnection:SendNotification("Buttons.OnButtonEvent", {name = "CUSTOM_BUTTON", mode = "BUTTONUP", customButtonID = 3, appID = self.applications["Test Application"]}) + self.hmiConnection:SendNotification("Buttons.OnButtonPress", {name = "CUSTOM_BUTTON", mode = "SHORT", customButtonID = 3, appID = self.applications["Test Application"]}) + end + + RUN_AFTER(ButtonEventPress, 3000) + + + --Send ScrollableMessage response + local function scrollableMessageResponse() + + --hmi sends response + self.hmiConnection:SendResponse(scrollableMessageId, "UI.ScrollableMessage", "ABORTED", {}) + + --HMI sends UI.OnSystemContext + self.hmiConnection:SendNotification("UI.OnSystemContext",{ appID = self.applications["Test Application"], systemContext = "MAIN" }) + end + + RUN_AFTER(scrollableMessageResponse, 5000) + + end) + + + + --mobile side: OnButtonEvent notifications + EXPECT_NOTIFICATION("OnButtonEvent", + {buttonName = "CUSTOM_BUTTON", buttonEventMode = "BUTTONDOWN", customButtonID = 3}, + {buttonName = "CUSTOM_BUTTON", buttonEventMode = "BUTTONUP", customButtonID = 3}) + :Times(2) + + --mobile side: OnButtonPress notifications + EXPECT_NOTIFICATION("OnButtonPress", + {buttonName = "CUSTOM_BUTTON", buttonPressMode = "SHORT", customButtonID = 3}) + :Times(1) + + + --mobile side: expect OnHMIStatus notification + EXPECT_NOTIFICATION("OnHMIStatus", + {systemContext = "HMI_OBSCURED", hmiLevel = "FULL", audioStreamingState = audibleState}, + {systemContext = "MAIN", hmiLevel = "FULL", audioStreamingState = audibleState} + ) + :Times(2) + + --mobile side: expect the response + EXPECT_RESPONSE(cid, { success = false, resultCode = "ABORTED" }) + + end + + --End Test case SequenceCheck.9 + ----------------------------------------------------------------------------------------- + + --Begin Test case SequenceCheck.10 + --Description: Check test case TC_SoftButtons_03(SDLAQ-TC-156) + --Verification criteria: Checking BOTH soft button reflecting on UI only if image and text are defined + + --Requirement id in JAMA: SDLAQ-CRS-200 + + + --Begin Test case SequenceCheck.10.1 + + function Test:SM_SoftButtonTypeBOTHAndTextUndefined() + + --mobile side: sending the request + local Request = + { + scrollableMessageBody = "abc", + softButtons = { + + { + softButtonID = 1, + type = "BOTH", + image = + { + value = "icon.png", + imageType = "DYNAMIC" + }, + isHighlighted = false, + systemAction = "DEFAULT_ACTION" + } + }, + timeout = 30000 + } + + local cid = self.mobileSession:SendRPC(APIName, Request) + + local UIParams = self:createUIParameters(Request) + + --hmi side: expect UI.ScrollableMessage request + EXPECT_HMICALL("UI.ScrollableMessage", UIParams) + :Times(0) + + + --mobile side: expect the response + EXPECT_RESPONSE(cid, { success = false, resultCode = "INVALID_DATA" }) + end + + + --End Test case SequenceCheck.10.1 + + + --Begin Test case SequenceCheck.10.2 + + function Test:SM_SoftButtonTypeBOTHAndImageUndefined() + + --mobile side: sending the request + local Request = + { + scrollableMessageBody = "abc", + softButtons = { + + { + softButtonID = 1, + type = "BOTH", + text = "Sometext", + isHighlighted = false, + systemAction = "DEFAULT_ACTION" + } + }, + timeout = 30000 + } + + local cid = self.mobileSession:SendRPC(APIName, Request) + + local UIParams = self:createUIParameters(Request) + + --hmi side: expect UI.ScrollableMessage request + EXPECT_HMICALL("UI.ScrollableMessage", UIParams) + :Times(0) + + + --mobile side: expect the response + EXPECT_RESPONSE(cid, { success = false, resultCode = "INVALID_DATA" }) + end + + --End Test case SequenceCheck.10.2 + + --Begin Test case SequenceCheck.10.3 + + function Test:SM_SoftButtonTypeBOTHImageAndTextUndefined() + + --mobile side: sending the request + local Request = + { + scrollableMessageBody = "abc", + softButtons = { + + { + softButtonID = 1, + type = "BOTH", + isHighlighted = false, + systemAction = "DEFAULT_ACTION" + } + }, + timeout = 30000 + } + + local cid = self.mobileSession:SendRPC(APIName, Request) + + local UIParams = self:createUIParameters(Request) + + --hmi side: expect UI.ScrollableMessage request + EXPECT_HMICALL("UI.ScrollableMessage", UIParams) + :Times(0) + + + --mobile side: expect the response + EXPECT_RESPONSE(cid, { success = false, resultCode = "INVALID_DATA" }) + end + + --End Test case SequenceCheck.10.3 + + + --End Test case SequenceCheck.10 + + ---------------------------------------------------------------------------------------------- + + --Begin Test case SequenceCheck.11 + --Description: Check test case TC_SoftButtons_04(SDLAQ-TC-157) + --Info: This TC will be failing till resolving APPLINK-16052 + + --Requirement id in JAMA: SDLAQ-CRS-870 + + --Verification criteria: Checking long click on BOTH soft button + + function Test:SM_SoftButtonBOTHType_LongClick() + RequestParams = + { + scrollableMessageBody = "a", + softButtons = + { + { + softButtonID = 1, + type = "BOTH", + text = "First text", + image = + { + value = "icon.png", + imageType = "DYNAMIC" + }, + isHighlighted = true + } + + } + } + + --mobile side: sending the request + local cid = self.mobileSession:SendRPC("ScrollableMessage", RequestParams) + + local UIParams = self:createUIParameters(RequestParams) + + --hmi side: expect UI.ScrollableMessage request + EXPECT_HMICALL("UI.ScrollableMessage", UIParams) + :Do(function(_,data) + + --HMI sends UI.OnSystemContext + self.hmiConnection:SendNotification("UI.OnSystemContext",{ appID = self.applications["Test Application"], systemContext = "HMI_OBSCURED" }) + scrollableMessageId = data.id + + --Long press button "First text" (id=1) + local function ButtonEventPress() + self.hmiConnection:SendNotification("Buttons.OnButtonEvent", {name = "CUSTOM_BUTTON", mode = "BUTTONDOWN", customButtonID = 1, appID = self.applications["Test Application"]}) + self.hmiConnection:SendNotification("Buttons.OnButtonEvent", {name = "CUSTOM_BUTTON", mode = "BUTTONUP", customButtonID = 1, appID = self.applications["Test Application"]}) + self.hmiConnection:SendNotification("Buttons.OnButtonPress", {name = "CUSTOM_BUTTON", mode = "LONG", customButtonID = 1, appID = self.applications["Test Application"]}) + end + + RUN_AFTER(ButtonEventPress, 3000) + + + --Send ScrollableMessage response + local function scrollableMessageResponse() + + --hmi sends response + self.hmiConnection:SendResponse(scrollableMessageId, "UI.ScrollableMessage", "ABORTED", {}) + + --HMI sends UI.OnSystemContext + self.hmiConnection:SendNotification("UI.OnSystemContext",{ appID = self.applications["Test Application"], systemContext = "MAIN" }) + end + + RUN_AFTER(scrollableMessageResponse, 5000) + + end) + + + + --mobile side: OnButtonEvent notifications + EXPECT_NOTIFICATION("OnButtonEvent", + {buttonName = "CUSTOM_BUTTON", buttonEventMode = "BUTTONDOWN", customButtonID = 1}, + {buttonName = "CUSTOM_BUTTON", buttonEventMode = "BUTTONUP", customButtonID = 1}) + :Times(2) + + --mobile side: OnButtonPress notifications + EXPECT_NOTIFICATION("OnButtonPress", + {buttonName = "CUSTOM_BUTTON", buttonPressMode = "LONG", customButtonID = 1}) + :Times(1) + + + --mobile side: expect OnHMIStatus notification + EXPECT_NOTIFICATION("OnHMIStatus", + {systemContext = "HMI_OBSCURED", hmiLevel = "FULL", audioStreamingState = audibleState}, + {systemContext = "MAIN", hmiLevel = "FULL", audioStreamingState = audibleState} + ) + :Times(2) + + --mobile side: expect the response + EXPECT_RESPONSE(cid, { success = false, resultCode = "ABORTED" }) + + end + + --End Test case SequenceCheck.11 + + ----------------------------------------------------------------------------------------- + + --Begin Test case SequenceCheck.12 + --Description: Check test case TC_SoftButtons_03(SDLAQ-TC-156) + + --Requirement id in JAMA: SDLAQ-CRS-200 + + --Verification criteria: Checking BOTH soft button reflecting on UI only if image and text are defined + + function Test:SM_SoftButtonBOTHAndImageParamIsNotDefined() + + --mobile side: sending the request + local Request = + { + scrollableMessageBody = "abc", + softButtons = { + + { + softButtonID = 1, + type = "BOTH", + image, + text = "First", --image is not defined + isHighlighted = false, + systemAction = "DEFAULT_ACTION" + } + }, + timeout = 30000 + } + + local cid = self.mobileSession:SendRPC(APIName, Request) + + local UIParams = self:createUIParameters(Request) + + --hmi side: expect UI.ScrollableMessage request + EXPECT_HMICALL("UI.ScrollableMessage", UIParams) + :Times(0) + + + --mobile side: expect the response + EXPECT_RESPONSE(cid, { success = false, resultCode = "INVALID_DATA" }) + end + + + --End Test case SequenceCheck.12 + + + end + + ------------------------------------------------------------------------- + + --Begin Test case SequenceCheck.13 + --Description: Check test case TC_SoftButtons_03(SDLAQ-TC-156) + --Info: This TC will be failing till resolving APPLINK-16052 + + --Requirement id in JAMA: SDLAQ-CRS-2912 + + --Verification criteria: Check that On.ButtonEvent(CUSTOM_BUTTON) notification is not transferred from HMI to mobile app by SDL if CUSTOM_BUTTON is not subscribed + + function Test:UnsubscribeButton_CUSTOM_BUTTON_SUCCESS() + + --mobile side: send UnsubscribeButton request + local cid = self.mobileSession:SendRPC("UnsubscribeButton", + { + buttonName = "CUSTOM_BUTTON" + }) + + --hmi side: expect OnButtonSubscription notification + EXPECT_HMINOTIFICATION("Buttons.OnButtonSubscription", {name = "CUSTOM_BUTTON", isSubscribed = false}) + :Timeout(5000) + + -- Mobile side: expects SubscribeButton response + -- Mobile side: expects EXPECT_NOTIFICATION("OnHashChange") if SUCCESS + EXPECT_RESPONSE(cid, { success = true, resultCode = "SUCCESS"}) + --:Timeout(13000) + + end + + function Test:SM_SoftButton_AfterUnsubscribe() + RequestParams = + { + scrollableMessageBody = "a", + softButtons = + { + { + softButtonID = 1, + type = "BOTH", + text = "First", + image = + { + value = "action.png", + imageType = "DYNAMIC" + }, + isHighlighted = true, + systemAction = "DEFAULT_ACTION" + } + + } + } + + --mobile side: sending the request + local cid = self.mobileSession:SendRPC("ScrollableMessage", RequestParams) + + local UIParams = self:createUIParameters(RequestParams) + + --hmi side: expect UI.ScrollableMessage request + EXPECT_HMICALL("UI.ScrollableMessage", UIParams) + :Do(function(_,data) + + --HMI sends UI.OnSystemContext + self.hmiConnection:SendNotification("UI.OnSystemContext",{ appID = self.applications["Test Application"], systemContext = "HMI_OBSCURED" }) + scrollableMessageId = data.id + + --Long press button "First" (id=1) + local function ButtonEventPress() + self.hmiConnection:SendNotification("Buttons.OnButtonEvent", {name = "CUSTOM_BUTTON", mode = "BUTTONDOWN", customButtonID = 1, appID = self.applications["Test Application"]}) + self.hmiConnection:SendNotification("Buttons.OnButtonEvent", {name = "CUSTOM_BUTTON", mode = "BUTTONUP", customButtonID = 1, appID = self.applications["Test Application"]}) + self.hmiConnection:SendNotification("Buttons.OnButtonPress", {name = "CUSTOM_BUTTON", mode = "LONG", customButtonID = 1, appID = self.applications["Test Application"]}) + end + + RUN_AFTER(ButtonEventPress, 3000) + + + --Send ScrollableMessage response + local function scrollableMessageResponse() + + --hmi sends response + self.hmiConnection:SendResponse(scrollableMessageId, "UI.ScrollableMessage", "ABORTED", {}) + + --HMI sends UI.OnSystemContext + self.hmiConnection:SendNotification("UI.OnSystemContext",{ appID = self.applications["Test Application"], systemContext = "MAIN" }) + end + + RUN_AFTER(scrollableMessageResponse, 5000) + + end) + + + --mobile side: OnButtonEvent notifications + EXPECT_NOTIFICATION("OnButtonEvent", + {buttonName = "CUSTOM_BUTTON", buttonEventMode = "BUTTONDOWN", customButtonID = 1}, + {buttonName = "CUSTOM_BUTTON", buttonEventMode = "BUTTONUP", customButtonID = 1}) + :Times(0) + + --mobile side: OnButtonPress notifications + EXPECT_NOTIFICATION("OnButtonPress", + {buttonName = "CUSTOM_BUTTON", buttonPressMode = "LONG", customButtonID = 1}) + :Times(0) + + + + --mobile side: expect the response + EXPECT_RESPONSE(cid, { success = false, resultCode = "ABORTED" }) + + end + + + --End Test case SequenceCheck.13 + +SequenceChecks() + + +---------------------------------------------------------------------------------------------- +-----------------------------------------TEST BLOCK VII--------------------------------------- +--------------------------------------Different HMIStatus------------------------------------- +---------------------------------------------------------------------------------------------- + +--Description: Check different HMIStatus + +--Requirement id in JAMA: + --SDLAQ-CRS-803: HMI Status Requirement for ScrollableMessage + --Verification criteria: ScrollableMessage request is allowed in FULL, LIMITED, BACKGROUND HMI level + +--Verify resultCode in NONE, LIMITED and BACKGROUND hmi levels +commonTestCases:verifyDifferentHMIStatus("DISALLOWED", "SUCCESS", "SUCCESS") + + +-- TODO: need to debug +--Begin Test case DifferentHMIlevel.1 +--Description: Check ScrollableMessage in BACKGROUND with STEAL_FOCUS softButton + + --Requirement id in JAMA: SDLAQ-CRS-2259 STEAL_FOCUS + + --Verification criteria: For the app which is in HMI_BACKGROUND and policy rules allow to call ScrollableMessage from BACKGROUND, pressing a SoftButton with SystemAction STEAL_FOCUS for ScrollableMessage causes bringing an application to HMI_FULL mode and closing the ScrollableMessage dialog on HMI with resultCode SUCCESS. OnButtonPress/OnButtonEvent is sent to SDL from HMI and then transmitted to mobile app if the application is subscribed to CUSTOM_BUTTON. + + -- if commonFunctions:isMediaApp() == true then + -- --[[TODO debug after resolving APPLINK-13101 + -- --Precondition 1: activate application 1 to update policy + -- commonSteps:ActivationApp() + + -- --Precondition 2: Update PT to allow ScrollableMessage request in FULL and BACKGROUND + -- local keep_context = true + -- local steal_focus = true + -- policyTable:updatePolicyAndAllowFunctionGroup({"FULL", "BACKGROUND"}, keep_context, steal_focus) + + + -- --Precondition 3: Activate the second media application to change application 1 to BACKGDOUND + -- commonSteps:ActivateTheSecondMediaApp() + -- ]] + + -- else + -- --[[TODO debug after resolving APPLINK-13101 + -- --Precondition 4: Update PT to allow ScrollableMessage request in FULL and BACKGROUND + -- local keep_context = true + -- local steal_focus = true + -- policyTable:updatePolicyAndAllowFunctionGroup({"FULL", "BACKGROUND"}, keep_context, steal_focus) + -- ]] + -- --Precondition 5: Create new session + -- commonSteps:precondition_AddNewSession() + + -- --Precondition 6: register new app + -- commonSteps:RegisterTheSecondMediaApp() + -- end + + -- function Test:ScrollableMessage_BACKGROUND_SUCCESS() + -- RequestParams = + -- { + -- scrollableMessageBody = "a", + -- softButtons = + -- { + -- { + -- softButtonID = 1, + -- text = "Close", + -- type = "TEXT", + -- isHighlighted = false, + -- systemAction = "STEAL_FOCUS" + -- } + -- } + -- } + + -- --mobile side: sending the request + -- local cid = self.mobileSession:SendRPC("ScrollableMessage", RequestParams) + + -- local UIParams = self:createUIParameters(RequestParams) + + -- --hmi side: expect UI.ScrollableMessage request + -- EXPECT_HMICALL("UI.ScrollableMessage", UIParams) + -- :Do(function(_,data) + + -- --HMI sends UI.OnSystemContext for app2 + -- self.hmiConnection:SendNotification("UI.OnSystemContext",{ appID = appId2, systemContext = "HMI_OBSCURED" }) + + + -- --Press button 1 + -- local function ButtonEventPress() + -- self.hmiConnection:SendNotification("Buttons.OnButtonEvent", {name = "CUSTOM_BUTTON", mode = "BUTTONDOWN", customButtonID = 1, appID = self.applications["Test Application"]}) + -- self.hmiConnection:SendNotification("Buttons.OnButtonEvent", {name = "CUSTOM_BUTTON", mode = "BUTTONUP", customButtonID = 1, appID = self.applications["Test Application"]}) + -- self.hmiConnection:SendNotification("Buttons.OnButtonPress", {name = "CUSTOM_BUTTON", mode = "SHORT", customButtonID = 1, appID = self.applications["Test Application"]}) + + -- --Send ScrollableMessage response + -- local function scrollableMessageResponse() + + -- --hmi sends response + -- self.hmiConnection:SendResponse(data.id, "UI.ScrollableMessage", "SUCCESS", {}) + + -- --HMI sends UI.OnSystemContext for app2 + -- self.hmiConnection:SendNotification("UI.OnSystemContext",{ appID = appId2, systemContext = "MAIN" }) + -- end + + + -- RUN_AFTER(scrollableMessageResponse, 200) + -- end + + -- RUN_AFTER(ButtonEventPress, 1000) + + -- local function deactivatedApp2() + + -- --hmi side: sending BasicCommunication.OnAppDeactivated notification for app2 + + -- self.hmiConnection:SendNotification("BasicCommunication.OnAppDeactivated", {appID = appId2, reason = "GENERAL"}) + + -- end + + -- RUN_AFTER(deactivatedApp2, 3000) + + + -- local function activateApp1() + + -- --hmi side: sending SDL.ActivateApp request + -- local RequestId = self.hmiConnection:SendRequest("SDL.ActivateApp", { appID = self.applications["Test Application"]}) + -- EXPECT_HMIRESPONSE(RequestId) + + -- end + + -- RUN_AFTER(activateApp1, 3500) + + -- end) + + -- --mobile side: OnButtonEvent notifications + -- EXPECT_NOTIFICATION("OnButtonEvent", + -- {buttonName = "CUSTOM_BUTTON", buttonEventMode = "BUTTONDOWN", customButtonID = 1}, + -- {buttonName = "CUSTOM_BUTTON", buttonEventMode = "BUTTONUP", customButtonID = 1}) + -- :Times(2) + + -- --mobile side: OnButtonPress notifications + -- EXPECT_NOTIFICATION("OnButtonPress", + -- {buttonName = "CUSTOM_BUTTON", buttonPressMode = "SHORT", customButtonID = 1}) + + + -- --mobile side (On App1): expect OnHMIStatus notification + -- EXPECT_NOTIFICATION("OnHMIStatus", {systemContext = "MAIN", hmiLevel = "FULL", audioStreamingState = audibleState} ) + + -- self.mobileSession2:ExpectNotification("OnHMIStatus", + -- {systemContext = "HMI_OBSCURED", hmiLevel = "FULL", audioStreamingState = "AUDIBLE"}, + -- {systemContext = "MAIN", hmiLevel = "FULL", audioStreamingState = "AUDIBLE"}, + -- {systemContext = "MAIN", hmiLevel = "BACKGROUND", audioStreamingState = "NOT_AUDIBLE"} + -- ) + -- :Times(3) + + + -- --mobile side: expect the response + -- EXPECT_RESPONSE(cid, { success = true, resultCode = "SUCCESS" }) + + -- DelayedExp(5000) + + -- end + + +--End Test case DifferentHMIlevel.1 + + +--------------------------------------------------------------------------------------------- +-------------------------------------------Postcondition------------------------------------- +--------------------------------------------------------------------------------------------- + + --Print new line to separate Postconditions + commonFunctions:newTestCasesGroup("Postconditions") + + + --Restore sdl_preloaded_pt.json + policyTable:Restore_preloaded_pt() + + + + return Test + diff --git a/test_scripts/API/ATF_SetAppIcon.lua b/test_scripts/API/ATF_SetAppIcon.lua new file mode 100644 index 0000000000..99c947033a --- /dev/null +++ b/test_scripts/API/ATF_SetAppIcon.lua @@ -0,0 +1,2417 @@ +Test = require('connecttest') +require('cardinalities') +local events = require('events') +local mobile_session = require('mobile_session') +local mobile = require('mobile_connection') +local tcp = require('tcp_connection') +local file_connection = require('file_connection') + +--------------------------------------------------------------------------------------------- +-----------------------------Required Shared Libraries--------------------------------------- +--------------------------------------------------------------------------------------------- +require('user_modules/AppTypes') +local commonTestCases = require('user_modules/shared_testcases/commonTestCases') +local commonSteps = require('user_modules/shared_testcases/commonSteps') +local commonFunctions = require('user_modules/shared_testcases/commonFunctions') +local policyTable = require('user_modules/shared_testcases/testCasesForPolicyTable') + +APIName = "SetAppIcon" -- use for above required scripts. + +local appIDAndDeviceMac = config.application1.registerAppInterfaceParams.appID.. "_" .. config.deviceMAC.. "/" +config.SDLStoragePath = config.pathToSDL .. "storage/" +local strAppFolder = config.SDLStoragePath..appIDAndDeviceMac +local strIvsu_cacheFolder = "/tmp/fs/mp/images/ivsu_cache/" + + +local iTimeout = 5000 + + +local str1000Chars = + "10123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyza b c aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa" + +local str501Chars = + "10123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyza b c aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa" + +local str255Chars = "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa" + +local FileNames = {"icon.png", "a", "action.png", str255Chars, "app_icon.png"} -- PutFiles +local syncFileName = {"a", "action.png", str255Chars} +local info = {"a", str1000Chars} +local infoName = {"LowerBound", "UpperBound"} +local OutBoundFile = {"", str255Chars.. "a", str501Chars} +local OutBoundFileName = {"Empty", "256Characters", "UpperBound"} +local appID0, appId2 + +local storagePath = config.SDLStoragePath..config.application1.registerAppInterfaceParams.appID.. "_" .. config.deviceMAC.. "/" + + +--------------------------------------------------------------------------------------------- +----------------------------------------Common functions------------------------------------- +--------------------------------------------------------------------------------------------- + +-- check_INVALID_DATA_Result: check response to mobile side incase INVALID_DATA +local function check_INVALID_DATA_resultCode_OnMobile(cid) + + --mobile side: expect SetAppIcon response + EXPECT_RESPONSE(cid, {success = false, resultCode = "INVALID_DATA"}) + :Timeout(iTimeout) + +end + + +-- Test case sending request and checking results in case SUCCESS +local function TC_SetAppIcon_SUCCESS(self, strFileName, strTestCaseName) + + Test[strTestCaseName] = function(self) + + --mobile side: sending SetAppIcon request + local cid = self.mobileSession:SendRPC("SetAppIcon",{ syncFileName = strFileName }) + + --hmi side: expect UI.SetAppIcon request + EXPECT_HMICALL("UI.SetAppIcon", + { + syncFileName = + { + imageType = "DYNAMIC", + value = storagePath .. strFileName + } + }) + :Timeout(iTimeout) + :Do(function(_,data) + --hmi side: sending UI.SetAppIcon response + self.hmiConnection:SendResponse(data.id, data.method, "SUCCESS", {}) + end) + + --mobile side: expect SetAppIcon response + EXPECT_RESPONSE(cid, { resultCode = "SUCCESS", success = true }) + end +end + + +function putfiles(sefl, arrFileNames) + for i=1,#arrFileNames do + Test["Precondition_PutFile_"..arrFileNames[i]] = function(self) + + --mobile side: sending Futfile request + local cid = self.mobileSession:SendRPC("PutFile", + { + syncFileName = arrFileNames[i], + fileType = "GRAPHIC_PNG", + persistentFile = false, + systemFile = false + }, + "files/action.png") + + --mobile side: expect Futfile response + EXPECT_RESPONSE(cid, { success = true}) + + end + end +end + +--------------------------------------------------------------------------------------------- +-------------------------------------------Preconditions------------------------------------- +--------------------------------------------------------------------------------------------- + + + commonSteps:DeleteLogsFileAndPolicyTable() + + --Print new line to separate new test cases group + commonFunctions:newTestCasesGroup("Preconditions") + + --1. Activate application + commonSteps:ActivationApp() + + --2. Update policy to allow request + policyTable:precondition_updatePolicy_AllowFunctionInHmiLeves({"BACKGROUND", "FULL", "LIMITED", "NONE"}) + + --3. PutFile to SDL + putfiles(sefl, FileNames) + + +--------------------------------------------------------------------------------------------- +-----------------------------------------I TEST BLOCK---------------------------------------- +--CommonRequestCheck: Check of mandatory/conditional request's parameters (mobile protocol)-- +--------------------------------------------------------------------------------------------- + + --Begin test suit PositiveRequestCheck + --Description: + -- request with all parameters + -- request with only mandatory parameters + -- request with all combinations of conditional-mandatory parameters (if exist) + -- request with one by one conditional parameters (each case - one conditional parameter) + -- request with missing mandatory parameters one by one (each case - missing one mandatory parameter) + -- request with all parameters are missing + -- request with fake parameters (fake - not from protocol, from another request) + -- request is sent with invalid JSON structure + -- different conditions of correlationID parameter (invalid, several the same etc.) + + --Write TEST_BLOCK_I_Begin to ATF log + function Test:TEST_BLOCK_I_Begin() + print("****************************** CommonRequestCheck ******************************") + end + + + + --Begin test case CommonRequestCheck.1 + --Description: This test is intended to check positive cases and when all parameters + + --Requirement id in JAMA/or Jira ID: SDLAQ-CRS-158 + + --Verification criteria: SetAppIcon request sets up the icon for the application which sends the request. The icon is browsed when the user looks through mobile apps list on HMI. + + strTestCaseName = "SetAppIcon_AllParameters" + TC_SetAppIcon_SUCCESS(self, "icon.png", strTestCaseName) + + --End test case CommonRequestCheck.1 + ----------------------------------------------------------------------------------------- + + --Begin test case PositiveRequestCheck.2 + --Description: check request with only mandatory parameters + + --It is checked in SetAppIcon_AllParameters? + + --End Test case PositiveRequestCheck.2 + + --Skipped CommonRequestCheck.3-4: There next checks are not applicable: + -- request with all combinations of conditional-mandatory parameters (if exist) + -- request with one by one conditional parameters (each case - one conditional parameter) + + ----------------------------------------------------------------------------------------- + + + + --Begin test case CommonRequestCheck.5 + --Description: This test is intended to check request with missing mandatory parameters one by one (each case - missing one mandatory parameter) + + --Requirement id in JAMA/or Jira ID: SDLAQ-CRS-731 + + --Verification criteria: SDL responses invalid data + + function Test:SetAppIcon_missing_mandatory_parameter_INVALID_DATA() + --mobile side: sending SetAppIcon request + local cid = self.mobileSession:SendRPC("SetAppIcon", + { + + }) + + check_INVALID_DATA_resultCode_OnMobile(cid) + end + + + --End test case CommonRequestCheck.5 + ----------------------------------------------------------------------------------------- + + + + --Begin test case PositiveRequestCheck.6 + --Description: check request with all parameters are missing + + --It is checked in SetAppIcon_missing_mandatory_parameter_INVALID_DATA + + --End Test case PositiveRequestCheck.6 + + + + --Begin test case PositiveRequestCheck.7 + --Description: check request with fake parameters (fake - not from protocol, from another request) + + --Begin test case CommonRequestCheck.7.1 + --Description: Check request with fake parameters + + --Requirement id in JAMA/or Jira ID: APPLINK-4518 + + --Verification criteria: According to xml tests by Ford team all fake parameter should be ignored by SDL + + function Test:SetAppIcon_FakeParameters_SUCCESS() + + --mobile side: sending SetAppIcon request + local cid = self.mobileSession:SendRPC("SetAppIcon",{ syncFileName = "icon.png" , fakeParameter = "fakeParameter"}) + + --hmi side: expect UI.SetAppIcon request + EXPECT_HMICALL("UI.SetAppIcon", + { + syncFileName = + { + imageType = "DYNAMIC", + value = storagePath .. "icon.png" + } + }) + :Timeout(iTimeout) + :ValidIf(function(_,data) + if data.params.fakeParameter then + print(" SDL re-sends fakeParameter to HMI in UI.SetAppIcon request") + return false + else + return true + end + end) + :Do(function(_,data) + --hmi side: sending UI.SetAppIcon response + self.hmiConnection:SendResponse(data.id, data.method, "SUCCESS", {}) + end) + + --mobile side: expect SetAppIcon response + EXPECT_RESPONSE(cid, { resultCode = "SUCCESS", success = true }) + + + end + + --End test case CommonRequestCheck.7.1 + ----------------------------------------------------------------------------------------- + + --Begin test case CommonRequestCheck.7.2 + --Description: Check request with parameters of other request + + --Requirement id in JAMA/or Jira ID: APPLINK-4518 + + --Verification criteria: According to xml tests by Ford team all fake parameter should be ignored by SDL + + function Test:SetAppIcon_ParametersOfOtherRequest_SUCCESS() + + --mobile side: sending SetAppIcon request + local cid = self.mobileSession:SendRPC("SetAppIcon",{ syncFileName = "icon.png" , sliderHeader ="sliderHeader"}) + + --hmi side: expect UI.SetAppIcon request + EXPECT_HMICALL("UI.SetAppIcon", + { + syncFileName = + { + imageType = "DYNAMIC", + value = storagePath .. "icon.png" + } + }) + :Timeout(iTimeout) + :ValidIf(function(_,data) + if data.params.sliderHeader then + print(" SDL re-sends sliderHeader to HMI in UI.SetAppIcon request") + return false + else + return true + end + end) + :Do(function(_,data) + --hmi side: sending UI.SetAppIcon response + self.hmiConnection:SendResponse(data.id, data.method, "SUCCESS", {}) + end) + + --mobile side: expect SetAppIcon response + EXPECT_RESPONSE(cid, { resultCode = "SUCCESS", success = true }) + + + end + + --End test case CommonRequestCheck.7.2 + ----------------------------------------------------------------------------------------- + + --End Test case PositiveRequestCheck.7 + + + + --Begin test case CommonRequestCheck.8 + --Description: Check request is sent with invalid JSON structure + + --Requirement id in JAMA/or Jira ID: SDLAQ-CRS-731 + + --Verification criteria: The request with wrong JSON syntax is sent, the response comes with INVALID_DATA result code. + + -- missing ':' after syncFileName + --payload = '{"syncFileName":"icon.png"}' + payload = '{"syncFileName" "icon.png"}' + + commonTestCases:VerifyInvalidJsonRequest(35, payload) + + --End test case CommonRequestCheck.8 + ----------------------------------------------------------------------------------------- + + + --Begin test case CommonRequestCheck.9 + --Description: check request with correlation Id is duplicated + + --Requirement id in JAMA/or Jira ID: APPLINK-14293 + + --Verification criteria: The response comes with SUCCESS result code. + + function Test:SetAppIcon_CorrelationID_Duplicated_SUCCESS() + + --mobile side: sending SetAppIcon request + local cid = self.mobileSession:SendRPC("SetAppIcon",{ syncFileName = "icon.png" }) + + local msg = + { + serviceType = 7, + frameInfo = 0, + rpcType = 0, + rpcFunctionId = 35, --SetAppIconID + rpcCorrelationId = cid, + payload = '{"syncFileName":"action.png"}' + } + + --hmi side: expect UI.SetAppIcon request + EXPECT_HMICALL("UI.SetAppIcon", + { + syncFileName = + { + imageType = "DYNAMIC", + value = storagePath .. "icon.png" + } + }, + { + syncFileName = + { + imageType = "DYNAMIC", + value = storagePath .. "action.png" + } + } + ) + :Times(2) + :Do(function(exp,data) + if exp.occurences == 1 then + self.mobileSession:Send(msg) + end + --hmi side: sending UI.SetAppIcon response + self.hmiConnection:SendResponse(data.id, data.method, "SUCCESS", {}) + end) + + + --mobile side: expect SetAppIcon response + EXPECT_RESPONSE(cid, { resultCode = "SUCCESS", success = true }) + :Times(2) + + end + + --End test case CommonRequestCheck.9 + ----------------------------------------------------------------------------------------- + + + --Write TEST_BLOCK_I_End to ATF log + function Test:TEST_BLOCK_I_End() + print("********************************************************************************") + end + + --End Test suit PositiveRequestCheck + + +--------------------------------------------------------------------------------------------- +----------------------------------------II TEST BLOCK---------------------------------------- +----------------------------------------Positive cases--------------------------------------- +--------------------------------------------------------------------------------------------- + + --Write TEST_BLOCK_II_Begin to ATF log + function Test:TEST_BLOCK_II_Begin() + print("******************************** Positive cases ********************************") + end + --=================================================================================-- + --------------------------------Positive request check------------------------------- + --=================================================================================-- + + + --Begin test suit PositiveRequestCheck + --Description: check of each request parameter value in bound and boundary conditions + + --Begin test case PositiveRequestCheck.1 + --Description: check of each request parameter value in bound and boundary conditions of syncFileName + + --Requirement id in JAMA/or Jira ID: SDLAQ-CRS-158, SDLAQ-CRS-730 + + --Verification criteria: SetAppIcon request sets up the icon for the application, the icon is browsed when the user looks through mobile apps list on HMI. Response is returned to mobile app, resultCode is "SUCCESS". + + for i=1,#syncFileName do + + strTestCaseName = "SetAppIcon_syncFileName_InBound_" .. tostring(syncFileName[i]).."_SUCCESS" + TC_SetAppIcon_SUCCESS(self, syncFileName[i], strTestCaseName) + end + + + --End test case PositiveRequestCheck.1 + ----------------------------------------------------------------------------------------- + + + --End Test suit PositiveRequestCheck + + + --=================================================================================-- + --------------------------------Positive response check------------------------------ + --=================================================================================-- + + --------Checks----------- + -- parameters with values in boundary conditions + + + --Begin test suit PositiveResponseCheck + --Description: Check positive responses + + + + --Begin test case PositiveResponseCheck.1 + --Description: Check info parameter when SetAppIcon response with min-length, max-length + + --Requirement id in JAMA/or Jira ID: N/A + + --Verification criteria: verify SDL responses with info parameter value in min-length, max-length + + for i=1,#info do + Test["SetAppIcon_Response_info_Parameter_InBound_" .. tostring(infoName[i]).."_SUCCESS"] = function(self) + + --mobile side: sending SetAppIcon request + local cid = self.mobileSession:SendRPC("SetAppIcon", + { + syncFileName = "icon.png" + } + ) + + --hmi side: expect UI.SetAppIcon request + EXPECT_HMICALL("UI.SetAppIcon", + { + syncFileName = + { + imageType = "DYNAMIC", + value = storagePath .. "icon.png" + } + }) + :Timeout(iTimeout) + :Do(function(_,data) + --hmi side: sending UI.SetAppIcon response + self.hmiConnection:SendResponse(data.id, data.method, "SUCCESS", {info = info[i]}) + end) + + + --mobile side: expect SetAppIcon response + EXPECT_RESPONSE(cid, {success = true, resultCode = "SUCCESS", info = info[i]}) + :Timeout(iTimeout) + + end + end + + --End test case CommonRequestCheck.1 + ----------------------------------------------------------------------------------------- + + --End Test suit PositiveResponseCheck + + --Write TEST_BLOCK_II_End to ATF log + function Test:TEST_BLOCK_II_End() + print("********************************************************************************") + end + +---------------------------------------------------------------------------------------------- +----------------------------------------III TEST BLOCK---------------------------------------- +----------------------------------------Negative cases---------------------------------------- +---------------------------------------------------------------------------------------------- + + --Write TEST_BLOCK_III_Begin to ATF log + function Test:TEST_BLOCK_III_Begin() + print("******************************** Negative cases ********************************") + end + + --=================================================================================-- + ---------------------------------Negative request check------------------------------ + --=================================================================================-- + --------Checks----------- + -- outbound values + -- invalid values(empty, missing, nonexistent, duplicate, invalid characters) + -- parameters with wrong type + -- invalid json + + --Begin test suit NegativeRequestCheck + --Description: check of each request parameter value out of bound, missing, with wrong type, empty, duplicate etc. + + + --Begin test case NegativeRequestCheck.1 + --Description: check of each request parameter value in bound and boundary conditions of syncFileName + + --Requirement id in JAMA/or Jira ID: SDLAQ-CRS-158, SDLAQ-CRS-731 + + --Verification criteria: SDL returns INVALID_DATA + + for i=1,#OutBoundFile do + Test["SetAppIcon_syncFileName_OutBound_" .. tostring(OutBoundFileName[i]) .."_INVALID_DATA"] = function(self) + + --mobile side: sending SetAppIcon request + local cid = self.mobileSession:SendRPC("SetAppIcon", + { + syncFileName = OutBoundFile[i] + }) + + --Check results on mobile side (and HMI if it is applicable) + check_INVALID_DATA_resultCode_OnMobile(cid, false, "INVALID_DATA") + + end + end + + + --End test case NegativeRequestCheck.1 + ----------------------------------------------------------------------------------------- + + + + --Begin test case NegativeRequestCheck.2 + --Description: invalid values(empty, missing, nonexistent, duplicate, invalid characters) + + + --Begin test case NegativeRequestCheck.2.1 + --Description: Check properties parameter is -- invalid values(empty) - The request with empty "syncFileName" is sent + + --Requirement id in JAMA/or Jira ID: SDLAQ-CRS-158, SDLAQ-CRS-731 + + --Verification criteria: SDL responses with INVALID_DATA result code. + + function Test:SetAppIcon_syncFileName_IsInvalidValue_Empty_INVALID_DATA() + + --mobile side: sending SetAppIcon request + local cid = self.mobileSession:SendRPC("SetAppIcon", + { + syncFileName = "" + }) + + --Check results on mobile side (and HMI if it is applicable) + check_INVALID_DATA_resultCode_OnMobile(cid, false, "INVALID_DATA") + + end + + --End test case NegativeRequestCheck.2.1 + ----------------------------------------------------------------------------------------- + + + --Begin test case NegativeRequestCheck.2.2 + --Description: Check the request without "syncFileName" is sent, the INVALID_DATA response code is returned. + + --It is covered by SetAppIcon_missing_mandatory_parameter_INVALID_DATA + + --End test case NegativeRequestCheck.2.2 + ----------------------------------------------------------------------------------------- + + + + --Begin test case NegativeRequestCheck.2.3 + --Description: Check the request with nonexistent value is sent, the INVALID_DATA response code is returned. + + --Requirement id in JAMA/or Jira ID: SDLAQ-CRS-158, SDLAQ-CRS-731 + + --Verification criteria: SDL responses with INVALID_DATA result code. + + function Test:SetAppIcon_syncFileName_IsInvalidValue_nonexistent_INVALID_DATA() + + --mobile side: sending SetAppIcon request + local cid = self.mobileSession:SendRPC("SetAppIcon", + { + syncFileName = "nonexistentButton" + }) + + --Check results on mobile side (and HMI if it is applicable) + check_INVALID_DATA_resultCode_OnMobile(cid, false, "INVALID_DATA") + + end + + --End test case NegativeRequestCheck.2.3 + ----------------------------------------------------------------------------------------- + + + + --Begin test case NegativeRequestCheck.2.4 + --Description: invalid values(duplicate) + + --This check is not applicable for SetAppIcon + + --End Test case NegativeRequestCheck.2.4 + + + + --Begin test case NegativeRequestCheck.2.5 + --Description: Check the request with invalid characters is sent, the INVALID_DATA response code is returned. + + --Requirement id in JAMA/or Jira ID: SDLAQ-CRS-158, SDLAQ-CRS-731 + + --Verification criteria: SDL responses with INVALID_DATA result code. + + function Test:SetAppIcon_syncFileName_IsInvalidValue_InvalidCharacters_NewLine_INVALID_DATA() + + --mobile side: sending SetAppIcon request + local cid = self.mobileSession:SendRPC("SetAppIcon", + { + syncFileName = "a\nb" + }) + + --Check results on mobile side (and HMI if it is applicable) + check_INVALID_DATA_resultCode_OnMobile(cid, false, "INVALID_DATA") + + end + + function Test:SetAppIcon_syncFileName_IsInvalidValue_InvalidCharacters_Tab_INVALID_DATA() + + --mobile side: sending SetAppIcon request + local cid = self.mobileSession:SendRPC("SetAppIcon", + { + syncFileName = "a\tb" + }) + + --Check results on mobile side (and HMI if it is applicable) + check_INVALID_DATA_resultCode_OnMobile(cid, false, "INVALID_DATA") + + end + + function Test:SetAppIcon_syncFileName_IsInvalidValue_InvalidCharacters_OnlySpaces_INVALID_DATA() + + --mobile side: sending SetAppIcon request + local cid = self.mobileSession:SendRPC("SetAppIcon", + { + syncFileName = " " + }) + + --Check results on mobile side (and HMI if it is applicable) + check_INVALID_DATA_resultCode_OnMobile(cid, false, "INVALID_DATA") + + end + --End test case NegativeRequestCheck.2.5 + ----------------------------------------------------------------------------------------- + + + + --End Test case NegativeRequestCheck.2 + + + --Begin test case NegativeRequestCheck.3 + --Description: Check the request with wrong data type in syncFileName parameter + + + --Requirement id in JAMA/or Jira ID: SDLAQ-CRS-731 + + --Verification criteria: The response with INVALID DATA result code is returned. + + function Test:SetAppIcon_syncFileName_IsInvalidValue_WrongDataType_INVALID_DATA() + + --mobile side: sending SetAppIcon request + local cid = self.mobileSession:SendRPC("SetAppIcon", + { + syncFileName = 123 + }) + + --Check results on mobile side (and HMI if it is applicable) + check_INVALID_DATA_resultCode_OnMobile(cid, false, "INVALID_DATA") + + end + + --End test case NegativeRequestCheck.3 + ----------------------------------------------------------------------------------------- + + + --End test suit NegativeRequestCheck + + --=================================================================================-- + ---------------------------------Negative response check------------------------------ + --=================================================================================-- + + --------Checks----------- + -- outbound values + -- invalid values(empty, missing, nonexistent, invalid characters) + -- parameters with wrong type + -- invalid json + + --Begin test suit NegativeResponseCheck + --Description: check negative response from HMI + + --Requirement id in JAMA/or Jira ID: SDLAQ-CRS-159 + + --Verification criteria: The response contains 2 mandatory parameters "success" and "resultCode", "info" is sent if there is any additional information about the resultCode. + + +--[[TODO: update after resolving APPLINK-14551 + --Begin test case NegativeResponseCheck.1 + --Description: check negative response from HMI in case outbound values of info parameter + + --Requirement id in JAMA/or Jira ID: APPLINK-14551, SDLAQ-CRS-159 + + --Verification criteria: info parameter value is truncated to max-length + + function Test:SetAppIcon_Response_info_Parameter_OutBound_SUCCESS() + + --mobile side: sending SetAppIcon request + local cid = self.mobileSession:SendRPC("SetAppIcon", + { + syncFileName = "icon.png" + } + ) + + --hmi side: expect UI.SetAppIcon request + EXPECT_HMICALL("UI.SetAppIcon", + { + syncFileName = + { + imageType = "DYNAMIC", + value = storagePath .. "icon.png" + } + }) + :Timeout(iTimeout) + :Do(function(_,data) + --hmi side: sending UI.SetAppIcon response + self.hmiConnection:SendResponse(data.id, data.method, "SUCCESS", {info = str1000Chars .."z"}) + end) + + + --mobile side: expect SetAppIcon response + EXPECT_RESPONSE(cid, {success = true, resultCode = "SUCCESS", info = str1000Chars}) + :Timeout(iTimeout) + + end + + + --End test case NegativeResponseCheck.1 + ----------------------------------------------------------------------------------------- + + + + --Begin test case NegativeResponseCheck.2 + --Description: check negative response from HMI in case invalid values(empty, missing, nonexistent, invalid characters) + + --Requirement id in JAMA/or Jira ID: APPLINK-14551, SDLAQ-CRS-159 + + --Verification criteria: The response contains 2 mandatory parameters "success" and "resultCode", "info" is sent if there is any additional information about the resultCode. + + + --Begin test case NegativeResponseCheck.2.1 + --Description: check negative response from HMI in case invalid values(empty) + + -- info parameter is empty => SUCCESS with info is empty + function Test:SetAppIcon_Response_info_Parameter_Empty_SUCCESS() + + --mobile side: sending SetAppIcon request + local cid = self.mobileSession:SendRPC("SetAppIcon", + { + syncFileName = "icon.png" + } + ) + + --hmi side: expect UI.SetAppIcon request + EXPECT_HMICALL("UI.SetAppIcon", + { + syncFileName = + { + imageType = "DYNAMIC", + value = storagePath .. "icon.png" + } + }) + :Timeout(iTimeout) + :Do(function(_,data) + --hmi side: sending UI.SetAppIcon response + --self.hmiConnection:SendResponse(data.id, data.method, "SUCCESS", {info = ""}) + self.hmiConnection:SendError(data.id, data.method, "GENERIC_ERROR", "") + end) + + + --mobile side: expect SetAppIcon response + --EXPECT_RESPONSE(cid, {success = true, resultCode = "SUCCESS"}) + EXPECT_RESPONSE(cid, {success = false, resultCode = "GENERIC_ERROR"}) + :ValidIf (function(_,data) + if data.payload.info then + print(" SDL resend empty info to mobile app ") + return false + else + return true + end + end) + + end + ]] + --[[TODO: updated after resolving APPLINK-14765 + -- method parameter is empty => GENERIC_ERROR + function Test:SetAppIcon_Response_method_parameter_empty_GENERIC_ERROR() + + --mobile side: sending SetAppIcon request + local cid = self.mobileSession:SendRPC("SetAppIcon", + { + syncFileName = "icon.png" + } + ) + + --hmi side: expect UI.SetAppIcon request + EXPECT_HMICALL("UI.SetAppIcon", + { + syncFileName = + { + imageType = "DYNAMIC", + value = storagePath .. "icon.png" + } + }) + :Timeout(iTimeout) + :Do(function(_,data) + --hmi side: sending UI.SetAppIcon response + self.hmiConnection:SendResponse(data.id, "", "SUCCESS", {}) + end) + + + --mobile side: expect SetAppIcon response + EXPECT_RESPONSE(cid, {success = false, resultCode = "GENERIC_ERROR"}) + :Timeout(12000) + + end + + -- resultCode parameter is empty + function Test:SetAppIcon_Response_resultCode_parameter_IsEmpty_GenericError() + + --mobile side: sending SetAppIcon request + local cid = self.mobileSession:SendRPC("SetAppIcon", + { + syncFileName = "icon.png" + } + ) + + --hmi side: expect UI.SetAppIcon request + EXPECT_HMICALL("UI.SetAppIcon", + { + syncFileName = + { + imageType = "DYNAMIC", + value = storagePath .. "icon.png" + } + }) + :Timeout(iTimeout) + :Do(function(_,data) + --hmi side: sending UI.SetAppIcon response + self.hmiConnection:SendResponse(data.id, data.method, "", {}) + end) + + + --mobile side: expect SetAppIcon response + EXPECT_RESPONSE(cid, {success = false, resultCode = "INVALID_DATA", info = "Received invalid data on HMI response"}) + :Timeout(iTimeout) + + end + + --End test case NegativeResponseCheck.2.1 + ----------------------------------------------------------------------------------------- + ]] + + --Begin test case NegativeResponseCheck.2.2 + --Description: check negative response from HMI in case invalid values(missing) + --[[TODO: update after resolving APPLINK-14765 + -- info parameter is missing => SUCCESS without info parameter + function Test:SetAppIcon_Response_info_Parameter_missing_SUCCESS() + + --mobile side: sending SetAppIcon request + local cid = self.mobileSession:SendRPC("SetAppIcon", + { + syncFileName = "icon.png" + } + ) + + --hmi side: expect UI.SetAppIcon request + EXPECT_HMICALL("UI.SetAppIcon", + { + syncFileName = + { + imageType = "DYNAMIC", + value = storagePath .. "icon.png" + } + }) + :Timeout(iTimeout) + :Do(function(_,data) + --hmi side: sending UI.SetAppIcon response + self.hmiConnection:SendResponse(data.id, data.method, "SUCCESS", {}) + end) + + + --mobile side: expect SetAppIcon response + EXPECT_RESPONSE(cid, {success = true, resultCode = "SUCCESS"}) + :ValidIf (function(_,data) + if data.payload.info then + print(" SDL send empty info to mobile app ") + return false + else + return true + end + end) + + end + + -- method parameter is missing => GENERIC_ERROR + function Test:SetAppIcon_Response_method_Parameter_missing_GENERIC_ERROR() + + --mobile side: sending SetAppIcon request + local cid = self.mobileSession:SendRPC("SetAppIcon", + { + syncFileName = "icon.png" + } + ) + + --hmi side: expect UI.SetAppIcon request + EXPECT_HMICALL("UI.SetAppIcon", + { + syncFileName = + { + imageType = "DYNAMIC", + value = storagePath .. "icon.png" + } + }) + :Timeout(iTimeout) + :Do(function(_,data) + --hmi side: sending UI.SetAppIcon response + self.hmiConnection:Send('{"id":'..tostring(data.id)..',"jsonrpc":"2.0","result":{"code":0}}') + end) + + + --mobile side: expect SetAppIcon response + EXPECT_RESPONSE(cid, {success = false, resultCode = "GENERIC_ERROR"}) + :Timeout(12000) + + end + + -- resultCode parameter is missing => INVALID_DATA + function Test:SetAppIcon_Response_resultcode_parameter_missing_INVALID_DATA() + + --mobile side: sending SetAppIcon request + local cid = self.mobileSession:SendRPC("SetAppIcon", + { + syncFileName = "icon.png" + } + ) + + --hmi side: expect UI.SetAppIcon request + EXPECT_HMICALL("UI.SetAppIcon", + { + syncFileName = + { + imageType = "DYNAMIC", + value = storagePath .. "icon.png" + } + }) + :Timeout(iTimeout) + :Do(function(_,data) + --hmi side: sending UI.SetAppIcon response + self.hmiConnection:Send('{"jsonrpc":"2.0","id":'..tostring(data.id)..',"result":{"method":"UI.SetAppIcon"}}') + end) + + + --mobile side: expect SetAppIcon response + EXPECT_RESPONSE(cid, {success = false, resultCode = "INVALID_DATA"}) + + end + + -- mandatory parameters are missing => GENERIC_ERROR + function Test:SetAppIcon_Response_mandatory_parameters_are_missed_GENERIC_ERROR() + + --mobile side: sending SetAppIcon request + local cid = self.mobileSession:SendRPC("SetAppIcon", + { + syncFileName = "icon.png" + } + ) + + --hmi side: expect UI.SetAppIcon request + EXPECT_HMICALL("UI.SetAppIcon", + { + syncFileName = + { + imageType = "DYNAMIC", + value = storagePath .. "icon.png" + } + }) + :Timeout(iTimeout) + :Do(function(_,data) + --hmi side: sending UI.SetAppIcon response + self.hmiConnection:Send('{"jsonrpc":"2.0","id":'..tostring(data.id)..',"result":{"info":"abc"}}') + end) + + + --mobile side: expect SetAppIcon response + EXPECT_RESPONSE(cid, {success = false, resultCode = "GENERIC_ERROR"}) + :Timeout(12000) + + end + + -- all parameters are missing => GENERIC_ERROR + function Test:SetAppIcon_Response_all_parameters_are_missed_GENERIC_ERROR() + + --mobile side: sending SetAppIcon request + local cid = self.mobileSession:SendRPC("SetAppIcon", + { + syncFileName = "icon.png" + } + ) + + --hmi side: expect UI.SetAppIcon request + EXPECT_HMICALL("UI.SetAppIcon", + { + syncFileName = + { + imageType = "DYNAMIC", + value = storagePath .. "icon.png" + } + }) + :Timeout(iTimeout) + :Do(function(_,data) + --hmi side: sending UI.SetAppIcon response + self.hmiConnection:Send('{"jsonrpc":"2.0","result":{}}') + end) + + + --mobile side: expect SetAppIcon response + EXPECT_RESPONSE(cid, {success = false, resultCode = "GENERIC_ERROR"}) + :Timeout(12000) + + end + + --End test case NegativeResponseCheck.2.2 + ]] + ----------------------------------------------------------------------------------------- + --[[TODO: update fter resolving APPLINK-14551 + --Begin test case NegativeResponseCheck.2.3 + --Description: check negative response from HMI in case invalid values(invalid characters) + + -- info parameter is invalid characters: \t => SUCCESS with invalid character + function Test:SetAppIcon_Response_info_Parameter_Invalid_Character_Tab_SUCCESS() + + --mobile side: sending SetAppIcon request + local cid = self.mobileSession:SendRPC("SetAppIcon", + { + syncFileName = "icon.png" + } + ) + + --hmi side: expect UI.SetAppIcon request + EXPECT_HMICALL("UI.SetAppIcon", + { + syncFileName = + { + imageType = "DYNAMIC", + value = storagePath .. "icon.png" + } + }) + :Timeout(iTimeout) + :Do(function(_,data) + --hmi side: sending UI.SetAppIcon response + self.hmiConnection:SendResponse(data.id, data.method, "SUCCESS", {info = "a\tb"}) + end) + + + --mobile side: expect SetAppIcon response + EXPECT_RESPONSE(cid, {success = true, resultCode = "SUCCESS"}) + :ValidIf (function(_,data) + if data.payload.info then + print(" SDL resend invalid info to mobile app: info = " .. tostring(data.payload.info)) + return false + else + return true + end + end) + + end + + + -- info parameter is invalid characters: \n => SUCCESS with invalid character + function Test:SetAppIcon_Response_info_Parameter_Invalid_Character_NewLine_SUCCESS() + + --mobile side: sending SetAppIcon request + local cid = self.mobileSession:SendRPC("SetAppIcon", + { + syncFileName = "icon.png" + } + ) + + --hmi side: expect UI.SetAppIcon request + EXPECT_HMICALL("UI.SetAppIcon", + { + syncFileName = + { + imageType = "DYNAMIC", + value = storagePath .. "icon.png" + } + }) + :Timeout(iTimeout) + :Do(function(_,data) + --hmi side: sending UI.SetAppIcon response + self.hmiConnection:SendResponse(data.id, data.method, "SUCCESS", {info = "a\nb"}) + end) + + + --mobile side: expect SetAppIcon response + EXPECT_RESPONSE(cid, {success = true, resultCode = "SUCCESS"}) + :ValidIf (function(_,data) + if data.payload.info then + print(" SDL resend invalid info to mobile app: info = " .. tostring(data.payload.info)) + return false + else + return true + end + end) + + end + + --End test case NegativeResponseCheck.2.3 + ]] + ----------------------------------------------------------------------------------------- + --[[TODO: update after resolving APPLINK-14765 + --Begin test case NegativeResponseCheck.2.4 + --Description: check negative response from HMI in case invalid values(nonexistent) + + -- resultCode parameter is invalid: None existing value + function Test:SetAppIcon_Response_resultCode_Parameter_Invalid_NonExisting_SUCCESS() + + --mobile side: sending SetAppIcon request + local cid = self.mobileSession:SendRPC("SetAppIcon", + { + syncFileName = "icon.png" + } + ) + + --hmi side: expect UI.SetAppIcon request + EXPECT_HMICALL("UI.SetAppIcon", + { + syncFileName = + { + imageType = "DYNAMIC", + value = storagePath .. "icon.png" + } + }) + :Timeout(iTimeout) + :Do(function(_,data) + --hmi side: sending UI.SetAppIcon response + self.hmiConnection:SendResponse(data.id, data.method, "InvalidCode", {}) + end) + + + --mobile side: expect SetAppIcon response + EXPECT_RESPONSE(cid, {success = false, resultCode = "INVALID_DATA", info = "Received invalid data on HMI response"}) + + end + + + --End test case NegativeResponseCheck.2.4 + ----------------------------------------------------------------------------------------- + + --End Test case NegativeResponseCheck.2 + + + + --Begin test case NegativeResponseCheck.3 + --Description: check negative response from HMI in case parameters is wrong type + + --ToDo: Should be updated according to APPLINK-13276 + + -- info parameter is wrong type => What does SDL do in this case? + function Test:SetAppIcon_Response_info_Parameter_IsWrongType_SUCCESS() + + --mobile side: sending SetAppIcon request + local cid = self.mobileSession:SendRPC("SetAppIcon", + { + syncFileName = "icon.png" + } + ) + + --hmi side: expect UI.SetAppIcon request + EXPECT_HMICALL("UI.SetAppIcon", + { + syncFileName = + { + imageType = "DYNAMIC", + value = storagePath .. "icon.png" + } + }) + :Timeout(iTimeout) + :Do(function(_,data) + --hmi side: sending UI.SetAppIcon response + self.hmiConnection:SendResponse(data.id, data.method, "SUCCESS", {info = 123}) + end) + + + --mobile side: expect SetAppIcon response + EXPECT_RESPONSE(cid, {success = true, resultCode = "SUCCESS"}) + :ValidIf (function(_,data) + if data.payload.info then + print(" SDL resend wrong data type of info to mobile app. info = " .. tostring(data.payload.info)) + return false + else + return true + end + end) + + end + + -- method parameter is wrong type => GENERIC_ERROR + function Test:SetAppIcon_Response_method_parameter_wrong_type_GENERIC_ERROR() + + --mobile side: sending SetAppIcon request + local cid = self.mobileSession:SendRPC("SetAppIcon", + { + syncFileName = "icon.png" + } + ) + + --hmi side: expect UI.SetAppIcon request + EXPECT_HMICALL("UI.SetAppIcon", + { + syncFileName = + { + imageType = "DYNAMIC", + value = storagePath .. "icon.png" + } + }) + :Timeout(iTimeout) + :Do(function(_,data) + --hmi side: sending UI.SetAppIcon response + self.hmiConnection:SendResponse(data.id, 123, "SUCCESS", {}) + end) + + + --mobile side: expect SetAppIcon response + EXPECT_RESPONSE(cid, {success = false, resultCode = "GENERIC_ERROR"}) + :Timeout(12000) + + end + + + -- resultCode parameter is wrong type + function Test:SetAppIcon_Response_resultCode_Parameter_IsWrongType_GenericError() + + --mobile side: sending SetAppIcon request + local cid = self.mobileSession:SendRPC("SetAppIcon", + { + syncFileName = "icon.png" + } + ) + + --hmi side: expect UI.SetAppIcon request + EXPECT_HMICALL("UI.SetAppIcon", + { + syncFileName = + { + imageType = "DYNAMIC", + value = storagePath .. "icon.png" + } + }) + :Timeout(iTimeout) + :Do(function(_,data) + --hmi side: sending UI.SetAppIcon response + self.hmiConnection:SendResponse(data.id, data.method, 456, {}) + end) + + + --mobile side: expect SetAppIcon response + EXPECT_RESPONSE(cid, {success = false, resultCode = "INVALID_DATA", info = "Received invalid data on HMI response"}) + :Timeout(iTimeout) + + end + + + --End test case NegativeResponseCheck.3 + ----------------------------------------------------------------------------------------- + +]] + + + --Begin test case NegativeResponseCheck.4 + --Description: check negative response from HMI in case invalid json + --[[TODO: Update after resolving APPLINK-13418, APPLINK-14765 + function Test:SetAppIcon_Response_Invalid_JSON_GENERIC_ERROR() + + --mobile side: sending SetAppIcon request + local cid = self.mobileSession:SendRPC("SetAppIcon", + { + syncFileName = "icon.png" + } + ) + + --hmi side: expect UI.SetAppIcon request + EXPECT_HMICALL("UI.SetAppIcon", + { + syncFileName = + { + imageType = "DYNAMIC", + value = storagePath .. "icon.png" + } + }) + :Timeout(iTimeout) + :Do(function(_,data) + --hmi side: sending UI.SetAppIcon response + --self.hmiConnection:SendResponse(data.id, data.method, "SUCCESS", {info = 123}) + + --change ":" by " " after "code" + --self.hmiConnection:Send('{"jsonrpc":"2.0","id":'..tostring(data.id)..',"result":{"code":0,"method":"UI.SetAppIcon"}}') + self.hmiConnection:Send('{"jsonrpc":"2.0","id":'..tostring(data.id)..',"result":{"code" 0,"method":"UI.SetAppIcon"}}') + end) + + + --mobile side: expect SetAppIcon response + --EXPECT_RESPONSE(cid, {success = true, resultCode = "SUCCESS", info = nil}) + EXPECT_RESPONSE(cid, {success = false, resultCode = "GENERIC_ERROR", info = nil}) + :Timeout(12000) + + end + +]]-- + + --End test case NegativeResponseCheck.4 + ----------------------------------------------------------------------------------------- + + --End Test suit NegativeResponseCheck + + --Write TEST_BLOCK_III_End to ATF log + function Test:TEST_BLOCK_III_End() + print("********************************************************************************") + end + + + +---------------------------------------------------------------------------------------------- +----------------------------------------IV TEST BLOCK----------------------------------------- +---------------------------------------Result code check-------------------------------------- +---------------------------------------------------------------------------------------------- + + --Check all uncovered pairs resultCodes+success + + --Begin test suit ResultCodeCheck + --Description: check result code of response to Mobile (SDLAQ-CRS-729) + + --Write TEST_BLOCK_IV_Begin to ATF log + function Test:TEST_BLOCK_IV_Begin() + print("****************************** Result code check *******************************") + end + + --Begin test case ResultCodeCheck.1 + --Description: Check resultCode: SUCCESS + + -- It was checked by other case such as SetAppIcon_AllParameters + + --End test case ResultCodeCheck.1 + ----------------------------------------------------------------------------------------- + + --Begin test case ResultCodeCheck.2 + --Description: Check resultCode: INVALID_DATA + + --It is covered by SetAppIcon_syncFileName_IsInvalidValue_nonexistent_INVALID_DATA + + --End test case ResultCodeCheck.2 + ----------------------------------------------------------------------------------------- + + + --Begin test case ResultCodeCheck.3 + --Description: Check resultCode: OUT_OF_MEMORY + + --Requirement id in JAMA/or Jira ID: SDLAQ-CRS-732 + + --Verification criteria: A SetAppIcon request is sent under conditions of RAM deficit for executing it. The response code OUT_OF_MEMORY is returned + + --ToDo: Can not check this case. + + --End test case ResultCodeCheck.3 + ----------------------------------------------------------------------------------------- + + --Begin test case ResultCodeCheck.4 + --Description: Check resultCode: TOO_MANY_PENDING_REQUESTS + + --Requirement id in JAMA/or Jira ID: SDLAQ-CRS-733 + + --Verification criteria: SDL response TOO_MANY_PENDING_REQUESTS resultCode + + --Move to another script: ATF_SetAppIcon_TOO_MANY_PENDING_REQUESTS.lua + + --End test case ResultCodeCheck.4 + ----------------------------------------------------------------------------------------- + + --Begin test case ResultCodeCheck.5 + --Description: Check resultCode: APPLICATION_NOT_REGISTERED + + --Requirement id in JAMA/or Jira ID: SDLAQ-CRS-734 + + --Verification criteria: SDL responses APPLICATION_NOT_REGISTERED resultCode + + --Precondition: Creation New Session + commonSteps:precondition_AddNewSession() + + --Description: Send SetAppIcon when application not registered yet. + function Test:SetAppIcon_resultCode_APPLICATION_NOT_REGISTERED() + + --mobile side: sending SetAppIcon request + local cid = self.mobileSession2:SendRPC("SetAppIcon", + { + syncFileName = "icon.png" + } + ) + + --mobile side: expect SetAppIcon response + self.mobileSession2:ExpectResponse(cid, {success = false, resultCode = "APPLICATION_NOT_REGISTERED"}) + + end + + --End test case ResultCodeCheck.5 + ----------------------------------------------------------------------------------------- + + --Begin test case ResultCodeCheck.6 + --Description: Check resultCode: REJECTED + + --Requirement id in JAMA/or Jira ID: SDLAQ-CRS-735 + + --Verification criteria: In case SDL receives REJECTED result code for the RPC from HMI, SDL must transfer REJECTED resultCode with adding "success:false" to mobile app. + + + function Test:SetAppIcon_resultCode_REJECTED() + + --mobile side: sending SetAppIcon request + local cid = self.mobileSession:SendRPC("SetAppIcon", + { + syncFileName = "icon.png" + } + ) + + --hmi side: expect UI.SetAppIcon request + EXPECT_HMICALL("UI.SetAppIcon", + { + syncFileName = + { + imageType = "DYNAMIC", + value = storagePath .. "icon.png" + } + }) + :Timeout(iTimeout) + :Do(function(_,data) + --hmi side: sending UI.SetAppIcon response + self.hmiConnection:SendResponse(data.id, data.method, "REJECTED", {info = ""}) + end) + + + --mobile side: expect SetAppIcon response + EXPECT_RESPONSE(cid, {success = false, resultCode = "REJECTED", info = ""}) + :Timeout(iTimeout) + + end + + + --End test case ResultCodeCheck.6 + ----------------------------------------------------------------------------------------- + + --Begin test case ResultCodeCheck.7 + --Description: Check resultCode: GENERIC_ERROR + + --Requirement id in JAMA/or Jira ID: SDLAQ-CRS-736 + + --Verification criteria: no UI response during SDL`s watchdog. SDL->app: SetAppIcon (resultCode: GENERIC_ERROR, success: false, "info": "UI component does not respond") + + function Test:SetAppIcon_resultCode_GENERIC_ERROR() + + --mobile side: sending SetAppIcon request + local cid = self.mobileSession:SendRPC("SetAppIcon", + { + syncFileName = "icon.png" + } + ) + + --hmi side: expect UI.SetAppIcon request + EXPECT_HMICALL("UI.SetAppIcon", + { + syncFileName = + { + imageType = "DYNAMIC", + value = storagePath .. "icon.png" + } + }) + :Timeout(iTimeout) + :Do(function(_,data) + --hmi side: sending UI.SetAppIcon response + self.hmiConnection:SendResponse(data.id, data.method, "GENERIC_ERROR", {info = "a"}) + end) + + + --mobile side: expect SetAppIcon response + EXPECT_RESPONSE(cid, {success = false, resultCode = "GENERIC_ERROR", info ="a"}) + + end + + --End test case ResultCodeCheck.7 + ----------------------------------------------------------------------------------------- + + --Begin test case ResultCodeCheck.8 + --Description: Check resultCode: UNSUPPORTED_REQUEST + + --Requirement id in JAMA/or Jira ID: SDLAQ-CRS-1043 + + --Verification criteria: Feature is not supported on a given platform => Skipped + + function Test:SetAppIcon_resultCode_UNSUPPORTED_REQUEST() + + --mobile side: sending SetAppIcon request + local cid = self.mobileSession:SendRPC("SetAppIcon", + { + syncFileName = "icon.png" + } + ) + + --hmi side: expect UI.SetAppIcon request + EXPECT_HMICALL("UI.SetAppIcon", + { + syncFileName = + { + imageType = "DYNAMIC", + value = storagePath .. "icon.png" + } + }) + :Timeout(iTimeout) + :Do(function(_,data) + --hmi side: sending UI.SetAppIcon response + self.hmiConnection:SendResponse(data.id, data.method, "UNSUPPORTED_REQUEST", {info = "a"}) + end) + + + --mobile side: expect SetAppIcon response + EXPECT_RESPONSE(cid, {success = false, resultCode = "UNSUPPORTED_REQUEST", info ="a"}) + + end + + --End test case ResultCodeCheck.8 + ----------------------------------------------------------------------------------------- + + + --Write TEST_BLOCK_IV_End to ATF log + function Test:TEST_BLOCK_IV_End() + print("********************************************************************************") + end + + --End Test suit ResultCodeCheck + + +---------------------------------------------------------------------------------------------- +-----------------------------------------V TEST BLOCK----------------------------------------- +---------------------------------------HMI negative cases------------------------------------- +---------------------------------------------------------------------------------------------- + + --------Checks----------- + -- requests without responses from HMI + -- invalid structure os response + -- several responses from HMI to one request + -- fake parameters + -- HMI correlation id check + -- wrong response with correct HMI id + + + -- SetAppIcon API does not have any response from HMI. This test suit is not applicable => Ignore + + --Write TEST_BLOCK_V_Begin to ATF log + function Test:TEST_BLOCK_V_Begin() + print("****************************** HMI negative cases ******************************") + end + + + --Begin test suit HMINegativeCheck + --Description: Check negative response from HMI + + + --Begin test case HMINegativeCheck.1 + --Description: Check SetMediaClockTimer requests without UI responses from HMI + + --Requirement id in JAMA/or Jira ID: SDLAQ-CRS-736 + + --Verification criteria: SDL responses GENERIC_ERROR + + function Test:SetAppIcon_Without_UI_Response_GENERIC_ERROR() + + --mobile side: sending SetAppIcon request + local cid = self.mobileSession:SendRPC("SetAppIcon", + { + syncFileName = "icon.png" + } + ) + + --hmi side: expect UI.SetAppIcon request + EXPECT_HMICALL("UI.SetAppIcon", + { + syncFileName = + { + imageType = "DYNAMIC", + value = storagePath .. "icon.png" + } + }) + :Timeout(iTimeout) + :Do(function(_,data) + --hmi side: sending UI.SetAppIcon response + --self.hmiConnection:SendResponse(data.id, data.method, "REJECTED", {info = ""}) + end) + + + --mobile side: expect SetAppIcon response + EXPECT_RESPONSE(cid, {success = false, resultCode = "GENERIC_ERROR"}) + :Timeout(12000) + + end + + --End test case HMINegativeCheck.1 + ----------------------------------------------------------------------------------------- + + + --Begin test case HMINegativeCheck.2 + --Description: Check responses from HMI (UI) with invalid structure + + --Requirement id in JAMA/or Jira ID: SDLAQ-CRS-731, SDLAQ-CRS-159 + + --Verification criteria: SDL responses INVALID_DATA + + function Test:SetAppIcon_UI_ResponseWithInvalidStructure_INVALID_DATA() + + --mobile side: sending SetAppIcon request + local cid = self.mobileSession:SendRPC("SetAppIcon", + { + syncFileName = "icon.png" + } + ) + + --hmi side: expect UI.SetAppIcon request + EXPECT_HMICALL("UI.SetAppIcon", + { + syncFileName = + { + imageType = "DYNAMIC", + value = storagePath .. "icon.png" + } + }) + :Timeout(iTimeout) + :Do(function(_,data) + --hmi side: sending UI.SetAppIcon response + --self.hmiConnection:SendResponse(data.id, data.method, "REJECTED", {info = ""}) + + --Move code outside of result parameter + --self.hmiConnection:Send('{"jsonrpc":"2.0","id":'..tostring(data.id)..',"result":{"code":0,"method":"UI.SetAppIcon"}}') + self.hmiConnection:Send('{"jsonrpc":"2.0","id":'..tostring(data.id)..',"code":0,"result":{"method":"UI.SetAppIcon"}}') + end) + + + --mobile side: expect SetAppIcon response + EXPECT_RESPONSE(cid, {success = false, resultCode = "INVALID_DATA"}) + :Timeout(12000) + + end + + --End test case HMINegativeCheck.2 + ----------------------------------------------------------------------------------------- + + + --Begin test case HMINegativeCheck.3 + --Description: Check several responses from HMI (UI) to one request + + --Requirement id in JAMA/or Jira ID: SDLAQ-CRS-159 + + --Verification criteria: SDL responses SUCCESS + + function Test:SetAppIcon_UI_SeveralResponseToOneRequest_SUCCESS() + + --mobile side: sending SetAppIcon request + local cid = self.mobileSession:SendRPC("SetAppIcon", + { + syncFileName = "icon.png" + } + ) + + --hmi side: expect UI.SetAppIcon request + EXPECT_HMICALL("UI.SetAppIcon", + { + syncFileName = + { + imageType = "DYNAMIC", + value = storagePath .. "icon.png" + } + }) + :Timeout(iTimeout) + :Do(function(_,data) + --hmi side: sending UI.SetAppIcon response + self.hmiConnection:SendResponse(data.id, data.method, "SUCCESS", {}) + self.hmiConnection:SendResponse(data.id, data.method, "INVALID_DATA", {}) + end) + + + --mobile side: expect SetAppIcon response + EXPECT_RESPONSE(cid, {success = true, resultCode = "SUCCESS"}) + :Timeout(12000) + + end + + --End test case HMINegativeCheck.3 + ----------------------------------------------------------------------------------------- + + + --Begin test case HMINegativeCheck.4 + --Description: check response with fake parameters + + --Begin test case HMINegativeCheck.4.1 + --Description: Check responses from HMI (UI) with fake parameter + + --Requirement id in JAMA/or Jira ID: SDLAQ-CRS-158 + + --Verification criteria: SDL does not send fake parameter to mobile. + + function Test:SetAppIcon_UI_ResponseWithFakeParamater_SUCCESS() + + --mobile side: sending SetAppIcon request + local cid = self.mobileSession:SendRPC("SetAppIcon", + { + syncFileName = "icon.png" + } + ) + + --hmi side: expect UI.SetAppIcon request + EXPECT_HMICALL("UI.SetAppIcon", + { + syncFileName = + { + imageType = "DYNAMIC", + value = storagePath .. "icon.png" + } + }) + :Timeout(iTimeout) + :Do(function(_,data) + --hmi side: sending UI.SetAppIcon response + self.hmiConnection:SendResponse(data.id, data.method, "SUCCESS", {fake = "fake"}) + end) + + + --mobile side: expect SetAppIcon response + EXPECT_RESPONSE(cid, {success = true, resultCode = "SUCCESS"}) + :ValidIf (function(_,data) + if data.payload.fake then + print(" SDL resend fake parameter to mobile app ") + return false + else + return true + end + end) + + end + + --End test case HMINegativeCheck.4.1 + ----------------------------------------------------------------------------------------- + + --Begin test case HMINegativeCheck.4.2 + --Description: Parameter from another API + + --Requirement id in JAMA/or Jira ID: SDLAQ-CRS-158 + + --Verification criteria: SDL does not send parameter from other API to mobile. + + function Test:SetAppIcon_UI_ParamsFromOtherAPIInResponse_SUCCESS() + + --mobile side: sending SetAppIcon request + local cid = self.mobileSession:SendRPC("SetAppIcon", + { + syncFileName = "icon.png" + } + ) + + --hmi side: expect UI.SetAppIcon request + EXPECT_HMICALL("UI.SetAppIcon", + { + syncFileName = + { + imageType = "DYNAMIC", + value = storagePath .. "icon.png" + } + }) + :Timeout(iTimeout) + :Do(function(_,data) + --hmi side: sending UI.SetAppIcon response + self.hmiConnection:SendResponse(data.id, data.method, "SUCCESS", {sliderPosition = 5}) + end) + + + --mobile side: expect SetAppIcon response + EXPECT_RESPONSE(cid, {success = true, resultCode = "SUCCESS"}) + :ValidIf (function(_,data) + if data.payload.sliderPosition then + print(" SDL resend parameter of other API to mobile app ") + return false + else + return true + end + end) + + end + + --End test case HMINegativeCheck.4.2 + ----------------------------------------------------------------------------------------- + + --End Test case HMINegativeCheck.4 + + + + --Begin test case HMINegativeCheck.5 + --Description: Check UI wrong response with wrong HMI correlation id + + --Requirement id in JAMA/or Jira ID: SDLAQ-CRS-159 + + --Verification criteria: SDL responses GENERIC_ERROR + + function Test:SetAppIcon_UI_ResponseWithWrongHMICorrelationId_GENERIC_ERROR() + + --mobile side: sending SetAppIcon request + local cid = self.mobileSession:SendRPC("SetAppIcon", + { + syncFileName = "icon.png" + } + ) + + --hmi side: expect UI.SetAppIcon request + EXPECT_HMICALL("UI.SetAppIcon", + { + syncFileName = + { + imageType = "DYNAMIC", + value = storagePath .. "icon.png" + } + }) + :Timeout(iTimeout) + :Do(function(_,data) + --hmi side: sending UI.SetAppIcon response + --self.hmiConnection:SendResponse(data.id, data.method, "SUCCESS", {} + self.hmiConnection:SendResponse(data.id + 1, data.method, "SUCCESS", {}) + end) + + + --mobile side: expect SetAppIcon response + EXPECT_RESPONSE(cid, {success = false, resultCode = "GENERIC_ERROR"}) + :Timeout(12000) + + end + + + --End test case HMINegativeCheck.5 + ---------------------------------------------------------------------------------------- + + + + --Begin test case HMINegativeCheck.6 + --Description: Check UI wrong response with correct HMI id + + --Requirement id in JAMA/or Jira ID: SDLAQ-CRS-159 + + --Verification criteria: SDL responses GENERIC_ERROR + + function Test:SetAppIcon_UI_WrongResponseWithCorrectHMICorrelationId_GENERIC_ERROR() + + --mobile side: sending SetAppIcon request + local cid = self.mobileSession:SendRPC("SetAppIcon", + { + syncFileName = "icon.png" + } + ) + + --hmi side: expect UI.SetAppIcon request + EXPECT_HMICALL("UI.SetAppIcon", + { + syncFileName = + { + imageType = "DYNAMIC", + value = storagePath .. "icon.png" + } + }) + :Timeout(iTimeout) + :Do(function(_,data) + --hmi side: sending UI.SetAppIcon response + --self.hmiConnection:SendResponse(data.id, data.method, "SUCCESS", {} + self.hmiConnection:SendResponse(data.id, "UI.Show", "SUCCESS", {}) + end) + + + --mobile side: expect SetAppIcon response + EXPECT_RESPONSE(cid, {success = false, resultCode = "GENERIC_ERROR"}) + :Timeout(12000) + + end + + --End test case HMINegativeCheck.6 + ---------------------------------------------------------------------------------------- + + + + --End Test suit HMINegativeCheck + + --Write TEST_BLOCK_V_End to ATF log + function Test:TEST_BLOCK_V_End() + print("********************************************************************************") + end + + +---------------------------------------------------------------------------------------------- +-----------------------------------------VI TEST BLOCK---------------------------------------- +-------------------------Sequence with emulating of user's action(s)-------------------------- +---------------------------------------------------------------------------------------------- + + --Begin test suit SequenceCheck + --Description: TC's checks SDL behavior by processing + -- different request sequence with timeout + -- with emulating of user's actions + + --Write TEST_BLOCK_VI-_Begin to ATF log + function Test:TEST_BLOCK_VI_Begin() + print("***************** Sequence with emulating of user's action(s) ******************") + end + + --Begin test case SequenceCheck.1 + --Description: check scenario in test case TC_SetAppIcon_01 + + --It is covered by CommonRequestCheck.1 + + --End test case SequenceCheck.1 + ----------------------------------------------------------------------------------------- + + + --Write TEST_BLOCK_VI_End to ATF log + function Test:TEST_BLOCK_VI_End() + print("********************************************************************************") + end + + --End Test suit SequenceCheck + + + + +---------------------------------------------------------------------------------------------- +-----------------------------------------VII TEST BLOCK--------------------------------------- +--------------------------------------Different HMIStatus------------------------------------- +---------------------------------------------------------------------------------------------- + --Description: processing of request/response in different HMIlevels, SystemContext, AudioStreamingState + + --Begin test suit DifferentHMIlevel + --Description: processing API in different HMILevel + + --Write TEST_BLOCK_VII_Begin to ATF log + function Test:TEST_BLOCK_VII_Begin() + print("***************************** Different HMIStatus ******************************") + end + + + --Begin test case DifferentHMIlevel.1 + --Description: Check SetAppIcon request when application is in NONE HMI level + + --Requirement id in JAMA/or Jira ID: SDLAQ-CRS-812 + + --Verification criteria: SetAppIcon is allowed in NONE HMI level + + -- Precondition: Change app to NONE HMI level + commonSteps:DeactivateAppToNoneHmiLevel() + + strTestCaseName = "SetAppIcon_NONE_SUCCESS" + TC_SetAppIcon_SUCCESS(self, "icon.png", strTestCaseName) + + --Postcondition: Activate app + commonSteps:ActivationApp() + + --End test case DifferentHMIlevel.1 + ----------------------------------------------------------------------------------------- + + --Begin test case DifferentHMIlevel.2 + --Description: Check SetAppIcon request when application is in LIMITED HMI level + + --Requirement id in JAMA/or Jira ID: SDLAQ-CRS-812 + + --Verification criteria: SetAppIcon is allowed in LIMITED HMI level + + if commonFunctions:isMediaApp() then + + -- Precondition: Change app to LIMITED + commonSteps:ChangeHMIToLimited() + + strTestCaseName = "SetAppIcon_LIMITED_SUCCESS" + TC_SetAppIcon_SUCCESS(self, "icon.png", strTestCaseName) + end + --End test case DifferentHMIlevel.2 + ----------------------------------------------------------------------------------------- + + + --Begin test case DifferentHMIlevel.3 + --Description: Check SetAppIcon request when application is in BACKGOUND HMI level + + --Requirement id in JAMA/or Jira ID: SDLAQ-CRS-812 + + --Verification criteria: SetAppIcon is allowed in BACKGOUND HMI level + + -- Precondition 1: Change app to BACKGOUND HMI level + commonTestCases:ChangeAppToBackgroundHmiLevel() + + strTestCaseName = "SetAppIcon_BACKGROUND_SUCCESS" + TC_SetAppIcon_SUCCESS(self, "icon.png", strTestCaseName) + + --End test case DifferentHMIlevel.3 + ----------------------------------------------------------------------------------------- + + --Write TEST_BLOCK_VII_End to ATF log + function Test:TEST_BLOCK_VII_End() + print("********************************************************************************") + end + + --End Test suit DifferentHMIlevel + + + +---------------------------------------------------------------------------------------------------------------- +------------------------------------VIII FROM NEW TEST CASES---------------------------------------------------- +--------32[ATF]_TC_SetAppIcon: Check that SDL allows PutFile and SetAppIcon requests with the name \.- +---------------------------------------------------------------------------------------------------------------- +--Requirement id in JAMA or JIRA: + --APPLINK-16760: -- Check that SDL allows PutFile and SetAppIcon requests with the name \. + --APPLINK-16761: -- Check that SDL allows PutFile and SetAppIcon requests with the name \\. + --APPLINK-16762: -- Check that SDL allows PutFile and SetAppIcon requests with the name .\\. + --APPLINK-16763: -- Check that SDL allows PutFile and SetAppIcon requests with the name ..\\. + --APPLINK-16766: -- Check that SDL allows PutFile and SetAppIcon requests with the name ... + --APPLINK-16767: -- Check that SDL allows PutFile and SetAppIcon requests with the name .... +----------------------------------------------------------------------------------------------- + + +local function SequenceNewTCs() + + +--------------------------------------------------------------------------------------------- +-------------------------------------------Common function----------------------------------- +--------------------------------------------------------------------------------------------- +--Description: Set all parameter for PutFile +function putFileAllParams() + local temp = { + syncFileName ="icon.png", + fileType ="GRAPHIC_PNG", + persistentFile =false, + systemFile = false, + offset =0, + length =11600 + } + return temp +end +--Description: Function used to check file is existed on expected path + --file_name: file want to check +function file_check(file_name) + local file_found=io.open(file_name, "r") + if file_found==nil then + return false + else + return true + end +end +--Description: Delete draft file +function DeleteDraftFile(imageFile) + os.remove(imageFile) +end +--Description: SetAppIcon successfully with default image file + --imageFile: syncFileName +function Test:setAppIconSuccess(imageFile) + --mobile side: sending SetAppIcon request + local cid = self.mobileSession:SendRPC("SetAppIcon",{ syncFileName = imageFile }) + + --hmi side: expect UI.SetAppIcon request + EXPECT_HMICALL("UI.SetAppIcon", + { + appID = self.applications[config.application1.registerAppInterfaceParams.appName], + syncFileName = + { + imageType = "DYNAMIC", + value = strAppFolder .. imageFile + } + }) + :Do(function(_,data) + --hmi side: sending UI.SetAppIcon response + self.hmiConnection:SendResponse(data.id, data.method, "SUCCESS", {}) + end) + + --mobile side: expect Putfile response + EXPECT_RESPONSE(cid, { success = true, resultCode = "SUCCESS", info = nil }) + :ValidIf (function(_,data) + if file_check(strAppFolder .. imageFile) == true then + return true + else + print(" \27[36m File is not copy to storage \27[0m ") + return false + end + end) +end +--Description: PutFile successfully with default image file and check copies this file to AppStorageFolder + --paramsSend: Parameters will be sent to SDL +function Test:putFileSuccess_ex(paramsSend) + + DeleteDraftFile(strAppFolder .. paramsSend.syncFileName) + + local cid = self.mobileSession:SendRPC("PutFile",paramsSend, "files/icon.png") + EXPECT_RESPONSE(cid, { success = true, resultCode = "SUCCESS" }) + :ValidIf (function(_,data) + if data.payload.spaceAvailable == nil then + commonFunctions:printError("spaceAvailable parameter is missed") + return false + else + if file_check(strAppFolder .. paramsSend.syncFileName) == true then + return true + else + print(" \27[36m File is not copy to storage \27[0m ") + return false + end + end + end) +end + +-- Test case sending request and checking results in case SUCCESS +local function TC_DeleteFile_SUCCESS(self, strTestCaseName, strFileName, strFileType) + + Test[strTestCaseName] = function(self) + + --mobile side: sending DeleteFile request + local cid = self.mobileSession:SendRPC("DeleteFile", + { + syncFileName = strFileName + }) + + --hmi side: expect BasicCommunication.OnFileRemoved request + EXPECT_HMINOTIFICATION("BasicCommunication.OnFileRemoved", + { + fileName = strAppFolder .. strFileName, + fileType = strFileType, + appID = self.applications[config.application1.registerAppInterfaceParams.appName] + }) + + --mobile side: expect DeleteFile response + EXPECT_RESPONSE(cid, { success = true, resultCode = "SUCCESS", info = nil }) + :ValidIf (function(_,data) + if data.payload.spaceAvailable == nil then + commonFunctions:printError("spaceAvailable parameter is missed") + return false + else + if file_check(strAppFolder .. strFileName) == true then + print(" \27[36m File is not deleted from storage \27[0m ") + return false + else + return true + end + end + end) + end +end + +--------------------------------------------------------------------------------------------- +---------------------------------------End Common function----------------------------------- +--------------------------------------------------------------------------------------------- + + --Print new line to separate new test cases group + commonFunctions:newTestCasesGroup("-----------------------VIII FROM NEW TEST CASES------------------------------") + + --Description: APPLINK-16760: TC_Path_vulnerabilty_PutFile_and_SetAppIcon_04 + --SDL must respond with INVALID_DATA resultCode in case the name of file that the app requests to upload (related: PutFile, SystemRequest) on the system contains "./" symbol (example: fileName: "./123.jpg") + --Check that SDL allows PutFile and SetAppIcon requests with the name \. + --TCID: APPLINK-16760 + --Requirement id in JAMA/or Jira ID: + -- APPLINK-11936 + -- SDLAQ-TC-1321 + + local function APPLINK_16760() + ------------------------------------------------------------------------------------------------------------- + + --Description: --SDL must respond with SUCCESS resultCode in case the name of file that the app requests to upload (related: PutFile, SystemRequest) on the system contains "\" symbol (example: fileName: "\icon.png") + function Test:APPLINK_16760_Step1_PutFile_syncFileNameBackSlashSymbol() + local paramsSend = putFileAllParams() + paramsSend.syncFileName = "\\icon.png" + + self:putFileSuccess_ex(paramsSend) + end + + ------------------------------------------------------------------------------------------------------------- + + --Description: SDL must respond with SUCCESS resultCode in case the name of file that the app requests to upload (related: SetAppIcon, SystemRequest) on the system contains "\" symbol (example: fileName: "\icon.png") + function Test:APPLINK_16760_Step2_SetAppIcon_syncFileNameBackSlashSymbol() + + self:setAppIconSuccess("\\icon.png") + end + + ------------------------------------------------------------------------------------------------------------- + + --Description: SDL responses with SUCCESS result code. There is no such file in AppStorageFolder. Icon is disappeared from HMI + TC_DeleteFile_SUCCESS(self, "APPLINK_16760_Step3_DeleteFile_syncFileNameBackSlashSymbol", "\\icon.png", "GRAPHIC_PNG") + + ------------------------------------------------------------------------------------------------------------- + + end + ----------------------------------------------------------------------------------------------------------------- + + --Description: APPLINK-16761: TC_Path_vulnerabilty_PutFile_and_SetAppIcon_05 + --Check that SDL allows PutFile and SetAppIcon requests with the name \\. + --TCID: APPLINK-16761 + --Requirement id in JAMA/or Jira ID: + -- APPLINK-11936 + -- SDLAQ-TC-1326 + + local function APPLINK_16761() + ------------------------------------------------------------------------------------------------------------- + + --Description: --SDL must respond with SUCCESS resultCode in case the name of file that the app requests to upload (related: PutFile, SystemRequest) on the system contains double "\" symbol (example: fileName: "\\icon.png") + function Test:APPLINK_16761_Step1_PutFile_syncFileNameDoubleBackSlashSymbol() + local paramsSend = putFileAllParams() + paramsSend.syncFileName = "\\\\icon.png" + + self:putFileSuccess_ex(paramsSend) + end + + ------------------------------------------------------------------------------------------------------------- + + --Description: SDL must respond with SUCCESS resultCode in case the name of file that the app requests to upload (related: SetAppIcon, SystemRequest) on the system contains double "\" symbol (example: fileName: "\\icon.png") + function Test:APPLINK_16761_Step2_SetAppIcon_syncFileNameDoubleBackSlashSymbol() + + self:setAppIconSuccess("\\\\icon.png") + end + + ------------------------------------------------------------------------------------------------------------- + + --Description: SDL responses with SUCCESS result code. There is no such file in AppStorageFolder. Icon is disappeared from HMI + TC_DeleteFile_SUCCESS(self, "APPLINK_16761_Step3_DeleteFile_syncFileNameDoubleBackSlashSymbol", "\\\\icon.png", "GRAPHIC_PNG") + + ------------------------------------------------------------------------------------------------------------- + + end + ----------------------------------------------------------------------------------------------------------------- + + --Description: APPLINK-16762: TC_Path_vulnerabilty_PutFile_and_SetAppIcon_06 + --Check that SDL allows PutFile and SetAppIcon requests with the name .\\. + --TCID: APPLINK-16762 + --Requirement id in JAMA/or Jira ID: + -- APPLINK-11936 + -- SDLAQ-TC-1327 + + local function APPLINK_16762() + ------------------------------------------------------------------------------------------------------------- + + --Description: --SDL must respond with SUCCESS resultCode in case the name of file that the app requests to upload (related: PutFile, SystemRequest) on the system contains dot and double ".\\" symbol (example: fileName: ".\\icon.png") + function Test:APPLINK_16762_Step1_PutFile_syncFileNameDotDoubleBackSlashSymbol() + local paramsSend = putFileAllParams() + paramsSend.syncFileName = ".\\\\icon.png" + + self:putFileSuccess_ex(paramsSend) + end + + ------------------------------------------------------------------------------------------------------------- + + --Description: SDL must respond with SUCCESS resultCode in case the name of file that the app requests to upload (related: SetAppIcon, SystemRequest) on the system contains double ".\\" symbol (example: fileName: ".\\icon.png") + function Test:APPLINK_16762_Step2_SetAppIcon_syncFileNameDotDoubleBackSlashSymbol() + + self:setAppIconSuccess(".\\\\icon.png") + end + + ------------------------------------------------------------------------------------------------------------- + + --Description: SDL responses with SUCCESS result code. There is no such file in AppStorageFolder. Icon is disappeared from HMI + TC_DeleteFile_SUCCESS(self, "APPLINK_16762_Step3_DeleteFile_syncFileNameDotDoubleBackSlashSymbol", ".\\\\icon.png", "GRAPHIC_PNG") + + ------------------------------------------------------------------------------------------------------------- + + end + ----------------------------------------------------------------------------------------------------------------- + + --Description: APPLINK-16763: TC_Path_vulnerabilty_PutFile_and_SetAppIcon_07 + --Check that SDL allows PutFile and SetAppIcon requests with the name ..\\. + --TCID: APPLINK-16763 + --Requirement id in JAMA/or Jira ID: + -- APPLINK-11936 + -- SDLAQ-TC-1328 + + local function APPLINK_16763() + ------------------------------------------------------------------------------------------------------------- + + --Description: --SDL must respond with SUCCESS resultCode in case the name of file that the app requests to upload (related: PutFile, SystemRequest) on the system contains double Dot "..\\" symbol (example: fileName: "..\\icon.png") + function Test:APPLINK_16763_Step1_PutFile_syncFileNameDoubleDotDoubleBackSlashSymbol() + local paramsSend = putFileAllParams() + paramsSend.syncFileName = "..\\\\icon.png" + + self:putFileSuccess_ex(paramsSend) + end + + ------------------------------------------------------------------------------------------------------------- + + --Description: SDL must respond with SUCCESS resultCode in case the name of file that the app requests to upload (related: SetAppIcon, SystemRequest) on the system contains double "..\\" symbol (example: fileName: "..\\icon.png") + --This step is added more. TC doesn't mention. + function Test:APPLINK_16763_Step2_SetAppIcon_syncFileNameDoubleDotDoubleBackSlashSymbol() + + self:setAppIconSuccess("..\\\\icon.png") + end + + ------------------------------------------------------------------------------------------------------------- + + --Description: SDL responses with SUCCESS result code. There is no such file in AppStorageFolder. Icon is disappeared from HMI + TC_DeleteFile_SUCCESS(self, "APPLINK_16763_Step3_DeleteFile_syncFileNameDoubleDotDoubleBackSlashSymbol", "..\\\\icon.png", "GRAPHIC_PNG") + + ------------------------------------------------------------------------------------------------------------- + + end + ----------------------------------------------------------------------------------------------------------------- + + --Description: APPLINK-16766: TC_Path_vulnerabilty_PutFile_and_SetAppIcon_08 + --Check that SDL allows PutFile and SetAppIcon requests with the name ... + --TCID: APPLINK-16766 + --Requirement id in JAMA/or Jira ID: + -- APPLINK-11936 + -- SDLAQ-TC-1329 + + local function APPLINK_16766() + ------------------------------------------------------------------------------------------------------------- + + --Description: --SDL must respond with SUCCESS resultCode in case the name of file that the app requests to upload (related: PutFile, SystemRequest) on the system contains double Dot ".." symbol (example: fileName: "..icon.png") + function Test:APPLINK_16766_Step1_PutFile_syncFileNameDoubleDotSymbol() + local paramsSend = putFileAllParams() + paramsSend.syncFileName = "..icon.png" + + self:putFileSuccess_ex(paramsSend) + end + + ------------------------------------------------------------------------------------------------------------- + + --Description: SDL must respond with SUCCESS resultCode in case the name of file that the app requests to upload (related: SetAppIcon, SystemRequest) on the system contains double ".." symbol (example: fileName: "..icon.png") + function Test:APPLINK_16766_Step2_SetAppIcon_syncFileNameDoubleDotSymbol() + + self:setAppIconSuccess("..icon.png") + end + + ------------------------------------------------------------------------------------------------------------- + + --Description: SDL responses with SUCCESS result code. There is no such file in AppStorageFolder. Icon is disappeared from HMI + TC_DeleteFile_SUCCESS(self, "APPLINK_16766_Step3_DeleteFile_syncFileNameDoubleDotSymbol", "..icon.png", "GRAPHIC_PNG") + + ------------------------------------------------------------------------------------------------------------- + + end + ----------------------------------------------------------------------------------------------------------------- + + --Description: APPLINK-16767: TC_Path_vulnerabilty_PutFile_and_SetAppIcon_09 + --Check that SDL allows PutFile and SetAppIcon requests with the name .... + --TCID: APPLINK-16767 + --Requirement id in JAMA/or Jira ID: + -- APPLINK-11936 + -- SDLAQ-TC-1330 + + local function APPLINK_16767() + ------------------------------------------------------------------------------------------------------------- + + --Description: --SDL must respond with SUCCESS resultCode in case the name of file that the app requests to upload (related: PutFile, SystemRequest) on the system contains double Dot "..." symbol (example: fileName: "...icon.png") + function Test:APPLINK_16767_Step1_PutFile_syncFileNameThreeDotSymbol() + local paramsSend = putFileAllParams() + paramsSend.syncFileName = "...icon.png" + + self:putFileSuccess_ex(paramsSend) + end + + ------------------------------------------------------------------------------------------------------------- + + --Description: SDL must respond with SUCCESS resultCode in case the name of file that the app requests to upload (related: SetAppIcon, SystemRequest) on the system contains double "..." symbol (example: fileName: "...icon.png") + function Test:APPLINK_16767_Step2_SetAppIcon_syncFileNameThreeDotSymbol() + + self:setAppIconSuccess("...icon.png") + end + + ------------------------------------------------------------------------------------------------------------- + + --Description: SDL responses with SUCCESS result code. There is no such file in AppStorageFolder. Icon is disappeared from HMI + TC_DeleteFile_SUCCESS(self, "APPLINK_16767_Step3_DeleteFile_syncFileNameThreeDotSymbol", "...icon.png", "GRAPHIC_PNG") + + ------------------------------------------------------------------------------------------------------------- + + end + ----------------------------------------------------------------------------------------------------------------- + + + --Main to execute test cases + APPLINK_16760() + APPLINK_16761() + APPLINK_16762() + APPLINK_16763() + APPLINK_16766() + APPLINK_16767() + ------------------------------------------------------------------------------------------------------------- +end + +SequenceNewTCs() + + +policyTable:Restore_preloaded_pt() + +return Test diff --git a/test_scripts/API/ATF_SetDisplayLayout.lua b/test_scripts/API/ATF_SetDisplayLayout.lua new file mode 100644 index 0000000000..96e67024de --- /dev/null +++ b/test_scripts/API/ATF_SetDisplayLayout.lua @@ -0,0 +1,11958 @@ +--Note: + + --APPLINK-13965: SetDisplayLayout: Does not validate params of 'string' type for newline (\n) and tab (\t) + --Failed test cases: + -- SetDispLay_displayLayout_invalid_characters_newline_INVALID_DATA + -- SetDispLay_displayLayout_invalid_characters_tab_INVALID_DATA + + --APPLINK-8959: Wrong processing of SetDisplayLayout response data + --Failed test cases: + -- SetDispLay_PositiveCase_SUCCESS + -- SetDispLay_Res_displayCap_textFields_name_IsInBound_.. + -- SetDispLay_Res_displayCap_textFields_maxsize_100_SUCCESS + -- SetDispLay_Res_displayCap_imageCapabilities_... + --Update function displayCap_ValueForMobile() + + + --APPLINK-14011: SDL does not forward displayCapabilities.textFields to Mobile when receiving SetDisplayLayout with displayCapabilities.textFields is {} + --Failed test cases: SetDispLay_Res_displayCap_textFields_minsize_SUCCESS + + --APPLINK-14032: SetDisplayLayout: SDL responses INVALID_DATA when templatesAvailable array is empty + --Failed Test Cases: SetDispLay_Res_displayCap_templatesAvailable_minsize_SUCCESS + + --SetDispLay_Res_info_outupperbound_SUCCESS + --SetDispLay_Res_info_invalid_character_.. + + + --APPLINK-13985: SetDisplayLayout response: SDL does not validate params of 'string' type for newline (\n) and tab (\t) + --Failed Test Cases: + --SetDispLay_Res_displayCap_templatesAvailable_invalid_character_ + +--------------------------------------------------------------------------------------------- + +Test = require('connecttest') +require('cardinalities') +local events = require('events') +local mobile_session = require('mobile_session') +local mobile = require('mobile_connection') +local tcp = require('tcp_connection') +local file_connection = require('file_connection') + +--------------------------------------------------------------------------------------------- +-----------------------------Required Shared Libraries--------------------------------------- +--------------------------------------------------------------------------------------------- +require('user_modules/AppTypes') +local commonFunctions = require('user_modules/shared_testcases/commonFunctions') +local commonSteps = require('user_modules/shared_testcases/commonSteps') +local commonPreconditions = require('user_modules/shared_testcases/commonPreconditions') +local commonTestCases = require('user_modules/shared_testcases/commonTestCases') +local policyTable = require('user_modules/shared_testcases/testCasesForPolicyTable') +local integerParameter = require('user_modules/shared_testcases/testCasesForIntegerParameter') +local stringParameter = require('user_modules/shared_testcases/testCasesForStringParameter') +local arraySoftButtonsParameter = require('user_modules/shared_testcases/testCasesForArraySoftButtonsParameter') + +--------------------------------------------------------------------------------------------- +------------------------------------ Common Variables --------------------------------------- +--------------------------------------------------------------------------------------------- +APIName = "SetD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VWXYZabcdefghijklmnopqrstuvwxyza b c aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa" + + +local appId2 + + +function DelayedExp() + local event = events.Event() + event.matches = function(self, e) return self == e end + EXPECT_EVENT(event, "Delayed event") + RUN_AFTER(function() + RAISE_EVENT(event, event) + end, 2000) +end + +local function SendOnSystemContext(self, ctx) + self.hmiConnection:SendNotification("UI.OnSystemContext",{ appID = self.applications["Test Application"], systemContext = ctx }) +end + + +function ActivateApplication(self, strAppName) + --HMI send ActivateApp request + + local RequestId = self.hmiConnection:SendRequest("SDL.ActivateApp", { appID = self.applications[strAppName]}) + EXPECT_HMIRESPONSE(RequestId) + :Do(function(_,data) + if data.result.isSDLAllowed ~= true then + local RequestId = self.hmiConnection:SendRequest("SDL.GetUserFriendlyMessage", {language = "EN-US", messageCodes = {"DataConsent"}}) + --TODO: Update after resolving APPLINK-16094 EXPECT_HMIRESPONSE(RequestId,{result = {code = 0, method = "SDL.GetUserFriendlyMessage"}}) + EXPECT_HMIRESPONSE(RequestId) + :Do(function(_,data) + --hmi side: send request SDL.OnAllowSDLFunctionality + self.hmiConnection:SendNotification("SDL.OnAllowSDLFunctionality", {allowed = true, source = "GUI", device = {id = config.deviceMAC, name = "127.0.0.1"}}) + EXPECT_HMICALL("BasicCommunication.ActivateApp") + :Do(function(_,data) + self.hmiConnection:SendResponse(data.id,"BasicCommunication.ActivateApp", "SUCCESS", {}) + end) + :Times(2) + end) + + end + end) + + EXPECT_NOTIFICATION("OnHMIStatus", {hmiLevel = "FULL", systemContext = "MAIN"}) + :Timeout(12000) + +end + +function RegisterAppInterface(self, appNumber) + --mobile side: sending request + local CorIdRegister, strAppName + + if appNumber ==1 then + CorIdRegister = self.mobileSession:SendRPC("RegisterAppInterface", config.application1.registerAppInterfaceParams) + strAppName = config.application1.registerAppInterfaceParams.appName + elseif appNumber ==2 then + CorIdRegister = self.mobileSession:SendRPC("RegisterAppInterface", config.application2_nonmedia.registerAppInterfaceParams) + strAppName = config.application2_nonmedia.registerAppInterfaceParams.appName + end + --hmi side: expect BasicCommunication.OnAppRegistered request + EXPECT_HMINOTIFICATION("BasicCommunication.OnAppRegistered", + { + application = + { + appName = strAppName + } + }) + :Do(function(_,data) + local appId = data.params.application.appID + self.appId = appId + --appId0 = appId + self.appName = data.params.application.appName + self.applications[strAppName] = appId + end) + + --mobile side: expect response + self.mobileSession:ExpectResponse(CorIdRegister, + { + syncMsgVersion = + { + majorVersion = 3, + minorVersion = 0 + } + }) + :Timeout(12000) + + --mobile side: expect notification + self.mobileSession:ExpectNotification("OnHMIStatus", + { + systemContext = "MAIN", hmiLevel = "NONE", audioStreamingState = "NOT_AUDIBLE" + }) + :Timeout(12000) + + + --Suspended due to APPLINK-12241 + --hmi side: expect OnButtonSubscription request + --EXPECT_HMICALL("OnButtonSubscription", {name = "CUSTOM_BUTTON", isSubscribed=true}) + --:Timeout(12000) + + DelayedExp() + end + + +--------------------------------------------------------------------------------------------- +--Create value for buttonCapabilities parameter +function butCap_Value() + + local buttonCapabilities = + { + { + name = "PRESET_0", + shortPressAvailable = true, + longPressAvailable = true, + upDownAvailable = true + }, + { + name = "PRESET_1", + shortPressAvailable = true, + longPressAvailable = true, + upDownAvailable = true + }, + { + name = "PRESET_2", + shortPressAvailable = true, + longPressAvailable = true, + upDownAvailable = true + }, + { + name = "PRESET_3", + shortPressAvailable = true, + longPressAvailable = true, + upDownAvailable = true + }, + { + name = "PRESET_4", + shortPressAvailable = true, + longPressAvailable = true, + upDownAvailable = true + }, + { + name = "PRESET_5", + shortPressAvailable = true, + longPressAvailable = true, + upDownAvailable = true + }, + { + name = "PRESET_6", + shortPressAvailable = true, + longPressAvailable = true, + upDownAvailable = true + }, + { + name = "PRESET_7", + shortPressAvailable = true, + longPressAvailable = true, + upDownAvailable = true + }, + { + name = "PRESET_8", + shortPressAvailable = true, + longPressAvailable = true, + upDownAvailable = true + }, + { + name = "PRESET_9", + shortPressAvailable = true, + longPressAvailable = true, + upDownAvailable = true + }, + + { + name = "OK", + shortPressAvailable = true, + longPressAvailable = true, + upDownAvailable = true + }, + { + name = "SEEKLEFT", + shortPressAvailable = true, + longPressAvailable = true, + upDownAvailable = true + }, + { + name = "SEEKRIGHT", + shortPressAvailable = true, + longPressAvailable = true, + upDownAvailable = true + }, + { + name = "TUNEUP", + shortPressAvailable = true, + longPressAvailable = true, + upDownAvailable = true + }, + { + name = "TUNEDOWN", + shortPressAvailable = true, + longPressAvailable = true, + upDownAvailable = true + } + } + + return buttonCapabilities + +end + +--Create value for softButtonCapabilities parameter +function softButCap_Value() + + local softButtonCapabilities = + { + { + shortPressAvailable = true, + longPressAvailable = true, + upDownAvailable = true, + imageSupported = true + } + } + + return softButtonCapabilities + +end + +--Create value for presetBankCapabilities parameter +function presetBankCap_Value() + + local presetBankCapabilities = + { + onScreenPresetsAvailable = true + } + + return presetBankCapabilities + +end + +--Create value for imageFields parameter in displayCapabilities parameter +function displayCap_imageFields_Value() + + local imageFields = + { + { + imageResolution = + { + resolutionHeight = 64, + resolutionWidth = 64 + }, + imageTypeSupported = + { + "GRAPHIC_BMP", + "GRAPHIC_JPEG", + "GRAPHIC_PNG" + }, + name = "softButtonImage" + }, + { + imageResolution = + { + resolutionHeight = 64, + resolutionWidth = 64 + }, + imageTypeSupported = + { + "GRAPHIC_BMP", + "GRAPHIC_JPEG", + "GRAPHIC_PNG" + }, + name = "choiceImage" + }, + { + imageResolution = + { + resolutionHeight = 64, + resolutionWidth = 64 + }, + imageTypeSupported = + { + "GRAPHIC_BMP", + "GRAPHIC_JPEG", + "GRAPHIC_PNG" + }, + name = "choiceSecondaryImage" + }, + { + imageResolution = + { + resolutionHeight = 64, + resolutionWidth = 64 + }, + imageTypeSupported = + { + "GRAPHIC_BMP", + "GRAPHIC_JPEG", + "GRAPHIC_PNG" + }, + name = "vrHelpItem" + }, + { + imageResolution = + { + resolutionHeight = 64, + resolutionWidth = 64 + }, + imageTypeSupported = + { + "GRAPHIC_BMP", + "GRAPHIC_JPEG", + "GRAPHIC_PNG" + }, + name = "turnIcon" + }, + { + imageResolution = + { + resolutionHeight = 64, + resolutionWidth = 64 + }, + imageTypeSupported = + { + "GRAPHIC_BMP", + "GRAPHIC_JPEG", + "GRAPHIC_PNG" + }, + name = "menuIcon" + }, + { + imageResolution = + { + resolutionHeight = 64, + resolutionWidth = 64 + }, + imageTypeSupported = + { + "GRAPHIC_BMP", + "GRAPHIC_JPEG", + "GRAPHIC_PNG" + }, + name = "cmdIcon" + }, + { + imageResolution = + { + resolutionHeight = 64, + resolutionWidth = 64 + }, + imageTypeSupported = + { + "GRAPHIC_BMP", + "GRAPHIC_JPEG", + "GRAPHIC_PNG" + }, + name = "graphic" + }, + { + imageResolution = + { + resolutionHeight = 64, + resolutionWidth = 64 + }, + imageTypeSupported = + { + "GRAPHIC_BMP", + "GRAPHIC_JPEG", + "GRAPHIC_PNG" + }, + name = "showConstantTBTIcon" + }, + { + imageResolution = + { + resolutionHeight = 64, + resolutionWidth = 64 + }, + imageTypeSupported = + { + "GRAPHIC_BMP", + "GRAPHIC_JPEG", + "GRAPHIC_PNG" + }, + name = "showConstantTBTNextTurnIcon" + }, + { + imageResolution = + { + resolutionHeight = 64, + resolutionWidth = 64 + }, + imageTypeSupported = + { + "GRAPHIC_BMP", + "GRAPHIC_JPEG", + "GRAPHIC_PNG" + }, + name = "showConstantTBTNextTurnIcon" + } + } + return imageFields + +end + +--------------------------------------------------------------------------------------------- + +function displayCap_textFields_Value() + + local textFields = + { + { + characterSet = "TYPE2SET", + name = "mainField1", + rows = 1, + width = 500 + }, + { + characterSet = "TYPE2SET", + name = "mainField2", + rows = 1, + width = 500 + }, + { + characterSet = "TYPE2SET", + name = "mainField3", + rows = 1, + width = 500 + }, + { + characterSet = "TYPE2SET", + name = "mainField4", + rows = 1, + width = 500 + }, + { + characterSet = "TYPE2SET", + name = "statusBar", + rows = 1, + width = 500 + }, + { + characterSet = "TYPE2SET", + name = "mediaClock", + rows = 1, + width = 500 + }, + { + characterSet = "TYPE2SET", + name = "mediaTrack", + rows = 1, + width = 500 + }, + { + characterSet = "TYPE2SET", + name = "alertText1", + rows = 1, + width = 500 + }, + { + characterSet = "TYPE2SET", + name = "alertText2", + rows = 1, + width = 500 + }, + { + characterSet = "TYPE2SET", + name = "alertText3", + rows = 1, + width = 500 + }, + { + characterSet = "TYPE2SET", + name = "scrollableMessageBody", + rows = 1, + width = 500 + }, + { + characterSet = "TYPE2SET", + name = "initialInteractionText", + rows = 1, + width = 500 + }, + { + characterSet = "TYPE2SET", + name = "navigationText1", + rows = 1, + width = 500 + }, + { + characterSet = "TYPE2SET", + name = "navigationText2", + rows = 1, + width = 500 + }, + { + characterSet = "TYPE2SET", + name = "ETA", + rows = 1, + width = 500 + }, + { + characterSet = "TYPE2SET", + name = "totalDistance", + rows = 1, + width = 500 + }, + { + characterSet = "TYPE2SET", + name = "navigationText", --Error + rows = 1, + width = 500 + }, + { + characterSet = "TYPE2SET", + name = "audioPassThruDisplayText1", + rows = 1, + width = 500 + }, + { + characterSet = "TYPE2SET", + name = "audioPassThruDisplayText2", + rows = 1, + width = 500 + }, + { + characterSet = "TYPE2SET", + name = "sliderHeader", + rows = 1, + width = 500 + }, + { + characterSet = "TYPE2SET", + name = "sliderFooter", + rows = 1, + width = 500 + }, + { + characterSet = "TYPE2SET", + name = "notificationText", + rows = 1, + width = 500 + }, + { + characterSet = "TYPE2SET", + name = "menuName", + rows = 1, + width = 500 + }, + { + characterSet = "TYPE2SET", + name = "secondaryText", + rows = 1, + width = 500 + }, + { + characterSet = "TYPE2SET", + name = "tertiaryText", + rows = 1, + width = 500 + }, + { + characterSet = "TYPE2SET", + name = "timeToDestination", + rows = 1, + width = 500 + }, + { + characterSet = "TYPE2SET", + name = "turnText", + rows = 1, + width = 500 + }, + { + characterSet = "TYPE2SET", + name = "menuTitle", + rows = 1, + width = 500 + }, + { + characterSet = "TYPE2SET", + name = "locationName", + rows = 1, + width = 500 + }, + { + characterSet = "TYPE2SET", + name = "locationDescription", + rows = 1, + width = 500 + }, + { + characterSet = "TYPE2SET", + name = "addressLines", + rows = 1, + width = 500 + }, + { + characterSet = "TYPE2SET", + name = "phoneNumber", + rows = 1, + width = 500 + } + } + + return textFields + +end + +function displayCap_Value() + + local displayCapabilities = + { + displayType = "GEN2_8_DMA", + graphicSupported = true, + imageCapabilities = + { + "DYNAMIC", + "STATIC" + }, + imageFields = displayCap_imageFields_Value(), + + mediaClockFormats = + { + "CLOCK1", + "CLOCK2", + "CLOCK3", + "CLOCKTEXT1", + "CLOCKTEXT2", + "CLOCKTEXT3", + "CLOCKTEXT4" + }, + numCustomPresetsAvailable = 10, + screenParams = + { + resolution = + { + resolutionHeight = 480, + resolutionWidth = 800 + }, + touchEventAvailable = + { + doublePressAvailable = false, + multiTouchAvailable = true, + pressAvailable = true + } + }, + templatesAvailable = + { + "ONSCREEN_PRESETS" + }, + + textFields = displayCap_textFields_Value() + } + + + return displayCapabilities + +end + +function createDefaultResponseParamsValues(strInfo) + + local param = + { + displayCapabilities = displayCap_Value(), + buttonCapabilities = butCap_Value(), + softButtonCapabilities = softButCap_Value(), + presetBankCapabilities = presetBankCap_Value(), + info = strInfo + } + + return param + +end + +--------------------------------------------------------------------------------------------- +--Because the order of items in textFields array of response on HMI and on Mobile are not matched, this function is used to create textFields array of response on Mobile. +function displayCap_textFields_ValueForMobile() + + local textFields = + { + { + characterSet = "TYPE2SET", + name = "mainField1", + rows = 1, + width = 500 + }, + { + characterSet = "TYPE2SET", + name = "mainField2", + rows = 1, + width = 500 + }, + { + characterSet = "TYPE2SET", + name = "mainField3", + rows = 1, + width = 500 + }, + { + characterSet = "TYPE2SET", + name = "mainField4", + rows = 1, + width = 500 + }, + { + characterSet = "TYPE2SET", + name = "statusBar", + rows = 1, + width = 500 + }, + { + characterSet = "TYPE2SET", + name = "mediaClock", + rows = 1, + width = 500 + }, + { + characterSet = "TYPE2SET", + name = "mediaTrack", + rows = 1, + width = 500 + }, + { + characterSet = "TYPE2SET", + name = "alertText1", + rows = 1, + width = 500 + }, + { + characterSet = "TYPE2SET", + name = "alertText2", + rows = 1, + width = 500 + }, + { + characterSet = "TYPE2SET", + name = "alertText3", + rows = 1, + width = 500 + }, + { + characterSet = "TYPE2SET", + name = "scrollableMessageBody", + rows = 1, + width = 500 + }, + { + characterSet = "TYPE2SET", + name = "initialInteractionText", + rows = 1, + width = 500 + }, + { + characterSet = "TYPE2SET", + name = "navigationText1", + rows = 1, + width = 500 + }, + { + characterSet = "TYPE2SET", + name = "navigationText2", + rows = 1, + width = 500 + }, + { + characterSet = "TYPE2SET", + name = "ETA", + rows = 1, + width = 500 + }, + { + characterSet = "TYPE2SET", + name = "totalDistance", + rows = 1, + width = 500 + }, + { + characterSet = "TYPE2SET", + name = "timeToDestination", + rows = 1, + width = 500 + }, + + { + characterSet = "TYPE2SET", + name = "audioPassThruDisplayText1", + rows = 1, + width = 500 + }, + { + characterSet = "TYPE2SET", + name = "audioPassThruDisplayText2", + rows = 1, + width = 500 + }, + { + characterSet = "TYPE2SET", + name = "sliderHeader", + rows = 1, + width = 500 + }, + { + characterSet = "TYPE2SET", + name = "sliderFooter", + rows = 1, + width = 500 + }, + { + characterSet = "TYPE2SET", + name = "navigationText", + rows = 1, + width = 500 + }, + { + characterSet = "TYPE2SET", + name = "menuName", + rows = 1, + width = 500 + }, + { + characterSet = "TYPE2SET", + name = "secondaryText", + rows = 1, + width = 500 + }, + { + characterSet = "TYPE2SET", + name = "tertiaryText", + rows = 1, + width = 500 + }, + { + characterSet = "TYPE2SET", + name = "phoneNumber", + rows = 1, + width = 500 + }, + { + characterSet = "TYPE2SET", + name = "turnText", + rows = 1, + width = 500 + }, + { + characterSet = "TYPE2SET", + name = "menuTitle", + rows = 1, + width = 500 + }, + { + characterSet = "TYPE2SET", + name = "notificationText", + rows = 1, + width = 500 + }, + { + characterSet = "TYPE2SET", + name = "locationName", + rows = 1, + width = 500 + }, + { + characterSet = "TYPE2SET", + name = "locationDescription", + rows = 1, + width = 500 + }, + { + characterSet = "TYPE2SET", + name = "addressLines", + rows = 1, + width = 500 + } + } + + return textFields +end + +--Because the order of items in textFields is changed, this function is used to create value for displayCapabilities parameter of response on Mobile +--Check this function when APPLINK-8959 is fixed +function displayCap_ValueForMobile() + + local displayCapabilities = + { + displayType = "GEN2_8_DMA", + graphicSupported = true, + + --[[ ToDo: uncomment when APPLINK-8959 is fixed + imageCapabilities = + { + "DYNAMIC", + "STATIC" + }, + ]]-- + + --[[ TODO: update after resolving APPLINK-16052 + imageFields = displayCap_imageFields_Value(),]] + + mediaClockFormats = + { + "CLOCK1", + "CLOCK2", + "CLOCK3", + "CLOCKTEXT1", + "CLOCKTEXT2", + "CLOCKTEXT3", + "CLOCKTEXT4" + }, + numCustomPresetsAvailable = 10, + --[[ ToDo: uncomment when APPLINK-8959 is fixed + screenParams = + { + resolution = + { + resolutionHeight = 480, + resolutionWidth = 800 + }, + touchEventAvailable = + { + doublePressAvailable = false, + multiTouchAvailable = true, + pressAvailable = true + } + },]] + -- [[ ToDo: uncomment when APPLINK-16047 is fixed + templatesAvailable = + { + "ONSCREEN_PRESETS" + }, + -- [[ ToDo: uncomment when APPLINK-8959 is fixed + textFields = displayCap_textFields_ValueForMobile() + } + + + return displayCapabilities + +end + +function createExpectedResultParamsValuesOnMobile(blnSuccess, strResultCode, strInfo) + + local param = + { + displayCapabilities = displayCap_ValueForMobile(), + + buttonCapabilities = butCap_Value(), + softButtonCapabilities = softButCap_Value(), + presetBankCapabilities = presetBankCap_Value(), + + info = strInfo, + success = blnSuccess, + resultCode = strResultCode + } + + -- TODO: remove after resolving APPLINK-16052 + param.displayCapabilities.imageCapabilities = nil + param.displayCapabilities.imageFields = nil + param.displayCapabilities.screenParams = nil + param.displayCapabilities.templatesAvailable = nil + param.displayCapabilities.textFields = nil + +-- imageCapabilities +-- imageFields +-- screenParams +-- templatesAvailable +-- textFields + + return param + +end + +--------------------------------------------------------------------------------------------- +-------------------------------------------Preconditions------------------------------------- +--------------------------------------------------------------------------------------------- + + + --Print new line to separate Preconditions + commonFunctions:newTestCasesGroup("Preconditions") + + --Delete app_info.dat, logs and policy table + commonSteps:DeleteLogsFileAndPolicyTable() + + --Activation App + function Test:Activate_Media_Application() + --HMI send ActivateApp request + ActivateApplication(self, config.application1.registerAppInterfaceParams.appName) + end + + --Update policy to allow request + policyTable:precondition_updatePolicy_AllowFunctionInHmiLeves({"BACKGROUND", "FULL", "LIMITED", "NONE"}) + + +--------------------------------------------------------------------------------------------- +-----------------------------------------I TEST BLOCK---------------------------------------- +--CommonRequestCheck: Check of mandatory/conditional request's parameters (mobile protocol)-- +--------------------------------------------------------------------------------------------- + --Check: + -- request with all parameters + -- request with only mandatory parameters + -- request with all combinations of conditional-mandatory parameters (if exist) + -- request with one by one conditional parameters (each case - one conditional parameter) + -- request with missing mandatory parameters one by one (each case - missing one mandatory parameter) + -- request with all parameters are missing + -- request with fake parameters (fake - not from protocol, from another request) + -- request is sent with invalid JSON structure + -- different conditions of correlationID parameter (invalid, several the same etc.) + + + --Write NewTestBlock to ATF log + function Test:NewTestBlock() + print("****** I TEST BLOCK: Check of mandatory/conditional request's parameters *******") + end + + --Begin Test suit CommonRequestCheck + --Description: + -- request with all parameters + -- request with only mandatory parameters + -- request with all combinations of conditional-mandatory parameters (if exist) + -- request with one by one conditional parameters (each case - one conditional parameter) + -- request with missing mandatory parameters one by one (each case - missing one mandatory parameter) + -- request with all parameters are missing + -- request with fake parameters (fake - not from protocol, from another request) + -- request is sent with invalid JSON structure + -- different conditions of correlationID parameter (invalid, several the same etc.) + + + + --Begin Test suit CommonRequestCheck.1 + --Description: check request with all parameters + + --Requirement id in JAMA/or Jira ID: SDLAQ-CRS-1044 + + --Verification criteria: SetDisplayLayout is used to set an alternate display layout for displaying on-screen presets. The request is sent from mobile application to SDL and then transferred from SDL to HMI. HMI returns any result code that SDL transfers to mobile application. + + function Test:SetDispLay_PositiveCase_SUCCESS() + + --mobile side: sending SetDisplayLayout request + local cid = self.mobileSession:SendRPC("SetDisplayLayout", + { + displayLayout = "ONSCREEN_PRESETS" + }) + + + --hmi side: expect UI.SetDisplayLayout request + EXPECT_HMICALL("UI.SetDisplayLayout", + { + displayLayout = "ONSCREEN_PRESETS" + }) + :Timeout(iTimeout) + :Do(function(_,data) + --hmi side: sending UI.SetDisplayLayout response + local responsedParams = createDefaultResponseParamsValues() + self.hmiConnection:SendResponse(data.id, data.method, "SUCCESS", responsedParams) + end) + + + --mobile side: expect SetDisplayLayout response + local expectedParams = createExpectedResultParamsValuesOnMobile(true, "SUCCESS") + EXPECT_RESPONSE(cid, expectedParams) + :Timeout(iTimeout) + end + + --End Test suit CommonRequestCheck.1 + + ----------------------------------------------------------------------------------------- + + --Begin Test suit CommonRequestCheck.2 + --Description: check request with only mandatory parameters + + --> The same as CommonRequestCheck.1 + + --End Test suit CommonRequestCheck.2 + + ----------------------------------------------------------------------------------------- + + --Skipped CommonRequestCheck.3-4: There next checks are not applicable: + -- request with all combinations of conditional-mandatory parameters (if exist) + -- request with one by one conditional parameters (each case - one conditional parameter) + + ----------------------------------------------------------------------------------------- + + --Begin Test suit CommonRequestCheck.5 + --Description: check request with missing mandatory parameters one by one (each case - missing one mandatory parameter) + + --Requirement id in JAMA/or Jira ID: SDLAQ-CRS-2680 + + --Verification criteria: The request without "displayLayout" parameter is sent, the response with INVALID_DATA result code is returned. + + function Test:SetDispLay_missing_mandatory_parameters_displayLayout_INVALID_DATA() + + --mobile side: sending SetDisplayLayout request + local cid = self.mobileSession:SendRPC("SetDisplayLayout", + { + + }) + + --hmi side: does not receive UI.SetDisplayLayout request + EXPECT_HMICALL("UI.SetDisplayLayout", {}) + :Timeout(iTimeout) + :Times(0) + + --mobile side: expect SetDisplayLayout response + EXPECT_RESPONSE(cid, { success = false, resultCode = "INVALID_DATA", info = nil}) + :Timeout(iTimeout) + + end + + --End Test suit CommonRequestCheck.5 + + ----------------------------------------------------------------------------------------- + + --Begin Test suit CommonRequestCheck.6 + --Description: check request with all parameters are missing + + --> The same as CommonRequestCheck.5 + + --End Test suit CommonRequestCheck.6 + + ----------------------------------------------------------------------------------------- + + --Begin Test suit CommonRequestCheck.7 + --Description: check request with fake parameters (fake - not from protocol, from another request) + + --Requirement id in JAMA/or Jira ID: APPLINK-4518 + + --Verification criteria: According to xml tests by Ford team all fake parameters should be ignored by SDL + + + --Begin Test case CommonRequestCheck.7.1 + --Description: Check request with fake parameters + + function Test:SetDispLay_FakeParameters_SUCCESS() + + --mobile side: sending SetDisplayLayout request + local cid = self.mobileSession:SendRPC("SetDisplayLayout", + { + displayLayout = "ONSCREEN_PRESETS", + fakeParameter = "abc" + + }) + + local responsedParams = createDefaultResponseParamsValues() + local expectedParams = createExpectedResultParamsValuesOnMobile(true, "SUCCESS") + + --hmi side: expect UI.SetDisplayLayout request + EXPECT_HMICALL("UI.SetDisplayLayout", + { + displayLayout = "ONSCREEN_PRESETS" + }) + :Timeout(iTimeout) + :Do(function(_,data) + --hmi side: sending UI.SetDisplayLayout response + self.hmiConnection:SendResponse(data.id, data.method, "SUCCESS", responsedParams) + end) + :ValidIf(function(_,data) + if data.params.fakeParameter then + print("SDL resends fake parameter to HMI") + return false + else + return true + end + end) + + + --mobile side: expect SetDisplayLayout response + EXPECT_RESPONSE(cid, expectedParams) + :Timeout(iTimeout) + + end + + --End Test case CommonRequestCheck.7.1 + + ----------------------------------------------------------------------------------------- + + --Begin Test case CommonRequestCheck.7.2 + --Description: Check request with parameters of other request + + function Test:SetDispLay_ParametersOfOtherRequest_SUCCESS() + + --mobile side: sending SetDisplayLayout request + local cid = self.mobileSession:SendRPC("SetDisplayLayout", + { + displayLayout = "ONSCREEN_PRESETS", + syncFileName = "icon.png", --PutFile request + + }) + + local responsedParams = createDefaultResponseParamsValues() + local expectedParams = createExpectedResultParamsValuesOnMobile(true, "SUCCESS") + + --hmi side: expect UI.SetDisplayLayout request + EXPECT_HMICALL("UI.SetDisplayLayout", + { + displayLayout = "ONSCREEN_PRESETS" + }) + :Timeout(iTimeout) + :Do(function(_,data) + --hmi side: sending UI.SetDisplayLayout response + self.hmiConnection:SendResponse(data.id, data.method, "SUCCESS", responsedParams) + end) + :ValidIf(function(_,data) + if data.params.syncFileName then + print("SDL resends parameter of other request to HMI") + return false + else + return true + end + end) + + + --mobile side: expect SetDisplayLayout response + EXPECT_RESPONSE(cid, expectedParams) + :Timeout(iTimeout) + + end + + --End Test case CommonRequestCheck.7.2 + + --End Test suit CommonRequestCheck.7 + + ----------------------------------------------------------------------------------------- + + --Begin Test suit CommonRequestCheck.8 + --Description: Check request is sent with invalid JSON structure + + --Requirement id in JAMA/or Jira ID: SDLAQ-CRS-2680 + + --Verification criteria: The request with wrong JSON syntax is sent, the response comes with INVALID_DATA result code. + + function Test:SetDispLay_InvalidJSON_INVALID_DATA() + + self.mobileSession.correlationId = self.mobileSession.correlationId + 1 + + local msg = + { + serviceType = 7, + frameInfo = 0, + rpcType = 0, + rpcFunctionId = 36, --SetDisplayLayoutID + rpcCorrelationId = self.mobileSession.correlationId, + -- missing ':' after ONSCREEN_PRESETS + --payload = '{"displayLayout":"ONSCREEN_PRESETS"}' + payload = '{"displayLayout" "ONSCREEN_PRESETS"}' + } + self.mobileSession:Send(msg) + + --hmi side: does not receive UI.SetDisplayLayout request + EXPECT_HMICALL("UI.SetDisplayLayout", {}) + :Timeout(iTimeout) + :Times(0) + + --mobile side: expect SetDisplayLayout response + EXPECT_RESPONSE(self.mobileSession.correlationId, { success = false, resultCode = "INVALID_DATA", info = nil}) + :Timeout(iTimeout) + + + end + + --End Test suit CommonRequestCheck.8 + + ----------------------------------------------------------------------------------------- + + --Begin test case CommonRequestCheck.9 + --Description: CorrelationId is duplicated +--TODO: Update requirement ID + --Requirement id in JAMA/or Jira ID: + + --Verification criteria: response comes with SUCCESS result code. + + function Test:SetDispLay_CorrelationID_Duplicated_SUCCESS() + + --mobile side: sending SetDisplayLayout request + local cid = self.mobileSession:SendRPC("SetDisplayLayout", + { + displayLayout = "ONSCREEN_PRESETS" + }) + + + --hmi side: expect UI.SetDisplayLayout request + EXPECT_HMICALL("UI.SetDisplayLayout", + { + displayLayout = "ONSCREEN_PRESETS" + }) + :Times(2) + :Do(function(_,data) + --hmi side: sending UI.SetDisplayLayout response + local responsedParams = createDefaultResponseParamsValues() + self.hmiConnection:SendResponse(data.id, data.method, "SUCCESS", responsedParams) + end) + + + --mobile side: expect SetDisplayLayout response + local expectedParams = createExpectedResultParamsValuesOnMobile(true, "SUCCESS") + EXPECT_RESPONSE(cid, expectedParams) + :Timeout(iTimeout) + :Times(2) + :Do(function(exp,data) + if exp.occurences == 1 then + local msg = + { + serviceType = 7, + frameInfo = 0, + rpcType = 0, + rpcFunctionId = 36, --SetDisplayLayoutID + rpcCorrelationId = cid, + payload = '{"displayLayout":"ONSCREEN_PRESETS"}' + } + self.mobileSession:Send(msg) + end + end) + + end + + --End Test case CommonRequestCheck.9 + --End Test suit CommonRequestCheck + + + +--------------------------------------------------------------------------------------------- +----------------------------------------II TEST BLOCK---------------------------------------- +----------------------------------------Positive cases--------------------------------------- +--------------------------------------------------------------------------------------------- + + + --=================================================================================-- + --------------------------------Positive request check------------------------------- + --=================================================================================-- + + + --check of each request parameter value in bound and boundary conditions + + --Write NewTestBlock to ATF log + function Test:NewTestBlock() + print("******************** II TEST BLOCK: Positive request check *********************") + end + + + --Begin Test suit PositiveRequestCheck + --Description: check of each request parameter value in bound and boundary conditions + + --Begin Test case PositiveRequestCheck.1 + --Description: Check request with displayLayout parameter value in bound and boundary conditions + + --Requirement id in JAMA/or Jira ID: SDLAQ-CRS-1044 + + --Verification criteria: The request is sent from mobile application to SDL and then transferred from SDL to HMI. HMI returns any result code that SDL transfers to mobile application. + + --Begin Test case PositiveRequestCheck.1.1 + --Description: displayLayout parameter value is lower bound + + function Test:SetDispLay_LowerBound() + + --mobile side: sending SetDisplayLayout request + local cid = self.mobileSession:SendRPC("SetDisplayLayout", + { + displayLayout = "a" + }) + + + local strInfo = "Unsupported display layout!" + local responsedParams = createDefaultResponseParamsValues(strInfo) + local expectedParams = createExpectedResultParamsValuesOnMobile(true, "SUCCESS", strInfo) + + --hmi side: expect UI.SetDisplayLayout request + EXPECT_HMICALL("UI.SetDisplayLayout", + { + displayLayout = "a" + }) + :Timeout(iTimeout) + :Do(function(_,data) + --hmi side: sending UI.SetDisplayLayout response + self.hmiConnection:SendResponse(data.id, data.method, "SUCCESS", responsedParams) + end) + + + --mobile side: expect SetDisplayLayout response + EXPECT_RESPONSE(cid, expectedParams) + :Timeout(iTimeout) + + end + + --End Test case PositiveRequestCheck.1.1 + + ----------------------------------------------------------------------------------------- + + --Begin Test case PositiveRequestCheck.1.2 + --Description: displayLayout parameter value is upper bound + + function Test:SetDispLay_UpperBound() + + --mobile side: sending SetDisplayLayout request + local cid = self.mobileSession:SendRPC("SetDisplayLayout", + { + displayLayout = str500Chars + }) + + local strInfo = "Unsupported display layout!" + local responsedParams = createDefaultResponseParamsValues(strInfo) + local expectedParams = createExpectedResultParamsValuesOnMobile(true, "SUCCESS", strInfo) + + --hmi side: expect UI.SetDisplayLayout request + EXPECT_HMICALL("UI.SetDisplayLayout", + { + displayLayout = str500Chars + }) + :Timeout(iTimeout) + :Do(function(_,data) + --hmi side: sending UI.SetDisplayLayout response + self.hmiConnection:SendResponse(data.id, data.method, "SUCCESS", responsedParams) + end) + + + --mobile side: expect SetDisplayLayout response + EXPECT_RESPONSE(cid, expectedParams) + :Timeout(iTimeout) + end + --End Test case PositiveRequestCheck.1.2 + + ----------------------------------------------------------------------------------------- + + --Begin Test case PositiveRequestCheck.1.3 + --Description: check displayLayout with all possible value + local displayLayoutValues = {"DEFAULT","MEDIA","NON-MEDIA","NAV_FULLSCREEN_MAP","NAV_LIST","NAV_KEYBOARD","GRAPHIC_WITH_TEXT","TEXT_WITH_GRAPHIC","TILES_ONLY","TEXTBUTTONS_ONLY","GRAPHIC_WITH_TILES","TILES_WITH_GRAPHIC","RAPHIC_WITH_TEXT_AND_SOFTBUTTONS","TEXT_AND_SOFTBUTTONS_WITH_GRAPHIC","GRAPHIC_WITH_TEXTBUTTONS","TEXTBUTTONS_WITH_GRAPHIC","LARGE_GRAPHIC_WITH_SOFTBUTTONS","DOUBLE_GRAPHIC_WITH_SOFTBUTTONS","LARGE_GRAPHIC_ONLY"} + for i = 1, #displayLayoutValues do + Test["SetDispLay_" .. displayLayoutValues[i]] = function(self) + --mobile side: sending SetDisplayLayout request + local cid = self.mobileSession:SendRPC("SetDisplayLayout", + { + displayLayout = displayLayoutValues[i] + }) + + --hmi side: expect UI.SetDisplayLayout request + EXPECT_HMICALL("UI.SetDisplayLayout", + { + displayLayout = displayLayoutValues[i] + }) + :Timeout(iTimeout) + :Do(function(_,data) + --hmi side: sending UI.SetDisplayLayout response + local responsedParams = createDefaultResponseParamsValues() + self.hmiConnection:SendResponse(data.id, data.method, "SUCCESS", responsedParams) + end) + + + --mobile side: expect SetDisplayLayout response + local expectedParams = createExpectedResultParamsValuesOnMobile(true, "SUCCESS") + + --mobile side: expect SetDisplayLayout response + EXPECT_RESPONSE(cid, expectedParams) + :Timeout(iTimeout) + end + end + --End Test case PositiveRequestCheck.1.3 + --End Test suit PositiveRequestCheck.1 + --End Test suit PositiveRequestCheck + + + --=================================================================================-- + --------------------------------Positive response check------------------------------ + --=================================================================================-- + + --------Checks----------- + -- parameters with values in boundary conditions + + --Write NewTestBlock to ATF log + function Test:NewTestBlock() + print("******************** II TEST BLOCK: Positive response check ********************") + end + + + --Begin Test suit PositiveResponseCheck + --Description: Check positive responses + + --Requirement id in JAMA/or Jira ID: SDLAQ-CRS-1045 + + --Verification criteria: verify SDL responses SUCCESS + + + --Begin Test case PositiveResponseCheck.1 + --Description: info parameter is lower bound + + function Test:SetDispLay_Res_info_lowerbound() + + --mobile side: sending SetDisplayLayout request + local cid = self.mobileSession:SendRPC("SetDisplayLayout", + { + displayLayout = "ONSCREEN_PRESETS" + }) + + local strInfo = "a" + local responsedParams = createDefaultResponseParamsValues(strInfo) + local expectedParams = createExpectedResultParamsValuesOnMobile(true, "SUCCESS", strInfo) + + --hmi side: expect UI.SetDisplayLayout request + EXPECT_HMICALL("UI.SetDisplayLayout", + { + displayLayout = "ONSCREEN_PRESETS" + }) + :Timeout(iTimeout) + :Do(function(_,data) + --hmi side: sending UI.SetDisplayLayout response + self.hmiConnection:SendResponse(data.id, data.method, "SUCCESS", responsedParams) + end) + + + --mobile side: expect SetDisplayLayout response + EXPECT_RESPONSE(cid, expectedParams) + :Timeout(iTimeout) + + + end + + --End Test case PositiveResponseCheck.1 + + --Begin Test case PositiveResponseCheck.2 + --Description: info parameter is upper bound + + function Test:SetDispLay_Res_info_upperbound() + + --mobile side: sending SetDisplayLayout request + local cid = self.mobileSession:SendRPC("SetDisplayLayout", + { + displayLayout = "ONSCREEN_PRESETS" + }) + + + local strInfo = str1000Chars + local responsedParams = createDefaultResponseParamsValues(strInfo) + local expectedParams = createExpectedResultParamsValuesOnMobile(true, "SUCCESS", strInfo) + + --hmi side: expect UI.SetDisplayLayout request + EXPECT_HMICALL("UI.SetDisplayLayout", + { + displayLayout = "ONSCREEN_PRESETS" + }) + :Timeout(iTimeout) + :Do(function(_,data) + --hmi side: sending UI.SetDisplayLayout response + self.hmiConnection:SendResponse(data.id, data.method, "SUCCESS", responsedParams) + end) + + + --mobile side: expect SetDisplayLayout response + EXPECT_RESPONSE(cid, expectedParams) + :Timeout(iTimeout) + + end + + --End Test case PositiveResponseCheck.2 + + + + --Begin Test case PositiveResponseCheck.3 + --Description: displayCapabilities parameter is missed + + function Test:SetDispLay_Res_displayCap_IsMissed_SUCCESS() + --mobile side: sending SetDisplayLayout request + local cid = self.mobileSession:SendRPC("SetDisplayLayout", + { + displayLayout = "ONSCREEN_PRESETS" + }) + + + local responsedParams = createDefaultResponseParamsValues() + local expectedParams = createExpectedResultParamsValuesOnMobile(true, "SUCCESS") + responsedParams.displayCapabilities = nil + expectedParams.displayCapabilities = nil + + --hmi side: expect UI.SetDisplayLayout request + EXPECT_HMICALL("UI.SetDisplayLayout", + { + displayLayout = "ONSCREEN_PRESETS" + }) + :Timeout(iTimeout) + :Do(function(_,data) + --hmi side: sending UI.SetDisplayLayout response + self.hmiConnection:SendResponse(data.id, data.method, "SUCCESS", responsedParams) + end) + + + --mobile side: expect SetDisplayLayout response + EXPECT_RESPONSE(cid, expectedParams) + :Timeout(iTimeout) + end + + + --End Test case PositiveResponseCheck.3 + + + + --Begin Test case PositiveResponseCheck.4 + --Description: displayCapabilities.displayType parameter is inbound + + --Requirement id in JAMA/or Jira ID: SDLAQ-CRS-1045 -> SDLAQ-CRS-3087 -> SDLAQ-CRS-3088 + + --Verification criteria: verify SDL responses SUCCESS + + local DisplayType = {"CID", "TYPE2", "TYPE5", "NGN", "GEN2_8_DMA", "GEN2_6_DMA", "MFD3", "MFD4", "MFD5", "GEN3_8_INCH"} + local DisplayTypeMobile = {"CID", "TYPE2", "TYPE5", "NGN", "GEN2_8_DMA", "GEN2_6_DMA", "MFD3", "MFD4", "MFD5", "GEN3_8-INCH"} + + for i = 1, #DisplayType do + Test["SetDispLay_Res_displayCap_displayType_InInBound_".. DisplayType[i] .."_SUCCESS"] = function(self) + + --mobile side: sending SetDisplayLayout request + local cid = self.mobileSession:SendRPC("SetDisplayLayout", + { + displayLayout = "ONSCREEN_PRESETS" + }) + + + local responsedParams = createDefaultResponseParamsValues() + local expectedParams = createExpectedResultParamsValuesOnMobile(true, "SUCCESS") + + responsedParams.displayCapabilities.displayType = DisplayType[i] + expectedParams.displayCapabilities.displayType = DisplayTypeMobile[i] + + --hmi side: expect UI.SetDisplayLayout request + EXPECT_HMICALL("UI.SetDisplayLayout", + { + displayLayout = "ONSCREEN_PRESETS" + }) + :Timeout(iTimeout) + :Do(function(_,data) + --hmi side: sending UI.SetDisplayLayout response + self.hmiConnection:SendResponse(data.id, data.method, "SUCCESS", responsedParams) + end) + + + --mobile side: expect SetDisplayLayout response + EXPECT_RESPONSE(cid, expectedParams) + :Timeout(iTimeout) + + end + end + + --End Test case PositiveResponseCheck.4 + + ----------------------------------------------------------------------------------------- + + --Begin Test case PositiveResponseCheck.5 + --Description: displayCapabilities.textFields.name parameter is inbound + + local inBoundValues = {"mainField1", "mainField2", "mainField3", "mainField4", "statusBar", "mediaClock", "mediaTrack", "alertText1", "alertText2", "alertText3", "scrollableMessageBody", "initialInteractionText", "navigationText1", "navigationText2", "ETA", "totalDistance", "navigationText", "audioPassThruDisplayText1", "audioPassThruDisplayText2", "sliderHeader", "sliderFooter", "notificationText", "menuName", "secondaryText", "tertiaryText", "timeToDestination", "turnText", "menuTitle", "locationName", "locationDescription", "addressLines", "phoneNumber"} + + for i = 1, #inBoundValues do + Test["SetDispLay_Res_displayCap_textFields_name_IsInBound_".. inBoundValues[i] .."_SUCCESS"] = function(self) + + --mobile side: sending SetDisplayLayout request + local cid = self.mobileSession:SendRPC("SetDisplayLayout", + { + displayLayout = "ONSCREEN_PRESETS" + }) + + + local responsedParams = createDefaultResponseParamsValues() + local expectedParams = createExpectedResultParamsValuesOnMobile(true, "SUCCESS") + + local testParam = + { + { + characterSet = "TYPE2SET", + name = inBoundValues[i], + rows = 1, + width = 500 + } + } + + responsedParams.displayCapabilities.textFields = testParam + --[[ TODO: update after resolving APPLINK-16052 + expectedParams.displayCapabilities.textFields = testParam + ]] + + --hmi side: expect UI.SetDisplayLayout request + EXPECT_HMICALL("UI.SetDisplayLayout", + { + displayLayout = "ONSCREEN_PRESETS" + }) + :Timeout(iTimeout) + :Do(function(_,data) + --hmi side: sending UI.SetDisplayLayout response + self.hmiConnection:SendResponse(data.id, data.method, "SUCCESS", responsedParams) + end) + + + --mobile side: expect SetDisplayLayout response + EXPECT_RESPONSE(cid, expectedParams) + :Timeout(iTimeout) + + end + end + + --End Test case PositiveResponseCheck.5 + + ----------------------------------------------------------------------------------------- + + --Begin Test case PositiveResponseCheck.6 + --Description: displayCapabilities.textFields.characterSet parameter is inbound + + local inBoundValues = {"TYPE2SET"} + + for i = 1, #inBoundValues do + Test["SetDispLay_Res_displayCap_textFields_characterSet_IsInBound_".. inBoundValues[i] .."_SUCCESS"] = function(self) + + --mobile side: sending SetDisplayLayout request + local cid = self.mobileSession:SendRPC("SetDisplayLayout", + { + displayLayout = "ONSCREEN_PRESETS" + }) + + + local responsedParams = createDefaultResponseParamsValues() + local expectedParams = createExpectedResultParamsValuesOnMobile(true, "SUCCESS") + + local testParam = + { + { + characterSet = inBoundValues[i], + name = "mainField1", + rows = 1, + width = 500 + } + } + + responsedParams.displayCapabilities.textFields = testParam + --[[ TODO: update after resolving APPLINK-16052 + expectedParams.displayCapabilities.textFields = testParam + ]] + + + --hmi side: expect UI.SetDisplayLayout request + EXPECT_HMICALL("UI.SetDisplayLayout", + { + displayLayout = "ONSCREEN_PRESETS" + }) + :Timeout(iTimeout) + :Do(function(_,data) + --hmi side: sending UI.SetDisplayLayout response + self.hmiConnection:SendResponse(data.id, data.method, "SUCCESS", responsedParams) + end) + + + --mobile side: expect SetDisplayLayout response + EXPECT_RESPONSE(cid, expectedParams) + :Timeout(iTimeout) + + end + end + + --End Test case PositiveResponseCheck.6 + + ----------------------------------------------------------------------------------------- + + --Begin Test case PositiveResponseCheck.7 + --Description: displayCapabilities.textFields.width parameter is inbound + + local inBoundValues = {1, 500} + + for i = 1, #inBoundValues do + Test["SetDispLay_Res_displayCap_textFields_width_IsInBound_".. inBoundValues[i] .."_SUCCESS"] = function(self) + + --mobile side: sending SetDisplayLayout request + local cid = self.mobileSession:SendRPC("SetDisplayLayout", + { + displayLayout = "ONSCREEN_PRESETS" + }) + + + local responsedParams = createDefaultResponseParamsValues() + local expectedParams = createExpectedResultParamsValuesOnMobile(true, "SUCCESS") + + local testParam = + { + { + characterSet = "TYPE2SET", + name = "mainField1", + rows = 1, + width = inBoundValues[i] + } + } + + responsedParams.displayCapabilities.textFields = testParam + --[[ TODO: update after resolving APPLINK-16052 + expectedParams.displayCapabilities.textFields = testParam + ]] + + + --hmi side: expect UI.SetDisplayLayout request + EXPECT_HMICALL("UI.SetDisplayLayout", + { + displayLayout = "ONSCREEN_PRESETS" + }) + :Timeout(iTimeout) + :Do(function(_,data) + --hmi side: sending UI.SetDisplayLayout response + self.hmiConnection:SendResponse(data.id, data.method, "SUCCESS", responsedParams) + end) + + + --mobile side: expect SetDisplayLayout response + EXPECT_RESPONSE(cid, expectedParams) + :Timeout(iTimeout) + + end + end + + --End Test case PositiveResponseCheck.7 + + ------------------------------------------------------------------------------------------ + + --Begin Test case PositiveResponseCheck.8 + --Description: displayCapabilities.textFields.rows parameter is inbound + + local inBoundValues = {1, 8} + + for i = 1, #inBoundValues do + Test["SetDispLay_Res_displayCap_textFields_rows_IsInBound_".. inBoundValues[i] .."_SUCCESS"] = function(self) + + --mobile side: sending SetDisplayLayout request + local cid = self.mobileSession:SendRPC("SetDisplayLayout", + { + displayLayout = "ONSCREEN_PRESETS" + }) + + + local responsedParams = createDefaultResponseParamsValues() + local expectedParams = createExpectedResultParamsValuesOnMobile(true, "SUCCESS") + + local testParam = + { + { + characterSet = "TYPE2SET", + name = "mainField1", + rows = inBoundValues[i], + width = 500 + } + } + + responsedParams.displayCapabilities.textFields = testParam + --[[ TODO: update after resolving APPLINK-16052 + expectedParams.displayCapabilities.textFields = testParam + ]] + + + --hmi side: expect UI.SetDisplayLayout request + EXPECT_HMICALL("UI.SetDisplayLayout", + { + displayLayout = "ONSCREEN_PRESETS" + }) + :Timeout(iTimeout) + :Do(function(_,data) + --hmi side: sending UI.SetDisplayLayout response + self.hmiConnection:SendResponse(data.id, data.method, "SUCCESS", responsedParams) + end) + + + --mobile side: expect SetDisplayLayout response + EXPECT_RESPONSE(cid, expectedParams) + :Timeout(iTimeout) + + end + end + + --End Test case PositiveResponseCheck.8 + + ----------------------------------------------------------------------------------------- + + --Begin Test case PositiveResponseCheck.9 + --Description: displayCapabilities.textFields parameter is minsize = 0 + + Test["SetDispLay_Res_displayCap_textFields_minsize_SUCCESS"] = function(self) + + --mobile side: sending SetDisplayLayout request + local cid = self.mobileSession:SendRPC("SetDisplayLayout", + { + displayLayout = "ONSCREEN_PRESETS" + }) + + + local responsedParams = createDefaultResponseParamsValues() + local expectedParams = createExpectedResultParamsValuesOnMobile(true, "SUCCESS") + + local testParam = {} + + responsedParams.displayCapabilities.textFields = testParam + --TODO: update after resolving APPLINK-16052 expectedParams.displayCapabilities.textFields = testParam + expectedParams.displayCapabilities= nil + + + + --hmi side: expect UI.SetDisplayLayout request + EXPECT_HMICALL("UI.SetDisplayLayout", + { + displayLayout = "ONSCREEN_PRESETS" + }) + :Timeout(iTimeout) + :Do(function(_,data) + --hmi side: sending UI.SetDisplayLayout response + self.hmiConnection:Send('{"id":' .. tostring(data.id) .. ',"result":{"softButtonCapabilities":[{"upDownAvailable":true,"longPressAvailable":true,"imageSupported":true,"shortPressAvailable":true}],"buttonCapabilities":[{"name":"PRESET_0","longPressAvailable":true,"upDownAvailable":true,"shortPressAvailable":true},{"name":"PRESET_1","longPressAvailable":true,"upDownAvailable":true,"shortPressAvailable":true},{"name":"PRESET_2","longPressAvailable":true,"upDownAvailable":true,"shortPressAvailable":true},{"name":"PRESET_3","longPressAvailable":true,"upDownAvailable":true,"shortPressAvailable":true},{"name":"PRESET_4","longPressAvailable":true,"upDownAvailable":true,"shortPressAvailable":true},{"name":"PRESET_5","longPressAvailable":true,"upDownAvailable":true,"shortPressAvailable":true},{"name":"PRESET_6","longPressAvailable":true,"upDownAvailable":true,"shortPressAvailable":true},{"name":"PRESET_7","longPressAvailable":true,"upDownAvailable":true,"shortPressAvailable":true},{"name":"PRESET_8","longPressAvailable":true,"upDownAvailable":true,"shortPressAvailable":true},{"name":"PRESET_9","longPressAvailable":true,"upDownAvailable":true,"shortPressAvailable":true},{"name":"OK","longPressAvailable":true,"upDownAvailable":true,"shortPressAvailable":true},{"name":"SEEKLEFT","longPressAvailable":true,"upDownAvailable":true,"shortPressAvailable":true},{"name":"SEEKRIGHT","longPressAvailable":true,"upDownAvailable":true,"shortPressAvailable":true},{"name":"TUNEUP","longPressAvailable":true,"upDownAvailable":true,"shortPressAvailable":true},{"name":"TUNEDOWN","longPressAvailable":true,"upDownAvailable":true,"shortPressAvailable":true}],"presetBankCapabilities":{"onScreenPresetsAvailable":true},"displayCapabilities":{"displayType":"GEN2_8_DMA","screenParams":{"resolution":{"resolutionWidth":800,"resolutionHeight":480},"touchEventAvailable":{"doublePressAvailable":false,"multiTouchAvailable":true,"pressAvailable":true}},"textFields":[],"mediaClockFormats":["CLOCK1","CLOCK2","CLOCK3","CLOCKTEXT1","CLOCKTEXT2","CLOCKTEXT3","CLOCKTEXT4"],"imageCapabilities":["DYNAMIC","STATIC"],"templatesAvailable":["ONSCREEN_PRESETS"],"imageFields":[{"imageResolution":{"resolutionWidth":64,"resolutionHeight":64},"name":"softButtonImage","imageTypeSupported":["GRAPHIC_BMP","GRAPHIC_JPEG","GRAPHIC_PNG"]},{"imageResolution":{"resolutionWidth":64,"resolutionHeight":64},"name":"choiceImage","imageTypeSupported":["GRAPHIC_BMP","GRAPHIC_JPEG","GRAPHIC_PNG"]},{"imageResolution":{"resolutionWidth":64,"resolutionHeight":64},"name":"choiceSecondaryImage","imageTypeSupported":["GRAPHIC_BMP","GRAPHIC_JPEG","GRAPHIC_PNG"]},{"imageResolution":{"resolutionWidth":64,"resolutionHeight":64},"name":"vrHelpItem","imageTypeSupported":["GRAPHIC_BMP","GRAPHIC_JPEG","GRAPHIC_PNG"]},{"imageResolution":{"resolutionWidth":64,"resolutionHeight":64},"name":"turnIcon","imageTypeSupported":["GRAPHIC_BMP","GRAPHIC_JPEG","GRAPHIC_PNG"]},{"imageResolution":{"resolutionWidth":64,"resolutionHeight":64},"name":"menuIcon","imageTypeSupported":["GRAPHIC_BMP","GRAPHIC_JPEG","GRAPHIC_PNG"]},{"imageResolution":{"resolutionWidth":64,"resolutionHeight":64},"name":"cmdIcon","imageTypeSupported":["GRAPHIC_BMP","GRAPHIC_JPEG","GRAPHIC_PNG"]},{"imageResolution":{"resolutionWidth":64,"resolutionHeight":64},"name":"graphic","imageTypeSupported":["GRAPHIC_BMP","GRAPHIC_JPEG","GRAPHIC_PNG"]},{"imageResolution":{"resolutionWidth":64,"resolutionHeight":64},"name":"showConstantTBTIcon","imageTypeSupported":["GRAPHIC_BMP","GRAPHIC_JPEG","GRAPHIC_PNG"]},{"imageResolution":{"resolutionWidth":64,"resolutionHeight":64},"name":"showConstantTBTNextTurnIcon","imageTypeSupported":["GRAPHIC_BMP","GRAPHIC_JPEG","GRAPHIC_PNG"]},{"imageResolution":{"resolutionWidth":64,"resolutionHeight":64},"name":"showConstantTBTNextTurnIcon","imageTypeSupported":["GRAPHIC_BMP","GRAPHIC_JPEG","GRAPHIC_PNG"]}],"numCustomPresetsAvailable":10,"graphicSupported":true},"code":0,"method":"UI.SetDisplayLayout"},"jsonrpc":"2.0"} ') + end) + + + --mobile side: expect SetDisplayLayout response + EXPECT_RESPONSE(cid, expectedParams) + :Timeout(iTimeout) + + end + + --End Test case PositiveResponseCheck.9 + + ------------------------------------------------------------------------------------------ + + --Begin Test case PositiveResponseCheck.10 + --Description: displayCapabilities.textFields parameter is maxsize = 100 + + Test["SetDispLay_Res_displayCap_textFields_maxsize_100_SUCCESS"] = function(self) + + --mobile side: sending SetDisplayLayout request + local cid = self.mobileSession:SendRPC("SetDisplayLayout", + { + displayLayout = "ONSCREEN_PRESETS" + }) + + + local responsedParams = createDefaultResponseParamsValues() + local expectedParams = createExpectedResultParamsValuesOnMobile(true, "SUCCESS") + + + local testParam = {} + local textFieldsName = {"mainField1", "mainField2", "mainField3", "mainField4", "statusBar", "mediaClock", "mediaTrack", "alertText1", "alertText2", "alertText3", "scrollableMessageBody", "initialInteractionText", "navigationText1", "navigationText2", "ETA", "totalDistance", "navigationText", "audioPassThruDisplayText1", "audioPassThruDisplayText2", "sliderHeader", "sliderFooter", "notificationText", "menuName", "secondaryText", "tertiaryText", "timeToDestination", "turnText", "menuTitle", "locationName", "locationDescription", "addressLines", "phoneNumber"} + + --Create 100 items + x = 0 + for j =1, 100 do + x = x + 1 + if x > #textFieldsName then + x = 1 + end + + testParam[j] = + { + characterSet = "TYPE2SET", + name =textFieldsName[x], + rows = 1, + width = 500 + } + end + + + responsedParams.displayCapabilities.textFields = testParam + --[[ TODO: update after resolving APPLINK-16052 + expectedParams.displayCapabilities.textFields = testParam + ]] + + + --hmi side: expect UI.SetDisplayLayout request + EXPECT_HMICALL("UI.SetDisplayLayout", + { + displayLayout = "ONSCREEN_PRESETS" + }) + :Timeout(iTimeout) + :Do(function(_,data) + --hmi side: sending UI.SetDisplayLayout response + self.hmiConnection:SendResponse(data.id, data.method, "SUCCESS", responsedParams) + end) + + + --mobile side: expect SetDisplayLayout response + EXPECT_RESPONSE(cid, expectedParams) + :Timeout(iTimeout) + + end + + --End Test case PositiveResponseCheck.10 + + --Begin Test case PositiveResponseCheck.11 + --Description: displayCapabilities.imageFields.name parameter is inbound + + -- + local inBoundValues = {"softButtonImage", "choiceImage", "choiceSecondaryImage", "vrHelpItem", "turnIcon", "menuIcon", "cmdIcon", "appIcon", "graphic", "showConstantTBTIcon", "showConstantTBTNextTurnIcon", "locationImage"} + + for i = 1, #inBoundValues do + Test["SetDispLay_Res_displayCap_imageFields_name_IsInBound_".. inBoundValues[i] .."_SUCCESS"] = function(self) + + --mobile side: sending SetDisplayLayout request + local cid = self.mobileSession:SendRPC("SetDisplayLayout", + { + displayLayout = "ONSCREEN_PRESETS" + }) + + + local responsedParams = createDefaultResponseParamsValues() + local expectedParams = createExpectedResultParamsValuesOnMobile(true, "SUCCESS") + + local testParam = + { + { + imageResolution = + { + resolutionHeight = 64, + resolutionWidth = 64 + }, + imageTypeSupported = + { + "GRAPHIC_BMP", + "GRAPHIC_JPEG", + "GRAPHIC_PNG" + }, + name = inBoundValues[i] + } + } + + responsedParams.displayCapabilities.imageFields = testParam + --TODO: update after resolving APPLINK-16052 expectedParams.displayCapabilities.imageFields = testParam + + + --hmi side: expect UI.SetDisplayLayout request + EXPECT_HMICALL("UI.SetDisplayLayout", + { + displayLayout = "ONSCREEN_PRESETS" + }) + :Timeout(iTimeout) + :Do(function(_,data) + --hmi side: sending UI.SetDisplayLayout response + self.hmiConnection:SendResponse(data.id, data.method, "SUCCESS", responsedParams) + end) + + + --mobile side: expect SetDisplayLayout response + EXPECT_RESPONSE(cid, expectedParams) + :Timeout(iTimeout) + + end + end + + --End Test case PositiveResponseCheck.11 + + ----------------------------------------------------------------------------------------- + + --Begin Test case PositiveResponseCheck.12 + --Description: displayCapabilities.imageFields.imageTypeSupported parameter is inbound + + -- + --local inBoundValues = {"GRAPHIC_BMP", "GRAPHIC_JPEG", "GRAPHIC_PNG", "AUDIO_WAVE", "AUDIO_MP3", "AUDIO_AAC", "BINARY", "JSON"} + local inBoundValues = {"GRAPHIC_BMP", "GRAPHIC_JPEG", "GRAPHIC_PNG"} + + for i = 1, #inBoundValues do + Test["SetDispLay_Res_displayCap_imageFields_imageTypeSupported_IsInBound_".. inBoundValues[i] .."_SUCCESS"] = function(self) + + --mobile side: sending SetDisplayLayout request + local cid = self.mobileSession:SendRPC("SetDisplayLayout", + { + displayLayout = "ONSCREEN_PRESETS" + }) + + + local responsedParams = createDefaultResponseParamsValues() + local expectedParams = createExpectedResultParamsValuesOnMobile(true, "SUCCESS") + + local testParam = + { + { + imageResolution = + { + resolutionHeight = 64, + resolutionWidth = 64 + }, + imageTypeSupported = {inBoundValues[i]}, + name = "softButtonImage" + } + } + + responsedParams.displayCapabilities.imageFields = testParam + --TODO: update after resolving APPLINK-16052 expectedParams.displayCapabilities.imageFields = testParam + + + --hmi side: expect UI.SetDisplayLayout request + EXPECT_HMICALL("UI.SetDisplayLayout", + { + displayLayout = "ONSCREEN_PRESETS" + }) + :Timeout(iTimeout) + :Do(function(_,data) + --hmi side: sending UI.SetDisplayLayout response + self.hmiConnection:SendResponse(data.id, data.method, "SUCCESS", responsedParams) + end) + + + --mobile side: expect SetDisplayLayout response + EXPECT_RESPONSE(cid, expectedParams) + :Timeout(iTimeout) + + end + end + + --End Test case PositiveResponseCheck.12 + + ----------------------------------------------------------------------------------------- + + + local inBoundValues = {1, 5000, 10000} + + --Begin Test case PositiveResponseCheck.13 + --Description: displayCapabilities.imageFields.imageResolution.resolutionWidth parameter is inbound + + for i = 1, #inBoundValues do + Test["SetDispLay_Res_displayCap_imageFields_imageResolution_resolutionWidth_IsInBound_".. inBoundValues[i] .."_SUCCESS"] = function(self) + + --mobile side: sending SetDisplayLayout request + local cid = self.mobileSession:SendRPC("SetDisplayLayout", + { + displayLayout = "ONSCREEN_PRESETS" + }) + + + local responsedParams = createDefaultResponseParamsValues() + local expectedParams = createExpectedResultParamsValuesOnMobile(true, "SUCCESS") + + local testParam = + { + { + imageResolution = + { + resolutionHeight = 64, + resolutionWidth = inBoundValues[i] + }, + imageTypeSupported = + { + "GRAPHIC_BMP", + "GRAPHIC_JPEG", + "GRAPHIC_PNG" + }, + name = "softButtonImage" + } + } + + responsedParams.displayCapabilities.imageFields = testParam + --TODO: update after resolving APPLINK-16052 expectedParams.displayCapabilities.imageFields = testParam + + + --hmi side: expect UI.SetDisplayLayout request + EXPECT_HMICALL("UI.SetDisplayLayout", + { + displayLayout = "ONSCREEN_PRESETS" + }) + :Timeout(iTimeout) + :Do(function(_,data) + --hmi side: sending UI.SetDisplayLayout response + self.hmiConnection:SendResponse(data.id, data.method, "SUCCESS", responsedParams) + end) + + + --mobile side: expect SetDisplayLayout response + EXPECT_RESPONSE(cid, expectedParams) + :Timeout(iTimeout) + + end + end + + --End Test case PositiveResponseCheck.13 + + ----------------------------------------------------------------------------------------- + + --Begin Test case PositiveResponseCheck.14 + --Description: displayCapabilities.imageFields.imageResolution.resolutionHeight parameter is inbound + + for i = 1, #inBoundValues do + Test["SetDispLay_Res_displayCap_imageFields_imageResolution_resolutionHeight_IsInBound_".. inBoundValues[i] .."_SUCCESS"] = function(self) + + --mobile side: sending SetDisplayLayout request + local cid = self.mobileSession:SendRPC("SetDisplayLayout", + { + displayLayout = "ONSCREEN_PRESETS" + }) + + + local responsedParams = createDefaultResponseParamsValues() + local expectedParams = createExpectedResultParamsValuesOnMobile(true, "SUCCESS") + + local testParam = + { + { + imageResolution = + { + resolutionHeight = inBoundValues[i], + resolutionWidth = 64 + }, + imageTypeSupported = + { + "GRAPHIC_BMP", + "GRAPHIC_JPEG", + "GRAPHIC_PNG" + }, + name = "softButtonImage" + } + } + + responsedParams.displayCapabilities.imageFields = testParam + --TODO: update after resolving APPLINK-16052 expectedParams.displayCapabilities.imageFields = testParam + + + --hmi side: expect UI.SetDisplayLayout request + EXPECT_HMICALL("UI.SetDisplayLayout", + { + displayLayout = "ONSCREEN_PRESETS" + }) + :Timeout(iTimeout) + :Do(function(_,data) + --hmi side: sending UI.SetDisplayLayout response + self.hmiConnection:SendResponse(data.id, data.method, "SUCCESS", responsedParams) + end) + + + --mobile side: expect SetDisplayLayout response + EXPECT_RESPONSE(cid, expectedParams) + :Timeout(iTimeout) + + end + end + + --End Test case PositiveResponseCheck.14 + + + ------------------------------------------------------------------------------------------ + + --Begin Test case PositiveResponseCheck.15 + --Description: displayCapabilities.imageFields parameter is miaxsize = 100 (minsize = 1 was covered by above test cases) + + Test["SetDispLay_Res_displayCap_imageFields_maxsize_100_SUCCESS"] = function(self) + + --mobile side: sending SetDisplayLayout request + local cid = self.mobileSession:SendRPC("SetDisplayLayout", + { + displayLayout = "ONSCREEN_PRESETS" + }) + + + local responsedParams = createDefaultResponseParamsValues() + local expectedParams = createExpectedResultParamsValuesOnMobile(true, "SUCCESS") + + local testParam = {} + + local imageFieldsName = {"softButtonImage", "choiceImage", "choiceSecondaryImage", "vrHelpItem", "turnIcon", "menuIcon", "cmdIcon", "appIcon", "graphic", "showConstantTBTIcon", "showConstantTBTNextTurnIcon", "locationImage"} + + --Create 100 items + x = 0 + for j =1, 100 do + x = x + 1 + if x > #imageFieldsName then + x = 1 + end + + testParam[j] = + { + imageResolution = + { + resolutionHeight = 64, + resolutionWidth = 64 + }, + imageTypeSupported = {"GRAPHIC_BMP"}, + name = imageFieldsName[x] + } + end + + responsedParams.displayCapabilities.imageFields = testParam + --TODO: update after resolving APPLINK-16052 expectedParams.displayCapabilities.imageFields = testParam + + + --hmi side: expect UI.SetDisplayLayout request + EXPECT_HMICALL("UI.SetDisplayLayout", + { + displayLayout = "ONSCREEN_PRESETS" + }) + :Timeout(iTimeout) + :Do(function(_,data) + --hmi side: sending UI.SetDisplayLayout response + self.hmiConnection:SendResponse(data.id, data.method, "SUCCESS", responsedParams) + end) + + + --mobile side: expect SetDisplayLayout response + EXPECT_RESPONSE(cid, expectedParams) + :Timeout(iTimeout) + + end + + --End Test case PositiveResponseCheck.15 + + + --Begin Test case PositiveResponseCheck.16 + --Description: displayCapabilities.mediaClockFormats parameter is inbound + + -- + local inBoundValues = {"CLOCK1", "CLOCK2", "CLOCK3", "CLOCKTEXT1", "CLOCKTEXT2", "CLOCKTEXT3", "CLOCKTEXT4"} + + for i = 1, #inBoundValues do + Test["SetDispLay_Res_displayCap_mediaClockFormats_IsInBound_".. inBoundValues[i] .."_SUCCESS"] = function(self) + + --mobile side: sending SetDisplayLayout request + local cid = self.mobileSession:SendRPC("SetDisplayLayout", + { + displayLayout = "ONSCREEN_PRESETS" + }) + + + local responsedParams = createDefaultResponseParamsValues() + local expectedParams = createExpectedResultParamsValuesOnMobile(true, "SUCCESS") + + local testParam = + { + inBoundValues[i] + } + + responsedParams.displayCapabilities.mediaClockFormats = testParam + expectedParams.displayCapabilities.mediaClockFormats = testParam + + + --hmi side: expect UI.SetDisplayLayout request + EXPECT_HMICALL("UI.SetDisplayLayout", + { + displayLayout = "ONSCREEN_PRESETS" + }) + :Timeout(iTimeout) + :Do(function(_,data) + --hmi side: sending UI.SetDisplayLayout response + self.hmiConnection:SendResponse(data.id, data.method, "SUCCESS", responsedParams) + end) + + + --mobile side: expect SetDisplayLayout response + EXPECT_RESPONSE(cid, expectedParams) + :Timeout(iTimeout) + + end + end + + --End Test case PositiveResponseCheck.16 + + ----------------------------------------------------------------------------------------- + + --Begin Test case PositiveResponseCheck.17 + --Description: displayCapabilities.mediaClockFormats parameter is maxsize (mixsize = 1 was covered in inbound cases) + + Test["SetDispLay_Res_displayCap_mediaClockFormats_maxsize_100_SUCCESS"] = function(self) + + --mobile side: sending SetDisplayLayout request + local cid = self.mobileSession:SendRPC("SetDisplayLayout", + { + displayLayout = "ONSCREEN_PRESETS" + }) + + + local responsedParams = createDefaultResponseParamsValues() + local expectedParams = createExpectedResultParamsValuesOnMobile(true, "SUCCESS") + + local testParam = + { + "CLOCK1", "CLOCK2", "CLOCK3", "CLOCKTEXT1", "CLOCKTEXT2", "CLOCKTEXT3", "CLOCKTEXT4", "CLOCK1", "CLOCK2", "CLOCK3", + "CLOCK1", "CLOCK2", "CLOCK3", "CLOCKTEXT1", "CLOCKTEXT2", "CLOCKTEXT3", "CLOCKTEXT4", "CLOCK1", "CLOCK2", "CLOCK3", + "CLOCK1", "CLOCK2", "CLOCK3", "CLOCKTEXT1", "CLOCKTEXT2", "CLOCKTEXT3", "CLOCKTEXT4", "CLOCK1", "CLOCK2", "CLOCK3", + "CLOCK1", "CLOCK2", "CLOCK3", "CLOCKTEXT1", "CLOCKTEXT2", "CLOCKTEXT3", "CLOCKTEXT4", "CLOCK1", "CLOCK2", "CLOCK3", + "CLOCK1", "CLOCK2", "CLOCK3", "CLOCKTEXT1", "CLOCKTEXT2", "CLOCKTEXT3", "CLOCKTEXT4", "CLOCK1", "CLOCK2", "CLOCK3", + "CLOCK1", "CLOCK2", "CLOCK3", "CLOCKTEXT1", "CLOCKTEXT2", "CLOCKTEXT3", "CLOCKTEXT4", "CLOCK1", "CLOCK2", "CLOCK3", + "CLOCK1", "CLOCK2", "CLOCK3", "CLOCKTEXT1", "CLOCKTEXT2", "CLOCKTEXT3", "CLOCKTEXT4", "CLOCK1", "CLOCK2", "CLOCK3", + "CLOCK1", "CLOCK2", "CLOCK3", "CLOCKTEXT1", "CLOCKTEXT2", "CLOCKTEXT3", "CLOCKTEXT4", "CLOCK1", "CLOCK2", "CLOCK3", + "CLOCK1", "CLOCK2", "CLOCK3", "CLOCKTEXT1", "CLOCKTEXT2", "CLOCKTEXT3", "CLOCKTEXT4", "CLOCK1", "CLOCK2", "CLOCK3", + "CLOCK1", "CLOCK2", "CLOCK3", "CLOCKTEXT1", "CLOCKTEXT2", "CLOCKTEXT3", "CLOCKTEXT4", "CLOCK1", "CLOCK2", "CLOCK3", + } + + responsedParams.displayCapabilities.mediaClockFormats = testParam + -- TODO: update after resolving APPLINK-16052 expectedParams.displayCapabilities.mediaClockFormats = testParam + + + --hmi side: expect UI.SetDisplayLayout request + EXPECT_HMICALL("UI.SetDisplayLayout", + { + displayLayout = "ONSCREEN_PRESETS" + }) + :Timeout(iTimeout) + :Do(function(_,data) + --hmi side: sending UI.SetDisplayLayout response + self.hmiConnection:SendResponse(data.id, data.method, "SUCCESS", responsedParams) + end) + + + --mobile side: expect SetDisplayLayout response + EXPECT_RESPONSE(cid, expectedParams) + :Timeout(iTimeout) + + end + + --End Test case PositiveResponseCheck.17 + + --Begin Test case PositiveResponseCheck.18 + --Description: displayCapabilities.imageCapabilities parameter is inbound + + local inBoundValues = {"STATIC", "DYNAMIC"} + + for i = 1, #inBoundValues do + Test["SetDispLay_Res_displayCap_imageCapabilities_IsInBound_".. inBoundValues[i] .."_SUCCESS"] = function(self) + + --mobile side: sending SetDisplayLayout request + local cid = self.mobileSession:SendRPC("SetDisplayLayout", + { + displayLayout = "ONSCREEN_PRESETS" + }) + + + local responsedParams = createDefaultResponseParamsValues() + local expectedParams = createExpectedResultParamsValuesOnMobile(true, "SUCCESS") + + local testParam = + { + inBoundValues[i] + } + + responsedParams.displayCapabilities.imageCapabilities = testParam + -- TODO: update after resolving APPLINK-16052 expectedParams.displayCapabilities.imageCapabilities = testParam + + + --hmi side: expect UI.SetDisplayLayout request + EXPECT_HMICALL("UI.SetDisplayLayout", + { + displayLayout = "ONSCREEN_PRESETS" + }) + :Timeout(iTimeout) + :Do(function(_,data) + --hmi side: sending UI.SetDisplayLayout response + self.hmiConnection:SendResponse(data.id, data.method, "SUCCESS", responsedParams) + end) + + + --mobile side: expect SetDisplayLayout response + EXPECT_RESPONSE(cid, expectedParams) + :Timeout(iTimeout) + + end + end + + --End Test case PositiveResponseCheck.18 + + ----------------------------------------------------------------------------------------- + + --Begin Test case PositiveResponseCheck.19 + --Description: displayCapabilities.imageCapabilities parameter is minsize + + Test["SetDispLay_Res_displayCap_imageCapabilities_minsize_SUCCESS"] = function(self) + + --mobile side: sending SetDisplayLayout request + local cid = self.mobileSession:SendRPC("SetDisplayLayout", + { + displayLayout = "ONSCREEN_PRESETS" + }) + + + local responsedParams = createDefaultResponseParamsValues() + local expectedParams = createExpectedResultParamsValuesOnMobile(true, "SUCCESS") + + responsedParams.displayCapabilities.imageCapabilities = {} + --TODO: update after resolving APPLINK-16052 expectedParams.displayCapabilities.imageCapabilities = {} + expectedParams.displayCapabilities = nil + + + --hmi side: expect UI.SetDisplayLayout request + EXPECT_HMICALL("UI.SetDisplayLayout", + { + displayLayout = "ONSCREEN_PRESETS" + }) + :Timeout(iTimeout) + :Do(function(_,data) + --hmi side: sending UI.SetDisplayLayout response + self.hmiConnection:Send('{"id":' .. tostring(data.id) .. ',"result":{"softButtonCapabilities":[{"upDownAvailable":true,"longPressAvailable":true,"imageSupported":true,"shortPressAvailable":true}],"buttonCapabilities":[{"name":"PRESET_0","longPressAvailable":true,"upDownAvailable":true,"shortPressAvailable":true},{"name":"PRESET_1","longPressAvailable":true,"upDownAvailable":true,"shortPressAvailable":true},{"name":"PRESET_2","longPressAvailable":true,"upDownAvailable":true,"shortPressAvailable":true},{"name":"PRESET_3","longPressAvailable":true,"upDownAvailable":true,"shortPressAvailable":true},{"name":"PRESET_4","longPressAvailable":true,"upDownAvailable":true,"shortPressAvailable":true},{"name":"PRESET_5","longPressAvailable":true,"upDownAvailable":true,"shortPressAvailable":true},{"name":"PRESET_6","longPressAvailable":true,"upDownAvailable":true,"shortPressAvailable":true},{"name":"PRESET_7","longPressAvailable":true,"upDownAvailable":true,"shortPressAvailable":true},{"name":"PRESET_8","longPressAvailable":true,"upDownAvailable":true,"shortPressAvailable":true},{"name":"PRESET_9","longPressAvailable":true,"upDownAvailable":true,"shortPressAvailable":true},{"name":"OK","longPressAvailable":true,"upDownAvailable":true,"shortPressAvailable":true},{"name":"SEEKLEFT","longPressAvailable":true,"upDownAvailable":true,"shortPressAvailable":true},{"name":"SEEKRIGHT","longPressAvailable":true,"upDownAvailable":true,"shortPressAvailable":true},{"name":"TUNEUP","longPressAvailable":true,"upDownAvailable":true,"shortPressAvailable":true},{"name":"TUNEDOWN","longPressAvailable":true,"upDownAvailable":true,"shortPressAvailable":true}],"presetBankCapabilities":{"onScreenPresetsAvailable":true},"displayCapabilities":{"displayType":"GEN2_8_DMA","screenParams":{"resolution":{"resolutionWidth":800,"resolutionHeight":480},"touchEventAvailable":{"doublePressAvailable":false,"multiTouchAvailable":true,"pressAvailable":true}},"textFields":[{"name":"mainField1","characterSet":"TYPE2SET","width":500,"rows":1},{"name":"mainField2","characterSet":"TYPE2SET","width":500,"rows":1},{"name":"mainField3","characterSet":"TYPE2SET","width":500,"rows":1},{"name":"mainField4","characterSet":"TYPE2SET","width":500,"rows":1},{"name":"statusBar","characterSet":"TYPE2SET","width":500,"rows":1},{"name":"mediaClock","characterSet":"TYPE2SET","width":500,"rows":1},{"name":"mediaTrack","characterSet":"TYPE2SET","width":500,"rows":1},{"name":"alertText1","characterSet":"TYPE2SET","width":500,"rows":1},{"name":"alertText2","characterSet":"TYPE2SET","width":500,"rows":1},{"name":"alertText3","characterSet":"TYPE2SET","width":500,"rows":1},{"name":"scrollableMessageBody","characterSet":"TYPE2SET","width":500,"rows":1},{"name":"initialInteractionText","characterSet":"TYPE2SET","width":500,"rows":1},{"name":"navigationText1","characterSet":"TYPE2SET","width":500,"rows":1},{"name":"navigationText2","characterSet":"TYPE2SET","width":500,"rows":1},{"name":"ETA","characterSet":"TYPE2SET","width":500,"rows":1},{"name":"totalDistance","characterSet":"TYPE2SET","width":500,"rows":1},{"name":"navigationText","characterSet":"TYPE2SET","width":500,"rows":1},{"name":"audioPassThruDisplayText1","characterSet":"TYPE2SET","width":500,"rows":1},{"name":"audioPassThruDisplayText2","characterSet":"TYPE2SET","width":500,"rows":1},{"name":"sliderHeader","characterSet":"TYPE2SET","width":500,"rows":1},{"name":"sliderFooter","characterSet":"TYPE2SET","width":500,"rows":1},{"name":"notificationText","characterSet":"TYPE2SET","width":500,"rows":1},{"name":"menuName","characterSet":"TYPE2SET","width":500,"rows":1},{"name":"secondaryText","characterSet":"TYPE2SET","width":500,"rows":1},{"name":"tertiaryText","characterSet":"TYPE2SET","width":500,"rows":1},{"name":"timeToDestination","characterSet":"TYPE2SET","width":500,"rows":1},{"name":"turnText","characterSet":"TYPE2SET","width":500,"rows":1},{"name":"menuTitle","characterSet":"TYPE2SET","width":500,"rows":1},{"name":"locationName","characterSet":"TYPE2SET","width":500,"rows":1},{"name":"locationDescription","characterSet":"TYPE2SET","width":500,"rows":1},{"name":"addressLines","characterSet":"TYPE2SET","width":500,"rows":1},{"name":"phoneNumber","characterSet":"TYPE2SET","width":500,"rows":1}],"mediaClockFormats":["CLOCK1","CLOCK2","CLOCK3","CLOCKTEXT1","CLOCKTEXT2","CLOCKTEXT3","CLOCKTEXT4"],"imageCapabilities":[],"templatesAvailable":["ONSCREEN_PRESETS"],"imageFields":[{"imageResolution":{"resolutionWidth":64,"resolutionHeight":64},"name":"softButtonImage","imageTypeSupported":["GRAPHIC_BMP","GRAPHIC_JPEG","GRAPHIC_PNG"]},{"imageResolution":{"resolutionWidth":64,"resolutionHeight":64},"name":"choiceImage","imageTypeSupported":["GRAPHIC_BMP","GRAPHIC_JPEG","GRAPHIC_PNG"]},{"imageResolution":{"resolutionWidth":64,"resolutionHeight":64},"name":"choiceSecondaryImage","imageTypeSupported":["GRAPHIC_BMP","GRAPHIC_JPEG","GRAPHIC_PNG"]},{"imageResolution":{"resolutionWidth":64,"resolutionHeight":64},"name":"vrHelpItem","imageTypeSupported":["GRAPHIC_BMP","GRAPHIC_JPEG","GRAPHIC_PNG"]},{"imageResolution":{"resolutionWidth":64,"resolutionHeight":64},"name":"turnIcon","imageTypeSupported":["GRAPHIC_BMP","GRAPHIC_JPEG","GRAPHIC_PNG"]},{"imageResolution":{"resolutionWidth":64,"resolutionHeight":64},"name":"menuIcon","imageTypeSupported":["GRAPHIC_BMP","GRAPHIC_JPEG","GRAPHIC_PNG"]},{"imageResolution":{"resolutionWidth":64,"resolutionHeight":64},"name":"cmdIcon","imageTypeSupported":["GRAPHIC_BMP","GRAPHIC_JPEG","GRAPHIC_PNG"]},{"imageResolution":{"resolutionWidth":64,"resolutionHeight":64},"name":"graphic","imageTypeSupported":["GRAPHIC_BMP","GRAPHIC_JPEG","GRAPHIC_PNG"]},{"imageResolution":{"resolutionWidth":64,"resolutionHeight":64},"name":"showConstantTBTIcon","imageTypeSupported":["GRAPHIC_BMP","GRAPHIC_JPEG","GRAPHIC_PNG"]},{"imageResolution":{"resolutionWidth":64,"resolutionHeight":64},"name":"showConstantTBTNextTurnIcon","imageTypeSupported":["GRAPHIC_BMP","GRAPHIC_JPEG","GRAPHIC_PNG"]},{"imageResolution":{"resolutionWidth":64,"resolutionHeight":64},"name":"showConstantTBTNextTurnIcon","imageTypeSupported":["GRAPHIC_BMP","GRAPHIC_JPEG","GRAPHIC_PNG"]}],"numCustomPresetsAvailable":10,"graphicSupported":true},"code":0,"method":"UI.SetDisplayLayout"},"jsonrpc":"2.0"}') + end) + + + --mobile side: expect SetDisplayLayout response + EXPECT_RESPONSE(cid, expectedParams) + :Timeout(iTimeout) + + end + + --End Test case PositiveResponseCheck.19 + + ----------------------------------------------------------------------------------------- + + --Begin Test case PositiveResponseCheck.20 + --Description: displayCapabilities.imageCapabilities parameter is max size + + Test["SetDispLay_Res_displayCap_imageCapabilities_maxsize_SUCCESS"] = function(self) + + --mobile side: sending SetDisplayLayout request + local cid = self.mobileSession:SendRPC("SetDisplayLayout", + { + displayLayout = "ONSCREEN_PRESETS" + }) + + + local responsedParams = createDefaultResponseParamsValues() + local expectedParams = createExpectedResultParamsValuesOnMobile(true, "SUCCESS") + + local testParam = + { + "STATIC", + "DYNAMIC" + } + + responsedParams.displayCapabilities.imageCapabilities = testParam + -- TODO: update after resolving APPLINK-16052 expectedParams.displayCapabilities.imageCapabilities = testParam + + + --hmi side: expect UI.SetDisplayLayout request + EXPECT_HMICALL("UI.SetDisplayLayout", + { + displayLayout = "ONSCREEN_PRESETS" + }) + :Timeout(iTimeout) + :Do(function(_,data) + --hmi side: sending UI.SetDisplayLayout response + self.hmiConnection:SendResponse(data.id, data.method, "SUCCESS", responsedParams) + end) + + + --mobile side: expect SetDisplayLayout response + EXPECT_RESPONSE(cid, expectedParams) + :Timeout(iTimeout) + + end + + --End Test case PositiveResponseCheck.20 + + + --Begin Test case PositiveResponseCheck.21 + --Description: displayCapabilities.graphicSupported parameter is inbound + + --Requirement id in JAMA/or Jira ID: SDLAQ-CRS-1045 -> SDLAQ-CRS-3087 DisplayCapabilities + + --Verification criteria: verify SDL responses SUCCESS + + local inBoundValues = {true, false} + + for i = 1, #inBoundValues do + Test["SetDispLay_Res_displayCap_graphicSupported_IsInBound_".. tostring(inBoundValues[i]) .."_SUCCESS"] = function(self) + + --mobile side: sending SetDisplayLayout request + local cid = self.mobileSession:SendRPC("SetDisplayLayout", + { + displayLayout = "ONSCREEN_PRESETS" + }) + + + local responsedParams = createDefaultResponseParamsValues() + local expectedParams = createExpectedResultParamsValuesOnMobile(true, "SUCCESS") + + responsedParams.displayCapabilities.graphicSupported = inBoundValues[i] + expectedParams.displayCapabilities.graphicSupported = inBoundValues[i] + + + --hmi side: expect UI.SetDisplayLayout request + EXPECT_HMICALL("UI.SetDisplayLayout", + { + displayLayout = "ONSCREEN_PRESETS" + }) + :Timeout(iTimeout) + :Do(function(_,data) + --hmi side: sending UI.SetDisplayLayout response + self.hmiConnection:SendResponse(data.id, data.method, "SUCCESS", responsedParams) + end) + + + --mobile side: expect SetDisplayLayout response + EXPECT_RESPONSE(cid, expectedParams) + :Timeout(iTimeout) + + end + end + + --End Test case PositiveResponseCheck.21 + + + + + --Begin Test case PositiveResponseCheck.22 + --Description: displayCapabilities.templatesAvailable parameter is valid value + + local inBoundValues = {"DEFAULT", "MEDIA", "NON-MEDIA", "ONSCREEN_PRESETS", "NAV_FULLSCREEN_MAP", "NAV_KEYBOARD", "GRAPHIC_WITH_TEXT", "TEXT_WITH_GRAPHIC", "TILES_ONLY", "TEXTBUTTONS_ONLY", "GRAPHIC_WITH_TILES", "TILES_WITH_GRAPHIC", "GRAPHIC_WITH_TEXT_AND_SOFTBUTTONS", "TEXT_AND_SOFTBUTTONS_WITH_GRAPHIC", "GRAPHIC_WITH_TEXTBUTTONS", "TEXTBUTTONS_WITH_GRAPHIC", "LARGE_GRAPHIC_WITH_SOFTBUTTONS", "DOUBLE_GRAPHIC_WITH_SOFTBUTTONS", "LARGE_GRAPHIC_ONLY"} + + for i = 1, #inBoundValues do + Test["SetDispLay_Res_displayCap_templatesAvailable_PredefinedLayout_".. tostring(inBoundValues[i]) .."_SUCCESS"] = function(self) + + --mobile side: sending SetDisplayLayout request + local cid = self.mobileSession:SendRPC("SetDisplayLayout", + { + displayLayout = "ONSCREEN_PRESETS" + }) + + + local responsedParams = createDefaultResponseParamsValues() + local expectedParams = createExpectedResultParamsValuesOnMobile(true, "SUCCESS") + + local testParam = + { + inBoundValues[i] + } + + responsedParams.displayCapabilities.templatesAvailable = testParam + --TODO: update after resolving APPLINK-16052 expectedParams.displayCapabilities.templatesAvailable = testParam + + + --hmi side: expect UI.SetDisplayLayout request + EXPECT_HMICALL("UI.SetDisplayLayout", + { + displayLayout = "ONSCREEN_PRESETS" + }) + :Timeout(iTimeout) + :Do(function(_,data) + --hmi side: sending UI.SetDisplayLayout response + self.hmiConnection:SendResponse(data.id, data.method, "SUCCESS", responsedParams) + end) + + + --mobile side: expect SetDisplayLayout response + EXPECT_RESPONSE(cid, expectedParams) + :Timeout(iTimeout) + + end + end + + --End Test case PositiveResponseCheck.22 + + ----------------------------------------------------------------------------------------- + + --Begin Test case PositiveResponseCheck.23 + --Description: displayCapabilities.templatesAvailable parameter is inbound + + local inBoundValues = + { + "a", + "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa" + } + + for i = 1, #inBoundValues do + Test["SetDispLay_Res_displayCap_templatesAvailable_IsInBound_SUCCESS"] = function(self) + + --mobile side: sending SetDisplayLayout request + local cid = self.mobileSession:SendRPC("SetDisplayLayout", + { + displayLayout = "ONSCREEN_PRESETS" + }) + + + local responsedParams = createDefaultResponseParamsValues() + local expectedParams = createExpectedResultParamsValuesOnMobile(true, "SUCCESS") + + local testParam = + { + inBoundValues[i] + } + + responsedParams.displayCapabilities.templatesAvailable = testParam + --TODO: update after resolving APPLINK-1605 expectedParams.displayCapabilities.templatesAvailable = testParam + + + --hmi side: expect UI.SetDisplayLayout request + EXPECT_HMICALL("UI.SetDisplayLayout", + { + displayLayout = "ONSCREEN_PRESETS" + }) + :Timeout(iTimeout) + :Do(function(_,data) + --hmi side: sending UI.SetDisplayLayout response + self.hmiConnection:SendResponse(data.id, data.method, "SUCCESS", responsedParams) + end) + + + --mobile side: expect SetDisplayLayout response + EXPECT_RESPONSE(cid, expectedParams) + :Timeout(iTimeout) + + end + end + + --End Test case PositiveResponseCheck.23 + + ----------------------------------------------------------------------------------------- + + --Begin Test case PositiveResponseCheck.24 + --Description: displayCapabilities.templatesAvailable parameter is minsize + + Test["SetDispLay_Res_displayCap_templatesAvailable_minsize_SUCCESS"] = function(self) + + --mobile side: sending SetDisplayLayout request + local cid = self.mobileSession:SendRPC("SetDisplayLayout", + { + displayLayout = "ONSCREEN_PRESETS" + }) + + + local responsedParams = createDefaultResponseParamsValues() + local expectedParams = createExpectedResultParamsValuesOnMobile(true, "SUCCESS") + + responsedParams.displayCapabilities.templatesAvailable = {} + --TODO: update after resolving APPLINK-16052 expectedParams.displayCapabilities.templatesAvailable = {} + expectedParams.displayCapabilities = nil + + + --hmi side: expect UI.SetDisplayLayout request + EXPECT_HMICALL("UI.SetDisplayLayout", + { + displayLayout = "ONSCREEN_PRESETS" + }) + :Timeout(iTimeout) + :Do(function(_,data) + --hmi side: sending UI.SetDisplayLayout response + self.hmiConnection:Send('{"id":' .. tostring(data.id) .. ',"result":{"softButtonCapabilities":[{"upDownAvailable":true,"longPressAvailable":true,"imageSupported":true,"shortPressAvailable":true}],"buttonCapabilities":[{"name":"PRESET_0","longPressAvailable":true,"upDownAvailable":true,"shortPressAvailable":true},{"name":"PRESET_1","longPressAvailable":true,"upDownAvailable":true,"shortPressAvailable":true},{"name":"PRESET_2","longPressAvailable":true,"upDownAvailable":true,"shortPressAvailable":true},{"name":"PRESET_3","longPressAvailable":true,"upDownAvailable":true,"shortPressAvailable":true},{"name":"PRESET_4","longPressAvailable":true,"upDownAvailable":true,"shortPressAvailable":true},{"name":"PRESET_5","longPressAvailable":true,"upDownAvailable":true,"shortPressAvailable":true},{"name":"PRESET_6","longPressAvailable":true,"upDownAvailable":true,"shortPressAvailable":true},{"name":"PRESET_7","longPressAvailable":true,"upDownAvailable":true,"shortPressAvailable":true},{"name":"PRESET_8","longPressAvailable":true,"upDownAvailable":true,"shortPressAvailable":true},{"name":"PRESET_9","longPressAvailable":true,"upDownAvailable":true,"shortPressAvailable":true},{"name":"OK","longPressAvailable":true,"upDownAvailable":true,"shortPressAvailable":true},{"name":"SEEKLEFT","longPressAvailable":true,"upDownAvailable":true,"shortPressAvailable":true},{"name":"SEEKRIGHT","longPressAvailable":true,"upDownAvailable":true,"shortPressAvailable":true},{"name":"TUNEUP","longPressAvailable":true,"upDownAvailable":true,"shortPressAvailable":true},{"name":"TUNEDOWN","longPressAvailable":true,"upDownAvailable":true,"shortPressAvailable":true}],"presetBankCapabilities":{"onScreenPresetsAvailable":true},"displayCapabilities":{"displayType":"GEN2_8_DMA","screenParams":{"resolution":{"resolutionWidth":800,"resolutionHeight":480},"touchEventAvailable":{"doublePressAvailable":false,"multiTouchAvailable":true,"pressAvailable":true}},"textFields":[{"name":"mainField1","characterSet":"TYPE2SET","width":500,"rows":1},{"name":"mainField2","characterSet":"TYPE2SET","width":500,"rows":1},{"name":"mainField3","characterSet":"TYPE2SET","width":500,"rows":1},{"name":"mainField4","characterSet":"TYPE2SET","width":500,"rows":1},{"name":"statusBar","characterSet":"TYPE2SET","width":500,"rows":1},{"name":"mediaClock","characterSet":"TYPE2SET","width":500,"rows":1},{"name":"mediaTrack","characterSet":"TYPE2SET","width":500,"rows":1},{"name":"alertText1","characterSet":"TYPE2SET","width":500,"rows":1},{"name":"alertText2","characterSet":"TYPE2SET","width":500,"rows":1},{"name":"alertText3","characterSet":"TYPE2SET","width":500,"rows":1},{"name":"scrollableMessageBody","characterSet":"TYPE2SET","width":500,"rows":1},{"name":"initialInteractionText","characterSet":"TYPE2SET","width":500,"rows":1},{"name":"navigationText1","characterSet":"TYPE2SET","width":500,"rows":1},{"name":"navigationText2","characterSet":"TYPE2SET","width":500,"rows":1},{"name":"ETA","characterSet":"TYPE2SET","width":500,"rows":1},{"name":"totalDistance","characterSet":"TYPE2SET","width":500,"rows":1},{"name":"navigationText","characterSet":"TYPE2SET","width":500,"rows":1},{"name":"audioPassThruDisplayText1","characterSet":"TYPE2SET","width":500,"rows":1},{"name":"audioPassThruDisplayText2","characterSet":"TYPE2SET","width":500,"rows":1},{"name":"sliderHeader","characterSet":"TYPE2SET","width":500,"rows":1},{"name":"sliderFooter","characterSet":"TYPE2SET","width":500,"rows":1},{"name":"notificationText","characterSet":"TYPE2SET","width":500,"rows":1},{"name":"menuName","characterSet":"TYPE2SET","width":500,"rows":1},{"name":"secondaryText","characterSet":"TYPE2SET","width":500,"rows":1},{"name":"tertiaryText","characterSet":"TYPE2SET","width":500,"rows":1},{"name":"timeToDestination","characterSet":"TYPE2SET","width":500,"rows":1},{"name":"turnText","characterSet":"TYPE2SET","width":500,"rows":1},{"name":"menuTitle","characterSet":"TYPE2SET","width":500,"rows":1},{"name":"locationName","characterSet":"TYPE2SET","width":500,"rows":1},{"name":"locationDescription","characterSet":"TYPE2SET","width":500,"rows":1},{"name":"addressLines","characterSet":"TYPE2SET","width":500,"rows":1},{"name":"phoneNumber","characterSet":"TYPE2SET","width":500,"rows":1}],"mediaClockFormats":["CLOCK1","CLOCK2","CLOCK3","CLOCKTEXT1","CLOCKTEXT2","CLOCKTEXT3","CLOCKTEXT4"],"imageCapabilities":["DYNAMIC","STATIC"],"templatesAvailable":[],"imageFields":[{"imageResolution":{"resolutionWidth":64,"resolutionHeight":64},"name":"softButtonImage","imageTypeSupported":["GRAPHIC_BMP","GRAPHIC_JPEG","GRAPHIC_PNG"]},{"imageResolution":{"resolutionWidth":64,"resolutionHeight":64},"name":"choiceImage","imageTypeSupported":["GRAPHIC_BMP","GRAPHIC_JPEG","GRAPHIC_PNG"]},{"imageResolution":{"resolutionWidth":64,"resolutionHeight":64},"name":"choiceSecondaryImage","imageTypeSupported":["GRAPHIC_BMP","GRAPHIC_JPEG","GRAPHIC_PNG"]},{"imageResolution":{"resolutionWidth":64,"resolutionHeight":64},"name":"vrHelpItem","imageTypeSupported":["GRAPHIC_BMP","GRAPHIC_JPEG","GRAPHIC_PNG"]},{"imageResolution":{"resolutionWidth":64,"resolutionHeight":64},"name":"turnIcon","imageTypeSupported":["GRAPHIC_BMP","GRAPHIC_JPEG","GRAPHIC_PNG"]},{"imageResolution":{"resolutionWidth":64,"resolutionHeight":64},"name":"menuIcon","imageTypeSupported":["GRAPHIC_BMP","GRAPHIC_JPEG","GRAPHIC_PNG"]},{"imageResolution":{"resolutionWidth":64,"resolutionHeight":64},"name":"cmdIcon","imageTypeSupported":["GRAPHIC_BMP","GRAPHIC_JPEG","GRAPHIC_PNG"]},{"imageResolution":{"resolutionWidth":64,"resolutionHeight":64},"name":"graphic","imageTypeSupported":["GRAPHIC_BMP","GRAPHIC_JPEG","GRAPHIC_PNG"]},{"imageResolution":{"resolutionWidth":64,"resolutionHeight":64},"name":"showConstantTBTIcon","imageTypeSupported":["GRAPHIC_BMP","GRAPHIC_JPEG","GRAPHIC_PNG"]},{"imageResolution":{"resolutionWidth":64,"resolutionHeight":64},"name":"showConstantTBTNextTurnIcon","imageTypeSupported":["GRAPHIC_BMP","GRAPHIC_JPEG","GRAPHIC_PNG"]},{"imageResolution":{"resolutionWidth":64,"resolutionHeight":64},"name":"showConstantTBTNextTurnIcon","imageTypeSupported":["GRAPHIC_BMP","GRAPHIC_JPEG","GRAPHIC_PNG"]}],"numCustomPresetsAvailable":10,"graphicSupported":true},"code":0,"method":"UI.SetDisplayLayout"},"jsonrpc":"2.0"} ') + end) + + + --mobile side: expect SetDisplayLayout response + EXPECT_RESPONSE(cid, expectedParams) + :Timeout(iTimeout) + + end + + --End Test case PositiveResponseCheck.24 + + + + --Begin Test case PositiveResponseCheck.25 + --Description: displayCapabilities.templatesAvailable parameter is maxsize + + local inBoundValues = {"DEFAULT", "MEDIA", "NON-MEDIA", "ONSCREEN_PRESETS", "NAV_FULLSCREEN_MAP", "NAV_KEYBOARD", "GRAPHIC_WITH_TEXT", "TEXT_WITH_GRAPHIC", "TILES_ONLY", "TEXTBUTTONS_ONLY", "GRAPHIC_WITH_TILES", "TILES_WITH_GRAPHIC", "GRAPHIC_WITH_TEXT_AND_SOFTBUTTONS", "TEXT_AND_SOFTBUTTONS_WITH_GRAPHIC", "GRAPHIC_WITH_TEXTBUTTONS", "TEXTBUTTONS_WITH_GRAPHIC", "LARGE_GRAPHIC_WITH_SOFTBUTTONS", "DOUBLE_GRAPHIC_WITH_SOFTBUTTONS", "LARGE_GRAPHIC_ONLY"} + + + Test["SetDispLay_Res_displayCap_templatesAvailable_maxsize_SUCCESS"] = function(self) + + --mobile side: sending SetDisplayLayout request + local cid = self.mobileSession:SendRPC("SetDisplayLayout", + { + displayLayout = "ONSCREEN_PRESETS" + }) + + + local responsedParams = createDefaultResponseParamsValues() + local expectedParams = createExpectedResultParamsValuesOnMobile(true, "SUCCESS") + + local testParam = {} + + --Create 100 items + x = 0 + for y =1, 100 do + x = x + 1 + if x > #inBoundValues then + x = 1 + end + + testParam[y] = inBoundValues[x] + end + + responsedParams.displayCapabilities.templatesAvailable = testParam + --TODO: update after resolving APPLINK-1605 expectedParams.displayCapabilities.templatesAvailable = testParam + + + --hmi side: expect UI.SetDisplayLayout request + EXPECT_HMICALL("UI.SetDisplayLayout", + { + displayLayout = "ONSCREEN_PRESETS" + }) + :Timeout(iTimeout) + :Do(function(_,data) + --hmi side: sending UI.SetDisplayLayout response + self.hmiConnection:SendResponse(data.id, data.method, "SUCCESS", responsedParams) + end) + + + --mobile side: expect SetDisplayLayout response + EXPECT_RESPONSE(cid, expectedParams) + :Timeout(iTimeout) + + end + + --End Test case PositiveResponseCheck.25 + + --Begin Test case PositiveResponseCheck.26 + --Description: displayCapabilities.screenParams parameter is missed + + Test["SetDispLay_Res_displayCap_screenParams_IsMissed_SUCCESS"] = function(self) + + --mobile side: sending SetDisplayLayout request + local cid = self.mobileSession:SendRPC("SetDisplayLayout", + { + displayLayout = "ONSCREEN_PRESETS" + }) + + + local responsedParams = createDefaultResponseParamsValues() + local expectedParams = createExpectedResultParamsValuesOnMobile(true, "SUCCESS") + + responsedParams.displayCapabilities.screenParams = nil + expectedParams.displayCapabilities.screenParams = nil + + + --hmi side: expect UI.SetDisplayLayout request + EXPECT_HMICALL("UI.SetDisplayLayout", + { + displayLayout = "ONSCREEN_PRESETS" + }) + :Timeout(iTimeout) + :Do(function(_,data) + --hmi side: sending UI.SetDisplayLayout response + self.hmiConnection:SendResponse(data.id, data.method, "SUCCESS", responsedParams) + end) + + + --mobile side: expect SetDisplayLayout response + EXPECT_RESPONSE(cid, expectedParams) + :Timeout(iTimeout) + + end + + --End Test case PositiveResponseCheck.26 + + + --Begin Test case PositiveResponseCheck.27 + --Description: displayCapabilities.screenParams.resolution.resolutionHeight parameter is valid value + local inBoundValues = {1, 10000} + + for i = 1, #inBoundValues do + Test["SetDispLay_Res_displayCap_screenParams_resolution_resolutionHeight_IsInBound_".. tostring(inBoundValues[i]) .."_SUCCESS"] = function(self) + + --mobile side: sending SetDisplayLayout request + local cid = self.mobileSession:SendRPC("SetDisplayLayout", + { + displayLayout = "ONSCREEN_PRESETS" + }) + + + local responsedParams = createDefaultResponseParamsValues() + local expectedParams = createExpectedResultParamsValuesOnMobile(true, "SUCCESS") + + responsedParams.displayCapabilities.screenParams.resolution.resolutionHeight = inBoundValues[i] + --TODO: update after resolving APPLINK-16052 expectedParams.displayCapabilities.screenParams.resolution.resolutionHeight = inBoundValues[i] + + + --hmi side: expect UI.SetDisplayLayout request + EXPECT_HMICALL("UI.SetDisplayLayout", + { + displayLayout = "ONSCREEN_PRESETS" + }) + :Timeout(iTimeout) + :Do(function(_,data) + --hmi side: sending UI.SetDisplayLayout response + self.hmiConnection:SendResponse(data.id, data.method, "SUCCESS", responsedParams) + end) + + + --mobile side: expect SetDisplayLayout response + EXPECT_RESPONSE(cid, expectedParams) + :Timeout(iTimeout) + + end + end + + --End Test case PositiveResponseCheck.27 + + ----------------------------------------------------------------------------------------- + + --Begin Test case PositiveResponseCheck.28 + --Description: displayCapabilities.screenParams.resolution.resolutionWidth parameter is valid value + local inBoundValues = {1, 480, 800, 10000} + + for i = 1, #inBoundValues do + Test["SetDispLay_Res_displayCap_screenParams_resolution_resolutionWidth_IsInBound_".. tostring(inBoundValues[i]) .."_SUCCESS"] = function(self) + + --mobile side: sending SetDisplayLayout request + local cid = self.mobileSession:SendRPC("SetDisplayLayout", + { + displayLayout = "ONSCREEN_PRESETS" + }) + + + local responsedParams = createDefaultResponseParamsValues() + local expectedParams = createExpectedResultParamsValuesOnMobile(true, "SUCCESS") + + responsedParams.displayCapabilities.screenParams.resolution.resolutionWidth = inBoundValues[i] + --TODO: update after resolving APPLINK-16052 expectedParams.displayCapabilities.screenParams.resolution.resolutionWidth = inBoundValues[i] + + + --hmi side: expect UI.SetDisplayLayout request + EXPECT_HMICALL("UI.SetDisplayLayout", + { + displayLayout = "ONSCREEN_PRESETS" + }) + :Timeout(iTimeout) + :Do(function(_,data) + --hmi side: sending UI.SetDisplayLayout response + self.hmiConnection:SendResponse(data.id, data.method, "SUCCESS", responsedParams) + end) + + + --mobile side: expect SetDisplayLayout response + EXPECT_RESPONSE(cid, expectedParams) + :Timeout(iTimeout) + + end + end + + --End Test case PositiveResponseCheck.28 + + --Begin Test case PositiveResponseCheck.29 + --Description: displayCapabilities.screenParams.touchEventAvailable parameter is missed + + Test["SetDispLay_Res_displayCap_screenParams_touchEventAvailable_IsMissed_SUCCESS"] = function(self) + + --mobile side: sending SetDisplayLayout request + local cid = self.mobileSession:SendRPC("SetDisplayLayout", + { + displayLayout = "ONSCREEN_PRESETS" + }) + + + local responsedParams = createDefaultResponseParamsValues() + local expectedParams = createExpectedResultParamsValuesOnMobile(true, "SUCCESS") + + responsedParams.displayCapabilities.screenParams.touchEventAvailable = nil + --TODO: update after resolving APPLINK-16052 expectedParams.displayCapabilities.screenParams.touchEventAvailable = nil + + + --hmi side: expect UI.SetDisplayLayout request + EXPECT_HMICALL("UI.SetDisplayLayout", + { + displayLayout = "ONSCREEN_PRESETS" + }) + :Timeout(iTimeout) + :Do(function(_,data) + --hmi side: sending UI.SetDisplayLayout response + self.hmiConnection:SendResponse(data.id, data.method, "SUCCESS", responsedParams) + end) + + + --mobile side: expect SetDisplayLayout response + EXPECT_RESPONSE(cid, expectedParams) + :Timeout(iTimeout) + + end + + --End Test case PositiveResponseCheck.29 + + ----------------------------------------------------------------------------------------- + + --Begin Test case PositiveResponseCheck.30 + --Description: displayCapabilities.screenParams.touchEventAvailable.pressAvailable parameter is valid value + local inBoundValues = {true, false} + + for i = 1, #inBoundValues do + Test["SetDispLay_Res_displayCap_screenParams_touchEventAvailable_pressAvailable_IsInBound_".. tostring(inBoundValues[i]) .."_SUCCESS"] = function(self) + + --mobile side: sending SetDisplayLayout request + local cid = self.mobileSession:SendRPC("SetDisplayLayout", + { + displayLayout = "ONSCREEN_PRESETS" + }) + + + local responsedParams = createDefaultResponseParamsValues() + local expectedParams = createExpectedResultParamsValuesOnMobile(true, "SUCCESS") + + responsedParams.displayCapabilities.screenParams.touchEventAvailable.pressAvailable = inBoundValues[i] + --TODO: update after resolving APPLINK-16052 expectedParams.displayCapabilities.screenParams.touchEventAvailable.pressAvailable = inBoundValues[i] + + + --hmi side: expect UI.SetDisplayLayout request + EXPECT_HMICALL("UI.SetDisplayLayout", + { + displayLayout = "ONSCREEN_PRESETS" + }) + :Timeout(iTimeout) + :Do(function(_,data) + --hmi side: sending UI.SetDisplayLayout response + self.hmiConnection:SendResponse(data.id, data.method, "SUCCESS", responsedParams) + end) + + + --mobile side: expect SetDisplayLayout response + EXPECT_RESPONSE(cid, expectedParams) + :Timeout(iTimeout) + + end + end + + --End Test case PositiveResponseCheck.30 + + ------------------------------------------------------------------------------------------ + + --Begin Test case PositiveResponseCheck.31 + --Description: displayCapabilities.screenParams.touchEventAvailable.multiTouchAvailable parameter is valid value + local inBoundValues = {true, false} + + for i = 1, #inBoundValues do + Test["SetDispLay_Res_displayCap_screenParams_touchEventAvailable_multiTouchAvailable_IsInBound_".. tostring(inBoundValues[i]) .."_SUCCESS"] = function(self) + + --mobile side: sending SetDisplayLayout request + local cid = self.mobileSession:SendRPC("SetDisplayLayout", + { + displayLayout = "ONSCREEN_PRESETS" + }) + + + local responsedParams = createDefaultResponseParamsValues() + local expectedParams = createExpectedResultParamsValuesOnMobile(true, "SUCCESS") + + responsedParams.displayCapabilities.screenParams.touchEventAvailable.multiTouchAvailable = inBoundValues[i] + --TODO: update after resolving APPLINK-16052 expectedParams.displayCapabilities.screenParams.touchEventAvailable.multiTouchAvailable = inBoundValues[i] + + + --hmi side: expect UI.SetDisplayLayout request + EXPECT_HMICALL("UI.SetDisplayLayout", + { + displayLayout = "ONSCREEN_PRESETS" + }) + :Timeout(iTimeout) + :Do(function(_,data) + --hmi side: sending UI.SetDisplayLayout response + self.hmiConnection:SendResponse(data.id, data.method, "SUCCESS", responsedParams) + end) + + + --mobile side: expect SetDisplayLayout response + EXPECT_RESPONSE(cid, expectedParams) + :Timeout(iTimeout) + + end + end + + --End Test case PositiveResponseCheck.31 + + ------------------------------------------------------------------------------------------ + + --Begin Test case PositiveResponseCheck.32 + --Description: displayCapabilities.screenParams.touchEventAvailable.doublePressAvailable parameter is valid value + local inBoundValues = {true, false} + + for i = 1, #inBoundValues do + Test["SetDispLay_Res_displayCap_screenParams_touchEventAvailable_doublePressAvailable_IsInBound_".. tostring(inBoundValues[i]) .."_SUCCESS"] = function(self) + + --mobile side: sending SetDisplayLayout request + local cid = self.mobileSession:SendRPC("SetDisplayLayout", + { + displayLayout = "ONSCREEN_PRESETS" + }) + + + local responsedParams = createDefaultResponseParamsValues() + local expectedParams = createExpectedResultParamsValuesOnMobile(true, "SUCCESS") + + responsedParams.displayCapabilities.screenParams.touchEventAvailable.doublePressAvailable = inBoundValues[i] + --TODO: update after resolving APPLINK-16052 expectedParams.displayCapabilities.screenParams.touchEventAvailable.doublePressAvailable = inBoundValues[i] + + + --hmi side: expect UI.SetDisplayLayout request + EXPECT_HMICALL("UI.SetDisplayLayout", + { + displayLayout = "ONSCREEN_PRESETS" + }) + :Timeout(iTimeout) + :Do(function(_,data) + --hmi side: sending UI.SetDisplayLayout response + self.hmiConnection:SendResponse(data.id, data.method, "SUCCESS", responsedParams) + end) + + + --mobile side: expect SetDisplayLayout response + EXPECT_RESPONSE(cid, expectedParams) + :Timeout(iTimeout) + + end + end + + --End Test case PositiveResponseCheck.32 + + + --Begin Test case PositiveResponseCheck.33 + --Description: displayCapabilities.numCustomPresetsAvailable parameter is missed + + Test["SetDispLay_Res_displayCap_numCustomPresetsAvailable_IsMissed_SUCCESS"] = function(self) + + --mobile side: sending SetDisplayLayout request + local cid = self.mobileSession:SendRPC("SetDisplayLayout", + { + displayLayout = "ONSCREEN_PRESETS" + }) + + + local responsedParams = createDefaultResponseParamsValues() + local expectedParams = createExpectedResultParamsValuesOnMobile(true, "SUCCESS") + + responsedParams.displayCapabilities.numCustomPresetsAvailable = nil + expectedParams.displayCapabilities.numCustomPresetsAvailable = nil + + + --hmi side: expect UI.SetDisplayLayout request + EXPECT_HMICALL("UI.SetDisplayLayout", + { + displayLayout = "ONSCREEN_PRESETS" + }) + :Timeout(iTimeout) + :Do(function(_,data) + --hmi side: sending UI.SetDisplayLayout response + self.hmiConnection:SendResponse(data.id, data.method, "SUCCESS", responsedParams) + end) + + + --mobile side: expect SetDisplayLayout response + EXPECT_RESPONSE(cid, expectedParams) + :Timeout(iTimeout) + + end + + --End Test case PositiveResponseCheck.33 + + ----------------------------------------------------------------------------------------- + + --Begin Test case PositiveResponseCheck.34 + --Description: displayCapabilities.numCustomPresetsAvailable parameter is inbound + + local inBoundValues = {1, 50, 100} + + for i = 1, #inBoundValues do + Test["SetDispLay_Res_displayCap_numCustomPresetsAvailable_IsInBound_".. tostring(inBoundValues[i]) .."_SUCCESS"] = function(self) + + --mobile side: sending SetDisplayLayout request + local cid = self.mobileSession:SendRPC("SetDisplayLayout", + { + displayLayout = "ONSCREEN_PRESETS" + }) + + + local responsedParams = createDefaultResponseParamsValues() + local expectedParams = createExpectedResultParamsValuesOnMobile(true, "SUCCESS") + + responsedParams.displayCapabilities.numCustomPresetsAvailable = inBoundValues[i] + expectedParams.displayCapabilities.numCustomPresetsAvailable = inBoundValues[i] + + + --hmi side: expect UI.SetDisplayLayout request + EXPECT_HMICALL("UI.SetDisplayLayout", + { + displayLayout = "ONSCREEN_PRESETS" + }) + :Timeout(iTimeout) + :Do(function(_,data) + --hmi side: sending UI.SetDisplayLayout response + self.hmiConnection:SendResponse(data.id, data.method, "SUCCESS", responsedParams) + end) + + + --mobile side: expect SetDisplayLayout response + EXPECT_RESPONSE(cid, expectedParams) + :Timeout(iTimeout) + + end + end + + --End Test case PositiveResponseCheck.34 + + + + + --Begin Test case PositiveResponseCheck.35 + --Description: buttonCapabilities parameter is missed + + function Test:SetDispLay_Res_butCap_IsMissed_SUCCESS() + + local param = createDefaultResponseParamsValues() + + param.displayCapabilities = nil + + --mobile side: sending SetDisplayLayout request + local cid = self.mobileSession:SendRPC("SetDisplayLayout", + { + displayLayout = "ONSCREEN_PRESETS" + }) + + + local responsedParams = createDefaultResponseParamsValues() + local expectedParams = createExpectedResultParamsValuesOnMobile(true, "SUCCESS") + + responsedParams.buttonCapabilities = nil + expectedParams.buttonCapabilities = nil + + --hmi side: expect UI.SetDisplayLayout request + EXPECT_HMICALL("UI.SetDisplayLayout", + { + displayLayout = "ONSCREEN_PRESETS" + }) + :Timeout(iTimeout) + :Do(function(_,data) + --hmi side: sending UI.SetDisplayLayout response + self.hmiConnection:SendResponse(data.id, data.method, "SUCCESS", responsedParams) + end) + + + --mobile side: expect SetDisplayLayout response + EXPECT_RESPONSE(cid, expectedParams) + :Timeout(iTimeout) + + end + + --End Test case PositiveResponseCheck.35 + + ----------------------------------------------------------------------------------------- + + --Begin Test case PositiveResponseCheck.36 + --Description: buttonCapabilities.name parameter is inbound + + local inBoundValues = {"OK", "PRESET_0","PRESET_1","PRESET_2","PRESET_3","PRESET_4","PRESET_5","PRESET_6","PRESET_7","PRESET_8","PRESET_9"} + + for i = 1, #inBoundValues do + Test["SetDispLay_Res_butCap_name_InInBound_".. tostring(inBoundValues[i]) .."_SUCCESS"] = function(self) + + --mobile side: sending SetDisplayLayout request + local cid = self.mobileSession:SendRPC("SetDisplayLayout", + { + displayLayout = "ONSCREEN_PRESETS" + }) + + + local responsedParams = createDefaultResponseParamsValues() + local expectedParams = createExpectedResultParamsValuesOnMobile(true, "SUCCESS") + + responsedParams.buttonCapabilities[1].name = inBoundValues[i] + expectedParams.buttonCapabilities[1].name = inBoundValues[i] + + --hmi side: expect UI.SetDisplayLayout request + EXPECT_HMICALL("UI.SetDisplayLayout", + { + displayLayout = "ONSCREEN_PRESETS" + }) + :Timeout(iTimeout) + :Do(function(_,data) + --hmi side: sending UI.SetDisplayLayout response + self.hmiConnection:SendResponse(data.id, data.method, "SUCCESS", responsedParams) + end) + + + --mobile side: expect SetDisplayLayout response + EXPECT_RESPONSE(cid, expectedParams) + :Timeout(iTimeout) + + end + end + + --End Test case PositiveResponseCheck.36 + + ----------------------------------------------------------------------------------------- + + --Begin Test case PositiveResponseCheck.37 + --Description: buttonCapabilities.shortPressAvailable parameter is inbound + + local inBoundValues = {true, false} + + for i = 1, #inBoundValues do + Test["SetDispLay_Res_butCap_shortPressAvailable_InInBound_".. tostring(inBoundValues[i]) .."_SUCCESS"] = function(self) + + --mobile side: sending SetDisplayLayout request + local cid = self.mobileSession:SendRPC("SetDisplayLayout", + { + displayLayout = "ONSCREEN_PRESETS" + }) + + + local responsedParams = createDefaultResponseParamsValues() + local expectedParams = createExpectedResultParamsValuesOnMobile(true, "SUCCESS") + + responsedParams.buttonCapabilities[1].shortPressAvailable = inBoundValues[i] + expectedParams.buttonCapabilities[1].shortPressAvailable = inBoundValues[i] + + --hmi side: expect UI.SetDisplayLayout request + EXPECT_HMICALL("UI.SetDisplayLayout", + { + displayLayout = "ONSCREEN_PRESETS" + }) + :Timeout(iTimeout) + :Do(function(_,data) + --hmi side: sending UI.SetDisplayLayout response + self.hmiConnection:SendResponse(data.id, data.method, "SUCCESS", responsedParams) + end) + + + --mobile side: expect SetDisplayLayout response + EXPECT_RESPONSE(cid, expectedParams) + :Timeout(iTimeout) + + end + end + + --End Test case PositiveResponseCheck.37 + + ------------------------------------------------------------------------------------------ + + --Begin Test case PositiveResponseCheck.38 + --Description: buttonCapabilities.longPressAvailable parameter is inbound + + local inBoundValues = {true, false} + + for i = 1, #inBoundValues do + Test["SetDispLay_Res_butCap_longPressAvailable_InInBound_".. tostring(inBoundValues[i]) .."_SUCCESS"] = function(self) + + --mobile side: sending SetDisplayLayout request + local cid = self.mobileSession:SendRPC("SetDisplayLayout", + { + displayLayout = "ONSCREEN_PRESETS" + }) + + + local responsedParams = createDefaultResponseParamsValues() + local expectedParams = createExpectedResultParamsValuesOnMobile(true, "SUCCESS") + + responsedParams.buttonCapabilities[1].longPressAvailable = inBoundValues[i] + expectedParams.buttonCapabilities[1].longPressAvailable = inBoundValues[i] + + --hmi side: expect UI.SetDisplayLayout request + EXPECT_HMICALL("UI.SetDisplayLayout", + { + displayLayout = "ONSCREEN_PRESETS" + }) + :Timeout(iTimeout) + :Do(function(_,data) + --hmi side: sending UI.SetDisplayLayout response + self.hmiConnection:SendResponse(data.id, data.method, "SUCCESS", responsedParams) + end) + + + --mobile side: expect SetDisplayLayout response + EXPECT_RESPONSE(cid, expectedParams) + :Timeout(iTimeout) + + end + end + + --End Test case PositiveResponseCheck.38 + + ----------------------------------------------------------------------------------------- + + --Begin Test case PositiveResponseCheck.39 + --Description: buttonCapabilities.upDownAvailable parameter is inbound + + local inBoundValues = {true, false} + + for i = 1, #inBoundValues do + Test["SetDispLay_Res_butCap_upDownAvailable_InInBound_".. tostring(inBoundValues[i]) .."_SUCCESS"] = function(self) + + --mobile side: sending SetDisplayLayout request + local cid = self.mobileSession:SendRPC("SetDisplayLayout", + { + displayLayout = "ONSCREEN_PRESETS" + }) + + + local responsedParams = createDefaultResponseParamsValues() + local expectedParams = createExpectedResultParamsValuesOnMobile(true, "SUCCESS") + + responsedParams.buttonCapabilities[1].upDownAvailable = inBoundValues[i] + expectedParams.buttonCapabilities[1].upDownAvailable = inBoundValues[i] + + --hmi side: expect UI.SetDisplayLayout request + EXPECT_HMICALL("UI.SetDisplayLayout", + { + displayLayout = "ONSCREEN_PRESETS" + }) + :Timeout(iTimeout) + :Do(function(_,data) + --hmi side: sending UI.SetDisplayLayout response + self.hmiConnection:SendResponse(data.id, data.method, "SUCCESS", responsedParams) + end) + + + --mobile side: expect SetDisplayLayout response + EXPECT_RESPONSE(cid, expectedParams) + :Timeout(iTimeout) + + end + end + + --End Test case PositiveResponseCheck.39 + + ----------------------------------------------------------------------------------------- + + --Begin Test case PositiveResponseCheck.40 + --Description: buttonCapabilities parameter is minsize + + Test["SetDispLay_Res_butCap_minsize_SUCCESS"] = function(self) + + --mobile side: sending SetDisplayLayout request + local cid = self.mobileSession:SendRPC("SetDisplayLayout", + { + displayLayout = "ONSCREEN_PRESETS" + }) + + + local responsedParams = createDefaultResponseParamsValues() + local expectedParams = createExpectedResultParamsValuesOnMobile(true, "SUCCESS") + + local testParam = + { + { + name = "PRESET_0", + shortPressAvailable = true, + longPressAvailable = true, + upDownAvailable = true + } + } + + responsedParams.buttonCapabilities = testParam + expectedParams.buttonCapabilities = testParam + + --hmi side: expect UI.SetDisplayLayout request + EXPECT_HMICALL("UI.SetDisplayLayout", + { + displayLayout = "ONSCREEN_PRESETS" + }) + :Timeout(iTimeout) + :Do(function(_,data) + --hmi side: sending UI.SetDisplayLayout response + self.hmiConnection:SendResponse(data.id, data.method, "SUCCESS", responsedParams) + end) + + + --mobile side: expect SetDisplayLayout response + EXPECT_RESPONSE(cid, expectedParams) + :Timeout(iTimeout) + + end + + --End Test case PositiveResponseCheck.40 + + ----------------------------------------------------------------------------------------- + + --Begin Test case PositiveResponseCheck.41 + --Description: buttonCapabilities parameter is maxsize + local inBoundValues = {"OK", "PRESET_0","PRESET_1","PRESET_2","PRESET_3","PRESET_4","PRESET_5","PRESET_6","PRESET_7","PRESET_8","PRESET_9"} + + Test["SetDispLay_Res_butCap_maxsize_SUCCESS"] = function(self) + + --mobile side: sending SetDisplayLayout request + local cid = self.mobileSession:SendRPC("SetDisplayLayout", + { + displayLayout = "ONSCREEN_PRESETS" + }) + + + local responsedParams = createDefaultResponseParamsValues() + local expectedParams = createExpectedResultParamsValuesOnMobile(true, "SUCCESS") + + local testParam = {} + + --Create 100 items + x = 0 + for y =1, 100 do + x = x + 1 + if x > #inBoundValues then + x = 1 + end + + testParam[y] = + { + name = inBoundValues[x], + shortPressAvailable = true, + longPressAvailable = true, + upDownAvailable = true + } + end + + responsedParams.buttonCapabilities = testParam + expectedParams.buttonCapabilities = testParam + + --hmi side: expect UI.SetDisplayLayout request + EXPECT_HMICALL("UI.SetDisplayLayout", + { + displayLayout = "ONSCREEN_PRESETS" + }) + :Timeout(iTimeout) + :Do(function(_,data) + --hmi side: sending UI.SetDisplayLayout response + self.hmiConnection:SendResponse(data.id, data.method, "SUCCESS", responsedParams) + end) + + + --mobile side: expect SetDisplayLayout response + EXPECT_RESPONSE(cid, expectedParams) + :Timeout(iTimeout) + + end + + --End Test case PositiveResponseCheck.41 + + + --Begin Test case PositiveResponseCheck.42 + --Description: softButtonCapabilities parameter is missed + + function Test:SetDispLay_Res_softButCap_IsMissed_SUCCESS() + + --mobile side: sending SetDisplayLayout request + local cid = self.mobileSession:SendRPC("SetDisplayLayout", + { + displayLayout = "ONSCREEN_PRESETS" + }) + + + local responsedParams = createDefaultResponseParamsValues() + local expectedParams = createExpectedResultParamsValuesOnMobile(true, "SUCCESS") + + responsedParams.softButtonCapabilities = nil + expectedParams.softButtonCapabilities = nil + + --hmi side: expect UI.SetDisplayLayout request + EXPECT_HMICALL("UI.SetDisplayLayout", + { + displayLayout = "ONSCREEN_PRESETS" + }) + :Timeout(iTimeout) + :Do(function(_,data) + --hmi side: sending UI.SetDisplayLayout response + self.hmiConnection:SendResponse(data.id, data.method, "SUCCESS", responsedParams) + end) + + + --mobile side: expect SetDisplayLayout response + EXPECT_RESPONSE(cid, expectedParams) + :Timeout(iTimeout) + + end + + --End Test case PositiveResponseCheck.42 + + ----------------------------------------------------------------------------------------- + + --Begin Test case PositiveResponseCheck.43 + --Description: softButtonCapabilities.shortPressAvailable parameter is inbound + + local inBoundValues = {true, false} + + for i = 1, #inBoundValues do + Test["SetDispLay_Res_softButCap_shortPressAvailable_InInBound_".. tostring(inBoundValues[i]) .."_SUCCESS"] = function(self) + + --mobile side: sending SetDisplayLayout request + local cid = self.mobileSession:SendRPC("SetDisplayLayout", + { + displayLayout = "ONSCREEN_PRESETS" + }) + + + local responsedParams = createDefaultResponseParamsValues() + local expectedParams = createExpectedResultParamsValuesOnMobile(true, "SUCCESS") + + responsedParams.softButtonCapabilities[1].shortPressAvailable = inBoundValues[i] + expectedParams.softButtonCapabilities[1].shortPressAvailable = inBoundValues[i] + + --hmi side: expect UI.SetDisplayLayout request + EXPECT_HMICALL("UI.SetDisplayLayout", + { + displayLayout = "ONSCREEN_PRESETS" + }) + :Timeout(iTimeout) + :Do(function(_,data) + --hmi side: sending UI.SetDisplayLayout response + self.hmiConnection:SendResponse(data.id, data.method, "SUCCESS", responsedParams) + end) + + + --mobile side: expect SetDisplayLayout response + EXPECT_RESPONSE(cid, expectedParams) + :Timeout(iTimeout) + + end + end + + --End Test case PositiveResponseCheck.43 + + ----------------------------------------------------------------------------------------- + + --Begin Test case PositiveResponseCheck.44 + --Description: softButtonCapabilities.longPressAvailable parameter is inbound + + local inBoundValues = {true, false} + + for i = 1, #inBoundValues do + Test["SetDispLay_Res_softButCap_longPressAvailable_InInBound_".. tostring(inBoundValues[i]) .."_SUCCESS"] = function(self) + + --mobile side: sending SetDisplayLayout request + local cid = self.mobileSession:SendRPC("SetDisplayLayout", + { + displayLayout = "ONSCREEN_PRESETS" + }) + + + local responsedParams = createDefaultResponseParamsValues() + local expectedParams = createExpectedResultParamsValuesOnMobile(true, "SUCCESS") + + responsedParams.softButtonCapabilities[1].longPressAvailable = inBoundValues[i] + expectedParams.softButtonCapabilities[1].longPressAvailable = inBoundValues[i] + + --hmi side: expect UI.SetDisplayLayout request + EXPECT_HMICALL("UI.SetDisplayLayout", + { + displayLayout = "ONSCREEN_PRESETS" + }) + :Timeout(iTimeout) + :Do(function(_,data) + --hmi side: sending UI.SetDisplayLayout response + self.hmiConnection:SendResponse(data.id, data.method, "SUCCESS", responsedParams) + end) + + + --mobile side: expect SetDisplayLayout response + EXPECT_RESPONSE(cid, expectedParams) + :Timeout(iTimeout) + + end + end + + --End Test case PositiveResponseCheck.44 + + ----------------------------------------------------------------------------------------- + + --Begin Test case PositiveResponseCheck.45 + --Description: softButtonCapabilities.upDownAvailable parameter is inbound + + local inBoundValues = {true, false} + + for i = 1, #inBoundValues do + Test["SetDispLay_Res_softButCap_upDownAvailable_InInBound_".. tostring(inBoundValues[i]) .."_SUCCESS"] = function(self) + + --mobile side: sending SetDisplayLayout request + local cid = self.mobileSession:SendRPC("SetDisplayLayout", + { + displayLayout = "ONSCREEN_PRESETS" + }) + + + local responsedParams = createDefaultResponseParamsValues() + local expectedParams = createExpectedResultParamsValuesOnMobile(true, "SUCCESS") + + responsedParams.softButtonCapabilities[1].upDownAvailable = inBoundValues[i] + expectedParams.softButtonCapabilities[1].upDownAvailable = inBoundValues[i] + + --hmi side: expect UI.SetDisplayLayout request + EXPECT_HMICALL("UI.SetDisplayLayout", + { + displayLayout = "ONSCREEN_PRESETS" + }) + :Timeout(iTimeout) + :Do(function(_,data) + --hmi side: sending UI.SetDisplayLayout response + self.hmiConnection:SendResponse(data.id, data.method, "SUCCESS", responsedParams) + end) + + + --mobile side: expect SetDisplayLayout response + EXPECT_RESPONSE(cid, expectedParams) + :Timeout(iTimeout) + + end + end + + --End Test case PositiveResponseCheck.45 + + ----------------------------------------------------------------------------------------- + + --Begin Test case PositiveResponseCheck.46 + --Description: softButtonCapabilities.imageSupported parameter is inbound + + local inBoundValues = {true, false} + + for i = 1, #inBoundValues do + Test["SetDispLay_Res_softButCap_imageSupported_InInBound_".. tostring(inBoundValues[i]) .."_SUCCESS"] = function(self) + + --mobile side: sending SetDisplayLayout request + local cid = self.mobileSession:SendRPC("SetDisplayLayout", + { + displayLayout = "ONSCREEN_PRESETS" + }) + + + local responsedParams = createDefaultResponseParamsValues() + local expectedParams = createExpectedResultParamsValuesOnMobile(true, "SUCCESS") + + responsedParams.softButtonCapabilities[1].imageSupported = inBoundValues[i] + expectedParams.softButtonCapabilities[1].imageSupported = inBoundValues[i] + + --hmi side: expect UI.SetDisplayLayout request + EXPECT_HMICALL("UI.SetDisplayLayout", + { + displayLayout = "ONSCREEN_PRESETS" + }) + :Timeout(iTimeout) + :Do(function(_,data) + --hmi side: sending UI.SetDisplayLayout response + self.hmiConnection:SendResponse(data.id, data.method, "SUCCESS", responsedParams) + end) + + + --mobile side: expect SetDisplayLayout response + EXPECT_RESPONSE(cid, expectedParams) + :Timeout(iTimeout) + + end + end + + --End Test case PositiveResponseCheck.46 + + ----------------------------------------------------------------------------------------- + + --Begin Test case PositiveResponseCheck.47 + --Description: softButtonCapabilities parameter is minsize + + Test["SetDispLay_Res_softButCap_minsize_SUCCESS"] = function(self) + + --mobile side: sending SetDisplayLayout request + local cid = self.mobileSession:SendRPC("SetDisplayLayout", + { + displayLayout = "ONSCREEN_PRESETS" + }) + + + local responsedParams = createDefaultResponseParamsValues() + local expectedParams = createExpectedResultParamsValuesOnMobile(true, "SUCCESS") + + local testParam = + { + { + shortPressAvailable = true, + longPressAvailable = true, + upDownAvailable = true, + imageSupported = true + } + } + + responsedParams.softButtonCapabilities = testParam + expectedParams.softButtonCapabilities = testParam + + --hmi side: expect UI.SetDisplayLayout request + EXPECT_HMICALL("UI.SetDisplayLayout", + { + displayLayout = "ONSCREEN_PRESETS" + }) + :Timeout(iTimeout) + :Do(function(_,data) + --hmi side: sending UI.SetDisplayLayout response + self.hmiConnection:SendResponse(data.id, data.method, "SUCCESS", responsedParams) + end) + + + --mobile side: expect SetDisplayLayout response + EXPECT_RESPONSE(cid, expectedParams) + :Timeout(iTimeout) + + end + + --End Test case PositiveResponseCheck.47 + + ----------------------------------------------------------------------------------------- + + --Begin Test case PositiveResponseCheck.48 + --Description: softButtonCapabilities parameter is maxsize + + Test["SetDispLay_Res_softButCap_maxsize_SUCCESS"] = function(self) + + --mobile side: sending SetDisplayLayout request + local cid = self.mobileSession:SendRPC("SetDisplayLayout", + { + displayLayout = "ONSCREEN_PRESETS" + }) + + + local responsedParams = createDefaultResponseParamsValues() + local expectedParams = createExpectedResultParamsValuesOnMobile(true, "SUCCESS") + + local testParam = {} + + --Create 100 items + for y =1, 100 do + testParam[y] = + { + shortPressAvailable = true, + longPressAvailable = true, + upDownAvailable = true, + imageSupported = true + } + end + + responsedParams.softButtonCapabilities = testParam + expectedParams.softButtonCapabilities = testParam + + --hmi side: expect UI.SetDisplayLayout request + EXPECT_HMICALL("UI.SetDisplayLayout", + { + displayLayout = "ONSCREEN_PRESETS" + }) + :Timeout(iTimeout) + :Do(function(_,data) + --hmi side: sending UI.SetDisplayLayout response + self.hmiConnection:SendResponse(data.id, data.method, "SUCCESS", responsedParams) + end) + + + --mobile side: expect SetDisplayLayout response + EXPECT_RESPONSE(cid, expectedParams) + :Timeout(iTimeout) + + end + + --End Test case PositiveResponseCheck.48 + + --Begin Test case PositiveResponseCheck.49 + --Description: presetBankCapabilities parameter is missed + + function Test:SetDispLay_Res_presetBankCap_IsMissed_SUCCESS() + + --mobile side: sending SetDisplayLayout request + local cid = self.mobileSession:SendRPC("SetDisplayLayout", + { + displayLayout = "ONSCREEN_PRESETS" + }) + + + local responsedParams = createDefaultResponseParamsValues() + local expectedParams = createExpectedResultParamsValuesOnMobile(true, "SUCCESS") + + responsedParams.presetBankCapabilities = nil + expectedParams.presetBankCapabilities = nil + + --hmi side: expect UI.SetDisplayLayout request + EXPECT_HMICALL("UI.SetDisplayLayout", + { + displayLayout = "ONSCREEN_PRESETS" + }) + :Timeout(iTimeout) + :Do(function(_,data) + --hmi side: sending UI.SetDisplayLayout response + self.hmiConnection:SendResponse(data.id, data.method, "SUCCESS", responsedParams) + end) + + + --mobile side: expect SetDisplayLayout response + EXPECT_RESPONSE(cid, expectedParams) + :Timeout(iTimeout) + + end + + --End Test case PositiveResponseCheck.49 + + ----------------------------------------------------------------------------------------- + + --Begin Test case PositiveResponseCheck.50 + --Description: presetBankCapabilities.onScreenPresetsAvailable parameter is inbound + + local inBoundValues = {true, false} + + for i = 1, #inBoundValues do + Test["SetDispLay_Res_presetBankCap_onScreenPresetsAvailable_InInBound_".. tostring(inBoundValues[i]) .."_SUCCESS"] = function(self) + + --mobile side: sending SetDisplayLayout request + local cid = self.mobileSession:SendRPC("SetDisplayLayout", + { + displayLayout = "ONSCREEN_PRESETS" + }) + + + local responsedParams = createDefaultResponseParamsValues() + local expectedParams = createExpectedResultParamsValuesOnMobile(true, "SUCCESS") + + responsedParams.presetBankCapabilities.onScreenPresetsAvailable = inBoundValues[i] + expectedParams.presetBankCapabilities.onScreenPresetsAvailable = inBoundValues[i] + + --hmi side: expect UI.SetDisplayLayout request + EXPECT_HMICALL("UI.SetDisplayLayout", + { + displayLayout = "ONSCREEN_PRESETS" + }) + :Timeout(iTimeout) + :Do(function(_,data) + --hmi side: sending UI.SetDisplayLayout response + self.hmiConnection:SendResponse(data.id, data.method, "SUCCESS", responsedParams) + end) + + + --mobile side: expect SetDisplayLayout response + EXPECT_RESPONSE(cid, expectedParams) + :Timeout(iTimeout) + + end + end + + --End Test case PositiveResponseCheck.50 + + --End Test suit PositiveResponseCheck + + +---------------------------------------------------------------------------------------------- +----------------------------------------III TEST BLOCK---------------------------------------- +----------------------------------------Negative cases---------------------------------------- +---------------------------------------------------------------------------------------------- + + --=================================================================================-- + ---------------------------------Negative request check------------------------------ + --=================================================================================-- + + --------Checks----------- + -- outbound values + -- invalid values(empty, missing, nonexistent, duplicate, invalid characters) + -- parameters with wrong type + -- invalid json + + --Write NewTestBlock to ATF log + function Test:NewTestBlock() + print("******************* III TEST BLOCK: Negative request check *********************") + end + + --Begin Test suit NegativeRequestCheck + --Description: check of each request parameter value out of bound, missing, with wrong type, empty, duplicate etc. + + --Begin Test case NegativeRequestCheck.1 + --Description: check of displayLayout parameter value out bound + + --Requirement id in JAMA/or Jira ID: SDLAQ-CRS-1044 -> SDLAQ-CRS-2680 + + --Verification criteria: SDL returns INVALID_DATA + + local outBound = {"", str500Chars.."a"} + local outBoundName = {"length_0", "length_501"} + + for i=1,#outBound do + Test["SetDispLay_displayLayout_OutBound_" .. tostring(outBoundName[i]) .."_INVALID_DATA"] = function(self) + + --mobile side: sending SetDisplayLayout request + local cid = self.mobileSession:SendRPC("SetDisplayLayout", + { + displayLayout = outBound[i] + }) + + --hmi side: expect UI.SetDisplayLayout request + EXPECT_HMICALL("UI.SetDisplayLayout", {}) + :Timeout(iTimeout) + :Times(0) + + --mobile side: expect SetDisplayLayout response + EXPECT_RESPONSE(cid, {success = false, resultCode = "INVALID_DATA", info = nil}) + :Timeout(iTimeout) + + end + end + + --End Test case NegativeRequestCheck.1 + + ----------------------------------------------------------------------------------------- + + --Begin Test case NegativeRequestCheck.2 + --Description: check of displayLayout parameter is invalid values(empty, missing, nonexistent, duplicate, invalid characters) + + --Requirement id in JAMA/or Jira ID: SDLAQ-CRS-1044 -> SDLAQ-CRS-2680 + + --Verification criteria: SDL returns INVALID_DATA + + + function Test: SetDispLay_displayLayout_nonexistentValue_INVALID_DATA() + + --mobile side: sending SetDisplayLayout request + local cid = self.mobileSession:SendRPC("SetDisplayLayout", + { + displayLayout = "nonexistentValue" + }) + + + local responsedParams = createDefaultResponseParamsValues() + local expectedParams = createExpectedResultParamsValuesOnMobile(true, "SUCCESS") + + --hmi side: expect UI.SetDisplayLayout request + EXPECT_HMICALL("UI.SetDisplayLayout", + { + displayLayout = "nonexistentValue" + }) + :Timeout(iTimeout) + :Do(function(_,data) + --hmi side: sending UI.SetDisplayLayout response + self.hmiConnection:SendResponse(data.id, data.method, "INVALID_DATA", {}) + end) + + + --mobile side: expect SetDisplayLayout response + EXPECT_RESPONSE(cid, {success = false, resultCode = "INVALID_DATA", info = nil}) + :Timeout(iTimeout) + end + + --End Test case NegativeRequestCheck.2 + + ----------------------------------------------------------------------------------------- + + --Begin Test case NegativeRequestCheck.3 + --Description: check of displayLayout parameter is wrong type + + --Requirement id in JAMA/or Jira ID: SDLAQ-CRS-1044 -> SDLAQ-CRS-2680 + + --Verification criteria: SDL returns INVALID_DATA + + function Test: SetDispLay_displayLayout_wrongType_INVALID_DATA() + --mobile side: sending SetDisplayLayout request + local cid = self.mobileSession:SendRPC("SetDisplayLayout", + { + displayLayout = 123 + }) + + + --hmi side: expect UI.SetDisplayLayout request + EXPECT_HMICALL("UI.SetDisplayLayout") + :Timeout(iTimeout) + :Times(0) + + --mobile side: expect SetDisplayLayout response + EXPECT_RESPONSE(cid, {success = false, resultCode = "INVALID_DATA"}) + :Timeout(iTimeout) + end + --End Test case NegativeRequestCheck.3 + + --End Test suit NegativeRequestCheck + + --=================================================================================-- + ---------------------------------Negative response check------------------------------ + --=================================================================================-- + + --------Checks----------- + -- outbound values + -- invalid values(empty, missing, nonexistent, invalid characters) + -- parameters with wrong type + -- invalid json + + --Write NewTestBlock to ATF log + function Test:NewTestBlock() + print("******************** III TEST BLOCK: Negative response check *******************") + end + + + --Begin Test suit NegativeResponseCheck + --Description: check of each request parameter value out of bound, missing, with wrong type, empty, duplicate etc. + + --Begin Test case NegativeResponseCheck.1 + --Description: Check each parameter value is out bound + + --Requirement id in JAMA/or Jira ID: SDLAQ-CRS-1045, SDLAQ-CRS-2680 + + --Verification criteria: The response contains 2 mandatory parameters "success" and "resultCode". + + + --[[TODO: Update after resolving APPLINK-14551 + + --Begin Test case NegativeResponseCheck.1.1 + --Description: info parameter is out lower bound + + function Test:SetDispLay_Res_info_outlowerbound_SUCCESS() + + --mobile side: sending SetDisplayLayout request + local cid = self.mobileSession:SendRPC("SetDisplayLayout", + { + displayLayout = "ONSCREEN_PRESETS" + }) + + local strInfo = "" + local responsedParams = createDefaultResponseParamsValues(strInfo) + local expectedParams = createExpectedResultParamsValuesOnMobile(true, "SUCCESS") + + --hmi side: expect UI.SetDisplayLayout request + EXPECT_HMICALL("UI.SetDisplayLayout", + { + displayLayout = "ONSCREEN_PRESETS" + }) + :Timeout(iTimeout) + :Do(function(_,data) + --hmi side: sending UI.SetDisplayLayout response + self.hmiConnection:SendResponse(data.id, data.method, "SUCCESS", responsedParams) + end) + + + --mobile side: expect SetDisplayLayout response + EXPECT_RESPONSE(cid, expectedParams) + :ValidIf(function(_,data) + if data.payload.info then + print("SDL pre-send empty info to mobile") + return false + else + return true + end + end) + :Timeout(iTimeout) + end + --End Test case NegativeResponseCheck.1.1 + + ----------------------------------------------------------------------------------------- + + --Begin Test case NegativeResponseCheck.1.2 + --Description: info parameter is upper bound + function Test:SetDispLay_Res_info_outupperbound_SUCCESS() + + --mobile side: sending SetDisplayLayout request + local cid = self.mobileSession:SendRPC("SetDisplayLayout", + { + displayLayout = "ONSCREEN_PRESETS" + }) + + + local strInfo = str1000Chars .. "z" + local responsedParams = createDefaultResponseParamsValues(strInfo) + local expectedParams = createExpectedResultParamsValuesOnMobile(true, "SUCCESS", str1000Chars) + + --hmi side: expect UI.SetDisplayLayout request + EXPECT_HMICALL("UI.SetDisplayLayout", + { + displayLayout = "ONSCREEN_PRESETS" + }) + :Timeout(iTimeout) + :Do(function(_,data) + --hmi side: sending UI.SetDisplayLayout response + self.hmiConnection:SendResponse(data.id, data.method, "SUCCESS", responsedParams) + end) + + + --mobile side: expect SetDisplayLayout response + EXPECT_RESPONSE(cid, expectedParams) + :Timeout(iTimeout) + + end + + --End Test case NegativeResponseCheck.1.2 + ]] + ----------------------------------------------------------------------------------------- + --TODO: Update after resolving APPLINK-14765 + + --Begin Test case NegativeResponseCheck.1.3 + --Description: displayCapabilities.displayType parameter is out of bound + local DisplayType = {"is_out_bound"} + + for i = 1, #DisplayType do + Test["SetDispLay_Res_displayCap_displayType_IsOutBound_".. DisplayType[i] .."_INVALID_DATA"] = function(self) + + --mobile side: sending SetDisplayLayout request + local cid = self.mobileSession:SendRPC("SetDisplayLayout", + { + displayLayout = "ONSCREEN_PRESETS" + }) + + + local responsedParams = createDefaultResponseParamsValues() + responsedParams.displayCapabilities.displayType = DisplayType[i] + + --hmi side: expect UI.SetDisplayLayout request + EXPECT_HMICALL("UI.SetDisplayLayout", + { + displayLayout = "ONSCREEN_PRESETS" + }) + :Timeout(iTimeout) + :Do(function(_,data) + --hmi side: sending UI.SetDisplayLayout response + self.hmiConnection:SendResponse(data.id, data.method, "SUCCESS", responsedParams) + end) + + + --mobile side: expect SetDisplayLayout response + EXPECT_RESPONSE(cid, { success = false, resultCode = "INVALID_DATA", info = "Received invalid data on HMI response" }) + :Timeout(iTimeout) + + end + end + + --End Test case NegativeResponseCheck.1.3 + + ----------------------------------------------------------------------------------------- + + --Begin Test case NegativeResponseCheck.1.4 + --Description: displayCapabilities.textFields.name parameter is out of bound + + local outboundValues = {"is_out_bound"} + + for i = 1, #outboundValues do + Test["SetDispLay_Res_displayCap_textFields_name_IsOutBound_".. outboundValues[i] .."_INVALID_DATA"] = function(self) + + --mobile side: sending SetDisplayLayout request + local cid = self.mobileSession:SendRPC("SetDisplayLayout", + { + displayLayout = "ONSCREEN_PRESETS" + }) + + + local responsedParams = createDefaultResponseParamsValues() + + local testParam = + { + { + characterSet = "TYPE2SET", + name = outboundValues[i], + rows = 1, + width = 500 + } + } + + responsedParams.displayCapabilities.textFields = testParam + + --hmi side: expect UI.SetDisplayLayout request + EXPECT_HMICALL("UI.SetDisplayLayout", + { + displayLayout = "ONSCREEN_PRESETS" + }) + :Timeout(iTimeout) + :Do(function(_,data) + --hmi side: sending UI.SetDisplayLayout response + self.hmiConnection:SendResponse(data.id, data.method, "SUCCESS", responsedParams) + end) + + + --mobile side: expect SetDisplayLayout response + EXPECT_RESPONSE(cid, { success = false, resultCode = "INVALID_DATA", info = "Received invalid data on HMI response" }) + :Timeout(iTimeout) + + end + end + + --End Test case NegativeResponseCheck.1.4 + + ----------------------------------------------------------------------------------------- + + --Begin Test case NegativeResponseCheck.1.5 + --Description: displayCapabilities.textFields.characterSet parameter is out of bound + + local outboundValues = {"is_out_bound"} + + for i = 1, #outboundValues do + Test["SetDispLay_Res_displayCap_textFields_characterSet_IsOutBound_".. outboundValues[i] .."_INVALID_DATA"] = function(self) + + --mobile side: sending SetDisplayLayout request + local cid = self.mobileSession:SendRPC("SetDisplayLayout", + { + displayLayout = "ONSCREEN_PRESETS" + }) + + + local responsedParams = createDefaultResponseParamsValues() + + local testParam = + { + { + characterSet = outboundValues[i], + name = "mainField1", + rows = 1, + width = 500 + } + } + + responsedParams.displayCapabilities.textFields = testParam + + --hmi side: expect UI.SetDisplayLayout request + EXPECT_HMICALL("UI.SetDisplayLayout", + { + displayLayout = "ONSCREEN_PRESETS" + }) + :Timeout(iTimeout) + :Do(function(_,data) + --hmi side: sending UI.SetDisplayLayout response + self.hmiConnection:SendResponse(data.id, data.method, "SUCCESS", responsedParams) + end) + + + --mobile side: expect SetDisplayLayout response + EXPECT_RESPONSE(cid, { success = false, resultCode = "INVALID_DATA", info = "Received invalid data on HMI response" }) + :Timeout(iTimeout) + + end + end + + --End Test case NegativeResponseCheck.1.5 + + ----------------------------------------------------------------------------------------- + + --Begin Test case NegativeResponseCheck.1.6 + --Description: displayCapabilities.textFields.width parameter is out of bound + + local outboundValues = {0, 501} + + for i = 1, #outboundValues do + Test["SetDispLay_Res_displayCap_textFields_width_IsOutBound_".. outboundValues[i] .."_INVALID_DATA"] = function(self) + + --mobile side: sending SetDisplayLayout request + local cid = self.mobileSession:SendRPC("SetDisplayLayout", + { + displayLayout = "ONSCREEN_PRESETS" + }) + + + local responsedParams = createDefaultResponseParamsValues() + + local testParam = + { + { + characterSet = "TYPE2SET", + name = "mainField1", + rows = 1, + width = outboundValues[i] + } + } + + responsedParams.displayCapabilities.textFields = testParam + + --hmi side: expect UI.SetDisplayLayout request + EXPECT_HMICALL("UI.SetDisplayLayout", + { + displayLayout = "ONSCREEN_PRESETS" + }) + :Timeout(iTimeout) + :Do(function(_,data) + --hmi side: sending UI.SetDisplayLayout response + self.hmiConnection:SendResponse(data.id, data.method, "SUCCESS", responsedParams) + end) + + + --mobile side: expect SetDisplayLayout response + EXPECT_RESPONSE(cid, { success = false, resultCode = "INVALID_DATA", info = "Received invalid data on HMI response" }) + :Timeout(iTimeout) + + end + end + + --End Test case NegativeResponseCheck.1.6 + + ----------------------------------------------------------------------------------------- + + --Begin Test case NegativeResponseCheck.1.7 + --Description: displayCapabilities.textFields.rows parameter is out of bound + + local outboundValues = {0, 9} + + for i = 1, #outboundValues do + Test["SetDispLay_Res_displayCap_textFields_rows_IsOutBound_".. outboundValues[i] .."_INVALID_DATA"] = function(self) + + --mobile side: sending SetDisplayLayout request + local cid = self.mobileSession:SendRPC("SetDisplayLayout", + { + displayLayout = "ONSCREEN_PRESETS" + }) + + + local responsedParams = createDefaultResponseParamsValues() + + local testParam = + { + { + characterSet = "TYPE2SET", + name = "mainField1", + rows = outboundValues[i], + width = 500 + } + } + + responsedParams.displayCapabilities.textFields = testParam + + --hmi side: expect UI.SetDisplayLayout request + EXPECT_HMICALL("UI.SetDisplayLayout", + { + displayLayout = "ONSCREEN_PRESETS" + }) + :Timeout(iTimeout) + :Do(function(_,data) + --hmi side: sending UI.SetDisplayLayout response + self.hmiConnection:SendResponse(data.id, data.method, "SUCCESS", responsedParams) + end) + + + --mobile side: expect SetDisplayLayout response + EXPECT_RESPONSE(cid, { success = false, resultCode = "INVALID_DATA", info = "Received invalid data on HMI response" }) + :Timeout(iTimeout) + + end + end + + --End Test case NegativeResponseCheck.1.7 + + ----------------------------------------------------------------------------------------- + + --Begin Test case NegativeResponseCheck.1.8 + --Description: displayCapabilities.textFields parameter is minsize = 0 + + Test["SetDispLay_Res_displayCap_textFields_minsize_INVALID_DATA"] = function(self) + + --mobile side: sending SetDisplayLayout request + local cid = self.mobileSession:SendRPC("SetDisplayLayout", + { + displayLayout = "ONSCREEN_PRESETS" + }) + + + local responsedParams = createDefaultResponseParamsValues() + + responsedParams.displayCapabilities.textFields = {} + + --hmi side: expect UI.SetDisplayLayout request + EXPECT_HMICALL("UI.SetDisplayLayout", + { + displayLayout = "ONSCREEN_PRESETS" + }) + :Timeout(iTimeout) + :Do(function(_,data) + --hmi side: sending UI.SetDisplayLayout response + self.hmiConnection:SendResponse(data.id, data.method, "SUCCESS", responsedParams) + end) + + + --mobile side: expect SetDisplayLayout response + EXPECT_RESPONSE(cid, { success = false, resultCode = "INVALID_DATA", info = "Received invalid data on HMI response" }) + :Timeout(iTimeout) + + end + + --End Test case NegativeResponseCheck.1.8 + + ----------------------------------------------------------------------------------------- + + --Begin Test case NegativeResponseCheck.1.9 + --Description: displayCapabilities.textFields parameter is out of upper bound + + Test["SetDispLay_Res_displayCap_textFields_OutUpperBound_101_INVALID_DATA"] = function(self) + + --mobile side: sending SetDisplayLayout request + local cid = self.mobileSession:SendRPC("SetDisplayLayout", + { + displayLayout = "ONSCREEN_PRESETS" + }) + + + local responsedParams = createDefaultResponseParamsValues() + local expectedParams = createExpectedResultParamsValuesOnMobile(false, "INVALID_DATA", "Received invalid data on HMI response") + + + local testParam = {} + local textFieldsName = {"mainField1", "mainField2", "mainField3", "mainField4", "statusBar", "mediaClock", "mediaTrack", "alertText1", "alertText2", "alertText3", "scrollableMessageBody", "initialInteractionText", "navigationText1", "navigationText2", "ETA", "totalDistance", "navigationText", "audioPassThruDisplayText1", "audioPassThruDisplayText2", "sliderHeader", "sliderFooter", "notificationText", "menuName", "secondaryText", "tertiaryText", "timeToDestination", "turnText", "menuTitle", "locationName", "locationDescription", "addressLines", "phoneNumber"} + + --Create 101 items + x = 0 + for j =1, 101 do + x = x + 1 + if x > #textFieldsName then + x = 1 + end + + testParam[j] = + { + characterSet = "TYPE2SET", + name =textFieldsName[x], + rows = 1, + width = 500 + } + end + + + responsedParams.displayCapabilities.textFields = testParam + + + --hmi side: expect UI.SetDisplayLayout request + EXPECT_HMICALL("UI.SetDisplayLayout", + { + displayLayout = "ONSCREEN_PRESETS" + }) + :Timeout(iTimeout) + :Do(function(_,data) + --hmi side: sending UI.SetDisplayLayout response + self.hmiConnection:SendResponse(data.id, data.method, "SUCCESS", responsedParams) + end) + + + --mobile side: expect SetDisplayLayout response + EXPECT_RESPONSE(cid, { success = false, resultCode = "INVALID_DATA", info = "Received invalid data on HMI response" }) + :Timeout(iTimeout) + + end + + --End Test case NegativeResponseCheck.1.9 + + + ------------------------------------------------------------------------------------------ + + --Begin Test case NegativeResponseCheck.1.10 + --Description: displayCapabilities.imageFields.name parameter is out of bound + + -- + local outboundValues = {"is_out_bound"} + + for i = 1, #outboundValues do + Test["SetDispLay_Res_displayCap_imageFields_name_IsOutBound_".. outboundValues[i] .."_INVALID_DATA"] = function(self) + + --mobile side: sending SetDisplayLayout request + local cid = self.mobileSession:SendRPC("SetDisplayLayout", + { + displayLayout = "ONSCREEN_PRESETS" + }) + + + local responsedParams = createDefaultResponseParamsValues() + local expectedParams = createExpectedResultParamsValuesOnMobile(false, "INVALID_DATA", "Received invalid data on HMI response") + + responsedParams.displayCapabilities.imageFields.name = outboundValues[i] + --TODO: update after resolving APPLINK-16052 expectedParams.displayCapabilities.imageFields.name = outboundValues[i] + + + --hmi side: expect UI.SetDisplayLayout request + EXPECT_HMICALL("UI.SetDisplayLayout", + { + displayLayout = "ONSCREEN_PRESETS" + }) + :Timeout(iTimeout) + :Do(function(_,data) + --hmi side: sending UI.SetDisplayLayout response + self.hmiConnection:SendResponse(data.id, data.method, "SUCCESS", responsedParams) + end) + + + --mobile side: expect SetDisplayLayout response + EXPECT_RESPONSE(cid, { success = false, resultCode = "INVALID_DATA", info = "Received invalid data on HMI response" }) + :Timeout(iTimeout) + + end + end + + --End Test case NegativeResponseCheck.1.10 + + ----------------------------------------------------------------------------------------- + + --Begin Test case NegativeResponseCheck.1.11 + --Description: displayCapabilities.imageFields.imageTypeSupported parameter is out of bound + + -- + local outboundValues = {"is_out_bound"} + + for i = 1, #outboundValues do + Test["SetDispLay_Res_displayCap_imageFields_imageTypeSupported_IsOutBound_".. outboundValues[i] .."_INVALID_DATA"] = function(self) + + --mobile side: sending SetDisplayLayout request + local cid = self.mobileSession:SendRPC("SetDisplayLayout", + { + displayLayout = "ONSCREEN_PRESETS" + }) + + + local responsedParams = createDefaultResponseParamsValues() + local expectedParams = createExpectedResultParamsValuesOnMobile(false, "INVALID_DATA", "Received invalid data on HMI response") + + local testParam = {outboundValues[i]} + + responsedParams.displayCapabilities.imageFields.imageTypeSupported = testParam + --TODO: update after resolving APPLINK-16052 expectedParams.displayCapabilities.imageFields.imageTypeSupported = testParam + + + --hmi side: expect UI.SetDisplayLayout request + EXPECT_HMICALL("UI.SetDisplayLayout", + { + displayLayout = "ONSCREEN_PRESETS" + }) + :Timeout(iTimeout) + :Do(function(_,data) + --hmi side: sending UI.SetDisplayLayout response + self.hmiConnection:SendResponse(data.id, data.method, "SUCCESS", responsedParams) + end) + + + --mobile side: expect SetDisplayLayout response + EXPECT_RESPONSE(cid, { success = false, resultCode = "INVALID_DATA", info = "Received invalid data on HMI response" }) + :Timeout(iTimeout) + + end + end + + --End Test case NegativeResponseCheck.1.11 + + ----------------------------------------------------------------------------------------- + + + local outboundValues = {0, 10001} + + --Begin Test case NegativeResponseCheck.1.12 + --Description: displayCapabilities.imageFields.imageResolution.resolutionWidth parameter is out of bound + + for i = 1, #outboundValues do + Test["SetDispLay_Res_displayCap_imageFields_imageResolution_resolutionWidth_IsOutBound_".. outboundValues[i] .."_INVALID_DATA"] = function(self) + + --mobile side: sending SetDisplayLayout request + local cid = self.mobileSession:SendRPC("SetDisplayLayout", + { + displayLayout = "ONSCREEN_PRESETS" + }) + + + local responsedParams = createDefaultResponseParamsValues() + responsedParams.displayCapabilities.imageFields[1].imageResolution.resolutionWidth = outboundValues[i] + + --hmi side: expect UI.SetDisplayLayout request + EXPECT_HMICALL("UI.SetDisplayLayout", + { + displayLayout = "ONSCREEN_PRESETS" + }) + :Timeout(iTimeout) + :Do(function(_,data) + --hmi side: sending UI.SetDisplayLayout response + self.hmiConnection:SendResponse(data.id, data.method, "SUCCESS", responsedParams) + end) + + + --mobile side: expect SetDisplayLayout response + EXPECT_RESPONSE(cid, { success = false, resultCode = "INVALID_DATA", info = "Received invalid data on HMI response" }) + :Timeout(iTimeout) + + end + end + + --End Test case NegativeResponseCheck.1.12 + + ----------------------------------------------------------------------------------------- + + --Begin Test case NegativeResponseCheck.1.13 + --Description: displayCapabilities.imageFields.imageResolution.resolutionHeight parameter is out of bound + + for i = 1, #outboundValues do + Test["SetDispLay_Res_displayCap_imageFields_imageResolution_resolutionHeight_IsOutBound_".. outboundValues[i] .."_INVALID_DATA"] = function(self) + + --mobile side: sending SetDisplayLayout request + local cid = self.mobileSession:SendRPC("SetDisplayLayout", + { + displayLayout = "ONSCREEN_PRESETS" + }) + + + local responsedParams = createDefaultResponseParamsValues() + responsedParams.displayCapabilities.imageFields[1].imageResolution.resolutionHeight = outboundValues[i] + + + --hmi side: expect UI.SetDisplayLayout request + EXPECT_HMICALL("UI.SetDisplayLayout", + { + displayLayout = "ONSCREEN_PRESETS" + }) + :Timeout(iTimeout) + :Do(function(_,data) + --hmi side: sending UI.SetDisplayLayout response + self.hmiConnection:SendResponse(data.id, data.method, "SUCCESS", responsedParams) + end) + + + --mobile side: expect SetDisplayLayout response + EXPECT_RESPONSE(cid, { success = false, resultCode = "INVALID_DATA", info = "Received invalid data on HMI response" }) + :Timeout(iTimeout) + + end + end + + --End Test case NegativeResponseCheck.1.13 + + + ----------------------------------------------------------------------------------------- + + --Begin Test case NegativeResponseCheck.1.14 + --Description: displayCapabilities.imageFields parameter is out of lower bound + + function Test: SetDispLay_Res_displayCap_imageFields_OutLowerBound_INVALID_DATA() + + --mobile side: sending SetDisplayLayout request + local cid = self.mobileSession:SendRPC("SetDisplayLayout", + { + displayLayout = "ONSCREEN_PRESETS" + }) + + + local responsedParams = createDefaultResponseParamsValues() + responsedParams.displayCapabilities.imageFields = {} + + --hmi side: expect UI.SetDisplayLayout request + EXPECT_HMICALL("UI.SetDisplayLayout", + { + displayLayout = "ONSCREEN_PRESETS" + }) + :Timeout(iTimeout) + :Do(function(_,data) + --hmi side: sending UI.SetDisplayLayout response + self.hmiConnection:SendResponse(data.id, data.method, "SUCCESS", responsedParams) + end) + + + --mobile side: expect SetDisplayLayout response + EXPECT_RESPONSE(cid, { success = false, resultCode = "INVALID_DATA", info = "Received invalid data on HMI response" }) + :Timeout(iTimeout) + + end + + --End Test case NegativeResponseCheck.1.14 + + ----------------------------------------------------------------------------------------- + + --Begin Test case NegativeResponseCheck.1.15 + --Description: displayCapabilities.imageFields parameter is out of upper bound + + function Test: SetDispLay_Res_displayCap_imageFields_OutUpperBound_101_INVALID_DATA() + + --mobile side: sending SetDisplayLayout request + local cid = self.mobileSession:SendRPC("SetDisplayLayout", + { + displayLayout = "ONSCREEN_PRESETS" + }) + + + local responsedParams = createDefaultResponseParamsValues() + local testParam = {} + + local imageFieldsName = {"softButtonImage", "choiceImage", "choiceSecondaryImage", "vrHelpItem", "turnIcon", "menuIcon", "cmdIcon", "appIcon", "graphic", "showConstantTBTIcon", "showConstantTBTNextTurnIcon", "locationImage"} + + --Create 101 items + x = 0 + for j =1, 101 do + x = x + 1 + if x > #imageFieldsName then + x = 1 + end + + testParam[j] = + { + imageResolution = + { + resolutionHeight = 64, + resolutionWidth = 64 + }, + imageTypeSupported = {"GRAPHIC_BMP"}, + name = imageFieldsName[x] + } + end + + responsedParams.displayCapabilities.imageFields = testParam + + --hmi side: expect UI.SetDisplayLayout request + EXPECT_HMICALL("UI.SetDisplayLayout", + { + displayLayout = "ONSCREEN_PRESETS" + }) + :Timeout(iTimeout) + :Do(function(_,data) + --hmi side: sending UI.SetDisplayLayout response + self.hmiConnection:SendResponse(data.id, data.method, "SUCCESS", responsedParams) + end) + + + --mobile side: expect SetDisplayLayout response + EXPECT_RESPONSE(cid, { success = false, resultCode = "INVALID_DATA", info = "Received invalid data on HMI response" }) + :Timeout(iTimeout) + + end + + --End Test case NegativeResponseCheck.1.15 + + ----------------------------------------------------------------------------------------- + + --Begin Test case NegativeResponseCheck.1.16 + --Description: displayCapabilities.mediaClockFormats parameter is out of bound + + -- + local outboundValues = {"Out_Of_Bound"} + + for i = 1, #outboundValues do + Test["SetDispLay_Res_displayCap_mediaClockFormats_IsOutBound_".. outboundValues[i] .."_INVALID_DATA"] = function(self) + + --mobile side: sending SetDisplayLayout request + local cid = self.mobileSession:SendRPC("SetDisplayLayout", + { + displayLayout = "ONSCREEN_PRESETS" + }) + + + local responsedParams = createDefaultResponseParamsValues() + + local testParam = + { + outboundValues[i] + } + + responsedParams.displayCapabilities.mediaClockFormats = testParam + + + --hmi side: expect UI.SetDisplayLayout request + EXPECT_HMICALL("UI.SetDisplayLayout", + { + displayLayout = "ONSCREEN_PRESETS" + }) + :Timeout(iTimeout) + :Do(function(_,data) + --hmi side: sending UI.SetDisplayLayout response + self.hmiConnection:SendResponse(data.id, data.method, "SUCCESS", responsedParams) + end) + + + --mobile side: expect SetDisplayLayout response + EXPECT_RESPONSE(cid, { success = false, resultCode = "INVALID_DATA", info = "Received invalid data on HMI response" }) + :Timeout(iTimeout) + + end + end + + --End Test case NegativeResponseCheck.1.16 + + ----------------------------------------------------------------------------------------- + + --Begin Test case NegativeResponseCheck.1.17 + --Description: displayCapabilities.mediaClockFormats parameter is out of lower bound + + function Test: SetDispLay_Res_displayCap_mediaClockFormats_OutLowerBound_0_INVALID_DATA() + + --mobile side: sending SetDisplayLayout request + local cid = self.mobileSession:SendRPC("SetDisplayLayout", + { + displayLayout = "ONSCREEN_PRESETS" + }) + + + local responsedParams = createDefaultResponseParamsValues() + responsedParams.displayCapabilities.mediaClockFormats = {} + + --hmi side: expect UI.SetDisplayLayout request + EXPECT_HMICALL("UI.SetDisplayLayout", + { + displayLayout = "ONSCREEN_PRESETS" + }) + :Timeout(iTimeout) + :Do(function(_,data) + --hmi side: sending UI.SetDisplayLayout response + self.hmiConnection:SendResponse(data.id, data.method, "SUCCESS", responsedParams) + end) + + + --mobile side: expect SetDisplayLayout response + EXPECT_RESPONSE(cid, { success = false, resultCode = "INVALID_DATA", info = "Received invalid data on HMI response" }) + :Timeout(iTimeout) + + end + + --End Test case NegativeResponseCheck.1.17 + + ----------------------------------------------------------------------------------------- + + --Begin Test case NegativeResponseCheck.1.18 + --Description: displayCapabilities.mediaClockFormats parameter is out of upper bound + + function Test: SetDispLay_Res_displayCap_mediaClockFormats_OutUpperBound_101_INVALID_DATA() + + --mobile side: sending SetDisplayLayout request + local cid = self.mobileSession:SendRPC("SetDisplayLayout", + { + displayLayout = "ONSCREEN_PRESETS" + }) + + + local responsedParams = createDefaultResponseParamsValues() + local testParam = + { + "CLOCK1", "CLOCK2", "CLOCK3", "CLOCKTEXT1", "CLOCKTEXT2", "CLOCKTEXT3", "CLOCKTEXT4", "CLOCK1", "CLOCK2", "CLOCK3", + "CLOCK1", "CLOCK2", "CLOCK3", "CLOCKTEXT1", "CLOCKTEXT2", "CLOCKTEXT3", "CLOCKTEXT4", "CLOCK1", "CLOCK2", "CLOCK3", + "CLOCK1", "CLOCK2", "CLOCK3", "CLOCKTEXT1", "CLOCKTEXT2", "CLOCKTEXT3", "CLOCKTEXT4", "CLOCK1", "CLOCK2", "CLOCK3", + "CLOCK1", "CLOCK2", "CLOCK3", "CLOCKTEXT1", "CLOCKTEXT2", "CLOCKTEXT3", "CLOCKTEXT4", "CLOCK1", "CLOCK2", "CLOCK3", + "CLOCK1", "CLOCK2", "CLOCK3", "CLOCKTEXT1", "CLOCKTEXT2", "CLOCKTEXT3", "CLOCKTEXT4", "CLOCK1", "CLOCK2", "CLOCK3", + "CLOCK1", "CLOCK2", "CLOCK3", "CLOCKTEXT1", "CLOCKTEXT2", "CLOCKTEXT3", "CLOCKTEXT4", "CLOCK1", "CLOCK2", "CLOCK3", + "CLOCK1", "CLOCK2", "CLOCK3", "CLOCKTEXT1", "CLOCKTEXT2", "CLOCKTEXT3", "CLOCKTEXT4", "CLOCK1", "CLOCK2", "CLOCK3", + "CLOCK1", "CLOCK2", "CLOCK3", "CLOCKTEXT1", "CLOCKTEXT2", "CLOCKTEXT3", "CLOCKTEXT4", "CLOCK1", "CLOCK2", "CLOCK3", + "CLOCK1", "CLOCK2", "CLOCK3", "CLOCKTEXT1", "CLOCKTEXT2", "CLOCKTEXT3", "CLOCKTEXT4", "CLOCK1", "CLOCK2", "CLOCK3", + "CLOCK1", "CLOCK2", "CLOCK3", "CLOCKTEXT1", "CLOCKTEXT2", "CLOCKTEXT3", "CLOCKTEXT4", "CLOCK1", "CLOCK2", "CLOCK3", + "CLOCK1" + } + + responsedParams.displayCapabilities.mediaClockFormats = testParam + + + --hmi side: expect UI.SetDisplayLayout request + EXPECT_HMICALL("UI.SetDisplayLayout", + { + displayLayout = "ONSCREEN_PRESETS" + }) + :Timeout(iTimeout) + :Do(function(_,data) + --hmi side: sending UI.SetDisplayLayout response + self.hmiConnection:SendResponse(data.id, data.method, "SUCCESS", responsedParams) + end) + + + --mobile side: expect SetDisplayLayout response + EXPECT_RESPONSE(cid, { success = false, resultCode = "INVALID_DATA", info = "Received invalid data on HMI response" }) + :Timeout(iTimeout) + + end + + --End Test case NegativeResponseCheck.1.18 + + ----------------------------------------------------------------------------------------- + + --Begin Test case NegativeResponseCheck.1.19 + --Description: displayCapabilities.imageCapabilities parameter is out of bound + + local outboundValues = {"Is_Out_Bound"} + + for i = 1, #outboundValues do + Test["SetDispLay_Res_displayCap_imageCapabilities_IsOutBound_".. outboundValues[i] .."_INVALID_DATA"] = function(self) + + --mobile side: sending SetDisplayLayout request + local cid = self.mobileSession:SendRPC("SetDisplayLayout", + { + displayLayout = "ONSCREEN_PRESETS" + }) + + + local responsedParams = createDefaultResponseParamsValues() + local testParam = + { + outboundValues[i] + } + + responsedParams.displayCapabilities.imageCapabilities = testParam + + --hmi side: expect UI.SetDisplayLayout request + EXPECT_HMICALL("UI.SetDisplayLayout", + { + displayLayout = "ONSCREEN_PRESETS" + }) + :Timeout(iTimeout) + :Do(function(_,data) + --hmi side: sending UI.SetDisplayLayout response + self.hmiConnection:SendResponse(data.id, data.method, "SUCCESS", responsedParams) + end) + + + --mobile side: expect SetDisplayLayout response + EXPECT_RESPONSE(cid, { success = false, resultCode = "INVALID_DATA", info = "Received invalid data on HMI response" }) + :Timeout(iTimeout) + + end + end + + --End Test case NegativeResponseCheck.1.19 + + ----------------------------------------------------------------------------------------- + + --Begin Test case NegativeResponseCheck.1.20 + --Description: displayCapabilities.imageCapabilities parameter is out lower bound + + function Test: SetDispLay_Res_displayCap_imageCapabilities_OutLowerBound_0_INVALID_DATA() + + --mobile side: sending SetDisplayLayout request + local cid = self.mobileSession:SendRPC("SetDisplayLayout", + { + displayLayout = "ONSCREEN_PRESETS" + }) + + + local responsedParams = createDefaultResponseParamsValues() + responsedParams.displayCapabilities.imageCapabilities = {} + + --hmi side: expect UI.SetDisplayLayout request + EXPECT_HMICALL("UI.SetDisplayLayout", + { + displayLayout = "ONSCREEN_PRESETS" + }) + :Timeout(iTimeout) + :Do(function(_,data) + --hmi side: sending UI.SetDisplayLayout response + self.hmiConnection:SendResponse(data.id, data.method, "SUCCESS", responsedParams) + end) + + + --mobile side: expect SetDisplayLayout response + EXPECT_RESPONSE(cid, { success = false, resultCode = "INVALID_DATA", info = "Received invalid data on HMI response" }) + :Timeout(iTimeout) + + end + + --End Test case NegativeResponseCheck.1.20 + + ----------------------------------------------------------------------------------------- + + --Begin Test case NegativeResponseCheck.1.21 + --Description: displayCapabilities.imageCapabilities parameter is out of upper bound + + function Test: SetDispLay_Res_displayCap_imageCapabilities_OutUpperBound_3_INVALID_DATA() + + --mobile side: sending SetDisplayLayout request + local cid = self.mobileSession:SendRPC("SetDisplayLayout", + { + displayLayout = "ONSCREEN_PRESETS" + }) + + + local responsedParams = createDefaultResponseParamsValues() + local testParam = + { + "STATIC", + "DYNAMIC", + "STATIC" + } + + responsedParams.displayCapabilities.imageCapabilities = testParam + + --hmi side: expect UI.SetDisplayLayout request + EXPECT_HMICALL("UI.SetDisplayLayout", + { + displayLayout = "ONSCREEN_PRESETS" + }) + :Timeout(iTimeout) + :Do(function(_,data) + --hmi side: sending UI.SetDisplayLayout response + self.hmiConnection:SendResponse(data.id, data.method, "SUCCESS", responsedParams) + end) + + + --mobile side: expect SetDisplayLayout response + EXPECT_RESPONSE(cid, { success = false, resultCode = "INVALID_DATA", info = "Received invalid data on HMI response" }) + :Timeout(iTimeout) + + end + + --End Test case NegativeResponseCheck.1.21 + + ----------------------------------------------------------------------------------------- + + + --Begin Test case NegativeResponseCheck.1.22 + --Description: displayCapabilities.graphicSupported parameter is out of bound + + local outboundValues = {"true_false"} + + for i = 1, #outboundValues do + Test["SetDispLay_Res_displayCap_graphicSupported_IsOutBound_".. tostring(outboundValues[i]) .."_INVALID_DATA"] = function(self) + + --mobile side: sending SetDisplayLayout request + local cid = self.mobileSession:SendRPC("SetDisplayLayout", + { + displayLayout = "ONSCREEN_PRESETS" + }) + + + local responsedParams = createDefaultResponseParamsValues() + responsedParams.displayCapabilities.graphicSupported = outboundValues[i] + + --hmi side: expect UI.SetDisplayLayout request + EXPECT_HMICALL("UI.SetDisplayLayout", + { + displayLayout = "ONSCREEN_PRESETS" + }) + :Timeout(iTimeout) + :Do(function(_,data) + --hmi side: sending UI.SetDisplayLayout response + self.hmiConnection:SendResponse(data.id, data.method, "SUCCESS", responsedParams) + end) + + + --mobile side: expect SetDisplayLayout response + EXPECT_RESPONSE(cid, { success = false, resultCode = "INVALID_DATA", info = "Received invalid data on HMI response" }) + :Timeout(iTimeout) + + end + end + + --End Test case NegativeResponseCheck.1.22 + + ----------------------------------------------------------------------------------------- + + --Begin Test case NegativeResponseCheck.1.23 + --Description: displayCapabilities.templatesAvailable parameter is out of bound + + local outboundValues = + { + "", + "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaab" + } + local outboundNames = {"empty","101_characters"} + + for i = 1, #outboundValues do + Test["SetDispLay_Res_displayCap_templatesAvailable_IsOutBound_".. tostring(outboundNames[i]) .."_INVALID_DATA"] = function(self) + + --mobile side: sending SetDisplayLayout request + local cid = self.mobileSession:SendRPC("SetDisplayLayout", + { + displayLayout = "ONSCREEN_PRESETS" + }) + + + local responsedParams = createDefaultResponseParamsValues() + local testParam = + { + outboundValues[i] + } + responsedParams.displayCapabilities.templatesAvailable = testParam + + + --hmi side: expect UI.SetDisplayLayout request + EXPECT_HMICALL("UI.SetDisplayLayout", + { + displayLayout = "ONSCREEN_PRESETS" + }) + :Timeout(iTimeout) + :Do(function(_,data) + --hmi side: sending UI.SetDisplayLayout response + self.hmiConnection:SendResponse(data.id, data.method, "SUCCESS", responsedParams) + end) + + + --mobile side: expect SetDisplayLayout response + EXPECT_RESPONSE(cid, { success = false, resultCode = "INVALID_DATA", info = "Received invalid data on HMI response" }) + :Timeout(iTimeout) + + end + end + + --End Test case NegativeResponseCheck.1.24 + + ----------------------------------------------------------------------------------------- + + --Begin Test case NegativeResponseCheck.1.25 + --Description: displayCapabilities.templatesAvailable parameter is out of lower bound + + function Test: SetDispLay_Res_displayCap_templatesAvailable_size_OutLowerBound_0_INVALID_DATA() + + --mobile side: sending SetDisplayLayout request + local cid = self.mobileSession:SendRPC("SetDisplayLayout", + { + displayLayout = "ONSCREEN_PRESETS" + }) + + + local responsedParams = createDefaultResponseParamsValues() + responsedParams.displayCapabilities.templatesAvailable = {} + + --hmi side: expect UI.SetDisplayLayout request + EXPECT_HMICALL("UI.SetDisplayLayout", + { + displayLayout = "ONSCREEN_PRESETS" + }) + :Timeout(iTimeout) + :Do(function(_,data) + --hmi side: sending UI.SetDisplayLayout response + self.hmiConnection:SendResponse(data.id, data.method, "SUCCESS", responsedParams) + end) + + + --mobile side: expect SetDisplayLayout response + EXPECT_RESPONSE(cid, { success = false, resultCode = "INVALID_DATA", info = "Received invalid data on HMI response" }) + :Timeout(iTimeout) + + end + + --End Test case NegativeResponseCheck.1.26 + + ----------------------------------------------------------------------------------------- + + --Begin Test case NegativeResponseCheck.1.27 + --Description: displayCapabilities.templatesAvailable parameter is out of upper bound + + local outboundValues = + { + "ONSCREEN_PRESETS" + } + + for i = 1, #outboundValues do + Test["SetDispLay_Res_displayCap_templatesAvailable_size_OutUpperBound_101_INVALID_DATA"] = function(self) + + --mobile side: sending SetDisplayLayout request + local cid = self.mobileSession:SendRPC("SetDisplayLayout", + { + displayLayout = "ONSCREEN_PRESETS" + }) + + + local responsedParams = createDefaultResponseParamsValues() + local testParam = {} + + --Create 101 items + x = 0 + for y =1, 100 do + x = x + 1 + if x > #outboundValues then + x = 1 + end + + testParam[y] = {outboundValues[x]} + end + + responsedParams.displayCapabilities.templatesAvailable = testParam + + --hmi side: expect UI.SetDisplayLayout request + EXPECT_HMICALL("UI.SetDisplayLayout", + { + displayLayout = "ONSCREEN_PRESETS" + }) + :Timeout(iTimeout) + :Do(function(_,data) + --hmi side: sending UI.SetDisplayLayout response + self.hmiConnection:SendResponse(data.id, data.method, "SUCCESS", responsedParams) + end) + + + --mobile side: expect SetDisplayLayout response + EXPECT_RESPONSE(cid, { success = false, resultCode = "INVALID_DATA", info = "Received invalid data on HMI response" }) + :Timeout(iTimeout) + + end + end + + --End Test case NegativeResponseCheck.1.27 + ----------------------------------------------------------------------------------------- + + + + --Begin Test case NegativeResponseCheck.1.28 + --Description: displayCapabilities.screenParams.resolution.resolutionHeight parameter is in bound + local outboundValues = {0, 10001} + + for i = 1, #outboundValues do + Test["SetDispLay_Res_displayCap_screenParams_resolution_resolutionHeight_IsOutBound_".. tostring(outboundValues[i]) .."_INVALID_DATA"] = function(self) + + --mobile side: sending SetDisplayLayout request + local cid = self.mobileSession:SendRPC("SetDisplayLayout", + { + displayLayout = "ONSCREEN_PRESETS" + }) + + + local responsedParams = createDefaultResponseParamsValues() responsedParams.displayCapabilities.screenParams.resolution.resolutionHeight = outboundValues[i] + + --hmi side: expect UI.SetDisplayLayout request + EXPECT_HMICALL("UI.SetDisplayLayout", + { + displayLayout = "ONSCREEN_PRESETS" + }) + :Timeout(iTimeout) + :Do(function(_,data) + --hmi side: sending UI.SetDisplayLayout response + self.hmiConnection:SendResponse(data.id, data.method, "SUCCESS", responsedParams) + end) + + + --mobile side: expect SetDisplayLayout response + EXPECT_RESPONSE(cid, { success = false, resultCode = "INVALID_DATA", info = "Received invalid data on HMI response" }) + :Timeout(iTimeout) + + end + end + + --End Test case NegativeResponseCheck.1.28 + + ------------------------------------------------------------------------------------------- + + --Begin Test case NegativeResponseCheck.1.29 + --Description: displayCapabilities.screenParams.resolution.resolutionWidth parameter is out of bound + local outboundValues = {0, 10001} + + for i = 1, #outboundValues do + Test["SetDispLay_Res_displayCap_screenParams_resolution_resolutionWidth_IsOutBound_".. tostring(outboundValues[i]) .."_INVALID_DATA"] = function(self) + + --mobile side: sending SetDisplayLayout request + local cid = self.mobileSession:SendRPC("SetDisplayLayout", + { + displayLayout = "ONSCREEN_PRESETS" + }) + + + local responsedParams = createDefaultResponseParamsValues() + responsedParams.displayCapabilities.screenParams.resolution.resolutionWidth = outboundValues[i] + + --hmi side: expect UI.SetDisplayLayout request + EXPECT_HMICALL("UI.SetDisplayLayout", + { + displayLayout = "ONSCREEN_PRESETS" + }) + :Timeout(iTimeout) + :Do(function(_,data) + --hmi side: sending UI.SetDisplayLayout response + self.hmiConnection:SendResponse(data.id, data.method, "SUCCESS", responsedParams) + end) + + + --mobile side: expect SetDisplayLayout response + EXPECT_RESPONSE(cid, { success = false, resultCode = "INVALID_DATA", info = "Received invalid data on HMI response" }) + :Timeout(iTimeout) + + end + end + + --End Test case NegativeResponseCheck.1.29 + ----------------------------------------------------------------------------------------- + + + + --Begin Test case NegativeResponseCheck.1.30 + --Description: displayCapabilities.screenParams.touchEventAvailable.pressAvailable parameter is out of bound + local outboundValues = {"true_false"} + + for i = 1, #outboundValues do + Test["SetDispLay_Res_displayCap_screenParams_touchEventAvailable_pressAvailable_IsOutBound_".. tostring(outboundValues[i]) .."_INVALID_DATA"] = function(self) + + --mobile side: sending SetDisplayLayout request + local cid = self.mobileSession:SendRPC("SetDisplayLayout", + { + displayLayout = "ONSCREEN_PRESETS" + }) + + + local responsedParams = createDefaultResponseParamsValues() + responsedParams.displayCapabilities.screenParams.touchEventAvailable.pressAvailable = outboundValues[i] + + --hmi side: expect UI.SetDisplayLayout request + EXPECT_HMICALL("UI.SetDisplayLayout", + { + displayLayout = "ONSCREEN_PRESETS" + }) + :Timeout(iTimeout) + :Do(function(_,data) + --hmi side: sending UI.SetDisplayLayout response + self.hmiConnection:SendResponse(data.id, data.method, "SUCCESS", responsedParams) + end) + + + --mobile side: expect SetDisplayLayout response + EXPECT_RESPONSE(cid, { success = false, resultCode = "INVALID_DATA", info = "Received invalid data on HMI response" }) + :Timeout(iTimeout) + + end + end + + --End Test case NegativeResponseCheck.1.30 + + ----------------------------------------------------------------------------------------- + + --Begin Test case NegativeResponseCheck.1.31 + --Description: displayCapabilities.screenParams.touchEventAvailable.multiTouchAvailable parameter is out of bound + local outboundValues = {"true_false"} + + for i = 1, #outboundValues do + Test["SetDispLay_Res_displayCap_screenParams_touchEventAvailable_multiTouchAvailable_IsOutBound_".. tostring(outboundValues[i]) .."_INVALID_DATA"] = function(self) + + --mobile side: sending SetDisplayLayout request + local cid = self.mobileSession:SendRPC("SetDisplayLayout", + { + displayLayout = "ONSCREEN_PRESETS" + }) + + + local responsedParams = createDefaultResponseParamsValues() + responsedParams.displayCapabilities.screenParams.touchEventAvailable.multiTouchAvailable = outboundValues[i] + + --hmi side: expect UI.SetDisplayLayout request + EXPECT_HMICALL("UI.SetDisplayLayout", + { + displayLayout = "ONSCREEN_PRESETS" + }) + :Timeout(iTimeout) + :Do(function(_,data) + --hmi side: sending UI.SetDisplayLayout response + self.hmiConnection:SendResponse(data.id, data.method, "SUCCESS", responsedParams) + end) + + + --mobile side: expect SetDisplayLayout response + EXPECT_RESPONSE(cid, { success = false, resultCode = "INVALID_DATA", info = "Received invalid data on HMI response" }) + :Timeout(iTimeout) + + end + end + + --End Test case NegativeResponseCheck.1.31 + + ----------------------------------------------------------------------------------------- + + --Begin Test case NegativeResponseCheck.1.32 + --Description: displayCapabilities.screenParams.touchEventAvailable.doublePressAvailable parameter is out of bound + local outboundValues = {"true_false"} + + for i = 1, #outboundValues do + Test["SetDispLay_Res_displayCap_screenParams_touchEventAvailable_doublePressAvailable_IsOutBound_".. tostring(outboundValues[i]) .."_INVALID_DATA"] = function(self) + + --mobile side: sending SetDisplayLayout request + local cid = self.mobileSession:SendRPC("SetDisplayLayout", + { + displayLayout = "ONSCREEN_PRESETS" + }) + + + local responsedParams = createDefaultResponseParamsValues() + responsedParams.displayCapabilities.screenParams.touchEventAvailable.doublePressAvailable = outboundValues[i] + + --hmi side: expect UI.SetDisplayLayout request + EXPECT_HMICALL("UI.SetDisplayLayout", + { + displayLayout = "ONSCREEN_PRESETS" + }) + :Timeout(iTimeout) + :Do(function(_,data) + --hmi side: sending UI.SetDisplayLayout response + self.hmiConnection:SendResponse(data.id, data.method, "SUCCESS", responsedParams) + end) + + + --mobile side: expect SetDisplayLayout response + EXPECT_RESPONSE(cid, { success = false, resultCode = "INVALID_DATA", info = "Received invalid data on HMI response" }) + :Timeout(iTimeout) + + end + end + + --End Test case NegativeResponseCheck.1.32 + ----------------------------------------------------------------------------------------- + + + --Begin Test case NegativeResponseCheck.1.33 + --Description: displayCapabilities.numCustomPresetsAvailable parameter is out of bound + + local outboundValues = {0, 101} + + for i = 1, #outboundValues do + Test["SetDispLay_Res_displayCap_numCustomPresetsAvailable_IsOutBound_".. tostring(outboundValues[i]) .."_INVALID_DATA"] = function(self) + + --mobile side: sending SetDisplayLayout request + local cid = self.mobileSession:SendRPC("SetDisplayLayout", + { + displayLayout = "ONSCREEN_PRESETS" + }) + + + local responsedParams = createDefaultResponseParamsValues() + responsedParams.displayCapabilities.numCustomPresetsAvailable = outboundValues[i] + + + --hmi side: expect UI.SetDisplayLayout request + EXPECT_HMICALL("UI.SetDisplayLayout", + { + displayLayout = "ONSCREEN_PRESETS" + }) + :Timeout(iTimeout) + :Do(function(_,data) + --hmi side: sending UI.SetDisplayLayout response + self.hmiConnection:SendResponse(data.id, data.method, "SUCCESS", responsedParams) + end) + + + --mobile side: expect SetDisplayLayout response + EXPECT_RESPONSE(cid, { success = false, resultCode = "INVALID_DATA", info = "Received invalid data on HMI response" }) + :Timeout(iTimeout) + + end + end + + --End Test case NegativeResponseCheck.1.33 + ----------------------------------------------------------------------------------------- + + + --Begin Test case NegativeResponseCheck.1.34 + --Description: buttonCapabilities.name parameter is out of bound + + local outboundValues = {"Out_Of_Bound"} + + for i = 1, #outboundValues do + Test["SetDispLay_Res_butCap_name_IsOutBound_".. tostring(outboundValues[i]) .."_INVALID_DATA"] = function(self) + + --mobile side: sending SetDisplayLayout request + local cid = self.mobileSession:SendRPC("SetDisplayLayout", + { + displayLayout = "ONSCREEN_PRESETS" + }) + + + local responsedParams = createDefaultResponseParamsValues() + responsedParams.buttonCapabilities[1].name = outboundValues[i] + + --hmi side: expect UI.SetDisplayLayout request + EXPECT_HMICALL("UI.SetDisplayLayout", + { + displayLayout = "ONSCREEN_PRESETS" + }) + :Timeout(iTimeout) + :Do(function(_,data) + --hmi side: sending UI.SetDisplayLayout response + self.hmiConnection:SendResponse(data.id, data.method, "SUCCESS", responsedParams) + end) + + + --mobile side: expect SetDisplayLayout response + EXPECT_RESPONSE(cid, { success = false, resultCode = "INVALID_DATA", info = "Received invalid data on HMI response" }) + :Timeout(iTimeout) + + end + end + + --End Test case NegativeResponseCheck.1.34 + + ----------------------------------------------------------------------------------------- + + --Begin Test case NegativeResponseCheck.1.35 + --Description: buttonCapabilities.shortPressAvailable parameter is out of bound + + local outboundValues = {"true_false"} + + for i = 1, #outboundValues do + Test["SetDispLay_Res_butCap_shortPressAvailable_IsOutBound_".. tostring(outboundValues[i]) .."_INVALID_DATA"] = function(self) + + --mobile side: sending SetDisplayLayout request + local cid = self.mobileSession:SendRPC("SetDisplayLayout", + { + displayLayout = "ONSCREEN_PRESETS" + }) + + + local responsedParams = createDefaultResponseParamsValues() + responsedParams.buttonCapabilities[1].shortPressAvailable = outboundValues[i] + + --hmi side: expect UI.SetDisplayLayout request + EXPECT_HMICALL("UI.SetDisplayLayout", + { + displayLayout = "ONSCREEN_PRESETS" + }) + :Timeout(iTimeout) + :Do(function(_,data) + --hmi side: sending UI.SetDisplayLayout response + self.hmiConnection:SendResponse(data.id, data.method, "SUCCESS", responsedParams) + end) + + + --mobile side: expect SetDisplayLayout response + EXPECT_RESPONSE(cid, { success = false, resultCode = "INVALID_DATA", info = "Received invalid data on HMI response" }) + :Timeout(iTimeout) + + end + end + + --End Test case NegativeResponseCheck.1.35 + + ----------------------------------------------------------------------------------------- + + --Begin Test case NegativeResponseCheck.1.36 + --Description: buttonCapabilities.longPressAvailable parameter is out of bound + + local outboundValues = {"true_false"} + + for i = 1, #outboundValues do + Test["SetDispLay_Res_butCap_longPressAvailable_IsOutBound_".. tostring(outboundValues[i]) .."_INVALID_DATA"] = function(self) + + --mobile side: sending SetDisplayLayout request + local cid = self.mobileSession:SendRPC("SetDisplayLayout", + { + displayLayout = "ONSCREEN_PRESETS" + }) + + + local responsedParams = createDefaultResponseParamsValues() + responsedParams.buttonCapabilities[1].longPressAvailable = outboundValues[i] + + --hmi side: expect UI.SetDisplayLayout request + EXPECT_HMICALL("UI.SetDisplayLayout", + { + displayLayout = "ONSCREEN_PRESETS" + }) + :Timeout(iTimeout) + :Do(function(_,data) + --hmi side: sending UI.SetDisplayLayout response + self.hmiConnection:SendResponse(data.id, data.method, "SUCCESS", responsedParams) + end) + + + --mobile side: expect SetDisplayLayout response + EXPECT_RESPONSE(cid, { success = false, resultCode = "INVALID_DATA", info = "Received invalid data on HMI response" }) + :Timeout(iTimeout) + + end + end + + --End Test case NegativeResponseCheck.1.36 + + ----------------------------------------------------------------------------------------- + + --Begin Test case NegativeResponseCheck.1.37 + --Description: buttonCapabilities.upDownAvailable parameter is out of bound + + local outboundValues = {"true_false"} + + for i = 1, #outboundValues do + Test["SetDispLay_Res_butCap_upDownAvailable_IsOutBound_".. tostring(outboundValues[i]) .."_INVALID_DATA"] = function(self) + + --mobile side: sending SetDisplayLayout request + local cid = self.mobileSession:SendRPC("SetDisplayLayout", + { + displayLayout = "ONSCREEN_PRESETS" + }) + + + local responsedParams = createDefaultResponseParamsValues() + responsedParams.buttonCapabilities[1].upDownAvailable = outboundValues[i] + + --hmi side: expect UI.SetDisplayLayout request + EXPECT_HMICALL("UI.SetDisplayLayout", + { + displayLayout = "ONSCREEN_PRESETS" + }) + :Timeout(iTimeout) + :Do(function(_,data) + --hmi side: sending UI.SetDisplayLayout response + self.hmiConnection:SendResponse(data.id, data.method, "SUCCESS", responsedParams) + end) + + + --mobile side: expect SetDisplayLayout response + EXPECT_RESPONSE(cid, { success = false, resultCode = "INVALID_DATA", info = "Received invalid data on HMI response" }) + :Timeout(iTimeout) + + end + end + + --End Test case NegativeResponseCheck.1.37 + + ----------------------------------------------------------------------------------------- + + --Begin Test case NegativeResponseCheck.1.38 + --Description: buttonCapabilities parameter is out of lower bound + + function Test: SetDispLay_Res_butCap_OutLowerBound_0_INVALID_DATA() + + --mobile side: sending SetDisplayLayout request + local cid = self.mobileSession:SendRPC("SetDisplayLayout", + { + displayLayout = "ONSCREEN_PRESETS" + }) + + + local responsedParams = createDefaultResponseParamsValues() + local testParam = + { + } + + responsedParams.buttonCapabilities = testParam + + --hmi side: expect UI.SetDisplayLayout request + EXPECT_HMICALL("UI.SetDisplayLayout", + { + displayLayout = "ONSCREEN_PRESETS" + }) + :Timeout(iTimeout) + :Do(function(_,data) + --hmi side: sending UI.SetDisplayLayout response + self.hmiConnection:SendResponse(data.id, data.method, "SUCCESS", responsedParams) + end) + + + --mobile side: expect SetDisplayLayout response + EXPECT_RESPONSE(cid, { success = false, resultCode = "INVALID_DATA", info = "Received invalid data on HMI response" }) + :Timeout(iTimeout) + + end + + --End Test case NegativeResponseCheck.1.38 + + ----------------------------------------------------------------------------------------- + + --Begin Test case NegativeResponseCheck.1.39 + --Description: buttonCapabilities parameter is out of upper bound + local outboundValues = {"OK", "PRESET_0","PRESET_1","PRESET_2","PRESET_3","PRESET_4","PRESET_5","PRESET_6","PRESET_7","PRESET_8","PRESET_9"} + + function Test: SetDispLay_Res_butCap_OutUpperBound_101_INVALID_DATA() + + --mobile side: sending SetDisplayLayout request + local cid = self.mobileSession:SendRPC("SetDisplayLayout", + { + displayLayout = "ONSCREEN_PRESETS" + }) + + + local responsedParams = createDefaultResponseParamsValues() + local testParam = {} + + --Create 101 items + x = 0 + for y =1, 101 do + x = x + 1 + if x > #outboundValues then + x = 1 + end + + testParam[y] = + { + name = outboundValues[x], + shortPressAvailable = true, + longPressAvailable = true, + upDownAvailable = true + } + end + + responsedParams.buttonCapabilities = testParam + + --hmi side: expect UI.SetDisplayLayout request + EXPECT_HMICALL("UI.SetDisplayLayout", + { + displayLayout = "ONSCREEN_PRESETS" + }) + :Timeout(iTimeout) + :Do(function(_,data) + --hmi side: sending UI.SetDisplayLayout response + self.hmiConnection:SendResponse(data.id, data.method, "SUCCESS", responsedParams) + end) + + + --mobile side: expect SetDisplayLayout response + EXPECT_RESPONSE(cid, { success = false, resultCode = "INVALID_DATA", info = "Received invalid data on HMI response" }) + :Timeout(iTimeout) + + end + + --End Test case NegativeResponseCheck.1.39 + ----------------------------------------------------------------------------------------- + + + --Begin Test case NegativeResponseCheck.1.40 + --Description: softButtonCapabilities.shortPressAvailable parameter is out of bound + + local outboundValues = {"true_false"} + + for i = 1, #outboundValues do + Test["SetDispLay_Res_softButCap_shortPressAvailable_Inoutbound_".. tostring(outboundValues[i]) .."_INVALID_DATA"] = function(self) + + --mobile side: sending SetDisplayLayout request + local cid = self.mobileSession:SendRPC("SetDisplayLayout", + { + displayLayout = "ONSCREEN_PRESETS" + }) + + + local responsedParams = createDefaultResponseParamsValues() + responsedParams.softButtonCapabilities[1].shortPressAvailable = outboundValues[i] + + --hmi side: expect UI.SetDisplayLayout request + EXPECT_HMICALL("UI.SetDisplayLayout", + { + displayLayout = "ONSCREEN_PRESETS" + }) + :Timeout(iTimeout) + :Do(function(_,data) + --hmi side: sending UI.SetDisplayLayout response + self.hmiConnection:SendResponse(data.id, data.method, "SUCCESS", responsedParams) + end) + + + --mobile side: expect SetDisplayLayout response + EXPECT_RESPONSE(cid, { success = false, resultCode = "INVALID_DATA", info = "Received invalid data on HMI response" }) + :Timeout(iTimeout) + + end + end + + --End Test case NegativeResponseCheck.1.40 + + ------------------------------------------------------------------------------------------ + + --Begin Test case NegativeResponseCheck.1.41 + --Description: softButtonCapabilities.longPressAvailable parameter is out of bound + + local outboundValues = {"true_false"} + + for i = 1, #outboundValues do + Test["SetDispLay_Res_softButCap_longPressAvailable_Inoutbound_".. tostring(outboundValues[i]) .."_INVALID_DATA"] = function(self) + + --mobile side: sending SetDisplayLayout request + local cid = self.mobileSession:SendRPC("SetDisplayLayout", + { + displayLayout = "ONSCREEN_PRESETS" + }) + + + local responsedParams = createDefaultResponseParamsValues() + responsedParams.softButtonCapabilities[1].longPressAvailable = outboundValues[i] + + --hmi side: expect UI.SetDisplayLayout request + EXPECT_HMICALL("UI.SetDisplayLayout", + { + displayLayout = "ONSCREEN_PRESETS" + }) + :Timeout(iTimeout) + :Do(function(_,data) + --hmi side: sending UI.SetDisplayLayout response + self.hmiConnection:SendResponse(data.id, data.method, "SUCCESS", responsedParams) + end) + + + --mobile side: expect SetDisplayLayout response + EXPECT_RESPONSE(cid, { success = false, resultCode = "INVALID_DATA", info = "Received invalid data on HMI response" }) + :Timeout(iTimeout) + + end + end + + --End Test case NegativeResponseCheck.1.41 + + ----------------------------------------------------------------------------------------- + + --Begin Test case NegativeResponseCheck.1.42 + --Description: softButtonCapabilities.upDownAvailable parameter is out of bound + + local outboundValues = {"true_false"} + + for i = 1, #outboundValues do + Test["SetDispLay_Res_softButCap_upDownAvailable_Inoutbound_".. tostring(outboundValues[i]) .."_INVALID_DATA"] = function(self) + + --mobile side: sending SetDisplayLayout request + local cid = self.mobileSession:SendRPC("SetDisplayLayout", + { + displayLayout = "ONSCREEN_PRESETS" + }) + + + local responsedParams = createDefaultResponseParamsValues() + responsedParams.softButtonCapabilities[1].upDownAvailable = outboundValues[i] + + --hmi side: expect UI.SetDisplayLayout request + EXPECT_HMICALL("UI.SetDisplayLayout", + { + displayLayout = "ONSCREEN_PRESETS" + }) + :Timeout(iTimeout) + :Do(function(_,data) + --hmi side: sending UI.SetDisplayLayout response + self.hmiConnection:SendResponse(data.id, data.method, "SUCCESS", responsedParams) + end) + + + --mobile side: expect SetDisplayLayout response + EXPECT_RESPONSE(cid, { success = false, resultCode = "INVALID_DATA", info = "Received invalid data on HMI response" }) + :Timeout(iTimeout) + + end + end + + --End Test case NegativeResponseCheck.1.42 + + ----------------------------------------------------------------------------------------- + + --Begin Test case NegativeResponseCheck.1.43 + --Description: softButtonCapabilities.imageSupported parameter is out of bound + + local outboundValues = {"true_false"} + + for i = 1, #outboundValues do + Test["SetDispLay_Res_softButCap_imageSupported_Inoutbound_".. tostring(outboundValues[i]) .."_INVALID_DATA"] = function(self) + + --mobile side: sending SetDisplayLayout request + local cid = self.mobileSession:SendRPC("SetDisplayLayout", + { + displayLayout = "ONSCREEN_PRESETS" + }) + + + local responsedParams = createDefaultResponseParamsValues() + responsedParams.softButtonCapabilities[1].imageSupported = outboundValues[i] + + --hmi side: expect UI.SetDisplayLayout request + EXPECT_HMICALL("UI.SetDisplayLayout", + { + displayLayout = "ONSCREEN_PRESETS" + }) + :Timeout(iTimeout) + :Do(function(_,data) + --hmi side: sending UI.SetDisplayLayout response + self.hmiConnection:SendResponse(data.id, data.method, "SUCCESS", responsedParams) + end) + + + --mobile side: expect SetDisplayLayout response + EXPECT_RESPONSE(cid, { success = false, resultCode = "INVALID_DATA", info = "Received invalid data on HMI response" }) + :Timeout(iTimeout) + + end + end + + --End Test case NegativeResponseCheck.1.43 + + ----------------------------------------------------------------------------------------- + + --Begin Test case NegativeResponseCheck.1.44 + --Description: softButtonCapabilities parameter is out of lower bound + + function Test: SetDispLay_Res_softButCap_OutLowerBound_INVALID_DATA() + + --mobile side: sending SetDisplayLayout request + local cid = self.mobileSession:SendRPC("SetDisplayLayout", + { + displayLayout = "ONSCREEN_PRESETS" + }) + + + local responsedParams = createDefaultResponseParamsValues() + responsedParams.softButtonCapabilities = {} + + --hmi side: expect UI.SetDisplayLayout request + EXPECT_HMICALL("UI.SetDisplayLayout", + { + displayLayout = "ONSCREEN_PRESETS" + }) + :Timeout(iTimeout) + :Do(function(_,data) + --hmi side: sending UI.SetDisplayLayout response + self.hmiConnection:SendResponse(data.id, data.method, "SUCCESS", responsedParams) + end) + + + --mobile side: expect SetDisplayLayout response + EXPECT_RESPONSE(cid, { success = false, resultCode = "INVALID_DATA", info = "Received invalid data on HMI response" }) + :Timeout(iTimeout) + + end + + --End Test case NegativeResponseCheck.1.44 + + ----------------------------------------------------------------------------------------- + + --Begin Test case NegativeResponseCheck.1.45 + --Description: softButtonCapabilities parameter is out of upper bound + + function Test:SetDispLay_Res_softButCap_OutUpperBound_INVALID_DATA() + + --mobile side: sending SetDisplayLayout request + local cid = self.mobileSession:SendRPC("SetDisplayLayout", + { + displayLayout = "ONSCREEN_PRESETS" + }) + + + local responsedParams = createDefaultResponseParamsValues() + local testParam = {} + + --Create 101 items + for y =1, 101 do + testParam[y] = + { + shortPressAvailable = true, + longPressAvailable = true, + upDownAvailable = true, + imageSupported = true + } + end + + responsedParams.softButtonCapabilities = testParam + + --hmi side: expect UI.SetDisplayLayout request + EXPECT_HMICALL("UI.SetDisplayLayout", + { + displayLayout = "ONSCREEN_PRESETS" + }) + :Timeout(iTimeout) + :Do(function(_,data) + --hmi side: sending UI.SetDisplayLayout response + self.hmiConnection:SendResponse(data.id, data.method, "SUCCESS", responsedParams) + end) + + + --mobile side: expect SetDisplayLayout response + EXPECT_RESPONSE(cid, { success = false, resultCode = "INVALID_DATA", info = "Received invalid data on HMI response" }) + :Timeout(iTimeout) + + end + + --End Test case NegativeResponseCheck.1.45 + + ------------------------------------------------------------------------------------------ + + --Begin Test case NegativeResponseCheck.1.46 + --Description: presetBankCapabilities.onScreenPresetsAvailable parameter is out of bound + + local outboundValues = {"true_false"} + + for i = 1, #outboundValues do + Test["SetDispLay_Res_presetBankCap_onScreenPresetsAvailable_Inoutbound_".. tostring(outboundValues[i]) .."_INVALID_DATA"] = function(self) + + --mobile side: sending SetDisplayLayout request + local cid = self.mobileSession:SendRPC("SetDisplayLayout", + { + displayLayout = "ONSCREEN_PRESETS" + }) + + + local responsedParams = createDefaultResponseParamsValues() + responsedParams.presetBankCapabilities.onScreenPresetsAvailable = outboundValues[i] + + --hmi side: expect UI.SetDisplayLayout request + EXPECT_HMICALL("UI.SetDisplayLayout", + { + displayLayout = "ONSCREEN_PRESETS" + }) + :Timeout(iTimeout) + :Do(function(_,data) + --hmi side: sending UI.SetDisplayLayout response + self.hmiConnection:SendResponse(data.id, data.method, "SUCCESS", responsedParams) + end) + + + --mobile side: expect SetDisplayLayout response + EXPECT_RESPONSE(cid, { success = false, resultCode = "INVALID_DATA", info = "Received invalid data on HMI response" }) + :Timeout(iTimeout) + + end + end + + --End Test case NegativeResponseCheck.1.46 + + --End Test case NegativeResponseCheck.1 + + ----------------------------------------------------------------------------------------- + + --Begin Test case NegativeResponseCheck.2 + --Description: check of each parameter is invalid values(empty, missing, nonexistent, duplicate, invalid characters) + + --Requirement id in JAMA/or Jira ID: SDLAQ-CRS-1044 -> SDLAQ-CRS-2680 + + --Verification criteria: SDL returns INVALID_DATA + + --Begin Test case NegativeResponseCheck.2.1 + --Description: check of each parameter is invalid values(empty) + + --Begin Test case NegativeResponseCheck.2.1.1 + --Description: displayCapabilities.displayType parameter is empty + + function Test: SetDispLay_Res_displayCap_displayType_isEmpty_INVALID_DATA() + + --mobile side: sending SetDisplayLayout request + local cid = self.mobileSession:SendRPC("SetDisplayLayout", + { + displayLayout = "ONSCREEN_PRESETS" + }) + + + local responsedParams = createDefaultResponseParamsValues() + responsedParams.displayCapabilities.displayType = "" + + --hmi side: expect UI.SetDisplayLayout request + EXPECT_HMICALL("UI.SetDisplayLayout", + { + displayLayout = "ONSCREEN_PRESETS" + }) + :Timeout(iTimeout) + :Do(function(_,data) + --hmi side: sending UI.SetDisplayLayout response + self.hmiConnection:SendResponse(data.id, data.method, "SUCCESS", responsedParams) + end) + + + --mobile side: expect SetDisplayLayout response + EXPECT_RESPONSE(cid, { success = false, resultCode = "INVALID_DATA", info = "Received invalid data on HMI response" }) + :Timeout(iTimeout) + + end + + --End Test case NegativeResponseCheck.2.1.1 + + ----------------------------------------------------------------------------------------- + + --Begin Test case NegativeResponseCheck.2.1.2 + --Description: displayCapabilities.textFields.name parameter is empty + + local outboundValues = {"is_out_bound"} + + for i = 1, #outboundValues do + Test["SetDispLay_Res_displayCap_textFields_name_isEmpty_INVALID_DATA"] = function(self) + + --mobile side: sending SetDisplayLayout request + local cid = self.mobileSession:SendRPC("SetDisplayLayout", + { + displayLayout = "ONSCREEN_PRESETS" + }) + + + local responsedParams = createDefaultResponseParamsValues() + + local testParam = + { + { + characterSet = "TYPE2SET", + name = "", + rows = 1, + width = 500 + } + } + + responsedParams.displayCapabilities.textFields = testParam + + --hmi side: expect UI.SetDisplayLayout request + EXPECT_HMICALL("UI.SetDisplayLayout", + { + displayLayout = "ONSCREEN_PRESETS" + }) + :Timeout(iTimeout) + :Do(function(_,data) + --hmi side: sending UI.SetDisplayLayout response + self.hmiConnection:SendResponse(data.id, data.method, "SUCCESS", responsedParams) + end) + + + --mobile side: expect SetDisplayLayout response + EXPECT_RESPONSE(cid, { success = false, resultCode = "INVALID_DATA", info = "Received invalid data on HMI response" }) + :Timeout(iTimeout) + + end + end + + --End Test case NegativeResponseCheck.2.1.2 + + ----------------------------------------------------------------------------------------- + + --Begin Test case NegativeResponseCheck.2.1.3 + --Description: displayCapabilities.textFields.characterSet parameter is empty + + function Test:SetDispLay_Res_displayCap_textFields_characterSet_isEmpty_INVALID_DATA() + + --mobile side: sending SetDisplayLayout request + local cid = self.mobileSession:SendRPC("SetDisplayLayout", + { + displayLayout = "ONSCREEN_PRESETS" + }) + + + local responsedParams = createDefaultResponseParamsValues() + + local testParam = + { + { + characterSet = "", + name = "mainField1", + rows = 1, + width = 500 + } + } + + responsedParams.displayCapabilities.textFields = testParam + + --hmi side: expect UI.SetDisplayLayout request + EXPECT_HMICALL("UI.SetDisplayLayout", + { + displayLayout = "ONSCREEN_PRESETS" + }) + :Timeout(iTimeout) + :Do(function(_,data) + --hmi side: sending UI.SetDisplayLayout response + self.hmiConnection:SendResponse(data.id, data.method, "SUCCESS", responsedParams) + end) + + + --mobile side: expect SetDisplayLayout response + EXPECT_RESPONSE(cid, { success = false, resultCode = "INVALID_DATA", info = "Received invalid data on HMI response" }) + :Timeout(iTimeout) + + end + + --End Test case NegativeResponseCheck.2.1.3 + + ----------------------------------------------------------------------------------------- + + --Begin Test case NegativeResponseCheck.2.1.4 + --Description: displayCapabilities.textFields.width parameter is empty + + function Test: SetDispLay_Res_displayCap_textFields_width_isEmpty_INVALID_DATA() + + --mobile side: sending SetDisplayLayout request + local cid = self.mobileSession:SendRPC("SetDisplayLayout", + { + displayLayout = "ONSCREEN_PRESETS" + }) + + + local responsedParams = createDefaultResponseParamsValues() + + local testParam = + { + { + characterSet = "TYPE2SET", + name = "mainField1", + rows = 1, + width = "" + } + } + + responsedParams.displayCapabilities.textFields = testParam + + --hmi side: expect UI.SetDisplayLayout request + EXPECT_HMICALL("UI.SetDisplayLayout", + { + displayLayout = "ONSCREEN_PRESETS" + }) + :Timeout(iTimeout) + :Do(function(_,data) + --hmi side: sending UI.SetDisplayLayout response + self.hmiConnection:SendResponse(data.id, data.method, "SUCCESS", responsedParams) + end) + + + --mobile side: expect SetDisplayLayout response + EXPECT_RESPONSE(cid, { success = false, resultCode = "INVALID_DATA", info = "Received invalid data on HMI response" }) + :Timeout(iTimeout) + + end + + --End Test case NegativeResponseCheck.2.1.4 + + ----------------------------------------------------------------------------------------- + + --Begin Test case NegativeResponseCheck.2.1.5 + --Description: displayCapabilities.textFields.rows parameter is empty + + local outboundValues = {1, 8} + + for i = 1, #outboundValues do + Test["SetDispLay_Res_displayCap_textFields_rows_isEmpty_INVALID_DATA"] = function(self) + + --mobile side: sending SetDisplayLayout request + local cid = self.mobileSession:SendRPC("SetDisplayLayout", + { + displayLayout = "ONSCREEN_PRESETS" + }) + + + local responsedParams = createDefaultResponseParamsValues() + + local testParam = + { + { + characterSet = "TYPE2SET", + name = "mainField1", + rows = "", + width = 500 + } + } + + responsedParams.displayCapabilities.textFields = testParam + + --hmi side: expect UI.SetDisplayLayout request + EXPECT_HMICALL("UI.SetDisplayLayout", + { + displayLayout = "ONSCREEN_PRESETS" + }) + :Timeout(iTimeout) + :Do(function(_,data) + --hmi side: sending UI.SetDisplayLayout response + self.hmiConnection:SendResponse(data.id, data.method, "SUCCESS", responsedParams) + end) + + + --mobile side: expect SetDisplayLayout response + EXPECT_RESPONSE(cid, { success = false, resultCode = "INVALID_DATA", info = "Received invalid data on HMI response" }) + :Timeout(iTimeout) + + end + end + + --End Test case NegativeResponseCheck.2.1.5 + + ----------------------------------------------------------------------------------------- + + --Begin Test case NegativeResponseCheck.2.1.6 + --Description: displayCapabilities.textFields parameter is empty + + function Test: SetDispLay_Res_displayCap_textFields_isEmpty_INVALID_DATA() + + --mobile side: sending SetDisplayLayout request + local cid = self.mobileSession:SendRPC("SetDisplayLayout", + { + displayLayout = "ONSCREEN_PRESETS" + }) + + + local responsedParams = createDefaultResponseParamsValues() + + responsedParams.displayCapabilities.textFields = {{}} + + --hmi side: expect UI.SetDisplayLayout request + EXPECT_HMICALL("UI.SetDisplayLayout", + { + displayLayout = "ONSCREEN_PRESETS" + }) + :Timeout(iTimeout) + :Do(function(_,data) + --hmi side: sending UI.SetDisplayLayout response + self.hmiConnection:SendResponse(data.id, data.method, "SUCCESS", responsedParams) + end) + + + --mobile side: expect SetDisplayLayout response + EXPECT_RESPONSE(cid, { success = false, resultCode = "INVALID_DATA", info = "Received invalid data on HMI response" }) + :Timeout(iTimeout) + + end + + --End Test case NegativeResponseCheck.2.1.6 + + + --Begin Test case NegativeResponseCheck.2.1.7 + --Description: displayCapabilities.imageFields[1].name parameter is empty + + function Test: SetDispLay_Res_displayCap_imageFields_name_isEmpty_INVALID_DATA() + + --mobile side: sending SetDisplayLayout request + local cid = self.mobileSession:SendRPC("SetDisplayLayout", + { + displayLayout = "ONSCREEN_PRESETS" + }) + + + local responsedParams = createDefaultResponseParamsValues() + local expectedParams = createExpectedResultParamsValuesOnMobile(false, "INVALID_DATA", "Received invalid data on HMI response") + + responsedParams.displayCapabilities.imageFields[1].name = "" + + --hmi side: expect UI.SetDisplayLayout request + EXPECT_HMICALL("UI.SetDisplayLayout", + { + displayLayout = "ONSCREEN_PRESETS" + }) + :Timeout(iTimeout) + :Do(function(_,data) + --hmi side: sending UI.SetDisplayLayout response + self.hmiConnection:SendResponse(data.id, data.method, "SUCCESS", responsedParams) + end) + + + --mobile side: expect SetDisplayLayout response + EXPECT_RESPONSE(cid, { success = false, resultCode = "INVALID_DATA", info = "Received invalid data on HMI response" }) + :Timeout(iTimeout) + + end + + --End Test case NegativeResponseCheck.2.1.7 + + ----------------------------------------------------------------------------------------- + + --Begin Test case NegativeResponseCheck.2.1.8 + --Description: displayCapabilities.imageFields[1].imageTypeSupported parameter is empty + + function Test: SetDispLay_Res_displayCap_imageFields_imageTypeSupported_isEmpty_INVALID_DATA() + + --mobile side: sending SetDisplayLayout request + local cid = self.mobileSession:SendRPC("SetDisplayLayout", + { + displayLayout = "ONSCREEN_PRESETS" + }) + + + local responsedParams = createDefaultResponseParamsValues() + responsedParams.displayCapabilities.imageFields[1].imageTypeSupported = {""} + + --hmi side: expect UI.SetDisplayLayout request + EXPECT_HMICALL("UI.SetDisplayLayout", + { + displayLayout = "ONSCREEN_PRESETS" + }) + :Timeout(iTimeout) + :Do(function(_,data) + --hmi side: sending UI.SetDisplayLayout response + self.hmiConnection:SendResponse(data.id, data.method, "SUCCESS", responsedParams) + end) + + + --mobile side: expect SetDisplayLayout response + EXPECT_RESPONSE(cid, { success = false, resultCode = "INVALID_DATA", info = "Received invalid data on HMI response" }) + :Timeout(iTimeout) + + end + + --End Test case NegativeResponseCheck.2.1.8 + + ----------------------------------------------------------------------------------------- + + --Begin Test case NegativeResponseCheck.2.1.9 + --Description: displayCapabilities.imageFields[1].imageResolution.resolutionWidth parameter is empty + + for i = 1, #outboundValues do + Test["SetDispLay_Res_displayCap_imageFields_imageResolution_resolutionWidth_isEmpty_INVALID_DATA"] = function(self) + + --mobile side: sending SetDisplayLayout request + local cid = self.mobileSession:SendRPC("SetDisplayLayout", + { + displayLayout = "ONSCREEN_PRESETS" + }) + + + local responsedParams = createDefaultResponseParamsValues() + responsedParams.displayCapabilities.imageFields[1].imageResolution.resolutionWidth = "" + + --hmi side: expect UI.SetDisplayLayout request + EXPECT_HMICALL("UI.SetDisplayLayout", + { + displayLayout = "ONSCREEN_PRESETS" + }) + :Timeout(iTimeout) + :Do(function(_,data) + --hmi side: sending UI.SetDisplayLayout response + self.hmiConnection:SendResponse(data.id, data.method, "SUCCESS", responsedParams) + end) + + + --mobile side: expect SetDisplayLayout response + EXPECT_RESPONSE(cid, { success = false, resultCode = "INVALID_DATA", info = "Received invalid data on HMI response" }) + :Timeout(iTimeout) + + end + end + + --End Test case NegativeResponseCheck.2.1.9 + + ----------------------------------------------------------------------------------------- + + --Begin Test case NegativeResponseCheck.2.1.10 + --Description: displayCapabilities.imageFields[1].imageResolution.resolutionHeight parameter is empty + + for i = 1, #outboundValues do + Test["SetDispLay_Res_displayCap_imageFields_imageResolution_resolutionHeight_isEmpty_INVALID_DATA"] = function(self) + + --mobile side: sending SetDisplayLayout request + local cid = self.mobileSession:SendRPC("SetDisplayLayout", + { + displayLayout = "ONSCREEN_PRESETS" + }) + + + local responsedParams = createDefaultResponseParamsValues() + responsedParams.displayCapabilities.imageFields[1].imageResolution.resolutionHeight = "" + + --hmi side: expect UI.SetDisplayLayout request + EXPECT_HMICALL("UI.SetDisplayLayout", + { + displayLayout = "ONSCREEN_PRESETS" + }) + :Timeout(iTimeout) + :Do(function(_,data) + --hmi side: sending UI.SetDisplayLayout response + self.hmiConnection:SendResponse(data.id, data.method, "SUCCESS", responsedParams) + end) + + + --mobile side: expect SetDisplayLayout response + EXPECT_RESPONSE(cid, { success = false, resultCode = "INVALID_DATA", info = "Received invalid data on HMI response" }) + :Timeout(iTimeout) + + end + end + + --End Test case NegativeResponseCheck.2.1.10 + ----------------------------------------------------------------------------------------- + + --Begin Test case NegativeResponseCheck.2.1.11 + --Description: displayCapabilities.imageFields parameter is empty + + function Test: SetDispLay_Res_displayCap_imageFields_Contain_EmptyItem_INVALID_DATA() + + --mobile side: sending SetDisplayLayout request + local cid = self.mobileSession:SendRPC("SetDisplayLayout", + { + displayLayout = "ONSCREEN_PRESETS" + }) + + + local responsedParams = createDefaultResponseParamsValues() + responsedParams.displayCapabilities.imageFields = {{}} + + --hmi side: expect UI.SetDisplayLayout request + EXPECT_HMICALL("UI.SetDisplayLayout", + { + displayLayout = "ONSCREEN_PRESETS" + }) + :Timeout(iTimeout) + :Do(function(_,data) + --hmi side: sending UI.SetDisplayLayout response + self.hmiConnection:SendResponse(data.id, data.method, "SUCCESS", responsedParams) + end) + + + --mobile side: expect SetDisplayLayout response + EXPECT_RESPONSE(cid, { success = false, resultCode = "INVALID_DATA", info = "Received invalid data on HMI response" }) + :Timeout(iTimeout) + + end + + --End Test case NegativeResponseCheck.2.1.11 + + ----------------------------------------------------------------------------------------- + + --Begin Test case NegativeResponseCheck.2.1.12 + --Description: displayCapabilities.mediaClockFormats parameter is empty + + function Test: SetDispLay_Res_displayCap_mediaClockFormats_isEmpty_INVALID_DATA() + + --mobile side: sending SetDisplayLayout request + local cid = self.mobileSession:SendRPC("SetDisplayLayout", + { + displayLayout = "ONSCREEN_PRESETS" + }) + + + local responsedParams = createDefaultResponseParamsValues() + responsedParams.displayCapabilities.mediaClockFormats = {""} + + + --hmi side: expect UI.SetDisplayLayout request + EXPECT_HMICALL("UI.SetDisplayLayout", + { + displayLayout = "ONSCREEN_PRESETS" + }) + :Timeout(iTimeout) + :Do(function(_,data) + --hmi side: sending UI.SetDisplayLayout response + self.hmiConnection:SendResponse(data.id, data.method, "SUCCESS", responsedParams) + end) + + + --mobile side: expect SetDisplayLayout response + EXPECT_RESPONSE(cid, { success = false, resultCode = "INVALID_DATA", info = "Received invalid data on HMI response" }) + :Timeout(iTimeout) + + end + + --End Test case NegativeResponseCheck.2.1.12 + + ----------------------------------------------------------------------------------------- + + --Begin Test case NegativeResponseCheck.2.1.13 + --Description: displayCapabilities.imageCapabilities parameter is empty + + function Test: SetDispLay_Res_displayCap_imageCapabilities_isEmpty_INVALID_DATA() + + --mobile side: sending SetDisplayLayout request + local cid = self.mobileSession:SendRPC("SetDisplayLayout", + { + displayLayout = "ONSCREEN_PRESETS" + }) + + + local responsedParams = createDefaultResponseParamsValues() + responsedParams.displayCapabilities.imageCapabilities = {""} + + --hmi side: expect UI.SetDisplayLayout request + EXPECT_HMICALL("UI.SetDisplayLayout", + { + displayLayout = "ONSCREEN_PRESETS" + }) + :Timeout(iTimeout) + :Do(function(_,data) + --hmi side: sending UI.SetDisplayLayout response + self.hmiConnection:SendResponse(data.id, data.method, "SUCCESS", responsedParams) + end) + + + --mobile side: expect SetDisplayLayout response + EXPECT_RESPONSE(cid, { success = false, resultCode = "INVALID_DATA", info = "Received invalid data on HMI response" }) + :Timeout(iTimeout) + + end + + --End Test case NegativeResponseCheck.2.1.13 + + ----------------------------------------------------------------------------------------- + + --Begin Test case NegativeResponseCheck.2.1.14 + --Description: displayCapabilities.graphicSupported parameter is empty + + function Test: SetDispLay_Res_displayCap_graphicSupported_isEmpty_INVALID_DATA() + + --mobile side: sending SetDisplayLayout request + local cid = self.mobileSession:SendRPC("SetDisplayLayout", + { + displayLayout = "ONSCREEN_PRESETS" + }) + + + local responsedParams = createDefaultResponseParamsValues() + responsedParams.displayCapabilities.graphicSupported = "" + + --hmi side: expect UI.SetDisplayLayout request + EXPECT_HMICALL("UI.SetDisplayLayout", + { + displayLayout = "ONSCREEN_PRESETS" + }) + :Timeout(iTimeout) + :Do(function(_,data) + --hmi side: sending UI.SetDisplayLayout response + self.hmiConnection:SendResponse(data.id, data.method, "SUCCESS", responsedParams) + end) + + + --mobile side: expect SetDisplayLayout response + EXPECT_RESPONSE(cid, { success = false, resultCode = "INVALID_DATA", info = "Received invalid data on HMI response" }) + :Timeout(iTimeout) + + end + + --End Test case NegativeResponseCheck.2.1.14 + + ----------------------------------------------------------------------------------------- + + --Begin Test case NegativeResponseCheck.2.1.15 + --Description: displayCapabilities.templatesAvailable parameter is empty + + function Test: SetDispLay_Res_displayCap_templatesAvailable_IsValidValue_INVALID_DATA() + + --mobile side: sending SetDisplayLayout request + local cid = self.mobileSession:SendRPC("SetDisplayLayout", + { + displayLayout = "ONSCREEN_PRESETS" + }) + + + local responsedParams = createDefaultResponseParamsValues() + responsedParams.displayCapabilities.templatesAvailable = {{}} + + --hmi side: expect UI.SetDisplayLayout request + EXPECT_HMICALL("UI.SetDisplayLayout", + { + displayLayout = "ONSCREEN_PRESETS" + }) + :Timeout(iTimeout) + :Do(function(_,data) + --hmi side: sending UI.SetDisplayLayout response + self.hmiConnection:SendResponse(data.id, data.method, "SUCCESS", responsedParams) + end) + + + --mobile side: expect SetDisplayLayout response + EXPECT_RESPONSE(cid, { success = false, resultCode = "INVALID_DATA", info = "Received invalid data on HMI response" }) + :Timeout(iTimeout) + + end + + --End Test case NegativeResponseCheck.2.1.15 + + ----------------------------------------------------------------------------------------- + + + --Begin Test case NegativeResponseCheck.2.1.16 + --Description: displayCapabilities.screenParams.resolution.resolutionHeight parameter is in bound + + function Test: SetDispLay_Res_displayCap_screenParams_resolution_resolutionHeight_isEmpty_INVALID_DATA() + + --mobile side: sending SetDisplayLayout request + local cid = self.mobileSession:SendRPC("SetDisplayLayout", + { + displayLayout = "ONSCREEN_PRESETS" + }) + + + local responsedParams = createDefaultResponseParamsValues() responsedParams.displayCapabilities.screenParams.resolution.resolutionHeight = "" + + --hmi side: expect UI.SetDisplayLayout request + EXPECT_HMICALL("UI.SetDisplayLayout", + { + displayLayout = "ONSCREEN_PRESETS" + }) + :Timeout(iTimeout) + :Do(function(_,data) + --hmi side: sending UI.SetDisplayLayout response + self.hmiConnection:SendResponse(data.id, data.method, "SUCCESS", responsedParams) + end) + + + --mobile side: expect SetDisplayLayout response + EXPECT_RESPONSE(cid, { success = false, resultCode = "INVALID_DATA", info = "Received invalid data on HMI response" }) + :Timeout(iTimeout) + + end + + --End Test case NegativeResponseCheck.2.1.16 + + ----------------------------------------------------------------------------------------- + + --Begin Test case NegativeResponseCheck.2.1.17 + --Description: displayCapabilities.screenParams.resolution.resolutionWidth parameter is empty + + function Test: SetDispLay_Res_displayCap_screenParams_resolution_resolutionWidth_isEmpty_INVALID_DATA() + + --mobile side: sending SetDisplayLayout request + local cid = self.mobileSession:SendRPC("SetDisplayLayout", + { + displayLayout = "ONSCREEN_PRESETS" + }) + + + local responsedParams = createDefaultResponseParamsValues() + responsedParams.displayCapabilities.screenParams.resolution.resolutionWidth = "" + + --hmi side: expect UI.SetDisplayLayout request + EXPECT_HMICALL("UI.SetDisplayLayout", + { + displayLayout = "ONSCREEN_PRESETS" + }) + :Timeout(iTimeout) + :Do(function(_,data) + --hmi side: sending UI.SetDisplayLayout response + self.hmiConnection:SendResponse(data.id, data.method, "SUCCESS", responsedParams) + end) + + + --mobile side: expect SetDisplayLayout response + EXPECT_RESPONSE(cid, { success = false, resultCode = "INVALID_DATA", info = "Received invalid data on HMI response" }) + :Timeout(iTimeout) + + end + + --End Test case NegativeResponseCheck.2.1.17 + + ----------------------------------------------------------------------------------------- + + --Begin Test case NegativeResponseCheck.2.1.18 + --Description: displayCapabilities.screenParams.resolution parameter is empty + + function Test: SetDispLay_Res_displayCap_screenParams_resolution_isEmpty_INVALID_DATA() + + --mobile side: sending SetDisplayLayout request + local cid = self.mobileSession:SendRPC("SetDisplayLayout", + { + displayLayout = "ONSCREEN_PRESETS" + }) + + + local responsedParams = createDefaultResponseParamsValues() + responsedParams.displayCapabilities.screenParams.resolution = {} + + --hmi side: expect UI.SetDisplayLayout request + EXPECT_HMICALL("UI.SetDisplayLayout", + { + displayLayout = "ONSCREEN_PRESETS" + }) + :Timeout(iTimeout) + :Do(function(_,data) + --hmi side: sending UI.SetDisplayLayout response + self.hmiConnection:SendResponse(data.id, data.method, "SUCCESS", responsedParams) + end) + + + --mobile side: expect SetDisplayLayout response + EXPECT_RESPONSE(cid, { success = false, resultCode = "INVALID_DATA", info = "Received invalid data on HMI response" }) + :Timeout(iTimeout) + + end + + --End Test case NegativeResponseCheck.2.1.18 + + ----------------------------------------------------------------------------------------- + + --Begin Test case NegativeResponseCheck.2.1.19 + --Description: displayCapabilities.screenParams.touchEventAvailable.pressAvailable parameter is empty + + Test["SetDispLay_Res_displayCap_screenParams_touchEventAvailable_pressAvailable_isEmpty_INVALID_DATA"] = function(self) + + --mobile side: sending SetDisplayLayout request + local cid = self.mobileSession:SendRPC("SetDisplayLayout", + { + displayLayout = "ONSCREEN_PRESETS" + }) + + + local responsedParams = createDefaultResponseParamsValues() + responsedParams.displayCapabilities.screenParams.touchEventAvailable.pressAvailable = "" + + --hmi side: expect UI.SetDisplayLayout request + EXPECT_HMICALL("UI.SetDisplayLayout", + { + displayLayout = "ONSCREEN_PRESETS" + }) + :Timeout(iTimeout) + :Do(function(_,data) + --hmi side: sending UI.SetDisplayLayout response + self.hmiConnection:SendResponse(data.id, data.method, "SUCCESS", responsedParams) + end) + + + --mobile side: expect SetDisplayLayout response + EXPECT_RESPONSE(cid, { success = false, resultCode = "INVALID_DATA", info = "Received invalid data on HMI response" }) + :Timeout(iTimeout) + + end + + --End Test case NegativeResponseCheck.2.1.19 + + ----------------------------------------------------------------------------------------- + + --Begin Test case NegativeResponseCheck.2.1.20 + --Description: displayCapabilities.screenParams.touchEventAvailable.multiTouchAvailable parameter is empty + + Test["SetDispLay_Res_displayCap_screenParams_touchEventAvailable_multiTouchAvailable_isEmpty_INVALID_DATA"] = function(self) + + --mobile side: sending SetDisplayLayout request + local cid = self.mobileSession:SendRPC("SetDisplayLayout", + { + displayLayout = "ONSCREEN_PRESETS" + }) + + + local responsedParams = createDefaultResponseParamsValues() + responsedParams.displayCapabilities.screenParams.touchEventAvailable.multiTouchAvailable = "" + + --hmi side: expect UI.SetDisplayLayout request + EXPECT_HMICALL("UI.SetDisplayLayout", + { + displayLayout = "ONSCREEN_PRESETS" + }) + :Timeout(iTimeout) + :Do(function(_,data) + --hmi side: sending UI.SetDisplayLayout response + self.hmiConnection:SendResponse(data.id, data.method, "SUCCESS", responsedParams) + end) + + + --mobile side: expect SetDisplayLayout response + EXPECT_RESPONSE(cid, { success = false, resultCode = "INVALID_DATA", info = "Received invalid data on HMI response" }) + :Timeout(iTimeout) + + end + + --End Test case NegativeResponseCheck.2.1.20 + + ----------------------------------------------------------------------------------------- + + --Begin Test case NegativeResponseCheck.2.1.21 + --Description: displayCapabilities.screenParams.touchEventAvailable.doublePressAvailable parameter is empty + + Test["SetDispLay_Res_displayCap_screenParams_touchEventAvailable_doublePressAvailable_isEmpty_INVALID_DATA"] = function(self) + + --mobile side: sending SetDisplayLayout request + local cid = self.mobileSession:SendRPC("SetDisplayLayout", + { + displayLayout = "ONSCREEN_PRESETS" + }) + + + local responsedParams = createDefaultResponseParamsValues() + responsedParams.displayCapabilities.screenParams.touchEventAvailable.doublePressAvailable = "" + + --hmi side: expect UI.SetDisplayLayout request + EXPECT_HMICALL("UI.SetDisplayLayout", + { + displayLayout = "ONSCREEN_PRESETS" + }) + :Timeout(iTimeout) + :Do(function(_,data) + --hmi side: sending UI.SetDisplayLayout response + self.hmiConnection:SendResponse(data.id, data.method, "SUCCESS", responsedParams) + end) + + + --mobile side: expect SetDisplayLayout response + EXPECT_RESPONSE(cid, { success = false, resultCode = "INVALID_DATA", info = "Received invalid data on HMI response" }) + :Timeout(iTimeout) + + end + + --End Test case NegativeResponseCheck.2.1.21 + ----------------------------------------------------------------------------------------- + + --Begin Test case NegativeResponseCheck.2.1.22 + --Description: displayCapabilities.numCustomPresetsAvailable parameter is empty + + Test["SetDispLay_Res_displayCap_numCustomPresetsAvailable_isEmpty_INVALID_DATA"] = function(self) + + --mobile side: sending SetDisplayLayout request + local cid = self.mobileSession:SendRPC("SetDisplayLayout", + { + displayLayout = "ONSCREEN_PRESETS" + }) + + + local responsedParams = createDefaultResponseParamsValues() + responsedParams.displayCapabilities.numCustomPresetsAvailable = "" + + + --hmi side: expect UI.SetDisplayLayout request + EXPECT_HMICALL("UI.SetDisplayLayout", + { + displayLayout = "ONSCREEN_PRESETS" + }) + :Timeout(iTimeout) + :Do(function(_,data) + --hmi side: sending UI.SetDisplayLayout response + self.hmiConnection:SendResponse(data.id, data.method, "SUCCESS", responsedParams) + end) + + + --mobile side: expect SetDisplayLayout response + EXPECT_RESPONSE(cid, { success = false, resultCode = "INVALID_DATA", info = "Received invalid data on HMI response" }) + :Timeout(iTimeout) + + end + + --End Test case NegativeResponseCheck.2.1.22 + ----------------------------------------------------------------------------------------- + + --Begin Test case NegativeResponseCheck.2.1.23 + --Description: buttonCapabilities.name parameter is empty + + Test["SetDispLay_Res_butCap_name_isEmpty_INVALID_DATA"] = function(self) + + --mobile side: sending SetDisplayLayout request + local cid = self.mobileSession:SendRPC("SetDisplayLayout", + { + displayLayout = "ONSCREEN_PRESETS" + }) + + + local responsedParams = createDefaultResponseParamsValues() + responsedParams.buttonCapabilities[1].name = "" + + --hmi side: expect UI.SetDisplayLayout request + EXPECT_HMICALL("UI.SetDisplayLayout", + { + displayLayout = "ONSCREEN_PRESETS" + }) + :Timeout(iTimeout) + :Do(function(_,data) + --hmi side: sending UI.SetDisplayLayout response + self.hmiConnection:SendResponse(data.id, data.method, "SUCCESS", responsedParams) + end) + + + --mobile side: expect SetDisplayLayout response + EXPECT_RESPONSE(cid, { success = false, resultCode = "INVALID_DATA", info = "Received invalid data on HMI response" }) + :Timeout(iTimeout) + + end + + --End Test case NegativeResponseCheck.2.1.23 + + ----------------------------------------------------------------------------------------- + + --Begin Test case NegativeResponseCheck.2.1.24 + --Description: buttonCapabilities.shortPressAvailable parameter is empty + + Test["SetDispLay_Res_butCap_shortPressAvailable_isEmpty_INVALID_DATA"] = function(self) + + --mobile side: sending SetDisplayLayout request + local cid = self.mobileSession:SendRPC("SetDisplayLayout", + { + displayLayout = "ONSCREEN_PRESETS" + }) + + + local responsedParams = createDefaultResponseParamsValues() + responsedParams.buttonCapabilities[1].shortPressAvailable = "" + + --hmi side: expect UI.SetDisplayLayout request + EXPECT_HMICALL("UI.SetDisplayLayout", + { + displayLayout = "ONSCREEN_PRESETS" + }) + :Timeout(iTimeout) + :Do(function(_,data) + --hmi side: sending UI.SetDisplayLayout response + self.hmiConnection:SendResponse(data.id, data.method, "SUCCESS", responsedParams) + end) + + + --mobile side: expect SetDisplayLayout response + EXPECT_RESPONSE(cid, { success = false, resultCode = "INVALID_DATA", info = "Received invalid data on HMI response" }) + :Timeout(iTimeout) + + end + + --End Test case NegativeResponseCheck.2.1.24 + + ------------------------------------------------------------------------------------------ + + --Begin Test case NegativeResponseCheck.2.1.25 + --Description: buttonCapabilities.longPressAvailable parameter is empty + + Test["SetDispLay_Res_butCap_longPressAvailable_isEmpty_INVALID_DATA"] = function(self) + + --mobile side: sending SetDisplayLayout request + local cid = self.mobileSession:SendRPC("SetDisplayLayout", + { + displayLayout = "ONSCREEN_PRESETS" + }) + + + local responsedParams = createDefaultResponseParamsValues() + responsedParams.buttonCapabilities[1].longPressAvailable = "" + + --hmi side: expect UI.SetDisplayLayout request + EXPECT_HMICALL("UI.SetDisplayLayout", + { + displayLayout = "ONSCREEN_PRESETS" + }) + :Timeout(iTimeout) + :Do(function(_,data) + --hmi side: sending UI.SetDisplayLayout response + self.hmiConnection:SendResponse(data.id, data.method, "SUCCESS", responsedParams) + end) + + + --mobile side: expect SetDisplayLayout response + EXPECT_RESPONSE(cid, { success = false, resultCode = "INVALID_DATA", info = "Received invalid data on HMI response" }) + :Timeout(iTimeout) + + end + + --End Test case NegativeResponseCheck.2.1.25 + + ----------------------------------------------------------------------------------------- + + --Begin Test case NegativeResponseCheck.2.1.26 + --Description: buttonCapabilities.upDownAvailable parameter is empty + + Test["SetDispLay_Res_butCap_upDownAvailable_isEmpty_INVALID_DATA"] = function(self) + + --mobile side: sending SetDisplayLayout request + local cid = self.mobileSession:SendRPC("SetDisplayLayout", + { + displayLayout = "ONSCREEN_PRESETS" + }) + + + local responsedParams = createDefaultResponseParamsValues() + responsedParams.buttonCapabilities[1].upDownAvailable = "" + + --hmi side: expect UI.SetDisplayLayout request + EXPECT_HMICALL("UI.SetDisplayLayout", + { + displayLayout = "ONSCREEN_PRESETS" + }) + :Timeout(iTimeout) + :Do(function(_,data) + --hmi side: sending UI.SetDisplayLayout response + self.hmiConnection:SendResponse(data.id, data.method, "SUCCESS", responsedParams) + end) + + + --mobile side: expect SetDisplayLayout response + EXPECT_RESPONSE(cid, { success = false, resultCode = "INVALID_DATA", info = "Received invalid data on HMI response" }) + :Timeout(iTimeout) + + end + + --End Test case NegativeResponseCheck.2.1.26 + + ----------------------------------------------------------------------------------------- + + --Begin Test case NegativeResponseCheck.2.1.27 + --Description: buttonCapabilities parameter is empty item + + Test["SetDispLay_Res_butCap_IsEmptyItem_INVALID_DATA"] = function(self) + + --mobile side: sending SetDisplayLayout request + local cid = self.mobileSession:SendRPC("SetDisplayLayout", + { + displayLayout = "ONSCREEN_PRESETS" + }) + + + local responsedParams = createDefaultResponseParamsValues() + responsedParams.buttonCapabilities = {{}} + + --hmi side: expect UI.SetDisplayLayout request + EXPECT_HMICALL("UI.SetDisplayLayout", + { + displayLayout = "ONSCREEN_PRESETS" + }) + :Timeout(iTimeout) + :Do(function(_,data) + --hmi side: sending UI.SetDisplayLayout response + self.hmiConnection:SendResponse(data.id, data.method, "SUCCESS", responsedParams) + end) + + + --mobile side: expect SetDisplayLayout response + EXPECT_RESPONSE(cid, { success = false, resultCode = "INVALID_DATA", info = "Received invalid data on HMI response" }) + :Timeout(iTimeout) + + end + + --End Test case NegativeResponseCheck.2.1.27 + ----------------------------------------------------------------------------------------- + + + --Begin Test case NegativeResponseCheck.2.1.28 + --Description: softButtonCapabilities.shortPressAvailable parameter is empty + + Test["SetDispLay_Res_softButCap_shortPressAvailable_isEmpty_INVALID_DATA"] = function(self) + + --mobile side: sending SetDisplayLayout request + local cid = self.mobileSession:SendRPC("SetDisplayLayout", + { + displayLayout = "ONSCREEN_PRESETS" + }) + + + local responsedParams = createDefaultResponseParamsValues() + responsedParams.softButtonCapabilities[1].shortPressAvailable = "" + + --hmi side: expect UI.SetDisplayLayout request + EXPECT_HMICALL("UI.SetDisplayLayout", + { + displayLayout = "ONSCREEN_PRESETS" + }) + :Timeout(iTimeout) + :Do(function(_,data) + --hmi side: sending UI.SetDisplayLayout response + self.hmiConnection:SendResponse(data.id, data.method, "SUCCESS", responsedParams) + end) + + + --mobile side: expect SetDisplayLayout response + EXPECT_RESPONSE(cid, { success = false, resultCode = "INVALID_DATA", info = "Received invalid data on HMI response" }) + :Timeout(iTimeout) + + end + + --End Test case NegativeResponseCheck.2.1.28 + + ----------------------------------------------------------------------------------------- + + --Begin Test case NegativeResponseCheck.2.1.29 + --Description: softButtonCapabilities.longPressAvailable parameter is empty + + Test["SetDispLay_Res_softButCap_longPressAvailable_isEmpty_INVALID_DATA"] = function(self) + + --mobile side: sending SetDisplayLayout request + local cid = self.mobileSession:SendRPC("SetDisplayLayout", + { + displayLayout = "ONSCREEN_PRESETS" + }) + + + local responsedParams = createDefaultResponseParamsValues() + responsedParams.softButtonCapabilities[1].longPressAvailable = "" + + --hmi side: expect UI.SetDisplayLayout request + EXPECT_HMICALL("UI.SetDisplayLayout", + { + displayLayout = "ONSCREEN_PRESETS" + }) + :Timeout(iTimeout) + :Do(function(_,data) + --hmi side: sending UI.SetDisplayLayout response + self.hmiConnection:SendResponse(data.id, data.method, "SUCCESS", responsedParams) + end) + + + --mobile side: expect SetDisplayLayout response + EXPECT_RESPONSE(cid, { success = false, resultCode = "INVALID_DATA", info = "Received invalid data on HMI response" }) + :Timeout(iTimeout) + + end + + --End Test case NegativeResponseCheck.2.1.29 + + ----------------------------------------------------------------------------------------- + + --Begin Test case NegativeResponseCheck.2.1.30 + --Description: softButtonCapabilities.upDownAvailable parameter is empty + + Test["SetDispLay_Res_softButCap_upDownAvailable_isEmpty_INVALID_DATA"] = function(self) + + --mobile side: sending SetDisplayLayout request + local cid = self.mobileSession:SendRPC("SetDisplayLayout", + { + displayLayout = "ONSCREEN_PRESETS" + }) + + + local responsedParams = createDefaultResponseParamsValues() + responsedParams.softButtonCapabilities[1].upDownAvailable = "" + + --hmi side: expect UI.SetDisplayLayout request + EXPECT_HMICALL("UI.SetDisplayLayout", + { + displayLayout = "ONSCREEN_PRESETS" + }) + :Timeout(iTimeout) + :Do(function(_,data) + --hmi side: sending UI.SetDisplayLayout response + self.hmiConnection:SendResponse(data.id, data.method, "SUCCESS", responsedParams) + end) + + + --mobile side: expect SetDisplayLayout response + EXPECT_RESPONSE(cid, { success = false, resultCode = "INVALID_DATA", info = "Received invalid data on HMI response" }) + :Timeout(iTimeout) + + end + + --End Test case NegativeResponseCheck.2.1.30 + + ----------------------------------------------------------------------------------------- + + --Begin Test case NegativeResponseCheck.2.1.31 + --Description: softButtonCapabilities.imageSupported parameter is empty + + Test["SetDispLay_Res_softButCap_imageSupported_isEmpty_INVALID_DATA"] = function(self) + + --mobile side: sending SetDisplayLayout request + local cid = self.mobileSession:SendRPC("SetDisplayLayout", + { + displayLayout = "ONSCREEN_PRESETS" + }) + + + local responsedParams = createDefaultResponseParamsValues() + responsedParams.softButtonCapabilities[1].imageSupported = "" + + --hmi side: expect UI.SetDisplayLayout request + EXPECT_HMICALL("UI.SetDisplayLayout", + { + displayLayout = "ONSCREEN_PRESETS" + }) + :Timeout(iTimeout) + :Do(function(_,data) + --hmi side: sending UI.SetDisplayLayout response + self.hmiConnection:SendResponse(data.id, data.method, "SUCCESS", responsedParams) + end) + + + --mobile side: expect SetDisplayLayout response + EXPECT_RESPONSE(cid, { success = false, resultCode = "INVALID_DATA", info = "Received invalid data on HMI response" }) + :Timeout(iTimeout) + + end + + --End Test case NegativeResponseCheck.2.1.31 + + ----------------------------------------------------------------------------------------- + + --Begin Test case NegativeResponseCheck.2.1.32 + --Description: softButtonCapabilities parameter is empty item + + Test["SetDispLay_Res_softButCap_isEmptyItem_INVALID_DATA"] = function(self) + + --mobile side: sending SetDisplayLayout request + local cid = self.mobileSession:SendRPC("SetDisplayLayout", + { + displayLayout = "ONSCREEN_PRESETS" + }) + + + local responsedParams = createDefaultResponseParamsValues() + responsedParams.softButtonCapabilities = {{}} + + --hmi side: expect UI.SetDisplayLayout request + EXPECT_HMICALL("UI.SetDisplayLayout", + { + displayLayout = "ONSCREEN_PRESETS" + }) + :Timeout(iTimeout) + :Do(function(_,data) + --hmi side: sending UI.SetDisplayLayout response + self.hmiConnection:SendResponse(data.id, data.method, "SUCCESS", responsedParams) + end) + + + --mobile side: expect SetDisplayLayout response + EXPECT_RESPONSE(cid, { success = false, resultCode = "INVALID_DATA", info = "Received invalid data on HMI response" }) + :Timeout(iTimeout) + + end + + --End Test case NegativeResponseCheck.2.1.32 + + ----------------------------------------------------------------------------------------- + + + --Begin Test case NegativeResponseCheck.2.1.33 + --Description: presetBankCapabilities.onScreenPresetsAvailable parameter is empty + + Test["SetDispLay_Res_presetBankCap_onScreenPresetsAvailable_isEmpty_INVALID_DATA"] = function(self) + + --mobile side: sending SetDisplayLayout request + local cid = self.mobileSession:SendRPC("SetDisplayLayout", + { + displayLayout = "ONSCREEN_PRESETS" + }) + + + local responsedParams = createDefaultResponseParamsValues() + responsedParams.presetBankCapabilities.onScreenPresetsAvailable = "" + + --hmi side: expect UI.SetDisplayLayout request + EXPECT_HMICALL("UI.SetDisplayLayout", + { + displayLayout = "ONSCREEN_PRESETS" + }) + :Timeout(iTimeout) + :Do(function(_,data) + --hmi side: sending UI.SetDisplayLayout response + self.hmiConnection:SendResponse(data.id, data.method, "SUCCESS", responsedParams) + end) + + + --mobile side: expect SetDisplayLayout response + EXPECT_RESPONSE(cid, { success = false, resultCode = "INVALID_DATA", info = "Received invalid data on HMI response" }) + :Timeout(iTimeout) + + end + + --End Test case NegativeResponseCheck.2.1.33 + + ----------------------------------------------------------------------------------------- + + --Begin Test case NegativeResponseCheck.2.1.34 + --Description: Check presetBankCapabilities parameter is empty + + Test["SetDispLay_Res_presetBankCap_isEmpty_INVALID_DATA"] = function(self) + + --mobile side: sending SetDisplayLayout request + local cid = self.mobileSession:SendRPC("SetDisplayLayout", + { + displayLayout = "ONSCREEN_PRESETS" + }) + + + local responsedParams = createDefaultResponseParamsValues() + responsedParams.presetBankCapabilities = {} + + --hmi side: expect UI.SetDisplayLayout request + EXPECT_HMICALL("UI.SetDisplayLayout", + { + displayLayout = "ONSCREEN_PRESETS" + }) + :Timeout(iTimeout) + :Do(function(_,data) + --hmi side: sending UI.SetDisplayLayout response + self.hmiConnection:SendResponse(data.id, data.method, "SUCCESS", responsedParams) + end) + + + --mobile side: expect SetDisplayLayout response + EXPECT_RESPONSE(cid, { success = false, resultCode = "INVALID_DATA", info = "Received invalid data on HMI response" }) + :Timeout(iTimeout) + + end + + --End Test case NegativeResponseCheck.2.1.34 + + ----------------------------------------------------------------------------------------- + + --End Test case NegativeResponseCheck.2.1 + + + + --Begin Test case NegativeResponseCheck.2.2 + --Description: check of each parameter is invalid values(missing) + + --Begin Test case NegativeResponseCheck.2.2.1 + --Description: displayCapabilities.displayType parameter is missed + + Test["SetDispLay_Res_displayCap_displayType_isMissed_INVALID_DATA"] = function(self) + + --mobile side: sending SetDisplayLayout request + local cid = self.mobileSession:SendRPC("SetDisplayLayout", + { + displayLayout = "ONSCREEN_PRESETS" + }) + + + local responsedParams = createDefaultResponseParamsValues() + responsedParams.displayCapabilities.displayType = nil + + --hmi side: expect UI.SetDisplayLayout request + EXPECT_HMICALL("UI.SetDisplayLayout", + { + displayLayout = "ONSCREEN_PRESETS" + }) + :Timeout(iTimeout) + :Do(function(_,data) + --hmi side: sending UI.SetDisplayLayout response + self.hmiConnection:SendResponse(data.id, data.method, "SUCCESS", responsedParams) + end) + + + --mobile side: expect SetDisplayLayout response + EXPECT_RESPONSE(cid, { success = false, resultCode = "INVALID_DATA", info = "Received invalid data on HMI response" }) + :Timeout(iTimeout) + + end + + --End Test case NegativeResponseCheck.2.2.1 + + ----------------------------------------------------------------------------------------- + + --Begin Test case NegativeResponseCheck.2.2.2 + --Description: displayCapabilities.textFields.name parameter is missed + + Test["SetDispLay_Res_displayCap_textFields_name_isMissed_INVALID_DATA"] = function(self) + + --mobile side: sending SetDisplayLayout request + local cid = self.mobileSession:SendRPC("SetDisplayLayout", + { + displayLayout = "ONSCREEN_PRESETS" + }) + + + local responsedParams = createDefaultResponseParamsValues() + + local testParam = + { + { + characterSet = "TYPE2SET", + --name = "", + rows = 1, + width = 500 + } + } + + responsedParams.displayCapabilities.textFields = testParam + + --hmi side: expect UI.SetDisplayLayout request + EXPECT_HMICALL("UI.SetDisplayLayout", + { + displayLayout = "ONSCREEN_PRESETS" + }) + :Timeout(iTimeout) + :Do(function(_,data) + --hmi side: sending UI.SetDisplayLayout response + self.hmiConnection:SendResponse(data.id, data.method, "SUCCESS", responsedParams) + end) + + + --mobile side: expect SetDisplayLayout response + EXPECT_RESPONSE(cid, { success = false, resultCode = "INVALID_DATA", info = "Received invalid data on HMI response" }) + :Timeout(iTimeout) + + end + + --End Test case NegativeResponseCheck.2.2.2 + + ----------------------------------------------------------------------------------------- + + --Begin Test case NegativeResponseCheck.2.2.3 + --Description: displayCapabilities.textFields.characterSet parameter is missed + + Test["SetDispLay_Res_displayCap_textFields_characterSet_isMissed_INVALID_DATA"] = function(self) + + --mobile side: sending SetDisplayLayout request + local cid = self.mobileSession:SendRPC("SetDisplayLayout", + { + displayLayout = "ONSCREEN_PRESETS" + }) + + + local responsedParams = createDefaultResponseParamsValues() + + local testParam = + { + { + --characterSet = "", + name = "mainField1", + rows = 1, + width = 500 + } + } + + responsedParams.displayCapabilities.textFields = testParam + + --hmi side: expect UI.SetDisplayLayout request + EXPECT_HMICALL("UI.SetDisplayLayout", + { + displayLayout = "ONSCREEN_PRESETS" + }) + :Timeout(iTimeout) + :Do(function(_,data) + --hmi side: sending UI.SetDisplayLayout response + self.hmiConnection:SendResponse(data.id, data.method, "SUCCESS", responsedParams) + end) + + + --mobile side: expect SetDisplayLayout response + EXPECT_RESPONSE(cid, { success = false, resultCode = "INVALID_DATA", info = "Received invalid data on HMI response" }) + :Timeout(iTimeout) + + end + + --End Test case NegativeResponseCheck.2.2.3 + + ----------------------------------------------------------------------------------------- + + --Begin Test case NegativeResponseCheck.2.2.4 + --Description: displayCapabilities.textFields.width parameter is missed + + Test["SetDispLay_Res_displayCap_textFields_width_isMissed_INVALID_DATA"] = function(self) + + --mobile side: sending SetDisplayLayout request + local cid = self.mobileSession:SendRPC("SetDisplayLayout", + { + displayLayout = "ONSCREEN_PRESETS" + }) + + + local responsedParams = createDefaultResponseParamsValues() + + local testParam = + { + { + characterSet = "TYPE2SET", + name = "mainField1", + rows = 1, + --width = "" + } + } + + responsedParams.displayCapabilities.textFields = testParam + + --hmi side: expect UI.SetDisplayLayout request + EXPECT_HMICALL("UI.SetDisplayLayout", + { + displayLayout = "ONSCREEN_PRESETS" + }) + :Timeout(iTimeout) + :Do(function(_,data) + --hmi side: sending UI.SetDisplayLayout response + self.hmiConnection:SendResponse(data.id, data.method, "SUCCESS", responsedParams) + end) + + + --mobile side: expect SetDisplayLayout response + EXPECT_RESPONSE(cid, { success = false, resultCode = "INVALID_DATA", info = "Received invalid data on HMI response" }) + :Timeout(iTimeout) + + end + + --End Test case NegativeResponseCheck.2.2.4 + + ----------------------------------------------------------------------------------------- + + --Begin Test case NegativeResponseCheck.2.2.5 + --Description: displayCapabilities.textFields.rows parameter is missed + + Test["SetDispLay_Res_displayCap_textFields_rows_isMissed_INVALID_DATA"] = function(self) + + --mobile side: sending SetDisplayLayout request + local cid = self.mobileSession:SendRPC("SetDisplayLayout", + { + displayLayout = "ONSCREEN_PRESETS" + }) + + + local responsedParams = createDefaultResponseParamsValues() + + local testParam = + { + { + characterSet = "TYPE2SET", + name = "mainField1", + --rows = "", + width = 500 + } + } + + responsedParams.displayCapabilities.textFields = testParam + + --hmi side: expect UI.SetDisplayLayout request + EXPECT_HMICALL("UI.SetDisplayLayout", + { + displayLayout = "ONSCREEN_PRESETS" + }) + :Timeout(iTimeout) + :Do(function(_,data) + --hmi side: sending UI.SetDisplayLayout response + self.hmiConnection:SendResponse(data.id, data.method, "SUCCESS", responsedParams) + end) + + + --mobile side: expect SetDisplayLayout response + EXPECT_RESPONSE(cid, { success = false, resultCode = "INVALID_DATA", info = "Received invalid data on HMI response" }) + :Timeout(iTimeout) + + end + + --End Test case NegativeResponseCheck.2.2.5 + + ----------------------------------------------------------------------------------------- + + --Begin Test case NegativeResponseCheck.2.2.6 + --Description: displayCapabilities.textFields parameter is missed + + Test["SetDispLay_Res_displayCap_textFields_isMissed_INVALID_DATA"] = function(self) + + --mobile side: sending SetDisplayLayout request + local cid = self.mobileSession:SendRPC("SetDisplayLayout", + { + displayLayout = "ONSCREEN_PRESETS" + }) + + + local responsedParams = createDefaultResponseParamsValues() + + responsedParams.displayCapabilities.textFields = nil + + --hmi side: expect UI.SetDisplayLayout request + EXPECT_HMICALL("UI.SetDisplayLayout", + { + displayLayout = "ONSCREEN_PRESETS" + }) + :Timeout(iTimeout) + :Do(function(_,data) + --hmi side: sending UI.SetDisplayLayout response + self.hmiConnection:SendResponse(data.id, data.method, "SUCCESS", responsedParams) + end) + + + --mobile side: expect SetDisplayLayout response + EXPECT_RESPONSE(cid, { success = false, resultCode = "INVALID_DATA", info = "Received invalid data on HMI response" }) + :Timeout(iTimeout) + + end + + --End Test case NegativeResponseCheck.2.2.6 + + ----------------------------------------------------------------------------------------- + + + --Begin Test case NegativeResponseCheck.2.2.7 + --Description: displayCapabilities.imageFields[1].name parameter is missed + + Test["SetDispLay_Res_displayCap_imageFields_name_isMissed_INVALID_DATA"] = function(self) + + --mobile side: sending SetDisplayLayout request + local cid = self.mobileSession:SendRPC("SetDisplayLayout", + { + displayLayout = "ONSCREEN_PRESETS" + }) + + + local responsedParams = createDefaultResponseParamsValues() + responsedParams.displayCapabilities.imageFields[1].name = nil + + --hmi side: expect UI.SetDisplayLayout request + EXPECT_HMICALL("UI.SetDisplayLayout", + { + displayLayout = "ONSCREEN_PRESETS" + }) + :Timeout(iTimeout) + :Do(function(_,data) + --hmi side: sending UI.SetDisplayLayout response + self.hmiConnection:SendResponse(data.id, data.method, "SUCCESS", responsedParams) + end) + + + --mobile side: expect SetDisplayLayout response + EXPECT_RESPONSE(cid, { success = false, resultCode = "INVALID_DATA", info = "Received invalid data on HMI response" }) + :Timeout(iTimeout) + + end + + --End Test case NegativeResponseCheck.2.2.7 + + ----------------------------------------------------------------------------------------- + + --Begin Test case NegativeResponseCheck.2.2.8 + --Description: displayCapabilities.imageFields[1].imageTypeSupported parameter is missed + + Test["SetDispLay_Res_displayCap_imageFields_imageTypeSupported_isMissed_SUCCESS"] = function(self) + + --mobile side: sending SetDisplayLayout request + local cid = self.mobileSession:SendRPC("SetDisplayLayout", + { + displayLayout = "ONSCREEN_PRESETS" + }) + + + local responsedParams = createDefaultResponseParamsValues() + responsedParams.displayCapabilities.imageFields[1].imageTypeSupported = nil + local expectedParams = createExpectedResultParamsValuesOnMobile(true, "SUCCESS") + --TODO: update after resolving APPLINK-16052 expectedParams.displayCapabilities.imageFields[1].imageTypeSupported = nil + + --hmi side: expect UI.SetDisplayLayout request + EXPECT_HMICALL("UI.SetDisplayLayout", + { + displayLayout = "ONSCREEN_PRESETS" + }) + :Timeout(iTimeout) + :Do(function(_,data) + --hmi side: sending UI.SetDisplayLayout response + self.hmiConnection:SendResponse(data.id, data.method, "SUCCESS", responsedParams) + end) + + + --mobile side: expect SetDisplayLayout response + EXPECT_RESPONSE(cid, expectedParams) + :Timeout(iTimeout) + + end + + --End Test case NegativeResponseCheck.2.2.8 + + ----------------------------------------------------------------------------------------- + + + --Begin Test case NegativeResponseCheck.2.2.9 + --Description: displayCapabilities.imageFields[1].imageResolution.resolutionWidth parameter is missed + + Test["SetDispLay_Res_displayCap_imageFields_imageResolution_resolutionWidth_isMissed_INVALID_DATA"] = function(self) + + --mobile side: sending SetDisplayLayout request + local cid = self.mobileSession:SendRPC("SetDisplayLayout", + { + displayLayout = "ONSCREEN_PRESETS" + }) + + + local responsedParams = createDefaultResponseParamsValues() + responsedParams.displayCapabilities.imageFields[1].imageResolution.resolutionWidth = nil + + --hmi side: expect UI.SetDisplayLayout request + EXPECT_HMICALL("UI.SetDisplayLayout", + { + displayLayout = "ONSCREEN_PRESETS" + }) + :Timeout(iTimeout) + :Do(function(_,data) + --hmi side: sending UI.SetDisplayLayout response + self.hmiConnection:SendResponse(data.id, data.method, "SUCCESS", responsedParams) + end) + + + --mobile side: expect SetDisplayLayout response + EXPECT_RESPONSE(cid, { success = false, resultCode = "INVALID_DATA", info = "Received invalid data on HMI response" }) + :Timeout(iTimeout) + + end + + --End Test case NegativeResponseCheck.2.2.9 + + ----------------------------------------------------------------------------------------- + + --Begin Test case NegativeResponseCheck.2.2.10 + --Description: displayCapabilities.imageFields[1].imageResolution.resolutionHeight parameter is missed + + Test["SetDispLay_Res_displayCap_imageFields_imageResolution_resolutionHeight_isMissed_INVALID_DATA"] = function(self) + + --mobile side: sending SetDisplayLayout request + local cid = self.mobileSession:SendRPC("SetDisplayLayout", + { + displayLayout = "ONSCREEN_PRESETS" + }) + + + local responsedParams = createDefaultResponseParamsValues() + responsedParams.displayCapabilities.imageFields[1].imageResolution.resolutionHeight = nil + + --hmi side: expect UI.SetDisplayLayout request + EXPECT_HMICALL("UI.SetDisplayLayout", + { + displayLayout = "ONSCREEN_PRESETS" + }) + :Timeout(iTimeout) + :Do(function(_,data) + --hmi side: sending UI.SetDisplayLayout response + self.hmiConnection:SendResponse(data.id, data.method, "SUCCESS", responsedParams) + end) + + + --mobile side: expect SetDisplayLayout response + EXPECT_RESPONSE(cid, { success = false, resultCode = "INVALID_DATA", info = "Received invalid data on HMI response" }) + :Timeout(iTimeout) + + end + + --End Test case NegativeResponseCheck.2.2.10 + + ----------------------------------------------------------------------------------------- + + --Begin Test case NegativeResponseCheck.2.2.11 + --Description: displayCapabilities.imageFields[1].imageResolution parameter is missed + + Test["SetDispLay_Res_displayCap_imageFields_imageResolution_isMissed_INVALID_SUCCESS"] = function(self) + + --mobile side: sending SetDisplayLayout request + local cid = self.mobileSession:SendRPC("SetDisplayLayout", + { + displayLayout = "ONSCREEN_PRESETS" + }) + + + local responsedParams = createDefaultResponseParamsValues() + local expectedParams = createExpectedResultParamsValuesOnMobile(true, "SUCCESS") + + responsedParams.displayCapabilities.imageFields[1].imageResolution = nil + --TODO: update after resolving APPLINK-16052 expectedParams.displayCapabilities.imageFields[1].imageResolution = nil + + --hmi side: expect UI.SetDisplayLayout request + EXPECT_HMICALL("UI.SetDisplayLayout", + { + displayLayout = "ONSCREEN_PRESETS" + }) + :Timeout(iTimeout) + :Do(function(_,data) + --hmi side: sending UI.SetDisplayLayout response + self.hmiConnection:SendResponse(data.id, data.method, "SUCCESS", responsedParams) + end) + + + --mobile side: expect SetDisplayLayout response + EXPECT_RESPONSE(cid, expectedParams) + :Timeout(iTimeout) + + end + + --End Test case NegativeResponseCheck.2.2.11 + + ----------------------------------------------------------------------------------------- + + --Begin Test case NegativeResponseCheck.2.2.12 + --Description: displayCapabilities.imageFields parameter is missed + + Test["SetDispLay_Res_displayCap_imageFields_isMissedItem_SUCCESS"] = function(self) + + --mobile side: sending SetDisplayLayout request + local cid = self.mobileSession:SendRPC("SetDisplayLayout", + { + displayLayout = "ONSCREEN_PRESETS" + }) + + + local responsedParams = createDefaultResponseParamsValues() + local expectedParams = createExpectedResultParamsValuesOnMobile(true, "SUCCESS") + responsedParams.displayCapabilities.imageFields = nil + --TODO: update after resolving APPLINK-16052 expectedParams.displayCapabilities.imageFields = nil + + --hmi side: expect UI.SetDisplayLayout request + EXPECT_HMICALL("UI.SetDisplayLayout", + { + displayLayout = "ONSCREEN_PRESETS" + }) + :Timeout(iTimeout) + :Do(function(_,data) + --hmi side: sending UI.SetDisplayLayout response + self.hmiConnection:SendResponse(data.id, data.method, "SUCCESS", responsedParams) + end) + + + --mobile side: expect SetDisplayLayout response + EXPECT_RESPONSE(cid, expectedParams) + :Timeout(iTimeout) + + end + + --End Test case NegativeResponseCheck.2.2.2 + + ----------------------------------------------------------------------------------------- + + --Begin Test case NegativeResponseCheck.2.2.13 + --Description: displayCapabilities.mediaClockFormats parameter is missed + + Test["SetDispLay_Res_displayCap_mediaClockFormats_isMissed_INVALID_DATA"] = function(self) + + --mobile side: sending SetDisplayLayout request + local cid = self.mobileSession:SendRPC("SetDisplayLayout", + { + displayLayout = "ONSCREEN_PRESETS" + }) + + + local responsedParams = createDefaultResponseParamsValues() + responsedParams.displayCapabilities.mediaClockFormats = nil + + + --hmi side: expect UI.SetDisplayLayout request + EXPECT_HMICALL("UI.SetDisplayLayout", + { + displayLayout = "ONSCREEN_PRESETS" + }) + :Timeout(iTimeout) + :Do(function(_,data) + --hmi side: sending UI.SetDisplayLayout response + self.hmiConnection:SendResponse(data.id, data.method, "SUCCESS", responsedParams) + end) + + + --mobile side: expect SetDisplayLayout response + EXPECT_RESPONSE(cid, { success = false, resultCode = "INVALID_DATA", info = "Received invalid data on HMI response" }) + :Timeout(iTimeout) + + end + + --End Test case NegativeResponseCheck.2.2.13 + + ----------------------------------------------------------------------------------------- + + --Begin Test case NegativeResponseCheck.2.2.14 + --Description: displayCapabilities.imageCapabilities parameter is missed + + Test["SetDispLay_Res_displayCap_imageCapabilities_isMissed_SUCCESS"] = function(self) + + --mobile side: sending SetDisplayLayout request + local cid = self.mobileSession:SendRPC("SetDisplayLayout", + { + displayLayout = "ONSCREEN_PRESETS" + }) + + + local responsedParams = createDefaultResponseParamsValues() + local expectedParams = createExpectedResultParamsValuesOnMobile(true, "SUCCESS") + responsedParams.displayCapabilities.imageCapabilities = nil + --TODO: update after resolving APPLINK-16052 expectedParams.displayCapabilities.imageCapabilities = nil + + --hmi side: expect UI.SetDisplayLayout request + EXPECT_HMICALL("UI.SetDisplayLayout", + { + displayLayout = "ONSCREEN_PRESETS" + }) + :Timeout(iTimeout) + :Do(function(_,data) + --hmi side: sending UI.SetDisplayLayout response + self.hmiConnection:SendResponse(data.id, data.method, "SUCCESS", responsedParams) + end) + + + --mobile side: expect SetDisplayLayout response + EXPECT_RESPONSE(cid, expectedParams) + :Timeout(iTimeout) + + end + + --End Test case NegativeResponseCheck.2.2.14 + + ----------------------------------------------------------------------------------------- + + --Begin Test case NegativeResponseCheck.2.2.15 + --Description: displayCapabilities.graphicSupported parameter is missed + + Test["SetDispLay_Res_displayCap_graphicSupported_isMissed_".. tostring(outboundValues[i]) .."_INVALID_DATA"] = function(self) + + --mobile side: sending SetDisplayLayout request + local cid = self.mobileSession:SendRPC("SetDisplayLayout", + { + displayLayout = "ONSCREEN_PRESETS" + }) + + + local responsedParams = createDefaultResponseParamsValues() + responsedParams.displayCapabilities.graphicSupported = nil + + --hmi side: expect UI.SetDisplayLayout request + EXPECT_HMICALL("UI.SetDisplayLayout", + { + displayLayout = "ONSCREEN_PRESETS" + }) + :Timeout(iTimeout) + :Do(function(_,data) + --hmi side: sending UI.SetDisplayLayout response + self.hmiConnection:SendResponse(data.id, data.method, "SUCCESS", responsedParams) + end) + + + --mobile side: expect SetDisplayLayout response + EXPECT_RESPONSE(cid, { success = false, resultCode = "INVALID_DATA", info = "Received invalid data on HMI response" }) + :Timeout(iTimeout) + + end + + --End Test case NegativeResponseCheck.2.2.15 + + ----------------------------------------------------------------------------------------- + + --Begin Test case NegativeResponseCheck.2.2.16 + --Description: displayCapabilities.templatesAvailable parameter is missed + + Test["SetDispLay_Res_displayCap_templatesAvailable_IsValidValue_".. tostring(outboundValues[i]) .."_INVALID_DATA"] = function(self) + + --mobile side: sending SetDisplayLayout request + local cid = self.mobileSession:SendRPC("SetDisplayLayout", + { + displayLayout = "ONSCREEN_PRESETS" + }) + + + local responsedParams = createDefaultResponseParamsValues() + responsedParams.displayCapabilities.templatesAvailable = {{}} + + --hmi side: expect UI.SetDisplayLayout request + EXPECT_HMICALL("UI.SetDisplayLayout", + { + displayLayout = "ONSCREEN_PRESETS" + }) + :Timeout(iTimeout) + :Do(function(_,data) + --hmi side: sending UI.SetDisplayLayout response + self.hmiConnection:SendResponse(data.id, data.method, "SUCCESS", responsedParams) + end) + + + --mobile side: expect SetDisplayLayout response + EXPECT_RESPONSE(cid, { success = false, resultCode = "INVALID_DATA", info = "Received invalid data on HMI response" }) + :Timeout(iTimeout) + + end + + --End Test case NegativeResponseCheck.2.2.16 + + ----------------------------------------------------------------------------------------- + + + --Begin Test case NegativeResponseCheck.2.2.17 + --Description: displayCapabilities.screenParams.resolution.resolutionHeight parameter is in bound + + Test["SetDispLay_Res_displayCap_screenParams_resolution_resolutionHeight_isMissed_INVALID_DATA"] = function(self) + + --mobile side: sending SetDisplayLayout request + local cid = self.mobileSession:SendRPC("SetDisplayLayout", + { + displayLayout = "ONSCREEN_PRESETS" + }) + + + local responsedParams = createDefaultResponseParamsValues() responsedParams.displayCapabilities.screenParams.resolution.resolutionHeight = nil + + --hmi side: expect UI.SetDisplayLayout request + EXPECT_HMICALL("UI.SetDisplayLayout", + { + displayLayout = "ONSCREEN_PRESETS" + }) + :Timeout(iTimeout) + :Do(function(_,data) + --hmi side: sending UI.SetDisplayLayout response + self.hmiConnection:SendResponse(data.id, data.method, "SUCCESS", responsedParams) + end) + + + --mobile side: expect SetDisplayLayout response + EXPECT_RESPONSE(cid, { success = false, resultCode = "INVALID_DATA", info = "Received invalid data on HMI response" }) + :Timeout(iTimeout) + + end + + --End Test case NegativeResponseCheck.2.2.17 + + --Begin Test case NegativeResponseCheck.2.2.18 + --Description: displayCapabilities.screenParams.resolution.resolutionWidth parameter is missed + + Test["SetDispLay_Res_displayCap_screenParams_resolution_resolutionWidth_isMissed_INVALID_DATA"] = function(self) + + --mobile side: sending SetDisplayLayout request + local cid = self.mobileSession:SendRPC("SetDisplayLayout", + { + displayLayout = "ONSCREEN_PRESETS" + }) + + + local responsedParams = createDefaultResponseParamsValues() + responsedParams.displayCapabilities.screenParams.resolution.resolutionWidth = nil + + --hmi side: expect UI.SetDisplayLayout request + EXPECT_HMICALL("UI.SetDisplayLayout", + { + displayLayout = "ONSCREEN_PRESETS" + }) + :Timeout(iTimeout) + :Do(function(_,data) + --hmi side: sending UI.SetDisplayLayout response + self.hmiConnection:SendResponse(data.id, data.method, "SUCCESS", responsedParams) + end) + + + --mobile side: expect SetDisplayLayout response + EXPECT_RESPONSE(cid, { success = false, resultCode = "INVALID_DATA", info = "Received invalid data on HMI response" }) + :Timeout(iTimeout) + + end + + --End Test case NegativeResponseCheck.2.2.18 + + --Begin Test case NegativeResponseCheck.2.2.19 + --Description: displayCapabilities.screenParams.resolution parameter is missed + + Test["SetDispLay_Res_displayCap_screenParams_resolution_isMissed_INVALID_DATA"] = function(self) + + --mobile side: sending SetDisplayLayout request + local cid = self.mobileSession:SendRPC("SetDisplayLayout", + { + displayLayout = "ONSCREEN_PRESETS" + }) + + + local responsedParams = createDefaultResponseParamsValues() + responsedParams.displayCapabilities.screenParams.resolution = nil + + --hmi side: expect UI.SetDisplayLayout request + EXPECT_HMICALL("UI.SetDisplayLayout", + { + displayLayout = "ONSCREEN_PRESETS" + }) + :Timeout(iTimeout) + :Do(function(_,data) + --hmi side: sending UI.SetDisplayLayout response + self.hmiConnection:SendResponse(data.id, data.method, "SUCCESS", responsedParams) + end) + + + --mobile side: expect SetDisplayLayout response + EXPECT_RESPONSE(cid, { success = false, resultCode = "INVALID_DATA", info = "Received invalid data on HMI response" }) + :Timeout(iTimeout) + + end + + --End Test case NegativeResponseCheck.2.2.19 + + ----------------------------------------------------------------------------------------- + + + --Begin Test case NegativeResponseCheck.2.2.20 + --Description: displayCapabilities.screenParams.touchEventAvailable.pressAvailable parameter is missed + + Test["SetDispLay_Res_displayCap_screenParams_touchEventAvailable_pressAvailable_isMissed_INVALID_DATA"] = function(self) + + --mobile side: sending SetDisplayLayout request + local cid = self.mobileSession:SendRPC("SetDisplayLayout", + { + displayLayout = "ONSCREEN_PRESETS" + }) + + + local responsedParams = createDefaultResponseParamsValues() + responsedParams.displayCapabilities.screenParams.touchEventAvailable.pressAvailable = nil + + --hmi side: expect UI.SetDisplayLayout request + EXPECT_HMICALL("UI.SetDisplayLayout", + { + displayLayout = "ONSCREEN_PRESETS" + }) + :Timeout(iTimeout) + :Do(function(_,data) + --hmi side: sending UI.SetDisplayLayout response + self.hmiConnection:SendResponse(data.id, data.method, "SUCCESS", responsedParams) + end) + + + --mobile side: expect SetDisplayLayout response + EXPECT_RESPONSE(cid, { success = false, resultCode = "INVALID_DATA", info = "Received invalid data on HMI response" }) + :Timeout(iTimeout) + + end + + --End Test case NegativeResponseCheck.2.2.20 + + --Begin Test case NegativeResponseCheck.2.2.21 + --Description: displayCapabilities.screenParams.touchEventAvailable.multiTouchAvailable parameter is missed + + Test["SetDispLay_Res_displayCap_screenParams_touchEventAvailable_multiTouchAvailable_isMissed_INVALID_DATA"] = function(self) + + --mobile side: sending SetDisplayLayout request + local cid = self.mobileSession:SendRPC("SetDisplayLayout", + { + displayLayout = "ONSCREEN_PRESETS" + }) + + + local responsedParams = createDefaultResponseParamsValues() + responsedParams.displayCapabilities.screenParams.touchEventAvailable.multiTouchAvailable = nil + + --hmi side: expect UI.SetDisplayLayout request + EXPECT_HMICALL("UI.SetDisplayLayout", + { + displayLayout = "ONSCREEN_PRESETS" + }) + :Timeout(iTimeout) + :Do(function(_,data) + --hmi side: sending UI.SetDisplayLayout response + self.hmiConnection:SendResponse(data.id, data.method, "SUCCESS", responsedParams) + end) + + + --mobile side: expect SetDisplayLayout response + EXPECT_RESPONSE(cid, { success = false, resultCode = "INVALID_DATA", info = "Received invalid data on HMI response" }) + :Timeout(iTimeout) + + end + + --End Test case NegativeResponseCheck.2.2.21 + + --Begin Test case NegativeResponseCheck.2.2.22 + --Description: displayCapabilities.screenParams.touchEventAvailable.doublePressAvailable parameter is missed + + Test["SetDispLay_Res_displayCap_screenParams_touchEventAvailable_doublePressAvailable_isMissed_INVALID_DATA"] = function(self) + + --mobile side: sending SetDisplayLayout request + local cid = self.mobileSession:SendRPC("SetDisplayLayout", + { + displayLayout = "ONSCREEN_PRESETS" + }) + + + local responsedParams = createDefaultResponseParamsValues() + responsedParams.displayCapabilities.screenParams.touchEventAvailable.doublePressAvailable = nil + + --hmi side: expect UI.SetDisplayLayout request + EXPECT_HMICALL("UI.SetDisplayLayout", + { + displayLayout = "ONSCREEN_PRESETS" + }) + :Timeout(iTimeout) + :Do(function(_,data) + --hmi side: sending UI.SetDisplayLayout response + self.hmiConnection:SendResponse(data.id, data.method, "SUCCESS", responsedParams) + end) + + + --mobile side: expect SetDisplayLayout response + EXPECT_RESPONSE(cid, { success = false, resultCode = "INVALID_DATA", info = "Received invalid data on HMI response" }) + :Timeout(iTimeout) + + end + + --End Test case NegativeResponseCheck.2.2.22 + + ----------------------------------------------------------------------------------------- + + + --Begin Test case NegativeResponseCheck.2.2.23 + --Description: displayCapabilities.numCustomPresetsAvailable parameter is missed + + Test["SetDispLay_Res_displayCap_numCustomPresetsAvailable_isMissed_SUCCESS"] = function(self) + + --mobile side: sending SetDisplayLayout request + local cid = self.mobileSession:SendRPC("SetDisplayLayout", + { + displayLayout = "ONSCREEN_PRESETS" + }) + + + local responsedParams = createDefaultResponseParamsValues() + local expectedParams = createExpectedResultParamsValuesOnMobile(true, "SUCCESS") + responsedParams.displayCapabilities.numCustomPresetsAvailable = nil + expectedParams.displayCapabilities.numCustomPresetsAvailable = nil + + + --hmi side: expect UI.SetDisplayLayout request + EXPECT_HMICALL("UI.SetDisplayLayout", + { + displayLayout = "ONSCREEN_PRESETS" + }) + :Timeout(iTimeout) + :Do(function(_,data) + --hmi side: sending UI.SetDisplayLayout response + self.hmiConnection:SendResponse(data.id, data.method, "SUCCESS", responsedParams) + end) + + + --mobile side: expect SetDisplayLayout response + EXPECT_RESPONSE(cid, expectedParams) + :Timeout(iTimeout) + + end + + --End Test case NegativeResponseCheck.2.2.23 + + ----------------------------------------------------------------------------------------- + + --Begin Test case NegativeResponseCheck.2.2.24 + --Description: buttonCapabilities.name parameter is missed + + Test["SetDispLay_Res_butCap_name_isMissed_INVALID_DATA"] = function(self) + + --mobile side: sending SetDisplayLayout request + local cid = self.mobileSession:SendRPC("SetDisplayLayout", + { + displayLayout = "ONSCREEN_PRESETS" + }) + + + local responsedParams = createDefaultResponseParamsValues() + responsedParams.buttonCapabilities[1].name = nil + + --hmi side: expect UI.SetDisplayLayout request + EXPECT_HMICALL("UI.SetDisplayLayout", + { + displayLayout = "ONSCREEN_PRESETS" + }) + :Timeout(iTimeout) + :Do(function(_,data) + --hmi side: sending UI.SetDisplayLayout response + self.hmiConnection:SendResponse(data.id, data.method, "SUCCESS", responsedParams) + end) + + + --mobile side: expect SetDisplayLayout response + EXPECT_RESPONSE(cid, { success = false, resultCode = "INVALID_DATA", info = "Received invalid data on HMI response" }) + :Timeout(iTimeout) + + end + + --End Test case NegativeResponseCheck.2.2.24 + + --Begin Test case NegativeResponseCheck.2.2.25 + --Description: buttonCapabilities.shortPressAvailable parameter is missed + Test["SetDispLay_Res_butCap_shortPressAvailable_isMissed_INVALID_DATA"] = function(self) + + --mobile side: sending SetDisplayLayout request + local cid = self.mobileSession:SendRPC("SetDisplayLayout", + { + displayLayout = "ONSCREEN_PRESETS" + }) + + + local responsedParams = createDefaultResponseParamsValues() + responsedParams.buttonCapabilities[1].shortPressAvailable = nil + + --hmi side: expect UI.SetDisplayLayout request + EXPECT_HMICALL("UI.SetDisplayLayout", + { + displayLayout = "ONSCREEN_PRESETS" + }) + :Timeout(iTimeout) + :Do(function(_,data) + --hmi side: sending UI.SetDisplayLayout response + self.hmiConnection:SendResponse(data.id, data.method, "SUCCESS", responsedParams) + end) + + + --mobile side: expect SetDisplayLayout response + EXPECT_RESPONSE(cid, { success = false, resultCode = "INVALID_DATA", info = "Received invalid data on HMI response" }) + :Timeout(iTimeout) + + end + + --End Test case NegativeResponseCheck.2.2.25 + + + --Begin Test case NegativeResponseCheck.2.2.26 + --Description: buttonCapabilities.longPressAvailable parameter is missed + Test["SetDispLay_Res_butCap_longPressAvailable_isMissed_INVALID_DATA"] = function(self) + + --mobile side: sending SetDisplayLayout request + local cid = self.mobileSession:SendRPC("SetDisplayLayout", + { + displayLayout = "ONSCREEN_PRESETS" + }) + + + local responsedParams = createDefaultResponseParamsValues() + responsedParams.buttonCapabilities[1].longPressAvailable = nil + + --hmi side: expect UI.SetDisplayLayout request + EXPECT_HMICALL("UI.SetDisplayLayout", + { + displayLayout = "ONSCREEN_PRESETS" + }) + :Timeout(iTimeout) + :Do(function(_,data) + --hmi side: sending UI.SetDisplayLayout response + self.hmiConnection:SendResponse(data.id, data.method, "SUCCESS", responsedParams) + end) + + + --mobile side: expect SetDisplayLayout response + EXPECT_RESPONSE(cid, { success = false, resultCode = "INVALID_DATA", info = "Received invalid data on HMI response" }) + :Timeout(iTimeout) + + end + + --End Test case NegativeResponseCheck.2.2.26 + + --Begin Test case NegativeResponseCheck.2.2.27 + --Description: buttonCapabilities.upDownAvailable parameter is missed + Test["SetDispLay_Res_butCap_upDownAvailable_isMissed_INVALID_DATA"] = function(self) + + --mobile side: sending SetDisplayLayout request + local cid = self.mobileSession:SendRPC("SetDisplayLayout", + { + displayLayout = "ONSCREEN_PRESETS" + }) + + + local responsedParams = createDefaultResponseParamsValues() + responsedParams.buttonCapabilities[1].upDownAvailable = nil + + --hmi side: expect UI.SetDisplayLayout request + EXPECT_HMICALL("UI.SetDisplayLayout", + { + displayLayout = "ONSCREEN_PRESETS" + }) + :Timeout(iTimeout) + :Do(function(_,data) + --hmi side: sending UI.SetDisplayLayout response + self.hmiConnection:SendResponse(data.id, data.method, "SUCCESS", responsedParams) + end) + + + --mobile side: expect SetDisplayLayout response + EXPECT_RESPONSE(cid, { success = false, resultCode = "INVALID_DATA", info = "Received invalid data on HMI response" }) + :Timeout(iTimeout) + + end + + --End Test case NegativeResponseCheck.2.2.27 + + + --Begin Test case NegativeResponseCheck.2.2.28 + --Description: buttonCapabilities parameter is empty item + + Test["SetDispLay_Res_butCap_isMissedItem_SUCCESS"] = function(self) + + --mobile side: sending SetDisplayLayout request + local cid = self.mobileSession:SendRPC("SetDisplayLayout", + { + displayLayout = "ONSCREEN_PRESETS" + }) + + + local responsedParams = createDefaultResponseParamsValues() + local expectedParams = createExpectedResultParamsValuesOnMobile(true, "SUCCESS") + responsedParams.buttonCapabilities = nil + expectedParams.buttonCapabilities = nil + + --hmi side: expect UI.SetDisplayLayout request + EXPECT_HMICALL("UI.SetDisplayLayout", + { + displayLayout = "ONSCREEN_PRESETS" + }) + :Timeout(iTimeout) + :Do(function(_,data) + --hmi side: sending UI.SetDisplayLayout response + self.hmiConnection:SendResponse(data.id, data.method, "SUCCESS", responsedParams) + end) + + + --mobile side: expect SetDisplayLayout response + EXPECT_RESPONSE(cid, expectedParams) + :Timeout(iTimeout) + + end + + --End Test case NegativeResponseCheck.2.2.28 + + ----------------------------------------------------------------------------------------- + + --Begin Test case NegativeResponseCheck.2.2.29 + --Description: softButtonCapabilities.shortPressAvailable parameter is missed + + Test["SetDispLay_Res_softButCap_shortPressAvailable_ismissed_INVALID_DATA"] = function(self) + + --mobile side: sending SetDisplayLayout request + local cid = self.mobileSession:SendRPC("SetDisplayLayout", + { + displayLayout = "ONSCREEN_PRESETS" + }) + + + local responsedParams = createDefaultResponseParamsValues() + responsedParams.softButtonCapabilities[1].shortPressAvailable = nil + + --hmi side: expect UI.SetDisplayLayout request + EXPECT_HMICALL("UI.SetDisplayLayout", + { + displayLayout = "ONSCREEN_PRESETS" + }) + :Timeout(iTimeout) + :Do(function(_,data) + --hmi side: sending UI.SetDisplayLayout response + self.hmiConnection:SendResponse(data.id, data.method, "SUCCESS", responsedParams) + end) + + + --mobile side: expect SetDisplayLayout response + EXPECT_RESPONSE(cid, { success = false, resultCode = "INVALID_DATA", info = "Received invalid data on HMI response" }) + :Timeout(iTimeout) + + end + + --End Test case NegativeResponseCheck.2.2.29 + + --Begin Test case NegativeResponseCheck.2.2.30 + --Description: softButtonCapabilities.longPressAvailable parameter is missed + + Test["SetDispLay_Res_softButCap_longPressAvailable_ismissed_INVALID_DATA"] = function(self) + + --mobile side: sending SetDisplayLayout request + local cid = self.mobileSession:SendRPC("SetDisplayLayout", + { + displayLayout = "ONSCREEN_PRESETS" + }) + + + local responsedParams = createDefaultResponseParamsValues() + responsedParams.softButtonCapabilities[1].longPressAvailable = nil + + --hmi side: expect UI.SetDisplayLayout request + EXPECT_HMICALL("UI.SetDisplayLayout", + { + displayLayout = "ONSCREEN_PRESETS" + }) + :Timeout(iTimeout) + :Do(function(_,data) + --hmi side: sending UI.SetDisplayLayout response + self.hmiConnection:SendResponse(data.id, data.method, "SUCCESS", responsedParams) + end) + + + --mobile side: expect SetDisplayLayout response + EXPECT_RESPONSE(cid, { success = false, resultCode = "INVALID_DATA", info = "Received invalid data on HMI response" }) + :Timeout(iTimeout) + + end + + --End Test case NegativeResponseCheck.2.2.30 + + --Begin Test case NegativeResponseCheck.2.2.31 + --Description: softButtonCapabilities.upDownAvailable parameter is missed + + Test["SetDispLay_Res_softButCap_upDownAvailable_ismissed_INVALID_DATA"] = function(self) + + --mobile side: sending SetDisplayLayout request + local cid = self.mobileSession:SendRPC("SetDisplayLayout", + { + displayLayout = "ONSCREEN_PRESETS" + }) + + + local responsedParams = createDefaultResponseParamsValues() + responsedParams.softButtonCapabilities[1].upDownAvailable = nil + + --hmi side: expect UI.SetDisplayLayout request + EXPECT_HMICALL("UI.SetDisplayLayout", + { + displayLayout = "ONSCREEN_PRESETS" + }) + :Timeout(iTimeout) + :Do(function(_,data) + --hmi side: sending UI.SetDisplayLayout response + self.hmiConnection:SendResponse(data.id, data.method, "SUCCESS", responsedParams) + end) + + + --mobile side: expect SetDisplayLayout response + EXPECT_RESPONSE(cid, { success = false, resultCode = "INVALID_DATA", info = "Received invalid data on HMI response" }) + :Timeout(iTimeout) + + end + + --End Test case NegativeResponseCheck.2.2.31 + + --Begin Test case NegativeResponseCheck.2.2.32 + --Description: softButtonCapabilities.imageSupported parameter is missed + + Test["SetDispLay_Res_softButCap_imageSupported_ismissed_INVALID_DATA"] = function(self) + + --mobile side: sending SetDisplayLayout request + local cid = self.mobileSession:SendRPC("SetDisplayLayout", + { + displayLayout = "ONSCREEN_PRESETS" + }) + + + local responsedParams = createDefaultResponseParamsValues() + responsedParams.softButtonCapabilities[1].imageSupported = nil + + --hmi side: expect UI.SetDisplayLayout request + EXPECT_HMICALL("UI.SetDisplayLayout", + { + displayLayout = "ONSCREEN_PRESETS" + }) + :Timeout(iTimeout) + :Do(function(_,data) + --hmi side: sending UI.SetDisplayLayout response + self.hmiConnection:SendResponse(data.id, data.method, "SUCCESS", responsedParams) + end) + + + --mobile side: expect SetDisplayLayout response + EXPECT_RESPONSE(cid, { success = false, resultCode = "INVALID_DATA", info = "Received invalid data on HMI response" }) + :Timeout(iTimeout) + + end + + --End Test case NegativeResponseCheck.2.2.32 + + --Begin Test case NegativeResponseCheck.2.2.33 + --Description: softButtonCapabilities parameter is missed item + + Test["SetDispLay_Res_softButCap_isMissed_SUCCESS"] = function(self) + + --mobile side: sending SetDisplayLayout request + local cid = self.mobileSession:SendRPC("SetDisplayLayout", + { + displayLayout = "ONSCREEN_PRESETS" + }) + + + local responsedParams = createDefaultResponseParamsValues() + local expectedParams = createExpectedResultParamsValuesOnMobile(true, "SUCCESS") + responsedParams.softButtonCapabilities = nil + expectedParams.softButtonCapabilities = nil + + --hmi side: expect UI.SetDisplayLayout request + EXPECT_HMICALL("UI.SetDisplayLayout", + { + displayLayout = "ONSCREEN_PRESETS" + }) + :Timeout(iTimeout) + :Do(function(_,data) + --hmi side: sending UI.SetDisplayLayout response + self.hmiConnection:SendResponse(data.id, data.method, "SUCCESS", responsedParams) + end) + + + --mobile side: expect SetDisplayLayout response + EXPECT_RESPONSE(cid, expectedParams) + :Timeout(iTimeout) + + end + + --End Test case NegativeResponseCheck.2.2.33 + + ----------------------------------------------------------------------------------------- + + --Begin Test case NegativeResponseCheck.2.2.34 + --Description: presetBankCapabilities.onScreenPresetsAvailable parameter is missed + + Test["SetDispLay_Res_presetBankCap_onScreenPresetsAvailable_isMissed_INVALID_DATA"] = function(self) + + --mobile side: sending SetDisplayLayout request + local cid = self.mobileSession:SendRPC("SetDisplayLayout", + { + displayLayout = "ONSCREEN_PRESETS" + }) + + + local responsedParams = createDefaultResponseParamsValues() + responsedParams.presetBankCapabilities.onScreenPresetsAvailable = nil + + --hmi side: expect UI.SetDisplayLayout request + EXPECT_HMICALL("UI.SetDisplayLayout", + { + displayLayout = "ONSCREEN_PRESETS" + }) + :Timeout(iTimeout) + :Do(function(_,data) + --hmi side: sending UI.SetDisplayLayout response + self.hmiConnection:SendResponse(data.id, data.method, "SUCCESS", responsedParams) + end) + + + --mobile side: expect SetDisplayLayout response + EXPECT_RESPONSE(cid, { success = false, resultCode = "INVALID_DATA", info = "Received invalid data on HMI response" }) + :Timeout(iTimeout) + + end + + --End Test case NegativeResponseCheck.2.2.34 + + --Begin Test case NegativeResponseCheck.2.2.35 + --Description: Check presetBankCapabilities parameter is missed + + Test["SetDispLay_Res_presetBankCap_isMissed_SUCCESS"] = function(self) + + --mobile side: sending SetDisplayLayout request + local cid = self.mobileSession:SendRPC("SetDisplayLayout", + { + displayLayout = "ONSCREEN_PRESETS" + }) + + + local responsedParams = createDefaultResponseParamsValues() + local expectedParams = createExpectedResultParamsValuesOnMobile(true, "SUCCESS") + responsedParams.presetBankCapabilities = nil + expectedParams.presetBankCapabilities = nil + + --hmi side: expect UI.SetDisplayLayout request + EXPECT_HMICALL("UI.SetDisplayLayout", + { + displayLayout = "ONSCREEN_PRESETS" + }) + :Timeout(iTimeout) + :Do(function(_,data) + --hmi side: sending UI.SetDisplayLayout response + self.hmiConnection:SendResponse(data.id, data.method, "SUCCESS", responsedParams) + end) + + + --mobile side: expect SetDisplayLayout response + EXPECT_RESPONSE(cid, expectedParams) + :Timeout(iTimeout) + + end + + --End Test case NegativeResponseCheck.2.2.35 + + + --End Test case NegativeResponseCheck.2.2 + + ----------------------------------------------------------------------------------------- + + --Begin Test case NegativeResponseCheck.2.3 + --Description: check of each parameter is invalid values(nonexistent) + + --Begin Test case NegativeResponseCheck.2.3.1 + --Description: displayCapabilities.displayType parameter is nonexistent + + Test["SetDispLay_Res_displayCap_displayType_isnonexistent_INVALID_DATA"] = function(self) + + --mobile side: sending SetDisplayLayout request + local cid = self.mobileSession:SendRPC("SetDisplayLayout", + { + displayLayout = "ONSCREEN_PRESETS" + }) + + + local responsedParams = createDefaultResponseParamsValues() + responsedParams.displayCapabilities.displayType = "nonexistent" + + --hmi side: expect UI.SetDisplayLayout request + EXPECT_HMICALL("UI.SetDisplayLayout", + { + displayLayout = "ONSCREEN_PRESETS" + }) + :Timeout(iTimeout) + :Do(function(_,data) + --hmi side: sending UI.SetDisplayLayout response + self.hmiConnection:SendResponse(data.id, data.method, "SUCCESS", responsedParams) + end) + + + --mobile side: expect SetDisplayLayout response + EXPECT_RESPONSE(cid, { success = false, resultCode = "INVALID_DATA", info = "Received invalid data on HMI response" }) + :Timeout(iTimeout) + + end + + --End Test case NegativeResponseCheck.2.3.1 + + + --Begin Test case NegativeResponseCheck.2.3.2 + --Description: displayCapabilities.textFields.name parameter is nonexistent + + Test["SetDispLay_Res_displayCap_textFields_name_isnonexistent_INVALID_DATA"] = function(self) + + --mobile side: sending SetDisplayLayout request + local cid = self.mobileSession:SendRPC("SetDisplayLayout", + { + displayLayout = "ONSCREEN_PRESETS" + }) + + + local responsedParams = createDefaultResponseParamsValues() + + local testParam = + { + { + characterSet = "TYPE2SET", + name = "nonexistent", + rows = 1, + width = 500 + } + } + + responsedParams.displayCapabilities.textFields = testParam + + --hmi side: expect UI.SetDisplayLayout request + EXPECT_HMICALL("UI.SetDisplayLayout", + { + displayLayout = "ONSCREEN_PRESETS" + }) + :Timeout(iTimeout) + :Do(function(_,data) + --hmi side: sending UI.SetDisplayLayout response + self.hmiConnection:SendResponse(data.id, data.method, "SUCCESS", responsedParams) + end) + + + --mobile side: expect SetDisplayLayout response + EXPECT_RESPONSE(cid, { success = false, resultCode = "INVALID_DATA", info = "Received invalid data on HMI response" }) + :Timeout(iTimeout) + + end + + --End Test case NegativeResponseCheck.2.3.2 + + --Begin Test case NegativeResponseCheck.2.3.3 + --Description: displayCapabilities.textFields.characterSet parameter is nonexistent + + Test["SetDispLay_Res_displayCap_textFields_characterSet_isnonexistent_INVALID_DATA"] = function(self) + + --mobile side: sending SetDisplayLayout request + local cid = self.mobileSession:SendRPC("SetDisplayLayout", + { + displayLayout = "ONSCREEN_PRESETS" + }) + + + local responsedParams = createDefaultResponseParamsValues() + + local testParam = + { + { + characterSet = "nonexistent", + name = "mainField1", + rows = 1, + width = 500 + } + } + + responsedParams.displayCapabilities.textFields = testParam + + --hmi side: expect UI.SetDisplayLayout request + EXPECT_HMICALL("UI.SetDisplayLayout", + { + displayLayout = "ONSCREEN_PRESETS" + }) + :Timeout(iTimeout) + :Do(function(_,data) + --hmi side: sending UI.SetDisplayLayout response + self.hmiConnection:SendResponse(data.id, data.method, "SUCCESS", responsedParams) + end) + + + --mobile side: expect SetDisplayLayout response + EXPECT_RESPONSE(cid, { success = false, resultCode = "INVALID_DATA", info = "Received invalid data on HMI response" }) + :Timeout(iTimeout) + + end + + --End Test case NegativeResponseCheck.2.3.3 + + + --Begin Test case NegativeResponseCheck.2.3.4 + --Description: displayCapabilities.imageFields[1].name parameter is nonexistent + + Test["SetDispLay_Res_displayCap_imageFields_name_isnonexistent_INVALID_DATA"] = function(self) + + --mobile side: sending SetDisplayLayout request + local cid = self.mobileSession:SendRPC("SetDisplayLayout", + { + displayLayout = "ONSCREEN_PRESETS" + }) + + + local responsedParams = createDefaultResponseParamsValues() + local expectedParams = createExpectedResultParamsValuesOnMobile(false, "INVALID_DATA", "Received invalid data on HMI response") + + responsedParams.displayCapabilities.imageFields[1].name = "nonexistent" + + --hmi side: expect UI.SetDisplayLayout request + EXPECT_HMICALL("UI.SetDisplayLayout", + { + displayLayout = "ONSCREEN_PRESETS" + }) + :Timeout(iTimeout) + :Do(function(_,data) + --hmi side: sending UI.SetDisplayLayout response + self.hmiConnection:SendResponse(data.id, data.method, "SUCCESS", responsedParams) + end) + + + --mobile side: expect SetDisplayLayout response + EXPECT_RESPONSE(cid, { success = false, resultCode = "INVALID_DATA", info = "Received invalid data on HMI response" }) + :Timeout(iTimeout) + + end + + --End Test case NegativeResponseCheck.2.3.4 + + + --Begin Test case NegativeResponseCheck.2.3.5 + --Description: displayCapabilities.imageFields[1].imageTypeSupported parameter is nonexistent + + Test["SetDispLay_Res_displayCap_imageFields_imageTypeSupported_isnonexistent_INVALID_DATA"] = function(self) + + --mobile side: sending SetDisplayLayout request + local cid = self.mobileSession:SendRPC("SetDisplayLayout", + { + displayLayout = "ONSCREEN_PRESETS" + }) + + + local responsedParams = createDefaultResponseParamsValues() + responsedParams.displayCapabilities.imageFields[1].imageTypeSupported = "nonexistent" + + --hmi side: expect UI.SetDisplayLayout request + EXPECT_HMICALL("UI.SetDisplayLayout", + { + displayLayout = "ONSCREEN_PRESETS" + }) + :Timeout(iTimeout) + :Do(function(_,data) + --hmi side: sending UI.SetDisplayLayout response + self.hmiConnection:SendResponse(data.id, data.method, "SUCCESS", responsedParams) + end) + + + --mobile side: expect SetDisplayLayout response + EXPECT_RESPONSE(cid, { success = false, resultCode = "INVALID_DATA", info = "Received invalid data on HMI response" }) + :Timeout(iTimeout) + + end + + --End Test case NegativeResponseCheck.2.3.5 + + + + --Begin Test case NegativeResponseCheck.2.3.6 + --Description: displayCapabilities.mediaClockFormats parameter is nonexistent + + Test["SetDispLay_Res_displayCap_mediaClockFormats_isnonexistent_INVALID_DATA"] = function(self) + + --mobile side: sending SetDisplayLayout request + local cid = self.mobileSession:SendRPC("SetDisplayLayout", + { + displayLayout = "ONSCREEN_PRESETS" + }) + + + local responsedParams = createDefaultResponseParamsValues() + responsedParams.displayCapabilities.mediaClockFormats = "nonexistent" + + + --hmi side: expect UI.SetDisplayLayout request + EXPECT_HMICALL("UI.SetDisplayLayout", + { + displayLayout = "ONSCREEN_PRESETS" + }) + :Timeout(iTimeout) + :Do(function(_,data) + --hmi side: sending UI.SetDisplayLayout response + self.hmiConnection:SendResponse(data.id, data.method, "SUCCESS", responsedParams) + end) + + + --mobile side: expect SetDisplayLayout response + EXPECT_RESPONSE(cid, { success = false, resultCode = "INVALID_DATA", info = "Received invalid data on HMI response" }) + :Timeout(iTimeout) + + end + + --End Test case NegativeResponseCheck.2.3.6 + + ----------------------------------------------------------------------------------------- + + --Begin Test case NegativeResponseCheck.2.3.7 + --Description: displayCapabilities.imageCapabilities parameter is nonexistent + + Test["SetDispLay_Res_displayCap_imageCapabilities_isnonexistent_INVALID_DATA"] = function(self) + + --mobile side: sending SetDisplayLayout request + local cid = self.mobileSession:SendRPC("SetDisplayLayout", + { + displayLayout = "ONSCREEN_PRESETS" + }) + + + local responsedParams = createDefaultResponseParamsValues() + responsedParams.displayCapabilities.imageCapabilities = {"nonexistent"} + + --hmi side: expect UI.SetDisplayLayout request + EXPECT_HMICALL("UI.SetDisplayLayout", + { + displayLayout = "ONSCREEN_PRESETS" + }) + :Timeout(iTimeout) + :Do(function(_,data) + --hmi side: sending UI.SetDisplayLayout response + self.hmiConnection:SendResponse(data.id, data.method, "SUCCESS", responsedParams) + end) + + + --mobile side: expect SetDisplayLayout response + EXPECT_RESPONSE(cid, { success = false, resultCode = "INVALID_DATA", info = "Received invalid data on HMI response" }) + :Timeout(iTimeout) + + end + + --End Test case NegativeResponseCheck.2.3.7 + + ----------------------------------------------------------------------------------------- + + --Begin Test case NegativeResponseCheck.2.3.8 + --Description: displayCapabilities.templatesAvailable parameter is nonexistent + + Test["SetDispLay_Res_displayCap_templatesAvailable_IsValidValue_".. tostring(outboundValues[i]) .."_INVALID_DATA"] = function(self) + + --mobile side: sending SetDisplayLayout request + local cid = self.mobileSession:SendRPC("SetDisplayLayout", + { + displayLayout = "ONSCREEN_PRESETS" + }) + + + local responsedParams = createDefaultResponseParamsValues() + responsedParams.displayCapabilities.templatesAvailable = {{"nonexistent"}} + + --hmi side: expect UI.SetDisplayLayout request + EXPECT_HMICALL("UI.SetDisplayLayout", + { + displayLayout = "ONSCREEN_PRESETS" + }) + :Timeout(iTimeout) + :Do(function(_,data) + --hmi side: sending UI.SetDisplayLayout response + self.hmiConnection:SendResponse(data.id, data.method, "SUCCESS", responsedParams) + end) + + + --mobile side: expect SetDisplayLayout response + EXPECT_RESPONSE(cid, { success = false, resultCode = "INVALID_DATA", info = "Received invalid data on HMI response" }) + :Timeout(iTimeout) + + end + + --End Test case NegativeResponseCheck.2.3.8 + + ----------------------------------------------------------------------------------------- + + + --Begin Test case NegativeResponseCheck.2.3.9 + --Description: buttonCapabilities.name parameter is nonexistent + + Test["SetDispLay_Res_butCap_name_isnonexistent_INVALID_DATA"] = function(self) + + --mobile side: sending SetDisplayLayout request + local cid = self.mobileSession:SendRPC("SetDisplayLayout", + { + displayLayout = "ONSCREEN_PRESETS" + }) + + + local responsedParams = createDefaultResponseParamsValues() + responsedParams.buttonCapabilities[1].name = "nonexistent" + + --hmi side: expect UI.SetDisplayLayout request + EXPECT_HMICALL("UI.SetDisplayLayout", + { + displayLayout = "ONSCREEN_PRESETS" + }) + :Timeout(iTimeout) + :Do(function(_,data) + --hmi side: sending UI.SetDisplayLayout response + self.hmiConnection:SendResponse(data.id, data.method, "SUCCESS", responsedParams) + end) + + + --mobile side: expect SetDisplayLayout response + EXPECT_RESPONSE(cid, { success = false, resultCode = "INVALID_DATA", info = "Received invalid data on HMI response" }) + :Timeout(iTimeout) + + end + + --End Test case NegativeResponseCheck.2.3.9 + + --End Test case NegativeResponseCheck.2.3 + + --Begin Test case NegativeResponseCheck.2.4 + --Description: check of each parameter is invalid values(invalid characters) + --[[TODO: update after APPLINK-14551 + local InvalidCharacters = {"a\nb", "a\tb"} + local InvalidCharactersName = {"NewLine", "Tab"} + + + --Begin Test case NegativeResponseCheck.2.4.1 + --Description: info parameter contains invalid characters + + --Requirement id in JAMA/or Jira ID: APPLINK-13276 + + --Verification criteria: SDL responses to mobile without info parameter + + for i = 1, #InvalidCharacters do + Test["SetDispLay_Res_info_invalid_character_".. InvalidCharactersName[i] .."_SUCCESS"] = function(self) + + --mobile side: sending SetDisplayLayout request + local cid = self.mobileSession:SendRPC("SetDisplayLayout", + { + displayLayout = "ONSCREEN_PRESETS" + }) + + local strInfo = InvalidCharacters[i] + local responsedParams = createDefaultResponseParamsValues(strInfo) + local expectedParams = createExpectedResultParamsValuesOnMobile(true, "SUCCESS") + + --hmi side: expect UI.SetDisplayLayout request + EXPECT_HMICALL("UI.SetDisplayLayout", + { + displayLayout = "ONSCREEN_PRESETS" + }) + :Timeout(iTimeout) + :Do(function(_,data) + --hmi side: sending UI.SetDisplayLayout response + self.hmiConnection:SendResponse(data.id, data.method, "SUCCESS", responsedParams) + end) + + + --mobile side: expect SetDisplayLayout response + EXPECT_RESPONSE(cid, expectedParams) + :Timeout(iTimeout) + :ValidIf(function(_,data) + if data.payload.info ~= nil then + print(" SDL sends info parameters to Mobile: " .. data.payload.info) + return false + else + return true + end + end) + + + end + end + + --End Test case NegativeResponseCheck.2.4.1 + ]] + + --Begin Test case NegativeResponseCheck.2.4.2 + --Description: displayCapabilities.displayType parameter contains invalid characters + + --Requirement id in JAMA/or Jira ID: SDLAQ-CRS-1045 -> SDLAQ-CRS-3087 -> SDLAQ-CRS-3088 + + --Verification criteria: SDL responses INVALID_DATA + + local InvalidCharacters = {"a\nb", "a\tb"} + local InvalidCharactersName = {"NewLine", "Tab"} + + + for i = 1, #InvalidCharacters do + Test["SetDispLay_Res_displayCap_displayType_".. InvalidCharactersName[i] .."_INVALID_DATA"] = function(self) + + --mobile side: sending SetDisplayLayout request + local cid = self.mobileSession:SendRPC("SetDisplayLayout", + { + displayLayout = "ONSCREEN_PRESETS" + }) + + + local responsedParams = createDefaultResponseParamsValues() + responsedParams.displayCapabilities.displayType = InvalidCharacters[i] + + + --hmi side: expect UI.SetDisplayLayout request + EXPECT_HMICALL("UI.SetDisplayLayout", + { + displayLayout = "ONSCREEN_PRESETS" + }) + :Timeout(iTimeout) + :Do(function(_,data) + --hmi side: sending UI.SetDisplayLayout response + self.hmiConnection:SendResponse(data.id, data.method, "SUCCESS", responsedParams) + end) + + + --mobile side: expect SetDisplayLayout response + EXPECT_RESPONSE(cid, { success = false, resultCode = "INVALID_DATA", info = "Received invalid data on HMI response" }) + :Timeout(iTimeout) + + end + end + + --End Test case NegativeResponseCheck.2.4.2 + + + + --Begin Test case NegativeResponseCheck.2.4.3 + --Description: displayCapabilities.textFields.name parameter contains invalid characters + + for i = 1, #InvalidCharacters do + Test["SetDispLay_Res_displayCap_textFields_name_".. InvalidCharactersName[i] .."_INVALID_DATA"] = function(self) + + --mobile side: sending SetDisplayLayout request + local cid = self.mobileSession:SendRPC("SetDisplayLayout", + { + displayLayout = "ONSCREEN_PRESETS" + }) + + + local responsedParams = createDefaultResponseParamsValues() + + local testParam = + { + { + characterSet = "TYPE2SET", + name = InvalidCharacters[i], + rows = 1, + width = 500 + } + } + + responsedParams.displayCapabilities.textFields = testParam + + --hmi side: expect UI.SetDisplayLayout request + EXPECT_HMICALL("UI.SetDisplayLayout", + { + displayLayout = "ONSCREEN_PRESETS" + }) + :Timeout(iTimeout) + :Do(function(_,data) + --hmi side: sending UI.SetDisplayLayout response + self.hmiConnection:SendResponse(data.id, data.method, "SUCCESS", responsedParams) + end) + + + --mobile side: expect SetDisplayLayout response + EXPECT_RESPONSE(cid, { success = false, resultCode = "INVALID_DATA", info = "Received invalid data on HMI response" }) + :Timeout(iTimeout) + + end + end + + --End Test case NegativeResponseCheck.2.4.3 + + --Begin Test case NegativeResponseCheck.2.4.4 + --Description: displayCapabilities.textFields.characterSet parameter contains invalid characters + + for i = 1, #InvalidCharacters do + Test["SetDispLay_Res_displayCap_textFields_characterSet_".. InvalidCharactersName[i] .."_INVALID_DATA"] = function(self) + + --mobile side: sending SetDisplayLayout request + local cid = self.mobileSession:SendRPC("SetDisplayLayout", + { + displayLayout = "ONSCREEN_PRESETS" + }) + + + local responsedParams = createDefaultResponseParamsValues() + + local testParam = + { + { + characterSet = InvalidCharacters[i], + name = "mainField1", + rows = 1, + width = 500 + } + } + + responsedParams.displayCapabilities.textFields = testParam + + --hmi side: expect UI.SetDisplayLayout request + EXPECT_HMICALL("UI.SetDisplayLayout", + { + displayLayout = "ONSCREEN_PRESETS" + }) + :Timeout(iTimeout) + :Do(function(_,data) + --hmi side: sending UI.SetDisplayLayout response + self.hmiConnection:SendResponse(data.id, data.method, "SUCCESS", responsedParams) + end) + + + --mobile side: expect SetDisplayLayout response + EXPECT_RESPONSE(cid, { success = false, resultCode = "INVALID_DATA", info = "Received invalid data on HMI response" }) + :Timeout(iTimeout) + + end + end + + --End Test case NegativeResponseCheck.2.4.4 + + + + --Begin Test case NegativeResponseCheck.2.4.5 + --Description: displayCapabilities.imageFields.name parameter contains invalid characters + + + for i = 1, #InvalidCharacters do + Test["SetDispLay_Res_displayCap_imageFields_name_".. InvalidCharactersName[i] .."_INVALID_DATA"] = function(self) + + --mobile side: sending SetDisplayLayout request + local cid = self.mobileSession:SendRPC("SetDisplayLayout", + { + displayLayout = "ONSCREEN_PRESETS" + }) + + + local responsedParams = createDefaultResponseParamsValues() + responsedParams.displayCapabilities.imageFields.name = InvalidCharacters[i] + + --hmi side: expect UI.SetDisplayLayout request + EXPECT_HMICALL("UI.SetDisplayLayout", + { + displayLayout = "ONSCREEN_PRESETS" + }) + :Timeout(iTimeout) + :Do(function(_,data) + --hmi side: sending UI.SetDisplayLayout response + self.hmiConnection:SendResponse(data.id, data.method, "SUCCESS", responsedParams) + end) + + + --mobile side: expect SetDisplayLayout response + EXPECT_RESPONSE(cid, { success = false, resultCode = "INVALID_DATA", info = "Received invalid data on HMI response" }) + :Timeout(iTimeout) + + end + end + + --End Test case NegativeResponseCheck.2.4.5 + + + --Begin Test case NegativeResponseCheck.2.4.6 + --Description: displayCapabilities.imageFields.imageTypeSupported parameter contains invalid characters + + for i = 1, #InvalidCharacters do + Test["SetDispLay_Res_displayCap_imageFields_imageTypeSupported_".. InvalidCharactersName[i] .."_INVALID_DATA"] = function(self) + + --mobile side: sending SetDisplayLayout request + local cid = self.mobileSession:SendRPC("SetDisplayLayout", + { + displayLayout = "ONSCREEN_PRESETS" + }) + + + local responsedParams = createDefaultResponseParamsValues() + local testParam = {InvalidCharacters[i]} + responsedParams.displayCapabilities.imageFields.imageTypeSupported = testParam + + + --hmi side: expect UI.SetDisplayLayout request + EXPECT_HMICALL("UI.SetDisplayLayout", + { + displayLayout = "ONSCREEN_PRESETS" + }) + :Timeout(iTimeout) + :Do(function(_,data) + --hmi side: sending UI.SetDisplayLayout response + self.hmiConnection:SendResponse(data.id, data.method, "SUCCESS", responsedParams) + end) + + + --mobile side: expect SetDisplayLayout response + EXPECT_RESPONSE(cid, { success = false, resultCode = "INVALID_DATA", info = "Received invalid data on HMI response" }) + :Timeout(iTimeout) + + end + end + + --End Test case NegativeResponseCheck.2.4.6 + + + --Begin Test case NegativeResponseCheck.2.4.7 + --Description: displayCapabilities.mediaClockFormats parameter contains invalid characters + + + for i = 1, #InvalidCharacters do + Test["SetDispLay_Res_displayCap_mediaClockFormats_".. InvalidCharactersName[i] .."_INVALID_DATA"] = function(self) + + --mobile side: sending SetDisplayLayout request + local cid = self.mobileSession:SendRPC("SetDisplayLayout", + { + displayLayout = "ONSCREEN_PRESETS" + }) + + + local responsedParams = createDefaultResponseParamsValues() + + local testParam = + { + InvalidCharacters[i] + } + + responsedParams.displayCapabilities.mediaClockFormats = testParam + + + --hmi side: expect UI.SetDisplayLayout request + EXPECT_HMICALL("UI.SetDisplayLayout", + { + displayLayout = "ONSCREEN_PRESETS" + }) + :Timeout(iTimeout) + :Do(function(_,data) + --hmi side: sending UI.SetDisplayLayout response + self.hmiConnection:SendResponse(data.id, data.method, "SUCCESS", responsedParams) + end) + + + --mobile side: expect SetDisplayLayout response + EXPECT_RESPONSE(cid, { success = false, resultCode = "INVALID_DATA", info = "Received invalid data on HMI response" }) + :Timeout(iTimeout) + + end + end + + --End Test case NegativeResponseCheck.2.4.7 + + + --Begin Test case NegativeResponseCheck.2.4.8 + --Description: displayCapabilities.imageCapabilities parameter contains invalid characters + + for i = 1, #InvalidCharacters do + Test["SetDispLay_Res_displayCap_imageCapabilities_".. InvalidCharactersName[i] .."_INVALID_DATA"] = function(self) + + --mobile side: sending SetDisplayLayout request + local cid = self.mobileSession:SendRPC("SetDisplayLayout", + { + displayLayout = "ONSCREEN_PRESETS" + }) + + + local responsedParams = createDefaultResponseParamsValues() + local testParam = + { + InvalidCharacters[i] + } + + responsedParams.displayCapabilities.imageCapabilities = testParam + + --hmi side: expect UI.SetDisplayLayout request + EXPECT_HMICALL("UI.SetDisplayLayout", + { + displayLayout = "ONSCREEN_PRESETS" + }) + :Timeout(iTimeout) + :Do(function(_,data) + --hmi side: sending UI.SetDisplayLayout response + self.hmiConnection:SendResponse(data.id, data.method, "SUCCESS", responsedParams) + end) + + + --mobile side: expect SetDisplayLayout response + EXPECT_RESPONSE(cid, { success = false, resultCode = "INVALID_DATA", info = "Received invalid data on HMI response" }) + :Timeout(iTimeout) + + end + end + + --End Test case NegativeResponseCheck.2.4.8 + + + --Begin Test case NegativeResponseCheck.2.4.9 + --Description: displayCapabilities.graphicSupported parameter contains invalid characters + + for i = 1, #InvalidCharacters do + Test["SetDispLay_Res_displayCap_graphicSupported_".. tostring(InvalidCharactersName[i]) .."_INVALID_DATA"] = function(self) + + --mobile side: sending SetDisplayLayout request + local cid = self.mobileSession:SendRPC("SetDisplayLayout", + { + displayLayout = "ONSCREEN_PRESETS" + }) + + + local responsedParams = createDefaultResponseParamsValues() + responsedParams.displayCapabilities.graphicSupported = InvalidCharacters[i] + + --hmi side: expect UI.SetDisplayLayout request + EXPECT_HMICALL("UI.SetDisplayLayout", + { + displayLayout = "ONSCREEN_PRESETS" + }) + :Timeout(iTimeout) + :Do(function(_,data) + --hmi side: sending UI.SetDisplayLayout response + self.hmiConnection:SendResponse(data.id, data.method, "SUCCESS", responsedParams) + end) + + + --mobile side: expect SetDisplayLayout response + EXPECT_RESPONSE(cid, { success = false, resultCode = "INVALID_DATA", info = "Received invalid data on HMI response" }) + :Timeout(iTimeout) + + end + end + + --End Test case NegativeResponseCheck.2.4.9 + + + --Begin Test case NegativeResponseCheck.2.4.10 + --Description: displayCapabilities.templatesAvailable parameter contains invalid characters + + for i = 1, #InvalidCharacters do + Test["SetDispLay_Res_displayCap_templatesAvailable_invalid_character_".. tostring(InvalidCharactersName[i]) .."_INVALID_DATA"] = function(self) + + --mobile side: sending SetDisplayLayout request + local cid = self.mobileSession:SendRPC("SetDisplayLayout", + { + displayLayout = "ONSCREEN_PRESETS" + }) + + + local responsedParams = createDefaultResponseParamsValues() + local testParam = + { + InvalidCharacters[i] + } + + responsedParams.displayCapabilities.templatesAvailable = testParam + + --hmi side: expect UI.SetDisplayLayout request + EXPECT_HMICALL("UI.SetDisplayLayout", + { + displayLayout = "ONSCREEN_PRESETS" + }) + :Timeout(iTimeout) + :Do(function(_,data) + --hmi side: sending UI.SetDisplayLayout response + self.hmiConnection:SendResponse(data.id, data.method, "SUCCESS", responsedParams) + end) + + + --mobile side: expect SetDisplayLayout response + EXPECT_RESPONSE(cid, { success = false, resultCode = "INVALID_DATA", info = "Received invalid data on HMI response" }) + :Timeout(iTimeout) + + end + end + + + --End Test case NegativeResponseCheck.2.4.10 + + + + --Begin Test case NegativeResponseCheck.2.4.11 + --Description: buttonCapabilities parameter contains invalid characters + + for i = 1, #InvalidCharacters do + Test["SetDispLay_Res_butCap_name_".. tostring(InvalidCharactersName[i]) .."_INVALID_DATA"] = function(self) + + --mobile side: sending SetDisplayLayout request + local cid = self.mobileSession:SendRPC("SetDisplayLayout", + { + displayLayout = "ONSCREEN_PRESETS" + }) + + + local responsedParams = createDefaultResponseParamsValues() + responsedParams.buttonCapabilities[1].name = InvalidCharacters[i] + + --hmi side: expect UI.SetDisplayLayout request + EXPECT_HMICALL("UI.SetDisplayLayout", + { + displayLayout = "ONSCREEN_PRESETS" + }) + :Timeout(iTimeout) + :Do(function(_,data) + --hmi side: sending UI.SetDisplayLayout response + self.hmiConnection:SendResponse(data.id, data.method, "SUCCESS", responsedParams) + end) + + + --mobile side: expect SetDisplayLayout response + EXPECT_RESPONSE(cid, { success = false, resultCode = "INVALID_DATA", info = "Received invalid data on HMI response" }) + :Timeout(iTimeout) + + end + end + + --End Test case NegativeResponseCheck.2.4.11 + + --End Test case NegativeResponseCheck.2.4 + + --End Test case NegativeResponseCheck.2 + + --Begin Test case NegativeResponseCheck.3 + --Description: check of each parameter is wrong type + + --Begin Test case NegativeResponseCheck.3.1 + --Description: info parameter is wrong type + + function Test:SetDispLay_Res_info_wrongType_SUCCESS() + + --mobile side: sending SetDisplayLayout request + local cid = self.mobileSession:SendRPC("SetDisplayLayout", + { + displayLayout = "ONSCREEN_PRESETS" + }) + + local strInfo = 123 + local responsedParams = createDefaultResponseParamsValues(strInfo) + local expectedParams = createExpectedResultParamsValuesOnMobile(true, "SUCCESS", nil) + + --hmi side: expect UI.SetDisplayLayout request + EXPECT_HMICALL("UI.SetDisplayLayout", + { + displayLayout = "ONSCREEN_PRESETS" + }) + :Timeout(iTimeout) + :Do(function(_,data) + --hmi side: sending UI.SetDisplayLayout response + self.hmiConnection:SendResponse(data.id, data.method, "SUCCESS", responsedParams) + end) + + + --mobile side: expect SetDisplayLayout response + EXPECT_RESPONSE(cid, expectedParams) + :Timeout(iTimeout) + + + end + + --End Test case NegativeResponseCheck.3.1 + + --Begin Test case NegativeResponseCheck.3.2 + --Description: displayCapabilities.displayType parameter is wrong type + + wrongTypeVales = {123} + for i = 1, #wrongTypeVales do + Test["SetDispLay_Res_displayCap_displayType_wrongType_".. wrongTypeVales[i] .."_INVALID_DATA"] = function(self) + + --mobile side: sending SetDisplayLayout request + local cid = self.mobileSession:SendRPC("SetDisplayLayout", + { + displayLayout = "ONSCREEN_PRESETS" + }) + + + local responsedParams = createDefaultResponseParamsValues() + responsedParams.displayCapabilities.displayType = wrongTypeVales[i] + + --hmi side: expect UI.SetDisplayLayout request + EXPECT_HMICALL("UI.SetDisplayLayout", + { + displayLayout = "ONSCREEN_PRESETS" + }) + :Timeout(iTimeout) + :Do(function(_,data) + --hmi side: sending UI.SetDisplayLayout response + self.hmiConnection:SendResponse(data.id, data.method, "SUCCESS", responsedParams) + end) + + + --mobile side: expect SetDisplayLayout response + EXPECT_RESPONSE(cid, expectedParams) + :Timeout(iTimeout) + + end + end + + --End Test case NegativeResponseCheck.3.2 + + + + --Begin Test case NegativeResponseCheck.3.3 + --Description: displayCapabilities.textFields.name parameter is wrong type + + local wrongTypeVales = {123} + + for i = 1, #wrongTypeVales do + Test["SetDispLay_Res_displayCap_textFields_name_wrongType_".. wrongTypeVales[i] .."_INVALID_DATA"] = function(self) + + --mobile side: sending SetDisplayLayout request + local cid = self.mobileSession:SendRPC("SetDisplayLayout", + { + displayLayout = "ONSCREEN_PRESETS" + }) + + + local responsedParams = createDefaultResponseParamsValues() + + local testParam = + { + { + characterSet = "TYPE2SET", + name = wrongTypeVales[i], + rows = 1, + width = 500 + } + } + + responsedParams.displayCapabilities.textFields = testParam + + --hmi side: expect UI.SetDisplayLayout request + EXPECT_HMICALL("UI.SetDisplayLayout", + { + displayLayout = "ONSCREEN_PRESETS" + }) + :Timeout(iTimeout) + :Do(function(_,data) + --hmi side: sending UI.SetDisplayLayout response + self.hmiConnection:SendResponse(data.id, data.method, "SUCCESS", responsedParams) + end) + + + --mobile side: expect SetDisplayLayout response + EXPECT_RESPONSE(cid, { success = false, resultCode = "INVALID_DATA", info = "Received invalid data on HMI response" }) + :Timeout(iTimeout) + + end + end + + --End Test case NegativeResponseCheck.3.3 + + --Begin Test case NegativeResponseCheck.3.4 + --Description: displayCapabilities.textFields.characterSet parameter is wrong type + + local wrongTypeVales = {123} + + for i = 1, #wrongTypeVales do + Test["SetDispLay_Res_displayCap_textFields_characterSet_wrongType_".. wrongTypeVales[i] .."_INVALID_DATA"] = function(self) + + --mobile side: sending SetDisplayLayout request + local cid = self.mobileSession:SendRPC("SetDisplayLayout", + { + displayLayout = "ONSCREEN_PRESETS" + }) + + + local responsedParams = createDefaultResponseParamsValues() + + local testParam = + { + { + characterSet = wrongTypeVales[i], + name = "mainField1", + rows = 1, + width = 500 + } + } + + responsedParams.displayCapabilities.textFields = testParam + + --hmi side: expect UI.SetDisplayLayout request + EXPECT_HMICALL("UI.SetDisplayLayout", + { + displayLayout = "ONSCREEN_PRESETS" + }) + :Timeout(iTimeout) + :Do(function(_,data) + --hmi side: sending UI.SetDisplayLayout response + self.hmiConnection:SendResponse(data.id, data.method, "SUCCESS", responsedParams) + end) + + + --mobile side: expect SetDisplayLayout response + EXPECT_RESPONSE(cid, { success = false, resultCode = "INVALID_DATA", info = "Received invalid data on HMI response" }) + :Timeout(iTimeout) + + end + end + + --End Test case NegativeResponseCheck.3.4 + + --Begin Test case NegativeResponseCheck.3.5 + --Description: displayCapabilities.textFields.width parameter is wrong type + + local wrongTypeVales = {"1"} + + for i = 1, #wrongTypeVales do + Test["SetDispLay_Res_displayCap_textFields_width_wrongType_".. wrongTypeVales[i] .."_INVALID_DATA"] = function(self) + + --mobile side: sending SetDisplayLayout request + local cid = self.mobileSession:SendRPC("SetDisplayLayout", + { + displayLayout = "ONSCREEN_PRESETS" + }) + + + local responsedParams = createDefaultResponseParamsValues() + + local testParam = + { + { + characterSet = "TYPE2SET", + name = "mainField1", + rows = 1, + width = wrongTypeVales[i] + } + } + + responsedParams.displayCapabilities.textFields = testParam + + --hmi side: expect UI.SetDisplayLayout request + EXPECT_HMICALL("UI.SetDisplayLayout", + { + displayLayout = "ONSCREEN_PRESETS" + }) + :Timeout(iTimeout) + :Do(function(_,data) + --hmi side: sending UI.SetDisplayLayout response + self.hmiConnection:SendResponse(data.id, data.method, "SUCCESS", responsedParams) + end) + + + --mobile side: expect SetDisplayLayout response + EXPECT_RESPONSE(cid, { success = false, resultCode = "INVALID_DATA", info = "Received invalid data on HMI response" }) + :Timeout(iTimeout) + + end + end + + --End Test case NegativeResponseCheck.3.5 + + --Begin Test case NegativeResponseCheck.3.6 + --Description: displayCapabilities.textFields.rows parameter is wrong type + + local wrongTypeVales = {"1"} + + for i = 1, #wrongTypeVales do + Test["SetDispLay_Res_displayCap_textFields_rows_wrongType_".. wrongTypeVales[i] .."_INVALID_DATA"] = function(self) + + --mobile side: sending SetDisplayLayout request + local cid = self.mobileSession:SendRPC("SetDisplayLayout", + { + displayLayout = "ONSCREEN_PRESETS" + }) + + + local responsedParams = createDefaultResponseParamsValues() + + local testParam = + { + { + characterSet = "TYPE2SET", + name = "mainField1", + rows = wrongTypeVales[i], + width = 500 + } + } + + responsedParams.displayCapabilities.textFields = testParam + + --hmi side: expect UI.SetDisplayLayout request + EXPECT_HMICALL("UI.SetDisplayLayout", + { + displayLayout = "ONSCREEN_PRESETS" + }) + :Timeout(iTimeout) + :Do(function(_,data) + --hmi side: sending UI.SetDisplayLayout response + self.hmiConnection:SendResponse(data.id, data.method, "SUCCESS", responsedParams) + end) + + + --mobile side: expect SetDisplayLayout response + EXPECT_RESPONSE(cid, { success = false, resultCode = "INVALID_DATA", info = "Received invalid data on HMI response" }) + :Timeout(iTimeout) + + end + end + + --End Test case NegativeResponseCheck.3.6 + + + + --Begin Test case NegativeResponseCheck.3.7 + --Description: displayCapabilities.imageFields.name parameter is wrong type + + -- + local wrongTypeVales = {123} + + for i = 1, #wrongTypeVales do + Test["SetDispLay_Res_displayCap_imageFields_name_wrongType_".. wrongTypeVales[i] .."_INVALID_DATA"] = function(self) + + --mobile side: sending SetDisplayLayout request + local cid = self.mobileSession:SendRPC("SetDisplayLayout", + { + displayLayout = "ONSCREEN_PRESETS" + }) + + + local responsedParams = createDefaultResponseParamsValues() + local expectedParams = createExpectedResultParamsValuesOnMobile(false, "INVALID_DATA", "Received invalid data on HMI response") + + responsedParams.displayCapabilities.imageFields.name = wrongTypeVales[i] + --TODO: update after resolving APPLINK-16052 expectedParams.displayCapabilities.imageFields.name = wrongTypeVales[i] + + + --hmi side: expect UI.SetDisplayLayout request + EXPECT_HMICALL("UI.SetDisplayLayout", + { + displayLayout = "ONSCREEN_PRESETS" + }) + :Timeout(iTimeout) + :Do(function(_,data) + --hmi side: sending UI.SetDisplayLayout response + self.hmiConnection:SendResponse(data.id, data.method, "SUCCESS", responsedParams) + end) + + + --mobile side: expect SetDisplayLayout response + EXPECT_RESPONSE(cid, { success = false, resultCode = "INVALID_DATA", info = "Received invalid data on HMI response" }) + :Timeout(iTimeout) + + end + end + + --End Test case NegativeResponseCheck.3.7 + + + --Begin Test case NegativeResponseCheck.3.8 + --Description: displayCapabilities.imageFields.imageTypeSupported parameter is wrong type + + -- + local wrongTypeVales = {123} + + for i = 1, #wrongTypeVales do + Test["SetDispLay_Res_displayCap_imageFields_imageTypeSupported_wrongType_".. wrongTypeVales[i] .."_INVALID_DATA"] = function(self) + + --mobile side: sending SetDisplayLayout request + local cid = self.mobileSession:SendRPC("SetDisplayLayout", + { + displayLayout = "ONSCREEN_PRESETS" + }) + + + local responsedParams = createDefaultResponseParamsValues() + responsedParams.displayCapabilities.imageFields.imageTypeSupported = {wrongTypeVales[i]} + + + --hmi side: expect UI.SetDisplayLayout request + EXPECT_HMICALL("UI.SetDisplayLayout", + { + displayLayout = "ONSCREEN_PRESETS" + }) + :Timeout(iTimeout) + :Do(function(_,data) + --hmi side: sending UI.SetDisplayLayout response + self.hmiConnection:SendResponse(data.id, data.method, "SUCCESS", responsedParams) + end) + + + --mobile side: expect SetDisplayLayout response + EXPECT_RESPONSE(cid, { success = false, resultCode = "INVALID_DATA", info = "Received invalid data on HMI response" }) + :Timeout(iTimeout) + + end + end + + --End Test case NegativeResponseCheck.3.8 + + + + local wrongTypeVales = {"0"} + + --Begin Test case NegativeResponseCheck.3.9 + --Description: displayCapabilities.imageFields.imageResolution.resolutionWidth parameter is wrong type + + for i = 1, #wrongTypeVales do + Test["SetDispLay_Res_displayCap_imageFields_imageResolution_resolutionWidth_wrongType_".. wrongTypeVales[i] .."_INVALID_DATA"] = function(self) + + --mobile side: sending SetDisplayLayout request + local cid = self.mobileSession:SendRPC("SetDisplayLayout", + { + displayLayout = "ONSCREEN_PRESETS" + }) + + + local responsedParams = createDefaultResponseParamsValues() + responsedParams.displayCapabilities.imageFields[1].imageResolution.resolutionWidth = wrongTypeVales[i] + + --hmi side: expect UI.SetDisplayLayout request + EXPECT_HMICALL("UI.SetDisplayLayout", + { + displayLayout = "ONSCREEN_PRESETS" + }) + :Timeout(iTimeout) + :Do(function(_,data) + --hmi side: sending UI.SetDisplayLayout response + self.hmiConnection:SendResponse(data.id, data.method, "SUCCESS", responsedParams) + end) + + + --mobile side: expect SetDisplayLayout response + EXPECT_RESPONSE(cid, { success = false, resultCode = "INVALID_DATA", info = "Received invalid data on HMI response" }) + :Timeout(iTimeout) + + end + end + + --End Test case NegativeResponseCheck.3.9 + + + --Begin Test case NegativeResponseCheck.3.10 + --Description: displayCapabilities.imageFields[1].imageResolution.resolutionHeight parameter is wrong type + + for i = 1, #wrongTypeVales do + Test["SetDispLay_Res_displayCap_imageFields_imageResolution_resolutionHeight_wrongType_".. wrongTypeVales[i] .."_INVALID_DATA"] = function(self) + + --mobile side: sending SetDisplayLayout request + local cid = self.mobileSession:SendRPC("SetDisplayLayout", + { + displayLayout = "ONSCREEN_PRESETS" + }) + + + local responsedParams = createDefaultResponseParamsValues() + responsedParams.displayCapabilities.imageFields[1].imageResolution.resolutionHeight = wrongTypeVales[i] + + + --hmi side: expect UI.SetDisplayLayout request + EXPECT_HMICALL("UI.SetDisplayLayout", + { + displayLayout = "ONSCREEN_PRESETS" + }) + :Timeout(iTimeout) + :Do(function(_,data) + --hmi side: sending UI.SetDisplayLayout response + self.hmiConnection:SendResponse(data.id, data.method, "SUCCESS", responsedParams) + end) + + + --mobile side: expect SetDisplayLayout response + EXPECT_RESPONSE(cid, { success = false, resultCode = "INVALID_DATA", info = "Received invalid data on HMI response" }) + :Timeout(iTimeout) + + end + end + + --End Test case NegativeResponseCheck.3.10 + + + --Begin Test case NegativeResponseCheck.3.11 + --Description: displayCapabilities.mediaClockFormats parameter is wrong type + + local wrongTypeVales = {123} + + for i = 1, #wrongTypeVales do + Test["SetDispLay_Res_displayCap_mediaClockFormats_wrongType_".. wrongTypeVales[i] .."_INVALID_DATA"] = function(self) + + --mobile side: sending SetDisplayLayout request + local cid = self.mobileSession:SendRPC("SetDisplayLayout", + { + displayLayout = "ONSCREEN_PRESETS" + }) + + + local responsedParams = createDefaultResponseParamsValues() + + local testParam = + { + wrongTypeVales[i] + } + + responsedParams.displayCapabilities.mediaClockFormats = testParam + + + --hmi side: expect UI.SetDisplayLayout request + EXPECT_HMICALL("UI.SetDisplayLayout", + { + displayLayout = "ONSCREEN_PRESETS" + }) + :Timeout(iTimeout) + :Do(function(_,data) + --hmi side: sending UI.SetDisplayLayout response + self.hmiConnection:SendResponse(data.id, data.method, "SUCCESS", responsedParams) + end) + + + --mobile side: expect SetDisplayLayout response + EXPECT_RESPONSE(cid, { success = false, resultCode = "INVALID_DATA", info = "Received invalid data on HMI response" }) + :Timeout(iTimeout) + + end + end + + --End Test case NegativeResponseCheck.3.11 + + + --Begin Test case NegativeResponseCheck.3.2.5 + --Description: displayCapabilities.imageCapabilities parameter is wrong type + + + local wrongTypeVales = {123} + + for i = 1, #wrongTypeVales do + Test["SetDispLay_Res_displayCap_imageCapabilities_wrongType_".. wrongTypeVales[i] .."_INVALID_DATA"] = function(self) + + --mobile side: sending SetDisplayLayout request + local cid = self.mobileSession:SendRPC("SetDisplayLayout", + { + displayLayout = "ONSCREEN_PRESETS" + }) + + + local responsedParams = createDefaultResponseParamsValues() + local testParam = + { + wrongTypeVales[i] + } + + responsedParams.displayCapabilities.imageCapabilities = testParam + + --hmi side: expect UI.SetDisplayLayout request + EXPECT_HMICALL("UI.SetDisplayLayout", + { + displayLayout = "ONSCREEN_PRESETS" + }) + :Timeout(iTimeout) + :Do(function(_,data) + --hmi side: sending UI.SetDisplayLayout response + self.hmiConnection:SendResponse(data.id, data.method, "SUCCESS", responsedParams) + end) + + + --mobile side: expect SetDisplayLayout response + EXPECT_RESPONSE(cid, { success = false, resultCode = "INVALID_DATA", info = "Received invalid data on HMI response" }) + :Timeout(iTimeout) + + end + end + + + --End Test case NegativeResponseCheck.3.2.5 + + + --Begin Test case NegativeResponseCheck.3.2.6 + --Description: displayCapabilities.graphicSupported parameter is wrong type + + + local wrongTypeVales = {"true"} + + for i = 1, #wrongTypeVales do + Test["SetDispLay_Res_displayCap_graphicSupported_wrongType_".. tostring(wrongTypeVales[i]) .."_INVALID_DATA"] = function(self) + + --mobile side: sending SetDisplayLayout request + local cid = self.mobileSession:SendRPC("SetDisplayLayout", + { + displayLayout = "ONSCREEN_PRESETS" + }) + + + local responsedParams = createDefaultResponseParamsValues() + responsedParams.displayCapabilities.graphicSupported = wrongTypeVales[i] + + --hmi side: expect UI.SetDisplayLayout request + EXPECT_HMICALL("UI.SetDisplayLayout", + { + displayLayout = "ONSCREEN_PRESETS" + }) + :Timeout(iTimeout) + :Do(function(_,data) + --hmi side: sending UI.SetDisplayLayout response + self.hmiConnection:SendResponse(data.id, data.method, "SUCCESS", responsedParams) + end) + + + --mobile side: expect SetDisplayLayout response + EXPECT_RESPONSE(cid, { success = false, resultCode = "INVALID_DATA", info = "Received invalid data on HMI response" }) + :Timeout(iTimeout) + + end + end + + --End Test case NegativeResponseCheck.3.2.6 + + + --Begin Test case NegativeResponseCheck.3.2.7 + --Description: displayCapabilities.templatesAvailable parameter is wrong type + + + local wrongTypeVales = {123} + + for i = 1, #wrongTypeVales do + Test["SetDispLay_Res_displayCap_templatesAvailable_IsValidValue_".. tostring(wrongTypeVales[i]) .."_INVALID_DATA"] = function(self) + + --mobile side: sending SetDisplayLayout request + local cid = self.mobileSession:SendRPC("SetDisplayLayout", + { + displayLayout = "ONSCREEN_PRESETS" + }) + + + local responsedParams = createDefaultResponseParamsValues() + local testParam = + { + wrongTypeVales[i] + } + + responsedParams.displayCapabilities.templatesAvailable = testParam + + --hmi side: expect UI.SetDisplayLayout request + EXPECT_HMICALL("UI.SetDisplayLayout", + { + displayLayout = "ONSCREEN_PRESETS" + }) + :Timeout(iTimeout) + :Do(function(_,data) + --hmi side: sending UI.SetDisplayLayout response + self.hmiConnection:SendResponse(data.id, data.method, "SUCCESS", responsedParams) + end) + + + --mobile side: expect SetDisplayLayout response + EXPECT_RESPONSE(cid, { success = false, resultCode = "INVALID_DATA", info = "Received invalid data on HMI response" }) + :Timeout(iTimeout) + + end + end + + --End Test case NegativeResponseCheck.3.2.7 + + + --Begin Test case NegativeResponseCheck.3.8 + --Description: displayCapabilities.screenParams.resolution.resolutionHeight parameter is in bound + local wrongTypeVales = {"0"} + + for i = 1, #wrongTypeVales do + Test["SetDispLay_Res_displayCap_screenParams_resolution_resolutionHeight_wrongType_".. tostring(wrongTypeVales[i]) .."_INVALID_DATA"] = function(self) + + --mobile side: sending SetDisplayLayout request + local cid = self.mobileSession:SendRPC("SetDisplayLayout", + { + displayLayout = "ONSCREEN_PRESETS" + }) + + + local responsedParams = createDefaultResponseParamsValues() responsedParams.displayCapabilities.screenParams.resolution.resolutionHeight = wrongTypeVales[i] + + --hmi side: expect UI.SetDisplayLayout request + EXPECT_HMICALL("UI.SetDisplayLayout", + { + displayLayout = "ONSCREEN_PRESETS" + }) + :Timeout(iTimeout) + :Do(function(_,data) + --hmi side: sending UI.SetDisplayLayout response + self.hmiConnection:SendResponse(data.id, data.method, "SUCCESS", responsedParams) + end) + + + --mobile side: expect SetDisplayLayout response + EXPECT_RESPONSE(cid, { success = false, resultCode = "INVALID_DATA", info = "Received invalid data on HMI response" }) + :Timeout(iTimeout) + + end + end + + --End Test case NegativeResponseCheck.3.8 + + --Begin Test case NegativeResponseCheck.3.9 + --Description: displayCapabilities.screenParams.resolution.resolutionWidth parameter is wrong type + local wrongTypeVales = {"0"} + + for i = 1, #wrongTypeVales do + Test["SetDispLay_Res_displayCap_screenParams_resolution_resolutionWidth_wrongType_".. tostring(wrongTypeVales[i]) .."_INVALID_DATA"] = function(self) + + --mobile side: sending SetDisplayLayout request + local cid = self.mobileSession:SendRPC("SetDisplayLayout", + { + displayLayout = "ONSCREEN_PRESETS" + }) + + + local responsedParams = createDefaultResponseParamsValues() + responsedParams.displayCapabilities.screenParams.resolution.resolutionWidth = wrongTypeVales[i] + + --hmi side: expect UI.SetDisplayLayout request + EXPECT_HMICALL("UI.SetDisplayLayout", + { + displayLayout = "ONSCREEN_PRESETS" + }) + :Timeout(iTimeout) + :Do(function(_,data) + --hmi side: sending UI.SetDisplayLayout response + self.hmiConnection:SendResponse(data.id, data.method, "SUCCESS", responsedParams) + end) + + + --mobile side: expect SetDisplayLayout response + EXPECT_RESPONSE(cid, { success = false, resultCode = "INVALID_DATA", info = "Received invalid data on HMI response" }) + :Timeout(iTimeout) + + end + end + + --End Test case NegativeResponseCheck.3.9 + + + --Begin Test case NegativeResponseCheck.3.10 + --Description: displayCapabilities.screenParams.touchEventAvailable.pressAvailable parameter is wrong type + local wrongTypeVales = {"true"} + + for i = 1, #wrongTypeVales do + Test["SetDispLay_Res_displayCap_screenParams_touchEventAvailable_pressAvailable_wrongType_".. tostring(wrongTypeVales[i]) .."_INVALID_DATA"] = function(self) + + --mobile side: sending SetDisplayLayout request + local cid = self.mobileSession:SendRPC("SetDisplayLayout", + { + displayLayout = "ONSCREEN_PRESETS" + }) + + + local responsedParams = createDefaultResponseParamsValues() + responsedParams.displayCapabilities.screenParams.touchEventAvailable.pressAvailable = wrongTypeVales[i] + + --hmi side: expect UI.SetDisplayLayout request + EXPECT_HMICALL("UI.SetDisplayLayout", + { + displayLayout = "ONSCREEN_PRESETS" + }) + :Timeout(iTimeout) + :Do(function(_,data) + --hmi side: sending UI.SetDisplayLayout response + self.hmiConnection:SendResponse(data.id, data.method, "SUCCESS", responsedParams) + end) + + + --mobile side: expect SetDisplayLayout response + EXPECT_RESPONSE(cid, { success = false, resultCode = "INVALID_DATA", info = "Received invalid data on HMI response" }) + :Timeout(iTimeout) + + end + end + + --End Test case NegativeResponseCheck.3.10 + + --Begin Test case NegativeResponseCheck.3.11 + --Description: displayCapabilities.screenParams.touchEventAvailable.multiTouchAvailable parameter is wrong type + local wrongTypeVales = {"true"} + + for i = 1, #wrongTypeVales do + Test["SetDispLay_Res_displayCap_screenParams_touchEventAvailable_multiTouchAvailable_wrongType_".. tostring(wrongTypeVales[i]) .."_INVALID_DATA"] = function(self) + + --mobile side: sending SetDisplayLayout request + local cid = self.mobileSession:SendRPC("SetDisplayLayout", + { + displayLayout = "ONSCREEN_PRESETS" + }) + + + local responsedParams = createDefaultResponseParamsValues() + responsedParams.displayCapabilities.screenParams.touchEventAvailable.multiTouchAvailable = wrongTypeVales[i] + + --hmi side: expect UI.SetDisplayLayout request + EXPECT_HMICALL("UI.SetDisplayLayout", + { + displayLayout = "ONSCREEN_PRESETS" + }) + :Timeout(iTimeout) + :Do(function(_,data) + --hmi side: sending UI.SetDisplayLayout response + self.hmiConnection:SendResponse(data.id, data.method, "SUCCESS", responsedParams) + end) + + + --mobile side: expect SetDisplayLayout response + EXPECT_RESPONSE(cid, { success = false, resultCode = "INVALID_DATA", info = "Received invalid data on HMI response" }) + :Timeout(iTimeout) + + end + end + + --End Test case NegativeResponseCheck.3.11 + + --Begin Test case NegativeResponseCheck.3.12 + --Description: displayCapabilities.screenParams.touchEventAvailable.doublePressAvailable parameter is wrong type + local wrongTypeVales = {"true"} + + for i = 1, #wrongTypeVales do + Test["SetDispLay_Res_displayCap_screenParams_touchEventAvailable_doublePressAvailable_wrongType_".. tostring(wrongTypeVales[i]) .."_INVALID_DATA"] = function(self) + + --mobile side: sending SetDisplayLayout request + local cid = self.mobileSession:SendRPC("SetDisplayLayout", + { + displayLayout = "ONSCREEN_PRESETS" + }) + + + local responsedParams = createDefaultResponseParamsValues() + responsedParams.displayCapabilities.screenParams.touchEventAvailable.doublePressAvailable = wrongTypeVales[i] + + --hmi side: expect UI.SetDisplayLayout request + EXPECT_HMICALL("UI.SetDisplayLayout", + { + displayLayout = "ONSCREEN_PRESETS" + }) + :Timeout(iTimeout) + :Do(function(_,data) + --hmi side: sending UI.SetDisplayLayout response + self.hmiConnection:SendResponse(data.id, data.method, "SUCCESS", responsedParams) + end) + + + --mobile side: expect SetDisplayLayout response + EXPECT_RESPONSE(cid, { success = false, resultCode = "INVALID_DATA", info = "Received invalid data on HMI response" }) + :Timeout(iTimeout) + + end + end + + --End Test case NegativeResponseCheck.3.12 + + --Begin Test case NegativeResponseCheck.3.13 + --Description: displayCapabilities.numCustomPresetsAvailable parameter is wrong type + + local wrongTypeVales = {"0"} + + for i = 1, #wrongTypeVales do + Test["SetDispLay_Res_displayCap_numCustomPresetsAvailable_wrongType_".. tostring(wrongTypeVales[i]) .."_INVALID_DATA"] = function(self) + + --mobile side: sending SetDisplayLayout request + local cid = self.mobileSession:SendRPC("SetDisplayLayout", + { + displayLayout = "ONSCREEN_PRESETS" + }) + + + local responsedParams = createDefaultResponseParamsValues() + responsedParams.displayCapabilities.numCustomPresetsAvailable = wrongTypeVales[i] + + + --hmi side: expect UI.SetDisplayLayout request + EXPECT_HMICALL("UI.SetDisplayLayout", + { + displayLayout = "ONSCREEN_PRESETS" + }) + :Timeout(iTimeout) + :Do(function(_,data) + --hmi side: sending UI.SetDisplayLayout response + self.hmiConnection:SendResponse(data.id, data.method, "SUCCESS", responsedParams) + end) + + + --mobile side: expect SetDisplayLayout response + EXPECT_RESPONSE(cid, { success = false, resultCode = "INVALID_DATA", info = "Received invalid data on HMI response" }) + :Timeout(iTimeout) + + end + end + + --End Test case NegativeResponseCheck.3.13 + + + --Begin Test case NegativeResponseCheck.3.14 + --Description: buttonCapabilities.name parameter is wrong type + + local wrongTypeVales = {123} + + for i = 1, #wrongTypeVales do + Test["SetDispLay_Res_butCap_name_wrongType_".. tostring(wrongTypeVales[i]) .."_INVALID_DATA"] = function(self) + + --mobile side: sending SetDisplayLayout request + local cid = self.mobileSession:SendRPC("SetDisplayLayout", + { + displayLayout = "ONSCREEN_PRESETS" + }) + + + local responsedParams = createDefaultResponseParamsValues() + responsedParams.buttonCapabilities[1].name = wrongTypeVales[i] + + --hmi side: expect UI.SetDisplayLayout request + EXPECT_HMICALL("UI.SetDisplayLayout", + { + displayLayout = "ONSCREEN_PRESETS" + }) + :Timeout(iTimeout) + :Do(function(_,data) + --hmi side: sending UI.SetDisplayLayout response + self.hmiConnection:SendResponse(data.id, data.method, "SUCCESS", responsedParams) + end) + + + --mobile side: expect SetDisplayLayout response + EXPECT_RESPONSE(cid, { success = false, resultCode = "INVALID_DATA", info = "Received invalid data on HMI response" }) + :Timeout(iTimeout) + + end + end + + --End Test case NegativeResponseCheck.3.14 + + --Begin Test case NegativeResponseCheck.3.15 + --Description: buttonCapabilities.shortPressAvailable parameter is wrong type + + local wrongTypeVales = {"true"} + + for i = 1, #wrongTypeVales do + Test["SetDispLay_Res_butCap_shortPressAvailable_wrongType_".. tostring(wrongTypeVales[i]) .."_INVALID_DATA"] = function(self) + + --mobile side: sending SetDisplayLayout request + local cid = self.mobileSession:SendRPC("SetDisplayLayout", + { + displayLayout = "ONSCREEN_PRESETS" + }) + + + local responsedParams = createDefaultResponseParamsValues() + responsedParams.buttonCapabilities[1].shortPressAvailable = wrongTypeVales[i] + + --hmi side: expect UI.SetDisplayLayout request + EXPECT_HMICALL("UI.SetDisplayLayout", + { + displayLayout = "ONSCREEN_PRESETS" + }) + :Timeout(iTimeout) + :Do(function(_,data) + --hmi side: sending UI.SetDisplayLayout response + self.hmiConnection:SendResponse(data.id, data.method, "SUCCESS", responsedParams) + end) + + + --mobile side: expect SetDisplayLayout response + EXPECT_RESPONSE(cid, { success = false, resultCode = "INVALID_DATA", info = "Received invalid data on HMI response" }) + :Timeout(iTimeout) + + end + end + + --End Test case NegativeResponseCheck.3.15 + + + --Begin Test case NegativeResponseCheck.3.16 + --Description: buttonCapabilities.longPressAvailable parameter is wrong type + + local wrongTypeVales = {"true"} + + for i = 1, #wrongTypeVales do + Test["SetDispLay_Res_butCap_longPressAvailable_wrongType_".. tostring(wrongTypeVales[i]) .."_INVALID_DATA"] = function(self) + + --mobile side: sending SetDisplayLayout request + local cid = self.mobileSession:SendRPC("SetDisplayLayout", + { + displayLayout = "ONSCREEN_PRESETS" + }) + + + local responsedParams = createDefaultResponseParamsValues() + responsedParams.buttonCapabilities[1].longPressAvailable = wrongTypeVales[i] + + --hmi side: expect UI.SetDisplayLayout request + EXPECT_HMICALL("UI.SetDisplayLayout", + { + displayLayout = "ONSCREEN_PRESETS" + }) + :Timeout(iTimeout) + :Do(function(_,data) + --hmi side: sending UI.SetDisplayLayout response + self.hmiConnection:SendResponse(data.id, data.method, "SUCCESS", responsedParams) + end) + + + --mobile side: expect SetDisplayLayout response + EXPECT_RESPONSE(cid, { success = false, resultCode = "INVALID_DATA", info = "Received invalid data on HMI response" }) + :Timeout(iTimeout) + + end + end + + --End Test case NegativeResponseCheck.3.16 + + --Begin Test case NegativeResponseCheck.3.17 + --Description: buttonCapabilities.upDownAvailable parameter is wrong type + + local wrongTypeVales = {"true"} + + for i = 1, #wrongTypeVales do + Test["SetDispLay_Res_butCap_upDownAvailable_wrongType_".. tostring(wrongTypeVales[i]) .."_INVALID_DATA"] = function(self) + + --mobile side: sending SetDisplayLayout request + local cid = self.mobileSession:SendRPC("SetDisplayLayout", + { + displayLayout = "ONSCREEN_PRESETS" + }) + + + local responsedParams = createDefaultResponseParamsValues() + responsedParams.buttonCapabilities[1].upDownAvailable = wrongTypeVales[i] + + --hmi side: expect UI.SetDisplayLayout request + EXPECT_HMICALL("UI.SetDisplayLayout", + { + displayLayout = "ONSCREEN_PRESETS" + }) + :Timeout(iTimeout) + :Do(function(_,data) + --hmi side: sending UI.SetDisplayLayout response + self.hmiConnection:SendResponse(data.id, data.method, "SUCCESS", responsedParams) + end) + + + --mobile side: expect SetDisplayLayout response + EXPECT_RESPONSE(cid, { success = false, resultCode = "INVALID_DATA", info = "Received invalid data on HMI response" }) + :Timeout(iTimeout) + + end + end + + --End Test case NegativeResponseCheck.3.17 + + --Begin Test case NegativeResponseCheck.3.18 + --Description: softButtonCapabilities.shortPressAvailable parameter is wrong type + + local wrongTypeVales = {"true"} + + for i = 1, #wrongTypeVales do + Test["SetDispLay_Res_softButCap_shortPressAvailable_wrongType_".. tostring(wrongTypeVales[i]) .."_INVALID_DATA"] = function(self) + + --mobile side: sending SetDisplayLayout request + local cid = self.mobileSession:SendRPC("SetDisplayLayout", + { + displayLayout = "ONSCREEN_PRESETS" + }) + + + local responsedParams = createDefaultResponseParamsValues() + responsedParams.softButtonCapabilities[1].shortPressAvailable = wrongTypeVales[i] + + --hmi side: expect UI.SetDisplayLayout request + EXPECT_HMICALL("UI.SetDisplayLayout", + { + displayLayout = "ONSCREEN_PRESETS" + }) + :Timeout(iTimeout) + :Do(function(_,data) + --hmi side: sending UI.SetDisplayLayout response + self.hmiConnection:SendResponse(data.id, data.method, "SUCCESS", responsedParams) + end) + + + --mobile side: expect SetDisplayLayout response + EXPECT_RESPONSE(cid, { success = false, resultCode = "INVALID_DATA", info = "Received invalid data on HMI response" }) + :Timeout(iTimeout) + + end + end + + --End Test case NegativeResponseCheck.3.18 + + --Begin Test case NegativeResponseCheck.3.19 + --Description: softButtonCapabilities.longPressAvailable parameter is wrong type + + local wrongTypeVales = {"true"} + + for i = 1, #wrongTypeVales do + Test["SetDispLay_Res_softButCap_longPressAvailable_wrongType_".. tostring(wrongTypeVales[i]) .."_INVALID_DATA"] = function(self) + + --mobile side: sending SetDisplayLayout request + local cid = self.mobileSession:SendRPC("SetDisplayLayout", + { + displayLayout = "ONSCREEN_PRESETS" + }) + + + local responsedParams = createDefaultResponseParamsValues() + responsedParams.softButtonCapabilities[1].longPressAvailable = wrongTypeVales[i] + + --hmi side: expect UI.SetDisplayLayout request + EXPECT_HMICALL("UI.SetDisplayLayout", + { + displayLayout = "ONSCREEN_PRESETS" + }) + :Timeout(iTimeout) + :Do(function(_,data) + --hmi side: sending UI.SetDisplayLayout response + self.hmiConnection:SendResponse(data.id, data.method, "SUCCESS", responsedParams) + end) + + + --mobile side: expect SetDisplayLayout response + EXPECT_RESPONSE(cid, { success = false, resultCode = "INVALID_DATA", info = "Received invalid data on HMI response" }) + :Timeout(iTimeout) + + end + end + + --End Test case NegativeResponseCheck.3.19 + + --Begin Test case NegativeResponseCheck.3.20 + --Description: softButtonCapabilities.upDownAvailable parameter is wrong type + + local wrongTypeVales = {"true"} + + for i = 1, #wrongTypeVales do + Test["SetDispLay_Res_softButCap_upDownAvailable_wrongType_".. tostring(wrongTypeVales[i]) .."_INVALID_DATA"] = function(self) + + --mobile side: sending SetDisplayLayout request + local cid = self.mobileSession:SendRPC("SetDisplayLayout", + { + displayLayout = "ONSCREEN_PRESETS" + }) + + + local responsedParams = createDefaultResponseParamsValues() + responsedParams.softButtonCapabilities[1].upDownAvailable = wrongTypeVales[i] + + --hmi side: expect UI.SetDisplayLayout request + EXPECT_HMICALL("UI.SetDisplayLayout", + { + displayLayout = "ONSCREEN_PRESETS" + }) + :Timeout(iTimeout) + :Do(function(_,data) + --hmi side: sending UI.SetDisplayLayout response + self.hmiConnection:SendResponse(data.id, data.method, "SUCCESS", responsedParams) + end) + + + --mobile side: expect SetDisplayLayout response + EXPECT_RESPONSE(cid, { success = false, resultCode = "INVALID_DATA", info = "Received invalid data on HMI response" }) + :Timeout(iTimeout) + + end + end + + --End Test case NegativeResponseCheck.3.20 + + --Begin Test case NegativeResponseCheck.3.21 + --Description: softButtonCapabilities.imageSupported parameter is wrong type + + local wrongTypeVales = {"true"} + + for i = 1, #wrongTypeVales do + Test["SetDispLay_Res_softButCap_imageSupported_wrongType_".. tostring(wrongTypeVales[i]) .."_INVALID_DATA"] = function(self) + + --mobile side: sending SetDisplayLayout request + local cid = self.mobileSession:SendRPC("SetDisplayLayout", + { + displayLayout = "ONSCREEN_PRESETS" + }) + + + local responsedParams = createDefaultResponseParamsValues() + responsedParams.softButtonCapabilities[1].imageSupported = wrongTypeVales[i] + + --hmi side: expect UI.SetDisplayLayout request + EXPECT_HMICALL("UI.SetDisplayLayout", + { + displayLayout = "ONSCREEN_PRESETS" + }) + :Timeout(iTimeout) + :Do(function(_,data) + --hmi side: sending UI.SetDisplayLayout response + self.hmiConnection:SendResponse(data.id, data.method, "SUCCESS", responsedParams) + end) + + + --mobile side: expect SetDisplayLayout response + EXPECT_RESPONSE(cid, { success = false, resultCode = "INVALID_DATA", info = "Received invalid data on HMI response" }) + :Timeout(iTimeout) + + end + end + + --End Test case NegativeResponseCheck.3.21 + + --Begin Test case NegativeResponseCheck.3.22 + --Description: presetBankCapabilities.onScreenPresetsAvailable parameter is wrong type + + local wrongTypeVales = {"true"} + + for i = 1, #wrongTypeVales do + Test["SetDispLay_Res_presetBankCap_onScreenPresetsAvailable_wrongType_".. tostring(wrongTypeVales[i]) .."_INVALID_DATA"] = function(self) + + --mobile side: sending SetDisplayLayout request + local cid = self.mobileSession:SendRPC("SetDisplayLayout", + { + displayLayout = "ONSCREEN_PRESETS" + }) + + + local responsedParams = createDefaultResponseParamsValues() + responsedParams.presetBankCapabilities.onScreenPresetsAvailable = wrongTypeVales[i] + + --hmi side: expect UI.SetDisplayLayout request + EXPECT_HMICALL("UI.SetDisplayLayout", + { + displayLayout = "ONSCREEN_PRESETS" + }) + :Timeout(iTimeout) + :Do(function(_,data) + --hmi side: sending UI.SetDisplayLayout response + self.hmiConnection:SendResponse(data.id, data.method, "SUCCESS", responsedParams) + end) + + + --mobile side: expect SetDisplayLayout response + EXPECT_RESPONSE(cid, { success = false, resultCode = "INVALID_DATA", info = "Received invalid data on HMI response" }) + :Timeout(iTimeout) + + end + end + + --End Test case NegativeResponseCheck.3.22 + + + --End Test case NegativeResponseCheck.3 + + --Begin Test case NegativeResponseCheck.4 + --Description: check of each parameter is invalid json + + --[[TODO: Update after resolving APPLINK-13418 + + Test["SetDispLay_Res_Invalid_JSON_GENERIC_ERROR"] = function(self) + + --mobile side: sending SetDisplayLayout request + local cid = self.mobileSession:SendRPC("SetDisplayLayout", + { + displayLayout = "ONSCREEN_PRESETS" + }) + + + local message = '{"id":30,"jsonrpc":"2.0","result":{"buttonCapabilities":[{"longPressAvailable":true,"name":"PRESET_0","shortPressAvailable":true,"upDownAvailable":true},{"longPressAvailable":true,"name":"PRESET_1","shortPressAvailable":true,"upDownAvailable":true},{"longPressAvailable":true,"name":"PRESET_2","shortPressAvailable":true,"upDownAvailable":true},{"longPressAvailable":true,"name":"PRESET_3","shortPressAvailable":true,"upDownAvailable":true},{"longPressAvailable":true,"name":"PRESET_4","shortPressAvailable":true,"upDownAvailable":true},{"longPressAvailable":true,"name":"PRESET_5","shortPressAvailable":true,"upDownAvailable":true},{"longPressAvailable":true,"name":"PRESET_6","shortPressAvailable":true,"upDownAvailable":true},{"longPressAvailable":true,"name":"PRESET_7","shortPressAvailable":true,"upDownAvailable":true},{"longPressAvailable":true,"name":"PRESET_8","shortPressAvailable":true,"upDownAvailable":true},{"longPressAvailable":true,"name":"PRESET_9","shortPressAvailable":true,"upDownAvailable":true},{"longPressAvailable":true,"name":"OK","shortPressAvailable":true,"upDownAvailable":true},{"longPressAvailable":true,"name":"SEEKLEFT","shortPressAvailable":true,"upDownAvailable":true},{"longPressAvailable":true,"name":"SEEKRIGHT","shortPressAvailable":true,"upDownAvailable":true},{"longPressAvailable":true,"name":"TUNEUP","shortPressAvailable":true,"upDownAvailable":true},{"longPressAvailable":true,"name":"TUNEDOWN","shortPressAvailable":true,"upDownAvailable":true}],"code" 0,"displayCapabilities":{"displayType":"GEN2_8_DMA","graphicSupported":true,"imageCapabilities":["DYNAMIC","STATIC"],"imageFields":[{"imageResolution":{"resolutionHeight":64,"resolutionWidth":64},"imageTypeSupported":["GRAPHIC_BMP","GRAPHIC_JPEG","GRAPHIC_PNG"],"name":"softButtonImage"},{"imageResolution":{"resolutionHeight":64,"resolutionWidth":64},"imageTypeSupported":["GRAPHIC_BMP","GRAPHIC_JPEG","GRAPHIC_PNG"],"name":"choiceImage"},{"imageResolution":{"resolutionHeight":64,"resolutionWidth":64},"imageTypeSupported":["GRAPHIC_BMP","GRAPHIC_JPEG","GRAPHIC_PNG"],"name":"choiceSecondaryImage"},{"imageResolution":{"resolutionHeight":64,"resolutionWidth":64},"imageTypeSupported":["GRAPHIC_BMP","GRAPHIC_JPEG","GRAPHIC_PNG"],"name":"vrHelpItem"},{"imageResolution":{"resolutionHeight":64,"resolutionWidth":64},"imageTypeSupported":["GRAPHIC_BMP","GRAPHIC_JPEG","GRAPHIC_PNG"],"name":"turnIcon"},{"imageResolution":{"resolutionHeight":64,"resolutionWidth":64},"imageTypeSupported":["GRAPHIC_BMP","GRAPHIC_JPEG","GRAPHIC_PNG"],"name":"menuIcon"},{"imageResolution":{"resolutionHeight":64,"resolutionWidth":64},"imageTypeSupported":["GRAPHIC_BMP","GRAPHIC_JPEG","GRAPHIC_PNG"],"name":"cmdIcon"},{"imageResolution":{"resolutionHeight":64,"resolutionWidth":64},"imageTypeSupported":["GRAPHIC_BMP","GRAPHIC_JPEG","GRAPHIC_PNG"],"name":"graphic"},{"imageResolution":{"resolutionHeight":64,"resolutionWidth":64},"imageTypeSupported":["GRAPHIC_BMP","GRAPHIC_JPEG","GRAPHIC_PNG"],"name":"showConstantTBTIcon"},{"imageResolution":{"resolutionHeight":64,"resolutionWidth":64},"imageTypeSupported":["GRAPHIC_BMP","GRAPHIC_JPEG","GRAPHIC_PNG"],"name":"showConstantTBTNextTurnIcon"},{"imageResolution":{"resolutionHeight":64,"resolutionWidth":64},"imageTypeSupported":["GRAPHIC_BMP","GRAPHIC_JPEG","GRAPHIC_PNG"],"name":"showConstantTBTNextTurnIcon"}],"mediaClockFormats":["CLOCK1","CLOCK2","CLOCK3","CLOCKTEXT1","CLOCKTEXT2","CLOCKTEXT3","CLOCKTEXT4"],"numCustomPresetsAvailable":10,"screenParams":{"resolution":{"resolutionHeight":480,"resolutionWidth":800},"touchEventAvailable":{"doublePressAvailable":false,"multiTouchAvailable":true,"pressAvailable":true}},"templatesAvailable":["ONSCREEN_PRESETS"],"textFields":[{"characterSet":"TYPE2SET","name":"mainField1","rows":1,"width":500},{"characterSet":"TYPE2SET","name":"mainField2","rows":1,"width":500},{"characterSet":"TYPE2SET","name":"mainField3","rows":1,"width":500},{"characterSet":"TYPE2SET","name":"mainField4","rows":1,"width":500},{"characterSet":"TYPE2SET","name":"statusBar","rows":1,"width":500},{"characterSet":"TYPE2SET","name":"mediaClock","rows":1,"width":500},{"characterSet":"TYPE2SET","name":"mediaTrack","rows":1,"width":500},{"characterSet":"TYPE2SET","name":"alertText1","rows":1,"width":500},{"characterSet":"TYPE2SET","name":"alertText2","rows":1,"width":500},{"characterSet":"TYPE2SET","name":"alertText3","rows":1,"width":500},{"characterSet":"TYPE2SET","name":"scrollableMessageBody","rows":1,"width":500},{"characterSet":"TYPE2SET","name":"initialInteractionText","rows":1,"width":500},{"characterSet":"TYPE2SET","name":"navigationText1","rows":1,"width":500},{"characterSet":"TYPE2SET","name":"navigationText2","rows":1,"width":500},{"characterSet":"TYPE2SET","name":"ETA","rows":1,"width":500},{"characterSet":"TYPE2SET","name":"totalDistance","rows":1,"width":500},{"characterSet":"TYPE2SET","name":"navigationText","rows":1,"width":500},{"characterSet":"TYPE2SET","name":"audioPassThruDisplayText1","rows":1,"width":500},{"characterSet":"TYPE2SET","name":"audioPassThruDisplayText2","rows":1,"width":500},{"characterSet":"TYPE2SET","name":"sliderHeader","rows":1,"width":500},{"characterSet":"TYPE2SET","name":"sliderFooter","rows":1,"width":500},{"characterSet":"TYPE2SET","name":"notificationText","rows":1,"width":500},{"characterSet":"TYPE2SET","name":"menuName","rows":1,"width":500},{"characterSet":"TYPE2SET","name":"secondaryText","rows":1,"width":500},{"characterSet":"TYPE2SET","name":"tertiaryText","rows":1,"width":500},{"characterSet":"TYPE2SET","name":"timeToDestination","rows":1,"width":500},{"characterSet":"TYPE2SET","name":"turnText","rows":1,"width":500},{"characterSet":"TYPE2SET","name":"menuTitle","rows":1,"width":500},{"characterSet":"TYPE2SET","name":"locationName","rows":1,"width":500},{"characterSet":"TYPE2SET","name":"locationDescription","rows":1,"width":500},{"characterSet":"TYPE2SET","name":"addressLines","rows":1,"width":500},{"characterSet":"TYPE2SET","name":"phoneNumber","rows":1,"width":500}]},"method":"UI.SetDisplayLayout","presetBankCapabilities":{"onScreenPresetsAvailable":true},"softButtonCapabilities":[{"imageSupported":true,"longPressAvailable":true,"shortPressAvailable":true,"upDownAvailable":true}]}}' + + + --hmi side: expect UI.SetDisplayLayout request + EXPECT_HMICALL("UI.SetDisplayLayout", + { + displayLayout = "ONSCREEN_PRESETS" + }) + :Timeout(iTimeout) + :Do(function(_,data) + --hmi side: sending UI.SetDisplayLayout response + --change ":" by " " after "code" + --self.hmiConnection:Send('{"jsonrpc":"2.0","id":'..tostring(data.id)..',"result":{"code":0,"method":"UI.SetDisplayLayout"}}') + self.hmiConnection:Send(message) + end) + + + --mobile side: expect SetDisplayLayout response + EXPECT_RESPONSE(cid, {success = false, resultCode = "GENERIC_ERROR", info = nil}) + :Timeout(12000) + + end + + ]]-- + --End Test case NegativeResponseCheck.4 + + ----------------------------------------------------------------------------------------- + +--[[TODO update according to APPLINK-14765 + --Begin Test case NegativeResponseCheck.5 + --Description: Check of each response parameter (resultCode, method) value out of bound, missing, with wrong type, empty, duplicate etc. + + --Requirement id in JAMA: + --SDLAQ-CRS-1045 + + --Verification criteria: + -- The response contains 2 mandatory parameters "success" and "resultCode". + + --Begin Test case NegativeResponseCheck.5.1 + --Description: Check UI response with nonexistent resultCode + function Test: SetDispLay_UIResponseResultCodeNotExist() + --mobile side: sending SetDisplayLayout request + local cid = self.mobileSession:SendRPC("SetDisplayLayout", + { + displayLayout = "ONSCREEN_PRESETS" + }) + + + --hmi side: expect UI.SetDisplayLayout request + EXPECT_HMICALL("UI.SetDisplayLayout", + { + displayLayout = "ONSCREEN_PRESETS" + }) + :Do(function(_,data) + --hmi side: sending UI.SetDisplayLayout response + self.hmiConnection:SendResponse(data.id, data.method, "ANY", {}) + end) + + + --mobile side: expect SetDisplayLayout response + EXPECT_RESPONSE(cid, { success = false, resultCode = "INVALID_DATA" }) + end + --End Test case NegativeResponseCheck.5.1 + + ----------------------------------------------------------------------------------------- + + --Begin Test case NegativeResponseCheck.5.2 + --Description: Check UI response with empty string in method + function Test: SetDispLay_UIResponseMethodOutLowerBound() + --mobile side: sending SetDisplayLayout request + local cid = self.mobileSession:SendRPC("SetDisplayLayout", + { + displayLayout = "ONSCREEN_PRESETS" + }) + + + --hmi side: expect UI.SetDisplayLayout request + EXPECT_HMICALL("UI.SetDisplayLayout", + { + displayLayout = "ONSCREEN_PRESETS" + }) + :Do(function(_,data) + --hmi side: sending UI.SetDisplayLayout response + self.hmiConnection:SendResponse(data.id, "", "SUCCESS", {}) + end) + + --mobile side: expect SetDisplayLayout response + EXPECT_RESPONSE(cid, { success = false, resultCode = "GENERIC_ERROR" }) + :Timeout(12000) + end + --End Test case NegativeResponseCheck.5.2 + + ----------------------------------------------------------------------------------------- + + --Begin Test case NegativeResponseCheck.5.3 + --Description: Check UI response with empty string in resultCode + function Test: SetDispLay_UIResponseResultCodeOutLowerBound() + --mobile side: sending SetDisplayLayout request + local cid = self.mobileSession:SendRPC("SetDisplayLayout", + { + displayLayout = "ONSCREEN_PRESETS" + }) + + + --hmi side: expect UI.SetDisplayLayout request + EXPECT_HMICALL("UI.SetDisplayLayout", + { + displayLayout = "ONSCREEN_PRESETS" + }) + :Do(function(_,data) + --hmi side: sending UI.SetDisplayLayout response + self.hmiConnection:SendResponse(data.id, data.method, "", {}) + end) + + --mobile side: expect SetDisplayLayout response + EXPECT_RESPONSE(cid, { success = false, resultCode = "INVALID_DATA" }) + end + --End Test case NegativeResponseCheck.5.3 + + ----------------------------------------------------------------------------------------- + + --Begin NegativeResponseCheck.5.4 + --Description: Check UI response without all parameters + function Test: SetDispLay_UIResponseMissingAllPArameters() + --mobile side: sending SetDisplayLayout request + local cid = self.mobileSession:SendRPC("SetDisplayLayout", + { + displayLayout = "ONSCREEN_PRESETS" + }) + + + --hmi side: expect UI.SetDisplayLayout request + EXPECT_HMICALL("UI.SetDisplayLayout", + { + displayLayout = "ONSCREEN_PRESETS" + }) + :Do(function(_,data) + --hmi side: sending UI.SetDisplayLayout response + self.hmiConnection:Send({}) + end) + + + --mobile side: expect SetDisplayLayout response + EXPECT_RESPONSE(cid, { success = false, resultCode = "INVALID_DATA" }) + end + --End NegativeResponseCheck.5.4 + + ----------------------------------------------------------------------------------------- + + --Begin NegativeResponseCheck.5.5 + --Description: Check UI response without method parameter + function Test: SetDispLay_UIResponseMethodMissing() + --mobile side: sending SetDisplayLayout request + local cid = self.mobileSession:SendRPC("SetDisplayLayout", + { + displayLayout = "ONSCREEN_PRESETS" + }) + + + --hmi side: expect UI.SetDisplayLayout request + EXPECT_HMICALL("UI.SetDisplayLayout", + { + displayLayout = "ONSCREEN_PRESETS" + }) + :Do(function(_,data) + --hmi side: sending UI.SetDisplayLayout response + self.hmiConnection:Send('{"id":'..tostring(data.id)..',"jsonrpc":"2.0","result":{"code":0}}') + end) + + + EXPECT_RESPONSE(cid, { success = false, resultCode = "GENERIC_ERROR" }) + :Timeout(12000) + end + --End NegativeResponseCheck.5.5 + + ----------------------------------------------------------------------------------------- + + --Begin NegativeResponseCheck.5.6 + --Description: Check UI response without resultCode parameter + function Test: SetDispLay_UIResponseResultCodeMissing() + --mobile side: sending SetDisplayLayout request + local cid = self.mobileSession:SendRPC("SetDisplayLayout", + { + displayLayout = "ONSCREEN_PRESETS" + }) + + + --hmi side: expect UI.SetDisplayLayout request + EXPECT_HMICALL("UI.SetDisplayLayout", + { + displayLayout = "ONSCREEN_PRESETS" + }) + :Do(function(_,data) + --hmi side: sending UI.SetDisplayLayout response + self.hmiConnection:Send('{"id":'..tostring(data.id)..',"jsonrpc":"2.0","result":{"method":"UI.SetDisplayLayout"}}') + end) + end + --End NegativeResponseCheck.5.6 + + ----------------------------------------------------------------------------------------- + + --Begin NegativeResponseCheck.5.7 + --Description: Check UI response without mandatory parameter + function Test: SetDispLay_UIResponseAllMandatoryMissing() + --mobile side: sending SetDisplayLayout request + local cid = self.mobileSession:SendRPC("SetDisplayLayout", + { + displayLayout = "ONSCREEN_PRESETS" + }) + + + --hmi side: expect UI.SetDisplayLayout request + EXPECT_HMICALL("UI.SetDisplayLayout", + { + displayLayout = "ONSCREEN_PRESETS" + }) + :Do(function(_,data) + --hmi side: sending UI.SetDisplayLayout response + self.hmiConnection:Send('{"id":'..tostring(data.id)..',"jsonrpc":"2.0","result":{}}') + end) + + end + --End NegativeResponseCheck.5.7 + + ----------------------------------------------------------------------------------------- + + --Begin Test case NegativeResponseCheck.5.8 + --Description: Check UI response with wrong type of method + function Test:SetDispLay_UIResponseMethodWrongtype() + --mobile side: sending SetDisplayLayout request + local cid = self.mobileSession:SendRPC("SetDisplayLayout", + { + displayLayout = "ONSCREEN_PRESETS" + }) + + + --hmi side: expect UI.SetDisplayLayout request + EXPECT_HMICALL("UI.SetDisplayLayout", + { + displayLayout = "ONSCREEN_PRESETS" + }) + :Do(function(_,data) + --hmi side: sending UI.SetDisplayLayout response + self.hmiConnection:SendResponse(data.id, 1234, "SUCCESS", {}) + end) + + --mobile side: expect SetDisplayLayout response + EXPECT_RESPONSE(cid, { success = false, resultCode = "GENERIC_ERROR" }) + :Timeout(12000) + end + --End Test case NegativeResponseCheck.5.8 + + ----------------------------------------------------------------------------------------- + + --Begin Test case NegativeResponseCheck.5.9 + --Description: Check UI response with wrong type of resultCode + function Test:SetDispLay_UIResponseResultCodeWrongtype() + --mobile side: sending SetDisplayLayout request + local cid = self.mobileSession:SendRPC("SetDisplayLayout", + { + displayLayout = "ONSCREEN_PRESETS" + }) + + + --hmi side: expect UI.SetDisplayLayout request + EXPECT_HMICALL("UI.SetDisplayLayout", + { + displayLayout = "ONSCREEN_PRESETS" + }) + :Do(function(_,data) + --hmi side: sending UI.SetDisplayLayout response + self.hmiConnection:Send('{"id":'..tostring(data.id)..',"jsonrpc":"2.0","result":{"method":"UI.SetDisplayLayout", "code":true}}') + end) + + --mobile side: expect SetDisplayLayout response + EXPECT_RESPONSE(cid, { success = false, resultCode = "INVALID_DATA" }) + + end + --End Test case NegativeResponseCheck.5.9 + + ----------------------------------------------------------------------------------------- + + --Begin Test case NegativeResponseCheck.5.10 + --Description: Check UI response with invalid json + function Test: SetDispLay_UIResponseInvalidJson() + --mobile side: sending SetDisplayLayout request + local cid = self.mobileSession:SendRPC("SetDisplayLayout", + { + displayLayout = "ONSCREEN_PRESETS" + }) + + + --hmi side: expect UI.SetDisplayLayout request + EXPECT_HMICALL("UI.SetDisplayLayout", + { + displayLayout = "ONSCREEN_PRESETS" + }) + :Do(function(_,data) + --hmi side: sending UI.SetDisplayLayout response + self.hmiConnection:Send('{"id"'..tostring(data.id)..',"jsonrpc":"2.0","result":{"method":"UI.SetDisplayLayout", "code":0}}') + end) + + --mobile side: expect SetDisplayLayout response + EXPECT_RESPONSE(cid, { success = false, resultCode = "INVALID_DATA" }) + end + --End Test case NegativeResponseCheck.5.10 + --End Test case NegativeResponseCheck.5 +]] + --End Test suit NegativeResponseCheck + + + +---------------------------------------------------------------------------------------------- +----------------------------------------IV TEST BLOCK----------------------------------------- +---------------------------------------Result code check-------------------------------------- +---------------------------------------------------------------------------------------------- + + --Check all uncovered pairs resultCodes+success + + + --Write NewTestBlock to ATF log + function Test:NewTestBlock() + print("********************** IV TEST BLOCK: Result code check ************************") + end + + + --Begin Test suit ResultCodeCheck + --Description: check result code of response to Mobile (SDLAQ-CRS-1046) + + --Begin Test case ResultCodeCheck.1 + --Description: Check resultCode: SUCCESS + + --It is covered by TC SetDispLay_PositiveCase_SUCCESS + + --End Test case resultCodeCheck.1 + + ----------------------------------------------------------------------------------------- + + --Begin Test case resultCodeCheck.2 + --Description: Check resultCode: INVALID_DATA + + --Requirement id in JAMA/or Jira ID: SDLAQ-CRS-2680 + + --Verification criteria: SDL response INVALID_DATA resultCode to Mobile + + -- Covered by NegativeRequestCheck + + --End Test case resultCodeCheck.2 + + ----------------------------------------------------------------------------------------- + + --Begin Test case resultCodeCheck.3 + --Description: Check resultCode: OUT_OF_MEMORY + + --Requirement id in JAMA/or Jira ID: SDLAQ-CRS-2681 + + --Verification criteria: SDL returns OUT_OF_MEMORY result code for SetDisplayLayout request IN CASE SDL lacks memory RAM for executing it. + + -- Not applicable + + --End Test case resultCodeCheck.3 + + ----------------------------------------------------------------------------------------- + + --Begin Test case resultCodeCheck.4 + --Description: Check resultCode: TOO_MANY_PENDING_REQUESTS + + --Requirement id in JAMA/or Jira ID: SDLAQ-CRS-2682 + + --Verification criteria: The system has more than 1000 requests at a time that haven't been responded yet.The system sends the responses with TOO_MANY_PENDING_REQUESTS error code for all futher requests, until there are less than 1000 requests at a time that have not been responded by the system yet. + + --Move to another script: ATF_SetDispLay_TOO_MANY_PENDING_REQUESTS.lua + + --End Test case resultCodeCheck.4 + ----------------------------------------------------------------------------------------- + + --Begin Test case resultCodeCheck.5 + --Description: Check resultCode: REJECTED + + --Requirement id in JAMA/or Jira ID: SDLAQ-CRS-2685 + + --Verification criteria: In case SDL receives REJECTED result code for the RPC from HMI, SDL must transfer REJECTED resultCode with adding "success:false" to mobile app. + + + function Test:SetDispLay_resultCode_REJECTED() + + --mobile side: sending SetDisplayLayout request + local cid = self.mobileSession:SendRPC("SetDisplayLayout", + { + displayLayout = "ONSCREEN_PRESETS" + }) + + + local responsedParams = createDefaultResponseParamsValues() + local expectedParams = createExpectedResultParamsValuesOnMobile(false, "REJECTED") + + --hmi side: expect UI.SetDisplayLayout request + EXPECT_HMICALL("UI.SetDisplayLayout", + { + displayLayout = "ONSCREEN_PRESETS" + }) + :Timeout(iTimeout) + :Do(function(_,data) + --hmi side: sending UI.SetDisplayLayout response + self.hmiConnection:SendResponse(data.id, data.method, "REJECTED", responsedParams) + end) + + + --mobile side: expect SetDisplayLayout response + EXPECT_RESPONSE(cid, expectedParams) + :Timeout(iTimeout) + end + + + --End Test case resultCodeCheck.5 + + ----------------------------------------------------------------------------------------- + + --Begin Test case resultCodeCheck.6 + --Description: Check resultCode when HMI returns GENERIC_ERROR + + --Requirement id in JAMA/or Jira ID: SDLAQ-CRS-2684 + + --Verification criteria: SDL responses GENERIC_ERROR to mobile + + function Test:SetDispLay_HMI_Res_GENERIC_ERROR() + + --mobile side: sending SetDisplayLayout request + local cid = self.mobileSession:SendRPC("SetDisplayLayout", + { + displayLayout = "ONSCREEN_PRESETS" + }) + + --hmi side: expect UI.SetDisplayLayout request + EXPECT_HMICALL("UI.SetDisplayLayout", + { + displayLayout = "ONSCREEN_PRESETS" + }) + :Timeout(iTimeout) + :Do(function(_,data) + --hmi side: sending UI.SetDisplayLayout response + self.hmiConnection:SendResponse(data.id, data.method, "GENERIC_ERROR", {}) + end) + + --mobile side: expect SetDisplayLayout response + EXPECT_RESPONSE(cid, {success = false, resultCode = "GENERIC_ERROR"}) + :Timeout(12000) + end + + --End Test case resultCodeCheck.6 + --End Test suit resultCodeCheck + + + +---------------------------------------------------------------------------------------------- +-----------------------------------------V TEST BLOCK----------------------------------------- +---------------------------------------HMI negative cases------------------------------------- +---------------------------------------------------------------------------------------------- + + --------Checks----------- + -- requests without responses from HMI + -- invalid structure of response + -- several responses from HMI to one request + -- fake parameters + -- HMI correlation id check + -- wrong response with correct HMI id + + + --Write NewTestBlock to ATF log + function Test:NewTestBlock() + print("********************** V TEST BLOCK: HMI negative cases ************************") + end + + --Begin Test suit HMINegativeCheck + --Description: Check negative response from HMI + + --Begin Test case HMINegativeCheck.1 + --Description: Check SetDisplayLayout requests without UI responses from HMI + + --Requirement id in JAMA/or Jira ID: SDLAQ-CRS-2684 + + --Verification criteria: In case SDL splits the request from mobile app to several HMI interfaces AND one of the interfaces does not respond during SDL`s watchdog (important note: this component is working and has responded to previous RPCs), SDL must return "GENERIC_ERROR, success: false" result to mobile app AND include appropriate description into "info" parameter. + + function Test:SetDispLay_Without_UI_Res_GENERIC_ERROR() + + --mobile side: sending SetDisplayLayout request + local cid = self.mobileSession:SendRPC("SetDisplayLayout", + { + displayLayout = "ONSCREEN_PRESETS" + }) + + + --hmi side: expect UI.SetDisplayLayout request + EXPECT_HMICALL("UI.SetDisplayLayout", + { + displayLayout = "ONSCREEN_PRESETS" + }) + :Timeout(iTimeout) + + + --mobile side: expect SetDisplayLayout response + EXPECT_RESPONSE(cid, {success = false, resultCode = "GENERIC_ERROR", info = nil}) + :Timeout(12000) + + end + + --End Test case HMINegativeCheck.1 + + ----------------------------------------------------------------------------------------- + + --Begin Test case HMINegativeCheck.2 + --Description: Check responses from HMI (UI) with invalid structure + + --Requirement id in JAMA/or Jira ID: SDLAQ-CRS-1045 + + --Verification criteria: The response contains 2 mandatory parameters "success" and "resultCode". + + function Test:SetDispLay_UI_ResponseWithInvalidStructure_INVALID_DATA() + + --mobile side: sending SetDisplayLayout request + local cid = self.mobileSession:SendRPC("SetDisplayLayout", + { + displayLayout = "ONSCREEN_PRESETS" + }) + + + local responsedParams = createDefaultResponseParamsValues() + local expectedParams = createExpectedResultParamsValuesOnMobile(true, "SUCCESS") + + --hmi side: expect UI.SetDisplayLayout request + EXPECT_HMICALL("UI.SetDisplayLayout", + { + displayLayout = "ONSCREEN_PRESETS" + }) + :Timeout(iTimeout) + :Do(function(_,data) + --hmi side: sending UI.SetDisplayLayout response + --Move code outside of result parameter + --self.hmiConnection:Send('{"jsonrpc":"2.0","id":'..tostring(data.id)..',"result":{"code":0,"method":"UI.SetDisplayLayout"}}') + self.hmiConnection:Send('{"jsonrpc":"2.0","id":'..tostring(data.id)..',"code":0,"result":{"method":"UI.SetDisplayLayout"}}') + + end) + + --mobile side: expect SetDisplayLayout response + EXPECT_RESPONSE(cid, {success = false, resultCode = "INVALID_DATA", info = "Received invalid data on HMI response"}) + :Timeout(12000) + + end + + --End Test case HMINegativeCheck.2 + + ----------------------------------------------------------------------------------------- + + --Begin Test case HMINegativeCheck.3 + --Description: Check several responses from HMI (UI) to one request + + --Requirement id in JAMA/or Jira ID: SDLAQ-CRS-1045 + + --Verification criteria: The response contains 2 mandatory parameters "success" and "resultCode". + + function Test:SetDispLay_UI_SeveralResponseToOneRequest_SUCCESS() + + --mobile side: sending SetDisplayLayout request + local cid = self.mobileSession:SendRPC("SetDisplayLayout", + { + displayLayout = "ONSCREEN_PRESETS" + }) + + + local responsedParams = createDefaultResponseParamsValues() + local expectedParams1 = createExpectedResultParamsValuesOnMobile(true, "SUCCESS") + local expectedParams2 = createExpectedResultParamsValuesOnMobile(false, "INVALID_DATA") + + --hmi side: expect UI.SetDisplayLayout request + EXPECT_HMICALL("UI.SetDisplayLayout", + { + displayLayout = "ONSCREEN_PRESETS" + }) + :Timeout(iTimeout) + :Do(function(_,data) + --hmi side: sending UI.SetDisplayLayout response + self.hmiConnection:SendResponse(data.id, data.method, "SUCCESS", responsedParams) + self.hmiConnection:SendResponse(data.id, data.method, "INVALID_DATA", responsedParams) + end) + + + --mobile side: expect SetDisplayLayout response + EXPECT_RESPONSE(cid, expectedParams1) + :Timeout(iTimeout) + + end + + --End Test case HMINegativeCheck.3 + + ----------------------------------------------------------------------------------------- + + --Begin Test case HMINegativeCheck.4 + --Description: Check responses from HMI (UI) with fake parameter + + --Requirement id in JAMA/or Jira ID: SDLAQ-CRS-1045 + + --Verification criteria: SDL does not forward fake parameters to mobile + + --Begin Test case HMINegativeCheck.4.1 + --Description: Check responses from HMI (UI) with fake parameter + + function Test:SetDispLay_UI_ResponseWithFakeParamater_SUCCESS() + + --mobile side: sending SetDisplayLayout request + local cid = self.mobileSession:SendRPC("SetDisplayLayout", + { + displayLayout = "ONSCREEN_PRESETS" + }) + + + --hmi side: expect UI.SetDisplayLayout request + EXPECT_HMICALL("UI.SetDisplayLayout", + { + displayLayout = "ONSCREEN_PRESETS" + }) + :Timeout(iTimeout) + :Do(function(_,data) + --hmi side: sending UI.SetDisplayLayout response + local responsedParams = createDefaultResponseParamsValues() + responsedParams.fakeParameter = "fakeParameter" + self.hmiConnection:SendResponse(data.id, data.method, "SUCCESS", responsedParams) + end) + + --mobile side: expect SetDisplayLayout response + local expectedParams = createExpectedResultParamsValuesOnMobile(true, "SUCCESS") + EXPECT_RESPONSE(cid, expectedParams) + :Timeout(iTimeout) + :ValidIf(function(_,data) + if data.payload.fakeParameter then + print(" SDL re-sends fakeParameter parameter to Mobile in SetDisplayLayout response") + return false + else + return true + end + end) + + end + + --End Test case HMINegativeCheck.4.1 + + ----------------------------------------------------------------------------------------- + + --Begin Test case HMINegativeCheck.4.2 + --Description: Check responses from HMI (UI) with parameters of other response + + function Test:SetDispLay_UI_ResponseWithParamaterOfOtherRes_SUCCESS() + + --mobile side: sending SetDisplayLayout request + local cid = self.mobileSession:SendRPC("SetDisplayLayout", + { + displayLayout = "ONSCREEN_PRESETS" + }) + + + --hmi side: expect UI.SetDisplayLayout request + EXPECT_HMICALL("UI.SetDisplayLayout", + { + displayLayout = "ONSCREEN_PRESETS" + }) + :Timeout(iTimeout) + :Do(function(_,data) + --hmi side: sending UI.SetDisplayLayout response + local responsedParams = createDefaultResponseParamsValues() + responsedParams.tryAgainTime = 1 --Alert response + self.hmiConnection:SendResponse(data.id, data.method, "SUCCESS", responsedParams) + end) + + + --mobile side: expect SetDisplayLayout response + local expectedParams = createExpectedResultParamsValuesOnMobile(true, "SUCCESS") + EXPECT_RESPONSE(cid, expectedParams) + :Timeout(iTimeout) + :ValidIf(function(_,data) + if data.payload.tryAgainTime then + print(" SDL re-sends tryAgainTime parameter to Mobile in SetDisplayLayout response") + return false + else + return true + end + end) + + end + + --End Test case HMINegativeCheck.4.2 + --End Test case HMINegativeCheck.4 + + ----------------------------------------------------------------------------------------- + + --Begin Test case HMINegativeCheck.5 + --Description: Check UI wrong response with wrong HMI correlation id + + --Requirement id in JAMA/or Jira ID: SDLAQ-CRS-1045 + + --Verification criteria: The response contains 2 mandatory parameters "success" and "resultCode". + + function Test:SetDispLay_UI_ResponseWithWrongHMICorrelationId_GENERIC_ERROR() + + --mobile side: sending SetDisplayLayout request + local cid = self.mobileSession:SendRPC("SetDisplayLayout", + { + displayLayout = "ONSCREEN_PRESETS" + }) + + + local responsedParams = createDefaultResponseParamsValues() + local expectedParams = createExpectedResultParamsValuesOnMobile(true, "SUCCESS") + + --hmi side: expect UI.SetDisplayLayout request + EXPECT_HMICALL("UI.SetDisplayLayout", + { + displayLayout = "ONSCREEN_PRESETS" + }) + :Timeout(iTimeout) + :Do(function(_,data) + --hmi side: sending UI.SetDisplayLayout response + --self.hmiConnection:SendResponse(data.id, data.method, "SUCCESS", responsedParams) + self.hmiConnection:SendResponse(data.id + 1, data.method, "SUCCESS", responsedParams) + end) + + + --mobile side: expect SetDisplayLayout response + EXPECT_RESPONSE(cid, {success = false, resultCode = "GENERIC_ERROR"}) + :Timeout(12000) + + end + + --End Test case HMINegativeCheck.5 + + ----------------------------------------------------------------------------------------- + + --Begin Test case HMINegativeCheck.6 + --Description: Check UI wrong response with correct HMI id + + --Requirement id in JAMA/or Jira ID: SDLAQ-CRS-1045 + + --Verification criteria: The response contains 2 mandatory parameters "success" and "resultCode". + + function Test:SetDispLay_UI_WrongResponseWithCorrectHMICorrelationId_GENERIC_ERROR() + + --mobile side: sending SetDisplayLayout request + local cid = self.mobileSession:SendRPC("SetDisplayLayout", + { + displayLayout = "ONSCREEN_PRESETS" + }) + + + local responsedParams = createDefaultResponseParamsValues() + local expectedParams = createExpectedResultParamsValuesOnMobile(true, "SUCCESS") + + --hmi side: expect UI.SetDisplayLayout request + EXPECT_HMICALL("UI.SetDisplayLayout", + { + displayLayout = "ONSCREEN_PRESETS" + }) + :Timeout(iTimeout) + :Do(function(_,data) + --hmi side: sending UI.SetDisplayLayout response + --self.hmiConnection:SendResponse(data.id, data.method, "SUCCESS", responsedParams) + self.hmiConnection:SendResponse(data.id, "UI.Show", "SUCCESS", {}) + end) + + + --mobile side: expect SetDisplayLayout response + EXPECT_RESPONSE(cid, {success = false, resultCode = "GENERIC_ERROR"}) + :Timeout(12000) + + end + + --End Test case HMINegativeCheck.6 + --End Test suit HMINegativeCheck + +---------------------------------------------------------------------------------------------- +-----------------------------------------VI TEST BLOCK---------------------------------------- +-------------------------Sequence with emulating of user's action(s)-------------------------- +---------------------------------------------------------------------------------------------- + + -- Check different request sequence with timeout, emulating of user's actions +--[[ + + --Write NewTestBlock to ATF log + function Test:NewTestBlock() + print("********* VI TEST BLOCK: Sequence with emulating of user's action(s) ***********") + end + +--]] +---------------------------------------------------------------------------------------------- +-----------------------------------------VII TEST BLOCK--------------------------------------- +--------------------------------------Different HMIStatus------------------------------------- +---------------------------------------------------------------------------------------------- + + -- processing of request/response in different HMIlevels, SystemContext, AudioStreamingState + + --Write NewTestBlock to ATF log + function Test:NewTestBlock() + print("********************** VII TEST BLOCK: Different HMIStatus *********************") + end + + + --Begin Test suit DifferentHMIlevel + --Description: processing API in different HMILevel + + + --Begin Test case DifferentHMIlevel.1 + --Description: Check SetDisplayLayout request when application is in NONE HMI level + + --Requirement id in JAMA/or Jira ID: SDLAQ-CRS-1313 + + --Verification criteria: SetDisplayLayout is allowed in NONE HMI level + + function Test:SetDispLay_NONE_HMI_level_SUCCESS() + + --mobile side: sending SetDisplayLayout request + local cid = self.mobileSession:SendRPC("SetDisplayLayout", + { + displayLayout = "ONSCREEN_PRESETS" + }) + + + local responsedParams = createDefaultResponseParamsValues() + local expectedParams = createExpectedResultParamsValuesOnMobile(true, "SUCCESS") + + --hmi side: expect UI.SetDisplayLayout request + EXPECT_HMICALL("UI.SetDisplayLayout", + { + displayLayout = "ONSCREEN_PRESETS" + }) + :Timeout(iTimeout) + :Do(function(_,data) + --hmi side: sending UI.SetDisplayLayout response + self.hmiConnection:SendResponse(data.id, data.method, "SUCCESS", responsedParams) + end) + + + --mobile side: expect SetDisplayLayout response + EXPECT_RESPONSE(cid, expectedParams) + :Timeout(iTimeout) + end + + --End Test case DifferentHMIlevel.1 + + ----------------------------------------------------------------------------------------- + + --Begin Test case DifferentHMIlevel.2 + --Description: Check SetDisplayLayout request when application is in LIMITED HMI level + + --Requirement id in JAMA/or Jira ID: SDLAQ-CRS-1313 + + --Verification criteria: SetDisplayLayout is allowed in LIMITED HMI level + + -- Precondition 1: Activate app + function Test:ActivationApp() + --hmi side: sending SDL.ActivateApp request + local RequestId = self.hmiConnection:SendRequest("SDL.ActivateApp", { appID = self.appId}) + + --hmi side: expect SDL.ActivateApp response + EXPECT_HMIRESPONSE(RequestId) + :Do(function(_,data) + --In case when app is not allowed, it is needed to allow app + if + data.result.isSDLAllowed ~= true then + + --hmi side: sending SDL.GetUserFriendlyMessage request + local RequestId = self.hmiConnection:SendRequest("SDL.GetUserFriendlyMessage", + {language = "EN-US", messageCodes = {"DataConsent"}}) + + --hmi side: expect SDL.GetUserFriendlyMessage response + EXPECT_HMIRESPONSE(RequestId,{result = {code = 0, method = "SDL.GetUserFriendlyMessage"}}) + :Do(function(_,data) + + --hmi side: send request SDL.OnAllowSDLFunctionality + self.hmiConnection:SendNotification("SDL.OnAllowSDLFunctionality", + {allowed = true, source = "GUI", device = {id = 1, name = "127.0.0.1"}}) + + end) + + --hmi side: expect BasicCommunication.ActivateApp request + EXPECT_HMICALL("BasicCommunication.ActivateApp") + :Do(function(_,data) + + --hmi side: sending BasicCommunication.ActivateApp response + self.hmiConnection:SendResponse(data.id,"BasicCommunication.ActivateApp", "SUCCESS", {}) + + end) + :Times(AnyNumber()) + end + end) + + --mobile side: expect OnHMIStatus notification + EXPECT_NOTIFICATION("OnHMIStatus", {hmiLevel = "FULL", systemContext = "MAIN"}) + end + if + Test.isMediaApplication == true or + Test.appHMITypes["NAVIGATION"] == true or + Test.appHMITypes["COMMUNICATION"] == true then + + -- Precondition 2: Change app to LIMITED + function Test:ChangeHMIToLimited() + + --hmi side: sending BasicCommunication.OnAppDeactivated request + local cid = self.hmiConnection:SendNotification("BasicCommunication.OnAppDeactivated", + { + appID = self.applications["Test Application"], + --appID = appId0, + reason = "GENERAL" + }) + + --mobile side: expect OnHMIStatus notification + EXPECT_NOTIFICATION("OnHMIStatus",{hmiLevel = "LIMITED", audioStreamingState = "AUDIBLE", systemContext = "MAIN"}) + + end + + function Test:SetDispLay_LIMITED_HMI_level_SUCCESS() + + --mobile side: sending SetDisplayLayout request + local cid = self.mobileSession:SendRPC("SetDisplayLayout", + { + displayLayout = "ONSCREEN_PRESETS" + }) + + + local responsedParams = createDefaultResponseParamsValues() + local expectedParams = createExpectedResultParamsValuesOnMobile(true, "SUCCESS") + + --hmi side: expect UI.SetDisplayLayout request + EXPECT_HMICALL("UI.SetDisplayLayout", + { + displayLayout = "ONSCREEN_PRESETS" + }) + :Timeout(iTimeout) + :Do(function(_,data) + --hmi side: sending UI.SetDisplayLayout response + self.hmiConnection:SendResponse(data.id, data.method, "SUCCESS", responsedParams) + end) + + + --mobile side: expect SetDisplayLayout response + EXPECT_RESPONSE(cid, expectedParams) + :Timeout(iTimeout) + end + end + --End Test case DifferentHMIlevel.2 + + ----------------------------------------------------------------------------------------- + + --Begin Test case DifferentHMIlevel.3 + --Description: Check SetDisplayLayout request when application is in BACKGOUND HMI level + + --Requirement id in JAMA/or Jira ID: SDLAQ-CRS-1313 + + --Verification criteria: SetDisplayLayout is allowed in BACKGOUND HMI level + + -- Precondition 1: Opening new session + function Test:AddNewSession() + -- Connected expectation + self.mobileSession2 = mobile_session.MobileSession( + self, + self.mobileConnection) + + self.mobileSession2:StartService(7) + end + + -- Precondition 2: Register app2 + function Test:RegisterAppInterface_App2() + + --mobile side: RegisterAppInterface request + local CorIdRAI = self.mobileSession2:SendRPC("RegisterAppInterface", + { + syncMsgVersion = + { + majorVersion = 2, + minorVersion = 2, + }, + appName ="SPT2", + isMediaApplication = true, + languageDesired ="EN-US", + hmiDisplayLanguageDesired ="EN-US", + appID ="2", + ttsName = + { + { + text ="SyncProxyTester2", + type ="TEXT", + }, + }, + vrSynonyms = + { + "vrSPT2", + } + }) + + --hmi side: expect BasicCommunication.OnAppRegistered request + EXPECT_HMINOTIFICATION("BasicCommunication.OnAppRegistered", + { + application = + { + appName = "SPT2" + } + }) + :Do(function(_,data) + appId2 = data.params.application.appID + end) + + --mobile side: RegisterAppInterface response + self.mobileSession2:ExpectResponse(CorIdRAI, { success = true, resultCode = "SUCCESS"}) + :Timeout(2000) + + self.mobileSession2:ExpectNotification("OnHMIStatus", {hmiLevel = "NONE", audioStreamingState = "NOT_AUDIBLE", systemContext = "MAIN"}) + + end + + -- Precondition 5: Activate an other media app to change app to BACKGROUND + function Test:Activate_Media_App2() + --HMI send ActivateApp request + local RequestId = self.hmiConnection:SendRequest("SDL.ActivateApp", { appID = appId2}) + EXPECT_HMIRESPONSE(RequestId) + :Do(function(_,data) + + if data.result.isSDLAllowed ~= true then + local RequestId = self.hmiConnection:SendRequest("SDL.GetUserFriendlyMessage", {language = "EN-US", messageCodes = {"DataConsent"}}) + EXPECT_HMIRESPONSE(RequestId,{result = {code = 0, method = "SDL.GetUserFriendlyMessage"}}) + :Do(function(_,data) + --hmi side: send request SDL.OnAllowSDLFunctionality + self.hmiConnection:SendNotification("SDL.OnAllowSDLFunctionality", {allowed = true, source = "GUI", device = {id = 1, name = "127.0.0.1"}}) + end) + + EXPECT_HMICALL("BasicCommunication.ActivateApp") + :Do(function(_,data) + self.hmiConnection:SendResponse(data.id,"BasicCommunication.ActivateApp", "SUCCESS", {}) + end) + :Times(2) + end + end) + + self.mobileSession2:ExpectNotification("OnHMIStatus", {hmiLevel = "FULL", audioStreamingState = "AUDIBLE", systemContext = "MAIN"}) + :Timeout(12000) + + self.mobileSession:ExpectNotification("OnHMIStatus", {hmiLevel = "BACKGROUND", audioStreamingState = "NOT_AUDIBLE", systemContext = "MAIN"}) + + end + + function Test:SetDispLay_BACKGROUND_HMI_level_SUCCESS() + + --mobile side: sending SetDisplayLayout request + local cid = self.mobileSession:SendRPC("SetDisplayLayout", + { + displayLayout = "ONSCREEN_PRESETS" + }) + + + local responsedParams = createDefaultResponseParamsValues() + local expectedParams = createExpectedResultParamsValuesOnMobile(true, "SUCCESS") + + --hmi side: expect UI.SetDisplayLayout request + EXPECT_HMICALL("UI.SetDisplayLayout", + { + displayLayout = "ONSCREEN_PRESETS" + }) + :Timeout(iTimeout) + :Do(function(_,data) + --hmi side: sending UI.SetDisplayLayout response + self.hmiConnection:SendResponse(data.id, data.method, "SUCCESS", responsedParams) + end) + + + --mobile side: expect SetDisplayLayout response + EXPECT_RESPONSE(cid, expectedParams) + :Timeout(iTimeout) + end + + --End Test case DifferentHMIlevel.3 + + ----------------------------------------------------------------------------------------- + + --Begin Test case DifferentHMIlevel.4 + + --Requirement id in JAMA/or Jira ID: SDLAQ-CRS-2683 + + --Verification criteria: SDL sends APPLICATION_NOT_REGISTERED result code when the app sends a request within the same connection before RegisterAppInterface has been performed yet. + + -- Unregister application + function Test:UnregisterAppInterface_Success() + local cid = self.mobileSession:SendRPC("UnregisterAppInterface",{}) + + EXPECT_RESPONSE(cid, { success = true, resultCode = "SUCCESS"}) + :Timeout(2000) + end + + --Send SetDisplayLayout when application not registered yet. + + function Test:SetDispLay_resultCode_APPLICATION_NOT_REGISTERED() + + --mobile side: sending SetDisplayLayout request + local cid = self.mobileSession:SendRPC("SetDisplayLayout", + { + displayLayout = "ONSCREEN_PRESETS" + }) + + --hmi side: expect UI.SetDisplayLayout request + EXPECT_HMICALL("UI.SetDisplayLayout", + { + displayLayout = "ONSCREEN_PRESETS" + }) + :Timeout(iTimeout) + :Times(0) + + + --mobile side: expect SetDisplayLayout response + EXPECT_RESPONSE(cid, {success = false, resultCode = "APPLICATION_NOT_REGISTERED", info = nil}) + :Timeout(iTimeout) + end + + --End Test case DifferentHMIlevel.4 + + +--End Test suit DifferentHMIlevel + +--------------------------------------------------------------------------------------------- +-------------------------------------------Postcondition------------------------------------- +--------------------------------------------------------------------------------------------- + + --Print new line to separate Postconditions + commonFunctions:newTestCasesGroup("Postconditions") + + + --Restore sdl_preloaded_pt.json + policyTable:Restore_preloaded_pt() + + + + return Test + diff --git a/test_scripts/API/ATF_SetGlobalProperties.lua b/test_scripts/API/ATF_SetGlobalProperties.lua new file mode 100644 index 0000000000..ebda8edd48 --- /dev/null +++ b/test_scripts/API/ATF_SetGlobalProperties.lua @@ -0,0 +1,37116 @@ +-- ATF verstion: 2.2 +local commonSteps = require('user_modules/shared_testcases/commonSteps') +local commonPreconditions = require('user_modules/shared_testcases/commonPreconditions') + + +function DeleteLog_app_info_dat_policy() + commonSteps:CheckSDLPath() + local SDLStoragePath = config.pathToSDL .. "storage/" + + --Delete app_info.dat and log files and storage + if commonSteps:file_exists(config.pathToSDL .. "app_info.dat") == true then + os.remove(config.pathToSDL .. "app_info.dat") + end + + if commonSteps:file_exists(config.pathToSDL .. "SmartDeviceLinkCore.log") == true then + os.remove(config.pathToSDL .. "SmartDeviceLinkCore.log") + end + + if commonSteps:file_exists(SDLStoragePath .. "policy.sqlite") == true then + os.remove(SDLStoragePath .. "policy.sqlite") + end + + if commonSteps:file_exists(config.pathToSDL .. "policy.sqlite") == true then + os.remove(config.pathToSDL .. "policy.sqlite") + end +print("path = " .."rm -r " ..config.pathToSDL .. "storage") + os.execute("rm -r " ..config.pathToSDL .. "storage") +end + +DeleteLog_app_info_dat_policy() + +function UpdatePolicy() + commonPreconditions:BackupFile("sdl_preloaded_pt.json") + local src_preloaded_json = config.pathToSDL .."sdl_preloaded_pt.json" + local dest = "files/SetGlobalProperties_DISALLOWED.json" + + local filecopy = "cp " .. dest .." " .. src_preloaded_json + + os.execute(filecopy) +end + +UpdatePolicy() + +Test = require('connecttest') +require('cardinalities') +local events = require('events') +local mobile_session = require('mobile_session') +local mobile = require('mobile_connection') +local tcp = require('tcp_connection') +local file_connection = require('file_connection') + + +--------------------------------------------------------------------------------------------- +-----------------------------Required Shared Libraries--------------------------------------- +--------------------------------------------------------------------------------------------- +require('user_modules/AppTypes') +local commonTestCases = require('user_modules/shared_testcases/commonTestCases') +local commonSteps = require('user_modules/shared_testcases/commonSteps') +local commonFunctions = require('user_modules/shared_testcases/commonFunctions') +APIName = "SetGlobalProperties" -- use for above required scripts. +strMaxLengthFileName255 = string.rep("a", 251) .. ".png" -- set max length file name + +local iTimeout = 5000 +config.deviceMAC = "12ca17b49af2289436f303e0166030a21e525d266e209267433801a8fd4071a0" +--ToDo: shall be removed when APPLINK-16610 is fixed +config.defaultProtocolVersion = 2 + +local strAppFolder = config.pathToSDL .. "storage/" ..config.application1.registerAppInterfaceParams.appID.. "_" .. config.deviceMAC.. "/" + + +--------------------------------------------------------------------------------------------- +---------------------------------------Common functions-------------------------------------- +--------------------------------------------------------------------------------------------- +function Check_menuIconParams(data, type_icon, value) + + + if( (value == nil) or (#value == 0) ) then value = "action.png" end + if(type_icon == nil) then type_icon = "DYNAMIC" end + + local result = true + local path = "bin/storage/"..config.application1.registerAppInterfaceParams.appID.. "_" .. config.deviceMAC.. "/" + local value_Icon = value--"action.png" + + if (type_icon == "DYNAMIC") then + value_Icon = path .. value--"action.png" + end + + + + --if (data.params.menuIcon.imageType ~= "DYNAMIC") then + if (data.params.menuIcon.imageType ~= type_icon) then + print("\27[31m imageType of menuIcon is WRONG. Expected: ".. type_icon.."; Real: " .. data.params.menuIcon.imageType .. "\27[0m") + result = false + end + + if(string.find(data.params.menuIcon.value, value_Icon) ) then + + else + print("\27[31m value of menuIcon is WRONG. Expected: ~/".. value_Icon .. "; Real: " .. data.params.menuIcon.value .. "\27[0m") + result = false + end + + return result +end + +function DelayedExp(time) + local event = events.Event() + event.matches = function(self, e) return self == e end + EXPECT_EVENT(event, "Delayed event") + :Timeout(time+1000) + RUN_AFTER(function() + RAISE_EVENT(event, event) + end, time) +end + + +function copy_table(t) + local t2 = {} + for k,v in pairs(t) do + t2[k] = v + end + return t2 +end +--------------------------------------------------------------------------------------------- +-------------------------------------------Preconditions------------------------------------- +--------------------------------------------------------------------------------------------- + + --1. Activate application + commonSteps:ActivationApp() + + --2 + --Description: Update Policy with SetGlobalProperties API in FULL, LIMITED, BACKGROUND is allowed + --ToDo: Shall be uncommented when APPLINK-25363: "[Genivi]Service ID for endpoints are incorrectly written in DB after ignition off/on" is fixed + -- function Test:Precondition_PolicyUpdate() + -- --hmi side: sending SDL.GetURLS request + -- local RequestIdGetURLS = self.hmiConnection:SendRequest("SDL.GetURLS", { service = 7 }) + + -- --hmi side: expect SDL.GetURLS response from HMI + -- EXPECT_HMIRESPONSE(RequestIdGetURLS,{result = {code = 0, method = "SDL.GetURLS", urls = {{url = "http://policies.telematics.ford.com/api/policies"}}}}) + -- :Do(function(_,data) + -- --print("SDL.GetURLS response is received") + -- --hmi side: sending BasicCommunication.OnSystemRequest request to SDL + -- self.hmiConnection:SendNotification("BasicCommunication.OnSystemRequest", + -- { + -- requestType = "PROPRIETARY", + -- fileName = "filename" + -- } + -- ) + -- --mobile side: expect OnSystemRequest notification + -- EXPECT_NOTIFICATION("OnSystemRequest", { requestType = "PROPRIETARY" }) + -- :Do(function(_,data) + -- --print("OnSystemRequest notification is received") + -- --mobile side: sending SystemRequest request + -- local CorIdSystemRequest = self.mobileSession:SendRPC("SystemRequest", + -- { + -- fileName = "PolicyTableUpdate", + -- requestType = "PROPRIETARY" + -- }, + -- "files/ptu_general.json") + + -- local systemRequestId + -- --hmi side: expect SystemRequest request + -- EXPECT_HMICALL("BasicCommunication.SystemRequest") + -- :Do(function(_,data) + -- systemRequestId = data.id + -- --print("BasicCommunication.SystemRequest is received") + + -- --hmi side: sending BasicCommunication.OnSystemRequest request to SDL + -- self.hmiConnection:SendNotification("SDL.OnReceivedPolicyUpdate", + -- { + -- policyfile = "/tmp/fs/mp/images/ivsu_cache/PolicyTableUpdate" + -- } + -- ) + -- function to_run() + -- --hmi side: sending SystemRequest response + -- self.hmiConnection:SendResponse(systemRequestId,"BasicCommunication.SystemRequest", "SUCCESS", {}) + -- end + + -- RUN_AFTER(to_run, 500) + -- end) + + -- --hmi side: expect SDL.OnStatusUpdate + -- EXPECT_HMINOTIFICATION("SDL.OnStatusUpdate") + -- :ValidIf(function(exp,data) + -- if + -- exp.occurences == 1 and + -- data.params.status == "UP_TO_DATE" then + -- return true + -- elseif + -- exp.occurences == 1 and + -- data.params.status == "UPDATING" then + -- return true + -- elseif + -- exp.occurences == 2 and + -- data.params.status == "UP_TO_DATE" then + -- return true + -- else + -- if + -- exp.occurences == 1 then + -- print ("\27[31m SDL.OnStatusUpdate came with wrong values. Expected in first occurrences status 'UP_TO_DATE' or 'UPDATING', got '" .. tostring(data.params.status) .. "' \27[0m") + -- elseif exp.occurences == 2 then + -- print ("\27[31m SDL.OnStatusUpdate came with wrong values. Expected in second occurrences status 'UP_TO_DATE', got '" .. tostring(data.params.status) .. "' \27[0m") + -- end + -- return false + -- end + -- end) + -- :Times(Between(1,2)) + + -- --mobile side: expect SystemRequest response + -- EXPECT_RESPONSE(CorIdSystemRequest, { success = true, resultCode = "SUCCESS"}) + -- :Do(function(_,data) + -- --print("SystemRequest is received") + -- --hmi side: sending SDL.GetUserFriendlyMessage request to SDL + -- local RequestIdGetUserFriendlyMessage = self.hmiConnection:SendRequest("SDL.GetUserFriendlyMessage", {language = "EN-US", messageCodes = {"StatusUpToDate"}}) + + -- --hmi side: expect SDL.GetUserFriendlyMessage response + -- -- TODO: update after resolving APPLINK-16094 EXPECT_HMIRESPONSE(RequestIdGetUserFriendlyMessage,{result = {code = 0, method = "SDL.GetUserFriendlyMessage", messages = {{line1 = "Up-To-Date", messageCode = "StatusUpToDate", textBody = "Up-To-Date"}}}}) + -- EXPECT_HMIRESPONSE(RequestIdGetUserFriendlyMessage) + -- :Do(function(_,data) + -- print("SDL.GetUserFriendlyMessage is received") + -- end) + -- end) + + -- end) + -- end) + -- end + + --3. PutFiles + commonSteps:PutFile("PutFile_MinLength", "a") + commonSteps:PutFile("PutFile_action.png", "action.png") + commonSteps:PutFile("PutFile_MaxLength_255Characters", strMaxLengthFileName255) + commonSteps:PutFile("Putfile_SpaceBefore", " SpaceBefore") + +--------------------------------------------------------------------------------------------- +-----------------------------------------I TEST BLOCK---------------------------------------- +--CommonRequestCheck: Check of mandatory/conditional request's parameters (mobile protocol)-- +--------------------------------------------------------------------------------------------- + +--Begin test suit CommonRequestCheck +--Description: + -- request with all parameters + -- request with only mandatory parameters + -- request with all combinations of conditional-mandatory parameters (if exist) + -- request with one by one conditional parameters (each case - one conditional parameter) + -- request with missing mandatory parameters one by one (each case - missing one mandatory parameter) + -- request with all parameters are missing + -- request with fake parameters (fake - not from protocol, from another request) + -- request is sent with invalid JSON structure + -- different conditions of correlationID parameter (invalid, several the same etc.) + + + --Requirement id in JAMA: SDLAQ-CRS-11 + + --Verification criteria: + --SetGlobalProperties sets-up global properties for the current application. + --SDL sets-up default values for "vrHelpTitle" and "vrHelp" parameters if they both don't exist in request. + --VRHelpTitle and VRHelpItems are sent with SetGlobalProperties request for setting app’s help items. HMI will open by itself a top level HelpList as a result of VR activation. + + + --Begin test case CommonRequestCheck.1 + --Description: Check request with all parameters + + function Test:SetGlobalProperties_PositiveCase_SUCCESS() + + --mobile side: sending SetGlobalProperties request + local cid = self.mobileSession:SendRPC("SetGlobalProperties", + { + menuTitle = "Menu Title", + timeoutPrompt = + { + { + text = "Timeout prompt", + type = "TEXT" + } + }, + vrHelp = + { + { + position = 1, + image = + { + value = "action.png", + imageType = "DYNAMIC" + }, + text = "VR help item" + } + }, + menuIcon = + { + value = "action.png", + imageType = "DYNAMIC" + }, + helpPrompt = + { + { + text = "Help prompt", + type = "TEXT" + } + }, + vrHelpTitle = "VR help title", + keyboardProperties = + { + keyboardLayout = "QWERTY", + keypressMode = "SINGLE_KEYPRESS", + limitedCharacterList = + { + "a" + }, + language = "EN-US", + autoCompleteText = "Daemon, Freedom" + } + }) + + + --hmi side: expect TTS.SetGlobalProperties request + EXPECT_HMICALL("TTS.SetGlobalProperties", + { + timeoutPrompt = + { + { + text = "Timeout prompt", + type = "TEXT" + } + }, + helpPrompt = + { + { + text = "Help prompt", + type = "TEXT" + } + } + }) + :Timeout(iTimeout) + :Do(function(_,data) + --hmi side: sending UI.SetGlobalProperties response + self.hmiConnection:SendResponse(data.id, data.method, "SUCCESS", {}) + end) + + + + --hmi side: expect UI.SetGlobalProperties request + EXPECT_HMICALL("UI.SetGlobalProperties", + { + menuTitle = "Menu Title", + vrHelp = + { + { + position = 1, + --[[ TODO: update after resolving APPLINK-16052 + image = + { + imageType = "DYNAMIC", + value = strAppFolder .. "action.png" + },]] + text = "VR help item" + } + }, + --Checked below + -- menuIcon = + -- { + -- imageType = "DYNAMIC", + -- value = strAppFolder .. "action.png" + -- }, + vrHelpTitle = "VR help title", + keyboardProperties = + { + keyboardLayout = "QWERTY", + keypressMode = "SINGLE_KEYPRESS", + --[=[ TODO: update after resolving APPLINK-16047 + + limitedCharacterList = + { + "a" + },]=] + language = "EN-US", + autoCompleteText = "Daemon, Freedom" + } + }) + :ValidIf(function(_,data) + return Check_menuIconParams(data) + end) + :Timeout(iTimeout) + :Do(function(_,data) + --hmi side: sending UI.SetGlobalProperties response + self.hmiConnection:SendResponse(data.id, data.method, "SUCCESS", {}) + end) + + --mobile side: expect SetGlobalProperties response + EXPECT_RESPONSE(cid, { success = true, resultCode = "SUCCESS"}) + :Timeout(iTimeout) + + --mobile side: expect OnHashChange notification + EXPECT_NOTIFICATION("OnHashChange") + end + + --End test case CommonRequestCheck.1 + ----------------------------------------------------------------------------------------- + + + --Begin test case CommonRequestCheck.2 + --Description: Check request with only mandatory parameters + + --There is no mandatory parameter. + + --End test case CommonRequestCheck.2 + ----------------------------------------------------------------------------------------- + + --Begin test case CommonRequestCheck.3 + --Description: Check request with one by one conditional parameters: vrHelpTitle + + function Test:SetGlobalProperties_WithOnlyOneParameter_vrHelpTitle_REJECTED() + + --mobile side: sending SetGlobalProperties request + local cid = self.mobileSession:SendRPC("SetGlobalProperties", + { + vrHelpTitle = "VR help title" + }) + + + --mobile side: expect SetGlobalProperties response + EXPECT_RESPONSE(cid, { success = false, resultCode = "REJECTED"}) + :Timeout(iTimeout) + + --mobile side: expect OnHashChange notification is not send to mobile + EXPECT_NOTIFICATION("OnHashChange") + :Times(0) + end + + --End test case CommonRequestCheck.3 + ----------------------------------------------------------------------------------------- + + --Begin test case CommonRequestCheck.4 + --Description: Check request with one by one conditional parameters: menuTitle + + function Test:SetGlobalProperties_WithOnlyOneParameter_menuTitle_SUCCESS() + + --mobile side: sending SetGlobalProperties request + local cid = self.mobileSession:SendRPC("SetGlobalProperties", + { + menuTitle = "Menu Title" + }) + + + --hmi side: expect UI.SetGlobalProperties request + EXPECT_HMICALL("UI.SetGlobalProperties", + { + menuTitle = "Menu Title" + }) + :Timeout(iTimeout) + :Do(function(_,data) + --hmi side: sending UI.SetGlobalProperties response + self.hmiConnection:SendResponse(data.id, data.method, "SUCCESS", {}) + end) + + + + --mobile side: expect SetGlobalProperties response + EXPECT_RESPONSE(cid, { success = true, resultCode = "SUCCESS"}) + :Timeout(iTimeout) + + --mobile side: expect OnHashChange notification + EXPECT_NOTIFICATION("OnHashChange") + end + + --End test case CommonRequestCheck.4 + ----------------------------------------------------------------------------------------- + + --Begin test case CommonRequestCheck.5 + --Description: Check request with one by one conditional parameters: menuIcon + + --Verification criteria: Set optional icon to draw on an app menu button (for certain touchscreen platforms). + + function Test:SetGlobalProperties_WithOnlyOneParameter_menuIcon_SUCCESS() + + --mobile side: sending SetGlobalProperties request + local cid = self.mobileSession:SendRPC("SetGlobalProperties", + { + menuIcon = + { + value = "action.png", + imageType = "DYNAMIC" + } + }) + + + --hmi side: expect UI.SetGlobalProperties request + EXPECT_HMICALL("UI.SetGlobalProperties", + { + --Checked below + -- menuIcon = + -- { + -- imageType = "DYNAMIC", + -- value = strAppFolder .. "action.png" + -- } + }) + :ValidIf(function(_,data) + return Check_menuIconParams(data) + end) + :Timeout(iTimeout) + :Do(function(_,data) + --hmi side: sending UI.SetGlobalProperties response + self.hmiConnection:SendResponse(data.id, data.method, "SUCCESS", {}) + end) + + + + --mobile side: expect SetGlobalProperties response + EXPECT_RESPONSE(cid, { success = true, resultCode = "SUCCESS"}) + :Timeout(iTimeout) + + --mobile side: expect OnHashChange notification + EXPECT_NOTIFICATION("OnHashChange") + end + + --End test case CommonRequestCheck.5 + ----------------------------------------------------------------------------------------- + + --Begin test case CommonRequestCheck.6 + --Description: Check request with one by one conditional parameters: keyboardProperties + + function Test:SetGlobalProperties_WithOnlyOneParameter_keyboardProperties_SUCCESS() + + --mobile side: sending SetGlobalProperties request + local cid = self.mobileSession:SendRPC("SetGlobalProperties", + { + keyboardProperties = + { + keyboardLayout = "QWERTY", + keypressMode = "SINGLE_KEYPRESS", + limitedCharacterList = + { + "a" + }, + language = "EN-US", + autoCompleteText = "Daemon, Freedom" + } + }) + + + --hmi side: expect UI.SetGlobalProperties request + EXPECT_HMICALL("UI.SetGlobalProperties", + { + keyboardProperties = + { + keyboardLayout = "QWERTY", + keypressMode = "SINGLE_KEYPRESS", + --[[ TODO: update after resolving APPLINK-16047 + limitedCharacterList = + { + "a" + },]] + language = "EN-US", + autoCompleteText = "Daemon, Freedom" + } + }) + :Timeout(iTimeout) + :Do(function(_,data) + --hmi side: sending UI.SetGlobalProperties response + self.hmiConnection:SendResponse(data.id, data.method, "SUCCESS", {}) + end) + + + + --mobile side: expect SetGlobalProperties response + EXPECT_RESPONSE(cid, { success = true, resultCode = "SUCCESS"}) + :Timeout(iTimeout) + + --mobile side: expect OnHashChange notification + EXPECT_NOTIFICATION("OnHashChange") + end + + --End test case CommonRequestCheck.6 + ----------------------------------------------------------------------------------------- + + --Begin test case CommonRequestCheck.7 + --Description: Check request with one by one conditional parameters: vrHelp + + + function Test:SetGlobalProperties_WithOnlyOneParameter_vrHelp_REJECTED() + + --mobile side: sending SetGlobalProperties request + local cid = self.mobileSession:SendRPC("SetGlobalProperties", + { + vrHelp = + { + { + position = 1, + image = + { + value = "action.png", + imageType = "DYNAMIC" + }, + text = "VR help item" + } + } + }) + + + --mobile side: expect SetGlobalProperties response + EXPECT_RESPONSE(cid, { success = false, resultCode = "REJECTED"}) + :Timeout(iTimeout) + + --mobile side: expect OnHashChange notification is not send to mobile + EXPECT_NOTIFICATION("OnHashChange") + :Times(0) + end + + --End test case CommonRequestCheck.7 + ----------------------------------------------------------------------------------------- + + --Begin test case CommonRequestCheck.8 + --Description: Check request with one by one conditional parameters: helpPrompt + + function Test:SetGlobalProperties_WithOnlyOneParameter_helpPrompt_SUCCESS() + + --mobile side: sending SetGlobalProperties request + local cid = self.mobileSession:SendRPC("SetGlobalProperties", + { + helpPrompt = + { + { + text = "Help prompt", + type = "TEXT" + } + }, + --UPDATED according to APPLINK-19642 + --"valid SetGlobalproperties_request with "timeoutPrompt" and/or "helpPrompt" and at least one other valid parameter" + menuTitle = "Menu Title" + }) + + + --hmi side: expect TTS.SetGlobalProperties request + EXPECT_HMICALL("TTS.SetGlobalProperties", + { + helpPrompt = + { + { + text = "Help prompt", + type = "TEXT" + } + } + }) + :Timeout(iTimeout) + + :Do(function(_,data) + --hmi side: sending UI.SetGlobalProperties response + self.hmiConnection:SendResponse(data.id, data.method, "SUCCESS", {}) + end) + + --print("\27[31m Defect: APPLINK-23888 \27[0m") + --hmi side: expect UI.SetGlobalProperties request + EXPECT_HMICALL("UI.SetGlobalProperties", + { + vrHelpTitle = config.application1.registerAppInterfaceParams.appName + }) + --UPDATED + --:Timeout(iTimeout) + :Do(function(_,data) + --hmi side: sending UI.SetGlobalProperties response + self.hmiConnection:SendResponse(data.id, data.method, "SUCCESS", {}) + end) + + + + --mobile side: expect SetGlobalProperties response + EXPECT_RESPONSE(cid, { success = true, resultCode = "SUCCESS"}) + :Timeout(iTimeout) + + --mobile side: expect OnHashChange notification + EXPECT_NOTIFICATION("OnHashChange") + end + + --End test case CommonRequestCheck.8 + ----------------------------------------------------------------------------------------- + + --Begin test case CommonRequestCheck.9 + --Description: Check request with one by one conditional parameters: timeoutPrompt + + function Test:SetGlobalProperties_WithOnlyOneParameter_timeoutPrompt_SUCCESS() + + --mobile side: sending SetGlobalProperties request + local cid = self.mobileSession:SendRPC("SetGlobalProperties", + { + timeoutPrompt = + { + { + text = "Timeout prompt", + type = "TEXT" + } + }, + --UPDATED according to APPLINK-19642 + --"valid SetGlobalproperties_request with "timeoutPrompt" and/or "helpPrompt" and at least one other valid parameter" + menuTitle = "Menu Title" + }) + + + --hmi side: expect TTS.SetGlobalProperties request + EXPECT_HMICALL("TTS.SetGlobalProperties", + { + timeoutPrompt = + { + { + text = "Timeout prompt", + type = "TEXT" + } + } + }) + :Timeout(iTimeout) + :Do(function(_,data) + --hmi side: sending UI.SetGlobalProperties response + self.hmiConnection:SendResponse(data.id, data.method, "SUCCESS", {}) + end) + + --print("\27[31m Defect: APPLINK-23888 \27[0m") + --hmi side: expect UI.SetGlobalProperties request + EXPECT_HMICALL("UI.SetGlobalProperties", + { + vrHelpTitle = config.application1.registerAppInterfaceParams.appName + }) + --UPDATED + --:Timeout(iTimeout) + :Do(function(_,data) + --hmi side: sending UI.SetGlobalProperties response + self.hmiConnection:SendResponse(data.id, data.method, "SUCCESS", {}) + end) + + + --mobile side: expect SetGlobalProperties response + EXPECT_RESPONSE(cid, { success = true, resultCode = "SUCCESS"}) + :Timeout(iTimeout) + + --mobile side: expect OnHashChange notification + EXPECT_NOTIFICATION("OnHashChange") + end + + --End test case CommonRequestCheck.9 + ----------------------------------------------------------------------------------------- + + --Begin test case CommonRequestCheck.10 + --Description: Check request with all parameters are missing + + --Requirement id in JAMA: SDLAQ-CRS-11, SDLAQ-CRS-383 + + --Verification criteria: SDL response INVALID_DATA in case mandatory parameters are not provided + + commonTestCases:VerifyRequestIsMissedAllParameters() + + --End test case CommonRequestCheck.10 + ----------------------------------------------------------------------------------------- + + --Begin test case CommonRequestCheck.11 + --Description: Check request with fake parameters + + --Requirement id in JAMA/or Jira ID: APPLINK-4518 + + --Verification criteria: According to xml tests by Ford team all fake parameters should be ignored by SDL... + + --Check fake parameter + function Test:SetGlobalProperties_FakeParameters_SUCCESS() + + --mobile side: sending SetGlobalProperties request + local cid = self.mobileSession:SendRPC("SetGlobalProperties", + { + menuTitle = "Menu Title", + fakeparameter = "fakeparameters", + timeoutPrompt = + { + { + fakeparameter1 = "fakeparameter", + text = "Timeout prompt", + type = "TEXT" + } + }, + vrHelp = + { + { + fakeparameter2 = "fakeparameter", + position = 1, + image = + { + value = "action.png", + imageType = "DYNAMIC" + }, + text = "VR help item" + } + }, + menuIcon = + { + fakeparameter3 = "fakeparameter", + value = "action.png", + imageType = "DYNAMIC" + }, + helpPrompt = + { + { + fakeparameter4 = "fakeparameter", + text = "Help prompt", + type = "TEXT" + } + }, + vrHelpTitle = "VR help title", + keyboardProperties = + { + keyboardLayout = "QWERTY", + keypressMode = "SINGLE_KEYPRESS", + fakeparameter5 = "fakeparameter", + limitedCharacterList = + { + "a" + }, + language = "EN-US", + autoCompleteText = "Daemon, Freedom" + } + }) + + + + --hmi side: expect TTS.SetGlobalProperties request + EXPECT_HMICALL("TTS.SetGlobalProperties", + { + timeoutPrompt = + { + { + text = "Timeout prompt", + type = "TEXT" + } + }, + helpPrompt = + { + { + text = "Help prompt", + type = "TEXT" + } + } + }) + :Timeout(iTimeout) + :ValidIf(function(_,data) + if data.params.fakeParameter or + data.params.timeoutPrompt[1].fakeParameter1 or + data.params.helpPrompt[1].fakeParameter4 + then + print(" SDL re-sends fakeParameters to HMI in UI.SetAppIcon request") + return false + else + return true + end + end) + + :Do(function(_,data) + --hmi side: sending UI.SetGlobalProperties response + self.hmiConnection:SendResponse(data.id, data.method, "SUCCESS", {}) + end) + + + + --hmi side: expect UI.SetGlobalProperties request + EXPECT_HMICALL("UI.SetGlobalProperties", + { + menuTitle = "Menu Title", + vrHelp = + { + { + position = 1, + --[=[ TODO: update after resolving APPLINK-16052 + image = + { + imageType = "DYNAMIC", + value = strAppFolder .. "action.png" + },]=] + text = "VR help item" + } + }, + --Checked below + -- menuIcon = + -- { + -- imageType = "DYNAMIC", + -- value = strAppFolder .. "action.png" + -- }, + vrHelpTitle = "VR help title", + keyboardProperties = + { + keyboardLayout = "QWERTY", + keypressMode = "SINGLE_KEYPRESS", + --TODO: update after resolving APPLINK-16047 - Still NOK + -- limitedCharacterList = + -- { + -- "a" + -- }, + language = "EN-US", + autoCompleteText = "Daemon, Freedom" + } + }) + :ValidIf(function(_,data) + return Check_menuIconParams(data) + end) + :Timeout(iTimeout) + :ValidIf(function(_,data) + if data.params.fakeParameter or + data.params.vrHelp[1].fakeParameter2 or + data.params.menuIcon.fakeParameter3 or + data.params.keyboardProperties.fakeParameter5 + then + print(" SDL re-sends fakeParameters to HMI in UI.SetAppIcon request") + return false + else + return true + end + end) + + :Do(function(_,data) + --hmi side: sending UI.SetGlobalProperties response + self.hmiConnection:SendResponse(data.id, data.method, "SUCCESS", {}) + end) + + --mobile side: expect SetGlobalProperties response + EXPECT_RESPONSE(cid, { success = true, resultCode = "SUCCESS"}) + :Timeout(iTimeout) + + --mobile side: expect OnHashChange notification + EXPECT_NOTIFICATION("OnHashChange") + end + + --Check request with parameter of other request + function Test:SetGlobalProperties_ParametersAnotherAPI_SUCCESS() + + --mobile side: sending SetGlobalProperties request + local cid = self.mobileSession:SendRPC("SetGlobalProperties", + { + menuTitle = "Menu Title", + syncFileName = "action.png", + timeoutPrompt = + { + { + syncFileName = "action.png", + text = "Timeout prompt", + type = "TEXT" + } + }, + vrHelp = + { + { + syncFileName = "action.png", + position = 1, + image = + { + value = "action.png", + imageType = "DYNAMIC" + }, + text = "VR help item" + } + }, + menuIcon = + { + syncFileName = "action.png", + value = "action.png", + imageType = "DYNAMIC" + }, + helpPrompt = + { + { + syncFileName = "action.png", + text = "Help prompt", + type = "TEXT" + } + }, + vrHelpTitle = "VR help title", + keyboardProperties = + { + keyboardLayout = "QWERTY", + keypressMode = "SINGLE_KEYPRESS", + syncFileName = "action.png", + limitedCharacterList = + { + "a" + }, + language = "EN-US", + autoCompleteText = "Daemon, Freedom" + } + }) + + + --hmi side: expect TTS.SetGlobalProperties request + EXPECT_HMICALL("TTS.SetGlobalProperties", + { + timeoutPrompt = + { + { + text = "Timeout prompt", + type = "TEXT" + } + }, + helpPrompt = + { + { + text = "Help prompt", + type = "TEXT" + } + } + }) + :Timeout(iTimeout) + :ValidIf(function(_,data) + if data.params.syncFileName or + data.params.timeoutPrompt[1].syncFileName or + data.params.helpPrompt[1].syncFileName + then + print(" SDL re-sends syncFileName parameter to HMI in UI.SetAppIcon request") + return false + else + return true + end + end) + + :Do(function(_,data) + --hmi side: sending UI.SetGlobalProperties response + self.hmiConnection:SendResponse(data.id, data.method, "SUCCESS", {}) + end) + + + --hmi side: expect UI.SetGlobalProperties request + EXPECT_HMICALL("UI.SetGlobalProperties", + { + menuTitle = "Menu Title", + vrHelp = + { + { + position = 1, + --[=[ TODO: update after resolving APPLINK-16052 + + image = + { + imageType = "DYNAMIC", + value = strAppFolder .. "action.png" + },]=] + text = "VR help item" + } + }, + --Checked below + -- menuIcon = + -- { + -- imageType = "DYNAMIC", + -- value = strAppFolder .. "action.png" + -- }, + vrHelpTitle = "VR help title", + keyboardProperties = + { + keyboardLayout = "QWERTY", + keypressMode = "SINGLE_KEYPRESS", + --[=[ TODO: update after resolving APPLINK-16047 + + limitedCharacterList = + { + "a" + },]=] + language = "EN-US", + autoCompleteText = "Daemon, Freedom" + } + }) + :ValidIf(function(_,data) + return Check_menuIconParams(data) + end) + :Timeout(iTimeout) + :ValidIf(function(_,data) + if data.params.syncFileName or + data.params.vrHelp[1].syncFileName or + data.params.menuIcon.syncFileName or + data.params.keyboardProperties.syncFileName + then + print(" SDL re-sends syncFileName parameter to HMI in UI.SetAppIcon request") + return false + else + return true + end + end) + + :Do(function(_,data) + --hmi side: sending UI.SetGlobalProperties response + self.hmiConnection:SendResponse(data.id, data.method, "SUCCESS", {}) + end) + + --mobile side: expect SetGlobalProperties response + EXPECT_RESPONSE(cid, { success = true, resultCode = "SUCCESS"}) + :Timeout(iTimeout) + + --mobile side: expect OnHashChange notification + EXPECT_NOTIFICATION("OnHashChange") + end + + + --End test case CommonRequestCheck.11 + ----------------------------------------------------------------------------------------- + + --Begin test case CommonRequestCheck.12 + --Description: Check request is sent with invalid JSON structure + + --Requirement id in JAMA: SDLAQ-CRS-11, SDLAQ-CRS-383 + + --Verification criteria: SDL responses INVALID_DATA + + --change ":" by "=" + local Payload = '{"helpPrompt"=[{"type":"TEXT","text":"Help prompt 1"},{"type":"TEXT","text":"Second help prompt"}],"timeoutPrompt":{{"type":"TEXT","text":"First timeout prompt"},{"type":"TEXT","text":"Another timeout prompt"}}}' + + commonTestCases:VerifyInvalidJsonRequest(12, Payload) + + --End test case CommonRequestCheck.12 + ----------------------------------------------------------------------------------------- + + --Begin test case CommonRequestCheck.13 + --Description: Check missing helpPrompt parameter is not mandatory + + function Test:SetGlobalProperties_helpPrompt_isMissing_SUCCESS() + + --mobile side: sending SetGlobalProperties request + local cid = self.mobileSession:SendRPC("SetGlobalProperties", + { + menuTitle = "Menu Title", + timeoutPrompt = + { + { + text = "Timeout prompt", + type = "TEXT" + } + }, + vrHelp = + { + { + position = 1, + image = + { + value = "action.png", + imageType = "DYNAMIC" + }, + text = "VR help item" + } + }, + menuIcon = + { + value = "action.png", + imageType = "DYNAMIC" + }, + vrHelpTitle = "VR help title", + keyboardProperties = + { + keyboardLayout = "QWERTY", + keypressMode = "SINGLE_KEYPRESS", + limitedCharacterList = + { + "a" + }, + language = "EN-US", + autoCompleteText = "Daemon, Freedom" + } + }) + + + --hmi side: expect TTS.SetGlobalProperties request + EXPECT_HMICALL("TTS.SetGlobalProperties", + { + timeoutPrompt = + { + { + text = "Timeout prompt", + type = "TEXT" + } + } + }) + :Timeout(iTimeout) + :Do(function(_,data) + --hmi side: sending UI.SetGlobalProperties response + self.hmiConnection:SendResponse(data.id, data.method, "SUCCESS", {}) + end) + + + + --hmi side: expect UI.SetGlobalProperties request + EXPECT_HMICALL("UI.SetGlobalProperties", + { + menuTitle = "Menu Title", + vrHelp = + { + { + position = 1, + --[=[ TODO: update after resolving APPLINK-16052 + + image = + { + imageType = "DYNAMIC", + value = strAppFolder .. "action.png" + },]=] + text = "VR help item" + } + }, + --Checked below + -- menuIcon = + -- { + -- imageType = "DYNAMIC", + -- value = strAppFolder .. "action.png" + -- }, + vrHelpTitle = "VR help title", + keyboardProperties = + { + keyboardLayout = "QWERTY", + keypressMode = "SINGLE_KEYPRESS", + --TODO: update after resolving APPLINK-16047 - Still NOK + -- limitedCharacterList = + -- { + -- "a" + -- }, + language = "EN-US", + autoCompleteText = "Daemon, Freedom" + } + }) + :Timeout(iTimeout) + :ValidIf(function(_,data) + return Check_menuIconParams(data) + end) + + :Do(function(_,data) + --hmi side: sending UI.SetGlobalProperties response + self.hmiConnection:SendResponse(data.id, data.method, "SUCCESS", {}) + end) + + --mobile side: expect SetGlobalProperties response + EXPECT_RESPONSE(cid, { success = true, resultCode = "SUCCESS"}) + :Timeout(iTimeout) + + --mobile side: expect OnHashChange notification + EXPECT_NOTIFICATION("OnHashChange") + end + + --End test case CommonRequestCheck.13 + ----------------------------------------------------------------------------------------- + + --Begin test case CommonRequestCheck.14 + --Description: Check missing timeoutPrompt parameter is not mandatory + + function Test:SetGlobalProperties_timeoutPrompt_isMissing_SUCCESS() + + --mobile side: sending SetGlobalProperties request + local cid = self.mobileSession:SendRPC("SetGlobalProperties", + { + menuTitle = "Menu Title", + vrHelp = + { + { + position = 1, + image = + { + value = "action.png", + imageType = "DYNAMIC" + }, + text = "VR help item" + } + }, + menuIcon = + { + value = "action.png", + imageType = "DYNAMIC" + }, + helpPrompt = + { + { + text = "Help prompt", + type = "TEXT" + } + }, + vrHelpTitle = "VR help title", + keyboardProperties = + { + keyboardLayout = "QWERTY", + keypressMode = "SINGLE_KEYPRESS", + limitedCharacterList = + { + "a" + }, + language = "EN-US", + autoCompleteText = "Daemon, Freedom" + } + }) + + + --hmi side: expect TTS.SetGlobalProperties request + EXPECT_HMICALL("TTS.SetGlobalProperties", + { + helpPrompt = + { + { + text = "Help prompt", + type = "TEXT" + } + } + }) + :Timeout(iTimeout) + :Do(function(_,data) + --hmi side: sending UI.SetGlobalProperties response + self.hmiConnection:SendResponse(data.id, data.method, "SUCCESS", {}) + end) + + + + --hmi side: expect UI.SetGlobalProperties request + EXPECT_HMICALL("UI.SetGlobalProperties", + { + menuTitle = "Menu Title", + vrHelp = + { + { + position = 1, + --[=[ TODO: update after resolving APPLINK-16052 + + image = + { + imageType = "DYNAMIC", + value = strAppFolder .. "action.png" + },]=] + text = "VR help item" + } + }, + --Checked below + -- menuIcon = + -- { + -- imageType = "DYNAMIC", + -- value = strAppFolder .. "action.png" + -- }, + vrHelpTitle = "VR help title", + keyboardProperties = + { + keyboardLayout = "QWERTY", + keypressMode = "SINGLE_KEYPRESS", + --[=[ TODO: update after resolving APPLINK-16047 + + limitedCharacterList = + { + "a" + },]=] + language = "EN-US", + autoCompleteText = "Daemon, Freedom" + } + }) + :Timeout(iTimeout) + :ValidIf(function(_,data) + return Check_menuIconParams(data) + end) + :Do(function(_,data) + --hmi side: sending UI.SetGlobalProperties response + self.hmiConnection:SendResponse(data.id, data.method, "SUCCESS", {}) + end) + + --mobile side: expect SetGlobalProperties response + EXPECT_RESPONSE(cid, { success = true, resultCode = "SUCCESS"}) + :Timeout(iTimeout) + + --mobile side: expect OnHashChange notification + EXPECT_NOTIFICATION("OnHashChange") + end + + --End test case CommonRequestCheck.14 + ----------------------------------------------------------------------------------------- + + --Begin test case CommonRequestCheck.15 + --Description: Check missing vrHelpTitle parameter is not mandatory + + --Requirement id in JAMA: SDLAQ-CRS-389 + + --Verification criteria: "3. SDL rejects the request with REJECTED resultCode when vrHelpTitle is omitted and the vrHelpItems are provided at the same time." + + function Test:SetGlobalProperties_vrHelpTitle_isMissing_REJECTED() + + --mobile side: sending SetGlobalProperties request + local cid = self.mobileSession:SendRPC("SetGlobalProperties", + { + menuTitle = "Menu Title", + timeoutPrompt = + { + { + text = "Timeout prompt", + type = "TEXT" + } + }, + vrHelp = + { + { + position = 1, + image = + { + value = "action.png", + imageType = "DYNAMIC" + }, + text = "VR help item" + } + }, + menuIcon = + { + value = "action.png", + imageType = "DYNAMIC" + }, + helpPrompt = + { + { + text = "Help prompt", + type = "TEXT" + } + }, + keyboardProperties = + { + keyboardLayout = "QWERTY", + keypressMode = "SINGLE_KEYPRESS", + limitedCharacterList = + { + "a" + }, + language = "EN-US", + autoCompleteText = "Daemon, Freedom" + } + }) + + + --mobile side: expect SetGlobalProperties response + EXPECT_RESPONSE(cid, { success = false, resultCode = "REJECTED"}) + :Timeout(iTimeout) + + --mobile side: expect OnHashChange notification is not send to mobile + EXPECT_NOTIFICATION("OnHashChange") + :Times(0) + end + + --End test case CommonRequestCheck.15 + ----------------------------------------------------------------------------------------- + + --Begin test case CommonRequestCheck.16 + --Description: Check vrHelp parameter is missed + + --Requirement id in JAMA: SDLAQ-CRS-389 + + --Verification criteria: SDL rejects the request with REJECTED resultCode when vrHelpItems are omitted and the vrHelpTitle is provided at the same time. + + function Test:SetGlobalProperties_vrHelp_isMissing_REJECTED() + + --mobile side: sending SetGlobalProperties request + local cid = self.mobileSession:SendRPC("SetGlobalProperties", + { + menuTitle = "Menu Title", + timeoutPrompt = + { + { + text = "Timeout prompt", + type = "TEXT" + } + }, + menuIcon = + { + value = "action.png", + imageType = "DYNAMIC" + }, + helpPrompt = + { + { + text = "Help prompt", + type = "TEXT" + } + }, + vrHelpTitle = "VR help title", + keyboardProperties = + { + keyboardLayout = "QWERTY", + keypressMode = "SINGLE_KEYPRESS", + limitedCharacterList = + { + "a" + }, + language = "EN-US", + autoCompleteText = "Daemon, Freedom" + } + }) + + + --mobile side: expect SetGlobalProperties response + EXPECT_RESPONSE(cid, { success = false, resultCode = "REJECTED"}) + :Timeout(iTimeout) + + --mobile side: expect OnHashChange notification is not send to mobile + EXPECT_NOTIFICATION("OnHashChange") + :Times(0) + end + + --End test case CommonRequestCheck.16 + ----------------------------------------------------------------------------------------- + + --Begin test case CommonRequestCheck.17 + --Description: Check missing menuTitle parameter is not mandatory + + function Test:SetGlobalProperties_menuTitle_isMissing_SUCCESS() + + --mobile side: sending SetGlobalProperties request + local cid = self.mobileSession:SendRPC("SetGlobalProperties", + { + timeoutPrompt = + { + { + text = "Timeout prompt", + type = "TEXT" + } + }, + vrHelp = + { + { + position = 1, + image = + { + value = "action.png", + imageType = "DYNAMIC" + }, + text = "VR help item" + } + }, + menuIcon = + { + value = "action.png", + imageType = "DYNAMIC" + }, + helpPrompt = + { + { + text = "Help prompt", + type = "TEXT" + } + }, + vrHelpTitle = "VR help title", + keyboardProperties = + { + keyboardLayout = "QWERTY", + keypressMode = "SINGLE_KEYPRESS", + limitedCharacterList = + { + "a" + }, + language = "EN-US", + autoCompleteText = "Daemon, Freedom" + } + }) + + + --hmi side: expect TTS.SetGlobalProperties request + EXPECT_HMICALL("TTS.SetGlobalProperties", + { + timeoutPrompt = + { + { + text = "Timeout prompt", + type = "TEXT" + } + }, + helpPrompt = + { + { + text = "Help prompt", + type = "TEXT" + } + } + }) + :Timeout(iTimeout) + :Do(function(_,data) + --hmi side: sending UI.SetGlobalProperties response + self.hmiConnection:SendResponse(data.id, data.method, "SUCCESS", {}) + end) + + + + --hmi side: expect UI.SetGlobalProperties request + EXPECT_HMICALL("UI.SetGlobalProperties", + { + --Checked below + -- menuIcon = + -- { + -- imageType = "DYNAMIC", + -- value = strAppFolder .. "action.png" + -- }, + keyboardProperties = + { + keyboardLayout = "QWERTY", + keypressMode = "SINGLE_KEYPRESS", + --[=[ TODO: update after resolving APPLINK-16047 + + limitedCharacterList = + { + "a" + },]=] + language = "EN-US", + autoCompleteText = "Daemon, Freedom" + }, + vrHelpTitle = "VR help title", + vrHelp = + { + { + position = 1, + --[=[ TODO: update after resolving APPLINK-16052 + + image = + { + imageType = "DYNAMIC", + value = strAppFolder .. "action.png" + },]=] + text = "VR help item" + } + } + }) + :Timeout(iTimeout) + :ValidIf(function(_,data) + return Check_menuIconParams(data) + end) + :Do(function(_,data) + --hmi side: sending UI.SetGlobalProperties response + self.hmiConnection:SendResponse(data.id, data.method, "SUCCESS", {}) + end) + + + + --mobile side: expect SetGlobalProperties response + EXPECT_RESPONSE(cid, { success = true, resultCode = "SUCCESS"}) + :Timeout(iTimeout) + + --mobile side: expect OnHashChange notification is not send to mobile + EXPECT_NOTIFICATION("OnHashChange") + :Times(0) + end + + --End test case CommonRequestCheck.17 + ----------------------------------------------------------------------------------------- + + --Begin test case CommonRequestCheck.18 + --Description: Check missing menuIcon parameter is not mandatory + + function Test:SetGlobalProperties_menuIcon_isMissing_SUCCESS() + + --mobile side: sending SetGlobalProperties request + local cid = self.mobileSession:SendRPC("SetGlobalProperties", + { + menuTitle = "Menu Title", + timeoutPrompt = + { + { + text = "Timeout prompt", + type = "TEXT" + } + }, + vrHelp = + { + { + position = 1, + image = + { + value = "action.png", + imageType = "DYNAMIC" + }, + text = "VR help item" + } + }, + helpPrompt = + { + { + text = "Help prompt", + type = "TEXT" + } + }, + vrHelpTitle = "VR help title", + keyboardProperties = + { + keyboardLayout = "QWERTY", + keypressMode = "SINGLE_KEYPRESS", + limitedCharacterList = + { + "a" + }, + language = "EN-US", + autoCompleteText = "Daemon, Freedom" + } + }) + + + --hmi side: expect TTS.SetGlobalProperties request + EXPECT_HMICALL("TTS.SetGlobalProperties", + { + timeoutPrompt = + { + { + text = "Timeout prompt", + type = "TEXT" + } + }, + helpPrompt = + { + { + text = "Help prompt", + type = "TEXT" + } + } + }) + :Timeout(iTimeout) + :Do(function(_,data) + --hmi side: sending UI.SetGlobalProperties response + self.hmiConnection:SendResponse(data.id, data.method, "SUCCESS", {}) + end) + + + + --hmi side: expect UI.SetGlobalProperties request + EXPECT_HMICALL("UI.SetGlobalProperties", + { + menuTitle = "Menu Title", + keyboardProperties = + { + keyboardLayout = "QWERTY", + keypressMode = "SINGLE_KEYPRESS", + --[=[ TODO: update after resolving APPLINK-16047 + + limitedCharacterList = + { + "a" + },]=] + language = "EN-US", + autoCompleteText = "Daemon, Freedom" + }, + vrHelpTitle = "VR help title", + vrHelp = + { + { + position = 1, + --[=[ TODO: update after resolving APPLINK-16052 + + image = + { + imageType = "DYNAMIC", + value = strAppFolder .. "action.png" + },]=] + text = "VR help item" + } + } + }) + :Timeout(iTimeout) + :Do(function(_,data) + --hmi side: sending UI.SetGlobalProperties response + self.hmiConnection:SendResponse(data.id, data.method, "SUCCESS", {}) + end) + + --mobile side: expect SetGlobalProperties response + EXPECT_RESPONSE(cid, { success = true, resultCode = "SUCCESS"}) + :Timeout(iTimeout) + + --mobile side: expect OnHashChange notification + EXPECT_NOTIFICATION("OnHashChange") + end + + --End test case CommonRequestCheck.18 + ----------------------------------------------------------------------------------------- + + --Begin test case CommonRequestCheck.19 + --Description: Check missing keyboardProperties parameter is not mandatory + + function Test:SetGlobalProperties_keyboardProperties_isMissing_SUCCESS() + + --mobile side: sending SetGlobalProperties request + local cid = self.mobileSession:SendRPC("SetGlobalProperties", + { + menuTitle = "Menu Title", + timeoutPrompt = + { + { + text = "Timeout prompt", + type = "TEXT" + } + }, + vrHelp = + { + { + position = 1, + image = + { + value = "action.png", + imageType = "DYNAMIC" + }, + text = "VR help item" + } + }, + menuIcon = + { + value = "action.png", + imageType = "DYNAMIC" + }, + helpPrompt = + { + { + text = "Help prompt", + type = "TEXT" + } + }, + vrHelpTitle = "VR help title" + }) + + + --hmi side: expect TTS.SetGlobalProperties request + EXPECT_HMICALL("TTS.SetGlobalProperties", + { + timeoutPrompt = + { + { + text = "Timeout prompt", + type = "TEXT" + } + }, + helpPrompt = + { + { + text = "Help prompt", + type = "TEXT" + } + } + }) + :Timeout(iTimeout) + :Do(function(_,data) + --hmi side: sending UI.SetGlobalProperties response + self.hmiConnection:SendResponse(data.id, data.method, "SUCCESS", {}) + end) + + + + --hmi side: expect UI.SetGlobalProperties request + EXPECT_HMICALL("UI.SetGlobalProperties", + { + menuTitle = "Menu Title", + --Checked below + -- menuIcon = + -- { + -- imageType = "DYNAMIC", + -- value = strAppFolder .. "action.png" + -- }, + vrHelpTitle = "VR help title", + vrHelp = + { + { + position = 1, + --[=[ TODO: update after resolving APPLINK-16052 + + image = + { + imageType = "DYNAMIC", + value = strAppFolder .. "action.png" + },]=] + text = "VR help item" + } + } + }) + :Timeout(iTimeout) + :ValidIf(function(_,data) + return Check_menuIconParams(data) + end) + :Do(function(_,data) + --hmi side: sending UI.SetGlobalProperties response + self.hmiConnection:SendResponse(data.id, data.method, "SUCCESS", {}) + end) + + --mobile side: expect SetGlobalProperties response + EXPECT_RESPONSE(cid, { success = true, resultCode = "SUCCESS"}) + :Timeout(iTimeout) + + --mobile side: expect OnHashChange notification + EXPECT_NOTIFICATION("OnHashChange") + end + + --End test case CommonRequestCheck.19 + ----------------------------------------------------------------------------------------- + + + --Begin test case CommonRequestCheck.20 + --Description: check request with correlation Id is duplicated + + --Requirement id in JAMA/or Jira ID: APPLINK-14293 + + --Verification criteria: The response comes with SUCCESS result code. + + function Test:SetGlobalProperties_CorrelationID_Duplicated_SUCCESS() + + --mobile side: sending SetGlobalProperties request + local cid = self.mobileSession:SendRPC("SetGlobalProperties", + { + menuTitle = "Menu Title", + timeoutPrompt = + { + { + text = "Timeout prompt duplicate", + type = "TEXT" + } + }, + vrHelp = + { + { + position = 1, + image = + { + value = "action.png", + imageType = "DYNAMIC" + }, + text = "VR help item" + } + }, + menuIcon = + { + value = "action.png", + imageType = "DYNAMIC" + }, + helpPrompt = + { + { + text = "Help prompt", + type = "TEXT" + } + }, + vrHelpTitle = "VR help title", + keyboardProperties = + { + keyboardLayout = "QWERTY", + keypressMode = "SINGLE_KEYPRESS", + limitedCharacterList = + { + "a" + }, + language = "EN-US", + autoCompleteText = "Daemon, Freedom" + } + }) + + + --hmi side: expect TTS.SetGlobalProperties request + EXPECT_HMICALL("TTS.SetGlobalProperties") + :Times(2) + :Do(function(_,data) + --hmi side: sending UI.SetGlobalProperties response + self.hmiConnection:SendResponse(data.id, data.method, "SUCCESS", {}) + end) + + + + --hmi side: expect UI.SetGlobalProperties request + EXPECT_HMICALL("UI.SetGlobalProperties") + :Times(2) + :Do(function(_,data) + --hmi side: sending UI.SetGlobalProperties response + self.hmiConnection:SendResponse(data.id, data.method, "SUCCESS", {}) + end) + :Do(function(exp,data) + if exp.occurences == 1 then + local msg = + { + serviceType = 7, + frameInfo = 0, + rpcType = 0, + rpcFunctionId = 3, --SetGlobalPropertiesID + rpcCorrelationId = cid, + payload = '{"vrHelp":[{"image":{"imageType":"DYNAMIC","value":"action.png"},"position":1,"text":"VR help item"}],"helpPrompt":[{"type":"TEXT","text":"Help prompt"}],"menuTitle":"Menu Title","vrHelpTitle":"VR help title","timeoutPrompt":[{"type":"TEXT","text":"Timeout prompt duplicate"}],"menuIcon":{"imageType":"DYNAMIC","value":"action.png"}}' + } + + self.mobileSession:Send(msg) + end + + --hmi side: sending UI.SetGlobalProperties response + self.hmiConnection:SendResponse(data.id, data.method, "SUCCESS", {}) + + end) + + + --mobile side: expect SetGlobalProperties response + EXPECT_RESPONSE(cid, { success = true, resultCode = "SUCCESS"}) + :Times(2) + + --mobile side: expect OnHashChange notification + EXPECT_NOTIFICATION("OnHashChange") + :Times(2) + end + + --End test case CommonRequestCheck.20 + ----------------------------------------------------------------------------------------- + + + +--------------------------------------------------------------------------------------------- +----------------------------------------II TEST BLOCK---------------------------------------- +----------------------------------------Positive cases--------------------------------------- +--------------------------------------------------------------------------------------------- + + --Precondition 2: Put files + commonSteps:PutFile("Precondition_Putfile_SpaceAfter", "SpaceAfter ") + commonSteps:PutFile("Precondition_Putfile_SpaceInTheMiddle", "Space In The Middle") + commonSteps:PutFile("Precondition_Putfile_SpacesEveryWhere", " Space Every Where ") + + --=================================================================================-- + --------------------------------Positive request check------------------------------- + --=================================================================================-- + +--Begin test case PositiveResponseCheck.1 +--Description: Check positive request + + --Requirement id in JAMA: SDLAQ-CRS-11, SDLAQ-CRS-382 + + --Verification criteria: SDL response SUCCESS in case the request is executed successfully. + + --Begin test case PositiveResponseCheck.1.1 + --Description: Check helpPrompt parameter is lower bound + + function Test:SetGlobalProperties_helpPrompt_Array_minsize_1_SUCCESS() + + --mobile side: sending SetGlobalProperties request + local cid = self.mobileSession:SendRPC("SetGlobalProperties", + { + menuTitle = "Menu Title", + timeoutPrompt = + { + { + text = "Timeout prompt", + type = "TEXT" + } + }, + vrHelp = + { + { + position = 1, + image = + { + value = "action.png", + imageType = "DYNAMIC" + }, + text = "VR help item" + } + }, + menuIcon = + { + value = "action.png", + imageType = "DYNAMIC" + }, + helpPrompt = + { + { + text = "Help prompt", + type = "TEXT" + } + }, + vrHelpTitle = "VR help title", + keyboardProperties = + { + keyboardLayout = "QWERTY", + keypressMode = "SINGLE_KEYPRESS", + limitedCharacterList = + { + "a" + }, + language = "EN-US", + autoCompleteText = "Daemon, Freedom" + } + }) + + + --hmi side: expect TTS.SetGlobalProperties request + EXPECT_HMICALL("TTS.SetGlobalProperties", + { + timeoutPrompt = + { + { + text = "Timeout prompt", + type = "TEXT" + } + }, + helpPrompt = + { + { + text = "Help prompt", + type = "TEXT" + } + } + }) + :Timeout(iTimeout) + :Do(function(_,data) + --hmi side: sending UI.SetGlobalProperties response + self.hmiConnection:SendResponse(data.id, data.method, "SUCCESS", {}) + end) + + + + --hmi side: expect UI.SetGlobalProperties request + EXPECT_HMICALL("UI.SetGlobalProperties", + { + menuTitle = "Menu Title", + vrHelp = + { + { + position = 1, + --[=[ TODO: update after resolving APPLINK-16052 + + image = + { + imageType = "DYNAMIC", + value = strAppFolder .. "action.png" + },]=] + text = "VR help item" + } + }, + --Checked below + -- menuIcon = + -- { + -- imageType = "DYNAMIC", + -- value = strAppFolder .. "action.png" + -- }, + vrHelpTitle = "VR help title", + keyboardProperties = + { + keyboardLayout = "QWERTY", + keypressMode = "SINGLE_KEYPRESS", + --[=[ TODO: update after resolving APPLINK-16047 + + limitedCharacterList = + { + "a" + },]=] + language = "EN-US", + autoCompleteText = "Daemon, Freedom" + } + }) + :Timeout(iTimeout) + :ValidIf(function(_,data) + return Check_menuIconParams(data) + end) + :Do(function(_,data) + --hmi side: sending UI.SetGlobalProperties response + self.hmiConnection:SendResponse(data.id, data.method, "SUCCESS", {}) + end) + + --mobile side: expect SetGlobalProperties response + EXPECT_RESPONSE(cid, { success = true, resultCode = "SUCCESS"}) + :Timeout(iTimeout) + + --mobile side: expect OnHashChange notification + EXPECT_NOTIFICATION("OnHashChange") + end + + --End test case PositiveResponseCheck.1.1 + ----------------------------------------------------------------------------------------- + + --Begin test case PositiveResponseCheck.1.2 + --Description: Check helpPrompt parameter is upper bound + + function Test:SetGlobalProperties_helpPrompt_Array_maxsize_100_SUCCESS() + + --mobile side: sending SetGlobalProperties request + local cid = self.mobileSession:SendRPC("SetGlobalProperties", + { + menuTitle = "Menu Title", + timeoutPrompt = + { + { + text = "Timeout prompt", + type = "TEXT" + } + }, + vrHelp = + { + { + position = 1, + image = + { + value = "action.png", + imageType = "DYNAMIC" + }, + text = "VR help item" + } + }, + menuIcon = + { + value = "action.png", + imageType = "DYNAMIC" + }, + helpPrompt = + { + { + text = "Help prompt_001", + type = "TEXT" + }, + { + text = "Help prompt_002", + type = "TEXT" + }, + { + text = "Help prompt_003", + type = "TEXT" + }, + { + text = "Help prompt_004", + type = "TEXT" + }, + { + text = "Help prompt_005", + type = "TEXT" + }, + { + text = "Help prompt_006", + type = "TEXT" + }, + { + text = "Help prompt_007", + type = "TEXT" + }, + { + text = "Help prompt_008", + type = "TEXT" + }, + { + text = "Help prompt_009", + type = "TEXT" + }, + { + text = "Help prompt_010", + type = "TEXT" + }, + { + text = "Help prompt_011", + type = "TEXT" + }, + { + text = "Help prompt_012", + type = "TEXT" + }, + { + text = "Help prompt_013", + type = "TEXT" + }, + { + text = "Help prompt_014", + type = "TEXT" + }, + { + text = "Help prompt_015", + type = "TEXT" + }, + { + text = "Help prompt_016", + type = "TEXT" + }, + { + text = "Help prompt_017", + type = "TEXT" + }, + { + text = "Help prompt_018", + type = "TEXT" + }, + { + text = "Help prompt_019", + type = "TEXT" + }, + { + text = "Help prompt_020", + type = "TEXT" + }, + { + text = "Help prompt_021", + type = "TEXT" + }, + { + text = "Help prompt_022", + type = "TEXT" + }, + { + text = "Help prompt_023", + type = "TEXT" + }, + { + text = "Help prompt_024", + type = "TEXT" + }, + { + text = "Help prompt_025", + type = "TEXT" + }, + { + text = "Help prompt_026", + type = "TEXT" + }, + { + text = "Help prompt_027", + type = "TEXT" + }, + { + text = "Help prompt_028", + type = "TEXT" + }, + { + text = "Help prompt_029", + type = "TEXT" + }, + { + text = "Help prompt_030", + type = "TEXT" + }, + { + text = "Help prompt_031", + type = "TEXT" + }, + { + text = "Help prompt_032", + type = "TEXT" + }, + { + text = "Help prompt_033", + type = "TEXT" + }, + { + text = "Help prompt_034", + type = "TEXT" + }, + { + text = "Help prompt_035", + type = "TEXT" + }, + { + text = "Help prompt_036", + type = "TEXT" + }, + { + text = "Help prompt_037", + type = "TEXT" + }, + { + text = "Help prompt_038", + type = "TEXT" + }, + { + text = "Help prompt_039", + type = "TEXT" + }, + { + text = "Help prompt_040", + type = "TEXT" + }, + { + text = "Help prompt_041", + type = "TEXT" + }, + { + text = "Help prompt_042", + type = "TEXT" + }, + { + text = "Help prompt_043", + type = "TEXT" + }, + { + text = "Help prompt_044", + type = "TEXT" + }, + { + text = "Help prompt_045", + type = "TEXT" + }, + { + text = "Help prompt_046", + type = "TEXT" + }, + { + text = "Help prompt_047", + type = "TEXT" + }, + { + text = "Help prompt_048", + type = "TEXT" + }, + { + text = "Help prompt_049", + type = "TEXT" + }, + { + text = "Help prompt_050", + type = "TEXT" + }, + { + text = "Help prompt_051", + type = "TEXT" + }, + { + text = "Help prompt_052", + type = "TEXT" + }, + { + text = "Help prompt_053", + type = "TEXT" + }, + { + text = "Help prompt_054", + type = "TEXT" + }, + { + text = "Help prompt_055", + type = "TEXT" + }, + { + text = "Help prompt_056", + type = "TEXT" + }, + { + text = "Help prompt_057", + type = "TEXT" + }, + { + text = "Help prompt_058", + type = "TEXT" + }, + { + text = "Help prompt_059", + type = "TEXT" + }, + { + text = "Help prompt_060", + type = "TEXT" + }, + { + text = "Help prompt_061", + type = "TEXT" + }, + { + text = "Help prompt_062", + type = "TEXT" + }, + { + text = "Help prompt_063", + type = "TEXT" + }, + { + text = "Help prompt_064", + type = "TEXT" + }, + { + text = "Help prompt_065", + type = "TEXT" + }, + { + text = "Help prompt_066", + type = "TEXT" + }, + { + text = "Help prompt_067", + type = "TEXT" + }, + { + text = "Help prompt_068", + type = "TEXT" + }, + { + text = "Help prompt_069", + type = "TEXT" + }, + { + text = "Help prompt_070", + type = "TEXT" + }, + { + text = "Help prompt_071", + type = "TEXT" + }, + { + text = "Help prompt_072", + type = "TEXT" + }, + { + text = "Help prompt_073", + type = "TEXT" + }, + { + text = "Help prompt_074", + type = "TEXT" + }, + { + text = "Help prompt_075", + type = "TEXT" + }, + { + text = "Help prompt_076", + type = "TEXT" + }, + { + text = "Help prompt_077", + type = "TEXT" + }, + { + text = "Help prompt_078", + type = "TEXT" + }, + { + text = "Help prompt_079", + type = "TEXT" + }, + { + text = "Help prompt_080", + type = "TEXT" + }, + { + text = "Help prompt_081", + type = "TEXT" + }, + { + text = "Help prompt_082", + type = "TEXT" + }, + { + text = "Help prompt_083", + type = "TEXT" + }, + { + text = "Help prompt_084", + type = "TEXT" + }, + { + text = "Help prompt_085", + type = "TEXT" + }, + { + text = "Help prompt_086", + type = "TEXT" + }, + { + text = "Help prompt_087", + type = "TEXT" + }, + { + text = "Help prompt_088", + type = "TEXT" + }, + { + text = "Help prompt_089", + type = "TEXT" + }, + { + text = "Help prompt_090", + type = "TEXT" + }, + { + text = "Help prompt_091", + type = "TEXT" + }, + { + text = "Help prompt_092", + type = "TEXT" + }, + { + text = "Help prompt_093", + type = "TEXT" + }, + { + text = "Help prompt_094", + type = "TEXT" + }, + { + text = "Help prompt_095", + type = "TEXT" + }, + { + text = "Help prompt_096", + type = "TEXT" + }, + { + text = "Help prompt_097", + type = "TEXT" + }, + { + text = "Help prompt_098", + type = "TEXT" + }, + { + text = "Help prompt_099", + type = "TEXT" + }, + { + text = "Help prompt_100", + type = "TEXT" + } + }, + vrHelpTitle = "VR help title", + keyboardProperties = + { + keyboardLayout = "QWERTY", + keypressMode = "SINGLE_KEYPRESS", + limitedCharacterList = + { + "a" + }, + language = "EN-US", + autoCompleteText = "Daemon, Freedom" + } + }) + + + --hmi side: expect TTS.SetGlobalProperties request + EXPECT_HMICALL("TTS.SetGlobalProperties", + { + timeoutPrompt = + { + { + text = "Timeout prompt", + type = "TEXT" + } + }, + helpPrompt = + { + { + text = "Help prompt_001", + type = "TEXT" + }, + { + text = "Help prompt_002", + type = "TEXT" + }, + { + text = "Help prompt_003", + type = "TEXT" + }, + { + text = "Help prompt_004", + type = "TEXT" + }, + { + text = "Help prompt_005", + type = "TEXT" + }, + { + text = "Help prompt_006", + type = "TEXT" + }, + { + text = "Help prompt_007", + type = "TEXT" + }, + { + text = "Help prompt_008", + type = "TEXT" + }, + { + text = "Help prompt_009", + type = "TEXT" + }, + { + text = "Help prompt_010", + type = "TEXT" + }, + { + text = "Help prompt_011", + type = "TEXT" + }, + { + text = "Help prompt_012", + type = "TEXT" + }, + { + text = "Help prompt_013", + type = "TEXT" + }, + { + text = "Help prompt_014", + type = "TEXT" + }, + { + text = "Help prompt_015", + type = "TEXT" + }, + { + text = "Help prompt_016", + type = "TEXT" + }, + { + text = "Help prompt_017", + type = "TEXT" + }, + { + text = "Help prompt_018", + type = "TEXT" + }, + { + text = "Help prompt_019", + type = "TEXT" + }, + { + text = "Help prompt_020", + type = "TEXT" + }, + { + text = "Help prompt_021", + type = "TEXT" + }, + { + text = "Help prompt_022", + type = "TEXT" + }, + { + text = "Help prompt_023", + type = "TEXT" + }, + { + text = "Help prompt_024", + type = "TEXT" + }, + { + text = "Help prompt_025", + type = "TEXT" + }, + { + text = "Help prompt_026", + type = "TEXT" + }, + { + text = "Help prompt_027", + type = "TEXT" + }, + { + text = "Help prompt_028", + type = "TEXT" + }, + { + text = "Help prompt_029", + type = "TEXT" + }, + { + text = "Help prompt_030", + type = "TEXT" + }, + { + text = "Help prompt_031", + type = "TEXT" + }, + { + text = "Help prompt_032", + type = "TEXT" + }, + { + text = "Help prompt_033", + type = "TEXT" + }, + { + text = "Help prompt_034", + type = "TEXT" + }, + { + text = "Help prompt_035", + type = "TEXT" + }, + { + text = "Help prompt_036", + type = "TEXT" + }, + { + text = "Help prompt_037", + type = "TEXT" + }, + { + text = "Help prompt_038", + type = "TEXT" + }, + { + text = "Help prompt_039", + type = "TEXT" + }, + { + text = "Help prompt_040", + type = "TEXT" + }, + { + text = "Help prompt_041", + type = "TEXT" + }, + { + text = "Help prompt_042", + type = "TEXT" + }, + { + text = "Help prompt_043", + type = "TEXT" + }, + { + text = "Help prompt_044", + type = "TEXT" + }, + { + text = "Help prompt_045", + type = "TEXT" + }, + { + text = "Help prompt_046", + type = "TEXT" + }, + { + text = "Help prompt_047", + type = "TEXT" + }, + { + text = "Help prompt_048", + type = "TEXT" + }, + { + text = "Help prompt_049", + type = "TEXT" + }, + { + text = "Help prompt_050", + type = "TEXT" + }, + { + text = "Help prompt_051", + type = "TEXT" + }, + { + text = "Help prompt_052", + type = "TEXT" + }, + { + text = "Help prompt_053", + type = "TEXT" + }, + { + text = "Help prompt_054", + type = "TEXT" + }, + { + text = "Help prompt_055", + type = "TEXT" + }, + { + text = "Help prompt_056", + type = "TEXT" + }, + { + text = "Help prompt_057", + type = "TEXT" + }, + { + text = "Help prompt_058", + type = "TEXT" + }, + { + text = "Help prompt_059", + type = "TEXT" + }, + { + text = "Help prompt_060", + type = "TEXT" + }, + { + text = "Help prompt_061", + type = "TEXT" + }, + { + text = "Help prompt_062", + type = "TEXT" + }, + { + text = "Help prompt_063", + type = "TEXT" + }, + { + text = "Help prompt_064", + type = "TEXT" + }, + { + text = "Help prompt_065", + type = "TEXT" + }, + { + text = "Help prompt_066", + type = "TEXT" + }, + { + text = "Help prompt_067", + type = "TEXT" + }, + { + text = "Help prompt_068", + type = "TEXT" + }, + { + text = "Help prompt_069", + type = "TEXT" + }, + { + text = "Help prompt_070", + type = "TEXT" + }, + { + text = "Help prompt_071", + type = "TEXT" + }, + { + text = "Help prompt_072", + type = "TEXT" + }, + { + text = "Help prompt_073", + type = "TEXT" + }, + { + text = "Help prompt_074", + type = "TEXT" + }, + { + text = "Help prompt_075", + type = "TEXT" + }, + { + text = "Help prompt_076", + type = "TEXT" + }, + { + text = "Help prompt_077", + type = "TEXT" + }, + { + text = "Help prompt_078", + type = "TEXT" + }, + { + text = "Help prompt_079", + type = "TEXT" + }, + { + text = "Help prompt_080", + type = "TEXT" + }, + { + text = "Help prompt_081", + type = "TEXT" + }, + { + text = "Help prompt_082", + type = "TEXT" + }, + { + text = "Help prompt_083", + type = "TEXT" + }, + { + text = "Help prompt_084", + type = "TEXT" + }, + { + text = "Help prompt_085", + type = "TEXT" + }, + { + text = "Help prompt_086", + type = "TEXT" + }, + { + text = "Help prompt_087", + type = "TEXT" + }, + { + text = "Help prompt_088", + type = "TEXT" + }, + { + text = "Help prompt_089", + type = "TEXT" + }, + { + text = "Help prompt_090", + type = "TEXT" + }, + { + text = "Help prompt_091", + type = "TEXT" + }, + { + text = "Help prompt_092", + type = "TEXT" + }, + { + text = "Help prompt_093", + type = "TEXT" + }, + { + text = "Help prompt_094", + type = "TEXT" + }, + { + text = "Help prompt_095", + type = "TEXT" + }, + { + text = "Help prompt_096", + type = "TEXT" + }, + { + text = "Help prompt_097", + type = "TEXT" + }, + { + text = "Help prompt_098", + type = "TEXT" + }, + { + text = "Help prompt_099", + type = "TEXT" + }, + { + text = "Help prompt_100", + type = "TEXT" + } + } + }) + :Timeout(iTimeout) + :Do(function(_,data) + --hmi side: sending UI.SetGlobalProperties response + self.hmiConnection:SendResponse(data.id, data.method, "SUCCESS", {}) + end) + + + + --hmi side: expect UI.SetGlobalProperties request + EXPECT_HMICALL("UI.SetGlobalProperties", + { + menuTitle = "Menu Title", + vrHelp = + { + { + position = 1, + --[=[ TODO: update after resolving APPLINK-16052 + + image = + { + imageType = "DYNAMIC", + value = strAppFolder .. "action.png" + },]=] + text = "VR help item" + } + }, + --Checked below + -- menuIcon = + -- { + -- imageType = "DYNAMIC", + -- value = strAppFolder .. "action.png" + -- }, + vrHelpTitle = "VR help title", + keyboardProperties = + { + keyboardLayout = "QWERTY", + keypressMode = "SINGLE_KEYPRESS", + --[=[ TODO: update after resolving APPLINK-16047 + + limitedCharacterList = + { + "a" + },]=] + language = "EN-US", + autoCompleteText = "Daemon, Freedom" + } + }) + :Timeout(iTimeout) + :ValidIf(function(_,data) + return Check_menuIconParams(data) + end) + :Do(function(_,data) + --hmi side: sending UI.SetGlobalProperties response + self.hmiConnection:SendResponse(data.id, data.method, "SUCCESS", {}) + end) + + --mobile side: expect SetGlobalProperties response + EXPECT_RESPONSE(cid, { success = true, resultCode = "SUCCESS"}) + :Timeout(iTimeout) + + --mobile side: expect OnHashChange notification + EXPECT_NOTIFICATION("OnHashChange") + end + + --End test case PositiveResponseCheck.1.2 + ----------------------------------------------------------------------------------------- + + --Begin test case PositiveResponseCheck.1.3 + --Description: Check helpPrompt: type parameter is valid data (TEXT) + + --It is covered by SetGlobalProperties_PositiveCase_SUCCESS + + --End test case PositiveResponseCheck.1.3 + ----------------------------------------------------------------------------------------- + + --Begin test case PositiveResponseCheck.1.4 + --Description: Check helpPrompt: type parameter is valid data (SAPI_PHONEMES) + + function Test:SetGlobalProperties_helpPrompt_type_SAPI_PHONEMES_SUCCESS() + + --mobile side: sending SetGlobalProperties request + local cid = self.mobileSession:SendRPC("SetGlobalProperties", + { + menuTitle = "Menu Title", + timeoutPrompt = + { + { + text = "Timeout prompt", + type = "TEXT" + } + }, + vrHelp = + { + { + position = 1, + image = + { + value = "action.png", + imageType = "DYNAMIC" + }, + text = "VR help item" + } + }, + menuIcon = + { + value = "action.png", + imageType = "DYNAMIC" + }, + helpPrompt = + { + { + text = "Help prompt", + type = "SAPI_PHONEMES" + } + }, + vrHelpTitle = "VR help title", + keyboardProperties = + { + keyboardLayout = "QWERTY", + keypressMode = "SINGLE_KEYPRESS", + limitedCharacterList = + { + "a" + }, + language = "EN-US", + autoCompleteText = "Daemon, Freedom" + } + }) + + + --hmi side: expect TTS.SetGlobalProperties request + EXPECT_HMICALL("TTS.SetGlobalProperties", + { + timeoutPrompt = + { + { + text = "Timeout prompt", + type = "TEXT" + } + }, + helpPrompt = + { + { + text = "Help prompt", + type = "SAPI_PHONEMES" + } + } + }) + :Timeout(iTimeout) + :Do(function(_,data) + --hmi side: sending UI.SetGlobalProperties response + self.hmiConnection:SendResponse(data.id, data.method, "SUCCESS", {}) + end) + + + + --hmi side: expect UI.SetGlobalProperties request + EXPECT_HMICALL("UI.SetGlobalProperties", + { + menuTitle = "Menu Title", + vrHelp = + { + { + position = 1, + --[=[ TODO: update after resolving APPLINK-16052 + + image = + { + imageType = "DYNAMIC", + value = strAppFolder .. "action.png" + },]=] + text = "VR help item" + } + }, + --Checked below + -- menuIcon = + -- { + -- imageType = "DYNAMIC", + -- value = strAppFolder .. "action.png" + -- }, + vrHelpTitle = "VR help title", + keyboardProperties = + { + keyboardLayout = "QWERTY", + keypressMode = "SINGLE_KEYPRESS", + --[=[ TODO: update after resolving APPLINK-16047 + + limitedCharacterList = + { + "a" + },]=] + language = "EN-US", + autoCompleteText = "Daemon, Freedom" + } + }) + :Timeout(iTimeout) + :ValidIf(function(_,data) + return Check_menuIconParams(data) + end) + :Do(function(_,data) + --hmi side: sending UI.SetGlobalProperties response + self.hmiConnection:SendResponse(data.id, data.method, "SUCCESS", {}) + end) + + --mobile side: expect SetGlobalProperties response + EXPECT_RESPONSE(cid, { success = true, resultCode = "SUCCESS"}) + :Timeout(iTimeout) + + --mobile side: expect OnHashChange notification + EXPECT_NOTIFICATION("OnHashChange") + end + + --End test case PositiveResponseCheck.1.4 + ----------------------------------------------------------------------------------------- + + --Begin test case PositiveResponseCheck.1.5 + --Description: Check helpPrompt: type parameter is valid data (LHPLUS_PHONEMES) + + function Test:SetGlobalProperties_helpPrompt_type_LHPLUS_PHONEMES_SUCCESS() + + --mobile side: sending SetGlobalProperties request + local cid = self.mobileSession:SendRPC("SetGlobalProperties", + { + menuTitle = "Menu Title", + timeoutPrompt = + { + { + text = "Timeout prompt", + type = "TEXT" + } + }, + vrHelp = + { + { + position = 1, + image = + { + value = "action.png", + imageType = "DYNAMIC" + }, + text = "VR help item" + } + }, + menuIcon = + { + value = "action.png", + imageType = "DYNAMIC" + }, + helpPrompt = + { + { + text = "Help prompt", + type = "LHPLUS_PHONEMES" + } + }, + vrHelpTitle = "VR help title", + keyboardProperties = + { + keyboardLayout = "QWERTY", + keypressMode = "SINGLE_KEYPRESS", + limitedCharacterList = + { + "a" + }, + language = "EN-US", + autoCompleteText = "Daemon, Freedom" + } + }) + + + --hmi side: expect TTS.SetGlobalProperties request + EXPECT_HMICALL("TTS.SetGlobalProperties", + { + timeoutPrompt = + { + { + text = "Timeout prompt", + type = "TEXT" + } + }, + helpPrompt = + { + { + text = "Help prompt", + type = "LHPLUS_PHONEMES" + } + } + }) + :Timeout(iTimeout) + :Do(function(_,data) + --hmi side: sending UI.SetGlobalProperties response + self.hmiConnection:SendResponse(data.id, data.method, "SUCCESS", {}) + end) + + + + --hmi side: expect UI.SetGlobalProperties request + EXPECT_HMICALL("UI.SetGlobalProperties", + { + menuTitle = "Menu Title", + vrHelp = + { + { + position = 1, + --[=[ TODO: update after resolving APPLINK-16052 + + image = + { + imageType = "DYNAMIC", + value = strAppFolder .. "action.png" + },]=] + text = "VR help item" + } + }, + --Checked below + -- menuIcon = + -- { + -- imageType = "DYNAMIC", + -- value = strAppFolder .. "action.png" + -- }, + vrHelpTitle = "VR help title", + keyboardProperties = + { + keyboardLayout = "QWERTY", + keypressMode = "SINGLE_KEYPRESS", + --[=[ TODO: update after resolving APPLINK-16047 + + limitedCharacterList = + { + "a" + },]=] + language = "EN-US", + autoCompleteText = "Daemon, Freedom" + } + }) + :Timeout(iTimeout) + :ValidIf(function(_,data) + return Check_menuIconParams(data) + end) + :Do(function(_,data) + --hmi side: sending UI.SetGlobalProperties response + self.hmiConnection:SendResponse(data.id, data.method, "SUCCESS", {}) + end) + + + + --mobile side: expect SetGlobalProperties response + EXPECT_RESPONSE(cid, { success = true, resultCode = "SUCCESS"}) + :Timeout(iTimeout) + + --mobile side: expect OnHashChange notification + EXPECT_NOTIFICATION("OnHashChange") + end + + --End test case PositiveResponseCheck.1.5 + ----------------------------------------------------------------------------------------- + + --Begin test case PositiveResponseCheck.1.6 + --Description: Check helpPrompt: type parameter is valid data (PRE_RECORDED) + + function Test:SetGlobalProperties_helpPrompt_type_PRE_RECORDED_SUCCESS() + + --mobile side: sending SetGlobalProperties request + local cid = self.mobileSession:SendRPC("SetGlobalProperties", + { + menuTitle = "Menu Title", + timeoutPrompt = + { + { + text = "Timeout prompt", + type = "TEXT" + } + }, + vrHelp = + { + { + position = 1, + image = + { + value = "action.png", + imageType = "DYNAMIC" + }, + text = "VR help item" + } + }, + menuIcon = + { + value = "action.png", + imageType = "DYNAMIC" + }, + helpPrompt = + { + { + text = "Help prompt", + type = "PRE_RECORDED" + } + }, + vrHelpTitle = "VR help title", + keyboardProperties = + { + keyboardLayout = "QWERTY", + keypressMode = "SINGLE_KEYPRESS", + limitedCharacterList = + { + "a" + }, + language = "EN-US", + autoCompleteText = "Daemon, Freedom" + } + }) + + + --hmi side: expect TTS.SetGlobalProperties request + EXPECT_HMICALL("TTS.SetGlobalProperties", + { + timeoutPrompt = + { + { + text = "Timeout prompt", + type = "TEXT" + } + }, + helpPrompt = + { + { + text = "Help prompt", + type = "PRE_RECORDED" + } + } + }) + :Timeout(iTimeout) + :Do(function(_,data) + --hmi side: sending UI.SetGlobalProperties response + self.hmiConnection:SendResponse(data.id, data.method, "SUCCESS", {}) + end) + + + + --hmi side: expect UI.SetGlobalProperties request + EXPECT_HMICALL("UI.SetGlobalProperties", + { + menuTitle = "Menu Title", + vrHelp = + { + { + position = 1, + --[=[ TODO: update after resolving APPLINK-16052 + + image = + { + imageType = "DYNAMIC", + value = strAppFolder .. "action.png" + },]=] + text = "VR help item" + } + }, + --Checked below + -- menuIcon = + -- { + -- imageType = "DYNAMIC", + -- value = strAppFolder .. "action.png" + -- }, + vrHelpTitle = "VR help title", + keyboardProperties = + { + keyboardLayout = "QWERTY", + keypressMode = "SINGLE_KEYPRESS", + --[=[ TODO: update after resolving APPLINK-16047 + + limitedCharacterList = + { + "a" + },]=] + language = "EN-US", + autoCompleteText = "Daemon, Freedom" + } + }) + :Timeout(iTimeout) + :ValidIf(function(_,data) + return Check_menuIconParams(data) + end) + :Do(function(_,data) + --hmi side: sending UI.SetGlobalProperties response + self.hmiConnection:SendResponse(data.id, data.method, "SUCCESS", {}) + end) + + + + --mobile side: expect SetGlobalProperties response + EXPECT_RESPONSE(cid, { success = true, resultCode = "SUCCESS"}) + :Timeout(iTimeout) + + --mobile side: expect OnHashChange notification + EXPECT_NOTIFICATION("OnHashChange") + end + + --End test case PositiveResponseCheck.1.6 + ----------------------------------------------------------------------------------------- + + --Begin test case PositiveResponseCheck.1.7 + --Description: Check helpPrompt: type parameter is valid data (SILENCE) + + function Test:SetGlobalProperties_helpPrompt_type_SILENCE_SUCCESS() + + --mobile side: sending SetGlobalProperties request + local cid = self.mobileSession:SendRPC("SetGlobalProperties", + { + menuTitle = "Menu Title", + timeoutPrompt = + { + { + text = "Timeout prompt", + type = "TEXT" + } + }, + vrHelp = + { + { + position = 1, + image = + { + value = "action.png", + imageType = "DYNAMIC" + }, + text = "VR help item" + } + }, + menuIcon = + { + value = "action.png", + imageType = "DYNAMIC" + }, + helpPrompt = + { + { + text = "Help prompt", + type = "SILENCE" + } + }, + vrHelpTitle = "VR help title", + keyboardProperties = + { + keyboardLayout = "QWERTY", + keypressMode = "SINGLE_KEYPRESS", + limitedCharacterList = + { + "a" + }, + language = "EN-US", + autoCompleteText = "Daemon, Freedom" + } + }) + + + --hmi side: expect TTS.SetGlobalProperties request + EXPECT_HMICALL("TTS.SetGlobalProperties", + { + timeoutPrompt = + { + { + text = "Timeout prompt", + type = "TEXT" + } + }, + helpPrompt = + { + { + text = "Help prompt", + type = "SILENCE" + } + } + }) + :Timeout(iTimeout) + :Do(function(_,data) + --hmi side: sending UI.SetGlobalProperties response + self.hmiConnection:SendResponse(data.id, data.method, "SUCCESS", {}) + end) + + + + --hmi side: expect UI.SetGlobalProperties request + EXPECT_HMICALL("UI.SetGlobalProperties", + { + menuTitle = "Menu Title", + vrHelp = + { + { + position = 1, + --[=[ TODO: update after resolving APPLINK-16052 + + image = + { + imageType = "DYNAMIC", + value = strAppFolder .. "action.png" + },]=] + text = "VR help item" + } + }, + --Checked below + -- menuIcon = + -- { + -- imageType = "DYNAMIC", + -- value = strAppFolder .. "action.png" + -- }, + vrHelpTitle = "VR help title", + keyboardProperties = + { + keyboardLayout = "QWERTY", + keypressMode = "SINGLE_KEYPRESS", + --[=[ TODO: update after resolving APPLINK-16047 + + limitedCharacterList = + { + "a" + },]=] + language = "EN-US", + autoCompleteText = "Daemon, Freedom" + } + }) + :Timeout(iTimeout) + :ValidIf(function(_,data) + return Check_menuIconParams(data) + end) + :Do(function(_,data) + --hmi side: sending UI.SetGlobalProperties response + self.hmiConnection:SendResponse(data.id, data.method, "SUCCESS", {}) + end) + + + + --mobile side: expect SetGlobalProperties response + EXPECT_RESPONSE(cid, { success = true, resultCode = "SUCCESS"}) + :Timeout(iTimeout) + + --mobile side: expect OnHashChange notification + EXPECT_NOTIFICATION("OnHashChange") + end + + --End test case PositiveResponseCheck.1.7 + ----------------------------------------------------------------------------------------- + + --Begin test case PositiveResponseCheck.1.8 + --Description: Check helpPrompt: text parameter is lower bound + + function Test:SetGlobalProperties_helpPrompt_text_IsLowerBound_1_SUCCESS() + + --mobile side: sending SetGlobalProperties request + local cid = self.mobileSession:SendRPC("SetGlobalProperties", + { + menuTitle = "Menu Title", + timeoutPrompt = + { + { + text = "Timeout prompt", + type = "TEXT" + } + }, + vrHelp = + { + { + position = 1, + image = + { + value = "action.png", + imageType = "DYNAMIC" + }, + text = "VR help item" + } + }, + menuIcon = + { + value = "action.png", + imageType = "DYNAMIC" + }, + helpPrompt = + { + { + text = "q", + type = "TEXT" + } + }, + vrHelpTitle = "VR help title", + keyboardProperties = + { + keyboardLayout = "QWERTY", + keypressMode = "SINGLE_KEYPRESS", + limitedCharacterList = + { + "a" + }, + language = "EN-US", + autoCompleteText = "Daemon, Freedom" + } + }) + + + --hmi side: expect TTS.SetGlobalProperties request + EXPECT_HMICALL("TTS.SetGlobalProperties", + { + timeoutPrompt = + { + { + text = "Timeout prompt", + type = "TEXT" + } + }, + helpPrompt = + { + { + text = "q", + type = "TEXT" + } + } + }) + :Timeout(iTimeout) + :Do(function(_,data) + --hmi side: sending UI.SetGlobalProperties response + self.hmiConnection:SendResponse(data.id, data.method, "SUCCESS", {}) + end) + + + + --hmi side: expect UI.SetGlobalProperties request + EXPECT_HMICALL("UI.SetGlobalProperties", + { + menuTitle = "Menu Title", + vrHelp = + { + { + position = 1, + --[=[ TODO: update after resolving APPLINK-16052 + + image = + { + imageType = "DYNAMIC", + value = strAppFolder .. "action.png" + },]=] + text = "VR help item" + } + }, + --Checked below + -- menuIcon = + -- { + -- imageType = "DYNAMIC", + -- value = strAppFolder .. "action.png" + -- }, + vrHelpTitle = "VR help title", + keyboardProperties = + { + keyboardLayout = "QWERTY", + keypressMode = "SINGLE_KEYPRESS", + --[=[ TODO: update after resolving APPLINK-16047 + + limitedCharacterList = + { + "a" + },]=] + language = "EN-US", + autoCompleteText = "Daemon, Freedom" + } + }) + :Timeout(iTimeout) + :ValidIf(function(_,data) + return Check_menuIconParams(data) + end) + :Do(function(_,data) + --hmi side: sending UI.SetGlobalProperties response + self.hmiConnection:SendResponse(data.id, data.method, "SUCCESS", {}) + end) + + + + --mobile side: expect SetGlobalProperties response + EXPECT_RESPONSE(cid, { success = true, resultCode = "SUCCESS"}) + :Timeout(iTimeout) + + --mobile side: expect OnHashChange notification + EXPECT_NOTIFICATION("OnHashChange") + end + + --End test case PositiveResponseCheck.1.8 + ----------------------------------------------------------------------------------------- + + --Begin test case PositiveResponseCheck.1.9 + --Description: Check helpPrompt: text parameter is upper bound + + function Test:SetGlobalProperties_helpPrompt_text_IsUpperBound_500_SUCCESS() + + --mobile side: sending SetGlobalProperties request + local cid = self.mobileSession:SendRPC("SetGlobalProperties", + { + menuTitle = "Menu Title", + timeoutPrompt = + { + { + text = "Timeout prompt", + type = "TEXT" + } + }, + vrHelp = + { + { + position = 1, + image = + { + value = "action.png", + imageType = "DYNAMIC" + }, + text = "VR help item" + } + }, + menuIcon = + { + value = "action.png", + imageType = "DYNAMIC" + }, + helpPrompt = + { + { + text = "qA1_wB2_eA3_rB4_tA5_yB6_uA7_iB8_oA9_pB0_aA1_sB2_dA3_fB4_gA5_hB6_jA7_kB8_lA9_zB0_xA1_cB2_vA3_bB4_nA5_mB6_qA7_wB8_eA9_rB0_tA1_yB2_uA3_iB4_oA5_pB6_aA7_sB8_dA9_fB0_gA1_hB2_jA3_kB4_lA5_zB6_xA7_cB8_vA9_bB0_nA1_mB2_qA3_wB4_eA5_rB6_tA7_yB8_uA9_iB0_oA1_pB2_aA3_sB4_dA5_fB6_gA7_hB8_jA9_kB0_lA1_zB2_xA3_cB4_vA5_bB6_nA7_mB8_qA9_wB0_eA1_rB2_tA3_yB4_uA5_iB6_oA7_pB8_aA9_sB0_dA1_fB2_gA3_hB4_jA5_kB6_lA7_zB8_xA9_cB0_vA1_bB2_nA3_mB4_qA5_wB6_eA7_rB8_tA9_yB0_uA1_iB2_oA3_pB4_aA5_sB6_dA7_fB8_gA9_hB0_jA1_kB2_lA3_zB4_xA5_", + type = "TEXT" + } + }, + vrHelpTitle = "VR help title", + keyboardProperties = + { + keyboardLayout = "QWERTY", + keypressMode = "SINGLE_KEYPRESS", + limitedCharacterList = + { + "a" + }, + language = "EN-US", + autoCompleteText = "Daemon, Freedom" + } + }) + + + --hmi side: expect TTS.SetGlobalProperties request + EXPECT_HMICALL("TTS.SetGlobalProperties", + { + timeoutPrompt = + { + { + text = "Timeout prompt", + type = "TEXT" + } + }, + helpPrompt = + { + { + text = "qA1_wB2_eA3_rB4_tA5_yB6_uA7_iB8_oA9_pB0_aA1_sB2_dA3_fB4_gA5_hB6_jA7_kB8_lA9_zB0_xA1_cB2_vA3_bB4_nA5_mB6_qA7_wB8_eA9_rB0_tA1_yB2_uA3_iB4_oA5_pB6_aA7_sB8_dA9_fB0_gA1_hB2_jA3_kB4_lA5_zB6_xA7_cB8_vA9_bB0_nA1_mB2_qA3_wB4_eA5_rB6_tA7_yB8_uA9_iB0_oA1_pB2_aA3_sB4_dA5_fB6_gA7_hB8_jA9_kB0_lA1_zB2_xA3_cB4_vA5_bB6_nA7_mB8_qA9_wB0_eA1_rB2_tA3_yB4_uA5_iB6_oA7_pB8_aA9_sB0_dA1_fB2_gA3_hB4_jA5_kB6_lA7_zB8_xA9_cB0_vA1_bB2_nA3_mB4_qA5_wB6_eA7_rB8_tA9_yB0_uA1_iB2_oA3_pB4_aA5_sB6_dA7_fB8_gA9_hB0_jA1_kB2_lA3_zB4_xA5_", + type = "TEXT" + } + } + }) + :Timeout(iTimeout) + :Do(function(_,data) + --hmi side: sending UI.SetGlobalProperties response + self.hmiConnection:SendResponse(data.id, data.method, "SUCCESS", {}) + end) + + + + --hmi side: expect UI.SetGlobalProperties request + EXPECT_HMICALL("UI.SetGlobalProperties", + { + menuTitle = "Menu Title", + vrHelp = + { + { + position = 1, + --[=[ TODO: update after resolving APPLINK-16052 + + image = + { + imageType = "DYNAMIC", + value = strAppFolder .. "action.png" + },]=] + text = "VR help item" + } + }, + --Checked below + -- menuIcon = + -- { + -- imageType = "DYNAMIC", + -- value = strAppFolder .. "action.png" + -- }, + vrHelpTitle = "VR help title", + keyboardProperties = + { + keyboardLayout = "QWERTY", + keypressMode = "SINGLE_KEYPRESS", + --[=[ TODO: update after resolving APPLINK-16047 + + limitedCharacterList = + { + "a" + },]=] + language = "EN-US", + autoCompleteText = "Daemon, Freedom" + } + }) + :Timeout(iTimeout) + :ValidIf(function(_,data) + return Check_menuIconParams(data) + end) + :Do(function(_,data) + --hmi side: sending UI.SetGlobalProperties response + self.hmiConnection:SendResponse(data.id, data.method, "SUCCESS", {}) + end) + + + + --mobile side: expect SetGlobalProperties response + EXPECT_RESPONSE(cid, { success = true, resultCode = "SUCCESS"}) + :Timeout(iTimeout) + + --mobile side: expect OnHashChange notification + EXPECT_NOTIFICATION("OnHashChange") + end + + --End test case PositiveResponseCheck.1.9 + ----------------------------------------------------------------------------------------- + + --Begin test case PositiveResponseCheck.1.10 + --Description: Check helpPrompt: text parameter contains space characters _SpaceCharacter_SpaceBefore + + function Test:SetGlobalProperties_helpPrompt_text__SpaceCharacter_SpaceBefore_SUCCESS() + + --mobile side: sending SetGlobalProperties request + local cid = self.mobileSession:SendRPC("SetGlobalProperties", + { + menuTitle = "Menu Title", + timeoutPrompt = + { + { + text = "Timeout prompt", + type = "TEXT" + } + }, + vrHelp = + { + { + position = 1, + image = + { + value = "action.png", + imageType = "DYNAMIC" + }, + text = "VR help item" + } + }, + menuIcon = + { + value = "action.png", + imageType = "DYNAMIC" + }, + helpPrompt = + { + { + text = " SpaceBefore", + type = "TEXT" + } + }, + vrHelpTitle = "VR help title", + keyboardProperties = + { + keyboardLayout = "QWERTY", + keypressMode = "SINGLE_KEYPRESS", + limitedCharacterList = + { + "a" + }, + language = "EN-US", + autoCompleteText = "Daemon, Freedom" + } + }) + + + --hmi side: expect TTS.SetGlobalProperties request + EXPECT_HMICALL("TTS.SetGlobalProperties", + { + timeoutPrompt = + { + { + text = "Timeout prompt", + type = "TEXT" + } + }, + helpPrompt = + { + { + text = " SpaceBefore", + type = "TEXT" + } + } + }) + :Timeout(iTimeout) + :Do(function(_,data) + --hmi side: sending UI.SetGlobalProperties response + self.hmiConnection:SendResponse(data.id, data.method, "SUCCESS", {}) + end) + + + + --hmi side: expect UI.SetGlobalProperties request + EXPECT_HMICALL("UI.SetGlobalProperties", + { + menuTitle = "Menu Title", + vrHelp = + { + { + position = 1, + --[=[ TODO: update after resolving APPLINK-16052 + + image = + { + imageType = "DYNAMIC", + value = strAppFolder .. "action.png" + },]=] + text = "VR help item" + } + }, + --Checked below + -- menuIcon = + -- { + -- imageType = "DYNAMIC", + -- value = strAppFolder .. "action.png" + -- }, + vrHelpTitle = "VR help title", + keyboardProperties = + { + keyboardLayout = "QWERTY", + keypressMode = "SINGLE_KEYPRESS", + --[=[ TODO: update after resolving APPLINK-16047 + + limitedCharacterList = + { + "a" + },]=] + language = "EN-US", + autoCompleteText = "Daemon, Freedom" + } + }) + :Timeout(iTimeout) + :ValidIf(function(_,data) + return Check_menuIconParams(data) + end) + :Do(function(_,data) + --hmi side: sending UI.SetGlobalProperties response + self.hmiConnection:SendResponse(data.id, data.method, "SUCCESS", {}) + end) + + + + --mobile side: expect SetGlobalProperties response + EXPECT_RESPONSE(cid, { success = true, resultCode = "SUCCESS"}) + :Timeout(iTimeout) + + --mobile side: expect OnHashChange notification + EXPECT_NOTIFICATION("OnHashChange") + end + + --End test case PositiveResponseCheck.1.10 + ----------------------------------------------------------------------------------------- + + --Begin test case PositiveResponseCheck.1.11 + --Description: Check helpPrompt: text parameter contains space characters SpaceAfter_SpaceCharacter_ + + function Test:SetGlobalProperties_helpPrompt_text_SpaceAfter_SpaceCharacter__SUCCESS() + + --mobile side: sending SetGlobalProperties request + local cid = self.mobileSession:SendRPC("SetGlobalProperties", + { + menuTitle = "Menu Title", + timeoutPrompt = + { + { + text = "Timeout prompt", + type = "TEXT" + } + }, + vrHelp = + { + { + position = 1, + image = + { + value = "action.png", + imageType = "DYNAMIC" + }, + text = "VR help item" + } + }, + menuIcon = + { + value = "action.png", + imageType = "DYNAMIC" + }, + helpPrompt = + { + { + text = "SpaceAfter ", + type = "TEXT" + } + }, + vrHelpTitle = "VR help title", + keyboardProperties = + { + keyboardLayout = "QWERTY", + keypressMode = "SINGLE_KEYPRESS", + limitedCharacterList = + { + "a" + }, + language = "EN-US", + autoCompleteText = "Daemon, Freedom" + } + }) + + + --hmi side: expect TTS.SetGlobalProperties request + EXPECT_HMICALL("TTS.SetGlobalProperties", + { + timeoutPrompt = + { + { + text = "Timeout prompt", + type = "TEXT" + } + }, + helpPrompt = + { + { + text = "SpaceAfter ", + type = "TEXT" + } + } + }) + :Timeout(iTimeout) + :Do(function(_,data) + --hmi side: sending UI.SetGlobalProperties response + self.hmiConnection:SendResponse(data.id, data.method, "SUCCESS", {}) + end) + + + + --hmi side: expect UI.SetGlobalProperties request + EXPECT_HMICALL("UI.SetGlobalProperties", + { + menuTitle = "Menu Title", + vrHelp = + { + { + position = 1, + --[=[ TODO: update after resolving APPLINK-16052 + + image = + { + imageType = "DYNAMIC", + value = strAppFolder .. "action.png" + },]=] + text = "VR help item" + } + }, + --Checked below + -- menuIcon = + -- { + -- imageType = "DYNAMIC", + -- value = strAppFolder .. "action.png" + -- }, + vrHelpTitle = "VR help title", + keyboardProperties = + { + keyboardLayout = "QWERTY", + keypressMode = "SINGLE_KEYPRESS", + --[=[ TODO: update after resolving APPLINK-16047 + + limitedCharacterList = + { + "a" + },]=] + language = "EN-US", + autoCompleteText = "Daemon, Freedom" + } + }) + :Timeout(iTimeout) + :ValidIf(function(_,data) + return Check_menuIconParams(data) + end) + :Do(function(_,data) + --hmi side: sending UI.SetGlobalProperties response + self.hmiConnection:SendResponse(data.id, data.method, "SUCCESS", {}) + end) + + + + --mobile side: expect SetGlobalProperties response + EXPECT_RESPONSE(cid, { success = true, resultCode = "SUCCESS"}) + :Timeout(iTimeout) + + --mobile side: expect OnHashChange notification + EXPECT_NOTIFICATION("OnHashChange") + end + + --End test case PositiveResponseCheck.1.11 + ----------------------------------------------------------------------------------------- + + --Begin test case PositiveResponseCheck.1.12 + --Description: Check helpPrompt: text parameter contains space characters Space_SpaceCharacter_In_SpaceCharacter_The_SpaceCharacter_Middle + + function Test:SetGlobalProperties_helpPrompt_text_Space_SpaceCharacter_In_SpaceCharacter_The_SpaceCharacter_Middle_SUCCESS() + + --mobile side: sending SetGlobalProperties request + local cid = self.mobileSession:SendRPC("SetGlobalProperties", + { + menuTitle = "Menu Title", + timeoutPrompt = + { + { + text = "Timeout prompt", + type = "TEXT" + } + }, + vrHelp = + { + { + position = 1, + image = + { + value = "action.png", + imageType = "DYNAMIC" + }, + text = "VR help item" + } + }, + menuIcon = + { + value = "action.png", + imageType = "DYNAMIC" + }, + helpPrompt = + { + { + text = "Space In The Middle", + type = "TEXT" + } + }, + vrHelpTitle = "VR help title", + keyboardProperties = + { + keyboardLayout = "QWERTY", + keypressMode = "SINGLE_KEYPRESS", + limitedCharacterList = + { + "a" + }, + language = "EN-US", + autoCompleteText = "Daemon, Freedom" + } + }) + + + --hmi side: expect TTS.SetGlobalProperties request + EXPECT_HMICALL("TTS.SetGlobalProperties", + { + timeoutPrompt = + { + { + text = "Timeout prompt", + type = "TEXT" + } + }, + helpPrompt = + { + { + text = "Space In The Middle", + type = "TEXT" + } + } + }) + :Timeout(iTimeout) + :Do(function(_,data) + --hmi side: sending UI.SetGlobalProperties response + self.hmiConnection:SendResponse(data.id, data.method, "SUCCESS", {}) + end) + + + + --hmi side: expect UI.SetGlobalProperties request + EXPECT_HMICALL("UI.SetGlobalProperties", + { + menuTitle = "Menu Title", + vrHelp = + { + { + position = 1, + --[=[ TODO: update after resolving APPLINK-16052 + + image = + { + imageType = "DYNAMIC", + value = strAppFolder .. "action.png" + },]=] + text = "VR help item" + } + }, + --Checked below + -- menuIcon = + -- { + -- imageType = "DYNAMIC", + -- value = strAppFolder .. "action.png" + -- }, + vrHelpTitle = "VR help title", + keyboardProperties = + { + keyboardLayout = "QWERTY", + keypressMode = "SINGLE_KEYPRESS", + --[=[ TODO: update after resolving APPLINK-16047 + + limitedCharacterList = + { + "a" + },]=] + language = "EN-US", + autoCompleteText = "Daemon, Freedom" + } + }) + :Timeout(iTimeout) + :ValidIf(function(_,data) + return Check_menuIconParams(data) + end) + :Do(function(_,data) + --hmi side: sending UI.SetGlobalProperties response + self.hmiConnection:SendResponse(data.id, data.method, "SUCCESS", {}) + end) + + + + --mobile side: expect SetGlobalProperties response + EXPECT_RESPONSE(cid, { success = true, resultCode = "SUCCESS"}) + :Timeout(iTimeout) + + --mobile side: expect OnHashChange notification + EXPECT_NOTIFICATION("OnHashChange") + end + + --End test case PositiveResponseCheck.1.12 + ----------------------------------------------------------------------------------------- + + --Begin test case PositiveResponseCheck.1.13 + --Description: Check helpPrompt: text parameter contains space characters _SpaceCharacter_Space_SpaceCharacter_Every_SpaceCharacter_Where_SpaceCharacter_ + + function Test:SetGlobalProperties_helpPrompt_text__SpaceCharacter_Space_SpaceCharacter_Every_SpaceCharacter_Where_SpaceCharacter__SUCCESS() + + --mobile side: sending SetGlobalProperties request + local cid = self.mobileSession:SendRPC("SetGlobalProperties", + { + menuTitle = "Menu Title", + timeoutPrompt = + { + { + text = "Timeout prompt", + type = "TEXT" + } + }, + vrHelp = + { + { + position = 1, + image = + { + value = "action.png", + imageType = "DYNAMIC" + }, + text = "VR help item" + } + }, + menuIcon = + { + value = "action.png", + imageType = "DYNAMIC" + }, + helpPrompt = + { + { + text = " Space Every Where ", + type = "TEXT" + } + }, + vrHelpTitle = "VR help title", + keyboardProperties = + { + keyboardLayout = "QWERTY", + keypressMode = "SINGLE_KEYPRESS", + limitedCharacterList = + { + "a" + }, + language = "EN-US", + autoCompleteText = "Daemon, Freedom" + } + }) + + + --hmi side: expect TTS.SetGlobalProperties request + EXPECT_HMICALL("TTS.SetGlobalProperties", + { + timeoutPrompt = + { + { + text = "Timeout prompt", + type = "TEXT" + } + }, + helpPrompt = + { + { + text = " Space Every Where ", + type = "TEXT" + } + } + }) + :Timeout(iTimeout) + :Do(function(_,data) + --hmi side: sending UI.SetGlobalProperties response + self.hmiConnection:SendResponse(data.id, data.method, "SUCCESS", {}) + end) + + + + --hmi side: expect UI.SetGlobalProperties request + EXPECT_HMICALL("UI.SetGlobalProperties", + { + menuTitle = "Menu Title", + vrHelp = + { + { + position = 1, + --[=[ TODO: update after resolving APPLINK-16052 + + image = + { + imageType = "DYNAMIC", + value = strAppFolder .. "action.png" + },]=] + text = "VR help item" + } + }, + --Checked below + -- menuIcon = + -- { + -- imageType = "DYNAMIC", + -- value = strAppFolder .. "action.png" + -- }, + vrHelpTitle = "VR help title", + keyboardProperties = + { + keyboardLayout = "QWERTY", + keypressMode = "SINGLE_KEYPRESS", + --[=[ TODO: update after resolving APPLINK-16047 + + limitedCharacterList = + { + "a" + },]=] + language = "EN-US", + autoCompleteText = "Daemon, Freedom" + } + }) + :Timeout(iTimeout) + :ValidIf(function(_,data) + return Check_menuIconParams(data) + end) + :Do(function(_,data) + --hmi side: sending UI.SetGlobalProperties response + self.hmiConnection:SendResponse(data.id, data.method, "SUCCESS", {}) + end) + + + + --mobile side: expect SetGlobalProperties response + EXPECT_RESPONSE(cid, { success = true, resultCode = "SUCCESS"}) + :Timeout(iTimeout) + + --mobile side: expect OnHashChange notification + EXPECT_NOTIFICATION("OnHashChange") + end + + --End test case PositiveResponseCheck.1.13 + ----------------------------------------------------------------------------------------- + + --Begin test case PositiveResponseCheck.1.14 + --Description: Check timeoutPrompt parameter is lower bound + + function Test:SetGlobalProperties_timeoutPrompt_Array_minsize_1_SUCCESS() + + --mobile side: sending SetGlobalProperties request + local cid = self.mobileSession:SendRPC("SetGlobalProperties", + { + menuTitle = "Menu Title", + timeoutPrompt = + { + { + text = "Timeout prompt", + type = "TEXT" + } + }, + vrHelp = + { + { + position = 1, + image = + { + value = "action.png", + imageType = "DYNAMIC" + }, + text = "VR help item" + } + }, + menuIcon = + { + value = "action.png", + imageType = "DYNAMIC" + }, + helpPrompt = + { + { + text = "Help prompt", + type = "TEXT" + } + }, + vrHelpTitle = "VR help title", + keyboardProperties = + { + keyboardLayout = "QWERTY", + keypressMode = "SINGLE_KEYPRESS", + limitedCharacterList = + { + "a" + }, + language = "EN-US", + autoCompleteText = "Daemon, Freedom" + } + }) + + + --hmi side: expect TTS.SetGlobalProperties request + EXPECT_HMICALL("TTS.SetGlobalProperties", + { + timeoutPrompt = + { + { + text = "Timeout prompt", + type = "TEXT" + } + }, + helpPrompt = + { + { + text = "Help prompt", + type = "TEXT" + } + } + }) + :Timeout(iTimeout) + :Do(function(_,data) + --hmi side: sending UI.SetGlobalProperties response + self.hmiConnection:SendResponse(data.id, data.method, "SUCCESS", {}) + end) + + + + --hmi side: expect UI.SetGlobalProperties request + EXPECT_HMICALL("UI.SetGlobalProperties", + { + menuTitle = "Menu Title", + vrHelp = + { + { + position = 1, + --[=[ TODO: update after resolving APPLINK-16052 + + image = + { + imageType = "DYNAMIC", + value = strAppFolder .. "action.png" + },]=] + text = "VR help item" + } + }, + --Checked below + -- menuIcon = + -- { + -- imageType = "DYNAMIC", + -- value = strAppFolder .. "action.png" + -- }, + vrHelpTitle = "VR help title", + keyboardProperties = + { + keyboardLayout = "QWERTY", + keypressMode = "SINGLE_KEYPRESS", + --[=[ TODO: update after resolving APPLINK-16047 + + limitedCharacterList = + { + "a" + },]=] + language = "EN-US", + autoCompleteText = "Daemon, Freedom" + } + }) + :Timeout(iTimeout) + :ValidIf(function(_,data) + return Check_menuIconParams(data) + end) + :Do(function(_,data) + --hmi side: sending UI.SetGlobalProperties response + self.hmiConnection:SendResponse(data.id, data.method, "SUCCESS", {}) + end) + + + + --mobile side: expect SetGlobalProperties response + EXPECT_RESPONSE(cid, { success = true, resultCode = "SUCCESS"}) + :Timeout(iTimeout) + + --mobile side: expect OnHashChange notification + EXPECT_NOTIFICATION("OnHashChange") + end + + --End test case PositiveResponseCheck.1.14 + ----------------------------------------------------------------------------------------- + + --Begin test case PositiveResponseCheck.1.15 + --Description: Check timeoutPrompt parameter is upper bound + + function Test:SetGlobalProperties_timeoutPrompt_Array_maxsize_100_SUCCESS() + + --mobile side: sending SetGlobalProperties request + local cid = self.mobileSession:SendRPC("SetGlobalProperties", + { + menuTitle = "Menu Title", + timeoutPrompt = + { + { + text = "Timeout prompt_001", + type = "TEXT" + }, + { + text = "Timeout prompt_002", + type = "TEXT" + }, + { + text = "Timeout prompt_003", + type = "TEXT" + }, + { + text = "Timeout prompt_004", + type = "TEXT" + }, + { + text = "Timeout prompt_005", + type = "TEXT" + }, + { + text = "Timeout prompt_006", + type = "TEXT" + }, + { + text = "Timeout prompt_007", + type = "TEXT" + }, + { + text = "Timeout prompt_008", + type = "TEXT" + }, + { + text = "Timeout prompt_009", + type = "TEXT" + }, + { + text = "Timeout prompt_010", + type = "TEXT" + }, + { + text = "Timeout prompt_011", + type = "TEXT" + }, + { + text = "Timeout prompt_012", + type = "TEXT" + }, + { + text = "Timeout prompt_013", + type = "TEXT" + }, + { + text = "Timeout prompt_014", + type = "TEXT" + }, + { + text = "Timeout prompt_015", + type = "TEXT" + }, + { + text = "Timeout prompt_016", + type = "TEXT" + }, + { + text = "Timeout prompt_017", + type = "TEXT" + }, + { + text = "Timeout prompt_018", + type = "TEXT" + }, + { + text = "Timeout prompt_019", + type = "TEXT" + }, + { + text = "Timeout prompt_020", + type = "TEXT" + }, + { + text = "Timeout prompt_021", + type = "TEXT" + }, + { + text = "Timeout prompt_022", + type = "TEXT" + }, + { + text = "Timeout prompt_023", + type = "TEXT" + }, + { + text = "Timeout prompt_024", + type = "TEXT" + }, + { + text = "Timeout prompt_025", + type = "TEXT" + }, + { + text = "Timeout prompt_026", + type = "TEXT" + }, + { + text = "Timeout prompt_027", + type = "TEXT" + }, + { + text = "Timeout prompt_028", + type = "TEXT" + }, + { + text = "Timeout prompt_029", + type = "TEXT" + }, + { + text = "Timeout prompt_030", + type = "TEXT" + }, + { + text = "Timeout prompt_031", + type = "TEXT" + }, + { + text = "Timeout prompt_032", + type = "TEXT" + }, + { + text = "Timeout prompt_033", + type = "TEXT" + }, + { + text = "Timeout prompt_034", + type = "TEXT" + }, + { + text = "Timeout prompt_035", + type = "TEXT" + }, + { + text = "Timeout prompt_036", + type = "TEXT" + }, + { + text = "Timeout prompt_037", + type = "TEXT" + }, + { + text = "Timeout prompt_038", + type = "TEXT" + }, + { + text = "Timeout prompt_039", + type = "TEXT" + }, + { + text = "Timeout prompt_040", + type = "TEXT" + }, + { + text = "Timeout prompt_041", + type = "TEXT" + }, + { + text = "Timeout prompt_042", + type = "TEXT" + }, + { + text = "Timeout prompt_043", + type = "TEXT" + }, + { + text = "Timeout prompt_044", + type = "TEXT" + }, + { + text = "Timeout prompt_045", + type = "TEXT" + }, + { + text = "Timeout prompt_046", + type = "TEXT" + }, + { + text = "Timeout prompt_047", + type = "TEXT" + }, + { + text = "Timeout prompt_048", + type = "TEXT" + }, + { + text = "Timeout prompt_049", + type = "TEXT" + }, + { + text = "Timeout prompt_050", + type = "TEXT" + }, + { + text = "Timeout prompt_051", + type = "TEXT" + }, + { + text = "Timeout prompt_052", + type = "TEXT" + }, + { + text = "Timeout prompt_053", + type = "TEXT" + }, + { + text = "Timeout prompt_054", + type = "TEXT" + }, + { + text = "Timeout prompt_055", + type = "TEXT" + }, + { + text = "Timeout prompt_056", + type = "TEXT" + }, + { + text = "Timeout prompt_057", + type = "TEXT" + }, + { + text = "Timeout prompt_058", + type = "TEXT" + }, + { + text = "Timeout prompt_059", + type = "TEXT" + }, + { + text = "Timeout prompt_060", + type = "TEXT" + }, + { + text = "Timeout prompt_061", + type = "TEXT" + }, + { + text = "Timeout prompt_062", + type = "TEXT" + }, + { + text = "Timeout prompt_063", + type = "TEXT" + }, + { + text = "Timeout prompt_064", + type = "TEXT" + }, + { + text = "Timeout prompt_065", + type = "TEXT" + }, + { + text = "Timeout prompt_066", + type = "TEXT" + }, + { + text = "Timeout prompt_067", + type = "TEXT" + }, + { + text = "Timeout prompt_068", + type = "TEXT" + }, + { + text = "Timeout prompt_069", + type = "TEXT" + }, + { + text = "Timeout prompt_070", + type = "TEXT" + }, + { + text = "Timeout prompt_071", + type = "TEXT" + }, + { + text = "Timeout prompt_072", + type = "TEXT" + }, + { + text = "Timeout prompt_073", + type = "TEXT" + }, + { + text = "Timeout prompt_074", + type = "TEXT" + }, + { + text = "Timeout prompt_075", + type = "TEXT" + }, + { + text = "Timeout prompt_076", + type = "TEXT" + }, + { + text = "Timeout prompt_077", + type = "TEXT" + }, + { + text = "Timeout prompt_078", + type = "TEXT" + }, + { + text = "Timeout prompt_079", + type = "TEXT" + }, + { + text = "Timeout prompt_080", + type = "TEXT" + }, + { + text = "Timeout prompt_081", + type = "TEXT" + }, + { + text = "Timeout prompt_082", + type = "TEXT" + }, + { + text = "Timeout prompt_083", + type = "TEXT" + }, + { + text = "Timeout prompt_084", + type = "TEXT" + }, + { + text = "Timeout prompt_085", + type = "TEXT" + }, + { + text = "Timeout prompt_086", + type = "TEXT" + }, + { + text = "Timeout prompt_087", + type = "TEXT" + }, + { + text = "Timeout prompt_088", + type = "TEXT" + }, + { + text = "Timeout prompt_089", + type = "TEXT" + }, + { + text = "Timeout prompt_090", + type = "TEXT" + }, + { + text = "Timeout prompt_091", + type = "TEXT" + }, + { + text = "Timeout prompt_092", + type = "TEXT" + }, + { + text = "Timeout prompt_093", + type = "TEXT" + }, + { + text = "Timeout prompt_094", + type = "TEXT" + }, + { + text = "Timeout prompt_095", + type = "TEXT" + }, + { + text = "Timeout prompt_096", + type = "TEXT" + }, + { + text = "Timeout prompt_097", + type = "TEXT" + }, + { + text = "Timeout prompt_098", + type = "TEXT" + }, + { + text = "Timeout prompt_099", + type = "TEXT" + }, + { + text = "Timeout prompt_100", + type = "TEXT" + } + }, + vrHelp = + { + { + position = 1, + image = + { + value = "action.png", + imageType = "DYNAMIC" + }, + text = "VR help item" + } + }, + menuIcon = + { + value = "action.png", + imageType = "DYNAMIC" + }, + helpPrompt = + { + { + text = "Help prompt", + type = "TEXT" + } + }, + vrHelpTitle = "VR help title", + keyboardProperties = + { + keyboardLayout = "QWERTY", + keypressMode = "SINGLE_KEYPRESS", + limitedCharacterList = + { + "a" + }, + language = "EN-US", + autoCompleteText = "Daemon, Freedom" + } + }) + + + --hmi side: expect TTS.SetGlobalProperties request + EXPECT_HMICALL("TTS.SetGlobalProperties", + { + timeoutPrompt = + { + { + text = "Timeout prompt_001", + type = "TEXT" + }, + { + text = "Timeout prompt_002", + type = "TEXT" + }, + { + text = "Timeout prompt_003", + type = "TEXT" + }, + { + text = "Timeout prompt_004", + type = "TEXT" + }, + { + text = "Timeout prompt_005", + type = "TEXT" + }, + { + text = "Timeout prompt_006", + type = "TEXT" + }, + { + text = "Timeout prompt_007", + type = "TEXT" + }, + { + text = "Timeout prompt_008", + type = "TEXT" + }, + { + text = "Timeout prompt_009", + type = "TEXT" + }, + { + text = "Timeout prompt_010", + type = "TEXT" + }, + { + text = "Timeout prompt_011", + type = "TEXT" + }, + { + text = "Timeout prompt_012", + type = "TEXT" + }, + { + text = "Timeout prompt_013", + type = "TEXT" + }, + { + text = "Timeout prompt_014", + type = "TEXT" + }, + { + text = "Timeout prompt_015", + type = "TEXT" + }, + { + text = "Timeout prompt_016", + type = "TEXT" + }, + { + text = "Timeout prompt_017", + type = "TEXT" + }, + { + text = "Timeout prompt_018", + type = "TEXT" + }, + { + text = "Timeout prompt_019", + type = "TEXT" + }, + { + text = "Timeout prompt_020", + type = "TEXT" + }, + { + text = "Timeout prompt_021", + type = "TEXT" + }, + { + text = "Timeout prompt_022", + type = "TEXT" + }, + { + text = "Timeout prompt_023", + type = "TEXT" + }, + { + text = "Timeout prompt_024", + type = "TEXT" + }, + { + text = "Timeout prompt_025", + type = "TEXT" + }, + { + text = "Timeout prompt_026", + type = "TEXT" + }, + { + text = "Timeout prompt_027", + type = "TEXT" + }, + { + text = "Timeout prompt_028", + type = "TEXT" + }, + { + text = "Timeout prompt_029", + type = "TEXT" + }, + { + text = "Timeout prompt_030", + type = "TEXT" + }, + { + text = "Timeout prompt_031", + type = "TEXT" + }, + { + text = "Timeout prompt_032", + type = "TEXT" + }, + { + text = "Timeout prompt_033", + type = "TEXT" + }, + { + text = "Timeout prompt_034", + type = "TEXT" + }, + { + text = "Timeout prompt_035", + type = "TEXT" + }, + { + text = "Timeout prompt_036", + type = "TEXT" + }, + { + text = "Timeout prompt_037", + type = "TEXT" + }, + { + text = "Timeout prompt_038", + type = "TEXT" + }, + { + text = "Timeout prompt_039", + type = "TEXT" + }, + { + text = "Timeout prompt_040", + type = "TEXT" + }, + { + text = "Timeout prompt_041", + type = "TEXT" + }, + { + text = "Timeout prompt_042", + type = "TEXT" + }, + { + text = "Timeout prompt_043", + type = "TEXT" + }, + { + text = "Timeout prompt_044", + type = "TEXT" + }, + { + text = "Timeout prompt_045", + type = "TEXT" + }, + { + text = "Timeout prompt_046", + type = "TEXT" + }, + { + text = "Timeout prompt_047", + type = "TEXT" + }, + { + text = "Timeout prompt_048", + type = "TEXT" + }, + { + text = "Timeout prompt_049", + type = "TEXT" + }, + { + text = "Timeout prompt_050", + type = "TEXT" + }, + { + text = "Timeout prompt_051", + type = "TEXT" + }, + { + text = "Timeout prompt_052", + type = "TEXT" + }, + { + text = "Timeout prompt_053", + type = "TEXT" + }, + { + text = "Timeout prompt_054", + type = "TEXT" + }, + { + text = "Timeout prompt_055", + type = "TEXT" + }, + { + text = "Timeout prompt_056", + type = "TEXT" + }, + { + text = "Timeout prompt_057", + type = "TEXT" + }, + { + text = "Timeout prompt_058", + type = "TEXT" + }, + { + text = "Timeout prompt_059", + type = "TEXT" + }, + { + text = "Timeout prompt_060", + type = "TEXT" + }, + { + text = "Timeout prompt_061", + type = "TEXT" + }, + { + text = "Timeout prompt_062", + type = "TEXT" + }, + { + text = "Timeout prompt_063", + type = "TEXT" + }, + { + text = "Timeout prompt_064", + type = "TEXT" + }, + { + text = "Timeout prompt_065", + type = "TEXT" + }, + { + text = "Timeout prompt_066", + type = "TEXT" + }, + { + text = "Timeout prompt_067", + type = "TEXT" + }, + { + text = "Timeout prompt_068", + type = "TEXT" + }, + { + text = "Timeout prompt_069", + type = "TEXT" + }, + { + text = "Timeout prompt_070", + type = "TEXT" + }, + { + text = "Timeout prompt_071", + type = "TEXT" + }, + { + text = "Timeout prompt_072", + type = "TEXT" + }, + { + text = "Timeout prompt_073", + type = "TEXT" + }, + { + text = "Timeout prompt_074", + type = "TEXT" + }, + { + text = "Timeout prompt_075", + type = "TEXT" + }, + { + text = "Timeout prompt_076", + type = "TEXT" + }, + { + text = "Timeout prompt_077", + type = "TEXT" + }, + { + text = "Timeout prompt_078", + type = "TEXT" + }, + { + text = "Timeout prompt_079", + type = "TEXT" + }, + { + text = "Timeout prompt_080", + type = "TEXT" + }, + { + text = "Timeout prompt_081", + type = "TEXT" + }, + { + text = "Timeout prompt_082", + type = "TEXT" + }, + { + text = "Timeout prompt_083", + type = "TEXT" + }, + { + text = "Timeout prompt_084", + type = "TEXT" + }, + { + text = "Timeout prompt_085", + type = "TEXT" + }, + { + text = "Timeout prompt_086", + type = "TEXT" + }, + { + text = "Timeout prompt_087", + type = "TEXT" + }, + { + text = "Timeout prompt_088", + type = "TEXT" + }, + { + text = "Timeout prompt_089", + type = "TEXT" + }, + { + text = "Timeout prompt_090", + type = "TEXT" + }, + { + text = "Timeout prompt_091", + type = "TEXT" + }, + { + text = "Timeout prompt_092", + type = "TEXT" + }, + { + text = "Timeout prompt_093", + type = "TEXT" + }, + { + text = "Timeout prompt_094", + type = "TEXT" + }, + { + text = "Timeout prompt_095", + type = "TEXT" + }, + { + text = "Timeout prompt_096", + type = "TEXT" + }, + { + text = "Timeout prompt_097", + type = "TEXT" + }, + { + text = "Timeout prompt_098", + type = "TEXT" + }, + { + text = "Timeout prompt_099", + type = "TEXT" + }, + { + text = "Timeout prompt_100", + type = "TEXT" + } + }, + helpPrompt = + { + { + text = "Help prompt", + type = "TEXT" + } + } + }) + :Timeout(iTimeout) + :Do(function(_,data) + --hmi side: sending UI.SetGlobalProperties response + self.hmiConnection:SendResponse(data.id, data.method, "SUCCESS", {}) + end) + + + + --hmi side: expect UI.SetGlobalProperties request + EXPECT_HMICALL("UI.SetGlobalProperties", + { + menuTitle = "Menu Title", + vrHelp = + { + { + position = 1, + --[=[ TODO: update after resolving APPLINK-16052 + + image = + { + imageType = "DYNAMIC", + value = strAppFolder .. "action.png" + },]=] + text = "VR help item" + } + }, + --Checked below + -- menuIcon = + -- { + -- imageType = "DYNAMIC", + -- value = strAppFolder .. "action.png" + -- }, + vrHelpTitle = "VR help title", + keyboardProperties = + { + keyboardLayout = "QWERTY", + keypressMode = "SINGLE_KEYPRESS", + --[=[ TODO: update after resolving APPLINK-16047 + + limitedCharacterList = + { + "a" + },]=] + language = "EN-US", + autoCompleteText = "Daemon, Freedom" + } + }) + :Timeout(iTimeout) + :ValidIf(function(_,data) + return Check_menuIconParams(data) + end) + :Do(function(_,data) + --hmi side: sending UI.SetGlobalProperties response + self.hmiConnection:SendResponse(data.id, data.method, "SUCCESS", {}) + end) + + + + --mobile side: expect SetGlobalProperties response + EXPECT_RESPONSE(cid, { success = true, resultCode = "SUCCESS"}) + :Timeout(iTimeout) + + --mobile side: expect OnHashChange notification + EXPECT_NOTIFICATION("OnHashChange") + end + + --End test case PositiveResponseCheck.1.15 + ----------------------------------------------------------------------------------------- + + --Begin test case PositiveResponseCheck.1.16 + --Description: Check timeoutPrompt: type parameter is valid data (TEXT) + + function Test:SetGlobalProperties_timeoutPrompt_type_TEXT_SUCCESS() + + --mobile side: sending SetGlobalProperties request + local cid = self.mobileSession:SendRPC("SetGlobalProperties", + { + menuTitle = "Menu Title", + timeoutPrompt = + { + { + text = "Timeout prompt", + type = "TEXT" + } + }, + vrHelp = + { + { + position = 1, + image = + { + value = "action.png", + imageType = "DYNAMIC" + }, + text = "VR help item" + } + }, + menuIcon = + { + value = "action.png", + imageType = "DYNAMIC" + }, + helpPrompt = + { + { + text = "Help prompt", + type = "TEXT" + } + }, + vrHelpTitle = "VR help title", + keyboardProperties = + { + keyboardLayout = "QWERTY", + keypressMode = "SINGLE_KEYPRESS", + limitedCharacterList = + { + "a" + }, + language = "EN-US", + autoCompleteText = "Daemon, Freedom" + } + }) + + + --hmi side: expect TTS.SetGlobalProperties request + EXPECT_HMICALL("TTS.SetGlobalProperties", + { + timeoutPrompt = + { + { + text = "Timeout prompt", + type = "TEXT" + } + }, + helpPrompt = + { + { + text = "Help prompt", + type = "TEXT" + } + } + }) + :Timeout(iTimeout) + :Do(function(_,data) + --hmi side: sending UI.SetGlobalProperties response + self.hmiConnection:SendResponse(data.id, data.method, "SUCCESS", {}) + end) + + + + --hmi side: expect UI.SetGlobalProperties request + EXPECT_HMICALL("UI.SetGlobalProperties", + { + menuTitle = "Menu Title", + vrHelp = + { + { + position = 1, + --[=[ TODO: update after resolving APPLINK-16052 + + image = + { + imageType = "DYNAMIC", + value = strAppFolder .. "action.png" + },]=] + text = "VR help item" + } + }, + --Checked below + -- menuIcon = + -- { + -- imageType = "DYNAMIC", + -- value = strAppFolder .. "action.png" + -- }, + vrHelpTitle = "VR help title", + keyboardProperties = + { + keyboardLayout = "QWERTY", + keypressMode = "SINGLE_KEYPRESS", + --[=[ TODO: update after resolving APPLINK-16047 + + limitedCharacterList = + { + "a" + },]=] + language = "EN-US", + autoCompleteText = "Daemon, Freedom" + } + }) + :Timeout(iTimeout) + :ValidIf(function(_,data) + return Check_menuIconParams(data) + end) + :Do(function(_,data) + --hmi side: sending UI.SetGlobalProperties response + self.hmiConnection:SendResponse(data.id, data.method, "SUCCESS", {}) + end) + + + + --mobile side: expect SetGlobalProperties response + EXPECT_RESPONSE(cid, { success = true, resultCode = "SUCCESS"}) + :Timeout(iTimeout) + + --mobile side: expect OnHashChange notification + EXPECT_NOTIFICATION("OnHashChange") + end + + --End test case PositiveResponseCheck.1.16 + ----------------------------------------------------------------------------------------- + + --Begin test case PositiveResponseCheck.1.17 + --Description: Check timeoutPrompt: type parameter is valid data (SAPI_PHONEMES) + + function Test:SetGlobalProperties_timeoutPrompt_type_SAPI_PHONEMES_SUCCESS() + + --mobile side: sending SetGlobalProperties request + local cid = self.mobileSession:SendRPC("SetGlobalProperties", + { + menuTitle = "Menu Title", + timeoutPrompt = + { + { + text = "Timeout prompt", + type = "SAPI_PHONEMES" + } + }, + vrHelp = + { + { + position = 1, + image = + { + value = "action.png", + imageType = "DYNAMIC" + }, + text = "VR help item" + } + }, + menuIcon = + { + value = "action.png", + imageType = "DYNAMIC" + }, + helpPrompt = + { + { + text = "Help prompt", + type = "TEXT" + } + }, + vrHelpTitle = "VR help title", + keyboardProperties = + { + keyboardLayout = "QWERTY", + keypressMode = "SINGLE_KEYPRESS", + limitedCharacterList = + { + "a" + }, + language = "EN-US", + autoCompleteText = "Daemon, Freedom" + } + }) + + + --hmi side: expect TTS.SetGlobalProperties request + EXPECT_HMICALL("TTS.SetGlobalProperties", + { + timeoutPrompt = + { + { + text = "Timeout prompt", + type = "SAPI_PHONEMES" + } + }, + helpPrompt = + { + { + text = "Help prompt", + type = "TEXT" + } + } + }) + :Timeout(iTimeout) + :Do(function(_,data) + --hmi side: sending UI.SetGlobalProperties response + self.hmiConnection:SendResponse(data.id, data.method, "SUCCESS", {}) + end) + + + + --hmi side: expect UI.SetGlobalProperties request + EXPECT_HMICALL("UI.SetGlobalProperties", + { + menuTitle = "Menu Title", + vrHelp = + { + { + position = 1, + --[=[ TODO: update after resolving APPLINK-16052 + + image = + { + imageType = "DYNAMIC", + value = strAppFolder .. "action.png" + },]=] + text = "VR help item" + } + }, + --Checked below + -- menuIcon = + -- { + -- imageType = "DYNAMIC", + -- value = strAppFolder .. "action.png" + -- }, + vrHelpTitle = "VR help title", + keyboardProperties = + { + keyboardLayout = "QWERTY", + keypressMode = "SINGLE_KEYPRESS", + --[=[ TODO: update after resolving APPLINK-16047 + + limitedCharacterList = + { + "a" + },]=] + language = "EN-US", + autoCompleteText = "Daemon, Freedom" + } + }) + :Timeout(iTimeout) + :ValidIf(function(_,data) + return Check_menuIconParams(data) + end) + :Do(function(_,data) + --hmi side: sending UI.SetGlobalProperties response + self.hmiConnection:SendResponse(data.id, data.method, "SUCCESS", {}) + end) + + + + --mobile side: expect SetGlobalProperties response + EXPECT_RESPONSE(cid, { success = true, resultCode = "SUCCESS"}) + :Timeout(iTimeout) + + --mobile side: expect OnHashChange notification + EXPECT_NOTIFICATION("OnHashChange") + end + + --End test case PositiveResponseCheck.1.17 + ----------------------------------------------------------------------------------------- + + --Begin test case PositiveResponseCheck.1.18 + --Description: Check timeoutPrompt: type parameter is valid data (LHPLUS_PHONEMES) + + function Test:SetGlobalProperties_timeoutPrompt_type_LHPLUS_PHONEMES_SUCCESS() + + --mobile side: sending SetGlobalProperties request + local cid = self.mobileSession:SendRPC("SetGlobalProperties", + { + menuTitle = "Menu Title", + timeoutPrompt = + { + { + text = "Timeout prompt", + type = "LHPLUS_PHONEMES" + } + }, + vrHelp = + { + { + position = 1, + image = + { + value = "action.png", + imageType = "DYNAMIC" + }, + text = "VR help item" + } + }, + menuIcon = + { + value = "action.png", + imageType = "DYNAMIC" + }, + helpPrompt = + { + { + text = "Help prompt", + type = "TEXT" + } + }, + vrHelpTitle = "VR help title", + keyboardProperties = + { + keyboardLayout = "QWERTY", + keypressMode = "SINGLE_KEYPRESS", + limitedCharacterList = + { + "a" + }, + language = "EN-US", + autoCompleteText = "Daemon, Freedom" + } + }) + + + --hmi side: expect TTS.SetGlobalProperties request + EXPECT_HMICALL("TTS.SetGlobalProperties", + { + timeoutPrompt = + { + { + text = "Timeout prompt", + type = "LHPLUS_PHONEMES" + } + }, + helpPrompt = + { + { + text = "Help prompt", + type = "TEXT" + } + } + }) + :Timeout(iTimeout) + :Do(function(_,data) + --hmi side: sending UI.SetGlobalProperties response + self.hmiConnection:SendResponse(data.id, data.method, "SUCCESS", {}) + end) + + + + --hmi side: expect UI.SetGlobalProperties request + EXPECT_HMICALL("UI.SetGlobalProperties", + { + menuTitle = "Menu Title", + vrHelp = + { + { + position = 1, + --[=[ TODO: update after resolving APPLINK-16052 + + image = + { + imageType = "DYNAMIC", + value = strAppFolder .. "action.png" + },]=] + text = "VR help item" + } + }, + --Checked below + -- menuIcon = + -- { + -- imageType = "DYNAMIC", + -- value = strAppFolder .. "action.png" + -- }, + vrHelpTitle = "VR help title", + keyboardProperties = + { + keyboardLayout = "QWERTY", + keypressMode = "SINGLE_KEYPRESS", + --[=[ TODO: update after resolving APPLINK-16047 + + limitedCharacterList = + { + "a" + },]=] + language = "EN-US", + autoCompleteText = "Daemon, Freedom" + } + }) + :Timeout(iTimeout) + :ValidIf(function(_,data) + return Check_menuIconParams(data) + end) + :Do(function(_,data) + --hmi side: sending UI.SetGlobalProperties response + self.hmiConnection:SendResponse(data.id, data.method, "SUCCESS", {}) + end) + + + + --mobile side: expect SetGlobalProperties response + EXPECT_RESPONSE(cid, { success = true, resultCode = "SUCCESS"}) + :Timeout(iTimeout) + + --mobile side: expect OnHashChange notification + EXPECT_NOTIFICATION("OnHashChange") + end + + --End test case PositiveResponseCheck.1.18 + ----------------------------------------------------------------------------------------- + + --Begin test case PositiveResponseCheck.1.19 + --Description: Check timeoutPrompt: type parameter is valid data (PRE_RECORDED) + + function Test:SetGlobalProperties_timeoutPrompt_type_PRE_RECORDED_SUCCESS() + + --mobile side: sending SetGlobalProperties request + local cid = self.mobileSession:SendRPC("SetGlobalProperties", + { + menuTitle = "Menu Title", + timeoutPrompt = + { + { + text = "Timeout prompt", + type = "PRE_RECORDED" + } + }, + vrHelp = + { + { + position = 1, + image = + { + value = "action.png", + imageType = "DYNAMIC" + }, + text = "VR help item" + } + }, + menuIcon = + { + value = "action.png", + imageType = "DYNAMIC" + }, + helpPrompt = + { + { + text = "Help prompt", + type = "TEXT" + } + }, + vrHelpTitle = "VR help title", + keyboardProperties = + { + keyboardLayout = "QWERTY", + keypressMode = "SINGLE_KEYPRESS", + limitedCharacterList = + { + "a" + }, + language = "EN-US", + autoCompleteText = "Daemon, Freedom" + } + }) + + + --hmi side: expect TTS.SetGlobalProperties request + EXPECT_HMICALL("TTS.SetGlobalProperties", + { + timeoutPrompt = + { + { + text = "Timeout prompt", + type = "PRE_RECORDED" + } + }, + helpPrompt = + { + { + text = "Help prompt", + type = "TEXT" + } + } + }) + :Timeout(iTimeout) + :Do(function(_,data) + --hmi side: sending UI.SetGlobalProperties response + self.hmiConnection:SendResponse(data.id, data.method, "SUCCESS", {}) + end) + + + + --hmi side: expect UI.SetGlobalProperties request + EXPECT_HMICALL("UI.SetGlobalProperties", + { + menuTitle = "Menu Title", + vrHelp = + { + { + position = 1, + --[=[ TODO: update after resolving APPLINK-16052 + + image = + { + imageType = "DYNAMIC", + value = strAppFolder .. "action.png" + },]=] + text = "VR help item" + } + }, + --Checked below + -- menuIcon = + -- { + -- imageType = "DYNAMIC", + -- value = strAppFolder .. "action.png" + -- }, + vrHelpTitle = "VR help title", + keyboardProperties = + { + keyboardLayout = "QWERTY", + keypressMode = "SINGLE_KEYPRESS", + --[=[ TODO: update after resolving APPLINK-16047 + + limitedCharacterList = + { + "a" + },]=] + language = "EN-US", + autoCompleteText = "Daemon, Freedom" + } + }) + :Timeout(iTimeout) + :ValidIf(function(_,data) + return Check_menuIconParams(data) + end) + :Do(function(_,data) + --hmi side: sending UI.SetGlobalProperties response + self.hmiConnection:SendResponse(data.id, data.method, "SUCCESS", {}) + end) + + + + --mobile side: expect SetGlobalProperties response + EXPECT_RESPONSE(cid, { success = true, resultCode = "SUCCESS"}) + :Timeout(iTimeout) + + --mobile side: expect OnHashChange notification + EXPECT_NOTIFICATION("OnHashChange") + end + + --End test case PositiveResponseCheck.1.19 + ----------------------------------------------------------------------------------------- + + --Begin test case PositiveResponseCheck.1.20 + --Description: Check timeoutPrompt: type parameter is valid data (SILENCE) + + function Test:SetGlobalProperties_timeoutPrompt_type_SILENCE_SUCCESS() + + --mobile side: sending SetGlobalProperties request + local cid = self.mobileSession:SendRPC("SetGlobalProperties", + { + menuTitle = "Menu Title", + timeoutPrompt = + { + { + text = "Timeout prompt", + type = "SILENCE" + } + }, + vrHelp = + { + { + position = 1, + image = + { + value = "action.png", + imageType = "DYNAMIC" + }, + text = "VR help item" + } + }, + menuIcon = + { + value = "action.png", + imageType = "DYNAMIC" + }, + helpPrompt = + { + { + text = "Help prompt", + type = "TEXT" + } + }, + vrHelpTitle = "VR help title", + keyboardProperties = + { + keyboardLayout = "QWERTY", + keypressMode = "SINGLE_KEYPRESS", + limitedCharacterList = + { + "a" + }, + language = "EN-US", + autoCompleteText = "Daemon, Freedom" + } + }) + + + --hmi side: expect TTS.SetGlobalProperties request + EXPECT_HMICALL("TTS.SetGlobalProperties", + { + timeoutPrompt = + { + { + text = "Timeout prompt", + type = "SILENCE" + } + }, + helpPrompt = + { + { + text = "Help prompt", + type = "TEXT" + } + } + }) + :Timeout(iTimeout) + :Do(function(_,data) + --hmi side: sending UI.SetGlobalProperties response + self.hmiConnection:SendResponse(data.id, data.method, "SUCCESS", {}) + end) + + + + --hmi side: expect UI.SetGlobalProperties request + EXPECT_HMICALL("UI.SetGlobalProperties", + { + menuTitle = "Menu Title", + vrHelp = + { + { + position = 1, + --[=[ TODO: update after resolving APPLINK-16052 + + image = + { + imageType = "DYNAMIC", + value = strAppFolder .. "action.png" + },]=] + text = "VR help item" + } + }, + --Checked below + -- menuIcon = + -- { + -- imageType = "DYNAMIC", + -- value = strAppFolder .. "action.png" + -- }, + vrHelpTitle = "VR help title", + keyboardProperties = + { + keyboardLayout = "QWERTY", + keypressMode = "SINGLE_KEYPRESS", + --[=[ TODO: update after resolving APPLINK-16047 + + limitedCharacterList = + { + "a" + },]=] + language = "EN-US", + autoCompleteText = "Daemon, Freedom" + } + }) + :Timeout(iTimeout) + :ValidIf(function(_,data) + return Check_menuIconParams(data) + end) + :Do(function(_,data) + --hmi side: sending UI.SetGlobalProperties response + self.hmiConnection:SendResponse(data.id, data.method, "SUCCESS", {}) + end) + + + + --mobile side: expect SetGlobalProperties response + EXPECT_RESPONSE(cid, { success = true, resultCode = "SUCCESS"}) + :Timeout(iTimeout) + + --mobile side: expect OnHashChange notification + EXPECT_NOTIFICATION("OnHashChange") + end + + --End test case PositiveResponseCheck.1.20 + ----------------------------------------------------------------------------------------- + + --Begin test case PositiveResponseCheck.1.21 + --Description: Check timeoutPrompt: text parameter is lower bound + + function Test:SetGlobalProperties_timeoutPrompt_text_IsLowerBound_1_SUCCESS() + + --mobile side: sending SetGlobalProperties request + local cid = self.mobileSession:SendRPC("SetGlobalProperties", + { + menuTitle = "Menu Title", + timeoutPrompt = + { + { + text = "q", + type = "TEXT" + } + }, + vrHelp = + { + { + position = 1, + image = + { + value = "action.png", + imageType = "DYNAMIC" + }, + text = "VR help item" + } + }, + menuIcon = + { + value = "action.png", + imageType = "DYNAMIC" + }, + helpPrompt = + { + { + text = "Help prompt", + type = "TEXT" + } + }, + vrHelpTitle = "VR help title", + keyboardProperties = + { + keyboardLayout = "QWERTY", + keypressMode = "SINGLE_KEYPRESS", + limitedCharacterList = + { + "a" + }, + language = "EN-US", + autoCompleteText = "Daemon, Freedom" + } + }) + + + --hmi side: expect TTS.SetGlobalProperties request + EXPECT_HMICALL("TTS.SetGlobalProperties", + { + timeoutPrompt = + { + { + text = "q", + type = "TEXT" + } + }, + helpPrompt = + { + { + text = "Help prompt", + type = "TEXT" + } + } + }) + :Timeout(iTimeout) + :Do(function(_,data) + --hmi side: sending UI.SetGlobalProperties response + self.hmiConnection:SendResponse(data.id, data.method, "SUCCESS", {}) + end) + + + + --hmi side: expect UI.SetGlobalProperties request + EXPECT_HMICALL("UI.SetGlobalProperties", + { + menuTitle = "Menu Title", + vrHelp = + { + { + position = 1, + --[=[ TODO: update after resolving APPLINK-16052 + + image = + { + imageType = "DYNAMIC", + value = strAppFolder .. "action.png" + },]=] + text = "VR help item" + } + }, + --Checked below + -- menuIcon = + -- { + -- imageType = "DYNAMIC", + -- value = strAppFolder .. "action.png" + -- }, + vrHelpTitle = "VR help title", + keyboardProperties = + { + keyboardLayout = "QWERTY", + keypressMode = "SINGLE_KEYPRESS", + --[=[ TODO: update after resolving APPLINK-16047 + + limitedCharacterList = + { + "a" + },]=] + language = "EN-US", + autoCompleteText = "Daemon, Freedom" + } + }) + :Timeout(iTimeout) + :ValidIf(function(_,data) + return Check_menuIconParams(data) + end) + :Do(function(_,data) + --hmi side: sending UI.SetGlobalProperties response + self.hmiConnection:SendResponse(data.id, data.method, "SUCCESS", {}) + end) + + + + --mobile side: expect SetGlobalProperties response + EXPECT_RESPONSE(cid, { success = true, resultCode = "SUCCESS"}) + :Timeout(iTimeout) + + --mobile side: expect OnHashChange notification + EXPECT_NOTIFICATION("OnHashChange") + end + + --End test case PositiveResponseCheck.1.21 + ----------------------------------------------------------------------------------------- + + --Begin test case PositiveResponseCheck.1.22 + --Description: Check timeoutPrompt: text parameter is upper bound + + function Test:SetGlobalProperties_timeoutPrompt_text_IsUpperBound_500_SUCCESS() + + --mobile side: sending SetGlobalProperties request + local cid = self.mobileSession:SendRPC("SetGlobalProperties", + { + menuTitle = "Menu Title", + timeoutPrompt = + { + { + text = "qA1_wB2_eA3_rB4_tA5_yB6_uA7_iB8_oA9_pB0_aA1_sB2_dA3_fB4_gA5_hB6_jA7_kB8_lA9_zB0_xA1_cB2_vA3_bB4_nA5_mB6_qA7_wB8_eA9_rB0_tA1_yB2_uA3_iB4_oA5_pB6_aA7_sB8_dA9_fB0_gA1_hB2_jA3_kB4_lA5_zB6_xA7_cB8_vA9_bB0_nA1_mB2_qA3_wB4_eA5_rB6_tA7_yB8_uA9_iB0_oA1_pB2_aA3_sB4_dA5_fB6_gA7_hB8_jA9_kB0_lA1_zB2_xA3_cB4_vA5_bB6_nA7_mB8_qA9_wB0_eA1_rB2_tA3_yB4_uA5_iB6_oA7_pB8_aA9_sB0_dA1_fB2_gA3_hB4_jA5_kB6_lA7_zB8_xA9_cB0_vA1_bB2_nA3_mB4_qA5_wB6_eA7_rB8_tA9_yB0_uA1_iB2_oA3_pB4_aA5_sB6_dA7_fB8_gA9_hB0_jA1_kB2_lA3_zB4_xA5_", + type = "TEXT" + } + }, + vrHelp = + { + { + position = 1, + image = + { + value = "action.png", + imageType = "DYNAMIC" + }, + text = "VR help item" + } + }, + menuIcon = + { + value = "action.png", + imageType = "DYNAMIC" + }, + helpPrompt = + { + { + text = "Help prompt", + type = "TEXT" + } + }, + vrHelpTitle = "VR help title", + keyboardProperties = + { + keyboardLayout = "QWERTY", + keypressMode = "SINGLE_KEYPRESS", + limitedCharacterList = + { + "a" + }, + language = "EN-US", + autoCompleteText = "Daemon, Freedom" + } + }) + + + --hmi side: expect TTS.SetGlobalProperties request + EXPECT_HMICALL("TTS.SetGlobalProperties", + { + timeoutPrompt = + { + { + text = "qA1_wB2_eA3_rB4_tA5_yB6_uA7_iB8_oA9_pB0_aA1_sB2_dA3_fB4_gA5_hB6_jA7_kB8_lA9_zB0_xA1_cB2_vA3_bB4_nA5_mB6_qA7_wB8_eA9_rB0_tA1_yB2_uA3_iB4_oA5_pB6_aA7_sB8_dA9_fB0_gA1_hB2_jA3_kB4_lA5_zB6_xA7_cB8_vA9_bB0_nA1_mB2_qA3_wB4_eA5_rB6_tA7_yB8_uA9_iB0_oA1_pB2_aA3_sB4_dA5_fB6_gA7_hB8_jA9_kB0_lA1_zB2_xA3_cB4_vA5_bB6_nA7_mB8_qA9_wB0_eA1_rB2_tA3_yB4_uA5_iB6_oA7_pB8_aA9_sB0_dA1_fB2_gA3_hB4_jA5_kB6_lA7_zB8_xA9_cB0_vA1_bB2_nA3_mB4_qA5_wB6_eA7_rB8_tA9_yB0_uA1_iB2_oA3_pB4_aA5_sB6_dA7_fB8_gA9_hB0_jA1_kB2_lA3_zB4_xA5_", + type = "TEXT" + } + }, + helpPrompt = + { + { + text = "Help prompt", + type = "TEXT" + } + } + }) + :Timeout(iTimeout) + :Do(function(_,data) + --hmi side: sending UI.SetGlobalProperties response + self.hmiConnection:SendResponse(data.id, data.method, "SUCCESS", {}) + end) + + + + --hmi side: expect UI.SetGlobalProperties request + EXPECT_HMICALL("UI.SetGlobalProperties", + { + menuTitle = "Menu Title", + vrHelp = + { + { + position = 1, + --[=[ TODO: update after resolving APPLINK-16052 + + image = + { + imageType = "DYNAMIC", + value = strAppFolder .. "action.png" + },]=] + text = "VR help item" + } + }, + --Checked below + -- menuIcon = + -- { + -- imageType = "DYNAMIC", + -- value = strAppFolder .. "action.png" + -- }, + vrHelpTitle = "VR help title", + keyboardProperties = + { + keyboardLayout = "QWERTY", + keypressMode = "SINGLE_KEYPRESS", + --[=[ TODO: update after resolving APPLINK-16047 + + limitedCharacterList = + { + "a" + },]=] + language = "EN-US", + autoCompleteText = "Daemon, Freedom" + } + }) + :Timeout(iTimeout) + :ValidIf(function(_,data) + return Check_menuIconParams(data) + end) + :Do(function(_,data) + --hmi side: sending UI.SetGlobalProperties response + self.hmiConnection:SendResponse(data.id, data.method, "SUCCESS", {}) + end) + + + + --mobile side: expect SetGlobalProperties response + EXPECT_RESPONSE(cid, { success = true, resultCode = "SUCCESS"}) + :Timeout(iTimeout) + + --mobile side: expect OnHashChange notification + EXPECT_NOTIFICATION("OnHashChange") + end + + --End test case PositiveResponseCheck.1.22 + ----------------------------------------------------------------------------------------- + + --Begin test case PositiveResponseCheck.1.23 + --Description: Check timeoutPrompt: text parameter contains space characters _SpaceCharacter_SpaceBefore + + function Test:SetGlobalProperties_timeoutPrompt_text__SpaceCharacter_SpaceBefore_SUCCESS() + + --mobile side: sending SetGlobalProperties request + local cid = self.mobileSession:SendRPC("SetGlobalProperties", + { + menuTitle = "Menu Title", + timeoutPrompt = + { + { + text = " SpaceBefore", + type = "TEXT" + } + }, + vrHelp = + { + { + position = 1, + image = + { + value = "action.png", + imageType = "DYNAMIC" + }, + text = "VR help item" + } + }, + menuIcon = + { + value = "action.png", + imageType = "DYNAMIC" + }, + helpPrompt = + { + { + text = "Help prompt", + type = "TEXT" + } + }, + vrHelpTitle = "VR help title", + keyboardProperties = + { + keyboardLayout = "QWERTY", + keypressMode = "SINGLE_KEYPRESS", + limitedCharacterList = + { + "a" + }, + language = "EN-US", + autoCompleteText = "Daemon, Freedom" + } + }) + + + --hmi side: expect TTS.SetGlobalProperties request + EXPECT_HMICALL("TTS.SetGlobalProperties", + { + timeoutPrompt = + { + { + text = " SpaceBefore", + type = "TEXT" + } + }, + helpPrompt = + { + { + text = "Help prompt", + type = "TEXT" + } + } + }) + :Timeout(iTimeout) + :Do(function(_,data) + --hmi side: sending UI.SetGlobalProperties response + self.hmiConnection:SendResponse(data.id, data.method, "SUCCESS", {}) + end) + + + + --hmi side: expect UI.SetGlobalProperties request + EXPECT_HMICALL("UI.SetGlobalProperties", + { + menuTitle = "Menu Title", + vrHelp = + { + { + position = 1, + --[=[ TODO: update after resolving APPLINK-16052 + + image = + { + imageType = "DYNAMIC", + value = strAppFolder .. "action.png" + },]=] + text = "VR help item" + } + }, + --Checked below + -- menuIcon = + -- { + -- imageType = "DYNAMIC", + -- value = strAppFolder .. "action.png" + -- }, + vrHelpTitle = "VR help title", + keyboardProperties = + { + keyboardLayout = "QWERTY", + keypressMode = "SINGLE_KEYPRESS", + --[=[ TODO: update after resolving APPLINK-16047 + + limitedCharacterList = + { + "a" + },]=] + language = "EN-US", + autoCompleteText = "Daemon, Freedom" + } + }) + :Timeout(iTimeout) + :ValidIf(function(_,data) + return Check_menuIconParams(data) + end) + :Do(function(_,data) + --hmi side: sending UI.SetGlobalProperties response + self.hmiConnection:SendResponse(data.id, data.method, "SUCCESS", {}) + end) + + + + --mobile side: expect SetGlobalProperties response + EXPECT_RESPONSE(cid, { success = true, resultCode = "SUCCESS"}) + :Timeout(iTimeout) + + --mobile side: expect OnHashChange notification + EXPECT_NOTIFICATION("OnHashChange") + end + + --End test case PositiveResponseCheck.1.23 + ----------------------------------------------------------------------------------------- + + --Begin test case PositiveResponseCheck.1.24 + --Description: Check timeoutPrompt: text parameter contains space characters SpaceAfter_SpaceCharacter_ + + function Test:SetGlobalProperties_timeoutPrompt_text_SpaceAfter_SpaceCharacter__SUCCESS() + + --mobile side: sending SetGlobalProperties request + local cid = self.mobileSession:SendRPC("SetGlobalProperties", + { + menuTitle = "Menu Title", + timeoutPrompt = + { + { + text = "SpaceAfter ", + type = "TEXT" + } + }, + vrHelp = + { + { + position = 1, + image = + { + value = "action.png", + imageType = "DYNAMIC" + }, + text = "VR help item" + } + }, + menuIcon = + { + value = "action.png", + imageType = "DYNAMIC" + }, + helpPrompt = + { + { + text = "Help prompt", + type = "TEXT" + } + }, + vrHelpTitle = "VR help title", + keyboardProperties = + { + keyboardLayout = "QWERTY", + keypressMode = "SINGLE_KEYPRESS", + limitedCharacterList = + { + "a" + }, + language = "EN-US", + autoCompleteText = "Daemon, Freedom" + } + }) + + + --hmi side: expect TTS.SetGlobalProperties request + EXPECT_HMICALL("TTS.SetGlobalProperties", + { + timeoutPrompt = + { + { + text = "SpaceAfter ", + type = "TEXT" + } + }, + helpPrompt = + { + { + text = "Help prompt", + type = "TEXT" + } + } + }) + :Timeout(iTimeout) + :Do(function(_,data) + --hmi side: sending UI.SetGlobalProperties response + self.hmiConnection:SendResponse(data.id, data.method, "SUCCESS", {}) + end) + + + + --hmi side: expect UI.SetGlobalProperties request + EXPECT_HMICALL("UI.SetGlobalProperties", + { + menuTitle = "Menu Title", + vrHelp = + { + { + position = 1, + --[=[ TODO: update after resolving APPLINK-16052 + + image = + { + imageType = "DYNAMIC", + value = strAppFolder .. "action.png" + },]=] + text = "VR help item" + } + }, + --Checked below + -- menuIcon = + -- { + -- imageType = "DYNAMIC", + -- value = strAppFolder .. "action.png" + -- }, + vrHelpTitle = "VR help title", + keyboardProperties = + { + keyboardLayout = "QWERTY", + keypressMode = "SINGLE_KEYPRESS", + --[=[ TODO: update after resolving APPLINK-16047 + + limitedCharacterList = + { + "a" + },]=] + language = "EN-US", + autoCompleteText = "Daemon, Freedom" + } + }) + :Timeout(iTimeout) + :ValidIf(function(_,data) + return Check_menuIconParams(data) + end) + :Do(function(_,data) + --hmi side: sending UI.SetGlobalProperties response + self.hmiConnection:SendResponse(data.id, data.method, "SUCCESS", {}) + end) + + + + --mobile side: expect SetGlobalProperties response + EXPECT_RESPONSE(cid, { success = true, resultCode = "SUCCESS"}) + :Timeout(iTimeout) + + --mobile side: expect OnHashChange notification + EXPECT_NOTIFICATION("OnHashChange") + end + + --End test case PositiveResponseCheck.1.24 + ----------------------------------------------------------------------------------------- + + --Begin test case PositiveResponseCheck.1.25 + --Description: Check timeoutPrompt: text parameter contains space characters Space_SpaceCharacter_In_SpaceCharacter_The_SpaceCharacter_Middle + + function Test:SetGlobalProperties_timeoutPrompt_text_Space_SpaceCharacter_In_SpaceCharacter_The_SpaceCharacter_Middle_SUCCESS() + + --mobile side: sending SetGlobalProperties request + local cid = self.mobileSession:SendRPC("SetGlobalProperties", + { + menuTitle = "Menu Title", + timeoutPrompt = + { + { + text = "Space In The Middle", + type = "TEXT" + } + }, + vrHelp = + { + { + position = 1, + image = + { + value = "action.png", + imageType = "DYNAMIC" + }, + text = "VR help item" + } + }, + menuIcon = + { + value = "action.png", + imageType = "DYNAMIC" + }, + helpPrompt = + { + { + text = "Help prompt", + type = "TEXT" + } + }, + vrHelpTitle = "VR help title", + keyboardProperties = + { + keyboardLayout = "QWERTY", + keypressMode = "SINGLE_KEYPRESS", + limitedCharacterList = + { + "a" + }, + language = "EN-US", + autoCompleteText = "Daemon, Freedom" + } + }) + + + --hmi side: expect TTS.SetGlobalProperties request + EXPECT_HMICALL("TTS.SetGlobalProperties", + { + timeoutPrompt = + { + { + text = "Space In The Middle", + type = "TEXT" + } + }, + helpPrompt = + { + { + text = "Help prompt", + type = "TEXT" + } + } + }) + :Timeout(iTimeout) + :Do(function(_,data) + --hmi side: sending UI.SetGlobalProperties response + self.hmiConnection:SendResponse(data.id, data.method, "SUCCESS", {}) + end) + + + + --hmi side: expect UI.SetGlobalProperties request + EXPECT_HMICALL("UI.SetGlobalProperties", + { + menuTitle = "Menu Title", + vrHelp = + { + { + position = 1, + --[=[ TODO: update after resolving APPLINK-16052 + + image = + { + imageType = "DYNAMIC", + value = strAppFolder .. "action.png" + },]=] + text = "VR help item" + } + }, + --Checked below + -- menuIcon = + -- { + -- imageType = "DYNAMIC", + -- value = strAppFolder .. "action.png" + -- }, + vrHelpTitle = "VR help title", + keyboardProperties = + { + keyboardLayout = "QWERTY", + keypressMode = "SINGLE_KEYPRESS", + --[=[ TODO: update after resolving APPLINK-16047 + + limitedCharacterList = + { + "a" + },]=] + language = "EN-US", + autoCompleteText = "Daemon, Freedom" + } + }) + :Timeout(iTimeout) + :ValidIf(function(_,data) + return Check_menuIconParams(data) + end) + :Do(function(_,data) + --hmi side: sending UI.SetGlobalProperties response + self.hmiConnection:SendResponse(data.id, data.method, "SUCCESS", {}) + end) + + + + --mobile side: expect SetGlobalProperties response + EXPECT_RESPONSE(cid, { success = true, resultCode = "SUCCESS"}) + :Timeout(iTimeout) + + --mobile side: expect OnHashChange notification + EXPECT_NOTIFICATION("OnHashChange") + end + + --End test case PositiveResponseCheck.1.25 + ----------------------------------------------------------------------------------------- + + --Begin test case PositiveResponseCheck.1.26 + --Description: Check timeoutPrompt: text parameter contains space characters _SpaceCharacter_Space_SpaceCharacter_Every_SpaceCharacter_Where_SpaceCharacter_ + + function Test:SetGlobalProperties_timeoutPrompt_text__SpaceCharacter_Space_SpaceCharacter_Every_SpaceCharacter_Where_SpaceCharacter__SUCCESS() + + --mobile side: sending SetGlobalProperties request + local cid = self.mobileSession:SendRPC("SetGlobalProperties", + { + menuTitle = "Menu Title", + timeoutPrompt = + { + { + text = " Space Every Where ", + type = "TEXT" + } + }, + vrHelp = + { + { + position = 1, + image = + { + value = "action.png", + imageType = "DYNAMIC" + }, + text = "VR help item" + } + }, + menuIcon = + { + value = "action.png", + imageType = "DYNAMIC" + }, + helpPrompt = + { + { + text = "Help prompt", + type = "TEXT" + } + }, + vrHelpTitle = "VR help title", + keyboardProperties = + { + keyboardLayout = "QWERTY", + keypressMode = "SINGLE_KEYPRESS", + limitedCharacterList = + { + "a" + }, + language = "EN-US", + autoCompleteText = "Daemon, Freedom" + } + }) + + + --hmi side: expect TTS.SetGlobalProperties request + EXPECT_HMICALL("TTS.SetGlobalProperties", + { + timeoutPrompt = + { + { + text = " Space Every Where ", + type = "TEXT" + } + }, + helpPrompt = + { + { + text = "Help prompt", + type = "TEXT" + } + } + }) + :Timeout(iTimeout) + :Do(function(_,data) + --hmi side: sending UI.SetGlobalProperties response + self.hmiConnection:SendResponse(data.id, data.method, "SUCCESS", {}) + end) + + + + --hmi side: expect UI.SetGlobalProperties request + EXPECT_HMICALL("UI.SetGlobalProperties", + { + menuTitle = "Menu Title", + vrHelp = + { + { + position = 1, + --[=[ TODO: update after resolving APPLINK-16052 + + image = + { + imageType = "DYNAMIC", + value = strAppFolder .. "action.png" + },]=] + text = "VR help item" + } + }, + --checked below + -- menuIcon = + -- { + -- imageType = "DYNAMIC", + -- value = strAppFolder .. "action.png" + -- }, + vrHelpTitle = "VR help title", + keyboardProperties = + { + keyboardLayout = "QWERTY", + keypressMode = "SINGLE_KEYPRESS", + --[=[ TODO: update after resolving APPLINK-16047 + + limitedCharacterList = + { + "a" + },]=] + language = "EN-US", + autoCompleteText = "Daemon, Freedom" + } + }) + :Timeout(iTimeout) + :ValidIf(function(_,data) + return Check_menuIconParams(data) + end) + :Do(function(_,data) + --hmi side: sending UI.SetGlobalProperties response + self.hmiConnection:SendResponse(data.id, data.method, "SUCCESS", {}) + end) + + + + --mobile side: expect SetGlobalProperties response + EXPECT_RESPONSE(cid, { success = true, resultCode = "SUCCESS"}) + :Timeout(iTimeout) + + --mobile side: expect OnHashChange notification + EXPECT_NOTIFICATION("OnHashChange") + end + + --End test case PositiveResponseCheck.1.26 + ----------------------------------------------------------------------------------------- + + --Begin test case PositiveResponseCheck.1.27 + --Description: Check vrHelpTitle parameter is lower bound + + function Test:SetGlobalProperties_vrHelpTitle_IsLowerBound_1_SUCCESS() + + --mobile side: sending SetGlobalProperties request + local cid = self.mobileSession:SendRPC("SetGlobalProperties", + { + menuTitle = "Menu Title", + timeoutPrompt = + { + { + text = "Timeout prompt", + type = "TEXT" + } + }, + vrHelp = + { + { + position = 1, + image = + { + value = "action.png", + imageType = "DYNAMIC" + }, + text = "VR help item" + } + }, + menuIcon = + { + value = "action.png", + imageType = "DYNAMIC" + }, + helpPrompt = + { + { + text = "Help prompt", + type = "TEXT" + } + }, + vrHelpTitle = "q", + keyboardProperties = + { + keyboardLayout = "QWERTY", + keypressMode = "SINGLE_KEYPRESS", + limitedCharacterList = + { + "a" + }, + language = "EN-US", + autoCompleteText = "Daemon, Freedom" + } + }) + + + --hmi side: expect TTS.SetGlobalProperties request + EXPECT_HMICALL("TTS.SetGlobalProperties", + { + timeoutPrompt = + { + { + text = "Timeout prompt", + type = "TEXT" + } + }, + helpPrompt = + { + { + text = "Help prompt", + type = "TEXT" + } + } + }) + :Timeout(iTimeout) + :Do(function(_,data) + --hmi side: sending UI.SetGlobalProperties response + self.hmiConnection:SendResponse(data.id, data.method, "SUCCESS", {}) + end) + + + + --hmi side: expect UI.SetGlobalProperties request + EXPECT_HMICALL("UI.SetGlobalProperties", + { + menuTitle = "Menu Title", + vrHelp = + { + { + position = 1, + --[=[ TODO: update after resolving APPLINK-16052 + + image = + { + imageType = "DYNAMIC", + value = strAppFolder .. "action.png" + },]=] + text = "VR help item" + } + }, + --Checked below + -- menuIcon = + -- { + -- imageType = "DYNAMIC", + -- value = strAppFolder .. "action.png" + -- }, + vrHelpTitle = "q", + keyboardProperties = + { + keyboardLayout = "QWERTY", + keypressMode = "SINGLE_KEYPRESS", + --[=[ TODO: update after resolving APPLINK-16047 + + limitedCharacterList = + { + "a" + },]=] + language = "EN-US", + autoCompleteText = "Daemon, Freedom" + } + }) + :Timeout(iTimeout) + :ValidIf(function(_,data) + return Check_menuIconParams(data) + end) + :Do(function(_,data) + --hmi side: sending UI.SetGlobalProperties response + self.hmiConnection:SendResponse(data.id, data.method, "SUCCESS", {}) + end) + + + + --mobile side: expect SetGlobalProperties response + EXPECT_RESPONSE(cid, { success = true, resultCode = "SUCCESS"}) + :Timeout(iTimeout) + + --mobile side: expect OnHashChange notification + EXPECT_NOTIFICATION("OnHashChange") + end + + --End test case PositiveResponseCheck.1.27 + ----------------------------------------------------------------------------------------- + + --Begin test case PositiveResponseCheck.1.28 + --Description: Check vrHelpTitle parameter is upper bound + + function Test:SetGlobalProperties_vrHelpTitle_IsUpperBound_500_SUCCESS() + + --mobile side: sending SetGlobalProperties request + local cid = self.mobileSession:SendRPC("SetGlobalProperties", + { + menuTitle = "Menu Title", + timeoutPrompt = + { + { + text = "Timeout prompt", + type = "TEXT" + } + }, + vrHelp = + { + { + position = 1, + image = + { + value = "action.png", + imageType = "DYNAMIC" + }, + text = "VR help item" + } + }, + menuIcon = + { + value = "action.png", + imageType = "DYNAMIC" + }, + helpPrompt = + { + { + text = "Help prompt", + type = "TEXT" + } + }, + vrHelpTitle = "qA1_wB2_eA3_rB4_tA5_yB6_uA7_iB8_oA9_pB0_aA1_sB2_dA3_fB4_gA5_hB6_jA7_kB8_lA9_zB0_xA1_cB2_vA3_bB4_nA5_mB6_qA7_wB8_eA9_rB0_tA1_yB2_uA3_iB4_oA5_pB6_aA7_sB8_dA9_fB0_gA1_hB2_jA3_kB4_lA5_zB6_xA7_cB8_vA9_bB0_nA1_mB2_qA3_wB4_eA5_rB6_tA7_yB8_uA9_iB0_oA1_pB2_aA3_sB4_dA5_fB6_gA7_hB8_jA9_kB0_lA1_zB2_xA3_cB4_vA5_bB6_nA7_mB8_qA9_wB0_eA1_rB2_tA3_yB4_uA5_iB6_oA7_pB8_aA9_sB0_dA1_fB2_gA3_hB4_jA5_kB6_lA7_zB8_xA9_cB0_vA1_bB2_nA3_mB4_qA5_wB6_eA7_rB8_tA9_yB0_uA1_iB2_oA3_pB4_aA5_sB6_dA7_fB8_gA9_hB0_jA1_kB2_lA3_zB4_xA5_", + keyboardProperties = + { + keyboardLayout = "QWERTY", + keypressMode = "SINGLE_KEYPRESS", + limitedCharacterList = + { + "a" + }, + language = "EN-US", + autoCompleteText = "Daemon, Freedom" + } + }) + + + --hmi side: expect TTS.SetGlobalProperties request + EXPECT_HMICALL("TTS.SetGlobalProperties", + { + timeoutPrompt = + { + { + text = "Timeout prompt", + type = "TEXT" + } + }, + helpPrompt = + { + { + text = "Help prompt", + type = "TEXT" + } + } + }) + :Timeout(iTimeout) + :Do(function(_,data) + --hmi side: sending UI.SetGlobalProperties response + self.hmiConnection:SendResponse(data.id, data.method, "SUCCESS", {}) + end) + + + + --hmi side: expect UI.SetGlobalProperties request + EXPECT_HMICALL("UI.SetGlobalProperties", + { + menuTitle = "Menu Title", + vrHelp = + { + { + position = 1, + --[=[ TODO: update after resolving APPLINK-16052 + + image = + { + imageType = "DYNAMIC", + value = strAppFolder .. "action.png" + },]=] + text = "VR help item" + } + }, + --Checked below + -- menuIcon = + -- { + -- imageType = "DYNAMIC", + -- value = strAppFolder .. "action.png" + -- }, + vrHelpTitle = "qA1_wB2_eA3_rB4_tA5_yB6_uA7_iB8_oA9_pB0_aA1_sB2_dA3_fB4_gA5_hB6_jA7_kB8_lA9_zB0_xA1_cB2_vA3_bB4_nA5_mB6_qA7_wB8_eA9_rB0_tA1_yB2_uA3_iB4_oA5_pB6_aA7_sB8_dA9_fB0_gA1_hB2_jA3_kB4_lA5_zB6_xA7_cB8_vA9_bB0_nA1_mB2_qA3_wB4_eA5_rB6_tA7_yB8_uA9_iB0_oA1_pB2_aA3_sB4_dA5_fB6_gA7_hB8_jA9_kB0_lA1_zB2_xA3_cB4_vA5_bB6_nA7_mB8_qA9_wB0_eA1_rB2_tA3_yB4_uA5_iB6_oA7_pB8_aA9_sB0_dA1_fB2_gA3_hB4_jA5_kB6_lA7_zB8_xA9_cB0_vA1_bB2_nA3_mB4_qA5_wB6_eA7_rB8_tA9_yB0_uA1_iB2_oA3_pB4_aA5_sB6_dA7_fB8_gA9_hB0_jA1_kB2_lA3_zB4_xA5_", + keyboardProperties = + { + keyboardLayout = "QWERTY", + keypressMode = "SINGLE_KEYPRESS", + --[=[ TODO: update after resolving APPLINK-16047 + + limitedCharacterList = + { + "a" + },]=] + language = "EN-US", + autoCompleteText = "Daemon, Freedom" + } + }) + :Timeout(iTimeout) + :ValidIf(function(_,data) + return Check_menuIconParams(data) + end) + :Do(function(_,data) + --hmi side: sending UI.SetGlobalProperties response + self.hmiConnection:SendResponse(data.id, data.method, "SUCCESS", {}) + end) + + + + --mobile side: expect SetGlobalProperties response + EXPECT_RESPONSE(cid, { success = true, resultCode = "SUCCESS"}) + :Timeout(iTimeout) + + --mobile side: expect OnHashChange notification + EXPECT_NOTIFICATION("OnHashChange") + end + + --End test case PositiveResponseCheck.1.28 + ----------------------------------------------------------------------------------------- + + --Begin test case PositiveResponseCheck.1.29 + --Description: Check vrHelpTitle parameter contains space characters _SpaceCharacter_SpaceBefore + + function Test:SetGlobalProperties_vrHelpTitle__SpaceCharacter_SpaceBefore_SUCCESS() + + --mobile side: sending SetGlobalProperties request + local cid = self.mobileSession:SendRPC("SetGlobalProperties", + { + menuTitle = "Menu Title", + timeoutPrompt = + { + { + text = "Timeout prompt", + type = "TEXT" + } + }, + vrHelp = + { + { + position = 1, + image = + { + value = "action.png", + imageType = "DYNAMIC" + }, + text = "VR help item" + } + }, + menuIcon = + { + value = "action.png", + imageType = "DYNAMIC" + }, + helpPrompt = + { + { + text = "Help prompt", + type = "TEXT" + } + }, + vrHelpTitle = " SpaceBefore", + keyboardProperties = + { + keyboardLayout = "QWERTY", + keypressMode = "SINGLE_KEYPRESS", + limitedCharacterList = + { + "a" + }, + language = "EN-US", + autoCompleteText = "Daemon, Freedom" + } + }) + + + --hmi side: expect TTS.SetGlobalProperties request + EXPECT_HMICALL("TTS.SetGlobalProperties", + { + timeoutPrompt = + { + { + text = "Timeout prompt", + type = "TEXT" + } + }, + helpPrompt = + { + { + text = "Help prompt", + type = "TEXT" + } + } + }) + :Timeout(iTimeout) + :Do(function(_,data) + --hmi side: sending UI.SetGlobalProperties response + self.hmiConnection:SendResponse(data.id, data.method, "SUCCESS", {}) + end) + + + + --hmi side: expect UI.SetGlobalProperties request + EXPECT_HMICALL("UI.SetGlobalProperties", + { + menuTitle = "Menu Title", + vrHelp = + { + { + position = 1, + --[=[ TODO: update after resolving APPLINK-16052 + + image = + { + imageType = "DYNAMIC", + value = strAppFolder .. "action.png" + },]=] + text = "VR help item" + } + }, + --Checked below + -- menuIcon = + -- { + -- imageType = "DYNAMIC", + -- value = strAppFolder .. "action.png" + -- }, + vrHelpTitle = " SpaceBefore", + keyboardProperties = + { + keyboardLayout = "QWERTY", + keypressMode = "SINGLE_KEYPRESS", + --[=[ TODO: update after resolving APPLINK-16047 + + limitedCharacterList = + { + "a" + },]=] + language = "EN-US", + autoCompleteText = "Daemon, Freedom" + } + }) + :Timeout(iTimeout) + :ValidIf(function(_,data) + return Check_menuIconParams(data) + end) + :Do(function(_,data) + --hmi side: sending UI.SetGlobalProperties response + self.hmiConnection:SendResponse(data.id, data.method, "SUCCESS", {}) + end) + + + + --mobile side: expect SetGlobalProperties response + EXPECT_RESPONSE(cid, { success = true, resultCode = "SUCCESS"}) + :Timeout(iTimeout) + + --mobile side: expect OnHashChange notification + EXPECT_NOTIFICATION("OnHashChange") + end + + --End test case PositiveResponseCheck.1.29 + ----------------------------------------------------------------------------------------- + + --Begin test case PositiveResponseCheck.1.30 + --Description: Check vrHelpTitle parameter contains space characters SpaceAfter_SpaceCharacter_ + + function Test:SetGlobalProperties_vrHelpTitle_SpaceAfter_SpaceCharacter__SUCCESS() + + --mobile side: sending SetGlobalProperties request + local cid = self.mobileSession:SendRPC("SetGlobalProperties", + { + menuTitle = "Menu Title", + timeoutPrompt = + { + { + text = "Timeout prompt", + type = "TEXT" + } + }, + vrHelp = + { + { + position = 1, + image = + { + value = "action.png", + imageType = "DYNAMIC" + }, + text = "VR help item" + } + }, + menuIcon = + { + value = "action.png", + imageType = "DYNAMIC" + }, + helpPrompt = + { + { + text = "Help prompt", + type = "TEXT" + } + }, + vrHelpTitle = "SpaceAfter ", + keyboardProperties = + { + keyboardLayout = "QWERTY", + keypressMode = "SINGLE_KEYPRESS", + limitedCharacterList = + { + "a" + }, + language = "EN-US", + autoCompleteText = "Daemon, Freedom" + } + }) + + + --hmi side: expect TTS.SetGlobalProperties request + EXPECT_HMICALL("TTS.SetGlobalProperties", + { + timeoutPrompt = + { + { + text = "Timeout prompt", + type = "TEXT" + } + }, + helpPrompt = + { + { + text = "Help prompt", + type = "TEXT" + } + } + }) + :Timeout(iTimeout) + :Do(function(_,data) + --hmi side: sending UI.SetGlobalProperties response + self.hmiConnection:SendResponse(data.id, data.method, "SUCCESS", {}) + end) + + + + --hmi side: expect UI.SetGlobalProperties request + EXPECT_HMICALL("UI.SetGlobalProperties", + { + menuTitle = "Menu Title", + vrHelp = + { + { + position = 1, + --[=[ TODO: update after resolving APPLINK-16052 + + image = + { + imageType = "DYNAMIC", + value = strAppFolder .. "action.png" + },]=] + text = "VR help item" + } + }, + --Checked below + -- menuIcon = + -- { + -- imageType = "DYNAMIC", + -- value = strAppFolder .. "action.png" + -- }, + vrHelpTitle = "SpaceAfter ", + keyboardProperties = + { + keyboardLayout = "QWERTY", + keypressMode = "SINGLE_KEYPRESS", + --[=[ TODO: update after resolving APPLINK-16047 + + limitedCharacterList = + { + "a" + },]=] + language = "EN-US", + autoCompleteText = "Daemon, Freedom" + } + }) + :Timeout(iTimeout) + :ValidIf(function(_,data) + return Check_menuIconParams(data) + end) + :Do(function(_,data) + --hmi side: sending UI.SetGlobalProperties response + self.hmiConnection:SendResponse(data.id, data.method, "SUCCESS", {}) + end) + + + + --mobile side: expect SetGlobalProperties response + EXPECT_RESPONSE(cid, { success = true, resultCode = "SUCCESS"}) + :Timeout(iTimeout) + + --mobile side: expect OnHashChange notification + EXPECT_NOTIFICATION("OnHashChange") + end + + --End test case PositiveResponseCheck.1.30 + ----------------------------------------------------------------------------------------- + + --Begin test case PositiveResponseCheck.1.31 + --Description: Check vrHelpTitle parameter contains space characters Space_SpaceCharacter_In_SpaceCharacter_The_SpaceCharacter_Middle + + function Test:SetGlobalProperties_vrHelpTitle_Space_SpaceCharacter_In_SpaceCharacter_The_SpaceCharacter_Middle_SUCCESS() + + --mobile side: sending SetGlobalProperties request + local cid = self.mobileSession:SendRPC("SetGlobalProperties", + { + menuTitle = "Menu Title", + timeoutPrompt = + { + { + text = "Timeout prompt", + type = "TEXT" + } + }, + vrHelp = + { + { + position = 1, + image = + { + value = "action.png", + imageType = "DYNAMIC" + }, + text = "VR help item" + } + }, + menuIcon = + { + value = "action.png", + imageType = "DYNAMIC" + }, + helpPrompt = + { + { + text = "Help prompt", + type = "TEXT" + } + }, + vrHelpTitle = "Space In The Middle", + keyboardProperties = + { + keyboardLayout = "QWERTY", + keypressMode = "SINGLE_KEYPRESS", + limitedCharacterList = + { + "a" + }, + language = "EN-US", + autoCompleteText = "Daemon, Freedom" + } + }) + + + --hmi side: expect TTS.SetGlobalProperties request + EXPECT_HMICALL("TTS.SetGlobalProperties", + { + timeoutPrompt = + { + { + text = "Timeout prompt", + type = "TEXT" + } + }, + helpPrompt = + { + { + text = "Help prompt", + type = "TEXT" + } + } + }) + :Timeout(iTimeout) + :Do(function(_,data) + --hmi side: sending UI.SetGlobalProperties response + self.hmiConnection:SendResponse(data.id, data.method, "SUCCESS", {}) + end) + + + + --hmi side: expect UI.SetGlobalProperties request + EXPECT_HMICALL("UI.SetGlobalProperties", + { + menuTitle = "Menu Title", + vrHelp = + { + { + position = 1, + --[=[ TODO: update after resolving APPLINK-16052 + + image = + { + imageType = "DYNAMIC", + value = strAppFolder .. "action.png" + },]=] + text = "VR help item" + } + }, + --Checked below + -- menuIcon = + -- { + -- imageType = "DYNAMIC", + -- value = strAppFolder .. "action.png" + -- }, + vrHelpTitle = "Space In The Middle", + keyboardProperties = + { + keyboardLayout = "QWERTY", + keypressMode = "SINGLE_KEYPRESS", + --[=[ TODO: update after resolving APPLINK-16047 + + limitedCharacterList = + { + "a" + },]=] + language = "EN-US", + autoCompleteText = "Daemon, Freedom" + } + }) + :Timeout(iTimeout) + :ValidIf(function(_,data) + return Check_menuIconParams(data) + end) + :Do(function(_,data) + --hmi side: sending UI.SetGlobalProperties response + self.hmiConnection:SendResponse(data.id, data.method, "SUCCESS", {}) + end) + + + + --mobile side: expect SetGlobalProperties response + EXPECT_RESPONSE(cid, { success = true, resultCode = "SUCCESS"}) + :Timeout(iTimeout) + + --mobile side: expect OnHashChange notification + EXPECT_NOTIFICATION("OnHashChange") + end + + --End test case PositiveResponseCheck.1.31 + ----------------------------------------------------------------------------------------- + + --Begin test case PositiveResponseCheck.1.32 + --Description: Check vrHelpTitle parameter contains space characters _SpaceCharacter_Space_SpaceCharacter_Every_SpaceCharacter_Where_SpaceCharacter_ + + function Test:SetGlobalProperties_vrHelpTitle__SpaceCharacter_Space_SpaceCharacter_Every_SpaceCharacter_Where_SpaceCharacter__SUCCESS() + + --mobile side: sending SetGlobalProperties request + local cid = self.mobileSession:SendRPC("SetGlobalProperties", + { + menuTitle = "Menu Title", + timeoutPrompt = + { + { + text = "Timeout prompt", + type = "TEXT" + } + }, + vrHelp = + { + { + position = 1, + image = + { + value = "action.png", + imageType = "DYNAMIC" + }, + text = "VR help item" + } + }, + menuIcon = + { + value = "action.png", + imageType = "DYNAMIC" + }, + helpPrompt = + { + { + text = "Help prompt", + type = "TEXT" + } + }, + vrHelpTitle = " Space Every Where ", + keyboardProperties = + { + keyboardLayout = "QWERTY", + keypressMode = "SINGLE_KEYPRESS", + limitedCharacterList = + { + "a" + }, + language = "EN-US", + autoCompleteText = "Daemon, Freedom" + } + }) + + + --hmi side: expect TTS.SetGlobalProperties request + EXPECT_HMICALL("TTS.SetGlobalProperties", + { + timeoutPrompt = + { + { + text = "Timeout prompt", + type = "TEXT" + } + }, + helpPrompt = + { + { + text = "Help prompt", + type = "TEXT" + } + } + }) + :Timeout(iTimeout) + :Do(function(_,data) + --hmi side: sending UI.SetGlobalProperties response + self.hmiConnection:SendResponse(data.id, data.method, "SUCCESS", {}) + end) + + + + --hmi side: expect UI.SetGlobalProperties request + EXPECT_HMICALL("UI.SetGlobalProperties", + { + menuTitle = "Menu Title", + vrHelp = + { + { + position = 1, + --[=[ TODO: update after resolving APPLINK-16052 + + image = + { + imageType = "DYNAMIC", + value = strAppFolder .. "action.png" + },]=] + text = "VR help item" + } + }, + --Checked below + -- menuIcon = + -- { + -- imageType = "DYNAMIC", + -- value = strAppFolder .. "action.png" + -- }, + vrHelpTitle = " Space Every Where ", + keyboardProperties = + { + keyboardLayout = "QWERTY", + keypressMode = "SINGLE_KEYPRESS", + --[=[ TODO: update after resolving APPLINK-16047 + + limitedCharacterList = + { + "a" + },]=] + language = "EN-US", + autoCompleteText = "Daemon, Freedom" + } + }) + :Timeout(iTimeout) + :ValidIf(function(_,data) + return Check_menuIconParams(data) + end) + :Do(function(_,data) + --hmi side: sending UI.SetGlobalProperties response + self.hmiConnection:SendResponse(data.id, data.method, "SUCCESS", {}) + end) + + + + --mobile side: expect SetGlobalProperties response + EXPECT_RESPONSE(cid, { success = true, resultCode = "SUCCESS"}) + :Timeout(iTimeout) + + --mobile side: expect OnHashChange notification + EXPECT_NOTIFICATION("OnHashChange") + end + + --End test case PositiveResponseCheck.1.32 + ----------------------------------------------------------------------------------------- + + --Begin test case PositiveResponseCheck.1.33 + --Description: Check vrHelp parameter is lower bound + + function Test:SetGlobalProperties_vrHelp_Array_minsize_1_SUCCESS() + + --mobile side: sending SetGlobalProperties request + local cid = self.mobileSession:SendRPC("SetGlobalProperties", + { + menuTitle = "Menu Title", + timeoutPrompt = + { + { + text = "Timeout prompt", + type = "TEXT" + } + }, + vrHelp = + { + { + position = 1, + image = + { + value = "action.png", + imageType = "DYNAMIC" + }, + text = "VR help item" + } + }, + menuIcon = + { + value = "action.png", + imageType = "DYNAMIC" + }, + helpPrompt = + { + { + text = "Help prompt", + type = "TEXT" + } + }, + vrHelpTitle = "VR help title", + keyboardProperties = + { + keyboardLayout = "QWERTY", + keypressMode = "SINGLE_KEYPRESS", + limitedCharacterList = + { + "a" + }, + language = "EN-US", + autoCompleteText = "Daemon, Freedom" + } + }) + + + --hmi side: expect TTS.SetGlobalProperties request + EXPECT_HMICALL("TTS.SetGlobalProperties", + { + timeoutPrompt = + { + { + text = "Timeout prompt", + type = "TEXT" + } + }, + helpPrompt = + { + { + text = "Help prompt", + type = "TEXT" + } + } + }) + :Timeout(iTimeout) + :Do(function(_,data) + --hmi side: sending UI.SetGlobalProperties response + self.hmiConnection:SendResponse(data.id, data.method, "SUCCESS", {}) + end) + + + + --hmi side: expect UI.SetGlobalProperties request + EXPECT_HMICALL("UI.SetGlobalProperties", + { + menuTitle = "Menu Title", + vrHelp = + { + { + position = 1, + --[=[ TODO: update after resolving APPLINK-16052 + + image = + { + imageType = "DYNAMIC", + value = strAppFolder .. "action.png" + },]=] + text = "VR help item" + } + }, + --Checked below + -- menuIcon = + -- { + -- imageType = "DYNAMIC", + -- value = strAppFolder .. "action.png" + -- }, + vrHelpTitle = "VR help title", + keyboardProperties = + { + keyboardLayout = "QWERTY", + keypressMode = "SINGLE_KEYPRESS", + --[=[ TODO: update after resolving APPLINK-16047 + + limitedCharacterList = + { + "a" + },]=] + language = "EN-US", + autoCompleteText = "Daemon, Freedom" + } + }) + :Timeout(iTimeout) + :ValidIf(function(_,data) + return Check_menuIconParams(data) + end) + :Do(function(_,data) + --hmi side: sending UI.SetGlobalProperties response + self.hmiConnection:SendResponse(data.id, data.method, "SUCCESS", {}) + end) + + + + --mobile side: expect SetGlobalProperties response + EXPECT_RESPONSE(cid, { success = true, resultCode = "SUCCESS"}) + :Timeout(iTimeout) + + --mobile side: expect OnHashChange notification + EXPECT_NOTIFICATION("OnHashChange") + end + + --End test case PositiveResponseCheck.1.33 + ----------------------------------------------------------------------------------------- + + --Begin test case PositiveResponseCheck.1.34 + --Description: Check vrHelp parameter is upper bound + + function Test:SetGlobalProperties_vrHelp_Array_maxsize_100_SUCCESS() + + --mobile side: sending SetGlobalProperties request + local cid = self.mobileSession:SendRPC("SetGlobalProperties", + { + menuTitle = "Menu Title", + timeoutPrompt = + { + { + text = "Timeout prompt", + type = "TEXT" + } + }, + vrHelp = + { + { + position = 1, + image = + { + value = "action.png", + imageType = "DYNAMIC" + }, + text = "VR help item_001" + }, + { + position = 2, + image = + { + value = "action.png", + imageType = "DYNAMIC" + }, + text = "VR help item_002" + }, + { + position = 3, + image = + { + value = "action.png", + imageType = "DYNAMIC" + }, + text = "VR help item_003" + }, + { + position = 4, + image = + { + value = "action.png", + imageType = "DYNAMIC" + }, + text = "VR help item_004" + }, + { + position = 5, + image = + { + value = "action.png", + imageType = "DYNAMIC" + }, + text = "VR help item_005" + }, + { + position = 6, + image = + { + value = "action.png", + imageType = "DYNAMIC" + }, + text = "VR help item_006" + }, + { + position = 7, + image = + { + value = "action.png", + imageType = "DYNAMIC" + }, + text = "VR help item_007" + }, + { + position = 8, + image = + { + value = "action.png", + imageType = "DYNAMIC" + }, + text = "VR help item_008" + }, + { + position = 9, + image = + { + value = "action.png", + imageType = "DYNAMIC" + }, + text = "VR help item_009" + }, + { + position = 10, + image = + { + value = "action.png", + imageType = "DYNAMIC" + }, + text = "VR help item_010" + }, + { + position = 11, + image = + { + value = "action.png", + imageType = "DYNAMIC" + }, + text = "VR help item_011" + }, + { + position = 12, + image = + { + value = "action.png", + imageType = "DYNAMIC" + }, + text = "VR help item_012" + }, + { + position = 13, + image = + { + value = "action.png", + imageType = "DYNAMIC" + }, + text = "VR help item_013" + }, + { + position = 14, + image = + { + value = "action.png", + imageType = "DYNAMIC" + }, + text = "VR help item_014" + }, + { + position = 15, + image = + { + value = "action.png", + imageType = "DYNAMIC" + }, + text = "VR help item_015" + }, + { + position = 16, + image = + { + value = "action.png", + imageType = "DYNAMIC" + }, + text = "VR help item_016" + }, + { + position = 17, + image = + { + value = "action.png", + imageType = "DYNAMIC" + }, + text = "VR help item_017" + }, + { + position = 18, + image = + { + value = "action.png", + imageType = "DYNAMIC" + }, + text = "VR help item_018" + }, + { + position = 19, + image = + { + value = "action.png", + imageType = "DYNAMIC" + }, + text = "VR help item_019" + }, + { + position = 20, + image = + { + value = "action.png", + imageType = "DYNAMIC" + }, + text = "VR help item_020" + }, + { + position = 21, + image = + { + value = "action.png", + imageType = "DYNAMIC" + }, + text = "VR help item_021" + }, + { + position = 22, + image = + { + value = "action.png", + imageType = "DYNAMIC" + }, + text = "VR help item_022" + }, + { + position = 23, + image = + { + value = "action.png", + imageType = "DYNAMIC" + }, + text = "VR help item_023" + }, + { + position = 24, + image = + { + value = "action.png", + imageType = "DYNAMIC" + }, + text = "VR help item_024" + }, + { + position = 25, + image = + { + value = "action.png", + imageType = "DYNAMIC" + }, + text = "VR help item_025" + }, + { + position = 26, + image = + { + value = "action.png", + imageType = "DYNAMIC" + }, + text = "VR help item_026" + }, + { + position = 27, + image = + { + value = "action.png", + imageType = "DYNAMIC" + }, + text = "VR help item_027" + }, + { + position = 28, + image = + { + value = "action.png", + imageType = "DYNAMIC" + }, + text = "VR help item_028" + }, + { + position = 29, + image = + { + value = "action.png", + imageType = "DYNAMIC" + }, + text = "VR help item_029" + }, + { + position = 30, + image = + { + value = "action.png", + imageType = "DYNAMIC" + }, + text = "VR help item_030" + }, + { + position = 31, + image = + { + value = "action.png", + imageType = "DYNAMIC" + }, + text = "VR help item_031" + }, + { + position = 32, + image = + { + value = "action.png", + imageType = "DYNAMIC" + }, + text = "VR help item_032" + }, + { + position = 33, + image = + { + value = "action.png", + imageType = "DYNAMIC" + }, + text = "VR help item_033" + }, + { + position = 34, + image = + { + value = "action.png", + imageType = "DYNAMIC" + }, + text = "VR help item_034" + }, + { + position = 35, + image = + { + value = "action.png", + imageType = "DYNAMIC" + }, + text = "VR help item_035" + }, + { + position = 36, + image = + { + value = "action.png", + imageType = "DYNAMIC" + }, + text = "VR help item_036" + }, + { + position = 37, + image = + { + value = "action.png", + imageType = "DYNAMIC" + }, + text = "VR help item_037" + }, + { + position = 38, + image = + { + value = "action.png", + imageType = "DYNAMIC" + }, + text = "VR help item_038" + }, + { + position = 39, + image = + { + value = "action.png", + imageType = "DYNAMIC" + }, + text = "VR help item_039" + }, + { + position = 40, + image = + { + value = "action.png", + imageType = "DYNAMIC" + }, + text = "VR help item_040" + }, + { + position = 41, + image = + { + value = "action.png", + imageType = "DYNAMIC" + }, + text = "VR help item_041" + }, + { + position = 42, + image = + { + value = "action.png", + imageType = "DYNAMIC" + }, + text = "VR help item_042" + }, + { + position = 43, + image = + { + value = "action.png", + imageType = "DYNAMIC" + }, + text = "VR help item_043" + }, + { + position = 44, + image = + { + value = "action.png", + imageType = "DYNAMIC" + }, + text = "VR help item_044" + }, + { + position = 45, + image = + { + value = "action.png", + imageType = "DYNAMIC" + }, + text = "VR help item_045" + }, + { + position = 46, + image = + { + value = "action.png", + imageType = "DYNAMIC" + }, + text = "VR help item_046" + }, + { + position = 47, + image = + { + value = "action.png", + imageType = "DYNAMIC" + }, + text = "VR help item_047" + }, + { + position = 48, + image = + { + value = "action.png", + imageType = "DYNAMIC" + }, + text = "VR help item_048" + }, + { + position = 49, + image = + { + value = "action.png", + imageType = "DYNAMIC" + }, + text = "VR help item_049" + }, + { + position = 50, + image = + { + value = "action.png", + imageType = "DYNAMIC" + }, + text = "VR help item_050" + }, + { + position = 51, + image = + { + value = "action.png", + imageType = "DYNAMIC" + }, + text = "VR help item_051" + }, + { + position = 52, + image = + { + value = "action.png", + imageType = "DYNAMIC" + }, + text = "VR help item_052" + }, + { + position = 53, + image = + { + value = "action.png", + imageType = "DYNAMIC" + }, + text = "VR help item_053" + }, + { + position = 54, + image = + { + value = "action.png", + imageType = "DYNAMIC" + }, + text = "VR help item_054" + }, + { + position = 55, + image = + { + value = "action.png", + imageType = "DYNAMIC" + }, + text = "VR help item_055" + }, + { + position = 56, + image = + { + value = "action.png", + imageType = "DYNAMIC" + }, + text = "VR help item_056" + }, + { + position = 57, + image = + { + value = "action.png", + imageType = "DYNAMIC" + }, + text = "VR help item_057" + }, + { + position = 58, + image = + { + value = "action.png", + imageType = "DYNAMIC" + }, + text = "VR help item_058" + }, + { + position = 59, + image = + { + value = "action.png", + imageType = "DYNAMIC" + }, + text = "VR help item_059" + }, + { + position = 60, + image = + { + value = "action.png", + imageType = "DYNAMIC" + }, + text = "VR help item_060" + }, + { + position = 61, + image = + { + value = "action.png", + imageType = "DYNAMIC" + }, + text = "VR help item_061" + }, + { + position = 62, + image = + { + value = "action.png", + imageType = "DYNAMIC" + }, + text = "VR help item_062" + }, + { + position = 63, + image = + { + value = "action.png", + imageType = "DYNAMIC" + }, + text = "VR help item_063" + }, + { + position = 64, + image = + { + value = "action.png", + imageType = "DYNAMIC" + }, + text = "VR help item_064" + }, + { + position = 65, + image = + { + value = "action.png", + imageType = "DYNAMIC" + }, + text = "VR help item_065" + }, + { + position = 66, + image = + { + value = "action.png", + imageType = "DYNAMIC" + }, + text = "VR help item_066" + }, + { + position = 67, + image = + { + value = "action.png", + imageType = "DYNAMIC" + }, + text = "VR help item_067" + }, + { + position = 68, + image = + { + value = "action.png", + imageType = "DYNAMIC" + }, + text = "VR help item_068" + }, + { + position = 69, + image = + { + value = "action.png", + imageType = "DYNAMIC" + }, + text = "VR help item_069" + }, + { + position = 70, + image = + { + value = "action.png", + imageType = "DYNAMIC" + }, + text = "VR help item_070" + }, + { + position = 71, + image = + { + value = "action.png", + imageType = "DYNAMIC" + }, + text = "VR help item_071" + }, + { + position = 72, + image = + { + value = "action.png", + imageType = "DYNAMIC" + }, + text = "VR help item_072" + }, + { + position = 73, + image = + { + value = "action.png", + imageType = "DYNAMIC" + }, + text = "VR help item_073" + }, + { + position = 74, + image = + { + value = "action.png", + imageType = "DYNAMIC" + }, + text = "VR help item_074" + }, + { + position = 75, + image = + { + value = "action.png", + imageType = "DYNAMIC" + }, + text = "VR help item_075" + }, + { + position = 76, + image = + { + value = "action.png", + imageType = "DYNAMIC" + }, + text = "VR help item_076" + }, + { + position = 77, + image = + { + value = "action.png", + imageType = "DYNAMIC" + }, + text = "VR help item_077" + }, + { + position = 78, + image = + { + value = "action.png", + imageType = "DYNAMIC" + }, + text = "VR help item_078" + }, + { + position = 79, + image = + { + value = "action.png", + imageType = "DYNAMIC" + }, + text = "VR help item_079" + }, + { + position = 80, + image = + { + value = "action.png", + imageType = "DYNAMIC" + }, + text = "VR help item_080" + }, + { + position = 81, + image = + { + value = "action.png", + imageType = "DYNAMIC" + }, + text = "VR help item_081" + }, + { + position = 82, + image = + { + value = "action.png", + imageType = "DYNAMIC" + }, + text = "VR help item_082" + }, + { + position = 83, + image = + { + value = "action.png", + imageType = "DYNAMIC" + }, + text = "VR help item_083" + }, + { + position = 84, + image = + { + value = "action.png", + imageType = "DYNAMIC" + }, + text = "VR help item_084" + }, + { + position = 85, + image = + { + value = "action.png", + imageType = "DYNAMIC" + }, + text = "VR help item_085" + }, + { + position = 86, + image = + { + value = "action.png", + imageType = "DYNAMIC" + }, + text = "VR help item_086" + }, + { + position = 87, + image = + { + value = "action.png", + imageType = "DYNAMIC" + }, + text = "VR help item_087" + }, + { + position = 88, + image = + { + value = "action.png", + imageType = "DYNAMIC" + }, + text = "VR help item_088" + }, + { + position = 89, + image = + { + value = "action.png", + imageType = "DYNAMIC" + }, + text = "VR help item_089" + }, + { + position = 90, + image = + { + value = "action.png", + imageType = "DYNAMIC" + }, + text = "VR help item_090" + }, + { + position = 91, + image = + { + value = "action.png", + imageType = "DYNAMIC" + }, + text = "VR help item_091" + }, + { + position = 92, + image = + { + value = "action.png", + imageType = "DYNAMIC" + }, + text = "VR help item_092" + }, + { + position = 93, + image = + { + value = "action.png", + imageType = "DYNAMIC" + }, + text = "VR help item_093" + }, + { + position = 94, + image = + { + value = "action.png", + imageType = "DYNAMIC" + }, + text = "VR help item_094" + }, + { + position = 95, + image = + { + value = "action.png", + imageType = "DYNAMIC" + }, + text = "VR help item_095" + }, + { + position = 96, + image = + { + value = "action.png", + imageType = "DYNAMIC" + }, + text = "VR help item_096" + }, + { + position = 97, + image = + { + value = "action.png", + imageType = "DYNAMIC" + }, + text = "VR help item_097" + }, + { + position = 98, + image = + { + value = "action.png", + imageType = "DYNAMIC" + }, + text = "VR help item_098" + }, + { + position = 99, + image = + { + value = "action.png", + imageType = "DYNAMIC" + }, + text = "VR help item_099" + }, + { + position = 100, + image = + { + value = "action.png", + imageType = "DYNAMIC" + }, + text = "VR help item_100" + } + }, + menuIcon = + { + value = "action.png", + imageType = "DYNAMIC" + }, + helpPrompt = + { + { + text = "Help prompt", + type = "TEXT" + } + }, + vrHelpTitle = "VR help title", + keyboardProperties = + { + keyboardLayout = "QWERTY", + keypressMode = "SINGLE_KEYPRESS", + limitedCharacterList = + { + "a" + }, + language = "EN-US", + autoCompleteText = "Daemon, Freedom" + } + }) + + + --hmi side: expect TTS.SetGlobalProperties request + EXPECT_HMICALL("TTS.SetGlobalProperties", + { + timeoutPrompt = + { + { + text = "Timeout prompt", + type = "TEXT" + } + }, + helpPrompt = + { + { + text = "Help prompt", + type = "TEXT" + } + } + }) + :Timeout(iTimeout) + :Do(function(_,data) + --hmi side: sending UI.SetGlobalProperties response + self.hmiConnection:SendResponse(data.id, data.method, "SUCCESS", {}) + end) + + + + --hmi side: expect UI.SetGlobalProperties request + EXPECT_HMICALL("UI.SetGlobalProperties", + { + menuTitle = "Menu Title", + vrHelp = + { + { + position = 1, + --[=[ TODO: update after resolving APPLINK-16052 + + image = + { + imageType = "DYNAMIC", + value = strAppFolder .. "action.png" + },]=] + text = "VR help item_001" + }, + { + position = 2, + --[=[ TODO: update after resolving APPLINK-16052 + + image = + { + imageType = "DYNAMIC", + value = strAppFolder .. "action.png" + },]=] + text = "VR help item_002" + }, + { + position = 3, + --[=[ TODO: update after resolving APPLINK-16052 + + image = + { + imageType = "DYNAMIC", + value = strAppFolder .. "action.png" + },]=] + text = "VR help item_003" + }, + { + position = 4, + --[=[ TODO: update after resolving APPLINK-16052 + + image = + { + imageType = "DYNAMIC", + value = strAppFolder .. "action.png" + },]=] + text = "VR help item_004" + }, + { + position = 5, + --[=[ TODO: update after resolving APPLINK-16052 + + image = + { + imageType = "DYNAMIC", + value = strAppFolder .. "action.png" + },]=] + text = "VR help item_005" + }, + { + position = 6, + --[=[ TODO: update after resolving APPLINK-16052 + + image = + { + imageType = "DYNAMIC", + value = strAppFolder .. "action.png" + },]=] + text = "VR help item_006" + }, + { + position = 7, + --[=[ TODO: update after resolving APPLINK-16052 + + image = + { + imageType = "DYNAMIC", + value = strAppFolder .. "action.png" + },]=] + text = "VR help item_007" + }, + { + position = 8, + --[=[ TODO: update after resolving APPLINK-16052 + + image = + { + imageType = "DYNAMIC", + value = strAppFolder .. "action.png" + },]=] + text = "VR help item_008" + }, + { + position = 9, + --[=[ TODO: update after resolving APPLINK-16052 + + image = + { + imageType = "DYNAMIC", + value = strAppFolder .. "action.png" + },]=] + text = "VR help item_009" + }, + { + position = 10, + --[=[ TODO: update after resolving APPLINK-16052 + + image = + { + imageType = "DYNAMIC", + value = strAppFolder .. "action.png" + },]=] + text = "VR help item_010" + }, + { + position = 11, + --[=[ TODO: update after resolving APPLINK-16052 + + image = + { + imageType = "DYNAMIC", + value = strAppFolder .. "action.png" + },]=] + text = "VR help item_011" + }, + { + position = 12, + --[=[ TODO: update after resolving APPLINK-16052 + + image = + { + imageType = "DYNAMIC", + value = strAppFolder .. "action.png" + },]=] + text = "VR help item_012" + }, + { + position = 13, + --[=[ TODO: update after resolving APPLINK-16052 + + image = + { + imageType = "DYNAMIC", + value = strAppFolder .. "action.png" + },]=] + text = "VR help item_013" + }, + { + position = 14, + --[=[ TODO: update after resolving APPLINK-16052 + + image = + { + imageType = "DYNAMIC", + value = strAppFolder .. "action.png" + },]=] + text = "VR help item_014" + }, + { + position = 15, + --[=[ TODO: update after resolving APPLINK-16052 + + image = + { + imageType = "DYNAMIC", + value = strAppFolder .. "action.png" + },]=] + text = "VR help item_015" + }, + { + position = 16, + --[=[ TODO: update after resolving APPLINK-16052 + + image = + { + imageType = "DYNAMIC", + value = strAppFolder .. "action.png" + },]=] + text = "VR help item_016" + }, + { + position = 17, + --[=[ TODO: update after resolving APPLINK-16052 + + image = + { + imageType = "DYNAMIC", + value = strAppFolder .. "action.png" + },]=] + text = "VR help item_017" + }, + { + position = 18, + --[=[ TODO: update after resolving APPLINK-16052 + + image = + { + imageType = "DYNAMIC", + value = strAppFolder .. "action.png" + },]=] + text = "VR help item_018" + }, + { + position = 19, + --[=[ TODO: update after resolving APPLINK-16052 + + image = + { + imageType = "DYNAMIC", + value = strAppFolder .. "action.png" + },]=] + text = "VR help item_019" + }, + { + position = 20, + --[=[ TODO: update after resolving APPLINK-16052 + + image = + { + imageType = "DYNAMIC", + value = strAppFolder .. "action.png" + },]=] + text = "VR help item_020" + }, + { + position = 21, + --[=[ TODO: update after resolving APPLINK-16052 + + image = + { + imageType = "DYNAMIC", + value = strAppFolder .. "action.png" + },]=] + text = "VR help item_021" + }, + { + position = 22, + --[=[ TODO: update after resolving APPLINK-16052 + + image = + { + imageType = "DYNAMIC", + value = strAppFolder .. "action.png" + },]=] + text = "VR help item_022" + }, + { + position = 23, + --[=[ TODO: update after resolving APPLINK-16052 + + image = + { + imageType = "DYNAMIC", + value = strAppFolder .. "action.png" + },]=] + text = "VR help item_023" + }, + { + position = 24, + --[=[ TODO: update after resolving APPLINK-16052 + + image = + { + imageType = "DYNAMIC", + value = strAppFolder .. "action.png" + },]=] + text = "VR help item_024" + }, + { + position = 25, + --[=[ TODO: update after resolving APPLINK-16052 + + image = + { + imageType = "DYNAMIC", + value = strAppFolder .. "action.png" + },]=] + text = "VR help item_025" + }, + { + position = 26, + --[=[ TODO: update after resolving APPLINK-16052 + + image = + { + imageType = "DYNAMIC", + value = strAppFolder .. "action.png" + },]=] + text = "VR help item_026" + }, + { + position = 27, + --[=[ TODO: update after resolving APPLINK-16052 + + image = + { + imageType = "DYNAMIC", + value = strAppFolder .. "action.png" + },]=] + text = "VR help item_027" + }, + { + position = 28, + --[=[ TODO: update after resolving APPLINK-16052 + + image = + { + imageType = "DYNAMIC", + value = strAppFolder .. "action.png" + },]=] + text = "VR help item_028" + }, + { + position = 29, + --[=[ TODO: update after resolving APPLINK-16052 + + image = + { + imageType = "DYNAMIC", + value = strAppFolder .. "action.png" + },]=] + text = "VR help item_029" + }, + { + position = 30, + --[=[ TODO: update after resolving APPLINK-16052 + + image = + { + imageType = "DYNAMIC", + value = strAppFolder .. "action.png" + },]=] + text = "VR help item_030" + }, + { + position = 31, + --[=[ TODO: update after resolving APPLINK-16052 + + image = + { + imageType = "DYNAMIC", + value = strAppFolder .. "action.png" + },]=] + text = "VR help item_031" + }, + { + position = 32, + --[=[ TODO: update after resolving APPLINK-16052 + + image = + { + imageType = "DYNAMIC", + value = strAppFolder .. "action.png" + },]=] + text = "VR help item_032" + }, + { + position = 33, + --[=[ TODO: update after resolving APPLINK-16052 + + image = + { + imageType = "DYNAMIC", + value = strAppFolder .. "action.png" + },]=] + text = "VR help item_033" + }, + { + position = 34, + --[=[ TODO: update after resolving APPLINK-16052 + + image = + { + imageType = "DYNAMIC", + value = strAppFolder .. "action.png" + },]=] + text = "VR help item_034" + }, + { + position = 35, + --[=[ TODO: update after resolving APPLINK-16052 + + image = + { + imageType = "DYNAMIC", + value = strAppFolder .. "action.png" + },]=] + text = "VR help item_035" + }, + { + position = 36, + --[=[ TODO: update after resolving APPLINK-16052 + + image = + { + imageType = "DYNAMIC", + value = strAppFolder .. "action.png" + },]=] + text = "VR help item_036" + }, + { + position = 37, + --[=[ TODO: update after resolving APPLINK-16052 + + image = + { + imageType = "DYNAMIC", + value = strAppFolder .. "action.png" + },]=] + text = "VR help item_037" + }, + { + position = 38, + --[=[ TODO: update after resolving APPLINK-16052 + + image = + { + imageType = "DYNAMIC", + value = strAppFolder .. "action.png" + },]=] + text = "VR help item_038" + }, + { + position = 39, + --[=[ TODO: update after resolving APPLINK-16052 + + image = + { + imageType = "DYNAMIC", + value = strAppFolder .. "action.png" + },]=] + text = "VR help item_039" + }, + { + position = 40, + --[=[ TODO: update after resolving APPLINK-16052 + + image = + { + imageType = "DYNAMIC", + value = strAppFolder .. "action.png" + },]=] + text = "VR help item_040" + }, + { + position = 41, + --[=[ TODO: update after resolving APPLINK-16052 + + image = + { + imageType = "DYNAMIC", + value = strAppFolder .. "action.png" + },]=] + text = "VR help item_041" + }, + { + position = 42, + --[=[ TODO: update after resolving APPLINK-16052 + + image = + { + imageType = "DYNAMIC", + value = strAppFolder .. "action.png" + },]=] + text = "VR help item_042" + }, + { + position = 43, + --[=[ TODO: update after resolving APPLINK-16052 + + image = + { + imageType = "DYNAMIC", + value = strAppFolder .. "action.png" + },]=] + text = "VR help item_043" + }, + { + position = 44, + --[=[ TODO: update after resolving APPLINK-16052 + + image = + { + imageType = "DYNAMIC", + value = strAppFolder .. "action.png" + },]=] + text = "VR help item_044" + }, + { + position = 45, + --[=[ TODO: update after resolving APPLINK-16052 + + image = + { + imageType = "DYNAMIC", + value = strAppFolder .. "action.png" + },]=] + text = "VR help item_045" + }, + { + position = 46, + --[=[ TODO: update after resolving APPLINK-16052 + + image = + { + imageType = "DYNAMIC", + value = strAppFolder .. "action.png" + },]=] + text = "VR help item_046" + }, + { + position = 47, + --[=[ TODO: update after resolving APPLINK-16052 + + image = + { + imageType = "DYNAMIC", + value = strAppFolder .. "action.png" + },]=] + text = "VR help item_047" + }, + { + position = 48, + --[=[ TODO: update after resolving APPLINK-16052 + + image = + { + imageType = "DYNAMIC", + value = strAppFolder .. "action.png" + },]=] + text = "VR help item_048" + }, + { + position = 49, + --[=[ TODO: update after resolving APPLINK-16052 + + image = + { + imageType = "DYNAMIC", + value = strAppFolder .. "action.png" + },]=] + text = "VR help item_049" + }, + { + position = 50, + --[=[ TODO: update after resolving APPLINK-16052 + + image = + { + imageType = "DYNAMIC", + value = strAppFolder .. "action.png" + },]=] + text = "VR help item_050" + }, + { + position = 51, + --[=[ TODO: update after resolving APPLINK-16052 + + image = + { + imageType = "DYNAMIC", + value = strAppFolder .. "action.png" + },]=] + text = "VR help item_051" + }, + { + position = 52, + --[=[ TODO: update after resolving APPLINK-16052 + + image = + { + imageType = "DYNAMIC", + value = strAppFolder .. "action.png" + },]=] + text = "VR help item_052" + }, + { + position = 53, + --[=[ TODO: update after resolving APPLINK-16052 + + image = + { + imageType = "DYNAMIC", + value = strAppFolder .. "action.png" + },]=] + text = "VR help item_053" + }, + { + position = 54, + --[=[ TODO: update after resolving APPLINK-16052 + + image = + { + imageType = "DYNAMIC", + value = strAppFolder .. "action.png" + },]=] + text = "VR help item_054" + }, + { + position = 55, + --[=[ TODO: update after resolving APPLINK-16052 + + image = + { + imageType = "DYNAMIC", + value = strAppFolder .. "action.png" + },]=] + text = "VR help item_055" + }, + { + position = 56, + --[=[ TODO: update after resolving APPLINK-16052 + + image = + { + imageType = "DYNAMIC", + value = strAppFolder .. "action.png" + },]=] + text = "VR help item_056" + }, + { + position = 57, + --[=[ TODO: update after resolving APPLINK-16052 + + image = + { + imageType = "DYNAMIC", + value = strAppFolder .. "action.png" + },]=] + text = "VR help item_057" + }, + { + position = 58, + --[=[ TODO: update after resolving APPLINK-16052 + + image = + { + imageType = "DYNAMIC", + value = strAppFolder .. "action.png" + },]=] + text = "VR help item_058" + }, + { + position = 59, + --[=[ TODO: update after resolving APPLINK-16052 + + image = + { + imageType = "DYNAMIC", + value = strAppFolder .. "action.png" + },]=] + text = "VR help item_059" + }, + { + position = 60, + --[=[ TODO: update after resolving APPLINK-16052 + + image = + { + imageType = "DYNAMIC", + value = strAppFolder .. "action.png" + },]=] + text = "VR help item_060" + }, + { + position = 61, + --[=[ TODO: update after resolving APPLINK-16052 + + image = + { + imageType = "DYNAMIC", + value = strAppFolder .. "action.png" + },]=] + text = "VR help item_061" + }, + { + position = 62, + --[=[ TODO: update after resolving APPLINK-16052 + + image = + { + imageType = "DYNAMIC", + value = strAppFolder .. "action.png" + },]=] + text = "VR help item_062" + }, + { + position = 63, + --[=[ TODO: update after resolving APPLINK-16052 + + image = + { + imageType = "DYNAMIC", + value = strAppFolder .. "action.png" + },]=] + text = "VR help item_063" + }, + { + position = 64, + --[=[ TODO: update after resolving APPLINK-16052 + + image = + { + imageType = "DYNAMIC", + value = strAppFolder .. "action.png" + },]=] + text = "VR help item_064" + }, + { + position = 65, + --[=[ TODO: update after resolving APPLINK-16052 + + image = + { + imageType = "DYNAMIC", + value = strAppFolder .. "action.png" + },]=] + text = "VR help item_065" + }, + { + position = 66, + --[=[ TODO: update after resolving APPLINK-16052 + + image = + { + imageType = "DYNAMIC", + value = strAppFolder .. "action.png" + },]=] + text = "VR help item_066" + }, + { + position = 67, + --[=[ TODO: update after resolving APPLINK-16052 + + image = + { + imageType = "DYNAMIC", + value = strAppFolder .. "action.png" + },]=] + text = "VR help item_067" + }, + { + position = 68, + --[=[ TODO: update after resolving APPLINK-16052 + + image = + { + imageType = "DYNAMIC", + value = strAppFolder .. "action.png" + },]=] + text = "VR help item_068" + }, + { + position = 69, + --[=[ TODO: update after resolving APPLINK-16052 + + image = + { + imageType = "DYNAMIC", + value = strAppFolder .. "action.png" + },]=] + text = "VR help item_069" + }, + { + position = 70, + --[=[ TODO: update after resolving APPLINK-16052 + + image = + { + imageType = "DYNAMIC", + value = strAppFolder .. "action.png" + },]=] + text = "VR help item_070" + }, + { + position = 71, + --[=[ TODO: update after resolving APPLINK-16052 + + image = + { + imageType = "DYNAMIC", + value = strAppFolder .. "action.png" + },]=] + text = "VR help item_071" + }, + { + position = 72, + --[=[ TODO: update after resolving APPLINK-16052 + + image = + { + imageType = "DYNAMIC", + value = strAppFolder .. "action.png" + },]=] + text = "VR help item_072" + }, + { + position = 73, + --[=[ TODO: update after resolving APPLINK-16052 + + image = + { + imageType = "DYNAMIC", + value = strAppFolder .. "action.png" + },]=] + text = "VR help item_073" + }, + { + position = 74, + --[=[ TODO: update after resolving APPLINK-16052 + + image = + { + imageType = "DYNAMIC", + value = strAppFolder .. "action.png" + },]=] + text = "VR help item_074" + }, + { + position = 75, + --[=[ TODO: update after resolving APPLINK-16052 + + image = + { + imageType = "DYNAMIC", + value = strAppFolder .. "action.png" + },]=] + text = "VR help item_075" + }, + { + position = 76, + --[=[ TODO: update after resolving APPLINK-16052 + + image = + { + imageType = "DYNAMIC", + value = strAppFolder .. "action.png" + },]=] + text = "VR help item_076" + }, + { + position = 77, + --[=[ TODO: update after resolving APPLINK-16052 + + image = + { + imageType = "DYNAMIC", + value = strAppFolder .. "action.png" + },]=] + text = "VR help item_077" + }, + { + position = 78, + --[=[ TODO: update after resolving APPLINK-16052 + + image = + { + imageType = "DYNAMIC", + value = strAppFolder .. "action.png" + },]=] + text = "VR help item_078" + }, + { + position = 79, + --[=[ TODO: update after resolving APPLINK-16052 + + image = + { + imageType = "DYNAMIC", + value = strAppFolder .. "action.png" + },]=] + text = "VR help item_079" + }, + { + position = 80, + --[=[ TODO: update after resolving APPLINK-16052 + + image = + { + imageType = "DYNAMIC", + value = strAppFolder .. "action.png" + },]=] + text = "VR help item_080" + }, + { + position = 81, + --[=[ TODO: update after resolving APPLINK-16052 + + image = + { + imageType = "DYNAMIC", + value = strAppFolder .. "action.png" + },]=] + text = "VR help item_081" + }, + { + position = 82, + --[=[ TODO: update after resolving APPLINK-16052 + + image = + { + imageType = "DYNAMIC", + value = strAppFolder .. "action.png" + },]=] + text = "VR help item_082" + }, + { + position = 83, + --[=[ TODO: update after resolving APPLINK-16052 + + image = + { + imageType = "DYNAMIC", + value = strAppFolder .. "action.png" + },]=] + text = "VR help item_083" + }, + { + position = 84, + --[=[ TODO: update after resolving APPLINK-16052 + + image = + { + imageType = "DYNAMIC", + value = strAppFolder .. "action.png" + },]=] + text = "VR help item_084" + }, + { + position = 85, + --[=[ TODO: update after resolving APPLINK-16052 + + image = + { + imageType = "DYNAMIC", + value = strAppFolder .. "action.png" + },]=] + text = "VR help item_085" + }, + { + position = 86, + --[=[ TODO: update after resolving APPLINK-16052 + + image = + { + imageType = "DYNAMIC", + value = strAppFolder .. "action.png" + },]=] + text = "VR help item_086" + }, + { + position = 87, + --[=[ TODO: update after resolving APPLINK-16052 + + image = + { + imageType = "DYNAMIC", + value = strAppFolder .. "action.png" + },]=] + text = "VR help item_087" + }, + { + position = 88, + --[=[ TODO: update after resolving APPLINK-16052 + + image = + { + imageType = "DYNAMIC", + value = strAppFolder .. "action.png" + },]=] + text = "VR help item_088" + }, + { + position = 89, + --[=[ TODO: update after resolving APPLINK-16052 + + image = + { + imageType = "DYNAMIC", + value = strAppFolder .. "action.png" + },]=] + text = "VR help item_089" + }, + { + position = 90, + --[=[ TODO: update after resolving APPLINK-16052 + + image = + { + imageType = "DYNAMIC", + value = strAppFolder .. "action.png" + },]=] + text = "VR help item_090" + }, + { + position = 91, + --[=[ TODO: update after resolving APPLINK-16052 + + image = + { + imageType = "DYNAMIC", + value = strAppFolder .. "action.png" + },]=] + text = "VR help item_091" + }, + { + position = 92, + --[=[ TODO: update after resolving APPLINK-16052 + + image = + { + imageType = "DYNAMIC", + value = strAppFolder .. "action.png" + },]=] + text = "VR help item_092" + }, + { + position = 93, + --[=[ TODO: update after resolving APPLINK-16052 + + image = + { + imageType = "DYNAMIC", + value = strAppFolder .. "action.png" + },]=] + text = "VR help item_093" + }, + { + position = 94, + --[=[ TODO: update after resolving APPLINK-16052 + + image = + { + imageType = "DYNAMIC", + value = strAppFolder .. "action.png" + },]=] + text = "VR help item_094" + }, + { + position = 95, + --[=[ TODO: update after resolving APPLINK-16052 + + image = + { + imageType = "DYNAMIC", + value = strAppFolder .. "action.png" + },]=] + text = "VR help item_095" + }, + { + position = 96, + --[=[ TODO: update after resolving APPLINK-16052 + + image = + { + imageType = "DYNAMIC", + value = strAppFolder .. "action.png" + },]=] + text = "VR help item_096" + }, + { + position = 97, + --[=[ TODO: update after resolving APPLINK-16052 + + image = + { + imageType = "DYNAMIC", + value = strAppFolder .. "action.png" + },]=] + text = "VR help item_097" + }, + { + position = 98, + --[=[ TODO: update after resolving APPLINK-16052 + + image = + { + imageType = "DYNAMIC", + value = strAppFolder .. "action.png" + },]=] + text = "VR help item_098" + }, + { + position = 99, + --[=[ TODO: update after resolving APPLINK-16052 + + image = + { + imageType = "DYNAMIC", + value = strAppFolder .. "action.png" + },]=] + text = "VR help item_099" + }, + { + position = 100, + --[=[ TODO: update after resolving APPLINK-16052 + + image = + { + imageType = "DYNAMIC", + value = strAppFolder .. "action.png" + },]=] + text = "VR help item_100" + } + }, + --Checked below + -- menuIcon = + -- { + -- imageType = "DYNAMIC", + -- value = strAppFolder .. "action.png" + -- }, + vrHelpTitle = "VR help title", + keyboardProperties = + { + keyboardLayout = "QWERTY", + keypressMode = "SINGLE_KEYPRESS", + --[=[ TODO: update after resolving APPLINK-16047 + + limitedCharacterList = + { + "a" + },]=] + language = "EN-US", + autoCompleteText = "Daemon, Freedom" + } + }) + :Timeout(iTimeout) + :ValidIf(function(_,data) + return Check_menuIconParams(data) + end) + :Do(function(_,data) + --hmi side: sending UI.SetGlobalProperties response + self.hmiConnection:SendResponse(data.id, data.method, "SUCCESS", {}) + end) + + + + --mobile side: expect SetGlobalProperties response + EXPECT_RESPONSE(cid, { success = true, resultCode = "SUCCESS"}) + :Timeout(iTimeout) + + --mobile side: expect OnHashChange notification + EXPECT_NOTIFICATION("OnHashChange") + end + + --End test case PositiveResponseCheck.1.34 + ----------------------------------------------------------------------------------------- + + --Begin test case PositiveResponseCheck.1.35 + --Description: Check vrHelpposition parameter is lower bound + + function Test:SetGlobalProperties_vrHelp_position_IsLowerBound_1_SUCCESS() + + --mobile side: sending SetGlobalProperties request + local cid = self.mobileSession:SendRPC("SetGlobalProperties", + { + menuTitle = "Menu Title", + timeoutPrompt = + { + { + text = "Timeout prompt", + type = "TEXT" + } + }, + vrHelp = + { + { + position = 1, + image = + { + value = "action.png", + imageType = "DYNAMIC" + }, + text = "VR help item" + } + }, + menuIcon = + { + value = "action.png", + imageType = "DYNAMIC" + }, + helpPrompt = + { + { + text = "Help prompt", + type = "TEXT" + } + }, + vrHelpTitle = "VR help title", + keyboardProperties = + { + keyboardLayout = "QWERTY", + keypressMode = "SINGLE_KEYPRESS", + limitedCharacterList = + { + "a" + }, + language = "EN-US", + autoCompleteText = "Daemon, Freedom" + } + }) + + + --hmi side: expect TTS.SetGlobalProperties request + EXPECT_HMICALL("TTS.SetGlobalProperties", + { + timeoutPrompt = + { + { + text = "Timeout prompt", + type = "TEXT" + } + }, + helpPrompt = + { + { + text = "Help prompt", + type = "TEXT" + } + } + }) + :Timeout(iTimeout) + :Do(function(_,data) + --hmi side: sending UI.SetGlobalProperties response + self.hmiConnection:SendResponse(data.id, data.method, "SUCCESS", {}) + end) + + + + --hmi side: expect UI.SetGlobalProperties request + EXPECT_HMICALL("UI.SetGlobalProperties", + { + menuTitle = "Menu Title", + vrHelp = + { + { + position = 1, + --[=[ TODO: update after resolving APPLINK-16052 + + image = + { + imageType = "DYNAMIC", + value = strAppFolder .. "action.png" + },]=] + text = "VR help item" + } + }, + --Checked below + -- menuIcon = + -- { + -- imageType = "DYNAMIC", + -- value = strAppFolder .. "action.png" + -- }, + vrHelpTitle = "VR help title", + keyboardProperties = + { + keyboardLayout = "QWERTY", + keypressMode = "SINGLE_KEYPRESS", + --[=[ TODO: update after resolving APPLINK-16047 + + limitedCharacterList = + { + "a" + },]=] + language = "EN-US", + autoCompleteText = "Daemon, Freedom" + } + }) + :Timeout(iTimeout) + :ValidIf(function(_,data) + return Check_menuIconParams(data) + end) + :Do(function(_,data) + --hmi side: sending UI.SetGlobalProperties response + self.hmiConnection:SendResponse(data.id, data.method, "SUCCESS", {}) + end) + + + + --mobile side: expect SetGlobalProperties response + EXPECT_RESPONSE(cid, { success = true, resultCode = "SUCCESS"}) + :Timeout(iTimeout) + + --mobile side: expect OnHashChange notification + EXPECT_NOTIFICATION("OnHashChange") + end + + --End test case PositiveResponseCheck.1.35 + ----------------------------------------------------------------------------------------- + + --Begin test case PositiveResponseCheck.1.36 + --Description: Check vrHelpposition parameter is upper bound + + function Test:SetGlobalProperties_vrHelp_position_IsUpperBound_100_REJECTED() + + --mobile side: sending SetGlobalProperties request + local cid = self.mobileSession:SendRPC("SetGlobalProperties", + { + menuTitle = "Menu Title", + timeoutPrompt = + { + { + text = "Timeout prompt", + type = "TEXT" + } + }, + vrHelp = + { + { + position = 100, + image = + { + value = "action.png", + imageType = "DYNAMIC" + }, + text = "VR help item 100" + } + }, + menuIcon = + { + value = "action.png", + imageType = "DYNAMIC" + }, + helpPrompt = + { + { + text = "Help prompt", + type = "TEXT" + } + }, + vrHelpTitle = "VR help title", + keyboardProperties = + { + keyboardLayout = "QWERTY", + keypressMode = "SINGLE_KEYPRESS", + limitedCharacterList = + { + "a" + }, + language = "EN-US", + autoCompleteText = "Daemon, Freedom" + } + }) + + + + --mobile side: expect SetGlobalProperties response + EXPECT_RESPONSE(cid, { success = false, resultCode = "REJECTED"}) + :Timeout(iTimeout) + + --mobile side: expect OnHashChange notification is not send to mobile + EXPECT_NOTIFICATION("OnHashChange") + :Times(0) + end + + --End test case PositiveResponseCheck.1.36 + ----------------------------------------------------------------------------------------- + + --Begin test case PositiveResponseCheck.1.37 + --Description: Check vrHelptext parameter is lower bound + + function Test:SetGlobalProperties_vrHelp_text_IsLowerBound_1_SUCCESS() + + --mobile side: sending SetGlobalProperties request + local cid = self.mobileSession:SendRPC("SetGlobalProperties", + { + menuTitle = "Menu Title", + timeoutPrompt = + { + { + text = "Timeout prompt", + type = "TEXT" + } + }, + vrHelp = + { + { + position = 1, + image = + { + value = "action.png", + imageType = "DYNAMIC" + }, + text = "q" + } + }, + menuIcon = + { + value = "action.png", + imageType = "DYNAMIC" + }, + helpPrompt = + { + { + text = "Help prompt", + type = "TEXT" + } + }, + vrHelpTitle = "VR help title", + keyboardProperties = + { + keyboardLayout = "QWERTY", + keypressMode = "SINGLE_KEYPRESS", + limitedCharacterList = + { + "a" + }, + language = "EN-US", + autoCompleteText = "Daemon, Freedom" + } + }) + + + --hmi side: expect TTS.SetGlobalProperties request + EXPECT_HMICALL("TTS.SetGlobalProperties", + { + timeoutPrompt = + { + { + text = "Timeout prompt", + type = "TEXT" + } + }, + helpPrompt = + { + { + text = "Help prompt", + type = "TEXT" + } + } + }) + :Timeout(iTimeout) + :Do(function(_,data) + --hmi side: sending UI.SetGlobalProperties response + self.hmiConnection:SendResponse(data.id, data.method, "SUCCESS", {}) + end) + + + + --hmi side: expect UI.SetGlobalProperties request + EXPECT_HMICALL("UI.SetGlobalProperties", + { + menuTitle = "Menu Title", + vrHelp = + { + { + position = 1, + --[=[ TODO: update after resolving APPLINK-16052 + + image = + { + imageType = "DYNAMIC", + value = strAppFolder .. "action.png" + },]=] + text = "q" + } + }, + --Checked below + -- menuIcon = + -- { + -- imageType = "DYNAMIC", + -- value = strAppFolder .. "action.png" + -- }, + vrHelpTitle = "VR help title", + keyboardProperties = + { + keyboardLayout = "QWERTY", + keypressMode = "SINGLE_KEYPRESS", + --[=[ TODO: update after resolving APPLINK-16047 + + limitedCharacterList = + { + "a" + },]=] + language = "EN-US", + autoCompleteText = "Daemon, Freedom" + } + }) + :Timeout(iTimeout) + :ValidIf(function(_,data) + return Check_menuIconParams(data) + end) + :Do(function(_,data) + --hmi side: sending UI.SetGlobalProperties response + self.hmiConnection:SendResponse(data.id, data.method, "SUCCESS", {}) + end) + + + + --mobile side: expect SetGlobalProperties response + EXPECT_RESPONSE(cid, { success = true, resultCode = "SUCCESS"}) + :Timeout(iTimeout) + + --mobile side: expect OnHashChange notification + EXPECT_NOTIFICATION("OnHashChange") + end + + --End test case PositiveResponseCheck.1.37 + ----------------------------------------------------------------------------------------- + + --Begin test case PositiveResponseCheck.1.38 + --Description: Check vrHelptext parameter is upper bound + + function Test:SetGlobalProperties_vrHelp_text_IsUpperBound_500_SUCCESS() + + --mobile side: sending SetGlobalProperties request + local cid = self.mobileSession:SendRPC("SetGlobalProperties", + { + menuTitle = "Menu Title", + timeoutPrompt = + { + { + text = "Timeout prompt", + type = "TEXT" + } + }, + vrHelp = + { + { + position = 1, + image = + { + value = "action.png", + imageType = "DYNAMIC" + }, + text = "qA1_wB2_eA3_rB4_tA5_yB6_uA7_iB8_oA9_pB0_aA1_sB2_dA3_fB4_gA5_hB6_jA7_kB8_lA9_zB0_xA1_cB2_vA3_bB4_nA5_mB6_qA7_wB8_eA9_rB0_tA1_yB2_uA3_iB4_oA5_pB6_aA7_sB8_dA9_fB0_gA1_hB2_jA3_kB4_lA5_zB6_xA7_cB8_vA9_bB0_nA1_mB2_qA3_wB4_eA5_rB6_tA7_yB8_uA9_iB0_oA1_pB2_aA3_sB4_dA5_fB6_gA7_hB8_jA9_kB0_lA1_zB2_xA3_cB4_vA5_bB6_nA7_mB8_qA9_wB0_eA1_rB2_tA3_yB4_uA5_iB6_oA7_pB8_aA9_sB0_dA1_fB2_gA3_hB4_jA5_kB6_lA7_zB8_xA9_cB0_vA1_bB2_nA3_mB4_qA5_wB6_eA7_rB8_tA9_yB0_uA1_iB2_oA3_pB4_aA5_sB6_dA7_fB8_gA9_hB0_jA1_kB2_lA3_zB4_xA5_" + } + }, + menuIcon = + { + value = "action.png", + imageType = "DYNAMIC" + }, + helpPrompt = + { + { + text = "Help prompt", + type = "TEXT" + } + }, + vrHelpTitle = "VR help title", + keyboardProperties = + { + keyboardLayout = "QWERTY", + keypressMode = "SINGLE_KEYPRESS", + limitedCharacterList = + { + "a" + }, + language = "EN-US", + autoCompleteText = "Daemon, Freedom" + } + }) + + + --hmi side: expect TTS.SetGlobalProperties request + EXPECT_HMICALL("TTS.SetGlobalProperties", + { + timeoutPrompt = + { + { + text = "Timeout prompt", + type = "TEXT" + } + }, + helpPrompt = + { + { + text = "Help prompt", + type = "TEXT" + } + } + }) + :Timeout(iTimeout) + :Do(function(_,data) + --hmi side: sending UI.SetGlobalProperties response + self.hmiConnection:SendResponse(data.id, data.method, "SUCCESS", {}) + end) + + + + --hmi side: expect UI.SetGlobalProperties request + EXPECT_HMICALL("UI.SetGlobalProperties", + { + menuTitle = "Menu Title", + vrHelp = + { + { + position = 1, + --[=[ TODO: update after resolving APPLINK-16052 + + image = + { + imageType = "DYNAMIC", + value = strAppFolder .. "action.png" + },]=] + text = "qA1_wB2_eA3_rB4_tA5_yB6_uA7_iB8_oA9_pB0_aA1_sB2_dA3_fB4_gA5_hB6_jA7_kB8_lA9_zB0_xA1_cB2_vA3_bB4_nA5_mB6_qA7_wB8_eA9_rB0_tA1_yB2_uA3_iB4_oA5_pB6_aA7_sB8_dA9_fB0_gA1_hB2_jA3_kB4_lA5_zB6_xA7_cB8_vA9_bB0_nA1_mB2_qA3_wB4_eA5_rB6_tA7_yB8_uA9_iB0_oA1_pB2_aA3_sB4_dA5_fB6_gA7_hB8_jA9_kB0_lA1_zB2_xA3_cB4_vA5_bB6_nA7_mB8_qA9_wB0_eA1_rB2_tA3_yB4_uA5_iB6_oA7_pB8_aA9_sB0_dA1_fB2_gA3_hB4_jA5_kB6_lA7_zB8_xA9_cB0_vA1_bB2_nA3_mB4_qA5_wB6_eA7_rB8_tA9_yB0_uA1_iB2_oA3_pB4_aA5_sB6_dA7_fB8_gA9_hB0_jA1_kB2_lA3_zB4_xA5_" + } + }, + --Checked below + -- menuIcon = + -- { + -- imageType = "DYNAMIC", + -- value = strAppFolder .. "action.png" + -- }, + vrHelpTitle = "VR help title", + keyboardProperties = + { + keyboardLayout = "QWERTY", + keypressMode = "SINGLE_KEYPRESS", + --[=[ TODO: update after resolving APPLINK-16047 + + limitedCharacterList = + { + "a" + },]=] + language = "EN-US", + autoCompleteText = "Daemon, Freedom" + } + }) + :Timeout(iTimeout) + :ValidIf(function(_,data) + return Check_menuIconParams(data) + end) + :Do(function(_,data) + --hmi side: sending UI.SetGlobalProperties response + self.hmiConnection:SendResponse(data.id, data.method, "SUCCESS", {}) + end) + + + + --mobile side: expect SetGlobalProperties response + EXPECT_RESPONSE(cid, { success = true, resultCode = "SUCCESS"}) + :Timeout(iTimeout) + + --mobile side: expect OnHashChange notification + EXPECT_NOTIFICATION("OnHashChange") + end + + --End test case PositiveResponseCheck.1.38 + ----------------------------------------------------------------------------------------- + + --Begin test case PositiveResponseCheck.1.39 + --Description: Check vrHelptext parameter contains space characters _SpaceCharacter_SpaceBefore + + function Test:SetGlobalProperties_vrHelp_text__SpaceCharacter_SpaceBefore_SUCCESS() + + --mobile side: sending SetGlobalProperties request + local cid = self.mobileSession:SendRPC("SetGlobalProperties", + { + menuTitle = "Menu Title", + timeoutPrompt = + { + { + text = "Timeout prompt", + type = "TEXT" + } + }, + vrHelp = + { + { + position = 1, + image = + { + value = "action.png", + imageType = "DYNAMIC" + }, + text = " SpaceBefore" + } + }, + menuIcon = + { + value = "action.png", + imageType = "DYNAMIC" + }, + helpPrompt = + { + { + text = "Help prompt", + type = "TEXT" + } + }, + vrHelpTitle = "VR help title", + keyboardProperties = + { + keyboardLayout = "QWERTY", + keypressMode = "SINGLE_KEYPRESS", + limitedCharacterList = + { + "a" + }, + language = "EN-US", + autoCompleteText = "Daemon, Freedom" + } + }) + + + --hmi side: expect TTS.SetGlobalProperties request + EXPECT_HMICALL("TTS.SetGlobalProperties", + { + timeoutPrompt = + { + { + text = "Timeout prompt", + type = "TEXT" + } + }, + helpPrompt = + { + { + text = "Help prompt", + type = "TEXT" + } + } + }) + :Timeout(iTimeout) + :Do(function(_,data) + --hmi side: sending UI.SetGlobalProperties response + self.hmiConnection:SendResponse(data.id, data.method, "SUCCESS", {}) + end) + + + + --hmi side: expect UI.SetGlobalProperties request + EXPECT_HMICALL("UI.SetGlobalProperties", + { + menuTitle = "Menu Title", + vrHelp = + { + { + position = 1, + --[=[ TODO: update after resolving APPLINK-16052 + + image = + { + imageType = "DYNAMIC", + value = strAppFolder .. "action.png" + },]=] + text = " SpaceBefore" + } + }, + --Checked below + -- menuIcon = + -- { + -- imageType = "DYNAMIC", + -- value = strAppFolder .. "action.png" + -- }, + vrHelpTitle = "VR help title", + keyboardProperties = + { + keyboardLayout = "QWERTY", + keypressMode = "SINGLE_KEYPRESS", + --[=[ TODO: update after resolving APPLINK-16047 + + limitedCharacterList = + { + "a" + },]=] + language = "EN-US", + autoCompleteText = "Daemon, Freedom" + } + }) + :Timeout(iTimeout) + :ValidIf(function(_,data) + return Check_menuIconParams(data) + end) + :Do(function(_,data) + --hmi side: sending UI.SetGlobalProperties response + self.hmiConnection:SendResponse(data.id, data.method, "SUCCESS", {}) + end) + + + + --mobile side: expect SetGlobalProperties response + EXPECT_RESPONSE(cid, { success = true, resultCode = "SUCCESS"}) + :Timeout(iTimeout) + + --mobile side: expect OnHashChange notification + EXPECT_NOTIFICATION("OnHashChange") + end + + --End test case PositiveResponseCheck.1.39 + ----------------------------------------------------------------------------------------- + + --Begin test case PositiveResponseCheck.1.40 + --Description: Check vrHelptext parameter contains space characters SpaceAfter_SpaceCharacter_ + + function Test:SetGlobalProperties_vrHelp_text_SpaceAfter_SpaceCharacter__SUCCESS() + + --mobile side: sending SetGlobalProperties request + local cid = self.mobileSession:SendRPC("SetGlobalProperties", + { + menuTitle = "Menu Title", + timeoutPrompt = + { + { + text = "Timeout prompt", + type = "TEXT" + } + }, + vrHelp = + { + { + position = 1, + image = + { + value = "action.png", + imageType = "DYNAMIC" + }, + text = "SpaceAfter " + } + }, + menuIcon = + { + value = "action.png", + imageType = "DYNAMIC" + }, + helpPrompt = + { + { + text = "Help prompt", + type = "TEXT" + } + }, + vrHelpTitle = "VR help title", + keyboardProperties = + { + keyboardLayout = "QWERTY", + keypressMode = "SINGLE_KEYPRESS", + limitedCharacterList = + { + "a" + }, + language = "EN-US", + autoCompleteText = "Daemon, Freedom" + } + }) + + + --hmi side: expect TTS.SetGlobalProperties request + EXPECT_HMICALL("TTS.SetGlobalProperties", + { + timeoutPrompt = + { + { + text = "Timeout prompt", + type = "TEXT" + } + }, + helpPrompt = + { + { + text = "Help prompt", + type = "TEXT" + } + } + }) + :Timeout(iTimeout) + :Do(function(_,data) + --hmi side: sending UI.SetGlobalProperties response + self.hmiConnection:SendResponse(data.id, data.method, "SUCCESS", {}) + end) + + + + --hmi side: expect UI.SetGlobalProperties request + EXPECT_HMICALL("UI.SetGlobalProperties", + { + menuTitle = "Menu Title", + vrHelp = + { + { + position = 1, + --[=[ TODO: update after resolving APPLINK-16052 + + image = + { + imageType = "DYNAMIC", + value = strAppFolder .. "action.png" + },]=] + text = "SpaceAfter " + } + }, + --Checked below + -- menuIcon = + -- { + -- imageType = "DYNAMIC", + -- value = strAppFolder .. "action.png" + -- }, + vrHelpTitle = "VR help title", + keyboardProperties = + { + keyboardLayout = "QWERTY", + keypressMode = "SINGLE_KEYPRESS", + --[=[ TODO: update after resolving APPLINK-16047 + + limitedCharacterList = + { + "a" + },]=] + language = "EN-US", + autoCompleteText = "Daemon, Freedom" + } + }) + :Timeout(iTimeout) + :ValidIf(function(_,data) + return Check_menuIconParams(data) + end) + :Do(function(_,data) + --hmi side: sending UI.SetGlobalProperties response + self.hmiConnection:SendResponse(data.id, data.method, "SUCCESS", {}) + end) + + + + --mobile side: expect SetGlobalProperties response + EXPECT_RESPONSE(cid, { success = true, resultCode = "SUCCESS"}) + :Timeout(iTimeout) + + --mobile side: expect OnHashChange notification + EXPECT_NOTIFICATION("OnHashChange") + end + + --End test case PositiveResponseCheck.1.40 + ----------------------------------------------------------------------------------------- + + --Begin test case PositiveResponseCheck.1.41 + --Description: Check vrHelptext parameter contains space characters Space_SpaceCharacter_In_SpaceCharacter_The_SpaceCharacter_Middle + + function Test:SetGlobalProperties_vrHelp_text_Space_SpaceCharacter_In_SpaceCharacter_The_SpaceCharacter_Middle_SUCCESS() + + --mobile side: sending SetGlobalProperties request + local cid = self.mobileSession:SendRPC("SetGlobalProperties", + { + menuTitle = "Menu Title", + timeoutPrompt = + { + { + text = "Timeout prompt", + type = "TEXT" + } + }, + vrHelp = + { + { + position = 1, + image = + { + value = "action.png", + imageType = "DYNAMIC" + }, + text = "Space In The Middle" + } + }, + menuIcon = + { + value = "action.png", + imageType = "DYNAMIC" + }, + helpPrompt = + { + { + text = "Help prompt", + type = "TEXT" + } + }, + vrHelpTitle = "VR help title", + keyboardProperties = + { + keyboardLayout = "QWERTY", + keypressMode = "SINGLE_KEYPRESS", + limitedCharacterList = + { + "a" + }, + language = "EN-US", + autoCompleteText = "Daemon, Freedom" + } + }) + + + --hmi side: expect TTS.SetGlobalProperties request + EXPECT_HMICALL("TTS.SetGlobalProperties", + { + timeoutPrompt = + { + { + text = "Timeout prompt", + type = "TEXT" + } + }, + helpPrompt = + { + { + text = "Help prompt", + type = "TEXT" + } + } + }) + :Timeout(iTimeout) + :Do(function(_,data) + --hmi side: sending UI.SetGlobalProperties response + self.hmiConnection:SendResponse(data.id, data.method, "SUCCESS", {}) + end) + + + + --hmi side: expect UI.SetGlobalProperties request + EXPECT_HMICALL("UI.SetGlobalProperties", + { + menuTitle = "Menu Title", + vrHelp = + { + { + position = 1, + --[=[ TODO: update after resolving APPLINK-16052 + + image = + { + imageType = "DYNAMIC", + value = strAppFolder .. "action.png" + },]=] + text = "Space In The Middle" + } + }, + --Checked below + -- menuIcon = + -- { + -- imageType = "DYNAMIC", + -- value = strAppFolder .. "action.png" + -- }, + vrHelpTitle = "VR help title", + keyboardProperties = + { + keyboardLayout = "QWERTY", + keypressMode = "SINGLE_KEYPRESS", + --[=[ TODO: update after resolving APPLINK-16047 + + limitedCharacterList = + { + "a" + },]=] + language = "EN-US", + autoCompleteText = "Daemon, Freedom" + } + }) + :Timeout(iTimeout) + :ValidIf(function(_,data) + return Check_menuIconParams(data) + end) + :Do(function(_,data) + --hmi side: sending UI.SetGlobalProperties response + self.hmiConnection:SendResponse(data.id, data.method, "SUCCESS", {}) + end) + + + + --mobile side: expect SetGlobalProperties response + EXPECT_RESPONSE(cid, { success = true, resultCode = "SUCCESS"}) + :Timeout(iTimeout) + + --mobile side: expect OnHashChange notification + EXPECT_NOTIFICATION("OnHashChange") + end + + --End test case PositiveResponseCheck.1.41 + ----------------------------------------------------------------------------------------- + + --Begin test case PositiveResponseCheck.1.42 + --Description: Check vrHelptext parameter contains space characters _SpaceCharacter_Space_SpaceCharacter_Every_SpaceCharacter_Where_SpaceCharacter_ + + function Test:SetGlobalProperties_vrHelp_text__SpaceCharacter_Space_SpaceCharacter_Every_SpaceCharacter_Where_SpaceCharacter__SUCCESS() + + --mobile side: sending SetGlobalProperties request + local cid = self.mobileSession:SendRPC("SetGlobalProperties", + { + menuTitle = "Menu Title", + timeoutPrompt = + { + { + text = "Timeout prompt", + type = "TEXT" + } + }, + vrHelp = + { + { + position = 1, + image = + { + value = "action.png", + imageType = "DYNAMIC" + }, + text = " Space Every Where " + } + }, + menuIcon = + { + value = "action.png", + imageType = "DYNAMIC" + }, + helpPrompt = + { + { + text = "Help prompt", + type = "TEXT" + } + }, + vrHelpTitle = "VR help title", + keyboardProperties = + { + keyboardLayout = "QWERTY", + keypressMode = "SINGLE_KEYPRESS", + limitedCharacterList = + { + "a" + }, + language = "EN-US", + autoCompleteText = "Daemon, Freedom" + } + }) + + + --hmi side: expect TTS.SetGlobalProperties request + EXPECT_HMICALL("TTS.SetGlobalProperties", + { + timeoutPrompt = + { + { + text = "Timeout prompt", + type = "TEXT" + } + }, + helpPrompt = + { + { + text = "Help prompt", + type = "TEXT" + } + } + }) + :Timeout(iTimeout) + :Do(function(_,data) + --hmi side: sending UI.SetGlobalProperties response + self.hmiConnection:SendResponse(data.id, data.method, "SUCCESS", {}) + end) + + + + --hmi side: expect UI.SetGlobalProperties request + EXPECT_HMICALL("UI.SetGlobalProperties", + { + menuTitle = "Menu Title", + vrHelp = + { + { + position = 1, + --[=[ TODO: update after resolving APPLINK-16052 + + image = + { + imageType = "DYNAMIC", + value = strAppFolder .. "action.png" + },]=] + text = " Space Every Where " + } + }, + --Checked below + -- menuIcon = + -- { + -- imageType = "DYNAMIC", + -- value = strAppFolder .. "action.png" + -- }, + vrHelpTitle = "VR help title", + keyboardProperties = + { + keyboardLayout = "QWERTY", + keypressMode = "SINGLE_KEYPRESS", + --[=[ TODO: update after resolving APPLINK-16047 + + limitedCharacterList = + { + "a" + },]=] + language = "EN-US", + autoCompleteText = "Daemon, Freedom" + } + }) + :Timeout(iTimeout) + :ValidIf(function(_,data) + return Check_menuIconParams(data) + end) + :Do(function(_,data) + --hmi side: sending UI.SetGlobalProperties response + self.hmiConnection:SendResponse(data.id, data.method, "SUCCESS", {}) + end) + + + + --mobile side: expect SetGlobalProperties response + EXPECT_RESPONSE(cid, { success = true, resultCode = "SUCCESS"}) + :Timeout(iTimeout) + + --mobile side: expect OnHashChange notification + EXPECT_NOTIFICATION("OnHashChange") + end + + --End test case PositiveResponseCheck.1.42 + ----------------------------------------------------------------------------------------- + + --Begin test case PositiveResponseCheck.1.43 + --Description: Check image: imageType parameter is valid data (STATIC) + + function Test:SetGlobalProperties_vrHelp_image_imageType_STATIC_SUCCESS() + + --mobile side: sending SetGlobalProperties request + local cid = self.mobileSession:SendRPC("SetGlobalProperties", + { + menuTitle = "Menu Title", + timeoutPrompt = + { + { + text = "Timeout prompt", + type = "TEXT" + } + }, + vrHelp = + { + { + position = 1, + image = + { + value = "action.png", + imageType = "STATIC" + }, + text = "VR help item" + } + }, + menuIcon = + { + value = "action.png", + imageType = "DYNAMIC" + }, + helpPrompt = + { + { + text = "Help prompt", + type = "TEXT" + } + }, + vrHelpTitle = "VR help title", + keyboardProperties = + { + keyboardLayout = "QWERTY", + keypressMode = "SINGLE_KEYPRESS", + limitedCharacterList = + { + "a" + }, + language = "EN-US", + autoCompleteText = "Daemon, Freedom" + } + }) + + + --hmi side: expect TTS.SetGlobalProperties request + EXPECT_HMICALL("TTS.SetGlobalProperties", + { + timeoutPrompt = + { + { + text = "Timeout prompt", + type = "TEXT" + } + }, + helpPrompt = + { + { + text = "Help prompt", + type = "TEXT" + } + } + }) + :Timeout(iTimeout) + :Do(function(_,data) + --hmi side: sending UI.SetGlobalProperties response + self.hmiConnection:SendResponse(data.id, data.method, "SUCCESS", {}) + end) + + + + --hmi side: expect UI.SetGlobalProperties request + EXPECT_HMICALL("UI.SetGlobalProperties", + { + menuTitle = "Menu Title", + vrHelp = + { + { + position = 1, + --[=[ TODO: update after resolving APPLINK-16052 + + image = + { + imageType = "STATIC", + value = "action.png" + },]=] + text = "VR help item" + } + }, + --Checked below + -- menuIcon = + -- { + -- imageType = "DYNAMIC", + -- value = strAppFolder .. "action.png" + -- }, + vrHelpTitle = "VR help title", + keyboardProperties = + { + keyboardLayout = "QWERTY", + keypressMode = "SINGLE_KEYPRESS", + --[=[ TODO: update after resolving APPLINK-16047 + + limitedCharacterList = + { + "a" + },]=] + language = "EN-US", + autoCompleteText = "Daemon, Freedom" + } + }) + :Timeout(iTimeout) + :ValidIf(function(_,data) + return Check_menuIconParams(data) + end) + :Do(function(_,data) + --hmi side: sending UI.SetGlobalProperties response + self.hmiConnection:SendResponse(data.id, data.method, "SUCCESS", {}) + end) + + + + --mobile side: expect SetGlobalProperties response + EXPECT_RESPONSE(cid, { success = true, resultCode = "SUCCESS"}) + :Timeout(iTimeout) + + --mobile side: expect OnHashChange notification + EXPECT_NOTIFICATION("OnHashChange") + end + + --End test case PositiveResponseCheck.1.43 + ----------------------------------------------------------------------------------------- + + --Begin test case PositiveResponseCheck.1.44 + --Description: Check image: imageType parameter is valid data (DYNAMIC) + + function Test:SetGlobalProperties_vrHelp_image_imageType_DYNAMIC_SUCCESS() + + --mobile side: sending SetGlobalProperties request + local cid = self.mobileSession:SendRPC("SetGlobalProperties", + { + menuTitle = "Menu Title", + timeoutPrompt = + { + { + text = "Timeout prompt", + type = "TEXT" + } + }, + vrHelp = + { + { + position = 1, + image = + { + value = "action.png", + imageType = "DYNAMIC" + }, + text = "VR help item" + } + }, + menuIcon = + { + value = "action.png", + imageType = "DYNAMIC" + }, + helpPrompt = + { + { + text = "Help prompt", + type = "TEXT" + } + }, + vrHelpTitle = "VR help title", + keyboardProperties = + { + keyboardLayout = "QWERTY", + keypressMode = "SINGLE_KEYPRESS", + limitedCharacterList = + { + "a" + }, + language = "EN-US", + autoCompleteText = "Daemon, Freedom" + } + }) + + + --hmi side: expect TTS.SetGlobalProperties request + EXPECT_HMICALL("TTS.SetGlobalProperties", + { + timeoutPrompt = + { + { + text = "Timeout prompt", + type = "TEXT" + } + }, + helpPrompt = + { + { + text = "Help prompt", + type = "TEXT" + } + } + }) + :Timeout(iTimeout) + :Do(function(_,data) + --hmi side: sending UI.SetGlobalProperties response + self.hmiConnection:SendResponse(data.id, data.method, "SUCCESS", {}) + end) + + + + --hmi side: expect UI.SetGlobalProperties request + EXPECT_HMICALL("UI.SetGlobalProperties", + { + menuTitle = "Menu Title", + vrHelp = + { + { + position = 1, + --[=[ TODO: update after resolving APPLINK-16052 + + image = + { + imageType = "DYNAMIC", + value = strAppFolder .. "action.png" + },]=] + text = "VR help item" + } + }, + --Checked below + -- menuIcon = + -- { + -- imageType = "DYNAMIC", + -- value = strAppFolder .. "action.png" + -- }, + vrHelpTitle = "VR help title", + keyboardProperties = + { + keyboardLayout = "QWERTY", + keypressMode = "SINGLE_KEYPRESS", + --[=[ TODO: update after resolving APPLINK-16047 + + limitedCharacterList = + { + "a" + },]=] + language = "EN-US", + autoCompleteText = "Daemon, Freedom" + } + }) + :Timeout(iTimeout) + :ValidIf(function(_,data) + return Check_menuIconParams(data) + end) + :Do(function(_,data) + --hmi side: sending UI.SetGlobalProperties response + self.hmiConnection:SendResponse(data.id, data.method, "SUCCESS", {}) + end) + + + + --mobile side: expect SetGlobalProperties response + EXPECT_RESPONSE(cid, { success = true, resultCode = "SUCCESS"}) + :Timeout(iTimeout) + + --mobile side: expect OnHashChange notification + EXPECT_NOTIFICATION("OnHashChange") + end + + --End test case PositiveResponseCheck.1.44 + ----------------------------------------------------------------------------------------- + + --Begin test case PositiveResponseCheck.1.45 + --Description: Check image: value parameter is lower bound + + function Test:SetGlobalProperties_vrHelp_image_value_IsLowerBound_0_INVALID_DATA() + + --mobile side: sending SetGlobalProperties request + local cid = self.mobileSession:SendRPC("SetGlobalProperties", + { + menuTitle = "Menu Title", + timeoutPrompt = + { + { + text = "Timeout prompt", + type = "TEXT" + } + }, + vrHelp = + { + { + position = 1, + image = + { + value = "", + imageType = "DYNAMIC" + }, + text = "VR help item" + } + }, + menuIcon = + { + value = "action.png", + imageType = "DYNAMIC" + }, + helpPrompt = + { + { + text = "Help prompt", + type = "TEXT" + } + }, + vrHelpTitle = "VR help title", + keyboardProperties = + { + keyboardLayout = "QWERTY", + keypressMode = "SINGLE_KEYPRESS", + limitedCharacterList = + { + "a" + }, + language = "EN-US", + autoCompleteText = "Daemon, Freedom" + } + }) + + + --mobile side: expect SetGlobalProperties response + EXPECT_RESPONSE(cid, { success = false, resultCode = "INVALID_DATA"}) + :Timeout(iTimeout) + + --mobile side: expect OnHashChange notification is not send to mobile + EXPECT_NOTIFICATION("OnHashChange") + :Times(0) + end + + --End test case PositiveResponseCheck.1.45 + ----------------------------------------------------------------------------------------- + + --Reason: can not put file with file name length is 65535 + --Begin test case PositiveResponseCheck.1.46 + --Description: Check image: value parameter is upper bound + + --It is not able to test because max-length of file name is 255. + + --End test case PositiveResponseCheck.1.45 + ----------------------------------------------------------------------------------------- + + + --Begin test case PositiveResponseCheck.1.47 + --Description: Check image: value parameter contains space character _SpaceCharacter_SpaceBefore + + function Test:SetGlobalProperties_vrHelp_image_value__SpaceCharacter_SpaceBefore_SUCCESS() + + --mobile side: sending SetGlobalProperties request + local cid = self.mobileSession:SendRPC("SetGlobalProperties", + { + menuTitle = "Menu Title", + timeoutPrompt = + { + { + text = "Timeout prompt", + type = "TEXT" + } + }, + vrHelp = + { + { + position = 1, + image = + { + value = " SpaceBefore", + imageType = "DYNAMIC" + }, + text = "VR help item" + } + }, + menuIcon = + { + value = "action.png", + imageType = "DYNAMIC" + }, + helpPrompt = + { + { + text = "Help prompt", + type = "TEXT" + } + }, + vrHelpTitle = "VR help title", + keyboardProperties = + { + keyboardLayout = "QWERTY", + keypressMode = "SINGLE_KEYPRESS", + limitedCharacterList = + { + "a" + }, + language = "EN-US", + autoCompleteText = "Daemon, Freedom" + } + }) + + + --hmi side: expect TTS.SetGlobalProperties request + EXPECT_HMICALL("TTS.SetGlobalProperties", + { + timeoutPrompt = + { + { + text = "Timeout prompt", + type = "TEXT" + } + }, + helpPrompt = + { + { + text = "Help prompt", + type = "TEXT" + } + } + }) + :Timeout(iTimeout) + :Do(function(_,data) + --hmi side: sending UI.SetGlobalProperties response + self.hmiConnection:SendResponse(data.id, data.method, "SUCCESS", {}) + end) + + + + --hmi side: expect UI.SetGlobalProperties request + EXPECT_HMICALL("UI.SetGlobalProperties", + { + menuTitle = "Menu Title", + vrHelp = + { + { + position = 1, + --[=[ TODO: update after resolving APPLINK-16052 + + image = + { + imageType = "DYNAMIC", + value = strAppFolder .. " SpaceBefore" + },]=] + text = "VR help item" + } + }, + --Checked below + -- menuIcon = + -- { + -- imageType = "DYNAMIC", + -- value = strAppFolder .. "action.png" + -- }, + vrHelpTitle = "VR help title", + keyboardProperties = + { + keyboardLayout = "QWERTY", + keypressMode = "SINGLE_KEYPRESS", + --[=[ TODO: update after resolving APPLINK-16047 + + limitedCharacterList = + { + "a" + },]=] + language = "EN-US", + autoCompleteText = "Daemon, Freedom" + } + }) + :Timeout(iTimeout) + :ValidIf(function(_,data) + return Check_menuIconParams(data) + end) + :Do(function(_,data) + --hmi side: sending UI.SetGlobalProperties response + self.hmiConnection:SendResponse(data.id, data.method, "SUCCESS", {}) + end) + + + + --mobile side: expect SetGlobalProperties response + EXPECT_RESPONSE(cid, { success = true, resultCode = "SUCCESS"}) + :Timeout(iTimeout) + + --mobile side: expect OnHashChange notification + EXPECT_NOTIFICATION("OnHashChange") + end + + --End test case PositiveResponseCheck.1.47 + ----------------------------------------------------------------------------------------- + + --Begin test case PositiveResponseCheck.1.48 + --Description: Check image: value parameter contains space character SpaceAfter_SpaceCharacter_ + + function Test:SetGlobalProperties_vrHelp_image_value_SpaceAfter_SpaceCharacter__SUCCESS() + + --mobile side: sending SetGlobalProperties request + local cid = self.mobileSession:SendRPC("SetGlobalProperties", + { + menuTitle = "Menu Title", + timeoutPrompt = + { + { + text = "Timeout prompt", + type = "TEXT" + } + }, + vrHelp = + { + { + position = 1, + image = + { + value = "SpaceAfter ", + imageType = "DYNAMIC" + }, + text = "VR help item" + } + }, + menuIcon = + { + value = "action.png", + imageType = "DYNAMIC" + }, + helpPrompt = + { + { + text = "Help prompt", + type = "TEXT" + } + }, + vrHelpTitle = "VR help title", + keyboardProperties = + { + keyboardLayout = "QWERTY", + keypressMode = "SINGLE_KEYPRESS", + limitedCharacterList = + { + "a" + }, + language = "EN-US", + autoCompleteText = "Daemon, Freedom" + } + }) + + + --hmi side: expect TTS.SetGlobalProperties request + EXPECT_HMICALL("TTS.SetGlobalProperties", + { + timeoutPrompt = + { + { + text = "Timeout prompt", + type = "TEXT" + } + }, + helpPrompt = + { + { + text = "Help prompt", + type = "TEXT" + } + } + }) + :Timeout(iTimeout) + :Do(function(_,data) + --hmi side: sending UI.SetGlobalProperties response + self.hmiConnection:SendResponse(data.id, data.method, "SUCCESS", {}) + end) + + + + --hmi side: expect UI.SetGlobalProperties request + EXPECT_HMICALL("UI.SetGlobalProperties", + { + menuTitle = "Menu Title", + vrHelp = + { + { + position = 1, + --[=[ TODO: update after resolving APPLINK-16052 + + image = + { + imageType = "DYNAMIC", + value = strAppFolder .. "SpaceAfter " + },]=] + text = "VR help item" + } + }, + --Checked below + -- menuIcon = + -- { + -- imageType = "DYNAMIC", + -- value = strAppFolder .. "action.png" + -- }, + vrHelpTitle = "VR help title", + keyboardProperties = + { + keyboardLayout = "QWERTY", + keypressMode = "SINGLE_KEYPRESS", + --[=[ TODO: update after resolving APPLINK-16047 + + limitedCharacterList = + { + "a" + },]=] + language = "EN-US", + autoCompleteText = "Daemon, Freedom" + } + }) + :Timeout(iTimeout) + :ValidIf(function(_,data) + return Check_menuIconParams(data) + end) + :Do(function(_,data) + --hmi side: sending UI.SetGlobalProperties response + self.hmiConnection:SendResponse(data.id, data.method, "SUCCESS", {}) + end) + + + + --mobile side: expect SetGlobalProperties response + EXPECT_RESPONSE(cid, { success = true, resultCode = "SUCCESS"}) + :Timeout(iTimeout) + + --mobile side: expect OnHashChange notification + EXPECT_NOTIFICATION("OnHashChange") + end + + --End test case PositiveResponseCheck.1.48 + ----------------------------------------------------------------------------------------- + + --Begin test case PositiveResponseCheck.1.49 + --Description: Check image: value parameter contains space character Space_SpaceCharacter_In_SpaceCharacter_The_SpaceCharacter_Middle + + function Test:SetGlobalProperties_vrHelp_image_value_Space_SpaceCharacter_In_SpaceCharacter_The_SpaceCharacter_Middle_SUCCESS() + + --mobile side: sending SetGlobalProperties request + local cid = self.mobileSession:SendRPC("SetGlobalProperties", + { + menuTitle = "Menu Title", + timeoutPrompt = + { + { + text = "Timeout prompt", + type = "TEXT" + } + }, + vrHelp = + { + { + position = 1, + image = + { + value = "Space In The Middle", + imageType = "DYNAMIC" + }, + text = "VR help item" + } + }, + menuIcon = + { + value = "action.png", + imageType = "DYNAMIC" + }, + helpPrompt = + { + { + text = "Help prompt", + type = "TEXT" + } + }, + vrHelpTitle = "VR help title", + keyboardProperties = + { + keyboardLayout = "QWERTY", + keypressMode = "SINGLE_KEYPRESS", + limitedCharacterList = + { + "a" + }, + language = "EN-US", + autoCompleteText = "Daemon, Freedom" + } + }) + + + --hmi side: expect TTS.SetGlobalProperties request + EXPECT_HMICALL("TTS.SetGlobalProperties", + { + timeoutPrompt = + { + { + text = "Timeout prompt", + type = "TEXT" + } + }, + helpPrompt = + { + { + text = "Help prompt", + type = "TEXT" + } + } + }) + :Timeout(iTimeout) + :Do(function(_,data) + --hmi side: sending UI.SetGlobalProperties response + self.hmiConnection:SendResponse(data.id, data.method, "SUCCESS", {}) + end) + + + + --hmi side: expect UI.SetGlobalProperties request + EXPECT_HMICALL("UI.SetGlobalProperties", + { + menuTitle = "Menu Title", + vrHelp = + { + { + position = 1, + --[=[ TODO: update after resolving APPLINK-16052 + + image = + { + imageType = "DYNAMIC", + value = strAppFolder .. "Space In The Middle" + },]=] + text = "VR help item" + } + }, + --Checked below + -- menuIcon = + -- { + -- imageType = "DYNAMIC", + -- value = strAppFolder .. "action.png" + -- }, + vrHelpTitle = "VR help title", + keyboardProperties = + { + keyboardLayout = "QWERTY", + keypressMode = "SINGLE_KEYPRESS", + --[=[ TODO: update after resolving APPLINK-16047 + + limitedCharacterList = + { + "a" + },]=] + language = "EN-US", + autoCompleteText = "Daemon, Freedom" + } + }) + :Timeout(iTimeout) + :ValidIf(function(_,data) + return Check_menuIconParams(data) + end) + :Do(function(_,data) + --hmi side: sending UI.SetGlobalProperties response + self.hmiConnection:SendResponse(data.id, data.method, "SUCCESS", {}) + end) + + + + --mobile side: expect SetGlobalProperties response + EXPECT_RESPONSE(cid, { success = true, resultCode = "SUCCESS"}) + :Timeout(iTimeout) + + --mobile side: expect OnHashChange notification + EXPECT_NOTIFICATION("OnHashChange") + end + + --End test case PositiveResponseCheck.1.49 + ----------------------------------------------------------------------------------------- + + --Begin test case PositiveResponseCheck.1.50 + --Description: Check image: value parameter contains space character _SpaceCharacter_Space_SpaceCharacter_Every_SpaceCharacter_Where_SpaceCharacter_ + + function Test:SetGlobalProperties_vrHelp_image_value__SpaceCharacter_Space_SpaceCharacter_Every_SpaceCharacter_Where_SpaceCharacter__SUCCESS() + + --mobile side: sending SetGlobalProperties request + local cid = self.mobileSession:SendRPC("SetGlobalProperties", + { + menuTitle = "Menu Title", + timeoutPrompt = + { + { + text = "Timeout prompt", + type = "TEXT" + } + }, + vrHelp = + { + { + position = 1, + image = + { + value = " Space Every Where ", + imageType = "DYNAMIC" + }, + text = "VR help item" + } + }, + menuIcon = + { + value = "action.png", + imageType = "DYNAMIC" + }, + helpPrompt = + { + { + text = "Help prompt", + type = "TEXT" + } + }, + vrHelpTitle = "VR help title", + keyboardProperties = + { + keyboardLayout = "QWERTY", + keypressMode = "SINGLE_KEYPRESS", + limitedCharacterList = + { + "a" + }, + language = "EN-US", + autoCompleteText = "Daemon, Freedom" + } + }) + + + --hmi side: expect TTS.SetGlobalProperties request + EXPECT_HMICALL("TTS.SetGlobalProperties", + { + timeoutPrompt = + { + { + text = "Timeout prompt", + type = "TEXT" + } + }, + helpPrompt = + { + { + text = "Help prompt", + type = "TEXT" + } + } + }) + :Timeout(iTimeout) + :Do(function(_,data) + --hmi side: sending UI.SetGlobalProperties response + self.hmiConnection:SendResponse(data.id, data.method, "SUCCESS", {}) + end) + + + + --hmi side: expect UI.SetGlobalProperties request + EXPECT_HMICALL("UI.SetGlobalProperties", + { + menuTitle = "Menu Title", + vrHelp = + { + { + position = 1, + --[=[ TODO: update after resolving APPLINK-16052 + + image = + { + imageType = "DYNAMIC", + value = strAppFolder .. " Space Every Where " + },]=] + text = "VR help item" + } + }, + --Checked below + -- menuIcon = + -- { + -- imageType = "DYNAMIC", + -- value = strAppFolder .. "action.png" + -- }, + vrHelpTitle = "VR help title", + keyboardProperties = + { + keyboardLayout = "QWERTY", + keypressMode = "SINGLE_KEYPRESS", + --[=[ TODO: update after resolving APPLINK-16047 + + limitedCharacterList = + { + "a" + },]=] + language = "EN-US", + autoCompleteText = "Daemon, Freedom" + } + }) + :Timeout(iTimeout) + :ValidIf(function(_,data) + return Check_menuIconParams(data) + end) + :Do(function(_,data) + --hmi side: sending UI.SetGlobalProperties response + self.hmiConnection:SendResponse(data.id, data.method, "SUCCESS", {}) + end) + + + + --mobile side: expect SetGlobalProperties response + EXPECT_RESPONSE(cid, { success = true, resultCode = "SUCCESS"}) + :Timeout(iTimeout) + + --mobile side: expect OnHashChange notification + EXPECT_NOTIFICATION("OnHashChange") + end + + --End test case PositiveResponseCheck.1.50 + ----------------------------------------------------------------------------------------- + + --Begin test case PositiveResponseCheck.1.51 + --Description: Check image: value parameter is lower bound of an existing file + + function Test:SetGlobalProperties_vrHelp_image_value_IsLowerBoundOfRealImageName_SUCCESS() + + --mobile side: sending SetGlobalProperties request + local cid = self.mobileSession:SendRPC("SetGlobalProperties", + { + menuTitle = "Menu Title", + timeoutPrompt = + { + { + text = "Timeout prompt", + type = "TEXT" + } + }, + vrHelp = + { + { + position = 1, + image = + { + value = "a", + imageType = "DYNAMIC" + }, + text = "VR help item" + } + }, + menuIcon = + { + value = "action.png", + imageType = "DYNAMIC" + }, + helpPrompt = + { + { + text = "Help prompt", + type = "TEXT" + } + }, + vrHelpTitle = "VR help title", + keyboardProperties = + { + keyboardLayout = "QWERTY", + keypressMode = "SINGLE_KEYPRESS", + limitedCharacterList = + { + "a" + }, + language = "EN-US", + autoCompleteText = "Daemon, Freedom" + } + }) + + + --hmi side: expect TTS.SetGlobalProperties request + EXPECT_HMICALL("TTS.SetGlobalProperties", + { + timeoutPrompt = + { + { + text = "Timeout prompt", + type = "TEXT" + } + }, + helpPrompt = + { + { + text = "Help prompt", + type = "TEXT" + } + } + }) + :Timeout(iTimeout) + :Do(function(_,data) + --hmi side: sending UI.SetGlobalProperties response + self.hmiConnection:SendResponse(data.id, data.method, "SUCCESS", {}) + end) + + + + --hmi side: expect UI.SetGlobalProperties request + EXPECT_HMICALL("UI.SetGlobalProperties", + { + menuTitle = "Menu Title", + vrHelp = + { + { + position = 1, + --[=[ TODO: update after resolving APPLINK-16052 + + image = + { + imageType = "DYNAMIC", + value = strAppFolder .. "a" + },]=] + text = "VR help item" + } + }, + --Checked below + -- menuIcon = + -- { + -- imageType = "DYNAMIC", + -- value = strAppFolder .. "action.png" + -- }, + vrHelpTitle = "VR help title", + keyboardProperties = + { + keyboardLayout = "QWERTY", + keypressMode = "SINGLE_KEYPRESS", + --[=[ TODO: update after resolving APPLINK-16047 + + limitedCharacterList = + { + "a" + },]=] + language = "EN-US", + autoCompleteText = "Daemon, Freedom" + } + }) + :Timeout(iTimeout) + :ValidIf(function(_,data) + return Check_menuIconParams(data) + end) + :Do(function(_,data) + --hmi side: sending UI.SetGlobalProperties response + self.hmiConnection:SendResponse(data.id, data.method, "SUCCESS", {}) + end) + + + + --mobile side: expect SetGlobalProperties response + EXPECT_RESPONSE(cid, { success = true, resultCode = "SUCCESS"}) + :Timeout(iTimeout) + + --mobile side: expect OnHashChange notification + EXPECT_NOTIFICATION("OnHashChange") + end + + --End test case PositiveResponseCheck.1.51 + ----------------------------------------------------------------------------------------- + + --Begin test case PositiveResponseCheck.1.52 + --Description: Check image: value parameter is upper bound of an existing file + + function Test:SetGlobalProperties_vrHelp_image_value_IsUpperBoundOfRealImageName_SUCCESS() + + --mobile side: sending SetGlobalProperties request + local cid = self.mobileSession:SendRPC("SetGlobalProperties", + { + menuTitle = "Menu Title", + timeoutPrompt = + { + { + text = "Timeout prompt", + type = "TEXT" + } + }, + vrHelp = + { + { + position = 1, + image = + { + value = strMaxLengthFileName255, + imageType = "DYNAMIC" + }, + text = "VR help item" + } + }, + menuIcon = + { + value = "action.png", + imageType = "DYNAMIC" + }, + helpPrompt = + { + { + text = "Help prompt", + type = "TEXT" + } + }, + vrHelpTitle = "VR help title", + keyboardProperties = + { + keyboardLayout = "QWERTY", + keypressMode = "SINGLE_KEYPRESS", + limitedCharacterList = + { + "a" + }, + language = "EN-US", + autoCompleteText = "Daemon, Freedom" + } + }) + + + --hmi side: expect TTS.SetGlobalProperties request + EXPECT_HMICALL("TTS.SetGlobalProperties", + { + timeoutPrompt = + { + { + text = "Timeout prompt", + type = "TEXT" + } + }, + helpPrompt = + { + { + text = "Help prompt", + type = "TEXT" + } + } + }) + :Timeout(iTimeout) + :Do(function(_,data) + --hmi side: sending UI.SetGlobalProperties response + self.hmiConnection:SendResponse(data.id, data.method, "SUCCESS", {}) + end) + + + + --hmi side: expect UI.SetGlobalProperties request + EXPECT_HMICALL("UI.SetGlobalProperties", + { + menuTitle = "Menu Title", + vrHelp = + { + { + position = 1, + --[=[ TODO: update after resolving APPLINK-16052 + + image = + { + imageType = "DYNAMIC", + value = strAppFolder .. strMaxLengthFileName255 + },]=] + text = "VR help item" + } + }, + --Checked below + -- menuIcon = + -- { + -- imageType = "DYNAMIC", + -- value = strAppFolder .. "action.png" + -- }, + vrHelpTitle = "VR help title", + keyboardProperties = + { + keyboardLayout = "QWERTY", + keypressMode = "SINGLE_KEYPRESS", + --[=[ TODO: update after resolving APPLINK-16047 + + limitedCharacterList = + { + "a" + },]=] + language = "EN-US", + autoCompleteText = "Daemon, Freedom" + } + }) + :Timeout(iTimeout) + :ValidIf(function(_,data) + return Check_menuIconParams(data) + end) + :Do(function(_,data) + --hmi side: sending UI.SetGlobalProperties response + self.hmiConnection:SendResponse(data.id, data.method, "SUCCESS", {}) + end) + + + + --mobile side: expect SetGlobalProperties response + EXPECT_RESPONSE(cid, { success = true, resultCode = "SUCCESS"}) + :Timeout(iTimeout) + + --mobile side: expect OnHashChange notification + EXPECT_NOTIFICATION("OnHashChange") + end + + --End test case PositiveResponseCheck.1.52 + ----------------------------------------------------------------------------------------- + + --Begin test case PositiveResponseCheck.1.53 + --Description: Check menuTitle parameter is lower bound + + function Test:SetGlobalProperties_menuTitle_IsLowerBound_1_SUCCESS() + + --mobile side: sending SetGlobalProperties request + local cid = self.mobileSession:SendRPC("SetGlobalProperties", + { + menuTitle = "q", + timeoutPrompt = + { + { + text = "Timeout prompt", + type = "TEXT" + } + }, + vrHelp = + { + { + position = 1, + image = + { + value = "action.png", + imageType = "DYNAMIC" + }, + text = "VR help item" + } + }, + menuIcon = + { + value = "action.png", + imageType = "DYNAMIC" + }, + helpPrompt = + { + { + text = "Help prompt", + type = "TEXT" + } + }, + vrHelpTitle = "VR help title", + keyboardProperties = + { + keyboardLayout = "QWERTY", + keypressMode = "SINGLE_KEYPRESS", + limitedCharacterList = + { + "a" + }, + language = "EN-US", + autoCompleteText = "Daemon, Freedom" + } + }) + + + --hmi side: expect TTS.SetGlobalProperties request + EXPECT_HMICALL("TTS.SetGlobalProperties", + { + timeoutPrompt = + { + { + text = "Timeout prompt", + type = "TEXT" + } + }, + helpPrompt = + { + { + text = "Help prompt", + type = "TEXT" + } + } + }) + :Timeout(iTimeout) + :Do(function(_,data) + --hmi side: sending UI.SetGlobalProperties response + self.hmiConnection:SendResponse(data.id, data.method, "SUCCESS", {}) + end) + + + + --hmi side: expect UI.SetGlobalProperties request + EXPECT_HMICALL("UI.SetGlobalProperties", + { + menuTitle = "q", + vrHelp = + { + { + position = 1, + --[=[ TODO: update after resolving APPLINK-16052 + + image = + { + imageType = "DYNAMIC", + value = strAppFolder .. "action.png" + },]=] + text = "VR help item" + } + }, + --Checked below + -- menuIcon = + -- { + -- imageType = "DYNAMIC", + -- value = strAppFolder .. "action.png" + -- }, + vrHelpTitle = "VR help title", + keyboardProperties = + { + keyboardLayout = "QWERTY", + keypressMode = "SINGLE_KEYPRESS", + --[=[ TODO: update after resolving APPLINK-16047 + + limitedCharacterList = + { + "a" + },]=] + language = "EN-US", + autoCompleteText = "Daemon, Freedom" + } + }) + :Timeout(iTimeout) + :ValidIf(function(_,data) + return Check_menuIconParams(data) + end) + :Do(function(_,data) + --hmi side: sending UI.SetGlobalProperties response + self.hmiConnection:SendResponse(data.id, data.method, "SUCCESS", {}) + end) + + + + --mobile side: expect SetGlobalProperties response + EXPECT_RESPONSE(cid, { success = true, resultCode = "SUCCESS"}) + :Timeout(iTimeout) + + --mobile side: expect OnHashChange notification + EXPECT_NOTIFICATION("OnHashChange") + end + + --End test case PositiveResponseCheck.1.53 + ----------------------------------------------------------------------------------------- + + --Begin test case PositiveResponseCheck.1.54 + --Description: Check menuTitle parameter is upper bound + + function Test:SetGlobalProperties_menuTitle_IsUpperBound_500_SUCCESS() + + --mobile side: sending SetGlobalProperties request + local cid = self.mobileSession:SendRPC("SetGlobalProperties", + { + menuTitle = "qA1_wB2_eA3_rB4_tA5_yB6_uA7_iB8_oA9_pB0_aA1_sB2_dA3_fB4_gA5_hB6_jA7_kB8_lA9_zB0_xA1_cB2_vA3_bB4_nA5_mB6_qA7_wB8_eA9_rB0_tA1_yB2_uA3_iB4_oA5_pB6_aA7_sB8_dA9_fB0_gA1_hB2_jA3_kB4_lA5_zB6_xA7_cB8_vA9_bB0_nA1_mB2_qA3_wB4_eA5_rB6_tA7_yB8_uA9_iB0_oA1_pB2_aA3_sB4_dA5_fB6_gA7_hB8_jA9_kB0_lA1_zB2_xA3_cB4_vA5_bB6_nA7_mB8_qA9_wB0_eA1_rB2_tA3_yB4_uA5_iB6_oA7_pB8_aA9_sB0_dA1_fB2_gA3_hB4_jA5_kB6_lA7_zB8_xA9_cB0_vA1_bB2_nA3_mB4_qA5_wB6_eA7_rB8_tA9_yB0_uA1_iB2_oA3_pB4_aA5_sB6_dA7_fB8_gA9_hB0_jA1_kB2_lA3_zB4_xA5_", + timeoutPrompt = + { + { + text = "Timeout prompt", + type = "TEXT" + } + }, + vrHelp = + { + { + position = 1, + image = + { + value = "action.png", + imageType = "DYNAMIC" + }, + text = "VR help item" + } + }, + menuIcon = + { + value = "action.png", + imageType = "DYNAMIC" + }, + helpPrompt = + { + { + text = "Help prompt", + type = "TEXT" + } + }, + vrHelpTitle = "VR help title", + keyboardProperties = + { + keyboardLayout = "QWERTY", + keypressMode = "SINGLE_KEYPRESS", + limitedCharacterList = + { + "a" + }, + language = "EN-US", + autoCompleteText = "Daemon, Freedom" + } + }) + + + --hmi side: expect TTS.SetGlobalProperties request + EXPECT_HMICALL("TTS.SetGlobalProperties", + { + timeoutPrompt = + { + { + text = "Timeout prompt", + type = "TEXT" + } + }, + helpPrompt = + { + { + text = "Help prompt", + type = "TEXT" + } + } + }) + :Timeout(iTimeout) + :Do(function(_,data) + --hmi side: sending UI.SetGlobalProperties response + self.hmiConnection:SendResponse(data.id, data.method, "SUCCESS", {}) + end) + + + + --hmi side: expect UI.SetGlobalProperties request + EXPECT_HMICALL("UI.SetGlobalProperties", + { + menuTitle = "qA1_wB2_eA3_rB4_tA5_yB6_uA7_iB8_oA9_pB0_aA1_sB2_dA3_fB4_gA5_hB6_jA7_kB8_lA9_zB0_xA1_cB2_vA3_bB4_nA5_mB6_qA7_wB8_eA9_rB0_tA1_yB2_uA3_iB4_oA5_pB6_aA7_sB8_dA9_fB0_gA1_hB2_jA3_kB4_lA5_zB6_xA7_cB8_vA9_bB0_nA1_mB2_qA3_wB4_eA5_rB6_tA7_yB8_uA9_iB0_oA1_pB2_aA3_sB4_dA5_fB6_gA7_hB8_jA9_kB0_lA1_zB2_xA3_cB4_vA5_bB6_nA7_mB8_qA9_wB0_eA1_rB2_tA3_yB4_uA5_iB6_oA7_pB8_aA9_sB0_dA1_fB2_gA3_hB4_jA5_kB6_lA7_zB8_xA9_cB0_vA1_bB2_nA3_mB4_qA5_wB6_eA7_rB8_tA9_yB0_uA1_iB2_oA3_pB4_aA5_sB6_dA7_fB8_gA9_hB0_jA1_kB2_lA3_zB4_xA5_", + vrHelp = + { + { + position = 1, + --[=[ TODO: update after resolving APPLINK-16052 + + image = + { + imageType = "DYNAMIC", + value = strAppFolder .. "action.png" + },]=] + text = "VR help item" + } + }, + --Checked below + -- menuIcon = + -- { + -- imageType = "DYNAMIC", + -- value = strAppFolder .. "action.png" + -- }, + vrHelpTitle = "VR help title", + keyboardProperties = + { + keyboardLayout = "QWERTY", + keypressMode = "SINGLE_KEYPRESS", + --[=[ TODO: update after resolving APPLINK-16047 + + limitedCharacterList = + { + "a" + },]=] + language = "EN-US", + autoCompleteText = "Daemon, Freedom" + } + }) + :Timeout(iTimeout) + :ValidIf(function(_,data) + return Check_menuIconParams(data) + end) + :Do(function(_,data) + --hmi side: sending UI.SetGlobalProperties response + self.hmiConnection:SendResponse(data.id, data.method, "SUCCESS", {}) + end) + + + + --mobile side: expect SetGlobalProperties response + EXPECT_RESPONSE(cid, { success = true, resultCode = "SUCCESS"}) + :Timeout(iTimeout) + + --mobile side: expect OnHashChange notification + EXPECT_NOTIFICATION("OnHashChange") + end + + --End test case PositiveResponseCheck.1.54 + ----------------------------------------------------------------------------------------- + + --Begin test case PositiveResponseCheck.1.55 + --Description: Check menuTitle parameter contains space characters _SpaceCharacter_SpaceBefore + + function Test:SetGlobalProperties_menuTitle__SpaceCharacter_SpaceBefore_SUCCESS() + + --mobile side: sending SetGlobalProperties request + local cid = self.mobileSession:SendRPC("SetGlobalProperties", + { + menuTitle = " SpaceBefore", + timeoutPrompt = + { + { + text = "Timeout prompt", + type = "TEXT" + } + }, + vrHelp = + { + { + position = 1, + image = + { + value = "action.png", + imageType = "DYNAMIC" + }, + text = "VR help item" + } + }, + menuIcon = + { + value = "action.png", + imageType = "DYNAMIC" + }, + helpPrompt = + { + { + text = "Help prompt", + type = "TEXT" + } + }, + vrHelpTitle = "VR help title", + keyboardProperties = + { + keyboardLayout = "QWERTY", + keypressMode = "SINGLE_KEYPRESS", + limitedCharacterList = + { + "a" + }, + language = "EN-US", + autoCompleteText = "Daemon, Freedom" + } + }) + + + --hmi side: expect TTS.SetGlobalProperties request + EXPECT_HMICALL("TTS.SetGlobalProperties", + { + timeoutPrompt = + { + { + text = "Timeout prompt", + type = "TEXT" + } + }, + helpPrompt = + { + { + text = "Help prompt", + type = "TEXT" + } + } + }) + :Timeout(iTimeout) + :Do(function(_,data) + --hmi side: sending UI.SetGlobalProperties response + self.hmiConnection:SendResponse(data.id, data.method, "SUCCESS", {}) + end) + + + + --hmi side: expect UI.SetGlobalProperties request + EXPECT_HMICALL("UI.SetGlobalProperties", + { + menuTitle = " SpaceBefore", + vrHelp = + { + { + position = 1, + --[=[ TODO: update after resolving APPLINK-16052 + + image = + { + imageType = "DYNAMIC", + value = strAppFolder .. "action.png" + },]=] + text = "VR help item" + } + }, + --Checked below + -- menuIcon = + -- { + -- imageType = "DYNAMIC", + -- value = strAppFolder .. "action.png" + -- }, + vrHelpTitle = "VR help title", + keyboardProperties = + { + keyboardLayout = "QWERTY", + keypressMode = "SINGLE_KEYPRESS", + --[=[ TODO: update after resolving APPLINK-16047 + + limitedCharacterList = + { + "a" + },]=] + language = "EN-US", + autoCompleteText = "Daemon, Freedom" + } + }) + :Timeout(iTimeout) + :ValidIf(function(_,data) + return Check_menuIconParams(data) + end) + :Do(function(_,data) + --hmi side: sending UI.SetGlobalProperties response + self.hmiConnection:SendResponse(data.id, data.method, "SUCCESS", {}) + end) + + + + --mobile side: expect SetGlobalProperties response + EXPECT_RESPONSE(cid, { success = true, resultCode = "SUCCESS"}) + :Timeout(iTimeout) + + --mobile side: expect OnHashChange notification + EXPECT_NOTIFICATION("OnHashChange") + end + + --End test case PositiveResponseCheck.1.55 + ----------------------------------------------------------------------------------------- + + --Begin test case PositiveResponseCheck.1.56 + --Description: Check menuTitle parameter contains space characters SpaceAfter_SpaceCharacter_ + + function Test:SetGlobalProperties_menuTitle_SpaceAfter_SpaceCharacter__SUCCESS() + + --mobile side: sending SetGlobalProperties request + local cid = self.mobileSession:SendRPC("SetGlobalProperties", + { + menuTitle = "SpaceAfter ", + timeoutPrompt = + { + { + text = "Timeout prompt", + type = "TEXT" + } + }, + vrHelp = + { + { + position = 1, + image = + { + value = "action.png", + imageType = "DYNAMIC" + }, + text = "VR help item" + } + }, + menuIcon = + { + value = "action.png", + imageType = "DYNAMIC" + }, + helpPrompt = + { + { + text = "Help prompt", + type = "TEXT" + } + }, + vrHelpTitle = "VR help title", + keyboardProperties = + { + keyboardLayout = "QWERTY", + keypressMode = "SINGLE_KEYPRESS", + limitedCharacterList = + { + "a" + }, + language = "EN-US", + autoCompleteText = "Daemon, Freedom" + } + }) + + + --hmi side: expect TTS.SetGlobalProperties request + EXPECT_HMICALL("TTS.SetGlobalProperties", + { + timeoutPrompt = + { + { + text = "Timeout prompt", + type = "TEXT" + } + }, + helpPrompt = + { + { + text = "Help prompt", + type = "TEXT" + } + } + }) + :Timeout(iTimeout) + :Do(function(_,data) + --hmi side: sending UI.SetGlobalProperties response + self.hmiConnection:SendResponse(data.id, data.method, "SUCCESS", {}) + end) + + + + --hmi side: expect UI.SetGlobalProperties request + EXPECT_HMICALL("UI.SetGlobalProperties", + { + menuTitle = "SpaceAfter ", + vrHelp = + { + { + position = 1, + --[=[ TODO: update after resolving APPLINK-16052 + + image = + { + imageType = "DYNAMIC", + value = strAppFolder .. "action.png" + },]=] + text = "VR help item" + } + }, + --Checked below + -- menuIcon = + -- { + -- imageType = "DYNAMIC", + -- value = strAppFolder .. "action.png" + -- }, + vrHelpTitle = "VR help title", + keyboardProperties = + { + keyboardLayout = "QWERTY", + keypressMode = "SINGLE_KEYPRESS", + --[=[ TODO: update after resolving APPLINK-16047 + + limitedCharacterList = + { + "a" + },]=] + language = "EN-US", + autoCompleteText = "Daemon, Freedom" + } + }) + :Timeout(iTimeout) + :ValidIf(function(_,data) + return Check_menuIconParams(data) + end) + :Do(function(_,data) + --hmi side: sending UI.SetGlobalProperties response + self.hmiConnection:SendResponse(data.id, data.method, "SUCCESS", {}) + end) + + + + --mobile side: expect SetGlobalProperties response + EXPECT_RESPONSE(cid, { success = true, resultCode = "SUCCESS"}) + :Timeout(iTimeout) + + --mobile side: expect OnHashChange notification + EXPECT_NOTIFICATION("OnHashChange") + end + + --End test case PositiveResponseCheck.1.56 + ----------------------------------------------------------------------------------------- + + --Begin test case PositiveResponseCheck.1.57 + --Description: Check menuTitle parameter contains space characters Space_SpaceCharacter_In_SpaceCharacter_The_SpaceCharacter_Middle + + function Test:SetGlobalProperties_menuTitle_Space_SpaceCharacter_In_SpaceCharacter_The_SpaceCharacter_Middle_SUCCESS() + + --mobile side: sending SetGlobalProperties request + local cid = self.mobileSession:SendRPC("SetGlobalProperties", + { + menuTitle = "Space In The Middle", + timeoutPrompt = + { + { + text = "Timeout prompt", + type = "TEXT" + } + }, + vrHelp = + { + { + position = 1, + image = + { + value = "action.png", + imageType = "DYNAMIC" + }, + text = "VR help item" + } + }, + menuIcon = + { + value = "action.png", + imageType = "DYNAMIC" + }, + helpPrompt = + { + { + text = "Help prompt", + type = "TEXT" + } + }, + vrHelpTitle = "VR help title", + keyboardProperties = + { + keyboardLayout = "QWERTY", + keypressMode = "SINGLE_KEYPRESS", + limitedCharacterList = + { + "a" + }, + language = "EN-US", + autoCompleteText = "Daemon, Freedom" + } + }) + + + --hmi side: expect TTS.SetGlobalProperties request + EXPECT_HMICALL("TTS.SetGlobalProperties", + { + timeoutPrompt = + { + { + text = "Timeout prompt", + type = "TEXT" + } + }, + helpPrompt = + { + { + text = "Help prompt", + type = "TEXT" + } + } + }) + :Timeout(iTimeout) + :Do(function(_,data) + --hmi side: sending UI.SetGlobalProperties response + self.hmiConnection:SendResponse(data.id, data.method, "SUCCESS", {}) + end) + + + + --hmi side: expect UI.SetGlobalProperties request + EXPECT_HMICALL("UI.SetGlobalProperties", + { + menuTitle = "Space In The Middle", + vrHelp = + { + { + position = 1, + --[=[ TODO: update after resolving APPLINK-16052 + + image = + { + imageType = "DYNAMIC", + value = strAppFolder .. "action.png" + },]=] + text = "VR help item" + } + }, + --Checked below + -- menuIcon = + -- { + -- imageType = "DYNAMIC", + -- value = strAppFolder .. "action.png" + -- }, + vrHelpTitle = "VR help title", + keyboardProperties = + { + keyboardLayout = "QWERTY", + keypressMode = "SINGLE_KEYPRESS", + --[=[ TODO: update after resolving APPLINK-16047 + + limitedCharacterList = + { + "a" + },]=] + language = "EN-US", + autoCompleteText = "Daemon, Freedom" + } + }) + :Timeout(iTimeout) + :ValidIf(function(_,data) + return Check_menuIconParams(data) + end) + :Do(function(_,data) + --hmi side: sending UI.SetGlobalProperties response + self.hmiConnection:SendResponse(data.id, data.method, "SUCCESS", {}) + end) + + + + --mobile side: expect SetGlobalProperties response + EXPECT_RESPONSE(cid, { success = true, resultCode = "SUCCESS"}) + :Timeout(iTimeout) + + --mobile side: expect OnHashChange notification + EXPECT_NOTIFICATION("OnHashChange") + end + + --End test case PositiveResponseCheck.1.57 + ----------------------------------------------------------------------------------------- + + --Begin test case PositiveResponseCheck.1.58 + --Description: Check menuTitle parameter contains space characters _SpaceCharacter_Space_SpaceCharacter_Every_SpaceCharacter_Where_SpaceCharacter_ + + function Test:SetGlobalProperties_menuTitle__SpaceCharacter_Space_SpaceCharacter_Every_SpaceCharacter_Where_SpaceCharacter__SUCCESS() + + --mobile side: sending SetGlobalProperties request + local cid = self.mobileSession:SendRPC("SetGlobalProperties", + { + menuTitle = " Space Every Where ", + timeoutPrompt = + { + { + text = "Timeout prompt", + type = "TEXT" + } + }, + vrHelp = + { + { + position = 1, + image = + { + value = "action.png", + imageType = "DYNAMIC" + }, + text = "VR help item" + } + }, + menuIcon = + { + value = "action.png", + imageType = "DYNAMIC" + }, + helpPrompt = + { + { + text = "Help prompt", + type = "TEXT" + } + }, + vrHelpTitle = "VR help title", + keyboardProperties = + { + keyboardLayout = "QWERTY", + keypressMode = "SINGLE_KEYPRESS", + limitedCharacterList = + { + "a" + }, + language = "EN-US", + autoCompleteText = "Daemon, Freedom" + } + }) + + + --hmi side: expect TTS.SetGlobalProperties request + EXPECT_HMICALL("TTS.SetGlobalProperties", + { + timeoutPrompt = + { + { + text = "Timeout prompt", + type = "TEXT" + } + }, + helpPrompt = + { + { + text = "Help prompt", + type = "TEXT" + } + } + }) + :Timeout(iTimeout) + :Do(function(_,data) + --hmi side: sending UI.SetGlobalProperties response + self.hmiConnection:SendResponse(data.id, data.method, "SUCCESS", {}) + end) + + + + --hmi side: expect UI.SetGlobalProperties request + EXPECT_HMICALL("UI.SetGlobalProperties", + { + menuTitle = " Space Every Where ", + vrHelp = + { + { + position = 1, + --[=[ TODO: update after resolving APPLINK-16052 + + image = + { + imageType = "DYNAMIC", + value = strAppFolder .. "action.png" + },]=] + text = "VR help item" + } + }, + --Checked below + -- menuIcon = + -- { + -- imageType = "DYNAMIC", + -- value = strAppFolder .. "action.png" + -- }, + vrHelpTitle = "VR help title", + keyboardProperties = + { + keyboardLayout = "QWERTY", + keypressMode = "SINGLE_KEYPRESS", + --[=[ TODO: update after resolving APPLINK-16047 + + limitedCharacterList = + { + "a" + },]=] + language = "EN-US", + autoCompleteText = "Daemon, Freedom" + } + }) + :Timeout(iTimeout) + :ValidIf(function(_,data) + return Check_menuIconParams(data) + end) + :Do(function(_,data) + --hmi side: sending UI.SetGlobalProperties response + self.hmiConnection:SendResponse(data.id, data.method, "SUCCESS", {}) + end) + + + + --mobile side: expect SetGlobalProperties response + EXPECT_RESPONSE(cid, { success = true, resultCode = "SUCCESS"}) + :Timeout(iTimeout) + + --mobile side: expect OnHashChange notification + EXPECT_NOTIFICATION("OnHashChange") + end + + --End test case PositiveResponseCheck.1.58 + ----------------------------------------------------------------------------------------- + + --Begin test case PositiveResponseCheck.1.59 + --Description: Check menuIcon: imageType parameter is valid data (STATIC) + + function Test:SetGlobalProperties_menuIcon_imageType_STATIC_SUCCESS() + + --mobile side: sending SetGlobalProperties request + local cid = self.mobileSession:SendRPC("SetGlobalProperties", + { + menuTitle = "Menu Title", + timeoutPrompt = + { + { + text = "Timeout prompt", + type = "TEXT" + } + }, + vrHelp = + { + { + position = 1, + image = + { + value = "action.png", + imageType = "DYNAMIC" + }, + text = "VR help item" + } + }, + menuIcon = + { + value = "action.png", + imageType = "STATIC" + }, + helpPrompt = + { + { + text = "Help prompt", + type = "TEXT" + } + }, + vrHelpTitle = "VR help title", + keyboardProperties = + { + keyboardLayout = "QWERTY", + keypressMode = "SINGLE_KEYPRESS", + limitedCharacterList = + { + "a" + }, + language = "EN-US", + autoCompleteText = "Daemon, Freedom" + } + }) + + + --hmi side: expect TTS.SetGlobalProperties request + EXPECT_HMICALL("TTS.SetGlobalProperties", + { + timeoutPrompt = + { + { + text = "Timeout prompt", + type = "TEXT" + } + }, + helpPrompt = + { + { + text = "Help prompt", + type = "TEXT" + } + } + }) + :Timeout(iTimeout) + :Do(function(_,data) + --hmi side: sending UI.SetGlobalProperties response + self.hmiConnection:SendResponse(data.id, data.method, "SUCCESS", {}) + end) + + + + --hmi side: expect UI.SetGlobalProperties request + EXPECT_HMICALL("UI.SetGlobalProperties", + { + menuTitle = "Menu Title", + vrHelp = + { + { + position = 1, + --[=[ TODO: update after resolving APPLINK-16052 + + image = + { + imageType = "DYNAMIC", + value = strAppFolder .. "action.png" + },]=] + text = "VR help item" + } + }, + --Checked below + -- menuIcon = + -- { + -- imageType = "STATIC", + -- value = "action.png" + -- }, + vrHelpTitle = "VR help title", + keyboardProperties = + { + keyboardLayout = "QWERTY", + keypressMode = "SINGLE_KEYPRESS", + --[=[ TODO: update after resolving APPLINK-16047 + + limitedCharacterList = + { + "a" + },]=] + language = "EN-US", + autoCompleteText = "Daemon, Freedom" + } + }) + :Timeout(iTimeout) + :ValidIf(function(_,data) + return Check_menuIconParams(data, "STATIC") + end) + :Do(function(_,data) + --hmi side: sending UI.SetGlobalProperties response + self.hmiConnection:SendResponse(data.id, data.method, "SUCCESS", {}) + end) + + + + --mobile side: expect SetGlobalProperties response + EXPECT_RESPONSE(cid, { success = true, resultCode = "SUCCESS"}) + :Timeout(iTimeout) + + --mobile side: expect OnHashChange notification + EXPECT_NOTIFICATION("OnHashChange") + end + + --End test case PositiveResponseCheck.1.59 + ----------------------------------------------------------------------------------------- + + --Begin test case PositiveResponseCheck.1.60 + --Description: Check menuIcon: imageType parameter is valid data (DYNAMIC) + + function Test:SetGlobalProperties_menuIcon_imageType_DYNAMIC_SUCCESS() + + --mobile side: sending SetGlobalProperties request + local cid = self.mobileSession:SendRPC("SetGlobalProperties", + { + menuTitle = "Menu Title", + timeoutPrompt = + { + { + text = "Timeout prompt", + type = "TEXT" + } + }, + vrHelp = + { + { + position = 1, + image = + { + value = "action.png", + imageType = "DYNAMIC" + }, + text = "VR help item" + } + }, + menuIcon = + { + value = "action.png", + imageType = "DYNAMIC" + }, + helpPrompt = + { + { + text = "Help prompt", + type = "TEXT" + } + }, + vrHelpTitle = "VR help title", + keyboardProperties = + { + keyboardLayout = "QWERTY", + keypressMode = "SINGLE_KEYPRESS", + limitedCharacterList = + { + "a" + }, + language = "EN-US", + autoCompleteText = "Daemon, Freedom" + } + }) + + + --hmi side: expect TTS.SetGlobalProperties request + EXPECT_HMICALL("TTS.SetGlobalProperties", + { + timeoutPrompt = + { + { + text = "Timeout prompt", + type = "TEXT" + } + }, + helpPrompt = + { + { + text = "Help prompt", + type = "TEXT" + } + } + }) + :Timeout(iTimeout) + :Do(function(_,data) + --hmi side: sending UI.SetGlobalProperties response + self.hmiConnection:SendResponse(data.id, data.method, "SUCCESS", {}) + end) + + + + --hmi side: expect UI.SetGlobalProperties request + EXPECT_HMICALL("UI.SetGlobalProperties", + { + menuTitle = "Menu Title", + vrHelp = + { + { + position = 1, + --[=[ TODO: update after resolving APPLINK-16052 + + image = + { + imageType = "DYNAMIC", + value = strAppFolder .. "action.png" + },]=] + text = "VR help item" + } + }, + --Checked below + -- menuIcon = + -- { + -- imageType = "DYNAMIC", + -- value = strAppFolder .. "action.png" + -- }, + vrHelpTitle = "VR help title", + keyboardProperties = + { + keyboardLayout = "QWERTY", + keypressMode = "SINGLE_KEYPRESS", + --[=[ TODO: update after resolving APPLINK-16047 + + limitedCharacterList = + { + "a" + },]=] + language = "EN-US", + autoCompleteText = "Daemon, Freedom" + } + }) + :Timeout(iTimeout) + :ValidIf(function(_,data) + return Check_menuIconParams(data) + end) + :Do(function(_,data) + --hmi side: sending UI.SetGlobalProperties response + self.hmiConnection:SendResponse(data.id, data.method, "SUCCESS", {}) + end) + + + + --mobile side: expect SetGlobalProperties response + EXPECT_RESPONSE(cid, { success = true, resultCode = "SUCCESS"}) + :Timeout(iTimeout) + + --mobile side: expect OnHashChange notification + EXPECT_NOTIFICATION("OnHashChange") + end + + --End test case PositiveResponseCheck.1.60 + ----------------------------------------------------------------------------------------- + + --Begin test case PositiveResponseCheck.1.61 + --Description: Check menuIcon: value parameter is lower bound + + function Test:SetGlobalProperties_menuIcon_value_IsLowerBound_0_INVALID_DATA() + + --mobile side: sending SetGlobalProperties request + local cid = self.mobileSession:SendRPC("SetGlobalProperties", + { + menuTitle = "Menu Title", + timeoutPrompt = + { + { + text = "Timeout prompt", + type = "TEXT" + } + }, + vrHelp = + { + { + position = 1, + image = + { + value = "action.png", + imageType = "DYNAMIC" + }, + text = "VR help item" + } + }, + menuIcon = + { + value = "", + imageType = "DYNAMIC" + }, + helpPrompt = + { + { + text = "Help prompt", + type = "TEXT" + } + }, + vrHelpTitle = "VR help title", + keyboardProperties = + { + keyboardLayout = "QWERTY", + keypressMode = "SINGLE_KEYPRESS", + limitedCharacterList = + { + "a" + }, + language = "EN-US", + autoCompleteText = "Daemon, Freedom" + } + }) + + + --mobile side: expect SetGlobalProperties response + EXPECT_RESPONSE(cid, { success = false, resultCode = "INVALID_DATA"}) + :Timeout(iTimeout) + + --mobile side: expect OnHashChange notification is not send to mobile + EXPECT_NOTIFICATION("OnHashChange") + :Times(0) + end + + --End test case PositiveResponseCheck.1.61 + ----------------------------------------------------------------------------------------- + + + --Begin test case PositiveResponseCheck.1.62 + --Description: Check menuIcon: value parameter is upper bound + + --It is not able to test because max-length of file name is 255 + + --End test case PositiveResponseCheck.1.62 + ----------------------------------------------------------------------------------------- + + --Begin test case PositiveResponseCheck.1.63 + --Description: Check menuIcon: value parameter contains space character _SpaceCharacter_SpaceBefore + + function Test:SetGlobalProperties_menuIcon_value__SpaceCharacter_SpaceBefore_SUCCESS() + + --mobile side: sending SetGlobalProperties request + local cid = self.mobileSession:SendRPC("SetGlobalProperties", + { + menuTitle = "Menu Title", + timeoutPrompt = + { + { + text = "Timeout prompt", + type = "TEXT" + } + }, + vrHelp = + { + { + position = 1, + image = + { + value = "action.png", + imageType = "DYNAMIC" + }, + text = "VR help item" + } + }, + menuIcon = + { + value = " SpaceBefore", + imageType = "DYNAMIC" + }, + helpPrompt = + { + { + text = "Help prompt", + type = "TEXT" + } + }, + vrHelpTitle = "VR help title", + keyboardProperties = + { + keyboardLayout = "QWERTY", + keypressMode = "SINGLE_KEYPRESS", + limitedCharacterList = + { + "a" + }, + language = "EN-US", + autoCompleteText = "Daemon, Freedom" + } + }) + + + --hmi side: expect TTS.SetGlobalProperties request + EXPECT_HMICALL("TTS.SetGlobalProperties", + { + timeoutPrompt = + { + { + text = "Timeout prompt", + type = "TEXT" + } + }, + helpPrompt = + { + { + text = "Help prompt", + type = "TEXT" + } + } + }) + :Timeout(iTimeout) + :Do(function(_,data) + --hmi side: sending UI.SetGlobalProperties response + self.hmiConnection:SendResponse(data.id, data.method, "SUCCESS", {}) + end) + + + + --hmi side: expect UI.SetGlobalProperties request + EXPECT_HMICALL("UI.SetGlobalProperties", + { + menuTitle = "Menu Title", + vrHelp = + { + { + position = 1, + --[=[ TODO: update after resolving APPLINK-16052 + + image = + { + imageType = "DYNAMIC", + value = strAppFolder .. "action.png" + },]=] + text = "VR help item" + } + }, + --Checked below + -- menuIcon = + -- { + -- imageType = "DYNAMIC", + -- value = strAppFolder .. " SpaceBefore" + -- }, + vrHelpTitle = "VR help title", + keyboardProperties = + { + keyboardLayout = "QWERTY", + keypressMode = "SINGLE_KEYPRESS", + --[=[ TODO: update after resolving APPLINK-16047 + + limitedCharacterList = + { + "a" + },]=] + language = "EN-US", + autoCompleteText = "Daemon, Freedom" + } + }) + :Timeout(iTimeout) + :ValidIf(function(_,data) + return Check_menuIconParams(data, nil, " SpaceBefore") + end) + :Do(function(_,data) + --hmi side: sending UI.SetGlobalProperties response + self.hmiConnection:SendResponse(data.id, data.method, "SUCCESS", {}) + end) + + + + --mobile side: expect SetGlobalProperties response + EXPECT_RESPONSE(cid, { success = true, resultCode = "SUCCESS"}) + :Timeout(iTimeout) + + --mobile side: expect OnHashChange notification + EXPECT_NOTIFICATION("OnHashChange") + end + + --End test case PositiveResponseCheck.1.63 + ----------------------------------------------------------------------------------------- + + --Begin test case PositiveResponseCheck.1.64 + --Description: Check menuIcon: value parameter contains space character SpaceAfter_SpaceCharacter_ + + function Test:SetGlobalProperties_menuIcon_value_SpaceAfter_SpaceCharacter__SUCCESS() + + --mobile side: sending SetGlobalProperties request + local cid = self.mobileSession:SendRPC("SetGlobalProperties", + { + menuTitle = "Menu Title", + timeoutPrompt = + { + { + text = "Timeout prompt", + type = "TEXT" + } + }, + vrHelp = + { + { + position = 1, + image = + { + value = "action.png", + imageType = "DYNAMIC" + }, + text = "VR help item" + } + }, + menuIcon = + { + value = "SpaceAfter ", + imageType = "DYNAMIC" + }, + helpPrompt = + { + { + text = "Help prompt", + type = "TEXT" + } + }, + vrHelpTitle = "VR help title", + keyboardProperties = + { + keyboardLayout = "QWERTY", + keypressMode = "SINGLE_KEYPRESS", + limitedCharacterList = + { + "a" + }, + language = "EN-US", + autoCompleteText = "Daemon, Freedom" + } + }) + + + --hmi side: expect TTS.SetGlobalProperties request + EXPECT_HMICALL("TTS.SetGlobalProperties", + { + timeoutPrompt = + { + { + text = "Timeout prompt", + type = "TEXT" + } + }, + helpPrompt = + { + { + text = "Help prompt", + type = "TEXT" + } + } + }) + :Timeout(iTimeout) + :Do(function(_,data) + --hmi side: sending UI.SetGlobalProperties response + self.hmiConnection:SendResponse(data.id, data.method, "SUCCESS", {}) + end) + + + + --hmi side: expect UI.SetGlobalProperties request + EXPECT_HMICALL("UI.SetGlobalProperties", + { + menuTitle = "Menu Title", + vrHelp = + { + { + position = 1, + --[=[ TODO: update after resolving APPLINK-16052 + + image = + { + imageType = "DYNAMIC", + value = strAppFolder .. "action.png" + },]=] + text = "VR help item" + } + }, + --Checked below + -- menuIcon = + -- { + -- imageType = "DYNAMIC", + -- value = strAppFolder .. "SpaceAfter " + -- }, + vrHelpTitle = "VR help title", + keyboardProperties = + { + keyboardLayout = "QWERTY", + keypressMode = "SINGLE_KEYPRESS", + --[=[ TODO: update after resolving APPLINK-16047 + + limitedCharacterList = + { + "a" + },]=] + language = "EN-US", + autoCompleteText = "Daemon, Freedom" + } + }) + :Timeout(iTimeout) + :ValidIf(function(_,data) + return Check_menuIconParams(data, nil, "SpaceAfter ") + end) + :Do(function(_,data) + --hmi side: sending UI.SetGlobalProperties response + self.hmiConnection:SendResponse(data.id, data.method, "SUCCESS", {}) + end) + + + + --mobile side: expect SetGlobalProperties response + EXPECT_RESPONSE(cid, { success = true, resultCode = "SUCCESS"}) + :Timeout(iTimeout) + + --mobile side: expect OnHashChange notification + EXPECT_NOTIFICATION("OnHashChange") + end + + --End test case PositiveResponseCheck.1.64 + ----------------------------------------------------------------------------------------- + + --Begin test case PositiveResponseCheck.1.65 + --Description: Check menuIcon: value parameter contains space character Space_SpaceCharacter_In_SpaceCharacter_The_SpaceCharacter_Middle + + function Test:SetGlobalProperties_menuIcon_value_Space_SpaceCharacter_In_SpaceCharacter_The_SpaceCharacter_Middle_SUCCESS() + + --mobile side: sending SetGlobalProperties request + local cid = self.mobileSession:SendRPC("SetGlobalProperties", + { + menuTitle = "Menu Title", + timeoutPrompt = + { + { + text = "Timeout prompt", + type = "TEXT" + } + }, + vrHelp = + { + { + position = 1, + image = + { + value = "action.png", + imageType = "DYNAMIC" + }, + text = "VR help item" + } + }, + menuIcon = + { + value = "Space In The Middle", + imageType = "DYNAMIC" + }, + helpPrompt = + { + { + text = "Help prompt", + type = "TEXT" + } + }, + vrHelpTitle = "VR help title", + keyboardProperties = + { + keyboardLayout = "QWERTY", + keypressMode = "SINGLE_KEYPRESS", + limitedCharacterList = + { + "a" + }, + language = "EN-US", + autoCompleteText = "Daemon, Freedom" + } + }) + + + --hmi side: expect TTS.SetGlobalProperties request + EXPECT_HMICALL("TTS.SetGlobalProperties", + { + timeoutPrompt = + { + { + text = "Timeout prompt", + type = "TEXT" + } + }, + helpPrompt = + { + { + text = "Help prompt", + type = "TEXT" + } + } + }) + :Timeout(iTimeout) + :Do(function(_,data) + --hmi side: sending UI.SetGlobalProperties response + self.hmiConnection:SendResponse(data.id, data.method, "SUCCESS", {}) + end) + + + + --hmi side: expect UI.SetGlobalProperties request + EXPECT_HMICALL("UI.SetGlobalProperties", + { + menuTitle = "Menu Title", + vrHelp = + { + { + position = 1, + --[=[ TODO: update after resolving APPLINK-16052 + + image = + { + imageType = "DYNAMIC", + value = strAppFolder .. "action.png" + },]=] + text = "VR help item" + } + }, + --Checked below + -- menuIcon = + -- { + -- imageType = "DYNAMIC", + -- value = strAppFolder .. "Space In The Middle" + -- }, + vrHelpTitle = "VR help title", + keyboardProperties = + { + keyboardLayout = "QWERTY", + keypressMode = "SINGLE_KEYPRESS", + --[=[ TODO: update after resolving APPLINK-16047 + + limitedCharacterList = + { + "a" + },]=] + language = "EN-US", + autoCompleteText = "Daemon, Freedom" + } + }) + :Timeout(iTimeout) + :ValidIf(function(_,data) + return Check_menuIconParams(data, nil, "Space In The Middle") + end) + :Do(function(_,data) + --hmi side: sending UI.SetGlobalProperties response + self.hmiConnection:SendResponse(data.id, data.method, "SUCCESS", {}) + end) + + + + --mobile side: expect SetGlobalProperties response + EXPECT_RESPONSE(cid, { success = true, resultCode = "SUCCESS"}) + :Timeout(iTimeout) + + --mobile side: expect OnHashChange notification + EXPECT_NOTIFICATION("OnHashChange") + end + + --End test case PositiveResponseCheck.1.65 + ----------------------------------------------------------------------------------------- + + --Begin test case PositiveResponseCheck.1.66 + --Description: Check menuIcon: value parameter contains space character _SpaceCharacter_Space_SpaceCharacter_Every_SpaceCharacter_Where_SpaceCharacter_ + + function Test:SetGlobalProperties_menuIcon_value__SpaceCharacter_Space_SpaceCharacter_Every_SpaceCharacter_Where_SpaceCharacter__SUCCESS() + + --mobile side: sending SetGlobalProperties request + local cid = self.mobileSession:SendRPC("SetGlobalProperties", + { + menuTitle = "Menu Title", + timeoutPrompt = + { + { + text = "Timeout prompt", + type = "TEXT" + } + }, + vrHelp = + { + { + position = 1, + image = + { + value = "action.png", + imageType = "DYNAMIC" + }, + text = "VR help item" + } + }, + menuIcon = + { + value = " Space Every Where ", + imageType = "DYNAMIC" + }, + helpPrompt = + { + { + text = "Help prompt", + type = "TEXT" + } + }, + vrHelpTitle = "VR help title", + keyboardProperties = + { + keyboardLayout = "QWERTY", + keypressMode = "SINGLE_KEYPRESS", + limitedCharacterList = + { + "a" + }, + language = "EN-US", + autoCompleteText = "Daemon, Freedom" + } + }) + + + --hmi side: expect TTS.SetGlobalProperties request + EXPECT_HMICALL("TTS.SetGlobalProperties", + { + timeoutPrompt = + { + { + text = "Timeout prompt", + type = "TEXT" + } + }, + helpPrompt = + { + { + text = "Help prompt", + type = "TEXT" + } + } + }) + :Timeout(iTimeout) + :Do(function(_,data) + --hmi side: sending UI.SetGlobalProperties response + self.hmiConnection:SendResponse(data.id, data.method, "SUCCESS", {}) + end) + + + + --hmi side: expect UI.SetGlobalProperties request + EXPECT_HMICALL("UI.SetGlobalProperties", + { + menuTitle = "Menu Title", + vrHelp = + { + { + position = 1, + --[=[ TODO: update after resolving APPLINK-16052 + + image = + { + imageType = "DYNAMIC", + value = strAppFolder .. "action.png" + },]=] + text = "VR help item" + } + }, + --checked below + -- menuIcon = + -- { + -- imageType = "DYNAMIC", + -- value = strAppFolder .. " Space Every Where " + -- }, + vrHelpTitle = "VR help title", + keyboardProperties = + { + keyboardLayout = "QWERTY", + keypressMode = "SINGLE_KEYPRESS", + --[=[ TODO: update after resolving APPLINK-16047 + + limitedCharacterList = + { + "a" + },]=] + language = "EN-US", + autoCompleteText = "Daemon, Freedom" + } + }) + :Timeout(iTimeout) + :ValidIf(function(_,data) + return Check_menuIconParams(data, nil, " Space Every Where ") + end) + :Do(function(_,data) + --hmi side: sending UI.SetGlobalProperties response + self.hmiConnection:SendResponse(data.id, data.method, "SUCCESS", {}) + end) + + + + --mobile side: expect SetGlobalProperties response + EXPECT_RESPONSE(cid, { success = true, resultCode = "SUCCESS"}) + :Timeout(iTimeout) + + --mobile side: expect OnHashChange notification + EXPECT_NOTIFICATION("OnHashChange") + end + + --End test case PositiveResponseCheck.1.66 + ----------------------------------------------------------------------------------------- + + --Begin test case PositiveResponseCheck.1.67 + --Description: Check menuIcon: value parameter is lower bound of an existing file + + function Test:SetGlobalProperties_menuIcon_value_IsLowerBoundOfRealImageName_SUCCESS() + + --mobile side: sending SetGlobalProperties request + local cid = self.mobileSession:SendRPC("SetGlobalProperties", + { + menuTitle = "Menu Title", + timeoutPrompt = + { + { + text = "Timeout prompt", + type = "TEXT" + } + }, + vrHelp = + { + { + position = 1, + image = + { + value = "action.png", + imageType = "DYNAMIC" + }, + text = "VR help item" + } + }, + menuIcon = + { + value = "a", + imageType = "DYNAMIC" + }, + helpPrompt = + { + { + text = "Help prompt", + type = "TEXT" + } + }, + vrHelpTitle = "VR help title", + keyboardProperties = + { + keyboardLayout = "QWERTY", + keypressMode = "SINGLE_KEYPRESS", + limitedCharacterList = + { + "a" + }, + language = "EN-US", + autoCompleteText = "Daemon, Freedom" + } + }) + + + --hmi side: expect TTS.SetGlobalProperties request + EXPECT_HMICALL("TTS.SetGlobalProperties", + { + timeoutPrompt = + { + { + text = "Timeout prompt", + type = "TEXT" + } + }, + helpPrompt = + { + { + text = "Help prompt", + type = "TEXT" + } + } + }) + :Timeout(iTimeout) + :Do(function(_,data) + --hmi side: sending UI.SetGlobalProperties response + self.hmiConnection:SendResponse(data.id, data.method, "SUCCESS", {}) + end) + + + + --hmi side: expect UI.SetGlobalProperties request + EXPECT_HMICALL("UI.SetGlobalProperties", + { + menuTitle = "Menu Title", + vrHelp = + { + { + position = 1, + --[=[ TODO: update after resolving APPLINK-16052 + + image = + { + imageType = "DYNAMIC", + value = strAppFolder .. "action.png" + },]=] + text = "VR help item" + } + }, + --Checked below + -- menuIcon = + -- { + -- imageType = "DYNAMIC", + -- value = strAppFolder .. "a" + -- }, + vrHelpTitle = "VR help title", + keyboardProperties = + { + keyboardLayout = "QWERTY", + keypressMode = "SINGLE_KEYPRESS", + --[=[ TODO: update after resolving APPLINK-16047 + + limitedCharacterList = + { + "a" + },]=] + language = "EN-US", + autoCompleteText = "Daemon, Freedom" + } + }) + :Timeout(iTimeout) + :ValidIf(function(_,data) + return Check_menuIconParams(data, nil, "a") + end) + :Do(function(_,data) + --hmi side: sending UI.SetGlobalProperties response + self.hmiConnection:SendResponse(data.id, data.method, "SUCCESS", {}) + end) + + + + --mobile side: expect SetGlobalProperties response + EXPECT_RESPONSE(cid, { success = true, resultCode = "SUCCESS"}) + :Timeout(iTimeout) + + --mobile side: expect OnHashChange notification + EXPECT_NOTIFICATION("OnHashChange") + end + + --End test case PositiveResponseCheck.1.67 + ----------------------------------------------------------------------------------------- + + --Begin test case PositiveResponseCheck.1.68 + --Description: Check menuIcon: value parameter is upper bound of an existing file + + function Test:SetGlobalProperties_menuIcon_value_IsUpperBoundOfRealImageName_SUCCESS() + + --mobile side: sending SetGlobalProperties request + local cid = self.mobileSession:SendRPC("SetGlobalProperties", + { + menuTitle = "Menu Title", + timeoutPrompt = + { + { + text = "Timeout prompt", + type = "TEXT" + } + }, + vrHelp = + { + { + position = 1, + image = + { + value = "action.png", + imageType = "DYNAMIC" + }, + text = "VR help item" + } + }, + menuIcon = + { + value = strMaxLengthFileName255, + imageType = "DYNAMIC" + }, + helpPrompt = + { + { + text = "Help prompt", + type = "TEXT" + } + }, + vrHelpTitle = "VR help title", + keyboardProperties = + { + keyboardLayout = "QWERTY", + keypressMode = "SINGLE_KEYPRESS", + limitedCharacterList = + { + "a" + }, + language = "EN-US", + autoCompleteText = "Daemon, Freedom" + } + }) + + + --hmi side: expect TTS.SetGlobalProperties request + EXPECT_HMICALL("TTS.SetGlobalProperties", + { + timeoutPrompt = + { + { + text = "Timeout prompt", + type = "TEXT" + } + }, + helpPrompt = + { + { + text = "Help prompt", + type = "TEXT" + } + } + }) + :Timeout(iTimeout) + :Do(function(_,data) + --hmi side: sending UI.SetGlobalProperties response + self.hmiConnection:SendResponse(data.id, data.method, "SUCCESS", {}) + end) + + + + --hmi side: expect UI.SetGlobalProperties request + EXPECT_HMICALL("UI.SetGlobalProperties", + { + menuTitle = "Menu Title", + vrHelp = + { + { + position = 1, + --[=[ TODO: update after resolving APPLINK-16052 + + image = + { + imageType = "DYNAMIC", + value = strAppFolder .. "action.png" + },]=] + text = "VR help item" + } + }, + --Checked below + -- menuIcon = + -- { + -- imageType = "DYNAMIC", + -- value = strAppFolder .. strMaxLengthFileName255 + -- }, + vrHelpTitle = "VR help title", + keyboardProperties = + { + keyboardLayout = "QWERTY", + keypressMode = "SINGLE_KEYPRESS", + --[=[ TODO: update after resolving APPLINK-16047 + + limitedCharacterList = + { + "a" + },]=] + language = "EN-US", + autoCompleteText = "Daemon, Freedom" + } + }) + :Timeout(iTimeout) + :ValidIf(function(_,data) + return Check_menuIconParams(data, nil, strMaxLengthFileName255) + end) + :Do(function(_,data) + --hmi side: sending UI.SetGlobalProperties response + self.hmiConnection:SendResponse(data.id, data.method, "SUCCESS", {}) + end) + + + + --mobile side: expect SetGlobalProperties response + EXPECT_RESPONSE(cid, { success = true, resultCode = "SUCCESS"}) + :Timeout(iTimeout) + + --mobile side: expect OnHashChange notification + EXPECT_NOTIFICATION("OnHashChange") + end + + --End test case PositiveResponseCheck.1.68 + ----------------------------------------------------------------------------------------- + + --Begin test case PositiveResponseCheck.1.69-1.91 + --Description: Check keyboardPropertieslanguage parameter is valid data + --Note: During SDL-HMI starting SDL should request HMI UI.GetSupportedLanguages, VR.GetSupportedLanguages, TTS.GetSupportedLanguages and HMI should respond with all languages + --specified in this test (added new languages which should be supported by SDL - CRQ APPLINK-13745: "NL-BE", "EL-GR", "HU-HU", "FI-FI", "SK-SK") + local Languages = {"AR-SA", "CS-CZ", "DA-DK", "DE-DE", "EN-AU", + "EN-GB", "EN-US", "ES-ES", "ES-MX", "FR-CA", + "FR-FR", "IT-IT", "JA-JP", "KO-KR", "NL-NL", + "NO-NO", "PL-PL", "PT-PT", "PT-BR", "RU-RU", + "SV-SE", "TR-TR", "ZH-CN", "ZH-TW", "NL-BE", + "EL-GR", "HU-HU", "FI-FI", "SK-SK"} + for i = 1, #Languages do + Test["SetGlobalProperties_keyboardProperties_language_" .. Languages[i] .. "_SUCCESS"] = function(self) + + --mobile side: sending SetGlobalProperties request + local cid = self.mobileSession:SendRPC("SetGlobalProperties", + { + menuTitle = "Menu Title", + timeoutPrompt = + { + { + text = "Timeout prompt", + type = "TEXT" + } + }, + vrHelp = + { + { + position = 1, + image = + { + value = "action.png", + imageType = "DYNAMIC" + }, + text = "VR help item" + } + }, + menuIcon = + { + value = "action.png", + imageType = "DYNAMIC" + }, + helpPrompt = + { + { + text = "Help prompt", + type = "TEXT" + } + }, + vrHelpTitle = "VR help title", + keyboardProperties = + { + keyboardLayout = "QWERTY", + keypressMode = "SINGLE_KEYPRESS", + limitedCharacterList = + { + "a" + }, + language = Languages[i], + autoCompleteText = "Daemon, Freedom" + } + }) + + + --hmi side: expect TTS.SetGlobalProperties request + EXPECT_HMICALL("TTS.SetGlobalProperties", + { + timeoutPrompt = + { + { + text = "Timeout prompt", + type = "TEXT" + } + }, + helpPrompt = + { + { + text = "Help prompt", + type = "TEXT" + } + } + }) + :Timeout(iTimeout) + :Do(function(_,data) + --hmi side: sending UI.SetGlobalProperties response + self.hmiConnection:SendResponse(data.id, data.method, "SUCCESS", {}) + end) + + + + --hmi side: expect UI.SetGlobalProperties request + EXPECT_HMICALL("UI.SetGlobalProperties", + { + menuTitle = "Menu Title", + vrHelp = + { + { + position = 1, + --[=[ TODO: update after resolving APPLINK-16052 + + image = + { + imageType = "DYNAMIC", + value = strAppFolder .. "action.png" + },]=] + text = "VR help item" + } + }, + --Checked below + -- menuIcon = + -- { + -- imageType = "DYNAMIC", + -- value = strAppFolder .. "action.png" + -- }, + vrHelpTitle = "VR help title", + keyboardProperties = + { + keyboardLayout = "QWERTY", + keypressMode = "SINGLE_KEYPRESS", + --[=[ TODO: update after resolving APPLINK-16047 + + limitedCharacterList = + { + "a" + },]=] + language = Languages[i], + autoCompleteText = "Daemon, Freedom" + } + }) + :Timeout(iTimeout) + :ValidIf(function(_,data) + return Check_menuIconParams(data) + end) + :Do(function(_,data) + --hmi side: sending UI.SetGlobalProperties response + self.hmiConnection:SendResponse(data.id, data.method, "SUCCESS", {}) + end) + + + + --mobile side: expect SetGlobalProperties response + EXPECT_RESPONSE(cid, { success = true, resultCode = "SUCCESS"}) + :Timeout(iTimeout) + + --mobile side: expect OnHashChange notification + EXPECT_NOTIFICATION("OnHashChange") + end + + end + --End test case PositiveResponseCheck.1.69-1.91 + ----------------------------------------------------------------------------------------- + + + --Begin test case PositiveResponseCheck.1.92 + --Description: Check keyboardPropertieskeyboardLayout parameter is valid data + + function Test:SetGlobalProperties_keyboardProperties_keyboardLayout_QWERTY_SUCCESS() + + --mobile side: sending SetGlobalProperties request + local cid = self.mobileSession:SendRPC("SetGlobalProperties", + { + menuTitle = "Menu Title", + timeoutPrompt = + { + { + text = "Timeout prompt", + type = "TEXT" + } + }, + vrHelp = + { + { + position = 1, + image = + { + value = "action.png", + imageType = "DYNAMIC" + }, + text = "VR help item" + } + }, + menuIcon = + { + value = "action.png", + imageType = "DYNAMIC" + }, + helpPrompt = + { + { + text = "Help prompt", + type = "TEXT" + } + }, + vrHelpTitle = "VR help title", + keyboardProperties = + { + keyboardLayout = "QWERTY", + keypressMode = "SINGLE_KEYPRESS", + limitedCharacterList = + { + "a" + }, + language = "EN-US", + autoCompleteText = "Daemon, Freedom" + } + }) + + + --hmi side: expect TTS.SetGlobalProperties request + EXPECT_HMICALL("TTS.SetGlobalProperties", + { + timeoutPrompt = + { + { + text = "Timeout prompt", + type = "TEXT" + } + }, + helpPrompt = + { + { + text = "Help prompt", + type = "TEXT" + } + } + }) + :Timeout(iTimeout) + :Do(function(_,data) + --hmi side: sending UI.SetGlobalProperties response + self.hmiConnection:SendResponse(data.id, data.method, "SUCCESS", {}) + end) + + + + --hmi side: expect UI.SetGlobalProperties request + EXPECT_HMICALL("UI.SetGlobalProperties", + { + menuTitle = "Menu Title", + vrHelp = + { + { + position = 1, + --[=[ TODO: update after resolving APPLINK-16052 + + image = + { + imageType = "DYNAMIC", + value = strAppFolder .. "action.png" + },]=] + text = "VR help item" + } + }, + --Checked below + -- menuIcon = + -- { + -- imageType = "DYNAMIC", + -- value = strAppFolder .. "action.png" + -- }, + vrHelpTitle = "VR help title", + keyboardProperties = + { + keyboardLayout = "QWERTY", + keypressMode = "SINGLE_KEYPRESS", + --[=[ TODO: update after resolving APPLINK-16047 + + limitedCharacterList = + { + "a" + },]=] + language = "EN-US", + autoCompleteText = "Daemon, Freedom" + } + }) + :Timeout(iTimeout) + :ValidIf(function(_,data) + return Check_menuIconParams(data) + end) + :Do(function(_,data) + --hmi side: sending UI.SetGlobalProperties response + self.hmiConnection:SendResponse(data.id, data.method, "SUCCESS", {}) + end) + + + + --mobile side: expect SetGlobalProperties response + EXPECT_RESPONSE(cid, { success = true, resultCode = "SUCCESS"}) + :Timeout(iTimeout) + + --mobile side: expect OnHashChange notification + EXPECT_NOTIFICATION("OnHashChange") + end + + --End test case PositiveResponseCheck.1.92 + ----------------------------------------------------------------------------------------- + + --Begin test case PositiveResponseCheck.1.93 + --Description: Check keyboardPropertieskeyboardLayout parameter is valid data + + function Test:SetGlobalProperties_keyboardProperties_keyboardLayout_QWERTZ_SUCCESS() + + --mobile side: sending SetGlobalProperties request + local cid = self.mobileSession:SendRPC("SetGlobalProperties", + { + menuTitle = "Menu Title", + timeoutPrompt = + { + { + text = "Timeout prompt", + type = "TEXT" + } + }, + vrHelp = + { + { + position = 1, + image = + { + value = "action.png", + imageType = "DYNAMIC" + }, + text = "VR help item" + } + }, + menuIcon = + { + value = "action.png", + imageType = "DYNAMIC" + }, + helpPrompt = + { + { + text = "Help prompt", + type = "TEXT" + } + }, + vrHelpTitle = "VR help title", + keyboardProperties = + { + keyboardLayout = "QWERTZ", + keypressMode = "SINGLE_KEYPRESS", + limitedCharacterList = + { + "a" + }, + language = "EN-US", + autoCompleteText = "Daemon, Freedom" + } + }) + + + --hmi side: expect TTS.SetGlobalProperties request + EXPECT_HMICALL("TTS.SetGlobalProperties", + { + timeoutPrompt = + { + { + text = "Timeout prompt", + type = "TEXT" + } + }, + helpPrompt = + { + { + text = "Help prompt", + type = "TEXT" + } + } + }) + :Timeout(iTimeout) + :Do(function(_,data) + --hmi side: sending UI.SetGlobalProperties response + self.hmiConnection:SendResponse(data.id, data.method, "SUCCESS", {}) + end) + + + + --hmi side: expect UI.SetGlobalProperties request + EXPECT_HMICALL("UI.SetGlobalProperties", + { + menuTitle = "Menu Title", + vrHelp = + { + { + position = 1, + --[=[ TODO: update after resolving APPLINK-16052 + + image = + { + imageType = "DYNAMIC", + value = strAppFolder .. "action.png" + },]=] + text = "VR help item" + } + }, + --checked below + -- menuIcon = + -- { + -- imageType = "DYNAMIC", + -- value = strAppFolder .. "action.png" + -- }, + vrHelpTitle = "VR help title", + keyboardProperties = + { + keyboardLayout = "QWERTZ", + keypressMode = "SINGLE_KEYPRESS", + --[=[ TODO: update after resolving APPLINK-16047 + + limitedCharacterList = + { + "a" + },]=] + language = "EN-US", + autoCompleteText = "Daemon, Freedom" + } + }) + :Timeout(iTimeout) + :ValidIf(function(_,data) + return Check_menuIconParams(data) + end) + :Do(function(_,data) + --hmi side: sending UI.SetGlobalProperties response + self.hmiConnection:SendResponse(data.id, data.method, "SUCCESS", {}) + end) + + + + --mobile side: expect SetGlobalProperties response + EXPECT_RESPONSE(cid, { success = true, resultCode = "SUCCESS"}) + :Timeout(iTimeout) + + --mobile side: expect OnHashChange notification + EXPECT_NOTIFICATION("OnHashChange") + end + + --End test case PositiveResponseCheck.1.93 + ----------------------------------------------------------------------------------------- + + --Begin test case PositiveResponseCheck.1.94 + --Description: Check keyboardPropertieskeyboardLayout parameter is valid data + + function Test:SetGlobalProperties_keyboardProperties_keyboardLayout_AZERTY_SUCCESS() + + --mobile side: sending SetGlobalProperties request + local cid = self.mobileSession:SendRPC("SetGlobalProperties", + { + menuTitle = "Menu Title", + timeoutPrompt = + { + { + text = "Timeout prompt", + type = "TEXT" + } + }, + vrHelp = + { + { + position = 1, + image = + { + value = "action.png", + imageType = "DYNAMIC" + }, + text = "VR help item" + } + }, + menuIcon = + { + value = "action.png", + imageType = "DYNAMIC" + }, + helpPrompt = + { + { + text = "Help prompt", + type = "TEXT" + } + }, + vrHelpTitle = "VR help title", + keyboardProperties = + { + keyboardLayout = "AZERTY", + keypressMode = "SINGLE_KEYPRESS", + limitedCharacterList = + { + "a" + }, + language = "EN-US", + autoCompleteText = "Daemon, Freedom" + } + }) + + + --hmi side: expect TTS.SetGlobalProperties request + EXPECT_HMICALL("TTS.SetGlobalProperties", + { + timeoutPrompt = + { + { + text = "Timeout prompt", + type = "TEXT" + } + }, + helpPrompt = + { + { + text = "Help prompt", + type = "TEXT" + } + } + }) + :Timeout(iTimeout) + :Do(function(_,data) + --hmi side: sending UI.SetGlobalProperties response + self.hmiConnection:SendResponse(data.id, data.method, "SUCCESS", {}) + end) + + + + --hmi side: expect UI.SetGlobalProperties request + EXPECT_HMICALL("UI.SetGlobalProperties", + { + menuTitle = "Menu Title", + vrHelp = + { + { + position = 1, + --[=[ TODO: update after resolving APPLINK-16052 + + image = + { + imageType = "DYNAMIC", + value = strAppFolder .. "action.png" + },]=] + text = "VR help item" + } + }, + --Checked below + -- menuIcon = + -- { + -- imageType = "DYNAMIC", + -- value = strAppFolder .. "action.png" + -- }, + vrHelpTitle = "VR help title", + keyboardProperties = + { + keyboardLayout = "AZERTY", + keypressMode = "SINGLE_KEYPRESS", + --[=[ TODO: update after resolving APPLINK-16047 + + limitedCharacterList = + { + "a" + },]=] + language = "EN-US", + autoCompleteText = "Daemon, Freedom" + } + }) + :Timeout(iTimeout) + :ValidIf(function(_,data) + return Check_menuIconParams(data) + end) + :Do(function(_,data) + --hmi side: sending UI.SetGlobalProperties response + self.hmiConnection:SendResponse(data.id, data.method, "SUCCESS", {}) + end) + + + + --mobile side: expect SetGlobalProperties response + EXPECT_RESPONSE(cid, { success = true, resultCode = "SUCCESS"}) + :Timeout(iTimeout) + + --mobile side: expect OnHashChange notification + EXPECT_NOTIFICATION("OnHashChange") + end + + --End test case PositiveResponseCheck.1.94 + ----------------------------------------------------------------------------------------- + + --Begin test case PositiveResponseCheck.1.95 + --Description: Check keyboardPropertieskeypressMode parameter is valid data + + function Test:SetGlobalProperties_keyboardProperties_keypressMode_SINGLE_KEYPRESS_SUCCESS() + + --mobile side: sending SetGlobalProperties request + local cid = self.mobileSession:SendRPC("SetGlobalProperties", + { + menuTitle = "Menu Title", + timeoutPrompt = + { + { + text = "Timeout prompt", + type = "TEXT" + } + }, + vrHelp = + { + { + position = 1, + image = + { + value = "action.png", + imageType = "DYNAMIC" + }, + text = "VR help item" + } + }, + menuIcon = + { + value = "action.png", + imageType = "DYNAMIC" + }, + helpPrompt = + { + { + text = "Help prompt", + type = "TEXT" + } + }, + vrHelpTitle = "VR help title", + keyboardProperties = + { + keyboardLayout = "QWERTY", + keypressMode = "SINGLE_KEYPRESS", + limitedCharacterList = + { + "a" + }, + language = "EN-US", + autoCompleteText = "Daemon, Freedom" + } + }) + + + --hmi side: expect TTS.SetGlobalProperties request + EXPECT_HMICALL("TTS.SetGlobalProperties", + { + timeoutPrompt = + { + { + text = "Timeout prompt", + type = "TEXT" + } + }, + helpPrompt = + { + { + text = "Help prompt", + type = "TEXT" + } + } + }) + :Timeout(iTimeout) + :Do(function(_,data) + --hmi side: sending UI.SetGlobalProperties response + self.hmiConnection:SendResponse(data.id, data.method, "SUCCESS", {}) + end) + + + + --hmi side: expect UI.SetGlobalProperties request + EXPECT_HMICALL("UI.SetGlobalProperties", + { + menuTitle = "Menu Title", + vrHelp = + { + { + position = 1, + --[=[ TODO: update after resolving APPLINK-16052 + + image = + { + imageType = "DYNAMIC", + value = strAppFolder .. "action.png" + },]=] + text = "VR help item" + } + }, + --checked below + -- menuIcon = + -- { + -- imageType = "DYNAMIC", + -- value = strAppFolder .. "action.png" + -- }, + vrHelpTitle = "VR help title", + keyboardProperties = + { + keyboardLayout = "QWERTY", + keypressMode = "SINGLE_KEYPRESS", + --[=[ TODO: update after resolving APPLINK-16047 + + limitedCharacterList = + { + "a" + },]=] + language = "EN-US", + autoCompleteText = "Daemon, Freedom" + } + }) + :Timeout(iTimeout) + :ValidIf(function(_,data) + return Check_menuIconParams(data) + end) + :Do(function(_,data) + --hmi side: sending UI.SetGlobalProperties response + self.hmiConnection:SendResponse(data.id, data.method, "SUCCESS", {}) + end) + + + + --mobile side: expect SetGlobalProperties response + EXPECT_RESPONSE(cid, { success = true, resultCode = "SUCCESS"}) + :Timeout(iTimeout) + + --mobile side: expect OnHashChange notification + EXPECT_NOTIFICATION("OnHashChange") + end + + --End test case PositiveResponseCheck.1.95 + ----------------------------------------------------------------------------------------- + + --Begin test case PositiveResponseCheck.1.96 + --Description: Check keyboardProperties keypressMode parameter is valid data + + function Test:SetGlobalProperties_keyboardProperties_keypressMode_QUEUE_KEYPRESSES_SUCCESS() + + --mobile side: sending SetGlobalProperties request + local cid = self.mobileSession:SendRPC("SetGlobalProperties", + { + menuTitle = "Menu Title", + timeoutPrompt = + { + { + text = "Timeout prompt", + type = "TEXT" + } + }, + vrHelp = + { + { + position = 1, + image = + { + value = "action.png", + imageType = "DYNAMIC" + }, + text = "VR help item" + } + }, + menuIcon = + { + value = "action.png", + imageType = "DYNAMIC" + }, + helpPrompt = + { + { + text = "Help prompt", + type = "TEXT" + } + }, + vrHelpTitle = "VR help title", + keyboardProperties = + { + keyboardLayout = "QWERTY", + keypressMode = "QUEUE_KEYPRESSES", + limitedCharacterList = + { + "a" + }, + language = "EN-US", + autoCompleteText = "Daemon, Freedom" + } + }) + + + --hmi side: expect TTS.SetGlobalProperties request + EXPECT_HMICALL("TTS.SetGlobalProperties", + { + timeoutPrompt = + { + { + text = "Timeout prompt", + type = "TEXT" + } + }, + helpPrompt = + { + { + text = "Help prompt", + type = "TEXT" + } + } + }) + :Timeout(iTimeout) + :Do(function(_,data) + --hmi side: sending UI.SetGlobalProperties response + self.hmiConnection:SendResponse(data.id, data.method, "SUCCESS", {}) + end) + + + + --hmi side: expect UI.SetGlobalProperties request + EXPECT_HMICALL("UI.SetGlobalProperties", + { + menuTitle = "Menu Title", + vrHelp = + { + { + position = 1, + --[=[ TODO: update after resolving APPLINK-16052 + + image = + { + imageType = "DYNAMIC", + value = strAppFolder .. "action.png" + },]=] + text = "VR help item" + } + }, + --Checked below + -- menuIcon = + -- { + -- imageType = "DYNAMIC", + -- value = strAppFolder .. "action.png" + -- }, + vrHelpTitle = "VR help title", + keyboardProperties = + { + keyboardLayout = "QWERTY", + keypressMode = "QUEUE_KEYPRESSES", + --[=[ TODO: update after resolving APPLINK-16047 + + limitedCharacterList = + { + "a" + },]=] + language = "EN-US", + autoCompleteText = "Daemon, Freedom" + } + }) + :Timeout(iTimeout) + :ValidIf(function(_,data) + return Check_menuIconParams(data) + end) + :Do(function(_,data) + --hmi side: sending UI.SetGlobalProperties response + self.hmiConnection:SendResponse(data.id, data.method, "SUCCESS", {}) + end) + + + + --mobile side: expect SetGlobalProperties response + EXPECT_RESPONSE(cid, { success = true, resultCode = "SUCCESS"}) + :Timeout(iTimeout) + + --mobile side: expect OnHashChange notification + EXPECT_NOTIFICATION("OnHashChange") + end + + --End test case PositiveResponseCheck.1.96 + ----------------------------------------------------------------------------------------- + + --Begin test case PositiveResponseCheck.1.97 + --Description: Check keyboardPropertieskeypressMode parameter is valid data + + function Test:SetGlobalProperties_keyboardProperties_keypressMode_RESEND_CURRENT_ENTRY_SUCCESS() + + --mobile side: sending SetGlobalProperties request + local cid = self.mobileSession:SendRPC("SetGlobalProperties", + { + menuTitle = "Menu Title", + timeoutPrompt = + { + { + text = "Timeout prompt", + type = "TEXT" + } + }, + vrHelp = + { + { + position = 1, + image = + { + value = "action.png", + imageType = "DYNAMIC" + }, + text = "VR help item" + } + }, + menuIcon = + { + value = "action.png", + imageType = "DYNAMIC" + }, + helpPrompt = + { + { + text = "Help prompt", + type = "TEXT" + } + }, + vrHelpTitle = "VR help title", + keyboardProperties = + { + keyboardLayout = "QWERTY", + keypressMode = "RESEND_CURRENT_ENTRY", + limitedCharacterList = + { + "a" + }, + language = "EN-US", + autoCompleteText = "Daemon, Freedom" + } + }) + + + --hmi side: expect TTS.SetGlobalProperties request + EXPECT_HMICALL("TTS.SetGlobalProperties", + { + timeoutPrompt = + { + { + text = "Timeout prompt", + type = "TEXT" + } + }, + helpPrompt = + { + { + text = "Help prompt", + type = "TEXT" + } + } + }) + :Timeout(iTimeout) + :Do(function(_,data) + --hmi side: sending UI.SetGlobalProperties response + self.hmiConnection:SendResponse(data.id, data.method, "SUCCESS", {}) + end) + + + + --hmi side: expect UI.SetGlobalProperties request + EXPECT_HMICALL("UI.SetGlobalProperties", + { + menuTitle = "Menu Title", + vrHelp = + { + { + position = 1, + --[=[ TODO: update after resolving APPLINK-16052 + + image = + { + imageType = "DYNAMIC", + value = strAppFolder .. "action.png" + },]=] + text = "VR help item" + } + }, + --Checked below + -- menuIcon = + -- { + -- imageType = "DYNAMIC", + -- value = strAppFolder .. "action.png" + -- }, + vrHelpTitle = "VR help title", + keyboardProperties = + { + keyboardLayout = "QWERTY", + keypressMode = "RESEND_CURRENT_ENTRY", + --[=[ TODO: update after resolving APPLINK-16047 + + limitedCharacterList = + { + "a" + },]=] + language = "EN-US", + autoCompleteText = "Daemon, Freedom" + } + }) + :Timeout(iTimeout) + :ValidIf(function(_,data) + return Check_menuIconParams(data) + end) + :Do(function(_,data) + --hmi side: sending UI.SetGlobalProperties response + self.hmiConnection:SendResponse(data.id, data.method, "SUCCESS", {}) + end) + + + + --mobile side: expect SetGlobalProperties response + EXPECT_RESPONSE(cid, { success = true, resultCode = "SUCCESS"}) + :Timeout(iTimeout) + + --mobile side: expect OnHashChange notification + EXPECT_NOTIFICATION("OnHashChange") + end + + --End test case PositiveResponseCheck.1.97 + ----------------------------------------------------------------------------------------- + + --Begin test case PositiveResponseCheck.1.98 + --Description: Check limitedCharacterList parameter is lower bound + + function Test:SetGlobalProperties_keyboardProperties_limitedCharacterList_Array_IsLowerBound_Length_IsLowerUpperBound_SUCCESS() + + --mobile side: sending SetGlobalProperties request + local cid = self.mobileSession:SendRPC("SetGlobalProperties", + { + menuTitle = "Menu Title", + timeoutPrompt = + { + { + text = "Timeout prompt", + type = "TEXT" + } + }, + vrHelp = + { + { + position = 1, + image = + { + value = "action.png", + imageType = "DYNAMIC" + }, + text = "VR help item" + } + }, + menuIcon = + { + value = "action.png", + imageType = "DYNAMIC" + }, + helpPrompt = + { + { + text = "Help prompt", + type = "TEXT" + } + }, + vrHelpTitle = "VR help title", + keyboardProperties = + { + keyboardLayout = "QWERTY", + limitedCharacterList = + { + "q" + }, + language = "EN-US", + autoCompleteText = "Daemon, Freedom" + } + }) + + + --hmi side: expect TTS.SetGlobalProperties request + EXPECT_HMICALL("TTS.SetGlobalProperties", + { + timeoutPrompt = + { + { + text = "Timeout prompt", + type = "TEXT" + } + }, + helpPrompt = + { + { + text = "Help prompt", + type = "TEXT" + } + } + }) + :Timeout(iTimeout) + :Do(function(_,data) + --hmi side: sending UI.SetGlobalProperties response + self.hmiConnection:SendResponse(data.id, data.method, "SUCCESS", {}) + end) + + + + --hmi side: expect UI.SetGlobalProperties request + EXPECT_HMICALL("UI.SetGlobalProperties", + { + menuTitle = "Menu Title", + vrHelp = + { + { + position = 1, + --[=[ TODO: update after resolving APPLINK-16052 + + image = + { + imageType = "DYNAMIC", + value = strAppFolder .. "action.png" + },]=] + text = "VR help item" + } + }, + --Checked below + -- menuIcon = + -- { + -- imageType = "DYNAMIC", + -- value = strAppFolder .. "action.png" + -- }, + vrHelpTitle = "VR help title", + keyboardProperties = + { + language = "EN-US", + keyboardLayout = "QWERTY", + autoCompleteText = "Daemon, Freedom", + --[=[ TODO: update after resolving APPLINK-16047 + limitedCharacterList = + { + "q" + }]=] + } + }) + :Timeout(iTimeout) + :ValidIf(function(_,data) + return Check_menuIconParams(data) + end) + :Do(function(_,data) + --hmi side: sending UI.SetGlobalProperties response + self.hmiConnection:SendResponse(data.id, data.method, "SUCCESS", {}) + end) + + + + --mobile side: expect SetGlobalProperties response + EXPECT_RESPONSE(cid, { success = true, resultCode = "SUCCESS"}) + :Timeout(iTimeout) + + --mobile side: expect OnHashChange notification + EXPECT_NOTIFICATION("OnHashChange") + end + + --End test case PositiveResponseCheck.1.98 + ----------------------------------------------------------------------------------------- + + --Begin test case PositiveResponseCheck.1.99 + --Description: Check limitedCharacterList parameter is upper bound + + function Test:SetGlobalProperties_keyboardProperties_limitedCharacterList_Array_IsUpperBound_SUCCESS() + + --mobile side: sending SetGlobalProperties request + local cid = self.mobileSession:SendRPC("SetGlobalProperties", + { + menuTitle = "Menu Title", + timeoutPrompt = + { + { + text = "Timeout prompt", + type = "TEXT" + } + }, + vrHelp = + { + { + position = 1, + image = + { + value = "action.png", + imageType = "DYNAMIC" + }, + text = "VR help item" + } + }, + menuIcon = + { + value = "action.png", + imageType = "DYNAMIC" + }, + helpPrompt = + { + { + text = "Help prompt", + type = "TEXT" + } + }, + vrHelpTitle = "VR help title", + keyboardProperties = + { + keyboardLayout = "QWERTY", + limitedCharacterList = + { + "q", + "q", + "q", + "q", + "q", + "q", + "q", + "q", + "q", + "q", + "q", + "q", + "q", + "q", + "q", + "q", + "q", + "q", + "q", + "q", + "q", + "q", + "q", + "q", + "q", + "q", + "q", + "q", + "q", + "q", + "q", + "q", + "q", + "q", + "q", + "q", + "q", + "q", + "q", + "q", + "q", + "q", + "q", + "q", + "q", + "q", + "q", + "q", + "q", + "q", + "q", + "q", + "q", + "q", + "q", + "q", + "q", + "q", + "q", + "q", + "q", + "q", + "q", + "q", + "q", + "q", + "q", + "q", + "q", + "q", + "q", + "q", + "q", + "q", + "q", + "q", + "q", + "q", + "q", + "q", + "q", + "q", + "q", + "q", + "q", + "q", + "q", + "q", + "q", + "q", + "q", + "q", + "q", + "q", + "q", + "q", + "q", + "q", + "q", + "q" + }, + + language = "EN-US", + autoCompleteText = "Daemon, Freedom" + } + }) + + + --hmi side: expect TTS.SetGlobalProperties request + EXPECT_HMICALL("TTS.SetGlobalProperties", + { + timeoutPrompt = + { + { + text = "Timeout prompt", + type = "TEXT" + } + }, + helpPrompt = + { + { + text = "Help prompt", + type = "TEXT" + } + } + }) + :Timeout(iTimeout) + :Do(function(_,data) + --hmi side: sending UI.SetGlobalProperties response + self.hmiConnection:SendResponse(data.id, data.method, "SUCCESS", {}) + end) + + + + --hmi side: expect UI.SetGlobalProperties request + EXPECT_HMICALL("UI.SetGlobalProperties", + { + menuTitle = "Menu Title", + vrHelp = + { + { + position = 1, + --[=[ TODO: update after resolving APPLINK-16052 + + image = + { + imageType = "DYNAMIC", + value = strAppFolder .. "action.png" + },]=] + text = "VR help item" + } + }, + --Checked below + -- menuIcon = + -- { + -- imageType = "DYNAMIC", + -- value = strAppFolder .. "action.png" + -- }, + vrHelpTitle = "VR help title", + keyboardProperties = + { + language = "EN-US", + keyboardLayout = "QWERTY", + autoCompleteText = "Daemon, Freedom", + --[=[ TODO: update after resolving APPLINK-16047 + limitedCharacterList = + { + "q", + "q", + "q", + "q", + "q", + "q", + "q", + "q", + "q", + "q", + "q", + "q", + "q", + "q", + "q", + "q", + "q", + "q", + "q", + "q", + "q", + "q", + "q", + "q", + "q", + "q", + "q", + "q", + "q", + "q", + "q", + "q", + "q", + "q", + "q", + "q", + "q", + "q", + "q", + "q", + "q", + "q", + "q", + "q", + "q", + "q", + "q", + "q", + "q", + "q", + "q", + "q", + "q", + "q", + "q", + "q", + "q", + "q", + "q", + "q", + "q", + "q", + "q", + "q", + "q", + "q", + "q", + "q", + "q", + "q", + "q", + "q", + "q", + "q", + "q", + "q", + "q", + "q", + "q", + "q", + "q", + "q", + "q", + "q", + "q", + "q", + "q", + "q", + "q", + "q", + "q", + "q", + "q", + "q", + "q", + "q", + "q", + "q", + "q", + "q" + }]=] + } + }) + :Timeout(iTimeout) + :ValidIf(function(_,data) + return Check_menuIconParams(data) + end) + :Do(function(_,data) + --hmi side: sending UI.SetGlobalProperties response + self.hmiConnection:SendResponse(data.id, data.method, "SUCCESS", {}) + end) + + + + --mobile side: expect SetGlobalProperties response + EXPECT_RESPONSE(cid, { success = true, resultCode = "SUCCESS"}) + :Timeout(iTimeout) + + --mobile side: expect OnHashChange notification + EXPECT_NOTIFICATION("OnHashChange") + end + + --End test case PositiveResponseCheck.1.99 + ---------------------------------------------------------------------------------------- + + --Begin test case PositiveResponseCheck.1.100 + --Description: Check keyboardProperties.limitedCharacterList parameter is lower/upper bound + + function Test:SetGlobalProperties_keyboardProperties_limitedCharacterList_IsLowerUpperBound_1_SUCCESS() + + --mobile side: sending SetGlobalProperties request + local cid = self.mobileSession:SendRPC("SetGlobalProperties", + { + menuTitle = "Menu Title", + timeoutPrompt = + { + { + text = "Timeout prompt", + type = "TEXT" + } + }, + vrHelp = + { + { + position = 1, + image = + { + value = "action.png", + imageType = "DYNAMIC" + }, + text = "VR help item" + } + }, + menuIcon = + { + value = "action.png", + imageType = "DYNAMIC" + }, + helpPrompt = + { + { + text = "Help prompt", + type = "TEXT" + } + }, + vrHelpTitle = "VR help title", + keyboardProperties = + { + keyboardLayout = "QWERTY", + keypressMode = "SINGLE_KEYPRESS", + limitedCharacterList = + { + "q" + }, + language = "EN-US", + autoCompleteText = "Daemon, Freedom" + } + }) + + + --hmi side: expect TTS.SetGlobalProperties request + EXPECT_HMICALL("TTS.SetGlobalProperties", + { + timeoutPrompt = + { + { + text = "Timeout prompt", + type = "TEXT" + } + }, + helpPrompt = + { + { + text = "Help prompt", + type = "TEXT" + } + } + }) + :Timeout(iTimeout) + :Do(function(_,data) + --hmi side: sending UI.SetGlobalProperties response + self.hmiConnection:SendResponse(data.id, data.method, "SUCCESS", {}) + end) + + + + --hmi side: expect UI.SetGlobalProperties request + EXPECT_HMICALL("UI.SetGlobalProperties", + { + menuTitle = "Menu Title", + vrHelp = + { + { + position = 1, + --[=[ TODO: update after resolving APPLINK-16052 + + image = + { + imageType = "DYNAMIC", + value = strAppFolder .. "action.png" + },]=] + text = "VR help item" + } + }, + --Checked below + -- menuIcon = + -- { + -- imageType = "DYNAMIC", + -- value = strAppFolder .. "action.png" + -- }, + vrHelpTitle = "VR help title", + keyboardProperties = + { + keyboardLayout = "QWERTY", + keypressMode = "SINGLE_KEYPRESS", + --[=[ TODO: update after resolving APPLINK-16047 + + limitedCharacterList = + { + "q" + },]=] + language = "EN-US", + autoCompleteText = "Daemon, Freedom" + } + }) + :Timeout(iTimeout) + :ValidIf(function(_,data) + return Check_menuIconParams(data) + end) + :Do(function(_,data) + --hmi side: sending UI.SetGlobalProperties response + self.hmiConnection:SendResponse(data.id, data.method, "SUCCESS", {}) + end) + + + + --mobile side: expect SetGlobalProperties response + EXPECT_RESPONSE(cid, { success = true, resultCode = "SUCCESS"}) + :Timeout(iTimeout) + + --mobile side: expect OnHashChange notification + EXPECT_NOTIFICATION("OnHashChange") + end + + --End test case PositiveResponseCheck.1.100 + ----------------------------------------------------------------------------------------- + + --Begin test case PositiveResponseCheck.1.101 + --Description: Check keyboardPropertiesautoCompleteText parameter is lower bound + + function Test:SetGlobalProperties_keyboardProperties_autoCompleteText_IsLowerBound_1_SUCCESS() + + --mobile side: sending SetGlobalProperties request + local cid = self.mobileSession:SendRPC("SetGlobalProperties", + { + menuTitle = "Menu Title", + timeoutPrompt = + { + { + text = "Timeout prompt", + type = "TEXT" + } + }, + vrHelp = + { + { + position = 1, + image = + { + value = "action.png", + imageType = "DYNAMIC" + }, + text = "VR help item" + } + }, + menuIcon = + { + value = "action.png", + imageType = "DYNAMIC" + }, + helpPrompt = + { + { + text = "Help prompt", + type = "TEXT" + } + }, + vrHelpTitle = "VR help title", + keyboardProperties = + { + keyboardLayout = "QWERTY", + keypressMode = "SINGLE_KEYPRESS", + limitedCharacterList = + { + "a" + }, + language = "EN-US", + autoCompleteText = "q" + } + }) + + + --hmi side: expect TTS.SetGlobalProperties request + EXPECT_HMICALL("TTS.SetGlobalProperties", + { + timeoutPrompt = + { + { + text = "Timeout prompt", + type = "TEXT" + } + }, + helpPrompt = + { + { + text = "Help prompt", + type = "TEXT" + } + } + }) + :Timeout(iTimeout) + :Do(function(_,data) + --hmi side: sending UI.SetGlobalProperties response + self.hmiConnection:SendResponse(data.id, data.method, "SUCCESS", {}) + end) + + + + --hmi side: expect UI.SetGlobalProperties request + EXPECT_HMICALL("UI.SetGlobalProperties", + { + menuTitle = "Menu Title", + vrHelp = + { + { + position = 1, + --[=[ TODO: update after resolving APPLINK-16052 + + image = + { + imageType = "DYNAMIC", + value = strAppFolder .. "action.png" + },]=] + text = "VR help item" + } + }, + --Checked below + -- menuIcon = + -- { + -- imageType = "DYNAMIC", + -- value = strAppFolder .. "action.png" + -- }, + vrHelpTitle = "VR help title", + keyboardProperties = + { + keyboardLayout = "QWERTY", + keypressMode = "SINGLE_KEYPRESS", + --[=[ TODO: update after resolving APPLINK-16047 + + limitedCharacterList = + { + "a" + },]=] + language = "EN-US", + autoCompleteText = "q" + } + }) + :Timeout(iTimeout) + :ValidIf(function(_,data) + return Check_menuIconParams(data) + end) + :Do(function(_,data) + --hmi side: sending UI.SetGlobalProperties response + self.hmiConnection:SendResponse(data.id, data.method, "SUCCESS", {}) + end) + + + + --mobile side: expect SetGlobalProperties response + EXPECT_RESPONSE(cid, { success = true, resultCode = "SUCCESS"}) + :Timeout(iTimeout) + + --mobile side: expect OnHashChange notification + EXPECT_NOTIFICATION("OnHashChange") + end + + --End test case PositiveResponseCheck.1.101 + ----------------------------------------------------------------------------------------- + + --Begin test case PositiveResponseCheck.1.102 + --Description: Check keyboardPropertiesautoCompleteText parameter is upper bound + + function Test:SetGlobalProperties_keyboardProperties_autoCompleteText_IsUpperBound_1000_SUCCESS() + + --mobile side: sending SetGlobalProperties request + local cid = self.mobileSession:SendRPC("SetGlobalProperties", + { + menuTitle = "Menu Title", + timeoutPrompt = + { + { + text = "Timeout prompt", + type = "TEXT" + } + }, + vrHelp = + { + { + position = 1, + image = + { + value = "action.png", + imageType = "DYNAMIC" + }, + text = "VR help item" + } + }, + menuIcon = + { + value = "action.png", + imageType = "DYNAMIC" + }, + helpPrompt = + { + { + text = "Help prompt", + type = "TEXT" + } + }, + vrHelpTitle = "VR help title", + keyboardProperties = + { + keyboardLayout = "QWERTY", + keypressMode = "SINGLE_KEYPRESS", + limitedCharacterList = + { + "a" + }, + language = "EN-US", + autoCompleteText = "qA1_wB2_eA3_rB4_tA5_yB6_uA7_iB8_oA9_pB0_aA1_sB2_dA3_fB4_gA5_hB6_jA7_kB8_lA9_zB0_xA1_cB2_vA3_bB4_nA5_mB6_qA7_wB8_eA9_rB0_tA1_yB2_uA3_iB4_oA5_pB6_aA7_sB8_dA9_fB0_gA1_hB2_jA3_kB4_lA5_zB6_xA7_cB8_vA9_bB0_nA1_mB2_qA3_wB4_eA5_rB6_tA7_yB8_uA9_iB0_oA1_pB2_aA3_sB4_dA5_fB6_gA7_hB8_jA9_kB0_lA1_zB2_xA3_cB4_vA5_bB6_nA7_mB8_qA9_wB0_eA1_rB2_tA3_yB4_uA5_iB6_oA7_pB8_aA9_sB0_dA1_fB2_gA3_hB4_jA5_kB6_lA7_zB8_xA9_cB0_vA1_bB2_nA3_mB4_qA5_wB6_eA7_rB8_tA9_yB0_uA1_iB2_oA3_pB4_aA5_sB6_dA7_fB8_gA9_hB0_jA1_kB2_lA3_zB4_xA5_cB6_vA7_bB8_nA9_mB0_qA1_wB2_eA3_rB4_tA5_yB6_uA7_iB8_oA9_pB0_aA1_sB2_dA3_fB4_gA5_hB6_jA7_kB8_lA9_zB0_xA1_cB2_vA3_bB4_nA5_mB6_qA7_wB8_eA9_rB0_tA1_yB2_uA3_iB4_oA5_pB6_aA7_sB8_dA9_fB0_gA1_hB2_jA3_kB4_lA5_zB6_xA7_cB8_vA9_bB0_nA1_mB2_qA3_wB4_eA5_rB6_tA7_yB8_uA9_iB0_oA1_pB2_aA3_sB4_dA5_fB6_gA7_hB8_jA9_kB0_lA1_zB2_xA3_cB4_vA5_bB6_nA7_mB8_qA9_wB0_eA1_rB2_tA3_yB4_uA5_iB6_oA7_pB8_aA9_sB0_dA1_fB2_gA3_hB4_jA5_kB6_lA7_zB8_xA9_cB0_vA1_bB2_nA3_mB4_qA5_wB6_eA7_rB8_tA9_yB0_uA1_iB2_oA3_pB4_aA5_sB6_dA7_fB8_gA9_hB0_" + } + }) + + + --hmi side: expect TTS.SetGlobalProperties request + EXPECT_HMICALL("TTS.SetGlobalProperties", + { + timeoutPrompt = + { + { + text = "Timeout prompt", + type = "TEXT" + } + }, + helpPrompt = + { + { + text = "Help prompt", + type = "TEXT" + } + } + }) + :Timeout(iTimeout) + :Do(function(_,data) + --hmi side: sending UI.SetGlobalProperties response + self.hmiConnection:SendResponse(data.id, data.method, "SUCCESS", {}) + end) + + + + --hmi side: expect UI.SetGlobalProperties request + EXPECT_HMICALL("UI.SetGlobalProperties", + { + menuTitle = "Menu Title", + vrHelp = + { + { + position = 1, + --[=[ TODO: update after resolving APPLINK-16052 + + image = + { + imageType = "DYNAMIC", + value = strAppFolder .. "action.png" + },]=] + text = "VR help item" + } + }, + --Checked below + -- menuIcon = + -- { + -- imageType = "DYNAMIC", + -- value = strAppFolder .. "action.png" + -- }, + vrHelpTitle = "VR help title", + keyboardProperties = + { + keyboardLayout = "QWERTY", + keypressMode = "SINGLE_KEYPRESS", + --[=[ TODO: update after resolving APPLINK-16047 + + limitedCharacterList = + { + "a" + },]=] + language = "EN-US", + autoCompleteText = "qA1_wB2_eA3_rB4_tA5_yB6_uA7_iB8_oA9_pB0_aA1_sB2_dA3_fB4_gA5_hB6_jA7_kB8_lA9_zB0_xA1_cB2_vA3_bB4_nA5_mB6_qA7_wB8_eA9_rB0_tA1_yB2_uA3_iB4_oA5_pB6_aA7_sB8_dA9_fB0_gA1_hB2_jA3_kB4_lA5_zB6_xA7_cB8_vA9_bB0_nA1_mB2_qA3_wB4_eA5_rB6_tA7_yB8_uA9_iB0_oA1_pB2_aA3_sB4_dA5_fB6_gA7_hB8_jA9_kB0_lA1_zB2_xA3_cB4_vA5_bB6_nA7_mB8_qA9_wB0_eA1_rB2_tA3_yB4_uA5_iB6_oA7_pB8_aA9_sB0_dA1_fB2_gA3_hB4_jA5_kB6_lA7_zB8_xA9_cB0_vA1_bB2_nA3_mB4_qA5_wB6_eA7_rB8_tA9_yB0_uA1_iB2_oA3_pB4_aA5_sB6_dA7_fB8_gA9_hB0_jA1_kB2_lA3_zB4_xA5_cB6_vA7_bB8_nA9_mB0_qA1_wB2_eA3_rB4_tA5_yB6_uA7_iB8_oA9_pB0_aA1_sB2_dA3_fB4_gA5_hB6_jA7_kB8_lA9_zB0_xA1_cB2_vA3_bB4_nA5_mB6_qA7_wB8_eA9_rB0_tA1_yB2_uA3_iB4_oA5_pB6_aA7_sB8_dA9_fB0_gA1_hB2_jA3_kB4_lA5_zB6_xA7_cB8_vA9_bB0_nA1_mB2_qA3_wB4_eA5_rB6_tA7_yB8_uA9_iB0_oA1_pB2_aA3_sB4_dA5_fB6_gA7_hB8_jA9_kB0_lA1_zB2_xA3_cB4_vA5_bB6_nA7_mB8_qA9_wB0_eA1_rB2_tA3_yB4_uA5_iB6_oA7_pB8_aA9_sB0_dA1_fB2_gA3_hB4_jA5_kB6_lA7_zB8_xA9_cB0_vA1_bB2_nA3_mB4_qA5_wB6_eA7_rB8_tA9_yB0_uA1_iB2_oA3_pB4_aA5_sB6_dA7_fB8_gA9_hB0_" + } + }) + :Timeout(iTimeout) + :ValidIf(function(_,data) + return Check_menuIconParams(data) + end) + :Do(function(_,data) + --hmi side: sending UI.SetGlobalProperties response + self.hmiConnection:SendResponse(data.id, data.method, "SUCCESS", {}) + end) + + + + --mobile side: expect SetGlobalProperties response + EXPECT_RESPONSE(cid, { success = true, resultCode = "SUCCESS"}) + :Timeout(iTimeout) + + --mobile side: expect OnHashChange notification + EXPECT_NOTIFICATION("OnHashChange") + end + + --End test case PositiveResponseCheck.1.102 + ----------------------------------------------------------------------------------------- + + --Begin test case PositiveResponseCheck.1.103 + --Description: Check keyboardPropertiesautoCompleteText parameter contains space characters _SpaceCharacter_SpaceBefore + + function Test:SetGlobalProperties_keyboardProperties_autoCompleteText__SpaceCharacter_SpaceBefore_SUCCESS() + + --mobile side: sending SetGlobalProperties request + local cid = self.mobileSession:SendRPC("SetGlobalProperties", + { + menuTitle = "Menu Title", + timeoutPrompt = + { + { + text = "Timeout prompt", + type = "TEXT" + } + }, + vrHelp = + { + { + position = 1, + image = + { + value = "action.png", + imageType = "DYNAMIC" + }, + text = "VR help item" + } + }, + menuIcon = + { + value = "action.png", + imageType = "DYNAMIC" + }, + helpPrompt = + { + { + text = "Help prompt", + type = "TEXT" + } + }, + vrHelpTitle = "VR help title", + keyboardProperties = + { + keyboardLayout = "QWERTY", + keypressMode = "SINGLE_KEYPRESS", + limitedCharacterList = + { + "a" + }, + language = "EN-US", + autoCompleteText = " SpaceBefore" + } + }) + + + --hmi side: expect TTS.SetGlobalProperties request + EXPECT_HMICALL("TTS.SetGlobalProperties", + { + timeoutPrompt = + { + { + text = "Timeout prompt", + type = "TEXT" + } + }, + helpPrompt = + { + { + text = "Help prompt", + type = "TEXT" + } + } + }) + :Timeout(iTimeout) + :Do(function(_,data) + --hmi side: sending UI.SetGlobalProperties response + self.hmiConnection:SendResponse(data.id, data.method, "SUCCESS", {}) + end) + + + + --hmi side: expect UI.SetGlobalProperties request + EXPECT_HMICALL("UI.SetGlobalProperties", + { + menuTitle = "Menu Title", + vrHelp = + { + { + position = 1, + --[=[ TODO: update after resolving APPLINK-16052 + + image = + { + imageType = "DYNAMIC", + value = strAppFolder .. "action.png" + },]=] + text = "VR help item" + } + }, + --Checked below + -- menuIcon = + -- { + -- imageType = "DYNAMIC", + -- value = strAppFolder .. "action.png" + -- }, + vrHelpTitle = "VR help title", + keyboardProperties = + { + keyboardLayout = "QWERTY", + keypressMode = "SINGLE_KEYPRESS", + --[=[ TODO: update after resolving APPLINK-16047 + + limitedCharacterList = + { + "a" + },]=] + language = "EN-US", + autoCompleteText = " SpaceBefore" + } + }) + :Timeout(iTimeout) + :ValidIf(function(_,data) + return Check_menuIconParams(data) + end) + :Do(function(_,data) + --hmi side: sending UI.SetGlobalProperties response + self.hmiConnection:SendResponse(data.id, data.method, "SUCCESS", {}) + end) + + + + --mobile side: expect SetGlobalProperties response + EXPECT_RESPONSE(cid, { success = true, resultCode = "SUCCESS"}) + :Timeout(iTimeout) + + --mobile side: expect OnHashChange notification + EXPECT_NOTIFICATION("OnHashChange") + end + + --End test case PositiveResponseCheck.1.103 + ----------------------------------------------------------------------------------------- + + --Begin test case PositiveResponseCheck.1.104 + --Description: Check keyboardPropertiesautoCompleteText parameter contains space characters SpaceAfter_SpaceCharacter_ + + function Test:SetGlobalProperties_keyboardProperties_autoCompleteText_SpaceAfter_SpaceCharacter__SUCCESS() + + --mobile side: sending SetGlobalProperties request + local cid = self.mobileSession:SendRPC("SetGlobalProperties", + { + menuTitle = "Menu Title", + timeoutPrompt = + { + { + text = "Timeout prompt", + type = "TEXT" + } + }, + vrHelp = + { + { + position = 1, + image = + { + value = "action.png", + imageType = "DYNAMIC" + }, + text = "VR help item" + } + }, + menuIcon = + { + value = "action.png", + imageType = "DYNAMIC" + }, + helpPrompt = + { + { + text = "Help prompt", + type = "TEXT" + } + }, + vrHelpTitle = "VR help title", + keyboardProperties = + { + keyboardLayout = "QWERTY", + keypressMode = "SINGLE_KEYPRESS", + limitedCharacterList = + { + "a" + }, + language = "EN-US", + autoCompleteText = "SpaceAfter " + } + }) + + + --hmi side: expect TTS.SetGlobalProperties request + EXPECT_HMICALL("TTS.SetGlobalProperties", + { + timeoutPrompt = + { + { + text = "Timeout prompt", + type = "TEXT" + } + }, + helpPrompt = + { + { + text = "Help prompt", + type = "TEXT" + } + } + }) + :Timeout(iTimeout) + :Do(function(_,data) + --hmi side: sending UI.SetGlobalProperties response + self.hmiConnection:SendResponse(data.id, data.method, "SUCCESS", {}) + end) + + + + --hmi side: expect UI.SetGlobalProperties request + EXPECT_HMICALL("UI.SetGlobalProperties", + { + menuTitle = "Menu Title", + vrHelp = + { + { + position = 1, + --[=[ TODO: update after resolving APPLINK-16052 + + image = + { + imageType = "DYNAMIC", + value = strAppFolder .. "action.png" + },]=] + text = "VR help item" + } + }, + --checked below + -- menuIcon = + -- { + -- imageType = "DYNAMIC", + -- value = strAppFolder .. "action.png" + -- }, + vrHelpTitle = "VR help title", + keyboardProperties = + { + keyboardLayout = "QWERTY", + keypressMode = "SINGLE_KEYPRESS", + --[=[ TODO: update after resolving APPLINK-16047 + + limitedCharacterList = + { + "a" + },]=] + language = "EN-US", + autoCompleteText = "SpaceAfter " + } + }) + :Timeout(iTimeout) + :ValidIf(function(_,data) + return Check_menuIconParams(data) + end) + :Do(function(_,data) + --hmi side: sending UI.SetGlobalProperties response + self.hmiConnection:SendResponse(data.id, data.method, "SUCCESS", {}) + end) + + + + --mobile side: expect SetGlobalProperties response + EXPECT_RESPONSE(cid, { success = true, resultCode = "SUCCESS"}) + :Timeout(iTimeout) + + --mobile side: expect OnHashChange notification + EXPECT_NOTIFICATION("OnHashChange") + end + + --End test case PositiveResponseCheck.1.104 + ----------------------------------------------------------------------------------------- + + --Begin test case PositiveResponseCheck.1.105 + --Description: Check keyboardPropertiesautoCompleteText parameter contains space characters Space_SpaceCharacter_In_SpaceCharacter_The_SpaceCharacter_Middle + + function Test:SetGlobalProperties_keyboardProperties_autoCompleteText_Space_SpaceCharacter_In_SpaceCharacter_The_SpaceCharacter_Middle_SUCCESS() + + --mobile side: sending SetGlobalProperties request + local cid = self.mobileSession:SendRPC("SetGlobalProperties", + { + menuTitle = "Menu Title", + timeoutPrompt = + { + { + text = "Timeout prompt", + type = "TEXT" + } + }, + vrHelp = + { + { + position = 1, + image = + { + value = "action.png", + imageType = "DYNAMIC" + }, + text = "VR help item" + } + }, + menuIcon = + { + value = "action.png", + imageType = "DYNAMIC" + }, + helpPrompt = + { + { + text = "Help prompt", + type = "TEXT" + } + }, + vrHelpTitle = "VR help title", + keyboardProperties = + { + keyboardLayout = "QWERTY", + keypressMode = "SINGLE_KEYPRESS", + limitedCharacterList = + { + "a" + }, + language = "EN-US", + autoCompleteText = "Space In The Middle" + } + }) + + + --hmi side: expect TTS.SetGlobalProperties request + EXPECT_HMICALL("TTS.SetGlobalProperties", + { + timeoutPrompt = + { + { + text = "Timeout prompt", + type = "TEXT" + } + }, + helpPrompt = + { + { + text = "Help prompt", + type = "TEXT" + } + } + }) + :Timeout(iTimeout) + :Do(function(_,data) + --hmi side: sending UI.SetGlobalProperties response + self.hmiConnection:SendResponse(data.id, data.method, "SUCCESS", {}) + end) + + + + --hmi side: expect UI.SetGlobalProperties request + EXPECT_HMICALL("UI.SetGlobalProperties", + { + menuTitle = "Menu Title", + vrHelp = + { + { + position = 1, + --[=[ TODO: update after resolving APPLINK-16052 + + image = + { + imageType = "DYNAMIC", + value = strAppFolder .. "action.png" + },]=] + text = "VR help item" + } + }, + --Checked below + -- menuIcon = + -- { + -- imageType = "DYNAMIC", + -- value = strAppFolder .. "action.png" + -- }, + vrHelpTitle = "VR help title", + keyboardProperties = + { + keyboardLayout = "QWERTY", + keypressMode = "SINGLE_KEYPRESS", + --[=[ TODO: update after resolving APPLINK-16047 + + limitedCharacterList = + { + "a" + },]=] + language = "EN-US", + autoCompleteText = "Space In The Middle" + } + }) + :Timeout(iTimeout) + :ValidIf(function(_,data) + return Check_menuIconParams(data) + end) + :Do(function(_,data) + --hmi side: sending UI.SetGlobalProperties response + self.hmiConnection:SendResponse(data.id, data.method, "SUCCESS", {}) + end) + + + + --mobile side: expect SetGlobalProperties response + EXPECT_RESPONSE(cid, { success = true, resultCode = "SUCCESS"}) + :Timeout(iTimeout) + + --mobile side: expect OnHashChange notification + EXPECT_NOTIFICATION("OnHashChange") + end + + --End test case PositiveResponseCheck.1.105 + ----------------------------------------------------------------------------------------- + + --Begin test case PositiveResponseCheck.1.106 + --Description: Check keyboardPropertiesautoCompleteText parameter contains space characters _SpaceCharacter_Space_SpaceCharacter_Every_SpaceCharacter_Where_SpaceCharacter_ + + function Test:SetGlobalProperties_keyboardProperties_autoCompleteText__SpaceCharacter_Space_SpaceCharacter_Every_SpaceCharacter_Where_SpaceCharacter__SUCCESS() + + --mobile side: sending SetGlobalProperties request + local cid = self.mobileSession:SendRPC("SetGlobalProperties", + { + menuTitle = "Menu Title", + timeoutPrompt = + { + { + text = "Timeout prompt", + type = "TEXT" + } + }, + vrHelp = + { + { + position = 1, + image = + { + value = "action.png", + imageType = "DYNAMIC" + }, + text = "VR help item" + } + }, + menuIcon = + { + value = "action.png", + imageType = "DYNAMIC" + }, + helpPrompt = + { + { + text = "Help prompt", + type = "TEXT" + } + }, + vrHelpTitle = "VR help title", + keyboardProperties = + { + keyboardLayout = "QWERTY", + keypressMode = "SINGLE_KEYPRESS", + limitedCharacterList = + { + "a" + }, + language = "EN-US", + autoCompleteText = " Space Every Where " + } + }) + + + --hmi side: expect TTS.SetGlobalProperties request + EXPECT_HMICALL("TTS.SetGlobalProperties", + { + timeoutPrompt = + { + { + text = "Timeout prompt", + type = "TEXT" + } + }, + helpPrompt = + { + { + text = "Help prompt", + type = "TEXT" + } + } + }) + :Timeout(iTimeout) + :Do(function(_,data) + --hmi side: sending UI.SetGlobalProperties response + self.hmiConnection:SendResponse(data.id, data.method, "SUCCESS", {}) + end) + + + + --hmi side: expect UI.SetGlobalProperties request + EXPECT_HMICALL("UI.SetGlobalProperties", + { + menuTitle = "Menu Title", + vrHelp = + { + { + position = 1, + --[=[ TODO: update after resolving APPLINK-16052 + + image = + { + imageType = "DYNAMIC", + value = strAppFolder .. "action.png" + },]=] + text = "VR help item" + } + }, + --Checked below + -- menuIcon = + -- { + -- imageType = "DYNAMIC", + -- value = strAppFolder .. "action.png" + -- }, + vrHelpTitle = "VR help title", + keyboardProperties = + { + keyboardLayout = "QWERTY", + keypressMode = "SINGLE_KEYPRESS", + --[=[ TODO: update after resolving APPLINK-16047 + + limitedCharacterList = + { + "a" + },]=] + language = "EN-US", + autoCompleteText = " Space Every Where " + } + }) + :Timeout(iTimeout) + :ValidIf(function(_,data) + return Check_menuIconParams(data) + end) + :Do(function(_,data) + --hmi side: sending UI.SetGlobalProperties response + self.hmiConnection:SendResponse(data.id, data.method, "SUCCESS", {}) + end) + + + + --mobile side: expect SetGlobalProperties response + EXPECT_RESPONSE(cid, { success = true, resultCode = "SUCCESS"}) + :Timeout(iTimeout) + + --mobile side: expect OnHashChange notification + EXPECT_NOTIFICATION("OnHashChange") + end + + --End test case PositiveResponseCheck.1.106 + ----------------------------------------------------------------------------------------- + + --Begin test case PositiveResponseCheck.1.107 + --Description: Check timeoutPrompt: type parameter (ttsChunks) is not supported data (SAPI_PHONEMES) + + function Test:SetGlobalProperties_timeoutPrompt_type_SAPI_PHONEMES_WARNINGS() + + --mobile side: sending SetGlobalProperties request + local cid = self.mobileSession:SendRPC("SetGlobalProperties", + { + menuTitle = "Menu Title", + timeoutPrompt = + { + { + text = "Timeout prompt", + type = "SAPI_PHONEMES" + } + }, + vrHelp = + { + { + position = 1, + image = + { + value = "action.png", + imageType = "DYNAMIC" + }, + text = "VR help item" + } + }, + menuIcon = + { + value = "action.png", + imageType = "DYNAMIC" + }, + helpPrompt = + { + { + text = "Help prompt", + type = "TEXT" + } + }, + vrHelpTitle = "VR help title", + keyboardProperties = + { + keyboardLayout = "QWERTY", + keypressMode = "SINGLE_KEYPRESS", + limitedCharacterList = + { + "a" + }, + language = "EN-US", + autoCompleteText = "Daemon, Freedom" + } + }) + + + --hmi side: expect TTS.SetGlobalProperties request + EXPECT_HMICALL("TTS.SetGlobalProperties", + { + timeoutPrompt = + { + { + text = "Timeout prompt", + type = "SAPI_PHONEMES" + } + }, + helpPrompt = + { + { + text = "Help prompt", + type = "TEXT" + } + } + }) + :Timeout(iTimeout) + :Do(function(_,data) + --hmi side: sending TTS.SetGlobalProperties response + self.hmiConnection:SendResponse(data.id, data.method, "WARNINGS", {}) + end) + + + + --hmi side: expect UI.SetGlobalProperties request + EXPECT_HMICALL("UI.SetGlobalProperties", + { + menuTitle = "Menu Title", + vrHelp = + { + { + position = 1, + --[=[ TODO: update after resolving APPLINK-16052 + + image = + { + imageType = "DYNAMIC", + value = strAppFolder .. "action.png" + },]=] + text = "VR help item" + } + }, + --Checked below + -- menuIcon = + -- { + -- imageType = "DYNAMIC", + -- value = strAppFolder .. "action.png" + -- }, + vrHelpTitle = "VR help title", + keyboardProperties = + { + keyboardLayout = "QWERTY", + keypressMode = "SINGLE_KEYPRESS", + --[=[ TODO: update after resolving APPLINK-16047 + + limitedCharacterList = + { + "a" + },]=] + language = "EN-US", + autoCompleteText = "Daemon, Freedom" + } + }) + :Timeout(iTimeout) + :ValidIf(function(_,data) + return Check_menuIconParams(data) + end) + :Do(function(_,data) + --hmi side: sending UI.SetGlobalProperties response + self.hmiConnection:SendResponse(data.id, data.method, "SUCCESS", {}) + end) + + + + --mobile side: expect SetGlobalProperties response + EXPECT_RESPONSE(cid, { success = true, resultCode = "WARNINGS"}) + :Timeout(iTimeout) + + --mobile side: expect OnHashChange notification + EXPECT_NOTIFICATION("OnHashChange") + end + + --End test case PositiveResponseCheck.1.107 + ----------------------------------------------------------------------------------------- + + --Begin test case PositiveResponseCheck.1.108 + --Description: Check timeoutPrompt: type parameter (ttsChunks) is not supported data (LHPLUS_PHONEMES) + + function Test:SetGlobalProperties_timeoutPrompt_type_LHPLUS_PHONEMES_WARNINGS() + + --mobile side: sending SetGlobalProperties request + local cid = self.mobileSession:SendRPC("SetGlobalProperties", + { + menuTitle = "Menu Title", + timeoutPrompt = + { + { + text = "Timeout prompt", + type = "LHPLUS_PHONEMES" + } + }, + vrHelp = + { + { + position = 1, + image = + { + value = "action.png", + imageType = "DYNAMIC" + }, + text = "VR help item" + } + }, + menuIcon = + { + value = "action.png", + imageType = "DYNAMIC" + }, + helpPrompt = + { + { + text = "Help prompt", + type = "TEXT" + } + }, + vrHelpTitle = "VR help title", + keyboardProperties = + { + keyboardLayout = "QWERTY", + keypressMode = "SINGLE_KEYPRESS", + limitedCharacterList = + { + "a" + }, + language = "EN-US", + autoCompleteText = "Daemon, Freedom" + } + }) + + + --hmi side: expect TTS.SetGlobalProperties request + EXPECT_HMICALL("TTS.SetGlobalProperties", + { + timeoutPrompt = + { + { + text = "Timeout prompt", + type = "LHPLUS_PHONEMES" + } + }, + helpPrompt = + { + { + text = "Help prompt", + type = "TEXT" + } + } + }) + :Timeout(iTimeout) + :Do(function(_,data) + --hmi side: sending TTS.SetGlobalProperties response + self.hmiConnection:SendResponse(data.id, data.method, "WARNINGS", {}) + end) + + + + --hmi side: expect UI.SetGlobalProperties request + EXPECT_HMICALL("UI.SetGlobalProperties", + { + menuTitle = "Menu Title", + vrHelp = + { + { + position = 1, + --[=[ TODO: update after resolving APPLINK-16052 + + image = + { + imageType = "DYNAMIC", + value = strAppFolder .. "action.png" + },]=] + text = "VR help item" + } + }, + --Checked below + -- menuIcon = + -- { + -- imageType = "DYNAMIC", + -- value = strAppFolder .. "action.png" + -- }, + vrHelpTitle = "VR help title", + keyboardProperties = + { + keyboardLayout = "QWERTY", + keypressMode = "SINGLE_KEYPRESS", + --[=[ TODO: update after resolving APPLINK-16047 + + limitedCharacterList = + { + "a" + },]=] + language = "EN-US", + autoCompleteText = "Daemon, Freedom" + } + }) + :Timeout(iTimeout) + :ValidIf(function(_,data) + return Check_menuIconParams(data) + end) + :Do(function(_,data) + --hmi side: sending UI.SetGlobalProperties response + self.hmiConnection:SendResponse(data.id, data.method, "SUCCESS", {}) + end) + + + + --mobile side: expect SetGlobalProperties response + EXPECT_RESPONSE(cid, { success = true, resultCode = "WARNINGS"}) + :Timeout(iTimeout) + + --mobile side: expect OnHashChange notification + EXPECT_NOTIFICATION("OnHashChange") + end + + --End test case PositiveResponseCheck.1.108 + ----------------------------------------------------------------------------------------- + + --Begin test case PositiveResponseCheck.1.109 + --Description: Check timeoutPrompt: type parameter (ttsChunks) is not supported data (PRE_RECORDED) + + --SetGlobalProperties_timeoutPrompt_type_PRE_RECORDED_WARNINGS(): This case is already covered by ResultCodeCheck.3 + + --End test case PositiveResponseCheck.1.109 + ----------------------------------------------------------------------------------------- + + --Begin test case PositiveResponseCheck.1.110 + --Description: Check timeoutPrompt: type parameter (ttsChunks) is not supported data (SILENCE) + + function Test:SetGlobalProperties_timeoutPrompt_type_SILENCE_WARNINGS() + + --mobile side: sending SetGlobalProperties request + local cid = self.mobileSession:SendRPC("SetGlobalProperties", + { + menuTitle = "Menu Title", + timeoutPrompt = + { + { + text = "Timeout prompt", + type = "SILENCE" + } + }, + vrHelp = + { + { + position = 1, + image = + { + value = "action.png", + imageType = "DYNAMIC" + }, + text = "VR help item" + } + }, + menuIcon = + { + value = "action.png", + imageType = "DYNAMIC" + }, + helpPrompt = + { + { + text = "Help prompt", + type = "TEXT" + } + }, + vrHelpTitle = "VR help title", + keyboardProperties = + { + keyboardLayout = "QWERTY", + keypressMode = "SINGLE_KEYPRESS", + limitedCharacterList = + { + "a" + }, + language = "EN-US", + autoCompleteText = "Daemon, Freedom" + } + }) + + + --hmi side: expect TTS.SetGlobalProperties request + EXPECT_HMICALL("TTS.SetGlobalProperties", + { + timeoutPrompt = + { + { + text = "Timeout prompt", + type = "SILENCE" + } + }, + helpPrompt = + { + { + text = "Help prompt", + type = "TEXT" + } + } + }) + :Timeout(iTimeout) + :Do(function(_,data) + --hmi side: sending TTS.SetGlobalProperties response + self.hmiConnection:SendResponse(data.id, data.method, "WARNINGS", {}) + end) + + + + --hmi side: expect UI.SetGlobalProperties request + EXPECT_HMICALL("UI.SetGlobalProperties", + { + menuTitle = "Menu Title", + vrHelp = + { + { + position = 1, + --[=[ TODO: update after resolving APPLINK-16052 + + image = + { + imageType = "DYNAMIC", + value = strAppFolder .. "action.png" + },]=] + text = "VR help item" + } + }, + --Checked below + -- menuIcon = + -- { + -- imageType = "DYNAMIC", + -- value = strAppFolder .. "action.png" + -- }, + vrHelpTitle = "VR help title", + keyboardProperties = + { + keyboardLayout = "QWERTY", + keypressMode = "SINGLE_KEYPRESS", + --[=[ TODO: update after resolving APPLINK-16047 + + limitedCharacterList = + { + "a" + },]=] + language = "EN-US", + autoCompleteText = "Daemon, Freedom" + } + }) + :Timeout(iTimeout) + :ValidIf(function(_,data) + return Check_menuIconParams(data) + end) + :Do(function(_,data) + --hmi side: sending UI.SetGlobalProperties response + self.hmiConnection:SendResponse(data.id, data.method, "SUCCESS", {}) + end) + + + + --mobile side: expect SetGlobalProperties response + EXPECT_RESPONSE(cid, { success = true, resultCode = "WARNINGS"}) + :Timeout(iTimeout) + + --mobile side: expect OnHashChange notification + EXPECT_NOTIFICATION("OnHashChange") + + end + + --End test case PositiveResponseCheck.1.110 + ----------------------------------------------------------------------------------------- + + --Begin test case PositiveResponseCheck.1.111 + --Description: Check helpPrompt: type parameter (ttsChunks) is not supported data (SAPI_PHONEMES) + + function Test:SetGlobalProperties_helpPrompt_type_SAPI_PHONEMES_WARNINGS() + + --mobile side: sending SetGlobalProperties request + local cid = self.mobileSession:SendRPC("SetGlobalProperties", + { + menuTitle = "Menu Title", + timeoutPrompt = + { + { + text = "Timeout prompt", + type = "TEXT" + } + }, + vrHelp = + { + { + position = 1, + image = + { + value = "action.png", + imageType = "DYNAMIC" + }, + text = "VR help item" + } + }, + menuIcon = + { + value = "action.png", + imageType = "DYNAMIC" + }, + helpPrompt = + { + { + text = "Help prompt", + type = "SAPI_PHONEMES" + } + }, + vrHelpTitle = "VR help title", + keyboardProperties = + { + keyboardLayout = "QWERTY", + keypressMode = "SINGLE_KEYPRESS", + limitedCharacterList = + { + "a" + }, + language = "EN-US", + autoCompleteText = "Daemon, Freedom" + } + }) + + + --hmi side: expect TTS.SetGlobalProperties request + EXPECT_HMICALL("TTS.SetGlobalProperties", + { + timeoutPrompt = + { + { + text = "Timeout prompt", + type = "TEXT" + } + }, + helpPrompt = + { + { + text = "Help prompt", + type = "SAPI_PHONEMES" + } + } + }) + :Timeout(iTimeout) + :Do(function(_,data) + --hmi side: sending TTS.SetGlobalProperties response + self.hmiConnection:SendResponse(data.id, data.method, "WARNINGS", {}) + end) + + + + --hmi side: expect UI.SetGlobalProperties request + EXPECT_HMICALL("UI.SetGlobalProperties", + { + menuTitle = "Menu Title", + vrHelp = + { + { + position = 1, + --[=[ TODO: update after resolving APPLINK-16052 + + image = + { + imageType = "DYNAMIC", + value = strAppFolder .. "action.png" + },]=] + text = "VR help item" + } + }, + --Checked below + -- menuIcon = + -- { + -- imageType = "DYNAMIC", + -- value = strAppFolder .. "action.png" + -- }, + vrHelpTitle = "VR help title", + keyboardProperties = + { + keyboardLayout = "QWERTY", + keypressMode = "SINGLE_KEYPRESS", + --[=[ TODO: update after resolving APPLINK-16047 + + limitedCharacterList = + { + "a" + },]=] + language = "EN-US", + autoCompleteText = "Daemon, Freedom" + } + }) + :Timeout(iTimeout) + :ValidIf(function(_,data) + return Check_menuIconParams(data) + end) + :Do(function(_,data) + --hmi side: sending UI.SetGlobalProperties response + self.hmiConnection:SendResponse(data.id, data.method, "SUCCESS", {}) + end) + + --mobile side: expect SetGlobalProperties response + EXPECT_RESPONSE(cid, { success = true, resultCode = "WARNINGS"}) + :Timeout(iTimeout) + + --mobile side: expect OnHashChange notification + + EXPECT_NOTIFICATION("OnHashChange") + end + --End test case PositiveResponseCheck.1.111 + ----------------------------------------------------------------------------------------- + + --Begin test case PositiveResponseCheck.1.112 + --Description: Check helpPrompt: type parameter (ttsChunks) is not supported data (LHPLUS_PHONEMES) + + function Test:SetGlobalProperties_helpPrompt_type_LHPLUS_PHONEMES_WARNINGS() + + --mobile side: sending SetGlobalProperties request + local cid = self.mobileSession:SendRPC("SetGlobalProperties", + { + menuTitle = "Menu Title", + timeoutPrompt = + { + { + text = "Timeout prompt", + type = "TEXT" + } + }, + vrHelp = + { + { + position = 1, + image = + { + value = "action.png", + imageType = "DYNAMIC" + }, + text = "VR help item" + } + }, + menuIcon = + { + value = "action.png", + imageType = "DYNAMIC" + }, + helpPrompt = + { + { + text = "Help prompt", + type = "LHPLUS_PHONEMES" + } + }, + vrHelpTitle = "VR help title", + keyboardProperties = + { + keyboardLayout = "QWERTY", + keypressMode = "SINGLE_KEYPRESS", + limitedCharacterList = + { + "a" + }, + language = "EN-US", + autoCompleteText = "Daemon, Freedom" + } + }) + + + --hmi side: expect TTS.SetGlobalProperties request + EXPECT_HMICALL("TTS.SetGlobalProperties", + { + timeoutPrompt = + { + { + text = "Timeout prompt", + type = "TEXT" + } + }, + helpPrompt = + { + { + text = "Help prompt", + type = "LHPLUS_PHONEMES" + } + } + }) + :Timeout(iTimeout) + :Do(function(_,data) + --hmi side: sending TTS.SetGlobalProperties response + self.hmiConnection:SendResponse(data.id, data.method, "WARNINGS", {}) + end) + + + + --hmi side: expect UI.SetGlobalProperties request + EXPECT_HMICALL("UI.SetGlobalProperties", + { + menuTitle = "Menu Title", + vrHelp = + { + { + position = 1, + --[=[ TODO: update after resolving APPLINK-16052 + + image = + { + imageType = "DYNAMIC", + value = strAppFolder .. "action.png" + },]=] + text = "VR help item" + } + }, + --Checked below + -- menuIcon = + -- { + -- imageType = "DYNAMIC", + -- value = strAppFolder .. "action.png" + -- }, + vrHelpTitle = "VR help title", + keyboardProperties = + { + keyboardLayout = "QWERTY", + keypressMode = "SINGLE_KEYPRESS", + --[=[ TODO: update after resolving APPLINK-16047 + + limitedCharacterList = + { + "a" + },]=] + language = "EN-US", + autoCompleteText = "Daemon, Freedom" + } + }) + :Timeout(iTimeout) + :ValidIf(function(_,data) + return Check_menuIconParams(data) + end) + :Do(function(_,data) + --hmi side: sending UI.SetGlobalProperties response + self.hmiConnection:SendResponse(data.id, data.method, "SUCCESS", {}) + end) + + + + --mobile side: expect SetGlobalProperties response + EXPECT_RESPONSE(cid, { success = true, resultCode = "WARNINGS"}) + :Timeout(iTimeout) + + --mobile side: expect OnHashChange notification + EXPECT_NOTIFICATION("OnHashChange") + end + + --End test case PositiveResponseCheck.1.112 + ----------------------------------------------------------------------------------------- + + --Begin test case PositiveResponseCheck.1.113 + --Description: Check helpPrompt: type parameter (ttsChunks) is not supported data (PRE_RECORDED) + + function Test:SetGlobalProperties_helpPrompt_type_PRE_RECORDED_WARNINGS() + + --mobile side: sending SetGlobalProperties request + local cid = self.mobileSession:SendRPC("SetGlobalProperties", + { + menuTitle = "Menu Title", + timeoutPrompt = + { + { + text = "Timeout prompt", + type = "TEXT" + } + }, + vrHelp = + { + { + position = 1, + image = + { + value = "action.png", + imageType = "DYNAMIC" + }, + text = "VR help item" + } + }, + menuIcon = + { + value = "action.png", + imageType = "DYNAMIC" + }, + helpPrompt = + { + { + text = "Help prompt", + type = "PRE_RECORDED" + } + }, + vrHelpTitle = "VR help title", + keyboardProperties = + { + keyboardLayout = "QWERTY", + keypressMode = "SINGLE_KEYPRESS", + limitedCharacterList = + { + "a" + }, + language = "EN-US", + autoCompleteText = "Daemon, Freedom" + } + }) + + + --hmi side: expect TTS.SetGlobalProperties request + EXPECT_HMICALL("TTS.SetGlobalProperties", + { + timeoutPrompt = + { + { + text = "Timeout prompt", + type = "TEXT" + } + }, + helpPrompt = + { + { + text = "Help prompt", + type = "PRE_RECORDED" + } + } + }) + :Timeout(iTimeout) + :Do(function(_,data) + --hmi side: sending TTS.SetGlobalProperties response + self.hmiConnection:SendResponse(data.id, data.method, "WARNINGS", {}) + end) + + + + --hmi side: expect UI.SetGlobalProperties request + EXPECT_HMICALL("UI.SetGlobalProperties", + { + menuTitle = "Menu Title", + vrHelp = + { + { + position = 1, + --[=[ TODO: update after resolving APPLINK-16052 + + image = + { + imageType = "DYNAMIC", + value = strAppFolder .. "action.png" + },]=] + text = "VR help item" + } + }, + --Checked below + -- menuIcon = + -- { + -- imageType = "DYNAMIC", + -- value = strAppFolder .. "action.png" + -- }, + vrHelpTitle = "VR help title", + keyboardProperties = + { + keyboardLayout = "QWERTY", + keypressMode = "SINGLE_KEYPRESS", + --[=[ TODO: update after resolving APPLINK-16047 + + limitedCharacterList = + { + "a" + },]=] + language = "EN-US", + autoCompleteText = "Daemon, Freedom" + } + }) + :Timeout(iTimeout) + :ValidIf(function(_,data) + return Check_menuIconParams(data) + end) + :Do(function(_,data) + --hmi side: sending UI.SetGlobalProperties response + self.hmiConnection:SendResponse(data.id, data.method, "SUCCESS", {}) + end) + + + + --mobile side: expect SetGlobalProperties response + EXPECT_RESPONSE(cid, { success = true, resultCode = "WARNINGS"}) + :Timeout(iTimeout) + + --mobile side: expect OnHashChange notification + EXPECT_NOTIFICATION("OnHashChange") + end + + --End test case PositiveResponseCheck.1.113 + ----------------------------------------------------------------------------------------- + + --Begin test case PositiveResponseCheck.1.114 + --Description: Check helpPrompt: type parameter (ttsChunks) is not supported data (SILENCE) + + function Test:SetGlobalProperties_helpPrompt_type_SILENCE_WARNINGS() + + --mobile side: sending SetGlobalProperties request + local cid = self.mobileSession:SendRPC("SetGlobalProperties", + { + menuTitle = "Menu Title", + timeoutPrompt = + { + { + text = "Timeout prompt", + type = "TEXT" + } + }, + vrHelp = + { + { + position = 1, + image = + { + value = "action.png", + imageType = "DYNAMIC" + }, + text = "VR help item" + } + }, + menuIcon = + { + value = "action.png", + imageType = "DYNAMIC" + }, + helpPrompt = + { + { + text = "Help prompt", + type = "SILENCE" + } + }, + vrHelpTitle = "VR help title", + keyboardProperties = + { + keyboardLayout = "QWERTY", + keypressMode = "SINGLE_KEYPRESS", + limitedCharacterList = + { + "a" + }, + language = "EN-US", + autoCompleteText = "Daemon, Freedom" + } + }) + + + --hmi side: expect TTS.SetGlobalProperties request + EXPECT_HMICALL("TTS.SetGlobalProperties", + { + timeoutPrompt = + { + { + text = "Timeout prompt", + type = "TEXT" + } + }, + helpPrompt = + { + { + text = "Help prompt", + type = "SILENCE" + } + } + }) + :Timeout(iTimeout) + :Do(function(_,data) + --hmi side: sending TTS.SetGlobalProperties response + self.hmiConnection:SendResponse(data.id, data.method, "WARNINGS", {}) + end) + + + + --hmi side: expect UI.SetGlobalProperties request + EXPECT_HMICALL("UI.SetGlobalProperties", + { + menuTitle = "Menu Title", + vrHelp = + { + { + position = 1, + --[=[ TODO: update after resolving APPLINK-16052 + + image = + { + imageType = "DYNAMIC", + value = strAppFolder .. "action.png" + },]=] + text = "VR help item" + } + }, + --Checked below + -- menuIcon = + -- { + -- imageType = "DYNAMIC", + -- value = strAppFolder .. "action.png" + -- }, + vrHelpTitle = "VR help title", + keyboardProperties = + { + keyboardLayout = "QWERTY", + keypressMode = "SINGLE_KEYPRESS", + --[=[ TODO: update after resolving APPLINK-16047 + + limitedCharacterList = + { + "a" + },]=] + language = "EN-US", + autoCompleteText = "Daemon, Freedom" + } + }) + :Timeout(iTimeout) + :ValidIf(function(_,data) + return Check_menuIconParams(data) + end) + :Do(function(_,data) + --hmi side: sending UI.SetGlobalProperties response + self.hmiConnection:SendResponse(data.id, data.method, "SUCCESS", {}) + end) + + + + --mobile side: expect SetGlobalProperties response + EXPECT_RESPONSE(cid, { success = true, resultCode = "WARNINGS"}) + :Timeout(iTimeout) + + --mobile side: expect OnHashChange notification + EXPECT_NOTIFICATION("OnHashChange") + end + + --End test case PositiveResponseCheck.1.114 + ----------------------------------------------------------------------------------------- + + --Begin test case PositiveResponseCheck.1.115 + --Description: Check request the value of with menuIcon image = JPG + commonSteps:PutFile("PutFile_MenuIcon.jpg", "MenuIcon.jpg") + function Test:SetGlobalProperties_MenuIconJPG() + --mobile side: sending SetGlobalProperties request + local cid = self.mobileSession:SendRPC("SetGlobalProperties", + { + menuTitle = "Menu Title", + timeoutPrompt = + { + { + text = "Timeout prompt", + type = "TEXT" + } + }, + vrHelp = + { + { + position = 1, + image = + { + value = "MenuIcon.jpg", + imageType = "DYNAMIC" + }, + text = "VR help item" + } + }, + menuIcon = + { + value = "MenuIcon.jpg", + imageType = "DYNAMIC" + }, + helpPrompt = + { + { + text = "Help prompt", + type = "TEXT" + } + }, + vrHelpTitle = "VR help title", + keyboardProperties = + { + keyboardLayout = "QWERTY", + keypressMode = "SINGLE_KEYPRESS", + limitedCharacterList = + { + "a" + }, + language = "EN-US", + autoCompleteText = "Daemon, Freedom" + } + }) + + + --hmi side: expect TTS.SetGlobalProperties request + EXPECT_HMICALL("TTS.SetGlobalProperties", + { + timeoutPrompt = + { + { + text = "Timeout prompt", + type = "TEXT" + } + }, + helpPrompt = + { + { + text = "Help prompt", + type = "TEXT" + } + } + }) + :Timeout(iTimeout) + :Do(function(_,data) + --hmi side: sending UI.SetGlobalProperties response + self.hmiConnection:SendResponse(data.id, data.method, "SUCCESS", {}) + end) + + + + --hmi side: expect UI.SetGlobalProperties request + EXPECT_HMICALL("UI.SetGlobalProperties", + { + menuTitle = "Menu Title", + vrHelp = + { + { + position = 1, + --[[ TODO: update after resolving APPLINK-16052 + image = + { + imageType = "DYNAMIC", + value = strAppFolder .. "action.png" + },]] + text = "VR help item" + } + }, + --Checked below + -- menuIcon = + -- { + -- imageType = "DYNAMIC", + -- value = strAppFolder .. "MenuIcon.jpg" + -- }, + vrHelpTitle = "VR help title", + keyboardProperties = + { + keyboardLayout = "QWERTY", + keypressMode = "SINGLE_KEYPRESS", + --[=[ TODO: update after resolving APPLINK-16047 + + limitedCharacterList = + { + "a" + },]=] + language = "EN-US", + autoCompleteText = "Daemon, Freedom" + } + }) + :Timeout(iTimeout) + :ValidIf(function(_,data) + return Check_menuIconParams(data, nil, "MenuIcon.jpg") + end) + :Do(function(_,data) + --hmi side: sending UI.SetGlobalProperties response + self.hmiConnection:SendResponse(data.id, data.method, "SUCCESS", {}) + end) + + --mobile side: expect SetGlobalProperties response + EXPECT_RESPONSE(cid, { success = true, resultCode = "SUCCESS"}) + :Timeout(iTimeout) + + --mobile side: expect OnHashChange notification + EXPECT_NOTIFICATION("OnHashChange") + end + + --End test case PositiveResponseCheck.1.115 + ------------------------------------------------------------------- + --Begin test case PositiveResponseCheck.1.116 + --Description: Check request the value of with menuIcon image = BMP + commonSteps:PutFile("PutFile_MenuIcon.bmp", "MenuIcon.bmp") + function Test:SetGlobalProperties_MenuIconBMP() + --mobile side: sending SetGlobalProperties request + + local cid = self.mobileSession:SendRPC("SetGlobalProperties", + { + menuTitle = "Menu Title", + timeoutPrompt = + { + { + text = "Timeout prompt", + type = "TEXT" + } + }, + vrHelp = + { + { + position = 1, + image = + { + value = "MenuIcon.bmp", + imageType = "DYNAMIC" + }, + text = "VR help item" + } + }, + menuIcon = + { + value = "MenuIcon.bmp", + imageType = "DYNAMIC" + }, + helpPrompt = + { + { + text = "Help prompt", + type = "TEXT" + } + }, + vrHelpTitle = "VR help title", + keyboardProperties = + { + keyboardLayout = "QWERTY", + keypressMode = "SINGLE_KEYPRESS", + limitedCharacterList = + { + "a" + }, + language = "EN-US", + autoCompleteText = "Daemon, Freedom" + } + }) + + + --hmi side: expect TTS.SetGlobalProperties request + EXPECT_HMICALL("TTS.SetGlobalProperties", + { + timeoutPrompt = + { + { + text = "Timeout prompt", + type = "TEXT" + } + }, + helpPrompt = + { + { + text = "Help prompt", + type = "TEXT" + } + } + }) + :Timeout(iTimeout) + :Do(function(_,data) + --hmi side: sending UI.SetGlobalProperties response + self.hmiConnection:SendResponse(data.id, data.method, "SUCCESS", {}) + end) + + + + --hmi side: expect UI.SetGlobalProperties request + EXPECT_HMICALL("UI.SetGlobalProperties", + { + menuTitle = "Menu Title", + vrHelp = + { + { + position = 1, + --[[ TODO: update after resolving APPLINK-16052 + image = + { + imageType = "DYNAMIC", + value = strAppFolder .. "action.png" + },]] + text = "VR help item" + } + }, + --Checked below + -- menuIcon = + -- { + -- imageType = "DYNAMIC", + -- value = strAppFolder .. "MenuIcon.bmp" + -- }, + vrHelpTitle = "VR help title", + keyboardProperties = + { + keyboardLayout = "QWERTY", + keypressMode = "SINGLE_KEYPRESS", + --[=[ TODO: update after resolving APPLINK-16047 + + limitedCharacterList = + { + "a" + },]=] + language = "EN-US", + autoCompleteText = "Daemon, Freedom" + } + }) + :Timeout(iTimeout) + :ValidIf(function(_,data) + return Check_menuIconParams(data, nil, "MenuIcon.bmp") + end) + :Do(function(_,data) + --hmi side: sending UI.SetGlobalProperties response + self.hmiConnection:SendResponse(data.id, data.method, "SUCCESS", {}) + end) + + --mobile side: expect SetGlobalProperties response + EXPECT_RESPONSE(cid, { success = true, resultCode = "SUCCESS"}) + :Timeout(iTimeout) + + --mobile side: expect OnHashChange notification + EXPECT_NOTIFICATION("OnHashChange") + end + + --End test case PositiveResponseCheck.1.116 + ------------------------------------------------------------------- + --Begin test case PositiveResponseCheck.1.117 + --Description: Check request the value of with menuIcon image = GIF + commonSteps:PutFile("PutFile_MenuIcon.gif", "MenuIcon.gif") + function Test:SetGlobalProperties_MenuIconGIF() + --mobile side: sending SetGlobalProperties request + + local cid = self.mobileSession:SendRPC("SetGlobalProperties", + { + menuTitle = "Menu Title", + timeoutPrompt = + { + { + text = "Timeout prompt", + type = "TEXT" + } + }, + vrHelp = + { + { + position = 1, + image = + { + value = "MenuIcon.gif", + imageType = "DYNAMIC" + }, + text = "VR help item" + } + }, + menuIcon = + { + value = "MenuIcon.gif", + imageType = "DYNAMIC" + }, + helpPrompt = + { + { + text = "Help prompt", + type = "TEXT" + } + }, + vrHelpTitle = "VR help title", + keyboardProperties = + { + keyboardLayout = "QWERTY", + keypressMode = "SINGLE_KEYPRESS", + limitedCharacterList = + { + "a" + }, + language = "EN-US", + autoCompleteText = "Daemon, Freedom" + } + }) + + + --hmi side: expect TTS.SetGlobalProperties request + EXPECT_HMICALL("TTS.SetGlobalProperties", + { + timeoutPrompt = + { + { + text = "Timeout prompt", + type = "TEXT" + } + }, + helpPrompt = + { + { + text = "Help prompt", + type = "TEXT" + } + } + }) + :Timeout(iTimeout) + :Do(function(_,data) + --hmi side: sending UI.SetGlobalProperties response + self.hmiConnection:SendResponse(data.id, data.method, "SUCCESS", {}) + end) + + + + --hmi side: expect UI.SetGlobalProperties request + EXPECT_HMICALL("UI.SetGlobalProperties", + { + menuTitle = "Menu Title", + vrHelp = + { + { + position = 1, + --[[ TODO: update after resolving APPLINK-16052 + image = + { + imageType = "DYNAMIC", + value = strAppFolder .. "action.png" + },]] + text = "VR help item" + } + }, + --Checked below + -- menuIcon = + -- { + -- imageType = "DYNAMIC", + -- value = strAppFolder .. "MenuIcon.gif" + -- }, + vrHelpTitle = "VR help title", + keyboardProperties = + { + keyboardLayout = "QWERTY", + keypressMode = "SINGLE_KEYPRESS", + --[=[ TODO: update after resolving APPLINK-16047 + + limitedCharacterList = + { + "a" + },]=] + language = "EN-US", + autoCompleteText = "Daemon, Freedom" + } + }) + :Timeout(iTimeout) + :ValidIf(function(_,data) + return Check_menuIconParams(data, nil, "MenuIcon.gif") + end) + :Do(function(_,data) + --hmi side: sending UI.SetGlobalProperties response + self.hmiConnection:SendResponse(data.id, data.method, "SUCCESS", {}) + end) + + --mobile side: expect SetGlobalProperties response + EXPECT_RESPONSE(cid, { success = true, resultCode = "SUCCESS"}) + :Timeout(iTimeout) + + --mobile side: expect OnHashChange notification + EXPECT_NOTIFICATION("OnHashChange") + end + + --End test case PositiveResponseCheck.1.117 + --------------------------------------------------------------------------------- + --Begin test case PositiveResponseCheck.1.118 + --Description: Check request all parameters's values are lower bound + + function Test:SetGlobalProperties_All_Parameters_LowerBound() + --mobile side: sending SetGlobalProperties request + local cid = self.mobileSession:SendRPC("SetGlobalProperties", + { + menuTitle = "m", + timeoutPrompt = + { + { + text = "t", + type = "TEXT" + } + }, + vrHelp = + { + { + position = 1, + image = + { + value = "a", + imageType = "DYNAMIC" + }, + text = "t" + } + }, + menuIcon = + { + value = "a", + imageType = "DYNAMIC" + }, + helpPrompt = + { + { + text = "t", + type = "TEXT" + } + }, + vrHelpTitle = "v", + keyboardProperties = + { + keyboardLayout = "QWERTY", + keypressMode = "SINGLE_KEYPRESS", + limitedCharacterList = + { + "a" + }, + language = "EN-US", + autoCompleteText = "I" + } + }) + + + --hmi side: expect TTS.SetGlobalProperties request + EXPECT_HMICALL("TTS.SetGlobalProperties", + { + timeoutPrompt = + { + { + text = "t", + type = "TEXT" + } + }, + helpPrompt = + { + { + text = "t", + type = "TEXT" + } + } + }) + :Timeout(iTimeout) + :Do(function(_,data) + --hmi side: sending UI.SetGlobalProperties response + self.hmiConnection:SendResponse(data.id, data.method, "SUCCESS", {}) + end) + + + + --hmi side: expect UI.SetGlobalProperties request + EXPECT_HMICALL("UI.SetGlobalProperties", + { + menuTitle = "m", + vrHelp = + { + { + position = 1, + --[[ TODO: update after resolving APPLINK-16052 + image = + { + imageType = "DYNAMIC", + value = strAppFolder .. "action.png" + },]] + text = "t" + } + }, + --Checked below + -- menuIcon = + -- { + -- imageType = "DYNAMIC", + -- value = strAppFolder .. "a" + -- }, + vrHelpTitle = "v", + keyboardProperties = + { + keyboardLayout = "QWERTY", + keypressMode = "SINGLE_KEYPRESS", + --[=[ TODO: update after resolving APPLINK-16047 + + limitedCharacterList = + { + "a" + },]=] + language = "EN-US", + autoCompleteText = "I" + } + }) + :Timeout(iTimeout) + :ValidIf(function(_,data) + return Check_menuIconParams(data, nil, "a") + end) + :Do(function(_,data) + --hmi side: sending UI.SetGlobalProperties response + self.hmiConnection:SendResponse(data.id, data.method, "SUCCESS", {}) + end) + + --mobile side: expect SetGlobalProperties response + EXPECT_RESPONSE(cid, { success = true, resultCode = "SUCCESS"}) + :Timeout(iTimeout) + + --mobile side: expect OnHashChange notification + EXPECT_NOTIFICATION("OnHashChange") + end + --End test case PositiveResponseCheck.1.118 + --------------------------------------------------------------------------------- + --Begin test case PositiveResponseCheck.1.119 + --Description: Check request all parameters's values are upper bound + + function Test:SetGlobalProperties_All_Parameters_UpperBound() + + --mobile side: sending SetGlobalProperties request + local cid = self.mobileSession:SendRPC("SetGlobalProperties", + { + menuTitle = "qA1_wB2_eA3_rB4_tA5_yB6_uA7_iB8_oA9_pB0_aA1_sB2_dA3_fB4_gA5_hB6_jA7_kB8_lA9_zB0_xA1_cB2_vA3_bB4_nA5_mB6_qA7_wB8_eA9_rB0_tA1_yB2_uA3_iB4_oA5_pB6_aA7_sB8_dA9_fB0_gA1_hB2_jA3_kB4_lA5_zB6_xA7_cB8_vA9_bB0_nA1_mB2_qA3_wB4_eA5_rB6_tA7_yB8_uA9_iB0_oA1_pB2_aA3_sB4_dA5_fB6_gA7_hB8_jA9_kB0_lA1_zB2_xA3_cB4_vA5_bB6_nA7_mB8_qA9_wB0_eA1_rB2_tA3_yB4_uA5_iB6_oA7_pB8_aA9_sB0_dA1_fB2_gA3_hB4_jA5_kB6_lA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iB2_oA3_pB4_aA5_sB6_dA7_fB8_gA9_hB0_jA1_kB2_lA3_zB4__001" + }, + { + position = 2, + image = + { + value = "action.png", + imageType = "DYNAMIC" + }, + text = "qA1_wB2_eA3_rB4_tA5_yB6_uA7_iB8_oA9_pB0_aA1_sB2_dA3_fB4_gA5_hB6_jA7_kB8_lA9_zB0_xA1_cB2_vA3_bB4_nA5_mB6_qA7_wB8_eA9_rB0_tA1_yB2_uA3_iB4_oA5_pB6_aA7_sB8_dA9_fB0_gA1_hB2_jA3_kB4_lA5_zB6_xA7_cB8_vA9_bB0_nA1_mB2_qA3_wB4_eA5_rB6_tA7_yB8_uA9_iB0_oA1_pB2_aA3_sB4_dA5_fB6_gA7_hB8_jA9_kB0_lA1_zB2_xA3_cB4_vA5_bB6_nA7_mB8_qA9_wB0_eA1_rB2_tA3_yB4_uA5_iB6_oA7_pB8_aA9_sB0_dA1_fB2_gA3_hB4_jA5_kB6_lA7_zB8_xA9_cB0_vA1_bB2_nA3_mB4_qA5_wB6_eA7_rB8_tA9_yB0_uA1_iB2_oA3_pB4_aA5_sB6_dA7_fB8_gA9_hB0_jA1_kB2_lA3_zB4__002" + }, + { + position = 3, + image = + { + value = "action.png", + imageType = "DYNAMIC" + }, + text = "qA1_wB2_eA3_rB4_tA5_yB6_uA7_iB8_oA9_pB0_aA1_sB2_dA3_fB4_gA5_hB6_jA7_kB8_lA9_zB0_xA1_cB2_vA3_bB4_nA5_mB6_qA7_wB8_eA9_rB0_tA1_yB2_uA3_iB4_oA5_pB6_aA7_sB8_dA9_fB0_gA1_hB2_jA3_kB4_lA5_zB6_xA7_cB8_vA9_bB0_nA1_mB2_qA3_wB4_eA5_rB6_tA7_yB8_uA9_iB0_oA1_pB2_aA3_sB4_dA5_fB6_gA7_hB8_jA9_kB0_lA1_zB2_xA3_cB4_vA5_bB6_nA7_mB8_qA9_wB0_eA1_rB2_tA3_yB4_uA5_iB6_oA7_pB8_aA9_sB0_dA1_fB2_gA3_hB4_jA5_kB6_lA7_zB8_xA9_cB0_vA1_bB2_nA3_mB4_qA5_wB6_eA7_rB8_tA9_yB0_uA1_iB2_oA3_pB4_aA5_sB6_dA7_fB8_gA9_hB0_jA1_kB2_lA3_zB4__003" + }, + { + position = 4, + image = + { + value = "action.png", + imageType = "DYNAMIC" + }, + text = "qA1_wB2_eA3_rB4_tA5_yB6_uA7_iB8_oA9_pB0_aA1_sB2_dA3_fB4_gA5_hB6_jA7_kB8_lA9_zB0_xA1_cB2_vA3_bB4_nA5_mB6_qA7_wB8_eA9_rB0_tA1_yB2_uA3_iB4_oA5_pB6_aA7_sB8_dA9_fB0_gA1_hB2_jA3_kB4_lA5_zB6_xA7_cB8_vA9_bB0_nA1_mB2_qA3_wB4_eA5_rB6_tA7_yB8_uA9_iB0_oA1_pB2_aA3_sB4_dA5_fB6_gA7_hB8_jA9_kB0_lA1_zB2_xA3_cB4_vA5_bB6_nA7_mB8_qA9_wB0_eA1_rB2_tA3_yB4_uA5_iB6_oA7_pB8_aA9_sB0_dA1_fB2_gA3_hB4_jA5_kB6_lA7_zB8_xA9_cB0_vA1_bB2_nA3_mB4_qA5_wB6_eA7_rB8_tA9_yB0_uA1_iB2_oA3_pB4_aA5_sB6_dA7_fB8_gA9_hB0_jA1_kB2_lA3_zB4__004" + }, + { + position = 5, + image = + { + value = "action.png", + imageType = "DYNAMIC" + }, + text = "qA1_wB2_eA3_rB4_tA5_yB6_uA7_iB8_oA9_pB0_aA1_sB2_dA3_fB4_gA5_hB6_jA7_kB8_lA9_zB0_xA1_cB2_vA3_bB4_nA5_mB6_qA7_wB8_eA9_rB0_tA1_yB2_uA3_iB4_oA5_pB6_aA7_sB8_dA9_fB0_gA1_hB2_jA3_kB4_lA5_zB6_xA7_cB8_vA9_bB0_nA1_mB2_qA3_wB4_eA5_rB6_tA7_yB8_uA9_iB0_oA1_pB2_aA3_sB4_dA5_fB6_gA7_hB8_jA9_kB0_lA1_zB2_xA3_cB4_vA5_bB6_nA7_mB8_qA9_wB0_eA1_rB2_tA3_yB4_uA5_iB6_oA7_pB8_aA9_sB0_dA1_fB2_gA3_hB4_jA5_kB6_lA7_zB8_xA9_cB0_vA1_bB2_nA3_mB4_qA5_wB6_eA7_rB8_tA9_yB0_uA1_iB2_oA3_pB4_aA5_sB6_dA7_fB8_gA9_hB0_jA1_kB2_lA3_zB4__005" + }, + { + position = 6, + image = + { + value = "action.png", + imageType = "DYNAMIC" + }, + text = "qA1_wB2_eA3_rB4_tA5_yB6_uA7_iB8_oA9_pB0_aA1_sB2_dA3_fB4_gA5_hB6_jA7_kB8_lA9_zB0_xA1_cB2_vA3_bB4_nA5_mB6_qA7_wB8_eA9_rB0_tA1_yB2_uA3_iB4_oA5_pB6_aA7_sB8_dA9_fB0_gA1_hB2_jA3_kB4_lA5_zB6_xA7_cB8_vA9_bB0_nA1_mB2_qA3_wB4_eA5_rB6_tA7_yB8_uA9_iB0_oA1_pB2_aA3_sB4_dA5_fB6_gA7_hB8_jA9_kB0_lA1_zB2_xA3_cB4_vA5_bB6_nA7_mB8_qA9_wB0_eA1_rB2_tA3_yB4_uA5_iB6_oA7_pB8_aA9_sB0_dA1_fB2_gA3_hB4_jA5_kB6_lA7_zB8_xA9_cB0_vA1_bB2_nA3_mB4_qA5_wB6_eA7_rB8_tA9_yB0_uA1_iB2_oA3_pB4_aA5_sB6_dA7_fB8_gA9_hB0_jA1_kB2_lA3_zB4__006" + }, + { + position = 7, + image = + { + value = "action.png", + imageType = "DYNAMIC" + }, + text = "qA1_wB2_eA3_rB4_tA5_yB6_uA7_iB8_oA9_pB0_aA1_sB2_dA3_fB4_gA5_hB6_jA7_kB8_lA9_zB0_xA1_cB2_vA3_bB4_nA5_mB6_qA7_wB8_eA9_rB0_tA1_yB2_uA3_iB4_oA5_pB6_aA7_sB8_dA9_fB0_gA1_hB2_jA3_kB4_lA5_zB6_xA7_cB8_vA9_bB0_nA1_mB2_qA3_wB4_eA5_rB6_tA7_yB8_uA9_iB0_oA1_pB2_aA3_sB4_dA5_fB6_gA7_hB8_jA9_kB0_lA1_zB2_xA3_cB4_vA5_bB6_nA7_mB8_qA9_wB0_eA1_rB2_tA3_yB4_uA5_iB6_oA7_pB8_aA9_sB0_dA1_fB2_gA3_hB4_jA5_kB6_lA7_zB8_xA9_cB0_vA1_bB2_nA3_mB4_qA5_wB6_eA7_rB8_tA9_yB0_uA1_iB2_oA3_pB4_aA5_sB6_dA7_fB8_gA9_hB0_jA1_kB2_lA3_zB4__007" + }, + { + position = 8, + image = + { + value = "action.png", + imageType = "DYNAMIC" + }, + text = "qA1_wB2_eA3_rB4_tA5_yB6_uA7_iB8_oA9_pB0_aA1_sB2_dA3_fB4_gA5_hB6_jA7_kB8_lA9_zB0_xA1_cB2_vA3_bB4_nA5_mB6_qA7_wB8_eA9_rB0_tA1_yB2_uA3_iB4_oA5_pB6_aA7_sB8_dA9_fB0_gA1_hB2_jA3_kB4_lA5_zB6_xA7_cB8_vA9_bB0_nA1_mB2_qA3_wB4_eA5_rB6_tA7_yB8_uA9_iB0_oA1_pB2_aA3_sB4_dA5_fB6_gA7_hB8_jA9_kB0_lA1_zB2_xA3_cB4_vA5_bB6_nA7_mB8_qA9_wB0_eA1_rB2_tA3_yB4_uA5_iB6_oA7_pB8_aA9_sB0_dA1_fB2_gA3_hB4_jA5_kB6_lA7_zB8_xA9_cB0_vA1_bB2_nA3_mB4_qA5_wB6_eA7_rB8_tA9_yB0_uA1_iB2_oA3_pB4_aA5_sB6_dA7_fB8_gA9_hB0_jA1_kB2_lA3_zB4__008" + }, + { + position = 9, + image = + { + value = "action.png", + imageType = "DYNAMIC" + }, + text = "qA1_wB2_eA3_rB4_tA5_yB6_uA7_iB8_oA9_pB0_aA1_sB2_dA3_fB4_gA5_hB6_jA7_kB8_lA9_zB0_xA1_cB2_vA3_bB4_nA5_mB6_qA7_wB8_eA9_rB0_tA1_yB2_uA3_iB4_oA5_pB6_aA7_sB8_dA9_fB0_gA1_hB2_jA3_kB4_lA5_zB6_xA7_cB8_vA9_bB0_nA1_mB2_qA3_wB4_eA5_rB6_tA7_yB8_uA9_iB0_oA1_pB2_aA3_sB4_dA5_fB6_gA7_hB8_jA9_kB0_lA1_zB2_xA3_cB4_vA5_bB6_nA7_mB8_qA9_wB0_eA1_rB2_tA3_yB4_uA5_iB6_oA7_pB8_aA9_sB0_dA1_fB2_gA3_hB4_jA5_kB6_lA7_zB8_xA9_cB0_vA1_bB2_nA3_mB4_qA5_wB6_eA7_rB8_tA9_yB0_uA1_iB2_oA3_pB4_aA5_sB6_dA7_fB8_gA9_hB0_jA1_kB2_lA3_zB4__009" + }, + { + position = 10, + image = + { + value = "action.png", + imageType = "DYNAMIC" + }, + text = "qA1_wB2_eA3_rB4_tA5_yB6_uA7_iB8_oA9_pB0_aA1_sB2_dA3_fB4_gA5_hB6_jA7_kB8_lA9_zB0_xA1_cB2_vA3_bB4_nA5_mB6_qA7_wB8_eA9_rB0_tA1_yB2_uA3_iB4_oA5_pB6_aA7_sB8_dA9_fB0_gA1_hB2_jA3_kB4_lA5_zB6_xA7_cB8_vA9_bB0_nA1_mB2_qA3_wB4_eA5_rB6_tA7_yB8_uA9_iB0_oA1_pB2_aA3_sB4_dA5_fB6_gA7_hB8_jA9_kB0_lA1_zB2_xA3_cB4_vA5_bB6_nA7_mB8_qA9_wB0_eA1_rB2_tA3_yB4_uA5_iB6_oA7_pB8_aA9_sB0_dA1_fB2_gA3_hB4_jA5_kB6_lA7_zB8_xA9_cB0_vA1_bB2_nA3_mB4_qA5_wB6_eA7_rB8_tA9_yB0_uA1_iB2_oA3_pB4_aA5_sB6_dA7_fB8_gA9_hB0_jA1_kB2_lA3_zB4__010" + }, + { + position = 11, + image = + { + value = "action.png", + imageType = "DYNAMIC" + }, + text = "qA1_wB2_eA3_rB4_tA5_yB6_uA7_iB8_oA9_pB0_aA1_sB2_dA3_fB4_gA5_hB6_jA7_kB8_lA9_zB0_xA1_cB2_vA3_bB4_nA5_mB6_qA7_wB8_eA9_rB0_tA1_yB2_uA3_iB4_oA5_pB6_aA7_sB8_dA9_fB0_gA1_hB2_jA3_kB4_lA5_zB6_xA7_cB8_vA9_bB0_nA1_mB2_qA3_wB4_eA5_rB6_tA7_yB8_uA9_iB0_oA1_pB2_aA3_sB4_dA5_fB6_gA7_hB8_jA9_kB0_lA1_zB2_xA3_cB4_vA5_bB6_nA7_mB8_qA9_wB0_eA1_rB2_tA3_yB4_uA5_iB6_oA7_pB8_aA9_sB0_dA1_fB2_gA3_hB4_jA5_kB6_lA7_zB8_xA9_cB0_vA1_bB2_nA3_mB4_qA5_wB6_eA7_rB8_tA9_yB0_uA1_iB2_oA3_pB4_aA5_sB6_dA7_fB8_gA9_hB0_jA1_kB2_lA3_zB4__011" + }, + { + position = 12, + image = + { + value = "action.png", + imageType = "DYNAMIC" + }, + text = "qA1_wB2_eA3_rB4_tA5_yB6_uA7_iB8_oA9_pB0_aA1_sB2_dA3_fB4_gA5_hB6_jA7_kB8_lA9_zB0_xA1_cB2_vA3_bB4_nA5_mB6_qA7_wB8_eA9_rB0_tA1_yB2_uA3_iB4_oA5_pB6_aA7_sB8_dA9_fB0_gA1_hB2_jA3_kB4_lA5_zB6_xA7_cB8_vA9_bB0_nA1_mB2_qA3_wB4_eA5_rB6_tA7_yB8_uA9_iB0_oA1_pB2_aA3_sB4_dA5_fB6_gA7_hB8_jA9_kB0_lA1_zB2_xA3_cB4_vA5_bB6_nA7_mB8_qA9_wB0_eA1_rB2_tA3_yB4_uA5_iB6_oA7_pB8_aA9_sB0_dA1_fB2_gA3_hB4_jA5_kB6_lA7_zB8_xA9_cB0_vA1_bB2_nA3_mB4_qA5_wB6_eA7_rB8_tA9_yB0_uA1_iB2_oA3_pB4_aA5_sB6_dA7_fB8_gA9_hB0_jA1_kB2_lA3_zB4__012" + }, + { + position = 13, + image = + { + value = "action.png", + imageType = "DYNAMIC" + }, + text = "qA1_wB2_eA3_rB4_tA5_yB6_uA7_iB8_oA9_pB0_aA1_sB2_dA3_fB4_gA5_hB6_jA7_kB8_lA9_zB0_xA1_cB2_vA3_bB4_nA5_mB6_qA7_wB8_eA9_rB0_tA1_yB2_uA3_iB4_oA5_pB6_aA7_sB8_dA9_fB0_gA1_hB2_jA3_kB4_lA5_zB6_xA7_cB8_vA9_bB0_nA1_mB2_qA3_wB4_eA5_rB6_tA7_yB8_uA9_iB0_oA1_pB2_aA3_sB4_dA5_fB6_gA7_hB8_jA9_kB0_lA1_zB2_xA3_cB4_vA5_bB6_nA7_mB8_qA9_wB0_eA1_rB2_tA3_yB4_uA5_iB6_oA7_pB8_aA9_sB0_dA1_fB2_gA3_hB4_jA5_kB6_lA7_zB8_xA9_cB0_vA1_bB2_nA3_mB4_qA5_wB6_eA7_rB8_tA9_yB0_uA1_iB2_oA3_pB4_aA5_sB6_dA7_fB8_gA9_hB0_jA1_kB2_lA3_zB4__013" + }, + { + position = 14, + image = + { + value = "action.png", + imageType = "DYNAMIC" + }, + text = "qA1_wB2_eA3_rB4_tA5_yB6_uA7_iB8_oA9_pB0_aA1_sB2_dA3_fB4_gA5_hB6_jA7_kB8_lA9_zB0_xA1_cB2_vA3_bB4_nA5_mB6_qA7_wB8_eA9_rB0_tA1_yB2_uA3_iB4_oA5_pB6_aA7_sB8_dA9_fB0_gA1_hB2_jA3_kB4_lA5_zB6_xA7_cB8_vA9_bB0_nA1_mB2_qA3_wB4_eA5_rB6_tA7_yB8_uA9_iB0_oA1_pB2_aA3_sB4_dA5_fB6_gA7_hB8_jA9_kB0_lA1_zB2_xA3_cB4_vA5_bB6_nA7_mB8_qA9_wB0_eA1_rB2_tA3_yB4_uA5_iB6_oA7_pB8_aA9_sB0_dA1_fB2_gA3_hB4_jA5_kB6_lA7_zB8_xA9_cB0_vA1_bB2_nA3_mB4_qA5_wB6_eA7_rB8_tA9_yB0_uA1_iB2_oA3_pB4_aA5_sB6_dA7_fB8_gA9_hB0_jA1_kB2_lA3_zB4__014" + }, + { + position = 15, + image = + { + value = "action.png", + imageType = "DYNAMIC" + }, + text = "qA1_wB2_eA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_zB4__016" + }, + { + position = 17, + image = + { + value = "action.png", + imageType = "DYNAMIC" + }, + text = "qA1_wB2_eA3_rB4_tA5_yB6_uA7_iB8_oA9_pB0_aA1_sB2_dA3_fB4_gA5_hB6_jA7_kB8_lA9_zB0_xA1_cB2_vA3_bB4_nA5_mB6_qA7_wB8_eA9_rB0_tA1_yB2_uA3_iB4_oA5_pB6_aA7_sB8_dA9_fB0_gA1_hB2_jA3_kB4_lA5_zB6_xA7_cB8_vA9_bB0_nA1_mB2_qA3_wB4_eA5_rB6_tA7_yB8_uA9_iB0_oA1_pB2_aA3_sB4_dA5_fB6_gA7_hB8_jA9_kB0_lA1_zB2_xA3_cB4_vA5_bB6_nA7_mB8_qA9_wB0_eA1_rB2_tA3_yB4_uA5_iB6_oA7_pB8_aA9_sB0_dA1_fB2_gA3_hB4_jA5_kB6_lA7_zB8_xA9_cB0_vA1_bB2_nA3_mB4_qA5_wB6_eA7_rB8_tA9_yB0_uA1_iB2_oA3_pB4_aA5_sB6_dA7_fB8_gA9_hB0_jA1_kB2_lA3_zB4__017" + }, + { + position = 18, + image = + { + value = "action.png", + imageType = "DYNAMIC" + }, + text = "qA1_wB2_eA3_rB4_tA5_yB6_uA7_iB8_oA9_pB0_aA1_sB2_dA3_fB4_gA5_hB6_jA7_kB8_lA9_zB0_xA1_cB2_vA3_bB4_nA5_mB6_qA7_wB8_eA9_rB0_tA1_yB2_uA3_iB4_oA5_pB6_aA7_sB8_dA9_fB0_gA1_hB2_jA3_kB4_lA5_zB6_xA7_cB8_vA9_bB0_nA1_mB2_qA3_wB4_eA5_rB6_tA7_yB8_uA9_iB0_oA1_pB2_aA3_sB4_dA5_fB6_gA7_hB8_jA9_kB0_lA1_zB2_xA3_cB4_vA5_bB6_nA7_mB8_qA9_wB0_eA1_rB2_tA3_yB4_uA5_iB6_oA7_pB8_aA9_sB0_dA1_fB2_gA3_hB4_jA5_kB6_lA7_zB8_xA9_cB0_vA1_bB2_nA3_mB4_qA5_wB6_eA7_rB8_tA9_yB0_uA1_iB2_oA3_pB4_aA5_sB6_dA7_fB8_gA9_hB0_jA1_kB2_lA3_zB4__018" + }, + { + position = 19, + image = + { + value = "action.png", + imageType = "DYNAMIC" + }, + text = "qA1_wB2_eA3_rB4_tA5_yB6_uA7_iB8_oA9_pB0_aA1_sB2_dA3_fB4_gA5_hB6_jA7_kB8_lA9_zB0_xA1_cB2_vA3_bB4_nA5_mB6_qA7_wB8_eA9_rB0_tA1_yB2_uA3_iB4_oA5_pB6_aA7_sB8_dA9_fB0_gA1_hB2_jA3_kB4_lA5_zB6_xA7_cB8_vA9_bB0_nA1_mB2_qA3_wB4_eA5_rB6_tA7_yB8_uA9_iB0_oA1_pB2_aA3_sB4_dA5_fB6_gA7_hB8_jA9_kB0_lA1_zB2_xA3_cB4_vA5_bB6_nA7_mB8_qA9_wB0_eA1_rB2_tA3_yB4_uA5_iB6_oA7_pB8_aA9_sB0_dA1_fB2_gA3_hB4_jA5_kB6_lA7_zB8_xA9_cB0_vA1_bB2_nA3_mB4_qA5_wB6_eA7_rB8_tA9_yB0_uA1_iB2_oA3_pB4_aA5_sB6_dA7_fB8_gA9_hB0_jA1_kB2_lA3_zB4__019" + }, + { + position = 20, + image = + { + value = "action.png", + imageType = "DYNAMIC" + }, + text = "qA1_wB2_eA3_rB4_tA5_yB6_uA7_iB8_oA9_pB0_aA1_sB2_dA3_fB4_gA5_hB6_jA7_kB8_lA9_zB0_xA1_cB2_vA3_bB4_nA5_mB6_qA7_wB8_eA9_rB0_tA1_yB2_uA3_iB4_oA5_pB6_aA7_sB8_dA9_fB0_gA1_hB2_jA3_kB4_lA5_zB6_xA7_cB8_vA9_bB0_nA1_mB2_qA3_wB4_eA5_rB6_tA7_yB8_uA9_iB0_oA1_pB2_aA3_sB4_dA5_fB6_gA7_hB8_jA9_kB0_lA1_zB2_xA3_cB4_vA5_bB6_nA7_mB8_qA9_wB0_eA1_rB2_tA3_yB4_uA5_iB6_oA7_pB8_aA9_sB0_dA1_fB2_gA3_hB4_jA5_kB6_lA7_zB8_xA9_cB0_vA1_bB2_nA3_mB4_qA5_wB6_eA7_rB8_tA9_yB0_uA1_iB2_oA3_pB4_aA5_sB6_dA7_fB8_gA9_hB0_jA1_kB2_lA3_zB4__020" + }, + { + position = 21, + image = + { + value = "action.png", + imageType = "DYNAMIC" + }, + text = "qA1_wB2_eA3_rB4_tA5_yB6_uA7_iB8_oA9_pB0_aA1_sB2_dA3_fB4_gA5_hB6_jA7_kB8_lA9_zB0_xA1_cB2_vA3_bB4_nA5_mB6_qA7_wB8_eA9_rB0_tA1_yB2_uA3_iB4_oA5_pB6_aA7_sB8_dA9_fB0_gA1_hB2_jA3_kB4_lA5_zB6_xA7_cB8_vA9_bB0_nA1_mB2_qA3_wB4_eA5_rB6_tA7_yB8_uA9_iB0_oA1_pB2_aA3_sB4_dA5_fB6_gA7_hB8_jA9_kB0_lA1_zB2_xA3_cB4_vA5_bB6_nA7_mB8_qA9_wB0_eA1_rB2_tA3_yB4_uA5_iB6_oA7_pB8_aA9_sB0_dA1_fB2_gA3_hB4_jA5_kB6_lA7_zB8_xA9_cB0_vA1_bB2_nA3_mB4_qA5_wB6_eA7_rB8_tA9_yB0_uA1_iB2_oA3_pB4_aA5_sB6_dA7_fB8_gA9_hB0_jA1_kB2_lA3_zB4__021" + }, + { + position = 22, + image = + { + value = "action.png", + imageType = "DYNAMIC" + }, + text = "qA1_wB2_eA3_rB4_tA5_yB6_uA7_iB8_oA9_pB0_aA1_sB2_dA3_fB4_gA5_hB6_jA7_kB8_lA9_zB0_xA1_cB2_vA3_bB4_nA5_mB6_qA7_wB8_eA9_rB0_tA1_yB2_uA3_iB4_oA5_pB6_aA7_sB8_dA9_fB0_gA1_hB2_jA3_kB4_lA5_zB6_xA7_cB8_vA9_bB0_nA1_mB2_qA3_wB4_eA5_rB6_tA7_yB8_uA9_iB0_oA1_pB2_aA3_sB4_dA5_fB6_gA7_hB8_jA9_kB0_lA1_zB2_xA3_cB4_vA5_bB6_nA7_mB8_qA9_wB0_eA1_rB2_tA3_yB4_uA5_iB6_oA7_pB8_aA9_sB0_dA1_fB2_gA3_hB4_jA5_kB6_lA7_zB8_xA9_cB0_vA1_bB2_nA3_mB4_qA5_wB6_eA7_rB8_tA9_yB0_uA1_iB2_oA3_pB4_aA5_sB6_dA7_fB8_gA9_hB0_jA1_kB2_lA3_zB4__022" + }, + { + position = 23, + image = + { + value = "action.png", + imageType = "DYNAMIC" + }, + text = "qA1_wB2_eA3_rB4_tA5_yB6_uA7_iB8_oA9_pB0_aA1_sB2_dA3_fB4_gA5_hB6_jA7_kB8_lA9_zB0_xA1_cB2_vA3_bB4_nA5_mB6_qA7_wB8_eA9_rB0_tA1_yB2_uA3_iB4_oA5_pB6_aA7_sB8_dA9_fB0_gA1_hB2_jA3_kB4_lA5_zB6_xA7_cB8_vA9_bB0_nA1_mB2_qA3_wB4_eA5_rB6_tA7_yB8_uA9_iB0_oA1_pB2_aA3_sB4_dA5_fB6_gA7_hB8_jA9_kB0_lA1_zB2_xA3_cB4_vA5_bB6_nA7_mB8_qA9_wB0_eA1_rB2_tA3_yB4_uA5_iB6_oA7_pB8_aA9_sB0_dA1_fB2_gA3_hB4_jA5_kB6_lA7_zB8_xA9_cB0_vA1_bB2_nA3_mB4_qA5_wB6_eA7_rB8_tA9_yB0_uA1_iB2_oA3_pB4_aA5_sB6_dA7_fB8_gA9_hB0_jA1_kB2_lA3_zB4__023" + }, + { + position = 24, + image = + { + value = "action.png", + imageType = "DYNAMIC" + }, + text = "qA1_wB2_eA3_rB4_tA5_yB6_uA7_iB8_oA9_pB0_aA1_sB2_dA3_fB4_gA5_hB6_jA7_kB8_lA9_zB0_xA1_cB2_vA3_bB4_nA5_mB6_qA7_wB8_eA9_rB0_tA1_yB2_uA3_iB4_oA5_pB6_aA7_sB8_dA9_fB0_gA1_hB2_jA3_kB4_lA5_zB6_xA7_cB8_vA9_bB0_nA1_mB2_qA3_wB4_eA5_rB6_tA7_yB8_uA9_iB0_oA1_pB2_aA3_sB4_dA5_fB6_gA7_hB8_jA9_kB0_lA1_zB2_xA3_cB4_vA5_bB6_nA7_mB8_qA9_wB0_eA1_rB2_tA3_yB4_uA5_iB6_oA7_pB8_aA9_sB0_dA1_fB2_gA3_hB4_jA5_kB6_lA7_zB8_xA9_cB0_vA1_bB2_nA3_mB4_qA5_wB6_eA7_rB8_tA9_yB0_uA1_iB2_oA3_pB4_aA5_sB6_dA7_fB8_gA9_hB0_jA1_kB2_lA3_zB4__024" + }, + { + position = 25, + image = + { + value = "action.png", + imageType = "DYNAMIC" + }, + text = "qA1_wB2_eA3_rB4_tA5_yB6_uA7_iB8_oA9_pB0_aA1_sB2_dA3_fB4_gA5_hB6_jA7_kB8_lA9_zB0_xA1_cB2_vA3_bB4_nA5_mB6_qA7_wB8_eA9_rB0_tA1_yB2_uA3_iB4_oA5_pB6_aA7_sB8_dA9_fB0_gA1_hB2_jA3_kB4_lA5_zB6_xA7_cB8_vA9_bB0_nA1_mB2_qA3_wB4_eA5_rB6_tA7_yB8_uA9_iB0_oA1_pB2_aA3_sB4_dA5_fB6_gA7_hB8_jA9_kB0_lA1_zB2_xA3_cB4_vA5_bB6_nA7_mB8_qA9_wB0_eA1_rB2_tA3_yB4_uA5_iB6_oA7_pB8_aA9_sB0_dA1_fB2_gA3_hB4_jA5_kB6_lA7_zB8_xA9_cB0_vA1_bB2_nA3_mB4_qA5_wB6_eA7_rB8_tA9_yB0_uA1_iB2_oA3_pB4_aA5_sB6_dA7_fB8_gA9_hB0_jA1_kB2_lA3_zB4__025" + }, + { + position = 26, + image = + { + value = "action.png", + imageType = "DYNAMIC" + }, + text = "qA1_wB2_eA3_rB4_tA5_yB6_uA7_iB8_oA9_pB0_aA1_sB2_dA3_fB4_gA5_hB6_jA7_kB8_lA9_zB0_xA1_cB2_vA3_bB4_nA5_mB6_qA7_wB8_eA9_rB0_tA1_yB2_uA3_iB4_oA5_pB6_aA7_sB8_dA9_fB0_gA1_hB2_jA3_kB4_lA5_zB6_xA7_cB8_vA9_bB0_nA1_mB2_qA3_wB4_eA5_rB6_tA7_yB8_uA9_iB0_oA1_pB2_aA3_sB4_dA5_fB6_gA7_hB8_jA9_kB0_lA1_zB2_xA3_cB4_vA5_bB6_nA7_mB8_qA9_wB0_eA1_rB2_tA3_yB4_uA5_iB6_oA7_pB8_aA9_sB0_dA1_fB2_gA3_hB4_jA5_kB6_lA7_zB8_xA9_cB0_vA1_bB2_nA3_mB4_qA5_wB6_eA7_rB8_tA9_yB0_uA1_iB2_oA3_pB4_aA5_sB6_dA7_fB8_gA9_hB0_jA1_kB2_lA3_zB4__026" + }, + { + position = 27, + image = + { + value = "action.png", + imageType = "DYNAMIC" + }, + text = "qA1_wB2_eA3_rB4_tA5_yB6_uA7_iB8_oA9_pB0_aA1_sB2_dA3_fB4_gA5_hB6_jA7_kB8_lA9_zB0_xA1_cB2_vA3_bB4_nA5_mB6_qA7_wB8_eA9_rB0_tA1_yB2_uA3_iB4_oA5_pB6_aA7_sB8_dA9_fB0_gA1_hB2_jA3_kB4_lA5_zB6_xA7_cB8_vA9_bB0_nA1_mB2_qA3_wB4_eA5_rB6_tA7_yB8_uA9_iB0_oA1_pB2_aA3_sB4_dA5_fB6_gA7_hB8_jA9_kB0_lA1_zB2_xA3_cB4_vA5_bB6_nA7_mB8_qA9_wB0_eA1_rB2_tA3_yB4_uA5_iB6_oA7_pB8_aA9_sB0_dA1_fB2_gA3_hB4_jA5_kB6_lA7_zB8_xA9_cB0_vA1_bB2_nA3_mB4_qA5_wB6_eA7_rB8_tA9_yB0_uA1_iB2_oA3_pB4_aA5_sB6_dA7_fB8_gA9_hB0_jA1_kB2_lA3_zB4__027" + }, + { + position = 28, + image = + { + value = "action.png", + imageType = "DYNAMIC" + }, + text = "qA1_wB2_eA3_rB4_tA5_yB6_uA7_iB8_oA9_pB0_aA1_sB2_dA3_fB4_gA5_hB6_jA7_kB8_lA9_zB0_xA1_cB2_vA3_bB4_nA5_mB6_qA7_wB8_eA9_rB0_tA1_yB2_uA3_iB4_oA5_pB6_aA7_sB8_dA9_fB0_gA1_hB2_jA3_kB4_lA5_zB6_xA7_cB8_vA9_bB0_nA1_mB2_qA3_wB4_eA5_rB6_tA7_yB8_uA9_iB0_oA1_pB2_aA3_sB4_dA5_fB6_gA7_hB8_jA9_kB0_lA1_zB2_xA3_cB4_vA5_bB6_nA7_mB8_qA9_wB0_eA1_rB2_tA3_yB4_uA5_iB6_oA7_pB8_aA9_sB0_dA1_fB2_gA3_hB4_jA5_kB6_lA7_zB8_xA9_cB0_vA1_bB2_nA3_mB4_qA5_wB6_eA7_rB8_tA9_yB0_uA1_iB2_oA3_pB4_aA5_sB6_dA7_fB8_gA9_hB0_jA1_kB2_lA3_zB4__028" + }, + { + position = 29, + image = + { + value = "action.png", + imageType = "DYNAMIC" + }, + text = "qA1_wB2_eA3_rB4_tA5_yB6_uA7_iB8_oA9_pB0_aA1_sB2_dA3_fB4_gA5_hB6_jA7_kB8_lA9_zB0_xA1_cB2_vA3_bB4_nA5_mB6_qA7_wB8_eA9_rB0_tA1_yB2_uA3_iB4_oA5_pB6_aA7_sB8_dA9_fB0_gA1_hB2_jA3_kB4_lA5_zB6_xA7_cB8_vA9_bB0_nA1_mB2_qA3_wB4_eA5_rB6_tA7_yB8_uA9_iB0_oA1_pB2_aA3_sB4_dA5_fB6_gA7_hB8_jA9_kB0_lA1_zB2_xA3_cB4_vA5_bB6_nA7_mB8_qA9_wB0_eA1_rB2_tA3_yB4_uA5_iB6_oA7_pB8_aA9_sB0_dA1_fB2_gA3_hB4_jA5_kB6_lA7_zB8_xA9_cB0_vA1_bB2_nA3_mB4_qA5_wB6_eA7_rB8_tA9_yB0_uA1_iB2_oA3_pB4_aA5_sB6_dA7_fB8_gA9_hB0_jA1_kB2_lA3_zB4__029" + }, + { + position = 30, + image = + { + value = "action.png", + imageType = "DYNAMIC" + }, + text = "qA1_wB2_eA3_rB4_tA5_yB6_uA7_iB8_oA9_pB0_aA1_sB2_dA3_fB4_gA5_hB6_jA7_kB8_lA9_zB0_xA1_cB2_vA3_bB4_nA5_mB6_qA7_wB8_eA9_rB0_tA1_yB2_uA3_iB4_oA5_pB6_aA7_sB8_dA9_fB0_gA1_hB2_jA3_kB4_lA5_zB6_xA7_cB8_vA9_bB0_nA1_mB2_qA3_wB4_eA5_rB6_tA7_yB8_uA9_iB0_oA1_pB2_aA3_sB4_dA5_fB6_gA7_hB8_jA9_kB0_lA1_zB2_xA3_cB4_vA5_bB6_nA7_mB8_qA9_wB0_eA1_rB2_tA3_yB4_uA5_iB6_oA7_pB8_aA9_sB0_dA1_fB2_gA3_hB4_jA5_kB6_lA7_zB8_xA9_cB0_vA1_bB2_nA3_mB4_qA5_wB6_eA7_rB8_tA9_yB0_uA1_iB2_oA3_pB4_aA5_sB6_dA7_fB8_gA9_hB0_jA1_kB2_lA3_zB4__030" + }, + { + position = 31, + image = + { + value = "action.png", + imageType = "DYNAMIC" + }, + text = "qA1_wB2_eA3_rB4_tA5_yB6_uA7_iB8_oA9_pB0_aA1_sB2_dA3_fB4_gA5_hB6_jA7_kB8_lA9_zB0_xA1_cB2_vA3_bB4_nA5_mB6_qA7_wB8_eA9_rB0_tA1_yB2_uA3_iB4_oA5_pB6_aA7_sB8_dA9_fB0_gA1_hB2_jA3_kB4_lA5_zB6_xA7_cB8_vA9_bB0_nA1_mB2_qA3_wB4_eA5_rB6_tA7_yB8_uA9_iB0_oA1_pB2_aA3_sB4_dA5_fB6_gA7_hB8_jA9_kB0_lA1_zB2_xA3_cB4_vA5_bB6_nA7_mB8_qA9_wB0_eA1_rB2_tA3_yB4_uA5_iB6_oA7_pB8_aA9_sB0_dA1_fB2_gA3_hB4_jA5_kB6_lA7_zB8_xA9_cB0_vA1_bB2_nA3_mB4_qA5_wB6_eA7_rB8_tA9_yB0_uA1_iB2_oA3_pB4_aA5_sB6_dA7_fB8_gA9_hB0_jA1_kB2_lA3_zB4__031" + }, + { + position = 32, + image = + { + value = "action.png", + imageType = "DYNAMIC" + }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hB0_jA1_kB2_lA3_zB4__033" + }, + { + position = 34, + image = + { + value = "action.png", + imageType = "DYNAMIC" + }, + text = "qA1_wB2_eA3_rB4_tA5_yB6_uA7_iB8_oA9_pB0_aA1_sB2_dA3_fB4_gA5_hB6_jA7_kB8_lA9_zB0_xA1_cB2_vA3_bB4_nA5_mB6_qA7_wB8_eA9_rB0_tA1_yB2_uA3_iB4_oA5_pB6_aA7_sB8_dA9_fB0_gA1_hB2_jA3_kB4_lA5_zB6_xA7_cB8_vA9_bB0_nA1_mB2_qA3_wB4_eA5_rB6_tA7_yB8_uA9_iB0_oA1_pB2_aA3_sB4_dA5_fB6_gA7_hB8_jA9_kB0_lA1_zB2_xA3_cB4_vA5_bB6_nA7_mB8_qA9_wB0_eA1_rB2_tA3_yB4_uA5_iB6_oA7_pB8_aA9_sB0_dA1_fB2_gA3_hB4_jA5_kB6_lA7_zB8_xA9_cB0_vA1_bB2_nA3_mB4_qA5_wB6_eA7_rB8_tA9_yB0_uA1_iB2_oA3_pB4_aA5_sB6_dA7_fB8_gA9_hB0_jA1_kB2_lA3_zB4__034" + }, + { + position = 35, + image = + { + value = "action.png", + imageType = "DYNAMIC" + }, + text = "qA1_wB2_eA3_rB4_tA5_yB6_uA7_iB8_oA9_pB0_aA1_sB2_dA3_fB4_gA5_hB6_jA7_kB8_lA9_zB0_xA1_cB2_vA3_bB4_nA5_mB6_qA7_wB8_eA9_rB0_tA1_yB2_uA3_iB4_oA5_pB6_aA7_sB8_dA9_fB0_gA1_hB2_jA3_kB4_lA5_zB6_xA7_cB8_vA9_bB0_nA1_mB2_qA3_wB4_eA5_rB6_tA7_yB8_uA9_iB0_oA1_pB2_aA3_sB4_dA5_fB6_gA7_hB8_jA9_kB0_lA1_zB2_xA3_cB4_vA5_bB6_nA7_mB8_qA9_wB0_eA1_rB2_tA3_yB4_uA5_iB6_oA7_pB8_aA9_sB0_dA1_fB2_gA3_hB4_jA5_kB6_lA7_zB8_xA9_cB0_vA1_bB2_nA3_mB4_qA5_wB6_eA7_rB8_tA9_yB0_uA1_iB2_oA3_pB4_aA5_sB6_dA7_fB8_gA9_hB0_jA1_kB2_lA3_zB4__035" + }, + { + position = 36, + image = + { + value = "action.png", + imageType = "DYNAMIC" + }, + text = "qA1_wB2_eA3_rB4_tA5_yB6_uA7_iB8_oA9_pB0_aA1_sB2_dA3_fB4_gA5_hB6_jA7_kB8_lA9_zB0_xA1_cB2_vA3_bB4_nA5_mB6_qA7_wB8_eA9_rB0_tA1_yB2_uA3_iB4_oA5_pB6_aA7_sB8_dA9_fB0_gA1_hB2_jA3_kB4_lA5_zB6_xA7_cB8_vA9_bB0_nA1_mB2_qA3_wB4_eA5_rB6_tA7_yB8_uA9_iB0_oA1_pB2_aA3_sB4_dA5_fB6_gA7_hB8_jA9_kB0_lA1_zB2_xA3_cB4_vA5_bB6_nA7_mB8_qA9_wB0_eA1_rB2_tA3_yB4_uA5_iB6_oA7_pB8_aA9_sB0_dA1_fB2_gA3_hB4_jA5_kB6_lA7_zB8_xA9_cB0_vA1_bB2_nA3_mB4_qA5_wB6_eA7_rB8_tA9_yB0_uA1_iB2_oA3_pB4_aA5_sB6_dA7_fB8_gA9_hB0_jA1_kB2_lA3_zB4__036" + }, + { + position = 37, + image = + { + value = "action.png", + imageType = "DYNAMIC" + }, + text = "qA1_wB2_eA3_rB4_tA5_yB6_uA7_iB8_oA9_pB0_aA1_sB2_dA3_fB4_gA5_hB6_jA7_kB8_lA9_zB0_xA1_cB2_vA3_bB4_nA5_mB6_qA7_wB8_eA9_rB0_tA1_yB2_uA3_iB4_oA5_pB6_aA7_sB8_dA9_fB0_gA1_hB2_jA3_kB4_lA5_zB6_xA7_cB8_vA9_bB0_nA1_mB2_qA3_wB4_eA5_rB6_tA7_yB8_uA9_iB0_oA1_pB2_aA3_sB4_dA5_fB6_gA7_hB8_jA9_kB0_lA1_zB2_xA3_cB4_vA5_bB6_nA7_mB8_qA9_wB0_eA1_rB2_tA3_yB4_uA5_iB6_oA7_pB8_aA9_sB0_dA1_fB2_gA3_hB4_jA5_kB6_lA7_zB8_xA9_cB0_vA1_bB2_nA3_mB4_qA5_wB6_eA7_rB8_tA9_yB0_uA1_iB2_oA3_pB4_aA5_sB6_dA7_fB8_gA9_hB0_jA1_kB2_lA3_zB4__037" + }, + { + position = 38, + image = + { + value = "action.png", + imageType = "DYNAMIC" + }, + text = "qA1_wB2_eA3_rB4_tA5_yB6_uA7_iB8_oA9_pB0_aA1_sB2_dA3_fB4_gA5_hB6_jA7_kB8_lA9_zB0_xA1_cB2_vA3_bB4_nA5_mB6_qA7_wB8_eA9_rB0_tA1_yB2_uA3_iB4_oA5_pB6_aA7_sB8_dA9_fB0_gA1_hB2_jA3_kB4_lA5_zB6_xA7_cB8_vA9_bB0_nA1_mB2_qA3_wB4_eA5_rB6_tA7_yB8_uA9_iB0_oA1_pB2_aA3_sB4_dA5_fB6_gA7_hB8_jA9_kB0_lA1_zB2_xA3_cB4_vA5_bB6_nA7_mB8_qA9_wB0_eA1_rB2_tA3_yB4_uA5_iB6_oA7_pB8_aA9_sB0_dA1_fB2_gA3_hB4_jA5_kB6_lA7_zB8_xA9_cB0_vA1_bB2_nA3_mB4_qA5_wB6_eA7_rB8_tA9_yB0_uA1_iB2_oA3_pB4_aA5_sB6_dA7_fB8_gA9_hB0_jA1_kB2_lA3_zB4__038" + }, + { + position = 39, + image = + { + value = "action.png", + imageType = "DYNAMIC" + }, + text = "qA1_wB2_eA3_rB4_tA5_yB6_uA7_iB8_oA9_pB0_aA1_sB2_dA3_fB4_gA5_hB6_jA7_kB8_lA9_zB0_xA1_cB2_vA3_bB4_nA5_mB6_qA7_wB8_eA9_rB0_tA1_yB2_uA3_iB4_oA5_pB6_aA7_sB8_dA9_fB0_gA1_hB2_jA3_kB4_lA5_zB6_xA7_cB8_vA9_bB0_nA1_mB2_qA3_wB4_eA5_rB6_tA7_yB8_uA9_iB0_oA1_pB2_aA3_sB4_dA5_fB6_gA7_hB8_jA9_kB0_lA1_zB2_xA3_cB4_vA5_bB6_nA7_mB8_qA9_wB0_eA1_rB2_tA3_yB4_uA5_iB6_oA7_pB8_aA9_sB0_dA1_fB2_gA3_hB4_jA5_kB6_lA7_zB8_xA9_cB0_vA1_bB2_nA3_mB4_qA5_wB6_eA7_rB8_tA9_yB0_uA1_iB2_oA3_pB4_aA5_sB6_dA7_fB8_gA9_hB0_jA1_kB2_lA3_zB4__039" + }, + { + position = 40, + image = + { + value = "action.png", + imageType = "DYNAMIC" + }, + text = "qA1_wB2_eA3_rB4_tA5_yB6_uA7_iB8_oA9_pB0_aA1_sB2_dA3_fB4_gA5_hB6_jA7_kB8_lA9_zB0_xA1_cB2_vA3_bB4_nA5_mB6_qA7_wB8_eA9_rB0_tA1_yB2_uA3_iB4_oA5_pB6_aA7_sB8_dA9_fB0_gA1_hB2_jA3_kB4_lA5_zB6_xA7_cB8_vA9_bB0_nA1_mB2_qA3_wB4_eA5_rB6_tA7_yB8_uA9_iB0_oA1_pB2_aA3_sB4_dA5_fB6_gA7_hB8_jA9_kB0_lA1_zB2_xA3_cB4_vA5_bB6_nA7_mB8_qA9_wB0_eA1_rB2_tA3_yB4_uA5_iB6_oA7_pB8_aA9_sB0_dA1_fB2_gA3_hB4_jA5_kB6_lA7_zB8_xA9_cB0_vA1_bB2_nA3_mB4_qA5_wB6_eA7_rB8_tA9_yB0_uA1_iB2_oA3_pB4_aA5_sB6_dA7_fB8_gA9_hB0_jA1_kB2_lA3_zB4__040" + }, + { + position = 41, + image = + { + value = "action.png", + imageType = "DYNAMIC" + }, + text = "qA1_wB2_eA3_rB4_tA5_yB6_uA7_iB8_oA9_pB0_aA1_sB2_dA3_fB4_gA5_hB6_jA7_kB8_lA9_zB0_xA1_cB2_vA3_bB4_nA5_mB6_qA7_wB8_eA9_rB0_tA1_yB2_uA3_iB4_oA5_pB6_aA7_sB8_dA9_fB0_gA1_hB2_jA3_kB4_lA5_zB6_xA7_cB8_vA9_bB0_nA1_mB2_qA3_wB4_eA5_rB6_tA7_yB8_uA9_iB0_oA1_pB2_aA3_sB4_dA5_fB6_gA7_hB8_jA9_kB0_lA1_zB2_xA3_cB4_vA5_bB6_nA7_mB8_qA9_wB0_eA1_rB2_tA3_yB4_uA5_iB6_oA7_pB8_aA9_sB0_dA1_fB2_gA3_hB4_jA5_kB6_lA7_zB8_xA9_cB0_vA1_bB2_nA3_mB4_qA5_wB6_eA7_rB8_tA9_yB0_uA1_iB2_oA3_pB4_aA5_sB6_dA7_fB8_gA9_hB0_jA1_kB2_lA3_zB4__041" + }, + { + position = 42, + image = + { + value = "action.png", + imageType = "DYNAMIC" + }, + text = "qA1_wB2_eA3_rB4_tA5_yB6_uA7_iB8_oA9_pB0_aA1_sB2_dA3_fB4_gA5_hB6_jA7_kB8_lA9_zB0_xA1_cB2_vA3_bB4_nA5_mB6_qA7_wB8_eA9_rB0_tA1_yB2_uA3_iB4_oA5_pB6_aA7_sB8_dA9_fB0_gA1_hB2_jA3_kB4_lA5_zB6_xA7_cB8_vA9_bB0_nA1_mB2_qA3_wB4_eA5_rB6_tA7_yB8_uA9_iB0_oA1_pB2_aA3_sB4_dA5_fB6_gA7_hB8_jA9_kB0_lA1_zB2_xA3_cB4_vA5_bB6_nA7_mB8_qA9_wB0_eA1_rB2_tA3_yB4_uA5_iB6_oA7_pB8_aA9_sB0_dA1_fB2_gA3_hB4_jA5_kB6_lA7_zB8_xA9_cB0_vA1_bB2_nA3_mB4_qA5_wB6_eA7_rB8_tA9_yB0_uA1_iB2_oA3_pB4_aA5_sB6_dA7_fB8_gA9_hB0_jA1_kB2_lA3_zB4__042" + }, + { + position = 43, + image = + { + value = "action.png", + imageType = "DYNAMIC" + }, + text = "qA1_wB2_eA3_rB4_tA5_yB6_uA7_iB8_oA9_pB0_aA1_sB2_dA3_fB4_gA5_hB6_jA7_kB8_lA9_zB0_xA1_cB2_vA3_bB4_nA5_mB6_qA7_wB8_eA9_rB0_tA1_yB2_uA3_iB4_oA5_pB6_aA7_sB8_dA9_fB0_gA1_hB2_jA3_kB4_lA5_zB6_xA7_cB8_vA9_bB0_nA1_mB2_qA3_wB4_eA5_rB6_tA7_yB8_uA9_iB0_oA1_pB2_aA3_sB4_dA5_fB6_gA7_hB8_jA9_kB0_lA1_zB2_xA3_cB4_vA5_bB6_nA7_mB8_qA9_wB0_eA1_rB2_tA3_yB4_uA5_iB6_oA7_pB8_aA9_sB0_dA1_fB2_gA3_hB4_jA5_kB6_lA7_zB8_xA9_cB0_vA1_bB2_nA3_mB4_qA5_wB6_eA7_rB8_tA9_yB0_uA1_iB2_oA3_pB4_aA5_sB6_dA7_fB8_gA9_hB0_jA1_kB2_lA3_zB4__043" + }, + { + position = 44, + image = + { + value = "action.png", + imageType = "DYNAMIC" + }, + text = "qA1_wB2_eA3_rB4_tA5_yB6_uA7_iB8_oA9_pB0_aA1_sB2_dA3_fB4_gA5_hB6_jA7_kB8_lA9_zB0_xA1_cB2_vA3_bB4_nA5_mB6_qA7_wB8_eA9_rB0_tA1_yB2_uA3_iB4_oA5_pB6_aA7_sB8_dA9_fB0_gA1_hB2_jA3_kB4_lA5_zB6_xA7_cB8_vA9_bB0_nA1_mB2_qA3_wB4_eA5_rB6_tA7_yB8_uA9_iB0_oA1_pB2_aA3_sB4_dA5_fB6_gA7_hB8_jA9_kB0_lA1_zB2_xA3_cB4_vA5_bB6_nA7_mB8_qA9_wB0_eA1_rB2_tA3_yB4_uA5_iB6_oA7_pB8_aA9_sB0_dA1_fB2_gA3_hB4_jA5_kB6_lA7_zB8_xA9_cB0_vA1_bB2_nA3_mB4_qA5_wB6_eA7_rB8_tA9_yB0_uA1_iB2_oA3_pB4_aA5_sB6_dA7_fB8_gA9_hB0_jA1_kB2_lA3_zB4__044" + }, + { + position = 45, + image = + { + value = "action.png", + imageType = "DYNAMIC" + }, + text = "qA1_wB2_eA3_rB4_tA5_yB6_uA7_iB8_oA9_pB0_aA1_sB2_dA3_fB4_gA5_hB6_jA7_kB8_lA9_zB0_xA1_cB2_vA3_bB4_nA5_mB6_qA7_wB8_eA9_rB0_tA1_yB2_uA3_iB4_oA5_pB6_aA7_sB8_dA9_fB0_gA1_hB2_jA3_kB4_lA5_zB6_xA7_cB8_vA9_bB0_nA1_mB2_qA3_wB4_eA5_rB6_tA7_yB8_uA9_iB0_oA1_pB2_aA3_sB4_dA5_fB6_gA7_hB8_jA9_kB0_lA1_zB2_xA3_cB4_vA5_bB6_nA7_mB8_qA9_wB0_eA1_rB2_tA3_yB4_uA5_iB6_oA7_pB8_aA9_sB0_dA1_fB2_gA3_hB4_jA5_kB6_lA7_zB8_xA9_cB0_vA1_bB2_nA3_mB4_qA5_wB6_eA7_rB8_tA9_yB0_uA1_iB2_oA3_pB4_aA5_sB6_dA7_fB8_gA9_hB0_jA1_kB2_lA3_zB4__045" + }, + { + position = 46, + image = + { + value = "action.png", + imageType = "DYNAMIC" + }, + text = "qA1_wB2_eA3_rB4_tA5_yB6_uA7_iB8_oA9_pB0_aA1_sB2_dA3_fB4_gA5_hB6_jA7_kB8_lA9_zB0_xA1_cB2_vA3_bB4_nA5_mB6_qA7_wB8_eA9_rB0_tA1_yB2_uA3_iB4_oA5_pB6_aA7_sB8_dA9_fB0_gA1_hB2_jA3_kB4_lA5_zB6_xA7_cB8_vA9_bB0_nA1_mB2_qA3_wB4_eA5_rB6_tA7_yB8_uA9_iB0_oA1_pB2_aA3_sB4_dA5_fB6_gA7_hB8_jA9_kB0_lA1_zB2_xA3_cB4_vA5_bB6_nA7_mB8_qA9_wB0_eA1_rB2_tA3_yB4_uA5_iB6_oA7_pB8_aA9_sB0_dA1_fB2_gA3_hB4_jA5_kB6_lA7_zB8_xA9_cB0_vA1_bB2_nA3_mB4_qA5_wB6_eA7_rB8_tA9_yB0_uA1_iB2_oA3_pB4_aA5_sB6_dA7_fB8_gA9_hB0_jA1_kB2_lA3_zB4__046" + }, + { + position = 47, + image = + { + value = "action.png", + imageType = "DYNAMIC" + }, + text = "qA1_wB2_eA3_rB4_tA5_yB6_uA7_iB8_oA9_pB0_aA1_sB2_dA3_fB4_gA5_hB6_jA7_kB8_lA9_zB0_xA1_cB2_vA3_bB4_nA5_mB6_qA7_wB8_eA9_rB0_tA1_yB2_uA3_iB4_oA5_pB6_aA7_sB8_dA9_fB0_gA1_hB2_jA3_kB4_lA5_zB6_xA7_cB8_vA9_bB0_nA1_mB2_qA3_wB4_eA5_rB6_tA7_yB8_uA9_iB0_oA1_pB2_aA3_sB4_dA5_fB6_gA7_hB8_jA9_kB0_lA1_zB2_xA3_cB4_vA5_bB6_nA7_mB8_qA9_wB0_eA1_rB2_tA3_yB4_uA5_iB6_oA7_pB8_aA9_sB0_dA1_fB2_gA3_hB4_jA5_kB6_lA7_zB8_xA9_cB0_vA1_bB2_nA3_mB4_qA5_wB6_eA7_rB8_tA9_yB0_uA1_iB2_oA3_pB4_aA5_sB6_dA7_fB8_gA9_hB0_jA1_kB2_lA3_zB4__047" + }, + { + position = 48, + image = + { + value = "action.png", + imageType = "DYNAMIC" + }, + text = "qA1_wB2_eA3_rB4_tA5_yB6_uA7_iB8_oA9_pB0_aA1_sB2_dA3_fB4_gA5_hB6_jA7_kB8_lA9_zB0_xA1_cB2_vA3_bB4_nA5_mB6_qA7_wB8_eA9_rB0_tA1_yB2_uA3_iB4_oA5_pB6_aA7_sB8_dA9_fB0_gA1_hB2_jA3_kB4_lA5_zB6_xA7_cB8_vA9_bB0_nA1_mB2_qA3_wB4_eA5_rB6_tA7_yB8_uA9_iB0_oA1_pB2_aA3_sB4_dA5_fB6_gA7_hB8_jA9_kB0_lA1_zB2_xA3_cB4_vA5_bB6_nA7_mB8_qA9_wB0_eA1_rB2_tA3_yB4_uA5_iB6_oA7_pB8_aA9_sB0_dA1_fB2_gA3_hB4_jA5_kB6_lA7_zB8_xA9_cB0_vA1_bB2_nA3_mB4_qA5_wB6_eA7_rB8_tA9_yB0_uA1_iB2_oA3_pB4_aA5_sB6_dA7_fB8_gA9_hB0_jA1_kB2_lA3_zB4__048" + }, + { + position = 49, + image = + { + value = "action.png", +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B6_dA7_fB8_gA9_hB0_jA1_kB2_lA3_zB4__050" + }, + { + position = 51, + image = + { + value = "action.png", + imageType = "DYNAMIC" + }, + text = "qA1_wB2_eA3_rB4_tA5_yB6_uA7_iB8_oA9_pB0_aA1_sB2_dA3_fB4_gA5_hB6_jA7_kB8_lA9_zB0_xA1_cB2_vA3_bB4_nA5_mB6_qA7_wB8_eA9_rB0_tA1_yB2_uA3_iB4_oA5_pB6_aA7_sB8_dA9_fB0_gA1_hB2_jA3_kB4_lA5_zB6_xA7_cB8_vA9_bB0_nA1_mB2_qA3_wB4_eA5_rB6_tA7_yB8_uA9_iB0_oA1_pB2_aA3_sB4_dA5_fB6_gA7_hB8_jA9_kB0_lA1_zB2_xA3_cB4_vA5_bB6_nA7_mB8_qA9_wB0_eA1_rB2_tA3_yB4_uA5_iB6_oA7_pB8_aA9_sB0_dA1_fB2_gA3_hB4_jA5_kB6_lA7_zB8_xA9_cB0_vA1_bB2_nA3_mB4_qA5_wB6_eA7_rB8_tA9_yB0_uA1_iB2_oA3_pB4_aA5_sB6_dA7_fB8_gA9_hB0_jA1_kB2_lA3_zB4__051" + }, + { + position = 52, + image = + { + value = "action.png", + imageType = "DYNAMIC" + }, + text = "qA1_wB2_eA3_rB4_tA5_yB6_uA7_iB8_oA9_pB0_aA1_sB2_dA3_fB4_gA5_hB6_jA7_kB8_lA9_zB0_xA1_cB2_vA3_bB4_nA5_mB6_qA7_wB8_eA9_rB0_tA1_yB2_uA3_iB4_oA5_pB6_aA7_sB8_dA9_fB0_gA1_hB2_jA3_kB4_lA5_zB6_xA7_cB8_vA9_bB0_nA1_mB2_qA3_wB4_eA5_rB6_tA7_yB8_uA9_iB0_oA1_pB2_aA3_sB4_dA5_fB6_gA7_hB8_jA9_kB0_lA1_zB2_xA3_cB4_vA5_bB6_nA7_mB8_qA9_wB0_eA1_rB2_tA3_yB4_uA5_iB6_oA7_pB8_aA9_sB0_dA1_fB2_gA3_hB4_jA5_kB6_lA7_zB8_xA9_cB0_vA1_bB2_nA3_mB4_qA5_wB6_eA7_rB8_tA9_yB0_uA1_iB2_oA3_pB4_aA5_sB6_dA7_fB8_gA9_hB0_jA1_kB2_lA3_zB4__052" + }, + { + position = 53, + image = + { + value = "action.png", + imageType = "DYNAMIC" + }, + text = "qA1_wB2_eA3_rB4_tA5_yB6_uA7_iB8_oA9_pB0_aA1_sB2_dA3_fB4_gA5_hB6_jA7_kB8_lA9_zB0_xA1_cB2_vA3_bB4_nA5_mB6_qA7_wB8_eA9_rB0_tA1_yB2_uA3_iB4_oA5_pB6_aA7_sB8_dA9_fB0_gA1_hB2_jA3_kB4_lA5_zB6_xA7_cB8_vA9_bB0_nA1_mB2_qA3_wB4_eA5_rB6_tA7_yB8_uA9_iB0_oA1_pB2_aA3_sB4_dA5_fB6_gA7_hB8_jA9_kB0_lA1_zB2_xA3_cB4_vA5_bB6_nA7_mB8_qA9_wB0_eA1_rB2_tA3_yB4_uA5_iB6_oA7_pB8_aA9_sB0_dA1_fB2_gA3_hB4_jA5_kB6_lA7_zB8_xA9_cB0_vA1_bB2_nA3_mB4_qA5_wB6_eA7_rB8_tA9_yB0_uA1_iB2_oA3_pB4_aA5_sB6_dA7_fB8_gA9_hB0_jA1_kB2_lA3_zB4__053" + }, + { + position = 54, + image = + { + value = "action.png", + imageType = "DYNAMIC" + }, + text = "qA1_wB2_eA3_rB4_tA5_yB6_uA7_iB8_oA9_pB0_aA1_sB2_dA3_fB4_gA5_hB6_jA7_kB8_lA9_zB0_xA1_cB2_vA3_bB4_nA5_mB6_qA7_wB8_eA9_rB0_tA1_yB2_uA3_iB4_oA5_pB6_aA7_sB8_dA9_fB0_gA1_hB2_jA3_kB4_lA5_zB6_xA7_cB8_vA9_bB0_nA1_mB2_qA3_wB4_eA5_rB6_tA7_yB8_uA9_iB0_oA1_pB2_aA3_sB4_dA5_fB6_gA7_hB8_jA9_kB0_lA1_zB2_xA3_cB4_vA5_bB6_nA7_mB8_qA9_wB0_eA1_rB2_tA3_yB4_uA5_iB6_oA7_pB8_aA9_sB0_dA1_fB2_gA3_hB4_jA5_kB6_lA7_zB8_xA9_cB0_vA1_bB2_nA3_mB4_qA5_wB6_eA7_rB8_tA9_yB0_uA1_iB2_oA3_pB4_aA5_sB6_dA7_fB8_gA9_hB0_jA1_kB2_lA3_zB4__054" + }, + { + position = 55, + image = + { + value = "action.png", + imageType = "DYNAMIC" + }, + text = "qA1_wB2_eA3_rB4_tA5_yB6_uA7_iB8_oA9_pB0_aA1_sB2_dA3_fB4_gA5_hB6_jA7_kB8_lA9_zB0_xA1_cB2_vA3_bB4_nA5_mB6_qA7_wB8_eA9_rB0_tA1_yB2_uA3_iB4_oA5_pB6_aA7_sB8_dA9_fB0_gA1_hB2_jA3_kB4_lA5_zB6_xA7_cB8_vA9_bB0_nA1_mB2_qA3_wB4_eA5_rB6_tA7_yB8_uA9_iB0_oA1_pB2_aA3_sB4_dA5_fB6_gA7_hB8_jA9_kB0_lA1_zB2_xA3_cB4_vA5_bB6_nA7_mB8_qA9_wB0_eA1_rB2_tA3_yB4_uA5_iB6_oA7_pB8_aA9_sB0_dA1_fB2_gA3_hB4_jA5_kB6_lA7_zB8_xA9_cB0_vA1_bB2_nA3_mB4_qA5_wB6_eA7_rB8_tA9_yB0_uA1_iB2_oA3_pB4_aA5_sB6_dA7_fB8_gA9_hB0_jA1_kB2_lA3_zB4__055" + }, + { + position = 56, + image = + { + value = "action.png", + imageType = "DYNAMIC" + }, + text = "qA1_wB2_eA3_rB4_tA5_yB6_uA7_iB8_oA9_pB0_aA1_sB2_dA3_fB4_gA5_hB6_jA7_kB8_lA9_zB0_xA1_cB2_vA3_bB4_nA5_mB6_qA7_wB8_eA9_rB0_tA1_yB2_uA3_iB4_oA5_pB6_aA7_sB8_dA9_fB0_gA1_hB2_jA3_kB4_lA5_zB6_xA7_cB8_vA9_bB0_nA1_mB2_qA3_wB4_eA5_rB6_tA7_yB8_uA9_iB0_oA1_pB2_aA3_sB4_dA5_fB6_gA7_hB8_jA9_kB0_lA1_zB2_xA3_cB4_vA5_bB6_nA7_mB8_qA9_wB0_eA1_rB2_tA3_yB4_uA5_iB6_oA7_pB8_aA9_sB0_dA1_fB2_gA3_hB4_jA5_kB6_lA7_zB8_xA9_cB0_vA1_bB2_nA3_mB4_qA5_wB6_eA7_rB8_tA9_yB0_uA1_iB2_oA3_pB4_aA5_sB6_dA7_fB8_gA9_hB0_jA1_kB2_lA3_zB4__056" + }, + { + position = 57, + image = + { + value = "action.png", + imageType = "DYNAMIC" + }, + text = "qA1_wB2_eA3_rB4_tA5_yB6_uA7_iB8_oA9_pB0_aA1_sB2_dA3_fB4_gA5_hB6_jA7_kB8_lA9_zB0_xA1_cB2_vA3_bB4_nA5_mB6_qA7_wB8_eA9_rB0_tA1_yB2_uA3_iB4_oA5_pB6_aA7_sB8_dA9_fB0_gA1_hB2_jA3_kB4_lA5_zB6_xA7_cB8_vA9_bB0_nA1_mB2_qA3_wB4_eA5_rB6_tA7_yB8_uA9_iB0_oA1_pB2_aA3_sB4_dA5_fB6_gA7_hB8_jA9_kB0_lA1_zB2_xA3_cB4_vA5_bB6_nA7_mB8_qA9_wB0_eA1_rB2_tA3_yB4_uA5_iB6_oA7_pB8_aA9_sB0_dA1_fB2_gA3_hB4_jA5_kB6_lA7_zB8_xA9_cB0_vA1_bB2_nA3_mB4_qA5_wB6_eA7_rB8_tA9_yB0_uA1_iB2_oA3_pB4_aA5_sB6_dA7_fB8_gA9_hB0_jA1_kB2_lA3_zB4__057" + }, + { + position = 58, + image = + { + value = "action.png", + imageType = "DYNAMIC" + }, + text = "qA1_wB2_eA3_rB4_tA5_yB6_uA7_iB8_oA9_pB0_aA1_sB2_dA3_fB4_gA5_hB6_jA7_kB8_lA9_zB0_xA1_cB2_vA3_bB4_nA5_mB6_qA7_wB8_eA9_rB0_tA1_yB2_uA3_iB4_oA5_pB6_aA7_sB8_dA9_fB0_gA1_hB2_jA3_kB4_lA5_zB6_xA7_cB8_vA9_bB0_nA1_mB2_qA3_wB4_eA5_rB6_tA7_yB8_uA9_iB0_oA1_pB2_aA3_sB4_dA5_fB6_gA7_hB8_jA9_kB0_lA1_zB2_xA3_cB4_vA5_bB6_nA7_mB8_qA9_wB0_eA1_rB2_tA3_yB4_uA5_iB6_oA7_pB8_aA9_sB0_dA1_fB2_gA3_hB4_jA5_kB6_lA7_zB8_xA9_cB0_vA1_bB2_nA3_mB4_qA5_wB6_eA7_rB8_tA9_yB0_uA1_iB2_oA3_pB4_aA5_sB6_dA7_fB8_gA9_hB0_jA1_kB2_lA3_zB4__058" + }, + { + position = 59, + image = + { + value = "action.png", + imageType = "DYNAMIC" + }, + text = "qA1_wB2_eA3_rB4_tA5_yB6_uA7_iB8_oA9_pB0_aA1_sB2_dA3_fB4_gA5_hB6_jA7_kB8_lA9_zB0_xA1_cB2_vA3_bB4_nA5_mB6_qA7_wB8_eA9_rB0_tA1_yB2_uA3_iB4_oA5_pB6_aA7_sB8_dA9_fB0_gA1_hB2_jA3_kB4_lA5_zB6_xA7_cB8_vA9_bB0_nA1_mB2_qA3_wB4_eA5_rB6_tA7_yB8_uA9_iB0_oA1_pB2_aA3_sB4_dA5_fB6_gA7_hB8_jA9_kB0_lA1_zB2_xA3_cB4_vA5_bB6_nA7_mB8_qA9_wB0_eA1_rB2_tA3_yB4_uA5_iB6_oA7_pB8_aA9_sB0_dA1_fB2_gA3_hB4_jA5_kB6_lA7_zB8_xA9_cB0_vA1_bB2_nA3_mB4_qA5_wB6_eA7_rB8_tA9_yB0_uA1_iB2_oA3_pB4_aA5_sB6_dA7_fB8_gA9_hB0_jA1_kB2_lA3_zB4__059" + }, + { + position = 60, + image = + { + value = "action.png", + imageType = "DYNAMIC" + }, + text = "qA1_wB2_eA3_rB4_tA5_yB6_uA7_iB8_oA9_pB0_aA1_sB2_dA3_fB4_gA5_hB6_jA7_kB8_lA9_zB0_xA1_cB2_vA3_bB4_nA5_mB6_qA7_wB8_eA9_rB0_tA1_yB2_uA3_iB4_oA5_pB6_aA7_sB8_dA9_fB0_gA1_hB2_jA3_kB4_lA5_zB6_xA7_cB8_vA9_bB0_nA1_mB2_qA3_wB4_eA5_rB6_tA7_yB8_uA9_iB0_oA1_pB2_aA3_sB4_dA5_fB6_gA7_hB8_jA9_kB0_lA1_zB2_xA3_cB4_vA5_bB6_nA7_mB8_qA9_wB0_eA1_rB2_tA3_yB4_uA5_iB6_oA7_pB8_aA9_sB0_dA1_fB2_gA3_hB4_jA5_kB6_lA7_zB8_xA9_cB0_vA1_bB2_nA3_mB4_qA5_wB6_eA7_rB8_tA9_yB0_uA1_iB2_oA3_pB4_aA5_sB6_dA7_fB8_gA9_hB0_jA1_kB2_lA3_zB4__060" + }, + { + position = 61, + image = + { + value = "action.png", + imageType = "DYNAMIC" + }, + text = "qA1_wB2_eA3_rB4_tA5_yB6_uA7_iB8_oA9_pB0_aA1_sB2_dA3_fB4_gA5_hB6_jA7_kB8_lA9_zB0_xA1_cB2_vA3_bB4_nA5_mB6_qA7_wB8_eA9_rB0_tA1_yB2_uA3_iB4_oA5_pB6_aA7_sB8_dA9_fB0_gA1_hB2_jA3_kB4_lA5_zB6_xA7_cB8_vA9_bB0_nA1_mB2_qA3_wB4_eA5_rB6_tA7_yB8_uA9_iB0_oA1_pB2_aA3_sB4_dA5_fB6_gA7_hB8_jA9_kB0_lA1_zB2_xA3_cB4_vA5_bB6_nA7_mB8_qA9_wB0_eA1_rB2_tA3_yB4_uA5_iB6_oA7_pB8_aA9_sB0_dA1_fB2_gA3_hB4_jA5_kB6_lA7_zB8_xA9_cB0_vA1_bB2_nA3_mB4_qA5_wB6_eA7_rB8_tA9_yB0_uA1_iB2_oA3_pB4_aA5_sB6_dA7_fB8_gA9_hB0_jA1_kB2_lA3_zB4__061" + }, + { + position = 62, + image = + { + value = "action.png", + imageType = "DYNAMIC" + }, + text = "qA1_wB2_eA3_rB4_tA5_yB6_uA7_iB8_oA9_pB0_aA1_sB2_dA3_fB4_gA5_hB6_jA7_kB8_lA9_zB0_xA1_cB2_vA3_bB4_nA5_mB6_qA7_wB8_eA9_rB0_tA1_yB2_uA3_iB4_oA5_pB6_aA7_sB8_dA9_fB0_gA1_hB2_jA3_kB4_lA5_zB6_xA7_cB8_vA9_bB0_nA1_mB2_qA3_wB4_eA5_rB6_tA7_yB8_uA9_iB0_oA1_pB2_aA3_sB4_dA5_fB6_gA7_hB8_jA9_kB0_lA1_zB2_xA3_cB4_vA5_bB6_nA7_mB8_qA9_wB0_eA1_rB2_tA3_yB4_uA5_iB6_oA7_pB8_aA9_sB0_dA1_fB2_gA3_hB4_jA5_kB6_lA7_zB8_xA9_cB0_vA1_bB2_nA3_mB4_qA5_wB6_eA7_rB8_tA9_yB0_uA1_iB2_oA3_pB4_aA5_sB6_dA7_fB8_gA9_hB0_jA1_kB2_lA3_zB4__062" + }, + { + position = 63, + image = + { + value = "action.png", + imageType = "DYNAMIC" + }, + text = "qA1_wB2_eA3_rB4_tA5_yB6_uA7_iB8_oA9_pB0_aA1_sB2_dA3_fB4_gA5_hB6_jA7_kB8_lA9_zB0_xA1_cB2_vA3_bB4_nA5_mB6_qA7_wB8_eA9_rB0_tA1_yB2_uA3_iB4_oA5_pB6_aA7_sB8_dA9_fB0_gA1_hB2_jA3_kB4_lA5_zB6_xA7_cB8_vA9_bB0_nA1_mB2_qA3_wB4_eA5_rB6_tA7_yB8_uA9_iB0_oA1_pB2_aA3_sB4_dA5_fB6_gA7_hB8_jA9_kB0_lA1_zB2_xA3_cB4_vA5_bB6_nA7_mB8_qA9_wB0_eA1_rB2_tA3_yB4_uA5_iB6_oA7_pB8_aA9_sB0_dA1_fB2_gA3_hB4_jA5_kB6_lA7_zB8_xA9_cB0_vA1_bB2_nA3_mB4_qA5_wB6_eA7_rB8_tA9_yB0_uA1_iB2_oA3_pB4_aA5_sB6_dA7_fB8_gA9_hB0_jA1_kB2_lA3_zB4__063" + }, + { + position = 64, + image = + { + value = "action.png", + imageType = "DYNAMIC" + }, + text = "qA1_wB2_eA3_rB4_tA5_yB6_uA7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, + image = + { + value = "action.png", + imageType = "DYNAMIC" + }, + text = "qA1_wB2_eA3_rB4_tA5_yB6_uA7_iB8_oA9_pB0_aA1_sB2_dA3_fB4_gA5_hB6_jA7_kB8_lA9_zB0_xA1_cB2_vA3_bB4_nA5_mB6_qA7_wB8_eA9_rB0_tA1_yB2_uA3_iB4_oA5_pB6_aA7_sB8_dA9_fB0_gA1_hB2_jA3_kB4_lA5_zB6_xA7_cB8_vA9_bB0_nA1_mB2_qA3_wB4_eA5_rB6_tA7_yB8_uA9_iB0_oA1_pB2_aA3_sB4_dA5_fB6_gA7_hB8_jA9_kB0_lA1_zB2_xA3_cB4_vA5_bB6_nA7_mB8_qA9_wB0_eA1_rB2_tA3_yB4_uA5_iB6_oA7_pB8_aA9_sB0_dA1_fB2_gA3_hB4_jA5_kB6_lA7_zB8_xA9_cB0_vA1_bB2_nA3_mB4_qA5_wB6_eA7_rB8_tA9_yB0_uA1_iB2_oA3_pB4_aA5_sB6_dA7_fB8_gA9_hB0_jA1_kB2_lA3_zB4__066" + }, + { + position = 67, + image = + { + value = "action.png", + imageType = "DYNAMIC" + }, + text = "qA1_wB2_eA3_rB4_tA5_yB6_uA7_iB8_oA9_pB0_aA1_sB2_dA3_fB4_gA5_hB6_jA7_kB8_lA9_zB0_xA1_cB2_vA3_bB4_nA5_mB6_qA7_wB8_eA9_rB0_tA1_yB2_uA3_iB4_oA5_pB6_aA7_sB8_dA9_fB0_gA1_hB2_jA3_kB4_lA5_zB6_xA7_cB8_vA9_bB0_nA1_mB2_qA3_wB4_eA5_rB6_tA7_yB8_uA9_iB0_oA1_pB2_aA3_sB4_dA5_fB6_gA7_hB8_jA9_kB0_lA1_zB2_xA3_cB4_vA5_bB6_nA7_mB8_qA9_wB0_eA1_rB2_tA3_yB4_uA5_iB6_oA7_pB8_aA9_sB0_dA1_fB2_gA3_hB4_jA5_kB6_lA7_zB8_xA9_cB0_vA1_bB2_nA3_mB4_qA5_wB6_eA7_rB8_tA9_yB0_uA1_iB2_oA3_pB4_aA5_sB6_dA7_fB8_gA9_hB0_jA1_kB2_lA3_zB4__067" + }, + { + position = 68, + image = + { + value = "action.png", + imageType = "DYNAMIC" + }, + text = "qA1_wB2_eA3_rB4_tA5_yB6_uA7_iB8_oA9_pB0_aA1_sB2_dA3_fB4_gA5_hB6_jA7_kB8_lA9_zB0_xA1_cB2_vA3_bB4_nA5_mB6_qA7_wB8_eA9_rB0_tA1_yB2_uA3_iB4_oA5_pB6_aA7_sB8_dA9_fB0_gA1_hB2_jA3_kB4_lA5_zB6_xA7_cB8_vA9_bB0_nA1_mB2_qA3_wB4_eA5_rB6_tA7_yB8_uA9_iB0_oA1_pB2_aA3_sB4_dA5_fB6_gA7_hB8_jA9_kB0_lA1_zB2_xA3_cB4_vA5_bB6_nA7_mB8_qA9_wB0_eA1_rB2_tA3_yB4_uA5_iB6_oA7_pB8_aA9_sB0_dA1_fB2_gA3_hB4_jA5_kB6_lA7_zB8_xA9_cB0_vA1_bB2_nA3_mB4_qA5_wB6_eA7_rB8_tA9_yB0_uA1_iB2_oA3_pB4_aA5_sB6_dA7_fB8_gA9_hB0_jA1_kB2_lA3_zB4__068" + }, + { + position = 69, + image = + { + value = "action.png", + imageType = "DYNAMIC" + }, + text = "qA1_wB2_eA3_rB4_tA5_yB6_uA7_iB8_oA9_pB0_aA1_sB2_dA3_fB4_gA5_hB6_jA7_kB8_lA9_zB0_xA1_cB2_vA3_bB4_nA5_mB6_qA7_wB8_eA9_rB0_tA1_yB2_uA3_iB4_oA5_pB6_aA7_sB8_dA9_fB0_gA1_hB2_jA3_kB4_lA5_zB6_xA7_cB8_vA9_bB0_nA1_mB2_qA3_wB4_eA5_rB6_tA7_yB8_uA9_iB0_oA1_pB2_aA3_sB4_dA5_fB6_gA7_hB8_jA9_kB0_lA1_zB2_xA3_cB4_vA5_bB6_nA7_mB8_qA9_wB0_eA1_rB2_tA3_yB4_uA5_iB6_oA7_pB8_aA9_sB0_dA1_fB2_gA3_hB4_jA5_kB6_lA7_zB8_xA9_cB0_vA1_bB2_nA3_mB4_qA5_wB6_eA7_rB8_tA9_yB0_uA1_iB2_oA3_pB4_aA5_sB6_dA7_fB8_gA9_hB0_jA1_kB2_lA3_zB4__069" + }, + { + position = 70, + image = + { + value = "action.png", + imageType = "DYNAMIC" + }, + text = "qA1_wB2_eA3_rB4_tA5_yB6_uA7_iB8_oA9_pB0_aA1_sB2_dA3_fB4_gA5_hB6_jA7_kB8_lA9_zB0_xA1_cB2_vA3_bB4_nA5_mB6_qA7_wB8_eA9_rB0_tA1_yB2_uA3_iB4_oA5_pB6_aA7_sB8_dA9_fB0_gA1_hB2_jA3_kB4_lA5_zB6_xA7_cB8_vA9_bB0_nA1_mB2_qA3_wB4_eA5_rB6_tA7_yB8_uA9_iB0_oA1_pB2_aA3_sB4_dA5_fB6_gA7_hB8_jA9_kB0_lA1_zB2_xA3_cB4_vA5_bB6_nA7_mB8_qA9_wB0_eA1_rB2_tA3_yB4_uA5_iB6_oA7_pB8_aA9_sB0_dA1_fB2_gA3_hB4_jA5_kB6_lA7_zB8_xA9_cB0_vA1_bB2_nA3_mB4_qA5_wB6_eA7_rB8_tA9_yB0_uA1_iB2_oA3_pB4_aA5_sB6_dA7_fB8_gA9_hB0_jA1_kB2_lA3_zB4__070" + }, + { + position = 71, + image = + { + value = "action.png", + imageType = "DYNAMIC" + }, + text = "qA1_wB2_eA3_rB4_tA5_yB6_uA7_iB8_oA9_pB0_aA1_sB2_dA3_fB4_gA5_hB6_jA7_kB8_lA9_zB0_xA1_cB2_vA3_bB4_nA5_mB6_qA7_wB8_eA9_rB0_tA1_yB2_uA3_iB4_oA5_pB6_aA7_sB8_dA9_fB0_gA1_hB2_jA3_kB4_lA5_zB6_xA7_cB8_vA9_bB0_nA1_mB2_qA3_wB4_eA5_rB6_tA7_yB8_uA9_iB0_oA1_pB2_aA3_sB4_dA5_fB6_gA7_hB8_jA9_kB0_lA1_zB2_xA3_cB4_vA5_bB6_nA7_mB8_qA9_wB0_eA1_rB2_tA3_yB4_uA5_iB6_oA7_pB8_aA9_sB0_dA1_fB2_gA3_hB4_jA5_kB6_lA7_zB8_xA9_cB0_vA1_bB2_nA3_mB4_qA5_wB6_eA7_rB8_tA9_yB0_uA1_iB2_oA3_pB4_aA5_sB6_dA7_fB8_gA9_hB0_jA1_kB2_lA3_zB4__071" + }, + { + position = 72, + image = + { + value = "action.png", + imageType = "DYNAMIC" + }, + text = "qA1_wB2_eA3_rB4_tA5_yB6_uA7_iB8_oA9_pB0_aA1_sB2_dA3_fB4_gA5_hB6_jA7_kB8_lA9_zB0_xA1_cB2_vA3_bB4_nA5_mB6_qA7_wB8_eA9_rB0_tA1_yB2_uA3_iB4_oA5_pB6_aA7_sB8_dA9_fB0_gA1_hB2_jA3_kB4_lA5_zB6_xA7_cB8_vA9_bB0_nA1_mB2_qA3_wB4_eA5_rB6_tA7_yB8_uA9_iB0_oA1_pB2_aA3_sB4_dA5_fB6_gA7_hB8_jA9_kB0_lA1_zB2_xA3_cB4_vA5_bB6_nA7_mB8_qA9_wB0_eA1_rB2_tA3_yB4_uA5_iB6_oA7_pB8_aA9_sB0_dA1_fB2_gA3_hB4_jA5_kB6_lA7_zB8_xA9_cB0_vA1_bB2_nA3_mB4_qA5_wB6_eA7_rB8_tA9_yB0_uA1_iB2_oA3_pB4_aA5_sB6_dA7_fB8_gA9_hB0_jA1_kB2_lA3_zB4__072" + }, + { + position = 73, + image = + { + value = "action.png", + imageType = "DYNAMIC" + }, + text = "qA1_wB2_eA3_rB4_tA5_yB6_uA7_iB8_oA9_pB0_aA1_sB2_dA3_fB4_gA5_hB6_jA7_kB8_lA9_zB0_xA1_cB2_vA3_bB4_nA5_mB6_qA7_wB8_eA9_rB0_tA1_yB2_uA3_iB4_oA5_pB6_aA7_sB8_dA9_fB0_gA1_hB2_jA3_kB4_lA5_zB6_xA7_cB8_vA9_bB0_nA1_mB2_qA3_wB4_eA5_rB6_tA7_yB8_uA9_iB0_oA1_pB2_aA3_sB4_dA5_fB6_gA7_hB8_jA9_kB0_lA1_zB2_xA3_cB4_vA5_bB6_nA7_mB8_qA9_wB0_eA1_rB2_tA3_yB4_uA5_iB6_oA7_pB8_aA9_sB0_dA1_fB2_gA3_hB4_jA5_kB6_lA7_zB8_xA9_cB0_vA1_bB2_nA3_mB4_qA5_wB6_eA7_rB8_tA9_yB0_uA1_iB2_oA3_pB4_aA5_sB6_dA7_fB8_gA9_hB0_jA1_kB2_lA3_zB4__073" + }, + { + position = 74, + image = + { + value = "action.png", + imageType = "DYNAMIC" + }, + text = "qA1_wB2_eA3_rB4_tA5_yB6_uA7_iB8_oA9_pB0_aA1_sB2_dA3_fB4_gA5_hB6_jA7_kB8_lA9_zB0_xA1_cB2_vA3_bB4_nA5_mB6_qA7_wB8_eA9_rB0_tA1_yB2_uA3_iB4_oA5_pB6_aA7_sB8_dA9_fB0_gA1_hB2_jA3_kB4_lA5_zB6_xA7_cB8_vA9_bB0_nA1_mB2_qA3_wB4_eA5_rB6_tA7_yB8_uA9_iB0_oA1_pB2_aA3_sB4_dA5_fB6_gA7_hB8_jA9_kB0_lA1_zB2_xA3_cB4_vA5_bB6_nA7_mB8_qA9_wB0_eA1_rB2_tA3_yB4_uA5_iB6_oA7_pB8_aA9_sB0_dA1_fB2_gA3_hB4_jA5_kB6_lA7_zB8_xA9_cB0_vA1_bB2_nA3_mB4_qA5_wB6_eA7_rB8_tA9_yB0_uA1_iB2_oA3_pB4_aA5_sB6_dA7_fB8_gA9_hB0_jA1_kB2_lA3_zB4__074" + }, + { + position = 75, + image = + { + value = "action.png", + imageType = "DYNAMIC" + }, + text = "qA1_wB2_eA3_rB4_tA5_yB6_uA7_iB8_oA9_pB0_aA1_sB2_dA3_fB4_gA5_hB6_jA7_kB8_lA9_zB0_xA1_cB2_vA3_bB4_nA5_mB6_qA7_wB8_eA9_rB0_tA1_yB2_uA3_iB4_oA5_pB6_aA7_sB8_dA9_fB0_gA1_hB2_jA3_kB4_lA5_zB6_xA7_cB8_vA9_bB0_nA1_mB2_qA3_wB4_eA5_rB6_tA7_yB8_uA9_iB0_oA1_pB2_aA3_sB4_dA5_fB6_gA7_hB8_jA9_kB0_lA1_zB2_xA3_cB4_vA5_bB6_nA7_mB8_qA9_wB0_eA1_rB2_tA3_yB4_uA5_iB6_oA7_pB8_aA9_sB0_dA1_fB2_gA3_hB4_jA5_kB6_lA7_zB8_xA9_cB0_vA1_bB2_nA3_mB4_qA5_wB6_eA7_rB8_tA9_yB0_uA1_iB2_oA3_pB4_aA5_sB6_dA7_fB8_gA9_hB0_jA1_kB2_lA3_zB4__075" + }, + { + position = 76, + image = + { + value = "action.png", + imageType = "DYNAMIC" + }, + text = "qA1_wB2_eA3_rB4_tA5_yB6_uA7_iB8_oA9_pB0_aA1_sB2_dA3_fB4_gA5_hB6_jA7_kB8_lA9_zB0_xA1_cB2_vA3_bB4_nA5_mB6_qA7_wB8_eA9_rB0_tA1_yB2_uA3_iB4_oA5_pB6_aA7_sB8_dA9_fB0_gA1_hB2_jA3_kB4_lA5_zB6_xA7_cB8_vA9_bB0_nA1_mB2_qA3_wB4_eA5_rB6_tA7_yB8_uA9_iB0_oA1_pB2_aA3_sB4_dA5_fB6_gA7_hB8_jA9_kB0_lA1_zB2_xA3_cB4_vA5_bB6_nA7_mB8_qA9_wB0_eA1_rB2_tA3_yB4_uA5_iB6_oA7_pB8_aA9_sB0_dA1_fB2_gA3_hB4_jA5_kB6_lA7_zB8_xA9_cB0_vA1_bB2_nA3_mB4_qA5_wB6_eA7_rB8_tA9_yB0_uA1_iB2_oA3_pB4_aA5_sB6_dA7_fB8_gA9_hB0_jA1_kB2_lA3_zB4__076" + }, + { + position = 77, + image = + { + value = "action.png", + imageType = "DYNAMIC" + }, + text = "qA1_wB2_eA3_rB4_tA5_yB6_uA7_iB8_oA9_pB0_aA1_sB2_dA3_fB4_gA5_hB6_jA7_kB8_lA9_zB0_xA1_cB2_vA3_bB4_nA5_mB6_qA7_wB8_eA9_rB0_tA1_yB2_uA3_iB4_oA5_pB6_aA7_sB8_dA9_fB0_gA1_hB2_jA3_kB4_lA5_zB6_xA7_cB8_vA9_bB0_nA1_mB2_qA3_wB4_eA5_rB6_tA7_yB8_uA9_iB0_oA1_pB2_aA3_sB4_dA5_fB6_gA7_hB8_jA9_kB0_lA1_zB2_xA3_cB4_vA5_bB6_nA7_mB8_qA9_wB0_eA1_rB2_tA3_yB4_uA5_iB6_oA7_pB8_aA9_sB0_dA1_fB2_gA3_hB4_jA5_kB6_lA7_zB8_xA9_cB0_vA1_bB2_nA3_mB4_qA5_wB6_eA7_rB8_tA9_yB0_uA1_iB2_oA3_pB4_aA5_sB6_dA7_fB8_gA9_hB0_jA1_kB2_lA3_zB4__077" + }, + { + position = 78, + image = + { + value = "action.png", + imageType = "DYNAMIC" + }, + text = "qA1_wB2_eA3_rB4_tA5_yB6_uA7_iB8_oA9_pB0_aA1_sB2_dA3_fB4_gA5_hB6_jA7_kB8_lA9_zB0_xA1_cB2_vA3_bB4_nA5_mB6_qA7_wB8_eA9_rB0_tA1_yB2_uA3_iB4_oA5_pB6_aA7_sB8_dA9_fB0_gA1_hB2_jA3_kB4_lA5_zB6_xA7_cB8_vA9_bB0_nA1_mB2_qA3_wB4_eA5_rB6_tA7_yB8_uA9_iB0_oA1_pB2_aA3_sB4_dA5_fB6_gA7_hB8_jA9_kB0_lA1_zB2_xA3_cB4_vA5_bB6_nA7_mB8_qA9_wB0_eA1_rB2_tA3_yB4_uA5_iB6_oA7_pB8_aA9_sB0_dA1_fB2_gA3_hB4_jA5_kB6_lA7_zB8_xA9_cB0_vA1_bB2_nA3_mB4_qA5_wB6_eA7_rB8_tA9_yB0_uA1_iB2_oA3_pB4_aA5_sB6_dA7_fB8_gA9_hB0_jA1_kB2_lA3_zB4__078" + }, + { + position = 79, + image = + { + value = "action.png", + imageType = "DYNAMIC" + }, + text = "qA1_wB2_eA3_rB4_tA5_yB6_uA7_iB8_oA9_pB0_aA1_sB2_dA3_fB4_gA5_hB6_jA7_kB8_lA9_zB0_xA1_cB2_vA3_bB4_nA5_mB6_qA7_wB8_eA9_rB0_tA1_yB2_uA3_iB4_oA5_pB6_aA7_sB8_dA9_fB0_gA1_hB2_jA3_kB4_lA5_zB6_xA7_cB8_vA9_bB0_nA1_mB2_qA3_wB4_eA5_rB6_tA7_yB8_uA9_iB0_oA1_pB2_aA3_sB4_dA5_fB6_gA7_hB8_jA9_kB0_lA1_zB2_xA3_cB4_vA5_bB6_nA7_mB8_qA9_wB0_eA1_rB2_tA3_yB4_uA5_iB6_oA7_pB8_aA9_sB0_dA1_fB2_gA3_hB4_jA5_kB6_lA7_zB8_xA9_cB0_vA1_bB2_nA3_mB4_qA5_wB6_eA7_rB8_tA9_yB0_uA1_iB2_oA3_pB4_aA5_sB6_dA7_fB8_gA9_hB0_jA1_kB2_lA3_zB4__079" + }, + { + position = 80, + image = + { + value = "action.png", + imageType = "DYNAMIC" + }, + text = "qA1_wB2_eA3_rB4_tA5_yB6_uA7_iB8_oA9_pB0_aA1_sB2_dA3_fB4_gA5_hB6_jA7_kB8_lA9_zB0_xA1_cB2_vA3_bB4_nA5_mB6_qA7_wB8_eA9_rB0_tA1_yB2_uA3_iB4_oA5_pB6_aA7_sB8_dA9_fB0_gA1_hB2_jA3_kB4_lA5_zB6_xA7_cB8_vA9_bB0_nA1_mB2_qA3_wB4_eA5_rB6_tA7_yB8_uA9_iB0_oA1_pB2_aA3_sB4_dA5_fB6_gA7_hB8_jA9_kB0_lA1_zB2_xA3_cB4_vA5_bB6_nA7_mB8_qA9_wB0_eA1_rB2_tA3_yB4_uA5_iB6_oA7_pB8_aA9_sB0_dA1_fB2_gA3_hB4_jA5_kB6_lA7_zB8_xA9_cB0_vA1_bB2_nA3_mB4_qA5_wB6_eA7_rB8_tA9_yB0_uA1_iB2_oA3_pB4_aA5_sB6_dA7_fB8_gA9_hB0_jA1_kB2_lA3_zB4__080" + }, + { + position = 81, + image = + { + value = "action.png", + imageType = "DYNAMIC" + }, + text = "qA1_wB2_eA3_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B4__082" + }, + { + position = 83, + image = + { + value = "action.png", + imageType = "DYNAMIC" + }, + text = "qA1_wB2_eA3_rB4_tA5_yB6_uA7_iB8_oA9_pB0_aA1_sB2_dA3_fB4_gA5_hB6_jA7_kB8_lA9_zB0_xA1_cB2_vA3_bB4_nA5_mB6_qA7_wB8_eA9_rB0_tA1_yB2_uA3_iB4_oA5_pB6_aA7_sB8_dA9_fB0_gA1_hB2_jA3_kB4_lA5_zB6_xA7_cB8_vA9_bB0_nA1_mB2_qA3_wB4_eA5_rB6_tA7_yB8_uA9_iB0_oA1_pB2_aA3_sB4_dA5_fB6_gA7_hB8_jA9_kB0_lA1_zB2_xA3_cB4_vA5_bB6_nA7_mB8_qA9_wB0_eA1_rB2_tA3_yB4_uA5_iB6_oA7_pB8_aA9_sB0_dA1_fB2_gA3_hB4_jA5_kB6_lA7_zB8_xA9_cB0_vA1_bB2_nA3_mB4_qA5_wB6_eA7_rB8_tA9_yB0_uA1_iB2_oA3_pB4_aA5_sB6_dA7_fB8_gA9_hB0_jA1_kB2_lA3_zB4__083" + }, + { + position = 84, + image = + { + value = "action.png", + imageType = "DYNAMIC" + }, + text = "qA1_wB2_eA3_rB4_tA5_yB6_uA7_iB8_oA9_pB0_aA1_sB2_dA3_fB4_gA5_hB6_jA7_kB8_lA9_zB0_xA1_cB2_vA3_bB4_nA5_mB6_qA7_wB8_eA9_rB0_tA1_yB2_uA3_iB4_oA5_pB6_aA7_sB8_dA9_fB0_gA1_hB2_jA3_kB4_lA5_zB6_xA7_cB8_vA9_bB0_nA1_mB2_qA3_wB4_eA5_rB6_tA7_yB8_uA9_iB0_oA1_pB2_aA3_sB4_dA5_fB6_gA7_hB8_jA9_kB0_lA1_zB2_xA3_cB4_vA5_bB6_nA7_mB8_qA9_wB0_eA1_rB2_tA3_yB4_uA5_iB6_oA7_pB8_aA9_sB0_dA1_fB2_gA3_hB4_jA5_kB6_lA7_zB8_xA9_cB0_vA1_bB2_nA3_mB4_qA5_wB6_eA7_rB8_tA9_yB0_uA1_iB2_oA3_pB4_aA5_sB6_dA7_fB8_gA9_hB0_jA1_kB2_lA3_zB4__084" + }, + { + position = 85, + image = + { + value = "action.png", + imageType = "DYNAMIC" + }, + text = "qA1_wB2_eA3_rB4_tA5_yB6_uA7_iB8_oA9_pB0_aA1_sB2_dA3_fB4_gA5_hB6_jA7_kB8_lA9_zB0_xA1_cB2_vA3_bB4_nA5_mB6_qA7_wB8_eA9_rB0_tA1_yB2_uA3_iB4_oA5_pB6_aA7_sB8_dA9_fB0_gA1_hB2_jA3_kB4_lA5_zB6_xA7_cB8_vA9_bB0_nA1_mB2_qA3_wB4_eA5_rB6_tA7_yB8_uA9_iB0_oA1_pB2_aA3_sB4_dA5_fB6_gA7_hB8_jA9_kB0_lA1_zB2_xA3_cB4_vA5_bB6_nA7_mB8_qA9_wB0_eA1_rB2_tA3_yB4_uA5_iB6_oA7_pB8_aA9_sB0_dA1_fB2_gA3_hB4_jA5_kB6_lA7_zB8_xA9_cB0_vA1_bB2_nA3_mB4_qA5_wB6_eA7_rB8_tA9_yB0_uA1_iB2_oA3_pB4_aA5_sB6_dA7_fB8_gA9_hB0_jA1_kB2_lA3_zB4__085" + }, + { + position = 86, + image = + { + value = "action.png", + imageType = "DYNAMIC" + }, + text = "qA1_wB2_eA3_rB4_tA5_yB6_uA7_iB8_oA9_pB0_aA1_sB2_dA3_fB4_gA5_hB6_jA7_kB8_lA9_zB0_xA1_cB2_vA3_bB4_nA5_mB6_qA7_wB8_eA9_rB0_tA1_yB2_uA3_iB4_oA5_pB6_aA7_sB8_dA9_fB0_gA1_hB2_jA3_kB4_lA5_zB6_xA7_cB8_vA9_bB0_nA1_mB2_qA3_wB4_eA5_rB6_tA7_yB8_uA9_iB0_oA1_pB2_aA3_sB4_dA5_fB6_gA7_hB8_jA9_kB0_lA1_zB2_xA3_cB4_vA5_bB6_nA7_mB8_qA9_wB0_eA1_rB2_tA3_yB4_uA5_iB6_oA7_pB8_aA9_sB0_dA1_fB2_gA3_hB4_jA5_kB6_lA7_zB8_xA9_cB0_vA1_bB2_nA3_mB4_qA5_wB6_eA7_rB8_tA9_yB0_uA1_iB2_oA3_pB4_aA5_sB6_dA7_fB8_gA9_hB0_jA1_kB2_lA3_zB4__086" + }, + { + position = 87, + image = + { + value = "action.png", + imageType = "DYNAMIC" + }, + text = "qA1_wB2_eA3_rB4_tA5_yB6_uA7_iB8_oA9_pB0_aA1_sB2_dA3_fB4_gA5_hB6_jA7_kB8_lA9_zB0_xA1_cB2_vA3_bB4_nA5_mB6_qA7_wB8_eA9_rB0_tA1_yB2_uA3_iB4_oA5_pB6_aA7_sB8_dA9_fB0_gA1_hB2_jA3_kB4_lA5_zB6_xA7_cB8_vA9_bB0_nA1_mB2_qA3_wB4_eA5_rB6_tA7_yB8_uA9_iB0_oA1_pB2_aA3_sB4_dA5_fB6_gA7_hB8_jA9_kB0_lA1_zB2_xA3_cB4_vA5_bB6_nA7_mB8_qA9_wB0_eA1_rB2_tA3_yB4_uA5_iB6_oA7_pB8_aA9_sB0_dA1_fB2_gA3_hB4_jA5_kB6_lA7_zB8_xA9_cB0_vA1_bB2_nA3_mB4_qA5_wB6_eA7_rB8_tA9_yB0_uA1_iB2_oA3_pB4_aA5_sB6_dA7_fB8_gA9_hB0_jA1_kB2_lA3_zB4__087" + }, + { + position = 88, + image = + { + value = "action.png", + imageType = "DYNAMIC" + }, + text = "qA1_wB2_eA3_rB4_tA5_yB6_uA7_iB8_oA9_pB0_aA1_sB2_dA3_fB4_gA5_hB6_jA7_kB8_lA9_zB0_xA1_cB2_vA3_bB4_nA5_mB6_qA7_wB8_eA9_rB0_tA1_yB2_uA3_iB4_oA5_pB6_aA7_sB8_dA9_fB0_gA1_hB2_jA3_kB4_lA5_zB6_xA7_cB8_vA9_bB0_nA1_mB2_qA3_wB4_eA5_rB6_tA7_yB8_uA9_iB0_oA1_pB2_aA3_sB4_dA5_fB6_gA7_hB8_jA9_kB0_lA1_zB2_xA3_cB4_vA5_bB6_nA7_mB8_qA9_wB0_eA1_rB2_tA3_yB4_uA5_iB6_oA7_pB8_aA9_sB0_dA1_fB2_gA3_hB4_jA5_kB6_lA7_zB8_xA9_cB0_vA1_bB2_nA3_mB4_qA5_wB6_eA7_rB8_tA9_yB0_uA1_iB2_oA3_pB4_aA5_sB6_dA7_fB8_gA9_hB0_jA1_kB2_lA3_zB4__088" + }, + { + position = 89, + image = + { + value = "action.png", + imageType = "DYNAMIC" + }, + text = "qA1_wB2_eA3_rB4_tA5_yB6_uA7_iB8_oA9_pB0_aA1_sB2_dA3_fB4_gA5_hB6_jA7_kB8_lA9_zB0_xA1_cB2_vA3_bB4_nA5_mB6_qA7_wB8_eA9_rB0_tA1_yB2_uA3_iB4_oA5_pB6_aA7_sB8_dA9_fB0_gA1_hB2_jA3_kB4_lA5_zB6_xA7_cB8_vA9_bB0_nA1_mB2_qA3_wB4_eA5_rB6_tA7_yB8_uA9_iB0_oA1_pB2_aA3_sB4_dA5_fB6_gA7_hB8_jA9_kB0_lA1_zB2_xA3_cB4_vA5_bB6_nA7_mB8_qA9_wB0_eA1_rB2_tA3_yB4_uA5_iB6_oA7_pB8_aA9_sB0_dA1_fB2_gA3_hB4_jA5_kB6_lA7_zB8_xA9_cB0_vA1_bB2_nA3_mB4_qA5_wB6_eA7_rB8_tA9_yB0_uA1_iB2_oA3_pB4_aA5_sB6_dA7_fB8_gA9_hB0_jA1_kB2_lA3_zB4__089" + }, + { + position = 90, + image = + { + value = "action.png", + imageType = "DYNAMIC" + }, + text = "qA1_wB2_eA3_rB4_tA5_yB6_uA7_iB8_oA9_pB0_aA1_sB2_dA3_fB4_gA5_hB6_jA7_kB8_lA9_zB0_xA1_cB2_vA3_bB4_nA5_mB6_qA7_wB8_eA9_rB0_tA1_yB2_uA3_iB4_oA5_pB6_aA7_sB8_dA9_fB0_gA1_hB2_jA3_kB4_lA5_zB6_xA7_cB8_vA9_bB0_nA1_mB2_qA3_wB4_eA5_rB6_tA7_yB8_uA9_iB0_oA1_pB2_aA3_sB4_dA5_fB6_gA7_hB8_jA9_kB0_lA1_zB2_xA3_cB4_vA5_bB6_nA7_mB8_qA9_wB0_eA1_rB2_tA3_yB4_uA5_iB6_oA7_pB8_aA9_sB0_dA1_fB2_gA3_hB4_jA5_kB6_lA7_zB8_xA9_cB0_vA1_bB2_nA3_mB4_qA5_wB6_eA7_rB8_tA9_yB0_uA1_iB2_oA3_pB4_aA5_sB6_dA7_fB8_gA9_hB0_jA1_kB2_lA3_zB4__090" + }, + { + position = 91, + image = + { + value = "action.png", + imageType = "DYNAMIC" + }, + text = "qA1_wB2_eA3_rB4_tA5_yB6_uA7_iB8_oA9_pB0_aA1_sB2_dA3_fB4_gA5_hB6_jA7_kB8_lA9_zB0_xA1_cB2_vA3_bB4_nA5_mB6_qA7_wB8_eA9_rB0_tA1_yB2_uA3_iB4_oA5_pB6_aA7_sB8_dA9_fB0_gA1_hB2_jA3_kB4_lA5_zB6_xA7_cB8_vA9_bB0_nA1_mB2_qA3_wB4_eA5_rB6_tA7_yB8_uA9_iB0_oA1_pB2_aA3_sB4_dA5_fB6_gA7_hB8_jA9_kB0_lA1_zB2_xA3_cB4_vA5_bB6_nA7_mB8_qA9_wB0_eA1_rB2_tA3_yB4_uA5_iB6_oA7_pB8_aA9_sB0_dA1_fB2_gA3_hB4_jA5_kB6_lA7_zB8_xA9_cB0_vA1_bB2_nA3_mB4_qA5_wB6_eA7_rB8_tA9_yB0_uA1_iB2_oA3_pB4_aA5_sB6_dA7_fB8_gA9_hB0_jA1_kB2_lA3_zB4__091" + }, + { + position = 92, + image = + { + value = "action.png", + imageType = "DYNAMIC" + }, + text = "qA1_wB2_eA3_rB4_tA5_yB6_uA7_iB8_oA9_pB0_aA1_sB2_dA3_fB4_gA5_hB6_jA7_kB8_lA9_zB0_xA1_cB2_vA3_bB4_nA5_mB6_qA7_wB8_eA9_rB0_tA1_yB2_uA3_iB4_oA5_pB6_aA7_sB8_dA9_fB0_gA1_hB2_jA3_kB4_lA5_zB6_xA7_cB8_vA9_bB0_nA1_mB2_qA3_wB4_eA5_rB6_tA7_yB8_uA9_iB0_oA1_pB2_aA3_sB4_dA5_fB6_gA7_hB8_jA9_kB0_lA1_zB2_xA3_cB4_vA5_bB6_nA7_mB8_qA9_wB0_eA1_rB2_tA3_yB4_uA5_iB6_oA7_pB8_aA9_sB0_dA1_fB2_gA3_hB4_jA5_kB6_lA7_zB8_xA9_cB0_vA1_bB2_nA3_mB4_qA5_wB6_eA7_rB8_tA9_yB0_uA1_iB2_oA3_pB4_aA5_sB6_dA7_fB8_gA9_hB0_jA1_kB2_lA3_zB4__092" + }, + { + position = 93, + image = + { + value = "action.png", + imageType = "DYNAMIC" + }, + text = "qA1_wB2_eA3_rB4_tA5_yB6_uA7_iB8_oA9_pB0_aA1_sB2_dA3_fB4_gA5_hB6_jA7_kB8_lA9_zB0_xA1_cB2_vA3_bB4_nA5_mB6_qA7_wB8_eA9_rB0_tA1_yB2_uA3_iB4_oA5_pB6_aA7_sB8_dA9_fB0_gA1_hB2_jA3_kB4_lA5_zB6_xA7_cB8_vA9_bB0_nA1_mB2_qA3_wB4_eA5_rB6_tA7_yB8_uA9_iB0_oA1_pB2_aA3_sB4_dA5_fB6_gA7_hB8_jA9_kB0_lA1_zB2_xA3_cB4_vA5_bB6_nA7_mB8_qA9_wB0_eA1_rB2_tA3_yB4_uA5_iB6_oA7_pB8_aA9_sB0_dA1_fB2_gA3_hB4_jA5_kB6_lA7_zB8_xA9_cB0_vA1_bB2_nA3_mB4_qA5_wB6_eA7_rB8_tA9_yB0_uA1_iB2_oA3_pB4_aA5_sB6_dA7_fB8_gA9_hB0_jA1_kB2_lA3_zB4__093" + }, + { + position = 94, + image = + { + value = "action.png", + imageType = "DYNAMIC" + }, + text = "qA1_wB2_eA3_rB4_tA5_yB6_uA7_iB8_oA9_pB0_aA1_sB2_dA3_fB4_gA5_hB6_jA7_kB8_lA9_zB0_xA1_cB2_vA3_bB4_nA5_mB6_qA7_wB8_eA9_rB0_tA1_yB2_uA3_iB4_oA5_pB6_aA7_sB8_dA9_fB0_gA1_hB2_jA3_kB4_lA5_zB6_xA7_cB8_vA9_bB0_nA1_mB2_qA3_wB4_eA5_rB6_tA7_yB8_uA9_iB0_oA1_pB2_aA3_sB4_dA5_fB6_gA7_hB8_jA9_kB0_lA1_zB2_xA3_cB4_vA5_bB6_nA7_mB8_qA9_wB0_eA1_rB2_tA3_yB4_uA5_iB6_oA7_pB8_aA9_sB0_dA1_fB2_gA3_hB4_jA5_kB6_lA7_zB8_xA9_cB0_vA1_bB2_nA3_mB4_qA5_wB6_eA7_rB8_tA9_yB0_uA1_iB2_oA3_pB4_aA5_sB6_dA7_fB8_gA9_hB0_jA1_kB2_lA3_zB4__094" + }, + { + position = 95, + image = + { + value = "action.png", + imageType = "DYNAMIC" + }, + text = "qA1_wB2_eA3_rB4_tA5_yB6_uA7_iB8_oA9_pB0_aA1_sB2_dA3_fB4_gA5_hB6_jA7_kB8_lA9_zB0_xA1_cB2_vA3_bB4_nA5_mB6_qA7_wB8_eA9_rB0_tA1_yB2_uA3_iB4_oA5_pB6_aA7_sB8_dA9_fB0_gA1_hB2_jA3_kB4_lA5_zB6_xA7_cB8_vA9_bB0_nA1_mB2_qA3_wB4_eA5_rB6_tA7_yB8_uA9_iB0_oA1_pB2_aA3_sB4_dA5_fB6_gA7_hB8_jA9_kB0_lA1_zB2_xA3_cB4_vA5_bB6_nA7_mB8_qA9_wB0_eA1_rB2_tA3_yB4_uA5_iB6_oA7_pB8_aA9_sB0_dA1_fB2_gA3_hB4_jA5_kB6_lA7_zB8_xA9_cB0_vA1_bB2_nA3_mB4_qA5_wB6_eA7_rB8_tA9_yB0_uA1_iB2_oA3_pB4_aA5_sB6_dA7_fB8_gA9_hB0_jA1_kB2_lA3_zB4__095" + }, + { + position = 96, + image = + { + value = "action.png", + imageType = "DYNAMIC" + }, + text = "qA1_wB2_eA3_rB4_tA5_yB6_uA7_iB8_oA9_pB0_aA1_sB2_dA3_fB4_gA5_hB6_jA7_kB8_lA9_zB0_xA1_cB2_vA3_bB4_nA5_mB6_qA7_wB8_eA9_rB0_tA1_yB2_uA3_iB4_oA5_pB6_aA7_sB8_dA9_fB0_gA1_hB2_jA3_kB4_lA5_zB6_xA7_cB8_vA9_bB0_nA1_mB2_qA3_wB4_eA5_rB6_tA7_yB8_uA9_iB0_oA1_pB2_aA3_sB4_dA5_fB6_gA7_hB8_jA9_kB0_lA1_zB2_xA3_cB4_vA5_bB6_nA7_mB8_qA9_wB0_eA1_rB2_tA3_yB4_uA5_iB6_oA7_pB8_aA9_sB0_dA1_fB2_gA3_hB4_jA5_kB6_lA7_zB8_xA9_cB0_vA1_bB2_nA3_mB4_qA5_wB6_eA7_rB8_tA9_yB0_uA1_iB2_oA3_pB4_aA5_sB6_dA7_fB8_gA9_hB0_jA1_kB2_lA3_zB4__096" + }, + { + position = 97, + image = + { + value = "action.png", + imageType = "DYNAMIC" + }, + text = "qA1_wB2_eA3_rB4_tA5_yB6_uA7_iB8_oA9_pB0_aA1_sB2_dA3_fB4_gA5_hB6_jA7_kB8_lA9_zB0_xA1_cB2_vA3_bB4_nA5_mB6_qA7_wB8_eA9_rB0_tA1_yB2_uA3_iB4_oA5_pB6_aA7_sB8_dA9_fB0_gA1_hB2_jA3_kB4_lA5_zB6_xA7_cB8_vA9_bB0_nA1_mB2_qA3_wB4_eA5_rB6_tA7_yB8_uA9_iB0_oA1_pB2_aA3_sB4_dA5_fB6_gA7_hB8_jA9_kB0_lA1_zB2_xA3_cB4_vA5_bB6_nA7_mB8_qA9_wB0_eA1_rB2_tA3_yB4_uA5_iB6_oA7_pB8_aA9_sB0_dA1_fB2_gA3_hB4_jA5_kB6_lA7_zB8_xA9_cB0_vA1_bB2_nA3_mB4_qA5_wB6_eA7_rB8_tA9_yB0_uA1_iB2_oA3_pB4_aA5_sB6_dA7_fB8_gA9_hB0_jA1_kB2_lA3_zB4__097" + }, + { + position = 98, + image = + { + value = "action.png", + imageType = "DYNAMIC" + }, +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0_jA1_kB2_lA3_zB4__099" + }, + { + position = 100, + image = + { + value = "action.png", + imageType = "DYNAMIC" + }, + text = "qA1_wB2_eA3_rB4_tA5_yB6_uA7_iB8_oA9_pB0_aA1_sB2_dA3_fB4_gA5_hB6_jA7_kB8_lA9_zB0_xA1_cB2_vA3_bB4_nA5_mB6_qA7_wB8_eA9_rB0_tA1_yB2_uA3_iB4_oA5_pB6_aA7_sB8_dA9_fB0_gA1_hB2_jA3_kB4_lA5_zB6_xA7_cB8_vA9_bB0_nA1_mB2_qA3_wB4_eA5_rB6_tA7_yB8_uA9_iB0_oA1_pB2_aA3_sB4_dA5_fB6_gA7_hB8_jA9_kB0_lA1_zB2_xA3_cB4_vA5_bB6_nA7_mB8_qA9_wB0_eA1_rB2_tA3_yB4_uA5_iB6_oA7_pB8_aA9_sB0_dA1_fB2_gA3_hB4_jA5_kB6_lA7_zB8_xA9_cB0_vA1_bB2_nA3_mB4_qA5_wB6_eA7_rB8_tA9_yB0_uA1_iB2_oA3_pB4_aA5_sB6_dA7_fB8_gA9_hB0_jA1_kB2_lA3_zB4__100" + } + }, + + menuIcon = + { + value = "action.png", + imageType = "DYNAMIC" + }, + helpPrompt = + { + { + text = "qA1_wB2_eA3_rB4_tA5_yB6_uA7_iB8_oA9_pB0_aA1_sB2_dA3_fB4_gA5_hB6_jA7_kB8_lA9_zB0_xA1_cB2_vA3_bB4_nA5_mB6_qA7_wB8_eA9_rB0_tA1_yB2_uA3_iB4_oA5_pB6_aA7_sB8_dA9_fB0_gA1_hB2_jA3_kB4_lA5_zB6_xA7_cB8_vA9_bB0_nA1_mB2_qA3_wB4_eA5_rB6_tA7_yB8_uA9_iB0_oA1_pB2_aA3_sB4_dA5_fB6_gA7_hB8_jA9_kB0_lA1_zB2_xA3_cB4_vA5_bB6_nA7_mB8_qA9_wB0_eA1_rB2_tA3_yB4_uA5_iB6_oA7_pB8_aA9_sB0_dA1_fB2_gA3_hB4_jA5_kB6_lA7_zB8_xA9_cB0_vA1_b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= "qA1_wB2_eA3_rB4_tA5_yB6_uA7_iB8_oA9_pB0_aA1_sB2_dA3_fB4_gA5_hB6_jA7_kB8_lA9_zB0_xA1_cB2_vA3_bB4_nA5_mB6_qA7_wB8_eA9_rB0_tA1_yB2_uA3_iB4_oA5_pB6_aA7_sB8_dA9_fB0_gA1_hB2_jA3_kB4_lA5_zB6_xA7_cB8_vA9_bB0_nA1_mB2_qA3_wB4_eA5_rB6_tA7_yB8_uA9_iB0_oA1_pB2_aA3_sB4_dA5_fB6_gA7_hB8_jA9_kB0_lA1_zB2_xA3_cB4_vA5_bB6_nA7_mB8_qA9_wB0_eA1_rB2_tA3_yB4_uA5_iB6_oA7_pB8_aA9_sB0_dA1_fB2_gA3_hB4_jA5_kB6_lA7_zB8_xA9_cB0_vA1_bB2_nA3_mB4_qA5_wB6_eA7_rB8_tA9_yB0_uA1_iB2_oA3_pB4_aA5_sB6_dA7_fB8_gA9_hB0_jA1_kB2_lA3_zB4_xA5_", + keyboardProperties = + { + keyboardLayout = "QWERTY", + keypressMode = "SINGLE_KEYPRESS", + limitedCharacterList = + { + "q", + "q", + "q", + "q", + "q", + "q", + "q", + "q", + "q", + "q", + "q", + "q", + "q", + "q", + "q", + "q", + "q", + "q", + "q", + "q", + "q", + "q", + "q", + "q", + "q", + "q", + "q", + "q", + "q", + "q", + "q", + "q", + "q", + "q", + "q", + "q", + "q", + "q", + "q", + "q", + "q", + "q", + "q", + "q", + "q", + "q", + "q", + "q", + "q", + "q", + "q", + "q", + "q", + "q", + "q", + "q", + "q", + "q", + "q", + "q", + "q", + "q", + "q", + "q", + "q", + "q", + "q", + "q", + "q", + "q", + "q", + "q", + "q", + "q", + "q", + "q", + "q", + "q", + "q", + "q", + "q", + "q", + "q", + "q", + "q", + "q", + "q", + "q", + "q", + "q", + "q", + "q", + "q", + "q", + "q", + "q", + "q", + "q", + "q", + "q" + }, + + language = "EN-US", + autoCompleteText = "qA1_wB2_eA3_rB4_tA5_yB6_uA7_iB8_oA9_p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_mB2_qA3_wB4_eA5_rB6_tA7_yB8_uA9_iB0_oA1_pB2_aA3_sB4_dA5_fB6_gA7_hB8_jA9_kB0_lA1_zB2_xA3_cB4_vA5_bB6_nA7_mB8_qA9_wB0_eA1_rB2_tA3_yB4_uA5_iB6_oA7_pB8_aA9_sB0_dA1_fB2_gA3_hB4_jA5_kB6_lA7_zB8_xA9_cB0_vA1_bB2_nA3_mB4_qA5_wB6_eA7_rB8_tA9_yB0_uA1_iB2_oA3_pB4_aA5_sB6_dA7_fB8_gA9_hB0_jA1_kB2_lA3_zB4__099", + type = "TEXT" + }, + { + text = "qA1_wB2_eA3_rB4_tA5_yB6_uA7_iB8_oA9_pB0_aA1_sB2_dA3_fB4_gA5_hB6_jA7_kB8_lA9_zB0_xA1_cB2_vA3_bB4_nA5_mB6_qA7_wB8_eA9_rB0_tA1_yB2_uA3_iB4_oA5_pB6_aA7_sB8_dA9_fB0_gA1_hB2_jA3_kB4_lA5_zB6_xA7_cB8_vA9_bB0_nA1_mB2_qA3_wB4_eA5_rB6_tA7_yB8_uA9_iB0_oA1_pB2_aA3_sB4_dA5_fB6_gA7_hB8_jA9_kB0_lA1_zB2_xA3_cB4_vA5_bB6_nA7_mB8_qA9_wB0_eA1_rB2_tA3_yB4_uA5_iB6_oA7_pB8_aA9_sB0_dA1_fB2_gA3_hB4_jA5_kB6_lA7_zB8_xA9_cB0_vA1_bB2_nA3_mB4_qA5_wB6_eA7_rB8_tA9_yB0_uA1_iB2_oA3_pB4_aA5_sB6_dA7_fB8_gA9_hB0_jA1_kB2_lA3_zB4__100", + type = "TEXT" + } + } + }) + :Timeout(iTimeout) + :Do(function(_,data) + --hmi side: sending UI.SetGlobalProperties response + self.hmiConnection:SendResponse(data.id, data.method, "SUCCESS", {}) + end) + + + + --hmi side: expect UI.SetGlobalProperties request + EXPECT_HMICALL("UI.SetGlobalProperties", + { + menuTitle = "qA1_wB2_eA3_rB4_tA5_yB6_uA7_iB8_oA9_pB0_aA1_sB2_dA3_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A3_zB4__001" + }, + { + position = 2, + --[=[ TODO: update after resolving APPLINK-16052 + + image = + { + imageType = "DYNAMIC", + value = strAppFolder .. "action.png" + },]=] + text = "qA1_wB2_eA3_rB4_tA5_yB6_uA7_iB8_oA9_pB0_aA1_sB2_dA3_fB4_gA5_hB6_jA7_kB8_lA9_zB0_xA1_cB2_vA3_bB4_nA5_mB6_qA7_wB8_eA9_rB0_tA1_yB2_uA3_iB4_oA5_pB6_aA7_sB8_dA9_fB0_gA1_hB2_jA3_kB4_lA5_zB6_xA7_cB8_vA9_bB0_nA1_mB2_qA3_wB4_eA5_rB6_tA7_yB8_uA9_iB0_oA1_pB2_aA3_sB4_dA5_fB6_gA7_hB8_jA9_kB0_lA1_zB2_xA3_cB4_vA5_bB6_nA7_mB8_qA9_wB0_eA1_rB2_tA3_yB4_uA5_iB6_oA7_pB8_aA9_sB0_dA1_fB2_gA3_hB4_jA5_kB6_lA7_zB8_xA9_cB0_vA1_bB2_nA3_mB4_qA5_wB6_eA7_rB8_tA9_yB0_uA1_iB2_oA3_pB4_aA5_sB6_dA7_fB8_gA9_hB0_jA1_kB2_lA3_zB4__002" + }, + { + position = 3, + --[=[ TODO: update after resolving APPLINK-16052 + + image = + { + imageType = "DYNAMIC", + value = strAppFolder .. "action.png" + },]=] + text = "qA1_wB2_eA3_rB4_tA5_yB6_uA7_iB8_oA9_pB0_aA1_sB2_dA3_fB4_gA5_hB6_jA7_kB8_lA9_zB0_xA1_cB2_vA3_bB4_nA5_mB6_qA7_wB8_eA9_rB0_tA1_yB2_uA3_iB4_oA5_pB6_aA7_sB8_dA9_fB0_gA1_hB2_jA3_kB4_lA5_zB6_xA7_cB8_vA9_bB0_nA1_mB2_qA3_wB4_eA5_rB6_tA7_yB8_uA9_iB0_oA1_pB2_aA3_sB4_dA5_fB6_gA7_hB8_jA9_kB0_lA1_zB2_xA3_cB4_vA5_bB6_nA7_mB8_qA9_wB0_eA1_rB2_tA3_yB4_uA5_iB6_oA7_pB8_aA9_sB0_dA1_fB2_gA3_hB4_jA5_kB6_lA7_zB8_xA9_cB0_vA1_bB2_nA3_mB4_qA5_wB6_eA7_rB8_tA9_yB0_uA1_iB2_oA3_pB4_aA5_sB6_dA7_fB8_gA9_hB0_jA1_kB2_lA3_zB4__003" + }, + { + position = 4, + --[=[ TODO: update after resolving APPLINK-16052 + + image = + { + imageType = "DYNAMIC", + value = strAppFolder .. "action.png" + },]=] + text = "qA1_wB2_eA3_rB4_tA5_yB6_uA7_iB8_oA9_pB0_aA1_sB2_dA3_fB4_gA5_hB6_jA7_kB8_lA9_zB0_xA1_cB2_vA3_bB4_nA5_mB6_qA7_wB8_eA9_rB0_tA1_yB2_uA3_iB4_oA5_pB6_aA7_sB8_dA9_fB0_gA1_hB2_jA3_kB4_lA5_zB6_xA7_cB8_vA9_bB0_nA1_mB2_qA3_wB4_eA5_rB6_tA7_yB8_uA9_iB0_oA1_pB2_aA3_sB4_dA5_fB6_gA7_hB8_jA9_kB0_lA1_zB2_xA3_cB4_vA5_bB6_nA7_mB8_qA9_wB0_eA1_rB2_tA3_yB4_uA5_iB6_oA7_pB8_aA9_sB0_dA1_fB2_gA3_hB4_jA5_kB6_lA7_zB8_xA9_cB0_vA1_bB2_nA3_mB4_qA5_wB6_eA7_rB8_tA9_yB0_uA1_iB2_oA3_pB4_aA5_sB6_dA7_fB8_gA9_hB0_jA1_kB2_lA3_zB4__004" + }, + { + position = 5, + --[=[ TODO: update after resolving APPLINK-16052 + + image = + { + imageType = "DYNAMIC", + value = strAppFolder .. "action.png" + },]=] + text = "qA1_wB2_eA3_rB4_tA5_yB6_uA7_iB8_oA9_pB0_aA1_sB2_dA3_fB4_gA5_hB6_jA7_kB8_lA9_zB0_xA1_cB2_vA3_bB4_nA5_mB6_qA7_wB8_eA9_rB0_tA1_yB2_uA3_iB4_oA5_pB6_aA7_sB8_dA9_fB0_gA1_hB2_jA3_kB4_lA5_zB6_xA7_cB8_vA9_bB0_nA1_mB2_qA3_wB4_eA5_rB6_tA7_yB8_uA9_iB0_oA1_pB2_aA3_sB4_dA5_fB6_gA7_hB8_jA9_kB0_lA1_zB2_xA3_cB4_vA5_bB6_nA7_mB8_qA9_wB0_eA1_rB2_tA3_yB4_uA5_iB6_oA7_pB8_aA9_sB0_dA1_fB2_gA3_hB4_jA5_kB6_lA7_zB8_xA9_cB0_vA1_bB2_nA3_mB4_qA5_wB6_eA7_rB8_tA9_yB0_uA1_iB2_oA3_pB4_aA5_sB6_dA7_fB8_gA9_hB0_jA1_kB2_lA3_zB4__005" + }, + { + position = 6, + --[=[ TODO: update after resolving APPLINK-16052 + + image = + { + imageType = "DYNAMIC", + value = strAppFolder .. "action.png" + },]=] + text = "qA1_wB2_eA3_rB4_tA5_yB6_uA7_iB8_oA9_pB0_aA1_sB2_dA3_fB4_gA5_hB6_jA7_kB8_lA9_zB0_xA1_cB2_vA3_bB4_nA5_mB6_qA7_wB8_eA9_rB0_tA1_yB2_uA3_iB4_oA5_pB6_aA7_sB8_dA9_fB0_gA1_hB2_jA3_kB4_lA5_zB6_xA7_cB8_vA9_bB0_nA1_mB2_qA3_wB4_eA5_rB6_tA7_yB8_uA9_iB0_oA1_pB2_aA3_sB4_dA5_fB6_gA7_hB8_jA9_kB0_lA1_zB2_xA3_cB4_vA5_bB6_nA7_mB8_qA9_wB0_eA1_rB2_tA3_yB4_uA5_iB6_oA7_pB8_aA9_sB0_dA1_fB2_gA3_hB4_jA5_kB6_lA7_zB8_xA9_cB0_vA1_bB2_nA3_mB4_qA5_wB6_eA7_rB8_tA9_yB0_uA1_iB2_oA3_pB4_aA5_sB6_dA7_fB8_gA9_hB0_jA1_kB2_lA3_zB4__006" + }, + { + position = 7, + --[=[ TODO: update after resolving APPLINK-16052 + + image = + { + imageType = "DYNAMIC", + value = strAppFolder .. "action.png" + },]=] + text = "qA1_wB2_eA3_rB4_tA5_yB6_uA7_iB8_oA9_pB0_aA1_sB2_dA3_fB4_gA5_hB6_jA7_kB8_lA9_zB0_xA1_cB2_vA3_bB4_nA5_mB6_qA7_wB8_eA9_rB0_tA1_yB2_uA3_iB4_oA5_pB6_aA7_sB8_dA9_fB0_gA1_hB2_jA3_kB4_lA5_zB6_xA7_cB8_vA9_bB0_nA1_mB2_qA3_wB4_eA5_rB6_tA7_yB8_uA9_iB0_oA1_pB2_aA3_sB4_dA5_fB6_gA7_hB8_jA9_kB0_lA1_zB2_xA3_cB4_vA5_bB6_nA7_mB8_qA9_wB0_eA1_rB2_tA3_yB4_uA5_iB6_oA7_pB8_aA9_sB0_dA1_fB2_gA3_hB4_jA5_kB6_lA7_zB8_xA9_cB0_vA1_bB2_nA3_mB4_qA5_wB6_eA7_rB8_tA9_yB0_uA1_iB2_oA3_pB4_aA5_sB6_dA7_fB8_gA9_hB0_jA1_kB2_lA3_zB4__007" + }, + { + position = 8, + --[=[ TODO: update after resolving APPLINK-16052 + + image = + { + imageType = "DYNAMIC", + value = strAppFolder .. "action.png" + },]=] + text = "qA1_wB2_eA3_rB4_tA5_yB6_uA7_iB8_oA9_pB0_aA1_sB2_dA3_fB4_gA5_hB6_jA7_kB8_lA9_zB0_xA1_cB2_vA3_bB4_nA5_mB6_qA7_wB8_eA9_rB0_tA1_yB2_uA3_iB4_oA5_pB6_aA7_sB8_dA9_fB0_gA1_hB2_jA3_kB4_lA5_zB6_xA7_cB8_vA9_bB0_nA1_mB2_qA3_wB4_eA5_rB6_tA7_yB8_uA9_iB0_oA1_pB2_aA3_sB4_dA5_fB6_gA7_hB8_jA9_kB0_lA1_zB2_xA3_cB4_vA5_bB6_nA7_mB8_qA9_wB0_eA1_rB2_tA3_yB4_uA5_iB6_oA7_pB8_aA9_sB0_dA1_fB2_gA3_hB4_jA5_kB6_lA7_zB8_xA9_cB0_vA1_bB2_nA3_mB4_qA5_wB6_eA7_rB8_tA9_yB0_uA1_iB2_oA3_pB4_aA5_sB6_dA7_fB8_gA9_hB0_jA1_kB2_lA3_zB4__008" + }, + { + position = 9, + --[=[ TODO: update after resolving APPLINK-16052 + + image = + { + imageType = "DYNAMIC", + value = strAppFolder .. "action.png" + },]=] + text = "qA1_wB2_eA3_rB4_tA5_yB6_uA7_iB8_oA9_pB0_aA1_sB2_dA3_fB4_gA5_hB6_jA7_kB8_lA9_zB0_xA1_cB2_vA3_bB4_nA5_mB6_qA7_wB8_eA9_rB0_tA1_yB2_uA3_iB4_oA5_pB6_aA7_sB8_dA9_fB0_gA1_hB2_jA3_kB4_lA5_zB6_xA7_cB8_vA9_bB0_nA1_mB2_qA3_wB4_eA5_rB6_tA7_yB8_uA9_iB0_oA1_pB2_aA3_sB4_dA5_fB6_gA7_hB8_jA9_kB0_lA1_zB2_xA3_cB4_vA5_bB6_nA7_mB8_qA9_wB0_eA1_rB2_tA3_yB4_uA5_iB6_oA7_pB8_aA9_sB0_dA1_fB2_gA3_hB4_jA5_kB6_lA7_zB8_xA9_cB0_vA1_bB2_nA3_mB4_qA5_wB6_eA7_rB8_tA9_yB0_uA1_iB2_oA3_pB4_aA5_sB6_dA7_fB8_gA9_hB0_jA1_kB2_lA3_zB4__009" + }, + { + position = 10, + --[=[ TODO: update after resolving APPLINK-16052 + + image = + { + imageType = "DYNAMIC", + value = strAppFolder .. "action.png" + },]=] + text = "qA1_wB2_eA3_rB4_tA5_yB6_uA7_iB8_oA9_pB0_aA1_sB2_dA3_fB4_gA5_hB6_jA7_kB8_lA9_zB0_xA1_cB2_vA3_bB4_nA5_mB6_qA7_wB8_eA9_rB0_tA1_yB2_uA3_iB4_oA5_pB6_aA7_sB8_dA9_fB0_gA1_hB2_jA3_kB4_lA5_zB6_xA7_cB8_vA9_bB0_nA1_mB2_qA3_wB4_eA5_rB6_tA7_yB8_uA9_iB0_oA1_pB2_aA3_sB4_dA5_fB6_gA7_hB8_jA9_kB0_lA1_zB2_xA3_cB4_vA5_bB6_nA7_mB8_qA9_wB0_eA1_rB2_tA3_yB4_uA5_iB6_oA7_pB8_aA9_sB0_dA1_fB2_gA3_hB4_jA5_kB6_lA7_zB8_xA9_cB0_vA1_bB2_nA3_mB4_qA5_wB6_eA7_rB8_tA9_yB0_uA1_iB2_oA3_pB4_aA5_sB6_dA7_fB8_gA9_hB0_jA1_kB2_lA3_zB4__010" + }, + { + position = 11, + --[=[ TODO: update after resolving APPLINK-16052 + + image = + { + imageType = "DYNAMIC", + value = strAppFolder .. "action.png" + },]=] + text = "qA1_wB2_eA3_rB4_tA5_yB6_uA7_iB8_oA9_pB0_aA1_sB2_dA3_fB4_gA5_hB6_jA7_kB8_lA9_zB0_xA1_cB2_vA3_bB4_nA5_mB6_qA7_wB8_eA9_rB0_tA1_yB2_uA3_iB4_oA5_pB6_aA7_sB8_dA9_fB0_gA1_hB2_jA3_kB4_lA5_zB6_xA7_cB8_vA9_bB0_nA1_mB2_qA3_wB4_eA5_rB6_tA7_yB8_uA9_iB0_oA1_pB2_aA3_sB4_dA5_fB6_gA7_hB8_jA9_kB0_lA1_zB2_xA3_cB4_vA5_bB6_nA7_mB8_qA9_wB0_eA1_rB2_tA3_yB4_uA5_iB6_oA7_pB8_aA9_sB0_dA1_fB2_gA3_hB4_jA5_kB6_lA7_zB8_xA9_cB0_vA1_bB2_nA3_mB4_qA5_wB6_eA7_rB8_tA9_yB0_uA1_iB2_oA3_pB4_aA5_sB6_dA7_fB8_gA9_hB0_jA1_kB2_lA3_zB4__011" + }, + { + position = 12, + --[=[ TODO: update after resolving APPLINK-16052 + + image = + { + imageType = "DYNAMIC", + value = strAppFolder .. "action.png" + },]=] + text = "qA1_wB2_eA3_rB4_tA5_yB6_uA7_iB8_oA9_pB0_aA1_sB2_dA3_fB4_gA5_hB6_jA7_kB8_lA9_zB0_xA1_cB2_vA3_bB4_nA5_mB6_qA7_wB8_eA9_rB0_tA1_yB2_uA3_iB4_oA5_pB6_aA7_sB8_dA9_fB0_gA1_hB2_jA3_kB4_lA5_zB6_xA7_cB8_vA9_bB0_nA1_mB2_qA3_wB4_eA5_rB6_tA7_yB8_uA9_iB0_oA1_pB2_aA3_sB4_dA5_fB6_gA7_hB8_jA9_kB0_lA1_zB2_xA3_cB4_vA5_bB6_nA7_mB8_qA9_wB0_eA1_rB2_tA3_yB4_uA5_iB6_oA7_pB8_aA9_sB0_dA1_fB2_gA3_hB4_jA5_kB6_lA7_zB8_xA9_cB0_vA1_bB2_nA3_mB4_qA5_wB6_eA7_rB8_tA9_yB0_uA1_iB2_oA3_pB4_aA5_sB6_dA7_fB8_gA9_hB0_jA1_kB2_lA3_zB4__012" + }, + { + position = 13, + --[=[ TODO: update after resolving APPLINK-16052 + + image = + { + imageType = "DYNAMIC", + value = strAppFolder .. "action.png" + },]=] + text = "qA1_wB2_eA3_rB4_tA5_yB6_uA7_iB8_oA9_pB0_aA1_sB2_dA3_fB4_gA5_hB6_jA7_kB8_lA9_zB0_xA1_cB2_vA3_bB4_nA5_mB6_qA7_wB8_eA9_rB0_tA1_yB2_uA3_iB4_oA5_pB6_aA7_sB8_dA9_fB0_gA1_hB2_jA3_kB4_lA5_zB6_xA7_cB8_vA9_bB0_nA1_mB2_qA3_wB4_eA5_rB6_tA7_yB8_uA9_iB0_oA1_pB2_aA3_sB4_dA5_fB6_gA7_hB8_jA9_kB0_lA1_zB2_xA3_cB4_vA5_bB6_nA7_mB8_qA9_wB0_eA1_rB2_tA3_yB4_uA5_iB6_oA7_pB8_aA9_sB0_dA1_fB2_gA3_hB4_jA5_kB6_lA7_zB8_xA9_cB0_vA1_bB2_nA3_mB4_qA5_wB6_eA7_rB8_tA9_yB0_uA1_iB2_oA3_pB4_aA5_sB6_dA7_fB8_gA9_hB0_jA1_kB2_lA3_zB4__013" + }, + { + position = 14, + --[=[ TODO: update after resolving APPLINK-16052 + + image = + { + imageType = "DYNAMIC", + value = strAppFolder .. "action.png" + },]=] + text = "qA1_wB2_eA3_rB4_tA5_yB6_uA7_iB8_oA9_pB0_aA1_sB2_dA3_fB4_gA5_hB6_jA7_kB8_lA9_zB0_xA1_cB2_vA3_bB4_nA5_mB6_qA7_wB8_eA9_rB0_tA1_yB2_uA3_iB4_oA5_pB6_aA7_sB8_dA9_fB0_gA1_hB2_jA3_kB4_lA5_zB6_xA7_cB8_vA9_bB0_nA1_mB2_qA3_wB4_eA5_rB6_tA7_yB8_uA9_iB0_oA1_pB2_aA3_sB4_dA5_fB6_gA7_hB8_jA9_kB0_lA1_zB2_xA3_cB4_vA5_bB6_nA7_mB8_qA9_wB0_eA1_rB2_tA3_yB4_uA5_iB6_oA7_pB8_aA9_sB0_dA1_fB2_gA3_hB4_jA5_kB6_lA7_zB8_xA9_cB0_vA1_bB2_nA3_mB4_qA5_wB6_eA7_rB8_tA9_yB0_uA1_iB2_oA3_pB4_aA5_sB6_dA7_fB8_gA9_hB0_jA1_kB2_lA3_zB4__014" + }, + { + position = 15, + --[=[ TODO: update after resolving APPLINK-16052 + + image = + { + imageType = "DYNAMIC", + value = strAppFolder .. "action.png" + },]=] + text = "qA1_wB2_eA3_rB4_tA5_yB6_uA7_iB8_oA9_pB0_aA1_sB2_dA3_fB4_gA5_hB6_jA7_kB8_lA9_zB0_xA1_cB2_vA3_bB4_nA5_mB6_qA7_wB8_eA9_rB0_tA1_yB2_uA3_iB4_oA5_pB6_aA7_sB8_dA9_fB0_gA1_hB2_jA3_kB4_lA5_zB6_xA7_cB8_vA9_bB0_nA1_mB2_qA3_wB4_eA5_rB6_tA7_yB8_uA9_iB0_oA1_pB2_aA3_sB4_dA5_fB6_gA7_hB8_jA9_kB0_lA1_zB2_xA3_cB4_vA5_bB6_nA7_mB8_qA9_wB0_eA1_rB2_tA3_yB4_uA5_iB6_oA7_pB8_aA9_sB0_dA1_fB2_gA3_hB4_jA5_kB6_lA7_zB8_xA9_cB0_vA1_bB2_nA3_mB4_qA5_wB6_eA7_rB8_tA9_yB0_uA1_iB2_oA3_pB4_aA5_sB6_dA7_fB8_gA9_hB0_jA1_kB2_lA3_zB4__015" + }, + { + position = 16, + --[=[ TODO: update after resolving APPLINK-16052 + + image = + { + imageType = "DYNAMIC", + value = strAppFolder .. "action.png" + },]=] + text = "qA1_wB2_eA3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A5_sB6_dA7_fB8_gA9_hB0_jA1_kB2_lA3_zB4__017" + }, + { + position = 18, + --[=[ TODO: update after resolving APPLINK-16052 + + image = + { + imageType = "DYNAMIC", + value = strAppFolder .. "action.png" + },]=] + text = "qA1_wB2_eA3_rB4_tA5_yB6_uA7_iB8_oA9_pB0_aA1_sB2_dA3_fB4_gA5_hB6_jA7_kB8_lA9_zB0_xA1_cB2_vA3_bB4_nA5_mB6_qA7_wB8_eA9_rB0_tA1_yB2_uA3_iB4_oA5_pB6_aA7_sB8_dA9_fB0_gA1_hB2_jA3_kB4_lA5_zB6_xA7_cB8_vA9_bB0_nA1_mB2_qA3_wB4_eA5_rB6_tA7_yB8_uA9_iB0_oA1_pB2_aA3_sB4_dA5_fB6_gA7_hB8_jA9_kB0_lA1_zB2_xA3_cB4_vA5_bB6_nA7_mB8_qA9_wB0_eA1_rB2_tA3_yB4_uA5_iB6_oA7_pB8_aA9_sB0_dA1_fB2_gA3_hB4_jA5_kB6_lA7_zB8_xA9_cB0_vA1_bB2_nA3_mB4_qA5_wB6_eA7_rB8_tA9_yB0_uA1_iB2_oA3_pB4_aA5_sB6_dA7_fB8_gA9_hB0_jA1_kB2_lA3_zB4__018" + }, + { + position = 19, + --[=[ TODO: update after resolving APPLINK-16052 + + image = + { + imageType = "DYNAMIC", + value = strAppFolder .. "action.png" + },]=] + text = "qA1_wB2_eA3_rB4_tA5_yB6_uA7_iB8_oA9_pB0_aA1_sB2_dA3_fB4_gA5_hB6_jA7_kB8_lA9_zB0_xA1_cB2_vA3_bB4_nA5_mB6_qA7_wB8_eA9_rB0_tA1_yB2_uA3_iB4_oA5_pB6_aA7_sB8_dA9_fB0_gA1_hB2_jA3_kB4_lA5_zB6_xA7_cB8_vA9_bB0_nA1_mB2_qA3_wB4_eA5_rB6_tA7_yB8_uA9_iB0_oA1_pB2_aA3_sB4_dA5_fB6_gA7_hB8_jA9_kB0_lA1_zB2_xA3_cB4_vA5_bB6_nA7_mB8_qA9_wB0_eA1_rB2_tA3_yB4_uA5_iB6_oA7_pB8_aA9_sB0_dA1_fB2_gA3_hB4_jA5_kB6_lA7_zB8_xA9_cB0_vA1_bB2_nA3_mB4_qA5_wB6_eA7_rB8_tA9_yB0_uA1_iB2_oA3_pB4_aA5_sB6_dA7_fB8_gA9_hB0_jA1_kB2_lA3_zB4__019" + }, + { + position = 20, + --[=[ TODO: update after resolving APPLINK-16052 + + image = + { + imageType = "DYNAMIC", + value = strAppFolder .. "action.png" + },]=] + text = "qA1_wB2_eA3_rB4_tA5_yB6_uA7_iB8_oA9_pB0_aA1_sB2_dA3_fB4_gA5_hB6_jA7_kB8_lA9_zB0_xA1_cB2_vA3_bB4_nA5_mB6_qA7_wB8_eA9_rB0_tA1_yB2_uA3_iB4_oA5_pB6_aA7_sB8_dA9_fB0_gA1_hB2_jA3_kB4_lA5_zB6_xA7_cB8_vA9_bB0_nA1_mB2_qA3_wB4_eA5_rB6_tA7_yB8_uA9_iB0_oA1_pB2_aA3_sB4_dA5_fB6_gA7_hB8_jA9_kB0_lA1_zB2_xA3_cB4_vA5_bB6_nA7_mB8_qA9_wB0_eA1_rB2_tA3_yB4_uA5_iB6_oA7_pB8_aA9_sB0_dA1_fB2_gA3_hB4_jA5_kB6_lA7_zB8_xA9_cB0_vA1_bB2_nA3_mB4_qA5_wB6_eA7_rB8_tA9_yB0_uA1_iB2_oA3_pB4_aA5_sB6_dA7_fB8_gA9_hB0_jA1_kB2_lA3_zB4__020" + }, + { + position = 21, + --[=[ TODO: update after resolving APPLINK-16052 + + image = + { + imageType = "DYNAMIC", + value = strAppFolder .. "action.png" + },]=] + text = "qA1_wB2_eA3_rB4_tA5_yB6_uA7_iB8_oA9_pB0_aA1_sB2_dA3_fB4_gA5_hB6_jA7_kB8_lA9_zB0_xA1_cB2_vA3_bB4_nA5_mB6_qA7_wB8_eA9_rB0_tA1_yB2_uA3_iB4_oA5_pB6_aA7_sB8_dA9_fB0_gA1_hB2_jA3_kB4_lA5_zB6_xA7_cB8_vA9_bB0_nA1_mB2_qA3_wB4_eA5_rB6_tA7_yB8_uA9_iB0_oA1_pB2_aA3_sB4_dA5_fB6_gA7_hB8_jA9_kB0_lA1_zB2_xA3_cB4_vA5_bB6_nA7_mB8_qA9_wB0_eA1_rB2_tA3_yB4_uA5_iB6_oA7_pB8_aA9_sB0_dA1_fB2_gA3_hB4_jA5_kB6_lA7_zB8_xA9_cB0_vA1_bB2_nA3_mB4_qA5_wB6_eA7_rB8_tA9_yB0_uA1_iB2_oA3_pB4_aA5_sB6_dA7_fB8_gA9_hB0_jA1_kB2_lA3_zB4__021" + }, + { + position = 22, + --[=[ TODO: update after resolving APPLINK-16052 + + image = + { + imageType = "DYNAMIC", + value = strAppFolder .. "action.png" + },]=] + text = "qA1_wB2_eA3_rB4_tA5_yB6_uA7_iB8_oA9_pB0_aA1_sB2_dA3_fB4_gA5_hB6_jA7_kB8_lA9_zB0_xA1_cB2_vA3_bB4_nA5_mB6_qA7_wB8_eA9_rB0_tA1_yB2_uA3_iB4_oA5_pB6_aA7_sB8_dA9_fB0_gA1_hB2_jA3_kB4_lA5_zB6_xA7_cB8_vA9_bB0_nA1_mB2_qA3_wB4_eA5_rB6_tA7_yB8_uA9_iB0_oA1_pB2_aA3_sB4_dA5_fB6_gA7_hB8_jA9_kB0_lA1_zB2_xA3_cB4_vA5_bB6_nA7_mB8_qA9_wB0_eA1_rB2_tA3_yB4_uA5_iB6_oA7_pB8_aA9_sB0_dA1_fB2_gA3_hB4_jA5_kB6_lA7_zB8_xA9_cB0_vA1_bB2_nA3_mB4_qA5_wB6_eA7_rB8_tA9_yB0_uA1_iB2_oA3_pB4_aA5_sB6_dA7_fB8_gA9_hB0_jA1_kB2_lA3_zB4__022" + }, + { + position = 23, + --[=[ TODO: update after resolving APPLINK-16052 + + image = + { + imageType = "DYNAMIC", + value = strAppFolder .. "action.png" + },]=] + text = "qA1_wB2_eA3_rB4_tA5_yB6_uA7_iB8_oA9_pB0_aA1_sB2_dA3_fB4_gA5_hB6_jA7_kB8_lA9_zB0_xA1_cB2_vA3_bB4_nA5_mB6_qA7_wB8_eA9_rB0_tA1_yB2_uA3_iB4_oA5_pB6_aA7_sB8_dA9_fB0_gA1_hB2_jA3_kB4_lA5_zB6_xA7_cB8_vA9_bB0_nA1_mB2_qA3_wB4_eA5_rB6_tA7_yB8_uA9_iB0_oA1_pB2_aA3_sB4_dA5_fB6_gA7_hB8_jA9_kB0_lA1_zB2_xA3_cB4_vA5_bB6_nA7_mB8_qA9_wB0_eA1_rB2_tA3_yB4_uA5_iB6_oA7_pB8_aA9_sB0_dA1_fB2_gA3_hB4_jA5_kB6_lA7_zB8_xA9_cB0_vA1_bB2_nA3_mB4_qA5_wB6_eA7_rB8_tA9_yB0_uA1_iB2_oA3_pB4_aA5_sB6_dA7_fB8_gA9_hB0_jA1_kB2_lA3_zB4__023" + }, + { + position = 24, + --[=[ TODO: update after resolving APPLINK-16052 + + image = + { + imageType = "DYNAMIC", + value = strAppFolder .. "action.png" + },]=] + text = "qA1_wB2_eA3_rB4_tA5_yB6_uA7_iB8_oA9_pB0_aA1_sB2_dA3_fB4_gA5_hB6_jA7_kB8_lA9_zB0_xA1_cB2_vA3_bB4_nA5_mB6_qA7_wB8_eA9_rB0_tA1_yB2_uA3_iB4_oA5_pB6_aA7_sB8_dA9_fB0_gA1_hB2_jA3_kB4_lA5_zB6_xA7_cB8_vA9_bB0_nA1_mB2_qA3_wB4_eA5_rB6_tA7_yB8_uA9_iB0_oA1_pB2_aA3_sB4_dA5_fB6_gA7_hB8_jA9_kB0_lA1_zB2_xA3_cB4_vA5_bB6_nA7_mB8_qA9_wB0_eA1_rB2_tA3_yB4_uA5_iB6_oA7_pB8_aA9_sB0_dA1_fB2_gA3_hB4_jA5_kB6_lA7_zB8_xA9_cB0_vA1_bB2_nA3_mB4_qA5_wB6_eA7_rB8_tA9_yB0_uA1_iB2_oA3_pB4_aA5_sB6_dA7_fB8_gA9_hB0_jA1_kB2_lA3_zB4__024" + }, + { + position = 25, + --[=[ TODO: update after resolving APPLINK-16052 + + image = + { + imageType = "DYNAMIC", + value = strAppFolder .. "action.png" + },]=] + text = "qA1_wB2_eA3_rB4_tA5_yB6_uA7_iB8_oA9_pB0_aA1_sB2_dA3_fB4_gA5_hB6_jA7_kB8_lA9_zB0_xA1_cB2_vA3_bB4_nA5_mB6_qA7_wB8_eA9_rB0_tA1_yB2_uA3_iB4_oA5_pB6_aA7_sB8_dA9_fB0_gA1_hB2_jA3_kB4_lA5_zB6_xA7_cB8_vA9_bB0_nA1_mB2_qA3_wB4_eA5_rB6_tA7_yB8_uA9_iB0_oA1_pB2_aA3_sB4_dA5_fB6_gA7_hB8_jA9_kB0_lA1_zB2_xA3_cB4_vA5_bB6_nA7_mB8_qA9_wB0_eA1_rB2_tA3_yB4_uA5_iB6_oA7_pB8_aA9_sB0_dA1_fB2_gA3_hB4_jA5_kB6_lA7_zB8_xA9_cB0_vA1_bB2_nA3_mB4_qA5_wB6_eA7_rB8_tA9_yB0_uA1_iB2_oA3_pB4_aA5_sB6_dA7_fB8_gA9_hB0_jA1_kB2_lA3_zB4__025" + }, + { + position = 26, + --[=[ TODO: update after resolving APPLINK-16052 + + image = + { + imageType = "DYNAMIC", + value = strAppFolder .. "action.png" + },]=] + text = "qA1_wB2_eA3_rB4_tA5_yB6_uA7_iB8_oA9_pB0_aA1_sB2_dA3_fB4_gA5_hB6_jA7_kB8_lA9_zB0_xA1_cB2_vA3_bB4_nA5_mB6_qA7_wB8_eA9_rB0_tA1_yB2_uA3_iB4_oA5_pB6_aA7_sB8_dA9_fB0_gA1_hB2_jA3_kB4_lA5_zB6_xA7_cB8_vA9_bB0_nA1_mB2_qA3_wB4_eA5_rB6_tA7_yB8_uA9_iB0_oA1_pB2_aA3_sB4_dA5_fB6_gA7_hB8_jA9_kB0_lA1_zB2_xA3_cB4_vA5_bB6_nA7_mB8_qA9_wB0_eA1_rB2_tA3_yB4_uA5_iB6_oA7_pB8_aA9_sB0_dA1_fB2_gA3_hB4_jA5_kB6_lA7_zB8_xA9_cB0_vA1_bB2_nA3_mB4_qA5_wB6_eA7_rB8_tA9_yB0_uA1_iB2_oA3_pB4_aA5_sB6_dA7_fB8_gA9_hB0_jA1_kB2_lA3_zB4__026" + }, + { + position = 27, + --[=[ TODO: update after resolving APPLINK-16052 + + image = + { + imageType = "DYNAMIC", + value = strAppFolder .. "action.png" + },]=] + text = "qA1_wB2_eA3_rB4_tA5_yB6_uA7_iB8_oA9_pB0_aA1_sB2_dA3_fB4_gA5_hB6_jA7_kB8_lA9_zB0_xA1_cB2_vA3_bB4_nA5_mB6_qA7_wB8_eA9_rB0_tA1_yB2_uA3_iB4_oA5_pB6_aA7_sB8_dA9_fB0_gA1_hB2_jA3_kB4_lA5_zB6_xA7_cB8_vA9_bB0_nA1_mB2_qA3_wB4_eA5_rB6_tA7_yB8_uA9_iB0_oA1_pB2_aA3_sB4_dA5_fB6_gA7_hB8_jA9_kB0_lA1_zB2_xA3_cB4_vA5_bB6_nA7_mB8_qA9_wB0_eA1_rB2_tA3_yB4_uA5_iB6_oA7_pB8_aA9_sB0_dA1_fB2_gA3_hB4_jA5_kB6_lA7_zB8_xA9_cB0_vA1_bB2_nA3_mB4_qA5_wB6_eA7_rB8_tA9_yB0_uA1_iB2_oA3_pB4_aA5_sB6_dA7_fB8_gA9_hB0_jA1_kB2_lA3_zB4__027" + }, + { + position = 28, + --[=[ TODO: update after resolving APPLINK-16052 + + image = + { + imageType = "DYNAMIC", + value = strAppFolder .. "action.png" + },]=] + text = "qA1_wB2_eA3_rB4_tA5_yB6_uA7_iB8_oA9_pB0_aA1_sB2_dA3_fB4_gA5_hB6_jA7_kB8_lA9_zB0_xA1_cB2_vA3_bB4_nA5_mB6_qA7_wB8_eA9_rB0_tA1_yB2_uA3_iB4_oA5_pB6_aA7_sB8_dA9_fB0_gA1_hB2_jA3_kB4_lA5_zB6_xA7_cB8_vA9_bB0_nA1_mB2_qA3_wB4_eA5_rB6_tA7_yB8_uA9_iB0_oA1_pB2_aA3_sB4_dA5_fB6_gA7_hB8_jA9_kB0_lA1_zB2_xA3_cB4_vA5_bB6_nA7_mB8_qA9_wB0_eA1_rB2_tA3_yB4_uA5_iB6_oA7_pB8_aA9_sB0_dA1_fB2_gA3_hB4_jA5_kB6_lA7_zB8_xA9_cB0_vA1_bB2_nA3_mB4_qA5_wB6_eA7_rB8_tA9_yB0_uA1_iB2_oA3_pB4_aA5_sB6_dA7_fB8_gA9_hB0_jA1_kB2_lA3_zB4__028" + }, + { + position = 29, + --[=[ TODO: update after resolving APPLINK-16052 + + image = + { + imageType = "DYNAMIC", + value = strAppFolder .. "action.png" + },]=] + text = "qA1_wB2_eA3_rB4_tA5_yB6_uA7_iB8_oA9_pB0_aA1_sB2_dA3_fB4_gA5_hB6_jA7_kB8_lA9_zB0_xA1_cB2_vA3_bB4_nA5_mB6_qA7_wB8_eA9_rB0_tA1_yB2_uA3_iB4_oA5_pB6_aA7_sB8_dA9_fB0_gA1_hB2_jA3_kB4_lA5_zB6_xA7_cB8_vA9_bB0_nA1_mB2_qA3_wB4_eA5_rB6_tA7_yB8_uA9_iB0_oA1_pB2_aA3_sB4_dA5_fB6_gA7_hB8_jA9_kB0_lA1_zB2_xA3_cB4_vA5_bB6_nA7_mB8_qA9_wB0_eA1_rB2_tA3_yB4_uA5_iB6_oA7_pB8_aA9_sB0_dA1_fB2_gA3_hB4_jA5_kB6_lA7_zB8_xA9_cB0_vA1_bB2_nA3_mB4_qA5_wB6_eA7_rB8_tA9_yB0_uA1_iB2_oA3_pB4_aA5_sB6_dA7_fB8_gA9_hB0_jA1_kB2_lA3_zB4__029" + }, + { + position = 30, + --[=[ TODO: update after resolving APPLINK-16052 + + image = + { + imageType = "DYNAMIC", + value = strAppFolder .. "action.png" + },]=] + text = "qA1_wB2_eA3_rB4_tA5_yB6_uA7_iB8_oA9_pB0_aA1_sB2_dA3_fB4_gA5_hB6_jA7_kB8_lA9_zB0_xA1_cB2_vA3_bB4_nA5_mB6_qA7_wB8_eA9_rB0_tA1_yB2_uA3_iB4_oA5_pB6_aA7_sB8_dA9_fB0_gA1_hB2_jA3_kB4_lA5_zB6_xA7_cB8_vA9_bB0_nA1_mB2_qA3_wB4_eA5_rB6_tA7_yB8_uA9_iB0_oA1_pB2_aA3_sB4_dA5_fB6_gA7_hB8_jA9_kB0_lA1_zB2_xA3_cB4_vA5_bB6_nA7_mB8_qA9_wB0_eA1_rB2_tA3_yB4_uA5_iB6_oA7_pB8_aA9_sB0_dA1_fB2_gA3_hB4_jA5_kB6_lA7_zB8_xA9_cB0_vA1_bB2_nA3_mB4_qA5_wB6_eA7_rB8_tA9_yB0_uA1_iB2_oA3_pB4_aA5_sB6_dA7_fB8_gA9_hB0_jA1_kB2_lA3_zB4__030" + }, + { + position = 31, + --[=[ TODO: update after resolving APPLINK-16052 + + image = + { + imageType = "DYNAMIC", + value = strAppFolder .. "action.png" + },]=] + text = "qA1_wB2_eA3_rB4_tA5_yB6_uA7_iB8_oA9_pB0_aA1_sB2_dA3_fB4_gA5_hB6_jA7_kB8_lA9_zB0_xA1_cB2_vA3_bB4_nA5_mB6_qA7_wB8_eA9_rB0_tA1_yB2_uA3_iB4_oA5_pB6_aA7_sB8_dA9_fB0_gA1_hB2_jA3_kB4_lA5_zB6_xA7_cB8_vA9_bB0_nA1_mB2_qA3_wB4_eA5_rB6_tA7_yB8_uA9_iB0_oA1_pB2_aA3_sB4_dA5_fB6_gA7_hB8_jA9_kB0_lA1_zB2_xA3_cB4_vA5_bB6_nA7_mB8_qA9_wB0_eA1_rB2_tA3_yB4_uA5_iB6_oA7_pB8_aA9_sB0_dA1_fB2_gA3_hB4_jA5_kB6_lA7_zB8_xA9_cB0_vA1_bB2_nA3_mB4_qA5_wB6_eA7_rB8_tA9_yB0_uA1_iB2_oA3_pB4_aA5_sB6_dA7_fB8_gA9_hB0_jA1_kB2_lA3_zB4__031" + }, + { + position = 32, + --[=[ TODO: update after resolving APPLINK-16052 + + image = + { + imageType = "DYNAMIC", + value = strAppFolder .. "action.png" + },]=] + text = "qA1_wB2_eA3_rB4_tA5_yB6_uA7_iB8_oA9_pB0_aA1_sB2_dA3_fB4_gA5_hB6_jA7_kB8_lA9_zB0_xA1_cB2_vA3_bB4_nA5_mB6_qA7_wB8_eA9_rB0_tA1_yB2_uA3_iB4_oA5_pB6_aA7_sB8_dA9_fB0_gA1_hB2_jA3_kB4_lA5_zB6_xA7_cB8_vA9_bB0_nA1_mB2_qA3_wB4_eA5_rB6_tA7_yB8_uA9_iB0_oA1_pB2_aA3_sB4_dA5_fB6_gA7_hB8_jA9_kB0_lA1_zB2_xA3_cB4_vA5_bB6_nA7_mB8_qA9_wB0_eA1_rB2_tA3_yB4_uA5_iB6_oA7_pB8_aA9_sB0_dA1_fB2_gA3_hB4_jA5_kB6_lA7_zB8_xA9_cB0_vA1_bB2_nA3_mB4_qA5_wB6_eA7_rB8_tA9_yB0_uA1_iB2_oA3_pB4_aA5_sB6_dA7_fB8_gA9_hB0_jA1_kB2_lA3_zB4__032" + }, + { + position = 33, + --[=[ TODO: update after resolving APPLINK-16052 + + image = + { + imageType = "DYNAMIC", + value = strAppFolder .. "action.png" + },]=] + text = "qA1_wB2_eA3_rB4_tA5_yB6_uA7_iB8_oA9_pB0_aA1_sB2_dA3_fB4_gA5_hB6_jA7_kB8_lA9_zB0_xA1_cB2_vA3_bB4_nA5_mB6_qA7_wB8_eA9_rB0_tA1_yB2_uA3_iB4_oA5_pB6_aA7_sB8_dA9_fB0_gA1_hB2_jA3_kB4_lA5_zB6_xA7_cB8_vA9_bB0_nA1_mB2_qA3_wB4_eA5_rB6_tA7_yB8_uA9_iB0_oA1_pB2_aA3_sB4_dA5_fB6_gA7_hB8_jA9_kB0_lA1_zB2_xA3_cB4_vA5_bB6_nA7_mB8_qA9_wB0_eA1_rB2_tA3_yB4_uA5_iB6_oA7_pB8_aA9_sB0_dA1_fB2_gA3_hB4_jA5_kB6_lA7_zB8_xA9_cB0_vA1_bB2_nA3_mB4_qA5_wB6_eA7_rB8_tA9_yB0_uA1_iB2_oA3_pB4_aA5_sB6_dA7_fB8_gA9_hB0_jA1_kB2_lA3_zB4__033" + }, + { + position = 34, + --[=[ TODO: update after resolving APPLINK-16052 + + image = + { + imageType = "DYNAMIC", + value = strAppFolder .. "action.png" + },]=] + text = "qA1_wB2_eA3_rB4_tA5_yB6_uA7_iB8_oA9_pB0_aA1_sB2_dA3_fB4_gA5_hB6_jA7_kB8_lA9_zB0_xA1_cB2_vA3_bB4_nA5_mB6_qA7_wB8_eA9_rB0_tA1_yB2_uA3_iB4_oA5_pB6_aA7_sB8_dA9_fB0_gA1_hB2_jA3_kB4_lA5_zB6_xA7_cB8_vA9_bB0_nA1_mB2_qA3_wB4_eA5_rB6_tA7_yB8_uA9_iB0_oA1_pB2_aA3_sB4_dA5_fB6_gA7_hB8_jA9_kB0_lA1_zB2_xA3_cB4_vA5_bB6_nA7_mB8_qA9_wB0_eA1_rB2_tA3_yB4_uA5_iB6_oA7_pB8_aA9_sB0_dA1_fB2_gA3_hB4_jA5_kB6_lA7_zB8_xA9_cB0_vA1_bB2_nA3_mB4_qA5_wB6_eA7_rB8_tA9_yB0_uA1_iB2_oA3_pB4_aA5_sB6_dA7_fB8_gA9_hB0_jA1_kB2_lA3_zB4__034" + }, + { + position = 35, + --[=[ TODO: update after resolving APPLINK-16052 + + image = + { + imageType = "DYNAMIC", + value = strAppFolder .. "action.png" + },]=] + text = "qA1_wB2_eA3_rB4_tA5_yB6_uA7_iB8_oA9_pB0_aA1_sB2_dA3_fB4_gA5_hB6_jA7_kB8_lA9_zB0_xA1_cB2_vA3_bB4_nA5_mB6_qA7_wB8_eA9_rB0_tA1_yB2_uA3_iB4_oA5_pB6_aA7_sB8_dA9_fB0_gA1_hB2_jA3_kB4_lA5_zB6_xA7_cB8_vA9_bB0_nA1_mB2_qA3_wB4_eA5_rB6_tA7_yB8_uA9_iB0_oA1_pB2_aA3_sB4_dA5_fB6_gA7_hB8_jA9_kB0_lA1_zB2_xA3_cB4_vA5_bB6_nA7_mB8_qA9_wB0_eA1_rB2_tA3_yB4_uA5_iB6_oA7_pB8_aA9_sB0_dA1_fB2_gA3_hB4_jA5_kB6_lA7_zB8_xA9_cB0_vA1_bB2_nA3_mB4_qA5_wB6_eA7_rB8_tA9_yB0_uA1_iB2_oA3_pB4_aA5_sB6_dA7_fB8_gA9_hB0_jA1_kB2_lA3_zB4__035" + }, + { + position = 36, + --[=[ TODO: update after resolving APPLINK-16052 + + image = + { + imageType = "DYNAMIC", + value = strAppFolder .. "action.png" + },]=] + text = "qA1_wB2_eA3_rB4_tA5_yB6_uA7_iB8_oA9_pB0_aA1_sB2_dA3_fB4_gA5_hB6_jA7_kB8_lA9_zB0_xA1_cB2_vA3_bB4_nA5_mB6_qA7_wB8_eA9_rB0_tA1_yB2_uA3_iB4_oA5_pB6_aA7_sB8_dA9_fB0_gA1_hB2_jA3_kB4_lA5_zB6_xA7_cB8_vA9_bB0_nA1_mB2_qA3_wB4_eA5_rB6_tA7_yB8_uA9_iB0_oA1_pB2_aA3_sB4_dA5_fB6_gA7_hB8_jA9_kB0_lA1_zB2_xA3_cB4_vA5_bB6_nA7_mB8_qA9_wB0_eA1_rB2_tA3_yB4_uA5_iB6_oA7_pB8_aA9_sB0_dA1_fB2_gA3_hB4_jA5_kB6_lA7_zB8_xA9_cB0_vA1_bB2_nA3_mB4_qA5_wB6_eA7_rB8_tA9_yB0_uA1_iB2_oA3_pB4_aA5_sB6_dA7_fB8_gA9_hB0_jA1_kB2_lA3_zB4__036" + }, + { + position = 37, + --[=[ TODO: update after resolving APPLINK-16052 + + image = + { + imageType = "DYNAMIC", + value = strAppFolder .. "action.png" + },]=] + text = "qA1_wB2_eA3_rB4_tA5_yB6_uA7_iB8_oA9_pB0_aA1_sB2_dA3_fB4_gA5_hB6_jA7_kB8_lA9_zB0_xA1_cB2_vA3_bB4_nA5_mB6_qA7_wB8_eA9_rB0_tA1_yB2_uA3_iB4_oA5_pB6_aA7_sB8_dA9_fB0_gA1_hB2_jA3_kB4_lA5_zB6_xA7_cB8_vA9_bB0_nA1_mB2_qA3_wB4_eA5_rB6_tA7_yB8_uA9_iB0_oA1_pB2_aA3_sB4_dA5_fB6_gA7_hB8_jA9_kB0_lA1_zB2_xA3_cB4_vA5_bB6_nA7_mB8_qA9_wB0_eA1_rB2_tA3_yB4_uA5_iB6_oA7_pB8_aA9_sB0_dA1_fB2_gA3_hB4_jA5_kB6_lA7_zB8_xA9_cB0_vA1_bB2_nA3_mB4_qA5_wB6_eA7_rB8_tA9_yB0_uA1_iB2_oA3_pB4_aA5_sB6_dA7_fB8_gA9_hB0_jA1_kB2_lA3_zB4__037" + }, + { + position = 38, + --[=[ TODO: update after resolving APPLINK-16052 + + image = + { + imageType = "DYNAMIC", + value = strAppFolder .. "action.png" + },]=] + text = "qA1_wB2_eA3_rB4_tA5_yB6_uA7_iB8_oA9_pB0_aA1_sB2_dA3_fB4_gA5_hB6_jA7_kB8_lA9_zB0_xA1_cB2_vA3_bB4_nA5_mB6_qA7_wB8_eA9_rB0_tA1_yB2_uA3_iB4_oA5_pB6_aA7_sB8_dA9_fB0_gA1_hB2_jA3_kB4_lA5_zB6_xA7_cB8_vA9_bB0_nA1_mB2_qA3_wB4_eA5_rB6_tA7_yB8_uA9_iB0_oA1_pB2_aA3_sB4_dA5_fB6_gA7_hB8_jA9_kB0_lA1_zB2_xA3_cB4_vA5_bB6_nA7_mB8_qA9_wB0_eA1_rB2_tA3_yB4_uA5_iB6_oA7_pB8_aA9_sB0_dA1_fB2_gA3_hB4_jA5_kB6_lA7_zB8_xA9_cB0_vA1_bB2_nA3_mB4_qA5_wB6_eA7_rB8_tA9_yB0_uA1_iB2_oA3_pB4_aA5_sB6_dA7_fB8_gA9_hB0_jA1_kB2_lA3_zB4__038" + }, + { + position = 39, + --[=[ TODO: update after resolving APPLINK-16052 + + image = + { + imageType = "DYNAMIC", + value = strAppFolder .. "action.png" + },]=] + text = "qA1_wB2_eA3_rB4_tA5_yB6_uA7_i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_hB0_jA1_kB2_lA3_zB4__040" + }, + { + position = 41, + --[=[ TODO: update after resolving APPLINK-16052 + + image = + { + imageType = "DYNAMIC", + value = strAppFolder .. "action.png" + },]=] + text = "qA1_wB2_eA3_rB4_tA5_yB6_uA7_iB8_oA9_pB0_aA1_sB2_dA3_fB4_gA5_hB6_jA7_kB8_lA9_zB0_xA1_cB2_vA3_bB4_nA5_mB6_qA7_wB8_eA9_rB0_tA1_yB2_uA3_iB4_oA5_pB6_aA7_sB8_dA9_fB0_gA1_hB2_jA3_kB4_lA5_zB6_xA7_cB8_vA9_bB0_nA1_mB2_qA3_wB4_eA5_rB6_tA7_yB8_uA9_iB0_oA1_pB2_aA3_sB4_dA5_fB6_gA7_hB8_jA9_kB0_lA1_zB2_xA3_cB4_vA5_bB6_nA7_mB8_qA9_wB0_eA1_rB2_tA3_yB4_uA5_iB6_oA7_pB8_aA9_sB0_dA1_fB2_gA3_hB4_jA5_kB6_lA7_zB8_xA9_cB0_vA1_bB2_nA3_mB4_qA5_wB6_eA7_rB8_tA9_yB0_uA1_iB2_oA3_pB4_aA5_sB6_dA7_fB8_gA9_hB0_jA1_kB2_lA3_zB4__041" + }, + { + position = 42, + --[=[ TODO: update after resolving APPLINK-16052 + + image = + { + imageType = "DYNAMIC", + value = strAppFolder .. "action.png" + },]=] + text = "qA1_wB2_eA3_rB4_tA5_yB6_uA7_iB8_oA9_pB0_aA1_sB2_dA3_fB4_gA5_hB6_jA7_kB8_lA9_zB0_xA1_cB2_vA3_bB4_nA5_mB6_qA7_wB8_eA9_rB0_tA1_yB2_uA3_iB4_oA5_pB6_aA7_sB8_dA9_fB0_gA1_hB2_jA3_kB4_lA5_zB6_xA7_cB8_vA9_bB0_nA1_mB2_qA3_wB4_eA5_rB6_tA7_yB8_uA9_iB0_oA1_pB2_aA3_sB4_dA5_fB6_gA7_hB8_jA9_kB0_lA1_zB2_xA3_cB4_vA5_bB6_nA7_mB8_qA9_wB0_eA1_rB2_tA3_yB4_uA5_iB6_oA7_pB8_aA9_sB0_dA1_fB2_gA3_hB4_jA5_kB6_lA7_zB8_xA9_cB0_vA1_bB2_nA3_mB4_qA5_wB6_eA7_rB8_tA9_yB0_uA1_iB2_oA3_pB4_aA5_sB6_dA7_fB8_gA9_hB0_jA1_kB2_lA3_zB4__042" + }, + { + position = 43, + --[=[ TODO: update after resolving APPLINK-16052 + + image = + { + imageType = "DYNAMIC", + value = strAppFolder .. "action.png" + },]=] + text = "qA1_wB2_eA3_rB4_tA5_yB6_uA7_iB8_oA9_pB0_aA1_sB2_dA3_fB4_gA5_hB6_jA7_kB8_lA9_zB0_xA1_cB2_vA3_bB4_nA5_mB6_qA7_wB8_eA9_rB0_tA1_yB2_uA3_iB4_oA5_pB6_aA7_sB8_dA9_fB0_gA1_hB2_jA3_kB4_lA5_zB6_xA7_cB8_vA9_bB0_nA1_mB2_qA3_wB4_eA5_rB6_tA7_yB8_uA9_iB0_oA1_pB2_aA3_sB4_dA5_fB6_gA7_hB8_jA9_kB0_lA1_zB2_xA3_cB4_vA5_bB6_nA7_mB8_qA9_wB0_eA1_rB2_tA3_yB4_uA5_iB6_oA7_pB8_aA9_sB0_dA1_fB2_gA3_hB4_jA5_kB6_lA7_zB8_xA9_cB0_vA1_bB2_nA3_mB4_qA5_wB6_eA7_rB8_tA9_yB0_uA1_iB2_oA3_pB4_aA5_sB6_dA7_fB8_gA9_hB0_jA1_kB2_lA3_zB4__043" + }, + { + position = 44, + --[=[ TODO: update after resolving APPLINK-16052 + + image = + { + imageType = "DYNAMIC", + value = strAppFolder .. "action.png" + },]=] + text = "qA1_wB2_eA3_rB4_tA5_yB6_uA7_iB8_oA9_pB0_aA1_sB2_dA3_fB4_gA5_hB6_jA7_kB8_lA9_zB0_xA1_cB2_vA3_bB4_nA5_mB6_qA7_wB8_eA9_rB0_tA1_yB2_uA3_iB4_oA5_pB6_aA7_sB8_dA9_fB0_gA1_hB2_jA3_kB4_lA5_zB6_xA7_cB8_vA9_bB0_nA1_mB2_qA3_wB4_eA5_rB6_tA7_yB8_uA9_iB0_oA1_pB2_aA3_sB4_dA5_fB6_gA7_hB8_jA9_kB0_lA1_zB2_xA3_cB4_vA5_bB6_nA7_mB8_qA9_wB0_eA1_rB2_tA3_yB4_uA5_iB6_oA7_pB8_aA9_sB0_dA1_fB2_gA3_hB4_jA5_kB6_lA7_zB8_xA9_cB0_vA1_bB2_nA3_mB4_qA5_wB6_eA7_rB8_tA9_yB0_uA1_iB2_oA3_pB4_aA5_sB6_dA7_fB8_gA9_hB0_jA1_kB2_lA3_zB4__044" + }, + { + position = 45, + --[=[ TODO: update after resolving APPLINK-16052 + + image = + { + imageType = "DYNAMIC", + value = strAppFolder .. "action.png" + },]=] + text = "qA1_wB2_eA3_rB4_tA5_yB6_uA7_iB8_oA9_pB0_aA1_sB2_dA3_fB4_gA5_hB6_jA7_kB8_lA9_zB0_xA1_cB2_vA3_bB4_nA5_mB6_qA7_wB8_eA9_rB0_tA1_yB2_uA3_iB4_oA5_pB6_aA7_sB8_dA9_fB0_gA1_hB2_jA3_kB4_lA5_zB6_xA7_cB8_vA9_bB0_nA1_mB2_qA3_wB4_eA5_rB6_tA7_yB8_uA9_iB0_oA1_pB2_aA3_sB4_dA5_fB6_gA7_hB8_jA9_kB0_lA1_zB2_xA3_cB4_vA5_bB6_nA7_mB8_qA9_wB0_eA1_rB2_tA3_yB4_uA5_iB6_oA7_pB8_aA9_sB0_dA1_fB2_gA3_hB4_jA5_kB6_lA7_zB8_xA9_cB0_vA1_bB2_nA3_mB4_qA5_wB6_eA7_rB8_tA9_yB0_uA1_iB2_oA3_pB4_aA5_sB6_dA7_fB8_gA9_hB0_jA1_kB2_lA3_zB4__045" + }, + { + position = 46, + --[=[ TODO: update after resolving APPLINK-16052 + + image = + { + imageType = "DYNAMIC", + value = strAppFolder .. "action.png" + },]=] + text = "qA1_wB2_eA3_rB4_tA5_yB6_uA7_iB8_oA9_pB0_aA1_sB2_dA3_fB4_gA5_hB6_jA7_kB8_lA9_zB0_xA1_cB2_vA3_bB4_nA5_mB6_qA7_wB8_eA9_rB0_tA1_yB2_uA3_iB4_oA5_pB6_aA7_sB8_dA9_fB0_gA1_hB2_jA3_kB4_lA5_zB6_xA7_cB8_vA9_bB0_nA1_mB2_qA3_wB4_eA5_rB6_tA7_yB8_uA9_iB0_oA1_pB2_aA3_sB4_dA5_fB6_gA7_hB8_jA9_kB0_lA1_zB2_xA3_cB4_vA5_bB6_nA7_mB8_qA9_wB0_eA1_rB2_tA3_yB4_uA5_iB6_oA7_pB8_aA9_sB0_dA1_fB2_gA3_hB4_jA5_kB6_lA7_zB8_xA9_cB0_vA1_bB2_nA3_mB4_qA5_wB6_eA7_rB8_tA9_yB0_uA1_iB2_oA3_pB4_aA5_sB6_dA7_fB8_gA9_hB0_jA1_kB2_lA3_zB4__046" + }, + { + position = 47, + --[=[ TODO: update after resolving APPLINK-16052 + + image = + { + imageType = "DYNAMIC", + value = strAppFolder .. "action.png" + },]=] + text = "qA1_wB2_eA3_rB4_tA5_yB6_uA7_iB8_oA9_pB0_aA1_sB2_dA3_fB4_gA5_hB6_jA7_kB8_lA9_zB0_xA1_cB2_vA3_bB4_nA5_mB6_qA7_wB8_eA9_rB0_tA1_yB2_uA3_iB4_oA5_pB6_aA7_sB8_dA9_fB0_gA1_hB2_jA3_kB4_lA5_zB6_xA7_cB8_vA9_bB0_nA1_mB2_qA3_wB4_eA5_rB6_tA7_yB8_uA9_iB0_oA1_pB2_aA3_sB4_dA5_fB6_gA7_hB8_jA9_kB0_lA1_zB2_xA3_cB4_vA5_bB6_nA7_mB8_qA9_wB0_eA1_rB2_tA3_yB4_uA5_iB6_oA7_pB8_aA9_sB0_dA1_fB2_gA3_hB4_jA5_kB6_lA7_zB8_xA9_cB0_vA1_bB2_nA3_mB4_qA5_wB6_eA7_rB8_tA9_yB0_uA1_iB2_oA3_pB4_aA5_sB6_dA7_fB8_gA9_hB0_jA1_kB2_lA3_zB4__047" + }, + { + position = 48, + --[=[ TODO: update after resolving APPLINK-16052 + + image = + { + imageType = "DYNAMIC", + value = strAppFolder .. "action.png" + },]=] + text = "qA1_wB2_eA3_rB4_tA5_yB6_uA7_iB8_oA9_pB0_aA1_sB2_dA3_fB4_gA5_hB6_jA7_kB8_lA9_zB0_xA1_cB2_vA3_bB4_nA5_mB6_qA7_wB8_eA9_rB0_tA1_yB2_uA3_iB4_oA5_pB6_aA7_sB8_dA9_fB0_gA1_hB2_jA3_kB4_lA5_zB6_xA7_cB8_vA9_bB0_nA1_mB2_qA3_wB4_eA5_rB6_tA7_yB8_uA9_iB0_oA1_pB2_aA3_sB4_dA5_fB6_gA7_hB8_jA9_kB0_lA1_zB2_xA3_cB4_vA5_bB6_nA7_mB8_qA9_wB0_eA1_rB2_tA3_yB4_uA5_iB6_oA7_pB8_aA9_sB0_dA1_fB2_gA3_hB4_jA5_kB6_lA7_zB8_xA9_cB0_vA1_bB2_nA3_mB4_qA5_wB6_eA7_rB8_tA9_yB0_uA1_iB2_oA3_pB4_aA5_sB6_dA7_fB8_gA9_hB0_jA1_kB2_lA3_zB4__048" + }, + { + position = 49, + --[=[ TODO: update after resolving APPLINK-16052 + + image = + { + imageType = "DYNAMIC", + value = strAppFolder .. "action.png" + },]=] + text = "qA1_wB2_eA3_rB4_tA5_yB6_uA7_iB8_oA9_pB0_aA1_sB2_dA3_fB4_gA5_hB6_jA7_kB8_lA9_zB0_xA1_cB2_vA3_bB4_nA5_mB6_qA7_wB8_eA9_rB0_tA1_yB2_uA3_iB4_oA5_pB6_aA7_sB8_dA9_fB0_gA1_hB2_jA3_kB4_lA5_zB6_xA7_cB8_vA9_bB0_nA1_mB2_qA3_wB4_eA5_rB6_tA7_yB8_uA9_iB0_oA1_pB2_aA3_sB4_dA5_fB6_gA7_hB8_jA9_kB0_lA1_zB2_xA3_cB4_vA5_bB6_nA7_mB8_qA9_wB0_eA1_rB2_tA3_yB4_uA5_iB6_oA7_pB8_aA9_sB0_dA1_fB2_gA3_hB4_jA5_kB6_lA7_zB8_xA9_cB0_vA1_bB2_nA3_mB4_qA5_wB6_eA7_rB8_tA9_yB0_uA1_iB2_oA3_pB4_aA5_sB6_dA7_fB8_gA9_hB0_jA1_kB2_lA3_zB4__049" + }, + { + position = 50, + --[=[ TODO: update after resolving APPLINK-16052 + + image = + { + imageType = "DYNAMIC", + value = strAppFolder .. "action.png" + },]=] + text = "qA1_wB2_eA3_rB4_tA5_yB6_uA7_iB8_oA9_pB0_aA1_sB2_dA3_fB4_gA5_hB6_jA7_kB8_lA9_zB0_xA1_cB2_vA3_bB4_nA5_mB6_qA7_wB8_eA9_rB0_tA1_yB2_uA3_iB4_oA5_pB6_aA7_sB8_dA9_fB0_gA1_hB2_jA3_kB4_lA5_zB6_xA7_cB8_vA9_bB0_nA1_mB2_qA3_wB4_eA5_rB6_tA7_yB8_uA9_iB0_oA1_pB2_aA3_sB4_dA5_fB6_gA7_hB8_jA9_kB0_lA1_zB2_xA3_cB4_vA5_bB6_nA7_mB8_qA9_wB0_eA1_rB2_tA3_yB4_uA5_iB6_oA7_pB8_aA9_sB0_dA1_fB2_gA3_hB4_jA5_kB6_lA7_zB8_xA9_cB0_vA1_bB2_nA3_mB4_qA5_wB6_eA7_rB8_tA9_yB0_uA1_iB2_oA3_pB4_aA5_sB6_dA7_fB8_gA9_hB0_jA1_kB2_lA3_zB4__050" + }, + { + position = 51, + --[=[ TODO: update after resolving APPLINK-16052 + + image = + { + imageType = "DYNAMIC", + value = strAppFolder .. "action.png" + },]=] + text = "qA1_wB2_eA3_rB4_tA5_yB6_uA7_iB8_oA9_pB0_aA1_sB2_dA3_fB4_gA5_hB6_jA7_kB8_lA9_zB0_xA1_cB2_vA3_bB4_nA5_mB6_qA7_wB8_eA9_rB0_tA1_yB2_uA3_iB4_oA5_pB6_aA7_sB8_dA9_fB0_gA1_hB2_jA3_kB4_lA5_zB6_xA7_cB8_vA9_bB0_nA1_mB2_qA3_wB4_eA5_rB6_tA7_yB8_uA9_iB0_oA1_pB2_aA3_sB4_dA5_fB6_gA7_hB8_jA9_kB0_lA1_zB2_xA3_cB4_vA5_bB6_nA7_mB8_qA9_wB0_eA1_rB2_tA3_yB4_uA5_iB6_oA7_pB8_aA9_sB0_dA1_fB2_gA3_hB4_jA5_kB6_lA7_zB8_xA9_cB0_vA1_bB2_nA3_mB4_qA5_wB6_eA7_rB8_tA9_yB0_uA1_iB2_oA3_pB4_aA5_sB6_dA7_fB8_gA9_hB0_jA1_kB2_lA3_zB4__051" + }, + { + position = 52, + --[=[ TODO: update after resolving APPLINK-16052 + + image = + { + imageType = "DYNAMIC", + value = strAppFolder .. "action.png" + },]=] + text = "qA1_wB2_eA3_rB4_tA5_yB6_uA7_iB8_oA9_pB0_aA1_sB2_dA3_fB4_gA5_hB6_jA7_kB8_lA9_zB0_xA1_cB2_vA3_bB4_nA5_mB6_qA7_wB8_eA9_rB0_tA1_yB2_uA3_iB4_oA5_pB6_aA7_sB8_dA9_fB0_gA1_hB2_jA3_kB4_lA5_zB6_xA7_cB8_vA9_bB0_nA1_mB2_qA3_wB4_eA5_rB6_tA7_yB8_uA9_iB0_oA1_pB2_aA3_sB4_dA5_fB6_gA7_hB8_jA9_kB0_lA1_zB2_xA3_cB4_vA5_bB6_nA7_mB8_qA9_wB0_eA1_rB2_tA3_yB4_uA5_iB6_oA7_pB8_aA9_sB0_dA1_fB2_gA3_hB4_jA5_kB6_lA7_zB8_xA9_cB0_vA1_bB2_nA3_mB4_qA5_wB6_eA7_rB8_tA9_yB0_uA1_iB2_oA3_pB4_aA5_sB6_dA7_fB8_gA9_hB0_jA1_kB2_lA3_zB4__052" + }, + { + position = 53, + --[=[ TODO: update after resolving APPLINK-16052 + + image = + { + imageType = "DYNAMIC", + value = strAppFolder .. "action.png" + },]=] + text = "qA1_wB2_eA3_rB4_tA5_yB6_uA7_iB8_oA9_pB0_aA1_sB2_dA3_fB4_gA5_hB6_jA7_kB8_lA9_zB0_xA1_cB2_vA3_bB4_nA5_mB6_qA7_wB8_eA9_rB0_tA1_yB2_uA3_iB4_oA5_pB6_aA7_sB8_dA9_fB0_gA1_hB2_jA3_kB4_lA5_zB6_xA7_cB8_vA9_bB0_nA1_mB2_qA3_wB4_eA5_rB6_tA7_yB8_uA9_iB0_oA1_pB2_aA3_sB4_dA5_fB6_gA7_hB8_jA9_kB0_lA1_zB2_xA3_cB4_vA5_bB6_nA7_mB8_qA9_wB0_eA1_rB2_tA3_yB4_uA5_iB6_oA7_pB8_aA9_sB0_dA1_fB2_gA3_hB4_jA5_kB6_lA7_zB8_xA9_cB0_vA1_bB2_nA3_mB4_qA5_wB6_eA7_rB8_tA9_yB0_uA1_iB2_oA3_pB4_aA5_sB6_dA7_fB8_gA9_hB0_jA1_kB2_lA3_zB4__053" + }, + { + position = 54, + --[=[ TODO: update after resolving APPLINK-16052 + + image = + { + imageType = "DYNAMIC", + value = strAppFolder .. "action.png" + },]=] + text = "qA1_wB2_eA3_rB4_tA5_yB6_uA7_iB8_oA9_pB0_aA1_sB2_dA3_fB4_gA5_hB6_jA7_kB8_lA9_zB0_xA1_cB2_vA3_bB4_nA5_mB6_qA7_wB8_eA9_rB0_tA1_yB2_uA3_iB4_oA5_pB6_aA7_sB8_dA9_fB0_gA1_hB2_jA3_kB4_lA5_zB6_xA7_cB8_vA9_bB0_nA1_mB2_qA3_wB4_eA5_rB6_tA7_yB8_uA9_iB0_oA1_pB2_aA3_sB4_dA5_fB6_gA7_hB8_jA9_kB0_lA1_zB2_xA3_cB4_vA5_bB6_nA7_mB8_qA9_wB0_eA1_rB2_tA3_yB4_uA5_iB6_oA7_pB8_aA9_sB0_dA1_fB2_gA3_hB4_jA5_kB6_lA7_zB8_xA9_cB0_vA1_bB2_nA3_mB4_qA5_wB6_eA7_rB8_tA9_yB0_uA1_iB2_oA3_pB4_aA5_sB6_dA7_fB8_gA9_hB0_jA1_kB2_lA3_zB4__054" + }, + { + position = 55, + --[=[ TODO: update after resolving APPLINK-16052 + + image = + { + imageType = "DYNAMIC", + value = strAppFolder .. "action.png" + },]=] + text = "qA1_wB2_eA3_rB4_tA5_yB6_uA7_iB8_oA9_pB0_aA1_sB2_dA3_fB4_gA5_hB6_jA7_kB8_lA9_zB0_xA1_cB2_vA3_bB4_nA5_mB6_qA7_wB8_eA9_rB0_tA1_yB2_uA3_iB4_oA5_pB6_aA7_sB8_dA9_fB0_gA1_hB2_jA3_kB4_lA5_zB6_xA7_cB8_vA9_bB0_nA1_mB2_qA3_wB4_eA5_rB6_tA7_yB8_uA9_iB0_oA1_pB2_aA3_sB4_dA5_fB6_gA7_hB8_jA9_kB0_lA1_zB2_xA3_cB4_vA5_bB6_nA7_mB8_qA9_wB0_eA1_rB2_tA3_yB4_uA5_iB6_oA7_pB8_aA9_sB0_dA1_fB2_gA3_hB4_jA5_kB6_lA7_zB8_xA9_cB0_vA1_bB2_nA3_mB4_qA5_wB6_eA7_rB8_tA9_yB0_uA1_iB2_oA3_pB4_aA5_sB6_dA7_fB8_gA9_hB0_jA1_kB2_lA3_zB4__055" + }, + { + position = 56, + --[=[ TODO: update after resolving APPLINK-16052 + + image = + { + imageType = "DYNAMIC", + value = strAppFolder .. "action.png" + },]=] + text = "qA1_wB2_eA3_rB4_tA5_yB6_uA7_iB8_oA9_pB0_aA1_sB2_dA3_fB4_gA5_hB6_jA7_kB8_lA9_zB0_xA1_cB2_vA3_bB4_nA5_mB6_qA7_wB8_eA9_rB0_tA1_yB2_uA3_iB4_oA5_pB6_aA7_sB8_dA9_fB0_gA1_hB2_jA3_kB4_lA5_zB6_xA7_cB8_vA9_bB0_nA1_mB2_qA3_wB4_eA5_rB6_tA7_yB8_uA9_iB0_oA1_pB2_aA3_sB4_dA5_fB6_gA7_hB8_jA9_kB0_lA1_zB2_xA3_cB4_vA5_bB6_nA7_mB8_qA9_wB0_eA1_rB2_tA3_yB4_uA5_iB6_oA7_pB8_aA9_sB0_dA1_fB2_gA3_hB4_jA5_kB6_lA7_zB8_xA9_cB0_vA1_bB2_nA3_mB4_qA5_wB6_eA7_rB8_tA9_yB0_uA1_iB2_oA3_pB4_aA5_sB6_dA7_fB8_gA9_hB0_jA1_kB2_lA3_zB4__056" + }, + { + position = 57, + --[=[ TODO: update after resolving APPLINK-16052 + + image = + { + imageType = "DYNAMIC", + value = strAppFolder .. "action.png" + },]=] + text = "qA1_wB2_eA3_rB4_tA5_yB6_uA7_iB8_oA9_pB0_aA1_sB2_dA3_fB4_gA5_hB6_jA7_kB8_lA9_zB0_xA1_cB2_vA3_bB4_nA5_mB6_qA7_wB8_eA9_rB0_tA1_yB2_uA3_iB4_oA5_pB6_aA7_sB8_dA9_fB0_gA1_hB2_jA3_kB4_lA5_zB6_xA7_cB8_vA9_bB0_nA1_mB2_qA3_wB4_eA5_rB6_tA7_yB8_uA9_iB0_oA1_pB2_aA3_sB4_dA5_fB6_gA7_hB8_jA9_kB0_lA1_zB2_xA3_cB4_vA5_bB6_nA7_mB8_qA9_wB0_eA1_rB2_tA3_yB4_uA5_iB6_oA7_pB8_aA9_sB0_dA1_fB2_gA3_hB4_jA5_kB6_lA7_zB8_xA9_cB0_vA1_bB2_nA3_mB4_qA5_wB6_eA7_rB8_tA9_yB0_uA1_iB2_oA3_pB4_aA5_sB6_dA7_fB8_gA9_hB0_jA1_kB2_lA3_zB4__057" + }, + { + position = 58, + --[=[ TODO: update after resolving APPLINK-16052 + + image = + { + imageType = "DYNAMIC", + value = strAppFolder .. "action.png" + },]=] + text = "qA1_wB2_eA3_rB4_tA5_yB6_uA7_iB8_oA9_pB0_aA1_sB2_dA3_fB4_gA5_hB6_jA7_kB8_lA9_zB0_xA1_cB2_vA3_bB4_nA5_mB6_qA7_wB8_eA9_rB0_tA1_yB2_uA3_iB4_oA5_pB6_aA7_sB8_dA9_fB0_gA1_hB2_jA3_kB4_lA5_zB6_xA7_cB8_vA9_bB0_nA1_mB2_qA3_wB4_eA5_rB6_tA7_yB8_uA9_iB0_oA1_pB2_aA3_sB4_dA5_fB6_gA7_hB8_jA9_kB0_lA1_zB2_xA3_cB4_vA5_bB6_nA7_mB8_qA9_wB0_eA1_rB2_tA3_yB4_uA5_iB6_oA7_pB8_aA9_sB0_dA1_fB2_gA3_hB4_jA5_kB6_lA7_zB8_xA9_cB0_vA1_bB2_nA3_mB4_qA5_wB6_eA7_rB8_tA9_yB0_uA1_iB2_oA3_pB4_aA5_sB6_dA7_fB8_gA9_hB0_jA1_kB2_lA3_zB4__058" + }, + { + position = 59, + --[=[ TODO: update after resolving APPLINK-16052 + + image = + { + imageType = "DYNAMIC", + value = strAppFolder .. "action.png" + },]=] + text = "qA1_wB2_eA3_rB4_tA5_yB6_uA7_iB8_oA9_pB0_aA1_sB2_dA3_fB4_gA5_hB6_jA7_kB8_lA9_zB0_xA1_cB2_vA3_bB4_nA5_mB6_qA7_wB8_eA9_rB0_tA1_yB2_uA3_iB4_oA5_pB6_aA7_sB8_dA9_fB0_gA1_hB2_jA3_kB4_lA5_zB6_xA7_cB8_vA9_bB0_nA1_mB2_qA3_wB4_eA5_rB6_tA7_yB8_uA9_iB0_oA1_pB2_aA3_sB4_dA5_fB6_gA7_hB8_jA9_kB0_lA1_zB2_xA3_cB4_vA5_bB6_nA7_mB8_qA9_wB0_eA1_rB2_tA3_yB4_uA5_iB6_oA7_pB8_aA9_sB0_dA1_fB2_gA3_hB4_jA5_kB6_lA7_zB8_xA9_cB0_vA1_bB2_nA3_mB4_qA5_wB6_eA7_rB8_tA9_yB0_uA1_iB2_oA3_pB4_aA5_sB6_dA7_fB8_gA9_hB0_jA1_kB2_lA3_zB4__059" + }, + { + position = 60, + --[=[ TODO: update after resolving APPLINK-16052 + + image = + { + imageType = "DYNAMIC", + value = strAppFolder .. "action.png" + },]=] + text = "qA1_wB2_eA3_rB4_tA5_yB6_uA7_iB8_oA9_pB0_aA1_sB2_dA3_fB4_gA5_hB6_jA7_kB8_lA9_zB0_xA1_cB2_vA3_bB4_nA5_mB6_qA7_wB8_eA9_rB0_tA1_yB2_uA3_iB4_oA5_pB6_aA7_sB8_dA9_fB0_gA1_hB2_jA3_kB4_lA5_zB6_xA7_cB8_vA9_bB0_nA1_mB2_qA3_wB4_eA5_rB6_tA7_yB8_uA9_iB0_oA1_pB2_aA3_sB4_dA5_fB6_gA7_hB8_jA9_kB0_lA1_zB2_xA3_cB4_vA5_bB6_nA7_mB8_qA9_wB0_eA1_rB2_tA3_yB4_uA5_iB6_oA7_pB8_aA9_sB0_dA1_fB2_gA3_hB4_jA5_kB6_lA7_zB8_xA9_cB0_vA1_bB2_nA3_mB4_qA5_wB6_eA7_rB8_tA9_yB0_uA1_iB2_oA3_pB4_aA5_sB6_dA7_fB8_gA9_hB0_jA1_kB2_lA3_zB4__060" + }, + { + position = 61, + --[=[ TODO: update after resolving APPLINK-16052 + + image = + { + imageType = "DYNAMIC", + value = strAppFolder .. "action.png" + },]=] + text = "qA1_wB2_eA3_rB4_tA5_yB6_uA7_iB8_oA9_pB0_aA1_sB2_dA3_fB4_gA5_hB6_jA7_kB8_lA9_zB0_xA1_cB2_vA3_bB4_nA5_mB6_qA7_wB8_eA9_rB0_tA1_yB2_uA3_iB4_oA5_pB6_aA7_sB8_dA9_fB0_gA1_hB2_jA3_kB4_lA5_zB6_xA7_cB8_vA9_bB0_nA1_mB2_qA3_wB4_eA5_rB6_tA7_yB8_uA9_iB0_oA1_pB2_aA3_sB4_dA5_fB6_gA7_hB8_jA9_kB0_lA1_zB2_xA3_cB4_vA5_bB6_nA7_mB8_qA9_wB0_eA1_rB2_tA3_yB4_uA5_iB6_oA7_pB8_aA9_sB0_dA1_fB2_gA3_hB4_jA5_kB6_lA7_zB8_xA9_cB0_vA1_bB2_nA3_mB4_qA5_wB6_eA7_rB8_tA9_yB0_uA1_iB2_oA3_pB4_aA5_sB6_dA7_fB8_gA9_hB0_jA1_kB2_lA3_zB4__061" + }, + { + position = 62, + --[=[ TODO: update after resolving APPLINK-16052 + + image = + { + imageType = "DYNAMIC", + value = strAppFolder .. "action.png" + },]=] + text = "qA1_wB2_eA3_rB4_tA5_yB6_uA7_iB8_oA9_pB0_aA1_sB2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B4__063" + }, + { + position = 64, + --[=[ TODO: update after resolving APPLINK-16052 + + image = + { + imageType = "DYNAMIC", + value = strAppFolder .. "action.png" + },]=] + text = "qA1_wB2_eA3_rB4_tA5_yB6_uA7_iB8_oA9_pB0_aA1_sB2_dA3_fB4_gA5_hB6_jA7_kB8_lA9_zB0_xA1_cB2_vA3_bB4_nA5_mB6_qA7_wB8_eA9_rB0_tA1_yB2_uA3_iB4_oA5_pB6_aA7_sB8_dA9_fB0_gA1_hB2_jA3_kB4_lA5_zB6_xA7_cB8_vA9_bB0_nA1_mB2_qA3_wB4_eA5_rB6_tA7_yB8_uA9_iB0_oA1_pB2_aA3_sB4_dA5_fB6_gA7_hB8_jA9_kB0_lA1_zB2_xA3_cB4_vA5_bB6_nA7_mB8_qA9_wB0_eA1_rB2_tA3_yB4_uA5_iB6_oA7_pB8_aA9_sB0_dA1_fB2_gA3_hB4_jA5_kB6_lA7_zB8_xA9_cB0_vA1_bB2_nA3_mB4_qA5_wB6_eA7_rB8_tA9_yB0_uA1_iB2_oA3_pB4_aA5_sB6_dA7_fB8_gA9_hB0_jA1_kB2_lA3_zB4__064" + }, + { + position = 65, + --[=[ TODO: update after resolving APPLINK-16052 + + image = + { + imageType = "DYNAMIC", + value = strAppFolder .. "action.png" + },]=] + text = "qA1_wB2_eA3_rB4_tA5_yB6_uA7_iB8_oA9_pB0_aA1_sB2_dA3_fB4_gA5_hB6_jA7_kB8_lA9_zB0_xA1_cB2_vA3_bB4_nA5_mB6_qA7_wB8_eA9_rB0_tA1_yB2_uA3_iB4_oA5_pB6_aA7_sB8_dA9_fB0_gA1_hB2_jA3_kB4_lA5_zB6_xA7_cB8_vA9_bB0_nA1_mB2_qA3_wB4_eA5_rB6_tA7_yB8_uA9_iB0_oA1_pB2_aA3_sB4_dA5_fB6_gA7_hB8_jA9_kB0_lA1_zB2_xA3_cB4_vA5_bB6_nA7_mB8_qA9_wB0_eA1_rB2_tA3_yB4_uA5_iB6_oA7_pB8_aA9_sB0_dA1_fB2_gA3_hB4_jA5_kB6_lA7_zB8_xA9_cB0_vA1_bB2_nA3_mB4_qA5_wB6_eA7_rB8_tA9_yB0_uA1_iB2_oA3_pB4_aA5_sB6_dA7_fB8_gA9_hB0_jA1_kB2_lA3_zB4__065" + }, + { + position = 66, + --[=[ TODO: update after resolving APPLINK-16052 + + image = + { + imageType = "DYNAMIC", + value = strAppFolder .. "action.png" + },]=] + text = "qA1_wB2_eA3_rB4_tA5_yB6_uA7_iB8_oA9_pB0_aA1_sB2_dA3_fB4_gA5_hB6_jA7_kB8_lA9_zB0_xA1_cB2_vA3_bB4_nA5_mB6_qA7_wB8_eA9_rB0_tA1_yB2_uA3_iB4_oA5_pB6_aA7_sB8_dA9_fB0_gA1_hB2_jA3_kB4_lA5_zB6_xA7_cB8_vA9_bB0_nA1_mB2_qA3_wB4_eA5_rB6_tA7_yB8_uA9_iB0_oA1_pB2_aA3_sB4_dA5_fB6_gA7_hB8_jA9_kB0_lA1_zB2_xA3_cB4_vA5_bB6_nA7_mB8_qA9_wB0_eA1_rB2_tA3_yB4_uA5_iB6_oA7_pB8_aA9_sB0_dA1_fB2_gA3_hB4_jA5_kB6_lA7_zB8_xA9_cB0_vA1_bB2_nA3_mB4_qA5_wB6_eA7_rB8_tA9_yB0_uA1_iB2_oA3_pB4_aA5_sB6_dA7_fB8_gA9_hB0_jA1_kB2_lA3_zB4__066" + }, + { + position = 67, + --[=[ TODO: update after resolving APPLINK-16052 + + image = + { + imageType = "DYNAMIC", + value = strAppFolder .. "action.png" + },]=] + text = "qA1_wB2_eA3_rB4_tA5_yB6_uA7_iB8_oA9_pB0_aA1_sB2_dA3_fB4_gA5_hB6_jA7_kB8_lA9_zB0_xA1_cB2_vA3_bB4_nA5_mB6_qA7_wB8_eA9_rB0_tA1_yB2_uA3_iB4_oA5_pB6_aA7_sB8_dA9_fB0_gA1_hB2_jA3_kB4_lA5_zB6_xA7_cB8_vA9_bB0_nA1_mB2_qA3_wB4_eA5_rB6_tA7_yB8_uA9_iB0_oA1_pB2_aA3_sB4_dA5_fB6_gA7_hB8_jA9_kB0_lA1_zB2_xA3_cB4_vA5_bB6_nA7_mB8_qA9_wB0_eA1_rB2_tA3_yB4_uA5_iB6_oA7_pB8_aA9_sB0_dA1_fB2_gA3_hB4_jA5_kB6_lA7_zB8_xA9_cB0_vA1_bB2_nA3_mB4_qA5_wB6_eA7_rB8_tA9_yB0_uA1_iB2_oA3_pB4_aA5_sB6_dA7_fB8_gA9_hB0_jA1_kB2_lA3_zB4__067" + }, + { + position = 68, + --[=[ TODO: update after resolving APPLINK-16052 + + image = + { + imageType = "DYNAMIC", + value = strAppFolder .. "action.png" + },]=] + text = "qA1_wB2_eA3_rB4_tA5_yB6_uA7_iB8_oA9_pB0_aA1_sB2_dA3_fB4_gA5_hB6_jA7_kB8_lA9_zB0_xA1_cB2_vA3_bB4_nA5_mB6_qA7_wB8_eA9_rB0_tA1_yB2_uA3_iB4_oA5_pB6_aA7_sB8_dA9_fB0_gA1_hB2_jA3_kB4_lA5_zB6_xA7_cB8_vA9_bB0_nA1_mB2_qA3_wB4_eA5_rB6_tA7_yB8_uA9_iB0_oA1_pB2_aA3_sB4_dA5_fB6_gA7_hB8_jA9_kB0_lA1_zB2_xA3_cB4_vA5_bB6_nA7_mB8_qA9_wB0_eA1_rB2_tA3_yB4_uA5_iB6_oA7_pB8_aA9_sB0_dA1_fB2_gA3_hB4_jA5_kB6_lA7_zB8_xA9_cB0_vA1_bB2_nA3_mB4_qA5_wB6_eA7_rB8_tA9_yB0_uA1_iB2_oA3_pB4_aA5_sB6_dA7_fB8_gA9_hB0_jA1_kB2_lA3_zB4__068" + }, + { + position = 69, + --[=[ TODO: update after resolving APPLINK-16052 + + image = + { + imageType = "DYNAMIC", + value = strAppFolder .. "action.png" + },]=] + text = "qA1_wB2_eA3_rB4_tA5_yB6_uA7_iB8_oA9_pB0_aA1_sB2_dA3_fB4_gA5_hB6_jA7_kB8_lA9_zB0_xA1_cB2_vA3_bB4_nA5_mB6_qA7_wB8_eA9_rB0_tA1_yB2_uA3_iB4_oA5_pB6_aA7_sB8_dA9_fB0_gA1_hB2_jA3_kB4_lA5_zB6_xA7_cB8_vA9_bB0_nA1_mB2_qA3_wB4_eA5_rB6_tA7_yB8_uA9_iB0_oA1_pB2_aA3_sB4_dA5_fB6_gA7_hB8_jA9_kB0_lA1_zB2_xA3_cB4_vA5_bB6_nA7_mB8_qA9_wB0_eA1_rB2_tA3_yB4_uA5_iB6_oA7_pB8_aA9_sB0_dA1_fB2_gA3_hB4_jA5_kB6_lA7_zB8_xA9_cB0_vA1_bB2_nA3_mB4_qA5_wB6_eA7_rB8_tA9_yB0_uA1_iB2_oA3_pB4_aA5_sB6_dA7_fB8_gA9_hB0_jA1_kB2_lA3_zB4__069" + }, + { + position = 70, + --[=[ TODO: update after resolving APPLINK-16052 + + image = + { + imageType = "DYNAMIC", + value = strAppFolder .. "action.png" + },]=] + text = "qA1_wB2_eA3_rB4_tA5_yB6_uA7_iB8_oA9_pB0_aA1_sB2_dA3_fB4_gA5_hB6_jA7_kB8_lA9_zB0_xA1_cB2_vA3_bB4_nA5_mB6_qA7_wB8_eA9_rB0_tA1_yB2_uA3_iB4_oA5_pB6_aA7_sB8_dA9_fB0_gA1_hB2_jA3_kB4_lA5_zB6_xA7_cB8_vA9_bB0_nA1_mB2_qA3_wB4_eA5_rB6_tA7_yB8_uA9_iB0_oA1_pB2_aA3_sB4_dA5_fB6_gA7_hB8_jA9_kB0_lA1_zB2_xA3_cB4_vA5_bB6_nA7_mB8_qA9_wB0_eA1_rB2_tA3_yB4_uA5_iB6_oA7_pB8_aA9_sB0_dA1_fB2_gA3_hB4_jA5_kB6_lA7_zB8_xA9_cB0_vA1_bB2_nA3_mB4_qA5_wB6_eA7_rB8_tA9_yB0_uA1_iB2_oA3_pB4_aA5_sB6_dA7_fB8_gA9_hB0_jA1_kB2_lA3_zB4__070" + }, + { + position = 71, + --[=[ TODO: update after resolving APPLINK-16052 + + image = + { + imageType = "DYNAMIC", + value = strAppFolder .. "action.png" + },]=] + text = "qA1_wB2_eA3_rB4_tA5_yB6_uA7_iB8_oA9_pB0_aA1_sB2_dA3_fB4_gA5_hB6_jA7_kB8_lA9_zB0_xA1_cB2_vA3_bB4_nA5_mB6_qA7_wB8_eA9_rB0_tA1_yB2_uA3_iB4_oA5_pB6_aA7_sB8_dA9_fB0_gA1_hB2_jA3_kB4_lA5_zB6_xA7_cB8_vA9_bB0_nA1_mB2_qA3_wB4_eA5_rB6_tA7_yB8_uA9_iB0_oA1_pB2_aA3_sB4_dA5_fB6_gA7_hB8_jA9_kB0_lA1_zB2_xA3_cB4_vA5_bB6_nA7_mB8_qA9_wB0_eA1_rB2_tA3_yB4_uA5_iB6_oA7_pB8_aA9_sB0_dA1_fB2_gA3_hB4_jA5_kB6_lA7_zB8_xA9_cB0_vA1_bB2_nA3_mB4_qA5_wB6_eA7_rB8_tA9_yB0_uA1_iB2_oA3_pB4_aA5_sB6_dA7_fB8_gA9_hB0_jA1_kB2_lA3_zB4__071" + }, + { + position = 72, + --[=[ TODO: update after resolving APPLINK-16052 + + image = + { + imageType = "DYNAMIC", + value = strAppFolder .. "action.png" + },]=] + text = "qA1_wB2_eA3_rB4_tA5_yB6_uA7_iB8_oA9_pB0_aA1_sB2_dA3_fB4_gA5_hB6_jA7_kB8_lA9_zB0_xA1_cB2_vA3_bB4_nA5_mB6_qA7_wB8_eA9_rB0_tA1_yB2_uA3_iB4_oA5_pB6_aA7_sB8_dA9_fB0_gA1_hB2_jA3_kB4_lA5_zB6_xA7_cB8_vA9_bB0_nA1_mB2_qA3_wB4_eA5_rB6_tA7_yB8_uA9_iB0_oA1_pB2_aA3_sB4_dA5_fB6_gA7_hB8_jA9_kB0_lA1_zB2_xA3_cB4_vA5_bB6_nA7_mB8_qA9_wB0_eA1_rB2_tA3_yB4_uA5_iB6_oA7_pB8_aA9_sB0_dA1_fB2_gA3_hB4_jA5_kB6_lA7_zB8_xA9_cB0_vA1_bB2_nA3_mB4_qA5_wB6_eA7_rB8_tA9_yB0_uA1_iB2_oA3_pB4_aA5_sB6_dA7_fB8_gA9_hB0_jA1_kB2_lA3_zB4__072" + }, + { + position = 73, + --[=[ TODO: update after resolving APPLINK-16052 + + image = + { + imageType = "DYNAMIC", + value = strAppFolder .. "action.png" + },]=] + text = "qA1_wB2_eA3_rB4_tA5_yB6_uA7_iB8_oA9_pB0_aA1_sB2_dA3_fB4_gA5_hB6_jA7_kB8_lA9_zB0_xA1_cB2_vA3_bB4_nA5_mB6_qA7_wB8_eA9_rB0_tA1_yB2_uA3_iB4_oA5_pB6_aA7_sB8_dA9_fB0_gA1_hB2_jA3_kB4_lA5_zB6_xA7_cB8_vA9_bB0_nA1_mB2_qA3_wB4_eA5_rB6_tA7_yB8_uA9_iB0_oA1_pB2_aA3_sB4_dA5_fB6_gA7_hB8_jA9_kB0_lA1_zB2_xA3_cB4_vA5_bB6_nA7_mB8_qA9_wB0_eA1_rB2_tA3_yB4_uA5_iB6_oA7_pB8_aA9_sB0_dA1_fB2_gA3_hB4_jA5_kB6_lA7_zB8_xA9_cB0_vA1_bB2_nA3_mB4_qA5_wB6_eA7_rB8_tA9_yB0_uA1_iB2_oA3_pB4_aA5_sB6_dA7_fB8_gA9_hB0_jA1_kB2_lA3_zB4__073" + }, + { + position = 74, + --[=[ TODO: update after resolving APPLINK-16052 + + image = + { + imageType = "DYNAMIC", + value = strAppFolder .. "action.png" + },]=] + text = "qA1_wB2_eA3_rB4_tA5_yB6_uA7_iB8_oA9_pB0_aA1_sB2_dA3_fB4_gA5_hB6_jA7_kB8_lA9_zB0_xA1_cB2_vA3_bB4_nA5_mB6_qA7_wB8_eA9_rB0_tA1_yB2_uA3_iB4_oA5_pB6_aA7_sB8_dA9_fB0_gA1_hB2_jA3_kB4_lA5_zB6_xA7_cB8_vA9_bB0_nA1_mB2_qA3_wB4_eA5_rB6_tA7_yB8_uA9_iB0_oA1_pB2_aA3_sB4_dA5_fB6_gA7_hB8_jA9_kB0_lA1_zB2_xA3_cB4_vA5_bB6_nA7_mB8_qA9_wB0_eA1_rB2_tA3_yB4_uA5_iB6_oA7_pB8_aA9_sB0_dA1_fB2_gA3_hB4_jA5_kB6_lA7_zB8_xA9_cB0_vA1_bB2_nA3_mB4_qA5_wB6_eA7_rB8_tA9_yB0_uA1_iB2_oA3_pB4_aA5_sB6_dA7_fB8_gA9_hB0_jA1_kB2_lA3_zB4__074" + }, + { + position = 75, + --[=[ TODO: update after resolving APPLINK-16052 + + image = + { + imageType = "DYNAMIC", + value = strAppFolder .. "action.png" + },]=] + text = "qA1_wB2_eA3_rB4_tA5_yB6_uA7_iB8_oA9_pB0_aA1_sB2_dA3_fB4_gA5_hB6_jA7_kB8_lA9_zB0_xA1_cB2_vA3_bB4_nA5_mB6_qA7_wB8_eA9_rB0_tA1_yB2_uA3_iB4_oA5_pB6_aA7_sB8_dA9_fB0_gA1_hB2_jA3_kB4_lA5_zB6_xA7_cB8_vA9_bB0_nA1_mB2_qA3_wB4_eA5_rB6_tA7_yB8_uA9_iB0_oA1_pB2_aA3_sB4_dA5_fB6_gA7_hB8_jA9_kB0_lA1_zB2_xA3_cB4_vA5_bB6_nA7_mB8_qA9_wB0_eA1_rB2_tA3_yB4_uA5_iB6_oA7_pB8_aA9_sB0_dA1_fB2_gA3_hB4_jA5_kB6_lA7_zB8_xA9_cB0_vA1_bB2_nA3_mB4_qA5_wB6_eA7_rB8_tA9_yB0_uA1_iB2_oA3_pB4_aA5_sB6_dA7_fB8_gA9_hB0_jA1_kB2_lA3_zB4__075" + }, + { + position = 76, + --[=[ TODO: update after resolving APPLINK-16052 + + image = + { + imageType = "DYNAMIC", + value = strAppFolder .. "action.png" + },]=] + text = "qA1_wB2_eA3_rB4_tA5_yB6_uA7_iB8_oA9_pB0_aA1_sB2_dA3_fB4_gA5_hB6_jA7_kB8_lA9_zB0_xA1_cB2_vA3_bB4_nA5_mB6_qA7_wB8_eA9_rB0_tA1_yB2_uA3_iB4_oA5_pB6_aA7_sB8_dA9_fB0_gA1_hB2_jA3_kB4_lA5_zB6_xA7_cB8_vA9_bB0_nA1_mB2_qA3_wB4_eA5_rB6_tA7_yB8_uA9_iB0_oA1_pB2_aA3_sB4_dA5_fB6_gA7_hB8_jA9_kB0_lA1_zB2_xA3_cB4_vA5_bB6_nA7_mB8_qA9_wB0_eA1_rB2_tA3_yB4_uA5_iB6_oA7_pB8_aA9_sB0_dA1_fB2_gA3_hB4_jA5_kB6_lA7_zB8_xA9_cB0_vA1_bB2_nA3_mB4_qA5_wB6_eA7_rB8_tA9_yB0_uA1_iB2_oA3_pB4_aA5_sB6_dA7_fB8_gA9_hB0_jA1_kB2_lA3_zB4__076" + }, + { + position = 77, + --[=[ TODO: update after resolving APPLINK-16052 + + image = + { + imageType = "DYNAMIC", + value = strAppFolder .. "action.png" + },]=] + text = "qA1_wB2_eA3_rB4_tA5_yB6_uA7_iB8_oA9_pB0_aA1_sB2_dA3_fB4_gA5_hB6_jA7_kB8_lA9_zB0_xA1_cB2_vA3_bB4_nA5_mB6_qA7_wB8_eA9_rB0_tA1_yB2_uA3_iB4_oA5_pB6_aA7_sB8_dA9_fB0_gA1_hB2_jA3_kB4_lA5_zB6_xA7_cB8_vA9_bB0_nA1_mB2_qA3_wB4_eA5_rB6_tA7_yB8_uA9_iB0_oA1_pB2_aA3_sB4_dA5_fB6_gA7_hB8_jA9_kB0_lA1_zB2_xA3_cB4_vA5_bB6_nA7_mB8_qA9_wB0_eA1_rB2_tA3_yB4_uA5_iB6_oA7_pB8_aA9_sB0_dA1_fB2_gA3_hB4_jA5_kB6_lA7_zB8_xA9_cB0_vA1_bB2_nA3_mB4_qA5_wB6_eA7_rB8_tA9_yB0_uA1_iB2_oA3_pB4_aA5_sB6_dA7_fB8_gA9_hB0_jA1_kB2_lA3_zB4__077" + }, + { + position = 78, + --[=[ TODO: update after resolving APPLINK-16052 + + image = + { + imageType = "DYNAMIC", + value = strAppFolder .. "action.png" + },]=] + text = "qA1_wB2_eA3_rB4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B6_dA7_fB8_gA9_hB0_jA1_kB2_lA3_zB4__079" + }, + { + position = 80, + --[=[ TODO: update after resolving APPLINK-16052 + + image = + { + imageType = "DYNAMIC", + value = strAppFolder .. "action.png" + },]=] + text = "qA1_wB2_eA3_rB4_tA5_yB6_uA7_iB8_oA9_pB0_aA1_sB2_dA3_fB4_gA5_hB6_jA7_kB8_lA9_zB0_xA1_cB2_vA3_bB4_nA5_mB6_qA7_wB8_eA9_rB0_tA1_yB2_uA3_iB4_oA5_pB6_aA7_sB8_dA9_fB0_gA1_hB2_jA3_kB4_lA5_zB6_xA7_cB8_vA9_bB0_nA1_mB2_qA3_wB4_eA5_rB6_tA7_yB8_uA9_iB0_oA1_pB2_aA3_sB4_dA5_fB6_gA7_hB8_jA9_kB0_lA1_zB2_xA3_cB4_vA5_bB6_nA7_mB8_qA9_wB0_eA1_rB2_tA3_yB4_uA5_iB6_oA7_pB8_aA9_sB0_dA1_fB2_gA3_hB4_jA5_kB6_lA7_zB8_xA9_cB0_vA1_bB2_nA3_mB4_qA5_wB6_eA7_rB8_tA9_yB0_uA1_iB2_oA3_pB4_aA5_sB6_dA7_fB8_gA9_hB0_jA1_kB2_lA3_zB4__080" + }, + { + position = 81, + --[=[ TODO: update after resolving APPLINK-16052 + + image = + { + imageType = "DYNAMIC", + value = strAppFolder .. "action.png" + },]=] + text = "qA1_wB2_eA3_rB4_tA5_yB6_uA7_iB8_oA9_pB0_aA1_sB2_dA3_fB4_gA5_hB6_jA7_kB8_lA9_zB0_xA1_cB2_vA3_bB4_nA5_mB6_qA7_wB8_eA9_rB0_tA1_yB2_uA3_iB4_oA5_pB6_aA7_sB8_dA9_fB0_gA1_hB2_jA3_kB4_lA5_zB6_xA7_cB8_vA9_bB0_nA1_mB2_qA3_wB4_eA5_rB6_tA7_yB8_uA9_iB0_oA1_pB2_aA3_sB4_dA5_fB6_gA7_hB8_jA9_kB0_lA1_zB2_xA3_cB4_vA5_bB6_nA7_mB8_qA9_wB0_eA1_rB2_tA3_yB4_uA5_iB6_oA7_pB8_aA9_sB0_dA1_fB2_gA3_hB4_jA5_kB6_lA7_zB8_xA9_cB0_vA1_bB2_nA3_mB4_qA5_wB6_eA7_rB8_tA9_yB0_uA1_iB2_oA3_pB4_aA5_sB6_dA7_fB8_gA9_hB0_jA1_kB2_lA3_zB4__081" + }, + { + position = 82, + --[=[ TODO: update after resolving APPLINK-16052 + + image = + { + imageType = "DYNAMIC", + value = strAppFolder .. "action.png" + },]=] + text = "qA1_wB2_eA3_rB4_tA5_yB6_uA7_iB8_oA9_pB0_aA1_sB2_dA3_fB4_gA5_hB6_jA7_kB8_lA9_zB0_xA1_cB2_vA3_bB4_nA5_mB6_qA7_wB8_eA9_rB0_tA1_yB2_uA3_iB4_oA5_pB6_aA7_sB8_dA9_fB0_gA1_hB2_jA3_kB4_lA5_zB6_xA7_cB8_vA9_bB0_nA1_mB2_qA3_wB4_eA5_rB6_tA7_yB8_uA9_iB0_oA1_pB2_aA3_sB4_dA5_fB6_gA7_hB8_jA9_kB0_lA1_zB2_xA3_cB4_vA5_bB6_nA7_mB8_qA9_wB0_eA1_rB2_tA3_yB4_uA5_iB6_oA7_pB8_aA9_sB0_dA1_fB2_gA3_hB4_jA5_kB6_lA7_zB8_xA9_cB0_vA1_bB2_nA3_mB4_qA5_wB6_eA7_rB8_tA9_yB0_uA1_iB2_oA3_pB4_aA5_sB6_dA7_fB8_gA9_hB0_jA1_kB2_lA3_zB4__082" + }, + { + position = 83, + --[=[ TODO: update after resolving APPLINK-16052 + + image = + { + imageType = "DYNAMIC", + value = strAppFolder .. "action.png" + },]=] + text = "qA1_wB2_eA3_rB4_tA5_yB6_uA7_iB8_oA9_pB0_aA1_sB2_dA3_fB4_gA5_hB6_jA7_kB8_lA9_zB0_xA1_cB2_vA3_bB4_nA5_mB6_qA7_wB8_eA9_rB0_tA1_yB2_uA3_iB4_oA5_pB6_aA7_sB8_dA9_fB0_gA1_hB2_jA3_kB4_lA5_zB6_xA7_cB8_vA9_bB0_nA1_mB2_qA3_wB4_eA5_rB6_tA7_yB8_uA9_iB0_oA1_pB2_aA3_sB4_dA5_fB6_gA7_hB8_jA9_kB0_lA1_zB2_xA3_cB4_vA5_bB6_nA7_mB8_qA9_wB0_eA1_rB2_tA3_yB4_uA5_iB6_oA7_pB8_aA9_sB0_dA1_fB2_gA3_hB4_jA5_kB6_lA7_zB8_xA9_cB0_vA1_bB2_nA3_mB4_qA5_wB6_eA7_rB8_tA9_yB0_uA1_iB2_oA3_pB4_aA5_sB6_dA7_fB8_gA9_hB0_jA1_kB2_lA3_zB4__083" + }, + { + position = 84, + --[=[ TODO: update after resolving APPLINK-16052 + + image = + { + imageType = "DYNAMIC", + value = strAppFolder .. "action.png" + },]=] + text = "qA1_wB2_eA3_rB4_tA5_yB6_uA7_iB8_oA9_pB0_aA1_sB2_dA3_fB4_gA5_hB6_jA7_kB8_lA9_zB0_xA1_cB2_vA3_bB4_nA5_mB6_qA7_wB8_eA9_rB0_tA1_yB2_uA3_iB4_oA5_pB6_aA7_sB8_dA9_fB0_gA1_hB2_jA3_kB4_lA5_zB6_xA7_cB8_vA9_bB0_nA1_mB2_qA3_wB4_eA5_rB6_tA7_yB8_uA9_iB0_oA1_pB2_aA3_sB4_dA5_fB6_gA7_hB8_jA9_kB0_lA1_zB2_xA3_cB4_vA5_bB6_nA7_mB8_qA9_wB0_eA1_rB2_tA3_yB4_uA5_iB6_oA7_pB8_aA9_sB0_dA1_fB2_gA3_hB4_jA5_kB6_lA7_zB8_xA9_cB0_vA1_bB2_nA3_mB4_qA5_wB6_eA7_rB8_tA9_yB0_uA1_iB2_oA3_pB4_aA5_sB6_dA7_fB8_gA9_hB0_jA1_kB2_lA3_zB4__084" + }, + { + position = 85, + --[=[ TODO: update after resolving APPLINK-16052 + + image = + { + imageType = "DYNAMIC", + value = strAppFolder .. "action.png" + },]=] + text = "qA1_wB2_eA3_rB4_tA5_yB6_uA7_iB8_oA9_pB0_aA1_sB2_dA3_fB4_gA5_hB6_jA7_kB8_lA9_zB0_xA1_cB2_vA3_bB4_nA5_mB6_qA7_wB8_eA9_rB0_tA1_yB2_uA3_iB4_oA5_pB6_aA7_sB8_dA9_fB0_gA1_hB2_jA3_kB4_lA5_zB6_xA7_cB8_vA9_bB0_nA1_mB2_qA3_wB4_eA5_rB6_tA7_yB8_uA9_iB0_oA1_pB2_aA3_sB4_dA5_fB6_gA7_hB8_jA9_kB0_lA1_zB2_xA3_cB4_vA5_bB6_nA7_mB8_qA9_wB0_eA1_rB2_tA3_yB4_uA5_iB6_oA7_pB8_aA9_sB0_dA1_fB2_gA3_hB4_jA5_kB6_lA7_zB8_xA9_cB0_vA1_bB2_nA3_mB4_qA5_wB6_eA7_rB8_tA9_yB0_uA1_iB2_oA3_pB4_aA5_sB6_dA7_fB8_gA9_hB0_jA1_kB2_lA3_zB4__085" + }, + { + position = 86, + --[=[ TODO: update after resolving APPLINK-16052 + + image = + { + imageType = "DYNAMIC", + value = strAppFolder .. "action.png" + },]=] + text = "qA1_wB2_eA3_rB4_tA5_yB6_uA7_iB8_oA9_pB0_aA1_sB2_dA3_fB4_gA5_hB6_jA7_kB8_lA9_zB0_xA1_cB2_vA3_bB4_nA5_mB6_qA7_wB8_eA9_rB0_tA1_yB2_uA3_iB4_oA5_pB6_aA7_sB8_dA9_fB0_gA1_hB2_jA3_kB4_lA5_zB6_xA7_cB8_vA9_bB0_nA1_mB2_qA3_wB4_eA5_rB6_tA7_yB8_uA9_iB0_oA1_pB2_aA3_sB4_dA5_fB6_gA7_hB8_jA9_kB0_lA1_zB2_xA3_cB4_vA5_bB6_nA7_mB8_qA9_wB0_eA1_rB2_tA3_yB4_uA5_iB6_oA7_pB8_aA9_sB0_dA1_fB2_gA3_hB4_jA5_kB6_lA7_zB8_xA9_cB0_vA1_bB2_nA3_mB4_qA5_wB6_eA7_rB8_tA9_yB0_uA1_iB2_oA3_pB4_aA5_sB6_dA7_fB8_gA9_hB0_jA1_kB2_lA3_zB4__086" + }, + { + position = 87, + --[=[ TODO: update after resolving APPLINK-16052 + + image = + { + imageType = "DYNAMIC", + value = strAppFolder .. "action.png" + },]=] + text = "qA1_wB2_eA3_rB4_tA5_yB6_uA7_iB8_oA9_pB0_aA1_sB2_dA3_fB4_gA5_hB6_jA7_kB8_lA9_zB0_xA1_cB2_vA3_bB4_nA5_mB6_qA7_wB8_eA9_rB0_tA1_yB2_uA3_iB4_oA5_pB6_aA7_sB8_dA9_fB0_gA1_hB2_jA3_kB4_lA5_zB6_xA7_cB8_vA9_bB0_nA1_mB2_qA3_wB4_eA5_rB6_tA7_yB8_uA9_iB0_oA1_pB2_aA3_sB4_dA5_fB6_gA7_hB8_jA9_kB0_lA1_zB2_xA3_cB4_vA5_bB6_nA7_mB8_qA9_wB0_eA1_rB2_tA3_yB4_uA5_iB6_oA7_pB8_aA9_sB0_dA1_fB2_gA3_hB4_jA5_kB6_lA7_zB8_xA9_cB0_vA1_bB2_nA3_mB4_qA5_wB6_eA7_rB8_tA9_yB0_uA1_iB2_oA3_pB4_aA5_sB6_dA7_fB8_gA9_hB0_jA1_kB2_lA3_zB4__087" + }, + { + position = 88, + --[=[ TODO: update after resolving APPLINK-16052 + + image = + { + imageType = "DYNAMIC", + value = strAppFolder .. "action.png" + },]=] + text = "qA1_wB2_eA3_rB4_tA5_yB6_uA7_iB8_oA9_pB0_aA1_sB2_dA3_fB4_gA5_hB6_jA7_kB8_lA9_zB0_xA1_cB2_vA3_bB4_nA5_mB6_qA7_wB8_eA9_rB0_tA1_yB2_uA3_iB4_oA5_pB6_aA7_sB8_dA9_fB0_gA1_hB2_jA3_kB4_lA5_zB6_xA7_cB8_vA9_bB0_nA1_mB2_qA3_wB4_eA5_rB6_tA7_yB8_uA9_iB0_oA1_pB2_aA3_sB4_dA5_fB6_gA7_hB8_jA9_kB0_lA1_zB2_xA3_cB4_vA5_bB6_nA7_mB8_qA9_wB0_eA1_rB2_tA3_yB4_uA5_iB6_oA7_pB8_aA9_sB0_dA1_fB2_gA3_hB4_jA5_kB6_lA7_zB8_xA9_cB0_vA1_bB2_nA3_mB4_qA5_wB6_eA7_rB8_tA9_yB0_uA1_iB2_oA3_pB4_aA5_sB6_dA7_fB8_gA9_hB0_jA1_kB2_lA3_zB4__088" + }, + { + position = 89, + --[=[ TODO: update after resolving APPLINK-16052 + + image = + { + imageType = "DYNAMIC", + value = strAppFolder .. "action.png" + },]=] + text = "qA1_wB2_eA3_rB4_tA5_yB6_uA7_iB8_oA9_pB0_aA1_sB2_dA3_fB4_gA5_hB6_jA7_kB8_lA9_zB0_xA1_cB2_vA3_bB4_nA5_mB6_qA7_wB8_eA9_rB0_tA1_yB2_uA3_iB4_oA5_pB6_aA7_sB8_dA9_fB0_gA1_hB2_jA3_kB4_lA5_zB6_xA7_cB8_vA9_bB0_nA1_mB2_qA3_wB4_eA5_rB6_tA7_yB8_uA9_iB0_oA1_pB2_aA3_sB4_dA5_fB6_gA7_hB8_jA9_kB0_lA1_zB2_xA3_cB4_vA5_bB6_nA7_mB8_qA9_wB0_eA1_rB2_tA3_yB4_uA5_iB6_oA7_pB8_aA9_sB0_dA1_fB2_gA3_hB4_jA5_kB6_lA7_zB8_xA9_cB0_vA1_bB2_nA3_mB4_qA5_wB6_eA7_rB8_tA9_yB0_uA1_iB2_oA3_pB4_aA5_sB6_dA7_fB8_gA9_hB0_jA1_kB2_lA3_zB4__089" + }, + { + position = 90, + --[=[ TODO: update after resolving APPLINK-16052 + + image = + { + imageType = "DYNAMIC", + value = strAppFolder .. "action.png" + },]=] + text = "qA1_wB2_eA3_rB4_tA5_yB6_uA7_iB8_oA9_pB0_aA1_sB2_dA3_fB4_gA5_hB6_jA7_kB8_lA9_zB0_xA1_cB2_vA3_bB4_nA5_mB6_qA7_wB8_eA9_rB0_tA1_yB2_uA3_iB4_oA5_pB6_aA7_sB8_dA9_fB0_gA1_hB2_jA3_kB4_lA5_zB6_xA7_cB8_vA9_bB0_nA1_mB2_qA3_wB4_eA5_rB6_tA7_yB8_uA9_iB0_oA1_pB2_aA3_sB4_dA5_fB6_gA7_hB8_jA9_kB0_lA1_zB2_xA3_cB4_vA5_bB6_nA7_mB8_qA9_wB0_eA1_rB2_tA3_yB4_uA5_iB6_oA7_pB8_aA9_sB0_dA1_fB2_gA3_hB4_jA5_kB6_lA7_zB8_xA9_cB0_vA1_bB2_nA3_mB4_qA5_wB6_eA7_rB8_tA9_yB0_uA1_iB2_oA3_pB4_aA5_sB6_dA7_fB8_gA9_hB0_jA1_kB2_lA3_zB4__090" + }, + { + position = 91, + --[=[ TODO: update after resolving APPLINK-16052 + + image = + { + imageType = "DYNAMIC", + value = strAppFolder .. "action.png" + },]=] + text = "qA1_wB2_eA3_rB4_tA5_yB6_uA7_iB8_oA9_pB0_aA1_sB2_dA3_fB4_gA5_hB6_jA7_kB8_lA9_zB0_xA1_cB2_vA3_bB4_nA5_mB6_qA7_wB8_eA9_rB0_tA1_yB2_uA3_iB4_oA5_pB6_aA7_sB8_dA9_fB0_gA1_hB2_jA3_kB4_lA5_zB6_xA7_cB8_vA9_bB0_nA1_mB2_qA3_wB4_eA5_rB6_tA7_yB8_uA9_iB0_oA1_pB2_aA3_sB4_dA5_fB6_gA7_hB8_jA9_kB0_lA1_zB2_xA3_cB4_vA5_bB6_nA7_mB8_qA9_wB0_eA1_rB2_tA3_yB4_uA5_iB6_oA7_pB8_aA9_sB0_dA1_fB2_gA3_hB4_jA5_kB6_lA7_zB8_xA9_cB0_vA1_bB2_nA3_mB4_qA5_wB6_eA7_rB8_tA9_yB0_uA1_iB2_oA3_pB4_aA5_sB6_dA7_fB8_gA9_hB0_jA1_kB2_lA3_zB4__091" + }, + { + position = 92, + --[=[ TODO: update after resolving APPLINK-16052 + + image = + { + imageType = "DYNAMIC", + value = strAppFolder .. "action.png" + },]=] + text = "qA1_wB2_eA3_rB4_tA5_yB6_uA7_iB8_oA9_pB0_aA1_sB2_dA3_fB4_gA5_hB6_jA7_kB8_lA9_zB0_xA1_cB2_vA3_bB4_nA5_mB6_qA7_wB8_eA9_rB0_tA1_yB2_uA3_iB4_oA5_pB6_aA7_sB8_dA9_fB0_gA1_hB2_jA3_kB4_lA5_zB6_xA7_cB8_vA9_bB0_nA1_mB2_qA3_wB4_eA5_rB6_tA7_yB8_uA9_iB0_oA1_pB2_aA3_sB4_dA5_fB6_gA7_hB8_jA9_kB0_lA1_zB2_xA3_cB4_vA5_bB6_nA7_mB8_qA9_wB0_eA1_rB2_tA3_yB4_uA5_iB6_oA7_pB8_aA9_sB0_dA1_fB2_gA3_hB4_jA5_kB6_lA7_zB8_xA9_cB0_vA1_bB2_nA3_mB4_qA5_wB6_eA7_rB8_tA9_yB0_uA1_iB2_oA3_pB4_aA5_sB6_dA7_fB8_gA9_hB0_jA1_kB2_lA3_zB4__092" + }, + { + position = 93, + --[=[ TODO: update after resolving APPLINK-16052 + + image = + { + imageType = "DYNAMIC", + value = strAppFolder .. "action.png" + },]=] + text = "qA1_wB2_eA3_rB4_tA5_yB6_uA7_iB8_oA9_pB0_aA1_sB2_dA3_fB4_gA5_hB6_jA7_kB8_lA9_zB0_xA1_cB2_vA3_bB4_nA5_mB6_qA7_wB8_eA9_rB0_tA1_yB2_uA3_iB4_oA5_pB6_aA7_sB8_dA9_fB0_gA1_hB2_jA3_kB4_lA5_zB6_xA7_cB8_vA9_bB0_nA1_mB2_qA3_wB4_eA5_rB6_tA7_yB8_uA9_iB0_oA1_pB2_aA3_sB4_dA5_fB6_gA7_hB8_jA9_kB0_lA1_zB2_xA3_cB4_vA5_bB6_nA7_mB8_qA9_wB0_eA1_rB2_tA3_yB4_uA5_iB6_oA7_pB8_aA9_sB0_dA1_fB2_gA3_hB4_jA5_kB6_lA7_zB8_xA9_cB0_vA1_bB2_nA3_mB4_qA5_wB6_eA7_rB8_tA9_yB0_uA1_iB2_oA3_pB4_aA5_sB6_dA7_fB8_gA9_hB0_jA1_kB2_lA3_zB4__093" + }, + { + position = 94, + --[=[ TODO: update after resolving APPLINK-16052 + + image = + { + imageType = "DYNAMIC", + value = strAppFolder .. "action.png" + },]=] + text = "qA1_wB2_eA3_rB4_tA5_yB6_uA7_iB8_oA9_pB0_aA1_sB2_dA3_fB4_gA5_hB6_jA7_kB8_lA9_zB0_xA1_cB2_vA3_bB4_nA5_mB6_qA7_wB8_eA9_rB0_tA1_yB2_uA3_iB4_oA5_pB6_aA7_sB8_dA9_fB0_gA1_hB2_jA3_kB4_lA5_zB6_xA7_cB8_vA9_bB0_nA1_mB2_qA3_wB4_eA5_rB6_tA7_yB8_uA9_iB0_oA1_pB2_aA3_sB4_dA5_fB6_gA7_hB8_jA9_kB0_lA1_zB2_xA3_cB4_vA5_bB6_nA7_mB8_qA9_wB0_eA1_rB2_tA3_yB4_uA5_iB6_oA7_pB8_aA9_sB0_dA1_fB2_gA3_hB4_jA5_kB6_lA7_zB8_xA9_cB0_vA1_bB2_nA3_mB4_qA5_wB6_eA7_rB8_tA9_yB0_uA1_iB2_oA3_pB4_aA5_sB6_dA7_fB8_gA9_hB0_jA1_kB2_lA3_zB4__094" + }, + { + position = 95, + --[=[ TODO: update after resolving APPLINK-16052 + + image = + { + imageType = "DYNAMIC", + value = strAppFolder .. "action.png" + },]=] + text = "qA1_wB2_eA3_rB4_tA5_yB6_uA7_iB8_oA9_pB0_aA1_sB2_dA3_fB4_gA5_hB6_jA7_kB8_lA9_zB0_xA1_cB2_vA3_bB4_nA5_mB6_qA7_wB8_eA9_rB0_tA1_yB2_uA3_iB4_oA5_pB6_aA7_sB8_dA9_fB0_gA1_hB2_jA3_kB4_lA5_zB6_xA7_cB8_vA9_bB0_nA1_mB2_qA3_wB4_eA5_rB6_tA7_yB8_uA9_iB0_oA1_pB2_aA3_sB4_dA5_fB6_gA7_hB8_jA9_kB0_lA1_zB2_xA3_cB4_vA5_bB6_nA7_mB8_qA9_wB0_eA1_rB2_tA3_yB4_uA5_iB6_oA7_pB8_aA9_sB0_dA1_fB2_gA3_hB4_jA5_kB6_lA7_zB8_xA9_cB0_vA1_bB2_nA3_mB4_qA5_wB6_eA7_rB8_tA9_yB0_uA1_iB2_oA3_pB4_aA5_sB6_dA7_fB8_gA9_hB0_jA1_kB2_lA3_zB4__095" + }, + { + position = 96, + --[=[ TODO: update after resolving APPLINK-16052 + + image = + { + imageType = "DYNAMIC", + value = strAppFolder .. "action.png" + },]=] + text = "qA1_wB2_eA3_rB4_tA5_yB6_uA7_iB8_oA9_pB0_aA1_sB2_dA3_fB4_gA5_hB6_jA7_kB8_lA9_zB0_xA1_cB2_vA3_bB4_nA5_mB6_qA7_wB8_eA9_rB0_tA1_yB2_uA3_iB4_oA5_pB6_aA7_sB8_dA9_fB0_gA1_hB2_jA3_kB4_lA5_zB6_xA7_cB8_vA9_bB0_nA1_mB2_qA3_wB4_eA5_rB6_tA7_yB8_uA9_iB0_oA1_pB2_aA3_sB4_dA5_fB6_gA7_hB8_jA9_kB0_lA1_zB2_xA3_cB4_vA5_bB6_nA7_mB8_qA9_wB0_eA1_rB2_tA3_yB4_uA5_iB6_oA7_pB8_aA9_sB0_dA1_fB2_gA3_hB4_jA5_kB6_lA7_zB8_xA9_cB0_vA1_bB2_nA3_mB4_qA5_wB6_eA7_rB8_tA9_yB0_uA1_iB2_oA3_pB4_aA5_sB6_dA7_fB8_gA9_hB0_jA1_kB2_lA3_zB4__096" + }, + { + position = 97, + --[=[ TODO: update after resolving APPLINK-16052 + + image = + { + imageType = "DYNAMIC", + value = strAppFolder .. "action.png" + },]=] + text = "qA1_wB2_eA3_rB4_tA5_yB6_uA7_iB8_oA9_pB0_aA1_sB2_dA3_fB4_gA5_hB6_jA7_kB8_lA9_zB0_xA1_cB2_vA3_bB4_nA5_mB6_qA7_wB8_eA9_rB0_tA1_yB2_uA3_iB4_oA5_pB6_aA7_sB8_dA9_fB0_gA1_hB2_jA3_kB4_lA5_zB6_xA7_cB8_vA9_bB0_nA1_mB2_qA3_wB4_eA5_rB6_tA7_yB8_uA9_iB0_oA1_pB2_aA3_sB4_dA5_fB6_gA7_hB8_jA9_kB0_lA1_zB2_xA3_cB4_vA5_bB6_nA7_mB8_qA9_wB0_eA1_rB2_tA3_yB4_uA5_iB6_oA7_pB8_aA9_sB0_dA1_fB2_gA3_hB4_jA5_kB6_lA7_zB8_xA9_cB0_vA1_bB2_nA3_mB4_qA5_wB6_eA7_rB8_tA9_yB0_uA1_iB2_oA3_pB4_aA5_sB6_dA7_fB8_gA9_hB0_jA1_kB2_lA3_zB4__097" + }, + { + position = 98, + --[=[ TODO: update after resolving APPLINK-16052 + + image = + { + imageType = "DYNAMIC", + value = strAppFolder .. "action.png" + },]=] + text = "qA1_wB2_eA3_rB4_tA5_yB6_uA7_iB8_oA9_pB0_aA1_sB2_dA3_fB4_gA5_hB6_jA7_kB8_lA9_zB0_xA1_cB2_vA3_bB4_nA5_mB6_qA7_wB8_eA9_rB0_tA1_yB2_uA3_iB4_oA5_pB6_aA7_sB8_dA9_fB0_gA1_hB2_jA3_kB4_lA5_zB6_xA7_cB8_vA9_bB0_nA1_mB2_qA3_wB4_eA5_rB6_tA7_yB8_uA9_iB0_oA1_pB2_aA3_sB4_dA5_fB6_gA7_hB8_jA9_kB0_lA1_zB2_xA3_cB4_vA5_bB6_nA7_mB8_qA9_wB0_eA1_rB2_tA3_yB4_uA5_iB6_oA7_pB8_aA9_sB0_dA1_fB2_gA3_hB4_jA5_kB6_lA7_zB8_xA9_cB0_vA1_bB2_nA3_mB4_qA5_wB6_eA7_rB8_tA9_yB0_uA1_iB2_oA3_pB4_aA5_sB6_dA7_fB8_gA9_hB0_jA1_kB2_lA3_zB4__098" + }, + { + position = 99, + --[=[ TODO: update after resolving APPLINK-16052 + + image = + { + imageType = "DYNAMIC", + value = strAppFolder .. "action.png" + },]=] + text = "qA1_wB2_eA3_rB4_tA5_yB6_uA7_iB8_oA9_pB0_aA1_sB2_dA3_fB4_gA5_hB6_jA7_kB8_lA9_zB0_xA1_cB2_vA3_bB4_nA5_mB6_qA7_wB8_eA9_rB0_tA1_yB2_uA3_iB4_oA5_pB6_aA7_sB8_dA9_fB0_gA1_hB2_jA3_kB4_lA5_zB6_xA7_cB8_vA9_bB0_nA1_mB2_qA3_wB4_eA5_rB6_tA7_yB8_uA9_iB0_oA1_pB2_aA3_sB4_dA5_fB6_gA7_hB8_jA9_kB0_lA1_zB2_xA3_cB4_vA5_bB6_nA7_mB8_qA9_wB0_eA1_rB2_tA3_yB4_uA5_iB6_oA7_pB8_aA9_sB0_dA1_fB2_gA3_hB4_jA5_kB6_lA7_zB8_xA9_cB0_vA1_bB2_nA3_mB4_qA5_wB6_eA7_rB8_tA9_yB0_uA1_iB2_oA3_pB4_aA5_sB6_dA7_fB8_gA9_hB0_jA1_kB2_lA3_zB4__099" + }, + { + position = 100, + --[=[ TODO: update after resolving APPLINK-16052 + + image = + { + imageType = "DYNAMIC", + value = strAppFolder .. "action.png" + },]=] + text = "qA1_wB2_eA3_rB4_tA5_yB6_uA7_iB8_oA9_pB0_aA1_sB2_dA3_fB4_gA5_hB6_jA7_kB8_lA9_zB0_xA1_cB2_vA3_bB4_nA5_mB6_qA7_wB8_eA9_rB0_tA1_yB2_uA3_iB4_oA5_pB6_aA7_sB8_dA9_fB0_gA1_hB2_jA3_kB4_lA5_zB6_xA7_cB8_vA9_bB0_nA1_mB2_qA3_wB4_eA5_rB6_tA7_yB8_uA9_iB0_oA1_pB2_aA3_sB4_dA5_fB6_gA7_hB8_jA9_kB0_lA1_zB2_xA3_cB4_vA5_bB6_nA7_mB8_qA9_wB0_eA1_rB2_tA3_yB4_uA5_iB6_oA7_pB8_aA9_sB0_dA1_fB2_gA3_hB4_jA5_kB6_lA7_zB8_xA9_cB0_vA1_bB2_nA3_mB4_qA5_wB6_eA7_rB8_tA9_yB0_uA1_iB2_oA3_pB4_aA5_sB6_dA7_fB8_gA9_hB0_jA1_kB2_lA3_zB4__100" + } + }, + --Checked below + -- menuIcon = + -- { + -- imageType = "DYNAMIC", + -- value = strAppFolder .. "action.png" + -- }, + vrHelpTitle = "qA1_wB2_eA3_rB4_tA5_yB6_uA7_iB8_oA9_pB0_aA1_sB2_dA3_fB4_gA5_hB6_jA7_kB8_lA9_zB0_xA1_cB2_vA3_bB4_nA5_mB6_qA7_wB8_eA9_rB0_tA1_yB2_uA3_iB4_oA5_pB6_aA7_sB8_dA9_fB0_gA1_hB2_jA3_kB4_lA5_zB6_xA7_cB8_vA9_bB0_nA1_mB2_qA3_wB4_eA5_rB6_tA7_yB8_uA9_iB0_oA1_pB2_aA3_sB4_dA5_fB6_gA7_hB8_jA9_kB0_lA1_zB2_xA3_cB4_vA5_bB6_nA7_mB8_qA9_wB0_eA1_rB2_tA3_yB4_uA5_iB6_oA7_pB8_aA9_sB0_dA1_fB2_gA3_hB4_jA5_kB6_lA7_zB8_xA9_cB0_vA1_bB2_nA3_mB4_qA5_wB6_eA7_rB8_tA9_yB0_uA1_iB2_oA3_pB4_aA5_sB6_dA7_fB8_gA9_hB0_jA1_kB2_lA3_zB4_xA5_", + keyboardProperties = + { + keyboardLayout = "QWERTY", + keypressMode = "SINGLE_KEYPRESS", + --[=[ TODO: update after resolving APPLINK-16047 + + limitedCharacterList = + { + "q", + "q", + "q", + "q", + "q", + "q", + "q", + "q", + "q", + "q", + "q", + "q", + "q", + "q", + "q", + "q", + "q", + "q", + "q", + "q", + "q", + "q", + "q", + "q", + "q", + "q", + "q", + "q", + "q", + "q", + "q", + "q", + "q", + "q", + "q", + "q", + "q", + "q", + "q", + "q", + "q", + "q", + "q", + "q", + "q", + "q", + "q", + "q", + "q", + "q", + "q", + "q", + "q", + "q", + "q", + "q", + "q", + "q", + "q", + "q", + "q", + "q", + "q", + "q", + "q", + "q", + "q", + "q", + "q", + "q", + "q", + "q", + "q", + "q", + "q", + "q", + "q", + "q", + "q", + "q", + "q", + "q", + "q", + "q", + "q", + "q", + "q", + "q", + "q", + "q", + "q", + "q", + "q", + "q", + "q", + "q", + "q", + "q", + "q", + "q" + },]=] + language = "EN-US", + autoCompleteText = "qA1_wB2_eA3_rB4_tA5_yB6_uA7_iB8_oA9_pB0_aA1_sB2_dA3_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lobalProperties response + self.hmiConnection:SendResponse(data.id, data.method, "SUCCESS", {}) + end) + + --mobile side: expect SetGlobalProperties response + EXPECT_RESPONSE(cid, { success = true, resultCode = "SUCCESS"}) + :Timeout(iTimeout) + + --mobile side: expect OnHashChange notification + EXPECT_NOTIFICATION("OnHashChange") + end + + --End test case PositiveResponseCheck.1.119 + --------------------------------------------------------------------------------- +--End test case PositiveResponseCheck.1 + + +---------------------------------------------------------------------------------------------- +----------------------------------------III TEST BLOCK---------------------------------------- +----------------------------------------Negative cases---------------------------------------- +---------------------------------------------------------------------------------------------- + + --=================================================================================-- + ---------------------------------Negative request check------------------------------ + --=================================================================================-- + + +--Begin test case NegativeRequestCheck.1 +--Description: Check negative request + + --Requirement id in JAMA: SDLAQ-CRS-11, SDLAQ-CRS-383 + + --Verification criteria: + --The request with wrong JSON syntax is sent, the response comes with INVALID_DATA result code. + --The request with "helpPrompt" value out of bounds is sent, the response comes with INVALID_DATA result code. + --The request with "timeoutPrompt" value out of bounds is sent, the response comes with INVALID_DATA result code. + --The request with "VRHelpItem" value out of bounds is sent, the response comes with INVALID_DATA result code. + --The request with empty "helpPrompt" ttsChunk value is sent, the response comes with INVALID_DATA result code. + --The request with empty "timeoutPrompt" ttsChunk value is sent, the response comes with INVALID_DATA result code. + --The request with empty "vrHelpTitle" value is sent, the response comes with INVALID_DATA result code. + --The request with empty "vrHelp" array is sent, the response comes with INVALID_DATA result code. + --The request with empty "helpPrompt" array is sent, the response comes with INVALID_DATA result code. + --The request with empty "timeoutPrompt" array is sent, the response comes with INVALID_DATA result code. + --The request with empty "VRHelpItem" value is sent, the response comes with INVALID_DATA result code. + --The request with "vrHelpTitle" value greater than 500 symbols is sent, the response comes with INVALID_DATA result code. + --The request with "helpPrompt" array which contains more than 100 items is sent, the response comes with INVALID_DATA result code. + --The request with "timeoutPrompt" array which contains more than 100 items is sent, the response comes with INVALID_DATA result code. + --The request with "vrHelp" array which contains more than 100 items is sent, the response comes with INVALID_DATA result code. + --The request with wrong "helpPrompt" value is sent, the response comes with INVALID_DATA result code. + --The request with wrong "timeoutPrompt" value is sent, the response comes with INVALID_DATA result code. + --The request with wrong type of "vrHelpTitle" parameter is sent, the response comes with INVALID_DATA result code. + --The request with wrong type of "vrHelpItem" text parameter is sent, the response comes with INVALID_DATA result code. + --The request with wrong type of "vrHelpItem" position parameter is sent (e.g. String), the response comes with INVALID_DATA result code. + --The request with "vrHelp" array which contains at least one image element with wrong image path (the file does not exist) is sent, the response comes with INVALID_DATA result code. + --5. app->SDL: SetGlobalProperties{TTSChunk{text: "abcd\nabcd"}, params}} //then, SetGlobalProperties {TTSChunk{text: "abcd\tabcd"}}, thenSetGlobalProperties {TTSChunk{text: " "}} SDL-app: SetGlobalProperties{INVALID_DATA} + -- 5.1. app->SDL: SetGlobalProperties{VrHelpItem{Image{{value: "abcd\nabcd"}, params}} //then, SetGlobalProperties {VrHelpItem{Image{{value: "abcd\tabcd"}}, thenSetGlobalProperties {VrHelpItem{Image{{value: " "}} SDL-app: SetGlobalProperties{INVALID_DATA} + -- 5.2. app->SDL: SetGlobalProperties{menuIcon{value: "abcd\nabcd"}, params}} //then, SetGlobalProperties {menuIcon{{value: "abcd\tabcd"}}, thenSetGlobalProperties {VmenuIcon{value: " "}} SDL-app: SetGlobalProperties{INVALID_DATA} + --5.3. app->SDL: SetGlobalProperties{VrHelpTitle: "abcd\nabcd"}, params}} //then, SetGlobalProperties {VrHelpTitle: "abcd\tabcd"}}, thenSetGlobalProperties {VrHelpTitle: " "}} SDL-app: SetGlobalProperties{INVALID_DATA} + --5.4. app->SDL: SetGlobalProperties{VrHelpItem{text: "abcd\nabcd"}, params}} //then, SetGlobalProperties {VrHelpItem{text: "abcd\tabcd"}}, thenSetGlobalProperties {VrHelpItem{text: " "}} SDL-app: SetGlobalProperties{INVALID_DATA} + --5.5. app->SDL: SetGlobalProperties{menuTitle: "abcd\nabcd"}, params}} //then, SetGlobalProperties {menuTitle: "abcd\tabcd"}}, thenSetGlobalProperties {menuTitle: " "}} SDL-app: SetGlobalProperties{INVALID_DATA} + --5.6. app->SDL: SetGlobalProperties{KeyboardProperties{limitedCharacterList: "abcd\nabcd"}, params}} //then, SetGlobalProperties {KeyboardProperties{limitedCharacterList: "abcd\tabcd"}}, then SetGlobalProperties {KeyboardProperties{limitedCharacterList: " "}} SDL-app: SetGlobalProperties{INVALID_DATA} + --5.7. app->SDL: SetGlobalProperties{KeyboardProperties{autoCompleteText: "abcd\nabcd"}, params}} //then, SetGlobalProperties {KeyboardProperties{autoCompleteText: "abcd\tabcd"}}, then SetGlobalProperties {KeyboardProperties{autoCompleteText: " "}} SDL-app: SetGlobalProperties{INVALID_DATA} + --The request with no parameters (any of helpPrompt, timeoutPrompt, vrHelpTitle, vrHelp parameters do not exist ) is sent, the response comes with INVALID_DATA result code. + --The request with empty "vrHelpItem" value is sent, the response comes with INVALID_DATA result code. + --The request with empty "image" value of vrHelpItem is sent, the response comes with INVALID_DATA result code. + + --Begin test case NegativeRequestCheck.1.1 + --Description: Check helpPrompt parameter is wrong type + + function Test:SetGlobalProperties_helpPrompt_Array_WrongType_123_INVALID_DATA() + + --mobile side: sending SetGlobalProperties request + local cid = self.mobileSession:SendRPC("SetGlobalProperties", + { + menuTitle = "Menu Title", + timeoutPrompt = + { + { + text = "Timeout prompt", + type = "TEXT" + } + }, + vrHelp = + { + { + position = 1, + image = + { + value = "action.png", + imageType = "DYNAMIC" + }, + text = "VR help item" + } + }, + menuIcon = + { + value = "action.png", + imageType = "DYNAMIC" + }, + helpPrompt = 123, + vrHelpTitle = "VR help title", + keyboardProperties = + { + keyboardLayout = "QWERTY", + keypressMode = "SINGLE_KEYPRESS", + limitedCharacterList = + { + "a" + }, + language = "EN-US", + autoCompleteText = "Daemon, Freedom" + } + }) + + + --mobile side: expect SetGlobalProperties response + EXPECT_RESPONSE(cid, { success = false, resultCode = "INVALID_DATA"}) + :Timeout(iTimeout) + + --mobile side: expect OnHashChange notification is not send to mobile + EXPECT_NOTIFICATION("OnHashChange") + :Times(0) + end + + --End test case NegativeRequestCheck.1.1 + ----------------------------------------------------------------------------------------- + + --Begin test case NegativeRequestCheck.1.2 + --Description: Check helpPrompt parameter is out lower bound + + function Test:SetGlobalProperties_helpPrompt_Array_Outminsize_0_INVALID_DATA() + + --mobile side: sending SetGlobalProperties request + local cid = self.mobileSession:SendRPC("SetGlobalProperties", + { + menuTitle = "Menu Title", + timeoutPrompt = + { + { + text = "Timeout prompt", + type = "TEXT" + } + }, + vrHelp = + { + { + position = 1, + image = + { + value = "action.png", + imageType = "DYNAMIC" + }, + text = "VR help item" + } + }, + menuIcon = + { + value = "action.png", + imageType = "DYNAMIC" + }, + helpPrompt = + { + + }, + vrHelpTitle = "VR help title", + keyboardProperties = + { + keyboardLayout = "QWERTY", + keypressMode = "SINGLE_KEYPRESS", + limitedCharacterList = + { + "a" + }, + language = "EN-US", + autoCompleteText = "Daemon, Freedom" + } + }) + + + --mobile side: expect SetGlobalProperties response + EXPECT_RESPONSE(cid, { success = false, resultCode = "INVALID_DATA"}) + :Timeout(iTimeout) + + --mobile side: expect OnHashChange notification is not send to mobile + EXPECT_NOTIFICATION("OnHashChange") + :Times(0) + end + + --End test case NegativeRequestCheck.1.2 + ----------------------------------------------------------------------------------------- + + --Begin test case NegativeRequestCheck.1.3 + --Description: Check helpPrompt parameter is out upper bound + + function Test:SetGlobalProperties_helpPrompt_Array_Outmaxsize_101_INVALID_DATA() + + --mobile side: sending SetGlobalProperties request + local cid = self.mobileSession:SendRPC("SetGlobalProperties", + { + menuTitle = "Menu Title", + timeoutPrompt = + { + { + text = "Timeout prompt", + type = "TEXT" + } + }, + vrHelp = + { + { + position = 1, + image = + { + value = "action.png", + imageType = "DYNAMIC" + }, + text = "VR help item" + } + }, + menuIcon = + { + value = "action.png", + imageType = "DYNAMIC" + }, + helpPrompt = + { + { + text = "Help prompt_001", + type = "TEXT" + }, + { + text = "Help prompt_002", + type = "TEXT" + }, + { + text = "Help prompt_003", + type = "TEXT" + }, + { + text = "Help prompt_004", + type = "TEXT" + }, + { + text = "Help prompt_005", + type = "TEXT" + }, + { + text = "Help prompt_006", + type = "TEXT" + }, + { + text = "Help prompt_007", + type = "TEXT" + }, + { + text = "Help prompt_008", + type = "TEXT" + }, + { + text = "Help prompt_009", + type = "TEXT" + }, + { + text = "Help prompt_010", + type = "TEXT" + }, + { + text = "Help prompt_011", + type = "TEXT" + }, + { + text = "Help prompt_012", + type = "TEXT" + }, + { + text = "Help prompt_013", + type = "TEXT" + }, + { + text = "Help prompt_014", + type = "TEXT" + }, + { + text = "Help prompt_015", + type = "TEXT" + }, + { + text = "Help prompt_016", + type = "TEXT" + }, + { + text = "Help prompt_017", + type = "TEXT" + }, + { + text = "Help prompt_018", + type = "TEXT" + }, + { + text = "Help prompt_019", + type = "TEXT" + }, + { + text = "Help prompt_020", + type = "TEXT" + }, + { + text = "Help prompt_021", + type = "TEXT" + }, + { + text = "Help prompt_022", + type = "TEXT" + }, + { + text = "Help prompt_023", + type = "TEXT" + }, + { + text = "Help prompt_024", + type = "TEXT" + }, + { + text = "Help prompt_025", + type = "TEXT" + }, + { + text = "Help prompt_026", + type = "TEXT" + }, + { + text = "Help prompt_027", + type = "TEXT" + }, + { + text = "Help prompt_028", + type = "TEXT" + }, + { + text = "Help prompt_029", + type = "TEXT" + }, + { + text = "Help prompt_030", + type = "TEXT" + }, + { + text = "Help prompt_031", + type = "TEXT" + }, + { + text = "Help prompt_032", + type = "TEXT" + }, + { + text = "Help prompt_033", + type = "TEXT" + }, + { + text = "Help prompt_034", + type = "TEXT" + }, + { + text = "Help prompt_035", + type = "TEXT" + }, + { + text = "Help prompt_036", + type = "TEXT" + }, + { + text = "Help prompt_037", + type = "TEXT" + }, + { + text = "Help prompt_038", + type = "TEXT" + }, + { + text = "Help prompt_039", + type = "TEXT" + }, + { + text = "Help prompt_040", + type = "TEXT" + }, + { + text = "Help prompt_041", + type = "TEXT" + }, + { + text = "Help prompt_042", + type = "TEXT" + }, + { + text = "Help prompt_043", + type = "TEXT" + }, + { + text = "Help prompt_044", + type = "TEXT" + }, + { + text = "Help prompt_045", + type = "TEXT" + }, + { + text = "Help prompt_046", + type = "TEXT" + }, + { + text = "Help prompt_047", + type = "TEXT" + }, + { + text = "Help prompt_048", + type = "TEXT" + }, + { + text = "Help prompt_049", + type = "TEXT" + }, + { + text = "Help prompt_050", + type = "TEXT" + }, + { + text = "Help prompt_051", + type = "TEXT" + }, + { + text = "Help prompt_052", + type = "TEXT" + }, + { + text = "Help prompt_053", + type = "TEXT" + }, + { + text = "Help prompt_054", + type = "TEXT" + }, + { + text = "Help prompt_055", + type = "TEXT" + }, + { + text = "Help prompt_056", + type = "TEXT" + }, + { + text = "Help prompt_057", + type = "TEXT" + }, + { + text = "Help prompt_058", + type = "TEXT" + }, + { + text = "Help prompt_059", + type = "TEXT" + }, + { + text = "Help prompt_060", + type = "TEXT" + }, + { + text = "Help prompt_061", + type = "TEXT" + }, + { + text = "Help prompt_062", + type = "TEXT" + }, + { + text = "Help prompt_063", + type = "TEXT" + }, + { + text = "Help prompt_064", + type = "TEXT" + }, + { + text = "Help prompt_065", + type = "TEXT" + }, + { + text = "Help prompt_066", + type = "TEXT" + }, + { + text = "Help prompt_067", + type = "TEXT" + }, + { + text = "Help prompt_068", + type = "TEXT" + }, + { + text = "Help prompt_069", + type = "TEXT" + }, + { + text = "Help prompt_070", + type = "TEXT" + }, + { + text = "Help prompt_071", + type = "TEXT" + }, + { + text = "Help prompt_072", + type = "TEXT" + }, + { + text = "Help prompt_073", + type = "TEXT" + }, + { + text = "Help prompt_074", + type = "TEXT" + }, + { + text = "Help prompt_075", + type = "TEXT" + }, + { + text = "Help prompt_076", + type = "TEXT" + }, + { + text = "Help prompt_077", + type = "TEXT" + }, + { + text = "Help prompt_078", + type = "TEXT" + }, + { + text = "Help prompt_079", + type = "TEXT" + }, + { + text = "Help prompt_080", + type = "TEXT" + }, + { + text = "Help prompt_081", + type = "TEXT" + }, + { + text = "Help prompt_082", + type = "TEXT" + }, + { + text = "Help prompt_083", + type = "TEXT" + }, + { + text = "Help prompt_084", + type = "TEXT" + }, + { + text = "Help prompt_085", + type = "TEXT" + }, + { + text = "Help prompt_086", + type = "TEXT" + }, + { + text = "Help prompt_087", + type = "TEXT" + }, + { + text = "Help prompt_088", + type = "TEXT" + }, + { + text = "Help prompt_089", + type = "TEXT" + }, + { + text = "Help prompt_090", + type = "TEXT" + }, + { + text = "Help prompt_091", + type = "TEXT" + }, + { + text = "Help prompt_092", + type = "TEXT" + }, + { + text = "Help prompt_093", + type = "TEXT" + }, + { + text = "Help prompt_094", + type = "TEXT" + }, + { + text = "Help prompt_095", + type = "TEXT" + }, + { + text = "Help prompt_096", + type = "TEXT" + }, + { + text = "Help prompt_097", + type = "TEXT" + }, + { + text = "Help prompt_098", + type = "TEXT" + }, + { + text = "Help prompt_099", + type = "TEXT" + }, + { + text = "Help prompt_100", + type = "TEXT" + }, + { + text = "Help prompt_101", + type = "TEXT" + } + }, + vrHelpTitle = "VR help title", + keyboardProperties = + { + keyboardLayout = "QWERTY", + keypressMode = "SINGLE_KEYPRESS", + limitedCharacterList = + { + "a" + }, + language = "EN-US", + autoCompleteText = "Daemon, Freedom" + } + }) + + + --mobile side: expect SetGlobalProperties response + EXPECT_RESPONSE(cid, { success = false, resultCode = "INVALID_DATA"}) + :Timeout(iTimeout) + + --mobile side: expect OnHashChange notification is not send to mobile + EXPECT_NOTIFICATION("OnHashChange") + :Times(0) + end + + --End test case NegativeRequestCheck.1.3 + ----------------------------------------------------------------------------------------- + + --Begin test case NegativeRequestCheck.1.4 + --Description: Check helpPrompt parameter contains an array with only one empty item + + function Test:SetGlobalProperties_helpPrompt_Array_ContainAnEmptyItem_INVALID_DATA() + + --mobile side: sending SetGlobalProperties request + local cid = self.mobileSession:SendRPC("SetGlobalProperties", + { + menuTitle = "Menu Title", + timeoutPrompt = + { + { + text = "Timeout prompt", + type = "TEXT" + } + }, + vrHelp = + { + { + position = 1, + image = + { + value = "action.png", + imageType = "DYNAMIC" + }, + text = "VR help item" + } + }, + menuIcon = + { + value = "action.png", + imageType = "DYNAMIC" + }, + helpPrompt = + { + { + + } + }, + vrHelpTitle = "VR help title", + keyboardProperties = + { + keyboardLayout = "QWERTY", + keypressMode = "SINGLE_KEYPRESS", + limitedCharacterList = + { + "a" + }, + language = "EN-US", + autoCompleteText = "Daemon, Freedom" + } + }) + + + --mobile side: expect SetGlobalProperties response + EXPECT_RESPONSE(cid, { success = false, resultCode = "INVALID_DATA"}) + :Timeout(iTimeout) + + --mobile side: expect OnHashChange notification is not send to mobile + EXPECT_NOTIFICATION("OnHashChange") + :Times(0) + end + + --End test case NegativeRequestCheck.1.4 + ----------------------------------------------------------------------------------------- + + --Begin test case NegativeRequestCheck.1.5 + --Description: Check helpPrompt parameter is empty (missed all child items) + + --It is covered by SetGlobalProperties_helpPrompt_Array_ContainAnEmptyItem_INVALID_DATA + + --End test case NegativeRequestCheck.1.5 + ----------------------------------------------------------------------------------------- + + --Begin test case NegativeRequestCheck.1.6 + --Description: Check helpPrompt parameter is wrong type + + function Test:SetGlobalProperties_helpPrompt_WrongType_123_INVALID_DATA() + + --mobile side: sending SetGlobalProperties request + local cid = self.mobileSession:SendRPC("SetGlobalProperties", + { + menuTitle = "Menu Title", + timeoutPrompt = + { + { + text = "Timeout prompt", + type = "TEXT" + } + }, + vrHelp = + { + { + position = 1, + image = + { + value = "action.png", + imageType = "DYNAMIC" + }, + text = "VR help item" + } + }, + menuIcon = + { + value = "action.png", + imageType = "DYNAMIC" + }, + helpPrompt = + { + 123 + }, + vrHelpTitle = "VR help title", + keyboardProperties = + { + keyboardLayout = "QWERTY", + keypressMode = "SINGLE_KEYPRESS", + limitedCharacterList = + { + "a" + }, + language = "EN-US", + autoCompleteText = "Daemon, Freedom" + } + }) + + + --mobile side: expect SetGlobalProperties response + EXPECT_RESPONSE(cid, { success = false, resultCode = "INVALID_DATA"}) + :Timeout(iTimeout) + + --mobile side: expect OnHashChange notification is not send to mobile + EXPECT_NOTIFICATION("OnHashChange") + :Times(0) + end + + --End test case NegativeRequestCheck.1.6 + ----------------------------------------------------------------------------------------- + + --Begin test case NegativeRequestCheck.1.7 + --Description: Check helpPrompt: type parameter is missed + + function Test:SetGlobalProperties_helpPrompt_type_IsMising_INVALID_DATA() + + --mobile side: sending SetGlobalProperties request + local cid = self.mobileSession:SendRPC("SetGlobalProperties", + { + menuTitle = "Menu Title", + timeoutPrompt = + { + { + text = "Timeout prompt", + type = "TEXT" + } + }, + vrHelp = + { + { + position = 1, + image = + { + value = "action.png", + imageType = "DYNAMIC" + }, + text = "VR help item" + } + }, + menuIcon = + { + value = "action.png", + imageType = "DYNAMIC" + }, + helpPrompt = + { + { + text = "Help prompt" + } + }, + vrHelpTitle = "VR help title", + keyboardProperties = + { + keyboardLayout = "QWERTY", + keypressMode = "SINGLE_KEYPRESS", + limitedCharacterList = + { + "a" + }, + language = "EN-US", + autoCompleteText = "Daemon, Freedom" + } + }) + + + --mobile side: expect SetGlobalProperties response + EXPECT_RESPONSE(cid, { success = false, resultCode = "INVALID_DATA"}) + :Timeout(iTimeout) + + --mobile side: expect OnHashChange notification is not send to mobile + EXPECT_NOTIFICATION("OnHashChange") + :Times(0) + end + + --End test case NegativeRequestCheck.1.7 + ----------------------------------------------------------------------------------------- + + --Begin test case NegativeRequestCheck.1.8 + --Description: Check helpPrompt: type parameter is wrong value + + function Test:SetGlobalProperties_helpPrompt_type_WrongValue_INVALID_DATA() + + --mobile side: sending SetGlobalProperties request + local cid = self.mobileSession:SendRPC("SetGlobalProperties", + { + menuTitle = "Menu Title", + timeoutPrompt = + { + { + text = "Timeout prompt", + type = "TEXT" + } + }, + vrHelp = + { + { + position = 1, + image = + { + value = "action.png", + imageType = "DYNAMIC" + }, + text = "VR help item" + } + }, + menuIcon = + { + value = "action.png", + imageType = "DYNAMIC" + }, + helpPrompt = + { + { + text = "Help prompt", + type = "Wrong Value" + } + }, + vrHelpTitle = "VR help title", + keyboardProperties = + { + keyboardLayout = "QWERTY", + keypressMode = "SINGLE_KEYPRESS", + limitedCharacterList = + { + "a" + }, + language = "EN-US", + autoCompleteText = "Daemon, Freedom" + } + }) + + + --mobile side: expect SetGlobalProperties response + EXPECT_RESPONSE(cid, { success = false, resultCode = "INVALID_DATA"}) + :Timeout(iTimeout) + + --mobile side: expect OnHashChange notification is not send to mobile + EXPECT_NOTIFICATION("OnHashChange") + :Times(0) + end + + --End test case NegativeRequestCheck.1.8 + ----------------------------------------------------------------------------------------- + + --Begin test case NegativeRequestCheck.1.9 + --Description: Check helpPrompt: text parameter is missed + + function Test:SetGlobalProperties_helpPrompt_text_IsMising_INVALID_DATA() + + --mobile side: sending SetGlobalProperties request + local cid = self.mobileSession:SendRPC("SetGlobalProperties", + { + menuTitle = "Menu Title", + timeoutPrompt = + { + { + text = "Timeout prompt", + type = "TEXT" + } + }, + vrHelp = + { + { + position = 1, + image = + { + value = "action.png", + imageType = "DYNAMIC" + }, + text = "VR help item" + } + }, + menuIcon = + { + value = "action.png", + imageType = "DYNAMIC" + }, + helpPrompt = + { + { + type = "TEXT" + } + }, + vrHelpTitle = "VR help title", + keyboardProperties = + { + keyboardLayout = "QWERTY", + keypressMode = "SINGLE_KEYPRESS", + limitedCharacterList = + { + "a" + }, + language = "EN-US", + autoCompleteText = "Daemon, Freedom" + } + }) + + + --mobile side: expect SetGlobalProperties response + EXPECT_RESPONSE(cid, { success = false, resultCode = "INVALID_DATA"}) + :Timeout(iTimeout) + + --mobile side: expect OnHashChange notification is not send to mobile + EXPECT_NOTIFICATION("OnHashChange") + :Times(0) + end + + --End test case NegativeRequestCheck.1.9 + ----------------------------------------------------------------------------------------- + + --Begin test case NegativeRequestCheck.1.10 + --Description: Check helpPrompt: text parameter is wrong type + + function Test:SetGlobalProperties_helpPrompt_text_IsWrongType_123_INVALID_DATA() + + --mobile side: sending SetGlobalProperties request + local cid = self.mobileSession:SendRPC("SetGlobalProperties", + { + menuTitle = "Menu Title", + timeoutPrompt = + { + { + text = "Timeout prompt", + type = "TEXT" + } + }, + vrHelp = + { + { + position = 1, + image = + { + value = "action.png", + imageType = "DYNAMIC" + }, + text = "VR help item" + } + }, + menuIcon = + { + value = "action.png", + imageType = "DYNAMIC" + }, + helpPrompt = + { + { + text = 123, + type = "TEXT" + } + }, + vrHelpTitle = "VR help title", + keyboardProperties = + { + keyboardLayout = "QWERTY", + keypressMode = "SINGLE_KEYPRESS", + limitedCharacterList = + { + "a" + }, + language = "EN-US", + autoCompleteText = "Daemon, Freedom" + } + }) + + + --mobile side: expect SetGlobalProperties response + EXPECT_RESPONSE(cid, { success = false, resultCode = "INVALID_DATA"}) + :Timeout(iTimeout) + + --mobile side: expect OnHashChange notification is not send to mobile + EXPECT_NOTIFICATION("OnHashChange") + :Times(0) + end + + --End test case NegativeRequestCheck.1.10 + ----------------------------------------------------------------------------------------- + + --Begin test case NegativeRequestCheck.1.11 + --Description: Check helpPrompt: text parameter is lower bound + + --Requirement id in JAMA: SDLAQ-CRS-11, SDLAQ-CRS-2910 + + --Verification criteria: "1. In case the mobile application sends any RPC with 'text:""' (empty string) of 'ttsChunk' structure and other valid parameters, SDL must consider such RPC as valid and transfer it to HMI" + + function Test:SetGlobalProperties_helpPrompt_text_IsOutLowerBound_0_SUCCESS() + + --mobile side: sending SetGlobalProperties request + local cid = self.mobileSession:SendRPC("SetGlobalProperties", + { + menuTitle = "Menu Title", + timeoutPrompt = + { + { + text = "Timeout prompt", + type = "TEXT" + } + }, + vrHelp = + { + { + position = 1, + image = + { + value = "action.png", + imageType = "DYNAMIC" + }, + text = "VR help item" + } + }, + menuIcon = + { + value = "action.png", + imageType = "DYNAMIC" + }, + helpPrompt = + { + { + text = "", + type = "TEXT" + } + }, + vrHelpTitle = "VR help title", + keyboardProperties = + { + keyboardLayout = "QWERTY", + keypressMode = "SINGLE_KEYPRESS", + limitedCharacterList = + { + "a" + }, + language = "EN-US", + autoCompleteText = "Daemon, Freedom" + } + }) + + + --hmi side: expect TTS.SetGlobalProperties request + EXPECT_HMICALL("TTS.SetGlobalProperties", + { + timeoutPrompt = + { + { + text = "Timeout prompt", + type = "TEXT" + } + }, + helpPrompt = + { + { + text = "", + type = "TEXT" + } + } + }) + :Timeout(iTimeout) + :Do(function(_,data) + --hmi side: sending UI.SetGlobalProperties response + self.hmiConnection:SendResponse(data.id, data.method, "SUCCESS", {}) + end) + + + + --hmi side: expect UI.SetGlobalProperties request + EXPECT_HMICALL("UI.SetGlobalProperties", + { + menuTitle = "Menu Title", + vrHelp = + { + { + position = 1, + --[=[ TODO: update after resolving APPLINK-16052 + + image = + { + imageType = "DYNAMIC", + value = strAppFolder .. "action.png" + },]=] + text = "VR help item" + } + }, + --Checked below + -- menuIcon = + -- { + -- imageType = "DYNAMIC", + -- value = strAppFolder .. "action.png" + -- }, + vrHelpTitle = "VR help title", + keyboardProperties = + { + keyboardLayout = "QWERTY", + keypressMode = "SINGLE_KEYPRESS", + --[=[ TODO: update after resolving APPLINK-16047 + + limitedCharacterList = + { + "a" + },]=] + language = "EN-US", + autoCompleteText = "Daemon, Freedom" + } + }) + :Timeout(iTimeout) + :ValidIf(function(_,data) + return Check_menuIconParams(data) + end) + :Do(function(_,data) + --hmi side: sending UI.SetGlobalProperties response + self.hmiConnection:SendResponse(data.id, data.method, "SUCCESS", {}) + end) + + + + --mobile side: expect SetGlobalProperties response + EXPECT_RESPONSE(cid, { success = true, resultCode = "SUCCESS"}) + :Timeout(iTimeout) + + --mobile side: expect OnHashChange notification + EXPECT_NOTIFICATION("OnHashChange") + end + + --End test case NegativeRequestCheck.1.11 + ----------------------------------------------------------------------------------------- + + --Begin test case NegativeRequestCheck.1.12 + --Description: Check helpPrompt: text parameter is out upper bound + + function Test:SetGlobalProperties_helpPrompt_text_IsOutUpperBound_501_INVALID_DATA() + + --mobile side: sending SetGlobalProperties request + local cid = self.mobileSession:SendRPC("SetGlobalProperties", + { + menuTitle = "Menu Title", + timeoutPrompt = + { + { + text = "Timeout prompt", + type = "TEXT" + } + }, + vrHelp = + { + { + position = 1, + image = + { + value = "action.png", + imageType = "DYNAMIC" + }, + text = "VR help item" + } + }, + menuIcon = + { + value = "action.png", + imageType = "DYNAMIC" + }, + helpPrompt = + { + { + text = "qA1_wB2_eA3_rB4_tA5_yB6_uA7_iB8_oA9_pB0_aA1_sB2_dA3_fB4_gA5_hB6_jA7_kB8_lA9_zB0_xA1_cB2_vA3_bB4_nA5_mB6_qA7_wB8_eA9_rB0_tA1_yB2_uA3_iB4_oA5_pB6_aA7_sB8_dA9_fB0_gA1_hB2_jA3_kB4_lA5_zB6_xA7_cB8_vA9_bB0_nA1_mB2_qA3_wB4_eA5_rB6_tA7_yB8_uA9_iB0_oA1_pB2_aA3_sB4_dA5_fB6_gA7_hB8_jA9_kB0_lA1_zB2_xA3_cB4_vA5_bB6_nA7_mB8_qA9_wB0_eA1_rB2_tA3_yB4_uA5_iB6_oA7_pB8_aA9_sB0_dA1_fB2_gA3_hB4_jA5_kB6_lA7_zB8_xA9_cB0_vA1_bB2_nA3_mB4_qA5_wB6_eA7_rB8_tA9_yB0_uA1_iB2_oA3_pB4_aA5_sB6_dA7_fB8_gA9_hB0_jA1_kB2_lA3_zB4_xA5_c", + type = "TEXT" + } + }, + vrHelpTitle = "VR help title", + keyboardProperties = + { + keyboardLayout = "QWERTY", + keypressMode = "SINGLE_KEYPRESS", + limitedCharacterList = + { + "a" + }, + language = "EN-US", + autoCompleteText = "Daemon, Freedom" + } + }) + + + --mobile side: expect SetGlobalProperties response + EXPECT_RESPONSE(cid, { success = false, resultCode = "INVALID_DATA"}) + :Timeout(iTimeout) + + --mobile side: expect OnHashChange notification is not send to mobile + EXPECT_NOTIFICATION("OnHashChange") + :Times(0) + end + + --End test case NegativeRequestCheck.1.12 + ----------------------------------------------------------------------------------------- + + --Begin test case NegativeRequestCheck.1.13 + --Description: Check helpPrompt: text parameter contains escape characters _NewLineCharacter_ + + function Test:SetGlobalProperties_helpPrompt_text__NewLineCharacter__INVALID_DATA() + + --mobile side: sending SetGlobalProperties request + local cid = self.mobileSession:SendRPC("SetGlobalProperties", + { + menuTitle = "Menu Title", + timeoutPrompt = + { + { + text = "Timeout prompt", + type = "TEXT" + } + }, + vrHelp = + { + { + position = 1, + image = + { + value = "action.png", + imageType = "DYNAMIC" + }, + text = "VR help item" + } + }, + menuIcon = + { + value = "action.png", + imageType = "DYNAMIC" + }, + helpPrompt = + { + { + text = "\n", + type = "TEXT" + } + }, + vrHelpTitle = "VR help title", + keyboardProperties = + { + keyboardLayout = "QWERTY", + keypressMode = "SINGLE_KEYPRESS", + limitedCharacterList = + { + "a" + }, + language = "EN-US", + autoCompleteText = "Daemon, Freedom" + } + }) + + + --mobile side: expect SetGlobalProperties response + EXPECT_RESPONSE(cid, { success = false, resultCode = "INVALID_DATA"}) + :Timeout(iTimeout) + + --mobile side: expect OnHashChange notification is not send to mobile + EXPECT_NOTIFICATION("OnHashChange") + :Times(0) + end + + --End test case NegativeRequestCheck.1.13 + ----------------------------------------------------------------------------------------- + + --Begin test case NegativeRequestCheck.1.14 + --Description: Check helpPrompt: text parameter contains escape characters _TabChacracter_ + + function Test:SetGlobalProperties_helpPrompt_text__TabChacracter__INVALID_DATA() + + --mobile side: sending SetGlobalProperties request + local cid = self.mobileSession:SendRPC("SetGlobalProperties", + { + menuTitle = "Menu Title", + timeoutPrompt = + { + { + text = "Timeout prompt", + type = "TEXT" + } + }, + vrHelp = + { + { + position = 1, + image = + { + value = "action.png", + imageType = "DYNAMIC" + }, + text = "VR help item" + } + }, + menuIcon = + { + value = "action.png", + imageType = "DYNAMIC" + }, + helpPrompt = + { + { + text = "\t", + type = "TEXT" + } + }, + vrHelpTitle = "VR help title", + keyboardProperties = + { + keyboardLayout = "QWERTY", + keypressMode = "SINGLE_KEYPRESS", + limitedCharacterList = + { + "a" + }, + language = "EN-US", + autoCompleteText = "Daemon, Freedom" + } + }) + + + --mobile side: expect SetGlobalProperties response + EXPECT_RESPONSE(cid, { success = false, resultCode = "INVALID_DATA"}) + :Timeout(iTimeout) + + --mobile side: expect OnHashChange notification is not send to mobile + EXPECT_NOTIFICATION("OnHashChange") + :Times(0) + end + + --End test case NegativeRequestCheck.1.14 + ----------------------------------------------------------------------------------------- + + --Begin test case NegativeRequestCheck.1.15 + --Description: Check helpPrompt: text parameter contains escape characters _SpaceCharacter_ + + function Test:SetGlobalProperties_helpPrompt_text__SpaceCharacter__INVALID_DATA() + + --mobile side: sending SetGlobalProperties request + local cid = self.mobileSession:SendRPC("SetGlobalProperties", + { + menuTitle = "Menu Title", + timeoutPrompt = + { + { + text = "Timeout prompt", + type = "TEXT" + } + }, + vrHelp = + { + { + position = 1, + image = + { + value = "action.png", + imageType = "DYNAMIC" + }, + text = "VR help item" + } + }, + menuIcon = + { + value = "action.png", + imageType = "DYNAMIC" + }, + helpPrompt = + { + { + text = " ", + type = "TEXT" + } + }, + vrHelpTitle = "VR help title", + keyboardProperties = + { + keyboardLayout = "QWERTY", + keypressMode = "SINGLE_KEYPRESS", + limitedCharacterList = + { + "a" + }, + language = "EN-US", + autoCompleteText = "Daemon, Freedom" + } + }) + + + --mobile side: expect SetGlobalProperties response + EXPECT_RESPONSE(cid, { success = false, resultCode = "INVALID_DATA"}) + :Timeout(iTimeout) + + --mobile side: expect OnHashChange notification is not send to mobile + EXPECT_NOTIFICATION("OnHashChange") + :Times(0) + end + + --End test case NegativeRequestCheck.1.15 + ----------------------------------------------------------------------------------------- + + --Begin test case NegativeRequestCheck.1.16 + --Description: Check timeoutPrompt parameter is wrong type + + function Test:SetGlobalProperties_timeoutPrompt_Array_WrongType_123_INVALID_DATA() + + --mobile side: sending SetGlobalProperties request + local cid = self.mobileSession:SendRPC("SetGlobalProperties", + { + menuTitle = "Menu Title", + timeoutPrompt = 123, + vrHelp = + { + { + position = 1, + image = + { + value = "action.png", + imageType = "DYNAMIC" + }, + text = "VR help item" + } + }, + menuIcon = + { + value = "action.png", + imageType = "DYNAMIC" + }, + helpPrompt = + { + { + text = "Help prompt", + type = "TEXT" + } + }, + vrHelpTitle = "VR help title", + keyboardProperties = + { + keyboardLayout = "QWERTY", + keypressMode = "SINGLE_KEYPRESS", + limitedCharacterList = + { + "a" + }, + language = "EN-US", + autoCompleteText = "Daemon, Freedom" + } + }) + + + --mobile side: expect SetGlobalProperties response + EXPECT_RESPONSE(cid, { success = false, resultCode = "INVALID_DATA"}) + :Timeout(iTimeout) + + --mobile side: expect OnHashChange notification is not send to mobile + EXPECT_NOTIFICATION("OnHashChange") + :Times(0) + end + + --End test case NegativeRequestCheck.1.16 + ----------------------------------------------------------------------------------------- + + --Begin test case NegativeRequestCheck.1.17 + --Description: Check timeoutPrompt parameter is out lower bound + + function Test:SetGlobalProperties_timeoutPrompt_Array_Outminsize_0_INVALID_DATA() + + --mobile side: sending SetGlobalProperties request + local cid = self.mobileSession:SendRPC("SetGlobalProperties", + { + menuTitle = "Menu Title", + timeoutPrompt = + { + + }, + vrHelp = + { + { + position = 1, + image = + { + value = "action.png", + imageType = "DYNAMIC" + }, + text = "VR help item" + } + }, + menuIcon = + { + value = "action.png", + imageType = "DYNAMIC" + }, + helpPrompt = + { + { + text = "Help prompt", + type = "TEXT" + } + }, + vrHelpTitle = "VR help title", + keyboardProperties = + { + keyboardLayout = "QWERTY", + keypressMode = "SINGLE_KEYPRESS", + limitedCharacterList = + { + "a" + }, + language = "EN-US", + autoCompleteText = "Daemon, Freedom" + } + }) + + + --mobile side: expect SetGlobalProperties response + EXPECT_RESPONSE(cid, { success = false, resultCode = "INVALID_DATA"}) + :Timeout(iTimeout) + + --mobile side: expect OnHashChange notification is not send to mobile + EXPECT_NOTIFICATION("OnHashChange") + :Times(0) + end + + --End test case NegativeRequestCheck.1.17 + ----------------------------------------------------------------------------------------- + + --Begin test case NegativeRequestCheck.1.18 + --Description: Check timeoutPrompt parameter is out upper bound + + function Test:SetGlobalProperties_timeoutPrompt_Array_Outmaxsize_101_INVALID_DATA() + + --mobile side: sending SetGlobalProperties request + local cid = self.mobileSession:SendRPC("SetGlobalProperties", + { + menuTitle = "Menu Title", + timeoutPrompt = + { + { + text = "Timeout prompt_001", + type = "TEXT" + }, + { + text = "Timeout prompt_002", + type = "TEXT" + }, + { + text = "Timeout prompt_003", + type = "TEXT" + }, + { + text = "Timeout prompt_004", + type = "TEXT" + }, + { + text = "Timeout prompt_005", + type = "TEXT" + }, + { + text = "Timeout prompt_006", + type = "TEXT" + }, + { + text = "Timeout prompt_007", + type = "TEXT" + }, + { + text = "Timeout prompt_008", + type = "TEXT" + }, + { + text = "Timeout prompt_009", + type = "TEXT" + }, + { + text = "Timeout prompt_010", + type = "TEXT" + }, + { + text = "Timeout prompt_011", + type = "TEXT" + }, + { + text = "Timeout prompt_012", + type = "TEXT" + }, + { + text = "Timeout prompt_013", + type = "TEXT" + }, + { + text = "Timeout prompt_014", + type = "TEXT" + }, + { + text = "Timeout prompt_015", + type = "TEXT" + }, + { + text = "Timeout prompt_016", + type = "TEXT" + }, + { + text = "Timeout prompt_017", + type = "TEXT" + }, + { + text = "Timeout prompt_018", + type = "TEXT" + }, + { + text = "Timeout prompt_019", + type = "TEXT" + }, + { + text = "Timeout prompt_020", + type = "TEXT" + }, + { + text = "Timeout prompt_021", + type = "TEXT" + }, + { + text = "Timeout prompt_022", + type = "TEXT" + }, + { + text = "Timeout prompt_023", + type = "TEXT" + }, + { + text = "Timeout prompt_024", + type = "TEXT" + }, + { + text = "Timeout prompt_025", + type = "TEXT" + }, + { + text = "Timeout prompt_026", + type = "TEXT" + }, + { + text = "Timeout prompt_027", + type = "TEXT" + }, + { + text = "Timeout prompt_028", + type = "TEXT" + }, + { + text = "Timeout prompt_029", + type = "TEXT" + }, + { + text = "Timeout prompt_030", + type = "TEXT" + }, + { + text = "Timeout prompt_031", + type = "TEXT" + }, + { + text = "Timeout prompt_032", + type = "TEXT" + }, + { + text = "Timeout prompt_033", + type = "TEXT" + }, + { + text = "Timeout prompt_034", + type = "TEXT" + }, + { + text = "Timeout prompt_035", + type = "TEXT" + }, + { + text = "Timeout prompt_036", + type = "TEXT" + }, + { + text = "Timeout prompt_037", + type = "TEXT" + }, + { + text = "Timeout prompt_038", + type = "TEXT" + }, + { + text = "Timeout prompt_039", + type = "TEXT" + }, + { + text = "Timeout prompt_040", + type = "TEXT" + }, + { + text = "Timeout prompt_041", + type = "TEXT" + }, + { + text = "Timeout prompt_042", + type = "TEXT" + }, + { + text = "Timeout prompt_043", + type = "TEXT" + }, + { + text = "Timeout prompt_044", + type = "TEXT" + }, + { + text = "Timeout prompt_045", + type = "TEXT" + }, + { + text = "Timeout prompt_046", + type = "TEXT" + }, + { + text = "Timeout prompt_047", + type = "TEXT" + }, + { + text = "Timeout prompt_048", + type = "TEXT" + }, + { + text = "Timeout prompt_049", + type = "TEXT" + }, + { + text = "Timeout prompt_050", + type = "TEXT" + }, + { + text = "Timeout prompt_051", + type = "TEXT" + }, + { + text = "Timeout prompt_052", + type = "TEXT" + }, + { + text = "Timeout prompt_053", + type = "TEXT" + }, + { + text = "Timeout prompt_054", + type = "TEXT" + }, + { + text = "Timeout prompt_055", + type = "TEXT" + }, + { + text = "Timeout prompt_056", + type = "TEXT" + }, + { + text = "Timeout prompt_057", + type = "TEXT" + }, + { + text = "Timeout prompt_058", + type = "TEXT" + }, + { + text = "Timeout prompt_059", + type = "TEXT" + }, + { + text = "Timeout prompt_060", + type = "TEXT" + }, + { + text = "Timeout prompt_061", + type = "TEXT" + }, + { + text = "Timeout prompt_062", + type = "TEXT" + }, + { + text = "Timeout prompt_063", + type = "TEXT" + }, + { + text = "Timeout prompt_064", + type = "TEXT" + }, + { + text = "Timeout prompt_065", + type = "TEXT" + }, + { + text = "Timeout prompt_066", + type = "TEXT" + }, + { + text = "Timeout prompt_067", + type = "TEXT" + }, + { + text = "Timeout prompt_068", + type = "TEXT" + }, + { + text = "Timeout prompt_069", + type = "TEXT" + }, + { + text = "Timeout prompt_070", + type = "TEXT" + }, + { + text = "Timeout prompt_071", + type = "TEXT" + }, + { + text = "Timeout prompt_072", + type = "TEXT" + }, + { + text = "Timeout prompt_073", + type = "TEXT" + }, + { + text = "Timeout prompt_074", + type = "TEXT" + }, + { + text = "Timeout prompt_075", + type = "TEXT" + }, + { + text = "Timeout prompt_076", + type = "TEXT" + }, + { + text = "Timeout prompt_077", + type = "TEXT" + }, + { + text = "Timeout prompt_078", + type = "TEXT" + }, + { + text = "Timeout prompt_079", + type = "TEXT" + }, + { + text = "Timeout prompt_080", + type = "TEXT" + }, + { + text = "Timeout prompt_081", + type = "TEXT" + }, + { + text = "Timeout prompt_082", + type = "TEXT" + }, + { + text = "Timeout prompt_083", + type = "TEXT" + }, + { + text = "Timeout prompt_084", + type = "TEXT" + }, + { + text = "Timeout prompt_085", + type = "TEXT" + }, + { + text = "Timeout prompt_086", + type = "TEXT" + }, + { + text = "Timeout prompt_087", + type = "TEXT" + }, + { + text = "Timeout prompt_088", + type = "TEXT" + }, + { + text = "Timeout prompt_089", + type = "TEXT" + }, + { + text = "Timeout prompt_090", + type = "TEXT" + }, + { + text = "Timeout prompt_091", + type = "TEXT" + }, + { + text = "Timeout prompt_092", + type = "TEXT" + }, + { + text = "Timeout prompt_093", + type = "TEXT" + }, + { + text = "Timeout prompt_094", + type = "TEXT" + }, + { + text = "Timeout prompt_095", + type = "TEXT" + }, + { + text = "Timeout prompt_096", + type = "TEXT" + }, + { + text = "Timeout prompt_097", + type = "TEXT" + }, + { + text = "Timeout prompt_098", + type = "TEXT" + }, + { + text = "Timeout prompt_099", + type = "TEXT" + }, + { + text = "Timeout prompt_100", + type = "TEXT" + }, + { + text = "Timeout prompt_101", + type = "TEXT" + } + }, + vrHelp = + { + { + position = 1, + image = + { + value = "action.png", + imageType = "DYNAMIC" + }, + text = "VR help item" + } + }, + menuIcon = + { + value = "action.png", + imageType = "DYNAMIC" + }, + helpPrompt = + { + { + text = "Help prompt", + type = "TEXT" + } + }, + vrHelpTitle = "VR help title", + keyboardProperties = + { + keyboardLayout = "QWERTY", + keypressMode = "SINGLE_KEYPRESS", + limitedCharacterList = + { + "a" + }, + language = "EN-US", + autoCompleteText = "Daemon, Freedom" + } + }) + + + --mobile side: expect SetGlobalProperties response + EXPECT_RESPONSE(cid, { success = false, resultCode = "INVALID_DATA"}) + :Timeout(iTimeout) + + --mobile side: expect OnHashChange notification is not send to mobile + EXPECT_NOTIFICATION("OnHashChange") + :Times(0) + end + + --End test case NegativeRequestCheck.1.18 + ----------------------------------------------------------------------------------------- + + --Begin test case NegativeRequestCheck.1.19 + --Description: Check timeoutPrompt parameter contains an array with only one empty item + + function Test:SetGlobalProperties_timeoutPrompt_Array_ContainAnEmptyItem_INVALID_DATA() + + --mobile side: sending SetGlobalProperties request + local cid = self.mobileSession:SendRPC("SetGlobalProperties", + { + menuTitle = "Menu Title", + timeoutPrompt = + { + { + + } + }, + vrHelp = + { + { + position = 1, + image = + { + value = "action.png", + imageType = "DYNAMIC" + }, + text = "VR help item" + } + }, + menuIcon = + { + value = "action.png", + imageType = "DYNAMIC" + }, + helpPrompt = + { + { + text = "Help prompt", + type = "TEXT" + } + }, + vrHelpTitle = "VR help title", + keyboardProperties = + { + keyboardLayout = "QWERTY", + keypressMode = "SINGLE_KEYPRESS", + limitedCharacterList = + { + "a" + }, + language = "EN-US", + autoCompleteText = "Daemon, Freedom" + } + }) + + + --mobile side: expect SetGlobalProperties response + EXPECT_RESPONSE(cid, { success = false, resultCode = "INVALID_DATA"}) + :Timeout(iTimeout) + + --mobile side: expect OnHashChange notification is not send to mobile + EXPECT_NOTIFICATION("OnHashChange") + :Times(0) + end + + --End test case NegativeRequestCheck.1.19 + ----------------------------------------------------------------------------------------- + + --Begin test case NegativeRequestCheck.1.20 + --Description: Check timeoutPrompt parameter is empty (missed all child items + + --It is covered by SetGlobalProperties_timeoutPrompt_Array_ContainAnEmptyItem + + --End test case NegativeRequestCheck.1.20 + ----------------------------------------------------------------------------------------- + + --Begin test case NegativeRequestCheck.1.21 + --Description: Check timeoutPrompt parameter is wrong type + + function Test:SetGlobalProperties_timeoutPrompt_WrongType_123_INVALID_DATA() + + --mobile side: sending SetGlobalProperties request + local cid = self.mobileSession:SendRPC("SetGlobalProperties", + { + menuTitle = "Menu Title", + timeoutPrompt = + { + 123 + }, + vrHelp = + { + { + position = 1, + image = + { + value = "action.png", + imageType = "DYNAMIC" + }, + text = "VR help item" + } + }, + menuIcon = + { + value = "action.png", + imageType = "DYNAMIC" + }, + helpPrompt = + { + { + text = "Help prompt", + type = "TEXT" + } + }, + vrHelpTitle = "VR help title", + keyboardProperties = + { + keyboardLayout = "QWERTY", + keypressMode = "SINGLE_KEYPRESS", + limitedCharacterList = + { + "a" + }, + language = "EN-US", + autoCompleteText = "Daemon, Freedom" + } + }) + + + --mobile side: expect SetGlobalProperties response + EXPECT_RESPONSE(cid, { success = false, resultCode = "INVALID_DATA"}) + :Timeout(iTimeout) + + --mobile side: expect OnHashChange notification is not send to mobile + EXPECT_NOTIFICATION("OnHashChange") + :Times(0) + end + + --End test case NegativeRequestCheck.1.21 + ----------------------------------------------------------------------------------------- + + --Begin test case NegativeRequestCheck.1.22 + --Description: Check timeoutPrompt: type parameter is missed + + function Test:SetGlobalProperties_timeoutPrompt_type_IsMising_INVALID_DATA() + + --mobile side: sending SetGlobalProperties request + local cid = self.mobileSession:SendRPC("SetGlobalProperties", + { + menuTitle = "Menu Title", + timeoutPrompt = + { + { + text = "Timeout prompt" + } + }, + vrHelp = + { + { + position = 1, + image = + { + value = "action.png", + imageType = "DYNAMIC" + }, + text = "VR help item" + } + }, + menuIcon = + { + value = "action.png", + imageType = "DYNAMIC" + }, + helpPrompt = + { + { + text = "Help prompt", + type = "TEXT" + } + }, + vrHelpTitle = "VR help title", + keyboardProperties = + { + keyboardLayout = "QWERTY", + keypressMode = "SINGLE_KEYPRESS", + limitedCharacterList = + { + "a" + }, + language = "EN-US", + autoCompleteText = "Daemon, Freedom" + } + }) + + + --mobile side: expect SetGlobalProperties response + EXPECT_RESPONSE(cid, { success = false, resultCode = "INVALID_DATA"}) + :Timeout(iTimeout) + + --mobile side: expect OnHashChange notification is not send to mobile + EXPECT_NOTIFICATION("OnHashChange") + :Times(0) + end + + --End test case NegativeRequestCheck.1.22 + ----------------------------------------------------------------------------------------- + + --Begin test case NegativeRequestCheck.1.23 + --Description: Check timeoutPrompt: type parameter is wrong value + + function Test:SetGlobalProperties_timeoutPrompt_type_WrongValue_INVALID_DATA() + + --mobile side: sending SetGlobalProperties request + local cid = self.mobileSession:SendRPC("SetGlobalProperties", + { + menuTitle = "Menu Title", + timeoutPrompt = + { + { + text = "Timeout prompt", + type = "Wrong Value" + } + }, + vrHelp = + { + { + position = 1, + image = + { + value = "action.png", + imageType = "DYNAMIC" + }, + text = "VR help item" + } + }, + menuIcon = + { + value = "action.png", + imageType = "DYNAMIC" + }, + helpPrompt = + { + { + text = "Help prompt", + type = "TEXT" + } + }, + vrHelpTitle = "VR help title", + keyboardProperties = + { + keyboardLayout = "QWERTY", + keypressMode = "SINGLE_KEYPRESS", + limitedCharacterList = + { + "a" + }, + language = "EN-US", + autoCompleteText = "Daemon, Freedom" + } + }) + + + --mobile side: expect SetGlobalProperties response + EXPECT_RESPONSE(cid, { success = false, resultCode = "INVALID_DATA"}) + :Timeout(iTimeout) + + --mobile side: expect OnHashChange notification is not send to mobile + EXPECT_NOTIFICATION("OnHashChange") + :Times(0) + end + + --End test case NegativeRequestCheck.1.23 + ----------------------------------------------------------------------------------------- + + --Begin test case NegativeRequestCheck.1.24 + --Description: Check timeoutPrompt: text parameter is missed + + function Test:SetGlobalProperties_timeoutPrompt_text_IsMising_INVALID_DATA() + + --mobile side: sending SetGlobalProperties request + local cid = self.mobileSession:SendRPC("SetGlobalProperties", + { + menuTitle = "Menu Title", + timeoutPrompt = + { + { + type = "TEXT" + } + }, + vrHelp = + { + { + position = 1, + image = + { + value = "action.png", + imageType = "DYNAMIC" + }, + text = "VR help item" + } + }, + menuIcon = + { + value = "action.png", + imageType = "DYNAMIC" + }, + helpPrompt = + { + { + text = "Help prompt", + type = "TEXT" + } + }, + vrHelpTitle = "VR help title", + keyboardProperties = + { + keyboardLayout = "QWERTY", + keypressMode = "SINGLE_KEYPRESS", + limitedCharacterList = + { + "a" + }, + language = "EN-US", + autoCompleteText = "Daemon, Freedom" + } + }) + + + --mobile side: expect SetGlobalProperties response + EXPECT_RESPONSE(cid, { success = false, resultCode = "INVALID_DATA"}) + :Timeout(iTimeout) + + --mobile side: expect OnHashChange notification is not send to mobile + EXPECT_NOTIFICATION("OnHashChange") + :Times(0) + end + + --End test case NegativeRequestCheck.1.24 + ----------------------------------------------------------------------------------------- + + --Begin test case NegativeRequestCheck.1.25 + --Description: Check timeoutPrompt: text parameter is wrong type + + function Test:SetGlobalProperties_timeoutPrompt_text_IsWrongType_123_INVALID_DATA() + + --mobile side: sending SetGlobalProperties request + local cid = self.mobileSession:SendRPC("SetGlobalProperties", + { + menuTitle = "Menu Title", + timeoutPrompt = + { + { + text = 123, + type = "TEXT" + } + }, + vrHelp = + { + { + position = 1, + image = + { + value = "action.png", + imageType = "DYNAMIC" + }, + text = "VR help item" + } + }, + menuIcon = + { + value = "action.png", + imageType = "DYNAMIC" + }, + helpPrompt = + { + { + text = "Help prompt", + type = "TEXT" + } + }, + vrHelpTitle = "VR help title", + keyboardProperties = + { + keyboardLayout = "QWERTY", + keypressMode = "SINGLE_KEYPRESS", + limitedCharacterList = + { + "a" + }, + language = "EN-US", + autoCompleteText = "Daemon, Freedom" + } + }) + + + --mobile side: expect SetGlobalProperties response + EXPECT_RESPONSE(cid, { success = false, resultCode = "INVALID_DATA"}) + :Timeout(iTimeout) + + --mobile side: expect OnHashChange notification is not send to mobile + EXPECT_NOTIFICATION("OnHashChange") + :Times(0) + end + + --End test case NegativeRequestCheck.1.25 + ----------------------------------------------------------------------------------------- + + --Begin test case NegativeRequestCheck.1.26 + --Description: Check timeoutPrompt: text parameter is lower bound + + function Test:SetGlobalProperties_timeoutPrompt_text_IsOutLowerBound_0_SUCCESS() + + --mobile side: sending SetGlobalProperties request + local cid = self.mobileSession:SendRPC("SetGlobalProperties", + { + menuTitle = "Menu Title", + timeoutPrompt = + { + { + text = "", + type = "TEXT" + } + }, + vrHelp = + { + { + position = 1, + image = + { + value = "action.png", + imageType = "DYNAMIC" + }, + text = "VR help item" + } + }, + menuIcon = + { + value = "action.png", + imageType = "DYNAMIC" + }, + helpPrompt = + { + { + text = "Help prompt", + type = "TEXT" + } + }, + vrHelpTitle = "VR help title" + }) + + + --hmi side: expect TTS.SetGlobalProperties request + EXPECT_HMICALL("TTS.SetGlobalProperties", + { + timeoutPrompt = + { + { + text = "", + type = "TEXT" + } + }, + helpPrompt = + { + { + text = "Help prompt", + type = "TEXT" + } + } + }) + :Timeout(iTimeout) + :Do(function(_,data) + --hmi side: sending UI.SetGlobalProperties response + self.hmiConnection:SendResponse(data.id, data.method, "SUCCESS", {}) + end) + + + + --hmi side: expect UI.SetGlobalProperties request + EXPECT_HMICALL("UI.SetGlobalProperties") + :Timeout(iTimeout) + :Do(function(_,data) + --hmi side: sending UI.SetGlobalProperties response + self.hmiConnection:SendResponse(data.id, data.method, "SUCCESS", {}) + end) + + + + --mobile side: expect SetGlobalProperties response + EXPECT_RESPONSE(cid, { success = true, resultCode = "SUCCESS"}) + :Timeout(iTimeout) + + --mobile side: expect OnHashChange notification + EXPECT_NOTIFICATION("OnHashChange") + end + + --End test case NegativeRequestCheck.1.26 + ----------------------------------------------------------------------------------------- + + --Begin test case NegativeRequestCheck.1.27 + --Description: Check timeoutPrompt: text parameter is out upper bound + + function Test:SetGlobalProperties_timeoutPrompt_text_IsOutUpperBound_501_INVALID_DATA() + + --mobile side: sending SetGlobalProperties request + local cid = self.mobileSession:SendRPC("SetGlobalProperties", + { + menuTitle = "Menu Title", + timeoutPrompt = + { + { + text = "qA1_wB2_eA3_rB4_tA5_yB6_uA7_iB8_oA9_pB0_aA1_sB2_dA3_fB4_gA5_hB6_jA7_kB8_lA9_zB0_xA1_cB2_vA3_bB4_nA5_mB6_qA7_wB8_eA9_rB0_tA1_yB2_uA3_iB4_oA5_pB6_aA7_sB8_dA9_fB0_gA1_hB2_jA3_kB4_lA5_zB6_xA7_cB8_vA9_bB0_nA1_mB2_qA3_wB4_eA5_rB6_tA7_yB8_uA9_iB0_oA1_pB2_aA3_sB4_dA5_fB6_gA7_hB8_jA9_kB0_lA1_zB2_xA3_cB4_vA5_bB6_nA7_mB8_qA9_wB0_eA1_rB2_tA3_yB4_uA5_iB6_oA7_pB8_aA9_sB0_dA1_fB2_gA3_hB4_jA5_kB6_lA7_zB8_xA9_cB0_vA1_bB2_nA3_mB4_qA5_wB6_eA7_rB8_tA9_yB0_uA1_iB2_oA3_pB4_aA5_sB6_dA7_fB8_gA9_hB0_jA1_kB2_lA3_zB4_xA5_c", + type = "TEXT" + } + }, + vrHelp = + { + { + position = 1, + image = + { + value = "action.png", + imageType = "DYNAMIC" + }, + text = "VR help item" + } + }, + menuIcon = + { + value = "action.png", + imageType = "DYNAMIC" + }, + helpPrompt = + { + { + text = "Help prompt", + type = "TEXT" + } + }, + vrHelpTitle = "VR help title", + keyboardProperties = + { + keyboardLayout = "QWERTY", + keypressMode = "SINGLE_KEYPRESS", + limitedCharacterList = + { + "a" + }, + language = "EN-US", + autoCompleteText = "Daemon, Freedom" + } + }) + + + --mobile side: expect SetGlobalProperties response + EXPECT_RESPONSE(cid, { success = false, resultCode = "INVALID_DATA"}) + :Timeout(iTimeout) + + --mobile side: expect OnHashChange notification is not send to mobile + EXPECT_NOTIFICATION("OnHashChange") + :Times(0) + end + + --End test case NegativeRequestCheck.1.27 + ----------------------------------------------------------------------------------------- + + --Begin test case NegativeRequestCheck.1.28 + --Description: Check timeoutPrompt: text parameter contains escape characters _NewLineCharacter_ + + function Test:SetGlobalProperties_timeoutPrompt_text__NewLineCharacter__INVALID_DATA() + + --mobile side: sending SetGlobalProperties request + local cid = self.mobileSession:SendRPC("SetGlobalProperties", + { + menuTitle = "Menu Title", + timeoutPrompt = + { + { + text = "\n", + type = "TEXT" + } + }, + vrHelp = + { + { + position = 1, + image = + { + value = "action.png", + imageType = "DYNAMIC" + }, + text = "VR help item" + } + }, + menuIcon = + { + value = "action.png", + imageType = "DYNAMIC" + }, + helpPrompt = + { + { + text = "Help prompt", + type = "TEXT" + } + }, + vrHelpTitle = "VR help title", + keyboardProperties = + { + keyboardLayout = "QWERTY", + keypressMode = "SINGLE_KEYPRESS", + limitedCharacterList = + { + "a" + }, + language = "EN-US", + autoCompleteText = "Daemon, Freedom" + } + }) + + + --mobile side: expect SetGlobalProperties response + EXPECT_RESPONSE(cid, { success = false, resultCode = "INVALID_DATA"}) + :Timeout(iTimeout) + + --mobile side: expect OnHashChange notification is not send to mobile + EXPECT_NOTIFICATION("OnHashChange") + :Times(0) + end + + --End test case NegativeRequestCheck.1.28 + ----------------------------------------------------------------------------------------- + + --Begin test case NegativeRequestCheck.1.29 + --Description: Check timeoutPrompt: text parameter contains escape characters _TabChacracter_ + + function Test:SetGlobalProperties_timeoutPrompt_text__TabChacracter__INVALID_DATA() + + --mobile side: sending SetGlobalProperties request + local cid = self.mobileSession:SendRPC("SetGlobalProperties", + { + menuTitle = "Menu Title", + timeoutPrompt = + { + { + text = "\t", + type = "TEXT" + } + }, + vrHelp = + { + { + position = 1, + image = + { + value = "action.png", + imageType = "DYNAMIC" + }, + text = "VR help item" + } + }, + menuIcon = + { + value = "action.png", + imageType = "DYNAMIC" + }, + helpPrompt = + { + { + text = "Help prompt", + type = "TEXT" + } + }, + vrHelpTitle = "VR help title", + keyboardProperties = + { + keyboardLayout = "QWERTY", + keypressMode = "SINGLE_KEYPRESS", + limitedCharacterList = + { + "a" + }, + language = "EN-US", + autoCompleteText = "Daemon, Freedom" + } + }) + + + --mobile side: expect SetGlobalProperties response + EXPECT_RESPONSE(cid, { success = false, resultCode = "INVALID_DATA"}) + :Timeout(iTimeout) + + --mobile side: expect OnHashChange notification is not send to mobile + EXPECT_NOTIFICATION("OnHashChange") + :Times(0) + end + + --End test case NegativeRequestCheck.1.29 + ----------------------------------------------------------------------------------------- + + --Begin test case NegativeRequestCheck.1.30 + --Description: Check timeoutPrompt: text parameter contains escape characters _SpaceCharacter_ + + function Test:SetGlobalProperties_timeoutPrompt_text__SpaceCharacter__INVALID_DATA() + + --mobile side: sending SetGlobalProperties request + local cid = self.mobileSession:SendRPC("SetGlobalProperties", + { + menuTitle = "Menu Title", + timeoutPrompt = + { + { + text = " ", + type = "TEXT" + } + }, + vrHelp = + { + { + position = 1, + image = + { + value = "action.png", + imageType = "DYNAMIC" + }, + text = "VR help item" + } + }, + menuIcon = + { + value = "action.png", + imageType = "DYNAMIC" + }, + helpPrompt = + { + { + text = "Help prompt", + type = "TEXT" + } + }, + vrHelpTitle = "VR help title", + keyboardProperties = + { + keyboardLayout = "QWERTY", + keypressMode = "SINGLE_KEYPRESS", + limitedCharacterList = + { + "a" + }, + language = "EN-US", + autoCompleteText = "Daemon, Freedom" + } + }) + + + --mobile side: expect SetGlobalProperties response + EXPECT_RESPONSE(cid, { success = false, resultCode = "INVALID_DATA"}) + :Timeout(iTimeout) + + --mobile side: expect OnHashChange notification is not send to mobile + EXPECT_NOTIFICATION("OnHashChange") + :Times(0) + end + + --End test case NegativeRequestCheck.1.30 + ----------------------------------------------------------------------------------------- + + --Begin test case NegativeRequestCheck.1.31 + --Description: Check vrHelpTitle parameter is wrong type + + function Test:SetGlobalProperties_vrHelpTitle_IsWrongType_123_INVALID_DATA() + + --mobile side: sending SetGlobalProperties request + local cid = self.mobileSession:SendRPC("SetGlobalProperties", + { + menuTitle = "Menu Title", + timeoutPrompt = + { + { + text = "Timeout prompt", + type = "TEXT" + } + }, + vrHelp = + { + { + position = 1, + image = + { + value = "action.png", + imageType = "DYNAMIC" + }, + text = "VR help item" + } + }, + menuIcon = + { + value = "action.png", + imageType = "DYNAMIC" + }, + helpPrompt = + { + { + text = "Help prompt", + type = "TEXT" + } + }, + vrHelpTitle = 123, + keyboardProperties = + { + keyboardLayout = "QWERTY", + keypressMode = "SINGLE_KEYPRESS", + limitedCharacterList = + { + "a" + }, + language = "EN-US", + autoCompleteText = "Daemon, Freedom" + } + }) + + + --mobile side: expect SetGlobalProperties response + EXPECT_RESPONSE(cid, { success = false, resultCode = "INVALID_DATA"}) + :Timeout(iTimeout) + + --mobile side: expect OnHashChange notification is not send to mobile + EXPECT_NOTIFICATION("OnHashChange") + :Times(0) + end + + --End test case NegativeRequestCheck.1.31 + ----------------------------------------------------------------------------------------- + + --Begin test case NegativeRequestCheck.1.32 + --Description: Check vrHelpTitle parameter is lower bound + + function Test:SetGlobalProperties_vrHelpTitle_IsOutLowerBound_0_INVALID_DATA() + + --mobile side: sending SetGlobalProperties request + local cid = self.mobileSession:SendRPC("SetGlobalProperties", + { + menuTitle = "Menu Title", + timeoutPrompt = + { + { + text = "Timeout prompt", + type = "TEXT" + } + }, + vrHelp = + { + { + position = 1, + image = + { + value = "action.png", + imageType = "DYNAMIC" + }, + text = "VR help item" + } + }, + menuIcon = + { + value = "action.png", + imageType = "DYNAMIC" + }, + helpPrompt = + { + { + text = "Help prompt", + type = "TEXT" + } + }, + vrHelpTitle = "", + keyboardProperties = + { + keyboardLayout = "QWERTY", + keypressMode = "SINGLE_KEYPRESS", + limitedCharacterList = + { + "a" + }, + language = "EN-US", + autoCompleteText = "Daemon, Freedom" + } + }) + + + --mobile side: expect SetGlobalProperties response + EXPECT_RESPONSE(cid, { success = false, resultCode = "INVALID_DATA"}) + :Timeout(iTimeout) + + --mobile side: expect OnHashChange notification is not send to mobile + EXPECT_NOTIFICATION("OnHashChange") + :Times(0) + end + + --End test case NegativeRequestCheck.1.32 + ----------------------------------------------------------------------------------------- + + --Begin test case NegativeRequestCheck.1.33 + --Description: Check vrHelpTitle parameter is out upper bound + + function Test:SetGlobalProperties_vrHelpTitle_IsOutUpperBound_501_INVALID_DATA() + + --mobile side: sending SetGlobalProperties request + local cid = self.mobileSession:SendRPC("SetGlobalProperties", + { + menuTitle = "Menu Title", + timeoutPrompt = + { + { + text = "Timeout prompt", + type = "TEXT" + } + }, + vrHelp = + { + { + position = 1, + image = + { + value = "action.png", + imageType = "DYNAMIC" + }, + text = "VR help item" + } + }, + menuIcon = + { + value = "action.png", + imageType = "DYNAMIC" + }, + helpPrompt = + { + { + text = "Help prompt", + type = "TEXT" + } + }, + vrHelpTitle = "qA1_wB2_eA3_rB4_tA5_yB6_uA7_iB8_oA9_pB0_aA1_sB2_dA3_fB4_gA5_hB6_jA7_kB8_lA9_zB0_xA1_cB2_vA3_bB4_nA5_mB6_qA7_wB8_eA9_rB0_tA1_yB2_uA3_iB4_oA5_pB6_aA7_sB8_dA9_fB0_gA1_hB2_jA3_kB4_lA5_zB6_xA7_cB8_vA9_bB0_nA1_mB2_qA3_wB4_eA5_rB6_tA7_yB8_uA9_iB0_oA1_pB2_aA3_sB4_dA5_fB6_gA7_hB8_jA9_kB0_lA1_zB2_xA3_cB4_vA5_bB6_nA7_mB8_qA9_wB0_eA1_rB2_tA3_yB4_uA5_iB6_oA7_pB8_aA9_sB0_dA1_fB2_gA3_hB4_jA5_kB6_lA7_zB8_xA9_cB0_vA1_bB2_nA3_mB4_qA5_wB6_eA7_rB8_tA9_yB0_uA1_iB2_oA3_pB4_aA5_sB6_dA7_fB8_gA9_hB0_jA1_kB2_lA3_zB4_xA5_c", + keyboardProperties = + { + keyboardLayout = "QWERTY", + keypressMode = "SINGLE_KEYPRESS", + limitedCharacterList = + { + "a" + }, + language = "EN-US", + autoCompleteText = "Daemon, Freedom" + } + }) + + + --mobile side: expect SetGlobalProperties response + EXPECT_RESPONSE(cid, { success = false, resultCode = "INVALID_DATA"}) + :Timeout(iTimeout) + + --mobile side: expect OnHashChange notification is not send to mobile + EXPECT_NOTIFICATION("OnHashChange") + :Times(0) + end + + --End test case NegativeRequestCheck.1.33 + ----------------------------------------------------------------------------------------- + + --Begin test case NegativeRequestCheck.1.34 + --Description: Check vrHelpTitle parameter contains escape characters (new line) + + function Test:SetGlobalProperties_vrHelpTitle__NewLineCharacter__INVALID_DATA() + + --mobile side: sending SetGlobalProperties request + local cid = self.mobileSession:SendRPC("SetGlobalProperties", + { + menuTitle = "Menu Title", + timeoutPrompt = + { + { + text = "Timeout prompt", + type = "TEXT" + } + }, + vrHelp = + { + { + position = 1, + image = + { + value = "action.png", + imageType = "DYNAMIC" + }, + text = "VR help item" + } + }, + menuIcon = + { + value = "action.png", + imageType = "DYNAMIC" + }, + helpPrompt = + { + { + text = "Help prompt", + type = "TEXT" + } + }, + vrHelpTitle = "\n", + keyboardProperties = + { + keyboardLayout = "QWERTY", + keypressMode = "SINGLE_KEYPRESS", + limitedCharacterList = + { + "a" + }, + language = "EN-US", + autoCompleteText = "Daemon, Freedom" + } + }) + + + --mobile side: expect SetGlobalProperties response + EXPECT_RESPONSE(cid, { success = false, resultCode = "INVALID_DATA"}) + :Timeout(iTimeout) + + --mobile side: expect OnHashChange notification is not send to mobile + EXPECT_NOTIFICATION("OnHashChange") + :Times(0) + end + + --End test case NegativeRequestCheck.1.34 + ----------------------------------------------------------------------------------------- + + --Begin test case NegativeRequestCheck.1.35 + --Description: Check vrHelpTitle parameter contains escape characters (tab) + + function Test:SetGlobalProperties_vrHelpTitle__TabChacracter__INVALID_DATA() + + --mobile side: sending SetGlobalProperties request + local cid = self.mobileSession:SendRPC("SetGlobalProperties", + { + menuTitle = "Menu Title", + timeoutPrompt = + { + { + text = "Timeout prompt", + type = "TEXT" + } + }, + vrHelp = + { + { + position = 1, + image = + { + value = "action.png", + imageType = "DYNAMIC" + }, + text = "VR help item" + } + }, + menuIcon = + { + value = "action.png", + imageType = "DYNAMIC" + }, + helpPrompt = + { + { + text = "Help prompt", + type = "TEXT" + } + }, + vrHelpTitle = "\t", + keyboardProperties = + { + keyboardLayout = "QWERTY", + keypressMode = "SINGLE_KEYPRESS", + limitedCharacterList = + { + "a" + }, + language = "EN-US", + autoCompleteText = "Daemon, Freedom" + } + }) + + + --mobile side: expect SetGlobalProperties response + EXPECT_RESPONSE(cid, { success = false, resultCode = "INVALID_DATA"}) + :Timeout(iTimeout) + + --mobile side: expect OnHashChange notification is not send to mobile + EXPECT_NOTIFICATION("OnHashChange") + :Times(0) + end + + --End test case NegativeRequestCheck.1.35 + ----------------------------------------------------------------------------------------- + + --Begin test case NegativeRequestCheck.1.36 + --Description: Check vrHelpTitle parameter contains escape characters (spaces) + + function Test:SetGlobalProperties_vrHelpTitle__SpaceCharacter__INVALID_DATA() + + --mobile side: sending SetGlobalProperties request + local cid = self.mobileSession:SendRPC("SetGlobalProperties", + { + menuTitle = "Menu Title", + timeoutPrompt = + { + { + text = "Timeout prompt", + type = "TEXT" + } + }, + vrHelp = + { + { + position = 1, + image = + { + value = "action.png", + imageType = "DYNAMIC" + }, + text = "VR help item" + } + }, + menuIcon = + { + value = "action.png", + imageType = "DYNAMIC" + }, + helpPrompt = + { + { + text = "Help prompt", + type = "TEXT" + } + }, + vrHelpTitle = " ", + keyboardProperties = + { + keyboardLayout = "QWERTY", + keypressMode = "SINGLE_KEYPRESS", + limitedCharacterList = + { + "a" + }, + language = "EN-US", + autoCompleteText = "Daemon, Freedom" + } + }) + + + --mobile side: expect SetGlobalProperties response + EXPECT_RESPONSE(cid, { success = false, resultCode = "INVALID_DATA"}) + :Timeout(iTimeout) + + --mobile side: expect OnHashChange notification is not send to mobile + EXPECT_NOTIFICATION("OnHashChange") + :Times(0) + end + + --End test case NegativeRequestCheck.1.36 + ----------------------------------------------------------------------------------------- + + --Begin test case NegativeRequestCheck.1.37 + --Description: Check vrHelp parameter is wrong type + + function Test:SetGlobalProperties_vrHelp_Array_WrongType_123_INVALID_DATA() + + --mobile side: sending SetGlobalProperties request + local cid = self.mobileSession:SendRPC("SetGlobalProperties", + { + menuTitle = "Menu Title", + timeoutPrompt = + { + { + text = "Timeout prompt", + type = "TEXT" + } + }, + vrHelp = 123, + menuIcon = + { + value = "action.png", + imageType = "DYNAMIC" + }, + helpPrompt = + { + { + text = "Help prompt", + type = "TEXT" + } + }, + vrHelpTitle = "VR help title", + keyboardProperties = + { + keyboardLayout = "QWERTY", + keypressMode = "SINGLE_KEYPRESS", + limitedCharacterList = + { + "a" + }, + language = "EN-US", + autoCompleteText = "Daemon, Freedom" + } + }) + + + --mobile side: expect SetGlobalProperties response + EXPECT_RESPONSE(cid, { success = false, resultCode = "INVALID_DATA"}) + :Timeout(iTimeout) + + --mobile side: expect OnHashChange notification is not send to mobile + EXPECT_NOTIFICATION("OnHashChange") + :Times(0) + end + + --End test case NegativeRequestCheck.1.37 + ----------------------------------------------------------------------------------------- + + --Begin test case NegativeRequestCheck.1.38 + --Description: Check vrHelp parameter is out lower bound + + function Test:SetGlobalProperties_vrHelp_Array_Outminsize_0_INVALID_DATA() + + --mobile side: sending SetGlobalProperties request + local cid = self.mobileSession:SendRPC("SetGlobalProperties", + { + menuTitle = "Menu Title", + timeoutPrompt = + { + { + text = "Timeout prompt", + type = "TEXT" + } + }, + vrHelp = + { + + }, + menuIcon = + { + value = "action.png", + imageType = "DYNAMIC" + }, + helpPrompt = + { + { + text = "Help prompt", + type = "TEXT" + } + }, + vrHelpTitle = "VR help title", + keyboardProperties = + { + keyboardLayout = "QWERTY", + keypressMode = "SINGLE_KEYPRESS", + limitedCharacterList = + { + "a" + }, + language = "EN-US", + autoCompleteText = "Daemon, Freedom" + } + }) + + + --mobile side: expect SetGlobalProperties response + EXPECT_RESPONSE(cid, { success = false, resultCode = "INVALID_DATA"}) + :Timeout(iTimeout) + + --mobile side: expect OnHashChange notification is not send to mobile + EXPECT_NOTIFICATION("OnHashChange") + :Times(0) + end + + --End test case NegativeRequestCheck.1.38 + ----------------------------------------------------------------------------------------- + + --Begin test case NegativeRequestCheck.1.39 + --Description: Check vrHelp parameter is out upper bound + + function Test:SetGlobalProperties_vrHelp_Array_Outmaxsize_101_INVALID_DATA() + + --mobile side: sending SetGlobalProperties request + local cid = self.mobileSession:SendRPC("SetGlobalProperties", + { + menuTitle = "Menu Title", + timeoutPrompt = + { + { + text = "Timeout prompt", + type = "TEXT" + } + }, + vrHelp = + { + { + position = 1, + image = + { + value = "action.png", + imageType = "DYNAMIC" + }, + text = "VR help item_001" + }, + { + position = 2, + image = + { + value = "action.png", + imageType = "DYNAMIC" + }, + text = "VR help item_002" + }, + { + position = 3, + image = + { + value = "action.png", + imageType = "DYNAMIC" + }, + text = "VR help item_003" + }, + { + position = 4, + image = + { + value = "action.png", + imageType = "DYNAMIC" + }, + text = "VR help item_004" + }, + { + position = 5, + image = + { + value = "action.png", + imageType = "DYNAMIC" + }, + text = "VR help item_005" + }, + { + position = 6, + image = + { + value = "action.png", + imageType = "DYNAMIC" + }, + text = "VR help item_006" + }, + { + position = 7, + image = + { + value = "action.png", + imageType = "DYNAMIC" + }, + text = "VR help item_007" + }, + { + position = 8, + image = + { + value = "action.png", + imageType = "DYNAMIC" + }, + text = "VR help item_008" + }, + { + position = 9, + image = + { + value = "action.png", + imageType = "DYNAMIC" + }, + text = "VR help item_009" + }, + { + position = 10, + image = + { + value = "action.png", + imageType = "DYNAMIC" + }, + text = "VR help item_010" + }, + { + position = 11, + image = + { + value = "action.png", + imageType = "DYNAMIC" + }, + text = "VR help item_011" + }, + { + position = 12, + image = + { + value = "action.png", + imageType = "DYNAMIC" + }, + text = "VR help item_012" + }, + { + position = 13, + image = + { + value = "action.png", + imageType = "DYNAMIC" + }, + text = "VR help item_013" + }, + { + position = 14, + image = + { + value = "action.png", + imageType = "DYNAMIC" + }, + text = "VR help item_014" + }, + { + position = 15, + image = + { + value = "action.png", + imageType = "DYNAMIC" + }, + text = "VR help item_015" + }, + { + position = 16, + image = + { + value = "action.png", + imageType = "DYNAMIC" + }, + text = "VR help item_016" + }, + { + position = 17, + image = + { + value = "action.png", + imageType = "DYNAMIC" + }, + text = "VR help item_017" + }, + { + position = 18, + image = + { + value = "action.png", + imageType = "DYNAMIC" + }, + text = "VR help item_018" + }, + { + position = 19, + image = + { + value = "action.png", + imageType = "DYNAMIC" + }, + text = "VR help item_019" + }, + { + position = 20, + image = + { + value = "action.png", + imageType = "DYNAMIC" + }, + text = "VR help item_020" + }, + { + position = 21, + image = + { + value = "action.png", + imageType = "DYNAMIC" + }, + text = "VR help item_021" + }, + { + position = 22, + image = + { + value = "action.png", + imageType = "DYNAMIC" + }, + text = "VR help item_022" + }, + { + position = 23, + image = + { + value = "action.png", + imageType = "DYNAMIC" + }, + text = "VR help item_023" + }, + { + position = 24, + image = + { + value = "action.png", + imageType = "DYNAMIC" + }, + text = "VR help item_024" + }, + { + position = 25, + image = + { + value = "action.png", + imageType = "DYNAMIC" + }, + text = "VR help item_025" + }, + { + position = 26, + image = + { + value = "action.png", + imageType = "DYNAMIC" + }, + text = "VR help item_026" + }, + { + position = 27, + image = + { + value = "action.png", + imageType = "DYNAMIC" + }, + text = "VR help item_027" + }, + { + position = 28, + image = + { + value = "action.png", + imageType = "DYNAMIC" + }, + text = "VR help item_028" + }, + { + position = 29, + image = + { + value = "action.png", + imageType = "DYNAMIC" + }, + text = "VR help item_029" + }, + { + position = 30, + image = + { + value = "action.png", + imageType = "DYNAMIC" + }, + text = "VR help item_030" + }, + { + position = 31, + image = + { + value = "action.png", + imageType = "DYNAMIC" + }, + text = "VR help item_031" + }, + { + position = 32, + image = + { + value = "action.png", + imageType = "DYNAMIC" + }, + text = "VR help item_032" + }, + { + position = 33, + image = + { + value = "action.png", + imageType = "DYNAMIC" + }, + text = "VR help item_033" + }, + { + position = 34, + image = + { + value = "action.png", + imageType = "DYNAMIC" + }, + text = "VR help item_034" + }, + { + position = 35, + image = + { + value = "action.png", + imageType = "DYNAMIC" + }, + text = "VR help item_035" + }, + { + position = 36, + image = + { + value = "action.png", + imageType = "DYNAMIC" + }, + text = "VR help item_036" + }, + { + position = 37, + image = + { + value = "action.png", + imageType = "DYNAMIC" + }, + text = "VR help item_037" + }, + { + position = 38, + image = + { + value = "action.png", + imageType = "DYNAMIC" + }, + text = "VR help item_038" + }, + { + position = 39, + image = + { + value = "action.png", + imageType = "DYNAMIC" + }, + text = "VR help item_039" + }, + { + position = 40, + image = + { + value = "action.png", + imageType = "DYNAMIC" + }, + text = "VR help item_040" + }, + { + position = 41, + image = + { + value = "action.png", + imageType = "DYNAMIC" + }, + text = "VR help item_041" + }, + { + position = 42, + image = + { + value = "action.png", + imageType = "DYNAMIC" + }, + text = "VR help item_042" + }, + { + position = 43, + image = + { + value = "action.png", + imageType = "DYNAMIC" + }, + text = "VR help item_043" + }, + { + position = 44, + image = + { + value = "action.png", + imageType = "DYNAMIC" + }, + text = "VR help item_044" + }, + { + position = 45, + image = + { + value = "action.png", + imageType = "DYNAMIC" + }, + text = "VR help item_045" + }, + { + position = 46, + image = + { + value = "action.png", + imageType = "DYNAMIC" + }, + text = "VR help item_046" + }, + { + position = 47, + image = + { + value = "action.png", + imageType = "DYNAMIC" + }, + text = "VR help item_047" + }, + { + position = 48, + image = + { + value = "action.png", + imageType = "DYNAMIC" + }, + text = "VR help item_048" + }, + { + position = 49, + image = + { + value = "action.png", + imageType = "DYNAMIC" + }, + text = "VR help item_049" + }, + { + position = 50, + image = + { + value = "action.png", + imageType = "DYNAMIC" + }, + text = "VR help item_050" + }, + { + position = 51, + image = + { + value = "action.png", + imageType = "DYNAMIC" + }, + text = "VR help item_051" + }, + { + position = 52, + image = + { + value = "action.png", + imageType = "DYNAMIC" + }, + text = "VR help item_052" + }, + { + position = 53, + image = + { + value = "action.png", + imageType = "DYNAMIC" + }, + text = "VR help item_053" + }, + { + position = 54, + image = + { + value = "action.png", + imageType = "DYNAMIC" + }, + text = "VR help item_054" + }, + { + position = 55, + image = + { + value = "action.png", + imageType = "DYNAMIC" + }, + text = "VR help item_055" + }, + { + position = 56, + image = + { + value = "action.png", + imageType = "DYNAMIC" + }, + text = "VR help item_056" + }, + { + position = 57, + image = + { + value = "action.png", + imageType = "DYNAMIC" + }, + text = "VR help item_057" + }, + { + position = 58, + image = + { + value = "action.png", + imageType = "DYNAMIC" + }, + text = "VR help item_058" + }, + { + position = 59, + image = + { + value = "action.png", + imageType = "DYNAMIC" + }, + text = "VR help item_059" + }, + { + position = 60, + image = + { + value = "action.png", + imageType = "DYNAMIC" + }, + text = "VR help item_060" + }, + { + position = 61, + image = + { + value = "action.png", + imageType = "DYNAMIC" + }, + text = "VR help item_061" + }, + { + position = 62, + image = + { + value = "action.png", + imageType = "DYNAMIC" + }, + text = "VR help item_062" + }, + { + position = 63, + image = + { + value = "action.png", + imageType = "DYNAMIC" + }, + text = "VR help item_063" + }, + { + position = 64, + image = + { + value = "action.png", + imageType = "DYNAMIC" + }, + text = "VR help item_064" + }, + { + position = 65, + image = + { + value = "action.png", + imageType = "DYNAMIC" + }, + text = "VR help item_065" + }, + { + position = 66, + image = + { + value = "action.png", + imageType = "DYNAMIC" + }, + text = "VR help item_066" + }, + { + position = 67, + image = + { + value = "action.png", + imageType = "DYNAMIC" + }, + text = "VR help item_067" + }, + { + position = 68, + image = + { + value = "action.png", + imageType = "DYNAMIC" + }, + text = "VR help item_068" + }, + { + position = 69, + image = + { + value = "action.png", + imageType = "DYNAMIC" + }, + text = "VR help item_069" + }, + { + position = 70, + image = + { + value = "action.png", + imageType = "DYNAMIC" + }, + text = "VR help item_070" + }, + { + position = 71, + image = + { + value = "action.png", + imageType = "DYNAMIC" + }, + text = "VR help item_071" + }, + { + position = 72, + image = + { + value = "action.png", + imageType = "DYNAMIC" + }, + text = "VR help item_072" + }, + { + position = 73, + image = + { + value = "action.png", + imageType = "DYNAMIC" + }, + text = "VR help item_073" + }, + { + position = 74, + image = + { + value = "action.png", + imageType = "DYNAMIC" + }, + text = "VR help item_074" + }, + { + position = 75, + image = + { + value = "action.png", + imageType = "DYNAMIC" + }, + text = "VR help item_075" + }, + { + position = 76, + image = + { + value = "action.png", + imageType = "DYNAMIC" + }, + text = "VR help item_076" + }, + { + position = 77, + image = + { + value = "action.png", + imageType = "DYNAMIC" + }, + text = "VR help item_077" + }, + { + position = 78, + image = + { + value = "action.png", + imageType = "DYNAMIC" + }, + text = "VR help item_078" + }, + { + position = 79, + image = + { + value = "action.png", + imageType = "DYNAMIC" + }, + text = "VR help item_079" + }, + { + position = 80, + image = + { + value = "action.png", + imageType = "DYNAMIC" + }, + text = "VR help item_080" + }, + { + position = 81, + image = + { + value = "action.png", + imageType = "DYNAMIC" + }, + text = "VR help item_081" + }, + { + position = 82, + image = + { + value = "action.png", + imageType = "DYNAMIC" + }, + text = "VR help item_082" + }, + { + position = 83, + image = + { + value = "action.png", + imageType = "DYNAMIC" + }, + text = "VR help item_083" + }, + { + position = 84, + image = + { + value = "action.png", + imageType = "DYNAMIC" + }, + text = "VR help item_084" + }, + { + position = 85, + image = + { + value = "action.png", + imageType = "DYNAMIC" + }, + text = "VR help item_085" + }, + { + position = 86, + image = + { + value = "action.png", + imageType = "DYNAMIC" + }, + text = "VR help item_086" + }, + { + position = 87, + image = + { + value = "action.png", + imageType = "DYNAMIC" + }, + text = "VR help item_087" + }, + { + position = 88, + image = + { + value = "action.png", + imageType = "DYNAMIC" + }, + text = "VR help item_088" + }, + { + position = 89, + image = + { + value = "action.png", + imageType = "DYNAMIC" + }, + text = "VR help item_089" + }, + { + position = 90, + image = + { + value = "action.png", + imageType = "DYNAMIC" + }, + text = "VR help item_090" + }, + { + position = 91, + image = + { + value = "action.png", + imageType = "DYNAMIC" + }, + text = "VR help item_091" + }, + { + position = 92, + image = + { + value = "action.png", + imageType = "DYNAMIC" + }, + text = "VR help item_092" + }, + { + position = 93, + image = + { + value = "action.png", + imageType = "DYNAMIC" + }, + text = "VR help item_093" + }, + { + position = 94, + image = + { + value = "action.png", + imageType = "DYNAMIC" + }, + text = "VR help item_094" + }, + { + position = 95, + image = + { + value = "action.png", + imageType = "DYNAMIC" + }, + text = "VR help item_095" + }, + { + position = 96, + image = + { + value = "action.png", + imageType = "DYNAMIC" + }, + text = "VR help item_096" + }, + { + position = 97, + image = + { + value = "action.png", + imageType = "DYNAMIC" + }, + text = "VR help item_097" + }, + { + position = 98, + image = + { + value = "action.png", + imageType = "DYNAMIC" + }, + text = "VR help item_098" + }, + { + position = 99, + image = + { + value = "action.png", + imageType = "DYNAMIC" + }, + text = "VR help item_099" + }, + { + position = 100, + image = + { + value = "action.png", + imageType = "DYNAMIC" + }, + text = "VR help item_100" + }, + { + position = 101, + image = + { + value = "action.png", + imageType = "DYNAMIC" + }, + text = "VR help item_101" + } + }, + menuIcon = + { + value = "action.png", + imageType = "DYNAMIC" + }, + helpPrompt = + { + { + text = "Help prompt", + type = "TEXT" + } + }, + vrHelpTitle = "VR help title", + keyboardProperties = + { + keyboardLayout = "QWERTY", + keypressMode = "SINGLE_KEYPRESS", + limitedCharacterList = + { + "a" + }, + language = "EN-US", + autoCompleteText = "Daemon, Freedom" + } + }) + + + --mobile side: expect SetGlobalProperties response + EXPECT_RESPONSE(cid, { success = false, resultCode = "INVALID_DATA"}) + :Timeout(iTimeout) + + --mobile side: expect OnHashChange notification is not send to mobile + EXPECT_NOTIFICATION("OnHashChange") + :Times(0) + end + + --End test case NegativeRequestCheck.1.39 + ----------------------------------------------------------------------------------------- + + --Begin test case NegativeRequestCheck.1.40 + --Description: Check vrHelp parameter contains an array with only one empty item + + function Test:SetGlobalProperties_vrHelp_Array_ContainAnEmptyItem_INVALID_DATA() + + --mobile side: sending SetGlobalProperties request + local cid = self.mobileSession:SendRPC("SetGlobalProperties", + { + menuTitle = "Menu Title", + timeoutPrompt = + { + { + text = "Timeout prompt", + type = "TEXT" + } + }, + vrHelp = + { + { + + } + }, + menuIcon = + { + value = "action.png", + imageType = "DYNAMIC" + }, + helpPrompt = + { + { + text = "Help prompt", + type = "TEXT" + } + }, + vrHelpTitle = "VR help title", + keyboardProperties = + { + keyboardLayout = "QWERTY", + keypressMode = "SINGLE_KEYPRESS", + limitedCharacterList = + { + "a" + }, + language = "EN-US", + autoCompleteText = "Daemon, Freedom" + } + }) + + + --mobile side: expect SetGlobalProperties response + EXPECT_RESPONSE(cid, { success = false, resultCode = "INVALID_DATA"}) + :Timeout(iTimeout) + + --mobile side: expect OnHashChange notification is not send to mobile + EXPECT_NOTIFICATION("OnHashChange") + :Times(0) + end + + --End test case NegativeRequestCheck.1.40 + ----------------------------------------------------------------------------------------- + + --Begin test case NegativeRequestCheck.1.41 + --Description: Check vrHelp parameter is wrong type + + function Test:SetGlobalProperties_vrHelp_WrongType_123_INVALID_DATA() + + --mobile side: sending SetGlobalProperties request + local cid = self.mobileSession:SendRPC("SetGlobalProperties", + { + menuTitle = "Menu Title", + timeoutPrompt = + { + { + text = "Timeout prompt", + type = "TEXT" + } + }, + vrHelp = + { + 123 + }, + menuIcon = + { + value = "action.png", + imageType = "DYNAMIC" + }, + helpPrompt = + { + { + text = "Help prompt", + type = "TEXT" + } + }, + vrHelpTitle = "VR help title", + keyboardProperties = + { + keyboardLayout = "QWERTY", + keypressMode = "SINGLE_KEYPRESS", + limitedCharacterList = + { + "a" + }, + language = "EN-US", + autoCompleteText = "Daemon, Freedom" + } + }) + + + --mobile side: expect SetGlobalProperties response + EXPECT_RESPONSE(cid, { success = false, resultCode = "INVALID_DATA"}) + :Timeout(iTimeout) + + --mobile side: expect OnHashChange notification is not send to mobile + EXPECT_NOTIFICATION("OnHashChange") + :Times(0) + end + + --End test case NegativeRequestCheck.1.41 + ----------------------------------------------------------------------------------------- + + --Begin test case NegativeRequestCheck.1.42 + --Description: Check vrHelp: position parameter is missed + + function Test:SetGlobalProperties_vrHelp_position_IsMising_INVALID_DATA() + + --mobile side: sending SetGlobalProperties request + local cid = self.mobileSession:SendRPC("SetGlobalProperties", + { + menuTitle = "Menu Title", + timeoutPrompt = + { + { + text = "Timeout prompt", + type = "TEXT" + } + }, + vrHelp = + { + { + image = + { + value = "action.png", + imageType = "DYNAMIC" + }, + text = "VR help item" + } + }, + menuIcon = + { + value = "action.png", + imageType = "DYNAMIC" + }, + helpPrompt = + { + { + text = "Help prompt", + type = "TEXT" + } + }, + vrHelpTitle = "VR help title", + keyboardProperties = + { + keyboardLayout = "QWERTY", + keypressMode = "SINGLE_KEYPRESS", + limitedCharacterList = + { + "a" + }, + language = "EN-US", + autoCompleteText = "Daemon, Freedom" + } + }) + + + --mobile side: expect SetGlobalProperties response + EXPECT_RESPONSE(cid, { success = false, resultCode = "INVALID_DATA"}) + :Timeout(iTimeout) + + --mobile side: expect OnHashChange notification is not send to mobile + EXPECT_NOTIFICATION("OnHashChange") + :Times(0) + end + + --End test case NegativeRequestCheck.1.42 + ----------------------------------------------------------------------------------------- + + --Begin test case NegativeRequestCheck.1.43 + --Description: Check vrHelpposition parameter is wrong type + + function Test:SetGlobalProperties_vrHelp_position_IsWrongType_123_INVALID_DATA() + + --mobile side: sending SetGlobalProperties request + local cid = self.mobileSession:SendRPC("SetGlobalProperties", + { + menuTitle = "Menu Title", + timeoutPrompt = + { + { + text = "Timeout prompt", + type = "TEXT" + } + }, + vrHelp = + { + { + position = "123", + image = + { + value = "action.png", + imageType = "DYNAMIC" + }, + text = "VR help item" + } + }, + menuIcon = + { + value = "action.png", + imageType = "DYNAMIC" + }, + helpPrompt = + { + { + text = "Help prompt", + type = "TEXT" + } + }, + vrHelpTitle = "VR help title", + keyboardProperties = + { + keyboardLayout = "QWERTY", + keypressMode = "SINGLE_KEYPRESS", + limitedCharacterList = + { + "a" + }, + language = "EN-US", + autoCompleteText = "Daemon, Freedom" + } + }) + + + --mobile side: expect SetGlobalProperties response + EXPECT_RESPONSE(cid, { success = false, resultCode = "INVALID_DATA"}) + :Timeout(iTimeout) + + --mobile side: expect OnHashChange notification is not send to mobile + EXPECT_NOTIFICATION("OnHashChange") + :Times(0) + end + + --End test case NegativeRequestCheck.1.43 + ----------------------------------------------------------------------------------------- + + --Begin test case NegativeRequestCheck.1.44 + --Description: Check vrHelpposition parameter is out lower bound + + function Test:SetGlobalProperties_vrHelp_position_IsOutLowerBound_0_INVALID_DATA() + + --mobile side: sending SetGlobalProperties request + local cid = self.mobileSession:SendRPC("SetGlobalProperties", + { + menuTitle = "Menu Title", + timeoutPrompt = + { + { + text = "Timeout prompt", + type = "TEXT" + } + }, + vrHelp = + { + { + position = 0, + image = + { + value = "action.png", + imageType = "DYNAMIC" + }, + text = "VR help item" + } + }, + menuIcon = + { + value = "action.png", + imageType = "DYNAMIC" + }, + helpPrompt = + { + { + text = "Help prompt", + type = "TEXT" + } + }, + vrHelpTitle = "VR help title", + keyboardProperties = + { + keyboardLayout = "QWERTY", + keypressMode = "SINGLE_KEYPRESS", + limitedCharacterList = + { + "a" + }, + language = "EN-US", + autoCompleteText = "Daemon, Freedom" + } + }) + + + --mobile side: expect SetGlobalProperties response + EXPECT_RESPONSE(cid, { success = false, resultCode = "INVALID_DATA"}) + :Timeout(iTimeout) + + --mobile side: expect OnHashChange notification is not send to mobile + EXPECT_NOTIFICATION("OnHashChange") + :Times(0) + end + + --End test case NegativeRequestCheck.1.44 + ----------------------------------------------------------------------------------------- + + --Begin test case NegativeRequestCheck.1.45 + --Description: Check vrHelpposition parameter is out upper bound + + function Test:SetGlobalProperties_vrHelp_position_IsOutUpperBound_101_INVALID_DATA() + + --mobile side: sending SetGlobalProperties request + local cid = self.mobileSession:SendRPC("SetGlobalProperties", + { + menuTitle = "Menu Title", + timeoutPrompt = + { + { + text = "Timeout prompt", + type = "TEXT" + } + }, + vrHelp = + { + { + position = 101, + image = + { + value = "action.png", + imageType = "DYNAMIC" + }, + text = "VR help item" + } + }, + menuIcon = + { + value = "action.png", + imageType = "DYNAMIC" + }, + helpPrompt = + { + { + text = "Help prompt", + type = "TEXT" + } + }, + vrHelpTitle = "VR help title", + keyboardProperties = + { + keyboardLayout = "QWERTY", + keypressMode = "SINGLE_KEYPRESS", + limitedCharacterList = + { + "a" + }, + language = "EN-US", + autoCompleteText = "Daemon, Freedom" + } + }) + + + --mobile side: expect SetGlobalProperties response + EXPECT_RESPONSE(cid, { success = false, resultCode = "INVALID_DATA"}) + :Timeout(iTimeout) + + --mobile side: expect OnHashChange notification is not send to mobile + EXPECT_NOTIFICATION("OnHashChange") + :Times(0) + end + + --End test case NegativeRequestCheck.1.45 + ----------------------------------------------------------------------------------------- + + --Begin test case NegativeRequestCheck.1.46 + --Description: Check vrHelp: text parameter is missed + + function Test:SetGlobalProperties_vrHelp_text_IsMising_INVALID_DATA() + + --mobile side: sending SetGlobalProperties request + local cid = self.mobileSession:SendRPC("SetGlobalProperties", + { + menuTitle = "Menu Title", + timeoutPrompt = + { + { + text = "Timeout prompt", + type = "TEXT" + } + }, + vrHelp = + { + { + position = 1, + image = + { + value = "action.png", + imageType = "DYNAMIC" + } + } + }, + menuIcon = + { + value = "action.png", + imageType = "DYNAMIC" + }, + helpPrompt = + { + { + text = "Help prompt", + type = "TEXT" + } + }, + vrHelpTitle = "VR help title", + keyboardProperties = + { + keyboardLayout = "QWERTY", + keypressMode = "SINGLE_KEYPRESS", + limitedCharacterList = + { + "a" + }, + language = "EN-US", + autoCompleteText = "Daemon, Freedom" + } + }) + + + --mobile side: expect SetGlobalProperties response + EXPECT_RESPONSE(cid, { success = false, resultCode = "INVALID_DATA"}) + :Timeout(iTimeout) + + --mobile side: expect OnHashChange notification is not send to mobile + EXPECT_NOTIFICATION("OnHashChange") + :Times(0) + end + + --End test case NegativeRequestCheck.1.46 + ----------------------------------------------------------------------------------------- + + --Begin test case NegativeRequestCheck.1.47 + --Description: Check vrHelptext parameter is wrong type + + function Test:SetGlobalProperties_vrHelp_text_IsWrongType_123_INVALID_DATA() + + --mobile side: sending SetGlobalProperties request + local cid = self.mobileSession:SendRPC("SetGlobalProperties", + { + menuTitle = "Menu Title", + timeoutPrompt = + { + { + text = "Timeout prompt", + type = "TEXT" + } + }, + vrHelp = + { + { + position = 1, + image = + { + value = "action.png", + imageType = "DYNAMIC" + }, + text = 123 + } + }, + menuIcon = + { + value = "action.png", + imageType = "DYNAMIC" + }, + helpPrompt = + { + { + text = "Help prompt", + type = "TEXT" + } + }, + vrHelpTitle = "VR help title", + keyboardProperties = + { + keyboardLayout = "QWERTY", + keypressMode = "SINGLE_KEYPRESS", + limitedCharacterList = + { + "a" + }, + language = "EN-US", + autoCompleteText = "Daemon, Freedom" + } + }) + + + --mobile side: expect SetGlobalProperties response + EXPECT_RESPONSE(cid, { success = false, resultCode = "INVALID_DATA"}) + :Timeout(iTimeout) + + --mobile side: expect OnHashChange notification is not send to mobile + EXPECT_NOTIFICATION("OnHashChange") + :Times(0) + end + + --End test case NegativeRequestCheck.1.47 + ----------------------------------------------------------------------------------------- + + --Begin test case NegativeRequestCheck.1.48 + --Description: Check vrHelptext parameter is lower bound + + function Test:SetGlobalProperties_vrHelp_text_IsOutLowerBound_0_INVALID_DATA() + + --mobile side: sending SetGlobalProperties request + local cid = self.mobileSession:SendRPC("SetGlobalProperties", + { + menuTitle = "Menu Title", + timeoutPrompt = + { + { + text = "Timeout prompt", + type = "TEXT" + } + }, + vrHelp = + { + { + position = 1, + image = + { + value = "action.png", + imageType = "DYNAMIC" + }, + text = "" + } + }, + menuIcon = + { + value = "action.png", + imageType = "DYNAMIC" + }, + helpPrompt = + { + { + text = "Help prompt", + type = "TEXT" + } + }, + vrHelpTitle = "VR help title", + keyboardProperties = + { + keyboardLayout = "QWERTY", + keypressMode = "SINGLE_KEYPRESS", + limitedCharacterList = + { + "a" + }, + language = "EN-US", + autoCompleteText = "Daemon, Freedom" + } + }) + + + --mobile side: expect SetGlobalProperties response + EXPECT_RESPONSE(cid, { success = false, resultCode = "INVALID_DATA"}) + :Timeout(iTimeout) + + --mobile side: expect OnHashChange notification is not send to mobile + EXPECT_NOTIFICATION("OnHashChange") + :Times(0) + end + + --End test case NegativeRequestCheck.1.48 + ----------------------------------------------------------------------------------------- + + --Begin test case NegativeRequestCheck.1.49 + --Description: Check vrHelptext parameter is out upper bound + + function Test:SetGlobalProperties_vrHelp_text_IsOutUpperBound_501_INVALID_DATA() + + --mobile side: sending SetGlobalProperties request + local cid = self.mobileSession:SendRPC("SetGlobalProperties", + { + menuTitle = "Menu Title", + timeoutPrompt = + { + { + text = "Timeout prompt", + type = "TEXT" + } + }, + vrHelp = + { + { + position = 1, + image = + { + value = "action.png", + imageType = "DYNAMIC" + }, + text = "qA1_wB2_eA3_rB4_tA5_yB6_uA7_iB8_oA9_pB0_aA1_sB2_dA3_fB4_gA5_hB6_jA7_kB8_lA9_zB0_xA1_cB2_vA3_bB4_nA5_mB6_qA7_wB8_eA9_rB0_tA1_yB2_uA3_iB4_oA5_pB6_aA7_sB8_dA9_fB0_gA1_hB2_jA3_kB4_lA5_zB6_xA7_cB8_vA9_bB0_nA1_mB2_qA3_wB4_eA5_rB6_tA7_yB8_uA9_iB0_oA1_pB2_aA3_sB4_dA5_fB6_gA7_hB8_jA9_kB0_lA1_zB2_xA3_cB4_vA5_bB6_nA7_mB8_qA9_wB0_eA1_rB2_tA3_yB4_uA5_iB6_oA7_pB8_aA9_sB0_dA1_fB2_gA3_hB4_jA5_kB6_lA7_zB8_xA9_cB0_vA1_bB2_nA3_mB4_qA5_wB6_eA7_rB8_tA9_yB0_uA1_iB2_oA3_pB4_aA5_sB6_dA7_fB8_gA9_hB0_jA1_kB2_lA3_zB4_xA5_c" + } + }, + menuIcon = + { + value = "action.png", + imageType = "DYNAMIC" + }, + helpPrompt = + { + { + text = "Help prompt", + type = "TEXT" + } + }, + vrHelpTitle = "VR help title", + keyboardProperties = + { + keyboardLayout = "QWERTY", + keypressMode = "SINGLE_KEYPRESS", + limitedCharacterList = + { + "a" + }, + language = "EN-US", + autoCompleteText = "Daemon, Freedom" + } + }) + + + --mobile side: expect SetGlobalProperties response + EXPECT_RESPONSE(cid, { success = false, resultCode = "INVALID_DATA"}) + :Timeout(iTimeout) + + --mobile side: expect OnHashChange notification is not send to mobile + EXPECT_NOTIFICATION("OnHashChange") + :Times(0) + end + + --End test case NegativeRequestCheck.1.49 + ----------------------------------------------------------------------------------------- + + --Begin test case NegativeRequestCheck.1.50 + --Description: Check vrHelptext parameter contains escape characters _NewLineCharacter_ + + function Test:SetGlobalProperties_vrHelp_text__NewLineCharacter__INVALID_DATA() + + --mobile side: sending SetGlobalProperties request + local cid = self.mobileSession:SendRPC("SetGlobalProperties", + { + menuTitle = "Menu Title", + timeoutPrompt = + { + { + text = "Timeout prompt", + type = "TEXT" + } + }, + vrHelp = + { + { + position = 1, + image = + { + value = "action.png", + imageType = "DYNAMIC" + }, + text = "\n" + } + }, + menuIcon = + { + value = "action.png", + imageType = "DYNAMIC" + }, + helpPrompt = + { + { + text = "Help prompt", + type = "TEXT" + } + }, + vrHelpTitle = "VR help title", + keyboardProperties = + { + keyboardLayout = "QWERTY", + keypressMode = "SINGLE_KEYPRESS", + limitedCharacterList = + { + "a" + }, + language = "EN-US", + autoCompleteText = "Daemon, Freedom" + } + }) + + + --mobile side: expect SetGlobalProperties response + EXPECT_RESPONSE(cid, { success = false, resultCode = "INVALID_DATA"}) + :Timeout(iTimeout) + + --mobile side: expect OnHashChange notification is not send to mobile + EXPECT_NOTIFICATION("OnHashChange") + :Times(0) + end + + --End test case NegativeRequestCheck.1.50 + ----------------------------------------------------------------------------------------- + + --Begin test case NegativeRequestCheck.1.51 + --Description: Check vrHelptext parameter contains escape characters _TabChacracter_ + + function Test:SetGlobalProperties_vrHelp_text__TabChacracter__INVALID_DATA() + + --mobile side: sending SetGlobalProperties request + local cid = self.mobileSession:SendRPC("SetGlobalProperties", + { + menuTitle = "Menu Title", + timeoutPrompt = + { + { + text = "Timeout prompt", + type = "TEXT" + } + }, + vrHelp = + { + { + position = 1, + image = + { + value = "action.png", + imageType = "DYNAMIC" + }, + text = "\t" + } + }, + menuIcon = + { + value = "action.png", + imageType = "DYNAMIC" + }, + helpPrompt = + { + { + text = "Help prompt", + type = "TEXT" + } + }, + vrHelpTitle = "VR help title", + keyboardProperties = + { + keyboardLayout = "QWERTY", + keypressMode = "SINGLE_KEYPRESS", + limitedCharacterList = + { + "a" + }, + language = "EN-US", + autoCompleteText = "Daemon, Freedom" + } + }) + + + --mobile side: expect SetGlobalProperties response + EXPECT_RESPONSE(cid, { success = false, resultCode = "INVALID_DATA"}) + :Timeout(iTimeout) + + --mobile side: expect OnHashChange notification is not send to mobile + EXPECT_NOTIFICATION("OnHashChange") + :Times(0) + end + + --End test case NegativeRequestCheck.1.51 + ----------------------------------------------------------------------------------------- + + --Begin test case NegativeRequestCheck.1.52 + --Description: Check vrHelptext parameter contains escape characters _SpaceCharacter_ + + function Test:SetGlobalProperties_vrHelp_text__SpaceCharacter__INVALID_DATA() + + --mobile side: sending SetGlobalProperties request + local cid = self.mobileSession:SendRPC("SetGlobalProperties", + { + menuTitle = "Menu Title", + timeoutPrompt = + { + { + text = "Timeout prompt", + type = "TEXT" + } + }, + vrHelp = + { + { + position = 1, + image = + { + value = "action.png", + imageType = "DYNAMIC" + }, + text = " " + } + }, + menuIcon = + { + value = "action.png", + imageType = "DYNAMIC" + }, + helpPrompt = + { + { + text = "Help prompt", + type = "TEXT" + } + }, + vrHelpTitle = "VR help title", + keyboardProperties = + { + keyboardLayout = "QWERTY", + keypressMode = "SINGLE_KEYPRESS", + limitedCharacterList = + { + "a" + }, + language = "EN-US", + autoCompleteText = "Daemon, Freedom" + } + }) + + + --mobile side: expect SetGlobalProperties response + EXPECT_RESPONSE(cid, { success = false, resultCode = "INVALID_DATA"}) + :Timeout(iTimeout) + + --mobile side: expect OnHashChange notification is not send to mobile + EXPECT_NOTIFICATION("OnHashChange") + :Times(0) + end + + --End test case NegativeRequestCheck.1.52 + ----------------------------------------------------------------------------------------- + + --Begin test case NegativeRequestCheck.1.53 + --Description: Check vrHelp: image parameter is missed + + function Test:SetGlobalProperties_vrHelp_image_IsMising_SUCCESS() + + --mobile side: sending SetGlobalProperties request + local cid = self.mobileSession:SendRPC("SetGlobalProperties", + { + menuTitle = "Menu Title", + timeoutPrompt = + { + { + text = "Timeout prompt", + type = "TEXT" + } + }, + vrHelp = + { + { + position = 1, + text = "VR help item" + } + }, + menuIcon = + { + value = "action.png", + imageType = "DYNAMIC" + }, + helpPrompt = + { + { + text = "Help prompt", + type = "TEXT" + } + }, + vrHelpTitle = "VR help title", + keyboardProperties = + { + keyboardLayout = "QWERTY", + keypressMode = "SINGLE_KEYPRESS", + limitedCharacterList = + { + "a" + }, + language = "EN-US", + autoCompleteText = "Daemon, Freedom" + } + }) + + + --hmi side: expect TTS.SetGlobalProperties request + EXPECT_HMICALL("TTS.SetGlobalProperties", + { + timeoutPrompt = + { + { + text = "Timeout prompt", + type = "TEXT" + } + }, + helpPrompt = + { + { + text = "Help prompt", + type = "TEXT" + } + } + }) + :Timeout(iTimeout) + :Do(function(_,data) + --hmi side: sending UI.SetGlobalProperties response + self.hmiConnection:SendResponse(data.id, data.method, "SUCCESS", {}) + end) + + + + --hmi side: expect UI.SetGlobalProperties request + EXPECT_HMICALL("UI.SetGlobalProperties", + { + menuTitle = "Menu Title", + vrHelp = + { + { + position = 1, + text = "VR help item" + } + }, + --Checked below + -- menuIcon = + -- { + -- imageType = "DYNAMIC", + -- value = strAppFolder .. "action.png" + -- }, + vrHelpTitle = "VR help title", + keyboardProperties = + { + keyboardLayout = "QWERTY", + keypressMode = "SINGLE_KEYPRESS", + --[=[ TODO: update after resolving APPLINK-16047 + + limitedCharacterList = + { + "a" + },]=] + language = "EN-US", + autoCompleteText = "Daemon, Freedom" + } + }) + :Timeout(iTimeout) + :ValidIf(function(_,data) + return Check_menuIconParams(data) + end) + :Do(function(_,data) + --hmi side: sending UI.SetGlobalProperties response + self.hmiConnection:SendResponse(data.id, data.method, "SUCCESS", {}) + end) + + + + --mobile side: expect SetGlobalProperties response + EXPECT_RESPONSE(cid, { success = true, resultCode = "SUCCESS"}) + :Timeout(iTimeout) + + --mobile side: expect OnHashChange notification + EXPECT_NOTIFICATION("OnHashChange") + end + + --End test case NegativeRequestCheck.1.53 + ----------------------------------------------------------------------------------------- + + --Begin test case NegativeRequestCheck.1.54 + --Description: Check vrHelpimage parameter is empty (missing all children Items) + + function Test:SetGlobalProperties_vrHelp_image_empty_missingallchildrenItems_INVALID_DATA() + + --mobile side: sending SetGlobalProperties request + local cid = self.mobileSession:SendRPC("SetGlobalProperties", + { + menuTitle = "Menu Title", + timeoutPrompt = + { + { + text = "Timeout prompt", + type = "TEXT" + } + }, + vrHelp = + { + { + position = 1, + image = + { + + }, + text = "VR help item" + } + }, + menuIcon = + { + value = "action.png", + imageType = "DYNAMIC" + }, + helpPrompt = + { + { + text = "Help prompt", + type = "TEXT" + } + }, + vrHelpTitle = "VR help title", + keyboardProperties = + { + keyboardLayout = "QWERTY", + keypressMode = "SINGLE_KEYPRESS", + limitedCharacterList = + { + "a" + }, + language = "EN-US", + autoCompleteText = "Daemon, Freedom" + } + }) + + + --mobile side: expect SetGlobalProperties response + EXPECT_RESPONSE(cid, { success = false, resultCode = "INVALID_DATA"}) + :Timeout(iTimeout) + + --mobile side: expect OnHashChange notification is not send to mobile + EXPECT_NOTIFICATION("OnHashChange") + :Times(0) + end + + --End test case NegativeRequestCheck.1.54 + ----------------------------------------------------------------------------------------- + + --Begin test case NegativeRequestCheck.1.55 + --Description: Check vrHelpimage parameter is wrong type + + function Test:SetGlobalProperties_vrHelp_image_WrongType_123_INVALID_DATA() + + --mobile side: sending SetGlobalProperties request + local cid = self.mobileSession:SendRPC("SetGlobalProperties", + { + menuTitle = "Menu Title", + timeoutPrompt = + { + { + text = "Timeout prompt", + type = "TEXT" + } + }, + vrHelp = + { + { + position = 1, + image = 123, + text = "VR help item" + } + }, + menuIcon = + { + value = "action.png", + imageType = "DYNAMIC" + }, + helpPrompt = + { + { + text = "Help prompt", + type = "TEXT" + } + }, + vrHelpTitle = "VR help title", + keyboardProperties = + { + keyboardLayout = "QWERTY", + keypressMode = "SINGLE_KEYPRESS", + limitedCharacterList = + { + "a" + }, + language = "EN-US", + autoCompleteText = "Daemon, Freedom" + } + }) + + + --mobile side: expect SetGlobalProperties response + EXPECT_RESPONSE(cid, { success = false, resultCode = "INVALID_DATA"}) + :Timeout(iTimeout) + + --mobile side: expect OnHashChange notification is not send to mobile + EXPECT_NOTIFICATION("OnHashChange") + :Times(0) + end + + --End test case NegativeRequestCheck.1.55 + ----------------------------------------------------------------------------------------- + + --Begin test case NegativeRequestCheck.1.56 + --Description: Check vrHelpimage: imageType parameter is missed + + function Test:SetGlobalProperties_vrHelp_image_imageType_IsMising_INVALID_DATA() + + --mobile side: sending SetGlobalProperties request + local cid = self.mobileSession:SendRPC("SetGlobalProperties", + { + menuTitle = "Menu Title", + timeoutPrompt = + { + { + text = "Timeout prompt", + type = "TEXT" + } + }, + vrHelp = + { + { + position = 1, + image = + { + value = "action.png" + }, + text = "VR help item" + } + }, + menuIcon = + { + value = "action.png", + imageType = "DYNAMIC" + }, + helpPrompt = + { + { + text = "Help prompt", + type = "TEXT" + } + }, + vrHelpTitle = "VR help title", + keyboardProperties = + { + keyboardLayout = "QWERTY", + keypressMode = "SINGLE_KEYPRESS", + limitedCharacterList = + { + "a" + }, + language = "EN-US", + autoCompleteText = "Daemon, Freedom" + } + }) + + + --mobile side: expect SetGlobalProperties response + EXPECT_RESPONSE(cid, { success = false, resultCode = "INVALID_DATA"}) + :Timeout(iTimeout) + + --mobile side: expect OnHashChange notification is not send to mobile + EXPECT_NOTIFICATION("OnHashChange") + :Times(0) + end + + --End test case NegativeRequestCheck.1.56 + ----------------------------------------------------------------------------------------- + + --Begin test case NegativeRequestCheck.1.57 + --Description: Check image: imageType parameter is wrong value + + function Test:SetGlobalProperties_vrHelp_image_imageType_WrongValue_INVALID_DATA() + + --mobile side: sending SetGlobalProperties request + local cid = self.mobileSession:SendRPC("SetGlobalProperties", + { + menuTitle = "Menu Title", + timeoutPrompt = + { + { + text = "Timeout prompt", + type = "TEXT" + } + }, + vrHelp = + { + { + position = 1, + image = + { + value = "action.png", + imageType = "Wrong Value" + }, + text = "VR help item" + } + }, + menuIcon = + { + value = "action.png", + imageType = "DYNAMIC" + }, + helpPrompt = + { + { + text = "Help prompt", + type = "TEXT" + } + }, + vrHelpTitle = "VR help title", + keyboardProperties = + { + keyboardLayout = "QWERTY", + keypressMode = "SINGLE_KEYPRESS", + limitedCharacterList = + { + "a" + }, + language = "EN-US", + autoCompleteText = "Daemon, Freedom" + } + }) + + + --mobile side: expect SetGlobalProperties response + EXPECT_RESPONSE(cid, { success = false, resultCode = "INVALID_DATA"}) + :Timeout(iTimeout) + + --mobile side: expect OnHashChange notification is not send to mobile + EXPECT_NOTIFICATION("OnHashChange") + :Times(0) + end + + --End test case NegativeRequestCheck.1.57 + ----------------------------------------------------------------------------------------- + + --Begin test case NegativeRequestCheck.1.58 + --Description: Check vrHelpimage: value parameter is missed + + function Test:SetGlobalProperties_vrHelp_image_value_IsMising_INVALID_DATA() + + --mobile side: sending SetGlobalProperties request + local cid = self.mobileSession:SendRPC("SetGlobalProperties", + { + menuTitle = "Menu Title", + timeoutPrompt = + { + { + text = "Timeout prompt", + type = "TEXT" + } + }, + vrHelp = + { + { + position = 1, + image = + { + imageType = "DYNAMIC" + }, + text = "VR help item" + } + }, + menuIcon = + { + value = "action.png", + imageType = "DYNAMIC" + }, + helpPrompt = + { + { + text = "Help prompt", + type = "TEXT" + } + }, + vrHelpTitle = "VR help title", + keyboardProperties = + { + keyboardLayout = "QWERTY", + keypressMode = "SINGLE_KEYPRESS", + limitedCharacterList = + { + "a" + }, + language = "EN-US", + autoCompleteText = "Daemon, Freedom" + } + }) + + + --mobile side: expect SetGlobalProperties response + EXPECT_RESPONSE(cid, { success = false, resultCode = "INVALID_DATA"}) + :Timeout(iTimeout) + + --mobile side: expect OnHashChange notification is not send to mobile + EXPECT_NOTIFICATION("OnHashChange") + :Times(0) + end + + --End test case NegativeRequestCheck.1.58 + ----------------------------------------------------------------------------------------- + + --Begin test case NegativeRequestCheck.1.59 + --Description: Check image: value parameter is wrong type + + function Test:SetGlobalProperties_vrHelp_image_value_IsWrongType_123_INVALID_DATA() + + --mobile side: sending SetGlobalProperties request + local cid = self.mobileSession:SendRPC("SetGlobalProperties", + { + menuTitle = "Menu Title", + timeoutPrompt = + { + { + text = "Timeout prompt", + type = "TEXT" + } + }, + vrHelp = + { + { + position = 1, + image = + { + value = 123, + imageType = "DYNAMIC" + }, + text = "VR help item" + } + }, + menuIcon = + { + value = "action.png", + imageType = "DYNAMIC" + }, + helpPrompt = + { + { + text = "Help prompt", + type = "TEXT" + } + }, + vrHelpTitle = "VR help title", + keyboardProperties = + { + keyboardLayout = "QWERTY", + keypressMode = "SINGLE_KEYPRESS", + limitedCharacterList = + { + "a" + }, + language = "EN-US", + autoCompleteText = "Daemon, Freedom" + } + }) + + + --mobile side: expect SetGlobalProperties response + EXPECT_RESPONSE(cid, { success = false, resultCode = "INVALID_DATA"}) + :Timeout(iTimeout) + + --mobile side: expect OnHashChange notification is not send to mobile + EXPECT_NOTIFICATION("OnHashChange") + :Times(0) + end + + --End test case NegativeRequestCheck.1.59 + ----------------------------------------------------------------------------------------- + + --Begin test case NegativeRequestCheck.1.60 + --Description: Check image: value parameter is out upper bound + + function Test:SetGlobalProperties_vrHelp_image_value_IsOutUpperBound_65536_INVALID_DATA() + + --mobile side: sending SetGlobalProperties request + local cid = self.mobileSession:SendRPC("SetGlobalProperties", + { + menuTitle = "Menu Title", + timeoutPrompt = + { + { + text = "Timeout prompt", + type = "TEXT" + } + }, + vrHelp = + { + { + position = 1, + image = + { + value = "qA1_wB2_eA3_rB4_tA5_yB6_uA7_iB8_oA9_pB0_aA1_sB2_dA3_fB4_gA5_hB6_jA7_kB8_lA9_zB0_xA1_cB2_vA3_bB4_nA5_mB6_qA7_wB8_eA9_rB0_tA1_yB2_uA3_iB4_oA5_pB6_aA7_sB8_dA9_fB0_gA1_hB2_jA3_kB4_lA5_zB6_xA7_cB8_vA9_bB0_nA1_mB2_qA3_wB4_eA5_rB6_tA7_yB8_uA9_iB0_oA1_pB2_aA3_sB4_dA5_fB6_gA7_hB8_jA9_kB0_lA1_zB2_xA3_cB4_vA5_bB6_nA7_mB8_qA9_wB0_eA1_rB2_tA3_yB4_uA5_iB6_oA7_pB8_aA9_sB0_dA1_fB2_gA3_hB4_jA5_kB6_lA7_zB8_xA9_cB0_vA1_bB2_nA3_mB4_qA5_wB6_eA7_rB8_tA9_yB0_uA1_iB2_oA3_pB4_aA5_sB6_dA7_fB8_gA9_hB0_jA1_kB2_lA3_zB4_xA5_cB6_vA7_bB8_nA9_mB0_qA1_wB2_eA3_rB4_tA5_yB6_uA7_iB8_oA9_pB0_aA1_sB2_dA3_fB4_gA5_hB6_jA7_kB8_lA9_zB0_xA1_cB2_vA3_bB4_nA5_mB6_qA7_wB8_eA9_rB0_tA1_yB2_uA3_iB4_oA5_pB6_aA7_sB8_dA9_fB0_gA1_hB2_jA3_kB4_lA5_zB6_xA7_cB8_vA9_bB0_nA1_mB2_qA3_wB4_eA5_rB6_tA7_yB8_uA9_iB0_oA1_pB2_aA3_sB4_dA5_fB6_gA7_hB8_jA9_kB0_lA1_zB2_xA3_cB4_vA5_bB6_nA7_mB8_qA9_wB0_eA1_rB2_tA3_yB4_uA5_iB6_oA7_pB8_aA9_sB0_dA1_fB2_gA3_hB4_jA5_kB6_lA7_zB8_xA9_cB0_vA1_bB2_nA3_mB4_qA5_wB6_eA7_rB8_tA9_yB0_uA1_iB2_oA3_pB4_aA5_sB6_dA7_fB8_gA9_hB0_j", + imageType = "DYNAMIC" + }, + text = "VR help item" + } + }, + menuIcon = + { + value = "action.png", + imageType = "DYNAMIC" + }, + helpPrompt = + { + { + text = "Help prompt", + type = "TEXT" + } + }, + vrHelpTitle = "VR help title", + keyboardProperties = + { + keyboardLayout = "QWERTY", + keypressMode = "SINGLE_KEYPRESS", + limitedCharacterList = + { + "a" + }, + language = "EN-US", + autoCompleteText = "Daemon, Freedom" + } + }) + + + --mobile side: expect SetGlobalProperties response + EXPECT_RESPONSE(cid, { success = false, resultCode = "INVALID_DATA"}) + :Timeout(iTimeout) + + --mobile side: expect OnHashChange notification is not send to mobile + EXPECT_NOTIFICATION("OnHashChange") + :Times(0) + end + + --End test case NegativeRequestCheck.1.60 + ----------------------------------------------------------------------------------------- + + --Begin test case NegativeRequestCheck.1.61 + --Description: Check image: value parameter contains escape character (new line) + + function Test:SetGlobalProperties_vrHelp_image_value__NewLineCharacter__INVALID_DATA() + + --mobile side: sending SetGlobalProperties request + local cid = self.mobileSession:SendRPC("SetGlobalProperties", + { + menuTitle = "Menu Title", + timeoutPrompt = + { + { + text = "Timeout prompt", + type = "TEXT" + } + }, + vrHelp = + { + { + position = 1, + image = + { + value = "\n", + imageType = "DYNAMIC" + }, + text = "VR help item" + } + }, + menuIcon = + { + value = "action.png", + imageType = "DYNAMIC" + }, + helpPrompt = + { + { + text = "Help prompt", + type = "TEXT" + } + }, + vrHelpTitle = "VR help title", + keyboardProperties = + { + keyboardLayout = "QWERTY", + keypressMode = "SINGLE_KEYPRESS", + limitedCharacterList = + { + "a" + }, + language = "EN-US", + autoCompleteText = "Daemon, Freedom" + } + }) + + + --mobile side: expect SetGlobalProperties response + EXPECT_RESPONSE(cid, { success = false, resultCode = "INVALID_DATA"}) + :Timeout(iTimeout) + + --mobile side: expect OnHashChange notification is not send to mobile + EXPECT_NOTIFICATION("OnHashChange") + :Times(0) + end + + --End test case NegativeRequestCheck.1.61 + ----------------------------------------------------------------------------------------- + + --Begin test case NegativeRequestCheck.1.62 + --Description: Check image: value parameter contains escape character (tab) + + function Test:SetGlobalProperties_vrHelp_image_value__TabChacracter__INVALID_DATA() + + --mobile side: sending SetGlobalProperties request + local cid = self.mobileSession:SendRPC("SetGlobalProperties", + { + menuTitle = "Menu Title", + timeoutPrompt = + { + { + text = "Timeout prompt", + type = "TEXT" + } + }, + vrHelp = + { + { + position = 1, + image = + { + value = "\t", + imageType = "DYNAMIC" + }, + text = "VR help item" + } + }, + menuIcon = + { + value = "action.png", + imageType = "DYNAMIC" + }, + helpPrompt = + { + { + text = "Help prompt", + type = "TEXT" + } + }, + vrHelpTitle = "VR help title", + keyboardProperties = + { + keyboardLayout = "QWERTY", + keypressMode = "SINGLE_KEYPRESS", + limitedCharacterList = + { + "a" + }, + language = "EN-US", + autoCompleteText = "Daemon, Freedom" + } + }) + + + --mobile side: expect SetGlobalProperties response + EXPECT_RESPONSE(cid, { success = false, resultCode = "INVALID_DATA"}) + :Timeout(iTimeout) + + --mobile side: expect OnHashChange notification is not send to mobile + EXPECT_NOTIFICATION("OnHashChange") + :Times(0) + end + + --End test case NegativeRequestCheck.1.62 + ----------------------------------------------------------------------------------------- + + --Begin test case NegativeRequestCheck.1.63 + --Description: Check image: value parameter contains escape character (spaces) + + function Test:SetGlobalProperties_vrHelp_image_value__SpaceCharacter__INVALID_DATA() + + --mobile side: sending SetGlobalProperties request + local cid = self.mobileSession:SendRPC("SetGlobalProperties", + { + menuTitle = "Menu Title", + timeoutPrompt = + { + { + text = "Timeout prompt", + type = "TEXT" + } + }, + vrHelp = + { + { + position = 1, + image = + { + value = " ", + imageType = "DYNAMIC" + }, + text = "VR help item" + } + }, + menuIcon = + { + value = "action.png", + imageType = "DYNAMIC" + }, + helpPrompt = + { + { + text = "Help prompt", + type = "TEXT" + } + }, + vrHelpTitle = "VR help title", + keyboardProperties = + { + keyboardLayout = "QWERTY", + keypressMode = "SINGLE_KEYPRESS", + limitedCharacterList = + { + "a" + }, + language = "EN-US", + autoCompleteText = "Daemon, Freedom" + } + }) + + + --mobile side: expect SetGlobalProperties response + EXPECT_RESPONSE(cid, { success = false, resultCode = "INVALID_DATA"}) + :Timeout(iTimeout) + + --mobile side: expect OnHashChange notification is not send to mobile + EXPECT_NOTIFICATION("OnHashChange") + :Times(0) + end + + --End test case NegativeRequestCheck.1.63 + ----------------------------------------------------------------------------------------- + + --Begin test case NegativeRequestCheck.1.64 + --Description: Check image: value parameter is not an existing file + + function Test:SetGlobalProperties_vrHelp_image_value_IsNotExist_INVALID_DATA() + + --mobile side: sending SetGlobalProperties request + local cid = self.mobileSession:SendRPC("SetGlobalProperties", + { + menuTitle = "Menu Title", + timeoutPrompt = + { + { + text = "Timeout prompt", + type = "TEXT" + } + }, + vrHelp = + { + { + position = 1, + image = + { + value = "NotExistImage.png", + imageType = "DYNAMIC" + }, + text = "VR help item" + } + }, + menuIcon = + { + value = "action.png", + imageType = "DYNAMIC" + }, + helpPrompt = + { + { + text = "Help prompt", + type = "TEXT" + } + }, + vrHelpTitle = "VR help title", + keyboardProperties = + { + keyboardLayout = "QWERTY", + keypressMode = "SINGLE_KEYPRESS", + limitedCharacterList = + { + "a" + }, + language = "EN-US", + autoCompleteText = "Daemon, Freedom" + } + }) + + + --mobile side: expect SetGlobalProperties response + EXPECT_RESPONSE(cid, { success = false, resultCode = "INVALID_DATA"}) + :Timeout(iTimeout) + + --mobile side: expect OnHashChange notification is not send to mobile + EXPECT_NOTIFICATION("OnHashChange") + :Times(0) + end + + --End test case NegativeRequestCheck.1.64 + ----------------------------------------------------------------------------------------- + + --Begin test case NegativeRequestCheck.1.65 + --Description: Check menuTitle parameter is wrong type + + function Test:SetGlobalProperties_menuTitle_IsWrongType_123_INVALID_DATA() + + --mobile side: sending SetGlobalProperties request + local cid = self.mobileSession:SendRPC("SetGlobalProperties", + { + menuTitle = 123, + timeoutPrompt = + { + { + text = "Timeout prompt", + type = "TEXT" + } + }, + vrHelp = + { + { + position = 1, + image = + { + value = "action.png", + imageType = "DYNAMIC" + }, + text = "VR help item" + } + }, + menuIcon = + { + value = "action.png", + imageType = "DYNAMIC" + }, + helpPrompt = + { + { + text = "Help prompt", + type = "TEXT" + } + }, + vrHelpTitle = "VR help title", + keyboardProperties = + { + keyboardLayout = "QWERTY", + keypressMode = "SINGLE_KEYPRESS", + limitedCharacterList = + { + "a" + }, + language = "EN-US", + autoCompleteText = "Daemon, Freedom" + } + }) + + + --mobile side: expect SetGlobalProperties response + EXPECT_RESPONSE(cid, { success = false, resultCode = "INVALID_DATA"}) + :Timeout(iTimeout) + + --mobile side: expect OnHashChange notification is not send to mobile + EXPECT_NOTIFICATION("OnHashChange") + :Times(0) + end + + --End test case NegativeRequestCheck.1.65 + ----------------------------------------------------------------------------------------- + + --Begin test case NegativeRequestCheck.1.66 + --Description: Check menuTitle parameter is lower bound + + function Test:SetGlobalProperties_menuTitle_IsOutLowerBound_0_INVALID_DATA() + + --mobile side: sending SetGlobalProperties request + local cid = self.mobileSession:SendRPC("SetGlobalProperties", + { + menuTitle = "", + timeoutPrompt = + { + { + text = "Timeout prompt", + type = "TEXT" + } + }, + vrHelp = + { + { + position = 1, + image = + { + value = "action.png", + imageType = "DYNAMIC" + }, + text = "VR help item" + } + }, + menuIcon = + { + value = "action.png", + imageType = "DYNAMIC" + }, + helpPrompt = + { + { + text = "Help prompt", + type = "TEXT" + } + }, + vrHelpTitle = "VR help title", + keyboardProperties = + { + keyboardLayout = "QWERTY", + keypressMode = "SINGLE_KEYPRESS", + limitedCharacterList = + { + "a" + }, + language = "EN-US", + autoCompleteText = "Daemon, Freedom" + } + }) + + + --mobile side: expect SetGlobalProperties response + EXPECT_RESPONSE(cid, { success = false, resultCode = "INVALID_DATA"}) + :Timeout(iTimeout) + + --mobile side: expect OnHashChange notification is not send to mobile + EXPECT_NOTIFICATION("OnHashChange") + :Times(0) + end + + --End test case NegativeRequestCheck.1.66 + ----------------------------------------------------------------------------------------- + + --Begin test case NegativeRequestCheck.1.67 + --Description: Check menuTitle parameter is out upper bound + + function Test:SetGlobalProperties_menuTitle_IsOutUpperBound_501_INVALID_DATA() + + --mobile side: sending SetGlobalProperties request + local cid = self.mobileSession:SendRPC("SetGlobalProperties", + { + menuTitle = "qA1_wB2_eA3_rB4_tA5_yB6_uA7_iB8_oA9_pB0_aA1_sB2_dA3_fB4_gA5_hB6_jA7_kB8_lA9_zB0_xA1_cB2_vA3_bB4_nA5_mB6_qA7_wB8_eA9_rB0_tA1_yB2_uA3_iB4_oA5_pB6_aA7_sB8_dA9_fB0_gA1_hB2_jA3_kB4_lA5_zB6_xA7_cB8_vA9_bB0_nA1_mB2_qA3_wB4_eA5_rB6_tA7_yB8_uA9_iB0_oA1_pB2_aA3_sB4_dA5_fB6_gA7_hB8_jA9_kB0_lA1_zB2_xA3_cB4_vA5_bB6_nA7_mB8_qA9_wB0_eA1_rB2_tA3_yB4_uA5_iB6_oA7_pB8_aA9_sB0_dA1_fB2_gA3_hB4_jA5_kB6_lA7_zB8_xA9_cB0_vA1_bB2_nA3_mB4_qA5_wB6_eA7_rB8_tA9_yB0_uA1_iB2_oA3_pB4_aA5_sB6_dA7_fB8_gA9_hB0_jA1_kB2_lA3_zB4_xA5_c", + timeoutPrompt = + { + { + text = "Timeout prompt", + type = "TEXT" + } + }, + vrHelp = + { + { + position = 1, + image = + { + value = "action.png", + imageType = "DYNAMIC" + }, + text = "VR help item" + } + }, + menuIcon = + { + value = "action.png", + imageType = "DYNAMIC" + }, + helpPrompt = + { + { + text = "Help prompt", + type = "TEXT" + } + }, + vrHelpTitle = "VR help title", + keyboardProperties = + { + keyboardLayout = "QWERTY", + keypressMode = "SINGLE_KEYPRESS", + limitedCharacterList = + { + "a" + }, + language = "EN-US", + autoCompleteText = "Daemon, Freedom" + } + }) + + + --mobile side: expect SetGlobalProperties response + EXPECT_RESPONSE(cid, { success = false, resultCode = "INVALID_DATA"}) + :Timeout(iTimeout) + + --mobile side: expect OnHashChange notification is not send to mobile + EXPECT_NOTIFICATION("OnHashChange") + :Times(0) + end + + --End test case NegativeRequestCheck.1.67 + ----------------------------------------------------------------------------------------- + + --Begin test case NegativeRequestCheck.1.68 + --Description: Check menuTitle parameter contains escape characters (new line) + + function Test:SetGlobalProperties_menuTitle__NewLineCharacter__INVALID_DATA() + + --mobile side: sending SetGlobalProperties request + local cid = self.mobileSession:SendRPC("SetGlobalProperties", + { + menuTitle = "\n", + timeoutPrompt = + { + { + text = "Timeout prompt", + type = "TEXT" + } + }, + vrHelp = + { + { + position = 1, + image = + { + value = "action.png", + imageType = "DYNAMIC" + }, + text = "VR help item" + } + }, + menuIcon = + { + value = "action.png", + imageType = "DYNAMIC" + }, + helpPrompt = + { + { + text = "Help prompt", + type = "TEXT" + } + }, + vrHelpTitle = "VR help title", + keyboardProperties = + { + keyboardLayout = "QWERTY", + keypressMode = "SINGLE_KEYPRESS", + limitedCharacterList = + { + "a" + }, + language = "EN-US", + autoCompleteText = "Daemon, Freedom" + } + }) + + + --mobile side: expect SetGlobalProperties response + EXPECT_RESPONSE(cid, { success = false, resultCode = "INVALID_DATA"}) + :Timeout(iTimeout) + + --mobile side: expect OnHashChange notification is not send to mobile + EXPECT_NOTIFICATION("OnHashChange") + :Times(0) + end + + --End test case NegativeRequestCheck.1.68 + ----------------------------------------------------------------------------------------- + + --Begin test case NegativeRequestCheck.1.69 + --Description: Check menuTitle parameter contains escape characters (tab) + + function Test:SetGlobalProperties_menuTitle__TabChacracter__INVALID_DATA() + + --mobile side: sending SetGlobalProperties request + local cid = self.mobileSession:SendRPC("SetGlobalProperties", + { + menuTitle = "\t", + timeoutPrompt = + { + { + text = "Timeout prompt", + type = "TEXT" + } + }, + vrHelp = + { + { + position = 1, + image = + { + value = "action.png", + imageType = "DYNAMIC" + }, + text = "VR help item" + } + }, + menuIcon = + { + value = "action.png", + imageType = "DYNAMIC" + }, + helpPrompt = + { + { + text = "Help prompt", + type = "TEXT" + } + }, + vrHelpTitle = "VR help title", + keyboardProperties = + { + keyboardLayout = "QWERTY", + keypressMode = "SINGLE_KEYPRESS", + limitedCharacterList = + { + "a" + }, + language = "EN-US", + autoCompleteText = "Daemon, Freedom" + } + }) + + + --mobile side: expect SetGlobalProperties response + EXPECT_RESPONSE(cid, { success = false, resultCode = "INVALID_DATA"}) + :Timeout(iTimeout) + + --mobile side: expect OnHashChange notification is not send to mobile + EXPECT_NOTIFICATION("OnHashChange") + :Times(0) + end + + --End test case NegativeRequestCheck.1.69 + ----------------------------------------------------------------------------------------- + + --Begin test case NegativeRequestCheck.1.70 + --Description: Check menuTitle parameter contains escape characters (spaces) + + function Test:SetGlobalProperties_menuTitle__SpaceCharacter__INVALID_DATA() + + --mobile side: sending SetGlobalProperties request + local cid = self.mobileSession:SendRPC("SetGlobalProperties", + { + menuTitle = " ", + timeoutPrompt = + { + { + text = "Timeout prompt", + type = "TEXT" + } + }, + vrHelp = + { + { + position = 1, + image = + { + value = "action.png", + imageType = "DYNAMIC" + }, + text = "VR help item" + } + }, + menuIcon = + { + value = "action.png", + imageType = "DYNAMIC" + }, + helpPrompt = + { + { + text = "Help prompt", + type = "TEXT" + } + }, + vrHelpTitle = "VR help title", + keyboardProperties = + { + keyboardLayout = "QWERTY", + keypressMode = "SINGLE_KEYPRESS", + limitedCharacterList = + { + "a" + }, + language = "EN-US", + autoCompleteText = "Daemon, Freedom" + } + }) + + + --mobile side: expect SetGlobalProperties response + EXPECT_RESPONSE(cid, { success = false, resultCode = "INVALID_DATA"}) + :Timeout(iTimeout) + + --mobile side: expect OnHashChange notification is not send to mobile + EXPECT_NOTIFICATION("OnHashChange") + :Times(0) + end + + --End test case NegativeRequestCheck.1.70 + ----------------------------------------------------------------------------------------- + + --Begin test case NegativeRequestCheck.1.71 + --Description: Check menuIcon parameter is empty (missing all children Items) + + function Test:SetGlobalProperties_menuIcon_empty_missingallchildrenItems_INVALID_DATA() + + --mobile side: sending SetGlobalProperties request + local cid = self.mobileSession:SendRPC("SetGlobalProperties", + { + menuTitle = "Menu Title", + timeoutPrompt = + { + { + text = "Timeout prompt", + type = "TEXT" + } + }, + vrHelp = + { + { + position = 1, + image = + { + value = "action.png", + imageType = "DYNAMIC" + }, + text = "VR help item" + } + }, + menuIcon = + { + + }, + helpPrompt = + { + { + text = "Help prompt", + type = "TEXT" + } + }, + vrHelpTitle = "VR help title", + keyboardProperties = + { + keyboardLayout = "QWERTY", + keypressMode = "SINGLE_KEYPRESS", + limitedCharacterList = + { + "a" + }, + language = "EN-US", + autoCompleteText = "Daemon, Freedom" + } + }) + + + --mobile side: expect SetGlobalProperties response + EXPECT_RESPONSE(cid, { success = false, resultCode = "INVALID_DATA"}) + :Timeout(iTimeout) + + --mobile side: expect OnHashChange notification is not send to mobile + EXPECT_NOTIFICATION("OnHashChange") + :Times(0) + end + + --End test case NegativeRequestCheck.1.71 + ----------------------------------------------------------------------------------------- + + --Begin test case NegativeRequestCheck.1.72 + --Description: Check menuIcon parameter is wrong type + + function Test:SetGlobalProperties_menuIcon_WrongType_123_INVALID_DATA() + + --mobile side: sending SetGlobalProperties request + local cid = self.mobileSession:SendRPC("SetGlobalProperties", + { + menuTitle = "Menu Title", + timeoutPrompt = + { + { + text = "Timeout prompt", + type = "TEXT" + } + }, + vrHelp = + { + { + position = 1, + image = + { + value = "action.png", + imageType = "DYNAMIC" + }, + text = "VR help item" + } + }, + menuIcon = 123, + helpPrompt = + { + { + text = "Help prompt", + type = "TEXT" + } + }, + vrHelpTitle = "VR help title", + keyboardProperties = + { + keyboardLayout = "QWERTY", + keypressMode = "SINGLE_KEYPRESS", + limitedCharacterList = + { + "a" + }, + language = "EN-US", + autoCompleteText = "Daemon, Freedom" + } + }) + + + --mobile side: expect SetGlobalProperties response + EXPECT_RESPONSE(cid, { success = false, resultCode = "INVALID_DATA"}) + :Timeout(iTimeout) + + --mobile side: expect OnHashChange notification is not send to mobile + EXPECT_NOTIFICATION("OnHashChange") + :Times(0) + end + + --End test case NegativeRequestCheck.1.72 + ----------------------------------------------------------------------------------------- + + --Begin test case NegativeRequestCheck.1.73 + --Description: Check menuIcon: imageType parameter is missed + + function Test:SetGlobalProperties_menuIcon_imageType_IsMising_INVALID_DATA() + + --mobile side: sending SetGlobalProperties request + local cid = self.mobileSession:SendRPC("SetGlobalProperties", + { + menuTitle = "Menu Title", + timeoutPrompt = + { + { + text = "Timeout prompt", + type = "TEXT" + } + }, + vrHelp = + { + { + position = 1, + image = + { + value = "action.png", + imageType = "DYNAMIC" + }, + text = "VR help item" + } + }, + menuIcon = + { + value = "action.png" + }, + helpPrompt = + { + { + text = "Help prompt", + type = "TEXT" + } + }, + vrHelpTitle = "VR help title", + keyboardProperties = + { + keyboardLayout = "QWERTY", + keypressMode = "SINGLE_KEYPRESS", + limitedCharacterList = + { + "a" + }, + language = "EN-US", + autoCompleteText = "Daemon, Freedom" + } + }) + + + --mobile side: expect SetGlobalProperties response + EXPECT_RESPONSE(cid, { success = false, resultCode = "INVALID_DATA"}) + :Timeout(iTimeout) + + --mobile side: expect OnHashChange notification is not send to mobile + EXPECT_NOTIFICATION("OnHashChange") + :Times(0) + end + + --End test case NegativeRequestCheck.1.73 + ----------------------------------------------------------------------------------------- + + --Begin test case NegativeRequestCheck.1.74 + --Description: Check menuIcon: imageType parameter is wrong value + + function Test:SetGlobalProperties_menuIcon_imageType_WrongValue_INVALID_DATA() + + --mobile side: sending SetGlobalProperties request + local cid = self.mobileSession:SendRPC("SetGlobalProperties", + { + menuTitle = "Menu Title", + timeoutPrompt = + { + { + text = "Timeout prompt", + type = "TEXT" + } + }, + vrHelp = + { + { + position = 1, + image = + { + value = "action.png", + imageType = "DYNAMIC" + }, + text = "VR help item" + } + }, + menuIcon = + { + value = "action.png", + imageType = "Wrong Value" + }, + helpPrompt = + { + { + text = "Help prompt", + type = "TEXT" + } + }, + vrHelpTitle = "VR help title", + keyboardProperties = + { + keyboardLayout = "QWERTY", + keypressMode = "SINGLE_KEYPRESS", + limitedCharacterList = + { + "a" + }, + language = "EN-US", + autoCompleteText = "Daemon, Freedom" + } + }) + + + --mobile side: expect SetGlobalProperties response + EXPECT_RESPONSE(cid, { success = false, resultCode = "INVALID_DATA"}) + :Timeout(iTimeout) + + --mobile side: expect OnHashChange notification is not send to mobile + EXPECT_NOTIFICATION("OnHashChange") + :Times(0) + end + + --End test case NegativeRequestCheck.1.74 + ----------------------------------------------------------------------------------------- + + --Begin test case NegativeRequestCheck.1.75 + --Description: Check menuIcon: value parameter is missed + + function Test:SetGlobalProperties_menuIcon_value_IsMising_INVALID_DATA() + + --mobile side: sending SetGlobalProperties request + local cid = self.mobileSession:SendRPC("SetGlobalProperties", + { + menuTitle = "Menu Title", + timeoutPrompt = + { + { + text = "Timeout prompt", + type = "TEXT" + } + }, + vrHelp = + { + { + position = 1, + image = + { + value = "action.png", + imageType = "DYNAMIC" + }, + text = "VR help item" + } + }, + menuIcon = + { + imageType = "DYNAMIC" + }, + helpPrompt = + { + { + text = "Help prompt", + type = "TEXT" + } + }, + vrHelpTitle = "VR help title", + keyboardProperties = + { + keyboardLayout = "QWERTY", + keypressMode = "SINGLE_KEYPRESS", + limitedCharacterList = + { + "a" + }, + language = "EN-US", + autoCompleteText = "Daemon, Freedom" + } + }) + + + --mobile side: expect SetGlobalProperties response + EXPECT_RESPONSE(cid, { success = false, resultCode = "INVALID_DATA"}) + :Timeout(iTimeout) + + --mobile side: expect OnHashChange notification is not send to mobile + EXPECT_NOTIFICATION("OnHashChange") + :Times(0) + end + + --End test case NegativeRequestCheck.1.75 + ----------------------------------------------------------------------------------------- + + --Begin test case NegativeRequestCheck.1.76 + --Description: Check menuIcon: value parameter is wrong type + + function Test:SetGlobalProperties_menuIcon_value_IsWrongType_123_INVALID_DATA() + + --mobile side: sending SetGlobalProperties request + local cid = self.mobileSession:SendRPC("SetGlobalProperties", + { + menuTitle = "Menu Title", + timeoutPrompt = + { + { + text = "Timeout prompt", + type = "TEXT" + } + }, + vrHelp = + { + { + position = 1, + image = + { + value = "action.png", + imageType = "DYNAMIC" + }, + text = "VR help item" + } + }, + menuIcon = + { + value = 123, + imageType = "DYNAMIC" + }, + helpPrompt = + { + { + text = "Help prompt", + type = "TEXT" + } + }, + vrHelpTitle = "VR help title", + keyboardProperties = + { + keyboardLayout = "QWERTY", + keypressMode = "SINGLE_KEYPRESS", + limitedCharacterList = + { + "a" + }, + language = "EN-US", + autoCompleteText = "Daemon, Freedom" + } + }) + + + --mobile side: expect SetGlobalProperties response + EXPECT_RESPONSE(cid, { success = false, resultCode = "INVALID_DATA"}) + :Timeout(iTimeout) + + --mobile side: expect OnHashChange notification is not send to mobile + EXPECT_NOTIFICATION("OnHashChange") + :Times(0) + end + + --End test case NegativeRequestCheck.1.76 + ----------------------------------------------------------------------------------------- + + --Begin test case NegativeRequestCheck.1.77 + --Description: Check menuIcon: value parameter is out upper bound + + function Test:SetGlobalProperties_menuIcon_value_IsOutUpperBound_65536_INVALID_DATA() + + --mobile side: sending SetGlobalProperties request + local cid = self.mobileSession:SendRPC("SetGlobalProperties", + { + menuTitle = "Menu Title", + timeoutPrompt = + { + { + text = "Timeout prompt", + type = "TEXT" + } + }, + vrHelp = + { + { + position = 1, + image = + { + value = "action.png", + imageType = "DYNAMIC" + }, + text = "VR help item" + } + }, + menuIcon = + { + value = "qA1_wB2_eA3_rB4_tA5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= "TEXT" + } + }, + vrHelpTitle = "VR help title", + keyboardProperties = + { + keyboardLayout = "QWERTY", + keypressMode = "SINGLE_KEYPRESS", + limitedCharacterList = + { + "a" + }, + language = "EN-US", + autoCompleteText = "Daemon, Freedom" + } + }) + + + --mobile side: expect SetGlobalProperties response + EXPECT_RESPONSE(cid, { success = false, resultCode = "INVALID_DATA"}) + :Timeout(iTimeout) + + --mobile side: expect OnHashChange notification is not send to mobile + EXPECT_NOTIFICATION("OnHashChange") + :Times(0) + end + + --End test case NegativeRequestCheck.1.77 + ----------------------------------------------------------------------------------------- + + --Begin test case NegativeRequestCheck.1.78 + --Description: Check menuIcon: value parameter contains escape character (new line) + + function Test:SetGlobalProperties_menuIcon_value__NewLineCharacter__INVALID_DATA() + + --mobile side: sending SetGlobalProperties request + local cid = self.mobileSession:SendRPC("SetGlobalProperties", + { + menuTitle = "Menu Title", + timeoutPrompt = + { + { + text = "Timeout prompt", + type = "TEXT" + } + }, + vrHelp = + { + { + position = 1, + image = + { + value = "action.png", + imageType = "DYNAMIC" + }, + text = "VR help item" + } + }, + menuIcon = + { + value = "\n", + imageType = "DYNAMIC" + }, + helpPrompt = + { + { + text = "Help prompt", + type = "TEXT" + } + }, + vrHelpTitle = "VR help title", + keyboardProperties = + { + keyboardLayout = "QWERTY", + keypressMode = "SINGLE_KEYPRESS", + limitedCharacterList = + { + "a" + }, + language = "EN-US", + autoCompleteText = "Daemon, Freedom" + } + }) + + + --mobile side: expect SetGlobalProperties response + EXPECT_RESPONSE(cid, { success = false, resultCode = "INVALID_DATA"}) + :Timeout(iTimeout) + + --mobile side: expect OnHashChange notification is not send to mobile + EXPECT_NOTIFICATION("OnHashChange") + :Times(0) + end + + --End test case NegativeRequestCheck.1.78 + ----------------------------------------------------------------------------------------- + + --Begin test case NegativeRequestCheck.1.79 + --Description: Check menuIcon: value parameter contains escape character (tab) + + function Test:SetGlobalProperties_menuIcon_value__TabChacracter__INVALID_DATA() + + --mobile side: sending SetGlobalProperties request + local cid = self.mobileSession:SendRPC("SetGlobalProperties", + { + menuTitle = "Menu Title", + timeoutPrompt = + { + { + text = "Timeout prompt", + type = "TEXT" + } + }, + vrHelp = + { + { + position = 1, + image = + { + value = "action.png", + imageType = "DYNAMIC" + }, + text = "VR help item" + } + }, + menuIcon = + { + value = "\t", + imageType = "DYNAMIC" + }, + helpPrompt = + { + { + text = "Help prompt", + type = "TEXT" + } + }, + vrHelpTitle = "VR help title", + keyboardProperties = + { + keyboardLayout = "QWERTY", + keypressMode = "SINGLE_KEYPRESS", + limitedCharacterList = + { + "a" + }, + language = "EN-US", + autoCompleteText = "Daemon, Freedom" + } + }) + + + --mobile side: expect SetGlobalProperties response + EXPECT_RESPONSE(cid, { success = false, resultCode = "INVALID_DATA"}) + :Timeout(iTimeout) + + --mobile side: expect OnHashChange notification is not send to mobile + EXPECT_NOTIFICATION("OnHashChange") + :Times(0) + end + + --End test case NegativeRequestCheck.1.79 + ----------------------------------------------------------------------------------------- + + --Begin test case NegativeRequestCheck.1.80 + --Description: Check menuIcon: value parameter contains escape character (spaces) + + function Test:SetGlobalProperties_menuIcon_value__SpaceCharacter__INVALID_DATA() + + --mobile side: sending SetGlobalProperties request + local cid = self.mobileSession:SendRPC("SetGlobalProperties", + { + menuTitle = "Menu Title", + timeoutPrompt = + { + { + text = "Timeout prompt", + type = "TEXT" + } + }, + vrHelp = + { + { + position = 1, + image = + { + value = "action.png", + imageType = "DYNAMIC" + }, + text = "VR help item" + } + }, + menuIcon = + { + value = " ", + imageType = "DYNAMIC" + }, + helpPrompt = + { + { + text = "Help prompt", + type = "TEXT" + } + }, + vrHelpTitle = "VR help title", + keyboardProperties = + { + keyboardLayout = "QWERTY", + keypressMode = "SINGLE_KEYPRESS", + limitedCharacterList = + { + "a" + }, + language = "EN-US", + autoCompleteText = "Daemon, Freedom" + } + }) + + + --mobile side: expect SetGlobalProperties response + EXPECT_RESPONSE(cid, { success = false, resultCode = "INVALID_DATA"}) + :Timeout(iTimeout) + + --mobile side: expect OnHashChange notification is not send to mobile + EXPECT_NOTIFICATION("OnHashChange") + :Times(0) + end + + --End test case NegativeRequestCheck.1.80 + ----------------------------------------------------------------------------------------- + + --Begin test case NegativeRequestCheck.1.81 + --Description: Check menuIcon: value parameter is not an existing file + + function Test:SetGlobalProperties_menuIcon_value_IsNotExist_INVALID_DATA() + + --mobile side: sending SetGlobalProperties request + local cid = self.mobileSession:SendRPC("SetGlobalProperties", + { + menuTitle = "Menu Title", + timeoutPrompt = + { + { + text = "Timeout prompt", + type = "TEXT" + } + }, + vrHelp = + { + { + position = 1, + image = + { + value = "action.png", + imageType = "DYNAMIC" + }, + text = "VR help item" + } + }, + menuIcon = + { + value = "NotExistImage.png", + imageType = "DYNAMIC" + }, + helpPrompt = + { + { + text = "Help prompt", + type = "TEXT" + } + }, + vrHelpTitle = "VR help title", + keyboardProperties = + { + keyboardLayout = "QWERTY", + keypressMode = "SINGLE_KEYPRESS", + limitedCharacterList = + { + "a" + }, + language = "EN-US", + autoCompleteText = "Daemon, Freedom" + } + }) + + + --mobile side: expect SetGlobalProperties response + EXPECT_RESPONSE(cid, { success = false, resultCode = "INVALID_DATA"}) + :Timeout(iTimeout) + + --mobile side: expect OnHashChange notification is not send to mobile + EXPECT_NOTIFICATION("OnHashChange") + :Times(0) + end + + --End test case NegativeRequestCheck.1.81 + ----------------------------------------------------------------------------------------- + + --Begin test case NegativeRequestCheck.1.82 + --Description: Check keyboardProperties parameter is empty (missed all non mandatory child items + + function Test:SetGlobalProperties_keyboardProperties_Empty_MissedAllChildrenItems_SUCCESS() + + --mobile side: sending SetGlobalProperties request + local cid = self.mobileSession:SendRPC("SetGlobalProperties", + { + keyboardProperties = + { + + } + }) + + --hmi side: expect UI.SetGlobalProperties request + EXPECT_HMICALL("UI.SetGlobalProperties") + :Timeout(iTimeout) + :Do(function(_,data) + --hmi side: sending UI.SetGlobalProperties response + self.hmiConnection:SendResponse(data.id, data.method, "SUCCESS", {}) + end) + :ValidIf(function(_,data) + if + data.params.keyboardProperties and + #data.params.keyboardProperties == 0 then + return true + elseif + data.params.keyboardProperties == nil then + print( "\27[31m UI.SetGlobalProperties request came without keyboardProperties \27[0m " ) + return false + else + print( "\27[31m UI.SetGlobalProperties request came with some unexpected values of keyboardProperties, array length is " .. tostring(#data.params.keyboardProperties) .. " \27[0m " ) + return false + end + + end) + + + + --mobile side: expect SetGlobalProperties response + EXPECT_RESPONSE(cid, { success = true, resultCode = "SUCCESS"}) + :Timeout(iTimeout) + + --mobile side: expect OnHashChange notification + EXPECT_NOTIFICATION("OnHashChange") + end + + --End test case NegativeRequestCheck.1.82 + ----------------------------------------------------------------------------------------- + + --Begin test case NegativeRequestCheck.1.83 + --Description: Check keyboardProperties parameter is wrong type + + function Test:SetGlobalProperties_keyboardProperties_WrongType_123_INVALID_DATA() + + --mobile side: sending SetGlobalProperties request + local cid = self.mobileSession:SendRPC("SetGlobalProperties", + { + menuTitle = "Menu Title", + timeoutPrompt = + { + { + text = "Timeout prompt", + type = "TEXT" + } + }, + vrHelp = + { + { + position = 1, + image = + { + value = "action.png", + imageType = "DYNAMIC" + }, + text = "VR help item" + } + }, + menuIcon = + { + value = "action.png", + imageType = "DYNAMIC" + }, + helpPrompt = + { + { + text = "Help prompt", + type = "TEXT" + } + }, + vrHelpTitle = "VR help title", + keyboardProperties = 123 + }) + + + --mobile side: expect SetGlobalProperties response + EXPECT_RESPONSE(cid, { success = false, resultCode = "INVALID_DATA"}) + :Timeout(iTimeout) + + --mobile side: expect OnHashChange notification is not send to mobile + EXPECT_NOTIFICATION("OnHashChange") + :Times(0) + end + + --End test case NegativeRequestCheck.1.83 + ----------------------------------------------------------------------------------------- + + --Begin test case NegativeRequestCheck.1.84 + --Description: Check keyboardProperties: language parameter is missed + + function Test:SetGlobalProperties_keyboardProperties_language_IsMising_SUCCESS() + + --mobile side: sending SetGlobalProperties request + local cid = self.mobileSession:SendRPC("SetGlobalProperties", + { + menuTitle = "Menu Title", + timeoutPrompt = + { + { + text = "Timeout prompt", + type = "TEXT" + } + }, + vrHelp = + { + { + position = 1, + image = + { + value = "action.png", + imageType = "DYNAMIC" + }, + text = "VR help item" + } + }, + menuIcon = + { + value = "action.png", + imageType = "DYNAMIC" + }, + helpPrompt = + { + { + text = "Help prompt", + type = "TEXT" + } + }, + vrHelpTitle = "VR help title", + keyboardProperties = + { + keyboardLayout = "QWERTY", + keypressMode = "SINGLE_KEYPRESS", + limitedCharacterList = + { + "a" + }, + autoCompleteText = "Daemon, Freedom" + } + }) + + + --hmi side: expect TTS.SetGlobalProperties request + EXPECT_HMICALL("TTS.SetGlobalProperties", + { + timeoutPrompt = + { + { + text = "Timeout prompt", + type = "TEXT" + } + }, + helpPrompt = + { + { + text = "Help prompt", + type = "TEXT" + } + } + }) + :Timeout(iTimeout) + :Do(function(_,data) + --hmi side: sending UI.SetGlobalProperties response + self.hmiConnection:SendResponse(data.id, data.method, "SUCCESS", {}) + end) + + + + --hmi side: expect UI.SetGlobalProperties request + EXPECT_HMICALL("UI.SetGlobalProperties", + { + menuTitle = "Menu Title", + vrHelp = + { + { + position = 1, + --[=[ TODO: update after resolving APPLINK-16052 + + image = + { + imageType = "DYNAMIC", + value = strAppFolder .. "action.png" + },]=] + text = "VR help item" + } + }, + --Checked below + -- menuIcon = + -- { + -- imageType = "DYNAMIC", + -- value = strAppFolder .. "action.png" + -- }, + vrHelpTitle = "VR help title", + keyboardProperties = + { + autoCompleteText = "Daemon, Freedom", + keyboardLayout = "QWERTY", + keypressMode = "SINGLE_KEYPRESS", + --[=[ TODO: update after resolving APPLINK-16047 + limitedCharacterList = + { + "a" + }]=] + } + }) + :Timeout(iTimeout) + :ValidIf(function(_,data) + return Check_menuIconParams(data) + end) + :Do(function(_,data) + --hmi side: sending UI.SetGlobalProperties response + self.hmiConnection:SendResponse(data.id, data.method, "SUCCESS", {}) + end) + + + + --mobile side: expect SetGlobalProperties response + EXPECT_RESPONSE(cid, { success = true, resultCode = "SUCCESS"}) + :Timeout(iTimeout) + + --mobile side: expect OnHashChange notification + EXPECT_NOTIFICATION("OnHashChange") + end + + --End test case NegativeRequestCheck.1.84 + ----------------------------------------------------------------------------------------- + + --Begin test case NegativeRequestCheck.1.85 + --Description: Check keyboardPropertieslanguage parameter is wrong value + + function Test:SetGlobalProperties_keyboardProperties_language_WrongValue_INVALID_DATA() + + --mobile side: sending SetGlobalProperties request + local cid = self.mobileSession:SendRPC("SetGlobalProperties", + { + menuTitle = "Menu Title", + timeoutPrompt = + { + { + text = "Timeout prompt", + type = "TEXT" + } + }, + vrHelp = + { + { + position = 1, + image = + { + value = "action.png", + imageType = "DYNAMIC" + }, + text = "VR help item" + } + }, + menuIcon = + { + value = "action.png", + imageType = "DYNAMIC" + }, + helpPrompt = + { + { + text = "Help prompt", + type = "TEXT" + } + }, + vrHelpTitle = "VR help title", + keyboardProperties = + { + keyboardLayout = "QWERTY", + keypressMode = "SINGLE_KEYPRESS", + limitedCharacterList = + { + "a" + }, + language = "Wrong Value", + autoCompleteText = "Daemon, Freedom" + } + }) + + + --mobile side: expect SetGlobalProperties response + EXPECT_RESPONSE(cid, { success = false, resultCode = "INVALID_DATA"}) + :Timeout(iTimeout) + + --mobile side: expect OnHashChange notification is not send to mobile + EXPECT_NOTIFICATION("OnHashChange") + :Times(0) + end + + --End test case NegativeRequestCheck.1.85 + ----------------------------------------------------------------------------------------- + + --Begin test case NegativeRequestCheck.1.86 + --Description: Check keyboardProperties: keyboardLayout parameter is missed + + function Test:SetGlobalProperties_keyboardProperties_keyboardLayout_IsMising_SUCCESS() + + --mobile side: sending SetGlobalProperties request + local cid = self.mobileSession:SendRPC("SetGlobalProperties", + { + menuTitle = "Menu Title", + timeoutPrompt = + { + { + text = "Timeout prompt", + type = "TEXT" + } + }, + vrHelp = + { + { + position = 1, + image = + { + value = "action.png", + imageType = "DYNAMIC" + }, + text = "VR help item" + } + }, + menuIcon = + { + value = "action.png", + imageType = "DYNAMIC" + }, + helpPrompt = + { + { + text = "Help prompt", + type = "TEXT" + } + }, + vrHelpTitle = "VR help title", + keyboardProperties = + { + keypressMode = "SINGLE_KEYPRESS", + limitedCharacterList = + { + "a" + }, + autoCompleteText = "Daemon, Freedom" + } + }) + + + --hmi side: expect TTS.SetGlobalProperties request + EXPECT_HMICALL("TTS.SetGlobalProperties", + { + timeoutPrompt = + { + { + text = "Timeout prompt", + type = "TEXT" + } + }, + helpPrompt = + { + { + text = "Help prompt", + type = "TEXT" + } + } + }) + :Timeout(iTimeout) + :Do(function(_,data) + --hmi side: sending UI.SetGlobalProperties response + self.hmiConnection:SendResponse(data.id, data.method, "SUCCESS", {}) + end) + + + + --hmi side: expect UI.SetGlobalProperties request + EXPECT_HMICALL("UI.SetGlobalProperties", + { + menuTitle = "Menu Title", + vrHelp = + { + { + position = 1, + --[=[ TODO: update after resolving APPLINK-16052 + + image = + { + imageType = "DYNAMIC", + value = strAppFolder .. "action.png" + },]=] + text = "VR help item" + } + }, + -- Checked below + -- menuIcon = + -- { + -- imageType = "DYNAMIC", + -- value = strAppFolder .. "action.png" + -- }, + vrHelpTitle = "VR help title", + keyboardProperties = + { + autoCompleteText = "Daemon, Freedom", + keypressMode = "SINGLE_KEYPRESS", + --[=[ TODO: update after resolving APPLINK-16047 + limitedCharacterList = + { + "a" + }]=] + } + }) + :Timeout(iTimeout) + :ValidIf(function(_,data) + return Check_menuIconParams(data) + end) + :Do(function(_,data) + --hmi side: sending UI.SetGlobalProperties response + self.hmiConnection:SendResponse(data.id, data.method, "SUCCESS", {}) + end) + + + + --mobile side: expect SetGlobalProperties response + EXPECT_RESPONSE(cid, { success = true, resultCode = "SUCCESS"}) + :Timeout(iTimeout) + + --mobile side: expect OnHashChange notification + EXPECT_NOTIFICATION("OnHashChange") + end + + --End test case NegativeRequestCheck.1.86 + ----------------------------------------------------------------------------------------- + + --Begin test case NegativeRequestCheck.1.87 + --Description: Check keyboardPropertieskeyboardLayout parameter is wrong value + + function Test:SetGlobalProperties_keyboardProperties_keyboardLayout_WrongValue_INVALID_DATA() + + --mobile side: sending SetGlobalProperties request + local cid = self.mobileSession:SendRPC("SetGlobalProperties", + { + menuTitle = "Menu Title", + timeoutPrompt = + { + { + text = "Timeout prompt", + type = "TEXT" + } + }, + vrHelp = + { + { + position = 1, + image = + { + value = "action.png", + imageType = "DYNAMIC" + }, + text = "VR help item" + } + }, + menuIcon = + { + value = "action.png", + imageType = "DYNAMIC" + }, + helpPrompt = + { + { + text = "Help prompt", + type = "TEXT" + } + }, + vrHelpTitle = "VR help title", + keyboardProperties = + { + keyboardLayout = "Wrong Value", + keypressMode = "SINGLE_KEYPRESS", + limitedCharacterList = + { + "a" + }, + language = "EN-US", + autoCompleteText = "Daemon, Freedom" + } + }) + + + --mobile side: expect SetGlobalProperties response + EXPECT_RESPONSE(cid, { success = false, resultCode = "INVALID_DATA"}) + :Timeout(iTimeout) + + --mobile side: expect OnHashChange notification is not send to mobile + EXPECT_NOTIFICATION("OnHashChange") + :Times(0) + end + + --End test case NegativeRequestCheck.1.87 + ----------------------------------------------------------------------------------------- + + --Begin test case NegativeRequestCheck.1.88 + --Description: Check keyboardProperties: keypressMode parameter is missed + + function Test:SetGlobalProperties_keyboardProperties_keypressMode_IsMising_SUCCESS() + + --mobile side: sending SetGlobalProperties request + local cid = self.mobileSession:SendRPC("SetGlobalProperties", + { + menuTitle = "Menu Title", + timeoutPrompt = + { + { + text = "Timeout prompt", + type = "TEXT" + } + }, + vrHelp = + { + { + position = 1, + image = + { + value = "action.png", + imageType = "DYNAMIC" + }, + text = "VR help item" + } + }, + menuIcon = + { + value = "action.png", + imageType = "DYNAMIC" + }, + helpPrompt = + { + { + text = "Help prompt", + type = "TEXT" + } + }, + vrHelpTitle = "VR help title", + keyboardProperties = + { + limitedCharacterList = + { + "a" + }, + language = "EN-US", + autoCompleteText = "Daemon, Freedom" + } + }) + + + --hmi side: expect TTS.SetGlobalProperties request + EXPECT_HMICALL("TTS.SetGlobalProperties", + { + timeoutPrompt = + { + { + text = "Timeout prompt", + type = "TEXT" + } + }, + helpPrompt = + { + { + text = "Help prompt", + type = "TEXT" + } + } + }) + :Timeout(iTimeout) + :Do(function(_,data) + --hmi side: sending UI.SetGlobalProperties response + self.hmiConnection:SendResponse(data.id, data.method, "SUCCESS", {}) + end) + + + + --hmi side: expect UI.SetGlobalProperties request + EXPECT_HMICALL("UI.SetGlobalProperties", + { + menuTitle = "Menu Title", + vrHelp = + { + { + position = 1, + --[=[ TODO: update after resolving APPLINK-16052 + + image = + { + imageType = "DYNAMIC", + value = strAppFolder .. "action.png" + },]=] + text = "VR help item" + } + }, + --Checked below + -- menuIcon = + -- { + -- imageType = "DYNAMIC", + -- value = strAppFolder .. "action.png" + -- }, + vrHelpTitle = "VR help title", + keyboardProperties = + { + language = "EN-US", + autoCompleteText = "Daemon, Freedom", + --[=[ TODO: update after resolving APPLINK-16047 + limitedCharacterList = + { + "a" + }]=] + } + }) + :Timeout(iTimeout) + :ValidIf(function(_,data) + return Check_menuIconParams(data) + end) + :Do(function(_,data) + --hmi side: sending UI.SetGlobalProperties response + self.hmiConnection:SendResponse(data.id, data.method, "SUCCESS", {}) + end) + + + + --mobile side: expect SetGlobalProperties response + EXPECT_RESPONSE(cid, { success = true, resultCode = "SUCCESS"}) + :Timeout(iTimeout) + + --mobile side: expect OnHashChange notification + EXPECT_NOTIFICATION("OnHashChange") + end + + --End test case NegativeRequestCheck.1.88 + ----------------------------------------------------------------------------------------- + + --Begin test case NegativeRequestCheck.1.89 + --Description: Check keyboardPropertieskeypressMode parameter is wrong value + + function Test:SetGlobalProperties_keyboardProperties_keypressMode_WrongValue_INVALID_DATA() + + --mobile side: sending SetGlobalProperties request + local cid = self.mobileSession:SendRPC("SetGlobalProperties", + { + menuTitle = "Menu Title", + timeoutPrompt = + { + { + text = "Timeout prompt", + type = "TEXT" + } + }, + vrHelp = + { + { + position = 1, + image = + { + value = "action.png", + imageType = "DYNAMIC" + }, + text = "VR help item" + } + }, + menuIcon = + { + value = "action.png", + imageType = "DYNAMIC" + }, + helpPrompt = + { + { + text = "Help prompt", + type = "TEXT" + } + }, + vrHelpTitle = "VR help title", + keyboardProperties = + { + keyboardLayout = "QWERTY", + keypressMode = "Wrong Value", + limitedCharacterList = + { + "a" + }, + language = "EN-US", + autoCompleteText = "Daemon, Freedom" + } + }) + + + --mobile side: expect SetGlobalProperties response + EXPECT_RESPONSE(cid, { success = false, resultCode = "INVALID_DATA"}) + :Timeout(iTimeout) + + --mobile side: expect OnHashChange notification is not send to mobile + EXPECT_NOTIFICATION("OnHashChange") + :Times(0) + end + + --End test case NegativeRequestCheck.1.89 + ----------------------------------------------------------------------------------------- + + --Begin test case NegativeRequestCheck.1.90 + --Description: Check keyboardProperties: limitedCharacterList parameter is missed + + function Test:SetGlobalProperties_keyboardProperties_limitedCharacterList_IsMising_SUCCESS() + + --mobile side: sending SetGlobalProperties request + local cid = self.mobileSession:SendRPC("SetGlobalProperties", + { + menuTitle = "Menu Title", + timeoutPrompt = + { + { + text = "Timeout prompt", + type = "TEXT" + } + }, + vrHelp = + { + { + position = 1, + image = + { + value = "action.png", + imageType = "DYNAMIC" + }, + text = "VR help item" + } + }, + menuIcon = + { + value = "action.png", + imageType = "DYNAMIC" + }, + helpPrompt = + { + { + text = "Help prompt", + type = "TEXT" + } + }, + vrHelpTitle = "VR help title", + keyboardProperties = + { + keyboardLayout = "QWERTY", + language = "EN-US", + autoCompleteText = "Daemon, Freedom" + } + }) + + + --hmi side: expect TTS.SetGlobalProperties request + EXPECT_HMICALL("TTS.SetGlobalProperties", + { + timeoutPrompt = + { + { + text = "Timeout prompt", + type = "TEXT" + } + }, + helpPrompt = + { + { + text = "Help prompt", + type = "TEXT" + } + } + }) + :Timeout(iTimeout) + :Do(function(_,data) + --hmi side: sending UI.SetGlobalProperties response + self.hmiConnection:SendResponse(data.id, data.method, "SUCCESS", {}) + end) + + + + --hmi side: expect UI.SetGlobalProperties request + EXPECT_HMICALL("UI.SetGlobalProperties", + { + menuTitle = "Menu Title", + vrHelp = + { + { + position = 1, + --[=[ TODO: update after resolving APPLINK-16052 + + image = + { + imageType = "DYNAMIC", + value = strAppFolder .. "action.png" + },]=] + text = "VR help item" + } + }, + --Checked below + -- menuIcon = + -- { + -- imageType = "DYNAMIC", + -- value = strAppFolder .. "action.png" + -- }, + vrHelpTitle = "VR help title", + keyboardProperties = + { + keyboardLayout = "QWERTY", + autoCompleteText = "Daemon, Freedom", + language = "EN-US" + } + }) + :Timeout(iTimeout) + :ValidIf(function(_,data) + return Check_menuIconParams(data) + end) + :Do(function(_,data) + --hmi side: sending UI.SetGlobalProperties response + self.hmiConnection:SendResponse(data.id, data.method, "SUCCESS", {}) + end) + + + + --mobile side: expect SetGlobalProperties response + EXPECT_RESPONSE(cid, { success = true, resultCode = "SUCCESS"}) + :Timeout(iTimeout) + + --mobile side: expect OnHashChange notification + EXPECT_NOTIFICATION("OnHashChange") + end + + --End test case NegativeRequestCheck.1.90 + ----------------------------------------------------------------------------------------- + + --Begin test case NegativeRequestCheck.1.91 + --Description: Check limitedCharacterList parameter is wrong type + + function Test:SetGlobalProperties_keyboardProperties_limitedCharacterList_Array_WrongType_INVALID_DATA() + + --mobile side: sending SetGlobalProperties request + local cid = self.mobileSession:SendRPC("SetGlobalProperties", + { + menuTitle = "Menu Title", + timeoutPrompt = + { + { + text = "Timeout prompt", + type = "TEXT" + } + }, + vrHelp = + { + { + position = 1, + image = + { + value = "action.png", + imageType = "DYNAMIC" + }, + text = "VR help item" + } + }, + menuIcon = + { + value = "action.png", + imageType = "DYNAMIC" + }, + helpPrompt = + { + { + text = "Help prompt", + type = "TEXT" + } + }, + vrHelpTitle = "VR help title", + keyboardProperties = + { + keyboardLayout = "QWERTY", + limitedCharacterList = 123, + language = "EN-US", + autoCompleteText = "Daemon, Freedom" + } + }) + + + --mobile side: expect SetGlobalProperties response + EXPECT_RESPONSE(cid, { success = false, resultCode = "INVALID_DATA"}) + :Timeout(iTimeout) + + --mobile side: expect OnHashChange notification is not send to mobile + EXPECT_NOTIFICATION("OnHashChange") + :Times(0) + end + + --End test case NegativeRequestCheck.1.91 + ----------------------------------------------------------------------------------------- + + --Begin test case NegativeRequestCheck.1.92 + --Description: Check limitedCharacterList parameter is out lower bound + + function Test:SetGlobalProperties_keyboardProperties_limitedCharacterList_Array_IsOutLowerBound_INVALID_DATA() + + --mobile side: sending SetGlobalProperties request + local cid = self.mobileSession:SendRPC("SetGlobalProperties", + { + menuTitle = "Menu Title", + timeoutPrompt = + { + { + text = "Timeout prompt", + type = "TEXT" + } + }, + vrHelp = + { + { + position = 1, + image = + { + value = "action.png", + imageType = "DYNAMIC" + }, + text = "VR help item" + } + }, + menuIcon = + { + value = "action.png", + imageType = "DYNAMIC" + }, + helpPrompt = + { + { + text = "Help prompt", + type = "TEXT" + } + }, + vrHelpTitle = "VR help title", + keyboardProperties = + { + keyboardLayout = "QWERTY", + limitedCharacterList = + { + + }, + language = "EN-US", + autoCompleteText = "Daemon, Freedom" + } + }) + + + --mobile side: expect SetGlobalProperties response + EXPECT_RESPONSE(cid, { success = false, resultCode = "INVALID_DATA"}) + :Timeout(iTimeout) + + --mobile side: expect OnHashChange notification is not send to mobile + EXPECT_NOTIFICATION("OnHashChange") + :Times(0) + end + + --End test case NegativeRequestCheck.1.92 + ----------------------------------------------------------------------------------------- + + --Begin test case NegativeRequestCheck.1.93 + --Description: Check limitedCharacterList parameter is out upper bound + + function Test:SetGlobalProperties_keyboardProperties_limitedCharacterList_Array_IsOutUpperBound_INVALID_DATA() + + --mobile side: sending SetGlobalProperties request + local cid = self.mobileSession:SendRPC("SetGlobalProperties", + { + menuTitle = "Menu Title", + timeoutPrompt = + { + { + text = "Timeout prompt", + type = "TEXT" + } + }, + vrHelp = + { + { + position = 1, + image = + { + value = "action.png", + imageType = "DYNAMIC" + }, + text = "VR help item" + } + }, + menuIcon = + { + value = "action.png", + imageType = "DYNAMIC" + }, + helpPrompt = + { + { + text = "Help prompt", + type = "TEXT" + } + }, + vrHelpTitle = "VR help title", + keyboardProperties = + { + keyboardLayout = "QWERTY", + limitedCharacterList = + { + "q", + "q", + "q", + "q", + "q", + "q", + "q", + "q", + "q", + "q", + "q", + "q", + "q", + "q", + "q", + "q", + "q", + "q", + "q", + "q", + "q", + "q", + "q", + "q", + "q", + "q", + "q", + "q", + "q", + "q", + "q", + "q", + "q", + "q", + "q", + "q", + "q", + "q", + "q", + "q", + "q", + "q", + "q", + "q", + "q", + "q", + "q", + "q", + "q", + "q", + "q", + "q", + "q", + "q", + "q", + "q", + "q", + "q", + "q", + "q", + "q", + "q", + "q", + "q", + "q", + "q", + "q", + "q", + "q", + "q", + "q", + "q", + "q", + "q", + "q", + "q", + "q", + "q", + "q", + "q", + "q", + "q", + "q", + "q", + "q", + "q", + "q", + "q", + "q", + "q", + "q", + "q", + "q", + "q", + "q", + "q", + "q", + "q", + "q", + "q", + "q" + }, + language = "EN-US", + autoCompleteText = "Daemon, Freedom" + } + }) + + + --mobile side: expect SetGlobalProperties response + EXPECT_RESPONSE(cid, { success = false, resultCode = "INVALID_DATA"}) + :Timeout(iTimeout) + + --mobile side: expect OnHashChange notification is not send to mobile + EXPECT_NOTIFICATION("OnHashChange") + :Times(0) + end + + --End test case NegativeRequestCheck.1.93 + ----------------------------------------------------------------------------------------- + + --Begin test case NegativeRequestCheck.1.94 + --Description: Check limitedCharacterList parameter array is zero size + + --It is covered by TC SetGlobalProperties_keyboardProperties_limitedCharacterList_Array_IsOutLowerBound_INVALID_DATA + + --End test case NegativeRequestCheck.1.94 + ----------------------------------------------------------------------------------------- + + --Begin test case NegativeRequestCheck.1.95 + --Description: Check keyboardPropertieslimitedCharacterList parameter is wrong type + + function Test:SetGlobalProperties_keyboardProperties_limitedCharacterList_IsWrongType_123_INVALID_DATA() + + --mobile side: sending SetGlobalProperties request + local cid = self.mobileSession:SendRPC("SetGlobalProperties", + { + menuTitle = "Menu Title", + timeoutPrompt = + { + { + text = "Timeout prompt", + type = "TEXT" + } + }, + vrHelp = + { + { + position = 1, + image = + { + value = "action.png", + imageType = "DYNAMIC" + }, + text = "VR help item" + } + }, + menuIcon = + { + value = "action.png", + imageType = "DYNAMIC" + }, + helpPrompt = + { + { + text = "Help prompt", + type = "TEXT" + } + }, + vrHelpTitle = "VR help title", + keyboardProperties = + { + keyboardLayout = "QWERTY", + keypressMode = "SINGLE_KEYPRESS", + limitedCharacterList = + { + 123 + }, + language = "EN-US", + autoCompleteText = "Daemon, Freedom" + } + }) + + + --mobile side: expect SetGlobalProperties response + EXPECT_RESPONSE(cid, { success = false, resultCode = "INVALID_DATA"}) + :Timeout(iTimeout) + + --mobile side: expect OnHashChange notification is not send to mobile + EXPECT_NOTIFICATION("OnHashChange") + :Times(0) + end + + --End test case NegativeRequestCheck.1.95 + ----------------------------------------------------------------------------------------- + + --Begin test case NegativeRequestCheck.1.96 + --Description: Check keyboardPropertieslimitedCharacterList parameter is lower bound + + function Test:SetGlobalProperties_keyboardProperties_limitedCharacterList_IsOutLowerBound_0_INVALID_DATA() + + --mobile side: sending SetGlobalProperties request + local cid = self.mobileSession:SendRPC("SetGlobalProperties", + { + menuTitle = "Menu Title", + timeoutPrompt = + { + { + text = "Timeout prompt", + type = "TEXT" + } + }, + vrHelp = + { + { + position = 1, + image = + { + value = "action.png", + imageType = "DYNAMIC" + }, + text = "VR help item" + } + }, + menuIcon = + { + value = "action.png", + imageType = "DYNAMIC" + }, + helpPrompt = + { + { + text = "Help prompt", + type = "TEXT" + } + }, + vrHelpTitle = "VR help title", + keyboardProperties = + { + keyboardLayout = "QWERTY", + keypressMode = "SINGLE_KEYPRESS", + limitedCharacterList = + { + "" + }, + language = "EN-US", + autoCompleteText = "Daemon, Freedom" + } + }) + + + --mobile side: expect SetGlobalProperties response + EXPECT_RESPONSE(cid, { success = false, resultCode = "INVALID_DATA"}) + :Timeout(iTimeout) + + --mobile side: expect OnHashChange notification is not send to mobile + EXPECT_NOTIFICATION("OnHashChange") + :Times(0) + end + + --End test case NegativeRequestCheck.1.96 + ----------------------------------------------------------------------------------------- + + --Begin test case NegativeRequestCheck.1.97 + --Description: Check keyboardPropertieslimitedCharacterList parameter is out upper bound + + function Test:SetGlobalProperties_keyboardProperties_limitedCharacterList_IsOutUpperBound_2_INVALID_DATA() + + --mobile side: sending SetGlobalProperties request + local cid = self.mobileSession:SendRPC("SetGlobalProperties", + { + menuTitle = "Menu Title", + timeoutPrompt = + { + { + text = "Timeout prompt", + type = "TEXT" + } + }, + vrHelp = + { + { + position = 1, + image = + { + value = "action.png", + imageType = "DYNAMIC" + }, + text = "VR help item" + } + }, + menuIcon = + { + value = "action.png", + imageType = "DYNAMIC" + }, + helpPrompt = + { + { + text = "Help prompt", + type = "TEXT" + } + }, + vrHelpTitle = "VR help title", + keyboardProperties = + { + keyboardLayout = "QWERTY", + keypressMode = "SINGLE_KEYPRESS", + limitedCharacterList = + { + "qA" + }, + language = "EN-US", + autoCompleteText = "Daemon, Freedom" + } + }) + + + --mobile side: expect SetGlobalProperties response + EXPECT_RESPONSE(cid, { success = false, resultCode = "INVALID_DATA"}) + :Timeout(iTimeout) + + --mobile side: expect OnHashChange notification is not send to mobile + EXPECT_NOTIFICATION("OnHashChange") + :Times(0) + end + + --End test case NegativeRequestCheck.1.97 + ----------------------------------------------------------------------------------------- + + --Begin test case NegativeRequestCheck.1.98 + --Description: Check keyboardPropertieslimitedCharacterList parameter contains escape character (tab) + + function Test:SetGlobalProperties_keyboardProperties_limitedCharacterList__TabChacracter__INVALID_DATA() + + --mobile side: sending SetGlobalProperties request + local cid = self.mobileSession:SendRPC("SetGlobalProperties", + { + menuTitle = "Menu Title", + timeoutPrompt = + { + { + text = "Timeout prompt", + type = "TEXT" + } + }, + vrHelp = + { + { + position = 1, + image = + { + value = "action.png", + imageType = "DYNAMIC" + }, + text = "VR help item" + } + }, + menuIcon = + { + value = "action.png", + imageType = "DYNAMIC" + }, + helpPrompt = + { + { + text = "Help prompt", + type = "TEXT" + } + }, + vrHelpTitle = "VR help title", + keyboardProperties = + { + keyboardLayout = "QWERTY", + keypressMode = "SINGLE_KEYPRESS", + limitedCharacterList = + { + "\t" + }, + language = "EN-US", + autoCompleteText = "Daemon, Freedom" + } + }) + + + --mobile side: expect SetGlobalProperties response + EXPECT_RESPONSE(cid, { success = false, resultCode = "INVALID_DATA"}) + :Timeout(iTimeout) + + --mobile side: expect OnHashChange notification is not send to mobile + EXPECT_NOTIFICATION("OnHashChange") + :Times(0) + end + + --End test case NegativeRequestCheck.1.98 + ----------------------------------------------------------------------------------------- + + --Begin test case NegativeRequestCheck.1.99 + --Description: Check keyboardPropertieslimitedCharacterList parameter contains escape character (new line) + + function Test:SetGlobalProperties_keyboardProperties_limitedCharacterList__NewLineCharacter__INVALID_DATA() + + --mobile side: sending SetGlobalProperties request + local cid = self.mobileSession:SendRPC("SetGlobalProperties", + { + menuTitle = "Menu Title", + timeoutPrompt = + { + { + text = "Timeout prompt", + type = "TEXT" + } + }, + vrHelp = + { + { + position = 1, + image = + { + value = "action.png", + imageType = "DYNAMIC" + }, + text = "VR help item" + } + }, + menuIcon = + { + value = "action.png", + imageType = "DYNAMIC" + }, + helpPrompt = + { + { + text = "Help prompt", + type = "TEXT" + } + }, + vrHelpTitle = "VR help title", + keyboardProperties = + { + keyboardLayout = "QWERTY", + keypressMode = "SINGLE_KEYPRESS", + limitedCharacterList = + { + "\n" + }, + language = "EN-US", + autoCompleteText = "Daemon, Freedom" + } + }) + + + --mobile side: expect SetGlobalProperties response + EXPECT_RESPONSE(cid, { success = false, resultCode = "INVALID_DATA"}) + :Timeout(iTimeout) + + --mobile side: expect OnHashChange notification is not send to mobile + EXPECT_NOTIFICATION("OnHashChange") + :Times(0) + end + + --End test case NegativeRequestCheck.1.99 + ----------------------------------------------------------------------------------------- + + --Begin test case NegativeRequestCheck.1.100 + --Description: Check keyboardPropertieslimitedCharacterList parameter contains escape character (spaces) + + function Test:SetGlobalProperties_keyboardProperties_limitedCharacterList__SpaceCharacter__INVALID_DATA() + + --mobile side: sending SetGlobalProperties request + local cid = self.mobileSession:SendRPC("SetGlobalProperties", + { + menuTitle = "Menu Title", + timeoutPrompt = + { + { + text = "Timeout prompt", + type = "TEXT" + } + }, + vrHelp = + { + { + position = 1, + image = + { + value = "action.png", + imageType = "DYNAMIC" + }, + text = "VR help item" + } + }, + menuIcon = + { + value = "action.png", + imageType = "DYNAMIC" + }, + helpPrompt = + { + { + text = "Help prompt", + type = "TEXT" + } + }, + vrHelpTitle = "VR help title", + keyboardProperties = + { + keyboardLayout = "QWERTY", + keypressMode = "SINGLE_KEYPRESS", + limitedCharacterList = + { + " " + }, + language = "EN-US", + autoCompleteText = "Daemon, Freedom" + } + }) + + + --mobile side: expect SetGlobalProperties response + EXPECT_RESPONSE(cid, { success = false, resultCode = "INVALID_DATA"}) + :Timeout(iTimeout) + + --mobile side: expect OnHashChange notification is not send to mobile + EXPECT_NOTIFICATION("OnHashChange") + :Times(0) + end + + --End test case NegativeRequestCheck.1.100 + ----------------------------------------------------------------------------------------- + + --Begin test case NegativeRequestCheck.1.101 + --Description: Check keyboardProperties: autoCompleteText parameter is missed + + function Test:SetGlobalProperties_keyboardProperties_autoCompleteText_IsMising_SUCCESS() + + --mobile side: sending SetGlobalProperties request + local cid = self.mobileSession:SendRPC("SetGlobalProperties", + { + menuTitle = "Menu Title", + timeoutPrompt = + { + { + text = "Timeout prompt", + type = "TEXT" + } + }, + vrHelp = + { + { + position = 1, + image = + { + value = "action.png", + imageType = "DYNAMIC" + }, + text = "VR help item" + } + }, + menuIcon = + { + value = "action.png", + imageType = "DYNAMIC" + }, + helpPrompt = + { + { + text = "Help prompt", + type = "TEXT" + } + }, + vrHelpTitle = "VR help title", + keyboardProperties = + { + keyboardLayout = "QWERTY", + keypressMode = "SINGLE_KEYPRESS", + limitedCharacterList = + { + "a" + }, + language = "EN-US" + } + }) + + + --hmi side: expect TTS.SetGlobalProperties request + EXPECT_HMICALL("TTS.SetGlobalProperties", + { + timeoutPrompt = + { + { + text = "Timeout prompt", + type = "TEXT" + } + }, + helpPrompt = + { + { + text = "Help prompt", + type = "TEXT" + } + } + }) + :Timeout(iTimeout) + :Do(function(_,data) + --hmi side: sending UI.SetGlobalProperties response + self.hmiConnection:SendResponse(data.id, data.method, "SUCCESS", {}) + end) + + + + --hmi side: expect UI.SetGlobalProperties request + EXPECT_HMICALL("UI.SetGlobalProperties", + { + menuTitle = "Menu Title", + vrHelp = + { + { + position = 1, + --[=[ TODO: update after resolving APPLINK-16052 + + image = + { + imageType = "DYNAMIC", + value = strAppFolder .. "action.png" + },]=] + text = "VR help item" + } + }, + --Checked below + -- menuIcon = + -- { + -- imageType = "DYNAMIC", + -- value = strAppFolder .. "action.png" + -- }, + vrHelpTitle = "VR help title", + keyboardProperties = + { + keyboardLayout = "QWERTY", + keypressMode = "SINGLE_KEYPRESS", + --[=[ TODO: update after resolving APPLINK-16047 + + limitedCharacterList = + { + "a" + },]=] + language = "EN-US" + } + }) + :Timeout(iTimeout) + :ValidIf(function(_,data) + return Check_menuIconParams(data) + end) + :Do(function(_,data) + --hmi side: sending UI.SetGlobalProperties response + self.hmiConnection:SendResponse(data.id, data.method, "SUCCESS", {}) + end) + + + + --mobile side: expect SetGlobalProperties response + EXPECT_RESPONSE(cid, { success = true, resultCode = "SUCCESS"}) + :Timeout(iTimeout) + + --mobile side: expect OnHashChange notification + EXPECT_NOTIFICATION("OnHashChange") + end + + --End test case NegativeRequestCheck.1.101 + ----------------------------------------------------------------------------------------- + + --Begin test case NegativeRequestCheck.1.102 + --Description: Check keyboardPropertiesautoCompleteText parameter is wrong type + + function Test:SetGlobalProperties_keyboardProperties_autoCompleteText_IsWrongType_123_INVALID_DATA() + + --mobile side: sending SetGlobalProperties request + local cid = self.mobileSession:SendRPC("SetGlobalProperties", + { + menuTitle = "Menu Title", + timeoutPrompt = + { + { + text = "Timeout prompt", + type = "TEXT" + } + }, + vrHelp = + { + { + position = 1, + image = + { + value = "action.png", + imageType = "DYNAMIC" + }, + text = "VR help item" + } + }, + menuIcon = + { + value = "action.png", + imageType = "DYNAMIC" + }, + helpPrompt = + { + { + text = "Help prompt", + type = "TEXT" + } + }, + vrHelpTitle = "VR help title", + keyboardProperties = + { + keyboardLayout = "QWERTY", + keypressMode = "SINGLE_KEYPRESS", + limitedCharacterList = + { + "a" + }, + language = "EN-US", + autoCompleteText = 123 + } + }) + + + --mobile side: expect SetGlobalProperties response + EXPECT_RESPONSE(cid, { success = false, resultCode = "INVALID_DATA"}) + :Timeout(iTimeout) + + --mobile side: expect OnHashChange notification is not send to mobile + EXPECT_NOTIFICATION("OnHashChange") + :Times(0) + end + + --End test case NegativeRequestCheck.1.102 + ----------------------------------------------------------------------------------------- + + --Begin test case NegativeRequestCheck.1.103 + --Description: Check keyboardPropertiesautoCompleteText parameter is lower bound + + function Test:SetGlobalProperties_keyboardProperties_autoCompleteText_IsOutLowerBound_0_INVALID_DATA() + + --mobile side: sending SetGlobalProperties request + local cid = self.mobileSession:SendRPC("SetGlobalProperties", + { + menuTitle = "Menu Title", + timeoutPrompt = + { + { + text = "Timeout prompt", + type = "TEXT" + } + }, + vrHelp = + { + { + position = 1, + image = + { + value = "action.png", + imageType = "DYNAMIC" + }, + text = "VR help item" + } + }, + menuIcon = + { + value = "action.png", + imageType = "DYNAMIC" + }, + helpPrompt = + { + { + text = "Help prompt", + type = "TEXT" + } + }, + vrHelpTitle = "VR help title", + keyboardProperties = + { + keyboardLayout = "QWERTY", + keypressMode = "SINGLE_KEYPRESS", + limitedCharacterList = + { + "a" + }, + language = "EN-US", + autoCompleteText = "" + } + }) + + + --mobile side: expect SetGlobalProperties response + EXPECT_RESPONSE(cid, { success = false, resultCode = "INVALID_DATA"}) + :Timeout(iTimeout) + + --mobile side: expect OnHashChange notification is not send to mobile + EXPECT_NOTIFICATION("OnHashChange") + :Times(0) + end + + --End test case NegativeRequestCheck.1.103 + ----------------------------------------------------------------------------------------- + + --Begin test case NegativeRequestCheck.1.104 + --Description: Check keyboardPropertiesautoCompleteText parameter is out upper bound + + function Test:SetGlobalProperties_keyboardProperties_autoCompleteText_IsOutUpperBound_1001_INVALID_DATA() + + --mobile side: sending SetGlobalProperties request + local cid = self.mobileSession:SendRPC("SetGlobalProperties", + { + menuTitle = "Menu Title", + timeoutPrompt = + { + { + text = "Timeout prompt", + type = "TEXT" + } + }, + vrHelp = + { + { + position = 1, + image = + { + value = "action.png", + imageType = "DYNAMIC" + }, + text = "VR help item" + } + }, + menuIcon = + { + value = "action.png", + imageType = "DYNAMIC" + }, + helpPrompt = + { + { + text = "Help prompt", + type = "TEXT" + } + }, + vrHelpTitle = "VR help title", + keyboardProperties = + { + keyboardLayout = "QWERTY", + keypressMode = "SINGLE_KEYPRESS", + limitedCharacterList = + { + "a" + }, + language = "EN-US", + autoCompleteText = "qA1_wB2_eA3_rB4_tA5_yB6_uA7_iB8_oA9_pB0_aA1_sB2_dA3_fB4_gA5_hB6_jA7_kB8_lA9_zB0_xA1_cB2_vA3_bB4_nA5_mB6_qA7_wB8_eA9_rB0_tA1_yB2_uA3_iB4_oA5_pB6_aA7_sB8_dA9_fB0_gA1_hB2_jA3_kB4_lA5_zB6_xA7_cB8_vA9_bB0_nA1_mB2_qA3_wB4_eA5_rB6_tA7_yB8_uA9_iB0_oA1_pB2_aA3_sB4_dA5_fB6_gA7_hB8_jA9_kB0_lA1_zB2_xA3_cB4_vA5_bB6_nA7_mB8_qA9_wB0_eA1_rB2_tA3_yB4_uA5_iB6_oA7_pB8_aA9_sB0_dA1_fB2_gA3_hB4_jA5_kB6_lA7_zB8_xA9_cB0_vA1_bB2_nA3_mB4_qA5_wB6_eA7_rB8_tA9_yB0_uA1_iB2_oA3_pB4_aA5_sB6_dA7_fB8_gA9_hB0_jA1_kB2_lA3_zB4_xA5_cB6_vA7_bB8_nA9_mB0_qA1_wB2_eA3_rB4_tA5_yB6_uA7_iB8_oA9_pB0_aA1_sB2_dA3_fB4_gA5_hB6_jA7_kB8_lA9_zB0_xA1_cB2_vA3_bB4_nA5_mB6_qA7_wB8_eA9_rB0_tA1_yB2_uA3_iB4_oA5_pB6_aA7_sB8_dA9_fB0_gA1_hB2_jA3_kB4_lA5_zB6_xA7_cB8_vA9_bB0_nA1_mB2_qA3_wB4_eA5_rB6_tA7_yB8_uA9_iB0_oA1_pB2_aA3_sB4_dA5_fB6_gA7_hB8_jA9_kB0_lA1_zB2_xA3_cB4_vA5_bB6_nA7_mB8_qA9_wB0_eA1_rB2_tA3_yB4_uA5_iB6_oA7_pB8_aA9_sB0_dA1_fB2_gA3_hB4_jA5_kB6_lA7_zB8_xA9_cB0_vA1_bB2_nA3_mB4_qA5_wB6_eA7_rB8_tA9_yB0_uA1_iB2_oA3_pB4_aA5_sB6_dA7_fB8_gA9_hB0_j" + } + }) + + + --mobile side: expect SetGlobalProperties response + EXPECT_RESPONSE(cid, { success = false, resultCode = "INVALID_DATA"}) + :Timeout(iTimeout) + + --mobile side: expect OnHashChange notification is not send to mobile + EXPECT_NOTIFICATION("OnHashChange") + :Times(0) + end + + --End test case NegativeRequestCheck.1.104 + ----------------------------------------------------------------------------------------- + + --Begin test case NegativeRequestCheck.1.105 + --Description: Check keyboardPropertiesautoCompleteText parameter contains escape characters (new line) + + function Test:SetGlobalProperties_keyboardProperties_autoCompleteText__NewLineCharacter__INVALID_DATA() + + --mobile side: sending SetGlobalProperties request + local cid = self.mobileSession:SendRPC("SetGlobalProperties", + { + menuTitle = "Menu Title", + timeoutPrompt = + { + { + text = "Timeout prompt", + type = "TEXT" + } + }, + vrHelp = + { + { + position = 1, + image = + { + value = "action.png", + imageType = "DYNAMIC" + }, + text = "VR help item" + } + }, + menuIcon = + { + value = "action.png", + imageType = "DYNAMIC" + }, + helpPrompt = + { + { + text = "Help prompt", + type = "TEXT" + } + }, + vrHelpTitle = "VR help title", + keyboardProperties = + { + keyboardLayout = "QWERTY", + keypressMode = "SINGLE_KEYPRESS", + limitedCharacterList = + { + "a" + }, + language = "EN-US", + autoCompleteText = "\n" + } + }) + + + --mobile side: expect SetGlobalProperties response + EXPECT_RESPONSE(cid, { success = false, resultCode = "INVALID_DATA"}) + :Timeout(iTimeout) + + --mobile side: expect OnHashChange notification is not send to mobile + EXPECT_NOTIFICATION("OnHashChange") + :Times(0) + end + + --End test case NegativeRequestCheck.1.105 + ----------------------------------------------------------------------------------------- + + --Begin test case NegativeRequestCheck.1.106 + --Description: Check keyboardPropertiesautoCompleteText parameter contains escape characters (tab) + + function Test:SetGlobalProperties_keyboardProperties_autoCompleteText__TabChacracter__INVALID_DATA() + + --mobile side: sending SetGlobalProperties request + local cid = self.mobileSession:SendRPC("SetGlobalProperties", + { + menuTitle = "Menu Title", + timeoutPrompt = + { + { + text = "Timeout prompt", + type = "TEXT" + } + }, + vrHelp = + { + { + position = 1, + image = + { + value = "action.png", + imageType = "DYNAMIC" + }, + text = "VR help item" + } + }, + menuIcon = + { + value = "action.png", + imageType = "DYNAMIC" + }, + helpPrompt = + { + { + text = "Help prompt", + type = "TEXT" + } + }, + vrHelpTitle = "VR help title", + keyboardProperties = + { + keyboardLayout = "QWERTY", + keypressMode = "SINGLE_KEYPRESS", + limitedCharacterList = + { + "a" + }, + language = "EN-US", + autoCompleteText = "\t" + } + }) + + + --mobile side: expect SetGlobalProperties response + EXPECT_RESPONSE(cid, { success = false, resultCode = "INVALID_DATA"}) + :Timeout(iTimeout) + + --mobile side: expect OnHashChange notification is not send to mobile + EXPECT_NOTIFICATION("OnHashChange") + :Times(0) + end + + --End test case NegativeRequestCheck.1.106 + ----------------------------------------------------------------------------------------- + + --Begin test case NegativeRequestCheck.1.107 + --Description: Check keyboardPropertiesautoCompleteText parameter contains escape characters (spaces) + + function Test:SetGlobalProperties_keyboardProperties_autoCompleteText__SpaceCharacter__INVALID_DATA() + + --mobile side: sending SetGlobalProperties request + local cid = self.mobileSession:SendRPC("SetGlobalProperties", + { + menuTitle = "Menu Title", + timeoutPrompt = + { + { + text = "Timeout prompt", + type = "TEXT" + } + }, + vrHelp = + { + { + position = 1, + image = + { + value = "action.png", + imageType = "DYNAMIC" + }, + text = "VR help item" + } + }, + menuIcon = + { + value = "action.png", + imageType = "DYNAMIC" + }, + helpPrompt = + { + { + text = "Help prompt", + type = "TEXT" + } + }, + vrHelpTitle = "VR help title", + keyboardProperties = + { + keyboardLayout = "QWERTY", + keypressMode = "SINGLE_KEYPRESS", + limitedCharacterList = + { + "a" + }, + language = "EN-US", + autoCompleteText = " " + } + }) + + + --mobile side: expect SetGlobalProperties response + EXPECT_RESPONSE(cid, { success = false, resultCode = "INVALID_DATA"}) + :Timeout(iTimeout) + + --mobile side: expect OnHashChange notification is not send to mobile + EXPECT_NOTIFICATION("OnHashChange") + :Times(0) + end + + --End test case NegativeRequestCheck.1.107 + ----------------------------------------------------------------------------------------- + + --Begin test case NegativeRequestCheck.1.108 + --Description: Check keyboardPropertieskeypressMode parameter is wrong data type + + function Test:SetGlobalProperties_keyboardProperties_keypressMode_WrongType_INVALID_DATA() + + --mobile side: sending SetGlobalProperties request + local cid = self.mobileSession:SendRPC("SetGlobalProperties", + { + menuTitle = "Menu Title", + timeoutPrompt = + { + { + text = "Timeout prompt", + type = "TEXT" + } + }, + vrHelp = + { + { + position = 1, + image = + { + value = "action.png", + imageType = "DYNAMIC" + }, + text = "VR help item" + } + }, + menuIcon = + { + value = "action.png", + imageType = "DYNAMIC" + }, + helpPrompt = + { + { + text = "Help prompt", + type = "TEXT" + } + }, + vrHelpTitle = "VR help title", + keyboardProperties = + { + keyboardLayout = "QWERTY", + keypressMode = 123, + limitedCharacterList = + { + "a" + }, + language = "EN-US", + autoCompleteText = "Daemon, Freedom" + } + }) + + + --mobile side: expect SetGlobalProperties response + EXPECT_RESPONSE(cid, { success = false, resultCode = "INVALID_DATA"}) + :Timeout(iTimeout) + + --mobile side: expect OnHashChange notification is not send to mobile + EXPECT_NOTIFICATION("OnHashChange") + :Times(0) + end + + --End test case NegativeRequestCheck.1.108 + ----------------------------------------------------------------------------------------- + + --Begin test case NegativeRequestCheck.1.109 + --Description: Check keyboardPropertieskeypressMode parameter is empty string + + function Test:SetGlobalProperties_keyboardProperties_keypressMode_emptyString_INVALID_DATA() + + --mobile side: sending SetGlobalProperties request + local cid = self.mobileSession:SendRPC("SetGlobalProperties", + { + menuTitle = "Menu Title", + timeoutPrompt = + { + { + text = "Timeout prompt", + type = "TEXT" + } + }, + vrHelp = + { + { + position = 1, + image = + { + value = "action.png", + imageType = "DYNAMIC" + }, + text = "VR help item" + } + }, + menuIcon = + { + value = "action.png", + imageType = "DYNAMIC" + }, + helpPrompt = + { + { + text = "Help prompt", + type = "TEXT" + } + }, + vrHelpTitle = "VR help title", + keyboardProperties = + { + keyboardLayout = "QWERTY", + keypressMode = "", + limitedCharacterList = + { + "a" + }, + language = "EN-US", + autoCompleteText = "Daemon, Freedom" + } + }) + + + --mobile side: expect SetGlobalProperties response + EXPECT_RESPONSE(cid, { success = false, resultCode = "INVALID_DATA"}) + :Timeout(iTimeout) + + --mobile side: expect OnHashChange notification is not send to mobile + EXPECT_NOTIFICATION("OnHashChange") + :Times(0) + end + + --End test case NegativeRequestCheck.1.109 + ----------------------------------------------------------------------------------------- + +--End test case NegativeRequestCheck.1 + + +---------------------------------------------------------------------------------------------- +----------------------------------------IV TEST BLOCK----------------------------------------- +---------------------------------------Result codes check-------------------------------------- +---------------------------------------------------------------------------------------------- + + --------Checks----------- + -- check all pairs resultCode+success + -- check should be made sequentially (if it is possible): + -- case resultCode + success true + -- case resultCode + success false + --For example: + -- first case checks ABORTED + true + -- second case checks ABORTED + false + -- third case checks REJECTED + true + -- fourth case checks REJECTED + false + + + + + --Begin test case ResultCodeCheck.1 + --Description: resultCode APPLICATION_NOT_REGISTERED + + --Requirement id in JAMA: SDLAQ-CRS-388 + + --Verification criteria: SDL sends APPLICATION_NOT_REGISTERED result code when the app sends SetGlobalProperties request within the same connection before RegisterAppInterface has been yet performed. + + --Precondition: Create new session + commonSteps:precondition_AddNewSession() + + function Test:SetGlobalProperties_resultCode_APPLICATION_NOT_REGISTERED() + + --mobile side: sending SetGlobalProperties request + local cid = self.mobileSession2:SendRPC("SetGlobalProperties", + { + menuTitle = "Menu Title", + timeoutPrompt = + { + { + text = "Timeout prompt", + type = "TEXT" + } + }, + vrHelp = + { + { + position = 1, + image = + { + value = "action.png", + imageType = "DYNAMIC" + }, + text = "VR help item" + } + }, + menuIcon = + { + value = "action.png", + imageType = "DYNAMIC" + }, + helpPrompt = + { + { + text = "Help prompt", + type = "TEXT" + } + }, + vrHelpTitle = "VR help title", + keyboardProperties = + { + keyboardLayout = "QWERTY", + keypressMode = "SINGLE_KEYPRESS", + limitedCharacterList = + { + "a" + }, + language = "EN-US", + autoCompleteText = "Daemon, Freedom" + } + }) + + + --mobile side: expect SetGlobalProperties response + self.mobileSession2:ExpectResponse(cid, { success = false, resultCode = "APPLICATION_NOT_REGISTERED"}) + :Timeout(iTimeout) + + --mobile side: expect OnHashChange notification is not send to mobile + self.mobileSession2:ExpectNotification("OnHashChange",{}) + :Times(0) + end + + --End test case ResultCodeCheck.1 + ----------------------------------------------------------------------------------------- + + --Begin test case ResultCodeCheck.2 + --Description: resultCode REJECTED + + --Requirement id in JAMA: SDLAQ-CRS-389 + + --Verification criteria: + --1. In case SDL receives REJECTED result code for the RPC from HMI, SDL must transfer REJECTED resultCode with adding "success:false" to mobile app. + --2. SDL rejects the request with REJECTED resultCode when vrHelpItems are omitted and the vrHelpTitle is provided at the same time. + --3. SDL rejects the request with REJECTED resultCode when vrHelpTitle is omitted and the vrHelpItems are provided at the same time. + --4. SDL rejects the request with REJECTED resultCode in case the list of VR Help Items contains non-sequential or not started from 1 positions + + --Begin test case ResultCodeCheck.2.1 + --Description: "1. In case SDL receives REJECTED result code for the RPC from HMI, SDL must transfer REJECTED resultCode with adding "success:false" to mobile app." + + --UI responses REJECTED + function Test:SetGlobalProperties_UI_ResultCode_REJECTED() + + --mobile side: sending SetGlobalProperties request + local cid = self.mobileSession:SendRPC("SetGlobalProperties", + { + menuTitle = "Menu Title", + timeoutPrompt = + { + { + text = "Timeout prompt", + type = "TEXT" + } + }, + vrHelp = + { + { + position = 1, + image = + { + value = "action.png", + imageType = "DYNAMIC" + }, + text = "VR help item" + } + }, + menuIcon = + { + value = "action.png", + imageType = "DYNAMIC" + }, + helpPrompt = + { + { + text = "Help prompt", + type = "TEXT" + } + }, + vrHelpTitle = "VR help title", + keyboardProperties = + { + keyboardLayout = "QWERTY", + keypressMode = "SINGLE_KEYPRESS", + limitedCharacterList = + { + "a" + }, + language = "EN-US", + autoCompleteText = "Daemon, Freedom" + } + }) + + + --hmi side: expect TTS.SetGlobalProperties request + EXPECT_HMICALL("TTS.SetGlobalProperties", + { + timeoutPrompt = + { + { + text = "Timeout prompt", + type = "TEXT" + } + }, + helpPrompt = + { + { + text = "Help prompt", + type = "TEXT" + } + } + }) + :Timeout(iTimeout) + :Do(function(_,data) + --hmi side: sending UI.SetGlobalProperties response + self.hmiConnection:SendResponse(data.id, data.method, "SUCCESS", {}) + end) + + + + --hmi side: expect UI.SetGlobalProperties request + EXPECT_HMICALL("UI.SetGlobalProperties", + { + menuTitle = "Menu Title", + vrHelp = + { + { + position = 1, + --[=[ TODO: update after resolving APPLINK-16052 + + image = + { + imageType = "DYNAMIC", + value = strAppFolder .. "action.png" + },]=] + text = "VR help item" + } + }, + --Checked below + -- menuIcon = + -- { + -- imageType = "DYNAMIC", + -- value = strAppFolder .. "action.png" + -- }, + vrHelpTitle = "VR help title", + keyboardProperties = + { + keyboardLayout = "QWERTY", + keypressMode = "SINGLE_KEYPRESS", + --[=[ TODO: update after resolving APPLINK-16047 + + limitedCharacterList = + { + "a" + },]=] + language = "EN-US", + autoCompleteText = "Daemon, Freedom" + } + }) + :Timeout(iTimeout) + :ValidIf(function(_,data) + return Check_menuIconParams(data) + end) + :Do(function(_,data) + --hmi side: sending UI.SetGlobalProperties response + self.hmiConnection:SendResponse(data.id, data.method, "REJECTED", {}) + end) + + + + --mobile side: expect SetGlobalProperties response + EXPECT_RESPONSE(cid, { success = false, resultCode = "REJECTED"}) + :Timeout(iTimeout) + + --mobile side: expect OnHashChange notification + EXPECT_NOTIFICATION("OnHashChange") + :Times(0) + + DelayedExp(2000) + end + + --TTS responses REJECTED + function Test:SetGlobalProperties_TTS_ResultCode_REJECTED() + + --mobile side: sending SetGlobalProperties request + local cid = self.mobileSession:SendRPC("SetGlobalProperties", + { + menuTitle = "Menu Title", + timeoutPrompt = + { + { + text = "Timeout prompt", + type = "TEXT" + } + }, + vrHelp = + { + { + position = 1, + image = + { + value = "action.png", + imageType = "DYNAMIC" + }, + text = "VR help item" + } + }, + menuIcon = + { + value = "action.png", + imageType = "DYNAMIC" + }, + helpPrompt = + { + { + text = "Help prompt", + type = "TEXT" + } + }, + vrHelpTitle = "VR help title", + keyboardProperties = + { + keyboardLayout = "QWERTY", + keypressMode = "SINGLE_KEYPRESS", + limitedCharacterList = + { + "a" + }, + language = "EN-US", + autoCompleteText = "Daemon, Freedom" + } + }) + + + --hmi side: expect TTS.SetGlobalProperties request + EXPECT_HMICALL("TTS.SetGlobalProperties", + { + timeoutPrompt = + { + { + text = "Timeout prompt", + type = "TEXT" + } + }, + helpPrompt = + { + { + text = "Help prompt", + type = "TEXT" + } + } + }) + :Timeout(iTimeout) + :Do(function(_,data) + --hmi side: sending UI.SetGlobalProperties response + self.hmiConnection:SendResponse(data.id, data.method, "REJECTED", {}) + end) + + + + --hmi side: expect UI.SetGlobalProperties request + EXPECT_HMICALL("UI.SetGlobalProperties", + { + menuTitle = "Menu Title", + vrHelp = + { + { + position = 1, + --[=[ TODO: update after resolving APPLINK-16052 + + image = + { + imageType = "DYNAMIC", + value = strAppFolder .. "action.png" + },]=] + text = "VR help item" + } + }, + --Checked below + -- menuIcon = + -- { + -- imageType = "DYNAMIC", + -- value = strAppFolder .. "action.png" + -- }, + vrHelpTitle = "VR help title", + keyboardProperties = + { + keyboardLayout = "QWERTY", + keypressMode = "SINGLE_KEYPRESS", + --[=[ TODO: update after resolving APPLINK-16047 + + limitedCharacterList = + { + "a" + },]=] + language = "EN-US", + autoCompleteText = "Daemon, Freedom" + } + }) + :Timeout(iTimeout) + :ValidIf(function(_,data) + return Check_menuIconParams(data) + end) + :Do(function(_,data) + --hmi side: sending UI.SetGlobalProperties response + self.hmiConnection:SendResponse(data.id, data.method, "SUCCESS", {}) + end) + + + + --mobile side: expect SetGlobalProperties response + EXPECT_RESPONSE(cid, { success = false, resultCode = "REJECTED"}) + :Timeout(iTimeout) + + --mobile side: expect OnHashChange notification is not send to mobile + EXPECT_NOTIFICATION("OnHashChange") + :Times(0) + end + + --End test case ResultCodeCheck.2.1 + ----------------------------------------------------------------------------------------- + + --Begin test case ResultCodeCheck.2.2 + --Description: "2. SDL rejects the request with REJECTED resultCode when vrHelpItems are omitted and the vrHelpTitle is provided at the same time." + + + function Test:SetGlobalProperties_resultCode_REJECTED_omitted_vrHelpItems() + + --mobile side: sending SetGlobalProperties request + local cid = self.mobileSession:SendRPC("SetGlobalProperties", + { + menuTitle = "Menu Title", + timeoutPrompt = + { + { + text = "Timeout prompt", + type = "TEXT" + } + }, + menuIcon = + { + value = "action.png", + imageType = "DYNAMIC" + }, + helpPrompt = + { + { + text = "Help prompt", + type = "TEXT" + } + }, + vrHelpTitle = "VR help title", + keyboardProperties = + { + keyboardLayout = "QWERTY", + keypressMode = "SINGLE_KEYPRESS", + limitedCharacterList = + { + "a" + }, + language = "EN-US", + autoCompleteText = "Daemon, Freedom" + } + }) + + + --mobile side: expect SetGlobalProperties response + EXPECT_RESPONSE(cid, { success = false, resultCode = "REJECTED"}) + :Timeout(iTimeout) + + --mobile side: expect OnHashChange notification is not send to mobile + EXPECT_NOTIFICATION("OnHashChange") + :Times(0) + end + + + --End test case ResultCodeCheck.2.2 + ----------------------------------------------------------------------------------------- + + --Begin test case ResultCodeCheck.2.3 + --Description: "3. SDL rejects the request with REJECTED resultCode when vrHelpTitle is omitted and the vrHelpItems are provided at the same time." + + + function Test:SetGlobalProperties_resultCode_REJECTED_omitted_vrHelpTitle() + + --mobile side: sending SetGlobalProperties request + local cid = self.mobileSession:SendRPC("SetGlobalProperties", + { + menuTitle = "Menu Title", + timeoutPrompt = + { + { + text = "Timeout prompt", + type = "TEXT" + } + }, + vrHelp = + { + { + position = 1, + image = + { + value = "action.png", + imageType = "DYNAMIC" + }, + text = "VR help item" + } + }, + menuIcon = + { + value = "action.png", + imageType = "DYNAMIC" + }, + helpPrompt = + { + { + text = "Help prompt", + type = "TEXT" + } + }, + keyboardProperties = + { + keyboardLayout = "QWERTY", + keypressMode = "SINGLE_KEYPRESS", + limitedCharacterList = + { + "a" + }, + language = "EN-US", + autoCompleteText = "Daemon, Freedom" + } + }) + + + + --mobile side: expect SetGlobalProperties response + EXPECT_RESPONSE(cid, { success = false, resultCode = "REJECTED"}) + :Timeout(iTimeout) + + --mobile side: expect OnHashChange notification is not send to mobile + EXPECT_NOTIFICATION("OnHashChange") + :Times(0) + end + + + --End test case ResultCodeCheck.2.3 + ----------------------------------------------------------------------------------------- + + + --Begin test case ResultCodeCheck.2.4 + --Description: "4. SDL rejects the request with REJECTED resultCode in case the list of VR Help Items contains non-sequential or not started from 1 positions" + + + function Test:SetGlobalProperties_resultCode_REJECTED_nonsequential_vrHelpItems() + + --mobile side: sending SetGlobalProperties request + local cid = self.mobileSession:SendRPC("SetGlobalProperties", + { + menuTitle = "Menu Title", + timeoutPrompt = + { + { + text = "Timeout prompt", + type = "TEXT" + } + }, + vrHelp = + { + { + position = 1, + image = + { + value = "action.png", + imageType = "DYNAMIC" + }, + text = "VR help item" + }, + { + position = 3, + image = + { + value = "action.png", + imageType = "DYNAMIC" + }, + text = "VR help item 3" + } + }, + menuIcon = + { + value = "action.png", + imageType = "DYNAMIC" + }, + helpPrompt = + { + { + text = "Help prompt", + type = "TEXT" + } + }, + vrHelpTitle = "VR help title", + keyboardProperties = + { + keyboardLayout = "QWERTY", + keypressMode = "SINGLE_KEYPRESS", + limitedCharacterList = + { + "a" + }, + language = "EN-US", + autoCompleteText = "Daemon, Freedom" + } + }) + + + --mobile side: expect SetGlobalProperties response + EXPECT_RESPONSE(cid, { success = false, resultCode = "REJECTED"}) + :Timeout(iTimeout) + + --mobile side: expect OnHashChange notification is not send to mobile + EXPECT_NOTIFICATION("OnHashChange") + :Times(0) + end + + + --End test case ResultCodeCheck.2.4 + ----------------------------------------------------------------------------------------- + + + --End test case ResultCodeCheck.2 + ----------------------------------------------------------------------------------------- + + --Begin test case ResultCodeCheck.3 + --Description: Check resultCode WARNINGS (true) + + --Requirement id in JAMA: SDLAQ-CRS-1330; APPLINK-15272 + + --Verification criteria: + --When "ttsChunks" are sent within the request but the type is different from "TEXT" , WARNINGS is returned as a result of request. Info parameter provides additional information about the case. General request result success=true in case of no errors from other components. + + --When "ttsChunks" are sent within the request but the type is different from "TEXT", WARNINGS is returned as a result of request. Info parameter provides additional information about the case. General request result success=false in case of TTS is the only component which processes in the request. + --[=[ TODO: Add TCs to cover the point (success=false) after question APPLINK-16277 resolved ]=] + + --SDL must send WARNINGS (success:true) to mobile app in case HMI respond WARNINGS at least to one HMI-portions + + function Test:SetGlobalProperties_resultCode_TTS_WARNINGS_true() + + --mobile side: sending SetGlobalProperties request + local cid = self.mobileSession:SendRPC("SetGlobalProperties", + { + menuTitle = "Menu Title", + timeoutPrompt = + { + { + text = "Timeout prompt", + type = "PRE_RECORDED" + } + }, + vrHelp = + { + { + position = 1, + image = + { + value = "action.png", + imageType = "DYNAMIC" + }, + text = "VR help item" + } + }, + menuIcon = + { + value = "action.png", + imageType = "DYNAMIC" + }, + helpPrompt = + { + { + text = "Help prompt", + type = "TEXT" + } + }, + vrHelpTitle = "VR help title", + keyboardProperties = + { + keyboardLayout = "QWERTY", + keypressMode = "SINGLE_KEYPRESS", + limitedCharacterList = + { + "a" + }, + language = "EN-US", + autoCompleteText = "Daemon, Freedom" + } + }) + + + --hmi side: expect TTS.SetGlobalProperties request + EXPECT_HMICALL("TTS.SetGlobalProperties", + { + timeoutPrompt = + { + { + text = "Timeout prompt", + type = "PRE_RECORDED" + } + }, + helpPrompt = + { + { + text = "Help prompt", + type = "TEXT" + } + } + }) + :Timeout(iTimeout) + :Do(function(_,data) + --hmi side: sending TTS.SetGlobalProperties response + self.hmiConnection:SendResponse(data.id, data.method, "WARNINGS", {}) + end) + + + + --hmi side: expect UI.SetGlobalProperties request + EXPECT_HMICALL("UI.SetGlobalProperties", + { + menuTitle = "Menu Title", + vrHelp = + { + { + position = 1, + --[=[ TODO: update after resolving APPLINK-16052 + + image = + { + imageType = "DYNAMIC", + value = strAppFolder .. "action.png" + },]=] + text = "VR help item" + } + }, + --checked below + -- menuIcon = + -- { + -- imageType = "DYNAMIC", + -- value = strAppFolder .. "action.png" + -- }, + vrHelpTitle = "VR help title", + keyboardProperties = + { + keyboardLayout = "QWERTY", + keypressMode = "SINGLE_KEYPRESS", + --[=[ TODO: update after resolving APPLINK-16047 + + limitedCharacterList = + { + "a" + },]=] + language = "EN-US", + autoCompleteText = "Daemon, Freedom" + } + }) + :Timeout(iTimeout) + :ValidIf(function(_,data) + return Check_menuIconParams(data) + end) + :Do(function(_,data) + --hmi side: sending UI.SetGlobalProperties response + self.hmiConnection:SendResponse(data.id, data.method, "SUCCESS", {}) + end) + + + + --mobile side: expect SetGlobalProperties response + EXPECT_RESPONSE(cid, { success = true, resultCode = "WARNINGS"}) + :Timeout(iTimeout) + + --mobile side: expect OnHashChange notification + EXPECT_NOTIFICATION("OnHashChange") + end + + function Test:SetGlobalProperties_resultCode_UI_WARNINGS_true() + + --mobile side: sending SetGlobalProperties request + local cid = self.mobileSession:SendRPC("SetGlobalProperties", + { + menuTitle = "Menu Title", + timeoutPrompt = + { + { + text = "Timeout prompt", + type = "PRE_RECORDED" + } + }, + vrHelp = + { + { + position = 1, + image = + { + value = "action.png", + imageType = "DYNAMIC" + }, + text = "VR help item" + } + }, + menuIcon = + { + value = "action.png", + imageType = "DYNAMIC" + }, + helpPrompt = + { + { + text = "Help prompt", + type = "TEXT" + } + }, + vrHelpTitle = "VR help title", + keyboardProperties = + { + keyboardLayout = "QWERTY", + keypressMode = "SINGLE_KEYPRESS", + limitedCharacterList = + { + "a" + }, + language = "EN-US", + autoCompleteText = "Daemon, Freedom" + } + }) + + + --hmi side: expect TTS.SetGlobalProperties request + EXPECT_HMICALL("TTS.SetGlobalProperties", + { + timeoutPrompt = + { + { + text = "Timeout prompt", + type = "PRE_RECORDED" + } + }, + helpPrompt = + { + { + text = "Help prompt", + type = "TEXT" + } + } + }) + :Timeout(iTimeout) + :Do(function(_,data) + --hmi side: sending TTS.SetGlobalProperties response + self.hmiConnection:SendResponse(data.id, data.method, "SUCCESS", {}) + end) + + + + --hmi side: expect UI.SetGlobalProperties request + EXPECT_HMICALL("UI.SetGlobalProperties", + { + menuTitle = "Menu Title", + vrHelp = + { + { + position = 1, + --[=[ TODO: update after resolving APPLINK-16052 + + image = + { + imageType = "DYNAMIC", + value = strAppFolder .. "action.png" + },]=] + text = "VR help item" + } + }, + --Checked below + -- menuIcon = + -- { + -- imageType = "DYNAMIC", + -- value = strAppFolder .. "action.png" + -- }, + vrHelpTitle = "VR help title", + keyboardProperties = + { + keyboardLayout = "QWERTY", + keypressMode = "SINGLE_KEYPRESS", + --[=[ TODO: update after resolving APPLINK-16047 + + limitedCharacterList = + { + "a" + },]=] + language = "EN-US", + autoCompleteText = "Daemon, Freedom" + } + }) + :Timeout(iTimeout) + :ValidIf(function(_,data) + return Check_menuIconParams(data) + end) + + :Do(function(_,data) + --hmi side: sending UI.SetGlobalProperties response + self.hmiConnection:SendResponse(data.id, data.method, "WARNINGS", {}) + end) + + + + --mobile side: expect SetGlobalProperties response + EXPECT_RESPONSE(cid, { success = true, resultCode = "WARNINGS"}) + :Timeout(iTimeout) + + --mobile side: expect OnHashChange notification + EXPECT_NOTIFICATION("OnHashChange") + end + + --End test case ResultCodeCheck.3 + ----------------------------------------------------------------------------------------- + + + + --Begin test case ResultCodeCheck.4 + --Description: Check resultCode UNSUPPORTED_RESOURCE + + --Requirement id in JAMA: SDLAQ-CRS-1329 + + --Verification criteria: SDL forwards UNSUPPORTED_RESOURCE to mobile + + --UI responses UNSUPPORTED_RESOURCE to SDL + function Test:SetGlobalProperties_UI_ResultCode_UNSUPPORTED_RESOURCE() + + --mobile side: sending SetGlobalProperties request + local cid = self.mobileSession:SendRPC("SetGlobalProperties", + { + menuTitle = "Menu Title", + timeoutPrompt = + { + { + text = "Timeout prompt", + type = "TEXT" + } + }, + vrHelp = + { + { + position = 1, + image = + { + value = "action.png", + imageType = "DYNAMIC" + }, + text = "VR help item" + } + }, + menuIcon = + { + value = "action.png", + imageType = "DYNAMIC" + }, + helpPrompt = + { + { + text = "Help prompt", + type = "TEXT" + } + }, + vrHelpTitle = "VR help title", + keyboardProperties = + { + keyboardLayout = "QWERTY", + keypressMode = "SINGLE_KEYPRESS", + limitedCharacterList = + { + "a" + }, + language = "EN-US", + autoCompleteText = "Daemon, Freedom" + } + }) + + + --hmi side: expect TTS.SetGlobalProperties request + EXPECT_HMICALL("TTS.SetGlobalProperties", + { + timeoutPrompt = + { + { + text = "Timeout prompt", + type = "TEXT" + } + }, + helpPrompt = + { + { + text = "Help prompt", + type = "TEXT" + } + } + }) + :Timeout(iTimeout) + :Do(function(_,data) + --hmi side: sending UI.SetGlobalProperties response + self.hmiConnection:SendResponse(data.id, data.method, "SUCCESS", {}) + end) + + + + --hmi side: expect UI.SetGlobalProperties request + EXPECT_HMICALL("UI.SetGlobalProperties", + { + menuTitle = "Menu Title", + vrHelp = + { + { + position = 1, + --[=[ TODO: update after resolving APPLINK-16052 + + image = + { + imageType = "DYNAMIC", + value = strAppFolder .. "action.png" + },]=] + text = "VR help item" + } + }, + --Checked below + -- menuIcon = + -- { + -- imageType = "DYNAMIC", + -- value = strAppFolder .. "action.png" + -- }, + vrHelpTitle = "VR help title", + keyboardProperties = + { + keyboardLayout = "QWERTY", + keypressMode = "SINGLE_KEYPRESS", + --[=[ TODO: update after resolving APPLINK-16047 + + limitedCharacterList = + { + "a" + },]=] + language = "EN-US", + autoCompleteText = "Daemon, Freedom" + } + }) + :Timeout(iTimeout) + :ValidIf(function(_,data) + return Check_menuIconParams(data) + end) + + :Do(function(_,data) + --hmi side: sending UI.SetGlobalProperties response + self.hmiConnection:SendResponse(data.id, data.method, "UNSUPPORTED_RESOURCE", {}) + end) + + + + --mobile side: expect SetGlobalProperties response + EXPECT_RESPONSE(cid, { success = true, resultCode = "UNSUPPORTED_RESOURCE"}) + :Timeout(iTimeout) + + --mobile side: expect OnHashChange notification + EXPECT_NOTIFICATION("OnHashChange") + end + + --TTS responses UNSUPPORTED_RESOURCE to SDL + function Test:SetGlobalProperties_TTS_ResultCode_UNSUPPORTED_RESOURCE() + + --mobile side: sending SetGlobalProperties request + local cid = self.mobileSession:SendRPC("SetGlobalProperties", + { + menuTitle = "Menu Title", + timeoutPrompt = + { + { + text = "Timeout prompt", + type = "TEXT" + } + }, + vrHelp = + { + { + position = 1, + image = + { + value = "action.png", + imageType = "DYNAMIC" + }, + text = "VR help item" + } + }, + menuIcon = + { + value = "action.png", + imageType = "DYNAMIC" + }, + helpPrompt = + { + { + text = "Help prompt", + type = "TEXT" + } + }, + vrHelpTitle = "VR help title", + keyboardProperties = + { + keyboardLayout = "QWERTY", + keypressMode = "SINGLE_KEYPRESS", + limitedCharacterList = + { + "a" + }, + language = "EN-US", + autoCompleteText = "Daemon, Freedom" + } + }) + + + --hmi side: expect TTS.SetGlobalProperties request + EXPECT_HMICALL("TTS.SetGlobalProperties", + { + timeoutPrompt = + { + { + text = "Timeout prompt", + type = "TEXT" + } + }, + helpPrompt = + { + { + text = "Help prompt", + type = "TEXT" + } + } + }) + :Timeout(iTimeout) + :Do(function(_,data) + --hmi side: sending UI.SetGlobalProperties response + self.hmiConnection:SendResponse(data.id, data.method, "UNSUPPORTED_RESOURCE", {}) + end) + + + + --hmi side: expect UI.SetGlobalProperties request + EXPECT_HMICALL("UI.SetGlobalProperties", + { + menuTitle = "Menu Title", + vrHelp = + { + { + position = 1, + --[=[ TODO: update after resolving APPLINK-16052 + + image = + { + imageType = "DYNAMIC", + value = strAppFolder .. "action.png" + },]=] + text = "VR help item" + } + }, + --Checked below + -- menuIcon = + -- { + -- imageType = "DYNAMIC", + -- value = strAppFolder .. "action.png" + -- }, + vrHelpTitle = "VR help title", + keyboardProperties = + { + keyboardLayout = "QWERTY", + keypressMode = "SINGLE_KEYPRESS", + --[=[ TODO: update after resolving APPLINK-16047 + + limitedCharacterList = + { + "a" + },]=] + language = "EN-US", + autoCompleteText = "Daemon, Freedom" + } + }) + :Timeout(iTimeout) + :ValidIf(function(_,data) + return Check_menuIconParams(data) + end) + + :Do(function(_,data) + --hmi side: sending UI.SetGlobalProperties response + self.hmiConnection:SendResponse(data.id, data.method, "SUCCESS", {}) + end) + + + + --mobile side: expect SetGlobalProperties response + EXPECT_RESPONSE(cid, { success = true, resultCode = "WARNINGS"}) + :Timeout(iTimeout) + + --mobile side: expect OnHashChange notification + EXPECT_NOTIFICATION("OnHashChange") + end + + --End test case ResultCodeCheck.4 + ----------------------------------------------------------------------------------------- + + + --Begin test case ResultCodeCheck.5 + --Description: Check resultCode DISALLOWED + + --Requirement id in JAMA: SDLAQ-CRS-392 + + --Verification criteria: + --1. SDL must return "resultCode: DISALLOWED, success:false" to the RPC in case this RPC is omitted in the PolicyTable group(s) assigned to the app that requests this RPC. + + --2. SDL must return "resultCode: DISALLOWED, success:false" to the RPC in case this RPC is included to the PolicyTable group(s) assigned to the app that requests this RPC and the group has not yet received user's consents. + + + --Begin test case ResultCodeCheck.5.1 + --Description: RPC is omitted in the PolicyTable group(s) assigned to the app + +--[[TODO: check after resolving APPLINK-13101 + --Description: Disallowed SetGlobalProperties + + --Precondition: Build policy table file + local PTName = testCasesForPolicyTable:createPolicyTableWithoutAPI(APIName) + + --Precondition: Update policy table + testCasesForPolicyTable:updatePolicy(PTName) + + function Test:SetGlobalProperties_resultCode_DISALLOWED() + + --mobile side: sending SetGlobalProperties request + local cid = self.mobileSession:SendRPC("SetGlobalProperties", + { + menuTitle = "Menu Title", + timeoutPrompt = + { + { + text = "Timeout prompt", + type = "PRE_RECORDED" + } + }, + vrHelp = + { + { + position = 1, + image = + { + value = "action.png", + imageType = "DYNAMIC" + }, + text = "VR help item" + } + }, + menuIcon = + { + value = "action.png", + imageType = "DYNAMIC" + }, + helpPrompt = + { + { + text = "Help prompt", + type = "TEXT" + } + }, + vrHelpTitle = "VR help title", + keyboardProperties = + { + keyboardLayout = "QWERTY", + keypressMode = "SINGLE_KEYPRESS", + limitedCharacterList = + { + "a" + }, + language = "EN-US", + autoCompleteText = "Daemon, Freedom" + } + }) + + + --mobile side: expect SetGlobalProperties response + EXPECT_RESPONSE(cid, { success = false, resultCode = "DISALLOWED"}) + :Timeout(iTimeout) + + --mobile side: expect OnHashChange notification is not send to mobile + EXPECT_NOTIFICATION("OnHashChange") + :Times(0) + end + + + --End test case ResultCodeCheck.5.1 + ----------------------------------------------------------------------------------------- + + --Begin test case ResultCodeCheck.5.2 + --Description: RPC is included to the PolicyTable group(s) assigned to the app. And the group has not yet received user's consents. + + --Precondition: Build policy table file + local HmiLevels = {"FULL", "LIMITED", "BACKGROUND"} + local PTName = testCasesForPolicyTable:createPolicyTable(APIName, HmiLevels) + + --Precondition: Update policy table + local groupID = testCasesForPolicyTable:updatePolicy(PTName, "group1") + + --Precondition: User does not allow function group + testCasesForPolicyTable:userConsent(groupID, "group1", false) + + --Description: Send SetGlobalProperties when user not allowed + function Test:SetGlobalProperties_resultCode_USER_DISALLOWED() + + --mobile side: sending SetGlobalProperties request + local cid = self.mobileSession:SendRPC("SetGlobalProperties", + { + menuTitle = "Menu Title", + timeoutPrompt = + { + { + text = "Timeout prompt", + type = "PRE_RECORDED" + } + }, + vrHelp = + { + { + position = 1, + image = + { + value = "action.png", + imageType = "DYNAMIC" + }, + text = "VR help item" + } + }, + menuIcon = + { + value = "action.png", + imageType = "DYNAMIC" + }, + helpPrompt = + { + { + text = "Help prompt", + type = "TEXT" + } + }, + vrHelpTitle = "VR help title", + keyboardProperties = + { + keyboardLayout = "QWERTY", + keypressMode = "SINGLE_KEYPRESS", + limitedCharacterList = + { + "a" + }, + language = "EN-US", + autoCompleteText = "Daemon, Freedom" + } + }) + + + --mobile side: expect SetGlobalProperties response + EXPECT_RESPONSE(cid, { success = false, resultCode = "USER_DISALLOWED"}) + :Timeout(iTimeout) + + --mobile side: expect OnHashChange notification is not send to mobile + EXPECT_NOTIFICATION("OnHashChange") + :Times(0) + end + + + --Postcondition: User allows function group + testCasesForPolicyTable:userConsent(groupID, "group1", true) + + --End test case ResultCodeCheck.5.2 + ----------------------------------------------------------------------------------------- +]] + + + --End test case ResultCodeCheck.5 + ----------------------------------------------------------------------------------------- + + + + +---------------------------------------------------------------------------------------------- +-----------------------------------------V TEST BLOCK----------------------------------------- +---------------------------------------HMI negative cases------------------------------------- +---------------------------------------------------------------------------------------------- + + --------Checks----------- + -- requests without responses from HMI + -- invalid structure of response + -- several responses from HMI to one request + -- fake parameters + -- HMI correlation id check + -- wrong response with correct HMI correlation id + + +--Begin test case HMINegativeCheck +--Description: Check HMI negative cases + + --Requirement id in JAMA: SDLAQ-CRS-12 + + --Verification criteria: The response contains 2 mandatory parameters "success" and "resultCode", "info" is sent if there is any additional information about the resultCode. + + + --Begin test case HMINegativeCheck.1 + --Description: Check SetGlobalProperties requests without UI responses from HMI + + function Test:SetGlobalProperties_RequestWithoutUIResponsesFromHMI() + + --mobile side: sending SetGlobalProperties request + local cid = self.mobileSession:SendRPC("SetGlobalProperties", + { + menuTitle = "Menu Title", + timeoutPrompt = + { + { + text = "Timeout prompt", + type = "TEXT" + } + }, + vrHelp = + { + { + position = 1, + image = + { + value = "action.png", + imageType = "DYNAMIC" + }, + text = "VR help item" + } + }, + menuIcon = + { + value = "action.png", + imageType = "DYNAMIC" + }, + helpPrompt = + { + { + text = "Help prompt", + type = "TEXT" + } + }, + vrHelpTitle = "VR help title", + keyboardProperties = + { + keyboardLayout = "QWERTY", + keypressMode = "SINGLE_KEYPRESS", + limitedCharacterList = + { + "a" + }, + language = "EN-US", + autoCompleteText = "Daemon, Freedom" + } + }) + + + --hmi side: expect TTS.SetGlobalProperties request + EXPECT_HMICALL("TTS.SetGlobalProperties", + { + timeoutPrompt = + { + { + text = "Timeout prompt", + type = "TEXT" + } + }, + helpPrompt = + { + { + text = "Help prompt", + type = "TEXT" + } + } + }) + :Timeout(iTimeout) + :Do(function(_,data) + --hmi side: sending UI.SetGlobalProperties response + self.hmiConnection:SendResponse(data.id, data.method, "SUCCESS", {}) + end) + + + --hmi side: expect UI.SetGlobalProperties request + EXPECT_HMICALL("UI.SetGlobalProperties", + { + menuTitle = "Menu Title", + vrHelp = + { + { + position = 1, + --[=[ TODO: update after resolving APPLINK-16052 + + image = + { + imageType = "DYNAMIC", + value = strAppFolder .. "action.png" + },]=] + text = "VR help item" + } + }, + --Checked below + -- menuIcon = + -- { + -- imageType = "DYNAMIC", + -- value = strAppFolder .. "action.png" + -- }, + vrHelpTitle = "VR help title", + keyboardProperties = + { + keyboardLayout = "QWERTY", + keypressMode = "SINGLE_KEYPRESS", + --[=[ TODO: update after resolving APPLINK-16047 + + limitedCharacterList = + { + "a" + },]=] + language = "EN-US", + autoCompleteText = "Daemon, Freedom" + } + }) + :Timeout(iTimeout) + :ValidIf(function(_,data) + return Check_menuIconParams(data) + end) + :Do(function(_,data) + --hmi side: sending UI.SetGlobalProperties response + --self.hmiConnection:SendResponse(data.id, data.method, "SUCCESS", {}) + end) + + --mobile side: expect SetGlobalProperties response + EXPECT_RESPONSE(cid, { success = false, resultCode = "GENERIC_ERROR", info = nil}) + :Timeout(12000) + + --mobile side: expect OnHashChange notification is not send to mobile + EXPECT_NOTIFICATION("OnHashChange") + :Times(0) + :Timeout(12000) + end + + --End test case HMINegativeCheck.1 + ----------------------------------------------------------------------------------------- + + --Begin test case HMINegativeCheck.2 + --Description: Check SetGlobalProperties requests without TTS responses from HMI + + function Test:SetGlobalProperties_RequestWithoutTTSResponsesFromHMI() + + --mobile side: sending SetGlobalProperties request + local cid = self.mobileSession:SendRPC("SetGlobalProperties", + { + menuTitle = "Menu Title", + timeoutPrompt = + { + { + text = "Timeout prompt", + type = "TEXT" + } + }, + vrHelp = + { + { + position = 1, + image = + { + value = "action.png", + imageType = "DYNAMIC" + }, + text = "VR help item" + } + }, + menuIcon = + { + value = "action.png", + imageType = "DYNAMIC" + }, + helpPrompt = + { + { + text = "Help prompt", + type = "TEXT" + } + }, + vrHelpTitle = "VR help title", + keyboardProperties = + { + keyboardLayout = "QWERTY", + keypressMode = "SINGLE_KEYPRESS", + limitedCharacterList = + { + "a" + }, + language = "EN-US", + autoCompleteText = "Daemon, Freedom" + } + }) + + + + --hmi side: expect TTS.SetGlobalProperties request + EXPECT_HMICALL("TTS.SetGlobalProperties", + { + timeoutPrompt = + { + { + text = "Timeout prompt", + type = "TEXT" + } + }, + helpPrompt = + { + { + text = "Help prompt", + type = "TEXT" + } + } + }) + :Timeout(iTimeout) + :Do(function(_,data) + --hmi side: sending UI.SetGlobalProperties response + --self.hmiConnection:SendResponse(data.id, data.method, "SUCCESS", {}) + end) + + + --hmi side: expect UI.SetGlobalProperties request + EXPECT_HMICALL("UI.SetGlobalProperties", + { + menuTitle = "Menu Title", + vrHelp = + { + { + position = 1, + --[=[ TODO: update after resolving APPLINK-16052 + + image = + { + imageType = "DYNAMIC", + value = strAppFolder .. "action.png" + },]=] + text = "VR help item" + } + }, + --Checked below + -- menuIcon = + -- { + -- imageType = "DYNAMIC", + -- value = strAppFolder .. "action.png" + -- }, + vrHelpTitle = "VR help title", + keyboardProperties = + { + keyboardLayout = "QWERTY", + keypressMode = "SINGLE_KEYPRESS", + --[=[ TODO: update after resolving APPLINK-16047 + + limitedCharacterList = + { + "a" + },]=] + language = "EN-US", + autoCompleteText = "Daemon, Freedom" + } + }) + :Timeout(iTimeout) + :ValidIf(function(_,data) + return Check_menuIconParams(data) + end) + :Do(function(_,data) + --hmi side: sending UI.SetGlobalProperties response + self.hmiConnection:SendResponse(data.id, data.method, "SUCCESS", {}) + end) + + + + --mobile side: expect SetGlobalProperties response + EXPECT_RESPONSE(cid, { success = false, resultCode = "GENERIC_ERROR", info = nil}) + :Timeout(12000) + + --mobile side: expect OnHashChange notification is not send to mobile + EXPECT_NOTIFICATION("OnHashChange") + :Times(0) + :Timeout(12000) + end + + --End test case HMINegativeCheck.2 + ----------------------------------------------------------------------------------------- + + --Begin test case HMINegativeCheck.3 + --Description: Check SetGlobalProperties requests without responses from HMI + + function Test:SetGlobalProperties_RequestWithoutResponsesFromHMI() + + --mobile side: sending SetGlobalProperties request + local cid = self.mobileSession:SendRPC("SetGlobalProperties", + { + menuTitle = "Menu Title", + timeoutPrompt = + { + { + text = "Timeout prompt", + type = "TEXT" + } + }, + vrHelp = + { + { + position = 1, + image = + { + value = "action.png", + imageType = "DYNAMIC" + }, + text = "VR help item" + } + }, + menuIcon = + { + value = "action.png", + imageType = "DYNAMIC" + }, + helpPrompt = + { + { + text = "Help prompt", + type = "TEXT" + } + }, + vrHelpTitle = "VR help title", + keyboardProperties = + { + keyboardLayout = "QWERTY", + keypressMode = "SINGLE_KEYPRESS", + limitedCharacterList = + { + "a" + }, + language = "EN-US", + autoCompleteText = "Daemon, Freedom" + } + }) + + + --mobile side: expect SetGlobalProperties response + EXPECT_RESPONSE(cid, { success = false, resultCode = "GENERIC_ERROR", info = nil}) + :Timeout(12000) + + --mobile side: expect OnHashChange notification is not send to mobile + EXPECT_NOTIFICATION("OnHashChange") + :Times(0) + :Timeout(12000) + end + + --End test case HMINegativeCheck.3 + ----------------------------------------------------------------------------------------- + + --Begin test case HMINegativeCheck.4 + --Description: Check responses from HMI (UI) with invalid structure + +--[[TODO update after resolving APPLINK-14765 + + --Requirement id in JAMA: + --SDLAQ-CRS-11 + + --Verification criteria: + + function Test:SetGlobalProperties_UI_InvalidStructureOfResponse() + + --mobile side: sending SetGlobalProperties request + local cid = self.mobileSession:SendRPC("SetGlobalProperties", + { + menuTitle = "Menu Title", + timeoutPrompt = + { + { + text = "Timeout prompt", + type = "TEXT" + } + }, + vrHelp = + { + { + position = 1, + image = + { + value = "action.png", + imageType = "DYNAMIC" + }, + text = "VR help item" + } + }, + menuIcon = + { + value = "action.png", + imageType = "DYNAMIC" + }, + helpPrompt = + { + { + text = "Help prompt", + type = "TEXT" + } + }, + vrHelpTitle = "VR help title", + keyboardProperties = + { + keyboardLayout = "QWERTY", + keypressMode = "SINGLE_KEYPRESS", + limitedCharacterList = + { + "a" + }, + language = "EN-US", + autoCompleteText = "Daemon, Freedom" + } + }) + + + --hmi side: expect TTS.SetGlobalProperties request + EXPECT_HMICALL("TTS.SetGlobalProperties", + { + timeoutPrompt = + { + { + text = "Timeout prompt", + type = "TEXT" + } + }, + helpPrompt = + { + { + text = "Help prompt", + type = "TEXT" + } + } + }) + :Timeout(iTimeout) + :Do(function(_,data) + --hmi side: sending UI.SetGlobalProperties response + self.hmiConnection:SendResponse(data.id, data.method, "SUCCESS", {}) + end) + + + + --hmi side: expect UI.SetGlobalProperties request + EXPECT_HMICALL("UI.SetGlobalProperties", + { + menuTitle = "Menu Title", + vrHelp = + { + { + position = 1, + --[=[ TODO: update after resolving APPLINK-16052 + + image = + { + imageType = "DYNAMIC", + value = strAppFolder .. "action.png" + },]=] + text = "VR help item" + } + }, + menuIcon = + { + imageType = "DYNAMIC", + value = strAppFolder .. "action.png" + }, + vrHelpTitle = "VR help title", + keyboardProperties = + { + keyboardLayout = "QWERTY", + keypressMode = "SINGLE_KEYPRESS", + --[=[ TODO: update after resolving APPLINK-16047 + + limitedCharacterList = + { + "a" + },]=] + language = "EN-US", + autoCompleteText = "Daemon, Freedom" + } + }) + :Timeout(iTimeout) + :Do(function(_,data) + --hmi side: sending UI.SetGlobalProperties response + self.hmiConnection:Send('{"id":'..tostring(data.id)..',"jsonrpc":"2.0", "code":0, "result":{"method":"UI.SetGlobalProperties"}}') + end) + + + + --mobile side: expect SetGlobalProperties response + EXPECT_RESPONSE(cid, { success = false, resultCode = "INVALID_DATA"}) + :Timeout(iTimeout) + + --mobile side: expect OnHashChange notification is not send to mobile + EXPECT_NOTIFICATION("OnHashChange") + :Times(0) + end + + --End test case HMINegativeCheck.4 + ----------------------------------------------------------------------------------------- + + --Begin test case HMINegativeCheck.5 + --Description: Check responses from HMI (TTS) with invalid structure + + --Requirement id in JAMA: + --SDLAQ-CRS-11 + + --Verification criteria: + + function Test:SetGlobalProperties_TTS_InvalidStructureOfResponse() + + --mobile side: sending SetGlobalProperties request + local cid = self.mobileSession:SendRPC("SetGlobalProperties", + { + menuTitle = "Menu Title", + timeoutPrompt = + { + { + text = "Timeout prompt", + type = "TEXT" + } + }, + vrHelp = + { + { + position = 1, + image = + { + value = "action.png", + imageType = "DYNAMIC" + }, + text = "VR help item" + } + }, + menuIcon = + { + value = "action.png", + imageType = "DYNAMIC" + }, + helpPrompt = + { + { + text = "Help prompt", + type = "TEXT" + } + }, + vrHelpTitle = "VR help title", + keyboardProperties = + { + keyboardLayout = "QWERTY", + keypressMode = "SINGLE_KEYPRESS", + limitedCharacterList = + { + "a" + }, + language = "EN-US", + autoCompleteText = "Daemon, Freedom" + } + }) + + + --hmi side: expect TTS.SetGlobalProperties request + EXPECT_HMICALL("TTS.SetGlobalProperties", + { + timeoutPrompt = + { + { + text = "Timeout prompt", + type = "TEXT" + } + }, + helpPrompt = + { + { + text = "Help prompt", + type = "TEXT" + } + } + }) + :Timeout(iTimeout) + :Do(function(_,data) + --hmi side: sending UI.SetGlobalProperties response + self.hmiConnection:Send('{"id":'..tostring(data.id)..',"jsonrpc":"2.0", "code":0, "result":{"method":"TTS.SetGlobalProperties"}}') + end) + + + + --hmi side: expect UI.SetGlobalProperties request + EXPECT_HMICALL("UI.SetGlobalProperties", + { + menuTitle = "Menu Title", + vrHelp = + { + { + position = 1, + --[=[ TODO: update after resolving APPLINK-16052 + + image = + { + imageType = "DYNAMIC", + value = strAppFolder .. "action.png" + },]=] + text = "VR help item" + } + }, + menuIcon = + { + imageType = "DYNAMIC", + value = strAppFolder .. "action.png" + }, + vrHelpTitle = "VR help title", + keyboardProperties = + { + keyboardLayout = "QWERTY", + keypressMode = "SINGLE_KEYPRESS", + --[=[ TODO: update after resolving APPLINK-16047 + + limitedCharacterList = + { + "a" + },]=] + language = "EN-US", + autoCompleteText = "Daemon, Freedom" + } + }) + :Timeout(iTimeout) + :Do(function(_,data) + --hmi side: sending UI.SetGlobalProperties response + self.hmiConnection:SendResponse(data.id, data.method, "SUCCESS", {}) + end) + + + + --mobile side: expect SetGlobalProperties response + EXPECT_RESPONSE(cid, { success = false, resultCode = "INVALID_DATA"}) + :Timeout(iTimeout) + + --mobile side: expect OnHashChange notification is not send to mobile + EXPECT_NOTIFICATION("OnHashChange") + :Times(0) + end + + --End test case HMINegativeCheck.5 + ]] + ----------------------------------------------------------------------------------------- + + --Begin test case HMINegativeCheck.6 + --Description: Check several responses from HMI (UI) to one request + + function Test:SetGlobalProperties_UI_SeveralResponseToOneRequest() + + --mobile side: sending SetGlobalProperties request + local cid = self.mobileSession:SendRPC("SetGlobalProperties", + { + menuTitle = "Menu Title", + timeoutPrompt = + { + { + text = "Timeout prompt", + type = "TEXT" + } + }, + vrHelp = + { + { + position = 1, + image = + { + value = "action.png", + imageType = "DYNAMIC" + }, + text = "VR help item" + } + }, + menuIcon = + { + value = "action.png", + imageType = "DYNAMIC" + }, + helpPrompt = + { + { + text = "Help prompt", + type = "TEXT" + } + }, + vrHelpTitle = "VR help title", + keyboardProperties = + { + keyboardLayout = "QWERTY", + keypressMode = "SINGLE_KEYPRESS", + limitedCharacterList = + { + "a" + }, + language = "EN-US", + autoCompleteText = "Daemon, Freedom" + } + }) + + + --hmi side: expect TTS.SetGlobalProperties request + EXPECT_HMICALL("TTS.SetGlobalProperties", + { + timeoutPrompt = + { + { + text = "Timeout prompt", + type = "TEXT" + } + }, + helpPrompt = + { + { + text = "Help prompt", + type = "TEXT" + } + } + }) + :Timeout(iTimeout) + :Do(function(_,data) + --hmi side: sending UI.SetGlobalProperties response + self.hmiConnection:SendResponse(data.id, data.method, "SUCCESS", {}) + end) + + + + --hmi side: expect UI.SetGlobalProperties request + EXPECT_HMICALL("UI.SetGlobalProperties", + { + menuTitle = "Menu Title", + vrHelp = + { + { + position = 1, + --[=[ TODO: update after resolving APPLINK-16052 + + image = + { + imageType = "DYNAMIC", + value = strAppFolder .. "action.png" + },]=] + text = "VR help item" + } + }, + --Checked below + -- menuIcon = + -- { + -- imageType = "DYNAMIC", + -- value = strAppFolder .. "action.png" + -- }, + vrHelpTitle = "VR help title", + keyboardProperties = + { + keyboardLayout = "QWERTY", + keypressMode = "SINGLE_KEYPRESS", + --[=[ TODO: update after resolving APPLINK-16047 + + limitedCharacterList = + { + "a" + },]=] + language = "EN-US", + autoCompleteText = "Daemon, Freedom" + } + }) + :Timeout(iTimeout) + :ValidIf(function(_,data) + return Check_menuIconParams(data) + end) + :Do(function(_,data) + + --hmi side: sending UI.SetGlobalProperties response + self.hmiConnection:SendResponse(data.id, data.method, "INVALID_DATA", {}) + self.hmiConnection:SendResponse(data.id, data.method, "SUCCESS", {}) + end) + + + + --mobile side: expect SetGlobalProperties response + EXPECT_RESPONSE(cid, { success = false, resultCode = "INVALID_DATA"}) + :Timeout(iTimeout) + + --mobile side: expect OnHashChange notification is not send to mobile + EXPECT_NOTIFICATION("OnHashChange") + :Times(0) + end + + --End test case HMINegativeCheck.6 + ----------------------------------------------------------------------------------------- + + --Begin test case HMINegativeCheck.7 + --Description: Check several responses from HMI (TTS) to one request + + function Test:SetGlobalProperties_TTS_SeveralResponseToOneRequest() + + --mobile side: sending SetGlobalProperties request + local cid = self.mobileSession:SendRPC("SetGlobalProperties", + { + menuTitle = "Menu Title", + timeoutPrompt = + { + { + text = "Timeout prompt", + type = "TEXT" + } + }, + vrHelp = + { + { + position = 1, + image = + { + value = "action.png", + imageType = "DYNAMIC" + }, + text = "VR help item" + } + }, + menuIcon = + { + value = "action.png", + imageType = "DYNAMIC" + }, + helpPrompt = + { + { + text = "Help prompt", + type = "TEXT" + } + }, + vrHelpTitle = "VR help title", + keyboardProperties = + { + keyboardLayout = "QWERTY", + keypressMode = "SINGLE_KEYPRESS", + limitedCharacterList = + { + "a" + }, + language = "EN-US", + autoCompleteText = "Daemon, Freedom" + } + }) + + + --hmi side: expect TTS.SetGlobalProperties request + EXPECT_HMICALL("TTS.SetGlobalProperties", + { + timeoutPrompt = + { + { + text = "Timeout prompt", + type = "TEXT" + } + }, + helpPrompt = + { + { + text = "Help prompt", + type = "TEXT" + } + } + }) + :Timeout(iTimeout) + :Do(function(_,data) + --hmi side: sending UI.SetGlobalProperties response + self.hmiConnection:SendResponse(data.id, data.method, "INVALID_DATA", {}) + self.hmiConnection:SendResponse(data.id, data.method, "SUCCESS", {}) + end) + + + + --hmi side: expect UI.SetGlobalProperties request + EXPECT_HMICALL("UI.SetGlobalProperties", + { + menuTitle = "Menu Title", + vrHelp = + { + { + position = 1, + --[=[ TODO: update after resolving APPLINK-16052 + + image = + { + imageType = "DYNAMIC", + value = strAppFolder .. "action.png" + },]=] + text = "VR help item" + } + }, + --Checked below + -- menuIcon = + -- { + -- imageType = "DYNAMIC", + -- value = strAppFolder .. "action.png" + -- }, + vrHelpTitle = "VR help title", + keyboardProperties = + { + keyboardLayout = "QWERTY", + keypressMode = "SINGLE_KEYPRESS", + --[=[ TODO: update after resolving APPLINK-16047 + + limitedCharacterList = + { + "a" + },]=] + language = "EN-US", + autoCompleteText = "Daemon, Freedom" + } + }) + :Timeout(iTimeout) + :ValidIf(function(_,data) + return Check_menuIconParams(data) + end) + :Do(function(_,data) + --hmi side: sending UI.SetGlobalProperties response + self.hmiConnection:SendResponse(data.id, data.method, "SUCCESS", {}) + end) + + + + --mobile side: expect SetGlobalProperties response + EXPECT_RESPONSE(cid, { success = false, resultCode = "INVALID_DATA"}) + :Timeout(iTimeout) + + --mobile side: expect OnHashChange notification is not send to mobile + EXPECT_NOTIFICATION("OnHashChange") + :Times(0) + end + + --End test case HMINegativeCheck.7 + ----------------------------------------------------------------------------------------- +--[[TODO: update after resolving APPLINK-14765 + --Begin test case HMINegativeCheck.8 + --Description: Check responses from HMI (UI) with fake parameter + + --Requirement id in JAMA: + --SDLAQ-CRS-11 + + --Verification criteria: + --SetGlobalProperties request ... + + function Test:SetGlobalProperties_UI_ResponseWithFakeParamater() + + --mobile side: sending SetGlobalProperties request + local cid = self.mobileSession:SendRPC("SetGlobalProperties", + { + menuTitle = "Menu Title", + timeoutPrompt = + { + { + text = "Timeout prompt", + type = "TEXT" + } + }, + vrHelp = + { + { + position = 1, + image = + { + value = "action.png", + imageType = "DYNAMIC" + }, + text = "VR help item" + } + }, + menuIcon = + { + value = "action.png", + imageType = "DYNAMIC" + }, + helpPrompt = + { + { + text = "Help prompt", + type = "TEXT" + } + }, + vrHelpTitle = "VR help title", + keyboardProperties = + { + keyboardLayout = "QWERTY", + keypressMode = "SINGLE_KEYPRESS", + limitedCharacterList = + { + "a" + }, + language = "EN-US", + autoCompleteText = "Daemon, Freedom" + } + }) + + + --hmi side: expect TTS.SetGlobalProperties request + EXPECT_HMICALL("TTS.SetGlobalProperties", + { + timeoutPrompt = + { + { + text = "Timeout prompt", + type = "TEXT" + } + }, + helpPrompt = + { + { + text = "Help prompt", + type = "TEXT" + } + } + }) + :Timeout(iTimeout) + :Do(function(_,data) + --hmi side: sending UI.SetGlobalProperties response + self.hmiConnection:SendResponse(data.id, data.method, "SUCCESS", {}) + end) + + + + --hmi side: expect UI.SetGlobalProperties request + EXPECT_HMICALL("UI.SetGlobalProperties", + { + menuTitle = "Menu Title", + vrHelp = + { + { + position = 1, + --[=[ TODO: update after resolving APPLINK-16052 + + image = + { + imageType = "DYNAMIC", + value = strAppFolder .. "action.png" + },]=] + text = "VR help item" + } + }, + menuIcon = + { + imageType = "DYNAMIC", + value = strAppFolder .. "action.png" + }, + vrHelpTitle = "VR help title", + keyboardProperties = + { + keyboardLayout = "QWERTY", + keypressMode = "SINGLE_KEYPRESS", + --[=[ TODO: update after resolving APPLINK-16047 + + limitedCharacterList = + { + "a" + },]=] + language = "EN-US", + autoCompleteText = "Daemon, Freedom" + } + }) + :Timeout(iTimeout) + :Do(function(_,data) + --hmi side: sending UI.SetGlobalProperties response + self.hmiConnection:Send('{"id":'..tostring(data.id)..',"jsonrpc":"2.0","result":{"code":0, "fakeParam":0, "method":"UI.SetGlobalProperties"}}') + end) + + + + --mobile side: expect SetGlobalProperties response + EXPECT_RESPONSE(cid, { success = true, resultCode = "SUCCESS"}) + :Timeout(iTimeout) + + --mobile side: expect OnHashChange notification + EXPECT_NOTIFICATION("OnHashChange") + end + + --End test case HMINegativeCheck.8 + ----------------------------------------------------------------------------------------- + + --Begin test case HMINegativeCheck.9 + --Description: Check responses from HMI (TTS) with fake parameter + + --Requirement id in JAMA: + --SDLAQ-CRS-11 + + --Verification criteria: + --SetGlobalProperties request ... + + function Test:SetGlobalProperties_TTS_ResponseWithFakeParamater() + + --mobile side: sending SetGlobalProperties request + local cid = self.mobileSession:SendRPC("SetGlobalProperties", + { + menuTitle = "Menu Title", + timeoutPrompt = + { + { + text = "Timeout prompt", + type = "TEXT" + } + }, + vrHelp = + { + { + position = 1, + image = + { + value = "action.png", + imageType = "DYNAMIC" + }, + text = "VR help item" + } + }, + menuIcon = + { + value = "action.png", + imageType = "DYNAMIC" + }, + helpPrompt = + { + { + text = "Help prompt", + type = "TEXT" + } + }, + vrHelpTitle = "VR help title", + keyboardProperties = + { + keyboardLayout = "QWERTY", + keypressMode = "SINGLE_KEYPRESS", + limitedCharacterList = + { + "a" + }, + language = "EN-US", + autoCompleteText = "Daemon, Freedom" + } + }) + + + --hmi side: expect TTS.SetGlobalProperties request + EXPECT_HMICALL("TTS.SetGlobalProperties", + { + timeoutPrompt = + { + { + text = "Timeout prompt", + type = "TEXT" + } + }, + helpPrompt = + { + { + text = "Help prompt", + type = "TEXT" + } + } + }) + :Timeout(iTimeout) + :Do(function(_,data) + --hmi side: sending UI.SetGlobalProperties response + self.hmiConnection:Send('{"id":'..tostring(data.id)..',"jsonrpc":"2.0","result":{"code":0, "fakeParam":0, "method":"TTS.SetGlobalProperties"}}') + end) + + + + --hmi side: expect UI.SetGlobalProperties request + EXPECT_HMICALL("UI.SetGlobalProperties", + { + menuTitle = "Menu Title", + vrHelp = + { + { + position = 1, + --[=[ TODO: update after resolving APPLINK-16052 + + image = + { + imageType = "DYNAMIC", + value = strAppFolder .. "action.png" + },]=] + text = "VR help item" + } + }, + menuIcon = + { + imageType = "DYNAMIC", + value = strAppFolder .. "action.png" + }, + vrHelpTitle = "VR help title", + keyboardProperties = + { + keyboardLayout = "QWERTY", + keypressMode = "SINGLE_KEYPRESS", + --[=[ TODO: update after resolving APPLINK-16047 + + limitedCharacterList = + { + "a" + },]=] + language = "EN-US", + autoCompleteText = "Daemon, Freedom" + } + }) + :Timeout(iTimeout) + :Do(function(_,data) + --hmi side: sending UI.SetGlobalProperties response + self.hmiConnection:SendResponse(data.id, data.method, "SUCCESS", {}) + end) + + + + --mobile side: expect SetGlobalProperties response + EXPECT_RESPONSE(cid, { success = false, resultCode = "INVALID_DATA"}) + :Timeout(iTimeout) + + --mobile side: expect OnHashChange notification is not send to mobile + EXPECT_NOTIFICATION("OnHashChange") + :Times(0) + end + + --End test case HMINegativeCheck.9 + ----------------------------------------------------------------------------------------- + +]]-- + --Begin test case HMINegativeCheck.10 + --Description: Check UI wrong response with correct HMI correlation id + + --Requirement id in JAMA: SDLAQ-CRS-12 + + --Verification criteria: The response contains 2 mandatory parameters "success" and "resultCode", "info" is sent if there is any additional information about the resultCode. + + function Test:SetGlobalProperties_UI_WrongResponse_WithCorrectHMICorrelationID() + + --mobile side: sending SetGlobalProperties request + local cid = self.mobileSession:SendRPC("SetGlobalProperties", + { + menuTitle = "Menu Title", + timeoutPrompt = + { + { + text = "Timeout prompt", + type = "TEXT" + } + }, + vrHelp = + { + { + position = 1, + image = + { + value = "action.png", + imageType = "DYNAMIC" + }, + text = "VR help item" + } + }, + menuIcon = + { + value = "action.png", + imageType = "DYNAMIC" + }, + helpPrompt = + { + { + text = "Help prompt", + type = "TEXT" + } + }, + vrHelpTitle = "VR help title", + keyboardProperties = + { + keyboardLayout = "QWERTY", + keypressMode = "SINGLE_KEYPRESS", + limitedCharacterList = + { + "a" + }, + language = "EN-US", + autoCompleteText = "Daemon, Freedom" + } + }) + + + --hmi side: expect TTS.SetGlobalProperties request + EXPECT_HMICALL("TTS.SetGlobalProperties", + { + timeoutPrompt = + { + { + text = "Timeout prompt", + type = "TEXT" + } + }, + helpPrompt = + { + { + text = "Help prompt", + type = "TEXT" + } + } + }) + :Timeout(iTimeout) + :Do(function(_,data) + --hmi side: sending TTS.SetGlobalProperties response + self.hmiConnection:SendResponse(data.id, data.method, "SUCCESS", {}) + end) + + + + --hmi side: expect UI.SetGlobalProperties request + EXPECT_HMICALL("UI.SetGlobalProperties", + { + menuTitle = "Menu Title", + vrHelp = + { + { + position = 1, + --[=[ TODO: update after resolving APPLINK-16052 + + image = + { + imageType = "DYNAMIC", + value = strAppFolder .. "action.png" + },]=] + text = "VR help item" + } + }, + --Checked below + -- menuIcon = + -- { + -- imageType = "DYNAMIC", + -- value = strAppFolder .. "action.png" + -- }, + vrHelpTitle = "VR help title", + keyboardProperties = + { + keyboardLayout = "QWERTY", + keypressMode = "SINGLE_KEYPRESS", + --[=[ TODO: update after resolving APPLINK-16047 + + limitedCharacterList = + { + "a" + },]=] + language = "EN-US", + autoCompleteText = "Daemon, Freedom" + } + }) + :ValidIf(function(_,data) + return Check_menuIconParams(data) + end) + :Do(function(_,data) + --hmi side: sending UI.SetGlobalProperties response + self.hmiConnection:SendResponse(data.id, "UI.Show", "SUCCESS", {}) + end) + + + + --mobile side: expect SetGlobalProperties response + EXPECT_RESPONSE(cid, { success = false, resultCode = "GENERIC_ERROR"}) + :Timeout(12000) + + --mobile side: expect OnHashChange notification is not send to mobile + EXPECT_NOTIFICATION("OnHashChange") + :Times(0) + :Timeout(12000) + end + + --End test case HMINegativeCheck.10 + ----------------------------------------------------------------------------------------- + + --Begin test case HMINegativeCheck.11 + --Description: Check TTS wrong response with correct HMI correlation id + + --Requirement id in JAMA: SDLAQ-CRS-12 + + --Verification criteria: The response contains 2 mandatory parameters "success" and "resultCode", "info" is sent if there is any additional information about the resultCode. + + function Test:SetGlobalProperties_TTS_WrongResponse_WithCorrectHMICorrelationID() + + --mobile side: sending SetGlobalProperties request + local cid = self.mobileSession:SendRPC("SetGlobalProperties", + { + menuTitle = "Menu Title", + timeoutPrompt = + { + { + text = "Timeout prompt", + type = "TEXT" + } + }, + vrHelp = + { + { + position = 1, + image = + { + value = "action.png", + imageType = "DYNAMIC" + }, + text = "VR help item" + } + }, + menuIcon = + { + value = "action.png", + imageType = "DYNAMIC" + }, + helpPrompt = + { + { + text = "Help prompt", + type = "TEXT" + } + }, + vrHelpTitle = "VR help title", + keyboardProperties = + { + keyboardLayout = "QWERTY", + keypressMode = "SINGLE_KEYPRESS", + limitedCharacterList = + { + "a" + }, + language = "EN-US", + autoCompleteText = "Daemon, Freedom" + } + }) + + + --hmi side: expect TTS.SetGlobalProperties request + EXPECT_HMICALL("TTS.SetGlobalProperties", + { + timeoutPrompt = + { + { + text = "Timeout prompt", + type = "TEXT" + } + }, + helpPrompt = + { + { + text = "Help prompt", + type = "TEXT" + } + } + }) + :Timeout(iTimeout) + :Do(function(_,data) + --hmi side: sending UI.SetGlobalProperties response + self.hmiConnection:SendResponse(data.id, "TTS.Speak", "SUCCESS", {}) + end) + + + + --hmi side: expect UI.SetGlobalProperties request + EXPECT_HMICALL("UI.SetGlobalProperties", + { + menuTitle = "Menu Title", + vrHelp = + { + { + position = 1, + --[=[ TODO: update after resolving APPLINK-16052 + + image = + { + imageType = "DYNAMIC", + value = strAppFolder .. "action.png" + },]=] + text = "VR help item" + } + }, + --Checked below + -- menuIcon = + -- { + -- imageType = "DYNAMIC", + -- value = strAppFolder .. "action.png" + -- }, + vrHelpTitle = "VR help title", + keyboardProperties = + { + keyboardLayout = "QWERTY", + keypressMode = "SINGLE_KEYPRESS", + --[=[ TODO: update after resolving APPLINK-16047 + + limitedCharacterList = + { + "a" + },]=] + language = "EN-US", + autoCompleteText = "Daemon, Freedom" + } + }) + :Timeout(iTimeout) + :ValidIf(function(_,data) + return Check_menuIconParams(data) + end) + :Do(function(_,data) + --hmi side: sending UI.SetGlobalProperties response + self.hmiConnection:SendResponse(data.id, data.method, "SUCCESS", {}) + end) + + + + --mobile side: expect SetGlobalProperties response + EXPECT_RESPONSE(cid, { success = false, resultCode = "GENERIC_ERROR"}) + :Timeout(12000) + + --mobile side: expect OnHashChange notification is not send to mobile + EXPECT_NOTIFICATION("OnHashChange") + :Times(0) + :Timeout(12000) + end + + --End test case HMINegativeCheck.11 + ----------------------------------------------------------------------------------------- + + + --Begin test case HMINegativeCheck.12 + --Description: Check UI wrong response with wrong HMI correlation id + + function Test:SetGlobalProperties_UI_Response_WithWrongHMICorrelationID_GENERIC_ERROR() + + + --mobile side: sending SetGlobalProperties request + local cid = self.mobileSession:SendRPC("SetGlobalProperties", + { + menuTitle = "Menu Title", + timeoutPrompt = + { + { + text = "Timeout prompt", + type = "TEXT" + } + }, + vrHelp = + { + { + position = 1, + image = + { + value = "action.png", + imageType = "DYNAMIC" + }, + text = "VR help item" + } + }, + menuIcon = + { + value = "action.png", + imageType = "DYNAMIC" + }, + helpPrompt = + { + { + text = "Help prompt", + type = "TEXT" + } + }, + vrHelpTitle = "VR help title", + keyboardProperties = + { + keyboardLayout = "QWERTY", + keypressMode = "SINGLE_KEYPRESS", + limitedCharacterList = + { + "a" + }, + language = "EN-US", + autoCompleteText = "Daemon, Freedom" + } + }) + + + --hmi side: expect TTS.SetGlobalProperties request + EXPECT_HMICALL("TTS.SetGlobalProperties", + { + timeoutPrompt = + { + { + text = "Timeout prompt", + type = "TEXT" + } + }, + helpPrompt = + { + { + text = "Help prompt", + type = "TEXT" + } + } + }) + :Timeout(iTimeout) + :Do(function(_,data) + --hmi side: sending UI.SetGlobalProperties response + self.hmiConnection:SendResponse(data.id, data.method, "SUCCESS", {}) + end) + + + + --hmi side: expect UI.SetGlobalProperties request + EXPECT_HMICALL("UI.SetGlobalProperties", + { + menuTitle = "Menu Title", + vrHelp = + { + { + position = 1, + --[=[ TODO: update after resolving APPLINK-16052 + + image = + { + imageType = "DYNAMIC", + value = strAppFolder .. "action.png" + },]=] + text = "VR help item" + } + }, + --Checked below + -- menuIcon = + -- { + -- imageType = "DYNAMIC", + -- value = strAppFolder .. "action.png" + -- }, + vrHelpTitle = "VR help title", + keyboardProperties = + { + keyboardLayout = "QWERTY", + keypressMode = "SINGLE_KEYPRESS", + --[=[ TODO: update after resolving APPLINK-16047 + + limitedCharacterList = + { + "a" + },]=] + language = "EN-US", + autoCompleteText = "Daemon, Freedom" + } + }) + :Timeout(iTimeout) + :ValidIf(function(_,data) + return Check_menuIconParams(data) + end) + :Do(function(_,data) + --hmi side: sending UI.SetGlobalProperties response + self.hmiConnection:SendResponse(data.id + 1, data.method, "SUCCESS", {}) + end) + + + + --mobile side: expect SetGlobalProperties response + EXPECT_RESPONSE(cid, { success = false, resultCode = "GENERIC_ERROR"}) + :Timeout(12000) + + --mobile side: expect OnHashChange notification is not send to mobile + EXPECT_NOTIFICATION("OnHashChange") + :Times(0) + :Timeout(12000) + end + + --End test case CommonRequestCheck.12 + ----------------------------------------------------------------------------------------- + + + --Begin test case HMINegativeCheck.13 + --Description: Check TTS wrong response with wrong HMI correlation id + + --Requirement id in JAMA: SDLAQ-CRS-12 + + --Verification criteria: The response contains 2 mandatory parameters "success" and "resultCode", "info" is sent if there is any additional information about the resultCode. + + function Test:SetGlobalProperties_TTS_Response_WithWrongHMICorrelationID_GENERIC_ERROR() + + --mobile side: sending SetGlobalProperties request + local cid = self.mobileSession:SendRPC("SetGlobalProperties", + { + menuTitle = "Menu Title", + timeoutPrompt = + { + { + text = "Timeout prompt", + type = "TEXT" + } + }, + vrHelp = + { + { + position = 1, + image = + { + value = "action.png", + imageType = "DYNAMIC" + }, + text = "VR help item" + } + }, + menuIcon = + { + value = "action.png", + imageType = "DYNAMIC" + }, + helpPrompt = + { + { + text = "Help prompt", + type = "TEXT" + } + }, + vrHelpTitle = "VR help title", + keyboardProperties = + { + keyboardLayout = "QWERTY", + keypressMode = "SINGLE_KEYPRESS", + limitedCharacterList = + { + "a" + }, + language = "EN-US", + autoCompleteText = "Daemon, Freedom" + } + }) + + + --hmi side: expect TTS.SetGlobalProperties request + EXPECT_HMICALL("TTS.SetGlobalProperties", + { + timeoutPrompt = + { + { + text = "Timeout prompt", + type = "TEXT" + } + }, + helpPrompt = + { + { + text = "Help prompt", + type = "TEXT" + } + } + }) + :Timeout(iTimeout) + :Do(function(_,data) + --hmi side: sending UI.SetGlobalProperties response + self.hmiConnection:SendResponse(data.id + 1, data.method, "SUCCESS", {}) + end) + + + + --hmi side: expect UI.SetGlobalProperties request + EXPECT_HMICALL("UI.SetGlobalProperties", + { + menuTitle = "Menu Title", + vrHelp = + { + { + position = 1, + --[=[ TODO: update after resolving APPLINK-16052 + + image = + { + imageType = "DYNAMIC", + value = strAppFolder .. "action.png" + },]=] + text = "VR help item" + } + }, + --Checked below + -- menuIcon = + -- { + -- imageType = "DYNAMIC", + -- value = strAppFolder .. "action.png" + -- }, + vrHelpTitle = "VR help title", + keyboardProperties = + { + keyboardLayout = "QWERTY", + keypressMode = "SINGLE_KEYPRESS", + --[=[ TODO: update after resolving APPLINK-16047 + + limitedCharacterList = + { + "a" + },]=] + language = "EN-US", + autoCompleteText = "Daemon, Freedom" + } + }) + :Timeout(iTimeout) + :ValidIf(function(_,data) + return Check_menuIconParams(data) + end) + :Do(function(_,data) + --hmi side: sending UI.SetGlobalProperties response + self.hmiConnection:SendResponse(data.id, data.method, "SUCCESS", {}) + end) + + + + --mobile side: expect SetGlobalProperties response + EXPECT_RESPONSE(cid, { success = false, resultCode = "GENERIC_ERROR"}) + :Timeout(12000) + + --mobile side: expect OnHashChange notification is not send to mobile + EXPECT_NOTIFICATION("OnHashChange") + :Times(0) + :Timeout(12000) + end + + --End test case HMINegativeCheck.13 + ----------------------------------------------------------------------------------------- + + + +---------------------------------------------------------------------------------------------- +-----------------------------------------VI TEST BLOCK---------------------------------------- +-------------------------Sequence with emulating of user's action(s)------------------------ +---------------------------------------------------------------------------------------------- + + +--Begin test suit SequenceCheck +--Description: TC's checks SDL behavior by processing + -- different request sequence with timeout + -- with emulating of user's actions + + --Begin test case SequenceCheck.1 + --Requirement: APPLINK-9532: Sending TTS.SetGlobalProperties to VCA in case no obtained from mobile app + --Description: When registering the app as soon as the app gets HMI Level NONE, SDL sends TTS.SetGlobalProperties(helpPrompt[]) with an empty array of helpPrompts (just helpPrompts, no timeoutPrompt). + + + function Test:Begin_TC_SetGlobalProperties_01() + print("--------------------------------------------------------") + end + + commonSteps:UnregisterApplication() + commonSteps:StartSession() + + function Test:Step_RegisterAppAndVerifyTTSGetProperties() + + self.mobileSession:StartService(7) + :Do(function() + local CorIdRegister = self.mobileSession:SendRPC("RegisterAppInterface", config.application1.registerAppInterfaceParams) + EXPECT_HMINOTIFICATION("BasicCommunication.OnAppRegistered", + { + application = + { + appName = config.application1.registerAppInterfaceParams.appName + } + }) + :Do(function(_,data) + self.applications[data.params.application.appName] = data.params.application.appID + end) + + self.mobileSession:ExpectResponse(CorIdRegister, { success = true, resultCode = "SUCCESS" }) + :Timeout(2000) + + self.mobileSession:ExpectNotification("OnHMIStatus", {hmiLevel = "NONE", audioStreamingState = "NOT_AUDIBLE", systemContext = "MAIN"}) + end) + + + + --Verify_ helpPrompt _isEmpty() + --hmi side: expect TTS.SetGlobalProperties request + EXPECT_HMICALL("TTS.SetGlobalProperties") + :Do(function(_,data) + --hmi side: sending UI.SetGlobalProperties response + self.hmiConnection:SendResponse(data.id, data.method, "SUCCESS", {}) + end) + :ValidIf(function(_,data) + if + data.params.timeoutPrompt then + print( "\27[31m TTS.SetGlobalProperties request came with unexpected timeoutPrompt parameter. \27[0m " ) + return false + elseif + data.params.helpPrompt and + #data.params.helpPrompt == 0 then + return true + elseif + data.params.helpPrompt == nil then + print( "\27[31m UI.SetGlobalProperties request came without helpPrompt \27[0m " ) + return false + else + print( "\27[31m UI.SetGlobalProperties request came with some unexpected values of helpPrompt, array length is " .. tostring(#data.params.helpPrompt) .. " \27[0m " ) + return false + end + + end) + + end + + function Test:End_TC_SetGlobalProperties_01() + print("--------------------------------------------------------") + end + + --End test case SequenceCheck.1 + ----------------------------------------------------------------------------------------- + + --Begin test case SequenceCheck.2 + --Description: When registering the app as soon as the app gets HMI Level BACKGROUND, SDL sends TTS.SetGlobalProperties(helpPrompt[]) with an empty array of helpPrompts (just helpPrompts, no timeoutPrompt). + + function Test:Begin_TC_SetGlobalProperties_02() + print("--------------------------------------------------------") + end + + commonSteps:UnregisterApplication() + commonSteps:StartSession() + + function Test:Step_RegisterAppAndVerifyTTSGetProperties_background() + local RegisterParameters = copy_table(config.application1.registerAppInterfaceParams) + RegisterParameters.appID = "background" + RegisterParameters.appName = "background" + + self.mobileSession:StartService(7) + :Do(function() + local CorIdRegister = self.mobileSession:SendRPC("RegisterAppInterface", RegisterParameters) + EXPECT_HMINOTIFICATION("BasicCommunication.OnAppRegistered", + { + application = + { + appName = "background" + } + }) + :Do(function(_,data) + self.applications[data.params.application.appName] = data.params.application.appID + end) + + self.mobileSession:ExpectResponse(CorIdRegister, { success = true, resultCode = "SUCCESS" }) + :Timeout(2000) + + self.mobileSession:ExpectNotification("OnHMIStatus", {hmiLevel = "BACKGROUND", audioStreamingState = "NOT_AUDIBLE", systemContext = "MAIN"}) + end) + + + + --Verify_ helpPrompt _isEmpty() + --hmi side: expect TTS.SetGlobalProperties request + EXPECT_HMICALL("TTS.SetGlobalProperties") + :Do(function(_,data) + --hmi side: sending UI.SetGlobalProperties response + self.hmiConnection:SendResponse(data.id, data.method, "SUCCESS", {}) + end) + :ValidIf(function(_,data) + if + data.params.timeoutPrompt then + print( "\27[31m TTS.SetGlobalProperties request came with unexpected timeoutPrompt parameter. \27[0m " ) + return false + elseif + data.params.helpPrompt and + #data.params.helpPrompt == 0 then + return true + elseif + data.params.helpPrompt == nil then + print( "\27[31m UI.SetGlobalProperties request came without helpPrompt \27[0m " ) + return false + else + print( "\27[31m UI.SetGlobalProperties request came with some unexpected values of helpPrompt, array length is " .. tostring(#data.params.helpPrompt) .. " \27[0m " ) + return false + end + + end) + + end + + function Test:End_TC_SetGlobalProperties_02() + print("--------------------------------------------------------") + end + + --End test case SequenceCheck.2 + ----------------------------------------------------------------------------------------- + + --Begin test case SequenceCheck.3 + --Description: Check for manual test case TC_SetGlobalProperties_02: SDL sends TTS.SetGlobalProperties request in 20 seconds from activation to FULL with the default list of HelpPrompts is a list of TTSChunks ( UI commands) defined as “TEXT” type, which are the list of the commands. + + function Test:Begin_TC_SetGlobalProperties_03() + print("--------------------------------------------------------") + end + + commonSteps:UnregisterApplication() + commonSteps:StartSession() + + function Test:Step_RegisterApp() + + self.mobileSession:StartService(7) + :Do(function() + local CorIdRegister = self.mobileSession:SendRPC("RegisterAppInterface", config.application1.registerAppInterfaceParams) + EXPECT_HMINOTIFICATION("BasicCommunication.OnAppRegistered", + { + application = + { + appName = config.application1.registerAppInterfaceParams.appName + } + }) + :Do(function(_,data) + self.applications[data.params.application.appName] = data.params.application.appID + end) + + self.mobileSession:ExpectResponse(CorIdRegister, { success = true, resultCode = "SUCCESS" }) + :Timeout(2000) + + self.mobileSession:ExpectNotification("OnHMIStatus", {hmiLevel = "BACKGROUND", audioStreamingState = "NOT_AUDIBLE", systemContext = "MAIN"}) + end) + end + + local TimeOfActivation + function Test:ActivationApp() + --hmi side: sending SDL.ActivateApp request + local RequestId = self.hmiConnection:SendRequest("SDL.ActivateApp", { appID = self.applications[config.application1.registerAppInterfaceParams.appName]}) + + EXPECT_HMIRESPONSE(RequestId) + :Do(function(_,data) + if + data.result.isSDLAllowed ~= true then + local RequestId = self.hmiConnection:SendRequest("SDL.GetUserFriendlyMessage", {language = "EN-US", messageCodes = {"DataConsent"}}) + + --hmi side: expect SDL.GetUserFriendlyMessage message response + --TODO: update after resolving APPLINK-16094. + --EXPECT_HMIRESPONSE(RequestId,{result = {code = 0, method = "SDL.GetUserFriendlyMessage"}}) + EXPECT_HMIRESPONSE(RequestId) + :Do(function(_,data) + --hmi side: send request SDL.OnAllowSDLFunctionality + self.hmiConnection:SendNotification("SDL.OnAllowSDLFunctionality", {allowed = true, source = "GUI", device = {id = config.deviceMAC, name = "127.0.0.1"}}) + + --hmi side: expect BasicCommunication.ActivateApp request + EXPECT_HMICALL("BasicCommunication.ActivateApp") + :Do(function(_,data) + --hmi side: sending BasicCommunication.ActivateApp response + self.hmiConnection:SendResponse(data.id,"BasicCommunication.ActivateApp", "SUCCESS", {}) + end) + :Times(AnyNumber()) + end) + + end + end) + + --mobile side: expect notification + EXPECT_NOTIFICATION("OnHMIStatus", {hmiLevel = "FULL", systemContext = "MAIN"}) + :Do(function(_,data) + TimeOfActivation = timestamp() + end) + end + + function Test:Step_AddCommand_Policies_Test() + local cid = self.mobileSession:SendRPC("AddCommand", + { + cmdID = 11, + menuParams = + { + --parentID = 1, + --position = 0, + menuName ="Policies Test" + }, + vrCommands = + { + "Policies Test", + "Policies" + } + }) + + --/* UI */ + EXPECT_HMICALL("UI.AddCommand", + { + cmdID = 11, + menuParams = + { + --parentID = 1, + --position = 0, + menuName ="Policies Test" + } + }) + :Do(function(_,data) + self.hmiConnection:SendResponse(data.id, data.method, "SUCCESS", {}) + end) + + --/* VR */ + EXPECT_HMICALL("VR.AddCommand", + { + cmdID = 11, + vrCommands = + { + "Policies Test", + "Policies" + } + }) + :Do(function(_,data) + self.hmiConnection:SendResponse(data.id, data.method, "SUCCESS", {}) + end) + + EXPECT_RESPONSE(cid, { success = true, resultCode = "SUCCESS" }) + EXPECT_NOTIFICATION("OnHashChange") + end + + function Test:Step_AddCommand_XML_Test() + local cid = self.mobileSession:SendRPC("AddCommand", + { + cmdID = 12, + menuParams = + { + --parentID = 1, + --position = 0, + menuName ="XML Test" + }, + vrCommands = + { + "XML Test", + "XML" + } + }) + + --/* UI */ + EXPECT_HMICALL("UI.AddCommand", + { + cmdID = 12, + menuParams = + { + --parentID = 1, + --position = 0, + menuName ="XML Test" + } + }) + :Do(function(_,data) + self.hmiConnection:SendResponse(data.id, data.method, "SUCCESS", {}) + end) + + --/* VR */ + EXPECT_HMICALL("VR.AddCommand", + { + cmdID = 12, + vrCommands = + { + "XML Test", + "XML" + } + }) + :Do(function(_,data) + self.hmiConnection:SendResponse(data.id, data.method, "SUCCESS", {}) + end) + + EXPECT_RESPONSE(cid, { success = true, resultCode = "SUCCESS" }) + EXPECT_NOTIFICATION("OnHashChange") + end + + function Test:Step_Verify_TTS_SetGlobalProperties_after_activation_in_Full() + local TimeOfPropRequest + + EXPECT_HMICALL("TTS.SetGlobalProperties", + { + helpPrompt = + { + { + text = "Policies Test", + type = "TEXT" + }, + { + text = "XML Test", + type = "TEXT" + } + } + }) + :Timeout(25000) + :Do(function(_,data) + self.hmiConnection:SendResponse(data.id, data.method, "SUCCESS", {}) + end) + :ValidIf(function(_,data) + + local TimeOfPropRequest = timestamp() + local TimeToSetPropReqAfterActivation = TimeOfPropRequest - TimeOfActivation + + if + TimeToSetPropReqAfterActivation > 20500 and + TimeToSetPropReqAfterActivation < 19500 then + print( "\27[31m TTS.SetGlobalProperties came after activation in " .. tostring(TimeToSetPropReqAfterActivation) .. " ms, expected time 20000 ms \27[0m " ) + return false + else + print( "\27[32m TTS.SetGlobalProperties came after activation in " .. tostring(TimeToSetPropReqAfterActivation) .. " ms, expected time 20000 ms \27[0m " ) + return true + end + end) + + --mobile side: expect OnHashChange notification + EXPECT_NOTIFICATION("OnHashChange") + :Timeout(27000) + :Times(0) + + DelayedExp(2000) + end + + function Test:End_TC_SetGlobalProperties_03() + print("--------------------------------------------------------") + end + --End test case SequenceCheck.3 + ----------------------------------------------------------------------------------------- + + + --Begin test case SequenceCheck.3.1 + --[[ + Description: Check for manual test case TC_SetGlobalProperties_02, extra check, not covered in original: + SDL sends TTS.SetGlobalProperties request in 20 seconds from activation to LIMITED with the default list of + HelpPrompts is a list of TTSChunks ( UI commands) defined as “TEXT” type, which are the list of the commands. + --]] + + function Test:Begin_TC_SetGlobalProperties_3_1() + print("--------------------------------------------------------") + end + + commonSteps:UnregisterApplication() + commonSteps:StartSession() + + function Test:Step_RegisterApp() + + self.mobileSession:StartService(7) + :Do(function() + local CorIdRegister = self.mobileSession:SendRPC("RegisterAppInterface", config.application1.registerAppInterfaceParams) + EXPECT_HMINOTIFICATION("BasicCommunication.OnAppRegistered", + { + application = + { + appName = config.application1.registerAppInterfaceParams.appName + } + }) + :Do(function(_,data) + self.applications[data.params.application.appName] = data.params.application.appID + end) + + self.mobileSession:ExpectResponse(CorIdRegister, { success = true, resultCode = "SUCCESS" }) + :Timeout(2000) + + self.mobileSession:ExpectNotification("OnHMIStatus", {hmiLevel = "BACKGROUND", audioStreamingState = "NOT_AUDIBLE", systemContext = "MAIN"}) + end) + end + + local TimeOfActivation + function Test:ActivationApp() + --hmi side: sending SDL.ActivateApp request + local RequestId = self.hmiConnection:SendRequest("SDL.ActivateApp", { appID = self.applications[config.application1.registerAppInterfaceParams.appName]}) + + EXPECT_HMIRESPONSE(RequestId) + :Do(function(_,data) + if + data.result.isSDLAllowed ~= true then + local RequestId = self.hmiConnection:SendRequest("SDL.GetUserFriendlyMessage", {language = "EN-US", messageCodes = {"DataConsent"}}) + + --hmi side: expect SDL.GetUserFriendlyMessage message response + --TODO: update after resolving APPLINK-16094. + --EXPECT_HMIRESPONSE(RequestId,{result = {code = 0, method = "SDL.GetUserFriendlyMessage"}}) + EXPECT_HMIRESPONSE(RequestId) + :Do(function(_,data) + --hmi side: send request SDL.OnAllowSDLFunctionality + self.hmiConnection:SendNotification("SDL.OnAllowSDLFunctionality", {allowed = true, source = "GUI", device = {id = config.deviceMAC, name = "127.0.0.1"}}) + + --hmi side: expect BasicCommunication.ActivateApp request + EXPECT_HMICALL("BasicCommunication.ActivateApp") + :Do(function(_,data) + --hmi side: sending BasicCommunication.ActivateApp response + self.hmiConnection:SendResponse(data.id,"BasicCommunication.ActivateApp", "SUCCESS", {}) + end) + :Times(AnyNumber()) + end) + + end + end) + + --mobile side: expect notification + EXPECT_NOTIFICATION("OnHMIStatus", {hmiLevel = "FULL", systemContext = "MAIN"}) + :Do(function(_,data) + TimeOfActivation = timestamp() + end) + end + + function Test:DeactivateAppToLimited() + -- hmi side + self.hmiConnection:SendNotification("BasicCommunication.OnAppDeactivated", {appID = self.applications[config.application1.registerAppInterfaceParams.appName]}) + + --mobile side + EXPECT_NOTIFICATION("OnHMIStatus", {hmiLevel = "LIMITED", audioStreamingState = "AUDIBLE", systemContext = "MAIN"}) + :Timeout(500) + end + + function Test:Step_AddCommand_Policies_Test() + local cid = self.mobileSession:SendRPC("AddCommand", + { + cmdID = 11, + menuParams = + { + --parentID = 1, + --position = 0, + menuName ="Policies Test" + }, + vrCommands = + { + "Policies Test", + "Policies" + } + }) + + --/* UI */ + EXPECT_HMICALL("UI.AddCommand", + { + cmdID = 11, + menuParams = + { + --parentID = 1, + --position = 0, + menuName ="Policies Test" + } + }) + :Do(function(_,data) + self.hmiConnection:SendResponse(data.id, data.method, "SUCCESS", {}) + end) + + --/* VR */ + EXPECT_HMICALL("VR.AddCommand", + { + cmdID = 11, + vrCommands = + { + "Policies Test", + "Policies" + } + }) + :Do(function(_,data) + self.hmiConnection:SendResponse(data.id, data.method, "SUCCESS", {}) + end) + + EXPECT_RESPONSE(cid, { success = true, resultCode = "SUCCESS" }) + EXPECT_NOTIFICATION("OnHashChange") + end + + function Test:Step_AddCommand_XML_Test() + local cid = self.mobileSession:SendRPC("AddCommand", + { + cmdID = 12, + menuParams = + { + --parentID = 1, + --position = 0, + menuName ="XML Test" + }, + vrCommands = + { + "XML Test", + "XML" + } + }) + + --/* UI */ + EXPECT_HMICALL("UI.AddCommand", + { + cmdID = 12, + menuParams = + { + --parentID = 1, + --position = 0, + menuName ="XML Test" + } + }) + :Do(function(_,data) + self.hmiConnection:SendResponse(data.id, data.method, "SUCCESS", {}) + end) + + --/* VR */ + EXPECT_HMICALL("VR.AddCommand", + { + cmdID = 12, + vrCommands = + { + "XML Test", + "XML" + } + }) + :Do(function(_,data) + self.hmiConnection:SendResponse(data.id, data.method, "SUCCESS", {}) + end) + + EXPECT_RESPONSE(cid, { success = true, resultCode = "SUCCESS" }) + EXPECT_NOTIFICATION("OnHashChange") + end + + function Test:Step_Verify_TTS_SetGlobalProperties_after_activation_in_Limited() + local TimeOfPropRequest + + EXPECT_HMICALL("TTS.SetGlobalProperties", + { + helpPrompt = + { + { + text = "Policies Test", + type = "TEXT" + }, + { + text = "XML Test", + type = "TEXT" + } + } + }) + :Timeout(25000) + :Do(function(_,data) + self.hmiConnection:SendResponse(data.id, data.method, "SUCCESS", {}) + end) + :ValidIf(function(_,data) + + local TimeOfPropRequest = timestamp() + local TimeToSetPropReqAfterActivation = TimeOfPropRequest - TimeOfActivation + + if + TimeToSetPropReqAfterActivation > 20500 and + TimeToSetPropReqAfterActivation < 19500 then + print( "\27[31m TTS.SetGlobalProperties came after activation in " .. tostring(TimeToSetPropReqAfterActivation) .. " ms, expected time 20000 ms \27[0m " ) + return false + else + print( "\27[32m TTS.SetGlobalProperties came after activation in " .. tostring(TimeToSetPropReqAfterActivation) .. " ms, expected time 20000 ms \27[0m " ) + return true + end + end) + + --mobile side: expect OnHashChange notification + EXPECT_NOTIFICATION("OnHashChange") + :Timeout(27000) + :Times(0) + + DelayedExp(2000) + end + + function Test:End_TC_SetGlobalProperties_3_1() + print("--------------------------------------------------------") + end + --End test case SequenceCheck.3.1 + ----------------------------------------------------------------------------------------- + + + --Begin test case SequenceCheck.4 + --Description: Check for manual test case TC_SetGlobalProperties_03: SDL does not send TTS.SetGlobalProperties request in 20 seconds from activation if mobile sends SetGlobalProperties request to SDL + + function Test:Begin_TC_SetGlobalProperties_04() + print("--------------------------------------------------------") + end + + commonSteps:UnregisterApplication() + commonSteps:StartSession() + + function Test:Step_RegisterAppAndVerifyTTSGetProperties() + --RegisterAppAndVerifyTTSGetProperties() + + self.mobileSession:StartService(7) + :Do(function() + local CorIdRegister = self.mobileSession:SendRPC("RegisterAppInterface", config.application1.registerAppInterfaceParams) + EXPECT_HMINOTIFICATION("BasicCommunication.OnAppRegistered", + { + application = + { + appName = config.application1.registerAppInterfaceParams.appName + } + }) + :Do(function(_,data) + self.applications[data.params.application.appName] = data.params.application.appID + end) + + self.mobileSession:ExpectResponse(CorIdRegister, { success = true, resultCode = "SUCCESS" }) + :Timeout(2000) + + self.mobileSession:ExpectNotification("OnHMIStatus", {hmiLevel = "NONE", audioStreamingState = "NOT_AUDIBLE", systemContext = "MAIN"}) + end) + + + + --Verify_ helpPrompt _isEmpty() + --hmi side: expect TTS.SetGlobalProperties request + EXPECT_HMICALL("TTS.SetGlobalProperties") + :Timeout(iTimeout) + :Do(function(_,data) + --hmi side: sending UI.SetGlobalProperties response + self.hmiConnection:SendResponse(data.id, data.method, "SUCCESS", {}) + end) + :ValidIf(function(_,data) + if + data.params.timeoutPrompt then + print( "\27[31m TTS.SetGlobalProperties request came with unexpected timeoutPrompt parameter. \27[0m " ) + return false + elseif + data.params.helpPrompt and + #data.params.helpPrompt == 0 then + return true + elseif + data.params.helpPrompt == nil then + print( "\27[31m UI.SetGlobalProperties request came without helpPrompt \27[0m " ) + return false + else + print( "\27[31m UI.SetGlobalProperties request came with some unexpected values of helpPrompt, array length is " .. tostring(#data.params.helpPrompt) .. " \27[0m " ) + return false + end + + end) + end + + commonSteps:ActivationApp() + + function Test:Step_PutFile() + + local cid = self.mobileSession:SendRPC( + "PutFile", + { + syncFileName = "action.png", + fileType = "GRAPHIC_PNG" + }, + "files/action.png" + ) + EXPECT_RESPONSE(cid, { success = true, resultCode = "SUCCESS" }) + + end + + function Test:Step_SendSetGlobalPropertiesRequest() + + --mobile side: sending SetGlobalProperties request + local cid = self.mobileSession:SendRPC("SetGlobalProperties", + { + menuTitle = "Menu Title", + timeoutPrompt = + { + { + text = "Timeout prompt", + type = "TEXT" + } + }, + vrHelp = + { + { + position = 1, + image = + { + value = "action.png", + imageType = "DYNAMIC" + }, + text = "VR help item" + } + }, + menuIcon = + { + value = "action.png", + imageType = "DYNAMIC" + }, + helpPrompt = + { + { + text = "Help prompt", + type = "TEXT" + } + }, + vrHelpTitle = "VR help title", + keyboardProperties = + { + keyboardLayout = "QWERTY", + keypressMode = "SINGLE_KEYPRESS", + limitedCharacterList = + { + "a" + }, + language = "EN-US", + autoCompleteText = "Daemon, Freedom" + } + }) + + + --hmi side: expect TTS.SetGlobalProperties request + EXPECT_HMICALL("TTS.SetGlobalProperties", + { + timeoutPrompt = + { + { + text = "Timeout prompt", + type = "TEXT" + } + }, + helpPrompt = + { + { + text = "Help prompt", + type = "TEXT" + } + } + }) + :Timeout(iTimeout) + :Do(function(_,data) + --hmi side: sending UI.SetGlobalProperties response + self.hmiConnection:SendResponse(data.id, data.method, "SUCCESS", {}) + end) + + + + --hmi side: expect UI.SetGlobalProperties request + EXPECT_HMICALL("UI.SetGlobalProperties", + { + menuTitle = "Menu Title", + vrHelp = + { + { + position = 1, + --[=[ TODO: update after resolving APPLINK-16052 + + image = + { + imageType = "DYNAMIC", + value = strAppFolder .. "action.png" + },]=] + text = "VR help item" + } + }, + --Checked below + -- menuIcon = + -- { + -- imageType = "DYNAMIC", + -- value = strAppFolder .. "action.png" + -- }, + vrHelpTitle = "VR help title", + keyboardProperties = + { + keyboardLayout = "QWERTY", + keypressMode = "SINGLE_KEYPRESS", + --[=[ TODO: update after resolving APPLINK-16047 + + limitedCharacterList = + { + "a" + },]=] + language = "EN-US", + autoCompleteText = "Daemon, Freedom" + } + }) + :Timeout(iTimeout) + :ValidIf(function(_,data) + return Check_menuIconParams(data) + end) + :Do(function(_,data) + --hmi side: sending UI.SetGlobalProperties response + self.hmiConnection:SendResponse(data.id, data.method, "SUCCESS", {}) + end) + + + + --mobile side: expect SetGlobalProperties response + EXPECT_RESPONSE(cid, { success = true, resultCode = "SUCCESS"}) + :Timeout(iTimeout) + + --mobile side: expect OnHashChange notification + EXPECT_NOTIFICATION("OnHashChange") + end + + function Test:Step_Verify_TTS_SetGlobalProperties_IsNotSend() + EXPECT_HMICALL("TTS.SetGlobalProperties") + :Times(0) + + DelayedExp(22000) + + end + + function Test:End_TC_SetGlobalProperties_04() + print("--------------------------------------------------------") + end + + --End test case SequenceCheck.4 + ----------------------------------------------------------------------------------------- + + + + + --Begin test case SequenceCheck.5 + --Description: Check for manual test case TC_SetGlobalProperties_04: SDL does not send TTS.SetGlobalProperties request in 20 seconds from activation if mobile sends ResetGlobalProperties request to SDL + + + function Test:Begin_TC_SetGlobalProperties_05() + print("--------------------------------------------------------") + end + + commonSteps:UnregisterApplication() + commonSteps:StartSession() + + function Test:Step_RegisterAppAndVerifyTTSGetProperties() + --RegisterAppAndVerifyTTSGetProperties() + + self.mobileSession:StartService(7) + :Do(function() + local CorIdRegister = self.mobileSession:SendRPC("RegisterAppInterface", config.application1.registerAppInterfaceParams) + EXPECT_HMINOTIFICATION("BasicCommunication.OnAppRegistered", + { + application = + { + appName = config.application1.registerAppInterfaceParams.appName + } + }) + :Do(function(_,data) + self.applications[data.params.application.appName] = data.params.application.appID + end) + + self.mobileSession:ExpectResponse(CorIdRegister, { success = true, resultCode = "SUCCESS" }) + :Timeout(2000) + + self.mobileSession:ExpectNotification("OnHMIStatus", {hmiLevel = "NONE", audioStreamingState = "NOT_AUDIBLE", systemContext = "MAIN"}) + end) + + + + --Verify_ helpPrompt _isEmpty() + --hmi side: expect TTS.SetGlobalProperties request + EXPECT_HMICALL("TTS.SetGlobalProperties") + -- { + -- helpPrompt = {} + -- }) + :Timeout(iTimeout) + :Do(function(_,data) + --hmi side: sending UI.SetGlobalProperties response + self.hmiConnection:SendResponse(data.id, data.method, "SUCCESS", {}) + end) + :ValidIf(function(_,data) + if + data.params.helpPrompt and + #data.params.helpPrompt == 0 then + return true + elseif + data.params.helpPrompt == nil then + print( "\27[31m UI.SetGlobalProperties request came without helpPrompt \27[0m " ) + return false + else + print( "\27[31m UI.SetGlobalProperties request came with some unexpected values of helpPrompt, array length is " .. tostring(#data.params.helpPrompt) .. " \27[0m " ) + return false + end + + end) + + + + end + + commonSteps:ActivationApp() + + function Test:Step_SendResetGlobalProperties() + local cid = self.mobileSession:SendRPC("ResetGlobalProperties", + { + properties = + { + "HELPPROMPT", + "TIMEOUTPROMPT", + "VRHELPTITLE", + "VRHELPITEMS", + "MENUICON", + "MENUNAME", + "KEYBOARDPROPERTIES" + } + }) + + --/* UI */ + EXPECT_HMICALL("UI.SetGlobalProperties", + { + keyboardProperties = + { + autoCompleteText = "", + keyboardLayout = "QWERTY", + language = "EN-US" + }, + menuTitle = "", + vrHelpTitle = config.application1.registerAppInterfaceParams.appName + }) + :Do(function(_,data) + self.hmiConnection:SendResponse(data.id, data.method, "SUCCESS", {}) + end) + + --/* TTS */ + EXPECT_HMICALL("TTS.SetGlobalProperties", + { + -- helpPrompt = {}, + timeoutPrompt = + { + { + text = "Please speak one of the following commands,", + type = "TEXT" + }, + { + text = "Please say a command,", + type = "TEXT" + } + } + }) + :Do(function(_,data) + self.hmiConnection:SendResponse(data.id, data.method, "SUCCESS", {}) + end) + :ValidIf(function(_,data) + if + data.params.helpPrompt and + #data.params.helpPrompt == 0 then + return true + elseif + data.params.helpPrompt == nil then + print( "\27[31m UI.SetGlobalProperties request came without helpPrompt \27[0m " ) + return false + else + print( "\27[31m UI.SetGlobalProperties request came with some unexpected values of helpPrompt, array length is " .. tostring(#data.params.helpPrompt) .. " \27[0m " ) + return false + end + + end) + + + EXPECT_RESPONSE(cid, { success = true, resultCode = "SUCCESS" }) + EXPECT_NOTIFICATION("OnHashChange") + + end + + function Test:Step_Verify_TTS_SetGlobalProperties_IsNotSend() + EXPECT_HMICALL("TTS.SetGlobalProperties") + :Times(0) + + DelayedExp(22000) + end + + function Test:End_TC_SetGlobalProperties_05() + print("--------------------------------------------------------") + end + --End test case SequenceCheck.5 + ----------------------------------------------------------------------------------------- + + --[[TODO: Next test suit is blocked by defect APPLINK-21931, after resolving the issue need to uncomment suit]] + --[[ + --Begin test case SequenceCheck.6.1 + --Description:Check for manual test case TC_SetGlobalProperties_02: SDL sends TTS.SetGlobalProperties request in 20 seconds from activation to LIMITED with the default list of HelpPrompts is a list of TTSChunks ( UI commands) defined as “TEXT” type, which are the list of the commands. + + + function Test:Begin_TC_SetGlobalProperties_6_1() + print("--------------------------------------------------------") + end + + commonSteps:UnregisterApplication() + commonSteps:StartSession() + + local RegisterParams + function Test:Step_RegisterAppAndVerifyTTSGetProperties_full_level() + RegisterParams = copy_table(config.application1.registerAppInterfaceParams) + RegisterParams.isMediaApplication = true + + self.mobileSession:StartService(7) + :Do(function() + local CorIdRegister = self.mobileSession:SendRPC("RegisterAppInterface", RegisterParams) + EXPECT_HMINOTIFICATION("BasicCommunication.OnAppRegistered", + { + application = + { + appName = config.application1.registerAppInterfaceParams.appName + } + }) + :Do(function(_,data) + self.applications[data.params.application.appName] = data.params.application.appID + end) + + self.mobileSession:ExpectResponse(CorIdRegister, { success = true, resultCode = "SUCCESS" }) + :Timeout(2000) + + self.mobileSession:ExpectNotification("OnHMIStatus", {hmiLevel = "NONE", audioStreamingState = "NOT_AUDIBLE", systemContext = "MAIN"}) + end) + + end + + commonSteps:ActivationApp() + + function Test:Step_AddCommand_Policies_Test_full_level() + local cid = self.mobileSession:SendRPC("AddCommand", + { + cmdID = 11, + menuParams = + { + --parentID = 1, + --position = 0, + menuName ="Policies Test" + }, + vrCommands = + { + "Policies Test", + "Policies" + } + }) + + --/* UI */ + EXPECT_HMICALL("UI.AddCommand", + { + cmdID = 11, + menuParams = + { + --parentID = 1, + --position = 0, + menuName ="Policies Test" + } + }) + :Do(function(_,data) + self.hmiConnection:SendResponse(data.id, data.method, "SUCCESS", {}) + end) + + --/* VR */ + EXPECT_HMICALL("VR.AddCommand", + { + cmdID = 11, + vrCommands = + { + "Policies Test", + "Policies" + } + }) + :Do(function(_,data) + self.hmiConnection:SendResponse(data.id, data.method, "SUCCESS", {}) + end) + + EXPECT_RESPONSE(cid, { success = true, resultCode = "SUCCESS" }) + EXPECT_NOTIFICATION("OnHashChange") + :Do(function(_,data) + self.hashId = data.payload.hashID + end) + end + + function Test:Step_AddCommand_XML_Test_full_level() + local cid = self.mobileSession:SendRPC("AddCommand", + { + cmdID = 12, + menuParams = + { + --parentID = 1, + --position = 0, + menuName ="XML Test" + }, + vrCommands = + { + "XML Test", + "XML" + } + }) + + --/* UI */ + EXPECT_HMICALL("UI.AddCommand", + { + cmdID = 12, + menuParams = + { + --parentID = 1, + --position = 0, + menuName ="XML Test" + } + }) + :Do(function(_,data) + self.hmiConnection:SendResponse(data.id, data.method, "SUCCESS", {}) + end) + + --/* VR */ + EXPECT_HMICALL("VR.AddCommand", + { + cmdID = 12, + vrCommands = + { + "XML Test", + "XML" + } + }) + :Do(function(_,data) + self.hmiConnection:SendResponse(data.id, data.method, "SUCCESS", {}) + end) + + EXPECT_RESPONSE(cid, { success = true, resultCode = "SUCCESS" }) + EXPECT_NOTIFICATION("OnHashChange") + :Do(function(_,data) + self.hashId = data.payload.hashID + end) + end + + function Test:SetAppToFullCloseSession() + + self.mobileSession:Stop() + + EXPECT_HMINOTIFICATION("BasicCommunication.OnAppUnregistered", {unexpectedDisconnect = true}) + + end + + commonSteps:StartSession() + + local TimeActivationToFull + function Test:Step_RegisterAppAndVerifyTTSGetProperties_Resumption_to_full_level() + + RegisterParams.hashID = self.hashId + + self.mobileSession:StartService(7) + :Do(function() + local CorIdRegister = self.mobileSession:SendRPC("RegisterAppInterface", RegisterParams) + EXPECT_HMINOTIFICATION("BasicCommunication.OnAppRegistered", + { + application = + { + appName = config.application1.registerAppInterfaceParams.appName + } + }) + :Do(function(_,data) + self.applications[data.params.application.appName] = data.params.application.appID + end) + + self.mobileSession:ExpectResponse(CorIdRegister, { success = true, resultCode = "SUCCESS" }) + :Timeout(2000) + + self.mobileSession:ExpectNotification("OnHMIStatus", + {hmiLevel = "NONE", audioStreamingState = "NOT_AUDIBLE", systemContext = "MAIN"}, + {hmiLevel = "FULL", audioStreamingState = "AUDIBLE", systemContext = "MAIN"}) + :Times(2) + :Do(function(_,data) + if data.payload.hmiLevel == "FULL" then + TimeActivationToFull = timestamp() + end + end) + + EXPECT_HMICALL("UI.AddCommand") + :Do(function(_,data) + self.hmiConnection:SendResponse(data.id, data.method, "SUCCESS", {}) + end) + :Times(2) + + + EXPECT_HMICALL("VR.AddCommand") + :Do(function(_,data) + self.hmiConnection:SendResponse(data.id, data.method, "SUCCESS", {}) + end) + :Times(2) + + --Verify_ helpPrompt _isEmpty() + --hmi side: expect TTS.SetGlobalProperties request + EXPECT_HMICALL("TTS.SetGlobalProperties") + :Timeout(iTimeout) + :Do(function(_,data) + --hmi side: sending UI.SetGlobalProperties response + self.hmiConnection:SendResponse(data.id, data.method, "SUCCESS", {}) + end) + :ValidIf(function(_,data) + if + data.params.helpPrompt and + #data.params.helpPrompt == 0 then + return true + elseif + data.params.helpPrompt == nil then + print( "\27[31m UI.SetGlobalProperties request came without helpPrompt \27[0m " ) + return false + else + print( "\27[31m UI.SetGlobalProperties request came with some unexpected values of helpPrompt, array length is " .. tostring(#data.params.helpPrompt) .. " \27[0m " ) + return false + end + end) + end) + + end + + + function Test:Step_Verify_TTS_SetGlobalProperties_after_activation_in_full_level() + local TimeOfPropRequest + + EXPECT_HMICALL("TTS.SetGlobalProperties", + { + helpPrompt = + { + { + text = "Policies Test", + type = "TEXT" + }, + { + text = "XML Test", + type = "TEXT" + } + } + }) + :Timeout(25000) + :Do(function(_,data) + self.hmiConnection:SendResponse(data.id, data.method, "SUCCESS", {}) + end) + :ValidIf(function(_,data) + + local TimeOfPropRequest = timestamp() + local TimeToSetPropReqAfterActivation = TimeOfPropRequest - TimeActivationToFull + + if + TimeToSetPropReqAfterActivation > 20500 and + TimeToSetPropReqAfterActivation < 19500 then + print( "\27[31m TTS.SetGlobalProperties came after activation in " .. tostring(TimeToSetPropReqAfterActivation) .. " ms, expected time 20000 ms \27[0m " ) + return false + else + print( "\27[32m TTS.SetGlobalProperties came after activation in " .. tostring(TimeToSetPropReqAfterActivation) .. " ms, expected time 20000 ms \27[0m " ) + return true + end + end) + + --mobile side: expect OnHashChange notification + EXPECT_NOTIFICATION("OnHashChange") + :Timeout(27000) + :Times(0) + + DelayedExp(2000) + end + + + function Test:End_TC_SetGlobalProperties_6_1() + print("--------------------------------------------------------") + end + --End test case SequenceCheck.6.1 + ----------------------------------------------------------------------------------------- + ]] + + + --[[TODO: Next test suit is blocked by defect APPLINK-21931, after resolving the issue need to uncomment suit]] + --[[ + -- Begin test case SequenceCheck.6.2 + --Description:Check for manual test case TC_SetGlobalProperties_02: SDL sends TTS.SetGlobalProperties request in 20 seconds from activation to LIMITED with the default list of HelpPrompts is a list of TTSChunks ( UI commands) defined as “TEXT” type, which are the list of the commands. + + + function Test:Begin_TC_SetGlobalProperties_6_2() + print("--------------------------------------------------------") + end + + commonSteps:UnregisterApplication() + commonSteps:StartSession() + + local RegisterParams + function Test:Step_RegisterAppAndVerifyTTSGetProperties_limited() + RegisterParams = copy_table(config.application1.registerAppInterfaceParams) + RegisterParams.isMediaApplication = true + + self.mobileSession:StartService(7) + :Do(function() + local CorIdRegister = self.mobileSession:SendRPC("RegisterAppInterface", RegisterParams) + EXPECT_HMINOTIFICATION("BasicCommunication.OnAppRegistered", + { + application = + { + appName = config.application1.registerAppInterfaceParams.appName + } + }) + :Do(function(_,data) + self.applications[data.params.application.appName] = data.params.application.appID + end) + + self.mobileSession:ExpectResponse(CorIdRegister, { success = true, resultCode = "SUCCESS" }) + :Timeout(2000) + + self.mobileSession:ExpectNotification("OnHMIStatus", {hmiLevel = "NONE", audioStreamingState = "NOT_AUDIBLE", systemContext = "MAIN"}) + end) + + end + + commonSteps:ActivationApp() + + function Test:Step_AddCommand_Policies_Test_limited() + local cid = self.mobileSession:SendRPC("AddCommand", + { + cmdID = 11, + menuParams = + { + --parentID = 1, + --position = 0, + menuName ="Policies Test" + }, + vrCommands = + { + "Policies Test", + "Policies" + } + }) + + --/* UI */ + EXPECT_HMICALL("UI.AddCommand", + { + cmdID = 11, + menuParams = + { + --parentID = 1, + --position = 0, + menuName ="Policies Test" + } + }) + :Do(function(_,data) + self.hmiConnection:SendResponse(data.id, data.method, "SUCCESS", {}) + end) + + --/* VR */ + EXPECT_HMICALL("VR.AddCommand", + { + cmdID = 11, + vrCommands = + { + "Policies Test", + "Policies" + } + }) + :Do(function(_,data) + self.hmiConnection:SendResponse(data.id, data.method, "SUCCESS", {}) + end) + + EXPECT_RESPONSE(cid, { success = true, resultCode = "SUCCESS" }) + EXPECT_NOTIFICATION("OnHashChange") + :Do(function(_,data) + self.hashId = data.payload.hashID + end) + end + + function Test:Step_AddCommand_XML_Test_limited() + local cid = self.mobileSession:SendRPC("AddCommand", + { + cmdID = 12, + menuParams = + { + --parentID = 1, + --position = 0, + menuName ="XML Test" + }, + vrCommands = + { + "XML Test", + "XML" + } + }) + + --/* UI */ + EXPECT_HMICALL("UI.AddCommand", + { + cmdID = 12, + menuParams = + { + --parentID = 1, + --position = 0, + menuName ="XML Test" + } + }) + :Do(function(_,data) + self.hmiConnection:SendResponse(data.id, data.method, "SUCCESS", {}) + end) + + --/* VR */ + EXPECT_HMICALL("VR.AddCommand", + { + cmdID = 12, + vrCommands = + { + "XML Test", + "XML" + } + }) + :Do(function(_,data) + self.hmiConnection:SendResponse(data.id, data.method, "SUCCESS", {}) + end) + + EXPECT_RESPONSE(cid, { success = true, resultCode = "SUCCESS" }) + EXPECT_NOTIFICATION("OnHashChange") + :Do(function(_,data) + self.hashId = data.payload.hashID + end) + end + + function Test:SetAppToLimitedCloseSession() + + self.hmiConnection:SendNotification("BasicCommunication.OnAppDeactivated", {appID = self.applications[RegisterParams.appName]}) + + + EXPECT_NOTIFICATION("OnHMIStatus", + {hmiLevel = "LIMITED", audioStreamingState = "AUDIBLE", systemContext = "MAIN"}) + :Do(function() + self.mobileSession:Stop() + end) + + EXPECT_HMINOTIFICATION("BasicCommunication.OnAppUnregistered", {unexpectedDisconnect = true}) + + end + + commonSteps:StartSession() + + local TimeActivationToLimited + function Test:Step_RegisterAppAndVerifyTTSGetProperties_Resumption_to_limited() + + RegisterParams.hashID = self.hashId + + self.mobileSession:StartService(7) + :Do(function() + local CorIdRegister = self.mobileSession:SendRPC("RegisterAppInterface", RegisterParams) + EXPECT_HMINOTIFICATION("BasicCommunication.OnAppRegistered", + { + application = + { + appName = config.application1.registerAppInterfaceParams.appName + } + }) + :Do(function(_,data) + self.applications[data.params.application.appName] = data.params.application.appID + end) + + self.mobileSession:ExpectResponse(CorIdRegister, { success = true, resultCode = "SUCCESS" }) + :Timeout(2000) + + self.mobileSession:ExpectNotification("OnHMIStatus", + {hmiLevel = "NONE", audioStreamingState = "NOT_AUDIBLE", systemContext = "MAIN"}, + {hmiLevel = "LIMITED", audioStreamingState = "AUDIBLE", systemContext = "MAIN"}) + :Times(2) + :Do(function(_,data) + if data.payload.hmiLevel == "LIMITED" then + TimeActivationToLimited = timestamp() + end + end) + + EXPECT_HMICALL("UI.AddCommand") + :Do(function(_,data) + self.hmiConnection:SendResponse(data.id, data.method, "SUCCESS", {}) + end) + :Times(2) + + + EXPECT_HMICALL("VR.AddCommand") + :Do(function(_,data) + self.hmiConnection:SendResponse(data.id, data.method, "SUCCESS", {}) + end) + :Times(2) + + --Verify_ helpPrompt _isEmpty() + --hmi side: expect TTS.SetGlobalProperties request + EXPECT_HMICALL("TTS.SetGlobalProperties") + :Timeout(iTimeout) + :Do(function(_,data) + --hmi side: sending UI.SetGlobalProperties response + self.hmiConnection:SendResponse(data.id, data.method, "SUCCESS", {}) + end) + :ValidIf(function(_,data) + if + data.params.helpPrompt and + #data.params.helpPrompt == 0 then + return true + elseif + data.params.helpPrompt == nil then + print( "\27[31m UI.SetGlobalProperties request came without helpPrompt \27[0m " ) + return false + else + print( "\27[31m UI.SetGlobalProperties request came with some unexpected values of helpPrompt, array length is " .. tostring(#data.params.helpPrompt) .. " \27[0m " ) + return false + end + end) + end) + + end + + + function Test:Step_Verify_TTS_SetGlobalProperties_after_activation_in_Limited() + local TimeOfPropRequest + + EXPECT_HMICALL("TTS.SetGlobalProperties", + { + helpPrompt = + { + { + text = "Policies Test", + type = "TEXT" + }, + { + text = "XML Test", + type = "TEXT" + } + } + }) + :Timeout(25000) + :Do(function(_,data) + self.hmiConnection:SendResponse(data.id, data.method, "SUCCESS", {}) + end) + :ValidIf(function(_,data) + + local TimeOfPropRequest = timestamp() + local TimeToSetPropReqAfterActivation = TimeOfPropRequest - TimeActivationToLimited + + if + TimeToSetPropReqAfterActivation > 20500 and + TimeToSetPropReqAfterActivation < 19500 then + print( "\27[31m TTS.SetGlobalProperties came after activation in " .. tostring(TimeToSetPropReqAfterActivation) .. " ms, expected time 20000 ms \27[0m " ) + return false + else + print( "\27[32m TTS.SetGlobalProperties came after activation in " .. tostring(TimeToSetPropReqAfterActivation) .. " ms, expected time 20000 ms \27[0m " ) + return true + end + end) + + --mobile side: expect OnHashChange notification + EXPECT_NOTIFICATION("OnHashChange") + :Timeout(27000) + :Times(0) + + DelayedExp(2000) + end + + + function Test:End_TC_SetGlobalProperties_6_2() + print("--------------------------------------------------------") + end + --End test case SequenceCheck.6.2 + ----------------------------------------------------------------------------------------- + ]] + + +--End test suit SequenceCheck + + +---------------------------------------------------------------------------------------------- +-----------------------------------------VII TEST BLOCK---------------------------------------- +--------------------------------------Different HMIStatus------------------------------------- +---------------------------------------------------------------------------------------------- +--Description: processing of request/response in different HMIlevels, SystemContext, AudioStreamingState + +--Begin test suit DifferentHMIlevel +--Description: processing API in different HMILevel + + --Requirement id in JAMA: SDLAQ-CRS-764 + + --Verification criteria: SDL allows request in FULL, LIMITED, BACKGROUND HMI levels + + + --Begin test case DifferentHMIlevel.1 + --Description: Check SetGlobalProperties request when application is in NONE HMI level + + commonSteps:UnregisterApplication() + + commonSteps:StartSession() + + function Test:RegisterApp_forTestingDiffHMIlevels() + --RegisterAppAndVerifyTTSGetProperties() + + self.mobileSession:StartService(7) + :Do(function() + local CorIdRegister = self.mobileSession:SendRPC("RegisterAppInterface", config.application1.registerAppInterfaceParams) + EXPECT_HMINOTIFICATION("BasicCommunication.OnAppRegistered", + { + application = + { + appName = config.application1.registerAppInterfaceParams.appName + } + }) + :Do(function(_,data) + self.applications[data.params.application.appName] = data.params.application.appID + end) + + self.mobileSession:ExpectResponse(CorIdRegister, { success = true, resultCode = "SUCCESS" }) + :Timeout(2000) + + self.mobileSession:ExpectNotification("OnHMIStatus", {hmiLevel = "NONE", audioStreamingState = "NOT_AUDIBLE", systemContext = "MAIN"}) + end) + + end + + commonSteps:ActivationApp() + + -- Precondition: Change app to NONE HMI level + commonSteps:DeactivateAppToNoneHmiLevel() + + --Precondition: PutFile "action.png" + function Test:Step_PutFile() + + local cid = self.mobileSession:SendRPC( + "PutFile", + { + syncFileName = "action.png", + fileType = "GRAPHIC_PNG" + }, + "files/action.png" + ) + EXPECT_RESPONSE(cid, { success = true, resultCode = "SUCCESS" }) + + end + + function Test:SetGlobalProperties_HMILevelNONE_DISALLOWED() + + --mobile side: sending SetGlobalProperties request + local cid = self.mobileSession:SendRPC("SetGlobalProperties", + { + menuTitle = "Menu Title", + timeoutPrompt = + { + { + text = "Timeout prompt", + type = "TEXT" + } + }, + vrHelp = + { + { + position = 1, + image = + { + value = "action.png", + imageType = "DYNAMIC" + }, + text = "VR help item" + } + }, + menuIcon = + { + value = "action.png", + imageType = "DYNAMIC" + }, + helpPrompt = + { + { + text = "Help prompt", + type = "TEXT" + } + }, + vrHelpTitle = "VR help title", + keyboardProperties = + { + keyboardLayout = "QWERTY", + keypressMode = "SINGLE_KEYPRESS", + limitedCharacterList = + { + "a" + }, + language = "EN-US", + autoCompleteText = "Daemon, Freedom" + } + }) + + --mobile side: expect SetGlobalProperties response + EXPECT_RESPONSE(cid, { success = false, resultCode = "DISALLOWED"}) + :Timeout(12000) + + --mobile side: expect OnHashChange notification is not send to mobile + EXPECT_NOTIFICATION("OnHashChange") + :Times(0) + end + + --Postcondition: Activate app + commonSteps:ActivationApp() + + --End test case DifferentHMIlevel.1 + ----------------------------------------------------------------------------------------- + + + --Begin test case DifferentHMIlevel.2 + --Description: Check SetGlobalProperties request when application is in LIMITTED HMI level + + if commonFunctions:isMediaApp() then + + -- Precondition: Change app to LIMITED + commonSteps:ChangeHMIToLimited() + + function Test:SetGlobalProperties_HMILevelLimitted_SUCCESS() + + --mobile side: sending SetGlobalProperties request + local cid = self.mobileSession:SendRPC("SetGlobalProperties", + { + menuTitle = "Menu Title", + timeoutPrompt = + { + { + text = "Timeout prompt", + type = "TEXT" + } + }, + vrHelp = + { + { + position = 1, + image = + { + value = "action.png", + imageType = "DYNAMIC" + }, + text = "VR help item" + } + }, + menuIcon = + { + value = "action.png", + imageType = "DYNAMIC" + }, + helpPrompt = + { + { + text = "Help prompt", + type = "TEXT" + } + }, + vrHelpTitle = "VR help title", + keyboardProperties = + { + keyboardLayout = "QWERTY", + keypressMode = "SINGLE_KEYPRESS", + limitedCharacterList = + { + "a" + }, + language = "EN-US", + autoCompleteText = "Daemon, Freedom" + } + }) + + + --hmi side: expect TTS.SetGlobalProperties request + EXPECT_HMICALL("TTS.SetGlobalProperties", + { + timeoutPrompt = + { + { + text = "Timeout prompt", + type = "TEXT" + } + }, + helpPrompt = + { + { + text = "Help prompt", + type = "TEXT" + } + } + }) + :Timeout(iTimeout) + :Do(function(_,data) + --hmi side: sending UI.SetGlobalProperties response + self.hmiConnection:SendResponse(data.id, data.method, "SUCCESS", {}) + end) + + + + --hmi side: expect UI.SetGlobalProperties request + EXPECT_HMICALL("UI.SetGlobalProperties", + { + menuTitle = "Menu Title", + vrHelp = + { + { + position = 1, + --[=[ TODO: update after resolving APPLINK-16052 + + image = + { + imageType = "DYNAMIC", + value = strAppFolder .. "action.png" + },]=] + text = "VR help item" + } + }, + --Checked below + -- menuIcon = + -- { + -- imageType = "DYNAMIC", + -- value = strAppFolder .. "action.png" + -- }, + vrHelpTitle = "VR help title", + keyboardProperties = + { + keyboardLayout = "QWERTY", + keypressMode = "SINGLE_KEYPRESS", + --[=[ TODO: update after resolving APPLINK-16047 + + limitedCharacterList = + { + "a" + },]=] + language = "EN-US", + autoCompleteText = "Daemon, Freedom" + } + }) + :Timeout(iTimeout) + :ValidIf(function(_,data) + return Check_menuIconParams(data) + end) + :Do(function(_,data) + --hmi side: sending UI.SetGlobalProperties response + self.hmiConnection:SendResponse(data.id, data.method, "SUCCESS", {}) + end) + + + + --mobile side: expect SetGlobalProperties response + EXPECT_RESPONSE(cid, { success = true, resultCode = "SUCCESS"}) + :Timeout(iTimeout) + + --mobile side: expect OnHashChange notification is not send to mobile + EXPECT_NOTIFICATION("OnHashChange") + :Times(0) + end + + end + --End test case DifferentHMIlevel.2 + ----------------------------------------------------------------------------------------- + + --Begin test case DifferentHMIlevel.3 + --Description: Check SetGlobalProperties request when application is in BACKGOUND HMI level + + + -- Precondition 1: Change app to BACKGOUND HMI level + commonTestCases:ChangeAppToBackgroundHmiLevel() + + function Test:SetGlobalProperties_HMILevelBACKGOUND_SUCCESS() + + --mobile side: sending SetGlobalProperties request + local cid = self.mobileSession:SendRPC("SetGlobalProperties", + { + menuTitle = "Menu Title", + timeoutPrompt = + { + { + text = "Timeout prompt", + type = "TEXT" + } + }, + vrHelp = + { + { + position = 1, + image = + { + value = "action.png", + imageType = "DYNAMIC" + }, + text = "VR help item" + } + }, + menuIcon = + { + value = "action.png", + imageType = "DYNAMIC" + }, + helpPrompt = + { + { + text = "Help prompt", + type = "TEXT" + } + }, + vrHelpTitle = "VR help title", + keyboardProperties = + { + keyboardLayout = "QWERTY", + keypressMode = "SINGLE_KEYPRESS", + limitedCharacterList = + { + "a" + }, + language = "EN-US", + autoCompleteText = "Daemon, Freedom" + } + }) + + + --hmi side: expect TTS.SetGlobalProperties request + EXPECT_HMICALL("TTS.SetGlobalProperties", + { + timeoutPrompt = + { + { + text = "Timeout prompt", + type = "TEXT" + } + }, + helpPrompt = + { + { + text = "Help prompt", + type = "TEXT" + } + } + }) + :Timeout(iTimeout) + :Do(function(_,data) + --hmi side: sending UI.SetGlobalProperties response + self.hmiConnection:SendResponse(data.id, data.method, "SUCCESS", {}) + end) + + + + --hmi side: expect UI.SetGlobalProperties request + EXPECT_HMICALL("UI.SetGlobalProperties", + { + menuTitle = "Menu Title", + vrHelp = + { + { + position = 1, + --[=[ TODO: update after resolving APPLINK-16052 + + image = + { + imageType = "DYNAMIC", + value = strAppFolder .. "action.png" + },]=] + text = "VR help item" + } + }, + --Checked below + -- menuIcon = + -- { + -- imageType = "DYNAMIC", + -- value = strAppFolder .. "action.png" + -- }, + vrHelpTitle = "VR help title", + keyboardProperties = + { + keyboardLayout = "QWERTY", + keypressMode = "SINGLE_KEYPRESS", + --[=[ TODO: update after resolving APPLINK-16047 + + limitedCharacterList = + { + "a" + },]=] + language = "EN-US", + autoCompleteText = "Daemon, Freedom" + } + }) + :Timeout(iTimeout) + :ValidIf(function(_,data) + return Check_menuIconParams(data) + end) + :Do(function(_,data) + --hmi side: sending UI.SetGlobalProperties response + self.hmiConnection:SendResponse(data.id, data.method, "SUCCESS", {}) + end) + + + + --mobile side: expect SetGlobalProperties response + EXPECT_RESPONSE(cid, { success = true, resultCode = "SUCCESS"}) + :Timeout(iTimeout) + + --mobile side: expect OnHashChange notification is not send to mobile + EXPECT_NOTIFICATION("OnHashChange") + :Times(0) + end + + --End test case DifferentHMIlevel.3 + + ----------------------------------------------------------------------------------------- +--------------------------------------------------------------------------------------------- +-------------------------------------------Postconditions------------------------------------- +--------------------------------------------------------------------------------------------- + + function Test:RemoveConfigurationFiles() + commonPreconditions:RestoreFile("sdl_preloaded_pt.json") + end + --End test suit DifferentHMIlevel + +return Test + diff --git a/test_scripts/ATF_SetMediaClockTimer.lua b/test_scripts/API/ATF_SetMediaClockTimer.lua similarity index 88% rename from test_scripts/ATF_SetMediaClockTimer.lua rename to test_scripts/API/ATF_SetMediaClockTimer.lua index 7f66d21cb0..6381f26edf 100644 --- a/test_scripts/ATF_SetMediaClockTimer.lua +++ b/test_scripts/API/ATF_SetMediaClockTimer.lua @@ -1,7 +1,5 @@ --Note: List of existing defects: ---APPLINK-13047: SDL returns INVALID_DATA to mobile when send SetMediaClockTimer with only updateMode:PAUSE (TC: SetMediaClockTimer_OnlyMandatory_) ---APPLINK-13417: SDL writes ERROR in log and ignore all responses after HMI send UI.SetMediaClockTimer response with fake parameter ---APPLINK-13418: SDL ignores all responses from HMI after received response with invalid JSON syntax +--APPLINK-13417: SDL writes ERROR in log and ignore all responses after HMI send UI.SetMediaClockTimer response with fake parameter --ToDO: will be updated according to APPLINK-14765 --------------------------------------------------------------------------------------------- @@ -13,7 +11,21 @@ local mobile = require('mobile_connection') local tcp = require('tcp_connection') local file_connection = require('file_connection') +--------------------------------------------------------------------------------------------- +-----------------------------Required Shared Libraries--------------------------------------- +--------------------------------------------------------------------------------------------- +require('user_modules/AppTypes') +local commonFunctions = require('user_modules/shared_testcases/commonFunctions') +local commonSteps = require('user_modules/shared_testcases/commonSteps') +local commonPreconditions = require('user_modules/shared_testcases/commonPreconditions') +local commonTestCases = require('user_modules/shared_testcases/commonTestCases') +local policyTable = require('user_modules/shared_testcases/testCasesForPolicyTable') +local integerParameter = require('user_modules/shared_testcases/testCasesForIntegerParameter') +local stringParameter = require('user_modules/shared_testcases/testCasesForStringParameter') +local arraySoftButtonsParameter = require('user_modules/shared_testcases/testCasesForArraySoftButtonsParameter') +--------------------------------------------------------------------------------------------- +APIName = "SetMediaClockTimer" -- set request name local iTimeout = 5000 local updateModeNotRequireStartEndTime = {"PAUSE", "RESUME", "CLEAR"} local updateMode = {"COUNTUP", "COUNTDOWN", "PAUSE", "RESUME", "CLEAR"} @@ -24,7 +36,6 @@ local OutBound60 = {-1, 60} local str1000Chars = "1_0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnopqrstuvwxyz" .. string.rep("a",935) local str1000Chars2 = "2_0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnopqrstuvwxyz" .. string.rep("a",935) -config.deviceMAC = "12ca17b49af2289436f303e0166030a21e525d266e209267433801a8fd4071a0" local info = {"a", str1000Chars} local infoName = {"LowerBound", "UpperBound"} @@ -42,10 +53,16 @@ end --------------------------------------------------------------------------------------------- -------------------------------------------Preconditions------------------------------------- --------------------------------------------------------------------------------------------- - --Begin Precondition.1 - --Description: Activation App by sending SDL.ActivateApp + --Print new line to separate Preconditions + commonFunctions:newTestCasesGroup("Preconditions") + + --Delete app_info.dat, logs and policy table + commonSteps:DeleteLogsFileAndPolicyTable() + + --Activation App by sending SDL.ActivateApp + function Test:ActivateApplication() --HMI send ActivateApp request local RequestId = self.hmiConnection:SendRequest("SDL.ActivateApp", { appID = self.applications["Test Application"]}) @@ -69,16 +86,13 @@ end end end) - EXPECT_NOTIFICATION("OnHMIStatus", {hmiLevel = "FULL", systemContext = "MAIN"}) + EXPECT_NOTIFICATION("OnHMIStatus", {hmiLevel = "FULL", systemContext = "MAIN"}) end - --End Precondition.1 - - ----------------------------------------------------------------------------------------- - - - + --2. Update policy to allow request + --TODO: Will be updated after policy flow implementation + policyTable:precondition_updatePolicy_AllowFunctionInHmiLeves({"BACKGROUND", "FULL", "LIMITED"}) --------------------------------------------------------------------------------------------- -----------------------------------------I TEST BLOCK---------------------------------------- @@ -86,6 +100,10 @@ end --------------------------------------------------------------------------------------------- --Begin test suit CommonRequestCheck + + --Print new line to separate test suite + commonFunctions:newTestCasesGroup("Test Suite For CommonRequestCheck") + --Description: -- request with all parameters -- request with only mandatory parameters @@ -99,13 +117,13 @@ end --Begin test case CommonRequestCheck.1 --Description: check request with all parameters - + --Requirement id in JAMA/or Jira ID: SDLAQ-CRS-61 --Verification criteria: Sets the initial media clock value and automatic update method for HMI media screen with all parameters - - - for i=1,#updateModeCountUpDown do + + + for i=1,#updateModeCountUpDown do Test["SetMediaClockTimer_PositiveCase_" .. tostring(updateModeCountUpDown[i]).."_SUCCESS"] = function(self) countDown = 0 if updateModeCountUpDown[i] == "COUNTDOWN" then @@ -115,57 +133,57 @@ end --mobile side: sending SetMediaClockTimer request local cid = self.mobileSession:SendRPC("SetMediaClockTimer", { - startTime = + startTime = { hours = 0, minutes = 1, seconds = 33 }, - endTime = + endTime = { hours = 0, minutes = 1 + countDown, seconds = 35 - }, + }, updateMode = updateModeCountUpDown[i] }) - + --hmi side: expect UI.SetMediaClockTimer request EXPECT_HMICALL("UI.SetMediaClockTimer", { - startTime = + startTime = { hours = 0, minutes = 1, seconds = 33 }, - endTime = + endTime = { hours = 0, minutes = 1 + countDown, seconds = 35 - }, + }, updateMode = updateModeCountUpDown[i] }) - + :Timeout(iTimeout) :Do(function(_,data) --hmi side: sending UI.SetMediaClockTimer response self.hmiConnection:SendResponse(data.id, data.method, "SUCCESS", {}) end) - + --mobile side: expect SetMediaClockTimer response EXPECT_RESPONSE(cid, { success = true, resultCode = "SUCCESS"}) :Timeout(iTimeout) - + end - end + end --End test case CommonRequestCheck.1 - ----------------------------------------------------------------------------------------- - + ----------------------------------------------------------------------------------------- + --Begin test case CommonRequestCheck.2 --Description: check request with only mandatory parameters @@ -173,7 +191,7 @@ end --Requirement id in JAMA/or Jira ID: SDLAQ-CRS-61 --Verification criteria: Check request with mandatory parameter only: updateMode = "PAUSE", "RESUME" and "CLEAR" - + for i=1,#updateModeNotRequireStartEndTime do Test["SetMediaClockTimer_OnlyMandatory_" .. tostring(updateModeNotRequireStartEndTime[i]).."_SUCCESS"] = function(self) @@ -182,55 +200,55 @@ end { updateMode = updateModeNotRequireStartEndTime[i] }) - + --hmi side: expect UI.SetMediaClockTimer request EXPECT_HMICALL("UI.SetMediaClockTimer", { updateMode = updateModeNotRequireStartEndTime[i] }) - + :Timeout(iTimeout) :Do(function(_,data) --hmi side: sending UI.SetMediaClockTimer response self.hmiConnection:SendResponse(data.id, data.method, "SUCCESS", {}) end) - + --mobile side: expect SetMediaClockTimer response EXPECT_RESPONSE(cid, { success = true, resultCode = "SUCCESS"}) :Timeout(iTimeout) - + end - end - + end + --End test case CommonRequestCheck.2 ----------------------------------------------------------------------------------------- - + --Skipped CommonRequestCheck.3-4: There next checks are not applicable: -- request with all combinations of conditional-mandatory parameters (if exist) -- request with one by one conditional parameters (each case - one conditional parameter) ----------------------------------------------------------------------------------------- - - + + --Begin test case CommonRequestCheck.5 --Description: check request with missing mandatory parameters one by one (each case - missing one mandatory parameter) - + --Requirement id in JAMA/or Jira ID: SDLAQ-CRS-515 --Verification criteria: The request without "updateMode" is sent, the INVALID_DATA response code is returned. - + function Test:SetMediaClockTimer_missing_mandatory_parameters_updateMode_INVALID_DATA() - + --mobile side: sending SetMediaClockTimer request local cid = self.mobileSession:SendRPC("SetMediaClockTimer", { - startTime = + startTime = { hours = 0, minutes = 1, seconds = 33 }, - endTime = + endTime = { hours = 0, minutes = 1, @@ -241,48 +259,48 @@ end --mobile side: expect SetMediaClockTimer response EXPECT_RESPONSE(cid, { success = false, resultCode = "INVALID_DATA"}) :Timeout(iTimeout) - - end + + end --End test case CommonRequestCheck.5 - ----------------------------------------------------------------------------------------- - + ----------------------------------------------------------------------------------------- + --Begin test case CommonRequestCheck.6 --Description: check request with all parameters are missing - + --Requirement id in JAMA/or Jira ID: SDLAQ-CRS-61 --Verification criteria: SDL responses invalid data function Test:SetMediaClockTimer_AllParameterAreMissed_INVALID_DATA() - + --mobile side: sending ReSetMediaClockTimer request local cid = self.mobileSession:SendRPC("SetMediaClockTimer", { }) - + --mobile side: expect SetMediaClockTimer response EXPECT_RESPONSE(cid, { success = false, resultCode = "INVALID_DATA"}) :Timeout(iTimeout) - + end --End test case CommonRequestCheck.6 ----------------------------------------------------------------------------------------- - + --Begin test case CommonRequestCheck.7 --Description: check request with fake parameters (fake - not from protocol, from another request) --Requirement id in JAMA/or Jira ID: APPLINK-4518 --Verification criteria: According to xml tests by Ford team all fake parameters should be ignored by SDL - + --Begin test case CommonRequestCheck.7.1 --Description: Check request with fake parameters - + for i=1,#updateMode do Test["SetMediaClockTimer_FakeParameters_" .. tostring(updateMode[i]).."_SUCCESS"] = function(self) countDown = 0 @@ -294,39 +312,39 @@ end local cid = self.mobileSession:SendRPC("SetMediaClockTimer", { fakeParameter = "fakeParameter", - startTime = + startTime = { hours = 0, minutes = 1, seconds = 33 }, - endTime = + endTime = { hours = 0, minutes = 1 + countDown, seconds = 35 - }, + }, updateMode = updateMode[i] }) - + --hmi side: expect UI.SetMediaClockTimer request EXPECT_HMICALL("UI.SetMediaClockTimer", { - startTime = + startTime = { hours = 0, minutes = 1, seconds = 33 }, - endTime = + endTime = { hours = 0, minutes = 1 + countDown, seconds = 35 - }, + }, updateMode = updateMode[i] - }) + }) :Timeout(iTimeout) :Do(function(_,data) --hmi side: sending UI.SetMediaClockTimer response @@ -336,25 +354,25 @@ end if data.params.fakeParameter then print("SDL resends fake parameter to HMI") return false - else + else return true end end) - + --mobile side: expect SetMediaClockTimer response EXPECT_RESPONSE(cid, { success = true, resultCode = "SUCCESS"}) :Timeout(iTimeout) - + end - end + end --End test case CommonRequestCheck.7.1 ----------------------------------------------------------------------------------------- - + --Begin test case CommonRequestCheck.7.2 --Description: Check request with parameters of other request - + for i=1,#updateMode do Test["SetMediaClockTimer_ParametersOfOtherRequest_" .. tostring(updateMode[i]).."_SUCCESS"] = function(self) countDown = 0 @@ -366,39 +384,39 @@ end local cid = self.mobileSession:SendRPC("SetMediaClockTimer", { syncFileName = "icon.png", --PutFile request - startTime = + startTime = { hours = 0, minutes = 1, seconds = 33 }, - endTime = + endTime = { hours = 0, minutes = 1 + countDown, seconds = 35 - }, + }, updateMode = updateMode[i] }) - + --hmi side: expect UI.SetMediaClockTimer request EXPECT_HMICALL("UI.SetMediaClockTimer", { - startTime = + startTime = { hours = 0, minutes = 1, seconds = 33 }, - endTime = + endTime = { hours = 0, minutes = 1 + countDown, seconds = 35 - }, + }, updateMode = updateMode[i] - }) + }) :Timeout(iTimeout) :Do(function(_,data) --hmi side: sending UI.SetMediaClockTimer response @@ -408,38 +426,38 @@ end if data.params.syncFileName then print("SDL resends parameter of other request to HMI") return false - else + else return true end end) - + --mobile side: expect SetMediaClockTimer response EXPECT_RESPONSE(cid, { success = true, resultCode = "SUCCESS"}) :Timeout(iTimeout) - + end - end + end --End test case CommonRequestCheck.7.2 - ----------------------------------------------------------------------------------------- - - --End test case CommonRequestCheck.7 + ----------------------------------------------------------------------------------------- + + --End test case CommonRequestCheck.7 --Begin test case CommonRequestCheck.8 --Description: Check request is sent with invalid JSON structure - + --Requirement id in JAMA/or Jira ID: SDLAQ-CRS-395 --Verification criteria: The request with wrong JSON syntax is sent, the response comes with INVALID_DATA result code. function Test:SetMediaClockTimer_InvalidJSON_INVALID_DATA() - + self.mobileSession.correlationId = self.mobileSession.correlationId + 1 - local msg = + local msg = { serviceType = 7, frameInfo = 0, @@ -451,72 +469,72 @@ end payload = '{"startTime" {"seconds":34,"hours":0,"minutes":12},"endTime":{"seconds":33,"hours":11,"minutes":22},"updateMode":"COUNTUP"}' } self.mobileSession:Send(msg) - - self.mobileSession:ExpectResponse(self.mobileSession.correlationId, { success = false, resultCode = "INVALID_DATA" }) - + + self.mobileSession:ExpectResponse(self.mobileSession.correlationId, { success = false, resultCode = "INVALID_DATA" }) + end --End test case CommonRequestCheck.8 ----------------------------------------------------------------------------------------- - + --Begin test case CommonRequestCheck.9 - --Description: CorrelationId is duplicated + --Description: CorrelationId is duplicated - --Requirement id in JAMA/or Jira ID: + --Requirement id in JAMA/or Jira ID: --Verification criteria: response comes with SUCCESS result code. function Test:SetMediaClockTimer_CorrelationID_Duplicated_SUCCESS() - + --mobile side: sending SetMediaClockTimer request local cid = self.mobileSession:SendRPC("SetMediaClockTimer", { - startTime = + startTime = { hours = 0, minutes = 1, seconds = 33 }, - endTime = + endTime = { hours = 0, minutes = 1, seconds = 35 - }, + }, updateMode = "COUNTUP" }) - + --hmi side: expect UI.SetMediaClockTimer request EXPECT_HMICALL("UI.SetMediaClockTimer", { - startTime = + startTime = { hours = 0, minutes = 1, seconds = 33 }, - endTime = + endTime = { hours = 0, minutes = 1, seconds = 35 - }, + }, updateMode = "COUNTUP" - }) + }) :Times(2) :Do(function(_,data) --hmi side: sending UI.SetMediaClockTimer response self.hmiConnection:SendResponse(data.id, data.method, "SUCCESS", {}) end) - - + + --mobile side: expect SetMediaClockTimer response EXPECT_RESPONSE(cid, { success = true, resultCode = "SUCCESS" }) :Times(2) :Do(function(exp,data) - if exp.occurences == 1 then - local msg = + if exp.occurences == 1 then + local msg = { serviceType = 7, frameInfo = 0, @@ -527,47 +545,47 @@ end } self.mobileSession:Send(msg) end - end) - + end) + end --End test case CommonRequestCheck.9 ----------------------------------------------------------------------------------------- - + local function Task_APPLINK_15934() - + --Begin test case CommonRequestCheck.10 --Description: StartTime without mandatory parameter - - --Requirement id in JAMA/or Jira ID: + + --Requirement id in JAMA/or Jira ID: --SDLAQ-CRS-61 --SDLAQ-CRS-515 --Verification criteria: The request with "startTime" and without updateMode value is sent, the INVALID_DATA response code is returned. - + function Test:SetMediaClockTimer_StartTimeMandatoryMissing() --mobile side: sending SetMediaClockTimer request with values of startTime only local cid = self.mobileSession:SendRPC("SetMediaClockTimer", { - startTime = + startTime = { hours = 0, minutes = 1, seconds = 33 } }) - + --mobile side: expect SetMediaClockTimer response EXPECT_RESPONSE(cid, { success = false, resultCode = "INVALID_DATA"}) :Timeout(iTimeout) end --End of TC CommonRequestCheck.10 ----------------------------------------------------------------------------------------- - + --Begin test case CommonRequestCheck.11 --Description: check request with missing endTime - - --Requirement id in JAMA/or Jira ID: + + --Requirement id in JAMA/or Jira ID: --SDLAQ-CRS-61 --SDLAQ-CRS-515 @@ -576,14 +594,14 @@ end --mobile side: sending SetMediaClockTimer request with values of endTime only local cid = self.mobileSession:SendRPC("SetMediaClockTimer", { - endTime = + endTime = { hours = 0, minutes = 1, seconds = 35 } }) - + --mobile side: expect SetMediaClockTimer response EXPECT_RESPONSE(cid, { success = false, resultCode = "INVALID_DATA"}) :Timeout(iTimeout) @@ -592,24 +610,24 @@ end ----------------------------------------------------------------------------------------- --Begin test case CommonRequestCheck.12 --Description: endTime less than startTime for COUNTUP - - --Requirement id in JAMA/or Jira ID: + + --Requirement id in JAMA/or Jira ID: --SDLAQ-CRS-61 --SDLAQ-CRS-515 --Verification criteria: The request with "endTime" provided for COUNTUP is less than startTime , the INVALID_DATA response code is returned. - + function Test:SetMediaClockTimer_endTimeLessStartTimeCOUNTUP() --mobile side: sending SetMediaClockTimer request local cid = self.mobileSession:SendRPC("SetMediaClockTimer", { - startTime = + startTime = { hours = 0, minutes = 12, seconds = 34 }, - endTime = + endTime = { hours = 0, minutes = 10, @@ -617,7 +635,7 @@ end }, updateMode="COUNTUP" }) - + --mobile side: expect SetMediaClockTimer response EXPECT_RESPONSE(cid, { success = false, resultCode = "INVALID_DATA"}) :Timeout(iTimeout) @@ -626,24 +644,24 @@ end ----------------------------------------------------------------------------------------- --Begin test case CommonRequestCheck.13 --Description: endTime less than startTime for COUNTDOWN - - --Requirement id in JAMA/or Jira ID: + + --Requirement id in JAMA/or Jira ID: --SDLAQ-CRS-61 --SDLAQ-CRS-515 --Verification criteria: The request with "endTime" provided for COUNTDOWN is greater than startTime , the INVALID_DATA response code is returned. - + function Test:SetMediaClockTimer_endTimeGreaterStartTimeCOUNTDOWN() --mobile side: sending SetMediaClockTimer request local cid = self.mobileSession:SendRPC("SetMediaClockTimer", { - startTime = + startTime = { hours = 0, minutes = 12, seconds = 34 }, - endTime = + endTime = { hours = 01, minutes = 20, @@ -651,7 +669,7 @@ end }, updateMode="COUNTDOWN" }) - + --mobile side: expect SetMediaClockTimer response EXPECT_RESPONSE(cid, { success = false, resultCode = "INVALID_DATA"}) :Timeout(iTimeout) @@ -660,22 +678,22 @@ end ------------------------------------------------------------------------------------------------------- --Begin test case CommonRequestCheck.14 - --Description: Resuming CountUp/CountDown Timer - - --Requirement id in JAMA/or Jira ID: + --Description: Resuming CountUp/CountDown Timer + + --Requirement id in JAMA/or Jira ID: --SDLAQ-CRS-61 --SDLAQ-CRS-515 - --Verification criteria: + --Verification criteria: --The request with "COUNTUP" or "COUNTDOWN" updateMode value is sent, the SUCCESS response code is returned. --The request with "RESUME" updateMode value is sent, the IGNORED response code is returned. - + function Test:SetMediaClockTimer_ResumingCountUpDownTimer() --mobile side: sending SetMediaClockTimer request local cid = self.mobileSession:SendRPC("SetMediaClockTimer", { - startTime = + startTime = { hours = 00, minutes = 00, @@ -683,15 +701,15 @@ end }, updateMode = "COUNTUP" }) - + local cid1 = self.mobileSession:SendRPC("SetMediaClockTimer", { updateMode = "RESUME" }) - + local cid2 = self.mobileSession:SendRPC("SetMediaClockTimer", { - startTime = + startTime = { hours = 15, minutes = 15, @@ -699,12 +717,12 @@ end }, updateMode = "COUNTDOWN" }) - + local cid3 = self.mobileSession:SendRPC("SetMediaClockTimer", { updateMode = "RESUME" }) - + --hmi side: expect UI.SetMediaClockTimer request EXPECT_HMICALL("UI.SetMediaClockTimer") :Times(4) @@ -734,15 +752,15 @@ end --mobile side: expect SetMediaClockTimer response EXPECT_RESPONSE(cid3, { success = false, resultCode = "IGNORED", info = nil}) :Timeout(iTimeout) - + end --End of TC CommonRequestCheck.14 ------------------------------------------------------------------------------------------------------- end Task_APPLINK_15934() - - --End test suit CommonRequestCheck - + + --End test suit CommonRequestCheck + --------------------------------------------------------------------------------------------- @@ -757,17 +775,17 @@ end --Begin test suit PositiveRequestCheck --Description: check of each request parameter value in bound and boundary conditions - + --Begin test case PositiveRequestCheck.1 --Description: check of each request parameter value in bound and boundary conditions startTime parameter --Requirement id in JAMA/or Jira ID: SDLAQ-CRS-2635 - --Verification criteria: SDL re-sends startTime value to HMI within startTime parameter of UI.SetMediaClockTimer in case of any updateMode value that mobile app sends to SDL (that is, it is HMI`s responsibility to ignore startTime for PAUSE, RESUME, CLEAR and display the values correctly for COUNTUP and COUNTDOWN updateMode values). - + --Verification criteria: SDL re-sends startTime value to HMI within startTime parameter of UI.SetMediaClockTimer in case of any updateMode value that mobile app sends to SDL (that is, it is HMI`s responsibility to ignore startTime for PAUSE, RESUME, CLEAR and display the values correctly for COUNTUP and COUNTDOWN updateMode values). + --Begin test case PositiveRequestCheck.1.1 --Description: check startTime.seconds parameter value is in bound - + for i=1,#InBound60 do for j =1, #updateMode do Test["SetMediaClockTimer_startTime_seconds_InBound_" .. tostring(InBound60[i]) .."_"..tostring(updateMode[j]).."_SUCCESS"] = function(self) @@ -779,61 +797,61 @@ end --mobile side: sending SetMediaClockTimer request local cid = self.mobileSession:SendRPC("SetMediaClockTimer", { - startTime = + startTime = { hours = 0, minutes = 1, seconds = InBound60[i] }, - endTime = + endTime = { hours = 1 + countDown, minutes = 1 + countDown, seconds = 35 - }, + }, updateMode = updateMode[j] }) - + --hmi side: expect UI.SetMediaClockTimer request EXPECT_HMICALL("UI.SetMediaClockTimer", { - startTime = + startTime = { hours = 0, minutes = 1, seconds = InBound60[i] }, - endTime = + endTime = { hours = 1 + countDown, minutes = 1 + countDown, seconds = 35 - }, + }, updateMode = updateMode[j] }) - + :Timeout(iTimeout) :Do(function(_,data) --hmi side: sending UI.SetMediaClockTimer response self.hmiConnection:SendResponse(data.id, data.method, "SUCCESS", {}) end) - + --mobile side: expect SetMediaClockTimer response EXPECT_RESPONSE(cid, { success = true, resultCode = "SUCCESS"}) :Timeout(iTimeout) - + end end - end + end --End test case PositiveRequestCheck.1.1 ----------------------------------------------------------------------------------------- - + --Begin test case PositiveRequestCheck.1.2 --Description: check startTime.minutes parameter value is in bound - + for i=1,#InBound60 do for j =1, #updateMode do Test["SetMediaClockTimer_startTime_minutes_InBound_" .. tostring(InBound60[i]) .."_"..tostring(updateMode[j]).."_SUCCESS"] = function(self) @@ -845,61 +863,61 @@ end --mobile side: sending SetMediaClockTimer request local cid = self.mobileSession:SendRPC("SetMediaClockTimer", { - startTime = + startTime = { hours = 0, minutes = InBound60[i], seconds = 3 }, - endTime = + endTime = { hours = 1 + countDown, minutes = 0, seconds = 1 - }, + }, updateMode = updateMode[j] }) - + --hmi side: expect UI.SetMediaClockTimer request EXPECT_HMICALL("UI.SetMediaClockTimer", { - startTime = + startTime = { hours = 0, minutes = InBound60[i], seconds = 3 }, - endTime = + endTime = { hours = 1 + countDown, minutes = 0, seconds = 1 - }, + }, updateMode = updateMode[j] }) - + :Timeout(iTimeout) :Do(function(_,data) --hmi side: sending UI.SetMediaClockTimer response self.hmiConnection:SendResponse(data.id, data.method, "SUCCESS", {}) end) - + --mobile side: expect SetMediaClockTimer response EXPECT_RESPONSE(cid, { success = true, resultCode = "SUCCESS"}) :Timeout(iTimeout) - + end end - end + end --End test case PositiveRequestCheck.1.2 - ----------------------------------------------------------------------------------------- + ----------------------------------------------------------------------------------------- --Begin test case PositiveRequestCheck.1.3 --Description: check startTime.hours parameter value is in bound - + for i=1,#InBound60 do for j =1, #updateMode do Test["SetMediaClockTimer_startTime_hours_InBound_" .. tostring(InBound60[i]) .."_"..tostring(updateMode[j]).."_SUCCESS"] = function(self) @@ -910,59 +928,59 @@ end --mobile side: sending SetMediaClockTimer request local cid = self.mobileSession:SendRPC("SetMediaClockTimer", - { - startTime = + { + startTime = { hours = InBound60[i], minutes = 1, seconds = 33, }, - endTime = + endTime = { hours = InBound60[i], minutes = 1 + countDown, seconds = 35 - }, + }, updateMode = updateMode[j] }) - + --hmi side: expect UI.SetMediaClockTimer request EXPECT_HMICALL("UI.SetMediaClockTimer", { - startTime = + startTime = { hours = InBound60[i], minutes = 1, seconds = 33, }, - endTime = + endTime = { hours = InBound60[i], minutes = 1 + countDown, seconds = 35 - }, + }, updateMode = updateMode[j] }) - + :Timeout(iTimeout) :Do(function(_,data) --hmi side: sending UI.SetMediaClockTimer response self.hmiConnection:SendResponse(data.id, data.method, "SUCCESS", {}) end) - + --mobile side: expect SetMediaClockTimer response EXPECT_RESPONSE(cid, { success = true, resultCode = "SUCCESS"}) :Timeout(iTimeout) - + end end - end + end --End test case PositiveRequestCheck.1.3 - ----------------------------------------------------------------------------------------- - + ----------------------------------------------------------------------------------------- + --Begin test case PositiveRequestCheck.1.4 --Description: check endTime.seconds parameter value is in bound @@ -977,61 +995,61 @@ end --mobile side: sending SetMediaClockTimer request local cid = self.mobileSession:SendRPC("SetMediaClockTimer", { - startTime = + startTime = { hours = 0, minutes = 1, seconds = 0 }, - endTime = + endTime = { hours = 0, minutes = 1 + countDown, seconds = InBound60[i] - }, + }, updateMode = updateMode[j] }) - + --hmi side: expect UI.SetMediaClockTimer request EXPECT_HMICALL("UI.SetMediaClockTimer", { - startTime = + startTime = { hours = 0, minutes = 1, seconds = 0 }, - endTime = + endTime = { hours = 0, minutes = 1 + countDown, seconds = InBound60[i] - }, + }, updateMode = updateMode[j] }) - + :Timeout(iTimeout) :Do(function(_,data) --hmi side: sending UI.SetMediaClockTimer response self.hmiConnection:SendResponse(data.id, data.method, "SUCCESS", {}) end) - + --mobile side: expect SetMediaClockTimer response EXPECT_RESPONSE(cid, { success = true, resultCode = "SUCCESS"}) :Timeout(iTimeout) - + end end - end + end --End test case PositiveRequestCheck.1.4 ----------------------------------------------------------------------------------------- - + --Begin test case PositiveRequestCheck.1.5 --Description: check endTime.minutes parameter value is in bound - + for i=1,#InBound60 do for j =1, #updateMode do Test["SetMediaClockTimer_endTime_minutes_InBound_" .. tostring(InBound60[i]) .."_"..tostring(updateMode[j]).."_SUCCESS"] = function(self) @@ -1043,61 +1061,61 @@ end --mobile side: sending SetMediaClockTimer request local cid = self.mobileSession:SendRPC("SetMediaClockTimer", { - startTime = + startTime = { hours = 1, minutes = 0, seconds = 3 }, - endTime = + endTime = { hours = 1 + countDown, minutes = InBound60[i], seconds = 4 - }, + }, updateMode = updateMode[j] }) - + --hmi side: expect UI.SetMediaClockTimer request EXPECT_HMICALL("UI.SetMediaClockTimer", { - startTime = + startTime = { hours = 1, minutes = 0, seconds = 3 }, - endTime = + endTime = { hours = 1 + countDown, minutes = InBound60[i], seconds = 4 - }, + }, updateMode = updateMode[j] }) - + :Timeout(iTimeout) :Do(function(_,data) --hmi side: sending UI.SetMediaClockTimer response self.hmiConnection:SendResponse(data.id, data.method, "SUCCESS", {}) end) - + --mobile side: expect SetMediaClockTimer response EXPECT_RESPONSE(cid, { success = true, resultCode = "SUCCESS"}) :Timeout(iTimeout) - + end end - end + end --End test case PositiveRequestCheck.1.5 - ----------------------------------------------------------------------------------------- + ----------------------------------------------------------------------------------------- --Begin test case PositiveRequestCheck.1.6 --Description: check endTime.hours parameter value is in bound - + for i=1,#InBound60 do for j =1, #updateMode do Test["SetMediaClockTimer_endTime_hours_InBound_" .. tostring(InBound60[i]) .."_"..tostring(updateMode[j]).."_SUCCESS"] = function(self) @@ -1108,65 +1126,65 @@ end --mobile side: sending SetMediaClockTimer request local cid = self.mobileSession:SendRPC("SetMediaClockTimer", - { - startTime = + { + startTime = { hours = InBound60[i], minutes = 1, seconds = 33, }, - endTime = + endTime = { hours = InBound60[i], minutes = 1 + countDown, seconds = 35 - }, + }, updateMode = updateMode[j] }) - + --hmi side: expect UI.SetMediaClockTimer request EXPECT_HMICALL("UI.SetMediaClockTimer", { - startTime = + startTime = { hours = InBound60[i], minutes = 1, seconds = 33, }, - endTime = + endTime = { hours = InBound60[i], minutes = 1 + countDown, seconds = 35 - }, + }, updateMode = updateMode[j] }) - + :Timeout(iTimeout) :Do(function(_,data) --hmi side: sending UI.SetMediaClockTimer response self.hmiConnection:SendResponse(data.id, data.method, "SUCCESS", {}) end) - + --mobile side: expect SetMediaClockTimer response EXPECT_RESPONSE(cid, { success = true, resultCode = "SUCCESS"}) :Timeout(iTimeout) - + end end - end + end --End test case PositiveRequestCheck.1.6 - ----------------------------------------------------------------------------------------- - + ----------------------------------------------------------------------------------------- + --End test case PositiveRequestCheck.1 --End test suit PositiveRequestCheck - - + + --=================================================================================-- --------------------------------Positive response check------------------------------ --=================================================================================-- @@ -1174,18 +1192,18 @@ end --------Checks----------- -- parameters with values in boundary conditions - + --Begin test suit PositiveResponseCheck - --Description: Check positive responses - - + --Description: Check positive responses + + --Begin test case PositiveResponseCheck.1 --Description: Check info parameter when UI.SetMediaClockTimer response with min-length, max-length --Requirement id in JAMA/or Jira ID: SDLAQ-CRS-62 --Verification criteria: verify SDL forward info parameter from HMI response to Mobile - + for i=1,#info do for j =1, #updateMode do Test["UI_SetMediaClockTimer_Response_info_Parameter_InBound_" .. tostring(infoName[i]) .."_"..tostring(updateMode[j]).."_SUCCESS"] = function(self) @@ -1196,61 +1214,61 @@ end --mobile side: sending SetMediaClockTimer request local cid = self.mobileSession:SendRPC("SetMediaClockTimer", - { - startTime = + { + startTime = { hours = 0, minutes = 1, seconds = 33, }, - endTime = + endTime = { hours = 0, minutes = 1 + countDown, seconds = 35 - }, + }, updateMode = updateMode[j] }) - + --hmi side: expect UI.SetMediaClockTimer request EXPECT_HMICALL("UI.SetMediaClockTimer", { - startTime = + startTime = { hours = 0, minutes = 1, seconds = 33, }, - endTime = + endTime = { hours = 0, minutes = 1 + countDown, seconds = 35 - }, + }, updateMode = updateMode[j] }) - + :Timeout(iTimeout) :Do(function(_,data) --hmi side: sending UI.SetMediaClockTimer response self.hmiConnection:SendResponse(data.id, data.method, "SUCCESS", {info = info[i]}) end) - + --mobile side: expect SetMediaClockTimer response EXPECT_RESPONSE(cid, { success = true, resultCode = "SUCCESS", info = info[i]}) :Timeout(iTimeout) - + end end - end - + end + --End test case CommonRequestCheck.1 ----------------------------------------------------------------------------------------- - + --End test suit PositiveResponseCheck - + ---------------------------------------------------------------------------------------------- ----------------------------------------III TEST BLOCK---------------------------------------- @@ -1269,18 +1287,18 @@ end --Begin test suit NegativeRequestCheck --Description: check of each request parameter value out of bound, missing, with wrong type, empty, duplicate etc. - + --Begin test case NegativeRequestCheck.1 - --Description: check of each request parameter value out bound and boundary conditions + --Description: check of each request parameter value out bound and boundary conditions --Requirement id in JAMA/or Jira ID: SDLAQ-CRS-2635, SDLAQ-CRS-515 - --Verification criteria: + --Verification criteria: --2.1. The request with "hours" value out of bounds is sent, the response comes with INVALID_DATA result code (even if updateMode is not COUNTUP/COUNTDOWN). --2.2. The request with "minutes" value out of bounds is sent, the response comes with INVALID_DATA result code (even if updateMode is not COUNTUP/COUNTDOWN). --2.3. The request with "seconds" value out of bounds is sent, the response comes with INVALID_DATA result code (even if updateMode is not COUNTUP/COUNTDOWN). - --2.4. The request with wrong data in "updateMode" parameter (e.g. value which doesn't exist in "UpdateMode" enum) is sent , the response with INVALID_DATA result code is returned. - + --2.4. The request with wrong data in "updateMode" parameter (e.g. value which doesn't exist in "UpdateMode" enum) is sent , the response with INVALID_DATA result code is returned. + --Begin test case NegativeRequestCheck.1.1 --Description: Check startTime.seconds parameter value is in outbound @@ -1296,37 +1314,37 @@ end --mobile side: sending SetMediaClockTimer request local cid = self.mobileSession:SendRPC("SetMediaClockTimer", { - startTime = + startTime = { hours = 0, minutes = 1, seconds = OutBound60[i] }, - endTime = + endTime = { hours = 0, minutes = 1 + countDown, seconds = 35 - }, + }, updateMode = updateMode[j] }) --mobile side: expect SetMediaClockTimer response EXPECT_RESPONSE(cid, { success = false, resultCode = "INVALID_DATA"}) :Timeout(iTimeout) - + end end - end + end --End test case NegativeRequestCheck.1.1 ----------------------------------------------------------------------------------------- - + --Begin test case NegativeRequestCheck.1.2 --Description: Check startTime.minutes parameter value is in outbound - + for i=1,#OutBound60 do for j =1, #updateMode do Test["SetMediaClockTimer_startTime_minutes_OutBound_" .. tostring(OutBound60[i]) .."_"..tostring(updateMode[j]).."_INVALID_DATA"] = function(self) @@ -1338,33 +1356,33 @@ end --mobile side: sending SetMediaClockTimer request local cid = self.mobileSession:SendRPC("SetMediaClockTimer", { - startTime = + startTime = { hours = 0, minutes = OutBound60[i], seconds = 3 }, - endTime = + endTime = { hours = 1 + countDown, minutes = 0, seconds = 1 - }, + }, updateMode = updateMode[j] }) --mobile side: expect SetMediaClockTimer response EXPECT_RESPONSE(cid, { success = false, resultCode = "INVALID_DATA"}) :Timeout(iTimeout) - + end end - end + end + - --End test case NegativeRequestCheck.1.2 ----------------------------------------------------------------------------------------- - + --Begin test case NegativeRequestCheck.1.3 --Description: Check startTime.hours parameter value is in outbound @@ -1378,37 +1396,37 @@ end --mobile side: sending SetMediaClockTimer request local cid = self.mobileSession:SendRPC("SetMediaClockTimer", - { - startTime = + { + startTime = { hours = OutBound60[i], minutes = 1, seconds = 33, }, - endTime = + endTime = { hours = OutBound60[i], minutes = 1 + countDown, seconds = 35 - }, + }, updateMode = updateMode[j] }) --mobile side: expect SetMediaClockTimer response EXPECT_RESPONSE(cid, { success = false, resultCode = "INVALID_DATA"}) :Timeout(iTimeout) - + end end - end - + end + --End test case NegativeRequestCheck.1.3 ----------------------------------------------------------------------------------------- - + --Begin test case NegativeRequestCheck.1.4 --Description: Check endTime.seconds parameter value is in outbound - + for i=1,#OutBound60 do for j =1, #updateMode do Test["SetMediaClockTimer_endTime_seconds_OutBound_" .. tostring(OutBound60[i]) .."_"..tostring(updateMode[j]).."_INVALID_DATA"] = function(self) @@ -1420,33 +1438,33 @@ end --mobile side: sending SetMediaClockTimer request local cid = self.mobileSession:SendRPC("SetMediaClockTimer", { - startTime = + startTime = { hours = 0, minutes = 1, seconds = 0 }, - endTime = + endTime = { hours = 0, minutes = 1 + countDown, seconds = OutBound60[i] - }, + }, updateMode = updateMode[j] }) --mobile side: expect SetMediaClockTimer response EXPECT_RESPONSE(cid, { success = false, resultCode = "INVALID_DATA"}) :Timeout(iTimeout) - + end end - end - + end + --End test case NegativeRequestCheck.1.4 ----------------------------------------------------------------------------------------- - - + + --Begin test case NegativeRequestCheck.1.5 --Description: Check endTime.minutes parameter value is in outbound @@ -1461,32 +1479,32 @@ end --mobile side: sending SetMediaClockTimer request local cid = self.mobileSession:SendRPC("SetMediaClockTimer", { - startTime = + startTime = { hours = 1, minutes = 0, seconds = 3 }, - endTime = + endTime = { hours = 1 + countDown, minutes = OutBound60[i], seconds = 4 - }, + }, updateMode = updateMode[j] }) - + --mobile side: expect SetMediaClockTimer response EXPECT_RESPONSE(cid, { success = false, resultCode = "INVALID_DATA"}) :Timeout(iTimeout) - + end end - end + end --End test case NegativeRequestCheck.1.5 ----------------------------------------------------------------------------------------- - + --Begin test case NegativeRequestCheck.1.6 --Description: Check endTime.hours parameter value is in outbound @@ -1500,68 +1518,68 @@ end --mobile side: sending SetMediaClockTimer request local cid = self.mobileSession:SendRPC("SetMediaClockTimer", - { - startTime = + { + startTime = { hours = OutBound60[i], minutes = 1, seconds = 33, }, - endTime = + endTime = { hours = OutBound60[i], minutes = 1 + countDown, seconds = 35 - }, + }, updateMode = updateMode[j] }) --mobile side: expect SetMediaClockTimer response EXPECT_RESPONSE(cid, { success = false, resultCode = "INVALID_DATA"}) :Timeout(iTimeout) - + end end - end - + end + --End test case NegativeRequestCheck.1.6 ----------------------------------------------------------------------------------------- - + --Begin test case NegativeRequestCheck.1.7 --Description: check of each request parameter value out bound and boundary conditions updateMode parameter function Test:SetMediaClockTimer_updateMode_IsInvalidValue_WrongValue_Or_nonexistent_INVALID_DATA() - + --mobile side: sending SetMediaClockTimer request local cid = self.mobileSession:SendRPC("SetMediaClockTimer", - { - startTime = + { + startTime = { hours = 1, minutes = 1, seconds = 33, }, - endTime = + endTime = { hours = 1, minutes = 1, seconds = 35 - }, + }, updateMode = "updateMode" }) - + --mobile side: expect SetMediaClockTimer response EXPECT_RESPONSE(cid, { success = false, resultCode = "INVALID_DATA"}) :Timeout(iTimeout) - + end - + --End test case NegativeRequestCheck.1.7 ----------------------------------------------------------------------------------------- - + --End test case NegativeRequestCheck.1 - - + + --Begin test case NegativeRequestCheck.2 --Description: invalid values(empty, missing, nonexistent, duplicate, invalid characters) @@ -1571,176 +1589,176 @@ end --Requirement id in JAMA/or Jira ID: SDLAQ-CRS-515 - --Verification criteria: - --5.1.The request with empty "updateMode" is sent , the response with INVALID_DATA result code is returned. - --5.2.The request with empty "hours" value is sent , the response with INVALID_DATA result code is returned. - --5.3.The request with empty "minutes" value is sent, the response with INVALID_DATA result code is returned. - --5.4.The request with empty "seconds" value is sent, the response with INVALID_DATA result code is returned. - + --Verification criteria: + --5.1.The request with empty "updateMode" is sent , the response with INVALID_DATA result code is returned. + --5.2.The request with empty "hours" value is sent , the response with INVALID_DATA result code is returned. + --5.3.The request with empty "minutes" value is sent, the response with INVALID_DATA result code is returned. + --5.4.The request with empty "seconds" value is sent, the response with INVALID_DATA result code is returned. + --Begin test case NegativeRequestCheck.2.1.1 - --Description: 5.1.The request with empty "updateMode" is sent , the response with INVALID_DATA result code is returned. + --Description: 5.1.The request with empty "updateMode" is sent , the response with INVALID_DATA result code is returned. function Test:SetMediaClockTimer_updateMode_IsInvalidValue_Empty_INVALID_DATA() - + --mobile side: sending SetMediaClockTimer request local cid = self.mobileSession:SendRPC("SetMediaClockTimer", - { - startTime = + { + startTime = { hours = 1, minutes = 1, seconds = 33, }, - endTime = + endTime = { hours = 1, minutes = 1, seconds = 35 - }, + }, updateMode = "" }) - + --mobile side: expect SetMediaClockTimer response EXPECT_RESPONSE(cid, { success = false, resultCode = "INVALID_DATA"}) :Timeout(iTimeout) - + end - + --End test case NegativeRequestCheck.2.1.1 ----------------------------------------------------------------------------------------- - + --Begin test case NegativeRequestCheck.2.1.2 - --Description: 5.2.The request with empty "hours" value is sent , the response with INVALID_DATA result code is returned. - + --Description: 5.2.The request with empty "hours" value is sent , the response with INVALID_DATA result code is returned. + --startTime for j =1, #updateMode do Test["SetMediaClockTimer_startTime_hours_IsInvalidValue_Empty" .."_"..tostring(updateMode[j]).."_INVALID_DATA"] = function(self) --mobile side: sending SetMediaClockTimer request local cid = self.mobileSession:SendRPC("SetMediaClockTimer", - { - startTime = + { + startTime = { hours = "", minutes = 1, seconds = 33 }, - endTime = + endTime = { hours = 1, minutes = 1, seconds = 35 - }, + }, updateMode = updateMode[j] }) --mobile side: expect SetMediaClockTimer response EXPECT_RESPONSE(cid, { success = false, resultCode = "INVALID_DATA"}) :Timeout(iTimeout) - + end end - + --endTime for j =1, #updateMode do Test["SetMediaClockTimer_endTime_hours_IsInvalidValue_Empty" .."_"..tostring(updateMode[j]).."_INVALID_DATA"] = function(self) --mobile side: sending SetMediaClockTimer request local cid = self.mobileSession:SendRPC("SetMediaClockTimer", - { - startTime = + { + startTime = { hours = 1, minutes = 1, seconds = 33 }, - endTime = + endTime = { hours = "", minutes = 1, seconds = 35 - }, + }, updateMode = updateMode[j] }) --mobile side: expect SetMediaClockTimer response EXPECT_RESPONSE(cid, { success = false, resultCode = "INVALID_DATA"}) :Timeout(iTimeout) - + end end - + --End test case NegativeRequestCheck.2.1.2 - ----------------------------------------------------------------------------------------- - + ----------------------------------------------------------------------------------------- + --Begin test case NegativeRequestCheck.2.1.3 - --Description: 5.3.The request with empty "minutes" value is sent, the response with INVALID_DATA result code is returned. - + --Description: 5.3.The request with empty "minutes" value is sent, the response with INVALID_DATA result code is returned. + --startTime for j =1, #updateMode do Test["SetMediaClockTimer_startTime_minutes_IsInvalidValue_Empty" .."_"..tostring(updateMode[j]).."_INVALID_DATA"] = function(self) --mobile side: sending SetMediaClockTimer request local cid = self.mobileSession:SendRPC("SetMediaClockTimer", - { - startTime = + { + startTime = { hours = 0, minutes = "", seconds = 33 }, - endTime = + endTime = { hours = 1, minutes = 1, seconds = 35 - }, + }, updateMode = updateMode[j] }) --mobile side: expect SetMediaClockTimer response EXPECT_RESPONSE(cid, { success = false, resultCode = "INVALID_DATA"}) :Timeout(iTimeout) - + end end - + --endTime for j =1, #updateMode do Test["SetMediaClockTimer_endTime_minutes_IsInvalidValue_Empty" .."_"..tostring(updateMode[j]).."_INVALID_DATA"] = function(self) --mobile side: sending SetMediaClockTimer request local cid = self.mobileSession:SendRPC("SetMediaClockTimer", - { - startTime = + { + startTime = { hours = 0, minutes = 1, seconds = 33 }, - endTime = + endTime = { hours = 1, minutes = "", seconds = 35 - }, + }, updateMode = updateMode[j] }) --mobile side: expect SetMediaClockTimer response EXPECT_RESPONSE(cid, { success = false, resultCode = "INVALID_DATA"}) :Timeout(iTimeout) - + end end - + --End test case NegativeRequestCheck.2.1.3 - ----------------------------------------------------------------------------------------- + ----------------------------------------------------------------------------------------- --Begin test case NegativeRequestCheck.2.1.4 - --Description: 5.4.The request with empty "seconds" value is sent, the response with INVALID_DATA result code is returned. + --Description: 5.4.The request with empty "seconds" value is sent, the response with INVALID_DATA result code is returned. --startTime for j =1, #updateMode do @@ -1748,26 +1766,26 @@ end --mobile side: sending SetMediaClockTimer request local cid = self.mobileSession:SendRPC("SetMediaClockTimer", - { - startTime = + { + startTime = { hours = 0, minutes = 1, seconds = "" }, - endTime = + endTime = { hours = 1, minutes = 1, seconds = 35 - }, + }, updateMode = updateMode[j] }) --mobile side: expect SetMediaClockTimer response EXPECT_RESPONSE(cid, { success = false, resultCode = "INVALID_DATA"}) :Timeout(iTimeout) - + end end @@ -1777,32 +1795,32 @@ end --mobile side: sending SetMediaClockTimer request local cid = self.mobileSession:SendRPC("SetMediaClockTimer", - { - startTime = + { + startTime = { hours = 0, minutes = 1, seconds = 1 }, - endTime = + endTime = { hours = 1, minutes = 1, seconds = "" - }, + }, updateMode = updateMode[j] }) --mobile side: expect SetMediaClockTimer response EXPECT_RESPONSE(cid, { success = false, resultCode = "INVALID_DATA"}) :Timeout(iTimeout) - + end end - + --End test case NegativeRequestCheck.2.1.4 - ----------------------------------------------------------------------------------------- - + ----------------------------------------------------------------------------------------- + --End test case NegativeRequestCheck.2.1 @@ -1811,300 +1829,300 @@ end --Requirement id in JAMA/or Jira ID: SDLAQ-CRS-515 - --Verification criteria: + --Verification criteria: --3.1. The request without "updateMode" is sent, the INVALID_DATA response code is returned. --3.2. The request without "startTime" and with "COUNTUP" updateMode value is sent, the INVALID_DATA response code is returned. --3.3. The request without "startTime" and with "COUNTDOWN" updateMode value is sent, the INVALID_DATA response code is returned. - + --Begin test case NegativeRequestCheck.2.2.1 --Description: 3.1. The request without "updateMode" is sent, the INVALID_DATA response code is returned. function Test:SetMediaClockTimer_updateMode_IsInvalidValue_missing_INVALID_DATA() - + --mobile side: sending SetMediaClockTimer request local cid = self.mobileSession:SendRPC("SetMediaClockTimer", - { - startTime = + { + startTime = { hours = 1, minutes = 1, seconds = 33, }, - endTime = + endTime = { hours = 1, minutes = 1, seconds = 35 } }) - + --mobile side: expect SetMediaClockTimer response EXPECT_RESPONSE(cid, { success = false, resultCode = "INVALID_DATA"}) :Timeout(iTimeout) - + end - + --End test case NegativeRequestCheck.2.2.1 - ----------------------------------------------------------------------------------------- - + ----------------------------------------------------------------------------------------- + --Begin test case NegativeRequestCheck.2.2.2 - --Description: + --Description: --3.2. The request without "startTime" and with "COUNTUP" updateMode value is sent, the INVALID_DATA response code is returned. --3.3. The request without "startTime" and with "COUNTDOWN" updateMode value is sent, the INVALID_DATA response code is returned. - + --startTime for j =1, #updateModeCountUpDown do Test["SetMediaClockTimer_startTime_IsInvalidValue_missing" .."_"..tostring(updateModeCountUpDown[j]).."_INVALID_DATA"] = function(self) --mobile side: sending SetMediaClockTimer request local cid = self.mobileSession:SendRPC("SetMediaClockTimer", - { - endTime = + { + endTime = { hours = 1, minutes = 1, seconds = 35 - }, + }, updateMode = updateModeCountUpDown[j] }) --mobile side: expect SetMediaClockTimer response EXPECT_RESPONSE(cid, { success = false, resultCode = "INVALID_DATA"}) :Timeout(iTimeout) - + end end --End test case NegativeRequestCheck.2.2.2 - ----------------------------------------------------------------------------------------- - - --End test case NegativeRequestCheck.2.2 - + ----------------------------------------------------------------------------------------- + + --End test case NegativeRequestCheck.2.2 + --End test case NegativeRequestCheck.2 - - + + --Begin test case NegativeRequestCheck.3 --Description: parameters with wrong type --Requirement id in JAMA/or Jira ID: SDLAQ-CRS-515 - --Verification criteria: - --4.1. The request with wrong data in "hours" parameter (e.g. string value) is sent , the response with INVALID_DATA result code is returned. - --4.2. The request with wrong data in "minutes" parameter (e.g. string value) is sent , the response with INVALID_DATA result code is returned. - --4.3. The request with wrong data in "seconds" parameter (e.g. string value) is sent , the response with INVALID_DATA result code is returned. - --4.4. The request with wrong data in "updateMode" parameter (e.g. inetger value) is sent , the response with INVALID_DATA result code is returned. - + --Verification criteria: + --4.1. The request with wrong data in "hours" parameter (e.g. string value) is sent , the response with INVALID_DATA result code is returned. + --4.2. The request with wrong data in "minutes" parameter (e.g. string value) is sent , the response with INVALID_DATA result code is returned. + --4.3. The request with wrong data in "seconds" parameter (e.g. string value) is sent , the response with INVALID_DATA result code is returned. + --4.4. The request with wrong data in "updateMode" parameter (e.g. inetger value) is sent , the response with INVALID_DATA result code is returned. + --Begin test case NegativeRequestCheck.3.1 - --Description: 4.1. The request with wrong data in "hours" parameter (e.g. string value) is sent , the response with INVALID_DATA result code is returned. - + --Description: 4.1. The request with wrong data in "hours" parameter (e.g. string value) is sent , the response with INVALID_DATA result code is returned. + --startTime for j =1, #updateMode do Test["SetMediaClockTimer_startTime_hours_IsInvalidValue_wrongType" .."_"..tostring(updateMode[j]).."_INVALID_DATA"] = function(self) --mobile side: sending SetMediaClockTimer request local cid = self.mobileSession:SendRPC("SetMediaClockTimer", - { - startTime = + { + startTime = { hours = "1", minutes = 1, seconds = 33 }, - endTime = + endTime = { hours = 1, minutes = 1, seconds = 35 - }, + }, updateMode = updateMode[j] }) --mobile side: expect SetMediaClockTimer response EXPECT_RESPONSE(cid, { success = false, resultCode = "INVALID_DATA"}) :Timeout(iTimeout) - + end end - + --endTime for j =1, #updateMode do Test["SetMediaClockTimer_endTime_hours_IsInvalidValue_WrongType" .."_"..tostring(updateMode[j]).."_INVALID_DATA"] = function(self) --mobile side: sending SetMediaClockTimer request local cid = self.mobileSession:SendRPC("SetMediaClockTimer", - { - startTime = + { + startTime = { hours = 1, minutes = 1, seconds = 33 }, - endTime = + endTime = { hours = "1", minutes = 1, seconds = 35 - }, + }, updateMode = updateMode[j] }) --mobile side: expect SetMediaClockTimer response EXPECT_RESPONSE(cid, { success = false, resultCode = "INVALID_DATA"}) :Timeout(iTimeout) - + end end - + --End test case NegativeRequestCheck.3.1 - ----------------------------------------------------------------------------------------- - + ----------------------------------------------------------------------------------------- + --Begin test case NegativeRequestCheck.3.2 - --Description: 4.2. The request with wrong data in "minutes" parameter (e.g. string value) is sent , the response with INVALID_DATA result code is returned. - + --Description: 4.2. The request with wrong data in "minutes" parameter (e.g. string value) is sent , the response with INVALID_DATA result code is returned. + --startTime for j =1, #updateMode do Test["SetMediaClockTimer_startTime_minutes_IsInvalidValue_wrongType" .."_"..tostring(updateMode[j]).."_INVALID_DATA"] = function(self) --mobile side: sending SetMediaClockTimer request local cid = self.mobileSession:SendRPC("SetMediaClockTimer", - { - startTime = + { + startTime = { hours = 1, minutes = "1", seconds = 33 }, - endTime = + endTime = { hours = 1, minutes = 1, seconds = 35 - }, + }, updateMode = updateMode[j] }) --mobile side: expect SetMediaClockTimer response EXPECT_RESPONSE(cid, { success = false, resultCode = "INVALID_DATA"}) :Timeout(iTimeout) - + end end - + --endTime for j =1, #updateMode do Test["SetMediaClockTimer_endTime_minutes_IsInvalidValue_WrongType" .."_"..tostring(updateMode[j]).."_INVALID_DATA"] = function(self) --mobile side: sending SetMediaClockTimer request local cid = self.mobileSession:SendRPC("SetMediaClockTimer", - { - startTime = + { + startTime = { hours = 1, minutes = 1, seconds = 33 }, - endTime = + endTime = { hours = 1, minutes = "1", seconds = 35 - }, + }, updateMode = updateMode[j] }) --mobile side: expect SetMediaClockTimer response EXPECT_RESPONSE(cid, { success = false, resultCode = "INVALID_DATA"}) :Timeout(iTimeout) - + end end - + --End test case NegativeRequestCheck.3.2 - ----------------------------------------------------------------------------------------- + ----------------------------------------------------------------------------------------- --Begin test case NegativeRequestCheck.3.2 - --Description: 4.3. The request with wrong data in "seconds" parameter (e.g. string value) is sent , the response with INVALID_DATA result code is returned. - + --Description: 4.3. The request with wrong data in "seconds" parameter (e.g. string value) is sent , the response with INVALID_DATA result code is returned. + --startTime for j =1, #updateMode do Test["SetMediaClockTimer_startTime_seconds_IsInvalidValue_wrongType" .."_"..tostring(updateMode[j]).."_INVALID_DATA"] = function(self) --mobile side: sending SetMediaClockTimer request local cid = self.mobileSession:SendRPC("SetMediaClockTimer", - { - startTime = + { + startTime = { hours = 1, minutes = 1, seconds = "33" }, - endTime = + endTime = { hours = 1, minutes = 1, seconds = 35 - }, + }, updateMode = updateMode[j] }) --mobile side: expect SetMediaClockTimer response EXPECT_RESPONSE(cid, { success = false, resultCode = "INVALID_DATA"}) :Timeout(iTimeout) - + end end - + --endTime for j =1, #updateMode do Test["SetMediaClockTimer_endTime_seconds_IsInvalidValue_WrongType" .."_"..tostring(updateMode[j]).."_INVALID_DATA"] = function(self) --mobile side: sending SetMediaClockTimer request local cid = self.mobileSession:SendRPC("SetMediaClockTimer", - { - startTime = + { + startTime = { hours = 1, minutes = 1, seconds = 33 }, - endTime = + endTime = { hours = 1, minutes = 1, seconds = "35" - }, + }, updateMode = updateMode[j] }) --mobile side: expect SetMediaClockTimer response EXPECT_RESPONSE(cid, { success = false, resultCode = "INVALID_DATA"}) :Timeout(iTimeout) - + end end - + --End test case NegativeRequestCheck.3.2 - ----------------------------------------------------------------------------------------- + ----------------------------------------------------------------------------------------- --Begin test case NegativeRequestCheck.3.3 - --Description: 4.4. The request with wrong data in "updateMode" parameter (e.g. integer value) is sent , the response with INVALID_DATA result code is returned. + --Description: 4.4. The request with wrong data in "updateMode" parameter (e.g. integer value) is sent , the response with INVALID_DATA result code is returned. function Test:SetMediaClockTimer_updateMode_IsInvalidValue_WrongType_INVALID_DATA() - + --mobile side: sending SetMediaClockTimer request local cid = self.mobileSession:SendRPC("SetMediaClockTimer", - { - startTime = + { + startTime = { hours = 1, minutes = 1, seconds = 33, }, - endTime = + endTime = { hours = 1, minutes = 1, @@ -2112,19 +2130,19 @@ end }, updateMode = 1 }) - + --mobile side: expect SetMediaClockTimer response EXPECT_RESPONSE(cid, { success = false, resultCode = "INVALID_DATA"}) :Timeout(iTimeout) - + end - + --End test case NegativeRequestCheck.3.3 - ----------------------------------------------------------------------------------------- - + ----------------------------------------------------------------------------------------- + --End test case NegativeRequestCheck.3 - - + + --End test suit NegativeRequestCheck @@ -2148,7 +2166,7 @@ end --Requirement id in JAMA/or Jira ID: SDLAQ-CRS-62, APPLINK-14551 --Verification criteria: verify SDL truncates info parameter then forwards it to Mobile - + for i=1,#infoOutBound do for j =1, #updateMode do Test["UI_SetMediaClockTimer_Response_info_Parameter_OutBound_" .. tostring(infoOutBound[i]) .."_"..tostring(updateMode[j]).."_SUCCESS"] = function(self) @@ -2159,58 +2177,58 @@ end --mobile side: sending SetMediaClockTimer request local cid = self.mobileSession:SendRPC("SetMediaClockTimer", - { - startTime = + { + startTime = { hours = 0, minutes = 1, seconds = 33, }, - endTime = + endTime = { hours = 0, minutes = 1 + countDown, seconds = 35 - }, + }, updateMode = updateMode[j] }) - + --hmi side: expect UI.SetMediaClockTimer request EXPECT_HMICALL("UI.SetMediaClockTimer", { - startTime = + startTime = { hours = 0, minutes = 1, seconds = 33, }, - endTime = + endTime = { hours = 0, minutes = 1 + countDown, seconds = 35 - }, + }, updateMode = updateMode[j] }) - + :Timeout(iTimeout) :Do(function(_,data) --hmi side: sending UI.SetMediaClockTimer response --self.hmiConnection:SendResponse(data.id, data.method, "SUCCESS", {info = infoOutBound[i]}) self.hmiConnection:SendError(data.id, data.method, "GENERIC_ERROR", infoOutBound[i]) end) - + --mobile side: expect SetMediaClockTimer response --EXPECT_RESPONSE(cid, { success = true, resultCode = "SUCCESS", info = infoOutBound_ToMobile[i]}) EXPECT_RESPONSE(cid, { success = false, resultCode = "GENERIC_ERROR", info = infoOutBound_ToMobile[i]}) - - + + end end - end - + end + --End test case CommonRequestCheck.1 ----------------------------------------------------------------------------------------- @@ -2218,14 +2236,14 @@ end --Begin test case NegativeResponseCheck.2 --Description: check negative response with invalid values(empty, missing, nonexistent, invalid characters) - + --Begin test case NegativeResponseCheck.2.1 --Description: check negative response from UI with invalid values(info is empty) --Requirement id in JAMA/or Jira ID: SDLAQ-CRS-62 --Verification criteria: SDL does not forward empty value of info to Mobile - + for j =1, #updateMode do Test["UI_SetMediaClockTimer_Response_info_Parameter_Empty_" ..tostring(updateMode[j]).."_SUCCESS"] = function(self) countDown = 0 @@ -2235,48 +2253,48 @@ end --mobile side: sending SetMediaClockTimer request local cid = self.mobileSession:SendRPC("SetMediaClockTimer", - { - startTime = + { + startTime = { hours = 0, minutes = 1, seconds = 33, }, - endTime = + endTime = { hours = 0, minutes = 1 + countDown, seconds = 35 - }, + }, updateMode = updateMode[j] }) - + --hmi side: expect UI.SetMediaClockTimer request EXPECT_HMICALL("UI.SetMediaClockTimer", { - startTime = + startTime = { hours = 0, minutes = 1, seconds = 33, }, - endTime = + endTime = { hours = 0, minutes = 1 + countDown, seconds = 35 - }, + }, updateMode = updateMode[j] }) - + :Timeout(iTimeout) :Do(function(_,data) --hmi side: sending UI.SetMediaClockTimer response --self.hmiConnection:SendResponse(data.id, data.method, "SUCCESS", {info = ""}) self.hmiConnection:SendError(data.id, data.method, "GENERIC_ERROR", "") end) - + --mobile side: expect SetMediaClockTimer response EXPECT_RESPONSE(cid, { success = false, resultCode = "GENERIC_ERROR"}) @@ -2284,25 +2302,25 @@ end if data.payload.info then print(" SDL resends empty value of info parameter to mobile app ") return false - else + else return true end end) - + end - end - - + end + + --End test case NegativeResponseCheck.2.1 ----------------------------------------------------------------------------------------- - + --Begin test case NegativeResponseCheck.2.2 --Description: check negative response from UI with invalid values(resultCode is empty) --Requirement id in JAMA/or Jira ID: SDLAQ-CRS-62 --Verification criteria: SDL responses INVALID_DATA to Mobile - + for j =1, #updateMode do Test["UI_SetMediaClockTimer_Response_resultCode_Parameter_Empty_" ..tostring(updateMode[j]).."_INVALID_DATA"] = function(self) countDown = 0 @@ -2312,67 +2330,67 @@ end --mobile side: sending SetMediaClockTimer request local cid = self.mobileSession:SendRPC("SetMediaClockTimer", - { - startTime = + { + startTime = { hours = 0, minutes = 1, seconds = 33, }, - endTime = + endTime = { hours = 0, minutes = 1 + countDown, seconds = 35 - }, + }, updateMode = updateMode[j] }) - + --hmi side: expect UI.SetMediaClockTimer request EXPECT_HMICALL("UI.SetMediaClockTimer", { - startTime = + startTime = { hours = 0, minutes = 1, seconds = 33, }, - endTime = + endTime = { hours = 0, minutes = 1 + countDown, seconds = 35 - }, + }, updateMode = updateMode[j] }) - + :Timeout(iTimeout) :Do(function(_,data) --hmi side: sending UI.SetMediaClockTimer response self.hmiConnection:SendResponse(data.id, data.method, "", {}) end) - + --mobile side: expect SetMediaClockTimer response EXPECT_RESPONSE(cid, { success = false, resultCode = "INVALID_DATA"}) - + end - end - - + end + + --End test case NegativeResponseCheck.2.2 - ----------------------------------------------------------------------------------------- - - + ----------------------------------------------------------------------------------------- + + --Begin test case NegativeResponseCheck.2.3 --Description: check negative response from UI with invalid values(info is missed) - --It is covered by test case SetMediaClockTimer_PositiveCase - + --It is covered by test case SetMediaClockTimer_PositiveCase + --End test case NegativeResponseCheck.2.3 - ----------------------------------------------------------------------------------------- + ----------------------------------------------------------------------------------------- --Begin test case NegativeResponseCheck.2.4 --Description: check negative response from UI with invalid values(method is missed) @@ -2380,7 +2398,7 @@ end --Requirement id in JAMA/or Jira ID: SDLAQ-CRS-62 --Verification criteria: SDL responses GENERIC_ERROR to Mobile - + for j =1, #updateMode do Test["UI_SetMediaClockTimer_Response_method_Parameter_Missed_" ..tostring(updateMode[j]).."_GENERIC_ERROR"] = function(self) countDown = 0 @@ -2390,59 +2408,59 @@ end --mobile side: sending SetMediaClockTimer request local cid = self.mobileSession:SendRPC("SetMediaClockTimer", - { - startTime = + { + startTime = { hours = 0, minutes = 1, seconds = 33, }, - endTime = + endTime = { hours = 0, minutes = 1 + countDown, seconds = 35 - }, + }, updateMode = updateMode[j] }) - + --hmi side: expect UI.SetMediaClockTimer request EXPECT_HMICALL("UI.SetMediaClockTimer", { - startTime = + startTime = { hours = 0, minutes = 1, seconds = 33, }, - endTime = + endTime = { hours = 0, minutes = 1 + countDown, seconds = 35 - }, + }, updateMode = updateMode[j] }) - + :Timeout(iTimeout) :Do(function(_,data) --hmi side: sending UI.SetMediaClockTimer response self.hmiConnection:Send('{"jsonrpc":"2.0","id":'..data.id..',"result":{"code":0}}') - + end) - + --mobile side: expect SetMediaClockTimer response EXPECT_RESPONSE(cid, { success = false, resultCode = "GENERIC_ERROR"}) :Timeout(12000) - + end - end - - + end + + --End test case NegativeResponseCheck.2.4 - ----------------------------------------------------------------------------------------- + ----------------------------------------------------------------------------------------- --Begin test case NegativeResponseCheck.2.5 --Description: check negative response from UI with invalid values(resultCode is missed) @@ -2450,7 +2468,7 @@ end --Requirement id in JAMA/or Jira ID: SDLAQ-CRS-62 --Verification criteria: SDL responses INVALID_DATA to Mobile - + for j =1, #updateMode do Test["UI_SetMediaClockTimer_Response_resultCode_Parameter_Missed_" ..tostring(updateMode[j]).."_INVALID_DATA"] = function(self) countDown = 0 @@ -2460,58 +2478,58 @@ end --mobile side: sending SetMediaClockTimer request local cid = self.mobileSession:SendRPC("SetMediaClockTimer", - { - startTime = + { + startTime = { hours = 0, minutes = 1, seconds = 33, }, - endTime = + endTime = { hours = 0, minutes = 1 + countDown, seconds = 35 - }, + }, updateMode = updateMode[j] }) - + --hmi side: expect UI.SetMediaClockTimer request EXPECT_HMICALL("UI.SetMediaClockTimer", { - startTime = + startTime = { hours = 0, minutes = 1, seconds = 33, }, - endTime = + endTime = { hours = 0, minutes = 1 + countDown, seconds = 35 - }, + }, updateMode = updateMode[j] }) - + :Timeout(iTimeout) :Do(function(_,data) --hmi side: sending UI.SetMediaClockTimer response self.hmiConnection:Send('{"jsonrpc":"2.0","id":'..data.id..',"result":{"method":"UI.SetMediaClockTimer"}}') - + end) - + --mobile side: expect SetMediaClockTimer response EXPECT_RESPONSE(cid, { success = false, resultCode = "INVALID_DATA"}) - + end - end - - + end + + --End test case NegativeResponseCheck.2.5 - ----------------------------------------------------------------------------------------- + ----------------------------------------------------------------------------------------- --Begin test case NegativeResponseCheck.2.6 --Description: check negative response from UI with invalid values(mandatory parameters is missed) @@ -2519,7 +2537,7 @@ end --Requirement id in JAMA/or Jira ID: SDLAQ-CRS-62 --Verification criteria: SDL responses GENERIC_ERROR to Mobile - + for j =1, #updateMode do Test["UI_SetMediaClockTimer_Response_Mandatory_Parameters_Missed_" ..tostring(updateMode[j]).."_GENERIC_ERROR"] = function(self) countDown = 0 @@ -2529,59 +2547,59 @@ end --mobile side: sending SetMediaClockTimer request local cid = self.mobileSession:SendRPC("SetMediaClockTimer", - { - startTime = + { + startTime = { hours = 0, minutes = 1, seconds = 33, }, - endTime = + endTime = { hours = 0, minutes = 1 + countDown, seconds = 35 - }, + }, updateMode = updateMode[j] }) - + --hmi side: expect UI.SetMediaClockTimer request EXPECT_HMICALL("UI.SetMediaClockTimer", { - startTime = + startTime = { hours = 0, minutes = 1, seconds = 33, }, - endTime = + endTime = { hours = 0, minutes = 1 + countDown, seconds = 35 - }, + }, updateMode = updateMode[j] }) - + :Timeout(iTimeout) :Do(function(_,data) --hmi side: sending UI.SetMediaClockTimer response self.hmiConnection:Send('{"jsonrpc":"2.0","id":'..data.id..',"result":{}}') - + end) - + --mobile side: expect SetMediaClockTimer response EXPECT_RESPONSE(cid, { success = false, resultCode = "GENERIC_ERROR"}) :Timeout(12000) - + end - end - - + end + + --End test case NegativeResponseCheck.2.6 - ----------------------------------------------------------------------------------------- + ----------------------------------------------------------------------------------------- --Begin test case NegativeResponseCheck.2.7 --Description: check negative response from UI with invalid values(all parameters is missed) @@ -2589,7 +2607,7 @@ end --Requirement id in JAMA/or Jira ID: SDLAQ-CRS-62 --Verification criteria: SDL responses INVALID_DATA to Mobile - + for j =1, #updateMode do Test["UI_SetMediaClockTimer_Response_All_Parameters_Missed_" ..tostring(updateMode[j]).."_GENERIC_ERROR"] = function(self) countDown = 0 @@ -2599,67 +2617,67 @@ end --mobile side: sending SetMediaClockTimer request local cid = self.mobileSession:SendRPC("SetMediaClockTimer", - { - startTime = + { + startTime = { hours = 0, minutes = 1, seconds = 33, }, - endTime = + endTime = { hours = 0, minutes = 1 + countDown, seconds = 35 - }, + }, updateMode = updateMode[j] }) - + --hmi side: expect UI.SetMediaClockTimer request EXPECT_HMICALL("UI.SetMediaClockTimer", { - startTime = + startTime = { hours = 0, minutes = 1, seconds = 33, }, - endTime = + endTime = { hours = 0, minutes = 1 + countDown, seconds = 35 - }, + }, updateMode = updateMode[j] }) - + :Timeout(iTimeout) :Do(function(_,data) --hmi side: sending UI.SetMediaClockTimer response self.hmiConnection:Send('{}') - + end) - + --mobile side: expect SetMediaClockTimer response EXPECT_RESPONSE(cid, { success = false, resultCode = "GENERIC_ERROR"}) :Timeout(12000) - + end - end - - + end + + --End test case NegativeResponseCheck.2.7 - ----------------------------------------------------------------------------------------- - + ----------------------------------------------------------------------------------------- + --Begin test case NegativeResponseCheck.2.8 --Description: check negative response from UI with invalid values(nonexistent of resultCode) --Requirement id in JAMA/or Jira ID: SDLAQ-CRS-62 --Verification criteria: SDL responses INVALID_DATA to Mobile - + for j =1, #updateMode do Test["UI_SetMediaClockTimer_Response_resultCode_Parameter_nonexistent_" ..tostring(updateMode[j]).."_INVALID_DATA"] = function(self) countDown = 0 @@ -2669,60 +2687,60 @@ end --mobile side: sending SetMediaClockTimer request local cid = self.mobileSession:SendRPC("SetMediaClockTimer", - { - startTime = + { + startTime = { hours = 0, minutes = 1, seconds = 33, }, - endTime = + endTime = { hours = 0, minutes = 1 + countDown, seconds = 35 - }, + }, updateMode = updateMode[j] }) - + --hmi side: expect UI.SetMediaClockTimer request EXPECT_HMICALL("UI.SetMediaClockTimer", { - startTime = + startTime = { hours = 0, minutes = 1, seconds = 33, }, - endTime = + endTime = { hours = 0, minutes = 1 + countDown, seconds = 35 - }, + }, updateMode = updateMode[j] }) - - :Timeout(iTimeout) + + :Timeout(iTimeout) :Do(function(_,data) --hmi side: sending UI.SetMediaClockTimer response self.hmiConnection:Send('{"jsonrpc":"2.0","id":'..data.id..',"result":{"code": 555, "method":"UI.SetMediaClockTimer"}}') - + end) - + --mobile side: expect SetMediaClockTimer response EXPECT_RESPONSE(cid, { success = false, resultCode = "INVALID_DATA"}) :Timeout(12000) - + end - end - - + end + + --End test case NegativeResponseCheck.2.8 - ----------------------------------------------------------------------------------------- - + ----------------------------------------------------------------------------------------- + --Begin test case NegativeResponseCheck.2.9 --Description: check negative response from UI with invalid values(invalid characters) @@ -2741,48 +2759,48 @@ end --mobile side: sending SetMediaClockTimer request local cid = self.mobileSession:SendRPC("SetMediaClockTimer", - { - startTime = + { + startTime = { hours = 0, minutes = 1, seconds = 33, }, - endTime = + endTime = { hours = 0, minutes = 1 + countDown, seconds = 35 - }, + }, updateMode = updateMode[j] }) - + --hmi side: expect UI.SetMediaClockTimer request EXPECT_HMICALL("UI.SetMediaClockTimer", { - startTime = + startTime = { hours = 0, minutes = 1, seconds = 33, }, - endTime = + endTime = { hours = 0, minutes = 1 + countDown, seconds = 35 - }, + }, updateMode = updateMode[j] }) - + :Timeout(iTimeout) :Do(function(_,data) --hmi side: sending UI.SetMediaClockTimer response --self.hmiConnection:SendResponse(data.id, data.method, "GENERIC_ERROR", {info = "in\tfo"}) self.hmiConnection:SendError(data.id, data.method, "GENERIC_ERROR", "in\tfo") end) - + --mobile side: expect SetMediaClockTimer response EXPECT_RESPONSE(cid, { success = false, resultCode = "GENERIC_ERROR"}) @@ -2790,14 +2808,14 @@ end if data.payload.info then print(" SDL resends invalid value of info parameter to mobile app ") return false - else + else return true end end) - + end - end - + end + -- Newline character for j =1, #updateMode do Test["UI_SetMediaClockTimer_Response_info_Parameter_Invalid_Character_NewLine_" ..tostring(updateMode[j]).."_SUCCESS"] = function(self) @@ -2808,48 +2826,48 @@ end --mobile side: sending SetMediaClockTimer request local cid = self.mobileSession:SendRPC("SetMediaClockTimer", - { - startTime = + { + startTime = { hours = 0, minutes = 1, seconds = 33, }, - endTime = + endTime = { hours = 0, minutes = 1 + countDown, seconds = 35 - }, + }, updateMode = updateMode[j] }) - + --hmi side: expect UI.SetMediaClockTimer request EXPECT_HMICALL("UI.SetMediaClockTimer", { - startTime = + startTime = { hours = 0, minutes = 1, seconds = 33, }, - endTime = + endTime = { hours = 0, minutes = 1 + countDown, seconds = 35 - }, + }, updateMode = updateMode[j] }) - + :Timeout(iTimeout) :Do(function(_,data) --hmi side: sending UI.SetMediaClockTimer response --self.hmiConnection:SendResponse(data.id, data.method, "SUCCESS", {info = "in\nfo"}) self.hmiConnection:SendError(data.id, data.method, "GENERIC_ERROR", "in\nfo") end) - + --mobile side: expect SetMediaClockTimer response EXPECT_RESPONSE(cid, { success = false, resultCode = "GENERIC_ERROR"}) @@ -2857,29 +2875,29 @@ end if data.payload.info then print(" SDL resends invalid value of info parameter to mobile app ") return false - else + else return true end end) - + end - end - + end + --End test case NegativeResponseCheck.2.9 ----------------------------------------------------------------------------------------- --End test case NegativeResponseCheck.2 - + --Begin test case NegativeResponseCheck.3 --Description: check negative response with wrong type - + --Begin test case NegativeResponseCheck.3.1 --Description: check info parameter is wrong type --Requirement id in JAMA/or Jira ID: APPLINK-13276 - --Verification criteria: SDL should not send "info" to app if received "message" is invalid + --Verification criteria: SDL should not send "info" to app if received "message" is invalid for j =1, #updateMode do Test["UI_SetMediaClockTimer_Response_info_Parameter_WrongType_" ..tostring(updateMode[j]).."_SUCCESS"] = function(self) @@ -2890,48 +2908,48 @@ end --mobile side: sending SetMediaClockTimer request local cid = self.mobileSession:SendRPC("SetMediaClockTimer", - { - startTime = + { + startTime = { hours = 0, minutes = 1, seconds = 33, }, - endTime = + endTime = { hours = 0, minutes = 1 + countDown, seconds = 35 - }, + }, updateMode = updateMode[j] }) - + --hmi side: expect UI.SetMediaClockTimer request EXPECT_HMICALL("UI.SetMediaClockTimer", { - startTime = + startTime = { hours = 0, minutes = 1, seconds = 33, }, - endTime = + endTime = { hours = 0, minutes = 1 + countDown, seconds = 35 - }, + }, updateMode = updateMode[j] }) - + :Timeout(iTimeout) :Do(function(_,data) --hmi side: sending UI.SetMediaClockTimer response --self.hmiConnection:SendResponse(data.id, data.method, "SUCCESS", {info = 123}) self.hmiConnection:SendError(data.id, data.method, "GENERIC_ERROR", 123) end) - + --mobile side: expect SetMediaClockTimer response EXPECT_RESPONSE(cid, { success = false, resultCode = "GENERIC_ERROR"}) @@ -2939,16 +2957,16 @@ end if data.payload.info then print(" SDL resends info parameter which is wrong data type to mobile app ") return false - else + else return true end end) - + end - end - - + end + + --End test case NegativeResponseCheck.3.1 ----------------------------------------------------------------------------------------- @@ -2968,41 +2986,41 @@ end --mobile side: sending SetMediaClockTimer request local cid = self.mobileSession:SendRPC("SetMediaClockTimer", - { - startTime = + { + startTime = { hours = 0, minutes = 1, seconds = 33, }, - endTime = + endTime = { hours = 0, minutes = 1 + countDown, seconds = 35 - }, + }, updateMode = updateMode[j] }) - + --hmi side: expect UI.SetMediaClockTimer request EXPECT_HMICALL("UI.SetMediaClockTimer", { - startTime = + startTime = { hours = 0, minutes = 1, seconds = 33, }, - endTime = + endTime = { hours = 0, minutes = 1 + countDown, seconds = 35 - }, + }, updateMode = updateMode[j] }) - + :Timeout(iTimeout) :Do(function(_,data) --hmi side: sending UI.SetMediaClockTimer response @@ -3011,20 +3029,20 @@ end --mobile side: expect SetMediaClockTimer response EXPECT_RESPONSE(cid, { success = false, resultCode = "INVALID_DATA"}) - + end - end - - + end + + --End test case NegativeResponseCheck.3.2 ----------------------------------------------------------------------------------------- - + --Begin test case NegativeResponseCheck.3.3 --Description: Check resultCode parameter is wrong type --Requirement id in JAMA/or Jira ID: SDLAQ-CRS-62 - --Verification criteria: SDL will response INVALID_DATA if HMI responses with invalid resultCode parameter + --Verification criteria: SDL will response INVALID_DATA if HMI responses with invalid resultCode parameter for j =1, #updateMode do Test["UI_SetMediaClockTimer_Response_resultCode_Parameter_WrongType_" ..tostring(updateMode[j]).."_SUCCESS"] = function(self) @@ -3035,58 +3053,58 @@ end --mobile side: sending SetMediaClockTimer request local cid = self.mobileSession:SendRPC("SetMediaClockTimer", - { - startTime = + { + startTime = { hours = 0, minutes = 1, seconds = 33, }, - endTime = + endTime = { hours = 0, minutes = 1 + countDown, seconds = 35 - }, + }, updateMode = updateMode[j] }) - + --hmi side: expect UI.SetMediaClockTimer request EXPECT_HMICALL("UI.SetMediaClockTimer", { - startTime = + startTime = { hours = 0, minutes = 1, seconds = 33, }, - endTime = + endTime = { hours = 0, minutes = 1 + countDown, seconds = 35 - }, + }, updateMode = updateMode[j] }) - + :Timeout(iTimeout) :Do(function(_,data) --hmi side: sending UI.SetMediaClockTimer response self.hmiConnection:SendResponse(data.id, data.method, true, {}) end) - + --mobile side: expect SetMediaClockTimer response EXPECT_RESPONSE(cid, { success = false, resultCode = "INVALID_DATA"}) - + end - end - - + end + + --End test case NegativeResponseCheck.3.3 ----------------------------------------------------------------------------------------- - + --End test case NegativeResponseCheck.3 ]] @@ -3098,7 +3116,7 @@ end --Verification criteria: The response with wrong JSON syntax is sent, the response comes to Mobile with INVALID_DATA result code. --APPLINK-13418: SDL ignores all responses from HMI after received response with invalid JSON syntax --Solution: After run this test case, remove it and run next test cases again. ---[[ +--[[ for j =1, #updateMode do Test["UI_SetMediaClockTimer_Response_Invalid_JSON_" ..tostring(updateMode[j]).."_GENERIC_ERROR"] = function(self) countDown = 0 @@ -3108,66 +3126,66 @@ end --mobile side: sending SetMediaClockTimer request local cid = self.mobileSession:SendRPC("SetMediaClockTimer", - { - startTime = + { + startTime = { hours = 0, minutes = 1, seconds = 33, }, - endTime = + endTime = { hours = 0, minutes = 1 + countDown, seconds = 35 - }, + }, updateMode = updateMode[j] }) - + --hmi side: expect UI.SetMediaClockTimer request EXPECT_HMICALL("UI.SetMediaClockTimer", { - startTime = + startTime = { hours = 0, minutes = 1, seconds = 33, }, - endTime = + endTime = { hours = 0, minutes = 1 + countDown, seconds = 35 - }, + }, updateMode = updateMode[j] }) - + :Timeout(iTimeout) :Do(function(_,data) --hmi side: sending UI.SetMediaClockTimer response --self.hmiConnection:SendResponse(data.id, data.method, "SUCCESS", {info = 123}) - + --change ":" by " " after "code" --self.hmiConnection:Send('{"jsonrpc":"2.0","id":'..tostring(data.id)..',"result":{"code":0,"method":"UI.SetMediaClockTimer"}}') - self.hmiConnection:Send('{"jsonrpc":"2.0","id":'..tostring(data.id)..',"result" {"code":0,"method":"UI.SetMediaClockTimer"}}') + self.hmiConnection:Send('{"jsonrpc":"2.0","id":'..tostring(data.id)..',"result" {"code":0,"method":"UI.SetMediaClockTimer"}}') end) - + --mobile side: expect SetMediaClockTimer response EXPECT_RESPONSE(cid, { success = false, resultCode = "GENERIC_ERROR", info = nil}) :Timeout(15000) - + end - end -]]-- + end +]]-- --End test case NegativeResponseCheck.4 - ----------------------------------------------------------------------------------------- - - --End test suit NegativeResponseCheck + ----------------------------------------------------------------------------------------- + + --End test suit NegativeResponseCheck + + - - ---------------------------------------------------------------------------------------------- ----------------------------------------IV TEST BLOCK----------------------------------------- ---------------------------------------Result code check-------------------------------------- @@ -3196,70 +3214,70 @@ end --mobile side: sending SetMediaClockTimer request local cid = self.mobileSession:SendRPC("SetMediaClockTimer", - { - startTime = + { + startTime = { hours = 0, minutes = 1, seconds = 33, }, - endTime = + endTime = { hours = 0, minutes = 1 + countDown, seconds = 35 - }, + }, updateMode = updateMode[j] }) - + --hmi side: expect UI.SetMediaClockTimer request EXPECT_HMICALL("UI.SetMediaClockTimer", { - startTime = + startTime = { hours = 0, minutes = 1, seconds = 33, }, - endTime = + endTime = { hours = 0, minutes = 1 + countDown, seconds = 35 - }, + }, updateMode = updateMode[j] - }) + }) :Timeout(iTimeout) :Do(function(_,data) --hmi side: sending UI.SetMediaClockTimer response self.hmiConnection:SendResponse(data.id, data.method, resultCode[i], {}) end) - + --mobile side: expect SetMediaClockTimer response EXPECT_RESPONSE(cid, { success = success[i], resultCode = resultCode[i]}) :Timeout(iTimeout) - + end - end + end end - + --End test case ResultCodeCheck.1 ----------------------------------------------------------------------------------------- --Begin test case ResultCodeCheck.2 - --Description: A command can not be executed because no application has been registered with RegisterAppInterface. + --Description: A command can not be executed because no application has been registered with RegisterAppInterface. --Requirement id in JAMA: SDLAQ-CRS-518 - --Verification criteria: SDL sends APPLICATION_NOT_REGISTERED code when the app sends a request within the same connection before RegisterAppInterface has been performed yet. - + --Verification criteria: SDL sends APPLICATION_NOT_REGISTERED code when the app sends a request within the same connection before RegisterAppInterface has been performed yet. + --Precondition: Create new session function Test:Precondition_CreationNewSession() -- Connected expectation self.mobileSession2 = mobile_session.MobileSession( self, - self.mobileConnection) + self.mobileConnection) end @@ -3272,33 +3290,33 @@ end --mobile side: sending SetMediaClockTimer request local cid = self.mobileSession2:SendRPC("SetMediaClockTimer", - { - startTime = + { + startTime = { hours = 0, minutes = 1, seconds = 33, }, - endTime = + endTime = { hours = 0, minutes = 1 + countDown, seconds = 35 - }, + }, updateMode = updateMode[j] }) - - + + --mobile side: expect SetMediaClockTimer response - self.mobileSession2:ExpectResponse(cid, { success = false, resultCode = "APPLICATION_NOT_REGISTERED" }) + self.mobileSession2:ExpectResponse(cid, { success = false, resultCode = "APPLICATION_NOT_REGISTERED" }) end - + end - + --End test case ResultCodeCheck.2 - + --End test suit ResultCodeCheck - + ---------------------------------------------------------------------------------------------- -----------------------------------------V TEST BLOCK----------------------------------------- ---------------------------------------HMI negative cases------------------------------------- @@ -3309,10 +3327,10 @@ end -- invalid structure os response -- several responses from HMI to one request -- fake parameters - -- HMI correlation id check + -- HMI correlation id check -- wrong response with correct HMI id - - + + --Begin test suit HMINegativeCheck --Description: Check negative response from HMI @@ -3320,7 +3338,7 @@ end --Verification criteria: The response contains 2 mandatory parameters "success" and "resultCode", "info" is sent if there is any additional information about the resultCode - + --Begin test case HMINegativeCheck.1 --Description: check requests without responses from HMI @@ -3333,38 +3351,38 @@ end --mobile side: sending SetMediaClockTimer request local cid = self.mobileSession:SendRPC("SetMediaClockTimer", - { - startTime = + { + startTime = { hours = 0, minutes = 1, seconds = 33, }, - endTime = + endTime = { hours = 0, minutes = 1 + countDown, seconds = 35 - }, + }, updateMode = updateMode[j] }) - + --hmi side: expect UI.SetMediaClockTimer request EXPECT_HMICALL("UI.SetMediaClockTimer", { - startTime = + startTime = { hours = 0, minutes = 1, seconds = 33, }, - endTime = + endTime = { hours = 0, minutes = 1 + countDown, seconds = 35 - }, + }, updateMode = updateMode[j] }) :Timeout(iTimeout) @@ -3372,15 +3390,15 @@ end --mobile side: expect SetMediaClockTimer response EXPECT_RESPONSE(cid, { success = false, resultCode = "GENERIC_ERROR", info = nil}) :Timeout(15000) - + end - end - - + end + + --End test case HMINegativeCheck.1 ----------------------------------------------------------------------------------------- - + --Begin test case HMINegativeCheck.2 --Description: invalid structure of response @@ -3393,62 +3411,62 @@ end --mobile side: sending SetMediaClockTimer request local cid = self.mobileSession:SendRPC("SetMediaClockTimer", - { - startTime = + { + startTime = { hours = 0, minutes = 1, seconds = 33, }, - endTime = + endTime = { hours = 0, minutes = 1 + countDown, seconds = 35 - }, + }, updateMode = updateMode[j] }) - + --hmi side: expect UI.SetMediaClockTimer request EXPECT_HMICALL("UI.SetMediaClockTimer", { - startTime = + startTime = { hours = 0, minutes = 1, seconds = 33, }, - endTime = + endTime = { hours = 0, minutes = 1 + countDown, seconds = 35 - }, + }, updateMode = updateMode[j] }) - + :Timeout(iTimeout) :Do(function(_,data) - --hmi side: sending UI.SetMediaClockTimer response --self.hmiConnection:Send('{"jsonrpc":"2.0","id":'..tostring(data.id)..',"result":{"code":0,"method":"UI.SetMediaClockTimer"}}') - self.hmiConnection:Send('{"jsonrpc":"2.0","id":'..tostring(data.id)..',"result":{"code":0}, "method":"UI.SetMediaClockTimer"}') - - + --hmi side: sending UI.SetMediaClockTimer response --self.hmiConnection:Send('{"jsonrpc":"2.0","id":'..tostring(data.id)..',"result":{"code":0,"method":"UI.SetMediaClockTimer"}}') + self.hmiConnection:Send('{"jsonrpc":"2.0","id":'..tostring(data.id)..',"result":{"code":0}, "method":"UI.SetMediaClockTimer"}') + + end) - + --mobile side: expect SetMediaClockTimer response EXPECT_RESPONSE(cid, { success = false, resultCode = "GENERIC_ERROR", info = nil}) :Timeout(15000) - + end - end - - + end + + --End test case HMINegativeCheck.2.1 ----------------------------------------------------------------------------------------- - + --Begin test case HMINegativeCheck.3 --Description: several responses from HMI to one request @@ -3461,63 +3479,63 @@ end --mobile side: sending SetMediaClockTimer request local cid = self.mobileSession:SendRPC("SetMediaClockTimer", - { - startTime = + { + startTime = { hours = 0, minutes = 1, seconds = 33, }, - endTime = + endTime = { hours = 0, minutes = 1 + countDown, seconds = 35 - }, + }, updateMode = updateMode[j] }) - + --hmi side: expect UI.SetMediaClockTimer request EXPECT_HMICALL("UI.SetMediaClockTimer", { - startTime = + startTime = { hours = 0, minutes = 1, seconds = 33, }, - endTime = + endTime = { hours = 0, minutes = 1 + countDown, seconds = 35 - }, + }, updateMode = updateMode[j] }) - + :Timeout(iTimeout) :Do(function(_,data) - --hmi side: sending UI.SetMediaClockTimer response + --hmi side: sending UI.SetMediaClockTimer response self.hmiConnection:SendResponse(data.id, data.method, "INVALID_DATA", {}) - self.hmiConnection:SendResponse(data.id, data.method, "SUCCESS", {}) + self.hmiConnection:SendResponse(data.id, data.method, "SUCCESS", {}) end) - + --mobile side: expect SetMediaClockTimer response EXPECT_RESPONSE(cid, { success = false, resultCode = "INVALID_DATA", info = nil}) :Timeout(iTimeout) - + end - end + end --End test case HMINegativeCheck.3 ----------------------------------------------------------------------------------------- - - + + --Begin test case HMINegativeCheck.4 --Description: check response with fake parameters - + --Begin test case HMINegativeCheck.4.1 --Description: Check responses from HMI (UI) with fake parameter @@ -3534,47 +3552,47 @@ end --mobile side: sending SetMediaClockTimer request local cid = self.mobileSession:SendRPC("SetMediaClockTimer", - { - startTime = + { + startTime = { hours = 0, minutes = 1, seconds = 33, }, - endTime = + endTime = { hours = 0, minutes = 1 + countDown, seconds = 35 - }, + }, updateMode = updateMode[j] }) - + --hmi side: expect UI.SetMediaClockTimer request EXPECT_HMICALL("UI.SetMediaClockTimer", { - startTime = + startTime = { hours = 0, minutes = 1, seconds = 33, }, - endTime = + endTime = { hours = 0, minutes = 1 + countDown, seconds = 35 - }, + }, updateMode = updateMode[j] }) - + :Timeout(iTimeout) :Do(function(_,data) - --hmi side: sending UI.SetMediaClockTimer response - self.hmiConnection:SendResponse(data.id, data.method, "SUCCESS",{fake = "fake"}) + --hmi side: sending UI.SetMediaClockTimer response + self.hmiConnection:SendResponse(data.id, data.method, "SUCCESS",{fake = "fake"}) end) - + --mobile side: expect SetMediaClockTimer response EXPECT_RESPONSE(cid, { success = true, resultCode = "SUCCESS", info = nil}) @@ -3582,13 +3600,13 @@ end if data.payload.fake then print(" SDL resends fake parameter to mobile app ") return false - else + else return true end end) - + end - end + end --End test case HMINegativeCheck.4.1 ----------------------------------------------------------------------------------------- @@ -3609,48 +3627,48 @@ end --mobile side: sending SetMediaClockTimer request local cid = self.mobileSession:SendRPC("SetMediaClockTimer", - { - startTime = + { + startTime = { hours = 0, minutes = 1, seconds = 33, }, - endTime = + endTime = { hours = 0, minutes = 1 + countDown, seconds = 35 - }, + }, updateMode = updateMode[j] }) - + --hmi side: expect UI.SetMediaClockTimer request EXPECT_HMICALL("UI.SetMediaClockTimer", { - startTime = + startTime = { hours = 0, minutes = 1, seconds = 33, }, - endTime = + endTime = { hours = 0, minutes = 1 + countDown, seconds = 35 - }, + }, updateMode = updateMode[j] }) - + :Timeout(iTimeout) :Do(function(_,data) - --hmi side: sending UI.SetMediaClockTimer response + --hmi side: sending UI.SetMediaClockTimer response --self.hmiConnection:SendResponse(data.id, data.method, "SUCCESS", {}) - self.hmiConnection:SendResponse(data.id, data.method, "SUCCESS",{sliderPosition = 5}) + self.hmiConnection:SendResponse(data.id, data.method, "SUCCESS",{sliderPosition = 5}) end) - + --mobile side: expect SetMediaClockTimer response EXPECT_RESPONSE(cid, { success = true, resultCode = "SUCCESS", info = nil}) @@ -3658,27 +3676,27 @@ end if data.payload.sliderPosition then print(" SDL resends sliderPosition parameter to mobile app ") return false - else + else return true end end) - + end - end + end --End test case HMINegativeCheck.4.2 ----------------------------------------------------------------------------------------- - + --End test case HMINegativeCheck.4 - + --Begin test case HMINegativeCheck.5 --Description: Check UI wrong response with wrong HMI correlation id --Requirement id in JAMA/or Jira ID: SDLAQ-CRS-62 - + --Verification criteria: SDL responses GENERIC_ERROR to mobile - + for j =1, #updateMode do Test["SetMediaClockTimer_UI_ResponseWithWrongHMICorrelationId_" ..tostring(updateMode[j]).."_GENERIC_ERROR"] = function(self) countDown = 0 @@ -3688,66 +3706,66 @@ end --mobile side: sending SetMediaClockTimer request local cid = self.mobileSession:SendRPC("SetMediaClockTimer", - { - startTime = + { + startTime = { hours = 0, minutes = 1, seconds = 33, }, - endTime = + endTime = { hours = 0, minutes = 1 + countDown, seconds = 35 - }, + }, updateMode = updateMode[j] }) - + --hmi side: expect UI.SetMediaClockTimer request EXPECT_HMICALL("UI.SetMediaClockTimer", { - startTime = + startTime = { hours = 0, minutes = 1, seconds = 33, }, - endTime = + endTime = { hours = 0, minutes = 1 + countDown, seconds = 35 - }, + }, updateMode = updateMode[j] - }) + }) :Timeout(iTimeout) :Do(function(_,data) - --hmi side: sending UI.SetMediaClockTimer response + --hmi side: sending UI.SetMediaClockTimer response --self.hmiConnection:SendResponse(data.id, data.method, "SUCCESS", {} - self.hmiConnection:SendResponse(data.id + 1, data.method, "SUCCESS", {}) + self.hmiConnection:SendResponse(data.id + 1, data.method, "SUCCESS", {}) end) - + --mobile side: expect SetMediaClockTimer response EXPECT_RESPONSE(cid, { success = false, resultCode = "GENERIC_ERROR", info = nil}) :Timeout(12000) - + end - end - + end + --End test case HMINegativeCheck.5 ---------------------------------------------------------------------------------------- - + --Begin test case HMINegativeCheck.6 --Description: Check UI wrong response with correct HMI id --Requirement id in JAMA/or Jira ID: SDLAQ-CRS-62 - + --Verification criteria: SDL responses GENERIC_ERROR to mobile - + for j =1, #updateMode do Test["SetMediaClockTimer_UI_WrongResponseWithCorrectHMICorrelationId_" ..tostring(updateMode[j]).."_GENERIC_ERROR"] = function(self) countDown = 0 @@ -3757,60 +3775,60 @@ end --mobile side: sending SetMediaClockTimer request local cid = self.mobileSession:SendRPC("SetMediaClockTimer", - { - startTime = + { + startTime = { hours = 0, minutes = 1, seconds = 33, }, - endTime = + endTime = { hours = 0, minutes = 1 + countDown, seconds = 35 - }, + }, updateMode = updateMode[j] }) - + --hmi side: expect UI.SetMediaClockTimer request EXPECT_HMICALL("UI.SetMediaClockTimer", { - startTime = + startTime = { hours = 0, minutes = 1, seconds = 33, }, - endTime = + endTime = { hours = 0, minutes = 1 + countDown, seconds = 35 - }, + }, updateMode = updateMode[j] }) - + :Timeout(iTimeout) :Do(function(_,data) - --hmi side: sending UI.SetMediaClockTimer response + --hmi side: sending UI.SetMediaClockTimer response --self.hmiConnection:SendResponse(data.id, data.method, "SUCCESS", {}) - self.hmiConnection:SendResponse(data.id, "UI.Show", "SUCCESS", {}) + self.hmiConnection:SendResponse(data.id, "UI.Show", "SUCCESS", {}) end) - + --mobile side: expect SetMediaClockTimer response EXPECT_RESPONSE(cid, { success = false, resultCode = "GENERIC_ERROR", info = nil}) :Timeout(12000) - + end - end - + end + --End test case HMINegativeCheck.6 ---------------------------------------------------------------------------------------- - - + + --End test suit HMINegativeCheck ---------------------------------------------------------------------------------------------- @@ -3835,22 +3853,22 @@ end --It is covered by TC SetMediaClockTimer_PositiveCase --End test case SequenceCheck.1-5 - ----------------------------------------------------------------------------------------- + ----------------------------------------------------------------------------------------- --Begin test case SequenceCheck.6 --Description: check scenario in test case TC_SetMediaClockTimer_06: Call SetMediaClockTimer request from mobile app on HMI with CLEAR parameter when UI Media clock timer is in default state (empty) - + --Requirement id in JAMA/or Jira ID: SDLAQ-CRS-61 --Verification criteria: returns SUCCESS - + --Precondition: Clear SetMediaClockTimer to change UI Media clock timer is in default state (empty) function Test:SetMediaClockTimer_TC_SetMediaClockTimer_06_Precondition() - + --mobile side: sending SetMediaClockTimer request local cid = self.mobileSession:SendRPC("SetMediaClockTimer", - { - startTime = + { + startTime = { hours = 01, minutes = 02, @@ -3858,12 +3876,12 @@ end }, updateMode = "CLEAR" }) - + --hmi side: expect UI.SetMediaClockTimer request EXPECT_HMICALL("UI.SetMediaClockTimer", { - startTime = + startTime = { hours = 01, minutes = 02, @@ -3871,25 +3889,25 @@ end }, updateMode = "CLEAR" }) - + :Timeout(iTimeout) :Do(function(_,data) - --hmi side: sending UI.SetMediaClockTimer response - self.hmiConnection:SendResponse(data.id, data.method, "SUCCESS", {} ) + --hmi side: sending UI.SetMediaClockTimer response + self.hmiConnection:SendResponse(data.id, data.method, "SUCCESS", {} ) end) - + --mobile side: expect SetMediaClockTimer response EXPECT_RESPONSE(cid, { success = true, resultCode = "SUCCESS", info = nil}) :Timeout(iTimeout) end - + function Test:SetMediaClockTimer_TC_SetMediaClockTimer_06_CLEAR_SUCCESS() - + --mobile side: sending SetMediaClockTimer request local cid = self.mobileSession:SendRPC("SetMediaClockTimer", - { - startTime = + { + startTime = { hours = 04, minutes = 04, @@ -3897,12 +3915,12 @@ end }, updateMode = "CLEAR" }) - + --hmi side: expect UI.SetMediaClockTimer request EXPECT_HMICALL("UI.SetMediaClockTimer", { - startTime = + startTime = { hours = 04, minutes = 04, @@ -3910,21 +3928,21 @@ end }, updateMode = "CLEAR" }) - + :Timeout(iTimeout) :Do(function(_,data) - --hmi side: sending UI.SetMediaClockTimer response - self.hmiConnection:SendResponse(data.id, data.method, "SUCCESS", {} ) + --hmi side: sending UI.SetMediaClockTimer response + self.hmiConnection:SendResponse(data.id, data.method, "SUCCESS", {} ) end) - + --mobile side: expect SetMediaClockTimer response EXPECT_RESPONSE(cid, { success = true, resultCode = "SUCCESS", info = nil}) :Timeout(iTimeout) end - + --End test case SequenceCheck.6 - ----------------------------------------------------------------------------------------- + ----------------------------------------------------------------------------------------- --Begin test case SequenceCheck.7 @@ -3933,13 +3951,13 @@ end --Requirement id in JAMA/or Jira ID: SDLAQ-CRS-520 --Verification criteria: returns IGNORED - + function Test:SetMediaClockTimer_RESUME_IGNORED() - + --mobile side: sending SetMediaClockTimer request local cid = self.mobileSession:SendRPC("SetMediaClockTimer", - { - startTime = + { + startTime = { hours = 01, minutes = 02, @@ -3947,12 +3965,12 @@ end }, updateMode = "RESUME" }) - + --hmi side: expect UI.SetMediaClockTimer request EXPECT_HMICALL("UI.SetMediaClockTimer", { - startTime = + startTime = { hours = 01, minutes = 02, @@ -3960,28 +3978,28 @@ end }, updateMode = "RESUME" }) - + :Timeout(iTimeout) :Do(function(_,data) - --hmi side: sending UI.SetMediaClockTimer response - self.hmiConnection:SendResponse(data.id, data.method, "IGNORED", {} ) + --hmi side: sending UI.SetMediaClockTimer response + self.hmiConnection:SendResponse(data.id, data.method, "IGNORED", {} ) end) - + --mobile side: expect SetMediaClockTimer response EXPECT_RESPONSE(cid, { success = false, resultCode = "IGNORED", info = nil}) :Timeout(iTimeout) end - + --End test case SequenceCheck.7 - ----------------------------------------------------------------------------------------- + ----------------------------------------------------------------------------------------- + - --End test suit SequenceCheck - - + + ---------------------------------------------------------------------------------------------- -----------------------------------------VII TEST BLOCK--------------------------------------- --------------------------------------Different HMIStatus------------------------------------- @@ -3990,14 +4008,14 @@ end --Begin test suit DifferentHMIlevel --Description: processing API in different HMILevel - + --Begin test case DifferentHMIlevel.1 --Description: Check SetMediaClockTimer request when application is in LIMITTED HMI level --Requirement id in JAMA/or Jira ID: SDLAQ-CRS-782 --Verification criteria: SetMediaClockTimer is allowed in LIMITED HMI level according to policy - + -- Precondition: Change app to LIMITED HMI status function Test:ChangeHMIToLimited() --hmi side: sending BasicCommunication.OnAppDeactivated request @@ -4021,55 +4039,55 @@ end --mobile side: sending SetMediaClockTimer request local cid = self.mobileSession:SendRPC("SetMediaClockTimer", - { - startTime = + { + startTime = { hours = 0, minutes = 1, seconds = 33, }, - endTime = + endTime = { hours = 0, minutes = 1 + countDown, seconds = 35 - }, + }, updateMode = updateMode[j] }) - + --hmi side: expect UI.SetMediaClockTimer request EXPECT_HMICALL("UI.SetMediaClockTimer", { - startTime = + startTime = { hours = 0, minutes = 1, seconds = 33, }, - endTime = + endTime = { hours = 0, minutes = 1 + countDown, seconds = 35 - }, + }, updateMode = updateMode[j] }) - + :Timeout(iTimeout) :Do(function(_,data) - --hmi side: sending UI.SetMediaClockTimer response - self.hmiConnection:SendResponse(data.id, data.method, "SUCCESS", {} ) + --hmi side: sending UI.SetMediaClockTimer response + self.hmiConnection:SendResponse(data.id, data.method, "SUCCESS", {} ) end) - + --mobile side: expect SetMediaClockTimer response EXPECT_RESPONSE(cid, { success = true, resultCode = "SUCCESS", info = nil}) :Timeout(iTimeout) - + end end - + --End test case DifferentHMIlevel.1 ----------------------------------------------------------------------------------------- @@ -4080,8 +4098,8 @@ end --Verification criteria: SetMediaClockTimer is NOT allowed in NONE HMI level - - --Precondition: Change app to FULL HMI status + + --Precondition: Change app to FULL HMI status function Test:ActivateApplication() --HMI send ActivateApp request local RequestId = self.hmiConnection:SendRequest("SDL.ActivateApp", { appID = self.applications["Test Application"]}) @@ -4103,11 +4121,11 @@ end end end) - EXPECT_NOTIFICATION("OnHMIStatus", {hmiLevel = "FULL", systemContext = "MAIN"}) + EXPECT_NOTIFICATION("OnHMIStatus", {hmiLevel = "FULL", systemContext = "MAIN"}) + + end - end - - --Precondition: Change app to None HMI status + --Precondition: Change app to None HMI status function Test:ExitApplication() local function sendUserExit() @@ -4118,7 +4136,7 @@ end reason = "USER_EXIT" }) end - + local function SendOnSystemContext1() --hmi side: sending UI.OnSystemContext request SendOnSystemContext(self,"MAIN") @@ -4131,30 +4149,30 @@ end appID = self.applications["Test Application"], reason = "GENERAL" }) - end - + end + --hmi side: sending BasicCommunication.OnSystemContext request SendOnSystemContext(self,"MENU") - + --hmi side: sending BasicCommunication.OnExitApplication request RUN_AFTER(sendUserExit, 1000) - + --hmi side: sending UI.OnSystemContext request = MAIN RUN_AFTER(SendOnSystemContext1, 2000) - + --hmi side: sending BasicCommunication.OnAppDeactivated request RUN_AFTER(sendOnAppDeactivate, 3000) - - + + --mobile side: OnHMIStatus notifications EXPECT_NOTIFICATION("OnHMIStatus", { systemContext = "MENU", hmiLevel = "FULL"}, { systemContext = "MENU", hmiLevel = "NONE"}, { systemContext = "MAIN", hmiLevel = "NONE"}) - :Times(3) + :Times(3) + + end - end - for j =1, #updateMode do Test["SetMediaClockTimer_NONE_" ..tostring(updateMode[j]).."_DISALLOWED"] = function(self) @@ -4165,52 +4183,52 @@ end --mobile side: sending SetMediaClockTimer request local cid = self.mobileSession:SendRPC("SetMediaClockTimer", - { - startTime = + { + startTime = { hours = 0, minutes = 1, seconds = 33, }, - endTime = + endTime = { hours = 0, minutes = 1 + countDown, seconds = 35 - }, + }, updateMode = updateMode[j] }) - + --hmi side: expect UI.SetMediaClockTimer request EXPECT_HMICALL("UI.SetMediaClockTimer", { - startTime = + startTime = { hours = 0, minutes = 1, seconds = 33, }, - endTime = + endTime = { hours = 0, minutes = 1 + countDown, seconds = 35 - }, + }, updateMode = updateMode[j] }) - + :Timeout(iTimeout) :Times(0) - + --mobile side: expect SetMediaClockTimer response EXPECT_RESPONSE(cid, { success = false, resultCode = "DISALLOWED", info = nil}) :Timeout(iTimeout) - + end end - + --End test case DifferentHMIlevel.2 ----------------------------------------------------------------------------------------- @@ -4220,8 +4238,8 @@ end --Requirement id in JAMA/or Jira ID: SDLAQ-CRS-782 --Verification criteria: SetMediaClockTimer is allowed in BACKGOUND HMI level according to policy - - --Precondition: Change app to FULL HMI status + + --Precondition: Change app to FULL HMI status function Test:ActivateApplication() --HMI send ActivateApp request local RequestId = self.hmiConnection:SendRequest("SDL.ActivateApp", { appID = self.applications["Test Application"]}) @@ -4243,22 +4261,22 @@ end end end) - EXPECT_NOTIFICATION("OnHMIStatus", {hmiLevel = "FULL", systemContext = "MAIN"}) + EXPECT_NOTIFICATION("OnHMIStatus", {hmiLevel = "FULL", systemContext = "MAIN"}) + + end - end - --Precondition: Create the second session function Test:CreateTheSecondSession() --mobile side: start new session self.mobileSession1 = mobile_session.MobileSession( self, - self.mobileConnection) + self.mobileConnection) end --Precondition: Register application the second session function Test:RegisterAppInTheSecondSession() - --mobile side: start new + --mobile side: start new self.mobileSession1:StartService(7) :Do(function() local CorIdRegister = self.mobileSession1:SendRPC("RegisterAppInterface", @@ -4277,9 +4295,9 @@ end }) --hmi side: expect BasicCommunication.OnAppRegistered request - EXPECT_HMINOTIFICATION("BasicCommunication.OnAppRegistered", + EXPECT_HMINOTIFICATION("BasicCommunication.OnAppRegistered", { - application = + application = { appName = "Test Application2" } @@ -4291,9 +4309,6 @@ end --mobile side: expect response self.mobileSession1:ExpectResponse(CorIdRegister, { success = true, resultCode = "SUCCESS" }) :Timeout(2000) - - --mobile side: expect notification from 2 app - self.mobileSession1:ExpectNotification("OnHMIStatus",{hmiLevel = "NONE", audioStreamingState = "NOT_AUDIBLE", systemContext = "MAIN"}) end) end @@ -4319,62 +4334,75 @@ end --mobile side: sending SetMediaClockTimer request local cid = self.mobileSession:SendRPC("SetMediaClockTimer", - { - startTime = + { + startTime = { hours = 0, minutes = 1, seconds = 33, }, - endTime = + endTime = { hours = 0, minutes = 1 + countDown, seconds = 35 - }, + }, updateMode = updateMode[j] }) - + --hmi side: expect UI.SetMediaClockTimer request EXPECT_HMICALL("UI.SetMediaClockTimer", { - startTime = + startTime = { hours = 0, minutes = 1, seconds = 33, }, - endTime = + endTime = { hours = 0, minutes = 1 + countDown, seconds = 35 - }, + }, updateMode = updateMode[j] }) :Do(function(_,data) - --hmi side: sending UI.SetMediaClockTimer response - self.hmiConnection:SendResponse(data.id, data.method, "SUCCESS", {} ) + --hmi side: sending UI.SetMediaClockTimer response + self.hmiConnection:SendResponse(data.id, data.method, "SUCCESS", {} ) end) :Timeout(iTimeout) - + --mobile side: expect SetMediaClockTimer response EXPECT_RESPONSE(cid, { success = true, resultCode = "SUCCESS"}) --:Timeout(iTimeout) :Timeout(11000) - + end end - + --End test case DifferentHMIlevel.3 ----------------------------------------------------------------------------------------- --End test suit DifferentHMIlevel - -return Test + +--------------------------------------------------------------------------------------------- +-------------------------------------------Postcondition------------------------------------- +--------------------------------------------------------------------------------------------- + + --Print new line to separate Postconditions + commonFunctions:newTestCasesGroup("Postconditions") + + + --Restore sdl_preloaded_pt.json + policyTable:Restore_preloaded_pt() + + + + return Test diff --git a/test_scripts/API/ATF_SetMediaClockTimer_nonMedia.lua b/test_scripts/API/ATF_SetMediaClockTimer_nonMedia.lua new file mode 100644 index 0000000000..801c7bf44e --- /dev/null +++ b/test_scripts/API/ATF_SetMediaClockTimer_nonMedia.lua @@ -0,0 +1,2193 @@ +--Note: List of existing defects: +--APPLINK-13417: SDL writes ERROR in log and ignore all responses after HMI send UI.SetMediaClockTimer response with fake parameter +--ToDO: will be updated according to APPLINK-14765 +--------------------------------------------------------------------------------------------- +config.application1 = +{ + registerAppInterfaceParams = + { + syncMsgVersion = + { + majorVersion = 3, + minorVersion = 3 + }, + appName = "Test Application", + isMediaApplication = false, + languageDesired = 'EN-US', + hmiDisplayLanguageDesired = 'EN-US', + appHMIType = { "DEFAULT" }, + appID = "0000001", + deviceInfo = + { + os = "Android", + carrier = "Megafon", + firmwareRev = "Name: Linux, Version: 3.4.0-perf", + osVersion = "4.4.2", + maxNumberRFCOMMPorts = 1 + } + } +} + +Test = require('connecttest') +require('cardinalities') +local events = require('events') +local mobile_session = require('mobile_session') +local mobile = require('mobile_connection') +local tcp = require('tcp_connection') +local file_connection = require('file_connection') + +--------------------------------------------------------------------------------------------- +-----------------------------Required Shared Libraries--------------------------------------- +--------------------------------------------------------------------------------------------- +require('user_modules/AppTypes') +local commonFunctions = require('user_modules/shared_testcases/commonFunctions') +local commonSteps = require('user_modules/shared_testcases/commonSteps') +local commonPreconditions = require('user_modules/shared_testcases/commonPreconditions') +local commonTestCases = require('user_modules/shared_testcases/commonTestCases') +local policyTable = require('user_modules/shared_testcases/testCasesForPolicyTable') +local integerParameter = require('user_modules/shared_testcases/testCasesForIntegerParameter') +local stringParameter = require('user_modules/shared_testcases/testCasesForStringParameter') +local arraySoftButtonsParameter = require('user_modules/shared_testcases/testCasesForArraySoftButtonsParameter') +--------------------------------------------------------------------------------------------- + +APIName = "SetMediaClockTimer" -- set request name +local iTimeout = 5000 +local updateModeNotRequireStartEndTime = {"PAUSE", "RESUME", "CLEAR"} +local updateMode = {"COUNTUP", "COUNTDOWN", "PAUSE", "RESUME", "CLEAR"} +local updateModeCountUpDown = {"COUNTUP", "COUNTDOWN"} +local countDown = 0 +local InBound60 = {0, 30, 59} +local OutBound60 = {-1, 60} +local str1000Chars = "1_0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnopqrstuvwxyz" .. string.rep("a",935) +local str1000Chars2 = "2_0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnopqrstuvwxyz" .. string.rep("a",935) + + +local info = {"a", str1000Chars} +local infoName = {"LowerBound", "UpperBound"} +local infoOutBound = {str1000Chars .. "A"} +local infoOutBound_ToMobile = {str1000Chars} + +resultCode = {"SUCCESS", "INVALID_DATA", "OUT_OF_MEMORY", "TOO_MANY_PENDING_REQUESTS", "APPLICATION_NOT_REGISTERED", "REJECTED", "IGNORED", "GENERIC_ERROR", "UNSUPPORTED_RESOURCE", "DISALLOWED"} + +success = {true, false, false, false, false, false, false, false, false, false} + +local function SendOnSystemContext(self, ctx) + self.hmiConnection:SendNotification("UI.OnSystemContext",{ appID = self.applications["Test Application"], systemContext = ctx }) +end + +--------------------------------------------------------------------------------------------- +-------------------------------------------Preconditions------------------------------------- +--------------------------------------------------------------------------------------------- + + --Print new line to separate Preconditions + commonFunctions:newTestCasesGroup("Preconditions") + + --Delete app_info.dat, logs and policy table + commonSteps:DeleteLogsFileAndPolicyTable() + + --1. Activation App by sending SDL.ActivateApp + + + function Test:ActivateApplication() + --HMI send ActivateApp request + local RequestId = self.hmiConnection:SendRequest("SDL.ActivateApp", { appID = self.applications["Test Application"]}) + EXPECT_HMIRESPONSE(RequestId) + :Do(function(_,data) + if data.result.isSDLAllowed ~= true then + local RequestId = self.hmiConnection:SendRequest("SDL.GetUserFriendlyMessage", {language = "EN-US", messageCodes = {"DataConsent"}}) + -- TODO: update after resolving APPLINK-16094 EXPECT_HMIRESPONSE(RequestId,{result = {code = 0, method = "SDL.GetUserFriendlyMessage"}}) + EXPECT_HMIRESPONSE(RequestId) + :Do(function(_,data) + --hmi side: send request SDL.OnAllowSDLFunctionality + self.hmiConnection:SendNotification("SDL.OnAllowSDLFunctionality", {allowed = true, source = "GUI", device = {id = config.deviceMAC, name = "127.0.0.1"}}) + + EXPECT_HMICALL("BasicCommunication.ActivateApp") + :Do(function(_,data) + self.hmiConnection:SendResponse(data.id,"BasicCommunication.ActivateApp", "SUCCESS", {}) + end) + :Times(2) + end) + + end + end) + + EXPECT_NOTIFICATION("OnHMIStatus", {hmiLevel = "FULL", systemContext = "MAIN"}) + + end + + + + --2. Update policy to allow request + --TODO: Will be updated after policy flow implementation + policyTable:precondition_updatePolicy_AllowFunctionInHmiLeves({"BACKGROUND", "FULL", "LIMITED"}) + + +--------------------------------------------------------------------------------------------- +-----------------------------------------I TEST BLOCK---------------------------------------- +--CommonRequestCheck: Check of mandatory/conditional request's parameters (mobile protocol)-- +--------------------------------------------------------------------------------------------- + + --Begin test suit CommonRequestCheck + + + --Print new line to separate test suite + commonFunctions:newTestCasesGroup("Test Suite For CommonRequestCheck") + + --Description: + -- request with all parameters + -- request with only mandatory parameters + -- request with all combinations of conditional-mandatory parameters (if exist) + -- request with one by one conditional parameters (each case - one conditional parameter) + -- request with missing mandatory parameters one by one (each case - missing one mandatory parameter) + -- request with all parameters are missing + -- request with fake parameters (fake - not from protocol, from another request) + -- request is sent with invalid JSON structure + -- different conditions of correlationID parameter (invalid, several the same etc.) + + --Begin test case CommonRequestCheck.1 + --Description: check request with all parameters + + --Requirement id in JAMA/or Jira ID: SDLAQ-CRS-61 + + --Verification criteria: Sets the initial media clock value and automatic update method for HMI media screen with all parameters + + + for i=1,#updateMode do + Test["SetMediaClockTimer_PositiveCase_" .. tostring(updateMode[i]).."_REJECTED"] = function(self) + countDown = 0 + if updateMode[i] == "COUNTDOWN" then + countDown = -1 + end + + --mobile side: sending SetMediaClockTimer request + local cid = self.mobileSession:SendRPC("SetMediaClockTimer", + { + startTime = + { + hours = 0, + minutes = 1, + seconds = 33 + }, + endTime = + { + hours = 0, + minutes = 1 + countDown, + seconds = 35 + }, + updateMode = updateMode[i] + }) + + --hmi side: expect absence of UI.SetMediaClockTimer request + EXPECT_HMICALL("UI.SetMediaClockTimer") + :Timeout(iTimeout) + :Times(0) + + --mobile side: expect SetMediaClockTimer response + EXPECT_RESPONSE(cid, { success = false, resultCode = "REJECTED"}) + :Timeout(iTimeout) + + end + end + + --End test case CommonRequestCheck.1 + ----------------------------------------------------------------------------------------- + + + --Begin test case CommonRequestCheck.2 + --Description: check request with only mandatory parameters + + --Requirement id in JAMA/or Jira ID: SDLAQ-CRS-61 + + --Verification criteria: Check request with mandatory parameter only: updateMode = "PAUSE", "RESUME" and "CLEAR" + + for i=1,#updateModeNotRequireStartEndTime do + Test["SetMediaClockTimer_OnlyMandatory_" .. tostring(updateModeNotRequireStartEndTime[i]).."REJECTED"] = function(self) + + --mobile side: sending SetMediaClockTimer request + local cid = self.mobileSession:SendRPC("SetMediaClockTimer", + { + updateMode = updateModeNotRequireStartEndTime[i] + }) + + --hmi side: expect absence of UI.SetMediaClockTimer request + EXPECT_HMICALL("UI.SetMediaClockTimer") + :Timeout(iTimeout) + :Times(0) + + --mobile side: expect SetMediaClockTimer response + EXPECT_RESPONSE(cid, { success = false, resultCode = "REJECTED"}) + :Timeout(iTimeout) + + end + end + + --End test case CommonRequestCheck.2 + ----------------------------------------------------------------------------------------- + + --Skipped CommonRequestCheck.3-4: There next checks are not applicable: + -- request with all combinations of conditional-mandatory parameters (if exist) + -- request with one by one conditional parameters (each case - one conditional parameter) + ----------------------------------------------------------------------------------------- + + + --Begin test case CommonRequestCheck.5 + --Description: check request with missing mandatory parameters one by one (each case - missing one mandatory parameter) + + --Requirement id in JAMA/or Jira ID: SDLAQ-CRS-515 + + --Verification criteria: The request without "updateMode" is sent, the INVALID_DATA response code is returned. + + function Test:SetMediaClockTimer_missing_mandatory_parameters_updateMode_INVALID_DATA() + + --mobile side: sending SetMediaClockTimer request + local cid = self.mobileSession:SendRPC("SetMediaClockTimer", + { + startTime = + { + hours = 0, + minutes = 1, + seconds = 33 + }, + endTime = + { + hours = 0, + minutes = 1, + seconds = 35 + } + }) + + --hmi side: expect absence of UI.SetMediaClockTimer request + EXPECT_HMICALL("UI.SetMediaClockTimer") + :Timeout(iTimeout) + :Times(0) + + --mobile side: expect SetMediaClockTimer response + EXPECT_RESPONSE(cid, { success = false, resultCode = "INVALID_DATA"}) + :Timeout(iTimeout) + + end + + --End test case CommonRequestCheck.5 + ----------------------------------------------------------------------------------------- + + --Begin test case CommonRequestCheck.6 + --Description: check request with all parameters are missing + + --Requirement id in JAMA/or Jira ID: SDLAQ-CRS-61 + + --Verification criteria: SDL responses invalid data + + function Test:SetMediaClockTimer_AllParameterAreMissed_INVALID_DATA() + + --mobile side: sending ReSetMediaClockTimer request + local cid = self.mobileSession:SendRPC("SetMediaClockTimer", + { + + }) + + --hmi side: expect absence of UI.SetMediaClockTimer request + EXPECT_HMICALL("UI.SetMediaClockTimer") + :Timeout(iTimeout) + :Times(0) + + --mobile side: expect SetMediaClockTimer response + EXPECT_RESPONSE(cid, { success = false, resultCode = "INVALID_DATA"}) + :Timeout(iTimeout) + + end + + --End test case CommonRequestCheck.6 + ----------------------------------------------------------------------------------------- + + + --Begin test case CommonRequestCheck.7 + --Description: check request with fake parameters (fake - not from protocol, from another request) + + --Requirement id in JAMA/or Jira ID: APPLINK-4518 + + --Verification criteria: According to xml tests by Ford team all fake parameters should be ignored by SDL + + --Begin test case CommonRequestCheck.7.1 + --Description: Check request with fake parameters + + for i=1,#updateMode do + Test["SetMediaClockTimer_FakeParameters_" .. tostring(updateMode[i]).."_REJECTED"] = function(self) + countDown = 0 + if updateMode[i] == "COUNTDOWN" then + countDown = -1 + end + + --mobile side: sending SetMediaClockTimer request + local cid = self.mobileSession:SendRPC("SetMediaClockTimer", + { + fakeParameter = "fakeParameter", + startTime = + { + hours = 0, + minutes = 1, + seconds = 33 + }, + endTime = + { + hours = 0, + minutes = 1 + countDown, + seconds = 35 + }, + updateMode = updateMode[i] + }) + + --hmi side: expect absence of UI.SetMediaClockTimer request + EXPECT_HMICALL("UI.SetMediaClockTimer") + :Timeout(iTimeout) + :Times(0) + + --mobile side: expect SetMediaClockTimer response + EXPECT_RESPONSE(cid, { success = false, resultCode = "REJECTED"}) + :Timeout(iTimeout) + + end + end + + --End test case CommonRequestCheck.7.1 + ----------------------------------------------------------------------------------------- + + --Begin test case CommonRequestCheck.7.2 + --Description: Check request with parameters of other request + + for i=1,#updateMode do + Test["SetMediaClockTimer_ParametersOfOtherRequest_" .. tostring(updateMode[i]).."_REJECTED"] = function(self) + countDown = 0 + if updateMode[i] == "COUNTDOWN" then + countDown = -1 + end + + --mobile side: sending SetMediaClockTimer request + local cid = self.mobileSession:SendRPC("SetMediaClockTimer", + { + syncFileName = "icon.png", --PutFile request + startTime = + { + hours = 0, + minutes = 1, + seconds = 33 + }, + endTime = + { + hours = 0, + minutes = 1 + countDown, + seconds = 35 + }, + updateMode = updateMode[i] + }) + + --hmi side: expect absence of UI.SetMediaClockTimer request + EXPECT_HMICALL("UI.SetMediaClockTimer") + :Timeout(iTimeout) + :Times(0) + + --mobile side: expect SetMediaClockTimer response + EXPECT_RESPONSE(cid, { success = false, resultCode = "REJECTED"}) + :Timeout(iTimeout) + + end + end + + --End test case CommonRequestCheck.7.2 + ----------------------------------------------------------------------------------------- + + --End test case CommonRequestCheck.7 + + + --Begin test case CommonRequestCheck.8 + --Description: Check request is sent with invalid JSON structure + + + --Requirement id in JAMA/or Jira ID: SDLAQ-CRS-395 + + --Verification criteria: The request with wrong JSON syntax is sent, the response comes with INVALID_DATA result code. + + function Test:SetMediaClockTimer_InvalidJSON_INVALID_DATA() + + self.mobileSession.correlationId = self.mobileSession.correlationId + 1 + + local msg = + { + serviceType = 7, + frameInfo = 0, + rpcType = 0, + rpcFunctionId = 15, --SetMediaClockTimerID + rpcCorrelationId = self.mobileSession.correlationId, + -- missing ':' after startTime + --payload = '{"startTime":{"seconds":34,"hours":0,"minutes":12},"endTime":{"seconds":33,"hours":11,"minutes":22},"updateMode":"COUNTUP"}' + payload = '{"startTime" {"seconds":34,"hours":0,"minutes":12},"endTime":{"seconds":33,"hours":11,"minutes":22},"updateMode":"COUNTUP"}' + } + self.mobileSession:Send(msg) + + --hmi side: expect absence of UI.SetMediaClockTimer request + EXPECT_HMICALL("UI.SetMediaClockTimer") + :Timeout(iTimeout) + :Times(0) + + self.mobileSession:ExpectResponse(self.mobileSession.correlationId, { success = false, resultCode = "INVALID_DATA" }) + + end + + --End test case CommonRequestCheck.8 + ----------------------------------------------------------------------------------------- + + --Begin test case CommonRequestCheck.9 + --Description: CorrelationId is duplicated + + --Requirement id in JAMA/or Jira ID: + + --Verification criteria: response comes with SUCCESS result code. + + function Test:SetMediaClockTimer_CorrelationID_Duplicated_REJECTED() + + --mobile side: sending SetMediaClockTimer request + local cid = self.mobileSession:SendRPC("SetMediaClockTimer", + { + startTime = + { + hours = 0, + minutes = 1, + seconds = 33 + }, + endTime = + { + hours = 0, + minutes = 1, + seconds = 35 + }, + updateMode = "COUNTUP" + }) + + --hmi side: expect absence of UI.SetMediaClockTimer request + EXPECT_HMICALL("UI.SetMediaClockTimer") + :Timeout(iTimeout) + :Times(0) + + --mobile side: expect SetMediaClockTimer response + EXPECT_RESPONSE(cid, { success = false, resultCode = "REJECTED" }) + :Times(2) + :Do(function(exp,data) + if exp.occurences == 1 then + local msg = + { + serviceType = 7, + frameInfo = 0, + rpcType = 0, + rpcFunctionId = 15, --SetMediaClockTimerID + rpcCorrelationId = cid, + payload = '{"startTime":{"seconds":33,"hours":0,"minutes":1},"endTime":{"seconds":35,"hours":0,"minutes":1},"updateMode":"COUNTUP"}' + } + self.mobileSession:Send(msg) + end + end) + + end + + --End test case CommonRequestCheck.9 + ----------------------------------------------------------------------------------------- + + --End test suit CommonRequestCheck + + + +--------------------------------------------------------------------------------------------- +----------------------------------------II TEST BLOCK---------------------------------------- +----------------------------------------Positive cases--------------------------------------- +--------------------------------------------------------------------------------------------- + + --=================================================================================-- + --------------------------------Positive request check------------------------------- + --=================================================================================-- + + + --Begin test suit PositiveRequestCheck + --Description: check of each request parameter value in bound and boundary conditions + + --Begin test case PositiveRequestCheck.1 + --Description: check of each request parameter value in bound and boundary conditions startTime parameter + + --Requirement id in JAMA/or Jira ID: SDLAQ-CRS-2635 + + --Verification criteria: SDL re-sends startTime value to HMI within startTime parameter of UI.SetMediaClockTimer in case of any updateMode value that mobile app sends to SDL (that is, it is HMI`s responsibility to ignore startTime for PAUSE, RESUME, CLEAR and display the values correctly for COUNTUP and COUNTDOWN updateMode values). + + --Begin test case PositiveRequestCheck.1.1 + --Description: check startTime.seconds parameter value is in bound + + for i=1,#InBound60 do + for j =1, #updateMode do + Test["SetMediaClockTimer_startTime_seconds_InBound_" .. tostring(InBound60[i]) .."_"..tostring(updateMode[j]).."_REJECTED"] = function(self) + countDown = 0 + if updateMode[j] == "COUNTDOWN" then + countDown = -1 + end + + --mobile side: sending SetMediaClockTimer request + local cid = self.mobileSession:SendRPC("SetMediaClockTimer", + { + startTime = + { + hours = 0, + minutes = 1, + seconds = InBound60[i] + }, + endTime = + { + hours = 1 + countDown, + minutes = 1 + countDown, + seconds = 35 + }, + updateMode = updateMode[j] + }) + + --hmi side: expect absence of UI.SetMediaClockTimer request + EXPECT_HMICALL("UI.SetMediaClockTimer") + :Timeout(iTimeout) + :Times(0) + + --mobile side: expect SetMediaClockTimer response + EXPECT_RESPONSE(cid, { success = false, resultCode = "REJECTED"}) + :Timeout(iTimeout) + + end + end + end + + --End test case PositiveRequestCheck.1.1 + ----------------------------------------------------------------------------------------- + + --Begin test case PositiveRequestCheck.1.2 + --Description: check startTime.minutes parameter value is in bound + + for i=1,#InBound60 do + for j =1, #updateMode do + Test["SetMediaClockTimer_startTime_minutes_InBound_" .. tostring(InBound60[i]) .."_"..tostring(updateMode[j]).."_REJECTED"] = function(self) + countDown = 0 + if updateMode[j] == "COUNTDOWN" then + countDown = -1 + end + + --mobile side: sending SetMediaClockTimer request + local cid = self.mobileSession:SendRPC("SetMediaClockTimer", + { + startTime = + { + hours = 0, + minutes = InBound60[i], + seconds = 3 + }, + endTime = + { + hours = 1 + countDown, + minutes = 0, + seconds = 1 + }, + updateMode = updateMode[j] + }) + + --hmi side: expect absence of UI.SetMediaClockTimer request + EXPECT_HMICALL("UI.SetMediaClockTimer") + :Timeout(iTimeout) + :Times(0) + + --mobile side: expect SetMediaClockTimer response + EXPECT_RESPONSE(cid, { success = false, resultCode = "REJECTED"}) + :Timeout(iTimeout) + + end + end + end + + --End test case PositiveRequestCheck.1.2 + ----------------------------------------------------------------------------------------- + + --Begin test case PositiveRequestCheck.1.3 + --Description: check startTime.hours parameter value is in bound + + for i=1,#InBound60 do + for j =1, #updateMode do + Test["SetMediaClockTimer_startTime_hours_InBound_" .. tostring(InBound60[i]) .."_"..tostring(updateMode[j]).."_REJECTED"] = function(self) + countDown = 0 + if updateMode[j] == "COUNTDOWN" then + countDown = -1 + end + + --mobile side: sending SetMediaClockTimer request + local cid = self.mobileSession:SendRPC("SetMediaClockTimer", + { + startTime = + { + hours = InBound60[i], + minutes = 1, + seconds = 33, + }, + endTime = + { + hours = InBound60[i], + minutes = 1 + countDown, + seconds = 35 + }, + updateMode = updateMode[j] + }) + + --hmi side: expect absence of UI.SetMediaClockTimer request + EXPECT_HMICALL("UI.SetMediaClockTimer") + :Timeout(iTimeout) + :Times(0) + + + --mobile side: expect SetMediaClockTimer response + EXPECT_RESPONSE(cid, { success = false, resultCode = "REJECTED"}) + :Timeout(iTimeout) + + end + end + end + + --End test case PositiveRequestCheck.1.3 + ----------------------------------------------------------------------------------------- + + --Begin test case PositiveRequestCheck.1.4 + --Description: check endTime.seconds parameter value is in bound + + for i=1,#InBound60 do + for j =1, #updateMode do + Test["SetMediaClockTimer_endTime_seconds_InBound_" .. tostring(InBound60[i]) .."_"..tostring(updateMode[j]).."_REJECTED"] = function(self) + countDown = 0 + if updateMode[j] == "COUNTDOWN" then + countDown = -1 + end + + --mobile side: sending SetMediaClockTimer request + local cid = self.mobileSession:SendRPC("SetMediaClockTimer", + { + startTime = + { + hours = 0, + minutes = 1, + seconds = 0 + }, + endTime = + { + hours = 0, + minutes = 1 + countDown, + seconds = InBound60[i] + }, + updateMode = updateMode[j] + }) + + --hmi side: expect absence of UI.SetMediaClockTimer request + EXPECT_HMICALL("UI.SetMediaClockTimer") + :Timeout(iTimeout) + :Times(0) + + + --mobile side: expect SetMediaClockTimer response + EXPECT_RESPONSE(cid, { success = false, resultCode = "REJECTED"}) + :Timeout(iTimeout) + + end + end + end + + --End test case PositiveRequestCheck.1.4 + ----------------------------------------------------------------------------------------- + + --Begin test case PositiveRequestCheck.1.5 + --Description: check endTime.minutes parameter value is in bound + + for i=1,#InBound60 do + for j =1, #updateMode do + Test["SetMediaClockTimer_endTime_minutes_InBound_" .. tostring(InBound60[i]) .."_"..tostring(updateMode[j]).."_REJECTED"] = function(self) + countDown = 0 + if updateMode[j] == "COUNTDOWN" then + countDown = -1 + end + + --mobile side: sending SetMediaClockTimer request + local cid = self.mobileSession:SendRPC("SetMediaClockTimer", + { + startTime = + { + hours = 1, + minutes = 0, + seconds = 3 + }, + endTime = + { + hours = 1 + countDown, + minutes = InBound60[i], + seconds = 4 + }, + updateMode = updateMode[j] + }) + + --hmi side: expect absence of UI.SetMediaClockTimer request + EXPECT_HMICALL("UI.SetMediaClockTimer") + :Timeout(iTimeout) + :Times(0) + + --mobile side: expect SetMediaClockTimer response + EXPECT_RESPONSE(cid, { success = false, resultCode = "REJECTED"}) + :Timeout(iTimeout) + + end + end + end + + --End test case PositiveRequestCheck.1.5 + ----------------------------------------------------------------------------------------- + + --Begin test case PositiveRequestCheck.1.6 + --Description: check endTime.hours parameter value is in bound + + for i=1,#InBound60 do + for j =1, #updateMode do + Test["SetMediaClockTimer_endTime_hours_InBound_" .. tostring(InBound60[i]) .."_"..tostring(updateMode[j]).."_REJECTED"] = function(self) + countDown = 0 + if updateMode[j] == "COUNTDOWN" then + countDown = -1 + end + + --mobile side: sending SetMediaClockTimer request + local cid = self.mobileSession:SendRPC("SetMediaClockTimer", + { + startTime = + { + hours = InBound60[i], + minutes = 1, + seconds = 33, + }, + endTime = + { + hours = InBound60[i], + minutes = 1 + countDown, + seconds = 35 + }, + updateMode = updateMode[j] + }) + + --hmi side: expect absence of UI.SetMediaClockTimer request + EXPECT_HMICALL("UI.SetMediaClockTimer") + :Timeout(iTimeout) + :Times(0) + + --mobile side: expect SetMediaClockTimer response + EXPECT_RESPONSE(cid, { success = false, resultCode = "REJECTED"}) + :Timeout(iTimeout) + + end + end + end + + + --End test case PositiveRequestCheck.1.6 + ----------------------------------------------------------------------------------------- + + --End test case PositiveRequestCheck.1 + + --End test suit PositiveRequestCheck + + + --=================================================================================-- + --------------------------------Positive response check------------------------------ + --=================================================================================-- + + --------Checks----------- + -- parameters with values in boundary conditions + + + --Begin test suit PositiveResponseCheck + --Description: + + --not applicable for non-media app + + --End test suit PositiveResponseCheck + + +---------------------------------------------------------------------------------------------- +----------------------------------------III TEST BLOCK---------------------------------------- +----------------------------------------Negative cases---------------------------------------- +---------------------------------------------------------------------------------------------- + + --=================================================================================-- + ---------------------------------Negative request check------------------------------ + --=================================================================================-- + --------Checks----------- + -- outbound values + -- invalid values(empty, missing, nonexistent, duplicate, invalid characters) + -- parameters with wrong type + -- invalid json + + --Begin test suit NegativeRequestCheck + --Description: check of each request parameter value out of bound, missing, with wrong type, empty, duplicate etc. + + + --Begin test case NegativeRequestCheck.1 + --Description: check of each request parameter value out bound and boundary conditions + + --Requirement id in JAMA/or Jira ID: SDLAQ-CRS-2635, SDLAQ-CRS-515 + + --Verification criteria: + --2.1. The request with "hours" value out of bounds is sent, the response comes with INVALID_DATA result code (even if updateMode is not COUNTUP/COUNTDOWN). + --2.2. The request with "minutes" value out of bounds is sent, the response comes with INVALID_DATA result code (even if updateMode is not COUNTUP/COUNTDOWN). + --2.3. The request with "seconds" value out of bounds is sent, the response comes with INVALID_DATA result code (even if updateMode is not COUNTUP/COUNTDOWN). + --2.4. The request with wrong data in "updateMode" parameter (e.g. value which doesn't exist in "UpdateMode" enum) is sent , the response with INVALID_DATA result code is returned. + + --Begin test case NegativeRequestCheck.1.1 + --Description: Check startTime.seconds parameter value is in outbound + + + for i=1,#OutBound60 do + for j =1, #updateMode do + Test["SetMediaClockTimer_startTime_seconds_OutBound_" .. tostring(OutBound60[i]) .."_"..tostring(updateMode[j]).."_INVALID_DATA"] = function(self) + countDown = 0 + if updateMode[j] == "COUNTDOWN" then + countDown = -1 + end + + --mobile side: sending SetMediaClockTimer request + local cid = self.mobileSession:SendRPC("SetMediaClockTimer", + { + startTime = + { + hours = 0, + minutes = 1, + seconds = OutBound60[i] + }, + endTime = + { + hours = 0, + minutes = 1 + countDown, + seconds = 35 + }, + updateMode = updateMode[j] + }) + + --hmi side: expect absence of UI.SetMediaClockTimer request + EXPECT_HMICALL("UI.SetMediaClockTimer") + :Timeout(iTimeout) + :Times(0) + + --mobile side: expect SetMediaClockTimer response + EXPECT_RESPONSE(cid, { success = false, resultCode = "INVALID_DATA"}) + :Timeout(iTimeout) + + end + end + end + + + --End test case NegativeRequestCheck.1.1 + ----------------------------------------------------------------------------------------- + + + --Begin test case NegativeRequestCheck.1.2 + --Description: Check startTime.minutes parameter value is in outbound + + for i=1,#OutBound60 do + for j =1, #updateMode do + Test["SetMediaClockTimer_startTime_minutes_OutBound_" .. tostring(OutBound60[i]) .."_"..tostring(updateMode[j]).."_INVALID_DATA"] = function(self) + countDown = 0 + if updateMode[j] == "COUNTDOWN" then + countDown = -1 + end + + --mobile side: sending SetMediaClockTimer request + local cid = self.mobileSession:SendRPC("SetMediaClockTimer", + { + startTime = + { + hours = 0, + minutes = OutBound60[i], + seconds = 3 + }, + endTime = + { + hours = 1 + countDown, + minutes = 0, + seconds = 1 + }, + updateMode = updateMode[j] + }) + + --hmi side: expect absence of UI.SetMediaClockTimer request + EXPECT_HMICALL("UI.SetMediaClockTimer") + :Timeout(iTimeout) + :Times(0) + + --mobile side: expect SetMediaClockTimer response + EXPECT_RESPONSE(cid, { success = false, resultCode = "INVALID_DATA"}) + :Timeout(iTimeout) + + end + end + end + + + --End test case NegativeRequestCheck.1.2 + ----------------------------------------------------------------------------------------- + + --Begin test case NegativeRequestCheck.1.3 + --Description: Check startTime.hours parameter value is in outbound + + for i=1,#OutBound60 do + for j =1, #updateMode do + Test["SetMediaClockTimer_startTime_hours_OutBound_" .. tostring(OutBound60[i]) .."_"..tostring(updateMode[j]).."_INVALID_DATA"] = function(self) + countDown = 0 + if updateMode[j] == "COUNTDOWN" then + countDown = -1 + end + + --mobile side: sending SetMediaClockTimer request + local cid = self.mobileSession:SendRPC("SetMediaClockTimer", + { + startTime = + { + hours = OutBound60[i], + minutes = 1, + seconds = 33, + }, + endTime = + { + hours = OutBound60[i], + minutes = 1 + countDown, + seconds = 35 + }, + updateMode = updateMode[j] + }) + + --hmi side: expect absence of UI.SetMediaClockTimer request + EXPECT_HMICALL("UI.SetMediaClockTimer") + :Timeout(iTimeout) + :Times(0) + + --mobile side: expect SetMediaClockTimer response + EXPECT_RESPONSE(cid, { success = false, resultCode = "INVALID_DATA"}) + :Timeout(iTimeout) + + end + end + end + + --End test case NegativeRequestCheck.1.3 + ----------------------------------------------------------------------------------------- + + + --Begin test case NegativeRequestCheck.1.4 + --Description: Check endTime.seconds parameter value is in outbound + + for i=1,#OutBound60 do + for j =1, #updateMode do + Test["SetMediaClockTimer_endTime_seconds_OutBound_" .. tostring(OutBound60[i]) .."_"..tostring(updateMode[j]).."_INVALID_DATA"] = function(self) + countDown = 0 + if updateMode[j] == "COUNTDOWN" then + countDown = -1 + end + + --mobile side: sending SetMediaClockTimer request + local cid = self.mobileSession:SendRPC("SetMediaClockTimer", + { + startTime = + { + hours = 0, + minutes = 1, + seconds = 0 + }, + endTime = + { + hours = 0, + minutes = 1 + countDown, + seconds = OutBound60[i] + }, + updateMode = updateMode[j] + }) + + --hmi side: expect absence of UI.SetMediaClockTimer request + EXPECT_HMICALL("UI.SetMediaClockTimer") + :Timeout(iTimeout) + :Times(0) + + --mobile side: expect SetMediaClockTimer response + EXPECT_RESPONSE(cid, { success = false, resultCode = "INVALID_DATA"}) + :Timeout(iTimeout) + + end + end + end + + --End test case NegativeRequestCheck.1.4 + ----------------------------------------------------------------------------------------- + + + --Begin test case NegativeRequestCheck.1.5 + --Description: Check endTime.minutes parameter value is in outbound + + for i=1,#OutBound60 do + for j =1, #updateMode do + Test["SetMediaClockTimer_endTime_minutes_OutBound_" .. tostring(OutBound60[i]) .."_"..tostring(updateMode[j]).."_INVALID_DATA"] = function(self) + countDown = 0 + if updateMode[j] == "COUNTDOWN" then + countDown = -1 + end + + --mobile side: sending SetMediaClockTimer request + local cid = self.mobileSession:SendRPC("SetMediaClockTimer", + { + startTime = + { + hours = 1, + minutes = 0, + seconds = 3 + }, + endTime = + { + hours = 1 + countDown, + minutes = OutBound60[i], + seconds = 4 + }, + updateMode = updateMode[j] + }) + + --hmi side: expect absence of UI.SetMediaClockTimer request + EXPECT_HMICALL("UI.SetMediaClockTimer") + :Timeout(iTimeout) + :Times(0) + + --mobile side: expect SetMediaClockTimer response + EXPECT_RESPONSE(cid, { success = false, resultCode = "INVALID_DATA"}) + :Timeout(iTimeout) + + end + end + end + + --End test case NegativeRequestCheck.1.5 + ----------------------------------------------------------------------------------------- + + --Begin test case NegativeRequestCheck.1.6 + --Description: Check endTime.hours parameter value is in outbound + + for i=1,#OutBound60 do + for j =1, #updateMode do + Test["SetMediaClockTimer_endTime_hours_OutBound_" .. tostring(OutBound60[i]) .."_"..tostring(updateMode[j]).."_INVALID_DATA"] = function(self) + countDown = 0 + if updateMode[j] == "COUNTDOWN" then + countDown = -1 + end + + --mobile side: sending SetMediaClockTimer request + local cid = self.mobileSession:SendRPC("SetMediaClockTimer", + { + startTime = + { + hours = OutBound60[i], + minutes = 1, + seconds = 33, + }, + endTime = + { + hours = OutBound60[i], + minutes = 1 + countDown, + seconds = 35 + }, + updateMode = updateMode[j] + }) + + --hmi side: expect absence of UI.SetMediaClockTimer request + EXPECT_HMICALL("UI.SetMediaClockTimer") + :Timeout(iTimeout) + :Times(0) + + --mobile side: expect SetMediaClockTimer response + EXPECT_RESPONSE(cid, { success = false, resultCode = "INVALID_DATA"}) + :Timeout(iTimeout) + + end + end + end + + --End test case NegativeRequestCheck.1.6 + ----------------------------------------------------------------------------------------- + + --Begin test case NegativeRequestCheck.1.7 + --Description: check of each request parameter value out bound and boundary conditions updateMode parameter + + function Test:SetMediaClockTimer_updateMode_IsInvalidValue_WrongValue_Or_nonexistent_INVALID_DATA() + + --mobile side: sending SetMediaClockTimer request + local cid = self.mobileSession:SendRPC("SetMediaClockTimer", + { + startTime = + { + hours = 1, + minutes = 1, + seconds = 33, + }, + endTime = + { + hours = 1, + minutes = 1, + seconds = 35 + }, + updateMode = "updateMode" + }) + + --hmi side: expect absence of UI.SetMediaClockTimer request + EXPECT_HMICALL("UI.SetMediaClockTimer") + :Timeout(iTimeout) + :Times(0) + + --mobile side: expect SetMediaClockTimer response + EXPECT_RESPONSE(cid, { success = false, resultCode = "INVALID_DATA"}) + :Timeout(iTimeout) + + end + + --End test case NegativeRequestCheck.1.7 + ----------------------------------------------------------------------------------------- + + --End test case NegativeRequestCheck.1 + + + + --Begin test case NegativeRequestCheck.2 + --Description: invalid values(empty, missing, nonexistent, duplicate, invalid characters) + + --Begin test case NegativeRequestCheck.2.1 + --Description: invalid values(empty) + + --Requirement id in JAMA/or Jira ID: SDLAQ-CRS-515 + + --Verification criteria: + --5.1.The request with empty "updateMode" is sent , the response with INVALID_DATA result code is returned. + --5.2.The request with empty "hours" value is sent , the response with INVALID_DATA result code is returned. + --5.3.The request with empty "minutes" value is sent, the response with INVALID_DATA result code is returned. + --5.4.The request with empty "seconds" value is sent, the response with INVALID_DATA result code is returned. + + --Begin test case NegativeRequestCheck.2.1.1 + --Description: 5.1.The request with empty "updateMode" is sent , the response with INVALID_DATA result code is returned. + + function Test:SetMediaClockTimer_updateMode_IsInvalidValue_Empty_INVALID_DATA() + + --mobile side: sending SetMediaClockTimer request + local cid = self.mobileSession:SendRPC("SetMediaClockTimer", + { + startTime = + { + hours = 1, + minutes = 1, + seconds = 33, + }, + endTime = + { + hours = 1, + minutes = 1, + seconds = 35 + }, + updateMode = "" + }) + + --hmi side: expect absence of UI.SetMediaClockTimer request + EXPECT_HMICALL("UI.SetMediaClockTimer") + :Timeout(iTimeout) + :Times(0) + + --mobile side: expect SetMediaClockTimer response + EXPECT_RESPONSE(cid, { success = false, resultCode = "INVALID_DATA"}) + :Timeout(iTimeout) + + end + + --End test case NegativeRequestCheck.2.1.1 + ----------------------------------------------------------------------------------------- + + + --Begin test case NegativeRequestCheck.2.1.2 + --Description: 5.2.The request with empty "hours" value is sent , the response with INVALID_DATA result code is returned. + + --startTime + for j =1, #updateMode do + Test["SetMediaClockTimer_startTime_hours_IsInvalidValue_Empty" .."_"..tostring(updateMode[j]).."_INVALID_DATA"] = function(self) + + --mobile side: sending SetMediaClockTimer request + local cid = self.mobileSession:SendRPC("SetMediaClockTimer", + { + startTime = + { + hours = "", + minutes = 1, + seconds = 33 + }, + endTime = + { + hours = 1, + minutes = 1, + seconds = 35 + }, + updateMode = updateMode[j] + }) + + --hmi side: expect absence of UI.SetMediaClockTimer request + EXPECT_HMICALL("UI.SetMediaClockTimer") + :Timeout(iTimeout) + :Times(0) + + --mobile side: expect SetMediaClockTimer response + EXPECT_RESPONSE(cid, { success = false, resultCode = "INVALID_DATA"}) + :Timeout(iTimeout) + + end + end + + --endTime + for j =1, #updateMode do + Test["SetMediaClockTimer_endTime_hours_IsInvalidValue_Empty" .."_"..tostring(updateMode[j]).."_INVALID_DATA"] = function(self) + + --mobile side: sending SetMediaClockTimer request + local cid = self.mobileSession:SendRPC("SetMediaClockTimer", + { + startTime = + { + hours = 1, + minutes = 1, + seconds = 33 + }, + endTime = + { + hours = "", + minutes = 1, + seconds = 35 + }, + updateMode = updateMode[j] + }) + + --hmi side: expect absence of UI.SetMediaClockTimer request + EXPECT_HMICALL("UI.SetMediaClockTimer") + :Timeout(iTimeout) + :Times(0) + + --mobile side: expect SetMediaClockTimer response + EXPECT_RESPONSE(cid, { success = false, resultCode = "INVALID_DATA"}) + :Timeout(iTimeout) + + end + end + + + --End test case NegativeRequestCheck.2.1.2 + ----------------------------------------------------------------------------------------- + + --Begin test case NegativeRequestCheck.2.1.3 + --Description: 5.3.The request with empty "minutes" value is sent, the response with INVALID_DATA result code is returned. + + --startTime + for j =1, #updateMode do + Test["SetMediaClockTimer_startTime_minutes_IsInvalidValue_Empty" .."_"..tostring(updateMode[j]).."_INVALID_DATA"] = function(self) + + --mobile side: sending SetMediaClockTimer request + local cid = self.mobileSession:SendRPC("SetMediaClockTimer", + { + startTime = + { + hours = 0, + minutes = "", + seconds = 33 + }, + endTime = + { + hours = 1, + minutes = 1, + seconds = 35 + }, + updateMode = updateMode[j] + }) + + --hmi side: expect absence of UI.SetMediaClockTimer request + EXPECT_HMICALL("UI.SetMediaClockTimer") + :Timeout(iTimeout) + :Times(0) + + --mobile side: expect SetMediaClockTimer response + EXPECT_RESPONSE(cid, { success = false, resultCode = "INVALID_DATA"}) + :Timeout(iTimeout) + + end + end + + --endTime + for j =1, #updateMode do + Test["SetMediaClockTimer_endTime_minutes_IsInvalidValue_Empty" .."_"..tostring(updateMode[j]).."_INVALID_DATA"] = function(self) + + --mobile side: sending SetMediaClockTimer request + local cid = self.mobileSession:SendRPC("SetMediaClockTimer", + { + startTime = + { + hours = 0, + minutes = 1, + seconds = 33 + }, + endTime = + { + hours = 1, + minutes = "", + seconds = 35 + }, + updateMode = updateMode[j] + }) + + --hmi side: expect absence of UI.SetMediaClockTimer request + EXPECT_HMICALL("UI.SetMediaClockTimer") + :Timeout(iTimeout) + :Times(0) + + --mobile side: expect SetMediaClockTimer response + EXPECT_RESPONSE(cid, { success = false, resultCode = "INVALID_DATA"}) + :Timeout(iTimeout) + + end + end + + --End test case NegativeRequestCheck.2.1.3 + ----------------------------------------------------------------------------------------- + + --Begin test case NegativeRequestCheck.2.1.4 + --Description: 5.4.The request with empty "seconds" value is sent, the response with INVALID_DATA result code is returned. + + --startTime + for j =1, #updateMode do + Test["SetMediaClockTimer_startTime_seconds_IsInvalidValue_Empty" .."_"..tostring(updateMode[j]).."_INVALID_DATA"] = function(self) + + --mobile side: sending SetMediaClockTimer request + local cid = self.mobileSession:SendRPC("SetMediaClockTimer", + { + startTime = + { + hours = 0, + minutes = 1, + seconds = "" + }, + endTime = + { + hours = 1, + minutes = 1, + seconds = 35 + }, + updateMode = updateMode[j] + }) + + --hmi side: expect absence of UI.SetMediaClockTimer request + EXPECT_HMICALL("UI.SetMediaClockTimer") + :Timeout(iTimeout) + :Times(0) + + --mobile side: expect SetMediaClockTimer response + EXPECT_RESPONSE(cid, { success = false, resultCode = "INVALID_DATA"}) + :Timeout(iTimeout) + + end + end + + --endTime + for j =1, #updateMode do + Test["SetMediaClockTimer_endTime_seconds_IsInvalidValue_Empty" .."_"..tostring(updateMode[j]).."_INVALID_DATA"] = function(self) + + --mobile side: sending SetMediaClockTimer request + local cid = self.mobileSession:SendRPC("SetMediaClockTimer", + { + startTime = + { + hours = 0, + minutes = 1, + seconds = 1 + }, + endTime = + { + hours = 1, + minutes = 1, + seconds = "" + }, + updateMode = updateMode[j] + }) + + --hmi side: expect absence of UI.SetMediaClockTimer request + EXPECT_HMICALL("UI.SetMediaClockTimer") + :Timeout(iTimeout) + :Times(0) + + --mobile side: expect SetMediaClockTimer response + EXPECT_RESPONSE(cid, { success = false, resultCode = "INVALID_DATA"}) + :Timeout(iTimeout) + + end + end + + --End test case NegativeRequestCheck.2.1.4 + ----------------------------------------------------------------------------------------- + + --End test case NegativeRequestCheck.2.1 + + + --Begin test case NegativeRequestCheck.2.2 + --Description: invalid values(missing) + + --Requirement id in JAMA/or Jira ID: SDLAQ-CRS-515 + + --Verification criteria: + --3.1. The request without "updateMode" is sent, the INVALID_DATA response code is returned. + --3.2. The request without "startTime" and with "COUNTUP" updateMode value is sent, the INVALID_DATA response code is returned. + --3.3. The request without "startTime" and with "COUNTDOWN" updateMode value is sent, the INVALID_DATA response code is returned. + + --Begin test case NegativeRequestCheck.2.2.1 + --Description: 3.1. The request without "updateMode" is sent, the INVALID_DATA response code is returned. + + function Test:SetMediaClockTimer_updateMode_IsInvalidValue_missing_INVALID_DATA() + + --mobile side: sending SetMediaClockTimer request + local cid = self.mobileSession:SendRPC("SetMediaClockTimer", + { + startTime = + { + hours = 1, + minutes = 1, + seconds = 33, + }, + endTime = + { + hours = 1, + minutes = 1, + seconds = 35 + } + }) + + --hmi side: expect absence of UI.SetMediaClockTimer request + EXPECT_HMICALL("UI.SetMediaClockTimer") + :Timeout(iTimeout) + :Times(0) + + --mobile side: expect SetMediaClockTimer response + EXPECT_RESPONSE(cid, { success = false, resultCode = "INVALID_DATA"}) + :Timeout(iTimeout) + + end + + --End test case NegativeRequestCheck.2.2.1 + ----------------------------------------------------------------------------------------- + + --Begin test case NegativeRequestCheck.2.2.2 + --Description: + --3.2. The request without "startTime" and with "COUNTUP" updateMode value is sent, the INVALID_DATA response code is returned. + --3.3. The request without "startTime" and with "COUNTDOWN" updateMode value is sent, the INVALID_DATA response code is returned. + + --startTime + for j =1, #updateModeCountUpDown do + Test["SetMediaClockTimer_startTime_IsInvalidValue_missing" .."_"..tostring(updateModeCountUpDown[j]).."_INVALID_DATA"] = function(self) + + --mobile side: sending SetMediaClockTimer request + local cid = self.mobileSession:SendRPC("SetMediaClockTimer", + { + endTime = + { + hours = 1, + minutes = 1, + seconds = 35 + }, + updateMode = updateModeCountUpDown[j] + }) + + --hmi side: expect absence of UI.SetMediaClockTimer request + EXPECT_HMICALL("UI.SetMediaClockTimer") + :Timeout(iTimeout) + :Times(0) + + --mobile side: expect SetMediaClockTimer response + EXPECT_RESPONSE(cid, { success = false, resultCode = "INVALID_DATA"}) + :Timeout(iTimeout) + + end + end + + --End test case NegativeRequestCheck.2.2.2 + ----------------------------------------------------------------------------------------- + + --End test case NegativeRequestCheck.2.2 + + --End test case NegativeRequestCheck.2 + + + --Begin test case NegativeRequestCheck.3 + --Description: parameters with wrong type + + --Requirement id in JAMA/or Jira ID: SDLAQ-CRS-515 + + --Verification criteria: + --4.1. The request with wrong data in "hours" parameter (e.g. string value) is sent , the response with INVALID_DATA result code is returned. + --4.2. The request with wrong data in "minutes" parameter (e.g. string value) is sent , the response with INVALID_DATA result code is returned. + --4.3. The request with wrong data in "seconds" parameter (e.g. string value) is sent , the response with INVALID_DATA result code is returned. + --4.4. The request with wrong data in "updateMode" parameter (e.g. inetger value) is sent , the response with INVALID_DATA result code is returned. + + --Begin test case NegativeRequestCheck.3.1 + --Description: 4.1. The request with wrong data in "hours" parameter (e.g. string value) is sent , the response with INVALID_DATA result code is returned. + + --startTime + for j =1, #updateMode do + Test["SetMediaClockTimer_startTime_hours_IsInvalidValue_wrongType" .."_"..tostring(updateMode[j]).."_INVALID_DATA"] = function(self) + + --mobile side: sending SetMediaClockTimer request + local cid = self.mobileSession:SendRPC("SetMediaClockTimer", + { + startTime = + { + hours = "1", + minutes = 1, + seconds = 33 + }, + endTime = + { + hours = 1, + minutes = 1, + seconds = 35 + }, + updateMode = updateMode[j] + }) + + --hmi side: expect absence of UI.SetMediaClockTimer request + EXPECT_HMICALL("UI.SetMediaClockTimer") + :Timeout(iTimeout) + :Times(0) + + --mobile side: expect SetMediaClockTimer response + EXPECT_RESPONSE(cid, { success = false, resultCode = "INVALID_DATA"}) + :Timeout(iTimeout) + + end + end + + --endTime + for j =1, #updateMode do + Test["SetMediaClockTimer_endTime_hours_IsInvalidValue_WrongType" .."_"..tostring(updateMode[j]).."_INVALID_DATA"] = function(self) + + --mobile side: sending SetMediaClockTimer request + local cid = self.mobileSession:SendRPC("SetMediaClockTimer", + { + startTime = + { + hours = 1, + minutes = 1, + seconds = 33 + }, + endTime = + { + hours = "1", + minutes = 1, + seconds = 35 + }, + updateMode = updateMode[j] + }) + + --hmi side: expect absence of UI.SetMediaClockTimer request + EXPECT_HMICALL("UI.SetMediaClockTimer") + :Timeout(iTimeout) + :Times(0) + + --mobile side: expect SetMediaClockTimer response + EXPECT_RESPONSE(cid, { success = false, resultCode = "INVALID_DATA"}) + :Timeout(iTimeout) + + end + end + + + --End test case NegativeRequestCheck.3.1 + ----------------------------------------------------------------------------------------- + + --Begin test case NegativeRequestCheck.3.2 + --Description: 4.2. The request with wrong data in "minutes" parameter (e.g. string value) is sent , the response with INVALID_DATA result code is returned. + + --startTime + for j =1, #updateMode do + Test["SetMediaClockTimer_startTime_minutes_IsInvalidValue_wrongType" .."_"..tostring(updateMode[j]).."_INVALID_DATA"] = function(self) + + --mobile side: sending SetMediaClockTimer request + local cid = self.mobileSession:SendRPC("SetMediaClockTimer", + { + startTime = + { + hours = 1, + minutes = "1", + seconds = 33 + }, + endTime = + { + hours = 1, + minutes = 1, + seconds = 35 + }, + updateMode = updateMode[j] + }) + + --hmi side: expect absence of UI.SetMediaClockTimer request + EXPECT_HMICALL("UI.SetMediaClockTimer") + :Timeout(iTimeout) + :Times(0) + + --mobile side: expect SetMediaClockTimer response + EXPECT_RESPONSE(cid, { success = false, resultCode = "INVALID_DATA"}) + :Timeout(iTimeout) + + end + end + + --endTime + for j =1, #updateMode do + Test["SetMediaClockTimer_endTime_minutes_IsInvalidValue_WrongType" .."_"..tostring(updateMode[j]).."_INVALID_DATA"] = function(self) + + --mobile side: sending SetMediaClockTimer request + local cid = self.mobileSession:SendRPC("SetMediaClockTimer", + { + startTime = + { + hours = 1, + minutes = 1, + seconds = 33 + }, + endTime = + { + hours = 1, + minutes = "1", + seconds = 35 + }, + updateMode = updateMode[j] + }) + + --hmi side: expect absence of UI.SetMediaClockTimer request + EXPECT_HMICALL("UI.SetMediaClockTimer") + :Timeout(iTimeout) + :Times(0) + + --mobile side: expect SetMediaClockTimer response + EXPECT_RESPONSE(cid, { success = false, resultCode = "INVALID_DATA"}) + :Timeout(iTimeout) + + end + end + + + --End test case NegativeRequestCheck.3.2 + ----------------------------------------------------------------------------------------- + + + --Begin test case NegativeRequestCheck.3.2 + --Description: 4.3. The request with wrong data in "seconds" parameter (e.g. string value) is sent , the response with INVALID_DATA result code is returned. + + --startTime + for j =1, #updateMode do + Test["SetMediaClockTimer_startTime_seconds_IsInvalidValue_wrongType" .."_"..tostring(updateMode[j]).."_INVALID_DATA"] = function(self) + + --mobile side: sending SetMediaClockTimer request + local cid = self.mobileSession:SendRPC("SetMediaClockTimer", + { + startTime = + { + hours = 1, + minutes = 1, + seconds = "33" + }, + endTime = + { + hours = 1, + minutes = 1, + seconds = 35 + }, + updateMode = updateMode[j] + }) + + --hmi side: expect absence of UI.SetMediaClockTimer request + EXPECT_HMICALL("UI.SetMediaClockTimer") + :Timeout(iTimeout) + :Times(0) + + --mobile side: expect SetMediaClockTimer response + EXPECT_RESPONSE(cid, { success = false, resultCode = "INVALID_DATA"}) + :Timeout(iTimeout) + + end + end + + --endTime + for j =1, #updateMode do + Test["SetMediaClockTimer_endTime_seconds_IsInvalidValue_WrongType" .."_"..tostring(updateMode[j]).."_INVALID_DATA"] = function(self) + + --mobile side: sending SetMediaClockTimer request + local cid = self.mobileSession:SendRPC("SetMediaClockTimer", + { + startTime = + { + hours = 1, + minutes = 1, + seconds = 33 + }, + endTime = + { + hours = 1, + minutes = 1, + seconds = "35" + }, + updateMode = updateMode[j] + }) + + --hmi side: expect absence of UI.SetMediaClockTimer request + EXPECT_HMICALL("UI.SetMediaClockTimer") + :Timeout(iTimeout) + :Times(0) + + --mobile side: expect SetMediaClockTimer response + EXPECT_RESPONSE(cid, { success = false, resultCode = "INVALID_DATA"}) + :Timeout(iTimeout) + + end + end + + + --End test case NegativeRequestCheck.3.2 + ----------------------------------------------------------------------------------------- + + --Begin test case NegativeRequestCheck.3.3 + --Description: 4.4. The request with wrong data in "updateMode" parameter (e.g. integer value) is sent , the response with INVALID_DATA result code is returned. + + function Test:SetMediaClockTimer_updateMode_IsInvalidValue_WrongType_INVALID_DATA() + + --mobile side: sending SetMediaClockTimer request + local cid = self.mobileSession:SendRPC("SetMediaClockTimer", + { + startTime = + { + hours = 1, + minutes = 1, + seconds = 33, + }, + endTime = + { + hours = 1, + minutes = 1, + seconds = 35 + }, + updateMode = 1 + }) + + --hmi side: expect absence of UI.SetMediaClockTimer request + EXPECT_HMICALL("UI.SetMediaClockTimer") + :Timeout(iTimeout) + :Times(0) + + --mobile side: expect SetMediaClockTimer response + EXPECT_RESPONSE(cid, { success = false, resultCode = "INVALID_DATA"}) + :Timeout(iTimeout) + + end + + --End test case NegativeRequestCheck.3.3 + ----------------------------------------------------------------------------------------- + + --End test case NegativeRequestCheck.3 + + + --End test suit NegativeRequestCheck + + + --=================================================================================-- + ---------------------------------Negative response check------------------------------ + --=================================================================================-- + + --------Checks----------- + -- outbound values + -- invalid values(empty, missing, nonexistent, invalid characters) + -- parameters with wrong type + -- invalid json + + --Begin test suit NegativeResponseCheck + --Description: + + + --not applicable for non-media app + + --End test suit NegativeResponseCheck + + +---------------------------------------------------------------------------------------------- +----------------------------------------IV TEST BLOCK----------------------------------------- +---------------------------------------Result code check-------------------------------------- +---------------------------------------------------------------------------------------------- + + --Check all uncovered pairs resultCodes+success + + --Begin test suit ResultCodeCheck + --Description: check result code of response to Mobile + + --Begin test case ResultCodeCheck.1 + --Description: A command can not be executed because no application has been registered with RegisterAppInterface. + + --Requirement id in JAMA: SDLAQ-CRS-518 + + --Verification criteria: SDL sends APPLICATION_NOT_REGISTERED code when the app sends a request within the same connection before RegisterAppInterface has been performed yet. + + --Precondition: Create new session + function Test:Precondition_CreationNewSession() + -- Connected expectation + self.mobileSession2 = mobile_session.MobileSession( + self, + self.mobileConnection) + end + + + for j =1, #updateMode do + Test["UI_SetMediaClockTimer_resultCode_APPLICATION_NOT_REGISTERED".."_"..tostring(updateMode[j])] = function(self) + countDown = 0 + if updateMode[j] == "COUNTDOWN" then + countDown = -1 + end + + --mobile side: sending SetMediaClockTimer request + local cid = self.mobileSession2:SendRPC("SetMediaClockTimer", + { + startTime = + { + hours = 0, + minutes = 1, + seconds = 33, + }, + endTime = + { + hours = 0, + minutes = 1 + countDown, + seconds = 35 + }, + updateMode = updateMode[j] + }) + + --hmi side: expect absence of UI.SetMediaClockTimer request + EXPECT_HMICALL("UI.SetMediaClockTimer") + :Timeout(iTimeout) + :Times(0) + + --mobile side: expect SetMediaClockTimer response + self.mobileSession2:ExpectResponse(cid, { success = false, resultCode = "APPLICATION_NOT_REGISTERED" }) + end + + end + + --End test case ResultCodeCheck.1 + + --End test suit ResultCodeCheck + +---------------------------------------------------------------------------------------------- +-----------------------------------------V TEST BLOCK----------------------------------------- +---------------------------------------HMI negative cases------------------------------------- +---------------------------------------------------------------------------------------------- + + --------Checks----------- + -- requests without responses from HMI + -- invalid structure os response + -- several responses from HMI to one request + -- fake parameters + -- HMI correlation id check + -- wrong response with correct HMI id + + + --Begin test suit HMINegativeCheck + --Description: + + --not applicable for non-media + + --End test suit HMINegativeCheck + +---------------------------------------------------------------------------------------------- +-----------------------------------------VI TEST BLOCK---------------------------------------- +-------------------------Sequence with emulating of user's action(s)-------------------------- +---------------------------------------------------------------------------------------------- + + --Begin test suit SequenceCheck + --Description: TC's checks SDL behavior by processing + -- different request sequence with timeout + -- with emulating of user's actions + + + --Begin test case SequenceCheck.1-5 + --Description: check scenario in test cases: + --TC_SetMediaClockTimer_01: Call SetMediaClockTimer request from mobile app on HMI with COUNTUP parameter + --TC_SetMediaClockTimer_02: Call SetMediaClockTimer request from mobile app on HMI with COUNTDOWN parameter + --TC_SetMediaClockTimer_03: Call SetMediaClockTimer request from mobile app on HMI with PAUSE parameter + --TC_SetMediaClockTimer_04: Call SetMediaClockTimer request from mobile app on HMI with RESUME parameter + --TC_SetMediaClockTimer_05: Call SetMediaClockTimer request from mobile app on HMI with CLEAR parameter + + --It is covered by TC SetMediaClockTimer_PositiveCase + + --End test case SequenceCheck.1-5 + ----------------------------------------------------------------------------------------- + + --Begin test case SequenceCheck.6 + --Description: check scenario in test case TC_SetMediaClockTimer_06: Call SetMediaClockTimer request from mobile app on HMI with CLEAR parameter when UI Media clock timer is in default state (empty) + + --not applicable for non-media app + + --End test suit SequenceCheck + + + + +---------------------------------------------------------------------------------------------- +-----------------------------------------VII TEST BLOCK--------------------------------------- +--------------------------------------Different HMIStatus------------------------------------- +---------------------------------------------------------------------------------------------- + --Description: processing of request/response in different HMIlevels, SystemContext, AudioStreamingState + + --Begin test suit DifferentHMIlevel + --Description: processing API in different HMILevel + + --Begin test case DifferentHMIlevel.1 + --Description: Check SetMediaClockTimer request when application is in LIMITTED HMI level + + --not applicable for non-media app + + --End test case DifferentHMIlevel.1 + ----------------------------------------------------------------------------------------- + + --Begin test case DifferentHMIlevel.2 + --Description: Check SetMediaClockTimer request when application is in NONE HMI level + + --Requirement id in JAMA/or Jira ID: SDLAQ-CRS-782 + + --Verification criteria: SetMediaClockTimer is NOT allowed in NONE HMI level + + + -- --Precondition: Change app to FULL HMI status + -- function Test:ActivateApplication() + -- --HMI send ActivateApp request + -- local RequestId = self.hmiConnection:SendRequest("SDL.ActivateApp", { appID = self.applications["Test Application"]}) + -- EXPECT_HMIRESPONSE(RequestId) + -- :Do(function(_,data) + -- if data.result.isSDLAllowed ~= true then + -- local RequestId = self.hmiConnection:SendRequest("SDL.GetUserFriendlyMessage", {language = "EN-US", messageCodes = {"DataConsent"}}) + -- EXPECT_HMIRESPONSE(RequestId,{result = {code = 0, method = "SDL.GetUserFriendlyMessage"}}) + -- :Do(function(_,data) + -- --hmi side: send request SDL.OnAllowSDLFunctionality + -- self.hmiConnection:SendNotification("SDL.OnAllowSDLFunctionality", {allowed = true, source = "GUI", device = {id = 1, name = "127.0.0.1"}}) + -- end) + + -- EXPECT_HMICALL("BasicCommunication.ActivateApp") + -- :Do(function(_,data) + -- self.hmiConnection:SendResponse(data.id,"BasicCommunication.ActivateApp", "SUCCESS", {}) + -- end) + -- :Times(2) + -- end + -- end) + + -- EXPECT_NOTIFICATION("OnHMIStatus", {hmiLevel = "FULL", systemContext = "MAIN"}) + + -- end + + --Precondition: Change app to None HMI status + function Test:ExitApplication() + + local function sendUserExit() + --hmi side: sending BasicCommunication.OnExitApplication request + local cid = self.hmiConnection:SendNotification("BasicCommunication.OnExitApplication", + { + appID = self.applications["Test Application"], + reason = "USER_EXIT" + }) + end + + local function SendOnSystemContext1() + --hmi side: sending UI.OnSystemContext request + SendOnSystemContext(self,"MAIN") + end + + local function sendOnAppDeactivate() + --hmi side: sending BasicCommunication.OnAppDeactivated request + local cid = self.hmiConnection:SendNotification("BasicCommunication.OnAppDeactivated", + { + appID = self.applications["Test Application"], + reason = "GENERAL" + }) + end + + --hmi side: sending BasicCommunication.OnSystemContext request + SendOnSystemContext(self,"MENU") + + --hmi side: sending BasicCommunication.OnExitApplication request + RUN_AFTER(sendUserExit, 1000) + + --hmi side: sending UI.OnSystemContext request = MAIN + RUN_AFTER(SendOnSystemContext1, 2000) + + --hmi side: sending BasicCommunication.OnAppDeactivated request + RUN_AFTER(sendOnAppDeactivate, 3000) + + + --mobile side: OnHMIStatus notifications + EXPECT_NOTIFICATION("OnHMIStatus", + { systemContext = "MENU", hmiLevel = "FULL"}, + { systemContext = "MENU", hmiLevel = "NONE"}, + { systemContext = "MAIN", hmiLevel = "NONE"}) + :Times(3) + + end + + + for j =1, #updateMode do + Test["SetMediaClockTimer_NONE_" ..tostring(updateMode[j]).."_DISALLOWED"] = function(self) + countDown = 0 + if updateMode[j] == "COUNTDOWN" then + countDown = -1 + end + + --mobile side: sending SetMediaClockTimer request + local cid = self.mobileSession:SendRPC("SetMediaClockTimer", + { + startTime = + { + hours = 0, + minutes = 1, + seconds = 33, + }, + endTime = + { + hours = 0, + minutes = 1 + countDown, + seconds = 35 + }, + updateMode = updateMode[j] + }) + + + --hmi side: expect UI.SetMediaClockTimer request + EXPECT_HMICALL("UI.SetMediaClockTimer") + :Timeout(iTimeout) + :Times(0) + + + --mobile side: expect SetMediaClockTimer response + EXPECT_RESPONSE(cid, { success = false, resultCode = "DISALLOWED", info = nil}) + :Timeout(iTimeout) + + end + end + + --End test case DifferentHMIlevel.2 + ----------------------------------------------------------------------------------------- + + --Begin test case DifferentHMIlevel.3 + --Description: Check SetMediaClockTimer request when application is in BACKGOUND HMI level + + --Requirement id in JAMA/or Jira ID: SDLAQ-CRS-782 + + --Verification criteria: SetMediaClockTimer is allowed in BACKGOUND HMI level according to policy + + --Precondition: Change app to FULL HMI status + function Test:ActivateApplication() + --HMI send ActivateApp request + local RequestId = self.hmiConnection:SendRequest("SDL.ActivateApp", { appID = self.applications["Test Application"]}) + EXPECT_HMIRESPONSE(RequestId) + :Do(function(_,data) + if data.result.isSDLAllowed ~= true then + local RequestId = self.hmiConnection:SendRequest("SDL.GetUserFriendlyMessage", {language = "EN-US", messageCodes = {"DataConsent"}}) + EXPECT_HMIRESPONSE(RequestId,{result = {code = 0, method = "SDL.GetUserFriendlyMessage"}}) + :Do(function(_,data) + --hmi side: send request SDL.OnAllowSDLFunctionality + self.hmiConnection:SendNotification("SDL.OnAllowSDLFunctionality", {allowed = true, source = "GUI", device = {id = 1, name = "127.0.0.1"}}) + end) + + EXPECT_HMICALL("BasicCommunication.ActivateApp") + :Do(function(_,data) + self.hmiConnection:SendResponse(data.id,"BasicCommunication.ActivateApp", "SUCCESS", {}) + end) + :Times(2) + end + end) + + EXPECT_NOTIFICATION("OnHMIStatus", {hmiLevel = "FULL", systemContext = "MAIN"}) + + end + + --Precondition: Set app in BACKGROUND HMI level + function Test:ChangeHMIToLimited() + --hmi side: sending BasicCommunication.OnAppDeactivated request + local cid = self.hmiConnection:SendNotification("BasicCommunication.OnAppDeactivated", + { + appID = self.applications["Test Application"], + reason = "GENERAL" + }) + + --mobile side: expect OnHMIStatus notification + EXPECT_NOTIFICATION("OnHMIStatus",{hmiLevel = "BACKGROUND", audioStreamingState = "NOT_AUDIBLE", systemContext = "MAIN"}) + + end + + for j =1, #updateMode do + Test["SetMediaClockTimer_BACKGROUND_" ..tostring(updateMode[j])] = function(self) + countDown = 0 + if updateMode[j] == "COUNTDOWN" then + countDown = -1 + end + + --mobile side: sending SetMediaClockTimer request + local cid = self.mobileSession:SendRPC("SetMediaClockTimer", + { + startTime = + { + hours = 0, + minutes = 1, + seconds = 33, + }, + endTime = + { + hours = 0, + minutes = 1 + countDown, + seconds = 35 + }, + updateMode = updateMode[j] + }) + + + --hmi side: expect UI.SetMediaClockTimer request + EXPECT_HMICALL("UI.SetMediaClockTimer") + :Timeout(iTimeout) + :Times(0) + + + --mobile side: expect SetMediaClockTimer response + EXPECT_RESPONSE(cid, { success = false, resultCode = "REJECTED"}) + --:Timeout(iTimeout) + :Timeout(11000) + + end + end + + + --End test case DifferentHMIlevel.3 + ----------------------------------------------------------------------------------------- + + --End test suit DifferentHMIlevel + + + +--------------------------------------------------------------------------------------------- +-------------------------------------------Postcondition------------------------------------- +--------------------------------------------------------------------------------------------- + + --Print new line to separate Postconditions + commonFunctions:newTestCasesGroup("Postconditions") + + + --Restore sdl_preloaded_pt.json + policyTable:Restore_preloaded_pt() + + + + return Test + diff --git a/test_scripts/API/ATF_Show.lua b/test_scripts/API/ATF_Show.lua new file mode 100644 index 0000000000..6f11f3e558 --- /dev/null +++ b/test_scripts/API/ATF_Show.lua @@ -0,0 +1,5050 @@ +Test = require('connecttest') +require('cardinalities') +local events = require('events') +local mobile_session = require('mobile_session') +local mobile = require('mobile_connection') +local tcp = require('tcp_connection') +local file_connection = require('file_connection') +local json = require('json') +local module = require('testbase') +---------------------------------------------------------------------------- +--UPDATED: +config.deviceMAC = "12ca17b49af2289436f303e0166030a21e525d266e209267433801a8fd4071a0" +--ToDo: shall be removed when APPLINK-16610 is fixed +config.defaultProtocolVersion = 2 +local storagePath = config.pathToSDL .. "storage/" ..config.application1.registerAppInterfaceParams.appID.. "_" .. config.deviceMAC.. "/" + +-- User required files +require('user_modules/AppTypes') +local SDLConfig = require('user_modules/shared_testcases/SmartDeviceLinkConfigurations') + +--------------------------------------------------------------------------------------------- +-----------------------------Required Shared Libraries--------------------------------------- +--------------------------------------------------------------------------------------------- +local commonFunctions = require('user_modules/shared_testcases/commonFunctions') +local commonSteps = require('user_modules/shared_testcases/commonSteps') +local commonTestCases = require('user_modules/shared_testcases/commonTestCases') +local policyTable = require('user_modules/shared_testcases/testCasesForPolicyTable') +local stringParameter = require('user_modules/shared_testcases/testCasesForStringParameter') +local enumerationParameter = require('user_modules/shared_testcases/testCasesForEnumerationParameter') +local imageParameter = require('user_modules/shared_testcases/testCasesForImageParameter') +local arraySoftButtonsParameter = require('user_modules/shared_testcases/testCasesForArraySoftButtonsParameter') +local arrayStringParameter = require('user_modules/shared_testcases/testCasesForArrayStringParameter') +require('user_modules/AppTypes') + +--------------------------------------------------------------------------------------------- +------------------------------------ Common Variables --------------------------------------- +--------------------------------------------------------------------------------------------- +APIName = "Show" -- set request name +strMaxLengthFileName255 = string.rep("a", 251) .. ".png" -- set max length file name +--local storagePath = config.pathToSDL .. SDLConfig:GetValue("AppStorageFolder") .. "/" .. tostring(config.application1.registerAppInterfaceParams.appID .. "_" .. tostring(config.deviceMAC) .. "/") + +--Debug = {"graphic", "value"} --use to print request before sending to SDL. +Debug = {} -- empty {}: script will do not print request on console screen. + +--------------------------------------------------------------------------------------------- +-------------------------- Overwrite These Functions For This Script------------------------- +--------------------------------------------------------------------------------------------- +--Specific functions for this script +--1. createRequest() +--2. createUIParameters(Request) +--3. verify_SUCCESS_Case(Request) +--------------------------------------------------------------------------------------------- + + + +--Create default request parameters +function Test:createRequest() + + return { + + customPresets = + { + "Preset1", + "Preset2", + "Preset3" + } + } + +end +--------------------------------------------------------------------------------------------- + +--Create UI expected result based on parameters from the request +function Test:createUIParameters(Request) + + local param = {} + + param["alignment"] = Request["alignment"] + param["customPresets"] = Request["customPresets"] + + --Convert showStrings parameter + local j = 0 + for i = 1, 4 do + if Request["mainField" .. i] ~= nil then + j = j + 1 + if param["showStrings"] == nil then + param["showStrings"] = {} + end + param["showStrings"][j] = { + fieldName = "mainField" .. i, + fieldText = Request["mainField" .. i] + } + end + end + + --mediaClock + if Request["mediaClock"] ~= nil then + j = j + 1 + if param["showStrings"] == nil then + param["showStrings"] = {} + end + param["showStrings"][j] = { + fieldName = "mediaClock", + fieldText = Request["mediaClock"] + } + end + + --mediaTrack + if Request["mediaTrack"] ~= nil then + j = j + 1 + if param["showStrings"] == nil then + param["showStrings"] = {} + end + param["showStrings"][j] = { + fieldName = "mediaTrack", + fieldText = Request["mediaTrack"] + } + end + + --statusBar + if Request["statusBar"] ~= nil then + j = j + 1 + if param["showStrings"] == nil then + param["showStrings"] = {} + end + param["showStrings"][j] = { + fieldName = "statusBar", + fieldText = Request["statusBar"] + } + end + + +--Updated: The check is commented here and added in respective sections due to changed expectations of file location + -- param["graphic"] = Request["graphic"] + -- if param["graphic"] ~= nil and + -- param["graphic"].imageType ~= "STATIC" and + -- param["graphic"].value ~= nil and + -- param["graphic"].value ~= "" then + -- param["graphic"].value = storagePath ..param["graphic"].value + -- end + + param["secondaryGraphic"] = Request["secondaryGraphic"] + if param["secondaryGraphic"] ~= nil and + param["secondaryGraphic"].imageType ~= "STATIC" and + param["secondaryGraphic"].value ~= nil and + param["secondaryGraphic"].value ~= "" then + param["secondaryGraphic"].value = storagePath ..param["secondaryGraphic"].value + end + + --softButtons + if Request["softButtons"] ~= nil then + param["softButtons"] = Request["softButtons"] + for i = 1, #param["softButtons"] do + + --if type = TEXT, image = nil, else type = IMAGE, text = nil + if param["softButtons"][i].type == "TEXT" then + param["softButtons"][i].image = nil + + elseif param["softButtons"][i].type == "IMAGE" then + param["softButtons"][i].text = nil + end + + + + --if image.imageType ~=STATIC, add app folder to image value + if param["softButtons"][i].image ~= nil and + param["softButtons"][i].image.imageType ~= "STATIC" then + + param["softButtons"][i].image.value = storagePath ..param["softButtons"][i].image.value + end + + end + end + + + return param + + + +end +--------------------------------------------------------------------------------------------- + +--This function sends a request from mobile and verify result on HMI and mobile for SUCCESS resultCode cases. +function Test:verify_SUCCESS_Case(Request) + + local temp = json.encode(Request) + local cid = 0 + if string.find(temp, "{}") ~= nil or string.find(temp, "{{}}") ~= nil then + temp = string.gsub(temp, "{}", "[]") + temp = string.gsub(temp, "{{}}", "[{}]") + + self.mobileSession.correlationId = self.mobileSession.correlationId + 1 + + local msg = + { + serviceType = 7, + frameInfo = 0, + rpcType = 0, + rpcFunctionId = 13, + rpcCorrelationId = self.mobileSession.correlationId, + payload = temp + } + + cid = self.mobileSession.correlationId + + self.mobileSession:Send(msg) + else + --mobile side: sending Show request + cid = self.mobileSession:SendRPC("Show", Request) + end + + -- TODO: remove after resolving APPLINK-16094 + --------------------------------------------- + if + (Request.graphic and + #Request.graphic == 0) then + Request.graphic = nil + end + + if + (Request.secondaryGraphic and + #Request.secondaryGraphic == 0) then + Request.secondaryGraphic = nil + end + + if + (Request.softButtons and + #Request.softButtons == 0) then + Request.softButtons = nil + end + + if + (Request.customPresets and + #Request.customPresets == 0) then + Request.customPresets = nil + end + + if Request.softButtons then + for i=1,#Request.softButtons do + if Request.softButtons[i].image then + Request.softButtons[i].image = nil + end + end + + end + --------------------------------------------- + + UIParams = self:createUIParameters(Request) + + + --hmi side: expect UI.Show request + EXPECT_HMICALL("UI.Show", UIParams) + :Do(function(_,data) + --hmi side: sending UI.Show response + self.hmiConnection:SendResponse(data.id, data.method, "SUCCESS", {}) + end) + + + --mobile side: expect SetGlobalProperties response + EXPECT_RESPONSE(cid, { success = true, resultCode = "SUCCESS" }) + +end +--------------------------------------------------------------------------------------------- + + + +--------------------------------------------------------------------------------------------- +-------------------------------------------Preconditions------------------------------------- +--------------------------------------------------------------------------------------------- + + --1. Activate application + commonSteps:ActivationApp() + +-- ToDO: Uncomment once policy flow implementation is completed + -- --2. Policy update + --policyTable:updatePolicy("files/ptu_general.json") + + + --3. PutFiles ("a", "icon.png", "action.png", strMaxLengthFileName255) + commonSteps:PutFile("PutFile_MinLength", "a") + commonSteps:PutFile("PutFile_icon.png", "icon.png") + commonSteps:PutFile("PutFile_action.png", "action.png") + commonSteps:PutFile("PutFile_MaxLength_255Characters", strMaxLengthFileName255) +----------------------------------------------------------------------------------------- + + +----------------------------------------------------------------------------------------------- +-------------------------------------------TEST BLOCK I---------------------------------------- +--------------------------------Check normal cases of Mobile request--------------------------- +----------------------------------------------------------------------------------------------- + +--Requirement id in JAMA or JIRA: + --SDLAQ-CRS-57: Show_Request_v2_0 + --SDLAQ-CRS-493: SUCCESS + --SDLAQ-CRS-494: INVALID_DATA + +--Verification criteria: Verify request with valid and invalid values of parameters. +----------------------------------------------------------------------------------------------- + + --List of parameters in the request: + --1. mainField1: type=String, maxlength=500, mandatory=false + --2. mainField2, type=String, maxlength=500, mandatory=false + --3. mainField3, type=String, maxlength=500, mandatory=false + --4. mainField4, type=String, maxlength=500, mandatory=false + --5. statusBar, type=String, maxlength=500, mandatory=false + --6. mediaClock, type=String, maxlength=500, mandatory=false + --7. mediaTrack, type=String, maxlength=500, mandatory=false + --8. alignment, type=TextAlignment, mandatory=false + --9. graphic, type=Image, mandatory=false + --10. secondaryGraphic, type=Image, mandatory=false + --11. softButtons, type=SoftButton, mandatory=false, minsize=0, array=true, maxsize=8 + --12. customPresets, type=String, maxlength=500, mandatory=false, minsize=0, maxsize=8, array=true + ----------------------------------------------------------------------------------------------- + + +----------------------------------------------------------------------------------------------- +--Common Test cases check all parameters with lower bound and upper bound +--1. All parameters are lower bound +--2. All parameters are upper bound +----------------------------------------------------------------------------------------------- + + Test["Show_AllParametersLowerBound_SUCCESS"] = function(self) + + --mobile side: request parameters + local RequestParams = + { + mainField1 = "a", + mainField2 = "a", + mainField3 = "a", + mainField4 = "a", + statusBar= "a", + mediaClock = "a", + mediaTrack = "a", + alignment = "CENTERED", + graphic = + { + imageType = "DYNAMIC", + value = "a" + }, + secondaryGraphic = + { + imageType = "DYNAMIC", + value = "a" + }, + softButtons = {}, + customPresets = {} + } + + self:verify_SUCCESS_Case(RequestParams) + + end + ----------------------------------------------------------------------------------------- + + Test["Show_AllParametersUpperBound_SUCCESS"] = function(self) + + --mobile side: request parameters + local string500Characters = commonFunctions:createString(500) + local string499Characters = commonFunctions:createString(499) + local RequestParams = + { + mainField1 = string500Characters, + mainField2 = string500Characters, + mainField3 = string500Characters, + mainField4 = string500Characters, + statusBar= string500Characters, + mediaClock = string500Characters, + mediaTrack = string500Characters, + alignment = "CENTERED", + graphic = + { + imageType = "DYNAMIC", + value = strMaxLengthFileName255 + }, + secondaryGraphic = + { + imageType = "DYNAMIC", + value = strMaxLengthFileName255 + }, + softButtons = + { + { + text = "1" .. string499Characters, + systemAction = "KEEP_CONTEXT", + type = "BOTH", + isHighlighted = true, + image = + { + imageType = "DYNAMIC", + value = strMaxLengthFileName255 + }, + softButtonID = 1 + }, + { + text = "2" .. string499Characters, + systemAction = "KEEP_CONTEXT", + type = "BOTH", + isHighlighted = true, + image = + { + imageType = "DYNAMIC", + value = strMaxLengthFileName255 + }, + softButtonID = 2 + }, + { + text = "3" .. string499Characters, + systemAction = "KEEP_CONTEXT", + type = "BOTH", + isHighlighted = true, + image = + { + imageType = "DYNAMIC", + value = strMaxLengthFileName255 + }, + softButtonID = 3 + }, + { + text = "4" .. string499Characters, + systemAction = "KEEP_CONTEXT", + type = "BOTH", + isHighlighted = true, + image = + { + imageType = "DYNAMIC", + value = strMaxLengthFileName255 + }, + softButtonID = 4 + }, + { + text = "5" .. string499Characters, + systemAction = "KEEP_CONTEXT", + type = "BOTH", + isHighlighted = true, + image = + { + imageType = "DYNAMIC", + value = strMaxLengthFileName255 + }, + softButtonID = 5 + }, + { + text = "6" .. string499Characters, + systemAction = "KEEP_CONTEXT", + type = "BOTH", + isHighlighted = true, + image = + { + imageType = "DYNAMIC", + value = strMaxLengthFileName255 + }, + softButtonID = 6 + }, + { + text = "7" .. string499Characters, + systemAction = "KEEP_CONTEXT", + type = "BOTH", + isHighlighted = true, + image = + { + imageType = "DYNAMIC", + value = strMaxLengthFileName255 + }, + softButtonID = 7 + }, + { + text = "8" .. string499Characters, + systemAction = "KEEP_CONTEXT", + type = "BOTH", + isHighlighted = true, + image = + { + imageType = "DYNAMIC", + value = strMaxLengthFileName255 + }, + softButtonID = 8 + } + }, + customPresets = + { + "1" .. string499Characters, + "2" .. string499Characters, + "3" .. string499Characters, + "4" .. string499Characters, + "5" .. string499Characters, + "6" .. string499Characters, + "7" .. string499Characters, + "8" .. string499Characters, + } + } + + self:verify_SUCCESS_Case(RequestParams) + + end + ----------------------------------------------------------------------------------------- + + +----------------------------------------------------------------------------------------------- +--Test cases for parameter 1-7: mainField1, mainField2, mainField3, mainField4, statusBar, mediaClock, mediaTrack: type=String, maxlength=500, mandatory=false +----------------------------------------------------------------------------------------------- +--List of test cases for String type parameter: + --1. IsMissed + --2. LowerBound + --3. UpperBound + --4. OutLowerBound/IsEmpty + --5. OutUpperBound + --6. IsWrongType + --7. IsInvalidCharacters +----------------------------------------------------------------------------------------------- + + local Request = Test:createRequest() + local Boundary = {0, 500} + + + stringParameter:verify_String_Parameter(Request, {"mainField1"}, Boundary, false) + stringParameter:verify_String_Parameter(Request, {"mainField2"}, Boundary, false) + stringParameter:verify_String_Parameter(Request, {"mainField3"}, Boundary, false) + stringParameter:verify_String_Parameter(Request, {"mainField4"}, Boundary, false) + stringParameter:verify_String_Parameter(Request, {"statusBar"}, Boundary, false) + stringParameter:verify_String_Parameter(Request, {"mediaClock"}, Boundary, false) + stringParameter:verify_String_Parameter(Request, {"mediaTrack"}, Boundary, false) + + +----------------------------------------------------------------------------------------------- +--Test cases for parameter 8: alignment, type=TextAlignment, mandatory=false +----------------------------------------------------------------------------------------------- +--List of test cases for TextAlignment (enumeration) type parameter: + --1. IsMissed + --2. IsExistentValues + --3. IsNonExistentValues + --4. IsWrongType + --5. IsEmpty +----------------------------------------------------------------------------------------------- + + local Request = Test:createRequest() + local ExistentValues = {"LEFT_ALIGNED", "RIGHT_ALIGNED", "CENTERED"} + enumerationParameter:verify_Enum_String_Parameter(Request, {"alignment"}, ExistentValues, false) + + +----------------------------------------------------------------------------------------------- +--List of test cases for parameter 9-10: graphic, secondaryGraphic: type=Image, mandatory=false +----------------------------------------------------------------------------------------------- +--List of test cases for Image type parameter: + --1. IsMissed + --2. IsEmpty + --3. IsWrongType + --4. ContainsWrongValues + --5. image.imageType: type=ImageType ("STATIC", "DYNAMIC") + --6. image.value: type=String, minlength=0 maxlength=65535 +----------------------------------------------------------------------------------------------- + + local Request = Test:createRequest() + imageParameter:verify_Image_Parameter(Request, {"graphic"}, {"a", strMaxLengthFileName255}, false) + imageParameter:verify_Image_Parameter(Request, {"secondaryGraphic"}, {"a", strMaxLengthFileName255}, false) + + + +----------------------------------------------------------------------------------------------- +--List of test cases for parameter 11: softButtons, type=SoftButton, mandatory=false, minsize=0, array=true, maxsize=8 +----------------------------------------------------------------------------------------------- +--List of test cases for softButtons type parameter: + --1. IsMissed + --2. IsEmpty + --3. IsWrongType + --4. IsLowerBound + --5. IsUpperBound + --6. IsOutLowerBound + --7. IsOutUpperBound + --8. Check parameters in side a button + --"type" type="SoftButtonType"> + --"text" minlength="0" maxlength="500" type="String" mandatory="false" + --"image" type="Image" mandatory="false" + --"isHighlighted" type="Boolean" defvalue="false" mandatory="false" + --"softButtonID" type="Integer" minvalue="0" maxvalue="65535" + --"systemAction" type="SystemAction" defvalue="DEFAULT_ACTION" mandatory="false" +----------------------------------------------------------------------------------------------- + + local Request = Test:createRequest() + local Boundary = {0, 8} + arraySoftButtonsParameter:verify_softButtons_Parameter(Request, {"softButtons"}, Boundary, {"a", strMaxLengthFileName255}, false) + + +----------------------------------------------------------------------------------------------- +--List of test cases for parameter 12: customPresets, type=String, maxlength=500, mandatory=false, minsize=0, maxsize=8, array=true +----------------------------------------------------------------------------------------------- +--List of test cases for softButtons type parameter: + --1. IsMissed + --2. IsEmpty + --3. IsWrongType + --4. IsLowerBound + --5. IsUpperBound + --6. IsOutLowerBound + --7. IsOutUpperBound +----------------------------------------------------------------------------------------------- + + local Request = {mainField1 = "abc"} + local ArrayBoundary = {0, 10} + local ElementBoundary = {1, 500} + arrayStringParameter:verify_Array_String_Parameter(Request, {"customPresets"}, ArrayBoundary, ElementBoundary, false) + + + +---------------------------------------------------------------------------------------------- +-----------------------------------------TEST BLOCK II---------------------------------------- +-----------------------------Check special cases of Mobile request---------------------------- +---------------------------------------------------------------------------------------------- + +--Requirement id in JAMA or JIRA: + --SDLAQ-CRS-57: Show_Request_v2_0 + --SDLAQ-CRS-494: INVALID_DATA + --SDLAQ-CRS-493: SUCCESS + --SDLAQ-CRS-921: SoftButtons + +----------------------------------------------------------------------------------------------- + +--List of test cases for softButtons type parameter: + --1. InvalidJSON (SDLAQ-CRS-494: INVALID_DATA) + --2. CorrelationIdIsDuplicated (SDLAQ-CRS-493: SUCCESS) + --3. FakeParams and FakeParameterIsFromAnotherAPI (APPLINK-14765 SDL must cut off the fake parameters from requests, responses and notifications received from HMI) + --4. MissedAllParameters (SDLAQ-CRS-494: INVALID_DATA) +----------------------------------------------------------------------------------------------- + +local function SpecialRequestChecks() +end +--Begin Test case NegativeRequestCheck +--Description: Check negative request + + + --Print new line to separate new test cases group + commonFunctions:newTestCasesGroup("TestCaseGroupForAbnormal") + + --Begin Test case NegativeRequestCheck.1 + --Description: Invalid JSON + + --replace ":' by ";" + --local Payload = '{"softButtons";{{"softButtonID":3,"type":"BOTH","text":"Close","systemAction":"DEFAULT_ACTION","isHighlighted":true,"image":{"imageType":"DYNAMIC","value":"icon.png"}},{"softButtonID":4,"type":"TEXT","text":"Keep","systemAction":"KEEP_CONTEXT","isHighlighted":true},{"softButtonID":5,"type":"IMAGE","systemAction":"STEAL_FOCUS","image":{"imageType":"DYNAMIC","value":"icon.png"}}},"ttsChunks":{{"type":"TEXT","text":"TTSChunk"}},"progressIndicator":true,"playTone":true,"alertText2":"alertText2","alertText1":"alertText1","duration":3000,"alertText3" "alertText3"}' + -- local Payload = '{"softButtons";{ + -- {"softButtonID":3, + -- "type":"BOTH", + -- "text":"Close", + -- "systemAction":"DEFAULT_ACTION", + -- "isHighlighted":true, + -- }, + -- {"softButtonID":4, + -- "type":"TEXT", + -- "text":"Keep", + -- "systemAction":"KEEP_CONTEXT", + -- "isHighlighted":true}, + -- {"softButtonID":5, + -- "type":"IMAGE", + -- "systemAction":"STEAL_FOCUS", + -- } + -- }, + -- "ttsChunks":{{"type":"TEXT","text":"TTSChunk"}}, + -- "progressIndicator":true, + -- "playTone":true, + -- "alertText2":"alertText2", + -- "alertText1":"alertText1", + -- "duration":3000, + -- "alertText3" + -- "alertText3"}' + + commonTestCases:VerifyInvalidJsonRequest(13, Payload) + + --End Test case NegativeRequestCheck.1 + + + --Begin Test case NegativeRequestCheck.2 + --Description: Check CorrelationId duplicate value + --[[ToDo: APPLINK-13892 ATF: Send(msg) convert parameter in quote ("xxx") to \" + -- + function Test:Show_CorrelationIdIsDuplicated() + + --mobile side: sending Show request + local cid = self.mobileSession:SendRPC("Show", + { + mainField1 = "Show1" + }) + + --request from mobile side + local msg = + { + serviceType = 7, + frameInfo = 0, + rpcType = 0, + rpcFunctionId = 13, + rpcCorrelationId = cid, + payload = '{"mainField2":"Show2"}' + } + + + --hmi side: expect UI.Show request + EXPECT_HMICALL("UI.Show", + { + showStrings = + { + { + fieldName = "mainField1", + fieldText = "Show1" + } + } + }, + { + showStrings = + { + { + fieldName = "mainField2", + fieldText = "Show2" + } + } + } + ) + :Do(function(exp,data) + if exp.occurences == 1 then + self.mobileSession:Send(msg) + end + + --hmi side: sending UI.Show response + self.hmiConnection:SendResponse(data.id, data.method, "SUCCESS", {}) + end) + :Times(2) + + --response on mobile side + EXPECT_RESPONSE(cid, { success = true, resultCode = "SUCCESS"}) + :Times(2) + + end + ]] + --End Test case NegativeRequestCheck.2 + + + --Begin Test case NegativeRequestCheck.3 + --Description: Fake parameters check + + --Requirement id in JAMA: APPLINK-14765 SDL must cut off the fake parameters from requests, responses and notifications received from HMI + --Verification criteria: SDL must cut off the fake parameters from requests, responses and notifications received from HMI + + --Begin Test case NegativeRequestCheck.3.1 + --Description: Fake parameters is not from any API + + function Test:Show_FakeParams_IsNotFromAnyAPI() + + --mobile side: sending Show request + local param = { + mediaClock = "00:00:01", + mainField1 = "Show1", + fakeParam = "icon.png", + graphic = + { + value = "action.png", + imageType = "DYNAMIC", + fakeParam = "icon.png", + }, + softButtons = + { + { + text = "Close", + systemAction = "DEFAULT_ACTION", + type = "BOTH", + isHighlighted = true, + image = + { + imageType = "DYNAMIC", + value = "icon.png" + }, + softButtonID = 3, + fakeParam = "icon.png", + } + }, + customPresets = + { + "Preset1", + "Preset2", + "Preset3" + } + } + + + local cid = self.mobileSession:SendRPC("Show", param) + + param.fakeParam = nil + param.graphic.fakeParam = nil + param.softButtons[1].fakeParam = nil + + -- TODO: remove after resolving APPLINK-16052 + param.softButtons[1].image = nil + --------------------------------------------- + + --hmi side: expect the request + UIParams = self:createUIParameters(param) + EXPECT_HMICALL("UI.Show", UIParams) + :ValidIf(function(_,data) + + local result = true + if data.params.fakeParam or + data.params.graphic.fakeParam or + data.params.softButtons.fakeParam or + data.params.softButtons[1].fakeParam then + commonFunctions:printError(" SDL re-sends fakeParam parameters to HMI") + result =false + else + + end + + local path = "bin/storage/"..config.application1.registerAppInterfaceParams.appID.. "_" .. config.deviceMAC.. "/" + local value_Icon = path .. "action.png" + + if(data.params.graphic.imageType == "DYNAMIC") then + + else + print("\27[31m imageType of menuIcon is WRONG. Expected: DYNAMIC; Real: " .. data.params.graphic.imageType .. "\27[0m") + resullt = false + end + + if(string.find(data.params.graphic.value, value_Icon) ) then + + else + print("\27[31m value of menuIcon is WRONG. Expected: ~".. value_Icon .. "; Real: " .. data.params.graphic.value .. "\27[0m") + result = false + end + + return result + end) + :Do(function(_,data) + --hmi side: sending the response + self.hmiConnection:SendResponse(data.id, data.method, "SUCCESS", {}) + end) + + --mobile side: expect the response + EXPECT_RESPONSE(cid, { success = true, resultCode = "SUCCESS" }) + + end + + + --End Test case NegativeRequestCheck.3.1 + ----------------------------------------------------------------------------------------- + + --Begin Test case NegativeRequestCheck.3.2 + --Description: Fake parameters is not from another API + + function Test:Show_FakeParameterIsFromAnotherAPI() + + --mobile side: sending Show request + local param = { + mediaClock = "00:00:01", + mainField1 = "Show1", + syncFileName = "icon.png", + graphic = + { + value = "action.png", + imageType = "DYNAMIC", + syncFileName = "icon.png", + }, + softButtons = + { + { + text = "Close", + systemAction = "DEFAULT_ACTION", + type = "BOTH", + isHighlighted = true, + image = + { + imageType = "DYNAMIC", + value = "icon.png" + }, + softButtonID = 3, + syncFileName = "icon.png", + } + }, + customPresets = + { + "Preset1", + "Preset2", + "Preset3" + } + } + + local cid = self.mobileSession:SendRPC("Show", param) + + param.syncFileName = nil + param.graphic.syncFileName = nil + param.softButtons[1].syncFileName = nil + + -- TODO: remove after resolving APPLINK-16052 + param.softButtons[1].image = nil + --------------------------------------------- + + --hmi side: expect the request + UIParams = self:createUIParameters(param) + EXPECT_HMICALL("UI.Show", UIParams) + :ValidIf(function(_,data) + if data.params.syncFileName or + data.params.graphic.syncFileName or + data.params.softButtons[1].syncFileName then + commonFunctions:printError(" SDL re-sends syncFileName parameters of SetAppIcon request to HMI") + return false + else + return true + end + end) + :Do(function(_,data) + --hmi side: sending the response + self.hmiConnection:SendResponse(data.id, data.method, "SUCCESS", {}) + end) + + --mobile side: expect the response + EXPECT_RESPONSE(cid, { success = true, resultCode = "SUCCESS" }) + + end + + --End Test case NegativeRequestCheck.3.2 + ----------------------------------------------------------------------------------------- + + --End Test case NegativeRequestCheck.3 + + + --Begin Test case NegativeRequestCheck.4 + --Description: All parameters missing + + --Requirement id in JAMA: SDLAQ-CRS-494 + --Verification criteria: "3.1. The request with no parameters is sent, the response with INVALID_DATA result code is returned." + + commonTestCases:VerifyRequestIsMissedAllParameters() + + --End Test case NegativeRequestCheck.4 + + ----------------------------------------------------------------------------------------- + + --Start Test case NegativeRequestCheck.5 + + -- SDLAQ-CRS-921->1 + --Begin Test case NegativeRequestCheck.5.1 + --Begin Test case NegativeRequestCheck.5.1.1 + --Description: SoftButtonType is IMAGE and image paramer is wrong -> the request will be rejected as INVALID_DATA + + function Test:Show_IMAGESoftButton_AndImageWrong() + + --mobile side: sending the request + + local Request = { + mediaClock = "00:00:01", + mainField1 = "Show1", + softButtons = + { + { + text = "Close", + systemAction = "DEFAULT_ACTION", + type = "IMAGE", + isHighlighted = true, + image = + { + imageType = "DYNAMIC", + value = 123 ---123 is wrong, "icon.png" is correct + }, + softButtonID = 1 + } + } + } + + local cid = self.mobileSession:SendRPC("Show", Request) + + --hmi side: expect the request + local UIParams = self:createUIParameters(Request) + EXPECT_HMICALL("UI.Show", UIParams) + :Times(0) + + --mobile side: expect response + EXPECT_RESPONSE(cid, { success = false, resultCode = "INVALID_DATA"}) + + end + + --End Test case NegativeRequestCheck.5.1.1 + + + --Begin Test case NegativeRequestCheck.5.1.2 + --Description: SoftButtonType is IMAGE and image paramer is not defined -> the request will receive INVALID_DATA + + function Test:Show_IMAGESoftButton_AndImageNotDefined() + + --mobile side: sending the request + + local Request = { + mediaClock = "00:00:01", + mainField1 = "Show1", + softButtons = + { + { + text = "Close", + systemAction = "DEFAULT_ACTION", + type = "IMAGE", + isHighlighted = true, + + softButtonID = 1 + } + } + } + + local cid = self.mobileSession:SendRPC("Show", Request) + + --hmi side: expect the request + local UIParams = self:createUIParameters(Request) + EXPECT_HMICALL("UI.Show", UIParams) + :Times(0) + + --mobile side: expect response + EXPECT_RESPONSE(cid, { success = false, resultCode = "INVALID_DATA"}) + + + end + --End Test case NegativeRequestCheck.5.1.2 + --End Test case NegativeRequestCheck.5.1 + +--------------------------------------------------------------------------------------------------- + + -- SDLAQ-CRS-921->2 + --Begin Test case NegativeRequestCheck.5.2 + --Description: Mobile sends SoftButtons with Text=Ҡ(empty string) and Type=TEXT, SDL rejects it as INVALID_DATA + + + function Test:Show_TEXTSoftButton_AndEmptyText() + + --mobile side: sending the request + + local Request = { + mediaClock = "00:00:01", + mainField1 = "Show1", + softButtons = + { + { + text = "", --text is empty string + systemAction = "DEFAULT_ACTION", + type = "TEXT", + isHighlighted = true, + image = + { + imageType = "DYNAMIC", + value = "icon.png" + }, + softButtonID = 1 + } + } + } + + local cid = self.mobileSession:SendRPC("Show", Request) + + --hmi side: expect the request + local UIParams = self:createUIParameters(Request) + EXPECT_HMICALL("UI.Show", UIParams) + :Times(0) + + --mobile side: expect response + EXPECT_RESPONSE(cid, { success = false, resultCode = "INVALID_DATA"}) + + end + + + --End Test case NegativeRequestCheck.5.2 + +------------------------------------------------------------------------------------------------ + + -- SDLAQ-CRS-921->3 + --Begin Test case NegativeRequestCheck.5.3 + --Description: Mobile sends SoftButtons with Type=TEXT that exclude 'Text' parameter, SDL rejects it as INVALID_DATA + + function Test:Show_TEXTSoftButton_AndTextExcluded() + + --mobile side: sending the request + + local Request = { + mediaClock = "00:00:01", + mainField1 = "Show1", + softButtons = + { + { + --text is excluded + systemAction = "DEFAULT_ACTION", + type = "TEXT", + isHighlighted = true, + image = + { + imageType = "DYNAMIC", + value = "icon.png" + }, + softButtonID = 1 + } + } + } + + local cid = self.mobileSession:SendRPC("Show", Request) + + --hmi side: expect the request + local UIParams = self:createUIParameters(Request) + EXPECT_HMICALL("UI.Show", UIParams) + :Times(0) + + --mobile side: expect response + EXPECT_RESPONSE(cid, { success = false, resultCode = "INVALID_DATA"}) + + end + + --End Test case NegativeRequestCheck.5.3 + +--------------------------------------------------------------------------------------------- + + -- SDLAQ-CRS-921->4 + --Begin Test case NegativeRequestCheck.5.4 + --Begin Test case NegativeRequestCheck.5.4.1 + --Description: Mobile sends SoftButtons with Type=BOTH and 'text' is wrong, SDL rejects it as INVALID_DATA + + function Test:Show_BOTHSoftButton_AndTextIsWrong() + + --mobile side: sending the request + + local Request = { + mediaClock = "00:00:01", + mainField1 = "Show1", + softButtons = + { + { + text = 123, --text value is wrong + systemAction = "DEFAULT_ACTION", + type = "BOTH", + isHighlighted = true, + image = + { + imageType = "DYNAMIC", + value = "icon.png" + }, + softButtonID = 1 + } + } + } + + local cid = self.mobileSession:SendRPC("Show", Request) + + --hmi side: expect the request + local UIParams = self:createUIParameters(Request) + EXPECT_HMICALL("UI.Show", UIParams) + :Times(0) + + --mobile side: expect response + EXPECT_RESPONSE(cid, { success = false, resultCode = "INVALID_DATA"}) + + end + + --End Test case NegativeRequestCheck.5.4.1 + + + --Begin Test case NegativeRequestCheck.5.4.2 + --Description: Mobile sends SoftButtons with Type=BOTH and 'text' not defined, SDL rejects it as INVALID_DATA + + function Test:Show_BOTHSoftButtonAndTextIsNotDefined() + + --mobile side: sending the request + + local Request = { + mediaClock = "00:00:01", + mainField1 = "Show1", + softButtons = + { + { + + type = "BOTH", + isHighlighted = true, + image = + { + imageType = "DYNAMIC", + value = "icon.png" + }, + softButtonID = 1 + } + } + } + + local cid = self.mobileSession:SendRPC("Show", Request) + + --hmi side: expect the request + local UIParams = self:createUIParameters(Request) + EXPECT_HMICALL("UI.Show", UIParams) + :Times(0) + + --mobile side: expect response + EXPECT_RESPONSE(cid, { success = false, resultCode = "INVALID_DATA"}) + + end + + --End Test case NegativeRequestCheck.5.4.2 + + --Begin Test case NegativeRequestCheck.5.4.3 + --Description: Mobile sends SoftButtons with Type=BOTH and 'image' is wrong, SDL rejects it as INVALID_DATA + + function Test:Show_BOTHSoftButton_AndImageValueIsWrong() + + --mobile side: sending the request + + local Request = { + mediaClock = "00:00:01", + mainField1 = "Show1", + softButtons = + { + { + text = "First", + systemAction = "DEFAULT_ACTION", + type = "BOTH", + isHighlighted = true, + image = + { + imageType = "DYNAMIC", + value = 123 --image value is wrong + }, + softButtonID = 1 + } + } + } + + local cid = self.mobileSession:SendRPC("Show", Request) + + --hmi side: expect the request + local UIParams = self:createUIParameters(Request) + EXPECT_HMICALL("UI.Show", UIParams) + :Times(0) + + --mobile side: expect response + EXPECT_RESPONSE(cid, { success = false, resultCode = "INVALID_DATA"}) + + end + + --End Test case NegativeRequestCheck.5.4.3 + + --Begin Test case NegativeRequestCheck.5.4.4 + --Description: Mobile sends SoftButtons with Type=BOTH and 'image' not defined, SDL rejects it as INVALID_DATA + + function Test:Show_BOTHSoftButtonAndImageIsNotDefined() + + --mobile side: sending the request + + local Request = { + mediaClock = "00:00:01", + mainField1 = "Show1", + softButtons = + { + { + text = "First", + systemAction = "DEFAULT_ACTION", + type = "BOTH", + isHighlighted = true, + softButtonID = 1 + } + } + } + + local cid = self.mobileSession:SendRPC("Show", Request) + + --hmi side: expect the request + local UIParams = self:createUIParameters(Request) + EXPECT_HMICALL("UI.Show", UIParams) + :Times(0) + + --mobile side: expect response + EXPECT_RESPONSE(cid, { success = false, resultCode = "INVALID_DATA"}) + + end + + --End Test case NegativeRequestCheck.5.4.4 + + --End Test case NegativeRequestCheck.5.4 + + + -- SDLAQ-CRS-921->8 + --Begin Test case NegativeRequestCheck.5.5 + --Description: Mobile sends SoftButtons with Type=IMAGE and with invalid value of 'text' parameter, SDL rejects it as INVALID_DATA + + function Test:Show_IMAGESoftButtonAndInvalidText() + + --mobile side: sending the request + + local Request = { + mediaClock = "00:00:01", + mainField1 = "Show1", + softButtons = + { + { + text = 123, --invalid text value + systemAction = "DEFAULT_ACTION", + type = "IMAGE", + isHighlighted = true, + image = + { + imageType = "DYNAMIC", + value = "icon.png" + }, + softButtonID = 1 + } + } + } + + local cid = self.mobileSession:SendRPC("Show", Request) + + --hmi side: expect the request + local UIParams = self:createUIParameters(Request) + EXPECT_HMICALL("UI.Show", UIParams) + :Times(0) + + --mobile side: expect response + EXPECT_RESPONSE(cid, { success = false, resultCode = "INVALID_DATA"}) + + end + + --End Test case NegativeRequestCheck.5.5 + + -- SDLAQ-CRS-921->9 + --Begin Test case NegativeRequestCheck.5.6 + --Description: Mobile sends SoftButtons with Type=TEXT and with invalid value of 'image', SDL rejects it as INVALID_DATA + + function Test:Show_TEXTSoftButtonAndInvalidImageValue() + + --mobile side: sending the request + + local Request = { + mediaClock = "00:00:01", + mainField1 = "Show1", + softButtons = + { + { + text = "First", + systemAction = "DEFAULT_ACTION", + type = "TEXT", + isHighlighted = true, + image = + { + imageType = "DYNAMIC", + value = 123 --invalid image parameter + }, + softButtonID = 1 + } + } + } + + local cid = self.mobileSession:SendRPC("Show", Request) + + --hmi side: expect the request + local UIParams = self:createUIParameters(Request) + EXPECT_HMICALL("UI.Show", UIParams) + :Times(0) + + --mobile side: expect response + EXPECT_RESPONSE(cid, { success = false, resultCode = "INVALID_DATA"}) + + end + + --End Test case NegativeRequestCheck.5.6 + + +------------------------------------------------------------------------------------------ + +--End Test case NegativeRequestCheck + + +--Begin Test case PositiveRequestCheck +--Description: Check special positive request + + --Start Test case PositiveRequestCheck.1 + + -- SDLAQ-CRS-921->5 + --Begin Test case PositiveRequestCheck.1.1 + --Description: Mobile sends SoftButtons with Text=Ҡ(empty string) and Type=BOTH, SDL must transfer to HMI, the resultCode returned to mobile app must depend on resultCode from HMI`s response. + + function Test:Show_BOTHSoftButton_AndTextEmpty() + + --mobile side: sending Show request + local param = { + mediaClock = "00:00:01", + mainField1 = "Show1", + softButtons = + { + { + text = "", --text is empty + systemAction = "DEFAULT_ACTION", + type = "BOTH", + isHighlighted = true, + image = + { + imageType = "DYNAMIC", + value = "icon.png" + }, + softButtonID = 3 + } + } + } + + + local cid = self.mobileSession:SendRPC("Show", param) + + -- TODO: remove after resolving APPLINK-16052 + param.softButtons[1].image = nil + --------------------------------------------- + + --hmi side: expect the request + UIParams = self:createUIParameters(param) + EXPECT_HMICALL("UI.Show", UIParams) + + + :Do(function(_,data) + --hmi side: sending the response + self.hmiConnection:SendResponse(data.id, data.method, "SUCCESS", {}) + end) + + --mobile side: expect the response + EXPECT_RESPONSE(cid, { success = true, resultCode = "SUCCESS" }) + + end + + --End Test case PositiveRequestCheck.1.1 + + -- SDLAQ-CRS-921->6 + --Begin Test case PositiveRequestCheck.1.2 + + --Begin Test case PositiveRequestCheck.1.2.1 + --Description: Mobile sends SoftButtons with Type=TEXT and omitted image, SDL must omit image in request to HMI, the resultCode returned to mobile app must depend on resultCode from HMI`s response. + + function Test:Show_TEXTSoftButton_AndImageOmitted() + + --mobile side: sending Show request + local param = { + mediaClock = "00:00:01", + mainField1 = "Show1", + softButtons = + { + { + text = "First", + systemAction = "DEFAULT_ACTION", + type = "TEXT", + isHighlighted = true, + --image is omitted + softButtonID = 3 + } + } + } + + + local cid = self.mobileSession:SendRPC("Show", param) + + -- TODO: remove after resolving APPLINK-16052 + param.softButtons[1].image = nil + --------------------------------------------- + + --hmi side: expect the request + UIParams = self:createUIParameters(param) + EXPECT_HMICALL("UI.Show", UIParams) + + + :Do(function(_,data) + --hmi side: sending the response + self.hmiConnection:SendResponse(data.id, data.method, "SUCCESS", {}) + end) + + --mobile side: expect the response + EXPECT_RESPONSE(cid, { success = true, resultCode = "SUCCESS" }) + + end + + --End Test case PositiveRequestCheck.1.2.1 + + --Begin Test case PositiveRequestCheck.1.2.2 + --Description: Mobile sends SoftButtons with Type=TEXT and valid image, SDL must omit image in request to HMI, the resultCode returned to mobile app must depend on resultCode from HMI`s response. + + function Test:Show_TEXTSoftButton_AndImageValid() + + --mobile side: sending Show request + local param = { + mediaClock = "00:00:01", + mainField1 = "Show1", + softButtons = + { + { + text = "First", + systemAction = "DEFAULT_ACTION", + type = "TEXT", + isHighlighted = true, + image = + { + imageType = "DYNAMIC", + value = "icon.png" + }, + softButtonID = 3 + } + } + } + + + local cid = self.mobileSession:SendRPC("Show", param) + + -- TODO: remove after resolving APPLINK-16052 + param.softButtons[1].image = nil + --------------------------------------------- + + --hmi side: expect the request + UIParams = self:createUIParameters(param) + EXPECT_HMICALL("UI.Show", UIParams) + + + :Do(function(_,data) + --hmi side: sending the response + self.hmiConnection:SendResponse(data.id, data.method, "SUCCESS", {}) + end) + + --mobile side: expect the response + EXPECT_RESPONSE(cid, { success = true, resultCode = "SUCCESS" }) + + end + + --End Test case PositiveRequestCheck.1.2.2 + + --Begin Test case PositiveRequestCheck.1.2.3 + --Description: Mobile sends SoftButtons with Type=TEXT and not-defined image, SDL must omit image in request to HMI, the resultCode returned to mobile app must depend on resultCode from HMI`s response. + + function Test:Show_TEXTSoftButton_AndImageNotDefined() + + --mobile side: sending Show request + local param = { + mediaClock = "00:00:01", + mainField1 = "Show1", + softButtons = + { + { + text = "First", + systemAction = "DEFAULT_ACTION", + type = "TEXT", + isHighlighted = true, + softButtonID = 3 + } + } + } + + + local cid = self.mobileSession:SendRPC("Show", param) + + -- TODO: remove after resolving APPLINK-16052 + param.softButtons[1].image = nil + --------------------------------------------- + + --hmi side: expect the request + UIParams = self:createUIParameters(param) + EXPECT_HMICALL("UI.Show", UIParams) + + + :Do(function(_,data) + --hmi side: sending the response + self.hmiConnection:SendResponse(data.id, data.method, "SUCCESS", {}) + end) + + --mobile side: expect the response + EXPECT_RESPONSE(cid, { success = true, resultCode = "SUCCESS" }) + + end + + --End Test case PositiveRequestCheck.1.2.3 + --End Test case PositiveRequestCheck.1.2 + + + -- SDLAQ-CRS-921->7 + --Begin Test case PositiveRequestCheck.1.3 + --Begin Test case PositiveRequestCheck.1.3.1 + --Description: Mobile sends SoftButtons with Type=IMAGE and valid text, SDL must omit text in request to HMI, the resultCode returned to mobile app must depend on resultCode from HMI`s response. + + function Test:Show_IMAGESoftButton_AndValidText() + + --mobile side: sending Show request + local param = { + mediaClock = "00:00:01", + mainField1 = "Show1", + softButtons = + { + { + text = "First", + systemAction = "DEFAULT_ACTION", + type = "IMAGE", + isHighlighted = true, + image = + { + value = "icon.png", + imageType = "DYNAMIC" + }, + softButtonID = 3 + } + } + } + + + local cid = self.mobileSession:SendRPC("Show", param) + + -- TODO: remove after resolving APPLINK-16052 + param.softButtons[1].image = nil + --------------------------------------------- + + --hmi side: expect the request + UIParams = self:createUIParameters(param) + EXPECT_HMICALL("UI.Show", UIParams) + + + :Do(function(_,data) + --hmi side: sending the response + self.hmiConnection:SendResponse(data.id, data.method, "SUCCESS", {}) + end) + + --mobile side: expect the response + EXPECT_RESPONSE(cid, { success = true, resultCode = "SUCCESS" }) + + end + + --End Test case PositiveRequestCheck.1.3.1 + + --Begin Test case PositiveRequestCheck.1.3.2 + --Description: Mobile sends SoftButtons with Type=IMAGE and omitted text, SDL must omit text in request to HMI, the resultCode returned to mobile app must depend on resultCode from HMI`s response. + + function Test:Show_IMAGESoftButton_AndTextOmitted() + + --mobile side: sending Show request + local param = { + mediaClock = "00:00:01", + mainField1 = "Show1", + softButtons = + { + { + -- text is omitted + systemAction = "DEFAULT_ACTION", + type = "IMAGE", + isHighlighted = true, + image = + { + value = "icon.png", + imageType = "DYNAMIC" + }, + softButtonID = 3 + } + } + } + + + local cid = self.mobileSession:SendRPC("Show", param) + + -- TODO: remove after resolving APPLINK-16052 + param.softButtons[1].image = nil + --------------------------------------------- + + --hmi side: expect the request + UIParams = self:createUIParameters(param) + EXPECT_HMICALL("UI.Show", UIParams) + + + :Do(function(_,data) + --hmi side: sending the response + self.hmiConnection:SendResponse(data.id, data.method, "SUCCESS", {}) + end) + + --mobile side: expect the response + EXPECT_RESPONSE(cid, { success = true, resultCode = "SUCCESS" }) + + end + + --End Test case PositiveRequestCheck.1.3.2 + + --Begin Test case PositiveRequestCheck.1.3.3 + --Description: Mobile sends SoftButtons with Type=IMAGE and not-defined text, SDL must omit text in request to HMI, the resultCode returned to mobile app must depend on resultCode from HMI`s response. + + function Test:Show_IMAGESoftButton_AndNotDefinedText() + + --mobile side: sending Show request + local param = { + mediaClock = "00:00:01", + mainField1 = "Show1", + softButtons = + { + { + + systemAction = "DEFAULT_ACTION", + type = "IMAGE", + isHighlighted = true, + image = + { + value = "icon.png", + imageType = "DYNAMIC" + }, + softButtonID = 3 + } + } + } + + + local cid = self.mobileSession:SendRPC("Show", param) + + -- TODO: remove after resolving APPLINK-16052 + param.softButtons[1].image = nil + --------------------------------------------- + + --hmi side: expect the request + UIParams = self:createUIParameters(param) + EXPECT_HMICALL("UI.Show", UIParams) + + + :Do(function(_,data) + --hmi side: sending the response + self.hmiConnection:SendResponse(data.id, data.method, "SUCCESS", {}) + end) + + --mobile side: expect the response + EXPECT_RESPONSE(cid, { success = true, resultCode = "SUCCESS" }) + + end + + --End Test case PositiveRequestCheck.1.3.1 + --End Test case PositiveRequestCheck.1.3 + +--End Test case PositiveRequestCheck + +--end + +SpecialRequestChecks() + + +----------------------------------------------------------------------------------------------- +-------------------------------------------TEST BLOCK III-------------------------------------- +----------------------------------Check normal cases of HMI response--------------------------- +----------------------------------------------------------------------------------------------- + +--Requirement id in JAMA: SDLAQ-CRS-58: Show_Response_v2_0 +--Verification Criteria: The response contains 2 mandatory parameters "success" and "resultCode", "info" is sent if there is any additional information about the resultCode + +--Common Test cases for Response +--1. Check all mandatory parameters are missed +--2. Check all parameters are missed + +--Print new line to separate new test cases group +commonFunctions:newTestCasesGroup("TestCaseGroupForResultCodeParameter") + +--[=[ToDo: update according to APPLINK-13101 +Test[APIName.."_Response_MissingMandatoryParameters_GENERIC_ERROR"] = function(self) + + --mobile side: sending the request + local Request = Test:createRequest() + local cid = self.mobileSession:SendRPC("Show", Request) + + + --hmi side: expect the request + UIParams = self:createUIParameters(Request) + + EXPECT_HMICALL("UI.Show", UIParams) + :Do(function(_,data) + --hmi side: sending the response + --self.hmiConnection:Send('{"id":'..tostring(data.id)..',"jsonrpc":"2.0","result":{"method":"UI.Show", "code":0}}') + self.hmiConnection:Send('{"id":'..tostring(data.id)..',"jsonrpc":"2.0","result":{}}') + end) + + + --mobile side: expect the response + EXPECT_RESPONSE(cid, { success = false, resultCode = "GENERIC_ERROR"}) + :Timeout(13000) + +end +----------------------------------------------------------------------------------------- + + +Test[APIName.."_Response_MissingAllParameters_GENERIC_ERROR"] = function(self) + + --mobile side: sending the request + local Request = Test:createRequest() + local cid = self.mobileSession:SendRPC("Show", Request) + + + --hmi side: expect the request + UIParams = self:createUIParameters(Request) + + EXPECT_HMICALL("UI.Show", UIParams) + :Do(function(_,data) + --hmi side: sending the response + --self.hmiConnection:Send('{"id":'..tostring(data.id)..',"jsonrpc":"2.0","result":{"method":"UI.Show", "code":0}}') + self.hmiConnection:Send('{}') + end) + + + --mobile side: expect the response + EXPECT_RESPONSE(cid, { success = false, resultCode = "GENERIC_ERROR"}) + :Timeout(13000) + +end +----------------------------------------------------------------------------------------- + +]=] + + +----------------------------------------------------------------------------------------------- +--Parameter 1: resultCode +----------------------------------------------------------------------------------------------- +--List of test cases: + --1. IsMissed + --2. IsValidValues + --3. IsNotExist + --4. IsEmpty + --5. IsWrongType + --6. IsInvalidCharacter - \n, \t +----------------------------------------------------------------------------------------------- + +local function verify_resultCode_parameter() + + + --Print new line to separate new test cases group + commonFunctions:newTestCasesGroup("TestCaseGroupForResultCodeParameter") + ----------------------------------------------------------------------------------------- + + --1. IsMissed + Test[APIName.."_Response_resultCode_IsMissed_SendResponse"] = function(self) + + --mobile side: sending the request + local Request = Test:createRequest() + local cid = self.mobileSession:SendRPC("Show", Request) + + + --hmi side: expect the request + UIParams = self:createUIParameters(Request) + + EXPECT_HMICALL("UI.Show", UIParams) + :Do(function(_,data) + --hmi side: sending the response + --self.hmiConnection:Send('{"id":'..tostring(data.id)..',"jsonrpc":"2.0","result":{"method":"UI.Show", "code":0}}') + self.hmiConnection:Send('{"id":'..tostring(data.id)..',"jsonrpc":"2.0","result":{"method":"UI.Show"}}') + end) + + + --mobile side: expect the response + -- TODO: update after resolving APPLINK-14765 + -- EXPECT_RESPONSE(cid, { success = false, resultCode = "GENERIC_ERROR"}) + EXPECT_RESPONSE(cid, { success = false, resultCode = "INVALID_DATA"}) + + end + ----------------------------------------------------------------------------------------- + + Test[APIName.."_Response_resultCode_IsMissed_SendError"] = function(self) + + --mobile side: sending the request + local Request = Test:createRequest() + local cid = self.mobileSession:SendRPC("Show", Request) + + + --hmi side: expect the request + UIParams = self:createUIParameters(Request) + + EXPECT_HMICALL("UI.Show", UIParams) + :Do(function(_,data) + --hmi side: sending the response + --self.hmiConnection:Send('{"id":'..tostring(data.id)..',"jsonrpc":"2.0","result":{"method":"UI.Show","code":0}}') + self.hmiConnection:Send('{"id":'..tostring(data.id)..',"jsonrpc":"2.0","result":{"method":"UI.Show"}}') + end) + + + --mobile side: expect the response + -- TODO: update after resolving APPLINK-14765 + -- EXPECT_RESPONSE(cid, { success = false, resultCode = "GENERIC_ERROR"}) + EXPECT_RESPONSE(cid, { success = false, resultCode = "INVALID_DATA"}) + + end + ----------------------------------------------------------------------------------------- + + + + --2. IsValidValue + local resultCodes = { + {resultCode = "SUCCESS", success = true}, + {resultCode = "INVALID_DATA", success = false}, + {resultCode = "OUT_OF_MEMORY", success = false}, + {resultCode = "TOO_MANY_PENDING_REQUESTS", success = false}, + {resultCode = "APPLICATION_NOT_REGISTERED", success = false}, + {resultCode = "GENERIC_ERROR", success = false}, + {resultCode = "REJECTED", success = false}, + {resultCode = "DISALLOWED", success = false}, + {resultCode = "UNSUPPORTED_RESOURCE", success = false}, + {resultCode = "ABORTED", success = false} + } + + for i =1, #resultCodes do + + Test[APIName.."_resultCode_IsValidValues_" .. resultCodes[i].resultCode .."_SendResponse"] = function(self) + + --mobile side: sending the request + local Request = Test:createRequest() + local cid = self.mobileSession:SendRPC("Show", Request) + + --hmi side: expect the request + UIParams = self:createUIParameters(Request) + + EXPECT_HMICALL("UI.Show", UIParams) + :Do(function(_,data) + --hmi side: sending the response + self.hmiConnection:SendResponse(data.id, data.method, resultCodes[i].resultCode, {}) + end) + + --mobile side: expect SetGlobalProperties response + EXPECT_RESPONSE(cid, { success = resultCodes[i].success, resultCode = resultCodes[i].resultCode}) + + end + ----------------------------------------------------------------------------------------- + + Test[APIName.."_resultCode_IsValidValues_" .. resultCodes[i].resultCode .."_SendError"] = function(self) + + --mobile side: sending the request + local Request = Test:createRequest() + local cid = self.mobileSession:SendRPC("Show", Request) + + --hmi side: expect the request + UIParams = self:createUIParameters(Request) + + EXPECT_HMICALL("UI.Show", UIParams) + :Do(function(_,data) + --hmi side: sending the response + self.hmiConnection:SendError(data.id, data.method, resultCodes[i].resultCode, "info") + end) + + --mobile side: expect SetGlobalProperties response + EXPECT_RESPONSE(cid, { success = resultCodes[i].success, resultCode = resultCodes[i].resultCode}) + + end + ----------------------------------------------------------------------------------------- + + end + ----------------------------------------------------------------------------------------- + + + + --3. IsNotExist + --4. IsEmpty + --5. IsWrongType + --6. IsInvalidCharacter - \n, \t + local testData = { + {value = "ANY", name = "IsNotExist"}, + {value = "", name = "IsEmpty"}, + {value = 123, name = "IsWrongType"}, + {value = "a\nb", name = "IsInvalidCharacter_NewLine"}, + {value = "a\tb", name = "IsInvalidCharacter_Tab"}} + + for i =1, #testData do + + Test[APIName.."_resultCode_" .. testData[i].name .."_SendResponse"] = function(self) + + --mobile side: sending the request + local Request = Test:createRequest() + local cid = self.mobileSession:SendRPC("Show", Request) + + --hmi side: expect the request + UIParams = self:createUIParameters(Request) + + EXPECT_HMICALL("UI.Show", UIParams) + :Do(function(_,data) + --hmi side: sending the response + self.hmiConnection:SendResponse(data.id, data.method, testData[i].value, {}) + end) + + --mobile side: expect SetGlobalProperties response + -- TODO: update after resolving APPLINK-14765 + -- EXPECT_RESPONSE(cid, { success = false, resultCode = "GENERIC_ERROR"}) + EXPECT_RESPONSE(cid, { success = false, resultCode = "INVALID_DATA"}) + + end + ----------------------------------------------------------------------------------------- + + Test[APIName.."_resultCode_" .. testData[i].name .."_SendError"] = function(self) + + --mobile side: sending the request + local Request = Test:createRequest() + local cid = self.mobileSession:SendRPC("Show", Request) + + --hmi side: expect the request + UIParams = self:createUIParameters(Request) + + EXPECT_HMICALL("UI.Show", UIParams) + :Do(function(_,data) + --hmi side: sending the response + self.hmiConnection:SendError(data.id, data.method, testData[i].value) + end) + + --mobile side: expect SetGlobalProperties response + -- TODO: update after resolving APPLINK-14765 + -- EXPECT_RESPONSE(cid, { success = false, resultCode = "GENERIC_ERROR"}) + EXPECT_RESPONSE(cid, { success = false, resultCode = "INVALID_DATA"}) + + + end + ----------------------------------------------------------------------------------------- + + end + ----------------------------------------------------------------------------------------- + +end + +verify_resultCode_parameter() + + +----------------------------------------------------------------------------------------------- +--Parameter 2: method +----------------------------------------------------------------------------------------------- +--List of test cases: + --1. IsMissed + --2. IsValidValue + --3. IsNotExist + --4. IsEmpty + --5. IsWrongType + --6. IsInvalidCharacter - \n, \t +----------------------------------------------------------------------------------------------- + +local function verify_method_parameter() + + + --Print new line to separate new test cases group + commonFunctions:newTestCasesGroup("TestCaseGroupForMethodParameter") + ----------------------------------------------------------------------------------------- + + --1. IsMissed + Test[APIName.."_Response_method_IsMissed_GENERIC_ERROR_SendResponse"] = function(self) + + --mobile side: sending the request + local Request = Test:createRequest() + local cid = self.mobileSession:SendRPC("Show", Request) + + + --hmi side: expect the request + UIParams = self:createUIParameters(Request) + + EXPECT_HMICALL("UI.Show", UIParams) + :Do(function(_,data) + --hmi side: sending the response + --self.hmiConnection:Send('{"id":'..tostring(data.id)..',"jsonrpc":"2.0","result":{"method":"UI.Show","code":0}}') + self.hmiConnection:Send('{"id":'..tostring(data.id)..',"jsonrpc":"2.0","result":{"code":0}}') + + end) + + + --mobile side: expect the response + EXPECT_RESPONSE(cid, { success = false, resultCode = "GENERIC_ERROR"}) + :Timeout(13000) + + end + + Test[APIName.."_Response_method_IsMissed_GENERIC_ERROR_SendError"] = function(self) + + --mobile side: sending the request + local Request = Test:createRequest() + local cid = self.mobileSession:SendRPC("Show", Request) + + + --hmi side: expect the request + UIParams = self:createUIParameters(Request) + + EXPECT_HMICALL("UI.Show", UIParams) + :Do(function(_,data) + --hmi side: sending the response + --self.hmiConnection:Send('{"id":'..tostring(data.id)..',"jsonrpc":"2.0","error":{"data":{"method":"UI.Show"},"code":22,"message":"The unknown issue occurred"}}') + self.hmiConnection:Send('{"id":'..tostring(data.id)..',"jsonrpc":"2.0","error":{"data":{},"code":22,"message":"The unknown issue occurred"}}') + + end) + + + --mobile side: expect the response + EXPECT_RESPONSE(cid, { success = false, resultCode = "GENERIC_ERROR"}) + :Timeout(13000) + + end + ----------------------------------------------------------------------------------------- + + --2. IsValidValue: Covered by many test cases + + --3. IsNotExist + --4. IsEmpty + --5. IsWrongType + --6. IsInvalidCharacter - \n, \t + local Methods = { + {method = "ANY", name = "IsNotExist"}, + {method = "", name = "IsEmpty"}, + {method = 123, name = "IsWrongType"}, + {method = "a\nb", name = "IsInvalidCharacter_NewLine"}, + {method = "a\tb", name = "IsInvalidCharacter_Tab"}} + + for i =1, #Methods do + + Test[APIName.."_Response_method_" .. Methods[i].name .."_GENERIC_ERROR_SendResponse"] = function(self) + + --mobile side: sending the request + local Request = Test:createRequest() + local cid = self.mobileSession:SendRPC("Show", Request) + + --hmi side: expect the request + UIParams = self:createUIParameters(Request) + + EXPECT_HMICALL("UI.Show", UIParams) + :Do(function(_,data) + --hmi side: sending the response + --self.hmiConnection:SendResponse(data.id, data.method, "SUCCESS", {}) + self.hmiConnection:SendResponse(data.id, Methods[i].method, "SUCCESS", {}) + + end) + + --mobile side: expect SetGlobalProperties response + EXPECT_RESPONSE(cid, { success = false, resultCode = "GENERIC_ERROR"}) + :Timeout(13000) + + end + ----------------------------------------------------------------------------------------- + + Test[APIName.."_Response_method_" .. Methods[i].name .."_GENERIC_ERROR_SendError"] = function(self) + + --mobile side: sending the request + local Request = Test:createRequest() + local cid = self.mobileSession:SendRPC("Show", Request) + + --hmi side: expect the request + UIParams = self:createUIParameters(Request) + + EXPECT_HMICALL("UI.Show", UIParams) + :Do(function(_,data) + --hmi side: sending the response + --self.hmiConnection:SendError(data.id, data.method, "UNSUPPORTED_RESOURCE", "info") + self.hmiConnection:SendError(data.id, Methods[i].method, "UNSUPPORTED_RESOURCE", "info") + + end) + + --mobile side: expect SetGlobalProperties response + EXPECT_RESPONSE(cid, { success = false, resultCode = "GENERIC_ERROR"}) + :Timeout(13000) + + + end + ----------------------------------------------------------------------------------------- + + end + ----------------------------------------------------------------------------------------- + +end + +verify_method_parameter() + + +----------------------------------------------------------------------------------------------- +--Parameter 3: info +----------------------------------------------------------------------------------------------- +--Requirement id in JAMA: APPLINK-14551: SDL behavior: cases when SDL must transfer "info" parameter via corresponding RPC to mobile app +--List of test cases: + --1. IsMissed + --2. IsLowerBound + --3. IsUpperBound + --4. IsOutUpperBound + --5. IsEmpty/IsOutLowerBound + --6. IsWrongType + --7. InvalidCharacter - \n, \t +----------------------------------------------------------------------------------------------- + +local function verify_info_parameter() + + + --Print new line to separate new test cases group + commonFunctions:newTestCasesGroup("TestCaseGroupForInfoParameter") + + ----------------------------------------------------------------------------------------- + + --1. IsMissed + Test[APIName.."_info_IsMissed_SendResponse"] = function(self) + + --mobile side: sending the request + local Request = Test:createRequest() + local cid = self.mobileSession:SendRPC("Show", Request) + + + --hmi side: expect the request + UIParams = self:createUIParameters(Request) + + EXPECT_HMICALL("UI.Show", UIParams) + :Do(function(_,data) + --hmi side: sending the response + self.hmiConnection:SendResponse(data.id, data.method, "SUCCESS", {}) + end) + + + --mobile side: expect the response + EXPECT_RESPONSE(cid, { success = true, resultCode = "SUCCESS"}) + :ValidIf (function(_,data) + if data.payload.info then + commonFunctions:printError(" SDL resends info parameter to mobile app. info = \"" .. data.payload.info .. "\"") + return false + else + return true + end + end) + end + ----------------------------------------------------------------------------------------- + + Test[APIName.."_info_IsMissed_SendError"] = function(self) + + --mobile side: sending the request + local Request = Test:createRequest() + local cid = self.mobileSession:SendRPC("Show", Request) + + + --hmi side: expect the request + UIParams = self:createUIParameters(Request) + + EXPECT_HMICALL("UI.Show", UIParams) + :Do(function(_,data) + --hmi side: sending the response + self.hmiConnection:SendError(data.id, data.method, "GENERIC_ERROR") + end) + + + --mobile side: expect the response + -- TODO: Update after resolving APPLINK-14765 + -- EXPECT_RESPONSE(cid, { success = false, resultCode = "GENERIC_ERROR"}) + EXPECT_RESPONSE(cid, { success = false, resultCode = "INVALID_DATA", info = "Received invalid data on HMI response"}) + end + ----------------------------------------------------------------------------------------- + + --2. IsLowerBound + --3. IsUpperBound + local testData = { + {value = "a", name = "IsLowerBound"}, + {value = commonFunctions:createString(1000), name = "IsUpperBound"}} + + for i =1, #testData do + + Test[APIName.."_info_" .. testData[i].name .."_SendResponse"] = function(self) + + --mobile side: sending the request + local Request = Test:createRequest() + local cid = self.mobileSession:SendRPC("Show", Request) + + --hmi side: expect the request + UIParams = self:createUIParameters(Request) + + EXPECT_HMICALL("UI.Show", UIParams) + :Do(function(_,data) + --hmi side: sending the response + self.hmiConnection:SendResponse(data.id, data.method, "SUCCESS", {info = testData[i].value}) + end) + + --mobile side: expect SetGlobalProperties response + EXPECT_RESPONSE(cid, { success = true, resultCode = "SUCCESS", info = testData[i].value}) + + end + ----------------------------------------------------------------------------------------- + + Test[APIName.."_info_" .. testData[i].name .."_SendError"] = function(self) + + --mobile side: sending the request + local Request = Test:createRequest() + local cid = self.mobileSession:SendRPC("Show", Request) + + --hmi side: expect the request + UIParams = self:createUIParameters(Request) + + EXPECT_HMICALL("UI.Show", UIParams) + :Do(function(_,data) + --hmi side: sending the response + self.hmiConnection:SendError(data.id, data.method, "GENERIC_ERROR", testData[i].value) + end) + + --mobile side: expect SetGlobalProperties response + EXPECT_RESPONSE(cid, { success = false, resultCode = "GENERIC_ERROR", info = testData[i].value}) + + end + ----------------------------------------------------------------------------------------- + + end + ----------------------------------------------------------------------------------------- + + --TODO: Please note that TC fails due to APPLINK-11235, remove this comment once it is fixed + --4. IsOutUpperBound + Test[APIName.."_info_IsOutUpperBound_SendResponse"] = function(self) + + local infoMaxLength = commonFunctions:createString(1000) + + --mobile side: sending the request + local Request = Test:createRequest() + local cid = self.mobileSession:SendRPC("Show", Request) + + --hmi side: expect the request + UIParams = self:createUIParameters(Request) + + EXPECT_HMICALL("UI.Show", UIParams) + :Do(function(_,data) + --hmi side: sending the response + self.hmiConnection:SendResponse(data.id, data.method, "SUCCESS", {info = infoMaxLength .. "1"}) + end) + + --mobile side: expect SetGlobalProperties response + EXPECT_RESPONSE(cid, { success = true, resultCode = "SUCCESS", info = infoMaxLength}) + + end + ----------------------------------------------------------------------------------------- + --TODO: Please note that TC fails due to APPLINK-11235, remove this comment once it is fixed + Test[APIName.."_info_IsOutUpperBound_SendError"] = function(self) + + local infoMaxLength = commonFunctions:createString(1000) + + --mobile side: sending the request + local Request = Test:createRequest() + local cid = self.mobileSession:SendRPC("Show", Request) + + --hmi side: expect the request + UIParams = self:createUIParameters(Request) + + EXPECT_HMICALL("UI.Show", UIParams) + :Do(function(_,data) + --hmi side: sending the response + self.hmiConnection:SendError(data.id, data.method, "GENERIC_ERROR", infoMaxLength .."1") + end) + + --mobile side: expect SetGlobalProperties response + EXPECT_RESPONSE(cid, { success = false, resultCode = "GENERIC_ERROR", info = infoMaxLength}) + + end + ----------------------------------------------------------------------------------------- + + -- TODO: update after resolving APPLINK-14551 + + --5. IsEmpty/IsOutLowerBound + --6. IsWrongType + --7. InvalidCharacter - \n, \t + + -- local testData = { + -- {value = "", name = "IsEmpty_IsOutLowerBound"}, + -- {value = 123, name = "IsWrongType"}, + -- {value = "a\nb", name = "IsInvalidCharacter_NewLine"}, + -- {value = "a\tb", name = "IsInvalidCharacter_Tab"}} + + -- for i =1, #testData do + + -- Test[APIName.."_info_" .. testData[i].name .."_SendResponse"] = function(self) + + -- --mobile side: sending the request + -- local Request = Test:createRequest() + -- local cid = self.mobileSession:SendRPC("Show", Request) + + -- --hmi side: expect the request + -- UIParams = self:createUIParameters(Request) + + -- EXPECT_HMICALL("UI.Show", UIParams) + -- :Do(function(_,data) + -- --hmi side: sending the response + -- self.hmiConnection:SendResponse(data.id, data.method, "SUCCESS", {info = testData[i].value}) + -- end) + + -- --mobile side: expect SetGlobalProperties response + -- EXPECT_RESPONSE(cid, { success = true, resultCode = "SUCCESS"}) + -- :ValidIf (function(_,data) + -- if data.payload.info then + -- commonFunctions:printError(" SDL resends info parameter to mobile app. info = \"" .. data.payload.info .. "\"") + -- return false + -- else + -- return true + -- end + -- end) + + -- end + -- ----------------------------------------------------------------------------------------- + + -- Test[APIName.."_info_" .. testData[i].name .."_SendError"] = function(self) + + -- --mobile side: sending the request + -- local Request = Test:createRequest() + -- local cid = self.mobileSession:SendRPC("Show", Request) + + -- --hmi side: expect the request + -- UIParams = self:createUIParameters(Request) + + -- EXPECT_HMICALL("UI.Show", UIParams) + -- :Do(function(_,data) + -- --hmi side: sending the response + -- self.hmiConnection:SendError(data.id, data.method, "GENERIC_ERROR", testData[i].value) + -- end) + + -- -- TODO: Update after resolving APPLINK-14765 + -- if testData[i].name == "IsWrongType" then + -- -- TODO: Update after resolving APPLINK-14765 + -- --mobile side: expect SetGlobalProperties response + -- -- EXPECT_RESPONSE(cid, { success = false, resultCode = "GENERIC_ERROR"}) + -- EXPECT_RESPONSE(cid, { success = false, resultCode = "INVALID_DATA"}) + -- :ValidIf (function(_,data) + -- if data.payload.info then + -- commonFunctions:printError(" SDL resends info parameter to mobile app. info = \"" .. data.payload.info .. "\"") + -- return false + -- else + -- return true + -- end + + -- end) + + -- else + -- --mobile side: expect SetGlobalProperties response + -- EXPECT_RESPONSE(cid, { success = false, resultCode = "GENERIC_ERROR"}) + -- :ValidIf (function(_,data) + -- if data.payload.info then + -- commonFunctions:printError(" SDL resends info parameter to mobile app. info = \"" .. data.payload.info .. "\"") + -- return false + -- else + -- return true + -- end + + -- end) + -- end + + -- end + ----------------------------------------------------------------------------------------- + + -- end + ----------------------------------------------------------------------------------------- + +end + +verify_info_parameter() + + +----------------------------------------------------------------------------------------------- +--Parameter 4: correlationID +----------------------------------------------------------------------------------------------- +--List of test cases: + --1. IsMissed + --2. IsNonexistent + --3. IsWrongType + --4. IsNegative +----------------------------------------------------------------------------------------------- + +local function verify_correlationID_parameter() + + + --Print new line to separate new test cases group + commonFunctions:newTestCasesGroup("TestCaseGroupForCorrelationIDParameter") + + ----------------------------------------------------------------------------------------- + + --1. IsMissed + Test[APIName.."_Response_CorrelationID_IsMissed_SendResponse"] = function(self) + + --mobile side: sending the request + local Request = Test:createRequest() + local cid = self.mobileSession:SendRPC(APIName, Request) + + + --hmi side: expect the request + UIParams = self:createUIParameters(Request) + + EXPECT_HMICALL("UI.Show", UIParams) + :Do(function(_,data) + --hmi side: sending the response + --self.hmiConnection:Send('{"id":'..tostring(data.id)..',"jsonrpc":"2.0","result":{"method":"UI.Show","code":0}}') + self.hmiConnection:Send('{"jsonrpc":"2.0","result":{"method":"UI.Show", "code":0}}') + + end) + + + --mobile side: expect the response + EXPECT_RESPONSE(cid, { success = false, resultCode = "GENERIC_ERROR"}) + :Timeout(13000) + + end + ----------------------------------------------------------------------------------------- + + Test[APIName.."_Response_CorrelationID_IsMissed_SendError"] = function(self) + + --mobile side: sending the request + local Request = self:createRequest() + local cid = self.mobileSession:SendRPC("Speak", Request) + + + --hmi side: expect the request + EXPECT_HMICALL("UI.Show", Request) + :Do(function(_,data) + --hmi side: sending the response + --self.hmiConnection:Send('{"id":'..tostring(data.id)..',"jsonrpc":"2.0","error":{"data":{"method":"UI.Show"},"code":22,"message":"The unknown issue occurred"}}') + self.hmiConnection:Send('{"jsonrpc":"2.0","error":{"data":{"method":"UI.Show"},"code":22,"message":"The unknown issue occurred"}}') + + end) + + + --mobile side: expect the response + EXPECT_RESPONSE(cid, { success = false, resultCode = "GENERIC_ERROR"}) + :Timeout(13000) + + end + ----------------------------------------------------------------------------------------- + + + --2. IsNonexistent + Test[APIName.."_Response_CorrelationID_IsNonexistent_SendResponse"] = function(self) + + --mobile side: sending the request + local Request = Test:createRequest() + local cid = self.mobileSession:SendRPC(APIName, Request) + + + --hmi side: expect the request + UIParams = self:createUIParameters(Request) + + EXPECT_HMICALL("UI.Show", UIParams) + :Do(function(_,data) + --hmi side: sending the response + --self.hmiConnection:Send('{"id":'..tostring(data.id)..',"jsonrpc":"2.0","result":{"method":"UI.Show","code":0}}') + self.hmiConnection:Send('{"id":'..tostring(5555)..',"jsonrpc":"2.0","result":{"method":"UI.Show","code":0}}') + + end) + + + --mobile side: expect the response + EXPECT_RESPONSE(cid, { success = false, resultCode = "GENERIC_ERROR"}) + :Timeout(13000) + + end + ----------------------------------------------------------------------------------------- + + Test[APIName.."_Response_CorrelationID_IsNonexistent_SendError"] = function(self) + + --mobile side: sending the request + local Request = self:createRequest() + local cid = self.mobileSession:SendRPC("Speak", Request) + + + --hmi side: expect the request + EXPECT_HMICALL("UI.Show", Request) + :Do(function(_,data) + --hmi side: sending the response + --self.hmiConnection:Send('{"id":'..tostring(data.id)..',"jsonrpc":"2.0","error":{"data":{"method":"UI.Show"},"code":22,"message":"The unknown issue occurred"}}') + self.hmiConnection:Send('{"id":'..tostring(5555)..',"jsonrpc":"2.0","error":{"data":{"method":"UI.Show"},"code":22,"message":"The unknown issue occurred"}}') + + end) + + + --mobile side: expect the response + EXPECT_RESPONSE(cid, { success = false, resultCode = "GENERIC_ERROR"}) + :Timeout(13000) + + end + ----------------------------------------------------------------------------------------- + + + --3. IsWrongType + Test[APIName.."_Response_CorrelationID_IsWrongType_SendResponse"] = function(self) + + --mobile side: sending the request + local Request = Test:createRequest() + local cid = self.mobileSession:SendRPC(APIName, Request) + + + --hmi side: expect the request + UIParams = self:createUIParameters(Request) + + EXPECT_HMICALL("UI.Show", UIParams) + :Do(function(_,data) + --hmi side: sending the response + --self.hmiConnection:SendResponse(data.id, data.method, "SUCCESS", {info = "info message"}) + self.hmiConnection:SendResponse(tostring(data.id), data.method, "SUCCESS", {info = "info message"}) + + end) + + + --mobile side: expect the response + EXPECT_RESPONSE(cid, { success = false, resultCode = "GENERIC_ERROR"}) + :Timeout(13000) + + end + ----------------------------------------------------------------------------------------- + + Test[APIName.."_Response_CorrelationID_IsWrongType_SendError"] = function(self) + + --mobile side: sending the request + local Request = Test:createRequest() + local cid = self.mobileSession:SendRPC(APIName, Request) + + + --hmi side: expect the request + UIParams = self:createUIParameters(Request) + + EXPECT_HMICALL("UI.Show", UIParams) + :Do(function(_,data) + --hmi side: sending the response + --self.hmiConnection:SendError(data.id, data.method, "REJECTED", "error message") + self.hmiConnection:SendError(tostring(data.id), data.method, "REJECTED", "error message") + + end) + + + --mobile side: expect the response + EXPECT_RESPONSE(cid, { success = false, resultCode = "GENERIC_ERROR"}) + :Timeout(13000) + + end + ----------------------------------------------------------------------------------------- + + --4. IsNegative + Test[APIName.."_Response_CorrelationID_IsNegative_SendResponse"] = function(self) + + --mobile side: sending the request + local Request = Test:createRequest() + local cid = self.mobileSession:SendRPC(APIName, Request) + + + --hmi side: expect the request + UIParams = self:createUIParameters(Request) + + EXPECT_HMICALL("UI.Show", UIParams) + :Do(function(_,data) + --hmi side: sending the response + --self.hmiConnection:SendResponse(data.id, data.method, "SUCCESS", {info = "info message"}) + self.hmiConnection:SendResponse(-1, data.method, "SUCCESS", {info = "info message"}) + + end) + + + --mobile side: expect the response + EXPECT_RESPONSE(cid, { success = false, resultCode = "GENERIC_ERROR"}) + :Timeout(13000) + + end + ----------------------------------------------------------------------------------------- + + Test[APIName.."_Response_CorrelationID_IsNegative_SendError"] = function(self) + + --mobile side: sending the request + local Request = Test:createRequest() + local cid = self.mobileSession:SendRPC(APIName, Request) + + + --hmi side: expect the request + UIParams = self:createUIParameters(Request) + + EXPECT_HMICALL("UI.Show", UIParams) + :Do(function(_,data) + --hmi side: sending the response + --self.hmiConnection:SendError(data.id, data.method, "REJECTED", "error message") + self.hmiConnection:SendError(-1, data.method, "REJECTED", "error message") + + end) + + + --mobile side: expect the response + EXPECT_RESPONSE(cid, { success = false, resultCode = "GENERIC_ERROR"}) + :Timeout(13000) + + end + ----------------------------------------------------------------------------------------- + +end + +verify_correlationID_parameter() + + + +---------------------------------------------------------------------------------------------- +-----------------------------------------TEST BLOCK IV---------------------------------------- +------------------------------Check special cases of HMI response----------------------------- +---------------------------------------------------------------------------------------------- +--Requirement id in JAMA or JIRA: + --SDLAQ-CRS-57: Show_Request_v2_0 + --SDLAQ-CRS-58: Show_Response_v2_0 + --SDLAQ-CRS-493: SUCCESS + --SDLAQ-CRS-500: GENERIC_ERROR + +----------------------------------------------------------------------------------------------- + +--List of test cases for softButtons type parameter: + --1. InvalidJsonSyntax (SDLAQ-CRS-500: GENERIC_ERROR) + --2. InvalidStructure (SDLAQ-CRS-500: GENERIC_ERROR) + --2. DuplicatedCorrelationId (SDLAQ-CRS-493: SUCCESS) + --3. FakeParams and FakeParameterIsFromAnotherAPI (APPLINK-14765 SDL must cut off the fake parameters from requests, responses and notifications received from HMI) + --4. MissedAllPArameters (SDLAQ-CRS-500: GENERIC_ERROR) + --5. NoResponse (SDLAQ-CRS-500: GENERIC_ERROR) + --6. SeveralResponsesToOneRequest with the same and different resultCode +----------------------------------------------------------------------------------------------- + +local function SpecialResponseChecks() + +--Begin Test case NegativeResponseCheck +--Description: Check all negative response cases + + + --Print new line to separate new test cases group + commonFunctions:newTestCasesGroup("NewTestCasesGroupForNegativeResponseCheck") + + --Begin Test case NegativeResponseCheck.1 + --Description: Invalid JSON + + --Requirement id in JAMA: SDLAQ-CRS-58 + --Verification criteria: The response contains 2 mandatory parameters "success" and "resultCode", "info" is sent if there is any additional information about the resultCode. + + --[[ToDo: Update after implemented CRS APPLINK-14756: SDL must cut off the fake parameters from requests, responses and notifications received from HMI + + function Test:Show_InvalidJsonSyntaxResponse() + + --mobile side: sending the request + local Request = Test:createRequest() + local cid = self.mobileSession:SendRPC("Show", Request) + + --hmi side: expect the request + local UIParams = self:createUIParameters(Request) + EXPECT_HMICALL("UI.Show", UIParams) + :Do(function(_,data) + --hmi side: sending the response + --":" is changed by ";" after {"id" + --self.hmiConnection:Send('{"id":'..tostring(data.id)..',"jsonrpc":"2.0","result":{"method":"UI.Show", "code":0}}') + self.hmiConnection:Send('{"id";'..tostring(data.id)..',"jsonrpc":"2.0","result":{"method":"UI.Show", "code":0}}') + end) + + --mobile side: expect the response + EXPECT_RESPONSE(cid, { success = false, resultCode = "GENERIC_ERROR" }) + :Timeout(12000) + + end + + --End Test case NegativeResponseCheck.1 + + --Begin Test case NegativeResponseCheck.2 + --Description: Invalid structure of response + + --Requirement id in JAMA: SDLAQ-CRS-58 + --Verification criteria: The response contains 2 mandatory parameters "success" and "resultCode", "info" is sent if there is any additional information about the resultCode + + function Test:Show_InvalidStructureResponse() + + --mobile side: sending the request + local Request = Test:createRequest() + local cid = self.mobileSession:SendRPC("Show", Request) + + --hmi side: expect the request + local UIParams = self:createUIParameters(Request) + EXPECT_HMICALL("UI.Show", UIParams) + :Do(function(_,data) + --hmi side: sending the response + --self.hmiConnection:Send('{"id":'..tostring(data.id)..',"jsonrpc":"2.0","result":{"method":"UI.Show", "code":0}}') + self.hmiConnection:Send('{"id":'..tostring(data.id)..',"jsonrpc":"2.0", "code":0, "result":{"method":"UI.Show"}}') + end) + + --mobile side: expect response + EXPECT_RESPONSE(cid, { success = false, resultCode = "GENERIC_ERROR"}) + :Timeout(12000) + + end + ]] + --End Test case NegativeResponseCheck.2 + + + --Begin Test case NegativeResponseCheck.3 + --Description: Check processing response with fake parameters + + --Verification criteria: When expected HMI function is received, send responses from HMI with fake parameter + --[[ToDo: Update after implemented CRS APPLINK-14756: SDL must cut off the fake parameters from requests, responses and notifications received from HMI + + --Begin Test case NegativeResponseCheck.3.1 + --Description: Parameter is not from API + + function Test:Show_FakeParamsInResponse() + + --mobile side: sending the request + local Request = Test:createRequest() + local cid = self.mobileSession:SendRPC("Show", Request) + + --hmi side: expect the request + local UIParams = self:createUIParameters(Request) + EXPECT_HMICALL("UI.Show", UIParams) + :Do(function(exp,data) + --hmi side: sending the response + self.hmiConnection:SendResponse(data.id, data.method, "SUCCESS", {fake = "fake"}) + end) + + + --mobile side: expect the response + EXPECT_RESPONSE(cid, { success = true, resultCode = "SUCCESS" }) + :ValidIf (function(_,data) + if data.payload.fake then + commonFunctions:printError(" SDL resend fake parameter to mobile app ") + return false + else + return true + end + end) + + end + + --End Test case NegativeResponseCheck.3.1 + + + --Begin Test case NegativeResponseCheck.3.2 + --Description: Parameter is not from another API + + function Test:Show_AnotherParameterInResponse() + + --mobile side: sending the request + local Request = Test:createRequest() + local cid = self.mobileSession:SendRPC("Show", Request) + + --hmi side: expect the request + local UIParams = self:createUIParameters(Request) + EXPECT_HMICALL("UI.Show", UIParams) + :Do(function(exp,data) + --hmi side: sending the response + self.hmiConnection:SendResponse(data.id, data.method, "SUCCESS", {sliderPosition = 5}) + end) + + + --mobile side: expect the response + EXPECT_RESPONSE(cid, { success = true, resultCode = "SUCCESS" }) + :ValidIf (function(_,data) + if data.payload.sliderPosition then + commonFunctions:printError(" SDL resend fake parameter to mobile app ") + return false + else + return true + end + end) + + end + + --End Test case NegativeResponseCheck.3.2 + ]] + --End Test case NegativeResponseCheck.3 + + + + --Begin NegativeResponseCheck.4 + --Description: Check processing response without all parameters + --[[ToDo: xxxxxxxxxxxx + function Test:Show_Response_MissedAllPArameters() + + --mobile side: sending the request + local Request = Test:createRequest() + local cid = self.mobileSession:SendRPC("Show", Request) + + + --hmi side: expect the request + UIParams = self:createUIParameters(Request) + + EXPECT_HMICALL("UI.Show", UIParams) + :Do(function(_,data) + --hmi side: sending UI.Show response + --self.hmiConnection:Send('{"id":'..tostring(data.id)..',"jsonrpc":"2.0","result":{"method":"UI.Show", "code":0}}') + self.hmiConnection:Send('{}') + end) + + --mobile side: expect the response + EXPECT_RESPONSE(cid, { success = false, resultCode = "GENERIC_ERROR"}) + :Timeout(13000) + + end + ]] + --End NegativeResponseCheck.4 + + + --Begin Test case NegativeResponseCheck.5 + --Description: Request without responses from HMI + + --Requirement id in JAMA: SDLAQ-CRS-500 + --Verification criteria: GENERIC_ERROR comes as a result code in response when all other codes aren't applicable or the unknown issue occurred. + + function Test:Show_NoResponse() + + --mobile side: sending the request + local Request = Test:createRequest() + local cid = self.mobileSession:SendRPC("Show", Request) + + --hmi side: expect the request + local UIParams = self:createUIParameters(Request) + EXPECT_HMICALL("UI.Show", UIParams) + + + --mobile side: expect SetGlobalProperties response + EXPECT_RESPONSE(cid, { success = false, resultCode = "GENERIC_ERROR"}) + :Timeout(12000) + + end + + --End NegativeResponseCheck.5 + + + --Begin Test case NegativeResponseCheck.6 + --Description: Several response to one request + + --Requirement id in JAMA: SDLAQ-CRS-58 + + --Verification criteria: The response contains 2 mandatory parameters "success" and "resultCode", "info" is sent if there is any additional information about the resultCode. + + + --Begin Test case NegativeResponseCheck.6.1 + --Description: Several response to one request + + function Test:Show_SeveralResponsesToOneRequest() + + --mobile side: sending the request + local Request = Test:createRequest() + local cid = self.mobileSession:SendRPC("Show", Request) + + --hmi side: expect the request + local UIParams = self:createUIParameters(Request) + EXPECT_HMICALL("UI.Show", UIParams) + :Do(function(exp,data) + --hmi side: sending the response + self.hmiConnection:SendResponse(data.id, data.method, "SUCCESS", {}) + self.hmiConnection:SendResponse(data.id, data.method, "SUCCESS", {}) + self.hmiConnection:SendResponse(data.id, data.method, "SUCCESS", {}) + + end) + + + --mobile side: expect response + EXPECT_RESPONSE(cid, { success = true, resultCode = "SUCCESS"}) + + end + + --End Test case NegativeResponseCheck.6.1 + + + + --Begin Test case NegativeResponseCheck.6.2 + --Description: Several response to one request + + function Test:Show_SeveralResponsesToOneRequestWithConstractionsOfResultCode() + + --mobile side: sending the request + local Request = Test:createRequest() + local cid = self.mobileSession:SendRPC("Show", Request) + + --hmi side: expect the request + local UIParams = self:createUIParameters(Request) + EXPECT_HMICALL("UI.Show", UIParams) + :Do(function(exp,data) + --hmi side: sending the response + self.hmiConnection:SendResponse(data.id, data.method, "INVALID_DATA", {}) + self.hmiConnection:SendResponse(data.id, data.method, "SUCCESS", {}) + end) + + + --mobile side: expect response + EXPECT_RESPONSE(cid, { success = false, resultCode = "INVALID_DATA"}) + + end + + --End Test case NegativeResponseCheck.6.2 + ----------------------------------------------------------------------------------------- + + --End Test case NegativeResponseCheck.6 + +--End Test case NegativeResponseCheck + +end + +SpecialResponseChecks() + + +----------------------------------------------------------------------------------------------- +-------------------------------------------TEST BLOCK V---------------------------------------- +-------------------------------------Checks All Result Codes----------------------------------- +----------------------------------------------------------------------------------------------- + +--Description: Check all resultCodes + +--Requirement id in JAMA: + --SDLAQ-CRS-493: SUCCESS + --SDLAQ-CRS-494: INVALID_DATA + --OUT_OF_MEMORY: SDLAQ-CRS-495 + --TOO_MANY_PENDING_REQUESTS: SDLAQ-CRS-496 + --SDLAQ-CRS-500: GENERIC_ERROR + --SDLAQ-CRS-497: APPLICATION_NOT_REGISTERED + --SDLAQ-CRS-498: REJECTED + --SDLAQ-CRS-499: ABORTED + --SDLAQ-CRS-501: DISALLOWED + --SDLAQ-CRS-1026: UNSUPPORTED_RESOURCE + --SDLAQ-CRS-2905: WARNINGS + + +local function ResultCodeChecks() + + --Print new line to separate new test cases group + commonFunctions:newTestCasesGroup("NewTestCasesGroupForResultCodeChecks") + + + --Check resultCode SUCCESS. It is checked by other test cases. + --Check resultCode INVALID_DATA. It is checked by other test cases. + --Check resultCode REJECTED, UNSUPPORTED_RESOURCE, ABORTED, WARNINGS: Covered by test case resultCode_IsValidValues + --Check resultCode GENERIC_ERROR. It is covered in Test:Show_NoResponse + --Check resultCode OUT_OF_MEMORY. ToDo: Wait until requirement is clarified + --Check resultCode TOO_MANY_PENDING_REQUESTS. It is moved to other script. + ----------------------------------------------------------------------------------------- + + --Begin Test case ResultCodeChecks.1 + --Description: Check resultCode APPLICATION_NOT_REGISTERED + + --Requirement id in JAMA: SDLAQ-CRS-497 + --Verification criteria: SDL sends APPLICATION_NOT_REGISTERED code when the app sends a request within the same connection before RegisterAppInterface has been performed yet. + + commonTestCases:verifyResultCode_APPLICATION_NOT_REGISTERED() + + --End Test case ResultCodeChecks.1 + ----------------------------------------------------------------------------------------- + + + --Begin Test case ResultCodeChecks.2 + --Description: Check resultCode DISALLOWED + + --Requirement id in JAMA: SDLAQ-CRS-501 + --Verification criteria: + --1. SDL must return "DISALLOWED, success:false" for Alert RPC to mobile app IN CASE Alert RPC is not included to policies assigned to this mobile app. + --2. SDL must return "DISALLOWED, success:false" for Alert RPC to mobile app IN CASE Alert RPC contains softButton with SystemAction disallowed by policies assigned to this mobile app. + + + --Begin Test case ResultCodeChecks.2.1 + --Description: Check resultCode DISALLOWED when HMI level is NONE + + --Covered by test case Show_HMIStatus_NONE + + --End Test case ResultCodeChecks.2.1 + + --[[TODO debug after resolving APPLINK-13101 + + --Begin Test case ResultCodeChecks.2.2 + --Description: Check resultCode DISALLOWED when request is not assigned to app + + policyTable:checkPolicyWhenAPIIsNotExist() + + --End Test case ResultCodeChecks.2.2 + + --Begin Test case ResultCodeChecks.2.3 + --Description: Check resultCode DISALLOWED when request is assigned to app but user does not allow + local keep_context = false + local steal_focus = false + policyTable:checkPolicyWhenUserDisallowed({"FULL", "LIMITED"}, keep_context, steal_focus) + --> postcondition of this script: user allows the function group + + --End Test case ResultCodeChecks.2.3 + + --Begin Test case ResultCodeChecks.2.4 + --Description: Check resultCode DISALLOWED when request is assigned to app, user allows but "keep_context" : false, "steal_focus" : false + + + function Test:Show_resultCode_DISALLOWED_systemAction_Is_KEEP_CONTEXT() + + --mobile side: send the request + local cid = self.mobileSession:SendRPC("Show", + { + statusBar = "new status bar", + softButtons = + { + { + type = "BOTH", + text = "Close", + image = + + { + value = "icon.png", + imageType = "DYNAMIC", + }, + isHighlighted = true, + softButtonID = 3, + systemAction = "DEFAULT_ACTION", + }, + + { + type = "TEXT", + text = "Keep", + isHighlighted = true, + softButtonID = 4, + systemAction = "KEEP_CONTEXT", + } + } + + }) + + + --mobile side: expect the response + EXPECT_RESPONSE(cid, { success = false, resultCode = "DISALLOWED" }) + + end + + function Test:Show_resultCode_DISALLOWED_systemAction_Is_STEAL_FOCUS() + + --mobile side: send the request + local cid = self.mobileSession:SendRPC("Show", + { + statusBar = "new status bar", + softButtons = + { + { + type = "BOTH", + text = "Close", + image = + + { + value = "icon.png", + imageType = "DYNAMIC", + }, + isHighlighted = true, + softButtonID = 3, + systemAction = "DEFAULT_ACTION", + }, + + { + type = "TEXT", + text = "Keep", + isHighlighted = true, + softButtonID = 4, + systemAction = "STEAL_FOCUS", + } + } + }) + + + --mobile side: expect the response + EXPECT_RESPONSE(cid, { success = false, resultCode = "DISALLOWED" }) + + end + + function Test:Show_resultCode_SUCCESS_systemAction_Is_DEFAULT_ACTION() + + --mobile side: send the request + + local Request = { + statusBar = "new status bar", + softButtons = + { + { + type = "BOTH", + text = "Close", + image = + + { + value = "icon.png", + imageType = "DYNAMIC", + }, + isHighlighted = true, + softButtonID = 3, + systemAction = "DEFAULT_ACTION", + } + } + } + + self:verify_SUCCESS_Case(Request) + + end + + + --Postcondition: Update PT to allow Show request + local keep_context = true + local steal_focus = true + policyTable:updatePolicyAndAllowFunctionGroup({"FULL", "LIMITED", "BACKGROUND"}, keep_context, steal_focus) + + --End Test case ResultCodeChecks.2.4 + ]] + --End Test case ResultCodeChecks.2 + + ----------------------------------------------------------------------------------------- + +end + +ResultCodeChecks() + + +---------------------------------------------------------------------------------------------- +-----------------------------------------TEST BLOCK VI---------------------------------------- +-------------------------Sequence with emulating of user's action(s)-------------------------- +---------------------------------------------------------------------------------------------- + +--Description: TC's checks SDL behavior by processing + -- different request sequence with timeout + -- with emulating of user's actions + +--Requirement id in JAMA: Mentions in each test case + +local function SequenceChecks() + + --Print new line to separate new test cases group + commonFunctions:newTestCasesGroup("NewTestCasesGroupForSequenceCheck") + + + --Begin Test case SequenceChecks.1 + --Description: + --Check for manual test case TC_Show_01 + --Call Show request from mobile app on HMI with one and eight SoftButtons + --Check Media Application menu reflecting on UI after Show request with min and max number of SoftButtons + --Check Media Application menu behavior by pressing SoftButton with DEFAULT_ACTION system action + + --Requirement id in JAMA: SDLAQ-TC-34 + --Verification criteria: + --Check Media Application menu reflecting on UI after Show request with min and max number of SoftButtons + --Check Media Application menu behavior by pressing SoftButton with DEFAULT_ACTION system action + + + + --Begin Precondition: unsubscribe custom buttons + function Test:Precondition_UnsubscribeCustomButtons() + + local CorrIdUnsub = self.mobileSession:SendRPC("UnsubscribeButton", + { + buttonName = "CUSTOM_BUTTON" + }) + + --mobile response + EXPECT_RESPONSE(CorrIdUnsub, { success = true, resultCode = "SUCCESS"}) + + end + + function Test:Show_TC_Show_01_Step1_01() + + --mobile side: sending Show request + local cid = self.mobileSession:SendRPC("Show", + { + mediaClock = "22:22", + mainField1 = "Text1", + mainField2 = "Text2", + mainField3 = "Text3", + mainField4 = "Text4", + graphic = + { + value = "icon.png", + imageType = "DYNAMIC" + }, + softButtons = + { + { + text = "Clean", + systemAction = "DEFAULT_ACTION", + type = "TEXT", + softButtonID = 1 + } + }, + statusBar = "new status bar", + mediaTrack = "Track1" + }) + --hmi side: expect UI.Show request + EXPECT_HMICALL("UI.Show", + { + --Verification is done below + -- graphic = + -- { + -- imageType = "DYNAMIC", + -- value = storagePath .. "icon.png" + -- }, + showStrings = + { + { + fieldName = "mainField1", + fieldText = "Text1" + }, + { + fieldName = "mainField2", + fieldText = "Text2" + }, + { + fieldName = "mainField3", + fieldText = "Text3" + }, + { + fieldName = "mainField4", + fieldText = "Text4" + }, + { + fieldName = "mediaClock", + fieldText = "22:22" + }, + { + fieldName = "mediaTrack", + fieldText = "Track1" + }, + { + fieldName = "statusBar", + fieldText = "new status bar" + } + }, + softButtons = + { + { + text = "Clean", + systemAction = "DEFAULT_ACTION", + type = "TEXT", + softButtonID = 1 + } + } + }) + :ValidIf(function(_,data) + local path = "bin/storage/"..config.application1.registerAppInterfaceParams.appID.. "_" .. config.deviceMAC.. "/" + local value_Icon = path .. "action.png" + + if(data.params.graphic.imageType == "DYNAMIC") then + return true + else + print("\27[31m imageType of menuIcon is WRONG. Expected: DYNAMIC; Real: " .. data.params.graphic.imageType .. "\27[0m") + return false + end + + if(string.find(data.params.graphic.value, value_Icon) ) then + return true + else + print("\27[31m value of menuIcon is WRONG. Expected: ~".. value_Icon .. "; Real: " .. data.params.graphic.value .. "\27[0m") + return false + end + end) + --UPDATED: According to APPLINK-20841 the In case SDL receives valid Show_request from mobile app and gets UI.Show ("SUCCESS") response from HMI, SDL must respond with (resultCode: SUCCESS, success:true) to mobile application + :Do(function(_,data) + --hmi side: sending UI.Show response + self.hmiConnection:SendResponse(data.id, data.method, "SUCCESS", {}) + end) + + --mobile side: expect Show response + EXPECT_RESPONSE(cid, { success = true, resultCode = "SUCCESS" }) + + end + + function Test:Show_TC_Show_01_Step1_02() + + --hmi side: send request to click on Clear softButton + self.hmiConnection:SendNotification("Buttons.OnButtonEvent", {name = "CUSTOM_BUTTON", mode = "BUTTONDOWN", customButtonID = 1, appID = self.applications["Test Application"]}) + self.hmiConnection:SendNotification("Buttons.OnButtonEvent", {name = "CUSTOM_BUTTON", mode = "BUTTONUP", customButtonID = 1, appID = self.applications["Test Application"]}) + self.hmiConnection:SendNotification("Buttons.OnButtonPress", {name = "CUSTOM_BUTTON", mode = "SHORT", customButtonID = 1, appID = self.applications["Test Application"]}) + + + --mobile side: notifications are not sent to mobile app + EXPECT_NOTIFICATION("OnButtonEvent", { customButtonID = 1, buttonEventMode = "BUTTONDOWN", buttonName = "CUSTOM_BUTTON"}, + { customButtonID = 1, buttonEventMode = "BUTTONUP", buttonName = "CUSTOM_BUTTON"}) + :Times(0) + + EXPECT_NOTIFICATION("OnButtonPress", { customButtonID = 1, buttonPressMode = "SHORT", buttonName = "CUSTOM_BUTTON"}) + :Times(0) + + + end + + function Test:Show_TC_Show_01_Step2_01() + + --mobile side: sending Show request + local cid = self.mobileSession:SendRPC("Show", + { + mediaClock = "22:22", + mainField1 = "Text1", + mainField2 = "Text2", + mainField3 = "Text3", + mainField4 = "Text4", + graphic = + { + value = "icon.png", + imageType = "DYNAMIC" + }, + softButtons = + { + { + text = "Clean1", + systemAction = "DEFAULT_ACTION", + type = "TEXT", + softButtonID = 1 + }, + { + text = "Clean2", + systemAction = "DEFAULT_ACTION", + type = "TEXT", + softButtonID = 2 + }, + { + text = "Clean3", + systemAction = "DEFAULT_ACTION", + type = "TEXT", + softButtonID = 3 + }, + { + text = "Clean4", + systemAction = "DEFAULT_ACTION", + type = "TEXT", + softButtonID = 4 + }, + { + text = "Clean5", + systemAction = "DEFAULT_ACTION", + type = "TEXT", + softButtonID = 5 + }, + { + text = "Clean6", + systemAction = "DEFAULT_ACTION", + type = "TEXT", + softButtonID = 6 + }, + { + text = "Clean7", + systemAction = "DEFAULT_ACTION", + type = "TEXT", + softButtonID = 7 + }, + { + text = "Clean8", + systemAction = "DEFAULT_ACTION", + type = "TEXT", + softButtonID = 8 + } + }, + statusBar = "new status bar", + mediaTrack = "Track1" + }) + --hmi side: expect UI.Show request + EXPECT_HMICALL("UI.Show", + { + --Verification is done below + -- graphic = + -- { + -- imageType = "DYNAMIC", + -- value = storagePath .. "icon.png" + -- }, + showStrings = + { + { + fieldName = "mainField1", + fieldText = "Text1" + }, + { + fieldName = "mainField2", + fieldText = "Text2" + }, + { + fieldName = "mainField3", + fieldText = "Text3" + }, + { + fieldName = "mainField4", + fieldText = "Text4" + }, + { + fieldName = "mediaClock", + fieldText = "22:22" + }, + { + fieldName = "mediaTrack", + fieldText = "Track1" + }, + { + fieldName = "statusBar", + fieldText = "new status bar" + } + }, + softButtons = + { + { + text = "Clean1", + systemAction = "DEFAULT_ACTION", + type = "TEXT", + softButtonID = 1 + }, + { + text = "Clean2", + systemAction = "DEFAULT_ACTION", + type = "TEXT", + softButtonID = 2 + }, + { + text = "Clean3", + systemAction = "DEFAULT_ACTION", + type = "TEXT", + softButtonID = 3 + }, + { + text = "Clean4", + systemAction = "DEFAULT_ACTION", + type = "TEXT", + softButtonID = 4 + }, + { + text = "Clean5", + systemAction = "DEFAULT_ACTION", + type = "TEXT", + softButtonID = 5 + }, + { + text = "Clean6", + systemAction = "DEFAULT_ACTION", + type = "TEXT", + softButtonID = 6 + }, + { + text = "Clean7", + systemAction = "DEFAULT_ACTION", + type = "TEXT", + softButtonID = 7 + }, + { + text = "Clean8", + systemAction = "DEFAULT_ACTION", + type = "TEXT", + softButtonID = 8 + } + } + }) + :ValidIf(function(_,data) + local path = "bin/storage/"..config.application1.registerAppInterfaceParams.appID.. "_" .. config.deviceMAC.. "/" + local value_Icon = path .. "action.png" + + if(data.params.graphic.imageType == "DYNAMIC") then + return true + else + print("\27[31m imageType of menuIcon is WRONG. Expected: DYNAMIC; Real: " .. data.params.graphic.imageType .. "\27[0m") + return false + end + + if(string.find(data.params.graphic.value, value_Icon) ) then + return true + else + print("\27[31m value of menuIcon is WRONG. Expected: ~".. value_Icon .. "; Real: " .. data.params.graphic.value .. "\27[0m") + return false + end + end) + + :Do(function(_,data) + --hmi side: sending UI.Show response + self.hmiConnection:SendResponse(data.id, data.method, "SUCCESS", {}) + end) + + --mobile side: expect Show response + EXPECT_RESPONSE(cid, { success = true, resultCode = "SUCCESS" }) + + end + + function Test:Show_TC_Show_01_Step2_02() + + --hmi side: send request to click on Clear8 softButton + self.hmiConnection:SendNotification("Buttons.OnButtonEvent", {name = "CUSTOM_BUTTON", mode = "BUTTONDOWN", customButtonID = 8, appID = self.applications["Test Application"]}) + self.hmiConnection:SendNotification("Buttons.OnButtonEvent", {name = "CUSTOM_BUTTON", mode = "BUTTONUP", customButtonID = 8, appID = self.applications["Test Application"]}) + self.hmiConnection:SendNotification("Buttons.OnButtonPress", {name = "CUSTOM_BUTTON", mode = "SHORT", customButtonID = 8, appID = self.applications["Test Application"]}) + + + --mobile side: notifications are not sent to mobile app + EXPECT_NOTIFICATION("OnButtonEvent", { customButtonID = 8, buttonEventMode = "BUTTONDOWN", buttonName = "CUSTOM_BUTTON"}, + { customButtonID = 1, buttonEventMode = "BUTTONUP", buttonName = "CUSTOM_BUTTON"}) + :Times(0) + + EXPECT_NOTIFICATION("OnButtonPress", { customButtonID = 8, buttonPressMode = "SHORT", buttonName = "CUSTOM_BUTTON"}) + :Times(0) + + end + + --End Test case SequenceChecks.1 + + ----------------------------------------------------------------------------------------- + + --Begin Test case SequenceChecks.2 + --Description: + --Check for manual test case TC_Show_02: Call Show request with CustomPresets from mobile app on HMI + + --Requirement id in JAMA: SDLAQ-TC-80 + --Verification criteria: Call Show request with CustomPresets from mobile app on HMI + + function Test:Show_TC_Show_02_Step1_01() + + --mobile side: sending Show request + local cid = self.mobileSession:SendRPC("Show", + { + mediaClock = "22:22", + mainField1 = "Text1", + mainField2 = "Text1", + statusBar = "new status bar", + mediaTrack = "Track1", + customPresets = + { + "GEN1" + } + }) + --hmi side: expect UI.Show request + EXPECT_HMICALL("UI.Show", + { + showStrings = + { + { + fieldName = "mainField1", + fieldText = "Text1" + }, + { + fieldName = "mainField2", + fieldText = "Text1" + }, + { + fieldName = "mediaClock", + fieldText = "22:22" + }, + { + fieldName = "mediaTrack", + fieldText = "Track1" + }, + { + fieldName = "statusBar", + fieldText = "new status bar" + } + }, + customPresets = + { + "GEN1" + } + }) + :Do(function(_,data) + --hmi side: sending UI.Show response + self.hmiConnection:SendResponse(data.id, data.method, "SUCCESS", {}) + end) + + --mobile side: expect Show response + EXPECT_RESPONSE(cid, { success = true, resultCode = "SUCCESS" }) + + end + + function Test:Show_TC_Show_02_Step1_02_Subscribe_Preset_1() + + --mobile side: send SubscribeButton request to mark PRESET_1 + local cid = self.mobileSession:SendRPC("SubscribeButton", + { + buttonName = "PRESET_1" + }) + + --mobile side: expect SubscribeButton response + EXPECT_RESPONSE(cid, { success = true, resultCode = "SUCCESS" }) + + EXPECT_NOTIFICATION("OnHashChange") + + end + + function Test:Show_TC_Show_02_Step1_03() + + --hmi side: Long click on \93GEN10\94 button in UI + self.hmiConnection:SendNotification("Buttons.OnButtonEvent", {mode = "BUTTONDOWN", name = "PRESET_1"}) + self.hmiConnection:SendNotification("Buttons.OnButtonEvent", {mode = "BUTTONUP", name = "PRESET_1"}) + self.hmiConnection:SendNotification("Buttons.OnButtonPress", {mode = "SHORT", name = "PRESET_1"}) + + --mobile side: Notifications are sent to mobile app + EXPECT_NOTIFICATION("OnButtonEvent", { buttonEventMode = "BUTTONDOWN", buttonName = "PRESET_1"}, + { buttonEventMode = "BUTTONUP", buttonName = "PRESET_1"}) + :Times(2) + + EXPECT_NOTIFICATION("OnButtonPress", { buttonPressMode = "SHORT", buttonName = "PRESET_1"}) + + end + + function Test:Show_TC_Show_02_Step2_01() + + --mobile side: sending Show request + local cid = self.mobileSession:SendRPC("Show", + { + mediaClock = "22:22", + mainField1 = "Text1", + mainField2 = "Text1", + statusBar = "new status bar", + mediaTrack = "Track1", + customPresets = + { + "GEN1", "GEN2", "GEN3", "GEN4", "GEN5", "GEN6", "GEN7", "GEN8", "GEN9", "GEN10" + } + }) + --hmi side: expect UI.Show request + EXPECT_HMICALL("UI.Show", + { + showStrings = + { + { + fieldName = "mainField1", + fieldText = "Text1" + }, + { + fieldName = "mainField2", + fieldText = "Text1" + }, + { + fieldName = "mediaClock", + fieldText = "22:22" + }, + { + fieldName = "mediaTrack", + fieldText = "Track1" + }, + { + fieldName = "statusBar", + fieldText = "new status bar" + } + }, + customPresets = + { + "GEN1", "GEN2", "GEN3", "GEN4", "GEN5", "GEN6", "GEN7", "GEN8", "GEN9", "GEN10" + } + }) + :Do(function(_,data) + --hmi side: sending UI.Show response + self.hmiConnection:SendResponse(data.id, data.method, "SUCCESS", {}) + end) + + --mobile side: expect Show response + EXPECT_RESPONSE(cid, { success = true, resultCode = "SUCCESS" }) + + end + + function Test:Show_TC_Show_02_Step2_02() + + --mobile side: send SubscribeButton request to mark PRESET_9 + local cid = self.mobileSession:SendRPC("SubscribeButton", + { + buttonName = "PRESET_9" + }) + + --mobile side: expect SubscribeButton response + EXPECT_RESPONSE(cid, { success = true, resultCode = "SUCCESS" }) + + EXPECT_NOTIFICATION("OnHashChange") + + end + + function Test:Show_TC_Show_02_Step2_03() + + --hmi side: Long click on \93GEN10\94 button in UI + self.hmiConnection:SendNotification("Buttons.OnButtonEvent", {mode = "BUTTONDOWN", name = "PRESET_9"}) + self.hmiConnection:SendNotification("Buttons.OnButtonPress", {mode = "LONG", name = "PRESET_9"}) + self.hmiConnection:SendNotification("Buttons.OnButtonEvent", {mode = "BUTTONUP", name = "PRESET_9"}) + + --mobile side: Notifications are sent to mobile app + EXPECT_NOTIFICATION("OnButtonEvent", { buttonEventMode = "BUTTONDOWN", buttonName = "PRESET_9"}, + { buttonEventMode = "BUTTONUP", buttonName = "PRESET_9"}) + :Times(2) + + EXPECT_NOTIFICATION("OnButtonPress", { buttonPressMode = "LONG", buttonName = "PRESET_9"}) + + end + + + --End Test case SequenceChecks.2 + + ----------------------------------------------------------------------------------------- + + --Begin Test case SequenceChecks.3 + --Description: Check for manual test case TC_Show_03: Call Show request from mobile app on HMI and check that MediaClock text is set, so any automatic media clock updates previously set with SetMediaClockTimer is stopped + + --Requirement id in JAMA: SDLAQ-TC-82 + --Verification criteria: Call Show request from mobile app on HMI and check that MediaClock text is set, so any automatic media clock updates previously set with SetMediaClockTimer is stopped + + --Note: Main purpose of this manual test case is checking Show request update clock what was set by SetMediaClockTimer. + --When converting to ATF script, this test case just checks Show request is successed after SetMediaClockTimer request + + function Test:Show_TC_Show_03_Step1() + + --mobile side: sending Show request + local cid = self.mobileSession:SendRPC("SetMediaClockTimer", + { + startTime = + { + hours = 00, + minutes = 12, + seconds = 34 + }, + updateMode = "COUNTUP" + }) + --hmi side: expect UI.Show request + EXPECT_HMICALL("UI.SetMediaClockTimer", + { + startTime = + { + hours = 00, + minutes = 12, + seconds = 34 + }, + updateMode = "COUNTUP" + }) + :Do(function(_,data) + --hmi side: sending UI.Show response + self.hmiConnection:SendResponse(data.id, data.method, "SUCCESS", {}) + end) + + --mobile side: expect Show response + EXPECT_RESPONSE(cid, { success = true, resultCode = "SUCCESS" }) + + end + + function Test:Show_TC_Show_03_Step2() + + --mobile side: sending Show request + local cid = self.mobileSession:SendRPC("Show", + { + mediaClock = "23:23", + mainField1 = "New Text", + mainField2 = "Text", + statusBar = "next status bar", + mediaTrack = "Track1" + }) + --hmi side: expect UI.Show request + EXPECT_HMICALL("UI.Show", + { + showStrings = + { + { + fieldName = "mainField1", + fieldText = "New Text" + }, + { + fieldName = "mainField2", + fieldText = "Text" + }, + { + fieldName = "mediaClock", + fieldText = "23:23" + }, + { + fieldName = "mediaTrack", + fieldText = "Track1" + }, + { + fieldName = "statusBar", + fieldText = "next status bar" + } + } + }) + :Do(function(_,data) + --hmi side: sending UI.Show response + self.hmiConnection:SendResponse(data.id, data.method, "SUCCESS", {}) + end) + + --mobile side: expect Show response + EXPECT_RESPONSE(cid, { success = true, resultCode = "SUCCESS" }) + + end + + + --End Test case SequenceChecks.3 + + ----------------------------------------------------------------------------------------- + + --Begin Test case SequenceChecks.4 + --Description: Check for manual test case TC_Show_05: + --Checking that the HMI answer to SDL and SDL answer to mobile with resultCode:"WARNINGS", success:true + --And with info message if Show was sent with several parameters in request + --And "image" parameter of unsupported image type (STATIC in current HMI implementation). + + --Requirement id in JAMA: SDLAQ-TC-416 + --Verification criteria: + --Checking that the HMI answer to SDL and SDL answer to mobile with resultCode:"WARNINGS", success:true + --And with info message if Show was sent with several parameters in request + --And "image" parameter of unsupported image type (STATIC in current HMI implementation). + + --> Covered by test case Show_resultCode_WARNINGS + + --End Test case SequenceChecks.4 + + ----------------------------------------------------------------------------------------- + + --Begin Test case SequenceChecks.5 + --Description: Check for manual test case TC_Show_06: If HMI doesn't support STATIC, DYNAMIC or any image types which exist in request data, the \93Info\94 parameter in the response should provide further details, the other parts of RPC should be otherwise successful. + --Used if UI isn't available now (not supported). + --\93Info\94 parameter in the response should provide further details. When this error code is issued, UI commands are not processed, the general result of RPC should be success=false. + + --Requirement id in JAMA: SDLAQ-TC-416 + + --Verification criteria: + --If HMI doesn't support STATIC, DYNAMIC or any image types which exist in request data, the \93Info\94 parameter in the response should provide further details, the other parts of RPC should be otherwise successful. + --Used if UI isn't available now (not supported). + --\93Info\94 parameter in the response should provide further details. When this error code is issued, UI commands are not processed, the general result of RPC should be success=false. + + --Covered by Show_resultCode_UNSUPPORTED_RESOURCE + + --End Test case SequenceChecks.5 + + ----------------------------------------------------------------------------------------- + + --Begin Test case SequenceChecks.6 + --Description: Check for manual test case TC_Show_07: + --Checking that the HMI answer to SDL and SDL answer to mobile with resultCode:"WARNINGS", success:true + --And with info message if Show was sent with several parameters in request + --And "SoftButton" parameter with image of unsupported image type (STATIC in current HMI implementation) + + --Requirement id in JAMA: SDLAQ-TC-418 + --Verification criteria: + --Checking that the HMI answer to SDL and SDL answer to mobile with resultCode:"WARNINGS", success:true + --And with info message if Show was sent with several parameters in request + --And "SoftButton" parameter with image of unsupported image type (STATIC in current HMI implementation) + + function Test:Show_TC_Show_07() + + --mobile side: sending Show request + local cid = self.mobileSession:SendRPC("Show", + { + mediaClock = "22:22", + mainField1 = "Text1", + mainField2 = "Text2", + mainField3 = "Text3", + mainField4 = "Text4", + softButtons = + { + { + text = "Close", + systemAction = "KEEP_CONTEXT", + type = "BOTH", + isHighlighted = true, + image = + { + imageType = "STATIC", + value = "action.png" + }, + softButtonID = 1 + } + }, + statusBar = "new status bar", + mediaTrack = "Track1" + }) + --hmi side: expect UI.Show request + EXPECT_HMICALL("UI.Show", + { + showStrings = + { + { + fieldName = "mainField1", + fieldText = "Text1" + }, + { + fieldName = "mainField2", + fieldText = "Text2" + }, + { + fieldName = "mainField3", + fieldText = "Text3" + }, + { + fieldName = "mainField4", + fieldText = "Text4" + }, + { + fieldName = "mediaClock", + fieldText = "22:22" + }, + { + fieldName = "mediaTrack", + fieldText = "Track1" + }, + { + fieldName = "statusBar", + fieldText = "new status bar" + } + }, + softButtons = + { + { + text = "Close", + systemAction = "KEEP_CONTEXT", + type = "BOTH", + isHighlighted = true, + softButtonID = 1 + } + } + }) + :Do(function(_,data) + --hmi side: sending UI.Show response + self.hmiConnection:SendError(data.id, data.method, "WARNINGS", "Unsupported STATIC type. Available data in request was processed.") + end) + + --mobile side: expect Show response + EXPECT_RESPONSE(cid, { success = true, resultCode = "WARNINGS", info = "Unsupported STATIC type. Available data in request was processed." }) + + end + + --End Test case SequenceChecks.6 + + ----------------------------------------------------------------------------------------- + + --Begin Test case SequenceChecks.7 + --Description: Check for manual test case TC_Show_08: + --Checking that the SDL answer to mobile with resultCode:"UNSUPPORTED_RESOURCE", success:false + --And with info message if Show was sent with one "SoftButtons" parameter + --With image of unsupported image type (STATIC in current HMI implementation) + + --Requirement id in JAMA: SDLAQ-TC-418 + --Verification criteria: + --Checking that the SDL answer to mobile with resultCode:"UNSUPPORTED_RESOURCE", success:false + --And with info message if Show was sent with one "SoftButtons" parameter + --With image of unsupported image type (STATIC in current HMI implementation) + + --Covered by Show_resultCode_UNSUPPORTED_RESOURCE + + --End Test case SequenceChecks.7 + + ----------------------------------------------------------------------------------------- + + --Begin Test case SequenceChecks.8 + --Description: Check for manual test case TC_Show_09: + --Checking that the SDL answer to mobile with resultCode:"UNSUPPORTED_RESOURCE", success:false + --And with info message if Show was sent just with "image" parameter of unsupported image type + --And "SoftButtons" parameter with image of unsupported image type (STATIC in current HMI implementation) + + --Requirement id in JAMA: SDLAQ-TC-418 + --Verification criteria: + --Checking that the SDL answer to mobile with resultCode:"UNSUPPORTED_RESOURCE", success:false + --And with info message if Show was sent just with "image" parameter of unsupported image type + --And "SoftButtons" parameter with image of unsupported image type (STATIC in current HMI implementation) + --Covered by Show_resultCode_UNSUPPORTED_RESOURCE + + --End Test case SequenceChecks.8 + + ----------------------------------------------------------------------------------------- + + --Begin Test case SequenceChecks.9 + --Description: Check for manual test case TC_Show_10: + --Check that applied to Show request SoftButtons with KEEP_CONTEXT, DEFAULT_ACTION and STEAL_FOCUS SystemActions make no action on HMI. + --Note: According to APPLINK-6517 custom buttons subscribed by default. + + --Requirement id in JAMA: + --SDLAQ-TC-34 + --SDLAQ-CRS-926 + --SDLAQ-CRS-927 + + --Verification criteria: + --Check that applied to Show request SoftButtons with KEEP_CONTEXT, DEFAULT_ACTION and STEAL_FOCUS SystemActions make no action on HMI. + + function Test:Show_TC_Show_10_Step1() + + --mobile side: sending Show request + local cid = self.mobileSession:SendRPC("Show", + { + mediaClock = "12:34", + mainField1 = "Show Line 1", + mainField2 = "Show Line 2", + mainField3 = "Show Line 3", + mainField4 = "Show Line 4", + -- graphic = + -- { + -- value = "action.png", + -- imageType = "DYNAMIC" + -- }, + softButtons = + { + { + text = "default_action", + systemAction = "DEFAULT_ACTION", + type = "TEXT", + isHighlighted = true, + softButtonID = 1 + }, + { + text = "keep_context", + systemAction = "KEEP_CONTEXT", + type = "TEXT", + isHighlighted = true, + softButtonID = 2 + }, + { + text = "steal_focus", + systemAction = "STEAL_FOCUS", + type = "TEXT", + isHighlighted = true, + softButtonID = 3 + } + }, + -- secondaryGraphic = + -- { + -- value = "action.png", + -- imageType = "DYNAMIC" + -- }, + statusBar = "status bar", + mediaTrack = "Media Track", + alignment = "CENTERED", + customPresets = + { + "Preset1", + "Preset2", + "Preset3" + } + }) + --hmi side: expect UI.Show request + EXPECT_HMICALL("UI.Show", + { + alignment = "CENTERED", + customPresets = + { + "Preset1", + "Preset2", + "Preset3" + }, + -- graphic = + -- { + -- imageType = "DYNAMIC", + -- value = storagePath .. "action.png" + -- }, + -- secondaryGraphic = + -- { + -- imageType = "DYNAMIC", + -- value = storagePath .. "action.png" + -- }, + showStrings = + { + { + fieldName = "mainField1", + fieldText = "Show Line 1" + }, + { + fieldName = "mainField2", + fieldText = "Show Line 2" + }, + { + fieldName = "mainField3", + fieldText = "Show Line 3" + }, + { + fieldName = "mainField4", + fieldText = "Show Line 4" + }, + { + fieldName = "mediaClock", + fieldText = "12:34" + }, + { + fieldName = "mediaTrack", + fieldText = "Media Track" + }, + { + fieldName = "statusBar", + fieldText = "status bar" + } + }, + softButtons = + { + { + text = "default_action", + systemAction = "DEFAULT_ACTION", + type = "TEXT", + isHighlighted = true, + softButtonID = 1 + }, + { + text = "keep_context", + systemAction = "KEEP_CONTEXT", + type = "TEXT", + isHighlighted = true, + softButtonID = 2 + }, + { + text = "steal_focus", + systemAction = "STEAL_FOCUS", + type = "TEXT", + isHighlighted = true, + softButtonID = 3 + } + } + }) + :Do(function(_,data) + --hmi side: sending UI.Show response + self.hmiConnection:SendResponse(data.id, data.method, "SUCCESS", {}) + end) + + --mobile side: expect Show response + EXPECT_RESPONSE(cid, { success = true, resultCode = "SUCCESS" }) + + end + + + --Step 2 is coverted by SequenceChecks.1 + + function Test:Show_TC_Show_10_Step3() + + --hmi side: send request to click on "keep_context" SoftButton + self.hmiConnection:SendNotification("Buttons.OnButtonEvent", {appID = self.applications["Test Application"], customButtonID = 2, mode = "BUTTONDOWN", name = "CUSTOM_BUTTON"}) + self.hmiConnection:SendNotification("Buttons.OnButtonEvent", {appID = self.applications["Test Application"], customButtonID = 2, mode = "BUTTONUP", name = "CUSTOM_BUTTON"}) + self.hmiConnection:SendNotification("Buttons.OnButtonPress", {appID = self.applications["Test Application"], customButtonID = 2, mode = "SHORT", name = "CUSTOM_BUTTON"}) + + --mobile side: notifications are sent to mobile app + EXPECT_NOTIFICATION("OnButtonEvent", { customButtonID = 2, buttonEventMode = "BUTTONDOWN", buttonName = "CUSTOM_BUTTON"}, + { customButtonID = 2, buttonEventMode = "BUTTONUP", buttonName = "CUSTOM_BUTTON"}) + :Times(2) + + EXPECT_NOTIFICATION("OnButtonPress", { customButtonID = 2, buttonPressMode = "SHORT", buttonName = "CUSTOM_BUTTON"}) + + end + + function Test:Show_TC_Show_10_Step4() + + --hmi side: send request to click on "steal_focus" SoftButton + self.hmiConnection:SendNotification("Buttons.OnButtonEvent", {appID = self.applications["Test Application"], customButtonID = 3, mode = "BUTTONDOWN", name = "CUSTOM_BUTTON"}) + self.hmiConnection:SendNotification("Buttons.OnButtonEvent", {appID = self.applications["Test Application"], customButtonID = 3, mode = "BUTTONUP", name = "CUSTOM_BUTTON"}) + self.hmiConnection:SendNotification("Buttons.OnButtonPress", {appID = self.applications["Test Application"], customButtonID = 3, mode = "SHORT", name = "CUSTOM_BUTTON"}) + + --mobile side: notifications are sent to mobile app + EXPECT_NOTIFICATION("OnButtonEvent", { customButtonID = 3, buttonEventMode = "BUTTONDOWN", buttonName = "CUSTOM_BUTTON"}, + { customButtonID = 3, buttonEventMode = "BUTTONUP", buttonName = "CUSTOM_BUTTON"}) + :Times(2) + + EXPECT_NOTIFICATION("OnButtonPress", { customButtonID = 3, buttonPressMode = "SHORT", buttonName = "CUSTOM_BUTTON"}) + + end + + --End Test case SequenceChecks.9 + +-------------------------------------------------------------------------------------------------------------------------------------------- + + --Begin Test case SequenceCheck.10 + --Description: Check test case TC_SoftButtons_01(SDLAQ-TC-68) + + --Requirement id in JAMA: SDLAQ-CRS-869 + + --Verification criteria: Checking short click on TEXT soft button + + function Test:Show_TEXTSoftButtons_ShortClick() + + + local Request = + { + mediaClock = "22:22", + mainField1 = "Text1", + mainField2 = "Text2", + mainField3 = "Text3", + mainField4 = "Text4", + softButtons = + { + { + systemAction = "KEEP_CONTEXT", + type = "TEXT", + isHighlighted = false, + text = "First", + softButtonID = 1 + }, + { + systemAction = "DEFAULT_ACTION", + type = "TEXT", + isHighlighted = true, + text = "Second", + softButtonID = 2 + }, + { + systemAction = "DEFAULT_ACTION", + type = "TEXT", + isHighlighted = true, + text = "Third", + image = + { + imageType = "DYNAMIC", + value = "icon.png" + }, + softButtonID = 3 + } + }, + statusBar = "new status bar", + mediaTrack = "Track1" + } + + --mobile side: sending Show request + local cid = self.mobileSession:SendRPC("Show", Request) + + + --hmi side: expect UI.Show request + local UIParams = self:createUIParameters(Request) + EXPECT_HMICALL("UI.Show", UIParams) + + :Do(function(_,data) + --hmi side: sending UI.Show response + self.hmiConnection:SendResponse(data.id, data.method, "SUCCESS", {}) + end) + + --mobile side: expect Show response + EXPECT_RESPONSE(cid, { success = true, resultCode = "SUCCESS" }) + + + --hmi side: send request to short click on "Second" softButton + self.hmiConnection:SendNotification("Buttons.OnButtonEvent", {name = "CUSTOM_BUTTON", mode = "BUTTONDOWN", customButtonID = 2, appID = self.applications["Test Application"]}) + self.hmiConnection:SendNotification("Buttons.OnButtonEvent", {name = "CUSTOM_BUTTON", mode = "BUTTONUP", customButtonID = 2, appID = self.applications["Test Application"]}) + self.hmiConnection:SendNotification("Buttons.OnButtonPress", {name = "CUSTOM_BUTTON", mode = "SHORT", customButtonID = 2, appID = self.applications["Test Application"]}) + + + --mobile side: notifications are sent to mobile app + EXPECT_NOTIFICATION("OnButtonEvent", { customButtonID = 2, buttonEventMode = "BUTTONDOWN", buttonName = "CUSTOM_BUTTON"}, + { customButtonID = 2, buttonEventMode = "BUTTONUP", buttonName = "CUSTOM_BUTTON"}) + :Times(2) + + EXPECT_NOTIFICATION("OnButtonPress", { customButtonID = 2, buttonPressMode = "SHORT", buttonName = "CUSTOM_BUTTON"}) + :Times(1) + + + end + + --End Test case SequenceCheck.10 + ----------------------------------------------------------------------------------------- + + --Begin Test case SequenceCheck.11 + --Description: Check test case TC_SoftButtons_01(SDLAQ-TC-68) + + --Requirement id in JAMA: SDLAQ-CRS-200 + + --Verification criteria: Checking TEXT soft button reflecting on UI only if text is defined + + function Test:Show_TEXTSoftButtonsAndTextMissing() + + --mobile side: sending the request + + local Request = { + mediaClock = "00:00:01", + mainField1 = "Show1", + softButtons = + { + { + systemAction = "DEFAULT_ACTION", + type = "TEXT", + isHighlighted = false, + image = + { + imageType = "DYNAMIC", + value = "action.png" + }, + softButtonID = 1 + } + } + } + + local cid = self.mobileSession:SendRPC("Show", Request) + + --hmi side: expect the request + local UIParams = self:createUIParameters(Request) + EXPECT_HMICALL("UI.Show", UIParams) + :Times(0) + + --mobile side: expect response + EXPECT_RESPONSE(cid, { success = false, resultCode = "INVALID_DATA"}) + + end + + --End Test case SequenceCheck.11 + ----------------------------------------------------------------------------------------- + + --Begin Test case SequenceCheck.12 + --Description: Check test case TC_SoftButtons_01(SDLAQ-TC-68) + + --Requirement id in JAMA: SDLAQ-CRS-870 + + --Verification criteria: Checking long click on TEXT soft button + + function Test:Show_TEXTSoftButtons_LongClick() + + + local Request = + { + mediaClock = "22:22", + mainField1 = "Text1", + mainField2 = "Text2", + mainField3 = "Text3", + mainField4 = "Text4", + softButtons = + { + { + systemAction = "KEEP_CONTEXT", + type = "TEXT", + isHighlighted = false, + text = "First", + softButtonID = 1 + }, + { + systemAction = "DEFAULT_ACTION", + type = "TEXT", + isHighlighted = true, + text = "Second", + softButtonID = 2 + }, + { + systemAction = "DEFAULT_ACTION", + type = "TEXT", + isHighlighted = true, + text = "Third", + image = + { + imageType = "DYNAMIC", + value = "icon.png" + }, + softButtonID = 3 + } + }, + statusBar = "new status bar", + mediaTrack = "Track1" + } + + --mobile side: sending Show request + local cid = self.mobileSession:SendRPC("Show", Request) + + + --hmi side: expect UI.Show request + local UIParams = self:createUIParameters(Request) + EXPECT_HMICALL("UI.Show", UIParams) + + :Do(function(_,data) + --hmi side: sending UI.Show response + self.hmiConnection:SendResponse(data.id, data.method, "SUCCESS", {}) + end) + + --mobile side: expect Show response + EXPECT_RESPONSE(cid, { success = true, resultCode = "SUCCESS" }) + + + --hmi side: send request to long click on "Third" softButton + self.hmiConnection:SendNotification("Buttons.OnButtonEvent", {name = "CUSTOM_BUTTON", mode = "BUTTONDOWN", customButtonID = 3, appID = self.applications["Test Application"]}) + self.hmiConnection:SendNotification("Buttons.OnButtonEvent", {name = "CUSTOM_BUTTON", mode = "BUTTONUP", customButtonID = 3, appID = self.applications["Test Application"]}) + self.hmiConnection:SendNotification("Buttons.OnButtonPress", {name = "CUSTOM_BUTTON", mode = "LONG", customButtonID = 3, appID = self.applications["Test Application"]}) + + + --mobile side: notifications are sent to mobile app + EXPECT_NOTIFICATION("OnButtonEvent", { customButtonID = 3, buttonEventMode = "BUTTONDOWN", buttonName = "CUSTOM_BUTTON"}, + { customButtonID = 3, buttonEventMode = "BUTTONUP", buttonName = "CUSTOM_BUTTON"}) + :Times(2) + + EXPECT_NOTIFICATION("OnButtonPress", { customButtonID = 3, buttonPressMode = "LONG", buttonName = "CUSTOM_BUTTON"}) + :Times(1) + + + end + + --End Test case SequenceCheck.12 + ------------------------------------------------------------------------------------------- + + --Begin Test case SequenceCheck.13 + --Description: Check test case TC_SoftButtons_01(SDLAQ-TC-68) + + --Requirement id in JAMA: SDLAQ-CRS-200 + + --Verification criteria: Checking TEXT soft button reflecting on UI only if text is defined + + function Test:Show_TEXTSoftButtonsAndTextWithWhiteSpaces() + + --mobile side: sending the request + + local Request = { + mediaClock = "00:00:01", + mainField1 = "Show1", + softButtons = + { + { + systemAction = "DEFAULT_ACTION", + type = "TEXT", + text = " ", + isHighlighted = false, + image = + { + imageType = "DYNAMIC", + value = "action.png" + }, + softButtonID = 1 + } + } + } + + local cid = self.mobileSession:SendRPC("Show", Request) + + --hmi side: expect the request + local UIParams = self:createUIParameters(Request) + EXPECT_HMICALL("UI.Show", UIParams) + :Times(0) + + --mobile side: expect response + EXPECT_RESPONSE(cid, { success = false, resultCode = "INVALID_DATA"}) + + end + + + --End Test case SequenceCheck.13 + ----------------------------------------------------------------------------------------- + + --Begin Test case SequenceCheck.14 + --Description: Check test case TC_SoftButtons_02(SDLAQ-TC-75) + --Info: This TC will be failing till resolving APPLINK-16052 + + --Requirement id in JAMA: SDLAQ-CRS-869 + + --Verification criteria: Checking short click on IMAGE soft button + + function Test:Show_IMAGESoftButtons_ShortClick() + + + local Request = + { + mediaClock = "22:22", + mainField1 = "Text1", + mainField2 = "Text2", + mainField3 = "Text3", + mainField4 = "Text4", + softButtons = + { + { + systemAction = "KEEP_CONTEXT", + type = "IMAGE", + isHighlighted = true, + -- image = + -- { + -- imageType = "DYNAMIC", + -- value = "icon.png" + -- }, + softButtonID = 1 + }, + { + systemAction = "DEFAULT_ACTION", + type = "IMAGE", + isHighlighted = true, + text = "Second", + -- image = + -- { + -- imageType = "DYNAMIC", + -- value = "action.png" + -- }, + softButtonID = 2 + } + }, + statusBar = "new status bar", + mediaTrack = "Track1" + } + + --mobile side: sending Show request + local cid = self.mobileSession:SendRPC("Show", Request) + + + --hmi side: expect UI.Show request + local UIParams = self:createUIParameters(Request) + EXPECT_HMICALL("UI.Show", UIParams) + + :Do(function(_,data) + --hmi side: sending UI.Show response + self.hmiConnection:SendResponse(data.id, data.method, "SUCCESS", {}) + end) + + --mobile side: expect Show response + EXPECT_RESPONSE(cid, { success = true, resultCode = "SUCCESS" }) + + + --hmi side: send request to short click on "Action.png" softButton + self.hmiConnection:SendNotification("Buttons.OnButtonEvent", {name = "CUSTOM_BUTTON", mode = "BUTTONDOWN", customButtonID = 2, appID = self.applications["Test Application"]}) + self.hmiConnection:SendNotification("Buttons.OnButtonEvent", {name = "CUSTOM_BUTTON", mode = "BUTTONUP", customButtonID = 2, appID = self.applications["Test Application"]}) + self.hmiConnection:SendNotification("Buttons.OnButtonPress", {name = "CUSTOM_BUTTON", mode = "SHORT", customButtonID = 2, appID = self.applications["Test Application"]}) + + + --mobile side: notifications are sent to mobile app + EXPECT_NOTIFICATION("OnButtonEvent", { customButtonID = 2, buttonEventMode = "BUTTONDOWN", buttonName = "CUSTOM_BUTTON"}, + { customButtonID = 2, buttonEventMode = "BUTTONUP", buttonName = "CUSTOM_BUTTON"}) + :Times(2) + + EXPECT_NOTIFICATION("OnButtonPress", { customButtonID = 2, buttonPressMode = "SHORT", buttonName = "CUSTOM_BUTTON"}) + :Times(1) + + + end + + --End Test case SequenceCheck.14 + ----------------------------------------------------------------------------------------- + + --Begin Test case SequenceCheck.15 + --Description: Check test case TC_SoftButtons_02(SDLAQ-TC-75) + --Info: This TC will be failing till resolving APPLINK-16052 + + --Requirement id in JAMA: SDLAQ-CRS-200 + + --Verification criteria: Checking IMAGE soft button reflecting on UI only if image is defined + + function Test:Show_IMAGESoftButtonsAndImageNotExist() + + --mobile side: sending the request + + local Request = { + mediaClock = "00:00:01", + mainField1 = "Show1", + softButtons = + { + + + { + systemAction = "KEEP_CONTEXT", + type = "IMAGE", + text = "First", + isHighlighted = false, + softButtonID = 1 + }, + { + systemAction = "KEEP_CONTEXT", + type = "IMAGE", + isHighlighted = true, + image = + { + imageType = "DYNAMIC", + value = "aaa" --image doesn't exist + }, + softButtonID = 1 + }, + + } + } + + local cid = self.mobileSession:SendRPC("Show", Request) + + --hmi side: expect the request + local UIParams = self:createUIParameters(Request) + EXPECT_HMICALL("UI.Show", UIParams) + :Times(0) + + --mobile side: expect response + EXPECT_RESPONSE(cid, { success = false, resultCode = "INVALID_DATA"}) + + end + + + --End Test case SequenceCheck.15 + ---------------------------------------------------------------------------------------------- + + --Begin Test case SequenceCheck.16 + --Description: Check test case TC_SoftButtons_02(SDLAQ-TC-75) + --Info: This TC will be failing till resolving APPLINK-16052 + + --Requirement id in JAMA: SDLAQ-CRS-870 + + --Verification criteria: Checking long click on IMAGE soft button + + function Test:Show_IMAGESoftButtons_LongClick() + + + local Request = + { + mediaClock = "22:22", + mainField1 = "Text1", + mainField2 = "Text2", + mainField3 = "Text3", + mainField4 = "Text4", + softButtons = + { + { + systemAction = "KEEP_CONTEXT", + type = "IMAGE", + isHighlighted = true, + image = + { + imageType = "DYNAMIC", + value = "icon.png" + }, + softButtonID = 1 + }, + { + systemAction = "DEFAULT_ACTION", + type = "IMAGE", + isHighlighted = false, + image = + { + imageType = "DYNAMIC", + value = "action.png" + }, + softButtonID = 2 + } + }, + statusBar = "new status bar", + mediaTrack = "Track1" + } + + --mobile side: sending Show request + local cid = self.mobileSession:SendRPC("Show", Request) + + + --hmi side: expect UI.Show request + local UIParams = self:createUIParameters(Request) + EXPECT_HMICALL("UI.Show", UIParams) + + :Do(function(_,data) + --hmi side: sending UI.Show response + self.hmiConnection:SendResponse(data.id, data.method, "SUCCESS", {}) + end) + + --mobile side: expect Show response + EXPECT_RESPONSE(cid, { success = true, resultCode = "SUCCESS" }) + + + --hmi side: send request to long click on "Action.png" softButton + self.hmiConnection:SendNotification("Buttons.OnButtonEvent", {name = "CUSTOM_BUTTON", mode = "BUTTONDOWN", customButtonID = 2, appID = self.applications["Test Application"]}) + self.hmiConnection:SendNotification("Buttons.OnButtonEvent", {name = "CUSTOM_BUTTON", mode = "BUTTONUP", customButtonID = 2, appID = self.applications["Test Application"]}) + self.hmiConnection:SendNotification("Buttons.OnButtonPress", {name = "CUSTOM_BUTTON", mode = "LONG", customButtonID = 2, appID = self.applications["Test Application"]}) + + + --mobile side: notifications are sent to mobile app + EXPECT_NOTIFICATION("OnButtonEvent", { customButtonID = 2, buttonEventMode = "BUTTONDOWN", buttonName = "CUSTOM_BUTTON"}, + { customButtonID = 2, buttonEventMode = "BUTTONUP", buttonName = "CUSTOM_BUTTON"}) + :Times(2) + + EXPECT_NOTIFICATION("OnButtonPress", { customButtonID = 2, buttonPressMode = "LONG", buttonName = "CUSTOM_BUTTON"}) + :Times(1) + + + end + + --End Test case SequenceCheck.16 + + ----------------------------------------------------------------------------------------- + --Begin Test case SequenceCheck.17 + --Description: Check test case TC_SoftButtons_03(SDLAQ-TC-156) + --Info: This TC will be failing till resolving APPLINK-16052 + + --Requirement id in JAMA: SDLAQ-CRS-869 + + --Verification criteria: Checking short click on BOTH soft button + + function Test:Show_BOTHSoftButtons_ShortClick() + + + local Request = + { + mediaClock = "22:22", + mainField1 = "Text1", + mainField2 = "Text2", + mainField3 = "Text3", + mainField4 = "Text4", + softButtons = + { + { + systemAction = "DEFAULT_ACTION", + type = "BOTH", + isHighlighted = false, + text = "First", + image = + { + imageType = "DYNAMIC", + value = "icon.png" + }, + softButtonID = 1 + }, + { + systemAction = "KEEP_CONTEXT", + type = "BOTH", + text = "Second", + isHighlighted = true, + image = + { + imageType = "DYNAMIC", + value = "icon.png" + }, + softButtonID = 2 + }, + { + systemAction = "DEFAULT_ACTION", + type = "BOTH", + text = "Third", + isHighlighted = true, + image = + { + imageType = "DYNAMIC", + value = "action.png" + }, + softButtonID = 3 + } + }, + statusBar = "new status bar", + mediaTrack = "Track1" + } + + --mobile side: sending Show request + local cid = self.mobileSession:SendRPC("Show", Request) + + + --hmi side: expect UI.Show request + local UIParams = self:createUIParameters(Request) + EXPECT_HMICALL("UI.Show", UIParams) + + :Do(function(_,data) + --hmi side: sending UI.Show response + self.hmiConnection:SendResponse(data.id, data.method, "SUCCESS", {}) + end) + + --mobile side: expect Show response + EXPECT_RESPONSE(cid, { success = true, resultCode = "SUCCESS" }) + + + --hmi side: send request to short click on "Action.png" softButton + self.hmiConnection:SendNotification("Buttons.OnButtonEvent", {name = "CUSTOM_BUTTON", mode = "BUTTONDOWN", customButtonID = 3, appID = self.applications["Test Application"]}) + self.hmiConnection:SendNotification("Buttons.OnButtonEvent", {name = "CUSTOM_BUTTON", mode = "BUTTONUP", customButtonID = 3, appID = self.applications["Test Application"]}) + self.hmiConnection:SendNotification("Buttons.OnButtonPress", {name = "CUSTOM_BUTTON", mode = "SHORT", customButtonID = 3, appID = self.applications["Test Application"]}) + + + --mobile side: notifications are sent to mobile app + EXPECT_NOTIFICATION("OnButtonEvent", { customButtonID = 3, buttonEventMode = "BUTTONDOWN", buttonName = "CUSTOM_BUTTON"}, + { customButtonID = 3, buttonEventMode = "BUTTONUP", buttonName = "CUSTOM_BUTTON"}) + :Times(2) + + EXPECT_NOTIFICATION("OnButtonPress", { customButtonID = 3, buttonPressMode = "SHORT", buttonName = "CUSTOM_BUTTON"}) + :Times(1) + + + end + + --End Test case SequenceCheck.17 + +---------------------------------------------------------------------------------------------------------------------- + + --Begin Test case SequenceCheck.18 + --Description: Check test case TC_SoftButtons_03(SDLAQ-TC-156) + --Info: This TC will be failing till resolving APPLINK-16052 + + --Requirement id in JAMA: SDLAQ-CRS-2912 + + --Verification criteria: Check that On.ButtonEvent(CUSTOM_BUTTON) notification is not transferred from HMI to mobile app by SDL if CUSTOM_BUTTON is not subscribed + + + function Test:UnsubscribeButton_CUSTOM_BUTTON_SUCCESS() + + --mobile side: send UnsubscribeButton request + local cid = self.mobileSession:SendRPC("UnsubscribeButton", + { + buttonName = "CUSTOM_BUTTON" + }) + + --hmi side: expect OnButtonSubscription notification + EXPECT_HMINOTIFICATION("Buttons.OnButtonSubscription", {name = "CUSTOM_BUTTON", isSubscribed = false}) + :Timeout(5000) + + -- Mobile side: expects SubscribeButton response + -- Mobile side: expects EXPECT_NOTIFICATION("OnHashChange") if SUCCESS + EXPECT_RESPONSE(cid, { success = true, resultCode = "SUCCESS"}) + --:Timeout(13000) + + end + + function Test:Show_BOTHSoftButtons_AfterUnsubscribe() + + + local Request = + { + mediaClock = "22:22", + mainField1 = "Text1", + mainField2 = "Text2", + mainField3 = "Text3", + mainField4 = "Text4", + softButtons = + { + { + systemAction = "DEFAULT_ACTION", + type = "BOTH", + isHighlighted = true, + text = "First", + image = + { + imageType = "DYNAMIC", + value = "action.png" + }, + softButtonID = 1 + } + }, + statusBar = "new status bar", + mediaTrack = "Track1" + } + + --mobile side: sending Show request + local cid = self.mobileSession:SendRPC("Show", Request) + + + --hmi side: expect UI.Show request + local UIParams = self:createUIParameters(Request) + EXPECT_HMICALL("UI.Show", UIParams) + + :Do(function(_,data) + --hmi side: sending UI.Show response + self.hmiConnection:SendResponse(data.id, data.method, "SUCCESS", {}) + end) + + --mobile side: expect Show response + EXPECT_RESPONSE(cid, { success = true, resultCode = "SUCCESS" }) + + + --hmi side: send request to short click on "First" softButton + self.hmiConnection:SendNotification("Buttons.OnButtonEvent", {name = "CUSTOM_BUTTON", mode = "BUTTONDOWN", customButtonID = 1, appID = self.applications["Test Application"]}) + self.hmiConnection:SendNotification("Buttons.OnButtonEvent", {name = "CUSTOM_BUTTON", mode = "BUTTONUP", customButtonID = 1, appID = self.applications["Test Application"]}) + self.hmiConnection:SendNotification("Buttons.OnButtonPress", {name = "CUSTOM_BUTTON", mode = "SHORT", customButtonID = 1, appID = self.applications["Test Application"]}) + + + --mobile side: notifications are sent to mobile app + EXPECT_NOTIFICATION("OnButtonEvent", { customButtonID = 1, buttonEventMode = "BUTTONDOWN", buttonName = "CUSTOM_BUTTON"}, + { customButtonID = 1, buttonEventMode = "BUTTONUP", buttonName = "CUSTOM_BUTTON"}) + :Times(0) + + EXPECT_NOTIFICATION("OnButtonPress", { customButtonID = 1, buttonPressMode = "SHORT", buttonName = "CUSTOM_BUTTON"}) + :Times(0) + + + end + + --End Test case SequenceCheck.18 + + ---------------------------------------------------------------------------------------------- + + --Begin Test case SequenceCheck.19 + --Description: Check test case TC_SoftButtons_03(SDLAQ-TC-156) + + --Requirement id in JAMA: SDLAQ-CRS-200 + + --Verification criteria: Checking BOTH soft button reflecting on UI only if image and text are defined + + function Test:Show_BOTHSoftButtonImageNotDefined() + + --mobile side: sending the request + + local Request = { + mediaClock = "00:00:01", + mainField1 = "Show1", + softButtons = + { + + + { + systemAction = "DEFAULT_ACTION", + type = "BOTH", + isHighlighted = false, + text = "First", + softButtonID = 1 + }, + + } + } + + local cid = self.mobileSession:SendRPC("Show", Request) + + --hmi side: expect the request + local UIParams = self:createUIParameters(Request) + EXPECT_HMICALL("UI.Show", UIParams) + :Times(0) + + --mobile side: expect response + EXPECT_RESPONSE(cid, { success = false, resultCode = "INVALID_DATA"}) + + end + + --End Test case SequenceCheck.19 + +----------------------------------------------------------------------------------------------- + + --Begin Test case SequenceCheck.20 + --Description: Check test case TC_SoftButtons_04(SDLAQ-TC-157) + --Info: This TC will be failing till resolving APPLINK-16052 + + --Requirement id in JAMA: SDLAQ-CRS-870 + + --Verification criteria: Checking long click on BOTH soft button + + + function Test:Show_BOTHSoftButtons_LongClick() + + + local Request = + { + mediaClock = "22:22", + mainField1 = "Text1", + mainField2 = "Text2", + mainField3 = "Text3", + mainField4 = "Text4", + softButtons = + { + { + type = "BOTH", + isHighlighted = true, + text = "First", + image = + { + imageType = "DYNAMIC", + value = "icon.png" + }, + softButtonID = 1 + } + }, + statusBar = "new status bar", + mediaTrack = "Track1" + } + + --mobile side: sending Show request + local cid = self.mobileSession:SendRPC("Show", Request) + + + --hmi side: expect UI.Show request + local UIParams = self:createUIParameters(Request) + EXPECT_HMICALL("UI.Show", UIParams) + + :Do(function(_,data) + --hmi side: sending UI.Show response + self.hmiConnection:SendResponse(data.id, data.method, "SUCCESS", {}) + end) + + --mobile side: expect Show response + EXPECT_RESPONSE(cid, { success = true, resultCode = "SUCCESS" }) + + + --hmi side: send request to long click on "First" softButton + self.hmiConnection:SendNotification("Buttons.OnButtonEvent", {name = "CUSTOM_BUTTON", mode = "BUTTONDOWN", customButtonID = 1, appID = self.applications["Test Application"]}) + self.hmiConnection:SendNotification("Buttons.OnButtonEvent", {name = "CUSTOM_BUTTON", mode = "BUTTONUP", customButtonID = 1, appID = self.applications["Test Application"]}) + self.hmiConnection:SendNotification("Buttons.OnButtonPress", {name = "CUSTOM_BUTTON", mode = "LONG", customButtonID = 1, appID = self.applications["Test Application"]}) + + + --mobile side: notifications are sent to mobile app + EXPECT_NOTIFICATION("OnButtonEvent", { customButtonID = 1, buttonEventMode = "BUTTONDOWN", buttonName = "CUSTOM_BUTTON"}, + { customButtonID = 1, buttonEventMode = "BUTTONUP", buttonName = "CUSTOM_BUTTON"}) + :Times(2) + + EXPECT_NOTIFICATION("OnButtonPress", { customButtonID = 1, buttonPressMode = "LONG", buttonName = "CUSTOM_BUTTON"}) + :Times(1) + + + end + + + --End Test case SequenceCheck.20 + +---------------------------------------------------------------------------------------------- + + --Begin Test case SequenceCheck.21 + --Description: Check test case TC_SoftButtons_03(SDLAQ-TC-156) + + --Requirement id in JAMA: SDLAQ-CRS-200 + + --Verification criteria: Checking BOTH soft button reflecting on UI only if image and text are defined + + function Test:Show_BOTHSoftButtonImageAndTextNotDefined() + + --mobile side: sending the request + + local Request = { + mediaClock = "00:00:01", + mainField1 = "Show1", + softButtons = + { + + + { + systemAction = "DEFAULT_ACTION", + type = "BOTH", + isHighlighted = false, + softButtonID = 1 + }, + + } + } + + local cid = self.mobileSession:SendRPC("Show", Request) + + --hmi side: expect the request + local UIParams = self:createUIParameters(Request) + EXPECT_HMICALL("UI.Show", UIParams) + :Times(0) + + --mobile side: expect response + EXPECT_RESPONSE(cid, { success = false, resultCode = "INVALID_DATA"}) + + end + + --End Test case SequenceCheck.21 + + +end + +SequenceChecks() + + +---------------------------------------------------------------------------------------------- +-----------------------------------------TEST BLOCK VII--------------------------------------- +--------------------------------------Different HMIStatus------------------------------------- +---------------------------------------------------------------------------------------------- + +--Description: Check different HMIStatus + +--Requirement id in JAMA: + --SDLAQ-CRS-774: HMI Status Requirement for Show + --Verification criteria: Show request is allowed in FULL, LIMITED, BACKGROUND HMI level + +--Verify resultCode in NONE, LIMITED, BACKGROUND hmi level +commonTestCases:verifyDifferentHMIStatus("DISALLOWED", "SUCCESS", "SUCCESS") + +--ToDO: Please note that ActivationApp fails due to APPLINK-16046, remove comment once issue is fixed + +return Test diff --git a/test_scripts/API/ATF_ShowConstantTBT.lua b/test_scripts/API/ATF_ShowConstantTBT.lua new file mode 100644 index 0000000000..20f7b27cfd --- /dev/null +++ b/test_scripts/API/ATF_ShowConstantTBT.lua @@ -0,0 +1,3727 @@ + +Test = require('connecttest') +require('cardinalities') +local events = require('events') +local mobile_session = require('mobile_session') +local mobile = require('mobile_connection') +local tcp = require('tcp_connection') +local file_connection = require('file_connection') +local config = require('config') +local json = require('json') + +local module = require('testbase') + +--------------------------------------------------------------------------------------------- +-----------------------------Required Shared Libraries--------------------------------------- +--------------------------------------------------------------------------------------------- +require('user_modules/AppTypes') +local SDLConfig = require('user_modules/shared_testcases/SmartDeviceLinkConfigurations') +local commonFunctions = require('user_modules/shared_testcases/commonFunctions') +local commonSteps = require('user_modules/shared_testcases/commonSteps') +local stringParameter = require('user_modules/shared_testcases/testCasesForStringParameter') +local enumerationParameter = require('user_modules/shared_testcases/testCasesForEnumerationParameter') +local imageParameter = require('user_modules/shared_testcases/testCasesForImageParameter') +local arraySoftButtonsParameter = require('user_modules/shared_testcases/testCasesForArraySoftButtonsParameter') +local arrayStringParameter = require('user_modules/shared_testcases/testCasesForArrayStringParameter') +local integerParameter = require('user_modules/shared_testcases/testCasesForIntegerParameter') +local floatParameter = require('user_modules/shared_testcases/testCasesForFloatParameter') +local booleanParameter = require('user_modules/shared_testcases/testCasesForBooleanParameter') +local policyTable = require('user_modules/shared_testcases/testCasesForPolicyTable') + +--------------------------------------------------------------------------------------------- +------------------------------------ Common Variables --------------------------------------- +-------------------------------------------------------------------------------------------- + +APIName = "ShowConstantTBT" -- set request name +strMaxLengthFileName255 = string.rep("a", 251) .. ".png" -- set max length file name +local storagePath = config.pathToSDL .. SDLConfig:GetValue("AppStorageFolder") .. "/" .. tostring(config.application1.registerAppInterfaceParams.appID .. "_" .. tostring(config.deviceMAC) .. "/") + +--Debug = {"graphic", "value"} --use to print request before sending to SDL. +Debug = {} -- empty {}: script will do not print request on console screen. + +--------------------------------------------------------------------------------------------- +-------------------------- Overwrite These Functions For This Script------------------------- +--------------------------------------------------------------------------------------------- +--Specific functions for this script +--1. createRequest() +--2. createUIParameters(RequestParams) +--3. verify_SUCCESS_Case(RequestParams) +--4. verify_INVALID_DATA_Case(RequestParams) +--------------------------------------------------------------------------------------------- + +--Create default request parameters +function createRequest() + + return { + navigationText1 = "NavigationText1" + } + +end +--------------------------------------------------------------------------------------------- + +--Create UI expected result based on parameters from the request +function Test:createUIParameters(RequestParams) + + local param = {} + + --maneuverComplete + param["maneuverComplete"] = RequestParams["maneuverComplete"] + + --distanceToManeuver + param["distanceToManeuver"] = RequestParams["distanceToManeuver"] + + --distanceToManeuverScale + param["distanceToManeuverScale"] = RequestParams["distanceToManeuverScale"] + + --Convert navigationTexts parameter + local j = 0 + + --navigationText1 + if RequestParams["navigationText1"] ~= nil then + j = j + 1 + if param["navigationTexts"] == nil then + param["navigationTexts"] = {} + end + param["navigationTexts"][j] = { + fieldName = "navigationText1", + fieldText = RequestParams["navigationText1"] + } + end + + + --navigationText2 + if RequestParams["navigationText2"] ~= nil then + j = j + 1 + if param["navigationTexts"] == nil then + param["navigationTexts"] = {} + end + param["navigationTexts"][j] = { + fieldName = "navigationText2", + fieldText = RequestParams["navigationText2"] + } + end + + --eta + if RequestParams["eta"] ~= nil then + j = j + 1 + if param["navigationTexts"] == nil then + param["navigationTexts"] = {} + end + param["navigationTexts"][j] = { + fieldName = "ETA", + fieldText = RequestParams["eta"] + } + end + + --totalDistance + if RequestParams["totalDistance"] ~= nil then + j = j + 1 + if param["navigationTexts"] == nil then + param["navigationTexts"] = {} + end + param["navigationTexts"][j] = { + fieldName = "totalDistance", + fieldText = RequestParams["totalDistance"] + } + end + + --timeToDestination + if RequestParams["timeToDestination"] ~= nil then + j = j + 1 + if param["navigationTexts"] == nil then + param["navigationTexts"] = {} + end + param["navigationTexts"][j] = { + fieldName = "timeToDestination", + fieldText = RequestParams["timeToDestination"] + } + end + + --nextTurnIcon + param["nextTurnIcon"] = RequestParams["nextTurnIcon"] + if param["nextTurnIcon"] ~= nil and + param["nextTurnIcon"].imageType ~= "STATIC" and + param["nextTurnIcon"].value ~= nil and + param["nextTurnIcon"].value ~= "" then + param["nextTurnIcon"].value = storagePath ..param["nextTurnIcon"].value + end + + --turnIcon + param["turnIcon"] = RequestParams["turnIcon"] + if param["turnIcon"] ~= nil and + param["turnIcon"].imageType ~= "STATIC" and + param["turnIcon"].value ~= nil and + param["turnIcon"].value ~= "" then + param["turnIcon"].value = storagePath ..param["turnIcon"].value + end + + if RequestParams["softButtons"] ~= nil then + if next(RequestParams["softButtons"]) == nil then + RequestParams["softButtons"] = nil + else + param["softButtons"] = RequestParams["softButtons"] + for i = 1, #param["softButtons"] do + + --if type = TEXT, image = nil, else type = IMAGE, text = nil + if param["softButtons"][i].type == "TEXT" then + param["softButtons"][i].image = nil + + elseif param["softButtons"][i].type == "IMAGE" then + param["softButtons"][i].text = nil + end + + --if image.imageType ~=STATIC, add app folder to image value + if param["softButtons"][i].image ~= nil and + param["softButtons"][i].image.imageType ~= "STATIC" then + + param["softButtons"][i].image.value = storagePath ..param["softButtons"][i].image.value + end + + --if SystemAction is missed then default value will be DEFAULT_ACTION + if param["softButtons"][i].systemAction == nil then + param["softButtons"][i].systemAction = "DEFAULT_ACTION" + end + end + end + end + + return param +end +--------------------------------------------------------------------------------------------- + +--This function sends a request from mobile and verify result on HMI and mobile for SUCCESS resultCode cases. +function Test:verify_SUCCESS_Case(RequestParams) + --Check if send any empty array or empty struct + local temp = json.encode(RequestParams) + local cid = 0 + if string.find(temp, "{}") ~= nil or string.find(temp, "{{}}") ~= nil then + temp = string.gsub(temp, "{}", "[]") + temp = string.gsub(temp, "{{}}", "[{}]") + + self.mobileSession.correlationId = self.mobileSession.correlationId + 1 + + local msg = + { + serviceType = 7, + frameInfo = 0, + rpcType = 0, + rpcFunctionId = 27, + rpcCorrelationId = self.mobileSession.correlationId, + payload = temp + } + + cid = self.mobileSession.correlationId + + self.mobileSession:Send(msg) + + else + --mobile side: sending ShowConstantTBT request + cid = self.mobileSession:SendRPC("ShowConstantTBT", RequestParams) + end + + -- TODO: remove after resolving APPLINK-16094 + --------------------------------------------- + + if + (RequestParams.softButtons and + #RequestParams.softButtons == 0) then + RequestParams.softButtons = nil + end + + if RequestParams.softButtons then + for i=1,#RequestParams.softButtons do + if RequestParams.softButtons[i].image then + RequestParams.softButtons[i].image = nil + end + end + + end + --------------------------------------------- + + UIParams = self:createUIParameters(RequestParams) + + --hmi side: expect Navigation.ShowConstantTBT request + EXPECT_HMICALL("Navigation.ShowConstantTBT", UIParams) + :Do(function(_,data) + --hmi side: sending Navigation.ShowConstantTBT response + self.hmiConnection:SendResponse(data.id, data.method, "SUCCESS", {}) + end) + + --mobile side: expect SetGlobalProperties response + EXPECT_RESPONSE(cid, { success = true, resultCode = "SUCCESS" }) +end + +--------------------------------------------------------------------------------------------- + +--This function sends a request from mobile with INVALID_DATA and verify result on mobile. +function Test:verify_INVALID_DATA_Case(RequestParams) + --Check if send any empty array or empty struct + local temp = json.encode(RequestParams) + local cid = 0 + if string.find(temp, "{}") ~= nil or string.find(temp, "{{}}") ~= nil then + temp = string.gsub(temp, "{}", "[]") + temp = string.gsub(temp, "{{}}", "[{}]") + + self.mobileSession.correlationId = self.mobileSession.correlationId + 1 + + local msg = + { + serviceType = 7, + frameInfo = 0, + rpcType = 0, + rpcFunctionId = 27, + rpcCorrelationId = self.mobileSession.correlationId, + payload = temp + } + cid = self.mobileSession.correlationId + self.mobileSession:Send(msg) + else + --mobile side: sending ShowConstantTBT request + cid = self.mobileSession:SendRPC("ShowConstantTBT", RequestParams) + end + + --mobile side: expect ShowConstantTBT response + EXPECT_RESPONSE(cid, { success = false, resultCode = "INVALID_DATA" }) + :Timeout(50) + +end + +--------------------------------------------------------------------------------------------- + +--Description: Update policy from specific file + --policyFileName: Name of policy file + --bAllowed: true if want to allowed New group policy + -- false if want to disallowed New group policy +local groupID +local groupName = "New" +function Test:policyUpdate(policyFileName, bAllowed) + --hmi side: sending SDL.GetURLS request + local RequestIdGetURLS = self.hmiConnection:SendRequest("SDL.GetURLS", { service = 7 }) + + --hmi side: expect SDL.GetURLS response from HMI + EXPECT_HMIRESPONSE(RequestIdGetURLS,{result = {code = 0, method = "SDL.GetURLS", urls = {{url = "http://policies.telematics.ford.com/api/policies"}}}}) + :Do(function(_,data) + --print("SDL.GetURLS response is received") + --hmi side: sending BasicCommunication.OnSystemRequest request to SDL + self.hmiConnection:SendNotification("BasicCommunication.OnSystemRequest", + { + requestType = "PROPRIETARY", + fileName = "filename" + } + ) + --mobile side: expect OnSystemRequest notification + EXPECT_NOTIFICATION("OnSystemRequest", { requestType = "PROPRIETARY" }) + :Do(function(_,data) + --print("OnSystemRequest notification is received") + --mobile side: sending SystemRequest request + local CorIdSystemRequest = self.mobileSession:SendRPC("SystemRequest", + { + fileName = "PolicyTableUpdate", + requestType = "PROPRIETARY" + }, + "files/"..policyFileName) + + local systemRequestId + --hmi side: expect SystemRequest request + EXPECT_HMICALL("BasicCommunication.SystemRequest") + :Do(function(_,data) + systemRequestId = data.id + --print("BasicCommunication.SystemRequest is received") + + --hmi side: sending BasicCommunication.OnSystemRequest request to SDL + self.hmiConnection:SendNotification("SDL.OnReceivedPolicyUpdate", + { + policyfile = "/tmp/fs/mp/images/ivsu_cache/PolicyTableUpdate" + } + ) + function to_run() + --hmi side: sending SystemRequest response + self.hmiConnection:SendResponse(systemRequestId,"BasicCommunication.SystemRequest", "SUCCESS", {}) + end + + RUN_AFTER(to_run, 500) + end) + + --hmi side: expect SDL.OnStatusUpdate + EXPECT_HMINOTIFICATION("SDL.OnStatusUpdate") + :ValidIf(function(exp,data) + if + exp.occurences == 1 and + data.params.status == "UP_TO_DATE" then + return true + elseif + exp.occurences == 1 and + data.params.status == "UPDATING" then + return true + elseif + exp.occurences == 2 and + data.params.status == "UP_TO_DATE" then + return true + else + if + exp.occurences == 1 then + print ("\27[31m SDL.OnStatusUpdate came with wrong values. Expected in first occurrences status 'UP_TO_DATE' or 'UPDATING', got '" .. tostring(data.params.status) .. "' \27[0m") + elseif exp.occurences == 2 then + print ("\27[31m SDL.OnStatusUpdate came with wrong values. Expected in second occurrences status 'UP_TO_DATE', got '" .. tostring(data.params.status) .. "' \27[0m") + end + return false + end + end) + :Times(Between(1,2)) + + --mobile side: expect SystemRequest response + EXPECT_RESPONSE(CorIdSystemRequest, { success = true, resultCode = "SUCCESS"}) + :Do(function(_,data) + --print("SystemRequest is received") + --hmi side: sending SDL.GetUserFriendlyMessage request to SDL + local RequestIdGetUserFriendlyMessage = self.hmiConnection:SendRequest("SDL.GetUserFriendlyMessage", {language = "EN-US", messageCodes = {"StatusUpToDate"}}) + + --hmi side: expect SDL.GetUserFriendlyMessage response + EXPECT_HMIRESPONSE(RequestIdGetUserFriendlyMessage,{result = {code = 0, method = "SDL.GetUserFriendlyMessage", messages = {{line1 = "Up-To-Date", messageCode = "StatusUpToDate", textBody = "Up-To-Date"}}}}) + :Do(function(_,data) + --print("SDL.GetUserFriendlyMessage is received") + + --hmi side: sending SDL.GetListOfPermissions request to SDL + local RequestIdGetListOfPermissions = self.hmiConnection:SendRequest("SDL.GetListOfPermissions", {appID = self.applications["Test Application"]}) + + -- hmi side: expect SDL.GetListOfPermissions response + EXPECT_HMIRESPONSE(RequestIdGetListOfPermissions,{result = {code = 0, method = "SDL.GetListOfPermissions", allowedFunctions = {{name = groupName}}}}) + :Do(function(_,data) + groupID = data.result.allowedFunctions[1].id + --print("SDL.GetListOfPermissions response is received") + + --hmi side: sending SDL.OnAppPermissionConsent + self.hmiConnection:SendNotification("SDL.OnAppPermissionConsent", { appID = self.applications["Test Application"], consentedFunctions = {{ allowed = bAllowed, id = groupID, name = groupName}}, source = "GUI"}) + end) + end) + end) + + end) + end) +end + +--------------------------------------------------------------------------------------------- +-------------------------------------------Preconditions------------------------------------- +--------------------------------------------------------------------------------------------- + + --Print new line to separate Preconditions + commonFunctions:newTestCasesGroup("Preconditions") + + --Delete app_info.dat, logs and policy table + commonSteps:DeleteLogsFileAndPolicyTable() + + --Configure app params in config.lua to navigation application + config.application1.registerAppInterfaceParams.appHMIType = {"NAVIGATION"} + + --1. Activate application + commonSteps:ActivationApp() + + --2. Update policy to allow request + policyTable:precondition_updatePolicy_AllowFunctionInHmiLeves({"BACKGROUND", "FULL", "LIMITED"}) + + + --List of state + local TBTState = + { + "ROUTE_UPDATE_REQUEST", + "ROUTE_ACCEPTED", + "ROUTE_REFUSED", + "ROUTE_CANCELLED", + "ETA_REQUEST", + "NEXT_TURN_REQUEST", + "ROUTE_STATUS_REQUEST", + "ROUTE_SUMMARY_REQUEST", + "TRIP_STATUS_REQUEST", + "ROUTE_UPDATE_REQUEST_TIMEOUT" + } + + + --4. PutFiles ("a", "icon.png", "action.png", strMaxLengthFileName255) + commonSteps:PutFile( "PutFile_MinLength", "a") + commonSteps:PutFile( "PutFile_icon.png", "icon.png") + commonSteps:PutFile( "PutFile_action.png", "action.png") + commonSteps:PutFile( "PutFile_MaxLength_255Characters", strMaxLengthFileName255) +----------------------------------------------------------------------------------------- + + +----------------------------------------------------------------------------------------------- +-------------------------------------------TEST BLOCK I---------------------------------------- +--------------------------------Check normal cases of Mobile request--------------------------- +----------------------------------------------------------------------------------------------- + +--Print new line to separate test suite + commonFunctions:newTestCasesGroup("Test Suite For Normal cases of Mobile request") + +--Requirement id in JAMA or JIRA: + --SDLAQ-CRS-121: ShowConstantTBT_Request_v2_0 + --SDLAQ-CRS-663: SUCCESS + --SDLAQ-CRS-664: INVALID_DATA + +--Verification criteria: Verify request with valid and invalid values of parameters. +----------------------------------------------------------------------------------------------- + + --List of parameters in the request: + --1. navigationText1: type=String, maxlength=500, mandatory=false + --2. navigationText2, type=String, maxlength=500, mandatory=false + --3. eta, type=String, maxlength=500, mandatory=false + --4. totalDistance, type=String, maxlength=500, mandatory=false + --5. timeToDestination, type=String, maxlength=500, mandatory=false + --6. turnIcon, type=Image, mandatory=false + --7. nextTurnIcon, type=Image, mandatory=false + --8. distanceToManeuver, type = Float, minvalue=0, maxvalue=1000000000, mandatory=false + --9. distanceToManeuverScale, type = Float, minvalue=0, maxvalue=1000000000, mandatory=false + --10. maneuverComplete, type=Boolean, mandatory=false + --11. softButtons, type=SoftButton, mandatory=false, minsize=0, array=true, maxsize=3 + + ----------------------------------------------------------------------------------------------- + + +----------------------------------------------------------------------------------------------- +--Common Test cases: +--1. Positive case and in boundary conditions +--2. All parameters are lower bound +--3. All parameters are upper bound + +--1.2, 2.2, 3.2, 4.2 distanceToManeuver and distanceToManeuverScale are integer +----------------------------------------------------------------------------------------------- + --1. All params in boundary conditions + local Request = { + navigationText1 ="navigationText1", + navigationText2 ="navigationText2", + eta ="12:34", + totalDistance ="100miles", + turnIcon = + { + value ="icon.png", + imageType ="DYNAMIC", + }, + nextTurnIcon = + { + value ="action.png", + imageType ="DYNAMIC", + }, + distanceToManeuver = 50.5, + distanceToManeuverScale = 100.5, + maneuverComplete = false, + softButtons = + { + + { + type ="BOTH", + text ="Close", + image = + { + value ="icon.png", + imageType ="DYNAMIC", + }, + isHighlighted = true, + softButtonID = 44, + systemAction ="DEFAULT_ACTION", + }, + }, + } + function Test:ShowConstantTBT_Positive() + self:verify_SUCCESS_Case(Request) + end + + local Request = { + navigationText1 ="navigationText1", + navigationText2 ="navigationText2", + eta ="12:34", + totalDistance ="100miles", + turnIcon = + { + value ="icon.png", + imageType ="DYNAMIC", + }, + nextTurnIcon = + { + value ="action.png", + imageType ="DYNAMIC", + }, + distanceToManeuver = 51, + distanceToManeuverScale = 101, + maneuverComplete = false, + softButtons = + { + + { + type ="BOTH", + text ="Close", + image = + { + value ="icon.png", + imageType ="DYNAMIC", + }, + isHighlighted = true, + softButtonID = 44, + systemAction ="DEFAULT_ACTION", + }, + }, + } + function Test:ShowConstantTBT_Positive_2IntParams() + self:verify_SUCCESS_Case(Request) + end + + + --2. All parameters are lower bound + --Check 2.1 + local Request = { + navigationText1 = "1", + navigationText2 = "2", + eta = "3", + totalDistance = "D", + timeToDestination = "E", + maneuverComplete = false, + nextTurnIcon = { + value = "a", + imageType = "DYNAMIC" + }, + softButtons = { + }, + turnIcon = { + value = "a", + imageType = "DYNAMIC" + }, + distanceToManeuver = 0.1, + distanceToManeuverScale = 0.1 + } + function Test:ShowConstantTBT_LowerBound() + self:verify_SUCCESS_Case(Request) + end + --- End check 2.1 + -- Check 2.2 + local Request = { + navigationText1 = "1", + navigationText2 = "2", + eta = "3", + totalDistance = "D", + timeToDestination = "E", + maneuverComplete = false, + nextTurnIcon = { + value = "a", + imageType = "DYNAMIC" + }, + softButtons = { + }, + turnIcon = { + value = "a", + imageType = "DYNAMIC" + }, + distanceToManeuver = 0, + distanceToManeuverScale = 0 + } + function Test:ShowConstantTBT_LowerBound_2IntParams() + self:verify_SUCCESS_Case(Request) + end + ---End check 2.2 + + + --3. All parameters are upper bound + -- Check 3.1 + local Request = { + navigationText1 = string.rep("a", 500), + navigationText2 = string.rep("a", 500), + eta = string.rep("a", 500), + totalDistance = string.rep("a", 500), + timeToDestination = string.rep("a", 500), + maneuverComplete = false, + nextTurnIcon = { + value = strMaxLengthFileName255, + imageType = "DYNAMIC" + }, + softButtons = { + { + softButtonID = 65535, + text = string.rep("e", 500), + type = "TEXT", + isHighlighted = false, + systemAction = "DEFAULT_ACTION" + }, + { + softButtonID = 65534, + text = string.rep("e", 500), + type = "TEXT", + isHighlighted = false, + systemAction = "STEAL_FOCUS" + }, + { + softButtonID = 65533, + text = string.rep("e", 500), + type = "TEXT", + isHighlighted = false, + systemAction = "KEEP_CONTEXT" + } + }, + turnIcon = { + value = strMaxLengthFileName255, + imageType = "DYNAMIC" + }, + distanceToManeuver = 999999999.9, + distanceToManeuverScale = 999999999.9 + } + function Test:ShowConstantTBT_UpperBound() + self:verify_SUCCESS_Case(Request) + end + ---End check 3.1 + -- Check 3.2 + local Request = { + navigationText1 = string.rep("a", 500), + navigationText2 = string.rep("a", 500), + eta = string.rep("a", 500), + totalDistance = string.rep("a", 500), + timeToDestination = string.rep("a", 500), + maneuverComplete = false, + nextTurnIcon = { + value = strMaxLengthFileName255, + imageType = "DYNAMIC" + }, + softButtons = { + { + softButtonID = 65535, + text = string.rep("e", 500), + type = "TEXT", + isHighlighted = false, + systemAction = "DEFAULT_ACTION" + }, + { + softButtonID = 65534, + text = string.rep("e", 500), + type = "TEXT", + isHighlighted = false, + systemAction = "STEAL_FOCUS" + }, + { + softButtonID = 65533, + text = string.rep("e", 500), + type = "TEXT", + isHighlighted = false, + systemAction = "KEEP_CONTEXT" + } + }, + turnIcon = { + value = strMaxLengthFileName255, + imageType = "DYNAMIC" + }, + distanceToManeuver = 1000000000, + distanceToManeuverScale = 1000000000 + } + function Test:ShowConstantTBT_UpperBound_2IntParams() + self:verify_SUCCESS_Case(Request) + end + ---End check 3.2 +----------------------------------------------------------------------------------------------- +--4. Request with one parameter only +----------------------------------------------------------------------------------------------- + -- Check 4.1 + + local Request = { + {param = "navigationText1", value = {navigationText1 ="navigationText1"}}, + {param = "navigationText2", value = {navigationText2 ="navigationText2"}}, + {param = "eta", value = {eta ="12:34"}}, + {param = "totalDistance", value = {totalDistance ="100miles"}}, + {param = "turnIcon", value = {turnIcon = + { + value ="icon.png", + imageType ="DYNAMIC", + }}}, + {param = "timeToDestination", value = {timeToDestination = "100"}}, + {param = "nextTurnIcon", value = {nextTurnIcon = + { + value ="action.png", + imageType ="DYNAMIC", + }}}, + {param = "distanceToManeuver", value = {distanceToManeuver = 50.5}}, + {param = "distanceToManeuverScale", value = {distanceToManeuverScale = 100.5}}, + {param = "maneuverComplete", value = {maneuverComplete = false}}, + {param = "softButton", value = {softButtons = + { + + { + type ="BOTH", + text ="Close", + image = + { + value ="icon.png", + imageType ="DYNAMIC", + }, + isHighlighted = true, + softButtonID = 44, + systemAction ="DEFAULT_ACTION", + }, + }}}, + } + + for i=1, #Request do + Test["ShowConstantTBT_Only_"..Request[i].param] = function(self) + self:verify_SUCCESS_Case(Request[i].value) + end + end + + ---End check 4.1 + + -- Check 4.2: distanceToManeuver and distanceToManeuverScale are integer + local Request = { + {param = "navigationText1", value = {navigationText1 ="navigationText1"}}, + {param = "navigationText2", value = {navigationText2 ="navigationText2"}}, + {param = "eta", value = {eta ="12:34"}}, + {param = "totalDistance", value = {totalDistance ="100miles"}}, + {param = "turnIcon", value = {turnIcon = + { + value ="icon.png", + imageType ="DYNAMIC", + }}}, + {param = "timeToDestination", value = {timeToDestination = "100"}}, + {param = "nextTurnIcon", value = {nextTurnIcon = + { + value ="action.png", + imageType ="DYNAMIC", + }}}, + {param = "distanceToManeuver", value = {distanceToManeuver = 51}}, + {param = "distanceToManeuverScale", value = {distanceToManeuverScale = 101}}, + {param = "maneuverComplete", value = {maneuverComplete = false}}, + {param = "softButton", value = {softButtons = + { + + { + type ="BOTH", + text ="Close", + image = + { + value ="icon.png", + imageType ="DYNAMIC", + }, + isHighlighted = true, + softButtonID = 44, + systemAction ="DEFAULT_ACTION", + }, + }}}, + } + + for i=1, #Request do + Test["ShowConstantTBT_Only_2Int_"..Request[i].param] = function(self) + self:verify_SUCCESS_Case(Request[i].value) + end + end + + ---End check 4.2 +----------------------------------------------------------------------------------------------- +--Test cases for parameters: navigationText1, navigationText2, eta, totalDistance, timeToDestination : type=String, maxlength=500, mandatory=false +----------------------------------------------------------------------------------------------- +--List of test cases for String type parameter: + --1. IsMissed + --2. LowerBound + --3. UpperBound + --4. OutLowerBound/IsEmpty + --5. OutUpperBound + --6. IsWrongType + --7. IsInvalidCharacters +----------------------------------------------------------------------------------------------- + + local Boundary = {0, 500} + + local Request = {navigationText2 = "NavigationText2"} + stringParameter:verify_String_Parameter(Request, {"navigationText1"}, Boundary, false) + local Request = createRequest() + stringParameter:verify_String_Parameter(Request, {"navigationText2"}, Boundary, false) + stringParameter:verify_String_Parameter(Request, {"eta"}, Boundary, false) + stringParameter:verify_String_Parameter(Request, {"totalDistance"}, Boundary, false) + stringParameter:verify_String_Parameter(Request, {"timeToDestination"}, Boundary, false) + + +----------------------------------------------------------------------------------------------- +--List of test cases for parameters: turnIcon, nextTurnIcon: type=Image, mandatory=false +----------------------------------------------------------------------------------------------- +--List of test cases for Image type parameter: + --1. IsMissed + --2. IsEmpty + --3. IsWrongType + --4. ContainsWrongValues + --5. image.imageType: type=ImageType ("STATIC", "DYNAMIC") + --6. image.value: type=String, minlength=0 maxlength=65535 +----------------------------------------------------------------------------------------------- + + local Request = createRequest() + imageParameter:verify_Image_Parameter(Request, {"turnIcon"}, {"a", strMaxLengthFileName255}, false) + imageParameter:verify_Image_Parameter(Request, {"nextTurnIcon"}, {"a", strMaxLengthFileName255}, false) + + + +----------------------------------------------------------------------------------------------- +--List of test cases for parameters: softButtons, type=SoftButton, mandatory=false, minsize=0, array=true, maxsize=3 +----------------------------------------------------------------------------------------------- +--List of test cases for softButtons type parameter: + --1. IsMissed + --2. IsEmpty + --3. IsWrongType + --4. IsLowerBound + --5. IsUpperBound + --6. IsOutLowerBound + --7. IsOutUpperBound + --8. Check parameters in side a button + --"type" type="SoftButtonType"> + --"text" minlength="0" maxlength="500" type="String" mandatory="false" + --"image" type="Image" mandatory="false" + --"isHighlighted" type="Boolean" defvalue="false" mandatory="false" + --"softButtonID" type="Integer" minvalue="0" maxvalue="65535" + --"systemAction" type="SystemAction" defvalue="DEFAULT_ACTION" mandatory="false" +----------------------------------------------------------------------------------------------- + + local Request = createRequest() + local Boundary = {0, 3} + arraySoftButtonsParameter:verify_softButtons_Parameter(Request, {"softButtons"}, Boundary, {"a", strMaxLengthFileName255}, false) + + +----------------------------------------------------------------------------------------------- +--List of test cases for parameters: distanceToManeuver, distanceToManeuverScale, type=Float, minvalue=0, maxvalue=1000000000, mandatory=false +----------------------------------------------------------------------------------------------- +--List of test cases for softButtons type parameter: + --1. IsMissed + --2. IsEmpty + --3. IsWrongType + --4. IsLowerBound + --5. IsUpperBound + --6. IsOutLowerBound + --7. IsOutUpperBound +----------------------------------------------------------------------------------------------- + + local Request = createRequest() + local Boundary = {0, 1000000000} + floatParameter:verify_Float_Parameter(Request, {"distanceToManeuver"}, Boundary, false) + floatParameter:verify_Float_Parameter(Request, {"distanceToManeuverScale"}, Boundary, false) + + +----------------------------------------------------------------------------------------------- +--List of test cases for parameters: maneuverComplete +----------------------------------------------------------------------------------------------- +--List of test cases for Boolean type parameter: + --1. IsMissed + --2. IsExistentValues + --3. IsWrongType + --4. Check with values: True, False +----------------------------------------------------------------------------------------------- + + local Request = createRequest() + local Boundary = {true, false} + booleanParameter:verify_boolean_Parameter(Request, {"maneuverComplete"}, Boundary, false) + + function Test: ShowConstantTBT_maneuverComplete_True() + self.mobileSession.correlationId = self.mobileSession.correlationId + 1 + + local msg = + { + serviceType = 7, + frameInfo = 0, + rpcType = 0, + rpcFunctionId = 27, + rpcCorrelationId = self.mobileSession.correlationId, + payload = '{"maneuverComplete":True}' + } + cid = self.mobileSession.correlationId + self.mobileSession:Send(msg) + + --hmi side: expect Navigation.ShowConstantTBT request + EXPECT_HMICALL("Navigation.ShowConstantTBT", {maneuverComplete = True}) + :Do(function(_,data) + --hmi side: sending Navigation.ShowConstantTBT response + self.hmiConnection:SendResponse(data.id, data.method, "SUCCESS", {}) + end) + + --mobile side: expect ShowConstantTBT response + EXPECT_RESPONSE(self.mobileSession.correlationId, { success = true, resultCode = "SUCCESS" }) + end + + function Test: ShowConstantTBT_maneuverComplete_False() + self.mobileSession.correlationId = self.mobileSession.correlationId + 1 + + local msg = + { + serviceType = 7, + frameInfo = 0, + rpcType = 0, + rpcFunctionId = 27, + rpcCorrelationId = self.mobileSession.correlationId, + payload = '{"maneuverComplete":False}' + } + cid = self.mobileSession.correlationId + self.mobileSession:Send(msg) + + --hmi side: expect Navigation.ShowConstantTBT request + EXPECT_HMICALL("Navigation.ShowConstantTBT", {maneuverComplete = False}) + :Do(function(_,data) + --hmi side: sending Navigation.ShowConstantTBT response + self.hmiConnection:SendResponse(data.id, data.method, "SUCCESS", {}) + end) + + --mobile side: expect ShowConstantTBT response + EXPECT_RESPONSE(self.mobileSession.correlationId, { success = true, resultCode = "SUCCESS" }) + end +---------------------------------------------------------------------------------------------- +-----------------------------------------TEST BLOCK II---------------------------------------- +-----------------------------Check special cases of Mobile request---------------------------- +---------------------------------------------------------------------------------------------- + +--Requirement id in JAMA or JIRA: + --SDLAQ-CRS-121: ShowConstantTBT_Request_v2_0 + --SDLAQ-CRS-664: INVALID_DATA + --SDLAQ-CRS-663: SUCCESS + +----------------------------------------------------------------------------------------------- + +--List of test cases for softButtons type parameter: + --1. InvalidJSON (SDLAQ-CRS-664: INVALID_DATA) + --2. CorrelationIdIsDuplicated (SDLAQ-CRS-663: SUCCESS) + --3. FakeParams and FakeParameterIsFromAnotherAPI (APPLINK-14765: SDL must cut off the fake parameters from requests, responses and notifications received from HMI) + --4. MissedAllParameters (SDLAQ-CRS-664: INVALID_DATA) +----------------------------------------------------------------------------------------------- + +local function SpecialRequestChecks() + +--Begin Test case NegativeRequestCheck +--Description: Check negative request + + + --Print new line to separate new test cases group + commonFunctions:newTestCasesGroup("TestCaseGroupForAbnormal") + + --Begin Test case NegativeRequestCheck.1 + --Description: Invalid JSON + + function Test:ShowConstantTBT_InvalidJSON() + + self.mobileSession.correlationId = self.mobileSession.correlationId + 1 + + local msg = + { + serviceType = 7, + frameInfo = 0, + rpcType = 0, + rpcFunctionId = 27, + rpcCorrelationId = self.mobileSession.correlationId, + --<<-- Missing : + payload = '{"navigationText1" "NavigationText1"}' + } + cid = self.mobileSession.correlationId + self.mobileSession:Send(msg) + + self.mobileSession:ExpectResponse(self.mobileSession.correlationId, { success = false, resultCode = "INVALID_DATA" }) + + end + + --End Test case NegativeRequestCheck.1 + + + --Begin Test case NegativeRequestCheck.2 + --Description: Check CorrelationId duplicate value + --[[ToDo: APPLINK-13892 ATF: Send(msg) convert parameter in quote ("xxx") to \" + -- + function Test:ShowConstantTBT_CorrelationIdIsDuplicated() + + --mobile side: sending ShowConstantTBT request + local cid = self.mobileSession:SendRPC("ShowConstantTBT", + { + navigationText1 = "ShowConstantTBT1" + }) + + --request from mobile side + local msg = + { + serviceType = 7, + frameInfo = 0, + rpcType = 0, + rpcFunctionId = 27, + rpcCorrelationId = cid, + payload = '{"navigationText2":"ShowConstantTBT2"}' + } + + + --hmi side: expect Navigation.ShowConstantTBT request + EXPECT_HMICALL("Navigation.ShowConstantTBT", + { + navigationTexts = + { + { + fieldName = "navigationText1", + fieldText = "ShowConstantTBT1" + } + } + }, + { + navigationTexts = + { + { + fieldName = "navigationText2", + fieldText = "ShowConstantTBT2" + } + } + } + ) + :Do(function(exp,data) + if exp.occurences == 1 then + self.mobileSession:Send(msg) + end + + --hmi side: sending Navigation.ShowConstantTBT response + self.hmiConnection:SendResponse(data.id, data.method, "SUCCESS", {}) + end) + :Times(2) + + --response on mobile side + EXPECT_RESPONSE(cid, { success = true, resultCode = "SUCCESS"}) + :Times(2) + + end + ]] + --End Test case NegativeRequestCheck.2 + + ----------------------------------------------------------------------------------------- + + --Begin Test case NegativeRequestCheck.3 + --Description: Fake parameters check + + --Requirement id in JAMA: APPLINK-14765, APPLINK-16076 + --Verification criteria: SDL must cut off the fake parameters from requests, responses and notifications received from HMI; SDL must treat integer value for params of float type as valid + + --Begin Test case NegativeRequestCheck.3.1 + --Description: Fake parameters are not from any API + + function Test:ShowConstantTBT_FakeParams_IsNotFromAnyAPI() + + --mobile side: sending ShowConstantTBT request + local param = { + navigationText1 = "1", + navigationText2 = "2", + eta = "3", + totalDistance = "D", + timeToDestination = "E", + maneuverComplete = false, + fakeParam = "fakeParam", + nextTurnIcon = { + value = "a", + imageType = "DYNAMIC", + fakeParam = "fakeParam" + }, + softButtons = { + { + softButtonID = 1, + text = "ABC", + type = "TEXT", + isHighlighted = false, + systemAction = "DEFAULT_ACTION", + fakeParam = "fakeParam" + } + }, + turnIcon = { + value = "a", + imageType = "DYNAMIC", + fakeParam = "fakeParam" + }, + distanceToManeuver = 0.1, + distanceToManeuverScale = 0.1 + } + + + local cid = self.mobileSession:SendRPC("ShowConstantTBT", param) + + param.fakeParam = nil + param.nextTurnIcon.fakeParam = nil + param.turnIcon.fakeParam = nil + param.softButtons[1].fakeParam = nil + + --hmi side: expect the request + UIParams = self:createUIParameters(param) + EXPECT_HMICALL("Navigation.ShowConstantTBT", UIParams) + :ValidIf(function(_,data) + if data.params.fakeParam or + data.params.nextTurnIcon.fakeParam or + data.params.softButtons.fakeParam or + data.params.softButtons[1].fakeParam or + data.params.turnIcon.fakeParam then + print(" \27[36m SDL re-sends fakeParam parameters to HMI \27[0m") + return false + else + return true + end + end) + :Do(function(_,data) + --hmi side: sending the response + self.hmiConnection:SendResponse(data.id, data.method, "SUCCESS", {}) + end) + + --mobile side: expect the response + EXPECT_RESPONSE(cid, { success = true, resultCode = "SUCCESS" }) + + end + + --End Test case NegativeRequestCheck.3.1 + + ----------------------------------------------------------------------------------------- + + --Begin Test case NegativeRequestCheck.3.2 + --Description: Fake parameters are not from any API; integer value for distanceToManeuver, distanceToManeuverScale params of float type + + function Test:ShowConstantTBT_FakeParams_2IntParams_IsNotFromAnyAPI() + + --mobile side: sending ShowConstantTBT request + local param = { + navigationText1 = "1", + navigationText2 = "2", + eta = "3", + totalDistance = "D", + timeToDestination = "E", + maneuverComplete = false, + fakeParam = "fakeParam", + nextTurnIcon = { + value = "a", + imageType = "DYNAMIC", + fakeParam = "fakeParam" + }, + softButtons = { + { + softButtonID = 1, + text = "ABC", + type = "TEXT", + isHighlighted = false, + systemAction = "DEFAULT_ACTION", + fakeParam = "fakeParam" + } + }, + turnIcon = { + value = "a", + imageType = "DYNAMIC", + fakeParam = "fakeParam" + }, + distanceToManeuver = 1, + distanceToManeuverScale = 1 + } + + + local cid = self.mobileSession:SendRPC("ShowConstantTBT", param) + + param.fakeParam = nil + param.nextTurnIcon.fakeParam = nil + param.turnIcon.fakeParam = nil + param.softButtons[1].fakeParam = nil + + --hmi side: expect the request + UIParams = self:createUIParameters(param) + EXPECT_HMICALL("Navigation.ShowConstantTBT", UIParams) + :ValidIf(function(_,data) + if data.params.fakeParam or + data.params.nextTurnIcon.fakeParam or + data.params.softButtons.fakeParam or + data.params.softButtons[1].fakeParam or + data.params.turnIcon.fakeParam then + print(" \27[36m SDL re-sends fakeParam parameters to HMI \27[0m") + return false + else + return true + end + end) + :Do(function(_,data) + --hmi side: sending the response + self.hmiConnection:SendResponse(data.id, data.method, "SUCCESS", {}) + end) + + --mobile side: expect the response + EXPECT_RESPONSE(cid, { success = true, resultCode = "SUCCESS" }) + + end + + --End Test case NegativeRequestCheck.3.2 + + + ----------------------------------------------------------------------------------------- + + --Begin Test case NegativeRequestCheck.3.3 + --Description: Fake parameters is not from another API + + function Test:ShowConstantTBT_FakeParameterIsFromAnotherAPI() + + --mobile side: sending ShowConstantTBT request + local param = { + navigationText1 = "1", + navigationText2 = "2", + eta = "3", + totalDistance = "D", + timeToDestination = "E", + maneuverComplete = false, + syncFileName = "icon.png", + nextTurnIcon = { + value = "a", + imageType = "DYNAMIC", + syncFileName = "icon.png", + }, + softButtons = { + { + softButtonID = 1, + text = "ABC", + type = "TEXT", + isHighlighted = false, + systemAction = "DEFAULT_ACTION", + syncFileName = "icon.png", + } + }, + turnIcon = { + value = "a", + imageType = "DYNAMIC", + syncFileName = "icon.png", + }, + distanceToManeuver = 0.1, + distanceToManeuverScale = 0.1 + } + + local cid = self.mobileSession:SendRPC("ShowConstantTBT", param) + + param.syncFileName = nil + param.nextTurnIcon.syncFileName = nil + param.turnIcon.syncFileName = nil + param.softButtons[1].syncFileName = nil + + --hmi side: expect the request + UIParams = self:createUIParameters(param) + EXPECT_HMICALL("Navigation.ShowConstantTBT", UIParams) + :ValidIf(function(_,data) + if data.params.nextTurnIcon.syncFileName or + data.params.softButtons.syncFileName or + data.params.softButtons[1].syncFileName or + data.params.turnIcon.syncFileName then + print(" \27[36m SDL re-sends syncFileName parameters of SetAppIcon request to HMI \27[0m") + return false + else + return true + end + end) + :Do(function(_,data) + --hmi side: sending the response + self.hmiConnection:SendResponse(data.id, data.method, "SUCCESS", {}) + end) + + --mobile side: expect the response + EXPECT_RESPONSE(cid, { success = true, resultCode = "SUCCESS" }) + + end + + --End Test case NegativeRequestCheck.3.3 + --End Test case NegativeRequestCheck.3 + + ----------------------------------------------------------------------------------------- + + --Begin Test case NegativeRequestCheck.4 + --Description: All parameters missing + + --Requirement id in JAMA: SDLAQ-CRS-664 + --Verification criteria: "3.1. The request with no parameters is sent, the response with INVALID_DATA result code is returned." + + function Test:ShowConstantTBT_MissedAllParameters() + + --mobile side: sending ShowConstantTBT request + local cid = self.mobileSession:SendRPC("ShowConstantTBT", {} ) + + + --mobile side: expect the response + EXPECT_RESPONSE(cid, { success = false, resultCode = "INVALID_DATA" }) + + end + + --End Test case NegativeRequestCheck.4 +--End Test case NegativeRequestCheck + +end + +SpecialRequestChecks() + + +----------------------------------------------------------------------------------------------- +-------------------------------------------TEST BLOCK III-------------------------------------- +----------------------------------Check normal cases of HMI response--------------------------- +----------------------------------------------------------------------------------------------- + +--Requirement id in JAMA: SDLAQ-CRS-122: ShowConstantTBT_Response +--Verification Criteria: The response contains 2 mandatory parameters "success" and "resultCode", "info" is sent if there is any additional information about the resultCode + +----------------------------------------------------------------------------------------------- +--Parameter 1: resultCode +----------------------------------------------------------------------------------------------- +--List of test cases: + --1. IsMissed + --2. IsValidValues + --3. IsNotExist + --4. IsEmpty + --5. IsWrongType + --6. IsInvalidCharacter - \n, \t +----------------------------------------------------------------------------------------------- + +local function verify_resultCode_parameter() + + + --Print new line to separate new test cases group + commonFunctions:newTestCasesGroup("TestCaseGroupForResultCodeParameter") + ----------------------------------------------------------------------------------------- +--[[TODO: check after APPLINK-14765 is resolved + --1. IsMissed + Test[APIName.."_Response_resultCode_IsMissed_INVALID_DATA"] = function(self) + + --mobile side: sending the request + local RequestParams = createRequest() + local cid = self.mobileSession:SendRPC("ShowConstantTBT", RequestParams) + + + --hmi side: expect the request + UIParams = self:createUIParameters(RequestParams) + + EXPECT_HMICALL("Navigation.ShowConstantTBT", UIParams) + :Do(function(_,data) + --hmi side: sending the response + --self.hmiConnection:Send('{"id":'..tostring(data.id)..',"jsonrpc":"2.0","result":{"method":"Navigation.ShowConstantTBT", "code":0}}') + self.hmiConnection:Send('{"id":'..tostring(data.id)..',"jsonrpc":"2.0","result":{"method":"Navigation.ShowConstantTBT"}}') + end) + + + --mobile side: expect the response + EXPECT_RESPONSE(cid, { success = false, resultCode = "GENERIC_ERROR", info = "Invalid message received from vehicle"}) + end + ----------------------------------------------------------------------------------------- +--]] + + --2. IsValidValue + local resultCodes = { + {resultCode = "SUCCESS", success = true}, + {resultCode = "INVALID_DATA", success = false}, + {resultCode = "OUT_OF_MEMORY", success = false}, + {resultCode = "TOO_MANY_PENDING_REQUESTS", success = false}, + {resultCode = "APPLICATION_NOT_REGISTERED", success = false}, + {resultCode = "GENERIC_ERROR", success = false}, + {resultCode = "REJECTED", success = false}, + {resultCode = "DISALLOWED", success = false}, + {resultCode = "UNSUPPORTED_RESOURCE", success = true}, + {resultCode = "UNSUPPORTED_REQUEST", success = false} + } + + for i =1, #resultCodes do + + Test[APIName.."_resultCode_IsValidValues_" .. resultCodes[i].resultCode .."_SendResponse"] = function(self) + + --mobile side: sending the request + local RequestParams = createRequest() + local cid = self.mobileSession:SendRPC("ShowConstantTBT", RequestParams) + + --hmi side: expect the request + UIParams = self:createUIParameters(RequestParams) + + EXPECT_HMICALL("Navigation.ShowConstantTBT", UIParams) + :Do(function(_,data) + --hmi side: sending the response + if resultCodes[i] == "SUCCESS" then + self.hmiConnection:SendResponse(data.id, data.method, resultCodes[i].resultCode, {}) + else + self.hmiConnection:SendError(data.id, data.method, resultCodes[i].resultCode, "") + end + end) + + --mobile side: expect ShowConstantTBT response + EXPECT_RESPONSE(cid, { success = resultCodes[i].success, resultCode = resultCodes[i].resultCode}) + end + end + + ----------------------------------------------------------------------------------------- +--[[TODO: check after APPLINK-14765 is resolved + --3. IsNotExist + --4. IsEmpty + --5. IsWrongType + --6. IsInvalidCharacter - \n, \t + local testData = { + {value = "ANY", name = "IsNotExist"}, + {value = "", name = "IsEmpty"}, + {value = 123, name = "IsWrongType"} + } + + for i =1, #testData do + + Test[APIName.."_resultCode_" .. testData[i].name .."_SendResponse"] = function(self) + + --mobile side: sending the request + local RequestParams = createRequest() + local cid = self.mobileSession:SendRPC("ShowConstantTBT", RequestParams) + + --hmi side: expect the request + UIParams = self:createUIParameters(RequestParams) + + EXPECT_HMICALL("Navigation.ShowConstantTBT", UIParams) + :Do(function(_,data) + --hmi side: sending the response + self.hmiConnection:SendResponse(data.id, data.method, testData[i].value, {}) + end) + + --mobile side: expect ShowConstantTBT response + EXPECT_RESPONSE(cid, { success = false, resultCode = "GENERIC_ERROR", info = "Invalid message received from vehicle"}) + end + ----------------------------------------------------------------------------------------- + + Test[APIName.."_resultCode_" .. testData[i].name .."_SendError"] = function(self) + + --mobile side: sending the request + local RequestParams = createRequest() + local cid = self.mobileSession:SendRPC("ShowConstantTBT", RequestParams) + + --hmi side: expect the request + UIParams = self:createUIParameters(RequestParams) + + EXPECT_HMICALL("Navigation.ShowConstantTBT", UIParams) + :Do(function(_,data) + --hmi side: sending the response + self.hmiConnection:SendError(data.id, data.method, testData[i].value) + end) + + --mobile side: expect ShowConstantTBT response + EXPECT_RESPONSE(cid, { success = false, resultCode = "GENERIC_ERROR", info = "Invalid message received from vehicle"}) + end + end +]] +end + +verify_resultCode_parameter() + + +----------------------------------------------------------------------------------------------- +--Parameter 2: method +----------------------------------------------------------------------------------------------- +--List of test cases: + --1. IsMissed + --2. IsValidValue + --3. IsNotExist + --4. IsEmpty + --5. IsWrongType + --6. IsInvalidCharacter - \n, \t +----------------------------------------------------------------------------------------------- + +local function verify_method_parameter() + + --Print new line to separate new test cases group + commonFunctions:newTestCasesGroup("TestCaseGroupForMethodParameter") + ----------------------------------------------------------------------------------------- +--[[TODO: check after APPLINK-14765 is resolved + --1. IsMissed + Test[APIName.."_Response_method_IsMissed_GENERIC_ERROR"] = function(self) + + --mobile side: sending the request + local RequestParams = createRequest() + local cid = self.mobileSession:SendRPC("ShowConstantTBT", RequestParams) + + + --hmi side: expect the request + UIParams = self:createUIParameters(RequestParams) + + EXPECT_HMICALL("Navigation.ShowConstantTBT", UIParams) + :Do(function(_,data) + --hmi side: sending the response + --self.hmiConnection:Send('{"id":'..tostring(data.id)..',"jsonrpc":"2.0","result":{"method":"Navigation.ShowConstantTBT", "code":0}}') + self.hmiConnection:Send('{"id":'..tostring(data.id)..',"jsonrpc":"2.0","result":{"code":0}}') + end) + + --mobile side: expect the response + EXPECT_RESPONSE(cid, { success = false, resultCode = "GENERIC_ERROR", info = "Invalid message received from vehicle"}) + end + ----------------------------------------------------------------------------------------- +--]] + --2. IsValidValue + Test[APIName.."_Response_method_IsValidValue_SendResponse"] = function(self) + + --mobile side: sending the request + local RequestParams = createRequest() + local cid = self.mobileSession:SendRPC("ShowConstantTBT", RequestParams) + + --hmi side: expect the request + UIParams = self:createUIParameters(RequestParams) + + EXPECT_HMICALL("Navigation.ShowConstantTBT", UIParams) + :Do(function(_,data) + --hmi side: sending the response + self.hmiConnection:SendResponse(data.id, data.method, "SUCCESS", {}) + end) + + --mobile side: expect ShowConstantTBT response + EXPECT_RESPONSE(cid, { success = true, resultCode = "SUCCESS"}) + + end + ----------------------------------------------------------------------------------------- + + Test[APIName.."_Response_method_IsValidValue_SendError"] = function(self) + + --mobile side: sending the request + local RequestParams = createRequest() + local cid = self.mobileSession:SendRPC("ShowConstantTBT", RequestParams) + + --hmi side: expect the request + UIParams = self:createUIParameters(RequestParams) + + EXPECT_HMICALL("Navigation.ShowConstantTBT", UIParams) + :Do(function(_,data) + --hmi side: sending the response + self.hmiConnection:SendError(data.id, data.method, "GENERIC_ERROR", "info") + end) + + --mobile side: expect ShowConstantTBT response + EXPECT_RESPONSE(cid, { success = false, resultCode = "GENERIC_ERROR", info = "info"}) + end + ----------------------------------------------------------------------------------------- +--[[TODO: check after APPLINK-14765 is resolved + --3. IsNotExist + --4. IsEmpty + --5. IsWrongType + --6. IsInvalidCharacter - \n, \t + local Methods = { + {method = "ANY", name = "IsNotExist"}, + {method = "", name = "IsEmpty"}, + {method = 123, name = "IsWrongType"}, + {method = "a\nb", name = "IsInvalidCharacter_NewLine"}, + {method = "a\tb", name = "IsInvalidCharacter_Tab"}, + {method = " ", name = "WhiteSpacesOnly"},} + + for i =1, #Methods do + + Test[APIName.."_Response_method_" .. Methods[i].name .."_GENERIC_ERROR_SendResponse"] = function(self) + + --mobile side: sending the request + local RequestParams = createRequest() + local cid = self.mobileSession:SendRPC("ShowConstantTBT", RequestParams) + + --hmi side: expect the request + UIParams = self:createUIParameters(RequestParams) + + EXPECT_HMICALL("Navigation.ShowConstantTBT", UIParams) + :Do(function(_,data) + --hmi side: sending the response + --self.hmiConnection:SendResponse(data.id, data.method, "SUCCESS", {}) + self.hmiConnection:SendResponse(data.id, Methods[i].method, "SUCCESS", {}) + + end) + + --mobile side: expect ShowConstantTBT response + EXPECT_RESPONSE(cid, { success = false, resultCode = "GENERIC_ERROR", info = "Invalid message received from vehicle"}) + end + ----------------------------------------------------------------------------------------- + + Test[APIName.."_Response_method_" .. Methods[i].name .."_GENERIC_ERROR_SendError"] = function(self) + + --mobile side: sending the request + local RequestParams = createRequest() + local cid = self.mobileSession:SendRPC("ShowConstantTBT", RequestParams) + + --hmi side: expect the request + UIParams = self:createUIParameters(RequestParams) + + EXPECT_HMICALL("Navigation.ShowConstantTBT", UIParams) + :Do(function(_,data) + --hmi side: sending the response + --self.hmiConnection:SendError(data.id, data.method, "UNSUPPORTED_RESOURCE", "info") + self.hmiConnection:SendError(data.id, Methods[i].method, "UNSUPPORTED_RESOURCE", "info") + + end) + + --mobile side: expect ShowConstantTBT response + EXPECT_RESPONSE(cid, { success = false, resultCode = "GENERIC_ERROR", info = "Invalid message received from vehicle"}) + end + end +--]] +end + +verify_method_parameter() + + +----------------------------------------------------------------------------------------------- +--Parameter 3: info +----------------------------------------------------------------------------------------------- +--List of test cases: + --1. IsMissed + --2. IsLowerBound + --3. IsUpperBound + --4. IsOutUpperBound + --5. IsEmpty/IsOutLowerBound + --6. IsWrongType + --7. InvalidCharacter - \n, \t +----------------------------------------------------------------------------------------------- + +local function verify_info_parameter() + + + --Print new line to separate new test cases group + commonFunctions:newTestCasesGroup("TestCaseGroupForInfoParameter") + + ----------------------------------------------------------------------------------------- + + --1. IsMissed + Test[APIName.."_info_IsMissed_SendResponse"] = function(self) + + --mobile side: sending the request + local RequestParams = createRequest() + local cid = self.mobileSession:SendRPC("ShowConstantTBT", RequestParams) + + + --hmi side: expect the request + UIParams = self:createUIParameters(RequestParams) + + EXPECT_HMICALL("Navigation.ShowConstantTBT", UIParams) + :Do(function(_,data) + --hmi side: sending the response + self.hmiConnection:SendResponse(data.id, data.method, "SUCCESS", {}) + end) + + + --mobile side: expect the response + EXPECT_RESPONSE(cid, { success = true, resultCode = "SUCCESS"}) + :ValidIf (function(_,data) + if data.payload.info then + print(" \27[36m SDL resends invalid info parameter to mobile app. \27[0m") + return false + else + return true + end + end) + end + ----------------------------------------------------------------------------------------- + + Test[APIName.."_info_IsMissed_SendError"] = function(self) + + --mobile side: sending the request + local RequestParams = createRequest() + local cid = self.mobileSession:SendRPC("ShowConstantTBT", RequestParams) + + + --hmi side: expect the request + UIParams = self:createUIParameters(RequestParams) + + EXPECT_HMICALL("Navigation.ShowConstantTBT", UIParams) + :Do(function(_,data) + --hmi side: sending the response + self.hmiConnection:SendError(data.id, data.method, "GENERIC_ERROR") + end) + + + --mobile side: expect the response + -- TODO: Update after resolving APPLINK-14765 + -- EXPECT_RESPONSE(cid, { success = false, resultCode = "GENERIC_ERROR"}) + EXPECT_RESPONSE(cid, { success = false, resultCode = "INVALID_DATA", info = "Received invalid data on HMI response"}) + + end + ----------------------------------------------------------------------------------------- + + --2. IsLowerBound + --3. IsUpperBound + local testData = { + {value = "a", name = "IsLowerBound"}, + {value = commonFunctions:createString(1000), name = "IsUpperBound"}} + + for i =1, #testData do + Test[APIName.."_info_" .. testData[i].name .."_SendResponse"] = function(self) + + --mobile side: sending the request + local RequestParams = createRequest() + local cid = self.mobileSession:SendRPC("ShowConstantTBT", RequestParams) + + --hmi side: expect the request + UIParams = self:createUIParameters(RequestParams) + + EXPECT_HMICALL("Navigation.ShowConstantTBT", UIParams) + :Do(function(_,data) + --hmi side: sending the response + self.hmiConnection:SendResponse(data.id, data.method, "SUCCESS", {message = testData[i].value}) + end) + + --mobile side: expect ShowConstantTBT response + EXPECT_RESPONSE(cid, { success = true, resultCode = "SUCCESS", info = testData[i].value}) + end + ----------------------------------------------------------------------------------------- + + Test[APIName.."_info_" .. testData[i].name .."_SendError"] = function(self) + + --mobile side: sending the request + local RequestParams = createRequest() + local cid = self.mobileSession:SendRPC("ShowConstantTBT", RequestParams) + + --hmi side: expect the request + UIParams = self:createUIParameters(RequestParams) + + EXPECT_HMICALL("Navigation.ShowConstantTBT", UIParams) + :Do(function(_,data) + --hmi side: sending the response + self.hmiConnection:SendError(data.id, data.method, "GENERIC_ERROR", testData[i].value) + end) + + --mobile side: expect ShowConstantTBT response + EXPECT_RESPONSE(cid, { success = false, resultCode = "GENERIC_ERROR", info = testData[i].value}) + + end + end + ----------------------------------------------------------------------------------------- + + + --4. IsOutUpperBound + Test[APIName.."_info_IsOutUpperBound_SendResponse"] = function(self) + + local infoMaxLength = commonFunctions:createString(1000) + + --mobile side: sending the request + local RequestParams = createRequest() + local cid = self.mobileSession:SendRPC("ShowConstantTBT", RequestParams) + + --hmi side: expect the request + UIParams = self:createUIParameters(RequestParams) + + EXPECT_HMICALL("Navigation.ShowConstantTBT", UIParams) + :Do(function(_,data) + --hmi side: sending the response + self.hmiConnection:SendResponse(data.id, data.method, "SUCCESS", {message = infoMaxLength .. "1"}) + end) + + --mobile side: expect ShowConstantTBT response + EXPECT_RESPONSE(cid, { success = true, resultCode = "SUCCESS", info = infoMaxLength}) + end + ----------------------------------------------------------------------------------------- + + Test[APIName.."_info_IsOutUpperBound_SendError"] = function(self) + + local infoMaxLength = commonFunctions:createString(1000) + + --mobile side: sending the request + local RequestParams = createRequest() + local cid = self.mobileSession:SendRPC("ShowConstantTBT", RequestParams) + + --hmi side: expect the request + UIParams = self:createUIParameters(RequestParams) + + EXPECT_HMICALL("Navigation.ShowConstantTBT", UIParams) + :Do(function(_,data) + --hmi side: sending the response + self.hmiConnection:SendError(data.id, data.method, "GENERIC_ERROR", infoMaxLength .."1") + end) + + --mobile side: expect ShowConstantTBT response + EXPECT_RESPONSE(cid, { success = false, resultCode = "GENERIC_ERROR", info = infoMaxLength}) + end + ----------------------------------------------------------------------------------------- + -- TODO: update after resolving APPLINK-14551 + + --5. IsEmpty/IsOutLowerBound + --6. IsWrongType + --7. InvalidCharacter - \n, \t, white spaces only + + -- local testData = { + -- {value = "", name = "IsEmpty_IsOutLowerBound"}, + -- {value = 123, name = "IsWrongType"}, + -- {value = "a\nb", name = "IsInvalidCharacter_NewLine"}, + -- {value = "a\tb", name = "IsInvalidCharacter_Tab"}, + -- {value = " ", name = "WhiteSpacesOnly"}} + + -- for i =1, #testData do + + -- Test[APIName.."_info_" .. testData[i].name .."_SendResponse"] = function(self) + + -- --mobile side: sending the request + -- local RequestParams = createRequest() + -- local cid = self.mobileSession:SendRPC("ShowConstantTBT", RequestParams) + + -- --hmi side: expect the request + -- UIParams = self:createUIParameters(RequestParams) + + -- EXPECT_HMICALL("Navigation.ShowConstantTBT", UIParams) + -- :Do(function(_,data) + -- --hmi side: sending the response + -- self.hmiConnection:SendResponse(data.id, data.method, "SUCCESS", {message = testData[i].value}) + -- end) + + -- --mobile side: expect ShowConstantTBT response + -- EXPECT_RESPONSE(cid, { success = true, resultCode = "SUCCESS"}) + -- :ValidIf (function(_,data) + -- if data.payload.info then + -- print(" \27[36m SDL resends info parameter to mobile app. info = \"" .. data.payload.info .. "\" \27[0m") + -- return false + -- else + -- return true + -- end + -- end) + -- end + -- ----------------------------------------------------------------------------------------- + + -- Test[APIName.."_info_" .. testData[i].name .."_SendError"] = function(self) + + -- --mobile side: sending the request + -- local RequestParams = createRequest() + -- local cid = self.mobileSession:SendRPC("ShowConstantTBT", RequestParams) + + -- --hmi side: expect the request + -- UIParams = self:createUIParameters(RequestParams) + + -- EXPECT_HMICALL("Navigation.ShowConstantTBT", UIParams) + -- :Do(function(_,data) + -- --hmi side: sending the response + -- self.hmiConnection:SendError(data.id, data.method, "GENERIC_ERROR", testData[i].value) + -- end) + + -- --mobile side: expect ShowConstantTBT response + -- EXPECT_RESPONSE(cid, { success = false, resultCode = "GENERIC_ERROR"}) + -- :ValidIf (function(_,data) + -- if data.payload.info then + -- print(" \27[36m SDL resends info parameter to mobile app. info = \"" .. data.payload.info .. "\" \27[0m") + -- return false + -- else + -- return true + -- end + -- end) + -- end + -- end +end + +verify_info_parameter() + + +----------------------------------------------------------------------------------------------- +--Parameter 4: correlationID +----------------------------------------------------------------------------------------------- +--List of test cases: + --1. CorrelationIDMissing + --2. CorrelationIDWrongType + --3. CorrelationIDNotExisted + --4. CorrelationIDNegative +----------------------------------------------------------------------------------------------- +--[[TODO: check after APPLINK-14765 is resolved +local function verify_correlationID_parameter() + + + --Print new line to separate new test cases group + commonFunctions:newTestCasesGroup("TestCaseGroupForCorrelationIDParameter") + + ----------------------------------------------------------------------------------------- + + --1. CorrelationIDMissing + function Test:ReadDID_Response_CorrelationIDMissing() + + --mobile side: sending the request + local RequestParams = createRequest() + local cid = self.mobileSession:SendRPC("ShowConstantTBT", RequestParams) + + + --hmi side: expect the request + UIParams = self:createUIParameters(RequestParams) + + EXPECT_HMICALL("Navigation.ShowConstantTBT", UIParams) + :Do(function(_,data) + --hmi side: sending the response + --self.hmiConnection:Send('{"id":'..tostring(data.id)..',"jsonrpc":"2.0","result":{"method":"Navigation.ShowConstantTBT", "code":0}}') + self.hmiConnection:Send('{"jsonrpc":"2.0","result":{"method":"Navigation.ShowConstantTBT", "code":0}}') + end) + + --mobile side: expect the response + EXPECT_RESPONSE(cid, { success = false, resultCode = "GENERIC_ERROR", info = "Invalid message received from vehicle"}) + end + ----------------------------------------------------------------------------------------- + + --2. CorrelationIDWrongType + function Test:ReadDID_Response_CorrelationIDWrongType() + --mobile side: sending the request + local RequestParams = createRequest() + local cid = self.mobileSession:SendRPC("ShowConstantTBT", RequestParams) + + + --hmi side: expect the request + UIParams = self:createUIParameters(RequestParams) + + EXPECT_HMICALL("Navigation.ShowConstantTBT", UIParams) + :Do(function(_,data) + --hmi side: sending the response + self.hmiConnection:SendResponse(tostring(data.id), data.method, "SUCCESS", {}) + end) + + --mobile side: expect the response + EXPECT_RESPONSE(cid, { success = false, resultCode = "GENERIC_ERROR", info = "Invalid message received from vehicle"}) + end + ----------------------------------------------------------------------------------------- + + --3. CorrelationIDNotExisted + function Test:ReadDID_Response_CorrelationIDNotExisted() + + --mobile side: sending the request + local RequestParams = createRequest() + local cid = self.mobileSession:SendRPC("ShowConstantTBT", RequestParams) + + + --hmi side: expect the request + UIParams = self:createUIParameters(RequestParams) + + EXPECT_HMICALL("Navigation.ShowConstantTBT", UIParams) + :Do(function(_,data) + --hmi side: sending the response + self.hmiConnection:SendResponse(9999, data.method, "SUCCESS", {}) + end) + + --mobile side: expect the response + EXPECT_RESPONSE(cid, { success = false, resultCode = "GENERIC_ERROR", info = "Invalid message received from vehicle"}) + end + ----------------------------------------------------------------------------------------- + + --4. CorrelationIDNegative + function Test:ReadDID_Response_CorrelationIDNegative() + + --mobile side: sending the request + local RequestParams = createRequest() + local cid = self.mobileSession:SendRPC("ShowConstantTBT", RequestParams) + + + --hmi side: expect the request + UIParams = self:createUIParameters(RequestParams) + + EXPECT_HMICALL("Navigation.ShowConstantTBT", UIParams) + :Do(function(_,data) + --hmi side: sending the response + self.hmiConnection:SendResponse(-1, data.method, "SUCCESS", {}) + end) + + --mobile side: expect the response + EXPECT_RESPONSE(cid, { success = false, resultCode = "GENERIC_ERROR", info = "Invalid message received from vehicle"}) + end +end + +verify_correlationID_parameter() +--]] + +---------------------------------------------------------------------------------------------- +-----------------------------------------TEST BLOCK IV---------------------------------------- +------------------------------Check special cases of HMI response----------------------------- +---------------------------------------------------------------------------------------------- +--Requirement id in JAMA or JIRA: + --SDLAQ-CRS-121: ShowConstantTBT_Request_v2_0 + --SDLAQ-CRS-122: ShowConstantTBT_Response + --SDLAQ-CRS-663: SUCCESS + --SDLAQ-CRS-670: GENERIC_ERROR + +----------------------------------------------------------------------------------------------- + +--List of test cases for softButtons type parameter: + --1. InvalidJsonSyntax (SDLAQ-CRS-670: GENERIC_ERROR) + --2. InvalidStructure (SDLAQ-CRS-670: GENERIC_ERROR) + --2. DuplicatedCorrelationId (SDLAQ-CRS-663: SUCCESS) + --3. FakeParams and FakeParameterIsFromAnotherAPI (APPLINK-14765: SDL must cut off the fake parameters from requests, responses and notifications received from HMI) + --4. MissedAllPArameters (SDLAQ-CRS-670: GENERIC_ERROR) + --5. NoResponse (SDLAQ-CRS-670: GENERIC_ERROR) + --6. SeveralResponsesToOneRequest with the same and different resultCode +----------------------------------------------------------------------------------------------- + +local function SpecialResponseChecks() + +--Begin Test case NegativeResponseCheck +--Description: Check all negative response cases + + + --Print new line to separate new test cases group + commonFunctions:newTestCasesGroup("NewTestCasesGroupForNegativeResponseCheck") + + --Begin Test case NegativeResponseCheck.1 + --Description: Invalid JSON + + --Requirement id in JAMA: SDLAQ-CRS-122 + --Verification criteria: The response contains 2 mandatory parameters "success" and "resultCode", "info" is sent if there is any additional information about the resultCode. + + --[[ToDo: Check after APPLINK-14765 is resolved + + function Test:ShowConstantTBT_InvalidJsonSyntaxResponse() + + --mobile side: sending the request + local RequestParams = createRequest() + local cid = self.mobileSession:SendRPC("ShowConstantTBT", RequestParams) + + --hmi side: expect the request + local UIParams = self:createUIParameters(RequestParams) + EXPECT_HMICALL("Navigation.ShowConstantTBT", UIParams) + :Do(function(_,data) + --hmi side: sending the response + --":" is changed by ";" after {"id" + --self.hmiConnection:Send('{"id":'..tostring(data.id)..',"jsonrpc":"2.0","result":{"method":"Navigation.ShowConstantTBT", "code":0}}') + self.hmiConnection:Send('{"id";'..tostring(data.id)..',"jsonrpc":"2.0","result":{"method":"Navigation.ShowConstantTBT", "code":0}}') + end) + + --mobile side: expect the response + EXPECT_RESPONSE(cid, { success = false, resultCode = "GENERIC_ERROR", info = "Invalid message received from vehicle"}) + end + --End Test case NegativeResponseCheck.1 + + ----------------------------------------------------------------------------------------- + + --Begin Test case NegativeResponseCheck.2 + --Description: Invalid structure of response + + --Requirement id in JAMA: SDLAQ-CRS-122 + --Verification criteria: The response contains 2 mandatory parameters "success" and "resultCode", "info" is sent if there is any additional information about the resultCode + + function Test:ShowConstantTBT_InvalidStructureResponse() + + --mobile side: sending the request + local RequestParams = createRequest() + local cid = self.mobileSession:SendRPC("ShowConstantTBT", RequestParams) + + --hmi side: expect the request + local UIParams = self:createUIParameters(RequestParams) + EXPECT_HMICALL("Navigation.ShowConstantTBT", UIParams) + :Do(function(_,data) + --hmi side: sending the response + --self.hmiConnection:Send('{"id":'..tostring(data.id)..',"jsonrpc":"2.0","result":{"method":"Navigation.ShowConstantTBT", "code":0}}') + self.hmiConnection:Send('{"id":'..tostring(data.id)..',"jsonrpc":"2.0", "code":0, "result":{"method":"Navigation.ShowConstantTBT"}}') + end) + + --mobile side: expect response + EXPECT_RESPONSE(cid, { success = false, resultCode = "GENERIC_ERROR", info = "Invalid message received from vehicle"}) + end + --End Test case NegativeResponseCheck.2 +]] + + ----------------------------------------------------------------------------------------- + + --Begin Test case NegativeResponseCheck.3 + --Description: Check processing response with fake parameters + + --Verification criteria: When expected HMI function is received, send responses from HMI with fake parameter + + --Begin Test case NegativeResponseCheck.3.1 + --Description: Parameter is not from API + function Test:ShowConstantTBT_FakeParamsInResponse() + + --mobile side: sending the request + local RequestParams = createRequest() + local cid = self.mobileSession:SendRPC("ShowConstantTBT", RequestParams) + + --hmi side: expect the request + local UIParams = self:createUIParameters(RequestParams) + EXPECT_HMICALL("Navigation.ShowConstantTBT", UIParams) + :Do(function(exp,data) + --hmi side: sending the response + self.hmiConnection:SendResponse(data.id, data.method, "SUCCESS", {fake = "fake"}) + end) + + + --mobile side: expect the response + EXPECT_RESPONSE(cid, { success = true, resultCode = "SUCCESS" }) + :ValidIf (function(_,data) + if data.payload.fake then + print(" \27[36m SDL resend fake parameter to mobile app \27[0m") + return false + else + return true + end + end) + end + --End Test case NegativeResponseCheck.3.1 + + ----------------------------------------------------------------------------------------- + + --Begin Test case NegativeResponseCheck.3.2 + --Description: Parameter is not from another API + function Test:ShowConstantTBT_AnotherParameterInResponse() + --mobile side: sending the request + local RequestParams = createRequest() + local cid = self.mobileSession:SendRPC("ShowConstantTBT", RequestParams) + + --hmi side: expect the request + local UIParams = self:createUIParameters(RequestParams) + EXPECT_HMICALL("Navigation.ShowConstantTBT", UIParams) + :Do(function(exp,data) + --hmi side: sending the response + self.hmiConnection:SendResponse(data.id, data.method, "SUCCESS", {sliderPosition = 5}) + end) + + --mobile side: expect the response + EXPECT_RESPONSE(cid, { success = true, resultCode = "SUCCESS" }) + :ValidIf (function(_,data) + if data.payload.sliderPosition then + print(" \27[36m SDL resend fake parameter to mobile app \27[0m") + return false + else + return true + end + end) + end + --End Test case NegativeResponseCheck.3.2 + --End Test case NegativeResponseCheck.3 + + ----------------------------------------------------------------------------------------- + + --Begin NegativeResponseCheck.4 + --Description: Check processing response without all parameters + --[[TODO: Check after APPLINK-14765 is resolved + function Test:ShowConstantTBT_Response_MissedAllPArameters() + --mobile side: sending the request + local RequestParams = createRequest() + local cid = self.mobileSession:SendRPC("ShowConstantTBT", RequestParams) + + + --hmi side: expect the request + UIParams = self:createUIParameters(RequestParams) + + EXPECT_HMICALL("Navigation.ShowConstantTBT", UIParams) + :Do(function(_,data) + --hmi side: sending Navigation.ShowConstantTBT response + --self.hmiConnection:Send('{"id":'..tostring(data.id)..',"jsonrpc":"2.0","result":{"method":"Navigation.ShowConstantTBT", "code":0}}') + self.hmiConnection:Send('{}') + end) + + --mobile side: expect the response + EXPECT_RESPONSE(cid, { success = false, resultCode = "GENERIC_ERROR", info = "Invalid message received from vehicle"}) + end + ]] + --End NegativeResponseCheck.4 + + ----------------------------------------------------------------------------------------- + + --Begin Test case NegativeResponseCheck.5 + --Description: Request without responses from HMI + + --Requirement id in JAMA: SDLAQ-CRS-670 + --Verification criteria: GENERIC_ERROR comes as a result code in response when all other codes aren't applicable or the unknown issue occurred. + + function Test:ShowConstantTBT_NoResponse() + --mobile side: sending the request + local RequestParams = createRequest() + local cid = self.mobileSession:SendRPC("ShowConstantTBT", RequestParams) + + --hmi side: expect the request + local UIParams = self:createUIParameters(RequestParams) + EXPECT_HMICALL("Navigation.ShowConstantTBT", UIParams) + + + --mobile side: expect ShowConstantTBT response + EXPECT_RESPONSE(cid, { success = false, resultCode = "GENERIC_ERROR"}) + :Timeout(12000) + end + --End NegativeResponseCheck.5 + + ----------------------------------------------------------------------------------------- + + --Begin Test case NegativeResponseCheck.6 + --Description: Several response to one request + + --Requirement id in JAMA: SDLAQ-CRS-122 + + --Verification criteria: The response contains 2 mandatory parameters "success" and "resultCode", "info" is sent if there is any additional information about the resultCode. + + + --Begin Test case NegativeResponseCheck.6.1 + --Description: Several response to one request + function Test:ShowConstantTBT_SeveralResponsesToOneRequest() + --mobile side: sending the request + local RequestParams = createRequest() + local cid = self.mobileSession:SendRPC("ShowConstantTBT", RequestParams) + + --hmi side: expect the request + local UIParams = self:createUIParameters(RequestParams) + EXPECT_HMICALL("Navigation.ShowConstantTBT", UIParams) + :Do(function(exp,data) + --hmi side: sending the response + self.hmiConnection:SendResponse(data.id, data.method, "SUCCESS", {}) + self.hmiConnection:SendResponse(data.id, data.method, "SUCCESS", {}) + self.hmiConnection:SendResponse(data.id, data.method, "SUCCESS", {}) + end) + + --mobile side: expect response + EXPECT_RESPONSE(cid, { success = true, resultCode = "SUCCESS"}) + end + --End Test case NegativeResponseCheck.6.1 + + ----------------------------------------------------------------------------------------- + + --Begin Test case NegativeResponseCheck.6.2 + --Description: Several response to one request + function Test:ShowConstantTBT_SeveralResponsesToOneRequestWithConstractionsOfResultCode() + + --mobile side: sending the request + local RequestParams = createRequest() + local cid = self.mobileSession:SendRPC("ShowConstantTBT", RequestParams) + + --hmi side: expect the request + local UIParams = self:createUIParameters(RequestParams) + EXPECT_HMICALL("Navigation.ShowConstantTBT", UIParams) + :Do(function(exp,data) + --hmi side: sending the response + self.hmiConnection:SendResponse(data.id, data.method, "INVALID_DATA", {}) + self.hmiConnection:SendResponse(data.id, data.method, "SUCCESS", {}) + end) + + --mobile side: expect response + EXPECT_RESPONSE(cid, { success = false, resultCode = "INVALID_DATA"}) + end + --End Test case NegativeResponseCheck.6.2 + --End Test case NegativeResponseCheck.6 + + ----------------------------------------------------------------------------------------- +--[[TODO: Check if APPLINK-14765 is resolved + --Begin Test case NegativeResponseCheck.7 + --Description: Wrong response ( two contractions of result in response) with correct HMI id + + --Requirement id in JAMA: SDLAQ-CRS-122, APPLINK-14765 + + --Verification criteria: + -- The response contains 2 mandatory parameters "success" and "resultCode", "info" is sent if there is any additional information about the resultCode. + -- In case SDL cuts off fake parameters from response (request) that SDL should transfer to mobile app AND this response (request) is invalid SDL must respond GENERIC_ERROR (success:false, info: "Invalid message received from vehicle") to mobile app + function Test:ShowConstantTBT_WrongResponse() + --mobile side: sending the request + local RequestParams = createRequest() + local cid = self.mobileSession:SendRPC("ShowConstantTBT", RequestParams) + + --hmi side: expect the request + local UIParams = self:createUIParameters(RequestParams) + EXPECT_HMICALL("Navigation.ShowConstantTBT", UIParams) + :Do(function(exp,data) + --hmi side: sending the response + self.hmiConnection:Send('{"error":{"code":4,"message":"ShowConstantTBT is REJECTED"},"id":'..tostring(data.id)..',"jsonrpc":"2.0","result":{"code":0,"method":"Navigation.ShowConstantTBT"}}') + end) + + --mobile side: expect response + EXPECT_RESPONSE(cid, { success = false, resultCode = "GENERIC_ERROR"}) + end + --Begin Test case NegativeResponseCheck.7 +--]] +--End Test case NegativeResponseCheck + +end + +SpecialResponseChecks() + + +----------------------------------------------------------------------------------------------- +-------------------------------------------TEST BLOCK V---------------------------------------- +-------------------------------------Checks All Result Codes----------------------------------- +----------------------------------------------------------------------------------------------- + +--Description: Check all resultCodes + +--Requirement id in JAMA: + --SDLAQ-CRS-663: SUCCESS + --SDLAQ-CRS-664: INVALID_DATA + --SDLAQ-CRS-665: OUT_OF_MEMORY + --SDLAQ-CRS-666: TOO_MANY_PENDING_REQUESTS + --SDLAQ-CRS-670: GENERIC_ERROR + --SDLAQ-CRS-667: APPLICATION_NOT_REGISTERED + --SDLAQ-CRS-668: REJECTED + --SDLAQ-CRS-671: DISALLOWED + --SDLAQ-CRS-1033: UNSUPPORTED_RESOURCE + --SDLAQ-CRS-1037: UNSUPPORTED_REQUEST + + +local function ResultCodeChecks() + + --Print new line to separate new test cases group + commonFunctions:newTestCasesGroup("NewTestCasesGroupForResultCodeChecks") + + + --Check resultCode SUCCESS. It is checked by other test cases. + --Check resultCode INVALID_DATA. It is checked by other test cases. + --Check resultCode GENERIC_ERROR. It is covered in Test:ShowConstantTBT_NoResponse + --Check resultCode OUT_OF_MEMORY. -- Not applicable + --Check resultCode TOO_MANY_PENDING_REQUESTS. It is moved to other script. + ----------------------------------------------------------------------------------------- + + --Begin Test case ResultCodeChecks.1 + --Description: Check resultCode APPLICATION_NOT_REGISTERED + + --Requirement id in JAMA: SDLAQ-CRS-667 + --Verification criteria: SDL sends APPLICATION_NOT_REGISTERED code when the app sends a request within the same connection before RegisterAppInterface has been performed yet. + + + --Precondition + function Test:Precondition_CreationNewSession() + -- Connected expectation + self.mobileSession2 = mobile_session.MobileSession( + self, + self.mobileConnection + ) + end + + function Test:ShowConstantTBT_resultCode_APPLICATION_NOT_REGISTERED() + + --mobile side: sending the request + local RequestParams = createRequest() + local cid = self.mobileSession2:SendRPC("ShowConstantTBT", RequestParams) + + --mobile side: expect response + self.mobileSession2:ExpectResponse(cid, { success = false, resultCode = "APPLICATION_NOT_REGISTERED"}) + end + --End Test case ResultCodeChecks.1 + + ----------------------------------------------------------------------------------------- + + --Begin Test case ResultCodeChecks.2 + --Description: Check resultCode DISALLOWED + + --Requirement id in JAMA: SDLAQ-CRS-671 + --Verification criteria: + --1. SDL must return "DISALLOWED, success:false" for Alert RPC to mobile app IN CASE Alert RPC is not included to policies assigned to this mobile app. + --2. SDL must return "DISALLOWED, success:false" for Alert RPC to mobile app IN CASE Alert RPC contains softButton with SystemAction disallowed by policies assigned to this mobile app. + + --Begin Test case ResultCodeChecks.2.1 + --Description: Check resultCode DISALLOWED when HMI level is NONE + + --Covered by test case ShowConstantTBT_HMIStatus_NONE + + --End Test case ResultCodeChecks.2.1 + + ----------------------------------------------------------------------------------------- + +--[[TODO debug after resolving APPLINK-13101 + + --Begin Test case ResultCodeChecks.2.2 + --Description: Check resultCode DISALLOWED when request is not assigned to app + + function Test:Precondition_PolicyUpdate() + self:policyUpdate("PTU_OmittedShowConstantTBT", false) + end + + function Test:ShowConstantTBT_resultCode_DISALLOWED_RPCOmitted() + + --mobile side: sending the request + local RequestParams = createRequest() + local cid = self.mobileSession:SendRPC("ShowConstantTBT", RequestParams) + + --mobile side: expect response + EXPECT_RESPONSE(cid, { success = false, resultCode = "DISALLOWED"}) + end + --End Test case ResultCodeChecks.2.2 + + ----------------------------------------------------------------------------------------- + + --Begin Test case ResultCodeChecks.2.3 + --Description: Check resultCode DISALLOWED when request is assigned to app but user does not allow + + function Test:Precondition_PolicyUpdate() + self:policyUpdate("PTU_ForShowConstantTBTSoftButtonFalse", false) + end + + function Test:ShowConstantTBT_resultCode_SoftButtonDISALLOWED() + + --mobile side: sending the request + local RequestParams = createRequest() + local cid = self.mobileSession:SendRPC("ShowConstantTBT", RequestParams) + + --mobile side: expect response + EXPECT_RESPONSE(cid, { success = false, resultCode = "DISALLOWED"}) + end + + --End Test case ResultCodeChecks.2.3 + + ----------------------------------------------------------------------------------------- + + --Begin Test case ResultCodeChecks.2.4 + --Description: Check resultCode DISALLOWED when request is assigned to app, user allows but "keep_context" : false, "steal_focus" : false + + function Test:Precondition_UserAllowsFunctionGroup_Disallowed_softButtons() + --hmi side: sending SDL.OnAppPermissionConsent + self.hmiConnection:SendNotification("SDL.OnAppPermissionConsent", { appID = self.applications["Test Application"], consentedFunctions = {{ allowed = true, id = groupID, name = groupName}}, source = "GUI"}) + + EXPECT_NOTIFICATION("OnPermissionsChange") + end + + function Test:ShowConstantTBT_resultCode_DISALLOWED_systemAction_Is_KEEP_CONTEXT() + + --mobile side: send the request + local cid = self.mobileSession:SendRPC("ShowConstantTBT", + { + navigationText1 = "NavigationText1", + softButtons = + { + { + type = "TEXT", + text = "Keep", + isHighlighted = true, + softButtonID = 4, + systemAction = "KEEP_CONTEXT", + } + } + + }) + + --mobile side: expect the response + EXPECT_RESPONSE(cid, { success = false, resultCode = "DISALLOWED" }) + end + + function Test:ShowConstantTBT_resultCode_DISALLOWED_systemAction_Is_STEAL_FOCUS() + + --mobile side: send the request + local cid = self.mobileSession:SendRPC("ShowConstantTBT", + { + navigationText1 = "NavigationText1", + softButtons = + { + { + type = "TEXT", + text = "Keep", + isHighlighted = true, + softButtonID = 4, + systemAction = "STEAL_FOCUS", + } + } + }) + + --mobile side: expect the response + EXPECT_RESPONSE(cid, { success = false, resultCode = "DISALLOWED" }) + end + + --Postcondition: Update PT to allow ShowConstantTBT request + function Test:Postcondition_PolicyUpdate() + self:policyUpdate("PTU_ForShowConstantTBTSoftButtonTrue", true) + end + --End Test case ResultCodeChecks.2.4 + --]] + + --End Test case ResultCodeChecks.2 + + ----------------------------------------------------------------------------------------- + + --Begin Test case ResultCodeChecks.3 + --Description: Check resultCode UNSUPPORTED_RESOURCE + + --Requirement id in JAMA: SDLAQ-CRS-1033 + --Verification criteria: + -- When images aren't supported on HMI at all, UNSUPPORTED_RESOURCE is returned by HMI to SDL and then by SDL to mobile as a result of request. Info parameter provides additional information about the case. General request result success=true in case of no errors from other components. + -- When "STATIC" image type isn't supported on HMI, UNSUPPORTED_RESOURCE is returned by HMI to SDL and then by SDL to mobile as a result of request. Info parameter provides additional information about the case. General request result success=true in case of no errors from other components. + -- When "DYNAMIC" image type isn't supported on HMI, UNSUPPORTED_RESOURCE is returned by HMI to SDL and then by SDL to mobile as a result of request. Info parameter provides additional information about the case. General request result success=true in case of no errors from other components. + + function Test:ShowConstantTBT_resultCode_UNSUPPORTED_RESOURCE() + --mobile side: sending the request + local RequestParams = createRequest() + local cid = self.mobileSession:SendRPC("ShowConstantTBT", RequestParams) + + --hmi side: expect the request + local UIParams = self:createUIParameters(RequestParams) + EXPECT_HMICALL("Navigation.ShowConstantTBT", UIParams) + :Do(function(exp,data) + --hmi side: sending the response + self.hmiConnection:SendError(data.id, data.method, "UNSUPPORTED_RESOURCE", "HMI doesn't support STATIC, DYNAMIC or any image types which exist in request data") + end) + + --mobile side: expect response + EXPECT_RESPONSE(cid, { success = true, resultCode = "UNSUPPORTED_RESOURCE", info = "HMI doesn't support STATIC, DYNAMIC or any image types which exist in request data"}) + end + + --End Test case ResultCodeChecks.3 +end + +ResultCodeChecks() + +---------------------------------------------------------------------------------------------- +-----------------------------------------TEST BLOCK VI---------------------------------------- +-------------------------Sequence with emulating of user's action(s)-------------------------- +---------------------------------------------------------------------------------------------- + +--Description: TC's checks SDL behaviour by processing + -- different request sequence with timeout + -- with emulating of user's actions + +--Requirement id in JAMA: Mentions in each test case + +local function SequenceChecks() + + --Print new line to separate new test cases group + commonFunctions:newTestCasesGroup("NewTestCasesGroupForSequenceCheck") + + --Begin Test case SequenceChecks.1 + --Description: Check behaviour when clicked on softButton + + --Requirement id in JAMA: + --SDLAQ-CRS-934 + + --Verification criteria: + -- If supported on current HMI, DEFAULT_ACTION is applicable for ShowConstantTBT request processing. For current implementation DEFAULT_ACTION is supported on HMI. OnButtonPress/OnButtonEvent is sent if the application is subscribed to CUSTOM_BUTTON. + -- For current implementation STEAL_FOCUS and KEEP_CONTEXT are NOT supported for ShowConstantTBT on HMI. As a reaction on SoftButton press with STEAL_FOCUS or KEEP_CONTEXT SystemAction HMI makes no action except sending OnButtonPress/OnButtonEvent. + + local softButtonSystemAction = {"DEFAULT_ACTION","KEEP_CONTEXT","STEAL_FOCUS"} + for i=1, #softButtonSystemAction do + Test["ShowConstantTBT_ClickOn_SB_"..softButtonSystemAction[i]] = function(self) + local RequestParams = { + navigationText1 = "NavigationText1", + softButtons = + { + { + systemAction = softButtonSystemAction[i], + type = "BOTH", + isHighlighted = true, + text = "Text", + image = + { + imageType = "DYNAMIC", + value = "icon.png" + }, + softButtonID = 1 + } + } + } + --mobile side: sending ShowConstantTBT request + local cid = self.mobileSession:SendRPC("ShowConstantTBT", RequestParams) + + -- TODO: remove after resolving APPLINK-16052 + RequestParams.softButtons[1].image = nil + + UIParams = self:createUIParameters(RequestParams) + + --hmi side: expect Navigation.ShowConstantTBT request + EXPECT_HMICALL("Navigation.ShowConstantTBT", UIParams) + :Do(function(_,data) + --hmi side: send request to short click on softButton + self.hmiConnection:SendNotification("Buttons.OnButtonEvent", {name = "CUSTOM_BUTTON", mode = "BUTTONDOWN", customButtonID = 1, appID = self.applications["Test Application"]}) + self.hmiConnection:SendNotification("Buttons.OnButtonEvent", {name = "CUSTOM_BUTTON", mode = "BUTTONUP", customButtonID = 1, appID = self.applications["Test Application"]}) + self.hmiConnection:SendNotification("Buttons.OnButtonPress", {name = "CUSTOM_BUTTON", mode = "SHORT", customButtonID = 1, appID = self.applications["Test Application"]}) + + --hmi side: send request to long click on softButton + self.hmiConnection:SendNotification("Buttons.OnButtonEvent", {name = "CUSTOM_BUTTON", mode = "BUTTONDOWN", customButtonID = 1, appID = self.applications["Test Application"]}) + self.hmiConnection:SendNotification("Buttons.OnButtonPress", {name = "CUSTOM_BUTTON", mode = "LONG", customButtonID = 1, appID = self.applications["Test Application"]}) + self.hmiConnection:SendNotification("Buttons.OnButtonEvent", {name = "CUSTOM_BUTTON", mode = "BUTTONUP", customButtonID = 1, appID = self.applications["Test Application"]}) + + --hmi side: sending Navigation.ShowConstantTBT response + self.hmiConnection:SendResponse(data.id, data.method, "SUCCESS", {}) + end) + + --mobile side: expect ShowConstantTBT response + EXPECT_RESPONSE(cid, { success = true, resultCode = "SUCCESS" }) + + --mobile side: notifications are not sent to mobile app + EXPECT_NOTIFICATION("OnButtonEvent",{ customButtonID = 1, buttonEventMode = "BUTTONDOWN", buttonName = "CUSTOM_BUTTON"}, + { customButtonID = 1, buttonEventMode = "BUTTONUP", buttonName = "CUSTOM_BUTTON"}, + { customButtonID = 1, buttonEventMode = "BUTTONDOWN", buttonName = "CUSTOM_BUTTON"}, + { customButtonID = 1, buttonEventMode = "BUTTONUP", buttonName = "CUSTOM_BUTTON"}) + :Times(4) + + EXPECT_NOTIFICATION("OnButtonPress",{ customButtonID = 1, buttonPressMode = "SHORT", buttonName = "CUSTOM_BUTTON"}, + { customButtonID = 1, buttonPressMode = "LONG", buttonName = "CUSTOM_BUTTON"}) + :Times(2) + end + end +end + +--End Test case SequenceCheck.1 + +-------------------------------------------------------------------------------------------------------------------------------------------- + + --Begin Test case SequenceCheck.2 + --Description: Check test case TC_SoftButtons_01(SDLAQ-TC-68) + + --Requirement id in JAMA: SDLAQ-CRS-869 + + --Verification criteria: Checking short click on TEXT soft button + + function Test:SCT_TEXTSoftButtons_ShortClick() + local RequestParams = { + navigationText1 = "NavigationText", + softButtons = + { + { + systemAction = "KEEP_CONTEXT", + type = "TEXT", + isHighlighted = false, + text = "First", + softButtonID = 1 + }, + { + systemAction = "DEFAULT_ACTION", + type = "TEXT", + isHighlighted = true, + text = "Second", + softButtonID = 2 + }, + { + systemAction = "DEFAULT_ACTION", + type = "TEXT", + isHighlighted = true, + text = "Third", + image = + { + imageType = "DYNAMIC", + value = "icon.png" + }, + softButtonID = 3 + } + } + } + --mobile side: sending ShowConstantTBT request + local cid = self.mobileSession:SendRPC("ShowConstantTBT", RequestParams) + + -- TODO: remove after resolving APPLINK-16052 + RequestParams.image = nil + + UIParams = self:createUIParameters(RequestParams) + + --hmi side: expect Navigation.ShowConstantTBT request + EXPECT_HMICALL("Navigation.ShowConstantTBT", UIParams) + :Do(function(_,data) + + --hmi side: send request to short click on "Second" softButton + self.hmiConnection:SendNotification("Buttons.OnButtonEvent", {name = "CUSTOM_BUTTON", mode = "BUTTONDOWN", customButtonID = 2, appID = self.applications["Test Application"]}) + self.hmiConnection:SendNotification("Buttons.OnButtonEvent", {name = "CUSTOM_BUTTON", mode = "BUTTONUP", customButtonID = 2, appID = self.applications["Test Application"]}) + self.hmiConnection:SendNotification("Buttons.OnButtonPress", {name = "CUSTOM_BUTTON", mode = "SHORT", customButtonID = 2, appID = self.applications["Test Application"]}) + + + --hmi side: sending Navigation.ShowConstantTBT response + self.hmiConnection:SendResponse(data.id, data.method, "SUCCESS", {}) + end) + + --mobile side: expect ShowConstantTBT response + EXPECT_RESPONSE(cid, { success = true, resultCode = "SUCCESS" }) + + --mobile side: notifications are sent to mobile app + EXPECT_NOTIFICATION("OnButtonEvent",{ customButtonID = 2, buttonEventMode = "BUTTONDOWN", buttonName = "CUSTOM_BUTTON"}, + { customButtonID = 2, buttonEventMode = "BUTTONUP", buttonName = "CUSTOM_BUTTON"}) + :Times(2) + + EXPECT_NOTIFICATION("OnButtonPress",{ customButtonID = 2, buttonPressMode = "SHORT", buttonName = "CUSTOM_BUTTON"}) + :Times(1) + + end + + + --End Test case SequenceCheck.2 + ----------------------------------------------------------------------------------------- + + --Begin Test case SequenceCheck.3 + --Description: Check test case TC_SoftButtons_01(SDLAQ-TC-68) + + --Requirement id in JAMA: SDLAQ-CRS-200 + + --Verification criteria: Checking TEXT soft button reflecting on UI only if text is defined + + function Test:SCT_TEXTSoftButtonsAndTextMissing() + local RequestParams = { + navigationText1 = "NavigationText", + softButtons = + { + + { + systemAction = "DEFAULT_ACTION", + type = "TEXT", + isHighlighted = false, + image = + { + imageType = "DYNAMIC", + value = "action.png" + }, + softButtonID = 1 + } + } + } + --mobile side: sending ShowConstantTBT request + local cid = self.mobileSession:SendRPC("ShowConstantTBT", RequestParams) + + -- TODO: remove after resolving APPLINK-16052 + RequestParams.image = nil + + UIParams = self:createUIParameters(RequestParams) + + --hmi side: expect Navigation.ShowConstantTBT request + EXPECT_HMICALL("Navigation.ShowConstantTBT", UIParams) + :Times(0) + + --mobile side: expect ShowConstantTBT response + EXPECT_RESPONSE(cid, { success = false, resultCode = "INVALID_DATA" }) + + + end + + + + --End Test case SequenceCheck.3 + ----------------------------------------------------------------------------------------- + + --Begin Test case SequenceCheck.4 + --Description: Check test case TC_SoftButtons_01(SDLAQ-TC-68) + + --Requirement id in JAMA: SDLAQ-CRS-870 + + --Verification criteria: Checking long click on TEXT soft button + + function Test:SCT_TEXTSoftButtons_LongClick() + local RequestParams = { + navigationText1 = "NavigationText", + softButtons = + { + { + systemAction = "KEEP_CONTEXT", + type = "TEXT", + isHighlighted = false, + text = "First", + softButtonID = 1 + }, + { + systemAction = "STEAL_FOCUS", + type = "TEXT", + isHighlighted = true, + text = "Second", + softButtonID = 2 + }, + { + systemAction = "DEFAULT_ACTION", + type = "TEXT", + isHighlighted = true, + text = "Third", + softButtonID = 3 + } + } + } + --mobile side: sending ShowConstantTBT request + local cid = self.mobileSession:SendRPC("ShowConstantTBT", RequestParams) + + -- TODO: remove after resolving APPLINK-16052 + RequestParams.image = nil + + UIParams = self:createUIParameters(RequestParams) + + --hmi side: expect Navigation.ShowConstantTBT request + EXPECT_HMICALL("Navigation.ShowConstantTBT", UIParams) + :Do(function(_,data) + + --hmi side: send request to long click on "Third" softButton + self.hmiConnection:SendNotification("Buttons.OnButtonEvent", {name = "CUSTOM_BUTTON", mode = "BUTTONDOWN", customButtonID = 3, appID = self.applications["Test Application"]}) + self.hmiConnection:SendNotification("Buttons.OnButtonEvent", {name = "CUSTOM_BUTTON", mode = "BUTTONUP", customButtonID = 3, appID = self.applications["Test Application"]}) + self.hmiConnection:SendNotification("Buttons.OnButtonPress", {name = "CUSTOM_BUTTON", mode = "LONG", customButtonID = 3, appID = self.applications["Test Application"]}) + + + --hmi side: sending Navigation.ShowConstantTBT response + self.hmiConnection:SendResponse(data.id, data.method, "SUCCESS", {}) + end) + + --mobile side: expect ShowConstantTBT response + EXPECT_RESPONSE(cid, { success = true, resultCode = "SUCCESS" }) + + --mobile side: notifications are sent to mobile app + EXPECT_NOTIFICATION("OnButtonEvent",{ customButtonID = 3, buttonEventMode = "BUTTONDOWN", buttonName = "CUSTOM_BUTTON"}, + { customButtonID = 3, buttonEventMode = "BUTTONUP", buttonName = "CUSTOM_BUTTON"}) + :Times(2) + + EXPECT_NOTIFICATION("OnButtonPress",{ customButtonID = 3, buttonPressMode = "LONG", buttonName = "CUSTOM_BUTTON"}) + :Times(1) + + end + + + --End Test case SequenceCheck.4 + ------------------------------------------------------------------------------------------- + + --Begin Test case SequenceCheck.5 + --Description: Check test case TC_SoftButtons_01(SDLAQ-TC-68) + + --Requirement id in JAMA: SDLAQ-CRS-200 + + --Verification criteria: Checking TEXT soft button reflecting on UI only if text is defined + + function Test:SCT_TEXTSoftButtonsAndTextWithWhiteSpaces() + local RequestParams = { + navigationText1 = "NavigationText", + softButtons = + { + + { + systemAction = "DEFAULT_ACTION", + type = "TEXT", + text = " ", + isHighlighted = false, + image = + { + imageType = "DYNAMIC", + value = "action.png" + }, + softButtonID = 1 + } + } + } + --mobile side: sending ShowConstantTBT request + local cid = self.mobileSession:SendRPC("ShowConstantTBT", RequestParams) + + -- TODO: remove after resolving APPLINK-16052 + RequestParams.image = nil + + UIParams = self:createUIParameters(RequestParams) + + --hmi side: expect Navigation.ShowConstantTBT request + EXPECT_HMICALL("Navigation.ShowConstantTBT", UIParams) + :Times(0) + + --mobile side: expect ShowConstantTBT response + EXPECT_RESPONSE(cid, { success = false, resultCode = "INVALID_DATA" }) + + + end + + + --End Test case SequenceCheck.5 + ----------------------------------------------------------------------------------------- + + --Begin Test case SequenceCheck.6 + --Description: Check test case TC_SoftButtons_02(SDLAQ-TC-75) + --Info: This TC will be failing till resolving APPLINK-16052 + + --Requirement id in JAMA: SDLAQ-CRS-869 + + --Verification criteria: Checking short click on IMAGE soft button + + + function Test:SCT_IMAGESoftButtons_ShortClick() + local RequestParams = { + navigationText1 = "NavigationText", + softButtons = + { + { + systemAction = "KEEP_CONTEXT", + type = "IMAGE", + isHighlighted = true, + image = + { + imageType = "DYNAMIC", + value = "icon.png" + }, + softButtonID = 1 + }, + { + systemAction = "DEFAULT_ACTION", + type = "IMAGE", + isHighlighted = true, + text = "Second", + image = + { + imageType = "DYNAMIC", + value = "action.png" + }, + softButtonID = 2 + } + } + } + --mobile side: sending ShowConstantTBT request + local cid = self.mobileSession:SendRPC("ShowConstantTBT", RequestParams) + + UIParams = self:createUIParameters(RequestParams) + + --hmi side: expect Navigation.ShowConstantTBT request + EXPECT_HMICALL("Navigation.ShowConstantTBT", UIParams) + :Do(function(_,data) + + --hmi side: send request to short click on "Action.png" softButton + self.hmiConnection:SendNotification("Buttons.OnButtonEvent", {name = "CUSTOM_BUTTON", mode = "BUTTONDOWN", customButtonID = 2, appID = self.applications["Test Application"]}) + self.hmiConnection:SendNotification("Buttons.OnButtonEvent", {name = "CUSTOM_BUTTON", mode = "BUTTONUP", customButtonID = 2, appID = self.applications["Test Application"]}) + self.hmiConnection:SendNotification("Buttons.OnButtonPress", {name = "CUSTOM_BUTTON", mode = "SHORT", customButtonID = 2, appID = self.applications["Test Application"]}) + + + --hmi side: sending Navigation.ShowConstantTBT response + self.hmiConnection:SendResponse(data.id, data.method, "SUCCESS", {}) + end) + + --mobile side: expect ShowConstantTBT response + EXPECT_RESPONSE(cid, { success = true, resultCode = "SUCCESS" }) + + --mobile side: notifications are sent to mobile app + EXPECT_NOTIFICATION("OnButtonEvent",{ customButtonID = 2, buttonEventMode = "BUTTONDOWN", buttonName = "CUSTOM_BUTTON"}, + { customButtonID = 2, buttonEventMode = "BUTTONUP", buttonName = "CUSTOM_BUTTON"}) + :Times(2) + + EXPECT_NOTIFICATION("OnButtonPress",{ customButtonID = 2, buttonPressMode = "SHORT", buttonName = "CUSTOM_BUTTON"}) + :Times(1) + + end + + + --End Test case SequenceCheck.6 + ----------------------------------------------------------------------------------------- + + --Begin Test case SequenceCheck.7 + --Description: Check test case TC_SoftButtons_02(SDLAQ-TC-75) + --Info: This TC will be failing till resolving APPLINK-16052 + + --Requirement id in JAMA: SDLAQ-CRS-200 + + --Verification criteria: Checking IMAGE soft button reflecting on UI only if image is defined + + function Test:SCT_IMAGESoftButtonsAndImageNotExist() + local RequestParams = { + navigationText1 = "NavigationText", + softButtons = + { + + { + systemAction = "KEEP_CONTEXT", + type = "IMAGE", + text = "First", + isHighlighted = false, + softButtonID = 1 + }, + { + systemAction = "KEEP_CONTEXT", + type = "IMAGE", + isHighlighted = true, + image = + { + imageType = "DYNAMIC", + value = "aaa" --such image doesn't exist + }, + softButtonID = 1 + }, + } + } + --mobile side: sending ShowConstantTBT request + local cid = self.mobileSession:SendRPC("ShowConstantTBT", RequestParams) + + UIParams = self:createUIParameters(RequestParams) + + --hmi side: expect Navigation.ShowConstantTBT request + EXPECT_HMICALL("Navigation.ShowConstantTBT", UIParams) + :Times(0) + + --mobile side: expect ShowConstantTBT response + EXPECT_RESPONSE(cid, { success = false, resultCode = "INVALID_DATA" }) + + + end + + + --End Test case SequenceCheck.7 + ---------------------------------------------------------------------------------------------- + + --Begin Test case SequenceCheck.8 + --Description: Check test case TC_SoftButtons_02(SDLAQ-TC-75) + --Info: This TC will be failing till resolving APPLINK-16052 + + --Requirement id in JAMA: SDLAQ-CRS-870 + + --Verification criteria: Checking long click on IMAGE soft button + + function Test:SCT_IMAGESoftButtons_LongClick() + local RequestParams = { + navigationText1 = "NavigationText", + softButtons = + { + { + systemAction = "KEEP_CONTEXT", + type = "IMAGE", + isHighlighted = true, + image = + { + imageType = "DYNAMIC", + value = "icon.png" + }, + softButtonID = 1 + }, + { + systemAction = "DEFAULT_ACTION", + type = "IMAGE", + isHighlighted = false, + image = + { + imageType = "DYNAMIC", + value = "action.png" + }, + softButtonID = 2 + } + } + } + --mobile side: sending ShowConstantTBT request + local cid = self.mobileSession:SendRPC("ShowConstantTBT", RequestParams) + + UIParams = self:createUIParameters(RequestParams) + + --hmi side: expect Navigation.ShowConstantTBT request + EXPECT_HMICALL("Navigation.ShowConstantTBT", UIParams) + :Do(function(_,data) + + --hmi side: send request to long click on "Action.png" softButton + self.hmiConnection:SendNotification("Buttons.OnButtonEvent", {name = "CUSTOM_BUTTON", mode = "BUTTONDOWN", customButtonID = 2, appID = self.applications["Test Application"]}) + self.hmiConnection:SendNotification("Buttons.OnButtonEvent", {name = "CUSTOM_BUTTON", mode = "BUTTONUP", customButtonID = 2, appID = self.applications["Test Application"]}) + self.hmiConnection:SendNotification("Buttons.OnButtonPress", {name = "CUSTOM_BUTTON", mode = "LONG", customButtonID = 2, appID = self.applications["Test Application"]}) + + + --hmi side: sending Navigation.ShowConstantTBT response + self.hmiConnection:SendResponse(data.id, data.method, "SUCCESS", {}) + end) + + --mobile side: expect ShowConstantTBT response + EXPECT_RESPONSE(cid, { success = true, resultCode = "SUCCESS" }) + + --mobile side: notifications are sent to mobile app + EXPECT_NOTIFICATION("OnButtonEvent",{ customButtonID = 2, buttonEventMode = "BUTTONDOWN", buttonName = "CUSTOM_BUTTON"}, + { customButtonID = 2, buttonEventMode = "BUTTONUP", buttonName = "CUSTOM_BUTTON"}) + :Times(2) + + EXPECT_NOTIFICATION("OnButtonPress",{ customButtonID = 2, buttonPressMode = "LONG", buttonName = "CUSTOM_BUTTON"}) + :Times(1) + + end + + + + --End Test case SequenceCheck.8 + + ----------------------------------------------------------------------------------------- + --Begin Test case SequenceCheck.9 + --Description: Check test case TC_SoftButtons_03(SDLAQ-TC-156) + --Info: This TC will be failing till resolving APPLINK-16052 + + --Requirement id in JAMA: SDLAQ-CRS-869 + + --Verification criteria: Checking short click on BOTH soft button + + function Test:SCT_BOTHSoftButtons_ShortClick() + local RequestParams = { + navigationText1 = "NavigationText", + softButtons = + { + { + systemAction = "DEFAULT_ACTION", + type = "BOTH", + isHighlighted = false, + text = "First", + image = + { + imageType = "DYNAMIC", + value = "icon.png" + }, + softButtonID = 1 + }, + { + systemAction = "KEEP_CONTEXT", + type = "BOTH", + text = "Second", + isHighlighted = true, + image = + { + imageType = "DYNAMIC", + value = "icon.png" + }, + softButtonID = 2 + }, + { + systemAction = "DEFAULT_ACTION", + type = "BOTH", + text = "Third", + isHighlighted = true, + image = + { + imageType = "DYNAMIC", + value = "action.png" + }, + softButtonID = 3 + } + } + } + --mobile side: sending ShowConstantTBT request + local cid = self.mobileSession:SendRPC("ShowConstantTBT", RequestParams) + + UIParams = self:createUIParameters(RequestParams) + + --hmi side: expect Navigation.ShowConstantTBT request + EXPECT_HMICALL("Navigation.ShowConstantTBT", UIParams) + :Do(function(_,data) + + --hmi side: send request to short click on "Action.png" softButton + self.hmiConnection:SendNotification("Buttons.OnButtonEvent", {name = "CUSTOM_BUTTON", mode = "BUTTONDOWN", customButtonID = 3, appID = self.applications["Test Application"]}) + self.hmiConnection:SendNotification("Buttons.OnButtonEvent", {name = "CUSTOM_BUTTON", mode = "BUTTONUP", customButtonID = 3, appID = self.applications["Test Application"]}) + self.hmiConnection:SendNotification("Buttons.OnButtonPress", {name = "CUSTOM_BUTTON", mode = "SHORT", customButtonID = 3, appID = self.applications["Test Application"]}) + + + --hmi side: sending Navigation.ShowConstantTBT response + self.hmiConnection:SendResponse(data.id, data.method, "SUCCESS", {}) + end) + + --mobile side: expect ShowConstantTBT response + EXPECT_RESPONSE(cid, { success = true, resultCode = "SUCCESS" }) + + --mobile side: notifications are sent to mobile app + EXPECT_NOTIFICATION("OnButtonEvent",{ customButtonID = 3, buttonEventMode = "BUTTONDOWN", buttonName = "CUSTOM_BUTTON"}, + { customButtonID = 3, buttonEventMode = "BUTTONUP", buttonName = "CUSTOM_BUTTON"}) + :Times(2) + + EXPECT_NOTIFICATION("OnButtonPress",{ customButtonID = 3, buttonPressMode = "SHORT", buttonName = "CUSTOM_BUTTON"}) + :Times(1) + + end + + --End Test case SequenceCheck.9 + ----------------------------------------------------------------------------------------- + + --Begin Test case SequenceCheck.10 + --Description: Check test case TC_SoftButtons_03(SDLAQ-TC-156) + + --Requirement id in JAMA: SDLAQ-CRS-200 + + --Verification criteria: Checking BOTH soft button reflecting on UI only if image and text are defined + + function Test:SCT_BOTHSoftButtonsAndTextEmpty() + local RequestParams = { + navigationText1 = "NavigationText", + softButtons = + { + + { + systemAction = "DEFAULT_ACTION", + type = "BOTH", + isHighlighted = false, + text = "", + image = + { + imageType = "DYNAMIC", + value = "icon.png" + }, + softButtonID = 1 + }, + } + } + --mobile side: sending ShowConstantTBT request + local cid = self.mobileSession:SendRPC("ShowConstantTBT", RequestParams) + + UIParams = self:createUIParameters(RequestParams) + + --hmi side: expect Navigation.ShowConstantTBT request + EXPECT_HMICALL("Navigation.ShowConstantTBT", UIParams) + :Times(0) + + --mobile side: expect ShowConstantTBT response + EXPECT_RESPONSE(cid, { success = false, resultCode = "INVALID_DATA" }) + + + end + + --End Test case SequenceCheck.10 + ---------------------------------------------------------------------------------------------- + + --Begin Test case SequenceCheck.11 + --Description: Check test case TC_SoftButtons_03(SDLAQ-TC-156) + --Info: This TC will be failing till resolving APPLINK-16052 + + --Requirement id in JAMA: SDLAQ-CRS-2912 + + --Verification criteria: Check that On.ButtonEvent(CUSTOM_BUTTON) notification is not transferred from HMI to mobile app by SDL if CUSTOM_BUTTON is not subscribed + + + function Test:UnsubscribeButton_CUSTOM_BUTTON_SUCCESS() + + --mobile side: send UnsubscribeButton request + local cid = self.mobileSession:SendRPC("UnsubscribeButton", + { + buttonName = "CUSTOM_BUTTON" + }) + + --hmi side: expect OnButtonSubscription notification + EXPECT_HMINOTIFICATION("Buttons.OnButtonSubscription", {name = "CUSTOM_BUTTON", isSubscribed = false}) + :Timeout(5000) + + -- Mobile side: expects SubscribeButton response + -- Mobile side: expects EXPECT_NOTIFICATION("OnHashChange") if SUCCESS + EXPECT_RESPONSE(cid, { success = true, resultCode = "SUCCESS"}) + --:Timeout(13000) + + end + + function Test:SCT_BOTHSoftButtons_AfterUnsubscribe() + local RequestParams = { + navigationText1 = "NavigationText", + softButtons = + { + { + systemAction = "DEFAULT_ACTION", + type = "BOTH", + isHighlighted = true, + text = "First", + image = + { + imageType = "DYNAMIC", + value = "action.png" + }, + softButtonID = 1 + } + } + } + --mobile side: sending ShowConstantTBT request + local cid = self.mobileSession:SendRPC("ShowConstantTBT", RequestParams) + + UIParams = self:createUIParameters(RequestParams) + + --hmi side: expect Navigation.ShowConstantTBT request + EXPECT_HMICALL("Navigation.ShowConstantTBT", UIParams) + :Do(function(_,data) + + --hmi side: send request to short click on "First" softButton + self.hmiConnection:SendNotification("Buttons.OnButtonEvent", {name = "CUSTOM_BUTTON", mode = "BUTTONDOWN", customButtonID = 1, appID = self.applications["Test Application"]}) + self.hmiConnection:SendNotification("Buttons.OnButtonEvent", {name = "CUSTOM_BUTTON", mode = "BUTTONUP", customButtonID = 1, appID = self.applications["Test Application"]}) + self.hmiConnection:SendNotification("Buttons.OnButtonPress", {name = "CUSTOM_BUTTON", mode = "SHORT", customButtonID = 1, appID = self.applications["Test Application"]}) + + + --hmi side: sending Navigation.ShowConstantTBT response + self.hmiConnection:SendResponse(data.id, data.method, "SUCCESS", {}) + end) + + --mobile side: expect ShowConstantTBT response + EXPECT_RESPONSE(cid, { success = true, resultCode = "SUCCESS" }) + + --mobile side: notifications are sent to mobile app + EXPECT_NOTIFICATION("OnButtonEvent",{ customButtonID = 1, buttonEventMode = "BUTTONDOWN", buttonName = "CUSTOM_BUTTON"}, + { customButtonID = 1, buttonEventMode = "BUTTONUP", buttonName = "CUSTOM_BUTTON"}) + :Times(0) + + EXPECT_NOTIFICATION("OnButtonPress",{ customButtonID = 1, buttonPressMode = "SHORT", buttonName = "CUSTOM_BUTTON"}) + :Times(0) + + end + + --End Test case SequenceCheck.11 + + ---------------------------------------------------------------------------------------------- + + --Begin Test case SequenceCheck.12 + --Description: Check test case TC_SoftButtons_03(SDLAQ-TC-156) + + --Requirement id in JAMA: SDLAQ-CRS-200 + + --Verification criteria: Checking BOTH soft button reflecting on UI only if image and text are defined + + + function Test:SCT_BOTHSoftButtonsAndNoImage() + local RequestParams = { + navigationText1 = "NavigationText", + softButtons = + { + + { + systemAction = "DEFAULT_ACTION", + type = "BOTH", + isHighlighted = false, + text = "First", + softButtonID = 1 + }, + } + } + --mobile side: sending ShowConstantTBT request + local cid = self.mobileSession:SendRPC("ShowConstantTBT", RequestParams) + + UIParams = self:createUIParameters(RequestParams) + + --hmi side: expect Navigation.ShowConstantTBT request + EXPECT_HMICALL("Navigation.ShowConstantTBT", UIParams) + :Times(0) + + --mobile side: expect ShowConstantTBT response + EXPECT_RESPONSE(cid, { success = false, resultCode = "INVALID_DATA" }) + + + end + + + --End Test case SequenceCheck.12 + +----------------------------------------------------------------------------------------------- + + --Begin Test case SequenceCheck.13 + --Description: Check test case TC_SoftButtons_04(SDLAQ-TC-157) + --Info: This TC will be failing till resolving APPLINK-16052 + + --Requirement id in JAMA: SDLAQ-CRS-870 + + --Verification criteria: Checking long click on BOTH soft button + + function Test:SCT_BOTHSoftButtons_LongClick() + + local RequestParams = { + navigationText1 = "NavigationText", + softButtons = + { + { + type = "BOTH", + isHighlighted = true, + text = "First", + image = + { + imageType = "DYNAMIC", + value = "icon.png" + }, + softButtonID = 1 + } + } + } + --mobile side: sending ShowConstantTBT request + local cid = self.mobileSession:SendRPC("ShowConstantTBT", RequestParams) + + UIParams = self:createUIParameters(RequestParams) + + --hmi side: expect Navigation.ShowConstantTBT request + EXPECT_HMICALL("Navigation.ShowConstantTBT", UIParams) + :Do(function(_,data) + + --hmi side: send request to long click on "First" softButton + self.hmiConnection:SendNotification("Buttons.OnButtonEvent", {name = "CUSTOM_BUTTON", mode = "BUTTONDOWN", customButtonID = 1, appID = self.applications["Test Application"]}) + self.hmiConnection:SendNotification("Buttons.OnButtonEvent", {name = "CUSTOM_BUTTON", mode = "BUTTONUP", customButtonID = 1, appID = self.applications["Test Application"]}) + self.hmiConnection:SendNotification("Buttons.OnButtonPress", {name = "CUSTOM_BUTTON", mode = "LONG", customButtonID = 1, appID = self.applications["Test Application"]}) + + + --hmi side: sending Navigation.ShowConstantTBT response + self.hmiConnection:SendResponse(data.id, data.method, "SUCCESS", {}) + end) + + --mobile side: expect ShowConstantTBT response + EXPECT_RESPONSE(cid, { success = true, resultCode = "SUCCESS" }) + + --mobile side: notifications are sent to mobile app + EXPECT_NOTIFICATION("OnButtonEvent",{ customButtonID = 1, buttonEventMode = "BUTTONDOWN", buttonName = "CUSTOM_BUTTON"}, + { customButtonID = 1, buttonEventMode = "BUTTONUP", buttonName = "CUSTOM_BUTTON"}) + :Times(2) + + EXPECT_NOTIFICATION("OnButtonPress",{ customButtonID = 1, buttonPressMode = "LONG", buttonName = "CUSTOM_BUTTON"}) + :Times(1) + + end + + --End Test case SequenceCheck.13 + + + --Begin Test case SequenceCheck.14 + --Description: Check test case TC_SoftButtons_01(SDLAQ-TC-68) + + --Requirement id in JAMA: SDLAQ-CRS-200 + + --Verification criteria: Checking TEXT soft button reflecting on UI only if text is defined + + function Test:SCT_TEXTSoftButtonsAndTextEmpty() + local RequestParams = { + navigationText1 = "NavigationText", + softButtons = + { + + { + systemAction = "DEFAULT_ACTION", + type = "TEXT", + text = "", + isHighlighted = false, + image = + { + imageType = "DYNAMIC", + value = "action.png" + }, + softButtonID = 1 + } + } + } + --mobile side: sending ShowConstantTBT request + local cid = self.mobileSession:SendRPC("ShowConstantTBT", RequestParams) + + -- TODO: remove after resolving APPLINK-16052 + RequestParams.image = nil + + UIParams = self:createUIParameters(RequestParams) + + --hmi side: expect Navigation.ShowConstantTBT request + EXPECT_HMICALL("Navigation.ShowConstantTBT", UIParams) + :Times(0) + + --mobile side: expect ShowConstantTBT response + EXPECT_RESPONSE(cid, { success = false, resultCode = "INVALID_DATA" }) + + + end + + + --End Test case SequenceCheck.14 + + ----------------------------------------------------------------------------------------- + + --Begin Test case SequenceCheck.15 + --Description: Check test case TC_SoftButtons_02(SDLAQ-TC-75) + --Info: This TC will be failing till resolving APPLINK-16052 + + --Requirement id in JAMA: SDLAQ-CRS-200 + + --Verification criteria: Checking IMAGE soft button reflecting on UI only if image is defined + + function Test:SCT_IMAGESoftButtonsAndImageNotDefined() + local RequestParams = { + navigationText1 = "NavigationText", + softButtons = + { + { + systemAction = "KEEP_CONTEXT", + type = "IMAGE", + isHighlighted = true, + softButtonID = 1 + }, + } + } + --mobile side: sending ShowConstantTBT request + local cid = self.mobileSession:SendRPC("ShowConstantTBT", RequestParams) + + UIParams = self:createUIParameters(RequestParams) + + --hmi side: expect Navigation.ShowConstantTBT request + EXPECT_HMICALL("Navigation.ShowConstantTBT", UIParams) + :Times(0) + + --mobile side: expect ShowConstantTBT response + EXPECT_RESPONSE(cid, { success = false, resultCode = "INVALID_DATA" }) + + + end + + --End Test case SequenceCheck.15 + + --Begin Test case SequenceCheck.16 + --Description: Check test case TC_SoftButtons_03(SDLAQ-TC-156) + + --Requirement id in JAMA: SDLAQ-CRS-200 + + --Verification criteria: Checking BOTH soft button reflecting on UI only if image and text are defined + + + function Test:SCT_BOTHSoftButtonTextNotDefined() + local RequestParams = { + navigationText1 = "NavigationText", + softButtons = + { + + { + systemAction = "DEFAULT_ACTION", + type = "BOTH", + isHighlighted = false, + image = + { + imageType = "DYNAMIC", + value = "action.png" + }, + softButtonID = 1 + }, + } + } + --mobile side: sending ShowConstantTBT request + local cid = self.mobileSession:SendRPC("ShowConstantTBT", RequestParams) + + UIParams = self:createUIParameters(RequestParams) + + --hmi side: expect Navigation.ShowConstantTBT request + EXPECT_HMICALL("Navigation.ShowConstantTBT", UIParams) + :Times(0) + + --mobile side: expect ShowConstantTBT response + EXPECT_RESPONSE(cid, { success = false, resultCode = "INVALID_DATA" }) + + + end + + --End Test case SequenceCheck.16 + + + --Begin Test case SequenceCheck.17 + --Description: Check test case TC_SoftButtons_03(SDLAQ-TC-156) + + --Requirement id in JAMA: SDLAQ-CRS-200 + + --Verification criteria: Checking BOTH soft button reflecting on UI only if image and text are defined + + + function Test:SCT_BOTHSoftButtonImageAndTextNotDefined() + local RequestParams = { + navigationText1 = "NavigationText", + softButtons = + { + + { + systemAction = "DEFAULT_ACTION", + type = "BOTH", + isHighlighted = false, + softButtonID = 1 + }, + } + } + --mobile side: sending ShowConstantTBT request + local cid = self.mobileSession:SendRPC("ShowConstantTBT", RequestParams) + + UIParams = self:createUIParameters(RequestParams) + + --hmi side: expect Navigation.ShowConstantTBT request + EXPECT_HMICALL("Navigation.ShowConstantTBT", UIParams) + :Times(0) + + --mobile side: expect ShowConstantTBT response + EXPECT_RESPONSE(cid, { success = false, resultCode = "INVALID_DATA" }) + + + end + + --End Test case SequenceCheck.17 + +SequenceChecks() + + +---------------------------------------------------------------------------------------------- +-----------------------------------------TEST BLOCK VII--------------------------------------- +--------------------------------------Different HMIStatus------------------------------------- +---------------------------------------------------------------------------------------------- + +--Description: Check different HMIStatus + +--Requirement id in JAMA: + --SDLAQ-CRS-805: HMI Status Requirement for ShowConstantTBT + --Verification criteria: ShowConstantTBT request is allowed in FULL, LIMITED, BACKGROUND HMI level + +local function DifferentHMIlevelChecks() + + --Print new line to separate new test cases group + commonFunctions:newTestCasesGroup("NewTestCasesGroupForSequenceChecks") + ----------------------------------------------------------------------------------------- + + --Begin Test case DifferentHMIlevelChecks.1 + --Description: Check request is disallowed in NONE HMI level + commonSteps:DeactivateAppToNoneHmiLevel() + + function Test:ShowConstantTBT_HMIStatus_NONE() + + --mobile side: sending the request + local RequestParams = createRequest() + local cid = self.mobileSession:SendRPC("ShowConstantTBT", RequestParams) + + --mobile side: expect response + EXPECT_RESPONSE(cid, { success = false, resultCode = "DISALLOWED"}) + end + + --Postcondition: Activate app + commonSteps:ActivationApp(self) + + --End Test case DifferentHMIlevelChecks.1 + ----------------------------------------------------------------------------------------- + + --Begin Test case DifferentHMIlevelChecks.2 + --Description: Check HMI level Full + + --It is covered by above test cases + + --End Test case DifferentHMIlevelChecks.2 + ----------------------------------------------------------------------------------------- + + --Begin Test case DifferentHMIlevelChecks.3 + --Description: Check HMI level LIMITED + if + Test.isMediaApplication == true or + appHMITypes["NAVIGATION"] == true then + + --Precondition: Deactivate app to LIMITED HMI level + commonSteps:ChangeHMIToLimited(self) + + function Test:ShowConstantTBT_HMIStatus_LIMITED() + local RequestParams = createRequest() + self:verify_SUCCESS_Case(RequestParams) + end + + --End Test case DifferentHMIlevelChecks.3 + + -- Precondition 1: Opening new session + function Test:AddNewSession() + -- Connected expectation + self.mobileSession2 = mobile_session.MobileSession( + self, + self.mobileConnection) + + self.mobileSession2:StartService(7) + end + + -- Precondition 2: Register app2 + function Test:RegisterAppInterface_App2() + + --mobile side: RegisterAppInterface request + local CorIdRAI = self.mobileSession2:SendRPC("RegisterAppInterface", + { + syncMsgVersion = + { + majorVersion = 2, + minorVersion = 2, + }, + appName ="SPT2", + isMediaApplication = true, + languageDesired ="EN-US", + hmiDisplayLanguageDesired ="EN-US", + appID ="2", + ttsName = + { + { + text ="SyncProxyTester2", + type ="TEXT", + }, + }, + vrSynonyms = + { + "vrSPT2", + } + }) + + --hmi side: expect BasicCommunication.OnAppRegistered request + EXPECT_HMINOTIFICATION("BasicCommunication.OnAppRegistered", + { + application = + { + appName = "SPT2" + } + }) + :Do(function(_,data) + appId2 = data.params.application.appID + end) + + --mobile side: RegisterAppInterface response + self.mobileSession2:ExpectResponse(CorIdRAI, { success = true, resultCode = "SUCCESS"}) + :Timeout(2000) + + self.mobileSession2:ExpectNotification("OnHMIStatus", {hmiLevel = "NONE", audioStreamingState = "NOT_AUDIBLE", systemContext = "MAIN"}) + end + + -- Precondition 3: Activate an other media app to change app to BACKGROUND + function Test:Activate_Media_App2() + --HMI send ActivateApp request + local RequestId = self.hmiConnection:SendRequest("SDL.ActivateApp", { appID = appId2}) + EXPECT_HMIRESPONSE(RequestId) + :Do(function(_,data) + + if data.result.isSDLAllowed ~= true then + local RequestId = self.hmiConnection:SendRequest("SDL.GetUserFriendlyMessage", {language = "EN-US", messageCodes = {"DataConsent"}}) + EXPECT_HMIRESPONSE(RequestId,{result = {code = 0, method = "SDL.GetUserFriendlyMessage"}}) + :Do(function(_,data) + --hmi side: send request SDL.OnAllowSDLFunctionality + self.hmiConnection:SendNotification("SDL.OnAllowSDLFunctionality", {allowed = true, source = "GUI", device = {id = 1, name = "127.0.0.1"}}) + end) + + EXPECT_HMICALL("BasicCommunication.ActivateApp") + :Do(function(_,data) + self.hmiConnection:SendResponse(data.id,"BasicCommunication.ActivateApp", "SUCCESS", {}) + end) + :Times(2) + end + end) + + self.mobileSession2:ExpectNotification("OnHMIStatus", {hmiLevel = "FULL", audioStreamingState = "AUDIBLE", systemContext = "MAIN"}) + :Timeout(12000) + + self.mobileSession:ExpectNotification("OnHMIStatus", {hmiLevel = "BACKGROUND", audioStreamingState = "NOT_AUDIBLE", systemContext = "MAIN"}) + + end + + + elseif Test.isMediaApplication == false then + --Precondition: Deactivate app to BACKGOUND HMI level + commonSteps:DeactivateToBackground(self) + end + + ----------------------------------------------------------------------------------------- + + --Begin Test case DifferentHMIlevelChecks.4 + --Description: Check HMI level BACKGOUND + function Test:ShowConstantTBT_HMIStatus_BACKGOUND() + local RequestParams = createRequest() + self:verify_SUCCESS_Case(RequestParams) + end + --End Test case DifferentHMIlevelChecks.4 +end + +DifferentHMIlevelChecks() + +--------------------------------------------------------------------------------------------- +-------------------------------------------Postcondition------------------------------------- +--------------------------------------------------------------------------------------------- + + --Print new line to separate Postconditions + commonFunctions:newTestCasesGroup("Postconditions") + + + --Restore sdl_preloaded_pt.json + policyTable:Restore_preloaded_pt() + + + + return Test diff --git a/test_scripts/ATF_Slider.lua b/test_scripts/API/ATF_Slider.lua similarity index 91% rename from test_scripts/ATF_Slider.lua rename to test_scripts/API/ATF_Slider.lua index 1e15772bc8..5f8c0454cb 100644 --- a/test_scripts/ATF_Slider.lua +++ b/test_scripts/API/ATF_Slider.lua @@ -21,8 +21,7 @@ local arrayStringParameter = require('user_modules/shared_testcases/testCasesFor local integerParameterInResponse = require('user_modules/shared_testcases/testCasesForIntegerParameterInResponse') require('user_modules/AppTypes') -config.deviceMAC = "12ca17b49af2289436f303e0166030a21e525d266e209267433801a8fd4071a0" - + --------------------------------------------------------------------------------------------- ------------------------------------ Common Variables --------------------------------------- --------------------------------------------------------------------------------------------- @@ -58,11 +57,11 @@ function Test:expectOnHMIStatusWithAudioStateChanged(HMILevel, timeout, times) --valid values for times parameter: --nil => times = 2 --4: for duplicate request - + if HMILevel == nil then HMILevel = "FULL" end if timeout == nil then timeout = 10000 end if times == nil then times = 2 end - + --mobile side: OnHMIStatus notification EXPECT_NOTIFICATION("OnHMIStatus", @@ -82,34 +81,34 @@ function Test:createRequest() position = 1, sliderHeader ="sliderHeader" } - + end --Create UI expected result based on parameters from the request function Test:createUIParameters(Request) - + local UIRequest = commonFunctions:cloneTable(Request) --process for default value of timeout parameter if UIRequest["timeout"] == nil then UIRequest["timeout"] = 10000 end - + return UIRequest - + end --------------------------------------------------------------------------------------------- --This function sends a request from mobile and verify result on HMI and mobile for SUCCESS resultCode cases. function Test:verify_SUCCESS_Case(Request, HMILevel) - + --mobile side: sending the request local cid = self.mobileSession:SendRPC(APIName, Request) - if Request.timeout == 1000 then + if Request.timeout == 1000 then itimeout = 500 - else + else itimeout = 1000 end @@ -118,12 +117,12 @@ function Test:verify_SUCCESS_Case(Request, HMILevel) local UIRequest = self:createUIParameters(Request) EXPECT_HMICALL("UI.Slider", UIRequest) :Do(function(_,data) - + --HMI sends UI.OnSystemContext self.hmiConnection:SendNotification("UI.OnSystemContext",{ appID = self.applications["Test Application"], systemContext = "HMI_OBSCURED" }) local function sendReponse() - + --hmi side: sending response self.hmiConnection:SendResponse(data.id, data.method, "SUCCESS", {sliderPosition = 1}) @@ -131,30 +130,30 @@ function Test:verify_SUCCESS_Case(Request, HMILevel) self.hmiConnection:SendNotification("UI.OnSystemContext",{ appID = self.applications["Test Application"], systemContext = "MAIN" }) end RUN_AFTER(sendReponse, itimeout) - + end) - --mobile side: expect OnHashChange notification + --mobile side: expect OnHashChange notification self:expectOnHMIStatusWithAudioStateChanged(HMILevel) - + --mobile side: expect the response EXPECT_RESPONSE(cid, { success = true, resultCode = "SUCCESS", sliderPosition = 1 }) - + end --This function is used to send default request and response with specific valid data and verify SUCCESS resultCode function Test:verify_SUCCESS_Response_Case(Response, HMILevel) - + --mobile side: sending the request local Request = self:createRequest() local cid = self.mobileSession:SendRPC(APIName, Request) - --hmi side: expect UI.Slider request + --hmi side: expect UI.Slider request local UIRequest = self:createUIParameters(Request) EXPECT_HMICALL("UI.Slider", UIRequest) :Do(function(_,data) - + --HMI sends UI.OnSystemContext self.hmiConnection:SendNotification("UI.OnSystemContext",{ appID = self.applications["Test Application"], systemContext = "HMI_OBSCURED" }) @@ -169,29 +168,29 @@ function Test:verify_SUCCESS_Response_Case(Response, HMILevel) RUN_AFTER(sendReponse, 1000) end) - --mobile side: expect OnHashChange notification + --mobile side: expect OnHashChange notification self:expectOnHMIStatusWithAudioStateChanged(HMILevel) - + --mobile side: expect the response local ExpectedResponse = commonFunctions:cloneTable(Response) ExpectedResponse["success"] = true ExpectedResponse["resultCode"] = "SUCCESS" EXPECT_RESPONSE(cid, ExpectedResponse) - + end --TODO: Update after resolving APPLINK-15509 --This function is used to send default request and response with specific invalid data and verify INVALIDL_DATA resultCode function Test:verify_GENERIC_ERROR_Response_Case(Response) - + --mobile side: sending the request local Request = self:createRequest() local cid = self.mobileSession:SendRPC(APIName, Request) - --hmi side: expect UI.Slider request + --hmi side: expect UI.Slider request local UIRequest = self:createUIParameters(Request) EXPECT_HMICALL("UI.Slider", UIRequest) - + :Do(function(_,data) --HMI sends UI.OnSystemContext local function sendReponse() @@ -201,12 +200,12 @@ function Test:verify_GENERIC_ERROR_Response_Case(Response) end RUN_AFTER(sendReponse, 1000) - + end) - + --mobile side: expect the response EXPECT_RESPONSE(cid, { success = false, resultCode = "INVALID_DATA", info = "Received invalid data on HMI response"}) - + end @@ -214,14 +213,20 @@ end --------------------------------------------------------------------------------------------- -------------------------------------------Preconditions------------------------------------- --------------------------------------------------------------------------------------------- - + + + --Print new line to separate Preconditions + commonFunctions:newTestCasesGroup("Preconditions") + + --Delete app_info.dat, logs and policy table + commonSteps:DeleteLogsFileAndPolicyTable() + --1. Activate application commonSteps:ActivationApp() - - -- --2. Update policy to allow request - -- local keep_context = true - -- local steal_focus = true - -- policyTable:precondition_updatePolicyAndAllowFunctionGroup({"FULL"}, keep_context, steal_focus) + + --2. Update policy to allow request + policyTable:Precondition_updatePolicy_By_overwriting_preloaded_pt("files/ptu_general.json") + ----------------------------------------------------------------------------------------------- @@ -229,14 +234,18 @@ end --------------------------------Check normal cases of Mobile request--------------------------- ----------------------------------------------------------------------------------------------- + + --Print new line to separate test suite + commonFunctions:newTestCasesGroup("Test Suite For Normal cases of Mobile request") + --Note: Completed this part ---Requirement id in JAMA: +--Requirement id in JAMA: --SDLAQ-CRS-117 (Slider_Request_v2_0) --SDLAQ-CRS-118 (Slider_Response_v2_0) --SDLAQ-CRS-661 (SUCCESS) --SDLAQ-CRS-653 (INVALID_DATA) - + --Verification criteria: Creates a full screen or pop-up overlay (depending on platform) with a single user controlled slider. ----------------------------------------------------------------------------------------------- @@ -260,9 +269,9 @@ end Test["Slider_PositiveRequest_SUCCESS"] = function(self) - + --mobile side: request parameters - local Request = + local Request = { numTicks = 3, position = 2, @@ -270,31 +279,31 @@ end sliderFooter = {"1", "2", "3"}, timeout = 5000 } - + self:verify_SUCCESS_Case(Request) - + end ----------------------------------------------------------------------------------------- - + Test["Slider_OnlyMandatoryParameters_SUCCESS"] = function(self) - + --mobile side: request parameters - local Request = + local Request = { numTicks = 7, position = 6, sliderHeader ="sliderHeader" } - + self:verify_SUCCESS_Case(Request) - + end ----------------------------------------------------------------------------------------- - + Test["Slider_AllParametersLowerBound_SUCCESS"] = function(self) - + --mobile side: request parameters - local Request = + local Request = { numTicks = 2, position = 1, @@ -302,16 +311,16 @@ end sliderFooter = {"a","a"}, timeout = 1000 } - + self:verify_SUCCESS_Case(Request) - + end ----------------------------------------------------------------------------------------- - + Test["Slider_AllParametersUpperBound_SUCCESS"] = function(self) - + --mobile side: request parameters - local Request = + local Request = { numTicks = 26, position = 26, @@ -319,73 +328,73 @@ end sliderFooter = commonFunctions:createArrayString(26, 500), timeout = 65535 } - + self:verify_SUCCESS_Case(Request) - + end ----------------------------------------------------------------------------------------- - + Test["Slider_position_Over_numTicks_INVALID_DATA"] = function(self) - + --mobile side: request parameters - local Request = + local Request = { numTicks = 5, position = 6, sliderHeader ="sliderHeader", timeout = 3000 } - + commonFunctions:verify_Unsuccess_Case(self, Request, "INVALID_DATA") - + end ----------------------------------------------------------------------------------------- - + Test["Slider_Footer_Less_NumTicks_INVALID_DATA"] = function(self) - + --mobile side: request parameters - local Request = + local Request = { numTicks = 3, position = 2, sliderHeader ="sliderHeader", - sliderFooter = - { + sliderFooter = + { "Footer1", "Footer2" - }, + }, timeout = 3000 } - + commonFunctions:verify_Unsuccess_Case(self, Request, "INVALID_DATA") - + end ----------------------------------------------------------------------------------------- - + Test["Slider_Footer_More_NumTicks_INVALID_DATA"] = function(self) - + --mobile side: request parameters - local Request = + local Request = { numTicks = 3, position = 2, sliderHeader ="sliderHeader", - sliderFooter = - { + sliderFooter = + { "Footer1", "Footer2", "Footer3", "Footer4" - }, + }, timeout = 3000 } - + commonFunctions:verify_Unsuccess_Case(self, Request, "INVALID_DATA") - + end ----------------------------------------------------------------------------------------- - - + + ----------------------------------------------------------------------------------------------- --Parameter 1: numTicks: type=Integer, minvalue="2" maxvalue="26" mandatory="true" --Parameter 2: position: type=Integer, minvalue="1" maxvalue="26" mandatory="true" @@ -398,7 +407,7 @@ end --4. IsUpperBound --5. IsOutLowerBound --6. IsOutUpperBound ------------------------------------------------------------------------------------------------ +----------------------------------------------------------------------------------------------- local Request = Test:createRequest() integerParameter:verify_Integer_Parameter(Request, {"numTicks"}, {2, 26}, true) @@ -418,7 +427,7 @@ integerParameter:verify_Integer_Parameter(Request, {"timeout"}, {1000, 65535}, f --5. IsUpperBound --6. IsOutUpperBound --7. IsInvalidCharacters ------------------------------------------------------------------------------------------------ +----------------------------------------------------------------------------------------------- local Request = Test:createRequest() stringParameter:verify_String_Parameter(Request, {"sliderHeader"}, {1, 500}, true) @@ -434,8 +443,8 @@ stringParameter:verify_String_Parameter(Request, {"sliderHeader"}, {1, 500}, tru --4. IsOutLowerBound/IsEmpty --5. IsUpperBound --6. IsOutUpperBound - ------------------------------------------------------------------------------------------------ + +----------------------------------------------------------------------------------------------- local Request = Test:createRequest() arrayStringParameter:verify_Array_String_Parameter_Only(Request, {"sliderFooter"}, {1, 26}, {1, 500}, false) @@ -460,12 +469,12 @@ stringParameter:verify_String_Element_InArray_Parameter(Request, {"sliderFooter" --Begin Test case SpecialRequestChecks --Description: Check special requests - --Requirement id in JAMA: + --Requirement id in JAMA: --SDLAQ-CRS-117 (Slider_Request_v2_0) --SDLAQ-CRS-118 (Slider_Response_v2_0) --SDLAQ-CRS-661 (SUCCESS) --SDLAQ-CRS-653 (INVALID_DATA) - + --Verification criteria: Slider request notifies the user via UI engine with some information that the app provides to HMI. After UI has prompted, the response with SUCCESS resultCode is returned to mobile app. local function SpecialRequestChecks() @@ -475,11 +484,11 @@ local function SpecialRequestChecks() --Begin Test case NegativeRequestCheck.1 --Description: Invalid JSON - + --Requirement id in JAMA: SDLAQ-CRS-653 --Verification criteria: The request with wrong JSON syntax is sent, the response with INVALID_DATA result code is returned. - - --local Payload = '{"numTicks":26, "position":1, "sliderHeader":"a"}' -- valid JSON + + --local Payload = '{"numTicks":26, "position":1, "sliderHeader":"a"}' -- valid JSON local Payload = '{"numTicks";26, "position":1, "sliderHeader":"a"}' commonTestCases:VerifyInvalidJsonRequest(26, Payload) --SliderID = 26 @@ -488,20 +497,20 @@ local function SpecialRequestChecks() --Begin Test case NegativeRequestCheck.2 --Description: CorrelationId check( duplicate value) - + function Test:Slider_CorrelationID_IsDuplicated() - + --mobile side: sending Slider request - local Request = + local Request = { numTicks = 26, position = 1, sliderHeader = "a" } local cid = self.mobileSession:SendRPC(APIName, Request) - + --request from mobile side - local msg = + local msg = { serviceType = 7, frameInfo = 0, @@ -510,17 +519,17 @@ local function SpecialRequestChecks() rpcCorrelationId = cid, payload = '{"numTicks":26, "position":1, "sliderHeader":"a"}' } - + --hmi side: expect UI.Slider request local UIRequest = self:createUIParameters(Request) EXPECT_HMICALL("UI.Slider", UIRequest) :Do(function(exp,data) - - + + --HMI sends UI.OnSystemContext self.hmiConnection:SendNotification("UI.OnSystemContext",{ appID = self.applications["Test Application"], systemContext = "HMI_OBSCURED" }) - local function sendReponse() + local function sendReponse() --hmi side: sending response self.hmiConnection:SendResponse(data.id, data.method, "SUCCESS", {sliderPosition = 1}) @@ -528,20 +537,20 @@ local function SpecialRequestChecks() self.hmiConnection:SendNotification("UI.OnSystemContext",{ appID = self.applications["Test Application"], systemContext = "MAIN" }) end RUN_AFTER(sendReponse, 1000) - + --mobile: sends the second request local function sendTheSeondRequest() self.mobileSession:Send(msg) end - + if exp.occurences == 1 then - RUN_AFTER(sendTheSeondRequest, 3000) + RUN_AFTER(sendTheSeondRequest, 3000) end - + end) :Times(2) - - --mobile side: expect OnHashChange notification + + --mobile side: expect OnHashChange notification EXPECT_NOTIFICATION("OnHMIStatus", {systemContext = "HMI_OBSCURED", hmiLevel = "FULL", audioStreamingState = audibleState}, {systemContext = "MAIN", hmiLevel = "FULL", audioStreamingState = audibleState}, @@ -552,49 +561,49 @@ local function SpecialRequestChecks() --mobile side: expect the response EXPECT_RESPONSE(cid, { success = true, resultCode = "SUCCESS", sliderPosition = 1 }) :Times(2) - + end - + --End Test case NegativeRequestCheck.2 - + --Begin Test case NegativeRequestCheck.3 --Description: Fake parameters check - + --Requirement id in JAMA: APPLINK-14765 --Verification criteria: SDL must cut off the fake parameters from requests, responses and notifications received from HMI --Begin Test case NegativeRequestCheck.3.1 --Description: Fake parameters is not from any API - - function Test:Slider_FakeParams_IsNotFromAnyAPI_SUCCESS() - --mobile side: sending Slider request - local FakeRequest = + function Test:Slider_FakeParams_IsNotFromAnyAPI_SUCCESS() + + --mobile side: sending Slider request + local FakeRequest = { fakeParam = "abc", numTicks = 26, position = 1, sliderHeader = "a" } - + local cid = self.mobileSession:SendRPC(APIName, FakeRequest) - - local Request = + + local Request = { numTicks = 26, position = 1, sliderHeader = "a" } - - --hmi side: expect the request + + --hmi side: expect the request local UIRequest = self:createUIParameters(Request) EXPECT_HMICALL("UI.Slider", UIRequest) :ValidIf(function(_,data) if data.params.fakeParam then Print(" SDL re-sends fakeParam parameters to HMI") return false - else + else return true end end) @@ -603,7 +612,7 @@ local function SpecialRequestChecks() self.hmiConnection:SendNotification("UI.OnSystemContext",{ appID = self.applications["Test Application"], systemContext = "HMI_OBSCURED" }) local function sendReponse() - + --hmi side: sending response self.hmiConnection:SendResponse(data.id, data.method, "SUCCESS", {sliderPosition = 1}) @@ -614,41 +623,41 @@ local function SpecialRequestChecks() end) - --mobile side: expect OnHashChange notification + --mobile side: expect OnHashChange notification self:expectOnHMIStatusWithAudioStateChanged() - + --mobile side: expect the response EXPECT_RESPONSE(cid, { success = true, resultCode = "SUCCESS", sliderPosition = 1 }) - - end - + + end + --End Test case NegativeRequestCheck.3.1 ----------------------------------------------------------------------------------------- --Begin Test case NegativeRequestCheck.3.2 --Description: Fake parameters is from another API - - function Test:Slider_FakeParams_ParameterIsFromAnotherAPI_SUCCESS() - --mobile side: sending Slider request - local FakeRequest = + function Test:Slider_FakeParams_ParameterIsFromAnotherAPI_SUCCESS() + + --mobile side: sending Slider request + local FakeRequest = { syncFileName = "abc", numTicks = 26, position = 1, sliderHeader = "a" } - - local Request = + + local Request = { numTicks = 26, position = 1, sliderHeader = "a" } - + local cid = self.mobileSession:SendRPC(APIName, FakeRequest) - - + + --hmi side: expect the request local UIRequest = self:createUIParameters(Request) EXPECT_HMICALL("UI.Slider", UIRequest) @@ -656,7 +665,7 @@ local function SpecialRequestChecks() if data.params.syncFileName then Print(" SDL re-sends fakeParam parameters to HMI") return false - else + else return true end end) @@ -665,7 +674,7 @@ local function SpecialRequestChecks() self.hmiConnection:SendNotification("UI.OnSystemContext",{ appID = self.applications["Test Application"], systemContext = "HMI_OBSCURED" }) local function sendReponse() - + --hmi side: sending response self.hmiConnection:SendResponse(data.id, data.method, "SUCCESS", {sliderPosition = 1}) @@ -675,59 +684,59 @@ local function SpecialRequestChecks() RUN_AFTER(sendReponse, 1000) end) - --mobile side: expect OnHashChange notification + --mobile side: expect OnHashChange notification self:expectOnHMIStatusWithAudioStateChanged() - + --mobile side: expect the response EXPECT_RESPONSE(cid, { success = true, resultCode = "SUCCESS", sliderPosition = 1 }) - - end + + end --End Test case NegativeRequestCheck.3.2 ----------------------------------------------------------------------------------------- - + --Begin Test case NegativeRequestCheck.3.3 --Description: Fake parameters and invalid request - - function Test:Slider_FakeParamsAndInvalidRequest_GENERIC_ERROR() - --mobile side: sending Slider request - local FakeRequest = + function Test:Slider_FakeParamsAndInvalidRequest_GENERIC_ERROR() + + --mobile side: sending Slider request + local FakeRequest = { fakeParam = "abc", numTicks = 26, sliderHeader = "a" } - + local cid = self.mobileSession:SendRPC(APIName, FakeRequest) - - - --hmi side: expect the request + + + --hmi side: expect the request EXPECT_HMICALL("UI.Slider") :Times(0) - --mobile side: expect OnHashChange notification + --mobile side: expect OnHashChange notification self:expectOnHMIStatusWithAudioStateChanged(nil, nil, 0) - + --mobile side: expect the response EXPECT_RESPONSE(cid, { success = false, resultCode = "INVALID_DATA"}) - - end - + + end + --End Test case NegativeRequestCheck.3.3 ----------------------------------------------------------------------------------------- - + --End Test case NegativeRequestCheck.3 --Begin Test case NegativeRequestCheck.4 - --Description: All parameters missing + --Description: All parameters missing commonTestCases:VerifyRequestIsMissedAllParameters() --End Test case NegativeRequestCheck.4 ----------------------------------------------------------------------------------------- - + end SpecialRequestChecks() @@ -744,7 +753,7 @@ SpecialRequestChecks() --Note: Completed this part ---Requirement id in JAMA: +--Requirement id in JAMA: --SDLAQ-CRS-117 (Slider_Request_v2_0) --SDLAQ-CRS-118 (Slider_Response_v2_0) --SDLAQ-CRS-661 (SUCCESS) @@ -758,25 +767,25 @@ SpecialRequestChecks() --SDLAQ-CRS-660 (DISALLOWED) --SDLAQ-CRS-1032 (UNSUPPORTED_RESOURCE) --SDLAQ-CRS-2904 (TIMED_OUT) - + --APPLINK-14765: SDL must cut off the fake parameters from requests, responses and notifications received from HMI (INVALID response => GENERIC_ERROR resultCode) --APPLINK-14551: SDL behavior: cases when SDL must transfer "info" parameter via corresponding RPC to mobile app - ---Verification Criteria: + +--Verification Criteria: --The response contains 3 mandatory parameters "success", "resultCode" and current "sliderPosition" value returned. "info" is sent if there is any additional information about the resultCode. - + ----------------------------------------------------------------------------------------------- --List of parameters: ---Parameter 1: resultCode: type=String Enumeration(Integer), mandatory="true" ---Parameter 2: method: type=String, mandatory="true" (main test case: method is correct or not) ---Parameter 3: info: type=String, minlength="1" maxlength="10" mandatory="false" ---Parameter 4: correlationID: type=Integer, mandatory="true" +--Parameter 1: resultCode: type=String Enumeration(Integer), mandatory="true" +--Parameter 2: method: type=String, mandatory="true" (main test case: method is correct or not) +--Parameter 3: info: type=String, minlength="1" maxlength="10" mandatory="false" +--Parameter 4: correlationID: type=Integer, mandatory="true" --Parameter 5: sliderPosition: type=Integer, minvalue="1" maxvalue="26" mandatory="false" - + ----------------------------------------------------------------------------------------------- --Parameter 1: resultCode ----------------------------------------------------------------------------------------------- ---List of test cases: +--List of test cases: --1. IsMissed --2. IsValidValue --3. IsNotExist @@ -789,17 +798,17 @@ local function verify_resultCode_parameter() --Print new line to separate new test cases group commonFunctions:newTestCasesGroup("TestCaseGroupForResultCodeParameter") - + ----------------------------------------------------------------------------------------- - + --1. IsMissed Test[APIName.."_Response_resultCode_IsMissed_GENERIC_ERROR_SendResponse"] = function(self) - + --mobile side: sending the request local Request = self:createRequest() local cid = self.mobileSession:SendRPC(APIName, Request) - + --hmi side: expect the request local UIRequest = self:createUIParameters(Request) EXPECT_HMICALL("UI.Slider", UIRequest) @@ -808,7 +817,7 @@ local function verify_resultCode_parameter() self.hmiConnection:SendNotification("UI.OnSystemContext",{ appID = self.applications["Test Application"], systemContext = "HMI_OBSCURED" }) local function sendReponse() - + --hmi side: sending response --self.hmiConnection:Send('{"id":'..tostring(data.id)..',"jsonrpc":"2.0","result":{"method":"UI.Slider","code":0,"sliderPosition":1}}') self.hmiConnection:Send('{"id":'..tostring(data.id)..',"jsonrpc":"2.0","result":{"method":"UI.Slider","sliderPosition":1}}') @@ -817,26 +826,26 @@ local function verify_resultCode_parameter() self.hmiConnection:SendNotification("UI.OnSystemContext",{ appID = self.applications["Test Application"], systemContext = "MAIN" }) end RUN_AFTER(sendReponse, 1000) - + end) - - --mobile side: expect OnHashChange notification + + --mobile side: expect OnHashChange notification self:expectOnHMIStatusWithAudioStateChanged() - + --mobile side: expect the response -- TODO: update after APPLINK-14765 is resolved -- EXPECT_RESPONSE(cid, { success = false, resultCode = "GENERIC_ERROR", info = "Invalid message received from vehicle"}) EXPECT_RESPONSE(cid, { success = false, resultCode = "INVALID_DATA"}) - + end - + Test[APIName.."_Response_resultCode_IsMissed_GENERIC_ERROR_SendError"] = function(self) - + --mobile side: sending the request local Request = self:createRequest() local cid = self.mobileSession:SendRPC(APIName, Request) - + --hmi side: expect the request local UIRequest = self:createUIParameters(Request) EXPECT_HMICALL("UI.Slider", UIRequest) @@ -845,7 +854,7 @@ local function verify_resultCode_parameter() self.hmiConnection:SendNotification("UI.OnSystemContext",{ appID = self.applications["Test Application"], systemContext = "HMI_OBSCURED" }) local function sendReponse() - + --hmi side: sending response --self.hmiConnection:Send('{"id":'..tostring(data.id)..',"jsonrpc":"2.0","error":{"data":{"method":"UI.Slider"},"code":4,"message":"abc"}}') self.hmiConnection:Send('{"id":'..tostring(data.id)..',"jsonrpc":"2.0","error":{"data":{"method":"UI.Slider"},"message":"abc"}}') @@ -854,21 +863,21 @@ local function verify_resultCode_parameter() self.hmiConnection:SendNotification("UI.OnSystemContext",{ appID = self.applications["Test Application"], systemContext = "MAIN" }) end RUN_AFTER(sendReponse, 1000) - - + + end) - - --mobile side: expect OnHashChange notification + + --mobile side: expect OnHashChange notification self:expectOnHMIStatusWithAudioStateChanged() - + --mobile side: expect the response -- TODO: update after APPLINK-14765 is resolved -- EXPECT_RESPONSE(cid, { success = false, resultCode = "GENERIC_ERROR", info = "Invalid message received from vehicle"}) EXPECT_RESPONSE(cid, { success = false, resultCode = "INVALID_DATA"}) - + end ----------------------------------------------------------------------------------------- - + --SDLAQ-CRS-661 (SUCCESS) --SDLAQ-CRS-653 (INVALID_DATA) --SDLAQ-CRS-654 (OUT_OF_MEMORY) @@ -880,31 +889,31 @@ local function verify_resultCode_parameter() --SDLAQ-CRS-660 (DISALLOWED) --SDLAQ-CRS-1032 (UNSUPPORTED_RESOURCE) --SDLAQ-CRS-2904 (TIMED_OUT) - + --2. IsValidValue local resultCodes = { {resultCode = "SUCCESS", success = true}, {resultCode = "INVALID_DATA", success = false}, - {resultCode = "OUT_OF_MEMORY", success = false}, + {resultCode = "OUT_OF_MEMORY", success = false}, {resultCode = "TOO_MANY_PENDING_REQUESTS", success = false}, {resultCode = "APPLICATION_NOT_REGISTERED", success = false}, {resultCode = "REJECTED", success = false}, - {resultCode = "ABORTED", success = false}, + {resultCode = "ABORTED", success = false}, {resultCode = "GENERIC_ERROR", success = false}, {resultCode = "DISALLOWED", success = false}, - {resultCode = "USER_DISALLOWED", success = false}, - {resultCode = "UNSUPPORTED_RESOURCE", success = false}, + {resultCode = "USER_DISALLOWED", success = false}, + {resultCode = "UNSUPPORTED_RESOURCE", success = false}, {resultCode = "TIMED_OUT", success = false} } - + for i =1, #resultCodes do - + Test[APIName.."_Response_resultCode_IsValidValue_" .. resultCodes[i].resultCode .."_SendResponse"] = function(self) - + --mobile side: sending the request local Request = self:createRequest() local cid = self.mobileSession:SendRPC(APIName, Request) - + --hmi side: expect the request local UIRequest = self:createUIParameters(Request) EXPECT_HMICALL("UI.Slider", UIRequest) @@ -913,7 +922,7 @@ local function verify_resultCode_parameter() self.hmiConnection:SendNotification("UI.OnSystemContext",{ appID = self.applications["Test Application"], systemContext = "HMI_OBSCURED" }) local function sendReponse() - + --hmi side: sending response self.hmiConnection:SendResponse(data.id, data.method, resultCodes[i].resultCode, {}) @@ -921,24 +930,24 @@ local function verify_resultCode_parameter() self.hmiConnection:SendNotification("UI.OnSystemContext",{ appID = self.applications["Test Application"], systemContext = "MAIN" }) end RUN_AFTER(sendReponse, 1000) - + end) - - --mobile side: expect OnHashChange notification + + --mobile side: expect OnHashChange notification self:expectOnHMIStatusWithAudioStateChanged() - + --mobile side: expect the response - EXPECT_RESPONSE(cid, { success = resultCodes[i].success, resultCode = resultCodes[i].resultCode}) + EXPECT_RESPONSE(cid, { success = resultCodes[i].success, resultCode = resultCodes[i].resultCode}) - end + end ----------------------------------------------------------------------------------------- - + Test[APIName.."_Response_resultCode_IsValidValue_" .. resultCodes[i].resultCode .."_SendError"] = function(self) - + --mobile side: sending the request local Request = self:createRequest() local cid = self.mobileSession:SendRPC(APIName, Request) - + --hmi side: expect the request local UIRequest = self:createUIParameters(Request) EXPECT_HMICALL("UI.Slider", UIRequest) @@ -947,47 +956,47 @@ local function verify_resultCode_parameter() self.hmiConnection:SendNotification("UI.OnSystemContext",{ appID = self.applications["Test Application"], systemContext = "HMI_OBSCURED" }) local function sendReponse() - + --hmi side: sending the response - self.hmiConnection:SendError(data.id, data.method, resultCodes[i].resultCode, "info") + self.hmiConnection:SendError(data.id, data.method, resultCodes[i].resultCode, "info") --HMI sends UI.OnSystemContext self.hmiConnection:SendNotification("UI.OnSystemContext",{ appID = self.applications["Test Application"], systemContext = "MAIN" }) end - RUN_AFTER(sendReponse, 1000) - + RUN_AFTER(sendReponse, 1000) + end) - - --mobile side: expect OnHashChange notification + + --mobile side: expect OnHashChange notification self:expectOnHMIStatusWithAudioStateChanged() - + --mobile side: expect the response EXPECT_RESPONSE(cid, { success = resultCodes[i].success, resultCode = resultCodes[i].resultCode, info = "info"}) - end + end ----------------------------------------------------------------------------------------- - + end ----------------------------------------------------------------------------------------- - - + + --3. IsNotExist --4. IsEmpty --5. IsWrongType - local testData = { + local testData = { {value = "ANY", name = "IsNotExist"}, {value = "", name = "IsEmpty"}, {value = 123, name = "IsWrongType"}} - + for i =1, #testData do - + Test[APIName.."_Response_resultCode_" .. testData[i].name .."_GENERIC_ERROR_SendResponse"] = function(self) - + --mobile side: sending the request local Request = self:createRequest() local cid = self.mobileSession:SendRPC(APIName, Request) - + --hmi side: expect the request local UIRequest = self:createUIParameters(Request) EXPECT_HMICALL("UI.Slider", UIRequest) @@ -997,34 +1006,34 @@ local function verify_resultCode_parameter() self.hmiConnection:SendNotification("UI.OnSystemContext",{ appID = self.applications["Test Application"], systemContext = "HMI_OBSCURED" }) local function sendReponse() - + --hmi side: sending the response - self.hmiConnection:SendResponse(data.id, data.method, testData[i].value, {}) + self.hmiConnection:SendResponse(data.id, data.method, testData[i].value, {}) --HMI sends UI.OnSystemContext self.hmiConnection:SendNotification("UI.OnSystemContext",{ appID = self.applications["Test Application"], systemContext = "MAIN" }) end RUN_AFTER(sendReponse, 1000) - + end) - --mobile side: expect OnHashChange notification + --mobile side: expect OnHashChange notification self:expectOnHMIStatusWithAudioStateChanged() --mobile side: expect the response -- TODO: update after APPLINK-14765 is resolved -- EXPECT_RESPONSE(cid, { success = false, resultCode = "GENERIC_ERROR", info = "Invalid message received from vehicle"}) - EXPECT_RESPONSE(cid, { success = false, resultCode = "INVALID_DATA"}) + EXPECT_RESPONSE(cid, { success = false, resultCode = "INVALID_DATA"}) end ----------------------------------------------------------------------------------------- - + Test[APIName.."_Response_resultCode_" .. testData[i].name .."_GENERIC_ERROR_SendError"] = function(self) - + --mobile side: sending the request local Request = self:createRequest() local cid = self.mobileSession:SendRPC(APIName, Request) - + --hmi side: expect the request local UIRequest = self:createUIParameters(Request) EXPECT_HMICALL("UI.Slider", UIRequest) @@ -1033,7 +1042,7 @@ local function verify_resultCode_parameter() self.hmiConnection:SendNotification("UI.OnSystemContext",{ appID = self.applications["Test Application"], systemContext = "HMI_OBSCURED" }) local function sendReponse() - + --hmi side: sending the response self.hmiConnection:SendError(data.id, data.method, testData[i].value) @@ -1041,23 +1050,23 @@ local function verify_resultCode_parameter() self.hmiConnection:SendNotification("UI.OnSystemContext",{ appID = self.applications["Test Application"], systemContext = "MAIN" }) end RUN_AFTER(sendReponse, 1000) - + end) - - --mobile side: expect OnHashChange notification + + --mobile side: expect OnHashChange notification self:expectOnHMIStatusWithAudioStateChanged() - + --mobile side: expect the response -- TODO: update after APPLINK-14765 is resolved -- EXPECT_RESPONSE(cid, { success = false, resultCode = "GENERIC_ERROR", info = "Invalid message received from vehicle"}) EXPECT_RESPONSE(cid, { success = false, resultCode = "INVALID_DATA"}) end ----------------------------------------------------------------------------------------- - + end ----------------------------------------------------------------------------------------- - -end + +end verify_resultCode_parameter() @@ -1065,7 +1074,7 @@ verify_resultCode_parameter() ----------------------------------------------------------------------------------------------- --Parameter 2: method ----------------------------------------------------------------------------------------------- ---List of test cases: +--List of test cases: --1. IsMissed --2. IsValidResponse --3. IsNotValidResponse @@ -1074,23 +1083,23 @@ verify_resultCode_parameter() --6. IsWrongType --7. IsInvalidCharacter - \n, \t ----------------------------------------------------------------------------------------------- - + --ToDo: Update according to APPLINK-16111: Clarify SDL behaviors when HMI responses invalid correlationId or invalid method local function verify_method_parameter() --Print new line to separate new test cases group commonFunctions:newTestCasesGroup("TestCaseGroupForMethodParameter") - - + + --1. IsMissed Test[APIName.."_Response_method_IsMissed_GENERIC_ERROR_SendResponse"] = function(self) - + --mobile side: sending the request local Request = self:createRequest() local cid = self.mobileSession:SendRPC(APIName, Request) - + --hmi side: expect the request local UIRequest = self:createUIParameters(Request) EXPECT_HMICALL("UI.Slider", UIRequest) @@ -1099,7 +1108,7 @@ local function verify_method_parameter() self.hmiConnection:SendNotification("UI.OnSystemContext",{ appID = self.applications["Test Application"], systemContext = "HMI_OBSCURED" }) local function sendReponse() - + --hmi side: sending the response --self.hmiConnection:Send('{"id":'..tostring(data.id)..',"jsonrpc":"2.0","result":{"method":"UI.Slider", "code":0}}') self.hmiConnection:Send('{"id":'..tostring(data.id)..',"jsonrpc":"2.0","result":{"code":0}}') @@ -1108,25 +1117,25 @@ local function verify_method_parameter() self.hmiConnection:SendNotification("UI.OnSystemContext",{ appID = self.applications["Test Application"], systemContext = "MAIN" }) end RUN_AFTER(sendReponse, 1000) - + end) - - --mobile side: expect OnHashChange notification + + --mobile side: expect OnHashChange notification self:expectOnHMIStatusWithAudioStateChanged() - + --mobile side: expect the response EXPECT_RESPONSE(cid, { success = false, resultCode = "GENERIC_ERROR"}) :Timeout(13000) - + end - + Test[APIName.."_Response_method_IsMissed_GENERIC_ERROR_SendError"] = function(self) - + --mobile side: sending the request local Request = self:createRequest() local cid = self.mobileSession:SendRPC(APIName, Request) - + --hmi side: expect the request local UIRequest = self:createUIParameters(Request) EXPECT_HMICALL("UI.Slider", UIRequest) @@ -1135,8 +1144,8 @@ local function verify_method_parameter() self.hmiConnection:SendNotification("UI.OnSystemContext",{ appID = self.applications["Test Application"], systemContext = "HMI_OBSCURED" }) local function sendReponse() - - --hmi side: sending the response + + --hmi side: sending the response --self.hmiConnection:Send('{"id":'..tostring(data.id)..',"jsonrpc":"2.0","error":{"data":{"method":"UI.Slider"},"code":4,"message":"abc"}}') self.hmiConnection:Send('{"id":'..tostring(data.id)..',"jsonrpc":"2.0","error":{"data":{},"code":4,"message":"abc"}}') @@ -1144,29 +1153,29 @@ local function verify_method_parameter() self.hmiConnection:SendNotification("UI.OnSystemContext",{ appID = self.applications["Test Application"], systemContext = "MAIN" }) end RUN_AFTER(sendReponse, 1000) - + end) - - --mobile side: expect OnHashChange notification + + --mobile side: expect OnHashChange notification self:expectOnHMIStatusWithAudioStateChanged() - + --mobile side: expect the response EXPECT_RESPONSE(cid, { success = false, resultCode = "GENERIC_ERROR"}) :Timeout(13000) - + end ----------------------------------------------------------------------------------------- - - --2. IsValidResponse Covered by many test cases + + --2. IsValidResponse Covered by many test cases ----------------------------------------------------------------------------------------- - + --3. IsNotValidResponse --4. IsOtherResponse --5. IsEmpty --6. IsWrongType - --7. IsInvalidCharacter - \n, \t, spaces - local Methods = { + --7. IsInvalidCharacter - \n, \t, spaces + local Methods = { {method = "ANY", name = "IsNotValidResponse"}, {method = "GetCapabilities", name = "IsOtherResponse"}, {method = "", name = "IsEmpty"}, @@ -1175,15 +1184,15 @@ local function verify_method_parameter() {method = "a\tb", name = "IsInvalidCharacter_Tab"}, {method = " ", name = "IsSpaces"}, } - + for i =1, #Methods do - + Test[APIName.."_Response_method_" .. Methods[i].name .."_GENERIC_ERROR_SendResponse"] = function(self) - + --mobile side: sending the request local Request = self:createRequest() local cid = self.mobileSession:SendRPC(APIName, Request) - + --hmi side: expect the request local UIRequest = self:createUIParameters(Request) EXPECT_HMICALL("UI.Slider", UIRequest) @@ -1192,7 +1201,7 @@ local function verify_method_parameter() self.hmiConnection:SendNotification("UI.OnSystemContext",{ appID = self.applications["Test Application"], systemContext = "HMI_OBSCURED" }) local function sendReponse() - + --hmi side: sending the response --self.hmiConnection:SendResponse(data.id, data.method, "SUCCESS", {}) self.hmiConnection:SendResponse(data.id, Methods[i].method, "SUCCESS", {}) @@ -1201,60 +1210,60 @@ local function verify_method_parameter() self.hmiConnection:SendNotification("UI.OnSystemContext",{ appID = self.applications["Test Application"], systemContext = "MAIN" }) end RUN_AFTER(sendReponse, 1000) - + end) - - --mobile side: expect OnHashChange notification + + --mobile side: expect OnHashChange notification self:expectOnHMIStatusWithAudioStateChanged() - + --mobile side: expect the response EXPECT_RESPONSE(cid, { success = false, resultCode = "GENERIC_ERROR"}) :Timeout(13000) end ----------------------------------------------------------------------------------------- - + Test[APIName.."_Response_method_" .. Methods[i].name .."_GENERIC_ERROR_SendError"] = function(self) - + --mobile side: sending the request local Request = self:createRequest() local cid = self.mobileSession:SendRPC(APIName, Request) - + --hmi side: expect the request local UIRequest = self:createUIParameters(Request) EXPECT_HMICALL("UI.Slider", UIRequest) - :Do(function(_,data) + :Do(function(_,data) --HMI sends UI.OnSystemContext self.hmiConnection:SendNotification("UI.OnSystemContext",{ appID = self.applications["Test Application"], systemContext = "HMI_OBSCURED" }) local function sendReponse() - + --hmi side: sending the response --self.hmiConnection:SendError(data.id, data.method, "REJECTED", "info") - self.hmiConnection:SendError(data.id, Methods[i].method, "REJECTED", "info") + self.hmiConnection:SendError(data.id, Methods[i].method, "REJECTED", "info") --HMI sends UI.OnSystemContext self.hmiConnection:SendNotification("UI.OnSystemContext",{ appID = self.applications["Test Application"], systemContext = "MAIN" }) end RUN_AFTER(sendReponse, 1000) - + end) - - --mobile side: expect OnHashChange notification + + --mobile side: expect OnHashChange notification self:expectOnHMIStatusWithAudioStateChanged() - + --mobile side: expect the response EXPECT_RESPONSE(cid, { success = false, resultCode = "GENERIC_ERROR"}) :Timeout(13000) - + end ----------------------------------------------------------------------------------------- - + end ----------------------------------------------------------------------------------------- - -end + +end verify_method_parameter() @@ -1262,7 +1271,7 @@ verify_method_parameter() ----------------------------------------------------------------------------------------------- --Parameter 3: info ----------------------------------------------------------------------------------------------- ---List of test cases: +--List of test cases: --1. IsMissed --2. IsLowerBound --3. IsUpperBound @@ -1277,37 +1286,37 @@ local function verify_info_parameter() --Print new line to separate new test cases group commonFunctions:newTestCasesGroup("TestCaseGroupForInfoParameter") - + ----------------------------------------------------------------------------------------- - + --1. IsMissed Test[APIName.."_Response_info_IsMissed_SendResponse"] = function(self) - + --mobile side: sending the request local Request = self:createRequest() local cid = self.mobileSession:SendRPC(APIName, Request) - + --hmi side: expect the request local UIRequest = self:createUIParameters(Request) EXPECT_HMICALL("UI.Slider", UIRequest) - :Do(function(_,data) + :Do(function(_,data) --HMI sends UI.OnSystemContext self.hmiConnection:SendNotification("UI.OnSystemContext",{ appID = self.applications["Test Application"], systemContext = "HMI_OBSCURED" }) local function sendReponse() - + --hmi side: sending the response - self.hmiConnection:SendResponse(data.id, data.method, "SUCCESS", {}) + self.hmiConnection:SendResponse(data.id, data.method, "SUCCESS", {}) --HMI sends UI.OnSystemContext self.hmiConnection:SendNotification("UI.OnSystemContext",{ appID = self.applications["Test Application"], systemContext = "MAIN" }) end RUN_AFTER(sendReponse, 1000) - + end) - - --mobile side: expect OnHashChange notification + + --mobile side: expect OnHashChange notification self:expectOnHMIStatusWithAudioStateChanged() @@ -1317,20 +1326,20 @@ local function verify_info_parameter() if data.payload.info then commonFunctions:printError(" SDL resends info parameter to mobile app. info = \"" .. data.payload.info .. "\"") return false - else + else return true end end) end ----------------------------------------------------------------------------------------- - + Test[APIName.."_Response_info_IsMissed_SendError"] = function(self) - + --mobile side: sending the request local Request = self:createRequest() local cid = self.mobileSession:SendRPC(APIName, Request) - + --hmi side: expect the request local UIRequest = self:createUIParameters(Request) EXPECT_HMICALL("UI.Slider", UIRequest) @@ -1339,7 +1348,7 @@ local function verify_info_parameter() self.hmiConnection:SendNotification("UI.OnSystemContext",{ appID = self.applications["Test Application"], systemContext = "HMI_OBSCURED" }) local function sendReponse() - + --hmi side: sending the response self.hmiConnection:SendError(data.id, data.method, "GENERIC_ERROR") @@ -1347,13 +1356,13 @@ local function verify_info_parameter() self.hmiConnection:SendNotification("UI.OnSystemContext",{ appID = self.applications["Test Application"], systemContext = "MAIN" }) end RUN_AFTER(sendReponse, 1000) - + end) - --mobile side: expect OnHashChange notification + --mobile side: expect OnHashChange notification self:expectOnHMIStatusWithAudioStateChanged() - + -- TODO: Update after resolving APPLINK-14765 -- EXPECT_RESPONSE(cid, { success = false, resultCode = "GENERIC_ERROR"}) EXPECT_RESPONSE(cid, { success = false, resultCode = "INVALID_DATA", info = "Received invalid data on HMI response"}) @@ -1362,18 +1371,18 @@ local function verify_info_parameter() --2. IsLowerBound --3. IsUpperBound - local testData = { + local testData = { {value = "a", name = "IsLowerBound"}, {value = commonFunctions:createString(1000), name = "IsUpperBound"}} - + for i =1, #testData do - + Test[APIName.."_Response_info_" .. testData[i].name .."_SendResponse"] = function(self) - + --mobile side: sending the request local Request = self:createRequest() local cid = self.mobileSession:SendRPC(APIName, Request) - + --hmi side: expect the request local UIRequest = self:createUIParameters(Request) EXPECT_HMICALL("UI.Slider", UIRequest) @@ -1382,7 +1391,7 @@ local function verify_info_parameter() self.hmiConnection:SendNotification("UI.OnSystemContext",{ appID = self.applications["Test Application"], systemContext = "HMI_OBSCURED" }) local function sendReponse() - + --hmi side: sending the response self.hmiConnection:SendResponse(data.id, data.method, "SUCCESS", {info = testData[i].value}) @@ -1390,24 +1399,24 @@ local function verify_info_parameter() self.hmiConnection:SendNotification("UI.OnSystemContext",{ appID = self.applications["Test Application"], systemContext = "MAIN" }) end RUN_AFTER(sendReponse, 1000) - + end) - - --mobile side: expect OnHashChange notification + + --mobile side: expect OnHashChange notification self:expectOnHMIStatusWithAudioStateChanged() --mobile side: expect the response - EXPECT_RESPONSE(cid, { success = true, resultCode = "SUCCESS", info = testData[i].value}) + EXPECT_RESPONSE(cid, { success = true, resultCode = "SUCCESS", info = testData[i].value}) end ----------------------------------------------------------------------------------------- - + Test[APIName.."_Response_info_" .. testData[i].name .."_SendError"] = function(self) - + --mobile side: sending the request local Request = self:createRequest() local cid = self.mobileSession:SendRPC(APIName, Request) - + --hmi side: expect the request local UIRequest = self:createUIParameters(Request) EXPECT_HMICALL("UI.Slider", UIRequest) @@ -1416,7 +1425,7 @@ local function verify_info_parameter() self.hmiConnection:SendNotification("UI.OnSystemContext",{ appID = self.applications["Test Application"], systemContext = "HMI_OBSCURED" }) local function sendReponse() - + --hmi side: sending the response self.hmiConnection:SendError(data.id, data.method, "GENERIC_ERROR", testData[i].value) @@ -1424,31 +1433,31 @@ local function verify_info_parameter() self.hmiConnection:SendNotification("UI.OnSystemContext",{ appID = self.applications["Test Application"], systemContext = "MAIN" }) end RUN_AFTER(sendReponse, 1000) - + end) - - --mobile side: expect OnHashChange notification + + --mobile side: expect OnHashChange notification self:expectOnHMIStatusWithAudioStateChanged() --mobile side: expect the response - EXPECT_RESPONSE(cid, { success = false, resultCode = "GENERIC_ERROR", info = testData[i].value}) + EXPECT_RESPONSE(cid, { success = false, resultCode = "GENERIC_ERROR", info = testData[i].value}) end ----------------------------------------------------------------------------------------- - + end ----------------------------------------------------------------------------------------- - + --[[ TODO: uncomment after resolvin APPLINK-14551 --4. IsOutUpperBound Test[APIName.."_Response_info_IsOutUpperBound_SendResponse"] = function(self) - + local infoMaxLength = commonFunctions:createString(1000) - + --mobile side: sending the request local Request = self:createRequest() local cid = self.mobileSession:SendRPC(APIName, Request) - + --hmi side: expect the request local UIRequest = self:createUIParameters(Request) EXPECT_HMICALL("UI.Slider", UIRequest) @@ -1457,7 +1466,7 @@ local function verify_info_parameter() self.hmiConnection:SendNotification("UI.OnSystemContext",{ appID = self.applications["Test Application"], systemContext = "HMI_OBSCURED" }) local function sendReponse() - + --hmi side: sending the response self.hmiConnection:SendResponse(data.id, data.method, "SUCCESS", {info = infoMaxLength .. "1"}) @@ -1465,26 +1474,26 @@ local function verify_info_parameter() self.hmiConnection:SendNotification("UI.OnSystemContext",{ appID = self.applications["Test Application"], systemContext = "MAIN" }) end RUN_AFTER(sendReponse, 1000) - + end) - - --mobile side: expect OnHashChange notification + + --mobile side: expect OnHashChange notification self:expectOnHMIStatusWithAudioStateChanged() --mobile side: expect the response EXPECT_RESPONSE(cid, { success = true, resultCode = "SUCCESS", info = infoMaxLength}) - + end ----------------------------------------------------------------------------------------- - + Test[APIName.."_Response_info_IsOutUpperBound_SendError"] = function(self) - + local infoMaxLength = commonFunctions:createString(1000) - + --mobile side: sending the request local Request = self:createRequest() local cid = self.mobileSession:SendRPC(APIName, Request) - + --hmi side: expect the request local UIRequest = self:createUIParameters(Request) EXPECT_HMICALL("UI.Slider", UIRequest) @@ -1493,7 +1502,7 @@ local function verify_info_parameter() self.hmiConnection:SendNotification("UI.OnSystemContext",{ appID = self.applications["Test Application"], systemContext = "HMI_OBSCURED" }) local function sendReponse() - + --hmi side: sending the response self.hmiConnection:SendError(data.id, data.method, "GENERIC_ERROR", infoMaxLength .."1") @@ -1501,38 +1510,38 @@ local function verify_info_parameter() self.hmiConnection:SendNotification("UI.OnSystemContext",{ appID = self.applications["Test Application"], systemContext = "MAIN" }) end RUN_AFTER(sendReponse, 1000) - + end) - - --mobile side: expect OnHashChange notification + + --mobile side: expect OnHashChange notification self:expectOnHMIStatusWithAudioStateChanged() --mobile side: expect the response EXPECT_RESPONSE(cid, { success = false, resultCode = "GENERIC_ERROR", info = infoMaxLength}) - + end]] ----------------------------------------------------------------------------------------- - + -- TODO: update after resolving APPLINK-14551 - --5. IsEmpty/IsOutLowerBound + --5. IsEmpty/IsOutLowerBound --6. IsWrongType --7. InvalidCharacter - \n, \t - - -- local testData = { + + -- local testData = { -- {value = "", name = "IsEmpty_IsOutLowerBound"}, -- {value = 123, name = "IsWrongType"}, -- {value = "a\nb", name = "IsInvalidCharacter_NewLine"}, -- {value = "a\tb", name = "IsInvalidCharacter_Tab"}} - + -- for i =1, #testData do - + -- Test[APIName.."_Response_info_" .. testData[i].name .."_SendResponse"] = function(self) - + -- --mobile side: sending the request -- local Request = self:createRequest() -- local cid = self.mobileSession:SendRPC(APIName, Request) - + -- --hmi side: expect the request -- local UIRequest = self:createUIParameters(Request) -- EXPECT_HMICALL("UI.Slider", UIRequest) @@ -1541,7 +1550,7 @@ local function verify_info_parameter() -- self.hmiConnection:SendNotification("UI.OnSystemContext",{ appID = self.applications["Test Application"], systemContext = "HMI_OBSCURED" }) -- local function sendReponse() - + -- --hmi side: sending the response -- self.hmiConnection:SendResponse(data.id, data.method, "SUCCESS", {info = testData[i].value}) @@ -1549,10 +1558,10 @@ local function verify_info_parameter() -- self.hmiConnection:SendNotification("UI.OnSystemContext",{ appID = self.applications["Test Application"], systemContext = "MAIN" }) -- end -- RUN_AFTER(sendReponse, 1000) - + -- end) - - -- --mobile side: expect OnHashChange notification + + -- --mobile side: expect OnHashChange notification -- self:expectOnHMIStatusWithAudioStateChanged() -- --mobile side: expect the response @@ -1561,20 +1570,20 @@ local function verify_info_parameter() -- if data.payload.info then -- commonFunctions:printError(" SDL resends info parameter to mobile app. info = \"" .. data.payload.info .. "\"") -- return false - -- else + -- else -- return true -- end - -- end) + -- end) -- end -- ----------------------------------------------------------------------------------------- - + -- Test[APIName.."_Response_info_" .. testData[i].name .."_SendError"] = function(self) - + -- --mobile side: sending the request -- local Request = self:createRequest() -- local cid = self.mobileSession:SendRPC(APIName, Request) - + -- --hmi side: expect the request -- local UIRequest = self:createUIParameters(Request) -- EXPECT_HMICALL("UI.Slider", UIRequest) @@ -1583,7 +1592,7 @@ local function verify_info_parameter() -- self.hmiConnection:SendNotification("UI.OnSystemContext",{ appID = self.applications["Test Application"], systemContext = "HMI_OBSCURED" }) -- local function sendReponse() - + -- --hmi side: sending the response -- self.hmiConnection:SendError(data.id, data.method, "GENERIC_ERROR", testData[i].value) @@ -1591,10 +1600,10 @@ local function verify_info_parameter() -- self.hmiConnection:SendNotification("UI.OnSystemContext",{ appID = self.applications["Test Application"], systemContext = "MAIN" }) -- end -- RUN_AFTER(sendReponse, 1000) - + -- end) - - -- --mobile side: expect OnHashChange notification + + -- --mobile side: expect OnHashChange notification -- self:expectOnHMIStatusWithAudioStateChanged() -- --mobile side: expect the response @@ -1603,31 +1612,31 @@ local function verify_info_parameter() -- if data.payload.info then -- commonFunctions:printError(" SDL resends info parameter to mobile app. info = \"" .. data.payload.info .. "\"") -- return false - -- else + -- else -- return true -- end - - -- end) + + -- end) -- end -- ----------------------------------------------------------------------------------------- - + -- end ----------------------------------------------------------------------------------------- - -end + +end verify_info_parameter() ----------------------------------------------------------------------------------------------- ---Parameter 4: correlationID +--Parameter 4: correlationID ----------------------------------------------------------------------------------------------- ---List of test cases: +--List of test cases: --1. IsMissed --2. IsNonexistent --3. IsWrongType - --4. IsNegative + --4. IsNegative ----------------------------------------------------------------------------------------------- --ToDo: Update according to APPLINK-16111: Clarify SDL behaviors when HMI responses invalid correlationId or invalid method local function verify_correlationID_parameter() @@ -1635,17 +1644,17 @@ local function verify_correlationID_parameter() --Print new line to separate new test cases group commonFunctions:newTestCasesGroup("TestCaseGroupForCorrelationIDParameter") - + ----------------------------------------------------------------------------------------- - - --1. IsMissed + + --1. IsMissed Test[APIName.."_Response_CorrelationID_IsMissed_SendResponse"] = function(self) - + --mobile side: sending the request local Request = self:createRequest() local cid = self.mobileSession:SendRPC(APIName, Request) - + --hmi side: expect the request local UIRequest = self:createUIParameters(Request) EXPECT_HMICALL("UI.Slider", UIRequest) @@ -1654,7 +1663,7 @@ local function verify_correlationID_parameter() self.hmiConnection:SendNotification("UI.OnSystemContext",{ appID = self.applications["Test Application"], systemContext = "HMI_OBSCURED" }) local function sendReponse() - + --hmi side: sending the response --self.hmiConnection:Send('{"id":'..tostring(data.id)..',"jsonrpc":"2.0","result":{"method":"UI.Slider","code":0}}') self.hmiConnection:Send('{"jsonrpc":"2.0","result":{"method":"UI.Slider", "code":0}}') @@ -1662,27 +1671,27 @@ local function verify_correlationID_parameter() --HMI sends UI.OnSystemContext self.hmiConnection:SendNotification("UI.OnSystemContext",{ appID = self.applications["Test Application"], systemContext = "MAIN" }) end - RUN_AFTER(sendReponse, 1000) - + RUN_AFTER(sendReponse, 1000) + end) - --mobile side: expect OnHashChange notification + --mobile side: expect OnHashChange notification self:expectOnHMIStatusWithAudioStateChanged() --mobile side: expect the response EXPECT_RESPONSE(cid, { success = false, resultCode = "GENERIC_ERROR"}) :Timeout(13000) - + end ----------------------------------------------------------------------------------------- - + Test[APIName.."_Response_CorrelationID_IsMissed_SendError"] = function(self) - + --mobile side: sending the request local Request = self:createRequest() local cid = self.mobileSession:SendRPC("Slider", Request) - + --hmi side: expect the request local UIRequest = self:createUIParameters(Request) EXPECT_HMICALL("UI.Slider", UIRequest) @@ -1691,77 +1700,77 @@ local function verify_correlationID_parameter() self.hmiConnection:SendNotification("UI.OnSystemContext",{ appID = self.applications["Test Application"], systemContext = "HMI_OBSCURED" }) local function sendReponse() - + --hmi side: sending the response --self.hmiConnection:Send('{"id":'..tostring(data.id)..',"jsonrpc":"2.0","error":{"data":{"method":"UI.Slider"},"code":22,"message":"The unknown issue occurred"}}') self.hmiConnection:Send('{"jsonrpc":"2.0","error":{"data":{"method":"UI.Slider"},"code":22,"message":"The unknown issue occurred"}}') - + --HMI sends UI.OnSystemContext self.hmiConnection:SendNotification("UI.OnSystemContext",{ appID = self.applications["Test Application"], systemContext = "MAIN" }) end RUN_AFTER(sendReponse, 1000) - + end) - --mobile side: expect OnHashChange notification + --mobile side: expect OnHashChange notification self:expectOnHMIStatusWithAudioStateChanged() - + --mobile side: expect the response EXPECT_RESPONSE(cid, { success = false, resultCode = "GENERIC_ERROR"}) :Timeout(13000) - + end ----------------------------------------------------------------------------------------- - + --2. IsNonexistent Test[APIName.."_Response_CorrelationID_IsNonexistent_SendResponse"] = function(self) - + --mobile side: sending the request local Request = self:createRequest() local cid = self.mobileSession:SendRPC(APIName, Request) - + --hmi side: expect the request local UIRequest = self:createUIParameters(Request) EXPECT_HMICALL("UI.Slider", UIRequest) :Do(function(_,data) - + --HMI sends UI.OnSystemContext self.hmiConnection:SendNotification("UI.OnSystemContext",{ appID = self.applications["Test Application"], systemContext = "HMI_OBSCURED" }) local function sendReponse() - + --hmi side: sending the response --self.hmiConnection:Send('{"id":'..tostring(data.id)..',"jsonrpc":"2.0","result":{"method":"UI.Slider","code":0}}') self.hmiConnection:Send('{"id":'..tostring(5555)..',"jsonrpc":"2.0","result":{"method":"UI.Slider","code":0}}') - + --HMI sends UI.OnSystemContext self.hmiConnection:SendNotification("UI.OnSystemContext",{ appID = self.applications["Test Application"], systemContext = "MAIN" }) end RUN_AFTER(sendReponse, 1000) - + end) - --mobile side: expect OnHashChange notification + --mobile side: expect OnHashChange notification self:expectOnHMIStatusWithAudioStateChanged() - + --mobile side: expect the response EXPECT_RESPONSE(cid, { success = false, resultCode = "GENERIC_ERROR"}) :Timeout(13000) - + end ----------------------------------------------------------------------------------------- - + Test[APIName.."_Response_CorrelationID_IsNonexistent_SendError"] = function(self) - + --mobile side: sending the request local Request = self:createRequest() local cid = self.mobileSession:SendRPC("Slider", Request) - + --hmi side: expect the request local UIRequest = self:createUIParameters(Request) EXPECT_HMICALL("UI.Slider", UIRequest) @@ -1773,33 +1782,33 @@ local function verify_correlationID_parameter() --hmi side: sending the response --self.hmiConnection:Send('{"id":'..tostring(data.id)..',"jsonrpc":"2.0","error":{"data":{"method":"UI.Slider"},"code":22,"message":"The unknown issue occurred"}}') self.hmiConnection:Send('{"id":'..tostring(5555)..',"jsonrpc":"2.0","error":{"data":{"method":"UI.Slider"},"code":22,"message":"The unknown issue occurred"}}') - + --HMI sends UI.OnSystemContext self.hmiConnection:SendNotification("UI.OnSystemContext",{ appID = self.applications["Test Application"], systemContext = "MAIN" }) end RUN_AFTER(sendReponse, 1000) - + end) - - --mobile side: expect OnHashChange notification + + --mobile side: expect OnHashChange notification self:expectOnHMIStatusWithAudioStateChanged() --mobile side: expect the response EXPECT_RESPONSE(cid, { success = false, resultCode = "GENERIC_ERROR"}) :Timeout(13000) - + end ----------------------------------------------------------------------------------------- - + --3. IsWrongType Test[APIName.."_Response_CorrelationID_IsWrongType_SendResponse"] = function(self) - + --mobile side: sending the request local Request = self:createRequest() local cid = self.mobileSession:SendRPC(APIName, Request) - + --hmi side: expect the request local UIRequest = self:createUIParameters(Request) EXPECT_HMICALL("UI.Slider", UIRequest) @@ -1808,35 +1817,35 @@ local function verify_correlationID_parameter() self.hmiConnection:SendNotification("UI.OnSystemContext",{ appID = self.applications["Test Application"], systemContext = "HMI_OBSCURED" }) local function sendReponse() - + --hmi side: sending the response --self.hmiConnection:SendResponse(data.id, data.method, "SUCCESS", {info = "info message"}) self.hmiConnection:SendResponse(tostring(data.id), data.method, "SUCCESS", {info = "info message"}) - + --HMI sends UI.OnSystemContext self.hmiConnection:SendNotification("UI.OnSystemContext",{ appID = self.applications["Test Application"], systemContext = "MAIN" }) end RUN_AFTER(sendReponse, 1000) - + end) - --mobile side: expect OnHashChange notification + --mobile side: expect OnHashChange notification self:expectOnHMIStatusWithAudioStateChanged() - + --mobile side: expect the response EXPECT_RESPONSE(cid, { success = false, resultCode = "GENERIC_ERROR"}) :Timeout(13000) - + end ----------------------------------------------------------------------------------------- - + Test[APIName.."_Response_CorrelationID_IsWrongType_SendError"] = function(self) - + --mobile side: sending the request local Request = self:createRequest() local cid = self.mobileSession:SendRPC(APIName, Request) - + --hmi side: expect the request local UIRequest = self:createUIParameters(Request) EXPECT_HMICALL("UI.Slider", UIRequest) @@ -1848,17 +1857,17 @@ local function verify_correlationID_parameter() --hmi side: sending the response --self.hmiConnection:SendError(data.id, data.method, "REJECTED", "error message") self.hmiConnection:SendError(tostring(data.id), data.method, "REJECTED", "error message") - + --HMI sends UI.OnSystemContext self.hmiConnection:SendNotification("UI.OnSystemContext",{ appID = self.applications["Test Application"], systemContext = "MAIN" }) end RUN_AFTER(sendReponse, 1000) - + end) - --mobile side: expect OnHashChange notification + --mobile side: expect OnHashChange notification self:expectOnHMIStatusWithAudioStateChanged() - + --mobile side: expect the response EXPECT_RESPONSE(cid, { success = false, resultCode = "GENERIC_ERROR"}) :Timeout(13000) @@ -1866,14 +1875,14 @@ local function verify_correlationID_parameter() end ----------------------------------------------------------------------------------------- - --4. IsNegative + --4. IsNegative Test[APIName.."_Response_CorrelationID_IsNegative_SendResponse"] = function(self) - + --mobile side: sending the request local Request = self:createRequest() local cid = self.mobileSession:SendRPC(APIName, Request) - + --hmi side: expect the request local UIRequest = self:createUIParameters(Request) EXPECT_HMICALL("UI.Slider", UIRequest) @@ -1882,35 +1891,35 @@ local function verify_correlationID_parameter() self.hmiConnection:SendNotification("UI.OnSystemContext",{ appID = self.applications["Test Application"], systemContext = "HMI_OBSCURED" }) local function sendReponse() - + --hmi side: sending the response --self.hmiConnection:SendResponse(data.id, data.method, "SUCCESS", {info = "info message"}) self.hmiConnection:SendResponse(-1, data.method, "SUCCESS", {info = "info message"}) - + --HMI sends UI.OnSystemContext self.hmiConnection:SendNotification("UI.OnSystemContext",{ appID = self.applications["Test Application"], systemContext = "MAIN" }) end RUN_AFTER(sendReponse, 1000) - + end) - --mobile side: expect OnHashChange notification + --mobile side: expect OnHashChange notification self:expectOnHMIStatusWithAudioStateChanged() - + --mobile side: expect the response EXPECT_RESPONSE(cid, { success = false, resultCode = "GENERIC_ERROR"}) :Timeout(13000) - + end ----------------------------------------------------------------------------------------- - + Test[APIName.."_Response_CorrelationID_IsNegative_SendError"] = function(self) - + --mobile side: sending the request local Request = self:createRequest() local cid = self.mobileSession:SendRPC(APIName, Request) - + --hmi side: expect the request local UIRequest = self:createUIParameters(Request) EXPECT_HMICALL("UI.Slider", UIRequest) @@ -1919,22 +1928,22 @@ local function verify_correlationID_parameter() self.hmiConnection:SendNotification("UI.OnSystemContext",{ appID = self.applications["Test Application"], systemContext = "HMI_OBSCURED" }) local function sendReponse() - + --hmi side: sending the response --self.hmiConnection:SendError(data.id, data.method, "REJECTED", "error message") self.hmiConnection:SendError(-1, data.method, "REJECTED", "error message") - + --HMI sends UI.OnSystemContext self.hmiConnection:SendNotification("UI.OnSystemContext",{ appID = self.applications["Test Application"], systemContext = "MAIN" }) end RUN_AFTER(sendReponse, 1000) - - + + end) - --mobile side: expect OnHashChange notification + --mobile side: expect OnHashChange notification self:expectOnHMIStatusWithAudioStateChanged() - + --mobile side: expect the response EXPECT_RESPONSE(cid, { success = false, resultCode = "GENERIC_ERROR"}) :Timeout(13000) @@ -1943,14 +1952,14 @@ local function verify_correlationID_parameter() ----------------------------------------------------------------------------------------- - --5. IsNull + --5. IsNull Test[APIName.."_Response_CorrelationID_IsNull_SendResponse"] = function(self) - + --mobile side: sending the request local Request = self:createRequest() local cid = self.mobileSession:SendRPC(APIName, Request) - + --hmi side: expect the request local UIRequest = self:createUIParameters(Request) EXPECT_HMICALL("UI.Slider", UIRequest) @@ -1959,35 +1968,35 @@ local function verify_correlationID_parameter() self.hmiConnection:SendNotification("UI.OnSystemContext",{ appID = self.applications["Test Application"], systemContext = "HMI_OBSCURED" }) local function sendReponse() - + --hmi side: sending the response --self.hmiConnection:Send('{"id":'..tostring(data.id)..',"jsonrpc":"2.0","result":{"method":"UI.Slider","code":0}}') self.hmiConnection:Send('{"id":null,"jsonrpc":"2.0","result":{"method":"UI.Slider","code":0}}') - + --HMI sends UI.OnSystemContext self.hmiConnection:SendNotification("UI.OnSystemContext",{ appID = self.applications["Test Application"], systemContext = "MAIN" }) end RUN_AFTER(sendReponse, 1000) - + end) - --mobile side: expect OnHashChange notification + --mobile side: expect OnHashChange notification self:expectOnHMIStatusWithAudioStateChanged() - + --mobile side: expect the response EXPECT_RESPONSE(cid, { success = false, resultCode = "GENERIC_ERROR"}) :Timeout(13000) - + end ----------------------------------------------------------------------------------------- - + Test[APIName.."_Response_CorrelationID_IsNull_SendError"] = function(self) - + --mobile side: sending the request local Request = self:createRequest() local cid = self.mobileSession:SendRPC(APIName, Request) - + --hmi side: expect the request local UIRequest = self:createUIParameters(Request) EXPECT_HMICALL("UI.Slider", UIRequest) @@ -1996,30 +2005,30 @@ local function verify_correlationID_parameter() self.hmiConnection:SendNotification("UI.OnSystemContext",{ appID = self.applications["Test Application"], systemContext = "HMI_OBSCURED" }) local function sendReponse() - + --hmi side: sending the response --self.hmiConnection:Send('{"id":'..tostring(data.id)..',"jsonrpc":"2.0","error":{"data":{"method":"UI.Slider"},"code":22,"message":"The unknown issue occurred"}}') self.hmiConnection:Send('{"id":null,"jsonrpc":"2.0","error":{"data":{"method":"UI.Slider"},"code":22,"message":"The unknown issue occurred"}}') - + --HMI sends UI.OnSystemContext self.hmiConnection:SendNotification("UI.OnSystemContext",{ appID = self.applications["Test Application"], systemContext = "MAIN" }) end RUN_AFTER(sendReponse, 1000) - - + + end) - --mobile side: expect OnHashChange notification + --mobile side: expect OnHashChange notification self:expectOnHMIStatusWithAudioStateChanged() - + --mobile side: expect the response EXPECT_RESPONSE(cid, { success = false, resultCode = "GENERIC_ERROR"}) :Timeout(13000) end ----------------------------------------------------------------------------------------- - -end + +end verify_correlationID_parameter() @@ -2053,34 +2062,34 @@ integerParameterInResponse:verify_Integer_Parameter(Response, {"sliderPosition"} --Begin Test case SpecialResponseChecks --Description: Check all negative response cases - - --Requirement id in JAMA: + + --Requirement id in JAMA: --SDLAQ-CRS-118 (Slider_Response_v2_0) --SDLAQ-CRS-659 (GENERIC_ERROR) - ---ToDo: Update according to APPLINK-16111: Clarify SDL behaviors when HMI responses invalid correlationId or invalid method + +--ToDo: Update according to APPLINK-16111: Clarify SDL behaviors when HMI responses invalid correlationId or invalid method local function SpecialResponseChecks() --Print new line to separate new test cases group commonFunctions:newTestCasesGroup("Test suite: Special Response Checks") ---------------------------------------------------------------------------------------------- - + --Begin Test case NegativeResponseCheck.1 --Description: Invalid JSON - + --Requirement id in JAMA: SDLAQ-CRS-118 - --Verification criteria: - + --Verification criteria: + --[[ToDo: Update after implemented CRS APPLINK-14756: SDL must cut off the fake parameters from requests, responses and notifications received from HMI - + function Test:Slider_Response_IsInvalidJson() - + --mobile side: sending the request local Request = self:createRequest() local cid = self.mobileSession:SendRPC(APIName, Request) - + --hmi side: expect the request local UIRequest = self:createUIParameters(Request) EXPECT_HMICALL("UI.Slider", UIRequest) @@ -2089,7 +2098,7 @@ local function SpecialResponseChecks() self.hmiConnection:SendNotification("UI.OnSystemContext",{ appID = self.applications["Test Application"], systemContext = "HMI_OBSCURED" }) local function sendReponse() - + --hmi side: sending the response --":" is changed by ";" after {"id" --self.hmiConnection:Send('{"id":'..tostring(data.id)..',"jsonrpc":"2.0","result":{"method":"UI.Slider","code":0,"sliderPosition":1}}') @@ -2099,45 +2108,45 @@ local function SpecialResponseChecks() self.hmiConnection:SendNotification("UI.OnSystemContext",{ appID = self.applications["Test Application"], systemContext = "MAIN" }) end RUN_AFTER(sendReponse, 1000) - + end) - - --mobile side: expect OnHashChange notification + + --mobile side: expect OnHashChange notification self:expectOnHMIStatusWithAudioStateChanged() - + --mobile side: expect the response EXPECT_RESPONSE(cid, { success = false, resultCode = "GENERIC_ERROR" }) :Timeout(12000) - - end - ]] + + end + ]] --End Test case NegativeResponseCheck.1 - + --Begin Test case NegativeResponseCheck.2 --Description: Check processing response with fake parameters - - --Verification criteria: When expected HMI function is received, send responses from HMI with fake parameter - + + --Verification criteria: When expected HMI function is received, send responses from HMI with fake parameter + --Begin Test case NegativeResponseCheck.2.1 --Description: Parameter is not from API - + function Test:Slider_Response_FakeParams_IsNotFromAnyAPI_SUCCESS() - + --mobile side: sending the request local Request = self:createRequest() local cid = self.mobileSession:SendRPC(APIName, Request) - + --hmi side: expect the request local UIRequest = self:createUIParameters(Request) - EXPECT_HMICALL("UI.Slider", UIRequest) + EXPECT_HMICALL("UI.Slider", UIRequest) :Do(function(exp,data) --HMI sends UI.OnSystemContext self.hmiConnection:SendNotification("UI.OnSystemContext",{ appID = self.applications["Test Application"], systemContext = "HMI_OBSCURED" }) local function sendReponse() - + --hmi side: sending response self.hmiConnection:SendResponse(data.id, data.method, "SUCCESS",{sliderPosition = 1, fake = 123}) @@ -2145,47 +2154,47 @@ local function SpecialResponseChecks() self.hmiConnection:SendNotification("UI.OnSystemContext",{ appID = self.applications["Test Application"], systemContext = "MAIN" }) end RUN_AFTER(sendReponse, 1000) - + end) - - - --mobile side: expect OnHashChange notification + + + --mobile side: expect OnHashChange notification self:expectOnHMIStatusWithAudioStateChanged() - + --mobile side: expect the response EXPECT_RESPONSE(cid, { success = true, resultCode = "SUCCESS", sliderPosition = 1}) :ValidIf (function(_,data) if data.payload.fake then commonFunctions:printError(" SDL resend fake parameter to mobile app ") return false - else + else return true end end) - - end - + + end + --End Test case NegativeResponseCheck.2.1 - - + + --Begin Test case NegativeResponseCheck.2.2 --Description: Parameter is from another API - + function Test:Slider_Response_FakeParams_IsFromAnotherAPI() - + --mobile side: sending the request local Request = self:createRequest() local cid = self.mobileSession:SendRPC(APIName, Request) - + --hmi side: expect the request local UIRequest = self:createUIParameters(Request) - EXPECT_HMICALL("UI.Slider", UIRequest) + EXPECT_HMICALL("UI.Slider", UIRequest) :Do(function(exp,data) --HMI sends UI.OnSystemContext self.hmiConnection:SendNotification("UI.OnSystemContext",{ appID = self.applications["Test Application"], systemContext = "HMI_OBSCURED" }) local function sendReponse() - + --hmi side: sending response self.hmiConnection:SendResponse(data.id, data.method, "SUCCESS", {sliderPosition = 1, IsReady = true}) @@ -2193,36 +2202,36 @@ local function SpecialResponseChecks() self.hmiConnection:SendNotification("UI.OnSystemContext",{ appID = self.applications["Test Application"], systemContext = "MAIN" }) end RUN_AFTER(sendReponse, 1000) - + end) - - --mobile side: expect OnHashChange notification + + --mobile side: expect OnHashChange notification self:expectOnHMIStatusWithAudioStateChanged() - + --mobile side: expect the response EXPECT_RESPONSE(cid, { success = true, resultCode = "SUCCESS", sliderPosition = 1}) :ValidIf (function(_,data) if data.payload.IsReady then commonFunctions:printError(" SDL resend fake parameter to mobile app ") return false - else + else return true end end) - - end - + + end + --End Test case NegativeResponseCheck.2.2 - + --Begin Test case NegativeResponseCheck.2.3 --Description: Fake parameter and invalid response - + function Test:Slider_Response_FakeParamsAndInvalidResponse() - + --mobile side: sending the request local Request = self:createRequest() local cid = self.mobileSession:SendRPC(APIName, Request) - + --hmi side: expect the request local UIRequest = self:createUIParameters(Request) EXPECT_HMICALL("UI.Slider", UIRequest) @@ -2231,7 +2240,7 @@ local function SpecialResponseChecks() self.hmiConnection:SendNotification("UI.OnSystemContext",{ appID = self.applications["Test Application"], systemContext = "HMI_OBSCURED" }) local function sendReponse() - + --hmi side: sending response --self.hmiConnection:Send('{"id":'..tostring(data.id)..',"jsonrpc":"2.0","result":{"method":"UI.Slider","code":0,"sliderPosition":1}}') self.hmiConnection:Send('{"id":'..tostring(data.id)..',"jsonrpc":"2.0","result":{"method":"UI.Slider","fake":0,"sliderPosition":1}}') @@ -2240,12 +2249,12 @@ local function SpecialResponseChecks() self.hmiConnection:SendNotification("UI.OnSystemContext",{ appID = self.applications["Test Application"], systemContext = "MAIN" }) end RUN_AFTER(sendReponse, 1000) - + end) - - --mobile side: expect OnHashChange notification + + --mobile side: expect OnHashChange notification self:expectOnHMIStatusWithAudioStateChanged() - + --mobile side: expect the response -- TODO: update after resolving APPLINK-14765 -- EXPECT_RESPONSE(cid, { success = false, resultCode = "GENERIC_ERROR", info = "Invalid message received from vehicle"}) @@ -2254,29 +2263,29 @@ local function SpecialResponseChecks() if data.payload.fake then commonFunctions:printError(" SDL resend fake parameter to mobile app ") return false - else + else return true end end) - - end - + + end + --End Test case NegativeResponseCheck.2.3 - + --End Test case NegativeResponseCheck.2 --[[ToDo: Update when APPLINK resolving APPLINK-14776 SDL behavior in case HMI sends invalid message or message with fake parameters --Begin NegativeResponseCheck.5 - --Description: Check processing response without all parameters - - function Test:Slider_Response_IsMissedAllPArameters() - + --Description: Check processing response without all parameters + + function Test:Slider_Response_IsMissedAllPArameters() + --mobile side: sending the request local Request = self:createRequest() local cid = self.mobileSession:SendRPC(APIName, Request) - + --hmi side: expect the request local UIRequest = self:createUIParameters(Request) EXPECT_HMICALL("UI.Slider", UIRequest) @@ -2285,7 +2294,7 @@ local function SpecialResponseChecks() self.hmiConnection:SendNotification("UI.OnSystemContext",{ appID = self.applications["Test Application"], systemContext = "HMI_OBSCURED" }) local function sendReponse() - + --hmi side: sending UI.Slider response self.hmiConnection:Send('{}') @@ -2293,16 +2302,16 @@ local function SpecialResponseChecks() self.hmiConnection:SendNotification("UI.OnSystemContext",{ appID = self.applications["Test Application"], systemContext = "MAIN" }) end RUN_AFTER(sendReponse, 1000) - + end) - - --mobile side: expect OnHashChange notification + + --mobile side: expect OnHashChange notification self:expectOnHMIStatusWithAudioStateChanged() - + --mobile side: expect the response EXPECT_RESPONSE(cid, { success = false, resultCode = "GENERIC_ERROR"}) :Timeout(13000) - + end --End NegativeResponseCheck.5 @@ -2319,7 +2328,7 @@ local function SpecialResponseChecks() --mobile side: sending the request local Request = self:createRequest() local cid = self.mobileSession:SendRPC(APIName, Request) - + --hmi side: expect the request local UIRequest = self:createUIParameters(Request) EXPECT_HMICALL("UI.Slider", UIRequest) @@ -2328,7 +2337,7 @@ local function SpecialResponseChecks() self.hmiConnection:SendNotification("UI.OnSystemContext",{ appID = self.applications["Test Application"], systemContext = "HMI_OBSCURED" }) local function sendReponse() - + --hmi side: sending UI.Slider response --Does not send response @@ -2336,46 +2345,46 @@ local function SpecialResponseChecks() self.hmiConnection:SendNotification("UI.OnSystemContext",{ appID = self.applications["Test Application"], systemContext = "MAIN" }) end RUN_AFTER(sendReponse, 1000) - - end) - - --mobile side: expect OnHashChange notification + + end) + + --mobile side: expect OnHashChange notification self:expectOnHMIStatusWithAudioStateChanged() - + --mobile side: expect the response EXPECT_RESPONSE(cid, { success = false, resultCode = "GENERIC_ERROR"}) :Timeout(12000) - + end - + --End NegativeResponseCheck.6 - + --Begin Test case NegativeResponseCheck.7 --Description: Invalid structure of response - + --Requirement id in JAMA: SDLAQ-CRS-118 - --Verification criteria: The response contains 3 mandatory parameters "success", "ecuHeader" and "resultCode". "info" is sent if there is any additional information about the resultCode. Array of "dtc" data is returned if available. - + --Verification criteria: The response contains 3 mandatory parameters "success", "ecuHeader" and "resultCode". "info" is sent if there is any additional information about the resultCode. Array of "dtc" data is returned if available. + --[[ToDo: Update when APPLINK resolving APPLINK-14776 SDL behavior in case HMI sends invalid message or message with fake parameters - + function Test:Slider_Response_IsInvalidStructure() --mobile side: sending the request local Request = self:createRequest() local cid = self.mobileSession:SendRPC(APIName, Request) - + --hmi side: expect the request local UIRequest = self:createUIParameters(Request) - EXPECT_HMICALL("UI.Slider", UIRequest) + EXPECT_HMICALL("UI.Slider", UIRequest) :Do(function(_,data) --HMI sends UI.OnSystemContext self.hmiConnection:SendNotification("UI.OnSystemContext",{ appID = self.applications["Test Application"], systemContext = "HMI_OBSCURED" }) local function sendReponse() - + --hmi side: sending response --self.hmiConnection:Send('{"id":'..tostring(data.id)..',"jsonrpc":"2.0","result":{"method":"UI.Slider","code":0,"sliderPosition":1}}') self.hmiConnection:Send('{"id":'..tostring(data.id)..',"jsonrpc":"2.0","code":0,"result":{"method":"UI.Slider","sliderPosition":1}}') @@ -2384,131 +2393,131 @@ local function SpecialResponseChecks() self.hmiConnection:SendNotification("UI.OnSystemContext",{ appID = self.applications["Test Application"], systemContext = "MAIN" }) end RUN_AFTER(sendReponse, 1000) - - end) - - --mobile side: expect OnHashChange notification + + end) + + --mobile side: expect OnHashChange notification self:expectOnHMIStatusWithAudioStateChanged() - - --mobile side: expect response + + --mobile side: expect response EXPECT_RESPONSE(cid, { success = false, resultCode = "GENERIC_ERROR", info = "Invalid message received from vehicle"}) :Timeout(12000) - + end ]] - --End Test case NegativeResponseCheck.7 + --End Test case NegativeResponseCheck.7 + - --Begin Test case NegativeResponseCheck.8 --Description: Several response to one request --Requirement id in JAMA: SDLAQ-CRS-118 - - --Verification criteria: The response contains 3 mandatory parameters "success", "ecuHeader" and "resultCode". "info" is sent if there is any additional information about the resultCode. Array of "dtc" data is returned if available. - - + + --Verification criteria: The response contains 3 mandatory parameters "success", "ecuHeader" and "resultCode". "info" is sent if there is any additional information about the resultCode. Array of "dtc" data is returned if available. + + --Begin Test case NegativeResponseCheck.8.1 --Description: Several response to one request - + function Test:Slider_Response_SeveralResponseToOneRequest() --mobile side: sending the request local Request = self:createRequest() local cid = self.mobileSession:SendRPC(APIName, Request) - + --hmi side: expect the request local UIRequest = self:createUIParameters(Request) - EXPECT_HMICALL("UI.Slider", UIRequest) + EXPECT_HMICALL("UI.Slider", UIRequest) :Do(function(exp,data) --HMI sends UI.OnSystemContext self.hmiConnection:SendNotification("UI.OnSystemContext",{ appID = self.applications["Test Application"], systemContext = "HMI_OBSCURED" }) local function sendReponse() - + --hmi side: sending the response self.hmiConnection:SendResponse(data.id, data.method, "SUCCESS", {sliderPosition = 1}) self.hmiConnection:SendResponse(data.id, data.method, "INVALID_DATA", {sliderPosition = 1}) self.hmiConnection:SendResponse(data.id, data.method, "SUCCESS", {sliderPosition = 1}) - + --HMI sends UI.OnSystemContext self.hmiConnection:SendNotification("UI.OnSystemContext",{ appID = self.applications["Test Application"], systemContext = "MAIN" }) end RUN_AFTER(sendReponse, 1000) - + end) - - --mobile side: expect OnHashChange notification + + --mobile side: expect OnHashChange notification self:expectOnHMIStatusWithAudioStateChanged() - - --mobile side: expect response + + --mobile side: expect response local ExpectedResponse = commonFunctions:cloneTable(Response) ExpectedResponse["success"] = true ExpectedResponse["resultCode"] = "SUCCESS" EXPECT_RESPONSE(cid, ExpectedResponse) - - end - + + end + --End Test case NegativeResponseCheck.8.1 - - - + + + --Begin Test case NegativeResponseCheck.8.2 --Description: Several response to one request - + function Test:Slider_Response_WithConstractionsOfResultCodes() --mobile side: sending the request local Request = self:createRequest() local cid = self.mobileSession:SendRPC(APIName, Request) - + --hmi side: expect the request local UIRequest = self:createUIParameters(Request) - EXPECT_HMICALL("UI.Slider", UIRequest) + EXPECT_HMICALL("UI.Slider", UIRequest) :Do(function(exp,data) --HMI sends UI.OnSystemContext self.hmiConnection:SendNotification("UI.OnSystemContext",{ appID = self.applications["Test Application"], systemContext = "HMI_OBSCURED" }) local function sendReponse() - + --hmi side: sending the response --self.hmiConnection:Send('{"id":'..tostring(data.id)..',"jsonrpc":"2.0","result":{"method":"UI.Slider","code":0}}') --self.hmiConnection:Send('{"id":'..tostring(data.id)..',"jsonrpc":"2.0","error":{"data":{"method":"UI.ScrollableMessage"},"code":22,"message":"The unknown issue occurred"}}') - + --response both SUCCESS and GENERIC_ERROR resultCodes self.hmiConnection:Send('{"id":'..tostring(data.id)..',"jsonrpc":"2.0","result":{"method":"UI.Slider","code":0},"error":{"data":{"method":"UI.ScrollableMessage"},"code":5,"message":"The unknown issue occurred"}}') - + --HMI sends UI.OnSystemContext self.hmiConnection:SendNotification("UI.OnSystemContext",{ appID = self.applications["Test Application"], systemContext = "MAIN" }) end RUN_AFTER(sendReponse, 1000) - + end) - - --mobile side: expect OnHashChange notification - self:expectOnHMIStatusWithAudioStateChanged() - - --mobile side: expect response + + --mobile side: expect OnHashChange notification + self:expectOnHMIStatusWithAudioStateChanged() + + --mobile side: expect response -- TODO: update after resolving APPLINK-14765 -- EXPECT_RESPONSE(cid, { success = false, resultCode = "GENERIC_ERROR", info = "Invalid message received from vehicle"}) EXPECT_RESPONSE(cid, { success = false, resultCode = "GENERIC_ERROR"}) :Timeout(13000) - - end - + + end + --End Test case NegativeResponseCheck.8.2 ----------------------------------------------------------------------------------------- --End Test case NegativeResponseCheck.8 - + end SpecialResponseChecks() ---End Test case NegativeResponseCheck +--End Test case NegativeResponseCheck + - ----------------------------------------------------------------------------------------------- -------------------------------------------TEST BLOCK V---------------------------------------- -------------------------------------Checks All Result Codes----------------------------------- @@ -2517,7 +2526,7 @@ SpecialResponseChecks() --Begin Test case ResultCodeChecks --Description: Check all resultCodes - --Requirement id in JAMA: + --Requirement id in JAMA: --SDLAQ-CRS-661 (SUCCESS) --SDLAQ-CRS-653 (INVALID_DATA) --SDLAQ-CRS-654 (OUT_OF_MEMORY) @@ -2530,18 +2539,18 @@ SpecialResponseChecks() --SDLAQ-CRS-1032 (UNSUPPORTED_RESOURCE) --SDLAQ-CRS-2904 (TIMED_OUT) - + local function ResultCodeChecks() --Print new line to separate new test cases group commonFunctions:newTestCasesGroup("Test Suite: resultCodes Checks") ---------------------------------------------------------------------------------------------- - + --SUCCESS: Covered by many test cases. --INVALID_DATA: Covered by many test cases. --OUT_OF_MEMORY: ToDo: Wait until requirement is clarified - --TOO_MANY_PENDING_REQUESTS: It is moved to other script. + --TOO_MANY_PENDING_REQUESTS: It is moved to other script. --GENERIC_ERROR: Covered by test case Slider_NoResponse --REJECTED, ABORTED, UNSUPPORTED_RESOURCE, TIMED_OUT: Covered by test case resultCode_IsValidValue ----------------------------------------------------------------------------------------- @@ -2551,35 +2560,35 @@ local function ResultCodeChecks() --Requirement id in JAMA: SDLAQ-CRS-656 --Verification criteria: SDL sends APPLICATION_NOT_REGISTERED code when the app sends a request within the same connection before RegisterAppInterface has been performed yet. - + commonTestCases:verifyResultCode_APPLICATION_NOT_REGISTERED() - + --End Test case ResultCodeChecks.1 ----------------------------------------------------------------------------------------- --Begin Test case ResultCodeChecks.2 --Description: Check resultCode DISALLOWED - + --Requirement id in JAMA: SDLAQ-CRS-660 - --Verification criteria: + --Verification criteria: --1. SDL must return "resultCode: DISALLOWED, success:false" to the RPC in case this RPC is omitted in the PolicyTable group(s) assigned to the app that requests this RPC. - --2. SDL must return "resultCode: DISALLOWED, success:false" to the RPC in case this RPC is included to the PolicyTable group(s) assigned to the app that requests this RPC and the group has not yet received user's consents. + --2. SDL must return "resultCode: DISALLOWED, success:false" to the RPC in case this RPC is included to the PolicyTable group(s) assigned to the app that requests this RPC and the group has not yet received user's consents. --SDL must return "resultCode: USER_DISALLOWED, success:false" to the RPC in case this RPC exists in the PolicyTable group disallowed by the user. - + --[[TODO debug after resolving APPLINK-13101 --Begin Test case ResultCodeChecks.2.1 --Description: 1. SDL must return "resultCode: DISALLOWED, success:false" to the RPC in case this RPC is omitted in the PolicyTable group(s) assigned to the app that requests this RPC. - - policyTable:checkPolicyWhenAPIIsNotExist() - + + policyTable:checkPolicyWhenAPIIsNotExist() + --End Test case ResultCodeChecks.2.1 - - + + --Begin Test case ResultCodeChecks.2.2 - --Description: + --Description: --SDL must return "resultCode: DISALLOWED, success:false" to the RPC in case this RPC is included to the PolicyTable group(s) assigned to the app that requests this RPC and the group has not yet received user's consents. --SDL must return "resultCode: USER_DISALLOWED, success:false" to the RPC in case this RPC exists in the PolicyTable group disallowed by the user. - + policyTable:checkPolicyWhenUserDisallowed({"FULL"}) ]] --End Test case ResultCodeChecks.2.2 @@ -2587,7 +2596,7 @@ local function ResultCodeChecks() --End Test case ResultCodeChecks.2 ----------------------------------------------------------------------------------------- - + end ResultCodeChecks() @@ -2604,42 +2613,42 @@ ResultCodeChecks() --Begin Test suit SequenceChecks --Description: TC's checks SDL behavior by processing -- different request sequence with timeout - -- with emulating of user's actions - + -- with emulating of user's actions + local function SequenceChecks() --Print new line to separate new test cases group commonFunctions:newTestCasesGroup("Test Suite For Sequence Checks") ---------------------------------------------------------------------------------------------- - + --List of test cases covered by others: ---------------------------------------------------------------------------------------------- - --TC_Slider_01: SDLAQ-TC-39: Call Slider request from mobile app on HMI and close it on HMI (SUCCESS resultCode and sliderPosition is in response). + --TC_Slider_01: SDLAQ-TC-39: Call Slider request from mobile app on HMI and close it on HMI (SUCCESS resultCode and sliderPosition is in response). -->Covered by test case lower bound and upper bound of sliderPosition. --TC_Slider_02: SDLAQ-TC-40: Call Slider request from mobile app on HMI and close it by click on Back button on UI (ABORTED response code). -->Covered by test case resultCode_IsValidValue ABORTED - --TC_Slider_04: SDLAQ-TC-138: Call Slider request from mobile app on HMI with timeout min value=1000. + --TC_Slider_04: SDLAQ-TC-138: Call Slider request from mobile app on HMI with timeout min value=1000. -->Covered by test case timeout IsLowerBound. - --TC_Slider_06: SDLAQ-TC-247: Checking Text footer displaying. It is test case to check HMI. + --TC_Slider_06: SDLAQ-TC-247: Checking Text footer displaying. It is test case to check HMI. -->It is out of scope of ATF script. - - + + --List of new developing test cases: ---------------------------------------------------------------------------------------------- --TC_Slider_03: SDLAQ-TC-137: Call Slider request from mobile app on HMI while another Slider is active (REJECTED response code) --TC_Slider_05: SDLAQ-TC-246: Checking that the sliding control resets timeout. Scrolling control, waiting 5 seconds, scrolling control again, checking renewing timeout. - - - + + + --Begin Test case SequenceChecks.1 --Description: Check for manual test case TC_Slider_03 --Requirement id in JAMA: SDLAQ-TC-137 --Verification criteria: Call Slider request from mobile app on HMI while another Slider is active (REJECTED response code) - + function Test:Slider_TC_Slider_03() - + --mobile side: sending the request local Request = { numTicks = 26, @@ -2648,7 +2657,7 @@ local function SequenceChecks() sliderFooter = {"Slider Footer 1"}, timeout = 60000 } - + local cid = self.mobileSession:SendRPC("Slider", Request) local Request2 = { @@ -2658,26 +2667,26 @@ local function SequenceChecks() sliderFooter = {"Slider Footer 2"}, timeout = 15000 } - + --hmi side: expect the request local UIRequest = self:createUIParameters(Request) local UIRequest2 = self:createUIParameters(Request2) EXPECT_HMICALL("UI.Slider", UIRequest, UIRequest2) :Do(function(_,data) - + if exp.occurences == 1 then --HMI sends UI.OnSystemContext self.hmiConnection:SendNotification("UI.OnSystemContext",{ appID = self.applications["Test Application"], systemContext = "HMI_OBSCURED" }) - local function sendSecondRequest() + local function sendSecondRequest() local cid2 = self.mobileSession:SendRPC("Slider", Request2) EXPECT_RESPONSE(cid2, { success = false, resultCode = "REJECTED"}) end RUN_AFTER(sendSecondRequest, 1000) - + local function sendReponse() - + --hmi side: sending response self.hmiConnection:SendResponse(data.id, data.method, "TIMED_OUT", {}) @@ -2685,34 +2694,34 @@ local function SequenceChecks() self.hmiConnection:SendNotification("UI.OnSystemContext",{ appID = self.applications["Test Application"], systemContext = "MAIN" }) end RUN_AFTER(sendReponse, 2000) - + else --hmi side: sending response self.hmiConnection:SendResponse(data.id, data.method, "REJECTED", {}) end - + end) :Times(2) - --mobile side: expect OnHashChange notification + --mobile side: expect OnHashChange notification self:expectOnHMIStatusWithAudioStateChanged() - + --mobile side: expect the response EXPECT_RESPONSE(cid, { success = false, resultCode = "TIMED_OUT"}) - + end --End Test case SequenceChecks.1 ----------------------------------------------------------------------------------------- - + --Begin Test case SequenceChecks.2 --Description: Check for manual test case TC_Slider_05 --Requirement id in JAMA: SDLAQ-TC-246 --Verification criteria: Checking that the sliding control resets timeout. Scrolling control, waiting 5 seconds, scrolling control again, checking renewing timeout. - + function Test:Slider_TC_Slider_05() - + --mobile side: sending the request local Request = { numTicks = 26, @@ -2721,30 +2730,30 @@ local function SequenceChecks() sliderFooter = {"Slider Footer"}, timeout = 10000 } - + local cid = self.mobileSession:SendRPC("Slider", Request) --hmi side: expect the request local UIRequest = self:createUIParameters(Request) EXPECT_HMICALL("UI.Slider", UIRequest) :Do(function(_,data) - + --HMI sends UI.OnSystemContext self.hmiConnection:SendNotification("UI.OnSystemContext",{ appID = self.applications["Test Application"], systemContext = "HMI_OBSCURED" }) - + local function SendOnResetTimeout() self.hmiConnection:SendNotification("UI.OnResetTimeout", {appID = self.applications["Test Application"], methodName = "UI.Slider"}) end - + --send UI.OnResetTimeout notification after 1 seconds RUN_AFTER(SendOnResetTimeout, 1000) - + --send UI.OnResetTimeout notification after +5 seconds RUN_AFTER(SendOnResetTimeout, 6000) - + local function sendReponse() - + --hmi side: sending response self.hmiConnection:SendResponse(data.id, data.method, "TIMED_OUT", {}) @@ -2753,26 +2762,26 @@ local function SequenceChecks() end --hmi side: sending response after + 10 seconds RUN_AFTER(sendReponse, 15000) - + end) - --mobile side: expect OnHashChange notification + --mobile side: expect OnHashChange notification self:expectOnHMIStatusWithAudioStateChanged("FULL", 20000, 2) - + --mobile side: expect the response EXPECT_RESPONSE(cid, { success = false, resultCode = "TIMED_OUT"}) :Timeout(20000) - + end - + --End Test case SequenceChecks.2 ----------------------------------------------------------------------------------------- - + end SequenceChecks() ---End Test suit SequenceChecks +--End Test suit SequenceChecks @@ -2781,7 +2790,7 @@ SequenceChecks() -----------------------------------------TEST BLOCK VII--------------------------------------- --------------------------------------Different HMIStatus------------------------------------- ---------------------------------------------------------------------------------------------- - + --SDLAQ-CRS-804: HMI Status Requirement for Slider --Verification Criteria: --SDL rejects Slider request with REJECTED resultCode when current HMI level is NONE or BACKGROUND or LIMITED. @@ -2792,4 +2801,17 @@ commonTestCases:verifyDifferentHMIStatus("DISALLOWED", "DISALLOWED", "DISALLOWED -return Test \ No newline at end of file +--------------------------------------------------------------------------------------------- +-------------------------------------------Postcondition------------------------------------- +--------------------------------------------------------------------------------------------- + + --Print new line to separate Postconditions + commonFunctions:newTestCasesGroup("Postconditions") + + + --Restore sdl_preloaded_pt.json + policyTable:Restore_preloaded_pt() + + + + return Test diff --git a/test_scripts/ATF_Speak.lua b/test_scripts/API/ATF_Speak.lua similarity index 91% rename from test_scripts/ATF_Speak.lua rename to test_scripts/API/ATF_Speak.lua index bca873246c..fff9b78424 100644 --- a/test_scripts/ATF_Speak.lua +++ b/test_scripts/API/ATF_Speak.lua @@ -11,20 +11,25 @@ local module = require('testbase') --------------------------------------------------------------------------------------------- -----------------------------Required Shared Libraries--------------------------------------- --------------------------------------------------------------------------------------------- + +require('user_modules/AppTypes') local commonFunctions = require('user_modules/shared_testcases/commonFunctions') local commonSteps = require('user_modules/shared_testcases/commonSteps') -local policyTable = require('user_modules/shared_testcases/testCasesForPolicyTable') +local commonPreconditions = require('user_modules/shared_testcases/commonPreconditions') local commonTestCases = require('user_modules/shared_testcases/commonTestCases') +local policyTable = require('user_modules/shared_testcases/testCasesForPolicyTable') +local integerParameter = require('user_modules/shared_testcases/testCasesForIntegerParameter') +local stringParameter = require('user_modules/shared_testcases/testCasesForStringParameter') +local arraySoftButtonsParameter = require('user_modules/shared_testcases/testCasesForArraySoftButtonsParameter') local arrayTTSChunks = require('user_modules/shared_testcases/testCasesForArrayTTSChunksParameter') -require('user_modules/AppTypes') - -config.deviceMAC = "12ca17b49af2289436f303e0166030a21e525d266e209267433801a8fd4071a0" --------------------------------------------------------------------------------------------- ------------------------------------ Common Variables --------------------------------------- --------------------------------------------------------------------------------------------- APIName = "Speak" -- set request name -strMaxLengthFileName255 = string.rep("a", 251) .. ".png" -- set max length file name +strMaxLengthFileName255 = string.rep("a", 251) .. ".png" -- set max length file name + +local storagePath = config.pathToSDL .. "storage/" .. config.application1.registerAppInterfaceParams.appID .. "_" .. config.deviceMAC .. "/" --Debug = {"graphic", "value"} --use to print request before sending to SDL. Debug = {} -- empty {}: script will do not print request on console screen. @@ -42,11 +47,11 @@ local function ExpectOnHMIStatusWithAudioStateChanged(self, HMILevel, timeout, t --valid values for times parameter: --nil => times = 2 --4: for duplicate request - + if HMILevel == nil then HMILevel = "FULL" end if timeout == nil then timeout = 10000 end if times == nil then times = 2 end - + if commonFunctions:isMediaApp() then --mobile side: OnHMIStatus notification @@ -71,20 +76,20 @@ end function Test:createRequest() return { - ttsChunks = - { + ttsChunks = + { { text ="a", type ="TEXT" } } } - + end --This function sends a request from mobile and verify result on HMI and mobile for SUCCESS resultCode cases. function Test:verify_SUCCESS_Case(Request, HMILevel) - + --mobile side: sending the request local cid = self.mobileSession:SendRPC("Speak", Request) @@ -103,36 +108,45 @@ function Test:verify_SUCCESS_Case(Request, HMILevel) end) - --mobile side: expect OnHashChange notification + --mobile side: expect OnHashChange notification ExpectOnHMIStatusWithAudioStateChanged(self, HMILevel) --mobile side: expect the response EXPECT_RESPONSE(cid, { success = true, resultCode = "SUCCESS" }) - + end --------------------------------------------------------------------------------------------- -------------------------------------------Preconditions------------------------------------- --------------------------------------------------------------------------------------------- - + + + --Print new line to separate Preconditions + commonFunctions:newTestCasesGroup("Preconditions") + + --Delete app_info.dat, logs and policy table + commonSteps:DeleteLogsFileAndPolicyTable() + --1. Activate application commonSteps:ActivationApp() - ------------------------------------------------------------------------------------------ - + + --2. Update policy to allow request + --TODO: Will be updated after policy flow implementation + policyTable:precondition_updatePolicy_AllowFunctionInHmiLeves({"FULL", "LIMITED"}) + ----------------------------------------------------------------------------------------------- -------------------------------------------TEST BLOCK I---------------------------------------- --------------------------------Check normal cases of Mobile request--------------------------- ----------------------------------------------------------------------------------------------- ---Requirement id in JAMA: +--Requirement id in JAMA: --SDLAQ-CRS-54 (Speak_Request_v2_0) --SDLAQ-CRS-55 (Speak_Response_v2_0) --SDLAQ-CRS-505 (INVALID_DATA) --SDLAQ-CRS-504 (SUCCESS) - + --Verification criteria: Speak request notifies the user via TTS engine with some information that the app provides to HMI. After TTS has prompted, the response with SUCCESS resultCode is returned to mobile app. --List of parameters: @@ -159,7 +173,7 @@ end --8. Check children parameters: --text: minlength="0" maxlength="500" type="String" --type: type="SpeechCapabilities": "TEXT", "SAPI_PHONEMES", "LHPLUS_PHONEMES", "PRE_RECORDED", "SILENCE" ------------------------------------------------------------------------------------------------ +----------------------------------------------------------------------------------------------- local Request = Test:createRequest() local Boundary = {1, 100} @@ -177,7 +191,7 @@ arrayTTSChunks:verify_TTSChunks_Parameter(Request, {"ttsChunks"}, Boundary, true --Begin Test case SpecialRequestChecks --Description: Check special requests - --Requirement id in JAMA: + --Requirement id in JAMA: --SDLAQ-CRS-54 (Speak_Request_v2_0) --SDLAQ-CRS-55 (Speak_Response_v2_0) --SDLAQ-CRS-505 (INVALID_DATA) @@ -187,7 +201,7 @@ arrayTTSChunks:verify_TTSChunks_Parameter(Request, {"ttsChunks"}, Boundary, true --SDLAQ-CRS-512 (DISALLOWED) --SDLAQ-CRS-1027 (UNSUPPORTED_RESOURCE) --SDLAQ-CRS-1030 (WARNINGS) - + --Verification criteria: Speak request notifies the user via TTS engine with some information that the app provides to HMI. After TTS has prompted, the response with SUCCESS resultCode is returned to mobile app. local function SpecialRequestChecks() @@ -197,13 +211,13 @@ local function SpecialRequestChecks() --Begin Test case NegativeRequestCheck.1 --Description: Invalid JSON - + --Requirement id in JAMA: SDLAQ-CRS-505 --Verification criteria: The request with wrong JSON syntax is sent, the response with INVALID_DATA result code is returned. - - --local Payload = '{"ttsChunks":{{"text":"a","type":"TEXT"}}}' -- valid JSON + + --local Payload = '{"ttsChunks":{{"text":"a","type":"TEXT"}}}' -- valid JSON local Payload = '{"ttsChunks";{{"text":"a","type":"TEXT"}}}' - commonTestCases:VerifyInvalidJsonRequest(14, Payload) --SpeakID = 14 + commonTestCases:VerifyInvalidJsonRequest(14, Payload) --SpeakID = 14 --End Test case NegativeRequestCheck.1 @@ -212,14 +226,14 @@ local function SpecialRequestChecks() --Description: CorrelationId check( duplicate value) --ToDo: Update after fixed ATF defect: APPLINK-13101 ATF sends string in notification with escaped slash character - + function Test:Speak_CorrelationID_IsDuplicated() - + --mobile side: sending Speak request local cid = self.mobileSession:SendRPC("Speak", { - ttsChunks = - { + ttsChunks = + { { text ="a", type ="TEXT" @@ -228,7 +242,7 @@ local function SpecialRequestChecks() }) self.mobileSession.correlationId = cid --request from mobile side - local msg = + local msg = { serviceType = 7, frameInfo = 0, @@ -237,7 +251,7 @@ local function SpecialRequestChecks() rpcCorrelationId = self.mobileSession.correlationId, payload = '{"ttsChunks":[{"text":"a","type":"TEXT"}]}' } - + --hmi side: expect TTS.Speak request EXPECT_HMICALL("TTS.Speak", { ttsChunks = {{text ="a", type ="TEXT"}}} ) :Do(function(exp,data) @@ -261,35 +275,35 @@ local function SpecialRequestChecks() self.hmiConnection:SendNotification("TTS.Started") end) :Times(2) - + ExpectOnHMIStatusWithAudioStateChanged(self, "FULL", nil, 4) - - + + --response on mobile side EXPECT_RESPONSE(cid, { success = true, resultCode = "SUCCESS"}) :Times(2) - + end - + --End Test case NegativeRequestCheck.2 - + --Begin Test case NegativeRequestCheck.3 --Description: Fake parameters check - + --Requirement id in JAMA: APPLINK-4518 --Verification criteria: According to xml tests by Ford team all fake params should be ignored by SDL --Begin Test case NegativeRequestCheck.3.1 --Description: Fake parameters is not from any API - - function Test:Speak_FakeParams_IsNotFromAnyAPI() - --mobile side: sending Speak request + function Test:Speak_FakeParams_IsNotFromAnyAPI() + + --mobile side: sending Speak request local Request = { fakeParam = "abc", - ttsChunks = - { + ttsChunks = + { { fakeParam = "abc", text ="a", @@ -297,12 +311,12 @@ local function SpecialRequestChecks() } } } - + local cid = self.mobileSession:SendRPC("Speak", Request) - + Request.fakeParam = nil Request.ttsChunks[1].fakeParam = nil - + --hmi side: expect the request EXPECT_HMICALL("TTS.Speak", Request) :ValidIf(function(_,data) @@ -310,7 +324,7 @@ local function SpecialRequestChecks() data.params.ttsChunks[1].fakeParam then Print(" SDL re-sends fakeParam parameters to HMI") return false - else + else return true end end) @@ -329,26 +343,26 @@ local function SpecialRequestChecks() --mobile side: expect OnHashChange notification ExpectOnHMIStatusWithAudioStateChanged(self) - + --mobile side: expect the response EXPECT_RESPONSE(cid, { success = true, resultCode = "SUCCESS" }) - - end - + + end + --End Test case NegativeRequestCheck.3.1 ----------------------------------------------------------------------------------------- --Begin Test case NegativeRequestCheck.3.2 --Description: Fake parameters is not from another API - - function Test:Speak_FakeParams_ParameterIsFromAnotherAPI() - --mobile side: sending Speak request + function Test:Speak_FakeParams_ParameterIsFromAnotherAPI() + + --mobile side: sending Speak request local param = { syncFileName = "abc", - ttsChunks = - { + ttsChunks = + { { syncFileName = "abc", text ="a", @@ -356,12 +370,12 @@ local function SpecialRequestChecks() } } } - + local cid = self.mobileSession:SendRPC("Speak", param) param.syncFileName = nil param.ttsChunks[1].syncFileName = nil - + --hmi side: expect the request EXPECT_HMICALL("TTS.Speak", param) @@ -370,7 +384,7 @@ local function SpecialRequestChecks() data.params.ttsChunks[1].syncFileName then Print(" SDL re-sends syncFileName parameters to HMI") return false - else + else return true end end) @@ -392,24 +406,24 @@ local function SpecialRequestChecks() --mobile side: expect the response EXPECT_RESPONSE(cid, { success = true, resultCode = "SUCCESS" }) - - - end + + + end --End Test case NegativeRequestCheck.3.2 ----------------------------------------------------------------------------------------- - + --End Test case NegativeRequestCheck.3 --Begin Test case NegativeRequestCheck.4 - --Description: All parameters missing + --Description: All parameters missing commonTestCases:VerifyRequestIsMissedAllParameters() --End Test case NegativeRequestCheck.4 ----------------------------------------------------------------------------------------- - + end SpecialRequestChecks() @@ -422,7 +436,7 @@ SpecialRequestChecks() ----------------------------------Check normal cases of HMI response--------------------------- ----------------------------------------------------------------------------------------------- ---Requirement id in JAMA: +--Requirement id in JAMA: --SDLAQ-CRS-55 (Speak_Response) --SDLAQ-CRS-505 (INVALID_DATA) --SDLAQ-CRS-504 (SUCCESS) @@ -455,37 +469,37 @@ Test[APIName.."_Response_MissingMandatoryParameters_GENERIC_ERROR"] = function(s local Request = self:createRequest() local cid = self.mobileSession:SendRPC("Speak", Request) - + --hmi side: expect the request EXPECT_HMICALL("TTS.Speak", Request) :Do(function(_,data) - + self.hmiConnection:SendNotification("TTS.Started") SpeakId = data.id local function speakResponse() self.hmiConnection:SendNotification("TTS.Stopped") - + --hmi side: sending the response --self.hmiConnection:Send('{"id":'..tostring(data.id)..',"jsonrpc":"2.0","result":{"method":"TTS.Speak", "code":0}}') self.hmiConnection:Send('{"id":'..tostring(data.id)..',"jsonrpc":"2.0","result":{}}') - + end - RUN_AFTER(speakResponse, 1000) - + RUN_AFTER(speakResponse, 1000) + end) - + --mobile side: expect OnHashChange notification ExpectOnHMIStatusWithAudioStateChanged(self) --mobile side: expect the response EXPECT_RESPONSE(cid, { success = false, resultCode = "GENERIC_ERROR"}) :Timeout(13000) - + end ----------------------------------------------------------------------------------------- - + Test[APIName.."_Response_MissingAllParameters_GENERIC_ERROR"] = function(self) @@ -493,34 +507,34 @@ Test[APIName.."_Response_MissingAllParameters_GENERIC_ERROR"] = function(self) local Request = self:createRequest() local cid = self.mobileSession:SendRPC("Speak", Request) - + --hmi side: expect the request EXPECT_HMICALL("TTS.Speak", Request) :Do(function(_,data) - + self.hmiConnection:SendNotification("TTS.Started") SpeakId = data.id local function speakResponse() self.hmiConnection:SendNotification("TTS.Stopped") - + --hmi side: sending the response --self.hmiConnection:Send('{"id":'..tostring(data.id)..',"jsonrpc":"2.0","result":{"method":"TTS.Speak", "code":0}}') self.hmiConnection:Send('{}') - + end - RUN_AFTER(speakResponse, 1000) - + RUN_AFTER(speakResponse, 1000) + end) - + --mobile side: expect OnHashChange notification ExpectOnHMIStatusWithAudioStateChanged(self) --mobile side: expect the response EXPECT_RESPONSE(cid, { success = false, resultCode = "GENERIC_ERROR"}) :Timeout(13000) - + end ----------------------------------------------------------------------------------------- @@ -529,7 +543,7 @@ end ----------------------------------------------------------------------------------------------- --Parameter 1: resultCode ----------------------------------------------------------------------------------------------- ---List of test cases: +--List of test cases: --1. IsMissed --2. IsValidValue --3. IsNotExist @@ -543,36 +557,36 @@ local function verify_resultCode_parameter() --Print new line to separate new test cases group commonFunctions:newTestCasesGroup("TestCaseGroupForResultCodeParameter") - + ----------------------------------------------------------------------------------------- - + --1. IsMissed Test[APIName.."_Response_resultCode_IsMissed_GENERIC_ERROR_SendResponse"] = function(self) - + --mobile side: sending the request local Request = self:createRequest() local cid = self.mobileSession:SendRPC("Speak", Request) - + --hmi side: expect the request EXPECT_HMICALL("TTS.Speak", Request) :Do(function(_,data) - + self.hmiConnection:SendNotification("TTS.Started") SpeakId = data.id local function speakResponse() self.hmiConnection:SendNotification("TTS.Stopped") - + --self.hmiConnection:Send('{"id":'..tostring(data.id)..',"jsonrpc":"2.0","result":{"method":"TTS.Speak", "code":0}}') self.hmiConnection:Send('{"id":'..tostring(data.id)..',"jsonrpc":"2.0","result":{"method":"TTS.Speak"}}') - + end - RUN_AFTER(speakResponse, 1000) - + RUN_AFTER(speakResponse, 1000) + end) - + --mobile side: expect OnHashChange notification ExpectOnHMIStatusWithAudioStateChanged(self) @@ -581,21 +595,21 @@ local function verify_resultCode_parameter() --TODO: update after resolving APPLINK-14765 -- EXPECT_RESPONSE(cid, { success = false, resultCode = "GENERIC_ERROR", info = "Invalid message received from vehicle"}) EXPECT_RESPONSE(cid, { success = false, resultCode = "INVALID_DATA"}) - + end ----------------------------------------------------------------------------------------- - + Test[APIName.."_Response_resultCode_IsMissed_GENERIC_ERROR_SendError"] = function(self) - + --mobile side: sending the request local Request = self:createRequest() local cid = self.mobileSession:SendRPC("Speak", Request) - + --hmi side: expect the request EXPECT_HMICALL("TTS.Speak", Request) :Do(function(_,data) - + self.hmiConnection:SendNotification("TTS.Started") SpeakId = data.id @@ -604,13 +618,13 @@ local function verify_resultCode_parameter() self.hmiConnection:SendNotification("TTS.Stopped") --self.hmiConnection:Send('{"id":'..tostring(data.id)..',"jsonrpc":"2.0","error":{"data":{"method":"TTS.Speak"},"code":22,"message":"The unknown issue occurred"}}') self.hmiConnection:Send('{"id":'..tostring(data.id)..',"jsonrpc":"2.0","error":{"data":{"method":"TTS.Speak"},"message":"The unknown issue occurred"}}') - - + + end - RUN_AFTER(speakResponse, 1000) - + RUN_AFTER(speakResponse, 1000) + end) - + --mobile side: expect OnHashChange notification ExpectOnHMIStatusWithAudioStateChanged(self) @@ -619,11 +633,11 @@ local function verify_resultCode_parameter() --TODO: update after resolving APPLINK-14765 -- EXPECT_RESPONSE(cid, { success = false, resultCode = "GENERIC_ERROR", info = "Invalid message received from vehicle"}) EXPECT_RESPONSE(cid, { success = false, resultCode = "INVALID_DATA"}) - + end ----------------------------------------------------------------------------------------- - - + + --2. IsValidValue local resultCodes = { {resultCode = "SUCCESS", success = true}, @@ -631,22 +645,22 @@ local function verify_resultCode_parameter() {resultCode = "REJECTED", success = false}, {resultCode = "ABORTED", success = false}, {resultCode = "DISALLOWED", success = false}, - {resultCode = "UNSUPPORTED_RESOURCE", success = false}, - {resultCode = "OUT_OF_MEMORY", success = false}, + {resultCode = "UNSUPPORTED_RESOURCE", success = false}, + {resultCode = "OUT_OF_MEMORY", success = false}, {resultCode = "TOO_MANY_PENDING_REQUESTS", success = false}, {resultCode = "APPLICATION_NOT_REGISTERED", success = false}, {resultCode = "GENERIC_ERROR", success = false}, {resultCode = "WARNINGS", success = true} } - + for i =1, #resultCodes do - + Test[APIName.."_Response_resultCode_IsValidValue_" .. resultCodes[i].resultCode .."_SendResponse"] = function(self) - + --mobile side: sending the request local Request = self:createRequest() local cid = self.mobileSession:SendRPC("Speak", Request) - + --hmi side: expect the request EXPECT_HMICALL("TTS.Speak", Request) :Do(function(_,data) @@ -655,37 +669,37 @@ local function verify_resultCode_parameter() local function speakResponse() self.hmiConnection:SendNotification("TTS.Stopped") - + self.hmiConnection:SendResponse(data.id, data.method, resultCodes[i].resultCode, {}) end RUN_AFTER(speakResponse, 1000) end) - - + + --mobile side: expect OnHashChange notification ExpectOnHMIStatusWithAudioStateChanged(self) - if + if resultCodes[i].resultCode == "UNSUPPORTED_RESOURCE" then resultCodes[i].resultCode = "WARNINGS" resultCodes[i].success = true end - + --mobile side: expect the response - EXPECT_RESPONSE(cid, { success = resultCodes[i].success, resultCode = resultCodes[i].resultCode}) + EXPECT_RESPONSE(cid, { success = resultCodes[i].success, resultCode = resultCodes[i].resultCode}) - end + end ----------------------------------------------------------------------------------------- - + Test[APIName.."_Response_resultCode_IsValidValue_" .. resultCodes[i].resultCode .."_SendError"] = function(self) - + --mobile side: sending the request local Request = self:createRequest() local cid = self.mobileSession:SendRPC("Speak", Request) - - --hmi side: expect the request + + --hmi side: expect the request EXPECT_HMICALL("TTS.Speak", Request) :Do(function(_,data) self.hmiConnection:SendNotification("TTS.Started") @@ -693,56 +707,56 @@ local function verify_resultCode_parameter() local function speakResponse() self.hmiConnection:SendNotification("TTS.Stopped") - + --hmi side: sending the response self.hmiConnection:SendError(data.id, data.method, resultCodes[i].resultCode, "info") end RUN_AFTER(speakResponse, 1000) - - - - + + + + end) - + --mobile side: expect OnHashChange notification ExpectOnHMIStatusWithAudioStateChanged(self) - if + if resultCodes[i].resultCode == "UNSUPPORTED_RESOURCE" then resultCodes[i].resultCode = "WARNINGS" resultCodes[i].success = true end --mobile side: expect the response - EXPECT_RESPONSE(cid, { success = resultCodes[i].success, resultCode = resultCodes[i].resultCode, info = "info"}) + EXPECT_RESPONSE(cid, { success = resultCodes[i].success, resultCode = resultCodes[i].resultCode, info = "info"}) - end + end ----------------------------------------------------------------------------------------- - + end ----------------------------------------------------------------------------------------- - - + + --3. IsNotExist --4. IsEmpty --5. IsWrongType - --6. IsInvalidCharacter - \n, \t - local testData = { + --6. IsInvalidCharacter - \n, \t + local testData = { {value = "ANY", name = "IsNotExist"}, {value = "", name = "IsEmpty"}, {value = 123, name = "IsWrongType"}, {value = "a\nb", name = "IsInvalidCharacter_NewLine"}, {value = "a\tb", name = "IsInvalidCharacter_Tab"}} - + for i =1, #testData do - + Test[APIName.."_Response_resultCode_" .. testData[i].name .."_SendResponse_GENERIC_ERROR"] = function(self) - + --mobile side: sending the request local Request = self:createRequest() local cid = self.mobileSession:SendRPC("Speak", Request) - + --hmi side: expect the request EXPECT_HMICALL("TTS.Speak", Request) :Do(function(_,data) @@ -751,64 +765,64 @@ local function verify_resultCode_parameter() local function speakResponse() self.hmiConnection:SendNotification("TTS.Stopped") - + --hmi side: sending the response self.hmiConnection:SendResponse(data.id, data.method, testData[i].value, {}) end - RUN_AFTER(speakResponse, 1000) - + RUN_AFTER(speakResponse, 1000) + end) --mobile side: expect OnHashChange notification ExpectOnHMIStatusWithAudioStateChanged(self) - + --mobile side: expect the response --TODO: update after resolving APPLINK-14765 -- EXPECT_RESPONSE(cid, { success = false, resultCode = "GENERIC_ERROR", info = "Invalid message received from vehicle"}) - EXPECT_RESPONSE(cid, { success = false, resultCode = "INVALID_DATA"}) + EXPECT_RESPONSE(cid, { success = false, resultCode = "INVALID_DATA"}) end ----------------------------------------------------------------------------------------- - + Test[APIName.."_Response_resultCode_" .. testData[i].name .."_SendError_GENERIC_ERROR"] = function(self) - + --mobile side: sending the request local Request = self:createRequest() local cid = self.mobileSession:SendRPC("Speak", Request) - + --hmi side: expect the request EXPECT_HMICALL("TTS.Speak", Request) :Do(function(_,data) - + self.hmiConnection:SendNotification("TTS.Started") SpeakId = data.id local function speakResponse() self.hmiConnection:SendNotification("TTS.Stopped") - + --hmi side: sending the response self.hmiConnection:SendError(data.id, data.method, testData[i].value) end RUN_AFTER(speakResponse, 1000) - - + + end) - + --mobile side: expect OnHashChange notification ExpectOnHMIStatusWithAudioStateChanged(self) - + --mobile side: expect the response --TODO: update after resolving APPLINK-14765 -- EXPECT_RESPONSE(cid, { success = false, resultCode = "GENERIC_ERROR", info = "Invalid message received from vehicle"}) EXPECT_RESPONSE(cid, { success = false, resultCode = "INVALID_DATA"}) - + end ----------------------------------------------------------------------------------------- - + end ----------------------------------------------------------------------------------------- - -end + +end verify_resultCode_parameter() @@ -816,7 +830,7 @@ verify_resultCode_parameter() ----------------------------------------------------------------------------------------------- --Parameter 2: method ----------------------------------------------------------------------------------------------- ---List of test cases: +--List of test cases: --1. IsMissed --2. IsValidResponse --3. IsNotValidResponse @@ -825,99 +839,99 @@ verify_resultCode_parameter() --6. IsWrongType --7. IsInvalidCharacter - \n, \t ----------------------------------------------------------------------------------------------- - + local function verify_method_parameter() --Print new line to separate new test cases group commonFunctions:newTestCasesGroup("TestCaseGroupForMethodParameter") - - + + --1. IsMissed Test[APIName.."_Response_method_IsMissed_GENERIC_ERROR_SendResponse"] = function(self) - + --mobile side: sending the request local Request = self:createRequest() local cid = self.mobileSession:SendRPC("Speak", Request) - + --hmi side: expect the request EXPECT_HMICALL("TTS.Speak", Request) :Do(function(_,data) - + self.hmiConnection:SendNotification("TTS.Started") SpeakId = data.id local function speakResponse() self.hmiConnection:SendNotification("TTS.Stopped") - + --hmi side: sending the response --self.hmiConnection:Send('{"id":'..tostring(data.id)..',"jsonrpc":"2.0","result":{"method":"TTS.Speak", "code":0}}') self.hmiConnection:Send('{"id":'..tostring(data.id)..',"jsonrpc":"2.0","result":{"code":0}}') - + end - RUN_AFTER(speakResponse, 1000) - + RUN_AFTER(speakResponse, 1000) + end) - + --mobile side: expect OnHashChange notification ExpectOnHMIStatusWithAudioStateChanged(self) --mobile side: expect the response EXPECT_RESPONSE(cid, { success = false, resultCode = "GENERIC_ERROR"}) :Timeout(13000) - + end - + Test[APIName.."_Response_method_IsMissed_GENERIC_ERROR_SendError"] = function(self) - + --mobile side: sending the request local Request = self:createRequest() local cid = self.mobileSession:SendRPC("Speak", Request) - + --hmi side: expect the request EXPECT_HMICALL("TTS.Speak", Request) :Do(function(_,data) - + self.hmiConnection:SendNotification("TTS.Started") SpeakId = data.id local function speakResponse() self.hmiConnection:SendNotification("TTS.Stopped") - + --hmi side: sending the response --self.hmiConnection:Send('{"id":'..tostring(data.id)..',"jsonrpc":"2.0","error":{"data":{"method":"TTS.Speak"},"code":22,"message":"The unknown issue occurred"}}') - + self.hmiConnection:Send('{"id":'..tostring(data.id)..',"jsonrpc":"2.0","error":{"data":{},"code":22,"message":"The unknown issue occurred"}}') - - + + end - RUN_AFTER(speakResponse, 1000) - + RUN_AFTER(speakResponse, 1000) + end) - + --mobile side: expect OnHashChange notification ExpectOnHMIStatusWithAudioStateChanged(self) --mobile side: expect the response EXPECT_RESPONSE(cid, { success = false, resultCode = "GENERIC_ERROR"}) :Timeout(13000) - - end + + end ----------------------------------------------------------------------------------------- - + --2. IsValidResponse: Covered by many test cases - + --3. IsNotValidResponse --4. IsOtherResponse --5. IsEmpty --6. IsWrongType - --7. IsInvalidCharacter - \n, \t, spaces - local Methods = { + --7. IsInvalidCharacter - \n, \t, spaces + local Methods = { {method = "ANY", name = "IsNotValidResponse"}, {method = "GetCapabilities", name = "IsOtherResponse"}, {method = "", name = "IsEmpty"}, @@ -926,15 +940,15 @@ local function verify_method_parameter() {method = "a\tb", name = "IsInvalidCharacter_Tab"}, {method = " ", name = "IsSpaces"}, } - + for i =1, #Methods do - + Test[APIName.."_Response_method_" .. Methods[i].name .."_GENERIC_ERROR_SendResponse"] = function(self) - + --mobile side: sending the request local Request = self:createRequest() local cid = self.mobileSession:SendRPC("Speak", Request) - + --hmi side: expect the request EXPECT_HMICALL("TTS.Speak", Request) :Do(function(_,data) @@ -943,15 +957,15 @@ local function verify_method_parameter() local function speakResponse() self.hmiConnection:SendNotification("TTS.Stopped") - + --hmi side: sending the response --self.hmiConnection:SendResponse(data.id, data.method, "SUCCESS", {}) self.hmiConnection:SendResponse(data.id, Methods[i].method, "SUCCESS", {}) end RUN_AFTER(speakResponse, 1000) - + end) - + --mobile side: expect OnHashChange notification ExpectOnHMIStatusWithAudioStateChanged(self) @@ -961,33 +975,33 @@ local function verify_method_parameter() end ----------------------------------------------------------------------------------------- - + Test[APIName.."_Response_method_" .. Methods[i].name .."_GENERIC_ERROR_SendError"] = function(self) - + --mobile side: sending the request local Request = self:createRequest() local cid = self.mobileSession:SendRPC("Speak", Request) - + --hmi side: expect the request EXPECT_HMICALL("TTS.Speak", Request) :Do(function(_,data) - + self.hmiConnection:SendNotification("TTS.Started") SpeakId = data.id local function speakResponse() self.hmiConnection:SendNotification("TTS.Stopped") - + --hmi side: sending the response --self.hmiConnection:SendError(data.id, data.method, "UNSUPPORTED_RESOURCE", "info") self.hmiConnection:SendError(data.id, Methods[i].method, "UNSUPPORTED_RESOURCE", "info") end RUN_AFTER(speakResponse, 1000) - - - + + + end) - + --mobile side: expect OnHashChange notification ExpectOnHMIStatusWithAudioStateChanged(self) @@ -997,11 +1011,11 @@ local function verify_method_parameter() end ----------------------------------------------------------------------------------------- - + end ----------------------------------------------------------------------------------------- - -end + +end verify_method_parameter() @@ -1009,7 +1023,7 @@ verify_method_parameter() ----------------------------------------------------------------------------------------------- --Parameter 3: info ----------------------------------------------------------------------------------------------- ---List of test cases: +--List of test cases: --1. IsMissed --2. IsLowerBound --3. IsUpperBound @@ -1024,17 +1038,17 @@ local function verify_info_parameter() --Print new line to separate new test cases group commonFunctions:newTestCasesGroup("TestCaseGroupForInfoParameter") - + ----------------------------------------------------------------------------------------- - + --1. IsMissed Test[APIName.."_Response_info_IsMissed_SendResponse"] = function(self) - + --mobile side: sending the request local Request = self:createRequest() local cid = self.mobileSession:SendRPC("Speak", Request) - + --hmi side: expect the request EXPECT_HMICALL("TTS.Speak", Request) :Do(function(_,data) @@ -1043,14 +1057,14 @@ local function verify_info_parameter() local function speakResponse() self.hmiConnection:SendNotification("TTS.Stopped") - + --hmi side: sending the response self.hmiConnection:SendResponse(data.id, data.method, "SUCCESS", {}) - + end RUN_AFTER(speakResponse, 1000) - - + + end) @@ -1060,20 +1074,20 @@ local function verify_info_parameter() if data.payload.info then Print(" SDL resends info parameter to mobile app. info = \"" .. data.payload.info .. "\"") return false - else + else return true end end) end ----------------------------------------------------------------------------------------- - + Test[APIName.."_Response_info_IsMissed_SendError"] = function(self) - + --mobile side: sending the request local Request = self:createRequest() local cid = self.mobileSession:SendRPC("Speak", Request) - + --hmi side: expect the request EXPECT_HMICALL("TTS.Speak", Request) :Do(function(_,data) @@ -1092,18 +1106,18 @@ local function verify_info_parameter() --2. IsLowerBound --3. IsUpperBound - local testData = { + local testData = { {value = "a", name = "IsLowerBound"}, {value = commonFunctions:createString(1000), name = "IsUpperBound"}} - + for i =1, #testData do - + Test[APIName.."_Response_info_" .. testData[i].name .."_SendResponse"] = function(self) - + --mobile side: sending the request local Request = self:createRequest() local cid = self.mobileSession:SendRPC("Speak", Request) - + --hmi side: expect the request EXPECT_HMICALL("TTS.Speak", Request) :Do(function(_,data) @@ -1112,17 +1126,17 @@ local function verify_info_parameter() end) --mobile side: expect the response - EXPECT_RESPONSE(cid, { success = true, resultCode = "SUCCESS", info = testData[i].value}) + EXPECT_RESPONSE(cid, { success = true, resultCode = "SUCCESS", info = testData[i].value}) end ----------------------------------------------------------------------------------------- - + Test[APIName.."_Response_info_" .. testData[i].name .."_SendError"] = function(self) - + --mobile side: sending the request local Request = self:createRequest() local cid = self.mobileSession:SendRPC("Speak", Request) - + --hmi side: expect the request EXPECT_HMICALL("TTS.Speak", Request) :Do(function(_,data) @@ -1131,24 +1145,24 @@ local function verify_info_parameter() end) --mobile side: expect the response - EXPECT_RESPONSE(cid, { success = false, resultCode = "GENERIC_ERROR", info = testData[i].value}) + EXPECT_RESPONSE(cid, { success = false, resultCode = "GENERIC_ERROR", info = testData[i].value}) end ----------------------------------------------------------------------------------------- - + end ----------------------------------------------------------------------------------------- --TODO: update after resolving APPLINK-14551 - + -- --4. IsOutUpperBound -- Test[APIName.."_Response_info_IsOutUpperBound_SendResponse"] = function(self) - + -- local infoMaxLength = commonFunctions:createString(1000) - + -- --mobile side: sending the request -- local Request = self:createRequest() -- local cid = self.mobileSession:SendRPC("Speak", Request) - + -- --hmi side: expect the request -- EXPECT_HMICALL("TTS.Speak", Request) -- :Do(function(_,data) @@ -1158,18 +1172,18 @@ local function verify_info_parameter() -- --mobile side: expect the response -- EXPECT_RESPONSE(cid, { success = true, resultCode = "SUCCESS", info = infoMaxLength}) - + -- end -- ----------------------------------------------------------------------------------------- - + -- Test[APIName.."_Response_info_IsOutUpperBound_SendError"] = function(self) - + -- local infoMaxLength = commonFunctions:createString(1000) - + -- --mobile side: sending the request -- local Request = self:createRequest() -- local cid = self.mobileSession:SendRPC("Speak", Request) - + -- --hmi side: expect the request -- EXPECT_HMICALL("TTS.Speak", Request) -- :Do(function(_,data) @@ -1179,30 +1193,30 @@ local function verify_info_parameter() -- --mobile side: expect the response -- EXPECT_RESPONSE(cid, { success = false, resultCode = "GENERIC_ERROR", info = infoMaxLength}) - + -- end ----------------------------------------------------------------------------------------- - - --5. IsEmpty/IsOutLowerBound + + --5. IsEmpty/IsOutLowerBound --6. IsWrongType --7. InvalidCharacter - \n, \t - + --TODO: update after resolving APPLINK-14551 - -- local testData = { + -- local testData = { -- {value = "", name = "IsEmpty_IsOutLowerBound"}, -- {value = 123, name = "IsWrongType"}, -- {value = "a\nb", name = "IsInvalidCharacter_NewLine"}, -- {value = "a\tb", name = "IsInvalidCharacter_Tab"}} - + -- for i =1, #testData do - + -- Test[APIName.."_Response_info_" .. testData[i].name .."_SendResponse"] = function(self) - + -- --mobile side: sending the request -- local Request = self:createRequest() -- local cid = self.mobileSession:SendRPC("Speak", Request) - + -- --hmi side: expect the request -- EXPECT_HMICALL("TTS.Speak", Request) -- :Do(function(_,data) @@ -1216,20 +1230,20 @@ local function verify_info_parameter() -- if data.payload.info then -- commonFunctions:printError(" SDL resends info parameter to mobile app. info = \"" .. data.payload.info .. "\"") -- return false - -- else + -- else -- return true -- end - -- end) + -- end) -- end -- ----------------------------------------------------------------------------------------- - + -- Test[APIName.."_Response_info_" .. testData[i].name .."_SendError"] = function(self) - + -- --mobile side: sending the request -- local Request = self:createRequest() -- local cid = self.mobileSession:SendRPC("Speak", Request) - + -- --hmi side: expect the request -- EXPECT_HMICALL("TTS.Speak", Request) -- :Do(function(_,data) @@ -1243,32 +1257,32 @@ local function verify_info_parameter() -- if data.payload.info then -- commonFunctions:printError(" SDL resends info parameter to mobile app. info = \"" .. data.payload.info .. "\"") -- return false - -- else + -- else -- return true -- end - - -- end) + + -- end) -- end -- ----------------------------------------------------------------------------------------- - + -- end ----------------------------------------------------------------------------------------- - -end + +end verify_info_parameter() ----------------------------------------------------------------------------------------------- ---Parameter 4: correlationID +--Parameter 4: correlationID ----------------------------------------------------------------------------------------------- ---List of test cases: +--List of test cases: --1. IsMissed --2. IsNonexistent --3. IsWrongType - --4. IsNegative + --4. IsNegative ----------------------------------------------------------------------------------------------- local function verify_correlationID_parameter() @@ -1276,17 +1290,17 @@ local function verify_correlationID_parameter() --Print new line to separate new test cases group commonFunctions:newTestCasesGroup("TestCaseGroupForCorrelationIDParameter") - + ----------------------------------------------------------------------------------------- - - --1. IsMissed + + --1. IsMissed Test[APIName.."_Response_CorrelationID_IsMissed_SendResponse"] = function(self) - + --mobile side: sending the request local Request = self:createRequest() local cid = self.mobileSession:SendRPC("Speak", Request) - + --hmi side: expect the request EXPECT_HMICALL("TTS.Speak", Request) :Do(function(_,data) @@ -1295,15 +1309,15 @@ local function verify_correlationID_parameter() local function speakResponse() self.hmiConnection:SendNotification("TTS.Stopped") - + --hmi side: sending the response --self.hmiConnection:Send('{"id":'..tostring(data.id)..',"jsonrpc":"2.0","result":{"method":"TTS.Speak", "code":0}}') self.hmiConnection:Send('{"jsonrpc":"2.0","result":{"method":"TTS.Speak", "code":0}}') - + end RUN_AFTER(speakResponse, 1000) - - + + end) --mobile side: expect OnHashChange notification @@ -1312,42 +1326,42 @@ local function verify_correlationID_parameter() --mobile side: expect the response EXPECT_RESPONSE(cid, { success = false, resultCode = "GENERIC_ERROR"}) :Timeout(13000) - + end ----------------------------------------------------------------------------------------- - + Test[APIName.."_Response_CorrelationID_IsMissed_SendError"] = function(self) - + --mobile side: sending the request local Request = self:createRequest() local cid = self.mobileSession:SendRPC("Speak", Request) - + --hmi side: expect the request EXPECT_HMICALL("TTS.Speak", Request) :Do(function(_,data) --hmi side: sending the response --self.hmiConnection:Send('{"id":'..tostring(data.id)..',"jsonrpc":"2.0","error":{"code":0,"message":"error message","data":{"method":"TTS.Speak"}}}') self.hmiConnection:Send('{"jsonrpc":"2.0","error":{"code":0,"message":"error message","data":{"method":"TTS.Speak"}}}') - + end) --mobile side: expect the response EXPECT_RESPONSE(cid, { success = false, resultCode = "GENERIC_ERROR"}) :Timeout(13000) - + end ----------------------------------------------------------------------------------------- - + --2. IsNonexistent Test[APIName.."_Response_CorrelationID_IsNonexistent_SendResponse"] = function(self) - + --mobile side: sending the request local Request = self:createRequest() local cid = self.mobileSession:SendRPC("Speak", Request) - + --hmi side: expect the request EXPECT_HMICALL("TTS.Speak", Request) :Do(function(_,data) @@ -1356,14 +1370,14 @@ local function verify_correlationID_parameter() local function speakResponse() self.hmiConnection:SendNotification("TTS.Stopped") - + --hmi side: sending the response --self.hmiConnection:Send('{"id":'..tostring(data.id)..',"jsonrpc":"2.0","result":{"method":"TTS.Speak", "code":0}}') self.hmiConnection:Send('{"id":'..tostring(5555)..',"jsonrpc":"2.0","result":{"method":"TTS.Speak", "code":0}}') - + end RUN_AFTER(speakResponse, 1000) - + end) --mobile side: expect OnHashChange notification @@ -1372,43 +1386,43 @@ local function verify_correlationID_parameter() --mobile side: expect the response EXPECT_RESPONSE(cid, { success = false, resultCode = "GENERIC_ERROR"}) :Timeout(13000) - + end ----------------------------------------------------------------------------------------- - + Test[APIName.."_Response_CorrelationID_IsNonexistent_SendError"] = function(self) - + --mobile side: sending the request local Request = self:createRequest() local cid = self.mobileSession:SendRPC("Speak", Request) - + --hmi side: expect the request EXPECT_HMICALL("TTS.Speak", Request) :Do(function(_,data) --hmi side: sending the response --self.hmiConnection:Send('{"id":'..tostring(data.id)..',"jsonrpc":"2.0","error":{"code":0,"message":"error message","data":{"method":"TTS.Speak"}}}') - self.hmiConnection:Send('{"id":'..tostring(5555)..',"jsonrpc":"2.0","error":{"code":0,"message":"error message","data":{"method":"TTS.Speak"}}}') - + self.hmiConnection:Send('{"id":'..tostring(5555)..',"jsonrpc":"2.0","error":{"code":0,"message":"error message","data":{"method":"TTS.Speak"}}}') + end) --mobile side: expect the response EXPECT_RESPONSE(cid, { success = false, resultCode = "GENERIC_ERROR"}) :Timeout(13000) - + end ----------------------------------------------------------------------------------------- - + --3. IsWrongType Test[APIName.."_Response_CorrelationID_IsWrongType_SendResponse"] = function(self) - + --mobile side: sending the request local Request = self:createRequest() local cid = self.mobileSession:SendRPC("Speak", Request) - + --hmi side: expect the request EXPECT_HMICALL("TTS.Speak", Request) :Do(function(_,data) @@ -1417,15 +1431,15 @@ local function verify_correlationID_parameter() local function speakResponse() self.hmiConnection:SendNotification("TTS.Stopped") - + --hmi side: sending the response --self.hmiConnection:SendResponse(data.id, data.method, "SUCCESS", {info = "info message"}) self.hmiConnection:SendResponse(tostring(data.id), data.method, "SUCCESS", {info = "info message"}) - + end RUN_AFTER(speakResponse, 1000) - - + + end) --mobile side: expect OnHashChange notification @@ -1434,41 +1448,41 @@ local function verify_correlationID_parameter() --mobile side: expect the response EXPECT_RESPONSE(cid, { success = false, resultCode = "GENERIC_ERROR"}) :Timeout(13000) - + end ----------------------------------------------------------------------------------------- - + Test[APIName.."_Response_CorrelationID_IsWrongType_SendError"] = function(self) - + --mobile side: sending the request local Request = self:createRequest() local cid = self.mobileSession:SendRPC("Speak", Request) - + --hmi side: expect the request EXPECT_HMICALL("TTS.Speak", Request) :Do(function(_,data) --hmi side: sending the response --self.hmiConnection:SendError(data.id, data.method, "REJECTED", "error message") self.hmiConnection:SendError(tostring(data.id), data.method, "REJECTED", "error message") - + end) --mobile side: expect the response EXPECT_RESPONSE(cid, { success = false, resultCode = "GENERIC_ERROR"}) :Timeout(13000) - + end ----------------------------------------------------------------------------------------- - --4. IsNegative + --4. IsNegative Test[APIName.."_Response_CorrelationID_IsNegative_SendResponse"] = function(self) - + --mobile side: sending the request local Request = self:createRequest() local cid = self.mobileSession:SendRPC("Speak", Request) - + --hmi side: expect the request EXPECT_HMICALL("TTS.Speak", Request) :Do(function(_,data) @@ -1477,15 +1491,15 @@ local function verify_correlationID_parameter() local function speakResponse() self.hmiConnection:SendNotification("TTS.Stopped") - + --hmi side: sending the response --self.hmiConnection:SendResponse(data.id, data.method, "SUCCESS", {info = "info message"}) self.hmiConnection:SendResponse(-1, data.method, "SUCCESS", {info = "info message"}) - + end RUN_AFTER(speakResponse, 1000) - - + + end) --mobile side: expect OnHashChange notification @@ -1494,35 +1508,35 @@ local function verify_correlationID_parameter() --mobile side: expect the response EXPECT_RESPONSE(cid, { success = false, resultCode = "GENERIC_ERROR"}) :Timeout(13000) - + end ----------------------------------------------------------------------------------------- - + Test[APIName.."_Response_CorrelationID_IsNegative_SendError"] = function(self) - + --mobile side: sending the request local Request = self:createRequest() local cid = self.mobileSession:SendRPC("Speak", Request) - + --hmi side: expect the request EXPECT_HMICALL("TTS.Speak", Request) :Do(function(_,data) --hmi side: sending the response --self.hmiConnection:SendError(data.id, data.method, "REJECTED", "error message") self.hmiConnection:SendError(-1, data.method, "REJECTED", "error message") - + end) --mobile side: expect the response EXPECT_RESPONSE(cid, { success = false, resultCode = "GENERIC_ERROR"}) :Timeout(13000) - + end ----------------------------------------------------------------------------------------- - - -end + + +end verify_correlationID_parameter() @@ -1533,8 +1547,8 @@ verify_correlationID_parameter() --Begin Test case SpecialResponseChecks --Description: Check all negative response cases - - --Requirement id in JAMA: + + --Requirement id in JAMA: --SDLAQ-CRS-55 (Speak_Response_v2_0) --SDLAQ-CRS-505 (INVALID_DATA) --SDLAQ-CRS-504 (SUCCESS) @@ -1543,30 +1557,30 @@ verify_correlationID_parameter() --SDLAQ-CRS-512 (DISALLOWED) --SDLAQ-CRS-1027 (UNSUPPORTED_RESOURCE) --SDLAQ-CRS-1030 (WARNINGS) - - + + local function SpecialResponseChecks() --Print new line to separate new test cases group commonFunctions:newTestCasesGroup("TestCaseGroupForHMINegativeCases") ---------------------------------------------------------------------------------------------- - + --Begin Test case SpecialResponseChecks.1 --Description: Invalid JSON - + --Requirement id in JAMA: SDLAQ-CRS-58 --Verification criteria: The response contains 2 mandatory parameters "success" and "resultCode", "info" is sent if there is any additional information about the resultCode. --[[ToDo: Update when APPLINK resolving APPLINK-14776 SDL behavior in case HMI sends invalid message or message with fake parameters - + function Test:Speak_Response_IsInvalidJson_GENERIC_ERROR() - + --mobile side: sending the request local Request = self:createRequest() local cid = self.mobileSession:SendRPC("Speak", Request) - + --hmi side: expect the request EXPECT_HMICALL("TTS.Speak", Request) :Do(function(_,data) @@ -1575,100 +1589,100 @@ local function SpecialResponseChecks() --self.hmiConnection:Send('{"id":'..tostring(data.id)..',"jsonrpc":"2.0","result":{"method":"TTS.Speak", "code":0}}') self.hmiConnection:Send('{"id";'..tostring(data.id)..',"jsonrpc":"2.0","result":{"method":"TTS.Speak", "code":0}}') end) - + --mobile side: expect the response EXPECT_RESPONSE(cid, { success = false, resultCode = "GENERIC_ERROR" }) :Timeout(12000) - - end + + end ]] --End Test case SpecialResponseChecks.1 --Begin Test case SpecialResponseChecks.2 --Description: Check processing response with fake parameters - - --Verification criteria: When expected HMI function is received, send responses from HMI with fake parameter - + + --Verification criteria: When expected HMI function is received, send responses from HMI with fake parameter + --Begin Test case SpecialResponseChecks.2.1 --Description: Parameter is not from API - + function Test:Speak_Response_FakeParams_IsNotFromAnyAPI_SUCCESS() - + --mobile side: sending the request local Request = self:createRequest() local cid = self.mobileSession:SendRPC("Speak", Request) - + --hmi side: expect the request - EXPECT_HMICALL("TTS.Speak", Request) + EXPECT_HMICALL("TTS.Speak", Request) :Do(function(exp,data) --hmi side: sending the response self.hmiConnection:SendResponse(data.id, data.method, "SUCCESS", {fake = "fake"}) end) - - + + --mobile side: expect the response EXPECT_RESPONSE(cid, { success = true, resultCode = "SUCCESS" }) :ValidIf (function(_,data) if data.payload.fake then commonFunctions:printError(" SDL resend fake parameter to mobile app ") return false - else + else return true end end) - - end - + + end + --End Test case SpecialResponseChecks.2.1 - - + + --Begin Test case SpecialResponseChecks.2.2 --Description: Parameter is not from another API - + function Test:Speak_Response_FakeParams_IsFromAnotherAPI_SUCCESS() - + --mobile side: sending the request local Request = self:createRequest() local cid = self.mobileSession:SendRPC("Speak", Request) - + --hmi side: expect the request - EXPECT_HMICALL("TTS.Speak", Request) + EXPECT_HMICALL("TTS.Speak", Request) :Do(function(exp,data) --hmi side: sending the response self.hmiConnection:SendResponse(data.id, data.method, "SUCCESS", {sliderPosition = 5}) end) - - + + --mobile side: expect the response EXPECT_RESPONSE(cid, { success = true, resultCode = "SUCCESS" }) :ValidIf (function(_,data) if data.payload.sliderPosition then commonFunctions:printError(" SDL resend fake parameter to mobile app ") return false - else + else return true end end) - - end - + + end + --End Test case SpecialResponseChecks.2.2 - + --End Test case SpecialResponseChecks.2 - + --Begin SpecialResponseChecks.3 - --Description: Check processing response without all parameters + --Description: Check processing response without all parameters --[[ToDo: Update when APPLINK resolving APPLINK-14776 SDL behavior in case HMI sends invalid message or message with fake parameters - function Test:Speak_Response_IsMissedAllPArameters_GENERIC_ERROR() - + function Test:Speak_Response_IsMissedAllPArameters_GENERIC_ERROR() + --mobile side: sending the request local Request = self:createRequest() local cid = self.mobileSession:SendRPC("Speak", Request) - + --hmi side: expect the request EXPECT_HMICALL("TTS.Speak", Request) :Do(function(_,data) @@ -1676,11 +1690,11 @@ local function SpecialResponseChecks() --self.hmiConnection:Send('{"id":'..tostring(data.id)..',"jsonrpc":"2.0","result":{"method":"TTS.Speak", "code":0}}') self.hmiConnection:Send('{}') end) - + --mobile side: expect the response EXPECT_RESPONSE(cid, { success = false, resultCode = "GENERIC_ERROR"}) :Timeout(13000) - + end ]] --End SpecialResponseChecks.3 @@ -1697,127 +1711,127 @@ local function SpecialResponseChecks() --mobile side: sending the request local Request = self:createRequest() local cid = self.mobileSession:SendRPC("Speak", Request) - + --hmi side: expect the request - EXPECT_HMICALL("TTS.Speak", Request) - - + EXPECT_HMICALL("TTS.Speak", Request) + + --mobile side: expect the response EXPECT_RESPONSE(cid, { success = false, resultCode = "GENERIC_ERROR"}) :Timeout(12000) - + end - + --End SpecialResponseChecks.4 - + --Begin Test case SpecialResponseChecks.5 --Description: Invalid structure of response - + --Requirement id in JAMA: SDLAQ-CRS-58 --Verification criteria: The response contains 2 mandatory parameters "success" and "resultCode", "info" is sent if there is any additional information about the resultCode - + --ToDo: Update when APPLINK resolving APPLINK-14776 SDL behavior in case HMI sends invalid message or message with fake parameters - + function Test:Speak_Response_IsInvalidStructure_GENERIC_ERROR() --mobile side: sending the request local Request = self:createRequest() local cid = self.mobileSession:SendRPC("Speak", Request) - + --hmi side: expect the request - EXPECT_HMICALL("TTS.Speak", Request) + EXPECT_HMICALL("TTS.Speak", Request) :Do(function(_,data) --hmi side: sending the response --self.hmiConnection:Send('{"id":'..tostring(data.id)..',"jsonrpc":"2.0","result":{"method":"TTS.Speak", "code":0}}') self.hmiConnection:Send('{"id":'..tostring(data.id)..',"jsonrpc":"2.0", "code":0, "result":{"method":"TTS.Speak"}}') - end) - + end) + --mobile side: expect response --TODO update according to APPLINK-14765 -- EXPECT_RESPONSE(cid, { success = false, resultCode = "GENERIC_ERROR", info = "Invalid message received from vehicle"}) EXPECT_RESPONSE(cid, { success = false, resultCode = "INVALID_DATA"}) :Timeout(12000) - + end - - --End Test case SpecialResponseChecks.5 - + --End Test case SpecialResponseChecks.5 + + --Begin Test case SpecialResponseChecks.6 --Description: Several response to one request --Requirement id in JAMA: SDLAQ-CRS-58 - + --Verification criteria: The response contains 2 mandatory parameters "success" and "resultCode", "info" is sent if there is any additional information about the resultCode. - - + + --Begin Test case SpecialResponseChecks.6.1 --Description: Several response to one request - + function Test:Speak_Response_SeveralResponseToOneRequest() --mobile side: sending the request local Request = self:createRequest() local cid = self.mobileSession:SendRPC("Speak", Request) - + --hmi side: expect the request - EXPECT_HMICALL("TTS.Speak", Request) + EXPECT_HMICALL("TTS.Speak", Request) :Do(function(exp,data) --hmi side: sending the response self.hmiConnection:SendResponse(data.id, data.method, "SUCCESS", {}) self.hmiConnection:SendResponse(data.id, data.method, "SUCCESS", {}) self.hmiConnection:SendResponse(data.id, data.method, "SUCCESS", {}) - + end) - - - --mobile side: expect response + + + --mobile side: expect response EXPECT_RESPONSE(cid, { success = true, resultCode = "SUCCESS"}) - - end - + + end + --End Test case SpecialResponseChecks.6.1 - - - + + + --Begin Test case SpecialResponseChecks.6.2 --Description: Several response to one request - + function Test:Speak_Response_SeveralResponse_WithConstractionsOfResult() --mobile side: sending the request local Request = self:createRequest() local cid = self.mobileSession:SendRPC("Speak", Request) - + --hmi side: expect the request - EXPECT_HMICALL("TTS.Speak", Request) + EXPECT_HMICALL("TTS.Speak", Request) :Do(function(exp,data) --hmi side: sending the response self.hmiConnection:SendResponse(data.id, data.method, "INVALID_DATA", {}) - self.hmiConnection:SendResponse(data.id, data.method, "SUCCESS", {}) + self.hmiConnection:SendResponse(data.id, data.method, "SUCCESS", {}) end) - - - --mobile side: expect response + + + --mobile side: expect response EXPECT_RESPONSE(cid, { success = false, resultCode = "INVALID_DATA"}) - - end - + + end + --End Test case SpecialResponseChecks.6.2 ----------------------------------------------------------------------------------------- --End Test case SpecialResponseChecks.6 - + end SpecialResponseChecks() ---End Test case SpecialResponseChecks +--End Test case SpecialResponseChecks + - ----------------------------------------------------------------------------------------------- -------------------------------------------TEST BLOCK V---------------------------------------- -------------------------------------Checks All Result Codes----------------------------------- @@ -1826,7 +1840,7 @@ SpecialResponseChecks() --Begin Test case ResultCodeChecks --Description: Check all resultCodes - --Requirement id in JAMA: + --Requirement id in JAMA: --1. SUCCESS: SDLAQ-CRS-504 --2. INVALID_DATA: SDLAQ-CRS-505 --3. OUT_OF_MEMORY: SDLAQ-CRS-506 @@ -1839,14 +1853,14 @@ SpecialResponseChecks() --10. UNSUPPORTED_RESOURCE: SDLAQ-CRS-1027 --11. WARNINGS: SDLAQ-CRS-1030 - + local function ResultCodeChecks() --Print new line to separate new test cases group commonFunctions:newTestCasesGroup("TestCaseGroupForAllResultCodesVerification") ---------------------------------------------------------------------------------------------- - + --Check resultCode SUCCESS. It is checked by other test cases. --Check resultCode INVALID_DATA. It is checked by other test cases. @@ -1854,8 +1868,8 @@ local function ResultCodeChecks() --Check resultCode GENERIC_ERROR. It is covered in Test:Speak_NoResponse --Check resultCode OUT_OF_MEMORY. ToDo: Wait until requirement is clarified --Check resultCode TOO_MANY_PENDING_REQUESTS. It is moved to other script. - - + + ----------------------------------------------------------------------------------------- --Begin Test case ResultCodeChecks.1 @@ -1863,38 +1877,38 @@ local function ResultCodeChecks() --Requirement id in JAMA: SDLAQ-CRS-508 --Verification criteria: SDL sends APPLICATION_NOT_REGISTERED code when the app sends a request within the same connection before RegisterAppInterface has been performed yet. - + commonTestCases:verifyResultCode_APPLICATION_NOT_REGISTERED() - + --End Test case ResultCodeChecks.1 ----------------------------------------------------------------------------------------- --Begin Test case ResultCodeChecks.2 --Description: Check resultCode DISALLOWED: SDLAQ-CRS-512 - + --Requirement id in JAMA: SDLAQ-CRS-512 - --Verification criteria: + --Verification criteria: --1. SDL must return "resultCode: DISALLOWED, success:false" to the RPC in case this RPC is omitted in the PolicyTable group(s) assigned to the app that requests this RPC. - --2. SDL must return "resultCode: DISALLOWED, success:false" to the RPC in case this RPC is included to the PolicyTable group(s) assigned to the app that requests this RPC and the group has not yet received user's consents. - + --2. SDL must return "resultCode: DISALLOWED, success:false" to the RPC in case this RPC is included to the PolicyTable group(s) assigned to the app that requests this RPC and the group has not yet received user's consents. + --[[TODO debug after resolving APPLINK-13101 - + --Begin Test case ResultCodeChecks.2.1 --Description: 1. SDL must return "resultCode: DISALLOWED, success:false" to the RPC in case this RPC is omitted in the PolicyTable group(s) assigned to the app that requests this RPC. - - policyTable:checkPolicyWhenAPIIsNotExist() - + + policyTable:checkPolicyWhenAPIIsNotExist() + --End Test case ResultCodeChecks.2.1 - - + + --Begin Test case ResultCodeChecks.2.2 --Description: 2. SDL must return "resultCode: DISALLOWED, success:false" to the RPC in case this RPC is included to the PolicyTable group(s) assigned to the app that requests this RPC and the group has not yet received user's consents. - + policyTable:checkPolicyWhenUserDisallowed({"FULL", "LIMITED"}) - + --End Test case ResultCodeChecks.2.2 - ]] + ]] --End Test case ResultCodeChecks.2 ----------------------------------------------------------------------------------------- @@ -1914,36 +1928,36 @@ ResultCodeChecks() --Begin Test suit SequenceChecks --Description: TC's checks SDL behavior by processing -- different request sequence with timeout - -- with emulating of user's actions - + -- with emulating of user's actions + local function SequenceChecks() --Print new line to separate new test cases group commonFunctions:newTestCasesGroup("TestCaseGroupForSequenceChecks") ---------------------------------------------------------------------------------------------- - + --Begin Test case SequenceChecks.1 --Description: Check for manual test case TC_Speak_01 --Requirement id in JAMA: SDLAQ-TC-120 - --Verification criteria: Call Speak request from mobile app on HMI + --Verification criteria: Call Speak request from mobile app on HMI + - function Test:Speak_TC_Speak_01() --verify type = TEXT local Request = { - ttsChunks = - { + ttsChunks = + { {text ="Text1", type ="TEXT"}, {text ="Text2", type ="TEXT"}, {text ="Text3", type ="TEXT"}, } } - + self:verify_SUCCESS_Case(Request) - + --verify type = TEXT, text = " ": it is covered by verify_String_Parameter_WithOut_Madatory_Check (7. IsInvalidCharacters: "\n", "\t", " ") end @@ -1952,14 +1966,14 @@ local function SequenceChecks() ----------------------------------------------------------------------------------------- --Begin Test case SequenceChecks.2 - --Description: - --Check for manual test case TC_Speak_02: + --Description: + --Check for manual test case TC_Speak_02: --Requirement id in JAMA: SDLAQ-TC-777 --Verification criteria: Call Speak request from mobile app on HMI and check TTS.OnResetTimeout notification received from HMI function Test:Speak_TC_Speak_02_Step1() - + --mobile side: sending the request local Request = self:createRequest() local cid = self.mobileSession:SendRPC("Speak", Request) @@ -1975,14 +1989,14 @@ local function SequenceChecks() self.hmiConnection:SendNotification("TTS.Stopped") end - + local function SendOnResetTimeout() self.hmiConnection:SendNotification("TTS.OnResetTimeout", {appID = self.applications["Test Application"], methodName = "TTS.Speak"}) end - + --send TTS.OnResetTimeout notification after 9 seconds RUN_AFTER(SendOnResetTimeout, 9000) - + --send TTS.Speak response after 9 seconds after reset timeout RUN_AFTER(speakResponse, 18000) end) @@ -1994,13 +2008,13 @@ local function SequenceChecks() --mobile side: expect the response EXPECT_RESPONSE(cid, { success = true, resultCode = "SUCCESS" }) :Timeout(20000) - - + + end - + function Test:Speak_TC_Speak_02_Step2() - + --mobile side: sending the request local Request = self:createRequest() local cid = self.mobileSession:SendRPC("Speak", Request) @@ -2016,20 +2030,20 @@ local function SequenceChecks() self.hmiConnection:SendNotification("TTS.Stopped") end - + local function SendOnResetTimeout() self.hmiConnection:SendNotification("TTS.OnResetTimeout", {appID = self.applications["Test Application"], methodName = "TTS.Speak"}) end - + --send TTS.OnResetTimeout notification after 9 seconds RUN_AFTER(SendOnResetTimeout, 9000) - + --send TTS.OnResetTimeout notification after 9 seconds RUN_AFTER(SendOnResetTimeout, 18000) - + --send TTS.OnResetTimeout notification after 9 seconds RUN_AFTER(SendOnResetTimeout, 24000) - + --send TTS.Speak response after 9 seconds after reset timeout RUN_AFTER(speakResponse, 33000) end) @@ -2037,16 +2051,16 @@ local function SequenceChecks() --mobile side: expect OnHashChange notification ExpectOnHMIStatusWithAudioStateChanged(self, "FULL", 35000) - + --mobile side: expect the response EXPECT_RESPONSE(cid, { success = true, resultCode = "SUCCESS" }) :Timeout(35000) - - + + end - - + + --End Test case SequenceChecks.2 ----------------------------------------------------------------------------------------- @@ -2058,7 +2072,7 @@ local function SequenceChecks() --Verification criteria: Call Speak request from mobile app on HMI and check TTS.OnResetTimeout notification received from HMI function Test:Speak_TC_Speak_03() - + --mobile side: sending the request local Request = self:createRequest() local cid = self.mobileSession:SendRPC("Speak", Request) @@ -2072,10 +2086,10 @@ local function SequenceChecks() local function SendOnResetTimeout() self.hmiConnection:SendNotification("TTS.OnResetTimeout", {appID = self.applications["Test Application"], methodName = "TTS.Speak"}) end - + --send TTS.OnResetTimeout notification after 9 seconds RUN_AFTER(SendOnResetTimeout, 9000) - + end) @@ -2085,13 +2099,13 @@ local function SequenceChecks() else EXPECT_NOTIFICATION("OnHMIStatus", {}) :Times(0) - end + end --mobile side: expect the response EXPECT_RESPONSE(cid, { success = false, resultCode = "GENERIC_ERROR" }) :Timeout(22000) - - + + end function Test:PostCondition() @@ -2104,9 +2118,9 @@ local function SequenceChecks() else EXPECT_NOTIFICATION("OnHMIStatus") :Times(0) - end + end end - + --End Test case SequenceChecks.3 ----------------------------------------------------------------------------------------- @@ -2116,20 +2130,20 @@ local function SequenceChecks() --Requirement id in JAMA: SDLAQ-TC-1085 --Verification criteria: This test case is check that Speak response with "success"="false" when ResultCode is "ABORTED" - + function Test:Speak_TC_Speak_04() local Request = { - ttsChunks = - { + ttsChunks = + { {text ="Text1", type ="TEXT"}, {text ="Text2", type ="TEXT"}, {text ="Text3", type ="TEXT"}, } } - - --mobile side: sending the request + + --mobile side: sending the request local cid = self.mobileSession:SendRPC("Speak", Request) --hmi side: expect TTS.Speak request @@ -2139,22 +2153,22 @@ local function SequenceChecks() SpeakId = data.id local function speakResponse() - + --HMI sends TTS.Speak: ABORTED self.hmiConnection:SendResponse(SpeakId, "TTS.Speak", "ABORTED", { }) - + --HMI sends TTS.Stopped self.hmiConnection:SendNotification("TTS.Stopped") - + --HMI sends VR.Started self.hmiConnection:SendNotification("VR.Started") - + --HMI sends UI.OnSystemContext self.hmiConnection:SendNotification("UI.OnSystemContext",{ appID = self.applications["Test Application"], systemContext = "VRSESSION" }) - + end - - + + --HMI sends response and notifications RUN_AFTER(speakResponse, 1000) end) @@ -2176,23 +2190,23 @@ local function SequenceChecks() {systemContext = "VRSESSION", hmiLevel = "FULL", audioStreamingState = "NOT_AUDIBLE"}) :Times(4) end - + --mobile side: expect the response EXPECT_RESPONSE(cid, { success = false, resultCode = "ABORTED" }) - + end - + function Test:PostCondition() --HMI sends VR.Started self.hmiConnection:SendNotification("VR.Stopped") - + --HMI sends UI.OnSystemContext self.hmiConnection:SendNotification("UI.OnSystemContext",{ appID = self.applications["Test Application"], systemContext = "MAIN" }) - - + + --mobile side: expect OnHashChange notification if commonFunctions:isMediaApp() then EXPECT_NOTIFICATION("OnHMIStatus", @@ -2205,12 +2219,12 @@ local function SequenceChecks() {systemContext = "MAIN", hmiLevel = "FULL", audioStreamingState = "NOT_AUDIBLE"}) :Times(0) end - - + + end - - + + --End Test case SequenceChecks.4 ----------------------------------------------------------------------------------------- @@ -2219,8 +2233,8 @@ end SequenceChecks() ---End Test suit SequenceChecks - +--End Test suit SequenceChecks + ---------------------------------------------------------------------------------------------- -----------------------------------------TEST BLOCK VII--------------------------------------- @@ -2230,11 +2244,23 @@ SequenceChecks() --SDLAQ-CRS-778: HMI Status Requirements for Speak --SDL rejects Speak request with REJECTED resultCode when current HMI level is NONE or BACKGROUND. --SDL doesn't reject Speak request when current HMI is FULL. - --SDL doesn't reject Speak request when current HMI is LIMITED. + --SDL doesn't reject Speak request when current HMI is LIMITED. --Verify resultCode in NONE, LIMITED, BACKGROUND hmi level commonTestCases:verifyDifferentHMIStatus("DISALLOWED", "SUCCESS", "DISALLOWED") - - -return Test \ No newline at end of file + +--------------------------------------------------------------------------------------------- +-------------------------------------------Postcondition------------------------------------- +--------------------------------------------------------------------------------------------- + + --Print new line to separate Postconditions + commonFunctions:newTestCasesGroup("Postconditions") + + + --Restore sdl_preloaded_pt.json + policyTable:Restore_preloaded_pt() + + + + return Test diff --git a/test_scripts/API/ATF_StopStream_StopAudioStream.lua b/test_scripts/API/ATF_StopStream_StopAudioStream.lua new file mode 100644 index 0000000000..f20cf37372 --- /dev/null +++ b/test_scripts/API/ATF_StopStream_StopAudioStream.lua @@ -0,0 +1,392 @@ +Test = require('connecttest') +require('cardinalities') +local events = require('events') +local mobile_session = require('mobile_session') +local config = require('config') + + + +--------------------------------------------------------------------------------------------- +-------------------------------------------Preconditions------------------------------------- +--------------------------------------------------------------------------------------------- +--Begin Precondition.1 +--Description: Activation of applivation + + function Test:ActivationApp() + local RequestId = self.hmiConnection:SendRequest("SDL.ActivateApp", { appID = self.applications["Test Application"]}) + + EXPECT_HMIRESPONSE(RequestId) + :Do(function(_,data) + if + data.result.isSDLAllowed ~= true then + local RequestId = self.hmiConnection:SendRequest("SDL.GetUserFriendlyMessage", {language = "EN-US", messageCodes = {"DataConsent"}}) + + --EXPECT_HMIRESPONSE(RequestId,{result = {code = 0, method = "SDL.GetUserFriendlyMessage"}}) + EXPECT_HMIRESPONSE(RequestId) + :Do(function(_,data) + --hmi side: send request SDL.OnAllowSDLFunctionality + self.hmiConnection:SendNotification("SDL.OnAllowSDLFunctionality", {allowed = true, source = "GUI", device = {id = config.deviceMAC, name = "127.0.0.1"}}) + + --hmi side: expect BasicCommunication.ActivateApp + EXPECT_HMICALL("BasicCommunication.ActivateApp") + :Do(function(_,data) + self.hmiConnection:SendResponse(data.id,"BasicCommunication.ActivateApp", "SUCCESS", {}) + end) + :Times(2) + end) + end + end) + + EXPECT_NOTIFICATION("OnHMIStatus", {hmiLevel = "FULL", systemContext = "MAIN"}) + + end + +--End Precondition.1 +--------------------------------------------------------------------------------------------- + +--Description: CRQ APPLINK-14806 - SDL must send StopStream/StopAudioStream to HMI in case HMI does not respond at least to one StartStream_request +--Test.1: checked that SDL send to HMI StopStream and StopAudioStream to HMI if for StartStream HMI responded SUCCESS but for StartAudioStream retry sequence was unsuccessful + + function Test:REJECT_StartAudioStream() + + -- start video service + self.mobileSession:StartService(11) + :Do(function() + print ("\27[32m Video service is started \27[0m ") + end) + + EXPECT_HMICALL("Navigation.StartStream") + :Do(function(_,data) + -- successful StartStream on HMI side + self.hmiConnection:SendResponse(data.id,"Navigation.StartStream", "SUCCESS", {}) + end) + + -- start AudioService + self.mobileSession:StartService(10) + :Do(function() + print ("\27[32m Audio service is started \27[0m ") + end) + + EXPECT_HMICALL("Navigation.StartAudioStream") + :Do(function(_,data) + --hmi side: sending the error response + self.hmiConnection:SendError(data.id, data.method, "REJECTED", "error message") + end) + :Times(4) --assumed that StartStreamRetry = 3, 1000 in .ini file by default + --:Times(3) --W/A due to defect APPLINK-13457. Comment this line and uncomment line above after defect fix + + --after unsuccessfull retry sequence SDL should send StopAudioStream to HMIz + EXPECT_HMICALL("Navigation.StopAudioStream") + :Do(function(_,data) + -- successful StopAudioStream on HMI side + self.hmiConnection:SendResponse(data.id,"Navigation.StopAudioStream", "SUCCESS", {}) + end) + + --after unsuccessfull retry sequence SDL should send StopStream to HMI + EXPECT_HMICALL("Navigation.StopStream") + :Do(function(_,data) + -- successful StopStream on HMI side + self.hmiConnection:SendResponse(data.id,"Navigation.StopStream", "SUCCESS", {}) + end) + + -- Event: EndService from SDL for audion and video services + local event = events.Event() + event.matches = function(_, data) + return data.frameType == 0 and + (data.serviceType == 11 or data.serviceType == 10) and + data.sessionId == self.mobileSession.sessionId and + (data.frameInfo == 4) --EndService + end + self.mobileSession:ExpectEvent(event, "EndService") + :Timeout(60000) + :Times(2) + :ValidIf(function(s, data) + if data.frameInfo == 4 and data.serviceType == 11 + then + --Mobile side: mobile send EndVideoService ACK to SDL + self.mobileSession:Send( + { + frameType = 0, + serviceType = 11, + frameInfo = 5, + sessionId = self.mobileSession.sessionId, + }) + return true + + elseif data.frameInfo == 4 and data.serviceType == 10 + then + --Mobile side: mobile send EndAudioService ACK to SDL + self.mobileSession:Send( + { + frameType = 0, + serviceType = 10, + frameInfo = 5, + sessionId = self.mobileSession.sessionId, + }) + return true + + else return false, "End Service not received" end + end) + + end + + +------------------------------------------------------------------------------------------------------------------------------------------------ + +--Test.2: checked that SDL send to HMI StopStream and StopAudioStream to HMI if for StartAudioStream HMI responded SUCCESS but for StartStream retry sequence was unsuccessful + + function Test:REJECT_StartStream() + + -- start video service + self.mobileSession:StartService(10) + :Do(function() + print ("\27[32m Audio service is started \27[0m ") + end) + + EXPECT_HMICALL("Navigation.StartAudioStream") + :Do(function(_,data) + -- successful StartAudioStream on HMI side + self.hmiConnection:SendResponse(data.id,"Navigation.StartAudioStream", "SUCCESS", {}) + end) + + -- start VideoService + self.mobileSession:StartService(11) + :Do(function() + print ("\27[32m Video service is started \27[0m ") + end) + + EXPECT_HMICALL("Navigation.StartStream") + :Do(function(_,data) + --hmi side: sending the error response + self.hmiConnection:SendError(data.id, data.method, "REJECTED", "error message") + end) + --:Times(4) --assumed that StartStreamRetry = 3, 1000 in .ini file by default + :Times(3) --W/A due to defect APPLINK-13457. Comment this line and uncomment line above after defect fix + + + --after unsuccessfull retry sequence SDL should send StopAudioStream to HMI + EXPECT_HMICALL("Navigation.StopAudioStream") + :Do(function(_,data) + -- successful StopAudioStream on HMI side + self.hmiConnection:SendResponse(data.id,"Navigation.StopAudioStream", "SUCCESS", {}) + end) + + --after unsuccessfull retry sequence SDL should send StopStream to HMI + EXPECT_HMICALL("Navigation.StopStream") + :Do(function(_,data) + -- successful StopStream on HMI side + self.hmiConnection:SendResponse(data.id,"Navigation.StopStream", "SUCCESS", {}) + end) + + -- Event: EndService from SDL for audion and video services + local event = events.Event() + event.matches = function(_, data) + return data.frameType == 0 and + (data.serviceType == 11 or data.serviceType == 10) and + data.sessionId == self.mobileSession.sessionId and + (data.frameInfo == 4) --EndService + end + self.mobileSession:ExpectEvent(event, "EndService") + :Timeout(60000) + :Times(2) + :ValidIf(function(s, data) + if data.frameInfo == 4 and data.serviceType == 11 + then + --Mobile side: mobile send EndVideoService ACK to SDL + self.mobileSession:Send( + { + frameType = 0, + serviceType = 11, + frameInfo = 5, + sessionId = self.mobileSession.sessionId, + }) + return true + + elseif data.frameInfo == 4 and data.serviceType == 10 + then + --Mobile side: mobile send EndAudioService ACK to SDL + self.mobileSession:Send( + { + frameType = 0, + serviceType = 10, + frameInfo = 5, + sessionId = self.mobileSession.sessionId, + }) + return true + + else return false, "End Service not received" end + end) + + end + +------------------------------------------------------------------------------------------------------------------------------------------------ + +--Test.3: checked that SDL send to HMI StopStream and StopAudioStream if for StartStream HMI responded SUCCESS but does not responded for StartAudioStream request + + function Test:NoResponse_StartAudioStream() + + -- start video service + self.mobileSession:StartService(11) + :Do(function() + print ("\27[32m Video service is started \27[0m ") + end) + + EXPECT_HMICALL("Navigation.StartStream") + :Do(function(_,data) + -- successful StartStream on HMI side + self.hmiConnection:SendResponse(data.id,"Navigation.StartStream", "SUCCESS", {}) + end) + + -- start AudioService + self.mobileSession:StartService(10) + :Do(function() + print ("\27[32m Audio service is started \27[0m ") + end) + + EXPECT_HMICALL("Navigation.StartAudioStream") + :Do(function(_,data) + end) + :Timeout(6000) + --:Times(4) --assumed that StartStreamRetry = 3, 1000 in .ini file by default + :Times(3) --W/A due to defect APPLINK-13457. Comment this line and uncomment line above after defect fix + + --after unsuccessfull retry sequence SDL should send StopAudioStream to HMI + EXPECT_HMICALL("Navigation.StopAudioStream") + :Do(function(_,data) + -- successful StopAudioStream on HMI side + self.hmiConnection:SendResponse(data.id,"Navigation.StopAudioStream", "SUCCESS", {}) + end) + + --after unsuccessfull retry sequence SDL should send StopStream to HMI + EXPECT_HMICALL("Navigation.StopStream") + :Do(function(_,data) + -- successful StopStream on HMI side + self.hmiConnection:SendResponse(data.id,"Navigation.StopStream", "SUCCESS", {}) + end) + + -- Event: EndService from SDL for audion and video services + local event = events.Event() + event.matches = function(_, data) + return data.frameType == 0 and + (data.serviceType == 11 or data.serviceType == 10) and + data.sessionId == self.mobileSession.sessionId and + (data.frameInfo == 4) --EndService + end + self.mobileSession:ExpectEvent(event, "EndService") + :Timeout(60000) + :Times(2) + :ValidIf(function(s, data) + if data.frameInfo == 4 and data.serviceType == 11 + then + --Mobile side: mobile send EndVideoService ACK to SDL + self.mobileSession:Send( + { + frameType = 0, + serviceType = 11, + frameInfo = 5, + sessionId = self.mobileSession.sessionId, + }) + return true + + elseif data.frameInfo == 4 and data.serviceType == 10 + then + --Mobile side: mobile send EndAudioService ACK to SDL + self.mobileSession:Send( + { + frameType = 0, + serviceType = 10, + frameInfo = 5, + sessionId = self.mobileSession.sessionId, + }) + return true + else return false, "End Service not received" end + end) + + end + + +------------------------------------------------------------------------------------------------------------------------------------------------ + +--Test.4: checked that SDL send to HMI StopStream and StopAudioStream to HMI if for StartAudioStream HMI responded SUCCESS but does not respond for StartStream request + + function Test:NoResponse_StartStream() + + -- start video service + self.mobileSession:StartService(10) + :Do(function() + print ("\27[32m Audio service is started \27[0m ") + end) + + EXPECT_HMICALL("Navigation.StartAudioStream") + :Do(function(_,data) + -- successful StartAudioStream on HMI side + self.hmiConnection:SendResponse(data.id,"Navigation.StartAudioStream", "SUCCESS", {}) + end) + + -- start VideoService + self.mobileSession:StartService(11) + :Do(function() + print ("\27[32m Video service is started \27[0m ") + end) + + EXPECT_HMICALL("Navigation.StartStream") + :Do(function(_,data) + end) + :Timeout(6000) + --:Times(4) --assumed that StartStreamRetry = 3, 1000 in .ini file by default + :Times(3) --W/A due to defect APPLINK-13457. Comment this line and uncomment line above after defect fix + + --after unsuccessfull retry sequence SDL should send StopAudioStream to HMI + EXPECT_HMICALL("Navigation.StopAudioStream") + :Do(function(_,data) + -- successful StopAudioStream on HMI side + self.hmiConnection:SendResponse(data.id,"Navigation.StopAudioStream", "SUCCESS", {}) + end) + + --after unsuccessfull retry sequence SDL should send StopStream to HMI + EXPECT_HMICALL("Navigation.StopStream") + :Do(function(_,data) + -- successful StopStream on HMI side + self.hmiConnection:SendResponse(data.id,"Navigation.StopStream", "SUCCESS", {}) + end) + + -- Event: EndService from SDL for audion and video services + local event = events.Event() + event.matches = function(_, data) + return data.frameType == 0 and + (data.serviceType == 11 or data.serviceType == 10) and + data.sessionId == self.mobileSession.sessionId and + (data.frameInfo == 4) --EndService + end + self.mobileSession:ExpectEvent(event, "EndService") + :Timeout(60000) + :Times(2) + :ValidIf(function(s, data) + if data.frameInfo == 4 and data.serviceType == 11 + then + --Mobile side: mobile send EndVideoService ACK to SDL + self.mobileSession:Send( + { + frameType = 0, + serviceType = 11, + frameInfo = 5, + sessionId = self.mobileSession.sessionId, + }) + return true + + elseif data.frameInfo == 4 and data.serviceType == 10 + then + --Mobile side: mobile send EndAudioService ACK to SDL + self.mobileSession:Send( + { + frameType = 0, + serviceType = 10, + frameInfo = 5, + sessionId = self.mobileSession.sessionId, + }) + return true + + else return false, "End Service not received" end + end) + + end diff --git a/test_scripts/API/ATF_SubscribeButton.lua b/test_scripts/API/ATF_SubscribeButton.lua new file mode 100644 index 0000000000..ced0ca32ed --- /dev/null +++ b/test_scripts/API/ATF_SubscribeButton.lua @@ -0,0 +1,2303 @@ +-- Note: List of existing problems: +---Known defects: + -- APPLINK-11135: SDL does not send notifications OnButtonEvent to mobile app for "OK" in FULL + -- APPLINK-14082: SDL doesn't resend OnButtonPress notification for "OK" in LIMITED. + -- APPLINK-14054: Redundant resumption procedure occurs right after manual activation. + + +--------------------------------------------------------------------------------------------- +--Test result: This test script has 8 failed test cases. It related to subscribe OK button (APPLINK-11135), CUSTOM_BUTTON and SEARCH buttons (UNSUPPORT_RESOURCE) +--------------------------------------------------------------------------------------------- + +Test = require('user_modules/connecttestSubscribeSB') +require('cardinalities') +local events = require('events') +local mobile_session = require('mobile_session') +local mobile = require('mobile_connection') +local tcp = require('tcp_connection') +local file_connection = require('file_connection') +local config = require('config') + +local iTimeout = 5000 +local buttonName = {"OK","SEEKLEFT","SEEKRIGHT","TUNEUP","TUNEDOWN", "PRESET_0","PRESET_1","PRESET_2","PRESET_3","PRESET_4","PRESET_5","PRESET_6","PRESET_7","PRESET_8"} +local buttonNameNonMediaApp = {"OK", "PRESET_0","PRESET_1","PRESET_2","PRESET_3","PRESET_4","PRESET_5","PRESET_6","PRESET_7","PRESET_8"} +local UnsupportButtonName = {"PRESET_9", "SEARCH"} + + +local str1000Chars = + "10123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyza b c aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa" + + +local info = {nil, "unused"} +local OutBound = {"a", "nonexistButton", str1000Chars} +local OutBoundName = {"OneCharacter", "nonexistButton", "String1000Characters"} + +local resultCode = {"SUCCESS", "INVALID_DATA", "OUT_OF_MEMORY", "TOO_MANY_PENDING_REQUESTS", "APPLICATION_NOT_REGISTERED", "REJECTED", "IGNORED", "GENERIC_ERROR", "UNSUPPORTED_RESOURCE", "DISALLOWED"} + +local success = {true, false, false, false, false, false, false, false, false, false} + +local appID0, appId1, appId2 + +local application2_nonmedia = +{ + registerAppInterfaceParams = + { + syncMsgVersion = + { + majorVersion = 3, + minorVersion = 3 + }, + appName = "Test Application_nonmadia", + isMediaApplication = false, + languageDesired = 'EN-US', + hmiDisplayLanguageDesired = 'EN-US', + appHMIType = { "DEFAULT" }, + appID = "0000005", + deviceInfo = + { + os = "Android", + carrier = "Megafon", + firmwareRev = "Name: Linux, Version: 3.4.0-perf", + osVersion = "4.4.2", + maxNumberRFCOMMPorts = 1 + } + } +} + +-- Common functions + +function DelayedExp(time) + local event = events.Event() + event.matches = function(self, e) return self == e end + EXPECT_EVENT(event, "Delayed event") + :Timeout(time+1000) + RUN_AFTER(function() + RAISE_EVENT(event, event) + end, time) +end + +local function SendOnSystemContext(self, ctx) + self.hmiConnection:SendNotification("UI.OnSystemContext",{ appID = self.applications["Test Application"], systemContext = ctx }) +end + +local function SendOnSystemContextOnAppID(self, ctx, strAppID) + self.hmiConnection:SendNotification("UI.OnSystemContext",{ appID = strAppID, systemContext = ctx }) +end + +local function Precondition_TC_UnsubscribeButton(self, btnName) + + Test["Precondition_TC_UnsubscribeButton_" .. tostring(btnName)] = function(self) + --mobile side: sending SubscribeButton request + local cid = self.mobileSession:SendRPC("UnsubscribeButton", + { + buttonName = btnName + } + ) + + --expect Buttons.OnButtonSubscription + EXPECT_HMINOTIFICATION("Buttons.OnButtonSubscription", {isSubscribed = false, name = btnName}) + :Times(AtMost(1)) + + --mobile side: expect UnsubscribeButton response + EXPECT_RESPONSE("UnsubscribeButton") + :ValidIf(function(_,data) + if data.payload.resultCode == "SUCCESS" then + --mobile side: OnHashChange notification + EXPECT_NOTIFICATION("OnHashChange") + + return true + elseif (data.payload.resultCode == "IGNORED") then + print("\27[32m" .. btnName .. " button has not subscribed yet. resultCode = "..tostring(data.payload.resultCode) .. "\27[0m") + return true + else + print(" \27[36m UnsubscribeButton response came with wrong resultCode "..tostring(data.payload.resultCode) .. "\27[0m") + return false + end + end) + + DelayedExp(1000) + + end + +end + +local function Precondition_TC_SubscribeButton(self, btnName) + + Test["Precondition_TC_SubscribeButton_" .. tostring(btnName)] = function(self) + --mobile side: sending SubscribeButton request + local cid = self.mobileSession:SendRPC("SubscribeButton", + { + buttonName = btnName + } + ) + + --expect Buttons.OnButtonSubscription + EXPECT_HMINOTIFICATION("Buttons.OnButtonSubscription", {appID = self.applications["Test Application"], isSubscribed = true, name = btnName}) + + --mobile side: expect UnsubscribeButton response + EXPECT_RESPONSE("SubscribeButton") + :ValidIf(function(_,data) + if (data.payload.resultCode == "SUCCESS") then + EXPECT_NOTIFICATION("OnHashChange") + return true + elseif (data.payload.resultCode == "IGNORED") then + print(btnName .. " button has already been subscribed. resultCode = "..tostring(data.payload.resultCode)) + return true + else + print("SubscribeButton response came with wrong resultCode "..tostring(data.payload.resultCode)) + return false + end + end) + end + +end + +local function TC_OnButtonEvent_OnButtonPress_When_SubscribedButton(self, btnName, strMode, strTestCaseName) + + Test[strTestCaseName] = function(self) + + + --hmi side: send request Buttons.OnButtonEvent + self.hmiConnection:SendNotification("Buttons.OnButtonEvent", + { + name = btnName, + mode = "BUTTONDOWN" + }) + + + + local function OnButtonEventBUTTONUP() + --hmi side: send request Buttons.OnButtonEvent + self.hmiConnection:SendNotification("Buttons.OnButtonEvent", + { + name = btnName, + mode = "BUTTONUP" + }) + end + + --hmi side: send request Buttons.OnButtonPress + local function OnButtonPress() + self.hmiConnection:SendNotification("Buttons.OnButtonPress", + { + name = btnName, + mode = strMode + }) + end + + if strMode == "LONG" then + --hmi side: send request Buttons.OnButtonPress + RUN_AFTER(OnButtonPress, 50) + + --hmi side: send request Buttons.OnButtonEvent + RUN_AFTER(OnButtonEventBUTTONUP, 100) + + else + --hmi side: send request Buttons.OnButtonEvent + RUN_AFTER(OnButtonEventBUTTONUP, 50) + + --hmi side: send request Buttons.OnButtonPress + RUN_AFTER(OnButtonPress, 100) + end + + --Mobile expects OnButtonEvent + EXPECT_NOTIFICATION("OnButtonEvent", + {buttonName = btnName, buttonEventMode = "BUTTONDOWN"}, + {buttonName = btnName, buttonEventMode = "BUTTONUP"} + ) + :Times(2) + + --Mobile expects OnButtonEvent + EXPECT_NOTIFICATION("OnButtonPress", {buttonName = btnName, buttonPressMode = strMode}) + + DelayedExp(2000) + + end + +end + +local function TC_OnButtonEvent_OnButtonPress_When_UnsubscribedButton(self, btnName, strMode, strTestCaseName) + + Test[strTestCaseName] = function(self) + + + --hmi side: send request Buttons.OnButtonEvent + self.hmiConnection:SendNotification("Buttons.OnButtonEvent", + { + name = btnName, + mode = "BUTTONDOWN" + }) + + + + local function OnButtonEventBUTTONUP() + --hmi side: send request Buttons.OnButtonEvent + self.hmiConnection:SendNotification("Buttons.OnButtonEvent", + { + name = btnName, + mode = "BUTTONUP" + }) + end + + --hmi side: send request Buttons.OnButtonPress + local function OnButtonPress() + self.hmiConnection:SendNotification("Buttons.OnButtonPress", + { + name = btnName, + mode = strMode + }) + end + + if strMode == "LONG" then + --hmi side: send request Buttons.OnButtonPress + RUN_AFTER(OnButtonPress, 50) + + --hmi side: send request Buttons.OnButtonEvent + RUN_AFTER(OnButtonEventBUTTONUP, 100) + + else + --hmi side: send request Buttons.OnButtonEvent + RUN_AFTER(OnButtonEventBUTTONUP, 50) + + --hmi side: send request Buttons.OnButtonPress + RUN_AFTER(OnButtonPress, 100) + end + + --Mobile expects OnButtonEvent + EXPECT_NOTIFICATION("OnButtonEvent") + :Times(0) + + --Mobile expects OnButtonEvent + EXPECT_NOTIFICATION("OnButtonPress") + :Times(0) + + DelayedExp(2000) + end + +end + +local function TC_SubscribeButtonSUCCESS(self, btnName, strTestCaseName) + + Test[strTestCaseName] = function(self) + + --mobile side: sending SubscribeButton request + local cid = self.mobileSession:SendRPC("SubscribeButton", + { + buttonName = btnName + } + ) + + --hmi side: receiving Buttons.OnButtonSubscription + EXPECT_HMINOTIFICATION("Buttons.OnButtonSubscription", {appID = self.applications["Test Application"], isSubscribed = true, name = btnName}) + + --mobile side: expect SubscribeButton response + EXPECT_RESPONSE(cid, {resultCode = "SUCCESS", success = true}) + + EXPECT_NOTIFICATION("OnHashChange") + end +end + +function ActivateApplication(self, strAppName) + --HMI send ActivateApp request + + local RequestId = self.hmiConnection:SendRequest("SDL.ActivateApp", { appID = self.applications[strAppName]}) + EXPECT_HMIRESPONSE(RequestId) + :Do(function(_,data) + if data.result.isSDLAllowed ~= true then + local RequestId = self.hmiConnection:SendRequest("SDL.GetUserFriendlyMessage", {language = "EN-US", messageCodes = {"DataConsent"}}) + --TODO: Update after resolving APPLINK-16094 EXPECT_HMIRESPONSE(RequestId,{result = {code = 0, method = "SDL.GetUserFriendlyMessage"}}) + EXPECT_HMIRESPONSE(RequestId) + :Do(function(_,data) + --hmi side: send request SDL.OnAllowSDLFunctionality + self.hmiConnection:SendNotification("SDL.OnAllowSDLFunctionality", {allowed = true, source = "GUI", device = {id = config.deviceMAC, name = "127.0.0.1"}}) + + EXPECT_HMICALL("BasicCommunication.ActivateApp") + :Do(function(_,data) + self.hmiConnection:SendResponse(data.id,"BasicCommunication.ActivateApp", "SUCCESS", {}) + end) + :Times(2) + end) + end + end) + + EXPECT_NOTIFICATION("OnHMIStatus", {hmiLevel = "FULL", systemContext = "MAIN"}) + :Timeout(12000) + +end + +function RegisterAppInterface(self, appNumber) + --mobile side: sending request + local CorIdRegister, strAppName + + if appNumber ==1 then + CorIdRegister = self.mobileSession:SendRPC("RegisterAppInterface", config.application1.registerAppInterfaceParams) + strAppName = config.application1.registerAppInterfaceParams.appName + elseif appNumber ==2 then + CorIdRegister = self.mobileSession:SendRPC("RegisterAppInterface", application2_nonmedia.registerAppInterfaceParams) + strAppName = application2_nonmedia.registerAppInterfaceParams.appName + end + --hmi side: expect BasicCommunication.OnAppRegistered request + EXPECT_HMINOTIFICATION("BasicCommunication.OnAppRegistered", + { + application = + { + appName = strAppName + } + }) + :Do(function(_,data) + local appId = data.params.application.appID + self.appId = appId + appId0 = appId + self.appName = data.params.application.appName + self.applications[strAppName] = appId + end) + + --mobile side: expect response + self.mobileSession:ExpectResponse(CorIdRegister, + { + syncMsgVersion = + { + majorVersion = 3, + minorVersion = 0 + } + }) + :Timeout(12000) + + --mobile side: expect notification + self.mobileSession:ExpectNotification("OnHMIStatus", + { + systemContext = "MAIN", hmiLevel = "NONE", audioStreamingState = "NOT_AUDIBLE" + }) + :Timeout(12000) + + + DelayedExp(1000) + end + +--------------------------------------------------------------------------------------------- +-------------------------------------------Preconditions------------------------------------- +--------------------------------------------------------------------------------------------- + --Begin Precondition.1 + --Description: Activation App by sending SDL.ActivateApp + + function Test:Activate_Media_Application() + --HMI send ActivateApp request + ActivateApplication(self, config.application1.registerAppInterfaceParams.appName) + end + + --End Precondition.1 + + ----------------------------------------------------------------------------------------- + + + + +--------------------------------------------------------------------------------------------- +-----------------------------------------I TEST BLOCK---------------------------------------- +--CommonRequestCheck: Check of mandatory/conditional request's parameters (mobile protocol)-- +--------------------------------------------------------------------------------------------- + + --Begin test suit CommonRequestCheck + --Description: + -- request with all parameters + -- request with only mandatory parameters + -- request with all combinations of conditional-mandatory parameters (if exist) + -- request with one by one conditional parameters (each case - one conditional parameter) + -- request with missing mandatory parameters one by one (each case - missing one mandatory parameter) + -- request with all parameters are missing + -- request with fake parameters (fake - not from protocol, from another request) + -- request is sent with invalid JSON structure + -- different conditions of correlationID parameter (invalid, several the same etc.) + + --Write TEST_BLOCK_I_Begin to ATF log + function Test:TEST_BLOCK_I_Begin() + print("********************************************************************") + end + + + + --Begin test case CommonRequestCheck.1 + --Description: This test is intended to check positive cases and when all parameters + + --Requirement id in JAMA/or Jira ID: SDLAQ-CRS-61 + + --Verification criteria: Sets the initial media clock value and automatic update method for HMI media screen with all parameters + + for i=1,#buttonName do + Test["SubscribeButton_PositiveCase_" .. tostring(buttonName[i]).."_SUCCESS"] = function(self) + + --mobile side: sending SubscribeButton request + local cid = self.mobileSession:SendRPC("SubscribeButton", + { + buttonName = buttonName[i] + + }) + + --expect Buttons.OnButtonSubscription + EXPECT_HMINOTIFICATION("Buttons.OnButtonSubscription", {appID = self.applications["Test Application"], isSubscribed = true, name = btnName}) + + --mobile side: expect SubscribeButton response + EXPECT_RESPONSE(cid, {success = true, resultCode = "SUCCESS"}) + :Timeout(iTimeout) + + EXPECT_NOTIFICATION("OnHashChange") + + end + end + + --End test case CommonRequestCheck.1 + ----------------------------------------------------------------------------------------- + + + --Begin test case CommonRequestCheck.2 + --Description: This test is intended to check processing requests with only mandatory parameters + + --It is covered by CommonRequestCheck.1 + + --End test case CommonRequestCheck.2 + ----------------------------------------------------------------------------------------- + + + --Skipped CommonRequestCheck.3-4: There next checks are not applicable: + -- request with all combinations of conditional-mandatory parameters (if exist) + -- request with one by one conditional parameters (each case - one conditional parameter) + + ----------------------------------------------------------------------------------------- + + + --Begin test case CommonRequestCheck.5 + --Description: This test is intended to check request with missing mandatory parameters one by one (each case - missing one mandatory parameter) + + --Requirement id in JAMA/or Jira ID: SDLAQ-CRS-534 + + --Verification criteria: SDL responses invalid data + + function Test:SubscribeButton_missing_mandatory_parameters_updateMode_INVALID_DATA() + + --mobile side: sending SubscribeButton request + local cid = self.mobileSession:SendRPC("SubscribeButton", + { + + }) + + --mobile side: expect SubscribeButton response + EXPECT_RESPONSE(cid, { success = false, resultCode = "INVALID_DATA"}) + :Timeout(iTimeout) + + --mobile side: expect OnHashChange notification is not send to mobile + EXPECT_NOTIFICATION("OnHashChange") + :Times(0) + end + + --End test case CommonRequestCheck.5 + ----------------------------------------------------------------------------------------- + + + + --Begin test case CommonRequestCheck.6 + --Description: check request with all parameters are missing + + --It is covered by SubscribeButton_missing_mandatory_parameters_updateMode_INVALID_DATA + + --End test case CommonRequestCheck.6 + ----------------------------------------------------------------------------------------- + + + + + --Begin test case CommonRequestCheck.7 + --Description: Check request with fake parameters + + --Requirement id in JAMA/or Jira ID: APPLINK-4518 + + --Verification criteria: According to xml tests by Ford team all fake parameters should be ignored by SDL + + --Begin test case CommonRequestCheck.7.1 + --Description: Check request with fake parameters + + for i=1,#buttonName do + --Precondition for this test case + Precondition_TC_UnsubscribeButton(self, buttonName[i]) + + Test["SubscribeButton_FakeParameters_" .. tostring(buttonName[i]).."_SUCCESS"] = function(self) + + --mobile side: sending SubscribeButton request + local cid = self.mobileSession:SendRPC("SubscribeButton", + { + fakeParameter = "fakeParameter", + buttonName = buttonName[i] + + }) + + --expect Buttons.OnButtonSubscription + EXPECT_HMINOTIFICATION("Buttons.OnButtonSubscription", {appID = self.applications["Test Application"], isSubscribed = true, name = buttonName[i]}) + + --mobile side: expect SubscribeButton response + EXPECT_RESPONSE(cid, {success = true, resultCode = "SUCCESS"}) + :Timeout(iTimeout) + + EXPECT_NOTIFICATION("OnHashChange") + + end + end + --End test case CommonRequestCheck.7.1 + + --Begin test case CommonRequestCheck.7.2 + --Description: Check request with parameter of other API + for i=1,#buttonName do + --Precondition for this test case + Precondition_TC_UnsubscribeButton(self, buttonName[i]) + + Test["SubscribeButton_ParametersOfOtherAPI_" .. tostring(buttonName[i]).."_SUCCESS"] = function(self) + + --mobile side: sending SubscribeButton request + local cid = self.mobileSession:SendRPC("SubscribeButton", + { + syncFileName = "icon.png", --SetAppIcon + buttonName = buttonName[i] + + }) + + EXPECT_HMINOTIFICATION("Buttons.OnButtonSubscription", {appID = self.applications["Test Application"], isSubscribed = true, name = buttonName[i]}) + + --mobile side: expect SubscribeButton response + EXPECT_RESPONSE(cid, {success = true, resultCode = "SUCCESS"}) + :Timeout(iTimeout) + + EXPECT_NOTIFICATION("OnHashChange") + + end + end + --End test case CommonRequestCheck.7.2 + + --End test case CommonRequestCheck.7 + ----------------------------------------------------------------------------------------- + + + + --Begin test case CommonRequestCheck.8 + --Description: Check request is sent with invalid JSON structure + + --Requirement id in JAMA/or Jira ID: SDLAQ-CRS-534 + + --Verification criteria: The request with wrong JSON syntax is sent, the response comes with INVALID_DATA result code. + + function Test:SubscribeButton_InvalidJSON_INVALID_DATA() + + self.mobileSession.correlationId = self.mobileSession.correlationId + 1 + + local msg = + { + serviceType = 7, + frameInfo = 0, + rpcType = 0, + rpcFunctionId = 18, --SubscribeButtonID + rpcCorrelationId = self.mobileSession.correlationId, + -- missing ':' after buttonName + --payload = '{"buttonName":"OK"}' + payload = '{"buttonName" "OK"}' + } + self.mobileSession:Send(msg) + + self.mobileSession:ExpectResponse(self.mobileSession.correlationId, { success = false, resultCode = "INVALID_DATA" }) + + --mobile side: expect OnHashChange notification is not send to mobile + EXPECT_NOTIFICATION("OnHashChange") + :Times(0) + end + + --End test case CommonRequestCheck.8 + ----------------------------------------------------------------------------------------- + + + --Begin test case CommonRequestCheck.9 + --Description: check correlationID parameter is duplicated + + --Requirement id in JAMA/or Jira ID: + + --Verification criteria: the response comes with SUCCESS result code. + + Precondition_TC_UnsubscribeButton(self, "PRESET_0") + Precondition_TC_UnsubscribeButton(self, "PRESET_1") + + function Test:SubscribeButton_DuplicatedCorrelationID_SUCCESS() + + --mobile side: sending SubscribeButton request + local cid = self.mobileSession:SendRPC("SubscribeButton", + { + buttonName = "PRESET_0" + + }) + + --The second message with the same correlationID + local msg = + { + serviceType = 7, + frameInfo = 0, + rpcType = 0, + rpcFunctionId = 18, --SubscribeButtonID + rpcCorrelationId = cid, + payload = '{"buttonName":"PRESET_1"}' + } + self.mobileSession:Send(msg) + + + --mobile side: expect SubscribeButton response + EXPECT_RESPONSE(cid, {success = true, resultCode = "SUCCESS"}) + :Timeout(iTimeout) + :Times(2) + + EXPECT_NOTIFICATION("OnHashChange") + :Times(2) + + end + + --End test case CommonRequestCheck.9 + ----------------------------------------------------------------------------------------- + + + --Write TEST_BLOCK_I_End to ATF log + function Test:TEST_BLOCK_I_End() + print("********************************************************************") + end + + --End test suit CommonRequestCheck + + +--------------------------------------------------------------------------------------------- +----------------------------------------II TEST BLOCK---------------------------------------- +----------------------------------------Positive cases--------------------------------------- +--------------------------------------------------------------------------------------------- + + --Write TEST_BLOCK_II_Begin to ATF log + function Test:TEST_BLOCK_II_Begin() + print("********************************************************************") + end + --=================================================================================-- + --------------------------------Positive request check------------------------------- + --=================================================================================-- + + + --Begin test suit PositiveRequestCheck + --Description: check of each request parameter value in bound and boundary conditions + + --It is covered by CommonRequestCheck.2 (checking request with mandatory parameter) + + --End test suit PositiveRequestCheck + + + --=================================================================================-- + --------------------------------Positive response check------------------------------ + --=================================================================================-- + + --------Checks----------- + -- parameters with values in boundary conditions + + + --Begin test suit PositiveResponseCheck + --Description: Check positive responses + + --It is covered by CommonRequestCheck.1 + + --End test suit PositiveResponseCheck + + --Write TEST_BLOCK_II_End to ATF log + function Test:TEST_BLOCK_II_End() + print("********************************************************************") + end + +---------------------------------------------------------------------------------------------- +----------------------------------------III TEST BLOCK---------------------------------------- +----------------------------------------Negative cases---------------------------------------- +---------------------------------------------------------------------------------------------- + + --Write TEST_BLOCK_III_Begin to ATF log + function Test:TEST_BLOCK_III_Begin() + print("********************************************************************") + end + + --=================================================================================-- + ---------------------------------Negative request check------------------------------ + --=================================================================================-- + --------Checks----------- + -- outbound values + -- invalid values(empty, missing, nonexistent, duplicate, invalid characters) + -- parameters with wrong type + -- invalid json + + --Begin test suit NegativeRequestCheck + --Description: check of each request parameter value out of bound, missing, with wrong type, empty, duplicate etc. + + --Begin test case NegativeRequestCheck.1 + --Description: check of each request parameter value in bound and boundary conditions of buttonName + + --Requirement id in JAMA/or Jira ID: SDLAQ-CRS-69, SDLAQ-CRS-534 + + --Verification criteria: SDL returns INVALID_DATA + + for i=1,#OutBound do + Test["SubscribeButton_buttonName_OutBound_" .. tostring(OutBoundName[i]) .."_INVALID_DATA"] = function(self) + + --mobile side: sending SubscribeButton request + local cid = self.mobileSession:SendRPC("SubscribeButton", + { + buttonName = OutBound[i] + }) + + --mobile side: expect SubscribeButton response + EXPECT_RESPONSE(cid, {success = false, resultCode = "INVALID_DATA", info = nil}) + :Timeout(iTimeout) + + --mobile side: expect OnHashChange notification is not send to mobile + EXPECT_NOTIFICATION("OnHashChange") + :Times(0) + end + end + + + --End test case NegativeRequestCheck.1 + ----------------------------------------------------------------------------------------- + + + --Begin test case NegativeRequestCheck.2 + --Description: invalid values(empty, missing, nonexistent, duplicate, invalid characters) + + + --Begin test case NegativeRequestCheck.2.1 + --Description: Check properties parameter is -- invalid values(empty) - The request with empty "buttonName" is sent + + --Requirement id in JAMA/or Jira ID: SDLAQ-CRS-69, SDLAQ-CRS-534 + + --Verification criteria: SDL responses with INVALID_DATA result code. + + function Test:SubscribeButton_buttonName_IsInvalidValue_Empty_INVALID_DATA() + + --mobile side: sending SubscribeButton request + local cid = self.mobileSession:SendRPC("SubscribeButton", + { + buttonName = "" + }) + + --mobile side: expect SubscribeButton response + EXPECT_RESPONSE(cid, {success = false, resultCode = "INVALID_DATA", info = nil}) + :Timeout(iTimeout) + + --mobile side: expect OnHashChange notification is not send to mobile + EXPECT_NOTIFICATION("OnHashChange") + :Times(0) + end + + --End test case NegativeRequestCheck.2.1 + ----------------------------------------------------------------------------------------- + + + --Begin test case NegativeRequestCheck.2.2 + --Description: invalid values(missing) + + --It is covered by CommonRequestCheck.6: missed parameter + + --End test case NegativeRequestCheck.2.2 + + + --Begin test case NegativeRequestCheck.2.3 + --Description: Check the request with nonexistent value is sent, the INVALID_DATA response code is returned. + + --It is covered by SubscribeButton_buttonName_OutBound + + --End test case NegativeRequestCheck.2.3 + ----------------------------------------------------------------------------------------- + + + --Begin test case NegativeRequestCheck.2.4 + --Description: invalid values(duplicate) + + --This check is not applicable for SubscribeButton + + --End test case NegativeRequestCheck.2.4 + + + --Begin test case NegativeRequestCheck.2.5 + --Description: Check the request with invalid characters is sent, the INVALID_DATA response code is returned. + + --Requirement id in JAMA/or Jira ID: SDLAQ-CRS-69, SDLAQ-CRS-534 + + --Verification criteria: SDL responses with INVALID_DATA result code. + + function Test:SubscribeButton_buttonName_IsInvalidValue_InvalidCharacters_NewLine_INVALID_DATA() + + --mobile side: sending SubscribeButton request + local cid = self.mobileSession:SendRPC("SubscribeButton", + { + buttonName = "a\nb" + }) + + --mobile side: expect SubscribeButton response + EXPECT_RESPONSE(cid, {success = false, resultCode = "INVALID_DATA", info = nil}) + :Timeout(iTimeout) + + --mobile side: expect OnHashChange notification is not send to mobile + EXPECT_NOTIFICATION("OnHashChange") + :Times(0) + + end + + function Test:SubscribeButton_buttonName_IsInvalidValue_InvalidCharacters_Tab_INVALID_DATA() + + --mobile side: sending SubscribeButton request + local cid = self.mobileSession:SendRPC("SubscribeButton", + { + buttonName = "a\tb" + }) + + --mobile side: expect SubscribeButton response + EXPECT_RESPONSE(cid, {success = false, resultCode = "INVALID_DATA", info = nil}) + :Timeout(iTimeout) + + --mobile side: expect OnHashChange notification is not send to mobile + EXPECT_NOTIFICATION("OnHashChange") + :Times(0) + + end + + function Test:SubscribeButton_buttonName_IsInvalidValue_InvalidCharacters_OnlySpaces_INVALID_DATA() + + --mobile side: sending SubscribeButton request + local cid = self.mobileSession:SendRPC("SubscribeButton", + { + buttonName = " " + }) + + --mobile side: expect SubscribeButton response + EXPECT_RESPONSE(cid, {success = false, resultCode = "INVALID_DATA", info = nil}) + :Timeout(iTimeout) + + --mobile side: expect OnHashChange notification is not send to mobile + EXPECT_NOTIFICATION("OnHashChange") + :Times(0) + + end + --End test case NegativeRequestCheck.2.5 + ----------------------------------------------------------------------------------------- + + + --End test case NegativeRequestCheck.2 + + + --Begin test case NegativeRequestCheck.3 + --Description: Check the request with wrong data type in buttonName parameter + + --Requirement id in JAMA/or Jira ID: SDLAQ-CRS-534 + + --Verification criteria: The response with INVALID DATA result code is returned. + + function Test:SubscribeButton_buttonName_IsInvalidValue_WrongDataType_INVALID_DATA() + + --mobile side: sending SubscribeButton request + local cid = self.mobileSession:SendRPC("SubscribeButton", + { + buttonName = 123 + }) + + --mobile side: expect SubscribeButton response + EXPECT_RESPONSE(cid, {success = false, resultCode = "INVALID_DATA", info = nil}) + :Timeout(iTimeout) + + --mobile side: expect OnHashChange notification is not send to mobile + EXPECT_NOTIFICATION("OnHashChange") + :Times(0) + + end + + --End test case NegativeRequestCheck.3 + ----------------------------------------------------------------------------------------- + + + --End test suit NegativeRequestCheck + + + + --=================================================================================-- + ---------------------------------Negative response check------------------------------ + --=================================================================================-- + + --------Checks----------- + -- outbound values + -- invalid values(empty, missing, nonexistent, invalid characters) + -- parameters with wrong type + -- invalid json + + --> These checks are not applicable for SubscribeButton request. There is no response from HMI to SDL. + + + + --Write TEST_BLOCK_III_End to ATF log + function Test:TEST_BLOCK_III_End() + print("********************************************************************") + end + +---------------------------------------------------------------------------------------------- +----------------------------------------IV TEST BLOCK----------------------------------------- +---------------------------------------Result code check-------------------------------------- +---------------------------------------------------------------------------------------------- + + --Check all uncovered pairs resultCodes+success + + --Begin test suit ResultCodeCheck + --Description: check result code of response to Mobile (SDLAQ-CRS-532) + + --Write TEST_BLOCK_IV_Begin to ATF log + function Test:TEST_BLOCK_IV_Begin() + print("********************************************************************") + end + + --Begin test case ResultCodeCheck.1 + --Description: Check resultCode: SUCCESS + + --It is covered by CommonRequestCheck.2 (checking request with mandatory parameter) + + --End test case ResultCodeCheck.1 + ----------------------------------------------------------------------------------------- + + --Begin test case ResultCodeCheck.2 + --Description: Check resultCode: INVALID_DATA + + --It is covered by SubscribeButton_buttonName_IsInvalidValue_nonexistent_INVALID_DATA + + --End test case ResultCodeCheck.2 + ----------------------------------------------------------------------------------------- + + + --Begin test case ResultCodeCheck.3 + --Description: Check resultCode: OUT_OF_MEMORY + + --Requirement id in JAMA/or Jira ID: SDLAQ-CRS-535 + + --Verification criteria: A SubscribeButton request is sent under conditions of RAM deficite for executing it. The response code OUT_OF_MEMORY is returned + + --ToDo: Can not check this case. + + --End test case ResultCodeCheck.3 + ----------------------------------------------------------------------------------------- + + --Begin test case ResultCodeCheck.4 + --Description: Check resultCode: TOO_MANY_PENDING_REQUESTS + + --Requirement id in JAMA/or Jira ID: SDLAQ-CRS-536 + + --Verification criteria: SDL response TOO_MANY_PENDING_REQUESTS resultCode + + --Move to another script: ATF_SubscribeButton_TOO_MANY_PENDING_REQUESTS.lua + + --End test case ResultCodeCheck.4 + ----------------------------------------------------------------------------------------- + + --Begin test case ResultCodeCheck.5 + --Description: Check resultCode: APPLICATION_NOT_REGISTERED + + --Requirement id in JAMA/or Jira ID: SDLAQ-CRS-537 + + --Verification criteria: SDL responses APPLICATION_NOT_REGISTERED resultCode + + --Description: Unregister application + function Test:UnregisterAppInterface_Success() + local cid = self.mobileSession:SendRPC("UnregisterAppInterface",{}) + + EXPECT_RESPONSE(cid, { success = true, resultCode = "SUCCESS"}) + :Timeout(2000) + end + + --Description: Send SubscribeButton when application not registered yet. + + for i=1,#buttonName do + + --Precondition for this test case + --Precondition_TC_UnsubscribeButton(self, buttonName[i]) + + Test["SubscribeButton_resultCode_APPLICATION_NOT_REGISTERED_" .. tostring(buttonName[i]).."_APPLICATION_NOT_REGISTERED"] = function(self) + + --mobile side: sending SubscribeButton request + local cid = self.mobileSession:SendRPC("SubscribeButton", + { + buttonName = buttonName[i] + } + ) + + --mobile side: expect SubscribeButton response + EXPECT_RESPONSE(cid, {success = false, resultCode = "APPLICATION_NOT_REGISTERED", info = nil}) + :Timeout(iTimeout) + + EXPECT_NOTIFICATION("OnHashChange") + :Times(0) + :Timeout(iTimeout) + end + + end + + --End test case ResultCodeCheck.5 + ----------------------------------------------------------------------------------------- + + --Begin test case ResultCodeCheck.6 + --Description: Check resultCode: REJECTED + + --Requirement id in JAMA/or Jira ID: SDLAQ-CRS-538 + + --Verification criteria: + --1. SDL must return "resultCode: REJECTED, success: false" to SubscribeButton (SEEKLEFT) in case such RPC comes from non-media app. + --2. SDL must return "resultCode: REJECTED, success: false" to SubscribeButton (SEEKRIGHT) in case such RPC comes from non-media app. + --3. SDL must return "resultCode: REJECTED, success: false" to SubscribeButton (TUNEUP) in case such RPC comes from non-media app. + --4. SDL must return "resultCode: REJECTED, success: false" to SubscribeButton (TUNEDOWN) in case such RPC comes from non-media app. + + + -- register non-media application 2 + function Test:RegisterNon_Media_AppInterface() + RegisterAppInterface(self, 2) + end + + function Test:Activate_Non_Media_Application() + --HMI send ActivateApp request + --ActivateApplication(self) + ActivateApplication(self, application2_nonmedia.registerAppInterfaceParams.appName) + end + + buttonName1 = {"SEEKLEFT", "SEEKRIGHT", "TUNEUP", "TUNEDOWN"} + for i=1,#buttonName1 do + + Test["SubscribeButton_resultCode_REJECTED_" .. tostring(buttonName1[i]).."_REJECTED"] = function(self) + + --mobile side: sending SubscribeButton request + local cid = self.mobileSession:SendRPC("SubscribeButton", + { + buttonName = buttonName1[i] + } + ) + + --mobile side: expect SubscribeButton response + EXPECT_RESPONSE(cid, {success = false, resultCode = "REJECTED", info = nil}) + :Timeout(iTimeout) + + EXPECT_NOTIFICATION("OnHashChange") + :Times(0) + :Timeout(iTimeout) + end + + end + + --Description: Unregister non-media application + function Test:UnregisterAppInterface_Success() + local cid = self.mobileSession:SendRPC("UnregisterAppInterface",{}) + + EXPECT_RESPONSE(cid, { success = true, resultCode = "SUCCESS"}) + :Timeout(2000) + end + + -- register media application 1 + function Test:Register_Media_AppInterface() + RegisterAppInterface(self, 1) + end + + + function Test:Activate_Media_Application() + --HMI send ActivateApp request + ActivateApplication(self, config.application1.registerAppInterfaceParams.appName) + end + + --End test case ResultCodeCheck.6 + ----------------------------------------------------------------------------------------- + + --Begin test case ResultCodeCheck.7 + --Description: Check resultCode: IGNORED + + --Requirement id in JAMA/or Jira ID: SDLAQ-CRS-539 + + --Verification criteria: In case the application sends a SubscribeButton request for a button previously subscribed, SDL sends the IGNORED resultCode to mobile side. General result success=false. + + for i=1,#buttonName do + + --Precondition for this test case + Precondition_TC_SubscribeButton(self, buttonName[i]) + + Test["SubscribeButton_resultCode_IGNORED_" .. tostring(buttonName[i]).."_IGNORED"] = function(self) + + --mobile side: sending SubscribeButton request + local cid = self.mobileSession:SendRPC("SubscribeButton", + { + buttonName = buttonName[i] + } + ) + + --mobile side: expect SubscribeButton response + EXPECT_RESPONSE(cid, {success = false, resultCode = "IGNORED", info = nil}) + :Timeout(iTimeout) + + EXPECT_NOTIFICATION("OnHashChange") + :Times(0) + :Timeout(iTimeout) + end + + end + + --End test case ResultCodeCheck.7 + ----------------------------------------------------------------------------------------- + + --Begin test case ResultCodeCheck.8 + --Description: Check resultCode: UNSUPPORTED_RESOURCE + + --Requirement id in JAMA/or Jira ID: SDLAQ-CRS-541 + + --Verification criteria: If subscribe for CUSTOM_BUTTON button which isn't supported on the HMI the response with the resultCode UNSUPPORTED_RESOURCE is returned. General request result success=false. + + for i=1,#UnsupportButtonName do + + Test["SubscribeButton_resultCode_UNSUPPORTED_RESOURCE_" .. tostring(UnsupportButtonName[i]).."_result_UNSUPPORTED_RESOURCE"] = function(self) + + --mobile side: sending SubscribeButton request + local cid = self.mobileSession:SendRPC("SubscribeButton", + { + buttonName = UnsupportButtonName[i] + } + ) + + --mobile side: expect SubscribeButton response + EXPECT_RESPONSE(cid, {success = false, resultCode = "UNSUPPORTED_RESOURCE", info = nil}) + :Timeout(iTimeout) + + EXPECT_NOTIFICATION("OnHashChange") + :Times(0) + :Timeout(iTimeout) + end + + end + + --End test case ResultCodeCheck.8 + ----------------------------------------------------------------------------------------- + + --Begin test case ResultCodeCheck.9 + --Description: Check resultCode: GENERIC_ERROR + + --Requirement id in JAMA/or Jira ID: SDLAQ-CRS-540 + + --Verification criteria: GENERIC_ERROR comes as a result code in response when all other codes aren't applicable or the unknown issue occured. + + --ToDo: Can not check this case + + --End test case ResultCodeCheck.9 + ----------------------------------------------------------------------------------------- + + + --Write TEST_BLOCK_IV_End to ATF log + function Test:TEST_BLOCK_IV_End() + print("********************************************************************") + end + + --End test suit ResultCodeCheck + + + + + + +---------------------------------------------------------------------------------------------- +-----------------------------------------V TEST BLOCK----------------------------------------- +---------------------------------------HMI negative cases------------------------------------- +---------------------------------------------------------------------------------------------- + + --------Checks----------- + -- requests without responses from HMI + -- invalid structure os response + -- several responses from HMI to one request + -- fake parameters + -- HMI correlation id check + -- wrong response with correct HMI id + + + -- SubscribeButton API does not have any response from HMI. This test suit is not applicable => Ignore + + --Write TEST_BLOCK_V_Begin to ATF log + function Test:TEST_BLOCK_V_Begin() + print("********************************************************************") + end + + --Write TEST_BLOCK_V_End to ATF log + function Test:TEST_BLOCK_V_End() + print("********************************************************************") + end + + +---------------------------------------------------------------------------------------------- +-----------------------------------------VI TEST BLOCK---------------------------------------- +-------------------------Sequence with emulating of user's action(s)-------------------------- +---------------------------------------------------------------------------------------------- + + --Begin test suit SequenceCheck + --Description: TC's checks SDL behavior by processing + -- different request sequence with timeout + -- with emulating of user's actions + + --Write TEST_BLOCK_VI-_Begin to ATF log + function Test:TEST_BLOCK_VI_Begin() + print("********************************************************************") + end + + --Begin test case SequenceCheck.1-5 + --Description: check scenario in test case TC_SubscribeButton_01 - 05: + + --Requirement id in JAMA/or Jira ID: SDLAQ-CRS-61, SDLAQ-CRS-175 + + --Verification criteria: SubscribeButton option check for OK, SEEKRIGHT, SEEKLEFT,.. . Make actions on UI to check the subscription on buttons (Long/Short press) + + local buttonName1 = buttonName + local mode = {"SHORT", "LONG"} + for i=1,#buttonName1 do + + --Precondition for this test case: Unsubscribe button + Precondition_TC_UnsubscribeButton(self, buttonName1[i]) + + for j=1,#mode do + --check OnButtonEvent and OnButtonPress when clicking on this button + strTestCaseName = "TC_SubscribeButton_01_05_Click_UnsubscribedButton_"..buttonName1[i] .."_".. mode[j] + TC_OnButtonEvent_OnButtonPress_When_UnsubscribedButton(self, buttonName1[i], mode[j], strTestCaseName) + end + + --Subscribe button + strTestCaseName = "TC_SubscribeButton_01_05_SubscribeButton_" .. tostring(buttonName[i]).."_SUCCESS" + TC_SubscribeButtonSUCCESS(self, buttonName[i], strTestCaseName) + + for j=1,#mode do + --check OnButtonEvent and OnButtonPress when clicking on this button + strTestCaseName = "TC_SubscribeButton_01_05_Click_SubscribedButton_"..buttonName1[i] .."_".. mode[j] + TC_OnButtonEvent_OnButtonPress_When_SubscribedButton(self, buttonName1[i], mode[j], strTestCaseName) + end + end + + --End test case SequenceCheck.1-5 + ----------------------------------------------------------------------------------------- + + --Begin test case SequenceCheck.6 + --Description: check scenario in test case TC_SubscribeButton_06 + + --Requirement id in JAMA/or Jira ID: SDLAQ-CRS-61 + + --Verification criteria: SDL must send media-buttons related notifications to one MEDIA app only (of FULL or LIMITED HMILevel) + + -- Write TC_SubscribeButton_06_Begin to ATF log + function Test:TC_SubscribeButton_06_Begin() + --Just write to log of ATF a test case to mark as begin of this manual test case + end + + -- Change App0 to Limited to allow change App1 to FULL + function Test:TC_SubscribeButton_06_Change_App0_To_LIMITED_HMI_LEVEL() + --hmi side: sending BasicCommunication.OnAppDeactivated request + appId0 = self.applications["Test Application"] + local cid = self.hmiConnection:SendNotification("BasicCommunication.OnAppDeactivated", + { + appID = self.applications["Test Application"], + reason = "GENERAL" + }) + + --mobile side: expect OnHMIStatus notification + EXPECT_NOTIFICATION("OnHMIStatus",{hmiLevel = "LIMITED", audioStreamingState = "AUDIBLE", systemContext = "MAIN"}) + + end + + --Precondition: Opening new session 1 + function Test:TC_SubscribeButton_06_AddNewSession() + -- Connected expectation + self.mobileSession1 = mobile_session.MobileSession( + self, + self.mobileConnection) + + self.mobileSession1:StartService(7) + end + + -- Register app1 + function Test:TC_SubscribeButton_06_Register_Non_Media_App1() + + --mobile side: RegisterAppInterface request + local CorIdRAI = self.mobileSession1:SendRPC("RegisterAppInterface", + { + syncMsgVersion = + { + majorVersion = 2, + minorVersion = 2, + }, + appName ="SPT1", + --isMediaApplication = true, + isMediaApplication = false, + languageDesired ="EN-US", + hmiDisplayLanguageDesired ="EN-US", + appID ="1", + ttsName = + { + { + text ="SyncProxyTester1", + type ="TEXT", + }, + }, + vrSynonyms = + { + "vrSPT1", + } + }) + + --hmi side: expect BasicCommunication.OnAppRegistered request + EXPECT_HMINOTIFICATION("BasicCommunication.OnAppRegistered", + { + application = + { + appName = "SPT1" + } + }) + :Do(function(_,data) + self.appId1 = data.params.application.appID + end) + + --mobile side: RegisterAppInterface response + self.mobileSession1:ExpectResponse(CorIdRAI, { success = true, resultCode = "SUCCESS"}) + :Timeout(2000) + + self.mobileSession1:ExpectNotification("OnHMIStatus", {hmiLevel = "NONE", audioStreamingState = "NOT_AUDIBLE", systemContext = "MAIN"}) + end + + -- Activate app1 + function Test:TC_SubscribeButton_06_Activate_App1() + --HMI send ActivateApp request + local RequestId = self.hmiConnection:SendRequest("SDL.ActivateApp", { appID = self.appId1}) + EXPECT_HMIRESPONSE(RequestId) + :Do(function(_,data) + + if data.result.isSDLAllowed ~= true then + local RequestId = self.hmiConnection:SendRequest("SDL.GetUserFriendlyMessage", {language = "EN-US", messageCodes = {"DataConsent"}}) + EXPECT_HMIRESPONSE(RequestId,{result = {code = 0, method = "SDL.GetUserFriendlyMessage"}}) + :Do(function(_,data) + --hmi side: send request SDL.OnAllowSDLFunctionality + self.hmiConnection:SendNotification("SDL.OnAllowSDLFunctionality", {allowed = true, source = "GUI", device = {id = config.deviceMAC, name = "127.0.0.1"}}) + + EXPECT_HMICALL("BasicCommunication.ActivateApp") + :Do(function(_,data) + self.hmiConnection:SendResponse(data.id,"BasicCommunication.ActivateApp", "SUCCESS", {}) + end) + :Times(2) + end) + + end + end) + + self.mobileSession1:ExpectNotification("OnHMIStatus", {hmiLevel = "FULL", systemContext = "MAIN"}) + :Timeout(12000) + + end + + -- Subscribe buttons on App1 + for i=1,#buttonNameNonMediaApp do + + strTestCaseName = "TC_SubscribeButton_06_SubscribeButton_for_App1_" .. tostring(buttonNameNonMediaApp[i]).."_SUCCESS" + Test[strTestCaseName] = function(self) + + --mobile side: sending SubscribeButton request + local cid = self.mobileSession1:SendRPC("SubscribeButton", + { + buttonName = buttonNameNonMediaApp[i] + } + ) + + --mobile side: expect SubscribeButton response + self.mobileSession1:ExpectResponse(cid, {success = true, resultCode = "SUCCESS", info = nil}) + :Timeout(iTimeout) + + self.mobileSession:ExpectResponse("SubscribeButton", {}) + :Times(0) + + self.mobileSession1:ExpectNotification("OnHashChange", {}) + + self.mobileSession:ExpectNotification("OnHashChange", {}) + :Times(0) + + DelayedExp(2000) + + end + end + + function Test:TC_SubscribeButton_06_Exit_App1_Change_To_NONE_HMI_LEVEL() + + local function sendUserExit() + --hmi side: sending BasicCommunication.OnExitApplication request + local cid = self.hmiConnection:SendNotification("BasicCommunication.OnExitApplication", + { + appID = self.appId1, + reason = "USER_EXIT" + }) + end + + local function SendOnSystemContext1() + --hmi side: sending UI.OnSystemContext request + SendOnSystemContextOnAppID(self,"MAIN", self.appId1) + end + + local function sendOnAppDeactivate() + --hmi side: sending BasicCommunication.OnAppDeactivated request + local cid = self.hmiConnection:SendNotification("BasicCommunication.OnAppDeactivated", + { + appID = self.appId1, + reason = "GENERAL" + }) + end + + --hmi side: sending BasicCommunication.OnSystemContext request + SendOnSystemContextOnAppID(self,"MENU", self.appId1) + + --hmi side: sending BasicCommunication.OnExitApplication request + RUN_AFTER(sendUserExit, 1000) + + --hmi side: sending UI.OnSystemContext request = MAIN + RUN_AFTER(SendOnSystemContext1, 2000) + + --hmi side: sending BasicCommunication.OnAppDeactivated request + RUN_AFTER(sendOnAppDeactivate, 3000) + + + --mobile side: OnHMIStatus notifications + self.mobileSession1:ExpectNotification("OnHMIStatus", + { systemContext = "MENU", hmiLevel = "FULL"}, + { systemContext = "MENU", hmiLevel = "NONE"}, + { systemContext = "MAIN", hmiLevel = "NONE"}) + :Times(3) + :Timeout(15000) + + end + + -- Opening new session 2 + function Test:TC_SubscribeButton_06_AddNewSession() + -- Connected expectation + self.mobileSession2 = mobile_session.MobileSession( + self.expectations_list, + self.mobileConnection) + + self.mobileSession2:StartService(7) + end + + -- Register app2 + function Test:TC_SubscribeButton_06_RegisterAppInterface_App2() + + --mobile side: RegisterAppInterface request + local CorIdRAI = self.mobileSession2:SendRPC("RegisterAppInterface", + { + syncMsgVersion = + { + majorVersion = 2, + minorVersion = 2, + }, + appName ="SPT2", + isMediaApplication = true, + languageDesired ="EN-US", + hmiDisplayLanguageDesired ="EN-US", + appID ="2", + ttsName = + { + { + text ="SyncProxyTester2", + type ="TEXT", + }, + }, + vrSynonyms = + { + "vrSPT2", + } + }) + + --hmi side: expect BasicCommunication.OnAppRegistered request + EXPECT_HMINOTIFICATION("BasicCommunication.OnAppRegistered", + { + application = + { + appName = "SPT2" + } + }) + :Do(function(_,data) + appId2 = data.params.application.appID + end) + + --mobile side: RegisterAppInterface response + self.mobileSession2:ExpectResponse(CorIdRAI, { success = true, resultCode = "SUCCESS"}) + :Timeout(2000) + + self.mobileSession2:ExpectNotification("OnHMIStatus", {hmiLevel = "NONE", audioStreamingState = "NOT_AUDIBLE"}) + end + + -- Activate app2 + function Test:TC_SubscribeButton_06_Activate_App2() + + --HMI send ActivateApp request + local RequestId = self.hmiConnection:SendRequest("SDL.ActivateApp", { appID = appId2}) + EXPECT_HMIRESPONSE(RequestId) + :Do(function(_,data) + + if data.result.isSDLAllowed ~= true then + local RequestId = self.hmiConnection:SendRequest("SDL.GetUserFriendlyMessage", {language = "EN-US", messageCodes = {"DataConsent"}}) + EXPECT_HMIRESPONSE(RequestId,{result = {code = 0, method = "SDL.GetUserFriendlyMessage"}}) + :Do(function(_,data) + --hmi side: send request SDL.OnAllowSDLFunctionality + self.hmiConnection:SendNotification("SDL.OnAllowSDLFunctionality", {allowed = true, source = "GUI", device = {id = 1, name = "127.0.0.1"}}) + end) + + EXPECT_HMICALL("BasicCommunication.ActivateApp") + :Do(function(_,data) + self.hmiConnection:SendResponse(data.id,"BasicCommunication.ActivateApp", "SUCCESS", {}) + end) + :Times(2) + end + end) + + self.mobileSession2:ExpectNotification("OnHMIStatus", {hmiLevel = "FULL"}) + :Timeout(12000) + + end + + -- Subscribe buttons on App2 + for i=1,#buttonName do + + strTestCaseName = "TC_SubscribeButton_06_SubscribeButton_for_App2_" .. tostring(buttonName[i]).."_SUCCESS" + + Test[strTestCaseName] = function(self) + + --mobile side: sending SubscribeButton request + local cid = self.mobileSession2:SendRPC("SubscribeButton", + { + buttonName = buttonName[i] + } + ) + + --mobile side: expect SubscribeButton response + self.mobileSession2:ExpectResponse(cid, {success = true, resultCode = "SUCCESS", info = nil}) + :Timeout(iTimeout) + + self.mobileSession2:ExpectNotification("OnHashChange", {}) + end + + end + + -- Activate App0 + function Test:TC_SubscribeButton_06_Activate_App0() + --HMI send ActivateApp request + ActivateApplication(self, config.application1.registerAppInterfaceParams.appName) + end + + -- Subscribe buttons + for i=1,#buttonName do + --Precondition for this test case + Precondition_TC_UnsubscribeButton(self, buttonName[i]) + + strTestCaseName = "TC_SubscribeButton_06_SubscribeButton_for_App0_" .. tostring(buttonName[i]).."_SUCCESS" + TC_SubscribeButtonSUCCESS(self, buttonName[i], strTestCaseName) + end + + + local buttonName1 = buttonName + local mode = {"SHORT", "LONG"} + + --Click SubScribedButtons on HMI => SDL only send notifications to FULL application, does not send to NONE, BACKGROUND + for i=1,#buttonName1 do + for j=1,#mode do + --check OnButtonEvent and OnButtonPress when clicking on this button + strTestCaseName = "TC_SubscribeButton_06_ClickSubscribedButton_Incase_FULL_BACKGOUND_NONE_Applications_"..buttonName1[i] .."_".. mode[j] + Test[strTestCaseName] = function(self) + + --hmi side: send request Buttons.OnButtonEvent + self.hmiConnection:SendNotification("Buttons.OnButtonEvent", + { + name = buttonName1[i], + mode = "BUTTONDOWN" + }) + + local function OnButtonEventBUTTONUP() + --hmi side: send request Buttons.OnButtonEvent + self.hmiConnection:SendNotification("Buttons.OnButtonEvent", + { + name = buttonName1[i], + mode = "BUTTONUP" + }) + end + + --hmi side: send request Buttons.OnButtonPress + local function OnButtonPress() + self.hmiConnection:SendNotification("Buttons.OnButtonPress", + { + name = buttonName1[i], + mode = mode[j] + }) + end + + if strMode == "LONG" then + --hmi side: send request Buttons.OnButtonPress + RUN_AFTER(OnButtonPress, 50) + + --hmi side: send request Buttons.OnButtonEvent + RUN_AFTER(OnButtonEventBUTTONUP, 100) + + else + --hmi side: send request Buttons.OnButtonEvent + RUN_AFTER(OnButtonEventBUTTONUP, 50) + + --hmi side: send request Buttons.OnButtonPress + RUN_AFTER(OnButtonPress, 100) + end + --------------------------------------------- + + --Verify result on app0 + --Mobile expects OnButtonEvent + EXPECT_NOTIFICATION("OnButtonEvent", + {buttonName = buttonName1[i], buttonEventMode = "BUTTONDOWN"}, + {buttonName = buttonName1[i], buttonEventMode = "BUTTONUP"} + ) + :Times(2) + + --Mobile expects OnButtonEvent + EXPECT_NOTIFICATION("OnButtonPress", {buttonName = buttonName1[i], buttonPressMode = mode[j]})--------------------------------------------- + + --Verify result on app1 + --mobile side: expect notification + self.mobileSession1:ExpectNotification("OnButtonEvent", {}) + :Times(0) + + self.mobileSession1:ExpectNotification("OnButtonPress", {}) + :Times(0) + --------------------------------------------- + + --Verify result on app2 + --mobile side: expect notification + self.mobileSession2:ExpectNotification("OnButtonEvent", {}) + :Times(0) + + self.mobileSession2:ExpectNotification("OnButtonPress", {}) + :Times(0) + --------------------------------------------- + + end + end + end + + --Change application to LIMITED + function Test:TC_SubscribeButton_06_ChangeHMIToLimited() + --hmi side: sending BasicCommunication.OnAppDeactivated request + local cid = self.hmiConnection:SendNotification("BasicCommunication.OnAppDeactivated", + { + appID = self.applications["Test Application"], + reason = "GENERAL" + }) + + --mobile side: expect OnHMIStatus notification + EXPECT_NOTIFICATION("OnHMIStatus",{hmiLevel = "LIMITED"}) + + end + + --Click SubScribedButtons on HMI => SDL only send notifications to LIMITED application, does not send to NONE, BACKGROUND + for i=1,#buttonName1 do + for j=1,#mode do + + --check OnButtonEvent and OnButtonPress when clicking on this button + strTestCaseName = "TC_SubscribeButton_06_ClickSubscribedButton_Incase_LIMITED_BACKGOUND_NONE_Applications_"..buttonName1[i] .."_".. mode[j] + Test[strTestCaseName] = function(self) + + + --hmi side: send request Buttons.OnButtonEvent + self.hmiConnection:SendNotification("Buttons.OnButtonEvent", + { + name = buttonName1[i], + mode = "BUTTONDOWN", + appID = self.applications["Test Application"] + }) + + + local function OnButtonEventBUTTONUP() + --hmi side: send request Buttons.OnButtonEvent + self.hmiConnection:SendNotification("Buttons.OnButtonEvent", + { + name = buttonName1[i], + mode = "BUTTONUP", + appID = self.applications["Test Application"] + }) + end + + --hmi side: send request Buttons.OnButtonPress + local function OnButtonPress() + self.hmiConnection:SendNotification("Buttons.OnButtonPress", + { + name = buttonName1[i], + mode = mode[j], + appID = self.applications["Test Application"] + }) + end + + if strMode == "LONG" then + --hmi side: send request Buttons.OnButtonPress + RUN_AFTER(OnButtonPress, 50) + + --hmi side: send request Buttons.OnButtonEvent + RUN_AFTER(OnButtonEventBUTTONUP, 100) + + else + --hmi side: send request Buttons.OnButtonEvent + RUN_AFTER(OnButtonEventBUTTONUP, 50) + + --hmi side: send request Buttons.OnButtonPress + RUN_AFTER(OnButtonPress, 100) + end + --------------------------------------------- + + --Verify result on app0 + --Mobile expects OnButtonEvent + EXPECT_NOTIFICATION("OnButtonEvent", + {buttonName = buttonName1[i], buttonEventMode = "BUTTONDOWN"}, + {buttonName = buttonName1[i], buttonEventMode = "BUTTONUP"} + ) + :Times(2) + + --Mobile expects OnButtonEvent + EXPECT_NOTIFICATION("OnButtonPress", {buttonName = buttonName1[i], buttonPressMode = mode[j]}) + --------------------------------------------- + + --Verify result on app1 + --mobile side: expect notification + self.mobileSession1:ExpectNotification("OnButtonEvent", {}) + :Times(0) + + self.mobileSession1:ExpectNotification("OnButtonPress", {}) + :Times(0) + --------------------------------------------- + + --Verify result on app2 + --mobile side: expect notification + self.mobileSession2:ExpectNotification("OnButtonEvent", {}) + :Times(0) + + self.mobileSession2:ExpectNotification("OnButtonPress", {}) + :Times(0) + --------------------------------------------- + + end + end + end + + --Print TC_SubscribeButton_06_End in ATF log + function Test:TC_SubscribeButton_06_End() + --Just write to log of ATF a test case to mark as the end of this manual test case + end + + --End test case SequenceCheck.6 + ----------------------------------------------------------------------------------------- + + --Begin test case SequenceCheck.7 + --Description: check scenario in test case TC_SubscribeButton_07 + + --Requirement id in JAMA/or Jira ID: SDLAQ-CRS-2975, SDLAQ-CRS-61 + + --Verification criteria: SubscribeButton option check for CUSTOM_BUTTON and SEARCH + + -- Unregister application + function Test:TC_SubscribeButton_07_UnregisterAppInterface_Success() + local cid = self.mobileSession:SendRPC("UnregisterAppInterface",{}) + + EXPECT_RESPONSE(cid, { success = true, resultCode = "SUCCESS"}) + :Timeout(2000) + end + + -- Register application + function Test:TC_SubscribeButton_07_RegisterAppInterface_And_Check_OnButtonSubscription() + + --mobile side: sending request + local CorIdRegister, strAppName + + CorIdRegister = self.mobileSession:SendRPC("RegisterAppInterface", config.application1.registerAppInterfaceParams) + strAppName = config.application1.registerAppInterfaceParams.appName + + --hmi side: expect BasicCommunication.OnAppRegistered request + EXPECT_HMINOTIFICATION("BasicCommunication.OnAppRegistered", + { + application = + { + appName = strAppName + } + }) + :Do(function(_,data) + local appId = data.params.application.appID + self.appId = appId + appId0 = appId + self.appName = data.params.application.appName + self.applications[strAppName] = appId + + --hmi side: expect OnButtonSubscription request due to APPLINK-12241 + EXPECT_HMINOTIFICATION("Buttons.OnButtonSubscription", {appID = appId0, name = "CUSTOM_BUTTON", isSubscribed=true}) + :Timeout(12000) + end) + + --mobile side: expect response + self.mobileSession:ExpectResponse(CorIdRegister, + { + syncMsgVersion = + { + majorVersion = 3, + minorVersion = 0 + } + }) + :Timeout(12000) + + --mobile side: expect notification + self.mobileSession:ExpectNotification("OnHMIStatus", + { + systemContext = "MAIN", hmiLevel = "NONE", audioStreamingState = "NOT_AUDIBLE" + }) + :Timeout(12000) + + end + + --Activate application + function Test:TC_SubscribeButton_07_Activate_Application() + --HMI send ActivateApp request + local RequestId = self.hmiConnection:SendRequest("SDL.ActivateApp", { appID = appId0}) + EXPECT_HMIRESPONSE(RequestId) + :Do(function(_,data) + + if data.result.isSDLAllowed ~= true then + local RequestId = self.hmiConnection:SendRequest("SDL.GetUserFriendlyMessage", {language = "EN-US", messageCodes = {"DataConsent"}}) + EXPECT_HMIRESPONSE(RequestId,{result = {code = 0, method = "SDL.GetUserFriendlyMessage"}}) + :Do(function(_,data) + --hmi side: send request SDL.OnAllowSDLFunctionality + self.hmiConnection:SendNotification("SDL.OnAllowSDLFunctionality", {allowed = true, source = "GUI", device = {id = 1, name = "127.0.0.1"}}) + end) + + EXPECT_HMICALL("BasicCommunication.ActivateApp") + :Do(function(_,data) + self.hmiConnection:SendResponse(data.id,"BasicCommunication.ActivateApp", "SUCCESS", {}) + end) + :Times(2) + end + end) + + self.mobileSession:ExpectNotification("OnHMIStatus", {hmiLevel = "FULL"}) + :Timeout(12000) + + end + + + --Subscribe CUSTOM_BUTTON button => IGNORE + function Test:TC_SubscribeButton_07_SubscribeButton_CUSTOM_BUTTON_IGNORE_Without_OnButtonSubscription() + + --mobile side: sending SubscribeButton request + local cid = self.mobileSession:SendRPC("SubscribeButton", + { + buttonName = "CUSTOM_BUTTON" + } + ) + + --mobile side: expect SubscribeButton response + EXPECT_RESPONSE(cid, {success = false, resultCode = "IGNORED", info = nil}) + :Timeout(iTimeout) + + EXPECT_NOTIFICATION("OnHashChange") + :Times(0) + + end + + --Subscribe SEARCH button + function Test:TC_SubscribeButton_07_SubscribeButton_SEARCH_SUCCESS_With_OnButtonSubscription() + + --mobile side: sending SubscribeButton request + local cid = self.mobileSession:SendRPC("SubscribeButton", + { + buttonName = "SEARCH" + } + ) + + --mobile side: expect SubscribeButton response + EXPECT_RESPONSE(cid, {success = false, resultCode = "UNSUPPORTED_RESOURCE", info = nil}) + :Timeout(iTimeout) + + EXPECT_NOTIFICATION("OnHashChange") + :Times(0) + + end + + --End test case SequenceCheck.7 + ----------------------------------------------------------------------------------------- + + + --Begin test case SequenceCheck.8 + --Description: check scenario in test case TC_SubscribeButton_08 + + --Requirement id in JAMA/or Jira ID: SDLAQ-CRS-61, SDLAQ-CRS-2974, APPLINK-12241 + + --Verification criteria: Check that SDL doesn't send OnButtonSubscription(false) after app was unregistered or disconnected unexpectedly. + + -- Precondition: Unregister application + function Test:TC_SubscribeButton_08_UnregisterAppInterface_Success() + local cid = self.mobileSession:SendRPC("UnregisterAppInterface",{}) + + EXPECT_RESPONSE(cid, { success = true, resultCode = "SUCCESS"}) + :Timeout(2000) + end + + -- Precondition: Register media application 1 + function Test:TC_SubscribeButton_08_RegisterAppInterfaceAndCheckOnButtonSubscription() + RegisterAppInterface(self, 1) + end + + -- Precondition: Activate app + function Test:TC_SubscribeButton_08_Activate_Application() + --HMI send ActivateApp request + local RequestId = self.hmiConnection:SendRequest("SDL.ActivateApp", { appID = appId0}) + EXPECT_HMIRESPONSE(RequestId) + :Do(function(_,data) + + if data.result.isSDLAllowed ~= true then + local RequestId = self.hmiConnection:SendRequest("SDL.GetUserFriendlyMessage", {language = "EN-US", messageCodes = {"DataConsent"}}) + EXPECT_HMIRESPONSE(RequestId,{result = {code = 0, method = "SDL.GetUserFriendlyMessage"}}) + :Do(function(_,data) + --hmi side: send request SDL.OnAllowSDLFunctionality + self.hmiConnection:SendNotification("SDL.OnAllowSDLFunctionality", {allowed = true, source = "GUI", device = {id = 1, name = "127.0.0.1"}}) + end) + + EXPECT_HMICALL("BasicCommunication.ActivateApp") + :Do(function(_,data) + self.hmiConnection:SendResponse(data.id,"BasicCommunication.ActivateApp", "SUCCESS", {}) + end) + :Times(2) + end + end) + + self.mobileSession:ExpectNotification("OnHMIStatus", {hmiLevel = "FULL"}) + :Timeout(12000) + + end + + --Subscribe PRESET_1 button + strTestCaseName = "TC_SubscribeButton_08_SubscribeButton_PRESET_1_SUCCESS_With_OnButtonSubscription" + TC_SubscribeButtonSUCCESS(self, "PRESET_1", strTestCaseName) + + -- Unregister application: check that SDL doesn't send OnButtonSubscription(false) after app was unregistered or disconnected unexpectedly. + function Test:TC_SubscribeButton_08_UnregisterAppInterface_Without_OnButtonSubscription() + local cid = self.mobileSession:SendRPC("UnregisterAppInterface",{}) + + EXPECT_RESPONSE(cid, { success = true, resultCode = "SUCCESS"}) + :Timeout(2000) + + --hmi side: expect OnButtonSubscription request + EXPECT_HMICALL("OnButtonSubscription") + :Times(0) + end + + local function TC_SubscribeButton_08_Steps_From_4_To_9() + -- Register the same App again + function Test:TC_SubscribeButton_08_RegisterAppInterfaceAndCheckOnButtonSubscription() + RegisterAppInterface(self, 1) + end + + -- Precondition: Activate app + function Test:TC_SubscribeButton_08_Activate_Application() + --HMI send ActivateApp request + local RequestId = self.hmiConnection:SendRequest("SDL.ActivateApp", { appID = appId0}) + EXPECT_HMIRESPONSE(RequestId) + :Do(function(_,data) + + if data.result.isSDLAllowed ~= true then + local RequestId = self.hmiConnection:SendRequest("SDL.GetUserFriendlyMessage", {language = "EN-US", messageCodes = {"DataConsent"}}) + EXPECT_HMIRESPONSE(RequestId,{result = {code = 0, method = "SDL.GetUserFriendlyMessage"}}) + :Do(function(_,data) + --hmi side: send request SDL.OnAllowSDLFunctionality + self.hmiConnection:SendNotification("SDL.OnAllowSDLFunctionality", {allowed = true, source = "GUI", device = {id = 1, name = "127.0.0.1"}}) + end) + + EXPECT_HMICALL("BasicCommunication.ActivateApp") + :Do(function(_,data) + self.hmiConnection:SendResponse(data.id,"BasicCommunication.ActivateApp", "SUCCESS", {}) + end) + :Times(2) + end + end) + + self.mobileSession:ExpectNotification("OnHMIStatus", {hmiLevel = "FULL"}) + :Timeout(12000) + + end + + -- Verification that SDL doesn't resend appropriate OnButtonPress and OnButtonEvent notifications to App + local mode = {"SHORT", "LONG"} + for j=1,#mode do + --check OnButtonEvent and OnButtonPress when clicking on this button + strTestCaseName = "TC_SubscribeButton_08_Click_UnsubscribedButton_PRESET_1".. mode[j] + TC_OnButtonEvent_OnButtonPress_When_UnsubscribedButton(self, "PRESET_1", mode[j], strTestCaseName) + end + + --Subscribe PRESET_1 button + strTestCaseName = "TC_SubscribeButton_08_SubscribeButton_PRESET_1_SUCCESS_With_OnButtonSubscription" + TC_SubscribeButtonSUCCESS(self, "PRESET_1", strTestCaseName) + + --Turn off transport + function Test:TC_SubscribeButton_08_TurnOffTransport() + self.mobileSession:Stop() + + EXPECT_HMINOTIFICATION("BasicCommunication.OnAppUnregistered", {appID = self.appId, unexpectedDisconnect = true}) + :Timeout(2000) + + EXPECT_HMINOTIFICATION("Buttons.OnButtonSubscription") + :Times(0) + + end + + --Turn on transport: Opening new session + function Test:TC_SubscribeButton_08_TurnOnTransportAddNewSession() + -- Connected expectation + self.mobileSession = mobile_session.MobileSession( + self, + self.mobileConnection) + + self.mobileSession:StartService(7) + end + + --RegisterAppInterface + function Test:TC_SubscribeButton_08_RegisterAppInterfaceAndCheckOnButtonSubscription() + RegisterAppInterface(self, 1) + end + + --Verification that SDL resend OnButtonEvent and OnButtionPress notifications to App + --local mode = {"SHORT", "LONG"} + for j=1,#mode do + --check OnButtonEvent and OnButtonPress when clicking on this button + strTestCaseName = "TC_SubscribeButton_08_Click_SubscribedButton_PRESET_1_".. mode[j] + TC_OnButtonEvent_OnButtonPress_When_SubscribedButton(self, "PRESET_1", mode[j], strTestCaseName) + end + end + Steps_4_9() + + --End test case SequenceCheck.8 + + ----------------------------------------------------------------------------------------- + + --Write TEST_BLOCK_VI_End to ATF log + function Test:TEST_BLOCK_VI_End() + print("********************************************************************") + end + + --End test suit SequenceCheck + +---------------------------------------------------------------------------------------------- +-----------------------------------------VII TEST BLOCK--------------------------------------- +--------------------------------------Different HMIStatus------------------------------------- +---------------------------------------------------------------------------------------------- + --Description: processing of request/response in different HMIlevels, SystemContext, AudioStreamingState + + --Begin test suit DifferentHMIlevel + --Description: processing API in different HMILevel + + --Write TEST_BLOCK_VII_Begin to ATF log + function Test:TEST_BLOCK_VII_Begin() + print("********************************************************************") + end + + -- Precondition: Register and activate application again + function Test:RegisterAppInterface() + RegisterAppInterface(self, 1) + end + + function Test:ActivateApplication_FULL() + --HMI send ActivateApp request + ActivateApplication(self, config.application1.registerAppInterfaceParams.appName) + end + + --Begin test case DifferentHMIlevel.1 + --Description: Check SubscribeButton request when application is in LIMITED HMI level + + --Requirement id in JAMA/or Jira ID: SDLAQ-CRS-790 + + --Verification criteria: SubscribeButton is allowed in LIMITED HMI level + + -- Precondtion: Change app to LIMITED + function Test:ChangeHMIToLimited() + + --hmi side: sending BasicCommunication.OnAppDeactivated request + local cid = self.hmiConnection:SendNotification("BasicCommunication.OnAppDeactivated", + { + --appID = self.applications["Test Application"], + appID = appId0, + reason = "GENERAL" + }) + + --mobile side: expect OnHMIStatus notification + EXPECT_NOTIFICATION("OnHMIStatus",{hmiLevel = "LIMITED"}) + + end + + -- Body + for i=1,#buttonName do + + --Precondition for this test case + Precondition_TC_UnsubscribeButton(self, buttonName[i]) + + strTestCaseName = "SubscribeButton_LIMITED_" .. tostring(buttonName[i]).."_SUCCESS" + TC_SubscribeButtonSUCCESS(self, buttonName[i], strTestCaseName) + end + + --End test case DifferentHMIlevel.1 + ----------------------------------------------------------------------------------------- + + + --Begin test case DifferentHMIlevel.4 + --Description: Check SubscribeButton request when application is in NONE HMI level + + --Requirement id in JAMA/or Jira ID: SDLAQ-CRS-790 + + --Verification criteria: SubscribeButton is NOT allowed in NONE HMI level + + -- Precondition 1: Activate app + function Test:Activate_Media_Application() + ActivateApplication(self, config.application1.registerAppInterfaceParams.appName) + end + + -- Precondition 2: Change app to NONE HMI level + function Test:ExitApplication_ChangeTo_NONE_HMILEVEL() + + local function sendUserExit() + --hmi side: sending BasicCommunication.OnExitApplication request + local cid = self.hmiConnection:SendNotification("BasicCommunication.OnExitApplication", + { + appID = self.applications["Test Application"], + reason = "USER_EXIT" + }) + end + + local function SendOnSystemContext1() + --hmi side: sending UI.OnSystemContext request + SendOnSystemContext(self,"MAIN") + end + + local function sendOnAppDeactivate() + --hmi side: sending BasicCommunication.OnAppDeactivated request + local cid = self.hmiConnection:SendNotification("BasicCommunication.OnAppDeactivated", + { + appID = self.applications["Test Application"], + reason = "GENERAL" + }) + end + + --hmi side: sending BasicCommunication.OnSystemContext request + SendOnSystemContext(self,"MENU") + + --hmi side: sending BasicCommunication.OnExitApplication request + RUN_AFTER(sendUserExit, 1000) + + --hmi side: sending UI.OnSystemContext request = MAIN + RUN_AFTER(SendOnSystemContext1, 2000) + + --hmi side: sending BasicCommunication.OnAppDeactivated request + RUN_AFTER(sendOnAppDeactivate, 3000) + + + --mobile side: OnHMIStatus notifications + EXPECT_NOTIFICATION("OnHMIStatus", + { systemContext = "MENU", hmiLevel = "FULL"}, + { systemContext = "MENU", hmiLevel = "NONE"}, + { systemContext = "MAIN", hmiLevel = "NONE"}) + :Times(3) + + end + + -- Body + for i=1,#buttonName do + Test["SubscribeButton_NONE_" ..tostring(buttonName[i]).."_DISALLOWED"] = function(self) + --mobile side: sending SubscribeButton request + local cid = self.mobileSession:SendRPC("SubscribeButton", + { + buttonName = buttonName[i] + }) + + --mobile side: expect SubscribeButton response + EXPECT_RESPONSE(cid, {success = false, resultCode = "DISALLOWED"}) + :Timeout(iTimeout) + + EXPECT_NOTIFICATION("OnHashChange") + :Times(0) + :Timeout(iTimeout) + end + end + + --End test case DifferentHMIlevel.2 + ----------------------------------------------------------------------------------------- + + + --Begin test case DifferentHMIlevel.3 + --Description: Check SubscribeButton request when application is in BACKGOUND HMI level + + --Requirement id in JAMA/or Jira ID: SDLAQ-CRS-790 + + --Verification criteria: SubscribeButton is allowed in BACKGOUND HMI level + + -- Precondition 1: Change all to FULL + function Test:ActivateApplication_ChangeTo_FULL_HMILEVEL() + ActivateApplication(self, config.application1.registerAppInterfaceParams.appName) + end + + -- Precondition 2: Change all to LIMITED + function Test:ChangeHMIToLimited() + --hmi side: sending BasicCommunication.OnAppDeactivated request + local cid = self.hmiConnection:SendNotification("BasicCommunication.OnAppDeactivated", + { + --appID = self.applications["Test Application"], + appID = appId0, + reason = "GENERAL" + }) + + --mobile side: expect OnHMIStatus notification + EXPECT_NOTIFICATION("OnHMIStatus",{hmiLevel = "LIMITED"}) + end + + -- Precondition 3: Activate an other media app to change app to BACKGROUND + function Test:Activate_Media_App2() + --HMI send ActivateApp request + local RequestId = self.hmiConnection:SendRequest("SDL.ActivateApp", { appID = appId2}) + EXPECT_HMIRESPONSE(RequestId) + :Do(function(_,data) + + if data.result.isSDLAllowed ~= true then + local RequestId = self.hmiConnection:SendRequest("SDL.GetUserFriendlyMessage", {language = "EN-US", messageCodes = {"DataConsent"}}) + EXPECT_HMIRESPONSE(RequestId,{result = {code = 0, method = "SDL.GetUserFriendlyMessage"}}) + :Do(function(_,data) + --hmi side: send request SDL.OnAllowSDLFunctionality + self.hmiConnection:SendNotification("SDL.OnAllowSDLFunctionality", {allowed = true, source = "GUI", device = {id = 1, name = "127.0.0.1"}}) + end) + + EXPECT_HMICALL("BasicCommunication.ActivateApp") + :Do(function(_,data) + self.hmiConnection:SendResponse(data.id,"BasicCommunication.ActivateApp", "SUCCESS", {}) + end) + :Times(2) + end + end) + + self.mobileSession2:ExpectNotification("OnHMIStatus", {hmiLevel = "FULL"}) + :Timeout(12000) + + self.mobileSession:ExpectNotification("OnHMIStatus", {hmiLevel = "BACKGROUND"}) + + end + + -- Body + for i=1,#buttonName do + + --Precondition for this test case + Precondition_TC_UnsubscribeButton(self, buttonName[i]) + + strTestCaseName = "SubscribeButton_BACKGOUND_" .. tostring(buttonName[i]).."_SUCCESS" + TC_SubscribeButtonSUCCESS(self, buttonName[i], strTestCaseName) + end + + --End test case DifferentHMIlevel.3 + ----------------------------------------------------------------------------------------- + + --Write TEST_BLOCK_VII_End to ATF log + function Test:TEST_BLOCK_VII_End() + print("********************************************************************") + end + + --End test suit DifferentHMIlevel + + + +return Test + diff --git a/test_scripts/API/ATF_SubscribeVehicleData.lua b/test_scripts/API/ATF_SubscribeVehicleData.lua new file mode 100644 index 0000000000..dca38c9a1e --- /dev/null +++ b/test_scripts/API/ATF_SubscribeVehicleData.lua @@ -0,0 +1,3573 @@ +Test = require('connecttest') +require('cardinalities') +local events = require('events') +local mobile_session = require('mobile_session') + +require('user_modules/AppTypes') +local commonPreconditions = require ('/user_modules/shared_testcases/commonPreconditions') +local commonSteps = require ('/user_modules/shared_testcases/commonSteps') + +local SVDValues = {gps="VEHICLEDATA_GPS", speed="VEHICLEDATA_SPEED", rpm="VEHICLEDATA_RPM", fuelLevel="VEHICLEDATA_FUELLEVEL", fuelLevel_State="VEHICLEDATA_FUELLEVEL_STATE", instantFuelConsumption="VEHICLEDATA_FUELCONSUMPTION", externalTemperature="VEHICLEDATA_EXTERNTEMP", prndl="VEHICLEDATA_PRNDL", tirePressure="VEHICLEDATA_TIREPRESSURE", odometer="VEHICLEDATA_ODOMETER", beltStatus="VEHICLEDATA_BELTSTATUS", bodyInformation="VEHICLEDATA_BODYINFO", deviceStatus="VEHICLEDATA_DEVICESTATUS", driverBraking="VEHICLEDATA_BRAKING", wiperStatus="VEHICLEDATA_WIPERSTATUS", headLampStatus="VEHICLEDATA_HEADLAMPSTATUS", engineTorque="VEHICLEDATA_ENGINETORQUE", accPedalPosition="VEHICLEDATA_ACCPEDAL", steeringWheelAngle="VEHICLEDATA_STEERINGWHEEL", eCallInfo="VEHICLEDATA_ECALLINFO", airbagStatus="VEHICLEDATA_AIRBAGSTATUS", emergencyEvent="VEHICLEDATA_EMERGENCYEVENT", clusterModeStatus="VEHICLEDATA_CLUSTERMODESTATUS", myKey="VEHICLEDATA_MYKEY"} +local allVehicleData = {"gps", "speed", "rpm", "fuelLevel", "fuelLevel_State", "instantFuelConsumption", "externalTemperature", "prndl", "tirePressure", "odometer", "beltStatus", "bodyInformation", "deviceStatus", "driverBraking", "wiperStatus", "headLampStatus", "engineTorque", "accPedalPosition", "steeringWheelAngle", "eCallInfo", "airbagStatus", "emergencyEvent", "clusterModeStatus", "myKey"} +local vehicleData = {"gps"} +local infoMessageValue = string.rep("a",1000) + +function DelayedExp(time) + local event = events.Event() + event.matches = function(self, e) return self == e end + EXPECT_EVENT(event, "Delayed event") + :Timeout(time + 1000) + RUN_AFTER(function() + RAISE_EVENT(event, event) + end, time) +end + + +function setSVDRequest(paramsSend) + local temp = {} + for i = 1, #paramsSend do + temp[paramsSend[i]] = true + end + return temp +end +function setSVDResponse(paramsSend, vehicleDataResultCode) + local temp = {} + local vehicleDataResultCodeValue = "" + + if vehicleDataResultCode ~= nil then + vehicleDataResultCodeValue = vehicleDataResultCode + else + vehicleDataResultCodeValue = "SUCCESS" + end + + for i = 1, #paramsSend do + if paramsSend[i] == "clusterModeStatus" then + temp["clusterModes"] = { + resultCode = vehicleDataResultCodeValue, + dataType = SVDValues[paramsSend[i]] + } + else + temp[paramsSend[i]] = { + resultCode = vehicleDataResultCodeValue, + dataType = SVDValues[paramsSend[i]] + } + end + end + return temp +end +function createSuccessExpectedResult(response, infoMessage) + response["success"] = true + response["resultCode"] = "SUCCESS" + + if info ~= nil then + response["info"] = infoMessage + end + + return response +end +function createExpectedResult(bSuccess, sResultCode, infoMessage, response) + response["success"] = bSuccess + response["resultCode"] = sResultCode + + if infoMessage ~= nil then + response["info"] = infoMessage + end + + return response +end +function Test:subscribeVehicleDataSuccess(paramsSend, infoMessage) + local request = setSVDRequest(paramsSend) + local response = setSVDResponse(paramsSend) + + if infoMessage ~= nil then + response["info"] = infoMessage + end + + --mobile side: sending SubscribeVehicleData request + local cid = self.mobileSession:SendRPC("SubscribeVehicleData",request) + + --hmi side: expect SubscribeVehicleData request + EXPECT_HMICALL("VehicleInfo.SubscribeVehicleData",request) + :Do(function(_,data) + --hmi side: sending VehicleInfo.SubscribeVehicleData response + self.hmiConnection:SendResponse(data.id, data.method, "SUCCESS", response) + end) + + + local expectedResult = createSuccessExpectedResult(response, infoMessage) + + --mobile side: expect SubscribeVehicleData response + EXPECT_RESPONSE(cid, expectedResult) + + --mobile side: expect OnHashChange notification + EXPECT_NOTIFICATION("OnHashChange") +end +function Test:subscribeVehicleDataInvalidData(paramsSend) + --mobile side: sending SubscribeVehicleData request + local cid = self.mobileSession:SendRPC("SubscribeVehicleData",paramsSend) + + --mobile side: expected SubscribeVehicleData response + EXPECT_RESPONSE(cid, { success = false, resultCode = "INVALID_DATA" }) + + --mobile side: expect OnHashChange notification + EXPECT_NOTIFICATION("OnHashChange",{}) + :Times(0) +end +function Test:unSubscribeVehicleDataSuccess(paramsSend) + local request = setSVDRequest(paramsSend) + local response = setSVDResponse(paramsSend) + + --mobile side: sending UnsubscribeVehicleData request + local cid = self.mobileSession:SendRPC("UnsubscribeVehicleData",request) + + --hmi side: expect UnsubscribeVehicleData request + EXPECT_HMICALL("VehicleInfo.UnsubscribeVehicleData",request) + :Do(function(_,data) + --hmi side: sending VehicleInfo.UnsubscribeVehicleData response + self.hmiConnection:SendResponse(data.id, data.method, "SUCCESS", response) + end) + + local expectedResult = createSuccessExpectedResult(response) + + --mobile side: expect UnsubscribeVehicleData response + --EXPECT_RESPONSE(cid, expectedResult) + self.mobileSession:ExpectResponse(cid, { success = true, resultCode = "SUCCESS" }) + + --mobile side: expect OnHashChange notification + EXPECT_NOTIFICATION("OnHashChange") +end +function Test:subscribeVehicleDataIgnored(paramsSend) + -- SubscribeVehicleData previously subscribed + local request = setSVDRequest(paramsSend) + local response = setSVDResponse(paramsSend, "DATA_ALREADY_SUBSCRIBED") + local messageValue = "Already subscribed on some provided VehicleData." + + --mobile side: sending SubscribeVehicleData request + local cid = self.mobileSession:SendRPC("SubscribeVehicleData",request) + + local expectedResult = createExpectedResult(false, "IGNORED", messageValue, response) + + --mobile side: expect SubscribeVehicleData response + EXPECT_RESPONSE(cid, expectedResult) + + --mobile side: expect OnHashChange notification + EXPECT_NOTIFICATION("OnHashChange") +end + +--------------------------------------------------------------------------------------------- +------------------------- General Precondition before ATF start ----------------------------- +--------------------------------------------------------------------------------------------- +--make backup copy of file sdl_preloaded_pt.json +commonPreconditions:BackupFile("sdl_preloaded_pt.json") +-- TODO: Remove after implementation policy update +-- Precondition: remove policy table +commonSteps:DeletePolicyTable() + +-- TODO: Remove after implementation policy update +-- Precondition: replace preloaded file with new one +os.execute('cp ./files/PTU_AllowedAndUserDisallowedSVD.json ' .. tostring(config.pathToSDL) .. "sdl_preloaded_pt.json") + + +--------------------------------------------------------------------------------------------- +-------------------------------------------Preconditions------------------------------------- +--------------------------------------------------------------------------------------------- + --Begin Precondition.1 + --Description: Activation application + function Test:ActivationApp() + --hmi side: sending SDL.ActivateApp request + local RequestId = self.hmiConnection:SendRequest("SDL.ActivateApp", { appID = self.applications["Test Application"]}) + EXPECT_HMIRESPONSE(RequestId) + :Do(function(_,data) + if + data.result.isSDLAllowed ~= true then + local RequestId = self.hmiConnection:SendRequest("SDL.GetUserFriendlyMessage", {language = "EN-US", messageCodes = {"DataConsent"}}) + + --hmi side: expect SDL.GetUserFriendlyMessage message response + --TODO: Update after resolving APPLINK-16094 EXPECT_HMIRESPONSE(RequestId,{result = {code = 0, method = "SDL.GetUserFriendlyMessage"}}) + EXPECT_HMIRESPONSE(RequestId) + :Do(function(_,data) + --hmi side: send request SDL.OnAllowSDLFunctionality + self.hmiConnection:SendNotification("SDL.OnAllowSDLFunctionality", {allowed = true, source = "GUI", device = {id = config.deviceMAC, name = "127.0.0.1"}}) + + --hmi side: expect BasicCommunication.ActivateApp request + EXPECT_HMICALL("BasicCommunication.ActivateApp") + :Do(function(_,data) + --hmi side: sending BasicCommunication.ActivateApp response + self.hmiConnection:SendResponse(data.id,"BasicCommunication.ActivateApp", "SUCCESS", {}) + end) + :Times(AnyNumber()) + end) + + end + end) + + --mobile side: expect notification + EXPECT_NOTIFICATION("OnHMIStatus", {hmiLevel = "FULL", systemContext = "MAIN"}) + end + --End Precondition.1 + +--------------------------------------------------------------------------------------------- +-----------------------------------------I TEST BLOCK---------------------------------------- +--CommonRequestCheck: Check of mandatory/conditional request's parameters (mobile protocol)-- +--------------------------------------------------------------------------------------------- + + --Begin Test suit CommonRequestCheck + --Description: + -- request with all parameters + -- request with only mandatory parameters + -- request with all combinations of conditional-mandatory parameters (if exist) + -- request with one by one conditional parameters (each case - one conditional parameter) + -- request with missing mandatory parameters one by one (each case - missing one mandatory parameter) + -- request with all parameters are missing + -- request with fake parameters (fake - not from protocol, from another request) + -- request is sent with invalid JSON structure + -- different conditions of correlationID parameter (invalid, several the same etc.) + + --Begin Test case CommonRequestCheck.1 + --Description: This test is intended to check request with all parameters + + --Requirement id in JAMA/or Jira ID: SDLAQ-CRS-89 + + --Verification criteria: SubsribeVehicleData request subscribes application for specific published vehicle data items. The data is sent upon being changed on HMI. The application is notified by the onVehicleData notification whenever the new data is available. + function Test:SubscribeVehicleData_Positive() + self:subscribeVehicleDataSuccess(allVehicleData) + end + + function Test:PostCondition_UnSubscribeVehicleData() + self:unSubscribeVehicleDataSuccess(allVehicleData) + end + --End Test case CommonRequestCheck.1 + + ----------------------------------------------------------------------------------------- + + --Begin Test case CommonRequestCheck.2 + --Description: This test is intended to check request with mandatory and conditional parameters + --Not applicable + --End Test case CommonRequestCheck.2 + + ----------------------------------------------------------------------------------------- + + --Begin Test case CommonRequestCheck.3 + --Description: This test is intended to check processing requests without mandatory parameters + + --Requirement id in JAMA/or Jira ID: SDLAQ-CRS-576 + + --Verification criteria: + --The request sent with NO parameters receives INVALID_DATA response code. + function Test:SubscribeVehicleData_AllParamsMissing() + self:subscribeVehicleDataInvalidData({}) + end + --End Test case CommonRequestCheck.3 + + ----------------------------------------------------------------------------------------- + + --Begin Test case CommonRequestCheck.4 + --Description: Check processing request with different fake parameters + + --Requirement id in JAMA/or Jira ID: APPLINK-4518 + + --Verification criteria: According to xml tests by Ford team all fake params should be ignored by SDL + + --Begin Test case CommonRequestCheck4.1 + --Description: With fake parameters + function Test:SubscribeVehicleData_FakeParams() + --mobile side: sending SubscribeVehicleData request + local cid = self.mobileSession:SendRPC("SubscribeVehicleData", + { + gps = true, + fakeParam ="fakeParam" + }) + + --hmi side: expect SubscribeVehicleData request + EXPECT_HMICALL("VehicleInfo.SubscribeVehicleData",{gps = true}) + :Do(function(_,data) + --hmi side: sending VehicleInfo.SubscribeVehicleData response + self.hmiConnection:SendResponse(data.id, data.method, "SUCCESS", {gps= {resultCode = "SUCCESS", dataType = "VEHICLEDATA_GPS"}}) + end) + :ValidIf(function(_,data) + if data.params.fakeParam then + print(" \27[36m SDL re-sends fakeParam parameters to HMI \27[0m") + return false + else + return true + end + end) + + --mobile side: expect SubscribeVehicleData response + EXPECT_RESPONSE(cid, {success = true, resultCode = "SUCCESS", gps= {resultCode = "SUCCESS", dataType = "VEHICLEDATA_GPS"}}) + + --mobile side: expect OnHashChange notification + EXPECT_NOTIFICATION("OnHashChange") + end + function Test:PostCondition_UnSubscribeVehicleData() + self:unSubscribeVehicleDataSuccess(vehicleData) + end + --End Test case CommonRequestCheck4.1 + + ----------------------------------------------------------------------------------------- + + --Begin Test case CommonRequestCheck.4.2 + --Description: Parameters from another request + function Test:SubscribeVehicleData_ParamsAnotherRequest() + --mobile side: sending SubscribeVehicleData request + local cid = self.mobileSession:SendRPC("SubscribeVehicleData", + { + gps = true, + ttsChunks = + { + { + text = "TTSChunk", + type = "TEXT", + } + } + }) + + --hmi side: expect SubscribeVehicleData request + EXPECT_HMICALL("VehicleInfo.SubscribeVehicleData",{gps = true}) + :Do(function(_,data) + --hmi side: sending VehicleInfo.SubscribeVehicleData response + self.hmiConnection:SendResponse(data.id, data.method, "SUCCESS", {gps= {resultCode = "SUCCESS", dataType = "VEHICLEDATA_GPS"}}) + end) + :ValidIf(function(_,data) + if data.params.ttsChunks then + print(" \27[36m SDL re-sends fakeParam parameters to HMI \27[0m") + return false + else + return true + end + end) + + --mobile side: expect SubscribeVehicleData response + EXPECT_RESPONSE(cid, {success = true, resultCode = "SUCCESS", gps= {resultCode = "SUCCESS", dataType = "VEHICLEDATA_GPS"}}) + + --mobile side: expect OnHashChange notification + EXPECT_NOTIFICATION("OnHashChange") + end + function Test:PostCondition_UnSubscribeVehicleData() + self:unSubscribeVehicleDataSuccess(vehicleData) + end + --End Test case CommonRequestCheck4.2 + --End Test case CommonRequestCheck.4 + + ----------------------------------------------------------------------------------------- + + --Begin Test case CommonRequestCheck.5 + --Description: Check processing request with invalid JSON syntax + + --Requirement id in JAMA/or Jira ID: SDLAQ-CRS-576 + + --Verification criteria: The request with wrong JSON syntax is sent, the response with INVALID_DATA result code is returned. + function Test:SubscribeVehicleData_InvalidJSON() + self.mobileSession.correlationId = self.mobileSession.correlationId + 1 + + local msg = + { + serviceType = 7, + frameInfo = 0, + rpcType = 0, + rpcFunctionId = 20, + rpcCorrelationId = self.mobileSession.correlationId, + --< These checks are not applicable for UnsubscribeButton request. There is no response from HMI to SDL. + + + + --Write TEST_BLOCK_III_End to ATF log + function Test:TEST_BLOCK_III_End() + print("********************************************************************") + end + + + +---------------------------------------------------------------------------------------------- +----------------------------------------IV TEST BLOCK----------------------------------------- +---------------------------------------Result code check-------------------------------------- +---------------------------------------------------------------------------------------------- + + --Check all uncovered pairs resultCodes+success + + --Begin test suit ResultCodeCheck + --Description: check result code of response to Mobile (SDLAQ-CRS-532) + + --Write TEST_BLOCK_IV_Begin to ATF log + function Test:TEST_BLOCK_IV_Begin() + print("********************************************************************") + end + + --Begin test case ResultCodeCheck.1 + --Description: Check resultCode: SUCCESS + + --It is recovered by CommonRequestCheck.1 + + --End test case ResultCodeCheck.1 + ----------------------------------------------------------------------------------------- + + --Begin test case ResultCodeCheck.2 + --Description: Check resultCode: INVALID_DATA + + --It is recovered by UnsubscribeButton_buttonName_IsInvalidValue_nonexistent_INVALID_DATA + + --End test case ResultCodeCheck.2 + ----------------------------------------------------------------------------------------- + + + --Begin test case ResultCodeCheck.3 + --Description: Check resultCode: OUT_OF_MEMORY + + --Requirement id in JAMA/or Jira ID: SDLAQ-CRS-545 + + --Verification criteria: A UnsubscribeButton request is sent under conditions of RAM deficit for executing it. The response code OUT_OF_MEMORY is returned + + --ToDo: Can not check this case. + + --End test case ResultCodeCheck.3 + ----------------------------------------------------------------------------------------- + + --Begin test case ResultCodeCheck.4 + --Description: Check resultCode: TOO_MANY_PENDING_REQUESTS + + --Requirement id in JAMA/or Jira ID: SDLAQ-CRS-546 + + --Verification criteria: SDL response TOO_MANY_PENDING_REQUESTS resultCode + + --Move to another script: ATF_UnsubscribeButton_TOO_MANY_PENDING_REQUESTS.lua + + --End test case ResultCodeCheck.4 + ----------------------------------------------------------------------------------------- + + --Begin test case ResultCodeCheck.5 + --Description: Check resultCode: APPLICATION_NOT_REGISTERED + + --Requirement id in JAMA/or Jira ID: SDLAQ-CRS-547 + + --Verification criteria: SDL responses APPLICATION_NOT_REGISTERED resultCode + + --Description: Unregister application + function Test:UnregisterAppInterface_Success() + local cid = self.mobileSession:SendRPC("UnregisterAppInterface",{}) + + EXPECT_RESPONSE(cid, { success = true, resultCode = "SUCCESS"}) + :Timeout(2000) + end + + --Description: Send UnsubscribeButton when application not registered yet. + + for i=1,#buttonName do + + --Precondition for this test case + --Precondition_TC_SubscribeButton(self, buttonName[i]) + + Test["UnsubscribeButton_resultCode_APPLICATION_NOT_REGISTERED_" .. tostring(buttonName[i]).."_APPLICATION_NOT_REGISTERED"] = function(self) + + --mobile side: sending UnsubscribeButton request + local cid = self.mobileSession:SendRPC("UnsubscribeButton", + { + buttonName = buttonName[i] + } + ) + + --mobile side: expect UnsubscribeButton response + EXPECT_RESPONSE(cid, {success = false, resultCode = "APPLICATION_NOT_REGISTERED", info = nil}) + :Timeout(iTimeout) + + EXPECT_NOTIFICATION("OnHashChange") + :Times(0) + :Timeout(iTimeout) + end + + end + + --End test case ResultCodeCheck.5 + ----------------------------------------------------------------------------------------- + + --Begin test case ResultCodeCheck.6 + --Description: Check resultCode: REJECTED + + --Removed: by answer in APPLINK-13589: Per CRS APPLINK-14503 REJECTED result code is not applicable for UnsubscribeButton_response + + --End test case ResultCodeCheck.6 + ----------------------------------------------------------------------------------------- + + --Begin test case ResultCodeCheck.7 + --Description: Check resultCode: IGNORED + + --Requirement id in JAMA/or Jira ID: SDLAQ-CRS-549 + + --Verification criteria: In case an application sends UnsubscribeButton request for a button which hasn't been previously subscribed, SDL sends IGNORED resultCode to mobile side. General result is success=false. + + +--//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// + function Test:Precondition_ActivateFirstApp() + --hmi side: sending SDL.ActivateApp request + local RequestId = self.hmiConnection:SendRequest("SDL.ActivateApp", { appID = self.applications["Test Application"]}) + + --mobile side: expect notification + self.mobileSession:ExpectNotification("OnHMIStatus",{hmiLevel = "FULL", systemContext = "MAIN"}) + end +--////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// + + + -- register media application 1 + -- function Test:Register_Media_AppInterface() + -- RegisterAppInterface(self, 1) + -- end + + + -- function Test:Activate_Media_Application() + -- --HMI send ActivateApp request + -- ActivateApplication(self, config.application1.registerAppInterfaceParams.appName) + -- end + + + for i=1,#buttonName do + + --Precondition for this test case + Precondition_TC_UnsubscribeButton(self, buttonName[i]) + + Test["UnsubscribeButton_resultCode_IGNORED_" .. tostring(buttonName[i]).."_IGNORED"] = function(self) + + --mobile side: sending UnsubscribeButton request + local cid = self.mobileSession:SendRPC("UnsubscribeButton", + { + buttonName = buttonName[i] + } + ) + + --mobile side: expect UnsubscribeButton response + EXPECT_RESPONSE(cid, {success = false, resultCode = "IGNORED", info = nil}) + :Timeout(iTimeout) + + EXPECT_NOTIFICATION("OnHashChange") + :Times(0) + :Timeout(iTimeout) + end + + end + + --End test case ResultCodeCheck.7 + ----------------------------------------------------------------------------------------- + + --Begin test case ResultCodeCheck.8 + --Description: Check resultCode: UNSUPPORTED_RESOURCE + + --Requirement id in JAMA/or Jira ID: SDLAQ-CRS-550 + + --Verification criteria: A button that was requested for unsubscription is not supported under the current system. + + for i=1,#UnsupportButtonName do + + Test["UnsubscribeButton_resultCode_UNSUPPORTED_RESOURCE_" .. tostring(UnsupportButtonName[i])] = function(self) + + --mobile side: sending UnsubscribeButton request + local cid = self.mobileSession:SendRPC("UnsubscribeButton", + { + buttonName = UnsupportButtonName[i] + } + ) + + --mobile side: expect UnsubscribeButton response + EXPECT_RESPONSE(cid, {resultCode = "UNSUPPORTED_RESOURCE", success = false}) + :Timeout(iTimeout) + + EXPECT_NOTIFICATION("OnHashChange") + :Times(0) + :Timeout(iTimeout) + end + + end + + --End test case ResultCodeCheck.8 + ----------------------------------------------------------------------------------------- + + --Begin test case ResultCodeCheck.9 + --Description: Check resultCode: GENERIC_ERROR + + --Requirement id in JAMA/or Jira ID: SDLAQ-CRS-551 + + --Verification criteria: GENERIC_ERROR comes as a result code in response when all other codes aren't applicable or the unknown issue occurred. + + --ToDo: Can not check this case + + --End test case ResultCodeCheck.9 + ----------------------------------------------------------------------------------------- + + + --Write TEST_BLOCK_IV_End to ATF log + function Test:TEST_BLOCK_IV_End() + print("********************************************************************") + end + + --End test suit ResultCodeCheck + + + + + + +---------------------------------------------------------------------------------------------- +-----------------------------------------V TEST BLOCK----------------------------------------- +---------------------------------------HMI negative cases------------------------------------- +---------------------------------------------------------------------------------------------- + + --------Checks----------- + -- requests without responses from HMI + -- invalid structure os response + -- several responses from HMI to one request + -- fake parameters + -- HMI correlation id check + -- wrong response with correct HMI id + + + -- UnsubscribeButton API does not have any response from HMI. This test suit is not applicable => Ignore + + --Write TEST_BLOCK_V_Begin to ATF log + function Test:TEST_BLOCK_V_Begin() + print("********************************************************************") + print("***TEST_BLOCK_V: HMI negative cases are not applicable for UnsubscribeButton***") + end + + --Write TEST_BLOCK_V_End to ATF log + function Test:TEST_BLOCK_V_End() + print("********************************************************************") + end + + +---------------------------------------------------------------------------------------------- +-----------------------------------------VI TEST BLOCK---------------------------------------- +-------------------------Sequence with emulating of user's action(s)-------------------------- +---------------------------------------------------------------------------------------------- + + --Begin test suit SequenceCheck + --Description: TC's checks SDL behavior by processing + -- different request sequence with timeout + -- with emulating of user's actions + + --Write TEST_BLOCK_VII-_Begin to ATF log + function Test:TEST_BLOCK_VI_Begin() + print("********************************************************************") + end + + --Begin test case SequenceCheck.1-5 + --Description: check scenario in test case TC_UnsubscribeButton_01 - 05: + + --Requirement id in JAMA/or Jira ID: SDLAQ-CRS-73, SDLAQ-CRS-74, SDLAQ-CRS-171, SDLAQ-CRS-175 + + --Verification criteria: UnsubscribeButton option check for OK, SEEKRIGHT, SEEKLEFT,.. . Make actions on UI to check the subscription on buttons (Long/Short press) + + local buttonName1 = buttonName + local mode = {"SHORT", "LONG"} + for i=1,#buttonName1 do + + --Precondition for this test case: Unsubscribe button + Precondition_TC_SubscribeButton(self, buttonName1[i]) + + --Subscribe button + strTestCaseName = "TC_UnsubscribeButton_01_05_UnsubscribeButton_" .. tostring(buttonName[i]).."_SUCCESS" + TC_UnsubscribeButtonSUCCESS(self, buttonName[i], strTestCaseName) + + for j=1,#mode do + --check OnButtonEvent and OnButtonPress when clicking on this button + strTestCaseName = "TC_UnsubscribeButton_01_05_Click_UnsubscribedButton_"..buttonName1[i] .."_".. mode[j] + TC_OnButtonEvent_OnButtonPress_When_UnsubscribedButton(self, buttonName1[i], mode[j], strTestCaseName) + end + end + + --End test case SequenceCheck.1-5 + ----------------------------------------------------------------------------------------- + + + --Write TEST_BLOCK_VI_End to ATF log + function Test:TEST_BLOCK_VI_End() + print("********************************************************************") + end + + --End test suit SequenceCheck + + + + + + + +---------------------------------------------------------------------------------------------- +-----------------------------------------VII TEST BLOCK--------------------------------------- +--------------------------------------Different HMIStatus------------------------------------- +---------------------------------------------------------------------------------------------- + --Description: processing of request/response in different HMIlevels, SystemContext, AudioStreamingState + + --Begin test suit DifferentHMIlevel + --Description: processing API in different HMILevel + + --Write TEST_BLOCK_VII_Begin to ATF log + function Test:TEST_BLOCK_VII_Begin() + print("********************************************************************") + end + + + + --Begin test case DifferentHMIlevel.1 + --Description: Check UnsubscribeButton request when application is in LIMITED HMI level + + --Requirement id in JAMA/or Jira ID: SDLAQ-CRS-794 + + --Verification criteria: UnsubscribeButton is allowed in LIMITED HMI level(only for media app) + if + Test.isMediaApplication == true or + Test.appHMITypes["NAVIGATION"] == true then + + -- Precondition: Change app to LIMITED + function Test:ChangeHMIToLimited() + + --hmi side: sending BasicCommunication.OnAppDeactivated request + local cid = self.hmiConnection:SendNotification("BasicCommunication.OnAppDeactivated", + { + --appID = self.applications["Test Application"], + appID = appId0, + reason = "GENERAL" + }) + + --mobile side: expect OnHMIStatus notification + EXPECT_NOTIFICATION("OnHMIStatus",{hmiLevel = "LIMITED", audioStreamingState = "AUDIBLE"}) + + end + + -- Body + for i=1,#buttonName do + --Precondition for this test case + Precondition_TC_SubscribeButton(self, buttonName[i]) + + strTestCaseName = "UnsubscribeButton_LIMITED_" .. tostring(buttonName[i]).."_SUCCESS" + TC_UnsubscribeButtonSUCCESS(self, buttonName[i], strTestCaseName) + end + + + --End test case DifferentHMIlevel.1 + ----------------------------------------------------------------------------------------- + + + --Begin test case DifferentHMIlevel.2 + --Description: Check UnsubscribeButton request when application is in NONE HMI level + + --Requirement id in JAMA/or Jira ID: SDLAQ-CRS-794 + + --Verification criteria: UnsubscribeButton is NOT allowed in NONE HMI level + + -- Precondition 1: Activate app + function Test:Activate_Media_Application() + ActivateApplication(self, config.application1.registerAppInterfaceParams.appName) + end + + end + -- Precondition 2: Change app to NONE HMI level + function Test:ExitApplication_ChangeTo_NONE_HMILEVEL() + + local function sendUserExit() + --hmi side: sending BasicCommunication.OnExitApplication request + local cid = self.hmiConnection:SendNotification("BasicCommunication.OnExitApplication", + { + appID = self.applications["Test Application"], + reason = "USER_EXIT" + }) + end + + local function SendOnSystemContext1() + --hmi side: sending UI.OnSystemContext request + SendOnSystemContext(self,"MAIN") + end + + local function sendOnAppDeactivate() + --hmi side: sending BasicCommunication.OnAppDeactivated request + local cid = self.hmiConnection:SendNotification("BasicCommunication.OnAppDeactivated", + { + appID = self.applications["Test Application"], + reason = "GENERAL" + }) + end + + --hmi side: sending BasicCommunication.OnSystemContext request + SendOnSystemContext(self,"MENU") + + --hmi side: sending BasicCommunication.OnExitApplication request + RUN_AFTER(sendUserExit, 1000) + + --hmi side: sending UI.OnSystemContext request = MAIN + RUN_AFTER(SendOnSystemContext1, 2000) + + --hmi side: sending BasicCommunication.OnAppDeactivated request + RUN_AFTER(sendOnAppDeactivate, 3000) + + + --mobile side: OnHMIStatus notifications + EXPECT_NOTIFICATION("OnHMIStatus", + { systemContext = "MENU", hmiLevel = "FULL"}, + { systemContext = "MENU", hmiLevel = "NONE"}, + { systemContext = "MAIN", hmiLevel = "NONE"}) + :Times(2) + + end + + -- Body + for i=1,#buttonName do + Test["UnsubscribeButton_NONE_" ..tostring(buttonName[i]).."_DISALLOWED"] = function(self) + --mobile side: sending UnsubscribeButton request + local cid = self.mobileSession:SendRPC("UnsubscribeButton", + { + buttonName = buttonName[i] + }) + + --mobile side: expect UnsubscribeButton response + EXPECT_RESPONSE(cid, {success = false, resultCode = "DISALLOWED"}) + :Timeout(iTimeout) + + EXPECT_NOTIFICATION("OnHashChange") + :Times(0) + :Timeout(iTimeout) + end + end + + --End test case DifferentHMIlevel.2 + ----------------------------------------------------------------------------------------- + + + --Begin test case DifferentHMIlevel.3 + --Description: Check UnsubscribeButton request when application is in BACKGOUND HMI level + + --Requirement id in JAMA/or Jira ID: SDLAQ-CRS-794 + + --Verification criteria: UnsubscribeButton is NOT allowed in BACKGOUND HMI level + + -- Precondition 1: Change all to FULL + function Test:ActivateApplication_ChangeTo_FULL_HMILEVEL() + ActivateApplication(self, config.application1.registerAppInterfaceParams.appName) + end + + if + Test.isMediaApplication == true or + Test.appHMITypes["NAVIGATION"] == true then + + -- Precondition 3: Opening new session + function Test:AddNewSession() + -- Connected expectation + self.mobileSession2 = mobile_session.MobileSession( + self.expectations_list, + self.mobileConnection) + + self.mobileSession2:StartService(7) + end + + -- Precondition 4: Register app2 + function Test:RegisterAppInterface_App2() + + --mobile side: RegisterAppInterface request + local CorIdRAI = self.mobileSession2:SendRPC("RegisterAppInterface", + { + syncMsgVersion = + { + majorVersion = 2, + minorVersion = 2, + }, + appName ="SPT2", + isMediaApplication = true, + languageDesired ="EN-US", + hmiDisplayLanguageDesired ="EN-US", + appHMIType = { "NAVIGATION"}, + appID ="2", + ttsName = + { + { + text ="SyncProxyTester2", + type ="TEXT", + }, + }, + vrSynonyms = + { + "vrSPT2", + } + }) + + --hmi side: expect BasicCommunication.OnAppRegistered request + EXPECT_HMINOTIFICATION("BasicCommunication.OnAppRegistered", + { + application = + { + appName = "SPT2" + } + }) + :Do(function(_,data) + appId2 = data.params.application.appID + end) + + --mobile side: RegisterAppInterface response + self.mobileSession2:ExpectResponse(CorIdRAI, { success = true, resultCode = "SUCCESS"}) + :Timeout(2000) + + self.mobileSession2:ExpectNotification("OnHMIStatus", {hmiLevel = "NONE", audioStreamingState = "NOT_AUDIBLE"}) + end + + -- Precondition 5: Activate an other media app to change app to BACKGROUND + function Test:Activate_Media_App2() + --HMI send ActivateApp request + local RequestId = self.hmiConnection:SendRequest("SDL.ActivateApp", { appID = appId2}) + EXPECT_HMIRESPONSE(RequestId) + :Do(function(_,data) + + if data.result.isSDLAllowed ~= true then + local RequestId = self.hmiConnection:SendRequest("SDL.GetUserFriendlyMessage", {language = "EN-US", messageCodes = {"DataConsent"}}) + EXPECT_HMIRESPONSE(RequestId,{result = {code = 0, method = "SDL.GetUserFriendlyMessage"}}) + :Do(function(_,data) + --hmi side: send request SDL.OnAllowSDLFunctionality + self.hmiConnection:SendNotification("SDL.OnAllowSDLFunctionality", {allowed = true, source = "GUI", device = {id = 1, name = "127.0.0.1"}}) + end) + + EXPECT_HMICALL("BasicCommunication.ActivateApp") + :Do(function(_,data) + self.hmiConnection:SendResponse(data.id,"BasicCommunication.ActivateApp", "SUCCESS", {}) + end) + :Times(2) + end + end) + + self.mobileSession2:ExpectNotification("OnHMIStatus", {hmiLevel = "FULL", audioStreamingState = "AUDIBLE"}) + :Timeout(12000) + + self.mobileSession:ExpectNotification("OnHMIStatus", {hmiLevel = "BACKGROUND", audioStreamingState = "NOT_AUDIBLE"}) + + end + + elseif + Test.isMediaApplication == false then + + -- Precondition for non-media app + function Test:Precondition_DeactivateToBackground() + --hmi side: sending BasicCommunication.OnAppDeactivated request + local cid = self.hmiConnection:SendNotification("BasicCommunication.OnAppDeactivated", + { + appID = self.applications["Test Application"], + reason = "GENERAL" + }) + + --mobile side: expect OnHMIStatus notification + EXPECT_NOTIFICATION("OnHMIStatus",{hmiLevel = "BACKGROUND", audioStreamingState = "NOT_AUDIBLE"}) + end + end + + -- Body + for i=1,#buttonName do + + --Precondition for this test case + Precondition_TC_SubscribeButton(self, buttonName[i]) + + strTestCaseName = "UnsubscribeButton_BACKGOUND_" .. tostring(buttonName[i]).."_SUCCESS" + TC_UnsubscribeButtonSUCCESS(self, buttonName[i], strTestCaseName) + end + + --End test case DifferentHMIlevel.3 + ----------------------------------------------------------------------------------------- + + --Write TEST_BLOCK_VII_End to ATF log + function Test:TEST_BLOCK_VII_End() + print("********************************************************************") + end + + --End test suit DifferentHMIlevel + + + +return Test + + diff --git a/test_scripts/API/ATF_UpdateTurnList.lua b/test_scripts/API/ATF_UpdateTurnList.lua new file mode 100644 index 0000000000..f2aaa76149 --- /dev/null +++ b/test_scripts/API/ATF_UpdateTurnList.lua @@ -0,0 +1,4921 @@ +Test = require('connecttest') +require('cardinalities') +local events = require('events') +local mobile_session = require('mobile_session') +local mobile = require('mobile_connection') +local tcp = require('tcp_connection') +local file_connection = require('file_connection') + +--------------------------------------------------------------------------------------------- +-----------------------------Required Shared Libraries--------------------------------------- +--------------------------------------------------------------------------------------------- + +require('user_modules/AppTypes') +local SDLConfig = require('user_modules/shared_testcases/SmartDeviceLinkConfigurations') +local commonSteps = require('user_modules/shared_testcases/commonSteps') +local commonTestCases = require('user_modules/shared_testcases/commonTestCases') +local commonFunctions = require('user_modules/shared_testcases/commonFunctions') +local policyTable = require('user_modules/shared_testcases/testCasesForPolicyTable') + +local imageValueOutUpperBound = string.rep("a",65536) +local imageValueOutOfPutFile = string.rep("a",256) +local imageValues = {"a", "icon.png","aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa.png"} +local storagePath = config.pathToSDL .. SDLConfig:GetValue("AppStorageFolder") .. "/" .. tostring(config.application1.registerAppInterfaceParams.appID .. "_" .. tostring(config.deviceMAC) .. "/") +local infoUpperBound = string.rep("a",1000) + + +--------------------------------------------------------------------------------------------- +-------------------------------------------Common functions------------------------------------- +--------------------------------------------------------------------------------------------- + +function setTurnList(size) + local temp = {} + for i = 1, size do + temp[i] = { + navigationText ="Text"..i, + turnIcon = + { + value ="icon.png", + imageType ="DYNAMIC", + } + } + end +return temp +end +function setExTurnList(size) + + if size == 1 then + local temp ={ + { + navigationText = + { + fieldText = "Text", + fieldName = "turnText" + }, + turnIcon = + { + value =storagePath.."icon.png", + imageType ="DYNAMIC", + } + } + } + --TODO: update to 'return temp' after resolving APPLINK-16052 + return nil + else + local temp = {} + for i = 1, size do + temp[i] = { + navigationText = + { + fieldText = "Text"..i, + fieldName = "turnText" + }, + turnIcon = + { + value =storagePath.."icon.png", + imageType ="DYNAMIC", + } + } + end + --TODO: update to 'return temp' after resolving APPLINK-16052 + return nil + end +end +function setMaxTurnList() + local temp = {} + for i = 1, 100 do + temp[i] = { + navigationText =tostring(i)..string.rep("v",500-string.len(tostring(i))), + turnIcon = + { + value ="aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa.png", + imageType ="DYNAMIC", + } + } + end +return temp +end +function setMaxExTurnList() + local temp = {} + for i = 1, 100 do + temp[i] = + { + navigationText = + { + fieldText = tostring(i)..string.rep("v",500-string.len(tostring(i))), + fieldName = "turnText" + }, + turnIcon = + { + value =storagePath.."aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa.png", + imageType ="DYNAMIC", + } + } + end + + --TODO: update to 'return temp' after resolving APPLINK-16052 + return nil +end +function updateTurnListAllParams() + local temp = { + turnList = + { + { + navigationText ="Text", + turnIcon = + { + value ="icon.png", + imageType ="DYNAMIC", + } + } + }, + softButtons = + { + { + type ="BOTH", + text ="Close", + image = + { + value ="icon.png", + imageType ="DYNAMIC", + }, + isHighlighted = true, + softButtonID = 111, + systemAction ="DEFAULT_ACTION", + } + } + } + return temp +end +function Test:updateTurnListInvalidData(paramsSend) + local cid = self.mobileSession:SendRPC("UpdateTurnList",paramsSend) + EXPECT_RESPONSE(cid, { success = false, resultCode = "INVALID_DATA" }) +end +function Test:updateTurnListSuccess(paramsSend) + --mobile side: send UpdateTurnList request + local CorIdUpdateTurnList = self.mobileSession:SendRPC("UpdateTurnList", paramsSend) + + --Set location for DYNAMIC image + if paramsSend.softButtons then + --If type is IMAGE -> text parameter is omitted and vice versa + if paramsSend.softButtons[1].type == "IMAGE" then + paramsSend.softButtons[1].text = nil + else + if paramsSend.softButtons[1].type == "TEXT" then + paramsSend.softButtons[1].image = nil + end + end + + --TODO: update after resolving APPLINK-16052 + -- if paramsSend.softButtons[1].image then + -- paramsSend.softButtons[1].image.value = storagePath..paramsSend.softButtons[1].image.value + -- end + if paramsSend.softButtons then + for i=1,#paramsSend.softButtons do + if paramsSend.softButtons[i].image then + paramsSend.softButtons[i].image = nil + end + end + end + end + + --hmi side: expect Navigation.UpdateTurnList request + EXPECT_HMICALL("Navigation.UpdateTurnList", + { + turnList = setExTurnList(1), + softButtons = paramsSend.softButtons + }) + :Do(function(_,data) + --hmi side: send Navigation.UpdateTurnList response + self.hmiConnection:SendResponse(data.id, data.method, "SUCCESS",{}) + end) + + --mobile side: expect UpdateTurnList response + EXPECT_RESPONSE(CorIdUpdateTurnList, { success = true, resultCode = "SUCCESS" }) +end + +--------------------------------------------------------------------------------------------- +-------------------------------------------Preconditions------------------------------------- +--------------------------------------------------------------------------------------------- + +--Print new line to separate Preconditions +commonFunctions:newTestCasesGroup("Preconditions") + +--Delete app_info.dat, logs and policy table +commonSteps:DeleteLogsFileAndPolicyTable() + +--1.Activation off application + function Test:ActivationApp() + + --hmi side: sending SDL.ActivateApp request + local RequestId = self.hmiConnection:SendRequest("SDL.ActivateApp", { appID = self.applications["Test Application"]}) + + --hmi side: expect SDL.ActivateApp response + EXPECT_HMIRESPONSE(RequestId) + :Do(function(_,data) + --In case when app is not allowed, it is needed to allow app + if + data.result.isSDLAllowed ~= true then + + --hmi side: sending SDL.GetUserFriendlyMessage request + local RequestId = self.hmiConnection:SendRequest("SDL.GetUserFriendlyMessage", + {language = "EN-US", messageCodes = {"DataConsent"}}) + + --hmi side: expect SDL.GetUserFriendlyMessage response + --TODO: Update after resolving APPLINK-16094 EXPECT_HMIRESPONSE(RequestId,{result = {code = 0, method = "SDL.GetUserFriendlyMessage"}}) + EXPECT_HMIRESPONSE(RequestId) + :Do(function(_,data) + + --hmi side: send request SDL.OnAllowSDLFunctionality + self.hmiConnection:SendNotification("SDL.OnAllowSDLFunctionality", + {allowed = true, source = "GUI", device = {id = config.deviceMAC, name = "127.0.0.1"}}) + + --hmi side: expect BasicCommunication.ActivateApp request + EXPECT_HMICALL("BasicCommunication.ActivateApp") + :Do(function(_,data) + + --hmi side: sending BasicCommunication.ActivateApp response + self.hmiConnection:SendResponse(data.id,"BasicCommunication.ActivateApp", "SUCCESS", {}) + + end) + :Times(2) + + end) + + end + end) + + --mobile side: expect OnHMIStatus notification + EXPECT_NOTIFICATION("OnHMIStatus", {hmiLevel = "FULL", systemContext = "MAIN"}) + + end + + + + --2.Update EnablePolicy value to "false" in .ini file: Currently APPLINK-13101 is resolved, but with default EnablePolicy = true all TCs are failing in script. So below function is used to set EnablePolicy = false in .ini file. + commonFunctions:SetValuesInIniFile("EnablePolicy%s?=%s-[%w%d,-]-%s-\n", "EnablePolicy", false ) + + + --3.Update policy to allow request + --TODO: Will be updated after policy flow implementation + policyTable:Precondition_updatePolicy_By_overwriting_preloaded_pt("files/PTU_WithOutUpdateTurnListRPC.json", "files/PTU_ForUpdateTurnListSoftButtonFalse.json", "files/PTU_ForUpdateTurnListSoftButtonTrue.json") + + + --4.PutFiles ("a", "icon.png", "action.png", strMaxLengthFileName255) + commonSteps:PutFile("PutFile_icon.png", "icon.png") + commonSteps:PutFile("PutFile_icon.png", "action.png") + + for i=1,#imageValues do + Test["Precondition_" .. "PutImage" .. tostring(imageValues[i])] = function(self) + + --mobile request + local CorIdPutFile = self.mobileSession:SendRPC( + "PutFile", + { + syncFileName =imageValues[i], + fileType = "GRAPHIC_PNG", + persistentFile = false, + systemFile = false, + }, "files/icon.png") + + --mobile response + EXPECT_RESPONSE(CorIdPutFile, { success = true, resultCode = "SUCCESS"}) + :Timeout(12000) + + end + end + + ----------------------------------------------------------------------------------------- + +--[[TODO debbug after resolving APPLINK-13101 + --Begin Precondition.6 + --Description: + function Test:Precondition_AllowedUpdateTurnList() + --hmi side: sending SDL.GetURLS request + local RequestIdGetURLS = self.hmiConnection:SendRequest("SDL.GetURLS", { service = 7 }) + + --hmi side: expect SDL.GetURLS response from HMI + EXPECT_HMIRESPONSE(RequestIdGetURLS,{result = {code = 0, method = "SDL.GetURLS", urls = {{url = "http://policies.telematics.ford.com/api/policies"}}}}) + :Do(function(_,data) + --print("SDL.GetURLS response is received") + --hmi side: sending BasicCommunication.OnSystemRequest request to SDL + self.hmiConnection:SendNotification("BasicCommunication.OnSystemRequest", + { + requestType = "PROPRIETARY", + fileName = "filename" + } + ) + --mobile side: expect OnSystemRequest notification + EXPECT_NOTIFICATION("OnSystemRequest", { requestType = "PROPRIETARY" }) + :Do(function(_,data) + --print("OnSystemRequest notification is received") + --mobile side: sending SystemRequest request + local CorIdSystemRequest = self.mobileSession:SendRPC("SystemRequest", + { + fileName = "PolicyTableUpdate", + requestType = "PROPRIETARY" + }, + "files/PTU_ForUpdateTurnListSoftButtonTrue.json") + + local systemRequestId + --hmi side: expect SystemRequest request + EXPECT_HMICALL("BasicCommunication.SystemRequest") + :Do(function(_,data) + systemRequestId = data.id + --print("BasicCommunication.SystemRequest is received") + + --hmi side: sending BasicCommunication.OnSystemRequest request to SDL + self.hmiConnection:SendNotification("SDL.OnReceivedPolicyUpdate", + { + policyfile = "/tmp/fs/mp/images/ivsu_cache/PolicyTableUpdate" + } + ) + function to_run() + --hmi side: sending SystemRequest response + self.hmiConnection:SendResponse(systemRequestId,"BasicCommunication.SystemRequest", "SUCCESS", {}) + end + + RUN_AFTER(to_run, 500) + end) + + --hmi side: expect SDL.OnStatusUpdate + EXPECT_HMINOTIFICATION("SDL.OnStatusUpdate", { status = "UP_TO_DATE"}) + :Do(function(_,data) + --print("SDL.OnStatusUpdate is received") + end) + :Timeout(2000) + + --mobile side: expect SystemRequest response + EXPECT_RESPONSE(CorIdSystemRequest, { success = true, resultCode = "SUCCESS"}) + :Do(function(_,data) + --print("SystemRequest is received") + --hmi side: sending SDL.GetUserFriendlyMessage request to SDL + local RequestIdGetUserFriendlyMessage = self.hmiConnection:SendRequest("SDL.GetUserFriendlyMessage", {language = "EN-US", messageCodes = {"StatusUpToDate"}}) + + --hmi side: expect SDL.GetUserFriendlyMessage response + EXPECT_HMIRESPONSE(RequestIdGetUserFriendlyMessage,{result = {code = 0, method = "SDL.GetUserFriendlyMessage", messages = {{line1 = "Up-To-Date", messageCode = "StatusUpToDate", textBody = "Up-To-Date"}}}}) + :Do(function(_,data) + --print("SDL.GetUserFriendlyMessage is received") + + --hmi side: sending SDL.GetListOfPermissions request to SDL + local RequestIdGetListOfPermissions = self.hmiConnection:SendRequest("SDL.GetListOfPermissions", {appID = self.applications["Test Application"]}) + + -- hmi side: expect SDL.GetListOfPermissions response + EXPECT_HMIRESPONSE(RequestIdGetListOfPermissions,{result = {code = 0, method = "SDL.GetListOfPermissions", allowedFunctions = {{ id = 193465391, name = "New"}}}}) + :Do(function(_,data) + --print("SDL.GetListOfPermissions response is received") + + --hmi side: sending SDL.OnAppPermissionConsent + self.hmiConnection:SendNotification("SDL.OnAppPermissionConsent", { appID = self.applications["Test Application"], consentedFunctions = {{ allowed = false, id = 193465391, name = "New"}}, source = "GUI"}) + end) + EXPECT_NOTIFICATION("OnPermissionsChange") + end) + end) + :Timeout(2000) + + end) + end) + end + --End Precondition.6 +]] +--------------------------------------------------------------------------------------------- +-----------------------------------------I TEST BLOCK---------------------------------------- +--CommonRequestCheck: Check of mandatory/conditional request's parameters (mobile protocol)-- +--------------------------------------------------------------------------------------------- + + --Begin Test suit CommonRequestCheck + + + --Print new line to separate test suite + commonFunctions:newTestCasesGroup("Test Suite For CommonRequestCheck") + + --Description: + -- request with all parameters + -- request with only mandatory parameters + -- request with all combinations of conditional-mandatory parameters (if exist) + -- request with one by one conditional parameters (each case - one conditional parameter) + -- request with missing mandatory parameters one by one (each case - missing one mandatory parameter) + -- request with all parameters are missing + -- request with fake parameters (fake - not from protocol, from another request) + -- request is sent with invalid JSON structure + -- different conditions of correlationID parameter (invalid, several the same etc.) + + --Begin Test case CommonRequestCheck.1 + --Description: This test is intended to check positive cases and when all parameters are in boundary conditions + + --Requirement id in JAMA/or Jira ID: SDLAQ-CRS-129 + + --Verification criteria: UpdateTurnList updates the turnList's data on persistant display which contains navigation information about the route's turnList. + function Test:UpdateTurnList_Positive() + self:updateTurnListSuccess(updateTurnListAllParams()) + end + --End Test case CommonRequestCheck.1 + + ----------------------------------------------------------------------------------------- + + --Begin Test case CommonRequestCheck.2 + --Description: This test is intended to check processing requests with only mandatory parameters + + --Requirement id in JAMA/or Jira ID: SDLAQ-CRS-129 + + --Verification criteria: UpdateTurnList updates the turnList's data on persistant display which contains navigation information about the route's turnList. + + --Begin Test case CommonRequestCheck.2.1 + --Description: Check request with turnList only + function Test:UpdateTurnList_TurnListOnly() + local paramsSend = updateTurnListAllParams() + paramsSend.softButtons = nil + + --mobile side: send UpdateTurnList request + local CorIdUpdateTurnList = self.mobileSession:SendRPC("UpdateTurnList", paramsSend) + + --hmi side: expect Navigation.UpdateTurnList request + EXPECT_HMICALL("Navigation.UpdateTurnList", + { + turnList = setExTurnList(1) + }) + :Do(function(_,data) + --hmi side: send Navigation.UpdateTurnList response + self.hmiConnection:SendResponse(data.id, data.method, "SUCCESS",{}) + end) + + --mobile side: expect UpdateTurnList response + EXPECT_RESPONSE(CorIdUpdateTurnList, { success = true, resultCode = "SUCCESS" }) + end + --End Test case CommonRequestCheck.2.1 + + ----------------------------------------------------------------------------------------- + + --Begin Test case CommonRequestCheck.2.2 + --Description: Check request with softButton only + function Test:UpdateTurnList_SoftButtonOnly() + local paramsSend = updateTurnListAllParams() + paramsSend.turnList = nil + + --mobile side: send UpdateTurnList request + local CorIdUpdateTurnList = self.mobileSession:SendRPC("UpdateTurnList", paramsSend) + + --Set location for DYNAMIC image + --TODO: update after resolving APPLINK-16052 + -- paramsSend.softButtons[1].image.value = storagePath..paramsSend.softButtons[1].image.value + paramsSend.softButtons[1].image = nil + + --hmi side: expect Navigation.UpdateTurnList request + EXPECT_HMICALL("Navigation.UpdateTurnList", + { + softButtons = paramsSend.softButtons + }) + :Do(function(_,data) + --hmi side: send Navigation.UpdateTurnList response + self.hmiConnection:SendResponse(data.id, data.method, "SUCCESS",{}) + end) + + --mobile side: expect UpdateTurnList response + EXPECT_RESPONSE(CorIdUpdateTurnList, { success = true, resultCode = "SUCCESS" }) + end + --End Test case CommonRequestCheck.2.2 + --End Test case CommonRequestCheck.2 + + ----------------------------------------------------------------------------------------- + + --Begin Test case CommonRequestCheck.3 + --Description: This test is intended to check processing requests without mandatory parameters + + --Requirement id in JAMA/or Jira ID: SDLAQ-CRS-686 + + --Verification criteria: + --The request without "turnList" and "softButtons" is sent, INVALID_DATA response code is returned. + --The request without "navigationText" and "turnIcon" is sent, INVALID_DATA response code is returned. + + --Begin Test case CommonRequestCheck.3.1 + --Description: Request without any mandatory parameter (INVALID_DATA) + function Test:UpdateTurnList_AllParamsMissing() + self:updateTurnListInvalidData({}) + end + --End Test case CommonRequestCheck.3.1 + + ----------------------------------------------------------------------------------------- + + --Begin Test case CommonRequestCheck.3.2 + --Description: navigationText and turnIcon is missing + function Test:UpdateTurnList_NavigationTextAndTurnIconMissing() + local paramsSend = updateTurnListAllParams() + paramsSend.turnList[1].navigationText = nil + paramsSend.turnList[1].turnIcon = nil + self:updateTurnListInvalidData(paramsSend) + end + --Begin Test case CommonRequestCheck.3.2 + + ----------------------------------------------------------------------------------------- + + --Begin Test case CommonRequestCheck.3.3 + --Description: navigationText is missing + function Test:UpdateTurnList_NavigationTextMissing() + local paramsSend = updateTurnListAllParams() + paramsSend.turnList[1].navigationText = nil + + --mobile side: send UpdateTurnList request + local CorIdUpdateTurnList = self.mobileSession:SendRPC("UpdateTurnList", paramsSend) + + --remove navigationText in expected request + local exTurnList = setExTurnList(1) + --TODO: update after resolving APPLINK-16052 + -- exTurnList[1].navigationText = nil + + --Set location for DYNAMIC image + --TODO: update after resolving APPLINK-16052 + -- paramsSend.softButtons[1].image.value = storagePath..paramsSend.softButtons[1].image.value + paramsSend.softButtons[1].image = nil + + --hmi side: expect Navigation.UpdateTurnList request + EXPECT_HMICALL("Navigation.UpdateTurnList", + { + turnList = exTurnList, + softButtons = paramsSend.softButtons + }) + :Do(function(_,data) + --hmi side: send Navigation.UpdateTurnList response + self.hmiConnection:SendResponse(data.id, data.method, "SUCCESS",{}) + end) + + --mobile side: expect UpdateTurnList response + EXPECT_RESPONSE(CorIdUpdateTurnList, { success = true, resultCode = "SUCCESS" }) + end + --Begin Test case CommonRequestCheck.3.3 + + ----------------------------------------------------------------------------------------- + + --Begin Test case CommonRequestCheck.3.4 + --Description: turnIcon is missing + function Test:UpdateTurnList_TurnIconMissing() + local paramsSend = updateTurnListAllParams() + paramsSend.turnList[1].turnIcon = nil + + --mobile side: send UpdateTurnList request + local CorIdUpdateTurnList = self.mobileSession:SendRPC("UpdateTurnList", paramsSend) + + --remove turnIcon in expected request + local exTurnList = setExTurnList(1) + --TODO: update after resolving APPLINK-16052 + -- exTurnList[1].turnIcon = nil + + --Set location for DYNAMIC image + --TODO: update after resolving APPLINK-16052 + -- paramsSend.softButtons[1].image.value = storagePath..paramsSend.softButtons[1].image.value + paramsSend.softButtons[1].image = nil + + --hmi side: expect Navigation.UpdateTurnList request + EXPECT_HMICALL("Navigation.UpdateTurnList", + { + turnList = exTurnList, + softButtons = paramsSend.softButtons + }) + :Do(function(_,data) + --hmi side: send Navigation.UpdateTurnList response + self.hmiConnection:SendResponse(data.id, data.method, "SUCCESS",{}) + end) + + --mobile side: expect UpdateTurnList response + EXPECT_RESPONSE(CorIdUpdateTurnList, { success = true, resultCode = "SUCCESS" }) + end + --Begin Test case CommonRequestCheck.3.4 + + ----------------------------------------------------------------------------------------- + + --Begin Test case CommonRequestCheck.3.5 + --Description: turnIcon value is missing + function Test:UpdateTurnList_TurnIconValueMissing() + local paramsSend = updateTurnListAllParams() + paramsSend.turnList[1].turnIcon.value = nil + self:updateTurnListInvalidData(paramsSend) + end + --Begin Test case CommonRequestCheck.3.5 + + ----------------------------------------------------------------------------------------- + + --Begin Test case CommonRequestCheck.3.6 + --Description: turnIcon imageType is missing + function Test:UpdateTurnList_TurnIconImageTypeMissing() + local paramsSend = updateTurnListAllParams() + paramsSend.turnList[1].turnIcon.imageType = nil + self:updateTurnListInvalidData(paramsSend) + end + --Begin Test case CommonRequestCheck.3.6 + + ----------------------------------------------------------------------------------------- + + --Begin Test case CommonRequestCheck.3.7 + --Description: SoftButtons: type of SoftButton is missing + function Test:UpdateTurnList_SoftButtonsTypeMissing() + local paramsSend = updateTurnListAllParams() + paramsSend.softButtons[1].type = nil + self:updateTurnListInvalidData(paramsSend) + end + --Begin Test case CommonRequestCheck.3.7 + + ----------------------------------------------------------------------------------------- + + --Begin Test case CommonRequestCheck.3.8 + --Description:SoftButtons: softButtonID missing + function Test:UpdateTurnList_SoftButtonsIDMissing() + local paramsSend = updateTurnListAllParams() + paramsSend.softButtons[1].softButtonID = nil + self:updateTurnListInvalidData(paramsSend) + end + --Begin Test case CommonRequestCheck.3.8 + + ----------------------------------------------------------------------------------------- + + --Begin Test case CommonRequestCheck.3.9 + --Description:SoftButtons: type = IMAGE; image value is missing + function Test:UpdateTurnList_SoftButtonIMAGEValueMissing() + local paramsSend = updateTurnListAllParams() + paramsSend.softButtons[1].type = "IMAGE" + paramsSend.softButtons[1].image.value = nil + self:updateTurnListInvalidData(paramsSend) + end + --Begin Test case CommonRequestCheck.3.9 + + ----------------------------------------------------------------------------------------- + + --Begin Test case CommonRequestCheck.3.10 + --Description: SoftButtons: type = IMAGE; image type is missing + function Test:UpdateTurnList_SoftButtonIMAGETypeMissing() + local paramsSend = updateTurnListAllParams() + paramsSend.softButtons[1].type = "IMAGE" + paramsSend.softButtons[1].image.imageType = nil + self:updateTurnListInvalidData(paramsSend) + end + --Begin Test case CommonRequestCheck.3.10 + + ----------------------------------------------------------------------------------------- + + --Begin Test case CommonRequestCheck.3.11 + --Description: SoftButtons: type = TEXT; without text and with image + function Test:UpdateTurnList_SoftButtonsTEXTWithoutText() + local paramsSend = updateTurnListAllParams() + paramsSend.softButtons[1].type = "TEXT" + paramsSend.softButtons[1].text = nil + self:updateTurnListInvalidData(paramsSend) + end + --End Test case CommonRequestCheck.3.11 + + ----------------------------------------------------------------------------------------- + + --Begin Test case CommonRequestCheck.3.12 + --Description:SoftButtons: type = BOTH; image value is missing + function Test:UpdateTurnList_SoftButtonBOTHValueMissing() + local paramsSend = updateTurnListAllParams() + paramsSend.softButtons[1].type = "BOTH" + paramsSend.softButtons[1].image.value = nil + self:updateTurnListInvalidData(paramsSend) + end + --Begin Test case CommonRequestCheck.3.12 + + ----------------------------------------------------------------------------------------- + + --Begin Test case CommonRequestCheck.3.13 + --Description: SoftButtons: type = BOTH; image type is missing + function Test:UpdateTurnList_SoftButtonBOTHTypeMissing() + local paramsSend = updateTurnListAllParams() + paramsSend.softButtons[1].type = "BOTH" + paramsSend.softButtons[1].image.imageType = nil + self:updateTurnListInvalidData(paramsSend) + end + --Begin Test case CommonRequestCheck.3.13 + + ----------------------------------------------------------------------------------------- + + --Begin Test case CommonRequestCheck.3.14 + --Description: SoftButtons: type = BOTH; without text and with image + function Test:UpdateTurnList_SoftButtonsBOTHWithoutText() + local paramsSend = updateTurnListAllParams() + paramsSend.softButtons[1].type = "BOTH" + paramsSend.softButtons[1].text = nil + + self:updateTurnListInvalidData(paramsSend) + end + --End Test case CommonRequestCheck.3.14 + + ----------------------------------------------------------------------------------------- + + --Begin Test case CommonRequestCheck.3.15 + --Description: SoftButtons: systemAction is missing + function Test:UpdateTurnList_SoftButtonsSystemActionMissing() + local paramsSend = updateTurnListAllParams() + paramsSend.softButtons[1].systemAction = nil + + self:updateTurnListSuccess(paramsSend) + end + --End Test case CommonRequestCheck.3.15 + + ----------------------------------------------------------------------------------------- + + --Begin Test case CommonRequestCheck.3.16 + --Description: SoftButtons: type = TEXT, isHighlighted missing + function Test:UpdateTurnList_SoftButtonsTEXTisHighlightedMissing() + local paramsSend = updateTurnListAllParams() + paramsSend.softButtons[1].type = "TEXT" + paramsSend.softButtons[1].isHighlighted = nil + + self:updateTurnListSuccess(paramsSend) + end + --End Test case CommonRequestCheck.3.16 + + ----------------------------------------------------------------------------------------- + + --Begin Test case CommonRequestCheck.3.17 + --Description: SoftButtons: type = IMAGE, isHighlighted missing + function Test:UpdateTurnList_SoftButtonsIMAGEisHighlightedMissing() + local paramsSend = updateTurnListAllParams() + paramsSend.softButtons[1].type = "IMAGE" + paramsSend.softButtons[1].isHighlighted = nil + + self:updateTurnListSuccess(paramsSend) + end + --End Test case CommonRequestCheck.3.17 + + ----------------------------------------------------------------------------------------- + + --Begin Test case CommonRequestCheck.3.18 + --Description: SoftButtons: type = BOTH, isHighlighted missing + function Test:UpdateTurnList_SoftButtonsIMAGEisHighlightedMissing() + local paramsSend = updateTurnListAllParams() + paramsSend.softButtons[1].type = "BOTH" + paramsSend.softButtons[1].isHighlighted = nil + + self:updateTurnListSuccess(paramsSend) + end + --End Test case CommonRequestCheck.3.18 + + --End Test case CommonRequestCheck.3 + + ----------------------------------------------------------------------------------------- + + --Begin Test case CommonRequestCheck.4 + --Description: Check processing request with different fake parameters + + --Requirement id in JAMA/or Jira ID: APPLINK-4518 + + --Verification criteria: According to xml tests by Ford team all fake params should be ignored by SDL + + --Begin Test case CommonRequestCheck4.1 + --Description: With fake parameters + function Test:UpdateTurnList_FakeParams() + local paramsSend = updateTurnListAllParams() + paramsSend.turnList[1]["fakeParam"] = "fakeParam" + paramsSend.softButtons[1]["fakeParam"] = "fakeParam" + + --mobile side: send UpdateTurnList request + local CorIdUpdateTurnList = self.mobileSession:SendRPC("UpdateTurnList", paramsSend) + + --fake param is removed + paramsSend.turnList[1]["fakeParam"] = nil + paramsSend.softButtons[1]["fakeParam"] = nil + + --Set location for DYNAMIC image + --TODO: update after resolving APPLINK-16052 + -- paramsSend.softButtons[1].image.value = storagePath..paramsSend.softButtons[1].image.value + paramsSend.softButtons[1].image = nil + + --hmi side: expect Navigation.UpdateTurnList request + EXPECT_HMICALL("Navigation.UpdateTurnList", + { + turnList = setExTurnList(1), + softButtons = paramsSend.softButtons + }) + :Do(function(_,data) + --hmi side: send Navigation.UpdateTurnList response + self.hmiConnection:SendResponse(data.id, data.method, "SUCCESS",{}) + end) + + --mobile side: expect UpdateTurnList response + EXPECT_RESPONSE(CorIdUpdateTurnList, { success = true, resultCode = "SUCCESS" }) + end + --End Test case CommonRequestCheck4.1 + + ----------------------------------------------------------------------------------------- + + --Begin Test case CommonRequestCheck.4.2 + --Description: Parameters from another request + function Test:UpdateTurnList_ParamsAnotherRequest() + local paramsSend = updateTurnListAllParams() + paramsSend["ttsChunk"] = { + { + text ="SpeakFirst", + type ="TEXT", + }, + { + text ="SpeakSecond", + type ="TEXT", + }, + } + + --mobile side: send UpdateTurnList request + local CorIdUpdateTurnList = self.mobileSession:SendRPC("UpdateTurnList", paramsSend) + + --param from another request is removed + paramsSend["ttsChunk"] = nil + + --Set location for DYNAMIC image + --TODO: update after resolving APPLINK-16052 + -- paramsSend.softButtons[1].image.value = storagePath..paramsSend.softButtons[1].image.value + paramsSend.softButtons[1].image = nil + + --hmi side: expect Navigation.UpdateTurnList request + EXPECT_HMICALL("Navigation.UpdateTurnList", + { + turnList = setExTurnList(1), + softButtons = paramsSend.softButtons + }) + :Do(function(_,data) + --hmi side: send Navigation.UpdateTurnList response + self.hmiConnection:SendResponse(data.id, data.method, "SUCCESS",{}) + end) + + --mobile side: expect UpdateTurnList response + EXPECT_RESPONSE(CorIdUpdateTurnList, { success = true, resultCode = "SUCCESS" }) + end + --End Test case CommonRequestCheck4.2 + --End Test case CommonRequestCheck.4 + + ----------------------------------------------------------------------------------------- + + --Begin Test case CommonRequestCheck.5 + --Description: Check processing request with invalid JSON syntax + + --Requirement id in JAMA/or Jira ID: SDLAQ-CRS-686 + + --Verification criteria: The request with wrong JSON syntax is sent, the response comes with INVALID_DATA result code. + function Test:UpdateTurnList_InvalidJSON() + self.mobileSession.correlationId = self.mobileSession.correlationId + 1 + + local msg = + { + serviceType = 7, + frameInfo = 0, + rpcType = 0, + rpcFunctionId = 29, + rpcCorrelationId = self.mobileSession.correlationId, + --< See MOBILE_API.xml +--local allVehicleData = {"gps", "speed", "rpm", "fuelLevel", "fuelLevel_State", "instantFuelConsumption", "externalTemperature", "prndl", "tirePressure", "odometer", "beltStatus", "bodyInformation", "deviceStatus", "driverBraking", "wiperStatus", "headLampStatus", "engineTorque", "accPedalPosition", "steeringWheelAngle", "eCallInfo", "airbagStatus", "emergencyEvent", "clusterModeStatus", "myKey"} +--Genivi Data items +local allVehicleData = {"gps", "speed", "rpm", "fuelLevel", "fuelLevel_State", "instantFuelConsumption", "externalTemperature", "prndl", "tirePressure", "odometer", "beltStatus", "bodyInformation", "deviceStatus", "driverBraking", "wiperStatus", "headLampStatus", "engineTorque", "accPedalPosition", "steeringWheelAngle"} +local vehicleData = {"gps"} +local infoMessageValue = string.rep("a",1000) + +function DelayedExp(time) + local event = events.Event() + event.matches = function(self, e) return self == e end + EXPECT_EVENT(event, "Delayed event") + :Timeout(time+1000) + RUN_AFTER(function() + RAISE_EVENT(event, event) + end, time) +end + + +function setUSVDRequest(paramsSend) + local temp = {} + for i = 1, #paramsSend do + temp[paramsSend[i]] = true + end + return temp +end +function setUSVDResponse(paramsSend, vehicleDataResultCode) + local temp = {} + local vehicleDataResultCodeValue = "" + + if vehicleDataResultCode ~= nil then + vehicleDataResultCodeValue = vehicleDataResultCode + else + vehicleDataResultCodeValue = "SUCCESS" + end + + for i = 1, #paramsSend do + if paramsSend[i] == "clusterModeStatus" then + temp["clusterModes"] = { + resultCode = vehicleDataResultCodeValue, + dataType = USVDValues[paramsSend[i]] + } + else + temp[paramsSend[i]] = { + resultCode = vehicleDataResultCodeValue, + dataType = USVDValues[paramsSend[i]] + } + end + end + return temp +end +function createSuccessExpectedResult(response, infoMessage) + response["success"] = true + response["resultCode"] = "SUCCESS" + + if info ~= nil then + response["info"] = infoMessage + end + + return response +end +function createExpectedResult(bSuccess, sResultCode, infoMessage, response) + response["success"] = bSuccess + response["resultCode"] = sResultCode + + if infoMessage ~= nil then + response["info"] = infoMessage + end + + return response +end +function Test:unsubscribeVehicleDataSuccess(paramsSend, infoMessage) + local request = setUSVDRequest(paramsSend) + local response = setUSVDResponse(paramsSend) + + if infoMessage ~= nil then + response["info"] = infoMessage + end + + --mobile side: sending UnsubscribeVehicleData request + local cid = self.mobileSession:SendRPC("UnsubscribeVehicleData",request) + + --hmi side: expect UnsubscribeVehicleData request + EXPECT_HMICALL("VehicleInfo.UnsubscribeVehicleData",request) + :Do(function(_,data) + --hmi side: sending VehicleInfo.UnsubscribeVehicleData response + self.hmiConnection:SendResponse(data.id, data.method, "SUCCESS", response) + end) + + + local expectedResult = createSuccessExpectedResult(response, infoMessage) + + --mobile side: expect UnsubscribeVehicleData response + EXPECT_RESPONSE(cid, expectedResult) + + --mobile side: expect OnHashChange notification + EXPECT_NOTIFICATION("OnHashChange") + + DelayedExp(2000) +end +function Test:unsubscribeVehicleDataInvalidData(paramsSend) + --mobile side: sending UnsubscribeVehicleData request + local cid = self.mobileSession:SendRPC("UnsubscribeVehicleData",paramsSend) + + --mobile side: expected UnsubscribeVehicleData response + EXPECT_RESPONSE(cid, { success = false, resultCode = "INVALID_DATA" }) + + --mobile side: expect OnHashChange notification + EXPECT_NOTIFICATION("OnHashChange") + :Times(0) +end +function Test:subscribeVehicleDataSuccess(paramsSend) + local request = setUSVDRequest(paramsSend) + local response = setUSVDResponse(paramsSend) + + --mobile side: sending SubscribeVehicleData request + local cid = self.mobileSession:SendRPC("SubscribeVehicleData",request) + + --hmi side: expect SubscribeVehicleData request + EXPECT_HMICALL("VehicleInfo.SubscribeVehicleData",request) + :Do(function(_,data) + --hmi side: sending VehicleInfo.SubscribeVehicleData response + self.hmiConnection:SendResponse(data.id, data.method, "SUCCESS", response) + end) + + local expectedResult = createSuccessExpectedResult(response) + + --mobile side: expect SubscribeVehicleData response + --EXPECT_RESPONSE(cid, expectedResult) + self.mobileSession:ExpectResponse(cid, { success = true, resultCode = "SUCCESS" }) + + --mobile side: expect OnHashChange notification + EXPECT_NOTIFICATION("OnHashChange") +end +function Test:unsubscribeVehicleDataIgnored(paramsSend, bSuccess) + -- UnsubscribeVehicleData previously subscribed + local request = setUSVDRequest(paramsSend) + local response = setUSVDResponse(paramsSend, "DATA_NOT_SUBSCRIBED") + local messageValue = "Already subscribed on some provided VehicleData." + + --mobile side: sending UnsubscribeVehicleData request + local cid = self.mobileSession:SendRPC("UnsubscribeVehicleData",request) + + local expectedResult = createExpectedResult(bSuccess, "IGNORED", messageValue, response) + + --mobile side: expect UnsubscribeVehicleData response + EXPECT_RESPONSE(cid, expectedResult) + + --mobile side: expect OnHashChange notification + EXPECT_NOTIFICATION("OnHashChange") + :Times(0) + + DelayedExp(2000) +end + +--------------------------------------------------------------------------------------------- +-------------------------------------------PreConditions------------------------------------- +--------------------------------------------------------------------------------------------- + --Begin PreCondition.1 + --Description: Activation application + function Test:ActivationApp() + --hmi side: sending SDL.ActivateApp request + local RequestId = self.hmiConnection:SendRequest("SDL.ActivateApp", { appID = self.applications["Test Application"]}) + EXPECT_HMIRESPONSE(RequestId) + :Do(function(_,data) + if + data.result.isSDLAllowed ~= true then + local RequestId = self.hmiConnection:SendRequest("SDL.GetUserFriendlyMessage", {language = "EN-US", messageCodes = {"DataConsent"}}) + + --hmi side: expect SDL.GetUserFriendlyMessage message response + --TODO: Update after resolving APPLINK-16094 EXPECT_HMIRESPONSE(RequestId,{result = {code = 0, method = "SDL.GetUserFriendlyMessage"}}) + EXPECT_HMIRESPONSE(RequestId) + :Do(function(_,data) + --hmi side: send request SDL.OnAllowSDLFunctionality + self.hmiConnection:SendNotification("SDL.OnAllowSDLFunctionality", {allowed = true, source = "GUI", device = {id = config.deviceMAC, name = "127.0.0.1"}}) + + --hmi side: expect BasicCommunication.ActivateApp request + EXPECT_HMICALL("BasicCommunication.ActivateApp") + :Do(function(_,data) + --hmi side: sending BasicCommunication.ActivateApp response + self.hmiConnection:SendResponse(data.id,"BasicCommunication.ActivateApp", "SUCCESS", {}) + end) + :Times(AnyNumber()) + end) + + end + end) + + --mobile side: expect notification + EXPECT_NOTIFICATION("OnHMIStatus", {hmiLevel = "FULL"}) + end + --End PreCondition.1 + + ----------------------------------------------------------------------------------------- +--[[TODO: check after ATF defect APPLINK-13101 is resolved + --Begin PreCondition.2 + --Description: Updated policy to allowed all vehicle data + function Test:PreCondition_PolicyUpdate() + --hmi side: sending SDL.GetURLS request + local RequestIdGetURLS = self.hmiConnection:SendRequest("SDL.GetURLS", { service = 7 }) + + --hmi side: expect SDL.GetURLS response from HMI + EXPECT_HMIRESPONSE(RequestIdGetURLS,{result = {code = 0, method = "SDL.GetURLS", urls = {{url = "http://policies.telematics.ford.com/api/policies"}}}}) + :Do(function(_,data) + --print("SDL.GetURLS response is received") + --hmi side: sending BasicCommunication.OnSystemRequest request to SDL + self.hmiConnection:SendNotification("BasicCommunication.OnSystemRequest", + { + requestType = "PROPRIETARY", + fileName = "filename" + } + ) + --mobile side: expect OnSystemRequest notification + EXPECT_NOTIFICATION("OnSystemRequest", { requestType = "PROPRIETARY" }) + :Do(function(_,data) + --print("OnSystemRequest notification is received") + --mobile side: sending SystemRequest request + local CorIdSystemRequest = self.mobileSession:SendRPC("SystemRequest", + { + fileName = "PolicyTableUpdate", + requestType = "PROPRIETARY" + }, + "files/PTU_AllowedUSVDAllVehicleData.json") + + local systemRequestId + --hmi side: expect SystemRequest request + EXPECT_HMICALL("BasicCommunication.SystemRequest") + :Do(function(_,data) + systemRequestId = data.id + --print("BasicCommunication.SystemRequest is received") + + --hmi side: sending BasicCommunication.OnSystemRequest request to SDL + self.hmiConnection:SendNotification("SDL.OnReceivedPolicyUpdate", + { + policyfile = "/tmp/fs/mp/images/ivsu_cache/PolicyTableUpdate" + } + ) + function to_run() + --hmi side: sending SystemRequest response + self.hmiConnection:SendResponse(systemRequestId,"BasicCommunication.SystemRequest", "SUCCESS", {}) + end + + RUN_AFTER(to_run, 500) + end) + + --hmi side: expect SDL.OnStatusUpdate + EXPECT_HMINOTIFICATION("SDL.OnStatusUpdate", { status = "UP_TO_DATE"}) + :Do(function(_,data) + --print("SDL.OnStatusUpdate is received") + + --hmi side: expect SDL.OnAppPermissionChanged + + + end) + :Timeout(2000) + + --mobile side: expect SystemRequest response + EXPECT_RESPONSE(CorIdSystemRequest, { success = true, resultCode = "SUCCESS"}) + :Do(function(_,data) + --print("SystemRequest is received") + --hmi side: sending SDL.GetUserFriendlyMessage request to SDL + local RequestIdGetUserFriendlyMessage = self.hmiConnection:SendRequest("SDL.GetUserFriendlyMessage", {language = "EN-US", messageCodes = {"StatusUpToDate"}}) + + --hmi side: expect SDL.GetUserFriendlyMessage response + EXPECT_HMIRESPONSE(RequestIdGetUserFriendlyMessage,{result = {code = 0, method = "SDL.GetUserFriendlyMessage", messages = {{line1 = "Up-To-Date", messageCode = "StatusUpToDate", textBody = "Up-To-Date"}}}}) + :Do(function(_,data) + --print("SDL.GetUserFriendlyMessage is received") + + --hmi side: sending SDL.GetListOfPermissions request to SDL + local RequestIdGetListOfPermissions = self.hmiConnection:SendRequest("SDL.GetListOfPermissions", {appID = self.applications["Test Application"]}) + + -- hmi side: expect SDL.GetListOfPermissions response + EXPECT_HMIRESPONSE(RequestIdGetListOfPermissions,{result = {code = 0, method = "SDL.GetListOfPermissions", allowedFunctions = {{ id = 193465391, name = "New"}}}}) + :Do(function(_,data) + --print("SDL.GetListOfPermissions response is received") + + --hmi side: sending SDL.OnAppPermissionConsent + self.hmiConnection:SendNotification("SDL.OnAppPermissionConsent", { appID = self.applications["Test Application"], consentedFunctions = {{ allowed = false, id = 193465391, name = "New"}}, source = "GUI"}) + end) + end) + end) + :Timeout(2000) + + end) + end) + end + --End PreCondition.2 +]] +--------------------------------------------------------------------------------------------- +-----------------------------------------I TEST BLOCK---------------------------------------- +--CommonRequestCheck: Check of mandatory/conditional request's parameters (mobile protocol)-- +--------------------------------------------------------------------------------------------- + + --Begin Test suit CommonRequestCheck + --Description: + -- request with all parameters + -- request with only mandatory parameters + -- request with all combinations of conditional-mandatory parameters (if exist) + -- request with one by one conditional parameters (each case - one conditional parameter) + -- request with missing mandatory parameters one by one (each case - missing one mandatory parameter) + -- request with all parameters are missing + -- request with fake parameters (fake - not from protocol, from another request) + -- request is sent with invalid JSON structure + -- different conditions of correlationID parameter (invalid, several the same etc.) + + --Begin Test case CommonRequestCheck.1 + --Description: This test is intended to check request with all parameters + + --Requirement id in JAMA/or Jira ID: SDLAQ-CRS-93 + + --Verification criteria: SubsribeVehicleData request subscribes application for specific published vehicle data items. The data is sent upon being changed on HMI. The application is notified by the onVehicleData notification whenever the new data is available. + function Test:PreCondition_SubscribeVehicleData() + self:subscribeVehicleDataSuccess(allVehicleData) + + end + function Test:UnsubscribeVehicleData_Positive() + self:unsubscribeVehicleDataSuccess(allVehicleData) + end + --End Test case CommonRequestCheck.1 + + ----------------------------------------------------------------------------------------- + + --Begin Test case CommonRequestCheck.2 + --Description: This test is intended to check request with mandatory and conditional parameters + --Not applicable + --End Test case CommonRequestCheck.2 + + ----------------------------------------------------------------------------------------- + + --Begin Test case CommonRequestCheck.3 + --Description: This test is intended to check processing requests without mandatory parameters + + --Requirement id in JAMA/or Jira ID: SDLAQ-CRS-598 + + --Verification criteria: + --The request sent with NO parameters receives INVALID_DATA response code. + function Test:UnsubscribeVehicleData_AllParamsMissing() + self:unsubscribeVehicleDataInvalidData({}) + end + --End Test case CommonRequestCheck.3 + + ----------------------------------------------------------------------------------------- + + --Begin Test case CommonRequestCheck.4 + --Description: Check processing request with different fake parameters + + --Requirement id in JAMA/or Jira ID: APPLINK-4518 + + --Verification criteria: According to xml tests by Ford team all fake params should be ignored by SDL + + --Begin Test case CommonRequestCheck4.1 + --Description: With fake parameters + function Test:PreCondition_SubscribeVehicleData() + self:subscribeVehicleDataSuccess({"gps"}) + end + function Test:UnsubscribeVehicleData_FakeParams() + --mobile side: sending UnsubscribeVehicleData request + local cid = self.mobileSession:SendRPC("UnsubscribeVehicleData", + { + gps = true, + fakeParam ="fakeParam" + }) + + --hmi side: expect UnsubscribeVehicleData request + EXPECT_HMICALL("VehicleInfo.UnsubscribeVehicleData",{gps = true}) + :Do(function(_,data) + --hmi side: sending VehicleInfo.UnsubscribeVehicleData response + self.hmiConnection:SendResponse(data.id, data.method, "SUCCESS", {gps= {resultCode = "SUCCESS", dataType = "VEHICLEDATA_GPS"}}) + end) + :ValidIf(function(_,data) + if data.params.fakeParam then + print(" \27[36m SDL re-sends fakeParam parameters to HMI \27[0m") + return false + else + return true + end + end) + + --mobile side: expect UnsubscribeVehicleData response + EXPECT_RESPONSE(cid, {success = true, resultCode = "SUCCESS", gps= {resultCode = "SUCCESS", dataType = "VEHICLEDATA_GPS"}}) + + --mobile side: expect OnHashChange notification + EXPECT_NOTIFICATION("OnHashChange") + end + --End Test case CommonRequestCheck4.1 + + ----------------------------------------------------------------------------------------- + + --Begin Test case CommonRequestCheck.4.2 + --Description: Parameters from another request + function Test:PreCondition_SubscribeVehicleData() + self:subscribeVehicleDataSuccess({"gps"}) + end + function Test:UnsubscribeVehicleData_ParamsAnotherRequest() + --mobile side: sending UnsubscribeVehicleData request + local cid = self.mobileSession:SendRPC("UnsubscribeVehicleData", + { + gps = true, + ttsChunks = + { + { + text = "TTSChunk", + type = "TEXT", + } + } + }) + + --hmi side: expect UnsubscribeVehicleData request + EXPECT_HMICALL("VehicleInfo.UnsubscribeVehicleData",{gps = true}) + :Do(function(_,data) + --hmi side: sending VehicleInfo.UnsubscribeVehicleData response + self.hmiConnection:SendResponse(data.id, data.method, "SUCCESS", {gps= {resultCode = "SUCCESS", dataType = "VEHICLEDATA_GPS"}}) + end) + :ValidIf(function(_,data) + if data.params.ttsChunks then + print(" \27[36m SDL re-sends fakeParam parameters to HMI \27[0m") + return false + else + return true + end + end) + + --mobile side: expect UnsubscribeVehicleData response + EXPECT_RESPONSE(cid, {success = true, resultCode = "SUCCESS", gps= {resultCode = "SUCCESS", dataType = "VEHICLEDATA_GPS"}}) + + --mobile side: expect OnHashChange notification + EXPECT_NOTIFICATION("OnHashChange") + end + --End Test case CommonRequestCheck4.2 + --End Test case CommonRequestCheck.4 + + ----------------------------------------------------------------------------------------- + + --Begin Test case CommonRequestCheck.5 + --Description: Check processing request with invalid JSON syntax + + --Requirement id in JAMA/or Jira ID: SDLAQ-CRS-598 + + --Verification criteria: The request with wrong JSON syntax is sent, the response with INVALID_DATA result code is returned. + function Test:UnsubscribeVehicleData_InvalidJSON() + self.mobileSession.correlationId = self.mobileSession.correlationId + 1 + + local msg = + { + serviceType = 7, + frameInfo = 0, + rpcType = 0, + rpcFunctionId = 21, + rpcCorrelationId = self.mobileSession.correlationId, + --< These checks are not applicable for SubscribeButton request. There is no response from HMI to SDL. - - - - --Write TEST_BLOCK_III_End to ATF log - function Test:TEST_BLOCK_III_End() - print("********************************************************************") - end - ----------------------------------------------------------------------------------------------- -----------------------------------------IV TEST BLOCK----------------------------------------- ----------------------------------------Result code check-------------------------------------- ----------------------------------------------------------------------------------------------- - - --Check all uncovered pairs resultCodes+success - - --Begin test suit ResultCodeCheck - --Description: check result code of response to Mobile (SDLAQ-CRS-532) - - --Write TEST_BLOCK_IV_Begin to ATF log - function Test:TEST_BLOCK_IV_Begin() - print("********************************************************************") - end - - --Begin test case ResultCodeCheck.1 - --Description: Check resultCode: SUCCESS - - --It is covered by CommonRequestCheck.2 (checking request with mandatory parameter) - - --End test case ResultCodeCheck.1 - ----------------------------------------------------------------------------------------- - - --Begin test case ResultCodeCheck.2 - --Description: Check resultCode: INVALID_DATA - - --It is covered by SubscribeButton_buttonName_IsInvalidValue_nonexistent_INVALID_DATA - - --End test case ResultCodeCheck.2 - ----------------------------------------------------------------------------------------- - - - --Begin test case ResultCodeCheck.3 - --Description: Check resultCode: OUT_OF_MEMORY - - --Requirement id in JAMA/or Jira ID: SDLAQ-CRS-535 - - --Verification criteria: A SubscribeButton request is sent under conditions of RAM deficite for executing it. The response code OUT_OF_MEMORY is returned - - --ToDo: Can not check this case. - - --End test case ResultCodeCheck.3 - ----------------------------------------------------------------------------------------- - - --Begin test case ResultCodeCheck.4 - --Description: Check resultCode: TOO_MANY_PENDING_REQUESTS - - --Requirement id in JAMA/or Jira ID: SDLAQ-CRS-536 - - --Verification criteria: SDL response TOO_MANY_PENDING_REQUESTS resultCode - - --Move to another script: ATF_SubscribeButton_TOO_MANY_PENDING_REQUESTS.lua - - --End test case ResultCodeCheck.4 - ----------------------------------------------------------------------------------------- - - --Begin test case ResultCodeCheck.5 - --Description: Check resultCode: APPLICATION_NOT_REGISTERED - - --Requirement id in JAMA/or Jira ID: SDLAQ-CRS-537 - - --Verification criteria: SDL responses APPLICATION_NOT_REGISTERED resultCode - - --Description: Unregister application - function Test:UnregisterAppInterface_Success() - local cid = self.mobileSession:SendRPC("UnregisterAppInterface",{}) - - EXPECT_RESPONSE(cid, { success = true, resultCode = "SUCCESS"}) - :Timeout(2000) - end - - --Description: Send SubscribeButton when application not registered yet. - - for i=1,#buttonName do - - --Precondition for this test case - --Precondition_TC_UnsubscribeButton(self, buttonName[i]) - - Test["SubscribeButton_resultCode_APPLICATION_NOT_REGISTERED_" .. tostring(buttonName[i]).."_APPLICATION_NOT_REGISTERED"] = function(self) - - --mobile side: sending SubscribeButton request - local cid = self.mobileSession:SendRPC("SubscribeButton", - { - buttonName = buttonName[i] - } - ) - - --mobile side: expect SubscribeButton response - EXPECT_RESPONSE(cid, {success = false, resultCode = "APPLICATION_NOT_REGISTERED", info = nil}) - :Timeout(iTimeout) - - EXPECT_NOTIFICATION("OnHashChange") - :Times(0) - :Timeout(iTimeout) - end - - end - - --End test case ResultCodeCheck.5 - ----------------------------------------------------------------------------------------- - - --Begin test case ResultCodeCheck.6 - --Description: Check resultCode: REJECTED - - --Requirement id in JAMA/or Jira ID: SDLAQ-CRS-538 - - --Verification criteria: - --1. SDL must return "resultCode: REJECTED, success: false" to SubscribeButton (SEEKLEFT) in case such RPC comes from non-media app. - --2. SDL must return "resultCode: REJECTED, success: false" to SubscribeButton (SEEKRIGHT) in case such RPC comes from non-media app. - --3. SDL must return "resultCode: REJECTED, success: false" to SubscribeButton (TUNEUP) in case such RPC comes from non-media app. - --4. SDL must return "resultCode: REJECTED, success: false" to SubscribeButton (TUNEDOWN) in case such RPC comes from non-media app. - - - -- register non-media application 2 - function Test:RegisterNon_Media_AppInterface() - RegisterAppInterface(self, 2) - end - - function Test:Activate_Non_Media_Application() - --HMI send ActivateApp request - --ActivateApplication(self) - ActivateApplication(self, application2_nonmedia.registerAppInterfaceParams.appName) - end - - buttonName1 = {"SEEKLEFT", "SEEKRIGHT", "TUNEUP", "TUNEDOWN"} - for i=1,#buttonName1 do - - Test["SubscribeButton_resultCode_REJECTED_" .. tostring(buttonName1[i]).."_REJECTED"] = function(self) - - --mobile side: sending SubscribeButton request - local cid = self.mobileSession:SendRPC("SubscribeButton", - { - buttonName = buttonName1[i] - } - ) - - --mobile side: expect SubscribeButton response - EXPECT_RESPONSE(cid, {success = false, resultCode = "REJECTED", info = nil}) - :Timeout(iTimeout) - - EXPECT_NOTIFICATION("OnHashChange") - :Times(0) - :Timeout(iTimeout) - end - - end - - --Description: Unregister non-media application - function Test:UnregisterAppInterface_Success() - local cid = self.mobileSession:SendRPC("UnregisterAppInterface",{}) - - EXPECT_RESPONSE(cid, { success = true, resultCode = "SUCCESS"}) - :Timeout(2000) - end - - -- register media application 1 - function Test:Register_Media_AppInterface() - RegisterAppInterface(self, 1) - end - - - function Test:Activate_Media_Application() - --HMI send ActivateApp request - ActivateApplication(self, config.application1.registerAppInterfaceParams.appName) - end - - --End test case ResultCodeCheck.6 - ----------------------------------------------------------------------------------------- - - --Begin test case ResultCodeCheck.7 - --Description: Check resultCode: IGNORED - - --Requirement id in JAMA/or Jira ID: SDLAQ-CRS-539 - - --Verification criteria: In case the application sends a SubscribeButton request for a button previously subscribed, SDL sends the IGNORED resultCode to mobile side. General result success=false. - - for i=1,#buttonName do - - --Precondition for this test case - Precondition_TC_SubscribeButton(self, buttonName[i]) - - Test["SubscribeButton_resultCode_IGNORED_" .. tostring(buttonName[i]).."_IGNORED"] = function(self) - - --mobile side: sending SubscribeButton request - local cid = self.mobileSession:SendRPC("SubscribeButton", - { - buttonName = buttonName[i] - } - ) - - --mobile side: expect SubscribeButton response - EXPECT_RESPONSE(cid, {success = false, resultCode = "IGNORED", info = nil}) - :Timeout(iTimeout) - - EXPECT_NOTIFICATION("OnHashChange") - :Times(0) - :Timeout(iTimeout) - end - - end - - --End test case ResultCodeCheck.7 - ----------------------------------------------------------------------------------------- - - --Begin test case ResultCodeCheck.8 - --Description: Check resultCode: UNSUPPORTED_RESOURCE - - --Requirement id in JAMA/or Jira ID: SDLAQ-CRS-541 - - --Verification criteria: If subscribe for CUSTOM_BUTTON button which isn't supported on the HMI the response with the resultCode UNSUPPORTED_RESOURCE is returned. General request result success=false. - - for i=1,#UnsupportButtonName do - - Test["SubscribeButton_resultCode_UNSUPPORTED_RESOURCE_" .. tostring(UnsupportButtonName[i]).."_result_UNSUPPORTED_RESOURCE"] = function(self) - - --mobile side: sending SubscribeButton request - local cid = self.mobileSession:SendRPC("SubscribeButton", - { - buttonName = UnsupportButtonName[i] - } - ) - - --mobile side: expect SubscribeButton response - EXPECT_RESPONSE(cid, {success = false, resultCode = "UNSUPPORTED_RESOURCE", info = nil}) - :Timeout(iTimeout) - - EXPECT_NOTIFICATION("OnHashChange") - :Times(0) - :Timeout(iTimeout) - end - - end - - --End test case ResultCodeCheck.8 - ----------------------------------------------------------------------------------------- - - --Begin test case ResultCodeCheck.9 - --Description: Check resultCode: GENERIC_ERROR - - --Requirement id in JAMA/or Jira ID: SDLAQ-CRS-540 - - --Verification criteria: GENERIC_ERROR comes as a result code in response when all other codes aren't applicable or the unknown issue occured. - - --ToDo: Can not check this case - - --End test case ResultCodeCheck.9 - ----------------------------------------------------------------------------------------- - - - --Write TEST_BLOCK_IV_End to ATF log - function Test:TEST_BLOCK_IV_End() - print("********************************************************************") - end - - --End test suit ResultCodeCheck - - - - - - ----------------------------------------------------------------------------------------------- ------------------------------------------V TEST BLOCK----------------------------------------- ----------------------------------------HMI negative cases------------------------------------- ----------------------------------------------------------------------------------------------- - - --------Checks----------- - -- requests without responses from HMI - -- invalid structure os response - -- several responses from HMI to one request - -- fake parameters - -- HMI correlation id check - -- wrong response with correct HMI id - - - -- SubscribeButton API does not have any response from HMI. This test suit is not applicable => Ignore - - --Write TEST_BLOCK_V_Begin to ATF log - function Test:TEST_BLOCK_V_Begin() - print("********************************************************************") - end - - --Write TEST_BLOCK_V_End to ATF log - function Test:TEST_BLOCK_V_End() - print("********************************************************************") - end - - ----------------------------------------------------------------------------------------------- ------------------------------------------VI TEST BLOCK---------------------------------------- --------------------------Sequence with emulating of user's action(s)-------------------------- ----------------------------------------------------------------------------------------------- - - --Begin test suit SequenceCheck - --Description: TC's checks SDL behavior by processing - -- different request sequence with timeout - -- with emulating of user's actions - - --Write TEST_BLOCK_VI-_Begin to ATF log - function Test:TEST_BLOCK_VI_Begin() - print("********************************************************************") - end - - --Begin test case SequenceCheck.1-5 - --Description: check scenario in test case TC_SubscribeButton_01 - 05: - - --Requirement id in JAMA/or Jira ID: SDLAQ-CRS-61, SDLAQ-CRS-175 - - --Verification criteria: SubscribeButton option check for OK, SEEKRIGHT, SEEKLEFT,.. . Make actions on UI to check the subscription on buttons (Long/Short press) - - local buttonName1 = buttonName - local mode = {"SHORT", "LONG"} - for i=1,#buttonName1 do - - --Precondition for this test case: Unsubscribe button - Precondition_TC_UnsubscribeButton(self, buttonName1[i]) - - for j=1,#mode do - --check OnButtonEvent and OnButtonPress when clicking on this button - strTestCaseName = "TC_SubscribeButton_01_05_Click_UnsubscribedButton_"..buttonName1[i] .."_".. mode[j] - TC_OnButtonEvent_OnButtonPress_When_UnsubscribedButton(self, buttonName1[i], mode[j], strTestCaseName) - end - - --Subscribe button - strTestCaseName = "TC_SubscribeButton_01_05_SubscribeButton_" .. tostring(buttonName[i]).."_SUCCESS" - TC_SubscribeButtonSUCCESS(self, buttonName[i], strTestCaseName) - - for j=1,#mode do - --check OnButtonEvent and OnButtonPress when clicking on this button - strTestCaseName = "TC_SubscribeButton_01_05_Click_SubscribedButton_"..buttonName1[i] .."_".. mode[j] - TC_OnButtonEvent_OnButtonPress_When_SubscribedButton(self, buttonName1[i], mode[j], strTestCaseName) - end - end - - --End test case SequenceCheck.1-5 - ----------------------------------------------------------------------------------------- - - --Begin test case SequenceCheck.6 - --Description: check scenario in test case TC_SubscribeButton_06 - - --Requirement id in JAMA/or Jira ID: SDLAQ-CRS-61 - - --Verification criteria: SDL must send media-buttons related notifications to one MEDIA app only (of FULL or LIMITED HMILevel) - - -- Write TC_SubscribeButton_06_Begin to ATF log - function Test:TC_SubscribeButton_06_Begin() - --Just write to log of ATF a test case to mark as begin of this manual test case - end - - -- Change App0 to Limited to allow change App1 to FULL - function Test:TC_SubscribeButton_06_Change_App0_To_LIMITED_HMI_LEVEL() - --hmi side: sending BasicCommunication.OnAppDeactivated request - appId0 = self.applications["Test Application"] - local cid = self.hmiConnection:SendNotification("BasicCommunication.OnAppDeactivated", - { - appID = self.applications["Test Application"], - reason = "GENERAL" - }) - - --mobile side: expect OnHMIStatus notification - EXPECT_NOTIFICATION("OnHMIStatus",{hmiLevel = "LIMITED", audioStreamingState = "AUDIBLE", systemContext = "MAIN"}) - - end - - --Precondition: Opening new session 1 - function Test:TC_SubscribeButton_06_AddNewSession() - -- Connected expectation - self.mobileSession1 = mobile_session.MobileSession( - self, - self.mobileConnection) - - self.mobileSession1:StartService(7) - end - - -- Register app1 - function Test:TC_SubscribeButton_06_Register_Non_Media_App1() - - --mobile side: RegisterAppInterface request - local CorIdRAI = self.mobileSession1:SendRPC("RegisterAppInterface", - { - syncMsgVersion = - { - majorVersion = 2, - minorVersion = 2, - }, - appName ="SPT1", - --isMediaApplication = true, - isMediaApplication = false, - languageDesired ="EN-US", - hmiDisplayLanguageDesired ="EN-US", - appID ="1", - ttsName = - { - { - text ="SyncProxyTester1", - type ="TEXT", - }, - }, - vrSynonyms = - { - "vrSPT1", - } - }) - - --hmi side: expect BasicCommunication.OnAppRegistered request - EXPECT_HMINOTIFICATION("BasicCommunication.OnAppRegistered", - { - application = - { - appName = "SPT1" - } - }) - :Do(function(_,data) - self.appId1 = data.params.application.appID - end) - - --mobile side: RegisterAppInterface response - self.mobileSession1:ExpectResponse(CorIdRAI, { success = true, resultCode = "SUCCESS"}) - :Timeout(2000) - - self.mobileSession1:ExpectNotification("OnHMIStatus", {hmiLevel = "NONE", audioStreamingState = "NOT_AUDIBLE", systemContext = "MAIN"}) - end - - -- Activate app1 - function Test:TC_SubscribeButton_06_Activate_App1() - --HMI send ActivateApp request - local RequestId = self.hmiConnection:SendRequest("SDL.ActivateApp", { appID = self.appId1}) - EXPECT_HMIRESPONSE(RequestId) - :Do(function(_,data) - - if data.result.isSDLAllowed ~= true then - local RequestId = self.hmiConnection:SendRequest("SDL.GetUserFriendlyMessage", {language = "EN-US", messageCodes = {"DataConsent"}}) - EXPECT_HMIRESPONSE(RequestId,{result = {code = 0, method = "SDL.GetUserFriendlyMessage"}}) - :Do(function(_,data) - --hmi side: send request SDL.OnAllowSDLFunctionality - self.hmiConnection:SendNotification("SDL.OnAllowSDLFunctionality", {allowed = true, source = "GUI", device = {id = config.deviceMAC, name = "127.0.0.1"}}) - - EXPECT_HMICALL("BasicCommunication.ActivateApp") - :Do(function(_,data) - self.hmiConnection:SendResponse(data.id,"BasicCommunication.ActivateApp", "SUCCESS", {}) - end) - :Times(2) - end) - - end - end) - - self.mobileSession1:ExpectNotification("OnHMIStatus", {hmiLevel = "FULL", systemContext = "MAIN"}) - :Timeout(12000) - - end - - -- Subscribe buttons on App1 - for i=1,#buttonNameNonMediaApp do - - strTestCaseName = "TC_SubscribeButton_06_SubscribeButton_for_App1_" .. tostring(buttonNameNonMediaApp[i]).."_SUCCESS" - Test[strTestCaseName] = function(self) - - --mobile side: sending SubscribeButton request - local cid = self.mobileSession1:SendRPC("SubscribeButton", - { - buttonName = buttonNameNonMediaApp[i] - } - ) - - --mobile side: expect SubscribeButton response - self.mobileSession1:ExpectResponse(cid, {success = true, resultCode = "SUCCESS", info = nil}) - :Timeout(iTimeout) - - self.mobileSession:ExpectResponse("SubscribeButton", {}) - :Times(0) - - self.mobileSession1:ExpectNotification("OnHashChange", {}) - - self.mobileSession:ExpectNotification("OnHashChange", {}) - :Times(0) - - DelayedExp(2000) - - end - end - - function Test:TC_SubscribeButton_06_Exit_App1_Change_To_NONE_HMI_LEVEL() - - local function sendUserExit() - --hmi side: sending BasicCommunication.OnExitApplication request - local cid = self.hmiConnection:SendNotification("BasicCommunication.OnExitApplication", - { - appID = self.appId1, - reason = "USER_EXIT" - }) - end - - local function SendOnSystemContext1() - --hmi side: sending UI.OnSystemContext request - SendOnSystemContextOnAppID(self,"MAIN", self.appId1) - end - - local function sendOnAppDeactivate() - --hmi side: sending BasicCommunication.OnAppDeactivated request - local cid = self.hmiConnection:SendNotification("BasicCommunication.OnAppDeactivated", - { - appID = self.appId1, - reason = "GENERAL" - }) - end - - --hmi side: sending BasicCommunication.OnSystemContext request - SendOnSystemContextOnAppID(self,"MENU", self.appId1) - - --hmi side: sending BasicCommunication.OnExitApplication request - RUN_AFTER(sendUserExit, 1000) - - --hmi side: sending UI.OnSystemContext request = MAIN - RUN_AFTER(SendOnSystemContext1, 2000) - - --hmi side: sending BasicCommunication.OnAppDeactivated request - RUN_AFTER(sendOnAppDeactivate, 3000) - - - --mobile side: OnHMIStatus notifications - self.mobileSession1:ExpectNotification("OnHMIStatus", - { systemContext = "MENU", hmiLevel = "FULL"}, - { systemContext = "MENU", hmiLevel = "NONE"}, - { systemContext = "MAIN", hmiLevel = "NONE"}) - :Times(3) - :Timeout(15000) - - end - - -- Opening new session 2 - function Test:TC_SubscribeButton_06_AddNewSession() - -- Connected expectation - self.mobileSession2 = mobile_session.MobileSession( - self.expectations_list, - self.mobileConnection) - - self.mobileSession2:StartService(7) - end - - -- Register app2 - function Test:TC_SubscribeButton_06_RegisterAppInterface_App2() - - --mobile side: RegisterAppInterface request - local CorIdRAI = self.mobileSession2:SendRPC("RegisterAppInterface", - { - syncMsgVersion = - { - majorVersion = 2, - minorVersion = 2, - }, - appName ="SPT2", - isMediaApplication = true, - languageDesired ="EN-US", - hmiDisplayLanguageDesired ="EN-US", - appID ="2", - ttsName = - { - { - text ="SyncProxyTester2", - type ="TEXT", - }, - }, - vrSynonyms = - { - "vrSPT2", - } - }) - - --hmi side: expect BasicCommunication.OnAppRegistered request - EXPECT_HMINOTIFICATION("BasicCommunication.OnAppRegistered", - { - application = - { - appName = "SPT2" - } - }) - :Do(function(_,data) - appId2 = data.params.application.appID - end) - - --mobile side: RegisterAppInterface response - self.mobileSession2:ExpectResponse(CorIdRAI, { success = true, resultCode = "SUCCESS"}) - :Timeout(2000) - - self.mobileSession2:ExpectNotification("OnHMIStatus", {hmiLevel = "NONE", audioStreamingState = "NOT_AUDIBLE"}) - end - - -- Activate app2 - function Test:TC_SubscribeButton_06_Activate_App2() - - --HMI send ActivateApp request - local RequestId = self.hmiConnection:SendRequest("SDL.ActivateApp", { appID = appId2}) - EXPECT_HMIRESPONSE(RequestId) - :Do(function(_,data) - - if data.result.isSDLAllowed ~= true then - local RequestId = self.hmiConnection:SendRequest("SDL.GetUserFriendlyMessage", {language = "EN-US", messageCodes = {"DataConsent"}}) - EXPECT_HMIRESPONSE(RequestId,{result = {code = 0, method = "SDL.GetUserFriendlyMessage"}}) - :Do(function(_,data) - --hmi side: send request SDL.OnAllowSDLFunctionality - self.hmiConnection:SendNotification("SDL.OnAllowSDLFunctionality", {allowed = true, source = "GUI", device = {id = 1, name = "127.0.0.1"}}) - end) - - EXPECT_HMICALL("BasicCommunication.ActivateApp") - :Do(function(_,data) - self.hmiConnection:SendResponse(data.id,"BasicCommunication.ActivateApp", "SUCCESS", {}) - end) - :Times(2) - end - end) - - self.mobileSession2:ExpectNotification("OnHMIStatus", {hmiLevel = "FULL"}) - :Timeout(12000) - - end - - -- Subscribe buttons on App2 - for i=1,#buttonName do - - strTestCaseName = "TC_SubscribeButton_06_SubscribeButton_for_App2_" .. tostring(buttonName[i]).."_SUCCESS" - - Test[strTestCaseName] = function(self) - - --mobile side: sending SubscribeButton request - local cid = self.mobileSession2:SendRPC("SubscribeButton", - { - buttonName = buttonName[i] - } - ) - - --mobile side: expect SubscribeButton response - self.mobileSession2:ExpectResponse(cid, {success = true, resultCode = "SUCCESS", info = nil}) - :Timeout(iTimeout) - - self.mobileSession2:ExpectNotification("OnHashChange", {}) - end - - end - - -- Activate App0 - function Test:TC_SubscribeButton_06_Activate_App0() - --HMI send ActivateApp request - ActivateApplication(self, config.application1.registerAppInterfaceParams.appName) - end - - -- Subscribe buttons - for i=1,#buttonName do - --Precondition for this test case - Precondition_TC_UnsubscribeButton(self, buttonName[i]) - - strTestCaseName = "TC_SubscribeButton_06_SubscribeButton_for_App0_" .. tostring(buttonName[i]).."_SUCCESS" - TC_SubscribeButtonSUCCESS(self, buttonName[i], strTestCaseName) - end - - - local buttonName1 = buttonName - local mode = {"SHORT", "LONG"} - - --Click SubScribedButtons on HMI => SDL only send notifications to FULL application, does not send to NONE, BACKGROUND - for i=1,#buttonName1 do - for j=1,#mode do - --check OnButtonEvent and OnButtonPress when clicking on this button - strTestCaseName = "TC_SubscribeButton_06_ClickSubscribedButton_Incase_FULL_BACKGOUND_NONE_Applications_"..buttonName1[i] .."_".. mode[j] - Test[strTestCaseName] = function(self) - - --hmi side: send request Buttons.OnButtonEvent - self.hmiConnection:SendNotification("Buttons.OnButtonEvent", - { - name = buttonName1[i], - mode = "BUTTONDOWN" - }) - - local function OnButtonEventBUTTONUP() - --hmi side: send request Buttons.OnButtonEvent - self.hmiConnection:SendNotification("Buttons.OnButtonEvent", - { - name = buttonName1[i], - mode = "BUTTONUP" - }) - end - - --hmi side: send request Buttons.OnButtonPress - local function OnButtonPress() - self.hmiConnection:SendNotification("Buttons.OnButtonPress", - { - name = buttonName1[i], - mode = mode[j] - }) - end - - if strMode == "LONG" then - --hmi side: send request Buttons.OnButtonPress - RUN_AFTER(OnButtonPress, 50) - - --hmi side: send request Buttons.OnButtonEvent - RUN_AFTER(OnButtonEventBUTTONUP, 100) - - else - --hmi side: send request Buttons.OnButtonEvent - RUN_AFTER(OnButtonEventBUTTONUP, 50) - - --hmi side: send request Buttons.OnButtonPress - RUN_AFTER(OnButtonPress, 100) - end - --------------------------------------------- - - --Verify result on app0 - --Mobile expects OnButtonEvent - EXPECT_NOTIFICATION("OnButtonEvent", - {buttonName = buttonName1[i], buttonEventMode = "BUTTONDOWN"}, - {buttonName = buttonName1[i], buttonEventMode = "BUTTONUP"} - ) - :Times(2) - - --Mobile expects OnButtonEvent - EXPECT_NOTIFICATION("OnButtonPress", {buttonName = buttonName1[i], buttonPressMode = mode[j]})--------------------------------------------- - - --Verify result on app1 - --mobile side: expect notification - self.mobileSession1:ExpectNotification("OnButtonEvent", {}) - :Times(0) - - self.mobileSession1:ExpectNotification("OnButtonPress", {}) - :Times(0) - --------------------------------------------- - - --Verify result on app2 - --mobile side: expect notification - self.mobileSession2:ExpectNotification("OnButtonEvent", {}) - :Times(0) - - self.mobileSession2:ExpectNotification("OnButtonPress", {}) - :Times(0) - --------------------------------------------- - - end - end - end - - --Change application to LIMITED - function Test:TC_SubscribeButton_06_ChangeHMIToLimited() - --hmi side: sending BasicCommunication.OnAppDeactivated request - local cid = self.hmiConnection:SendNotification("BasicCommunication.OnAppDeactivated", - { - appID = self.applications["Test Application"], - reason = "GENERAL" - }) - - --mobile side: expect OnHMIStatus notification - EXPECT_NOTIFICATION("OnHMIStatus",{hmiLevel = "LIMITED"}) - - end - - --Click SubScribedButtons on HMI => SDL only send notifications to LIMITED application, does not send to NONE, BACKGROUND - for i=1,#buttonName1 do - for j=1,#mode do - - --check OnButtonEvent and OnButtonPress when clicking on this button - strTestCaseName = "TC_SubscribeButton_06_ClickSubscribedButton_Incase_LIMITED_BACKGOUND_NONE_Applications_"..buttonName1[i] .."_".. mode[j] - Test[strTestCaseName] = function(self) - - - --hmi side: send request Buttons.OnButtonEvent - self.hmiConnection:SendNotification("Buttons.OnButtonEvent", - { - name = buttonName1[i], - mode = "BUTTONDOWN", - appID = self.applications["Test Application"] - }) - - - local function OnButtonEventBUTTONUP() - --hmi side: send request Buttons.OnButtonEvent - self.hmiConnection:SendNotification("Buttons.OnButtonEvent", - { - name = buttonName1[i], - mode = "BUTTONUP", - appID = self.applications["Test Application"] - }) - end - - --hmi side: send request Buttons.OnButtonPress - local function OnButtonPress() - self.hmiConnection:SendNotification("Buttons.OnButtonPress", - { - name = buttonName1[i], - mode = mode[j], - appID = self.applications["Test Application"] - }) - end - - if strMode == "LONG" then - --hmi side: send request Buttons.OnButtonPress - RUN_AFTER(OnButtonPress, 50) - - --hmi side: send request Buttons.OnButtonEvent - RUN_AFTER(OnButtonEventBUTTONUP, 100) - - else - --hmi side: send request Buttons.OnButtonEvent - RUN_AFTER(OnButtonEventBUTTONUP, 50) - - --hmi side: send request Buttons.OnButtonPress - RUN_AFTER(OnButtonPress, 100) - end - --------------------------------------------- - - --Verify result on app0 - --Mobile expects OnButtonEvent - EXPECT_NOTIFICATION("OnButtonEvent", - {buttonName = buttonName1[i], buttonEventMode = "BUTTONDOWN"}, - {buttonName = buttonName1[i], buttonEventMode = "BUTTONUP"} - ) - :Times(2) - - --Mobile expects OnButtonEvent - EXPECT_NOTIFICATION("OnButtonPress", {buttonName = buttonName1[i], buttonPressMode = mode[j]}) - --------------------------------------------- - - --Verify result on app1 - --mobile side: expect notification - self.mobileSession1:ExpectNotification("OnButtonEvent", {}) - :Times(0) - - self.mobileSession1:ExpectNotification("OnButtonPress", {}) - :Times(0) - --------------------------------------------- - - --Verify result on app2 - --mobile side: expect notification - self.mobileSession2:ExpectNotification("OnButtonEvent", {}) - :Times(0) - - self.mobileSession2:ExpectNotification("OnButtonPress", {}) - :Times(0) - --------------------------------------------- - - end - end - end - - --Print TC_SubscribeButton_06_End in ATF log - function Test:TC_SubscribeButton_06_End() - --Just write to log of ATF a test case to mark as the end of this manual test case - end - - --End test case SequenceCheck.6 - ----------------------------------------------------------------------------------------- - - --Begin test case SequenceCheck.7 - --Description: check scenario in test case TC_SubscribeButton_07 - - --Requirement id in JAMA/or Jira ID: SDLAQ-CRS-2975, SDLAQ-CRS-61 - - --Verification criteria: SubscribeButton option check for CUSTOM_BUTTON and SEARCH - - -- Unregister application - function Test:TC_SubscribeButton_07_UnregisterAppInterface_Success() - local cid = self.mobileSession:SendRPC("UnregisterAppInterface",{}) - - EXPECT_RESPONSE(cid, { success = true, resultCode = "SUCCESS"}) - :Timeout(2000) - end - - -- Register application - function Test:TC_SubscribeButton_07_RegisterAppInterface_And_Check_OnButtonSubscription() - - --mobile side: sending request - local CorIdRegister, strAppName - - CorIdRegister = self.mobileSession:SendRPC("RegisterAppInterface", config.application1.registerAppInterfaceParams) - strAppName = config.application1.registerAppInterfaceParams.appName - - --hmi side: expect BasicCommunication.OnAppRegistered request - EXPECT_HMINOTIFICATION("BasicCommunication.OnAppRegistered", - { - application = - { - appName = strAppName - } - }) - :Do(function(_,data) - local appId = data.params.application.appID - self.appId = appId - appId0 = appId - self.appName = data.params.application.appName - self.applications[strAppName] = appId - - --hmi side: expect OnButtonSubscription request due to APPLINK-12241 - EXPECT_HMINOTIFICATION("Buttons.OnButtonSubscription", {appID = appId0, name = "CUSTOM_BUTTON", isSubscribed=true}) - :Timeout(12000) - end) - - --mobile side: expect response - self.mobileSession:ExpectResponse(CorIdRegister, - { - syncMsgVersion = - { - majorVersion = 3, - minorVersion = 0 - } - }) - :Timeout(12000) - - --mobile side: expect notification - self.mobileSession:ExpectNotification("OnHMIStatus", - { - systemContext = "MAIN", hmiLevel = "NONE", audioStreamingState = "NOT_AUDIBLE" - }) - :Timeout(12000) - - end - - --Activate application - function Test:TC_SubscribeButton_07_Activate_Application() - --HMI send ActivateApp request - local RequestId = self.hmiConnection:SendRequest("SDL.ActivateApp", { appID = appId0}) - EXPECT_HMIRESPONSE(RequestId) - :Do(function(_,data) - - if data.result.isSDLAllowed ~= true then - local RequestId = self.hmiConnection:SendRequest("SDL.GetUserFriendlyMessage", {language = "EN-US", messageCodes = {"DataConsent"}}) - EXPECT_HMIRESPONSE(RequestId,{result = {code = 0, method = "SDL.GetUserFriendlyMessage"}}) - :Do(function(_,data) - --hmi side: send request SDL.OnAllowSDLFunctionality - self.hmiConnection:SendNotification("SDL.OnAllowSDLFunctionality", {allowed = true, source = "GUI", device = {id = 1, name = "127.0.0.1"}}) - end) - - EXPECT_HMICALL("BasicCommunication.ActivateApp") - :Do(function(_,data) - self.hmiConnection:SendResponse(data.id,"BasicCommunication.ActivateApp", "SUCCESS", {}) - end) - :Times(2) - end - end) - - self.mobileSession:ExpectNotification("OnHMIStatus", {hmiLevel = "FULL"}) - :Timeout(12000) - - end - - - --Subscribe CUSTOM_BUTTON button => IGNORE - function Test:TC_SubscribeButton_07_SubscribeButton_CUSTOM_BUTTON_IGNORE_Without_OnButtonSubscription() - - --mobile side: sending SubscribeButton request - local cid = self.mobileSession:SendRPC("SubscribeButton", - { - buttonName = "CUSTOM_BUTTON" - } - ) - - --mobile side: expect SubscribeButton response - EXPECT_RESPONSE(cid, {success = false, resultCode = "IGNORED", info = nil}) - :Timeout(iTimeout) - - EXPECT_NOTIFICATION("OnHashChange") - :Times(0) - - end - - --Subscribe SEARCH button - function Test:TC_SubscribeButton_07_SubscribeButton_SEARCH_SUCCESS_With_OnButtonSubscription() - - --mobile side: sending SubscribeButton request - local cid = self.mobileSession:SendRPC("SubscribeButton", - { - buttonName = "SEARCH" - } - ) - - --mobile side: expect SubscribeButton response - EXPECT_RESPONSE(cid, {success = false, resultCode = "UNSUPPORTED_RESOURCE", info = nil}) - :Timeout(iTimeout) - - EXPECT_NOTIFICATION("OnHashChange") - :Times(0) - - end - - --End test case SequenceCheck.7 - ----------------------------------------------------------------------------------------- - - - --Begin test case SequenceCheck.8 - --Description: check scenario in test case TC_SubscribeButton_08 - - --Requirement id in JAMA/or Jira ID: SDLAQ-CRS-61, SDLAQ-CRS-2974, APPLINK-12241 - - --Verification criteria: Check that SDL doesn't send OnButtonSubscription(false) after app was unregistered or disconnected unexpectedly. - - -- Precondition: Unregister application - function Test:TC_SubscribeButton_08_UnregisterAppInterface_Success() - local cid = self.mobileSession:SendRPC("UnregisterAppInterface",{}) - - EXPECT_RESPONSE(cid, { success = true, resultCode = "SUCCESS"}) - :Timeout(2000) - end - - -- Precondition: Register media application 1 - function Test:TC_SubscribeButton_08_RegisterAppInterfaceAndCheckOnButtonSubscription() - RegisterAppInterface(self, 1) - end - - -- Precondition: Activate app - function Test:TC_SubscribeButton_08_Activate_Application() - --HMI send ActivateApp request - local RequestId = self.hmiConnection:SendRequest("SDL.ActivateApp", { appID = appId0}) - EXPECT_HMIRESPONSE(RequestId) - :Do(function(_,data) - - if data.result.isSDLAllowed ~= true then - local RequestId = self.hmiConnection:SendRequest("SDL.GetUserFriendlyMessage", {language = "EN-US", messageCodes = {"DataConsent"}}) - EXPECT_HMIRESPONSE(RequestId,{result = {code = 0, method = "SDL.GetUserFriendlyMessage"}}) - :Do(function(_,data) - --hmi side: send request SDL.OnAllowSDLFunctionality - self.hmiConnection:SendNotification("SDL.OnAllowSDLFunctionality", {allowed = true, source = "GUI", device = {id = 1, name = "127.0.0.1"}}) - end) - - EXPECT_HMICALL("BasicCommunication.ActivateApp") - :Do(function(_,data) - self.hmiConnection:SendResponse(data.id,"BasicCommunication.ActivateApp", "SUCCESS", {}) - end) - :Times(2) - end - end) - - self.mobileSession:ExpectNotification("OnHMIStatus", {hmiLevel = "FULL"}) - :Timeout(12000) - - end - - --Subscribe PRESET_1 button - strTestCaseName = "TC_SubscribeButton_08_SubscribeButton_PRESET_1_SUCCESS_With_OnButtonSubscription" - TC_SubscribeButtonSUCCESS(self, "PRESET_1", strTestCaseName) - - -- Unregister application: check that SDL doesn't send OnButtonSubscription(false) after app was unregistered or disconnected unexpectedly. - function Test:TC_SubscribeButton_08_UnregisterAppInterface_Without_OnButtonSubscription() - local cid = self.mobileSession:SendRPC("UnregisterAppInterface",{}) - - EXPECT_RESPONSE(cid, { success = true, resultCode = "SUCCESS"}) - :Timeout(2000) - - --hmi side: expect OnButtonSubscription request - EXPECT_HMICALL("OnButtonSubscription") - :Times(0) - end - - local function TC_SubscribeButton_08_Steps_From_4_To_9() - -- Register the same App again - function Test:TC_SubscribeButton_08_RegisterAppInterfaceAndCheckOnButtonSubscription() - RegisterAppInterface(self, 1) - end - - -- Precondition: Activate app - function Test:TC_SubscribeButton_08_Activate_Application() - --HMI send ActivateApp request - local RequestId = self.hmiConnection:SendRequest("SDL.ActivateApp", { appID = appId0}) - EXPECT_HMIRESPONSE(RequestId) - :Do(function(_,data) - - if data.result.isSDLAllowed ~= true then - local RequestId = self.hmiConnection:SendRequest("SDL.GetUserFriendlyMessage", {language = "EN-US", messageCodes = {"DataConsent"}}) - EXPECT_HMIRESPONSE(RequestId,{result = {code = 0, method = "SDL.GetUserFriendlyMessage"}}) - :Do(function(_,data) - --hmi side: send request SDL.OnAllowSDLFunctionality - self.hmiConnection:SendNotification("SDL.OnAllowSDLFunctionality", {allowed = true, source = "GUI", device = {id = 1, name = "127.0.0.1"}}) - end) - - EXPECT_HMICALL("BasicCommunication.ActivateApp") - :Do(function(_,data) - self.hmiConnection:SendResponse(data.id,"BasicCommunication.ActivateApp", "SUCCESS", {}) - end) - :Times(2) - end - end) - - self.mobileSession:ExpectNotification("OnHMIStatus", {hmiLevel = "FULL"}) - :Timeout(12000) - - end - - -- Verification that SDL doesn't resend appropriate OnButtonPress and OnButtonEvent notifications to App - local mode = {"SHORT", "LONG"} - for j=1,#mode do - --check OnButtonEvent and OnButtonPress when clicking on this button - strTestCaseName = "TC_SubscribeButton_08_Click_UnsubscribedButton_PRESET_1".. mode[j] - TC_OnButtonEvent_OnButtonPress_When_UnsubscribedButton(self, "PRESET_1", mode[j], strTestCaseName) - end - - --Subscribe PRESET_1 button - strTestCaseName = "TC_SubscribeButton_08_SubscribeButton_PRESET_1_SUCCESS_With_OnButtonSubscription" - TC_SubscribeButtonSUCCESS(self, "PRESET_1", strTestCaseName) - - --Turn off transport - function Test:TC_SubscribeButton_08_TurnOffTransport() - self.mobileSession:Stop() - - EXPECT_HMINOTIFICATION("BasicCommunication.OnAppUnregistered", {appID = self.appId, unexpectedDisconnect = true}) - :Timeout(2000) - - EXPECT_HMINOTIFICATION("Buttons.OnButtonSubscription") - :Times(0) - - end - - --Turn on transport: Opening new session - function Test:TC_SubscribeButton_08_TurnOnTransportAddNewSession() - -- Connected expectation - self.mobileSession = mobile_session.MobileSession( - self, - self.mobileConnection) - - self.mobileSession:StartService(7) - end - - --RegisterAppInterface - function Test:TC_SubscribeButton_08_RegisterAppInterfaceAndCheckOnButtonSubscription() - RegisterAppInterface(self, 1) - end - - --Verification that SDL resend OnButtonEvent and OnButtionPress notifications to App - --local mode = {"SHORT", "LONG"} - for j=1,#mode do - --check OnButtonEvent and OnButtonPress when clicking on this button - strTestCaseName = "TC_SubscribeButton_08_Click_SubscribedButton_PRESET_1_".. mode[j] - TC_OnButtonEvent_OnButtonPress_When_SubscribedButton(self, "PRESET_1", mode[j], strTestCaseName) - end - end - Steps_4_9() - - --End test case SequenceCheck.8 - - ----------------------------------------------------------------------------------------- - - --Write TEST_BLOCK_VI_End to ATF log - function Test:TEST_BLOCK_VI_End() - print("********************************************************************") - end - - --End test suit SequenceCheck - ----------------------------------------------------------------------------------------------- ------------------------------------------VII TEST BLOCK--------------------------------------- ---------------------------------------Different HMIStatus------------------------------------- ----------------------------------------------------------------------------------------------- - --Description: processing of request/response in different HMIlevels, SystemContext, AudioStreamingState - - --Begin test suit DifferentHMIlevel - --Description: processing API in different HMILevel - - --Write TEST_BLOCK_VII_Begin to ATF log - function Test:TEST_BLOCK_VII_Begin() - print("********************************************************************") - end - - -- Precondition: Register and activate application again - function Test:RegisterAppInterface() - RegisterAppInterface(self, 1) - end - - function Test:ActivateApplication_FULL() - --HMI send ActivateApp request - ActivateApplication(self, config.application1.registerAppInterfaceParams.appName) - end - - --Begin test case DifferentHMIlevel.1 - --Description: Check SubscribeButton request when application is in LIMITED HMI level - - --Requirement id in JAMA/or Jira ID: SDLAQ-CRS-790 - - --Verification criteria: SubscribeButton is allowed in LIMITED HMI level - - -- Precondtion: Change app to LIMITED - function Test:ChangeHMIToLimited() - - --hmi side: sending BasicCommunication.OnAppDeactivated request - local cid = self.hmiConnection:SendNotification("BasicCommunication.OnAppDeactivated", - { - --appID = self.applications["Test Application"], - appID = appId0, - reason = "GENERAL" - }) - - --mobile side: expect OnHMIStatus notification - EXPECT_NOTIFICATION("OnHMIStatus",{hmiLevel = "LIMITED"}) - - end - - -- Body - for i=1,#buttonName do - - --Precondition for this test case - Precondition_TC_UnsubscribeButton(self, buttonName[i]) - - strTestCaseName = "SubscribeButton_LIMITED_" .. tostring(buttonName[i]).."_SUCCESS" - TC_SubscribeButtonSUCCESS(self, buttonName[i], strTestCaseName) - end - - --End test case DifferentHMIlevel.1 - ----------------------------------------------------------------------------------------- - - - --Begin test case DifferentHMIlevel.4 - --Description: Check SubscribeButton request when application is in NONE HMI level - - --Requirement id in JAMA/or Jira ID: SDLAQ-CRS-790 - - --Verification criteria: SubscribeButton is NOT allowed in NONE HMI level - - -- Precondition 1: Activate app - function Test:Activate_Media_Application() - ActivateApplication(self, config.application1.registerAppInterfaceParams.appName) - end - - -- Precondition 2: Change app to NONE HMI level - function Test:ExitApplication_ChangeTo_NONE_HMILEVEL() - - local function sendUserExit() - --hmi side: sending BasicCommunication.OnExitApplication request - local cid = self.hmiConnection:SendNotification("BasicCommunication.OnExitApplication", - { - appID = self.applications["Test Application"], - reason = "USER_EXIT" - }) - end - - local function SendOnSystemContext1() - --hmi side: sending UI.OnSystemContext request - SendOnSystemContext(self,"MAIN") - end - - local function sendOnAppDeactivate() - --hmi side: sending BasicCommunication.OnAppDeactivated request - local cid = self.hmiConnection:SendNotification("BasicCommunication.OnAppDeactivated", - { - appID = self.applications["Test Application"], - reason = "GENERAL" - }) - end - - --hmi side: sending BasicCommunication.OnSystemContext request - SendOnSystemContext(self,"MENU") - - --hmi side: sending BasicCommunication.OnExitApplication request - RUN_AFTER(sendUserExit, 1000) - - --hmi side: sending UI.OnSystemContext request = MAIN - RUN_AFTER(SendOnSystemContext1, 2000) - - --hmi side: sending BasicCommunication.OnAppDeactivated request - RUN_AFTER(sendOnAppDeactivate, 3000) - - - --mobile side: OnHMIStatus notifications - EXPECT_NOTIFICATION("OnHMIStatus", - { systemContext = "MENU", hmiLevel = "FULL"}, - { systemContext = "MENU", hmiLevel = "NONE"}, - { systemContext = "MAIN", hmiLevel = "NONE"}) - :Times(3) - - end - - -- Body - for i=1,#buttonName do - Test["SubscribeButton_NONE_" ..tostring(buttonName[i]).."_DISALLOWED"] = function(self) - --mobile side: sending SubscribeButton request - local cid = self.mobileSession:SendRPC("SubscribeButton", - { - buttonName = buttonName[i] - }) - - --mobile side: expect SubscribeButton response - EXPECT_RESPONSE(cid, {success = false, resultCode = "DISALLOWED"}) - :Timeout(iTimeout) - - EXPECT_NOTIFICATION("OnHashChange") - :Times(0) - :Timeout(iTimeout) - end - end - - --End test case DifferentHMIlevel.2 - ----------------------------------------------------------------------------------------- - - - --Begin test case DifferentHMIlevel.3 - --Description: Check SubscribeButton request when application is in BACKGOUND HMI level - - --Requirement id in JAMA/or Jira ID: SDLAQ-CRS-790 - - --Verification criteria: SubscribeButton is allowed in BACKGOUND HMI level - - -- Precondition 1: Change all to FULL - function Test:ActivateApplication_ChangeTo_FULL_HMILEVEL() - ActivateApplication(self, config.application1.registerAppInterfaceParams.appName) - end - - -- Precondition 2: Change all to LIMITED - function Test:ChangeHMIToLimited() - --hmi side: sending BasicCommunication.OnAppDeactivated request - local cid = self.hmiConnection:SendNotification("BasicCommunication.OnAppDeactivated", - { - --appID = self.applications["Test Application"], - appID = appId0, - reason = "GENERAL" - }) - - --mobile side: expect OnHMIStatus notification - EXPECT_NOTIFICATION("OnHMIStatus",{hmiLevel = "LIMITED"}) - end - - -- Precondition 3: Activate an other media app to change app to BACKGROUND - function Test:Activate_Media_App2() - --HMI send ActivateApp request - local RequestId = self.hmiConnection:SendRequest("SDL.ActivateApp", { appID = appId2}) - EXPECT_HMIRESPONSE(RequestId) - :Do(function(_,data) - - if data.result.isSDLAllowed ~= true then - local RequestId = self.hmiConnection:SendRequest("SDL.GetUserFriendlyMessage", {language = "EN-US", messageCodes = {"DataConsent"}}) - EXPECT_HMIRESPONSE(RequestId,{result = {code = 0, method = "SDL.GetUserFriendlyMessage"}}) - :Do(function(_,data) - --hmi side: send request SDL.OnAllowSDLFunctionality - self.hmiConnection:SendNotification("SDL.OnAllowSDLFunctionality", {allowed = true, source = "GUI", device = {id = 1, name = "127.0.0.1"}}) - end) - - EXPECT_HMICALL("BasicCommunication.ActivateApp") - :Do(function(_,data) - self.hmiConnection:SendResponse(data.id,"BasicCommunication.ActivateApp", "SUCCESS", {}) - end) - :Times(2) - end - end) - - self.mobileSession2:ExpectNotification("OnHMIStatus", {hmiLevel = "FULL"}) - :Timeout(12000) - - self.mobileSession:ExpectNotification("OnHMIStatus", {hmiLevel = "BACKGROUND"}) - - end - - -- Body - for i=1,#buttonName do - - --Precondition for this test case - Precondition_TC_UnsubscribeButton(self, buttonName[i]) - - strTestCaseName = "SubscribeButton_BACKGOUND_" .. tostring(buttonName[i]).."_SUCCESS" - TC_SubscribeButtonSUCCESS(self, buttonName[i], strTestCaseName) - end - - --End test case DifferentHMIlevel.3 - ----------------------------------------------------------------------------------------- - - --Write TEST_BLOCK_VII_End to ATF log - function Test:TEST_BLOCK_VII_End() - print("********************************************************************") - end - - --End test suit DifferentHMIlevel - - - -return Test - diff --git a/test_scripts/API/ATF_UTF-8.lua b/test_scripts/API/ATF_UTF-8.lua deleted file mode 100644 index 3a18be1047..0000000000 --- a/test_scripts/API/ATF_UTF-8.lua +++ /dev/null @@ -1,466 +0,0 @@ - -config.defaultProtocolVersion = 4 - -Test = require('connecttest') -require('cardinalities') -require('user_modules/AppTypes') -local events = require('events') -local mobile_session = require('mobile_session') -local config = require('config') - -local commonPreconditions = require ('/user_modules/shared_testcases/commonPreconditions') -local srcPath = config.pathToSDL .. "smartDeviceLink.ini" -local dstPath = config.pathToSDL .. "smartDeviceLink.ini.origin" - - ----------------------------------------------------------------------------- --- User functions -function DelayedExp(time) - local event = events.Event() - event.matches = function(self, e) return self == e end - EXPECT_EVENT(event, "Delayed event") - :Timeout(time+1000) - RUN_AFTER(function() - RAISE_EVENT(event, event) - end, time) -end - - -local n = 1 -local function ReceivingUpdateAppListaccordingToJsonInSystemRequest(self, JsonFileName, SystemRequestResultCode, UpdateAppListParams ) - local UpdateAppListTimes - local successValue - local msg = - { - serviceType = 7, - frameInfo = 0, - rpcType = 2, - rpcFunctionId = 32768, - rpcCorrelationId = 0, - payload = '{"hmiLevel" :"FULL", "audioStreamingState" : "AUDIBLE", "systemContext" : "MAIN"}' - } - - self.mobileSession:Send(msg) - - if - SystemRequestResultCode == "SUCCESS" then - UpdateAppListTimes = 2 - successValue = true - else - UpdateAppListTimes = 1 - successValue = false - end - - local FileFolder - local FileName - - FileFolder, FileName = JsonFileName:match("([^/]+)/([^/]+)") - - --mobile side: OnSystemRequest notification - EXPECT_NOTIFICATION("OnSystemRequest", - { requestType = "LOCK_SCREEN_ICON_URL" }, - { requestType = "QUERY_APPS" }) - :Do(function(_,data) - if data.payload.requestType == "LOCK_SCREEN_ICON_URL" then - local CorIdSystemRequest = self.mobileSession:SendRPC("SystemRequest", - { - requestType = "QUERY_APPS", - fileName = FileName - }, - "files/jsons/" .. tostring(JsonFileName)) - - --mobile side: SystemRequest response - self.mobileSession:ExpectResponse(CorIdSystemRequest, { success = successValue, resultCode = SystemRequestResultCode}) - end - end) - :Times(2) - - -------------------------------------------- - --TODO: remove after resolving APPLINK-16052 - for i=1,#UpdateAppListParams.applications do - if UpdateAppListParams.applications[i].deviceInfo then - UpdateAppListParams.applications[i].deviceInfo = nil - end - end - -------------------------------------------- - - --hmi side: BasicCommunication.UpdateAppList - EXPECT_HMICALL("BasicCommunication.UpdateAppList", - {}, - UpdateAppListParams) - :ValidIf(function(exp,data) - if exp.occurences == 2 then - - if - data.params and - data.params.applications and - #data.params.applications == #UpdateAppListParams.applications then - return true - else - print(" \27[36m Application array in BasicCommunication.UpdateAppList contains "..tostring(#data.params.applications)..", expected " .. tostring(#UpdateAppListParams.applications) .. " \27[0m") - return false - end - elseif - exp.occurences == 1 then - return true - end - end) - :Do(function(data) - self.hmiConnection:SendResponse(data.id, data.method, "SUCCESS", { }) - end) - :Times(UpdateAppListTimes) -end ----------------------------------------------------------------------------- --- set value of EnableProtocol4 to "true" in smartDeviceLink.ini file -local function SetEnableProtocol4toTrue() - -- read current content - local ini_file = io.open(srcPath, "r") - -- read content - local content = ini_file:read("*a") - ini_file:close() - - -- substitute pattern with "true" - local res = string.gsub(content, "EnableProtocol4%s-=%s-false", "EnableProtocol4 = true") - - if res then - -- now save data with correct value - ini_file = io.open(srcPath, "w+") - -- write result into dstfile - ini_file:write(res) - ini_file:close() - end - - -- check if set successfuly - local check = string.find(res, "EnableProtocol4%s-=%s-true") - if ( check ~= nil) then - print ("value of EnableProtocol4 = true") - return true - else - print ("incorrect value of EnableProtocol4") - return false - end - -end --------------------------------------------------------------------------- ---make reserve copy of smartDeviceLink.ini file -commonPreconditions:BackupFile("smartDeviceLink.ini") -print ("Backuping smartDeviceLink.ini") - --- set value of "EnableProtocol4" in smartDeviceLink.ini to "true" -SetEnableProtocol4toTrue() - ---TODO: remove after resolving APPLINK-16052 -print ("\27[33m Because of ATF defect APPLINK-16052 check of deviceInfo params in BC.UpdateAppList is commented \27[0m") - ---===================================================================================-- --- Check that SDL write correctly the strings with character's size more than one byte from language struct to the "vrSynonyms", "ttsName", appName params and send via UpdateAppList ---===================================================================================-- - -local LanguagesValue = {"AR-SA", "FR-FR", "DE-DE", "JA-JP", "KO-KR", "RU-RU", "ES-MX"} -local LanguagesNames = {"Arabic", "French", "German", "Japanese", "Korean", "Russian", "Spanish"} - -local vrSynonymsttsNamesappNameValuesFirstApp = -{ - AR_SA = { - -- string with 20 characters, totaling 38 bytes - name = "موسيقى الراب التطبيق", - -- string with 59 characters, totaling 110 bytes - ttsName = "الراب والموسيقى التطبيق تحويل النص إلى كلام الاسم الاÙتراضي", - -- string with 32 characters, totaling 59 bytes - vrSynonyms = { - "موسيقى الراب التطبيق 1 الاÙتراضي", - "موسيقى الراب التطبيق 2 الاÙتراضي" - } - }, - FR_FR = { - -- string with 32 characters, totaling 36 bytes - name = "Rap Application icôneFrançaiseÂâ", - -- string with 20 characters, totaling 24 bytes - ttsName = "icôneFrançaiseÂâ TTS", - -- string with 34 characters, totaling 38 bytes - vrSynonyms = { - "Rap Application 1 icôneFrançaiseÂâ", - "Rap Application 2 icôneFrançaiseÂâ" - } - }, - DE_DE = { - -- string with 29 characters, totaling 31 bytes - name = "Rap Application SchaltflächeÃœ", - -- string with 17 characters, totaling 19 bytes - ttsName = "SchaltflächeÃœ TTS", - -- string with 31 characters, totaling 33 bytes - vrSynonyms = { - "Rap Application 1 SchaltflächeÃœ", - "Rap Application 2 SchaltflächeÃœ" - } - }, - JA_JP = { - -- string with 11 characters, totaling 33 bytes - name = "ラップアプリケーション", - -- string with 14 characters, totaling 36 bytes - ttsName = "ラップアプリケーションTTS", - -- string with 14 characters, totaling 36 bytes - vrSynonyms = { - "ラップアプリケーション 1 ", - "ラップアプリケーション 2 " - } - }, - KO_KR = { - -- string with 9 characters, totaling 23 bytes - name = "ëž© ì‘ìš© 프로그램", - -- string with 9 characters, totaling 23 bytes - ttsName = "ëž© ì‘ìš© 프로그램", - -- string with 12 characters, totaling 26 bytes - vrSynonyms = { - "ëž© ì‘ìš© 프로그램 1 ", - "ëž© ì‘ìš© 프로그램 2 " - } - }, - RU_RU = { - -- string with 22 characters, totaling 43 bytes - name = "Музыкальное приложение", - -- string with 22 characters, totaling 43 bytes - ttsName = "Музыкальное приложение", - -- string with 25 characters, totaling 46 bytes - vrSynonyms = { - "Музыкальное приложение 1 ", - "Музыкальное приложение 2 " - } - }, - ES_MX = { - -- string with 14 characters, totaling 15 bytes - name = "Rap Aplicación", - -- string with 14 characters, totaling 15 bytes - ttsName = "Rap Aplicación", - -- string with 32 characters, totaling 33 bytes - vrSynonyms = { - "Predeterminado Aplicación Rap 1 ", - "Predeterminado Aplicación Rap 2 " - } - } -} - -local vrSynonymsttsNamesappNameValuesSecondApp = -{ - AR_SA = { - -- string with 100 characters, totaling 181 bytes - name = "لة لمنزمنزل نزل شرة لة لمنزمنزل نزل شرة لة لة لة العرض حيةازمنزل نزل شرة لة لة لة العرض حيةاجبلحيةجج", - -- string with 500 characters, totaling 914 bytes - ttsName = "منزمنزل نزل شرة لة لمنزمنزل نزل شرة لة لمنزمنزل نزل شرة لة لمنزمنزل نزل شرة لة لمنزمنزل نزل شرة لة لمنزمنزل نزل شرة لة لة لة العرض حيةازمنزل نزل شرة لة لة لة العرض حيةاجبلحيةجبلحيةاجمنةاجب لحيةاجبحيبحيةاجمنزمنزل نزل شرة لة لة Ù„ Ø© العرض حيةاجيةاجلحيةامنزمنزل نزل شرة لة لمنزمنزل نزل شرة لة لمنزمنزل نزل شرة لة لمنزمنزل نزل شرة لة لمنزمنزل نزل شرة لة لمنزمنزل نزل شرة لة لة لة العرض حيةازمنزل نزل شرة لة لة لة العرض حيةاجبلحيةجبلحيةاجمنةاجب لحيةاجبحيبحيةاجمنزمنزل نزل شرة لة لة Ù„ Ø© العرض حيةاجيةاججةاجج", - -- string with 40 characters, totaling 72 bytes - vrSynonyms = { - "لة لمنزمنزل نزل شرة لة لمنزمنزل نزل شرة1", - "لة لمنزمنزل نزل شرة لة لمنزمنزل نزل شرة2" - } - }, - FR_FR = { - -- string with 100 characters, totaling 134 bytes - name = "l'icôneFrançaiseÂâÊêaisondel'arbrelcdelaforêtÎîÔlaforôÛûÀàÈèÙËëÃïÜüŸÿÇçl'icôneFrançaiseÂâÊêaisondell", - -- string with 500 characters, totaling 688 bytes - ttsName = "l'icôneFrançaiseÂâÊêaisondel'arbrelacdelaforêtÎîÔôÛûÀàÈèÙËëÃïÜüŸÿÇçl'icôneFrançaiseÂâÊêaisondel'arbrelÜüŸÿÇçl'ôneaiseÂâÊêaisondel'arbrelacdeladel'arbrelacdelaforêtÎîÔôÛûÀàÈèÙËëÃïÜüŸÿÇçl'icôneFrançaiseÂâÊêaisondel'arbrelacdelaforêtÎîÔôÛûÀàÈèÙËëÃïÜüŸÿÇl'icôneFrançaiseÂâÊêaisondel'arbrelacdelaforêtÎîÔôÛûÀàÈèÙËëÃïÜüŸÿÇçl'icôneFrançaiseÂâÊêaisondel'arbrelÜüŸÿÇçl'ôneaiseÂâÊêaisondel'arbrelacdeladel'arbrelacdelaforêtÎîÔôÛûÀàÈèÙËëÃïÜüŸÿÇçl'icôneFrançaiseÂâÊêaisondel'arbrelacdelaforêtÎîÔôÛûÀàÈèÙËëÃïÜëÃïï", - -- string with 40 characters, totaling 46 bytes - vrSynonyms = { - "l'icôneFrançaiseÂâÊêaisondel'arbrelcdel1", - "l'icôneFrançaiseÂâÊêaisondel'arbrelcdel2" - } - }, - DE_DE = { - -- string with 100 characters, totaling 132 bytes - name = "SchaltflächeÜüÖöÄänsymbolSchaltflächeÜüÖöÄäsymboÜüÖöÄänsymlSchaltflächeÜüÖöÄänsymbolSchaltflächeÜüÖÖ", - -- string with 500 characters, totaling 634 bytes - ttsName = "SchaltflächeÜüÖöÄänsymbolSchaltflächeÜüÖöÄänsymbolSchaltflächeÜüÖöÄänsymbolSchaltflächeÜüÖöÄänsymbolScÄänsymbolShaltflächeÜüÖöÄänsymbolSchaltflächeÜüÖöÄänsymbolSchaltflächembolSchaltflächeÜüÖöÄänsymbolSchaltflächeÜüÖöÄänsymbolSchaltflächeÜüÖöÄänsymboSchaltflächeÜüÖöÄänsymbolSchaltflächeÜüÖöÄänsymbolSchaltflächeÜüÖöÄänsymbolSchaltflächeÜüÖöÄänsymbolScÄänsymbolShaltflächeÜüÖöÄänsymbolSchaltflächeÜüÖöÄänsymbolSchaltflächembolSchaltflächeÜüÖöÄänsymbolSchaltflächeÜüÖöÄänsymbolSchaltflächeÜüÖöÄänsÄänn", - -- string with 40 characters, totaling 50 bytes - vrSynonyms = { - "SchaltflächeÜüÖöÄänsymbolSchaltflächeÜü1", - "SchaltflächeÜüÖöÄänsymbolSchaltflächeÜü2" - } - }, - JA_JP = { - -- string with 100 characters, totaling 300 bytes - name = "ボタンアイコン言語表示言語表示言語表家示ã®æœ¨ã®å®¶ã®æ£®æ¹–マウントボタンアイコン語表示言語表示言語表示ã®ãƒœã‚¿ãƒ³ãƒœã‚¿ãƒ³ã‚¢ã‚¤ã‚³ãƒ³è¨€èªžè¡¨ç¤ºè¨€èªžè¡¨ç¤ºè¨€èªžè¡¨å®¶ç¤ºã®ã‚¿ãƒ³ã‚¢ã‚¤ã‚³ãƒ³è¨€èªžè¡¨ç¤ºè¨€èªžè¡¨ç¤ºè¨€èªžè¡¨å®¶èªžè¡¨å®¶ç¤ºã®ã®ç¤ºç¤º", - -- string with 500 characters, totaling 1,500 bytes - ttsName = "ボタンアイコン言語表示言語表示言語表家示ã®æœ¨ã®å®¶ã®æ£®æ¹–マウントボタンアイコン語表示言語表示言語表示ã®ãƒœã‚¿ãƒ³ãƒœã‚¿ãƒ³ã‚¢ã‚¤ã‚³ãƒ³è¨€èªžè¡¨ç¤ºè¨€èªžè¡¨ç¤ºè¨€èªžè¡¨å®¶ç¤ºã®æœ¨ã®å®¶ã®æ£®æ¹–マウントボタンアイコン語表示言語表示言語表タンアイコン言語表示言語表示言語表家示ã®æœ¨ã®å®¶ã®æ£®æ¹–マウントボタンアイコン語表示言語表示言語表示ã®ãƒœã‚¿ãƒ³ã‚¢ã‚¤ã‚³ãƒ³è¨€èªžè¡¨ç¤ºè¨€èªžè¡¨ç¤ºè¨€èªžè¡¨å®¶ç¤ºã®æœ¨ã®å®¶ã®æ£®æ¹–マウントボタンアイコン語表示言語表示言語表示ã®ãƒœã‚¿ãƒ³ã‚¢ã‚¤ã‚³ãƒ³è¨€èªžè¡¨ç¤ºè¨€èªžè¡¨ç¤ºè¨€èªžè¡¨å®¶ç¤ºã®æœ¨ã®å®¶ã®æ£®æ¹–マウントボタンアイコン語表示言語表示言ボタンアイコン言語表示言語表示言語表家示ã®æœ¨ã®å®¶ã®æ£®æ¹–マウントボタンアイコン語表示言語表示言語表示ã®ãƒœã‚¿ãƒ³ãƒœã‚¿ãƒ³ã‚¢ã‚¤ã‚³ãƒ³è¨€èªžè¡¨ç¤ºè¨€èªžè¡¨ç¤ºè¨€èªžè¡¨å®¶ç¤ºã®æœ¨ã®å®¶ã®æ£®æ¹–マウントボタンアイコン語表示言語表示言語表タンアイコン言語表示言語表示言語表家示ã®æœ¨ã®å®¶ã®æ£®æ¹–マウントボタンアイコン語表示言語表示言語表示ã®ãƒœã‚¿ãƒ³ã‚¢ã‚¤ã‚³ãƒ³è¨€èªžè¡¨ç¤ºè¨€èªžè¡¨ç¤ºè¨€èªžè¡¨å®¶ç¤ºã®æœ¨ã®å®¶ã®æ£®æ¹–マウントボタンアイコン語表示言語表示言語表示ã®ãƒœã‚¿ãƒ³ã‚¢ã‚¤ã‚³ãƒ³è¨€èªžè¡¨ç¤ºè¨€èªžè¡¨ç¤ºè¨€èªžè¡¨å®¶ç¤ºã®æœ¨ã®å®¶ã®æ£®æ¹–マウントボタンアイコン語表示言語表示言表示ã®ã®è¡¨ç¤ºã®ã®", - -- string with 40 characters, totaling 118 bytes - vrSynonyms = { - "ボタンアイコン言語表示言語表示言語表家示ã®æœ¨ã®å®¶ã®æ£®æ¹–マウントボタンアイコン語1", - "ボタンアイコン言語表示言語表示言語表家示ã®æœ¨ã®å®¶ã®æ£®æ¹–マウントボタンアイコン語2" - } - }, - KO_KR = { - -- string with 100 characters, totaling 300 bytes - name = "버튼아ì´ì½˜ì–¸ì–´í‘œì‹œíŠ¸ë¦¬í•˜ìŠ¤ì˜ë²„튼아ì´ì½˜ì–¸ì–´í‘œì‹œíŠ¸ë¦¬í•˜ìŠ¤ì˜ìˆ²í˜¸ìˆ˜ë§ˆìš´íŠ¸ë²„튼아ì´ì½˜ì–¸ì–´í‘œì‹œíŠ¸ë¦¬í•˜ìš°ë²„튼아ì´ì½˜ì–¸ì–´í‘œì‹œíŠ¸ë¦¬í•˜ìŠ¤ì˜ìˆ²í˜¸ìˆ˜ë§ˆìš´ë§ˆìš´íŠ¸ìš´íŠ¸ë²„튼아ì´ì½˜íŠ¸ë¦¬í•˜ìš°ìŠ¤ì˜ìˆ²í˜¸ìˆ˜ë§ˆì–¸ì–´í‘œì‹œíŠ¸ë¦¬í•˜ìš°ìŠ¤ì˜ìˆ²í˜¸ìˆ˜ìˆ˜", - -- string with 500 characters, totaling 1,500 bytes - ttsName = "버튼아ì´ì½˜ì–¸ì–´í‘œì‹œíŠ¸ë¦¬í•˜ìŠ¤ì˜ë²„튼아ì´ì½˜ì–¸ì–´í‘œì‹œíŠ¸ë¦¬í•˜ìŠ¤ì˜ìˆ²í˜¸ìˆ˜ë§ˆìš´íŠ¸ë²„튼아ì´ì½˜ì–¸ì–´í‘œì‹œíŠ¸ë¦¬í•˜ìš°ë²„튼아ì´ì½˜ì–¸ì–´í‘œì‹œíŠ¸ë¦¬í•˜ìŠ¤ì˜ìˆ²í˜¸ìˆ˜ë§ˆìš´íŠ¸ë²„튼아ì´ì½˜ì–¸ì–´í‘œì‹œíŠ¸ë¦¬í•˜ìš°ìŠ¤ì˜ìˆ²í˜¸ìˆ˜ë§ˆìš´íŠ¸ë²„튼아ì´íŠ¸ë²„튼아트버튼아ì´íŠ¸ë²„ì´ë²„튼아ì´ì½˜ì–¸ì–´í‘œì‹œíŠ¸ë¦¬í•˜ìŠ¤ì˜ìˆ²í˜¸ìˆ˜ë§ˆìš´íŠ¸ë²„튼아ì´ì½˜ì–¸ì–´í‘œì‹œíŠ¸ë¦¬í•˜ìš°ìŠ¤ì˜ìˆ²í˜¸ìˆ˜ë§ˆìš´íŠ¸ë²„튼아ì´íŠ¸ë²„튼아ì´ë²„튼아ì´ì½˜ì–¸ì–´í‘œì‹œíŠ¸ë¦¬í•˜ìŠ¤ì˜ìˆ²í˜¸ìˆ˜ë§ˆìš´íŠ¸ë²„튼아ì´ì½˜ì–¸ì–´í‘œì‹œíŠ¸ë¦¬í•˜ìš°ìŠ¤ì˜ìˆ²í˜¸ìˆ˜ë§ˆìš´íŠ¸ë²„튼아ì´íŠ¸ë²„튼아ì´ë²„튼아ì´ì½˜ì–¸ì–´í‘œì‹œíŠ¸ë¦¬í•˜ìŠ¤ì˜ìˆ²í˜¸ìˆ˜ë§ˆìš´íŠ¸ë²„튼아ì´ì½˜ì–¸ì–´í‘œì‹œíŠ¸ë¦¬í•˜ìš°ìŠ¤ì˜ìˆ²í˜¸ìˆ˜ë§ˆìš´íŠ¸ë²„튼아ì´íŠ¸ë²„튼아ì´ë²„튼아ì´ì½˜ì–¸ì–´í‘œì‹œíŠ¸ë¦¬í•˜ìŠ¤ì˜ë²„튼아ì´ì½˜ì–¸ì–´í‘œì‹œíŠ¸ë¦¬í•˜ìŠ¤ì˜ìˆ²í˜¸ìˆ˜ë§ˆìš´íŠ¸ë²„튼아ì´ì½˜ì–¸ì–´í‘œì‹œíŠ¸ë¦¬í•˜ìš°ë²„튼아ì´ì½˜ì–¸ì–´í‘œì‹œíŠ¸ë¦¬í•˜ìŠ¤ì˜ìˆ²í˜¸ìˆ˜ë§ˆìš´íŠ¸ë²„튼아ì´ì½˜ì–¸ì–´í‘œì‹œíŠ¸ë¦¬í•˜ìš°ìŠ¤ì˜ìˆ²í˜¸ìˆ˜ë§ˆìš´íŠ¸ë²„튼아ì´íŠ¸ë²„튼아트버튼아ì´íŠ¸ë²„ì´ë²„튼아ì´ì½˜ì–¸ì–´í‘œì‹œíŠ¸ë¦¬í•˜ìŠ¤ì˜ìˆ²í˜¸ìˆ˜ë§ˆìš´íŠ¸ë²„튼아ì´ì½˜ì–¸ì–´í‘œì‹œíŠ¸ë¦¬í•˜ìš°ìŠ¤ì˜ìˆ²í˜¸ìˆ˜ë§ˆìš´íŠ¸ë²„튼아ì´íŠ¸ë²„튼아ì´ë²„튼아ì´ì½˜ì–¸ì–´í‘œì‹œíŠ¸ë¦¬í•˜ìŠ¤ì˜ìˆ²í˜¸ìˆ˜ë§ˆìš´íŠ¸ë²„튼아ì´ì½˜ì–¸ì–´í‘œì‹œíŠ¸ë¦¬í•˜ìš°ìŠ¤ì˜ìˆ²í˜¸ìˆ˜ë§ˆìš´íŠ¸ë²„튼아ì´íŠ¸ë²„튼아ì´ë²„튼아ì´ì½˜ì–¸ì–´í‘œì‹œíŠ¸ë¦¬í•˜ìŠ¤ì˜ìˆ²í˜¸ìˆ˜ë§ˆìš´íŠ¸ë²„튼아ì´ì½˜ì–¸ì–´í‘œì‹œíŠ¸ë¦¬í•˜ìš°ìŠ¤ì˜ìˆ²í˜¸ìˆ˜ì˜ìˆ²í˜¸í˜¸", - -- string with 40 characters, totaling 118 bytes - vrSynonyms = { - "버튼아ì´ì½˜ì–¸ì–´í‘œì‹œíŠ¸ë¦¬í•˜ìŠ¤ì˜ë²„튼아ì´ì½˜ì–¸ì–´í‘œì‹œíŠ¸ë¦¬í•˜ìŠ¤ì˜ìˆ²í˜¸ìˆ˜ë§ˆìš´íŠ¸ë²„튼아ì´ì½˜1", - "버튼아ì´ì½˜ì–¸ì–´í‘œì‹œíŠ¸ë¦¬í•˜ìŠ¤ì˜ë²„튼아ì´ì½˜ì–¸ì–´í‘œì‹œíŠ¸ë¦¬í•˜ìŠ¤ì˜ìˆ²í˜¸ìˆ˜ë§ˆìš´íŠ¸ë²„튼아ì´ì½˜2" - } - }, - RU_RU = { - -- string with 100 characters, totaling 200 bytes - name = "вапапкапЩОЗЩШвввввОвапапкапЩОЩШОшщощЙЦУКЕнгшщзхъждвапапкапЩОЗЩШОЩШОшщощЙЦУКЕнгшщзхъждлОРПÐВЫВЫФЯЧССС", - -- string with 500 characters, totaling 1,000 bytes - ttsName = "вапапкапЩОЗЩШвввввОвапапкапЩОЩШОшщощЙЦУКЕнгшщзхъждвапапкапЩОЗЩШОЩШОшщощЙЦУКЕнгшщзхъждлОРПÐВЫВЫФЯЧССМвапапкапЩОЗЩШОЩШОшщощЙЦУКЕнгшщзхъждлОРПÐВЫВЫФЯЧССМвапапкапЩОЗЩШОЩШОшщощЙЦУКЕнгшщзхъждлОРПÐВЫВЫФЯЧССМвапапкапЩОЗЩШОЩШОшщощЙЦУКЕнгшщзхъждлОРПÐВЫВЫФЯЧССМвапапкапЩОЗЩШвввввОвапапкапЩОЩШОшщощЙЦУКЕнгшщзхъждвапапкапЩОЗЩШОЩШОшщощЙЦУКЕнгшщзхъждлОРПÐВЫВЫФЯЧССМвапапкапЩОЗЩШОЩШОшщощЙЦУКЕнгшщзхъждлОРПÐВЫВЫФЯЧССМвапапкапЩОЗЩШОЩШОшщощЙЦУКЕнгшщзхъждлОРПÐВЫВЫФЯЧССМвапапкапЩОЗЩШОЩШОшщощЙЦУКЕнгшщзхъждлОРПÐВЫВЫФыВЫФФ", - -- string with 40 characters, totaling 79 bytes - vrSynonyms = { - "вапапкапЩОЗЩШвввввОвапапкапЩОЩШОшщощЙЦУ1", - "вапапкапЩОЗЩШвввввОвапапкапЩОЩШОшщощЙЦУ2" - } - }, - ES_MX = { - -- string with 100 characters, totaling 112 bytes - name = "ElidpañoibéricopañaHamérioEspañEloibéricoEsoficialElidpañoibéricopañaHamérioEspañEloibéricoEsoficiaa", - -- string with 500 characters, totaling 566 bytes - ttsName = "ElidpañoibéricopañaHamérioEspañEloibéricoEsoficialElidpañoibéricopañaHamérioEspañEloibéricoEsoficialElidpañoibéricopañaHaméricopañaHéréricopañaHioEspañEloibañoibéricopañaHamérioEspañEloibéricoEsoficialElidpañoibéricopañaHmérioEspañEloibéricoEsoficialElidpañoibéricopañaHamérioEspañEloibéricoEsoficialElidpañoibéricopañaHamérioEspañEloibéricoEsoficialElidpañoibéricopañaHaméricopañaHéréricopañaHioEspañEloibañoibéricopañaHamérioEspañEloibéricoEsoficialElidpañoibéricopañaHmérioEspañEloibéricoEsoflsofF", - -- string with 40 characters, totaling 46 bytes - vrSynonyms = { - "ElidpañoibéricopañaHamérioEspañEloibéri1", - "ElidpañoibéricopañaHamérioEspañEloibéri2" - } - } -} - -for i=1, #LanguagesValue do ---for i=1, 2 do - - --Precondition: Change TTS, VR language - Test["Precondition_ChangeVRTTSLanguageOnHMI_" .. tostring(LanguagesValue[i])] = function(self) - - self.hmiConnection:SendNotification("TTS.OnLanguageChange",{language = LanguagesValue[i]}) - self.hmiConnection:SendNotification("VR.OnLanguageChange",{language = LanguagesValue[i]}) - self.hmiConnection:SendNotification("UI.OnLanguageChange",{language = LanguagesValue[i]}) - - EXPECT_NOTIFICATION("OnLanguageChange", {language = LanguagesValue[i], hmiDisplayLanguage = LanguagesValue[i]}) - - if - LanguagesValue[i] == "EN-US" then - - local CorIdUnregisterAppInterface = self.mobileSession:SendRPC("UnregisterAppInterface",{}) - --response on mobile side - EXPECT_RESPONSE(CorIdUnregisterAppInterface, { success = true, resultCode = "SUCCESS"}) - - else - EXPECT_NOTIFICATION("OnAppInterfaceUnregistered", {reason = "LANGUAGE_CHANGE"}) - end - - EXPECT_HMINOTIFICATION("BasicCommunication.OnAppUnregistered", {unexpectedDisconnect = false}) - - EXPECT_HMICALL("BasicCommunication.UpdateAppList") - :Do(function(_,data) - self.hmiConnection:SendResponse(data.id, data.method, "SUCCESS", { }) - end) - - - DelayedExp(1000) - end - - --===================================================================================-- - - --Precondition: Registration of application - Test["TtNameVrSynonymsappName_" .. tostring(LanguagesValue[i])] = function(self) - local CorIdRegister = self.mobileSession:SendRPC("RegisterAppInterface", - { - syncMsgVersion = - { - majorVersion = 4, - minorVersion = 2 - }, - appName = "Test Application", - isMediaApplication = true, - languageDesired = LanguagesValue[i], - hmiDisplayLanguageDesired = LanguagesValue[i], - appHMIType = { "NAVIGATION" }, - appID = "8675308", - deviceInfo = - { - os = "Android", - carrier = "Megafon", - firmwareRev = "Name: Linux, Version: 3.4.0-perf", - osVersion = "4.4.2", - maxNumberRFCOMMPorts = 1 - } - }) - - EXPECT_HMINOTIFICATION("BasicCommunication.OnAppRegistered", - { - application = - { - appName = "Test Application" - } - }) - :Do(function(_,data) - self.applications["Test Application"] = data.params.application.appID - self.appID = data.params.application.appID - end) - - self.mobileSession:ExpectResponse(CorIdRegister, { success = true, resultCode = "SUCCESS"}) - - self.mobileSession:ExpectNotification("OnHMIStatus", - { systemContext = "MAIN", hmiLevel = "NONE", audioStreamingState = "NOT_AUDIBLE"}) - - local LangValue = string.gsub (LanguagesValue[i], "-", "_") - - local UpdateAppListParameters = - { - applications = { - { - appName = "Test Application", - appType = { "NAVIGATION" }, - deviceInfo = { - id = "12ca17b49af2289436f303e0166030a21e525d266e209267433801a8fd4071a0", - isSDLAllowed = true, - name = "127.0.0.1", - transportType = "WIFI" - }, - hmiDisplayLanguageDesired = LanguagesValue[i], - isMediaApplication = true - }, - { - appName = vrSynonymsttsNamesappNameValuesFirstApp[LangValue].name, - deviceInfo = { - id = "12ca17b49af2289436f303e0166030a21e525d266e209267433801a8fd4071a0", - isSDLAllowed = true, - name = "127.0.0.1", - transportType = "WIFI" - }, - greyOut = false, - ttsName = { - { - type = "TEXT", - text = vrSynonymsttsNamesappNameValuesFirstApp[LangValue].ttsName - } - }, - vrSynonyms = vrSynonymsttsNamesappNameValuesFirstApp[LangValue].vrSynonyms - }, - { - appName = vrSynonymsttsNamesappNameValuesSecondApp[LangValue].name, - deviceInfo = { - id = "12ca17b49af2289436f303e0166030a21e525d266e209267433801a8fd4071a0", - isSDLAllowed = true, - name = "127.0.0.1", - transportType = "WIFI" - }, - greyOut = false, - ttsName = { - { - type = "TEXT", - text = vrSynonymsttsNamesappNameValuesSecondApp[LangValue].ttsName - } - }, - vrSynonyms = vrSynonymsttsNamesappNameValuesSecondApp[LangValue].vrSynonyms - } - } - } - - local fileName = "JSONWithdifferentLanguagesForApp_utf-8_" .. tostring(LanguagesNames[i]) .. ".json" - ReceivingUpdateAppListaccordingToJsonInSystemRequest(self, "utf-8/" .. tostring(fileName), "SUCCESS", UpdateAppListParameters) - end - -end - -function Test:RestoreINIFile() - print ("restoring smartDeviceLink.ini") - commonPreconditions:RestoreFile("smartDeviceLink.ini") -end - diff --git a/test_scripts/API/ATF_UnsubscribeWayPoints.lua b/test_scripts/API/ATF_UnsubscribeWayPoints.lua deleted file mode 100644 index 4b390b7e97..0000000000 --- a/test_scripts/API/ATF_UnsubscribeWayPoints.lua +++ /dev/null @@ -1,1016 +0,0 @@ -Test = require('connecttest') -local mobile_session = require('mobile_session') -local mobile = require("mobile_connection") -local tcp = require("tcp_connection") -local file_connection = require("file_connection") -require('cardinalities') -local events = require('events') - ---------------------------------------------------------------------------------------------- ------------------------------Required Shared Libraries--------------------------------------- ---------------------------------------------------------------------------------------------- -local commonFunctions = require('user_modules/shared_testcases/commonFunctions') -local commonSteps = require('user_modules/shared_testcases/commonSteps') -local commonTestCases = require('user_modules/shared_testcases/commonTestCases') - -local floatParameterInNotification = require('user_modules/shared_testcases/testCasesForFloatParameterInNotification') -local stringParameterInNotification = require('user_modules/shared_testcases/testCasesForStringParameterInNotification') -local stringArrayParameterInNotification = require('user_modules/shared_testcases/testCasesForArrayStringParameterInNotification') -local imageParameterInNotification = require('user_modules/shared_testcases/testCasesForImageParameterInNotification') -local testCasesForPolicyTable = require('user_modules/shared_testcases/testCasesForPolicyTable') -local SDLConfig = require('user_modules/shared_testcases/SmartDeviceLinkConfigurations') -require('user_modules/AppTypes') ---------------------------------------------------------------------------------------------- ------------------------------------- Common Variables --------------------------------------- ---------------------------------------------------------------------------------------------- -APIName="UnsubcribleWayPoints" -strMaxLengthFileName255 = string.rep("a", 251) .. ".png" -- set max length file name -local storagePath = config.SDLStoragePath..config.application1.registerAppInterfaceParams.appID.. "_" .. config.deviceMAC.. "/" - ---------------------------------------------------------------------------------------------- ------------------------------------- Common Functions --------------------------------------- --- --------------------------------------------------------------------------------------------- - -local function SubscribeWayPoints_Success(TCName) - - Test[TCName] = function(self) - --self:subscribeWayPoints() - --mobile side: send SubscribeWayPoints request - - --mobile side: send SubscribeWayPoints request - local CorIdSWP = self.mobileSession:SendRPC("SubscribeWayPoints",{}) - - --hmi side: expected SubscribeWayPoints request - EXPECT_HMICALL("Navigation.SubscribeWayPoints") - - :Do(function(_,data) - --hmi side: sending Navigation.SubscribeWayPoints response - self.hmiConnection:SendResponse(data.id, data.method, "SUCCESS",{}) - end) - - --mobile side: SubscribeWayPoints response - EXPECT_RESPONSE(CorIdSWP, {success = true , resultCode = "SUCCESS"}) - - --TODO: This step is failed due to APPLINK-25808 defect. Should be uncommented after defect is fixed. - --EXPECT_NOTIFICATION("OnHashChange") - end -end - -function Test:unSubscribeWayPoints() - --mobile side: sending UnsubscribeWayPoints request - local cid = self.mobileSession:SendRPC("UnsubscribeWayPoints",{}) - - --hmi side: expect UnsubscribeWayPoints request - EXPECT_HMICALL("Navigation.UnsubscribeWayPoints") - :Do(function(_,data) - --hmi side: sending VehicleInfo.UnsubscribeWayPoints response - self.hmiConnection:SendResponse(data.id, data.method, "SUCCESS", {}) - end) - - --mobile side: expect UnsubscribeWayPoints response - EXPECT_RESPONSE(cid, { success = true, resultCode = "SUCCESS" }) - - --mobile side: expect OnHashChange notification - --TODO: This step is failed due to APPLINK-25808 defect. Should be uncommented after defect is fixed. - --EXPECT_NOTIFICATION("OnHashChange") - -end - -function Test:registerAppInterface2() - - config.application2.registerAppInterfaceParams.isMediaApplication=false - config.application2.registerAppInterfaceParams.appHMIType={"DEFAULT"} - - --mobile side: sending request - local CorIdRegister = self.mobileSession1:SendRPC("RegisterAppInterface", config.application2.registerAppInterfaceParams) - - --hmi side: expect BasicCommunication.OnAppRegistered request - EXPECT_HMINOTIFICATION("BasicCommunication.OnAppRegistered", - { - application = - { - appName = config.application2.registerAppInterfaceParams.appName - } - }) - :Do(function(_,data) - self.applications[config.application2.registerAppInterfaceParams.appName] = data.params.application.appID - end) - - --mobile side: expect response - self.mobileSession1:ExpectResponse(CorIdRegister, - { - syncMsgVersion = config.syncMsgVersion - }) - :Timeout(2000) - - --mobile side: expect notification - self.mobileSession1:ExpectNotification("OnHMIStatus", {systemContext = "MAIN", hmiLevel = "NONE", audioStreamingState = "NOT_AUDIBLE"}) - :Timeout(2000) -end - -function Test:registerAppInterface3() - --mobile side: sending request - local CorIdRegister = self.mobileSession2:SendRPC("RegisterAppInterface", config.application3.registerAppInterfaceParams) - - --hmi side: expect BasicCommunication.OnAppRegistered request - EXPECT_HMINOTIFICATION("BasicCommunication.OnAppRegistered", - { - application = - { - appName = config.application3.registerAppInterfaceParams.appName - } - }) - :Do(function(_,data) - self.applications[config.application3.registerAppInterfaceParams.appName] = data.params.application.appID - end) - - --mobile side: expect response - self.mobileSession2:ExpectResponse(CorIdRegister, - { - syncMsgVersion = config.syncMsgVersion - }) - :Timeout(2000) - - --mobile side: expect notification - self.mobileSession2:ExpectNotification("OnHMIStatus", { systemContext = "MAIN", hmiLevel = "NONE", audioStreamingState = "NOT_AUDIBLE"}) - :Timeout(2000) -end ------------------------------------------------------------------------------------- --------------------------------------------Preconditions------------------------------------- ---------------------------------------------------------------------------------------------- - --Activation App - commonSteps:ActivationApp() - - -- PutFiles - commonSteps:PutFile( "PutFile_MinLength", "a") - commonSteps:PutFile( "PutFile_icon.png", "icon.png") - commonSteps:PutFile( "PutFile_action.png", "action.png") - commonSteps:PutFile( "PutFile_MaxLength_255Characters", strMaxLengthFileName255) - - local PermissionLines_SubcribeWayPoints = -[[ "SubscribeWayPoints": { - "hmi_levels": [ - "BACKGROUND", - "FULL", - "LIMITED" - ] - }]] - - local PermissionLines_UnsubcribeWayPoints = -[[ "UnsubscribeWayPoints": { - "hmi_levels": [ - "BACKGROUND", - "FULL", - "LIMITED" - ] - }]] - - local PermissionLinesForBase4 = PermissionLines_SubcribeWayPoints .. ", \n" .. PermissionLines_UnsubcribeWayPoints ..", \n" - local PermissionLinesForGroup1 = nil - local PermissionLinesForApplication = nil - - --ToDo: This TC is blocked on ATF 2.2 by defect APPLINK-19188. Please try ATF on commit f86f26112e660914b3836c8d79002e50c7219f29 - --local PTName = testCasesForPolicyTable:createPolicyTableFile(PermissionLinesForBase4, PermissionLinesForGroup1, PermissionLinesForApplication) - --ToDo: Update when new policy table update flow finishes implementation - -- testCasesForPolicyTable:updatePolicy(PTName) - --local PTName = "files/ptu_general.json" - --testCasesForPolicyTable:Precondition_updatePolicy_By_overwriting_preloaded_pt(PTName) - - function Test:backUpPreloadedPt() - -- body - os.execute('cp ' .. config.pathToSDL .. 'sdl_preloaded_pt.json' .. ' ' .. config.pathToSDL .. 'backup_sdl_preloaded_pt.json') - os.execute('rm ' .. config.pathToSDL .. 'policy.sqlite') - end - - Test:backUpPreloadedPt() - - function Test:updatePreloadedJson() - -- body - pathToFile = config.pathToSDL .. 'sdl_preloaded_pt.json' - local file = io.open(pathToFile, "r") - local json_data = file:read("*all") -- may be abbreviated to "*a"; - file:close() - - local json = require("modules/json") - - local data = json.decode(json_data) - for k,v in pairs(data.policy_table.functional_groupings) do - if (data.policy_table.functional_groupings[k].rpcs == nil) then - --do - data.policy_table.functional_groupings[k] = nil - else - --do - local count = 0 - for _ in pairs(data.policy_table.functional_groupings[k].rpcs) do count = count + 1 end - if (count < 30) then - --do - data.policy_table.functional_groupings[k] = nil - end - end - end - - data.policy_table.functional_groupings["Base-4"]["rpcs"]["SubscribeWayPoints"] = {} - data.policy_table.functional_groupings["Base-4"]["rpcs"]["SubscribeWayPoints"]["hmi_levels"] = {"BACKGROUND", "FULL","LIMITED"} - - data.policy_table.functional_groupings["Base-4"]["rpcs"]["UnsubscribeWayPoints"] = {} - data.policy_table.functional_groupings["Base-4"]["rpcs"]["UnsubscribeWayPoints"]["hmi_levels"] = {"BACKGROUND", "FULL","LIMITED"} - - - data = json.encode(data) - - file = io.open(pathToFile, "w") - file:write(data) - file:close() - end - Test:updatePreloadedJson() - - --------------------------------------------------------------------------------------------- - -----------------------------------------TEST BLOCK I---------------------------------------- - ------CommonRequestCheck: Check of mandatory/conditional request's parameters (mobile protocol)---- - --------------------------------------------------------------------------------------------- - --Postcondition: WayPoints are subcribed successfully. - SubscribeWayPoints_Success("SubscribeWayPoints_Success_1") - --Begin Test suit CommonRequestCheck - --Description: - --Request with no parameters in Full HMI level - --Requirement id in JAMA/or Jira ID: - -- APPLINK-21629 req#1 - - -- Verification criteria: - -- In case mobile app sends the valid UnsuscibeWayPoints_request to SDL and this request is allowed by Policies SDL must: transfer UnsubscribeWayPoints_request_ to HMI respond with received from HMI to mobile app - -- The request for UnsubscribeWayPoints is sent and executed successfully. The response code SUCCESS is returned. - - --Begin Test case CommonRequestCheck.1 - - function Test:UnSubscribeWayPoints_Success() - - self:unSubscribeWayPoints() - - end - - --End Test suit CommonRequestCheck.1 - ----------------------------------------------------------------------------------------------- ------------------------------------------TEST BLOCK II---------------------------------------- ------------------------------Check special cases of Mobile request---------------------------- ----------------------------------------------------------------------------------------------- - -local function SpecialRequestChecks() - - --Print new line to separate new test cases group - commonFunctions:newTestCasesGroup("Test Suite For Special Request Checks") - - --Postcondition: WayPoints are subcribed successfully. - SubscribeWayPoints_Success("SubscribeWayPoints_Success_2") - - --Begin Test case NegativeRequestCheck.1 - --Description: Invalid JSON - --Verification criteria: The request with wrong JSON syntax is sent, the response with INVALID_DATA result code is returned. - --Requirement id in JAMA/or Jira ID: - --APPLINK-21629 #3 (APPLINK-16739) - - function Test:UnsubscribeWayPoints_InvalidJSON() - - self.mobileSession.correlationId = self.mobileSession.correlationId + 1 - - --mobile side: UnsubscribeWayPoints request - local msg = - { - serviceType = 7, - frameInfo = 0, - rpcType = 0, - rpcFunctionId = 43, - rpcCorrelationId = self.mobileSession.correlationId, - --< These checks are not applicable for SubscribeButton request. There is no response from HMI to SDL. + + + + --Write TEST_BLOCK_III_End to ATF log + function Test:TEST_BLOCK_III_End() + print("********************************************************************") + end + +---------------------------------------------------------------------------------------------- +----------------------------------------IV TEST BLOCK----------------------------------------- +---------------------------------------Result code check-------------------------------------- +---------------------------------------------------------------------------------------------- + + --Check all uncovered pairs resultCodes+success + + --Begin test suit ResultCodeCheck + --Description: check result code of response to Mobile (SDLAQ-CRS-532) + + --Write TEST_BLOCK_IV_Begin to ATF log + function Test:TEST_BLOCK_IV_Begin() + print("********************************************************************") + end + + --Begin test case ResultCodeCheck.1 + --Description: Check resultCode: SUCCESS + + --It is covered by CommonRequestCheck.2 (checking request with mandatory parameter) + + --End test case ResultCodeCheck.1 + ----------------------------------------------------------------------------------------- + + --Begin test case ResultCodeCheck.2 + --Description: Check resultCode: INVALID_DATA + + --It is covered by SubscribeButton_buttonName_IsInvalidValue_nonexistent_INVALID_DATA + + --End test case ResultCodeCheck.2 + ----------------------------------------------------------------------------------------- + + + --Begin test case ResultCodeCheck.3 + --Description: Check resultCode: OUT_OF_MEMORY + + --Requirement id in JAMA/or Jira ID: SDLAQ-CRS-535 + + --Verification criteria: A SubscribeButton request is sent under conditions of RAM deficite for executing it. The response code OUT_OF_MEMORY is returned + + --ToDo: Can not check this case. + + --End test case ResultCodeCheck.3 + ----------------------------------------------------------------------------------------- + + --Begin test case ResultCodeCheck.4 + --Description: Check resultCode: TOO_MANY_PENDING_REQUESTS + + --Requirement id in JAMA/or Jira ID: SDLAQ-CRS-536 + + --Verification criteria: SDL response TOO_MANY_PENDING_REQUESTS resultCode + + --Move to another script: ATF_SubscribeButton_TOO_MANY_PENDING_REQUESTS.lua + + --End test case ResultCodeCheck.4 + ----------------------------------------------------------------------------------------- + + --Begin test case ResultCodeCheck.5 + --Description: Check resultCode: APPLICATION_NOT_REGISTERED + + --Requirement id in JAMA/or Jira ID: SDLAQ-CRS-537 + + --Verification criteria: SDL responses APPLICATION_NOT_REGISTERED resultCode + + --Description: Unregister application + function Test:UnregisterAppInterface_Success() + local cid = self.mobileSession:SendRPC("UnregisterAppInterface",{}) + + EXPECT_RESPONSE(cid, { success = true, resultCode = "SUCCESS"}) + :Timeout(2000) + end + + --Description: Send SubscribeButton when application not registered yet. + + for i=1,#buttonName do + + --Precondition for this test case + --Precondition_TC_UnsubscribeButton(self, buttonName[i]) + + Test["SubscribeButton_resultCode_APPLICATION_NOT_REGISTERED_" .. tostring(buttonName[i]).."_APPLICATION_NOT_REGISTERED"] = function(self) + + --mobile side: sending SubscribeButton request + local cid = self.mobileSession:SendRPC("SubscribeButton", + { + buttonName = buttonName[i] + } + ) + + --mobile side: expect SubscribeButton response + EXPECT_RESPONSE(cid, {success = false, resultCode = "APPLICATION_NOT_REGISTERED", info = nil}) + :Timeout(iTimeout) + + EXPECT_NOTIFICATION("OnHashChange") + :Times(0) + :Timeout(iTimeout) + end + + end + + --End test case ResultCodeCheck.5 + ----------------------------------------------------------------------------------------- + + --Begin test case ResultCodeCheck.6 + --Description: Check resultCode: REJECTED + + --Requirement id in JAMA/or Jira ID: SDLAQ-CRS-538 + + --Verification criteria: + --1. SDL must return "resultCode: REJECTED, success: false" to SubscribeButton (SEEKLEFT) in case such RPC comes from non-media app. + --2. SDL must return "resultCode: REJECTED, success: false" to SubscribeButton (SEEKRIGHT) in case such RPC comes from non-media app. + --3. SDL must return "resultCode: REJECTED, success: false" to SubscribeButton (TUNEUP) in case such RPC comes from non-media app. + --4. SDL must return "resultCode: REJECTED, success: false" to SubscribeButton (TUNEDOWN) in case such RPC comes from non-media app. + + + -- register non-media application 2 + function Test:RegisterNon_Media_AppInterface() + RegisterAppInterface(self, 2) + end + + function Test:Activate_Non_Media_Application() + --HMI send ActivateApp request + --ActivateApplication(self) + ActivateApplication(self, application2_nonmedia.registerAppInterfaceParams.appName) + end + + buttonName1 = {"SEEKLEFT", "SEEKRIGHT", "TUNEUP", "TUNEDOWN"} + for i=1,#buttonName1 do + + Test["SubscribeButton_resultCode_REJECTED_" .. tostring(buttonName1[i]).."_REJECTED"] = function(self) + + --mobile side: sending SubscribeButton request + local cid = self.mobileSession:SendRPC("SubscribeButton", + { + buttonName = buttonName1[i] + } + ) + + --mobile side: expect SubscribeButton response + EXPECT_RESPONSE(cid, {success = false, resultCode = "REJECTED", info = nil}) + :Timeout(iTimeout) + + EXPECT_NOTIFICATION("OnHashChange") + :Times(0) + :Timeout(iTimeout) + end + + end + + --Description: Unregister non-media application + function Test:UnregisterAppInterface_Success() + local cid = self.mobileSession:SendRPC("UnregisterAppInterface",{}) + + EXPECT_RESPONSE(cid, { success = true, resultCode = "SUCCESS"}) + :Timeout(2000) + end + + -- register media application 1 + function Test:Register_Media_AppInterface() + RegisterAppInterface(self, 1) + end + + + function Test:Activate_Media_Application() + --HMI send ActivateApp request + ActivateApplication(self, config.application1.registerAppInterfaceParams.appName) + end + + --End test case ResultCodeCheck.6 + ----------------------------------------------------------------------------------------- + + --Begin test case ResultCodeCheck.7 + --Description: Check resultCode: IGNORED + + --Requirement id in JAMA/or Jira ID: SDLAQ-CRS-539 + + --Verification criteria: In case the application sends a SubscribeButton request for a button previously subscribed, SDL sends the IGNORED resultCode to mobile side. General result success=false. + + for i=1,#buttonName do + + --Precondition for this test case + Precondition_TC_SubscribeButton(self, buttonName[i]) + + Test["SubscribeButton_resultCode_IGNORED_" .. tostring(buttonName[i]).."_IGNORED"] = function(self) + + --mobile side: sending SubscribeButton request + local cid = self.mobileSession:SendRPC("SubscribeButton", + { + buttonName = buttonName[i] + } + ) + + --mobile side: expect SubscribeButton response + EXPECT_RESPONSE(cid, {success = false, resultCode = "IGNORED", info = nil}) + :Timeout(iTimeout) + + EXPECT_NOTIFICATION("OnHashChange") + :Times(0) + :Timeout(iTimeout) + end + + end + + --End test case ResultCodeCheck.7 + ----------------------------------------------------------------------------------------- + + --Begin test case ResultCodeCheck.8 + --Description: Check resultCode: UNSUPPORTED_RESOURCE + + --Requirement id in JAMA/or Jira ID: SDLAQ-CRS-541 + + --Verification criteria: If subscribe for CUSTOM_BUTTON button which isn't supported on the HMI the response with the resultCode UNSUPPORTED_RESOURCE is returned. General request result success=false. + + for i=1,#UnsupportButtonName do + + Test["SubscribeButton_resultCode_UNSUPPORTED_RESOURCE_" .. tostring(UnsupportButtonName[i]).."_result_UNSUPPORTED_RESOURCE"] = function(self) + + --mobile side: sending SubscribeButton request + local cid = self.mobileSession:SendRPC("SubscribeButton", + { + buttonName = UnsupportButtonName[i] + } + ) + + --mobile side: expect SubscribeButton response + EXPECT_RESPONSE(cid, {success = false, resultCode = "UNSUPPORTED_RESOURCE", info = nil}) + :Timeout(iTimeout) + + EXPECT_NOTIFICATION("OnHashChange") + :Times(0) + :Timeout(iTimeout) + end + + end + + --End test case ResultCodeCheck.8 + ----------------------------------------------------------------------------------------- + + --Begin test case ResultCodeCheck.9 + --Description: Check resultCode: GENERIC_ERROR + + --Requirement id in JAMA/or Jira ID: SDLAQ-CRS-540 + + --Verification criteria: GENERIC_ERROR comes as a result code in response when all other codes aren't applicable or the unknown issue occured. + + --ToDo: Can not check this case + + --End test case ResultCodeCheck.9 + ----------------------------------------------------------------------------------------- + + + --Write TEST_BLOCK_IV_End to ATF log + function Test:TEST_BLOCK_IV_End() + print("********************************************************************") + end + + --End test suit ResultCodeCheck + + + + + + +---------------------------------------------------------------------------------------------- +-----------------------------------------V TEST BLOCK----------------------------------------- +---------------------------------------HMI negative cases------------------------------------- +---------------------------------------------------------------------------------------------- + + --------Checks----------- + -- requests without responses from HMI + -- invalid structure os response + -- several responses from HMI to one request + -- fake parameters + -- HMI correlation id check + -- wrong response with correct HMI id + + + -- SubscribeButton API does not have any response from HMI. This test suit is not applicable => Ignore + + --Write TEST_BLOCK_V_Begin to ATF log + function Test:TEST_BLOCK_V_Begin() + print("********************************************************************") + end + + --Write TEST_BLOCK_V_End to ATF log + function Test:TEST_BLOCK_V_End() + print("********************************************************************") + end + + +---------------------------------------------------------------------------------------------- +-----------------------------------------VI TEST BLOCK---------------------------------------- +-------------------------Sequence with emulating of user's action(s)-------------------------- +---------------------------------------------------------------------------------------------- + + --Begin test suit SequenceCheck + --Description: TC's checks SDL behavior by processing + -- different request sequence with timeout + -- with emulating of user's actions + + --Write TEST_BLOCK_VI-_Begin to ATF log + function Test:TEST_BLOCK_VI_Begin() + print("********************************************************************") + end + + --Begin test case SequenceCheck.1-5 + --Description: check scenario in test case TC_SubscribeButton_01 - 05: + + --Requirement id in JAMA/or Jira ID: SDLAQ-CRS-61, SDLAQ-CRS-175 + + --Verification criteria: SubscribeButton option check for OK, SEEKRIGHT, SEEKLEFT,.. . Make actions on UI to check the subscription on buttons (Long/Short press) + + local buttonName1 = buttonName + local mode = {"SHORT", "LONG"} + for i=1,#buttonName1 do + + --Precondition for this test case: Unsubscribe button + Precondition_TC_UnsubscribeButton(self, buttonName1[i]) + + for j=1,#mode do + --check OnButtonEvent and OnButtonPress when clicking on this button + strTestCaseName = "TC_SubscribeButton_01_05_Click_UnsubscribedButton_"..buttonName1[i] .."_".. mode[j] + TC_OnButtonEvent_OnButtonPress_When_UnsubscribedButton(self, buttonName1[i], mode[j], strTestCaseName) + end + + --Subscribe button + strTestCaseName = "TC_SubscribeButton_01_05_SubscribeButton_" .. tostring(buttonName[i]).."_SUCCESS" + TC_SubscribeButtonSUCCESS(self, buttonName[i], strTestCaseName) + + for j=1,#mode do + --check OnButtonEvent and OnButtonPress when clicking on this button + strTestCaseName = "TC_SubscribeButton_01_05_Click_SubscribedButton_"..buttonName1[i] .."_".. mode[j] + TC_OnButtonEvent_OnButtonPress_When_SubscribedButton(self, buttonName1[i], mode[j], strTestCaseName) + end + end + + --End test case SequenceCheck.1-5 + ----------------------------------------------------------------------------------------- + + --Begin test case SequenceCheck.6 + --Description: check scenario in test case TC_SubscribeButton_06 + + --Requirement id in JAMA/or Jira ID: SDLAQ-CRS-61 + + --Verification criteria: SDL must send media-buttons related notifications to one MEDIA app only (of FULL or LIMITED HMILevel) + + -- Write TC_SubscribeButton_06_Begin to ATF log + function Test:TC_SubscribeButton_06_Begin() + --Just write to log of ATF a test case to mark as begin of this manual test case + end + + -- Change App0 to Limited to allow change App1 to FULL + function Test:TC_SubscribeButton_06_Change_App0_To_LIMITED_HMI_LEVEL() + --hmi side: sending BasicCommunication.OnAppDeactivated request + appId0 = self.applications["Test Application"] + local cid = self.hmiConnection:SendNotification("BasicCommunication.OnAppDeactivated", + { + appID = self.applications["Test Application"], + reason = "GENERAL" + }) + + --mobile side: expect OnHMIStatus notification + EXPECT_NOTIFICATION("OnHMIStatus",{hmiLevel = "LIMITED", audioStreamingState = "AUDIBLE", systemContext = "MAIN"}) + + end + + --Precondition: Opening new session 1 + function Test:TC_SubscribeButton_06_AddNewSession() + -- Connected expectation + self.mobileSession1 = mobile_session.MobileSession( + self, + self.mobileConnection) + + self.mobileSession1:StartService(7) + end + + -- Register app1 + function Test:TC_SubscribeButton_06_Register_Non_Media_App1() + + --mobile side: RegisterAppInterface request + local CorIdRAI = self.mobileSession1:SendRPC("RegisterAppInterface", + { + syncMsgVersion = + { + majorVersion = 2, + minorVersion = 2, + }, + appName ="SPT1", + --isMediaApplication = true, + isMediaApplication = false, + languageDesired ="EN-US", + hmiDisplayLanguageDesired ="EN-US", + appID ="1", + ttsName = + { + { + text ="SyncProxyTester1", + type ="TEXT", + }, + }, + vrSynonyms = + { + "vrSPT1", + } + }) + + --hmi side: expect BasicCommunication.OnAppRegistered request + EXPECT_HMINOTIFICATION("BasicCommunication.OnAppRegistered", + { + application = + { + appName = "SPT1" + } + }) + :Do(function(_,data) + self.appId1 = data.params.application.appID + end) + + --mobile side: RegisterAppInterface response + self.mobileSession1:ExpectResponse(CorIdRAI, { success = true, resultCode = "SUCCESS"}) + :Timeout(2000) + + self.mobileSession1:ExpectNotification("OnHMIStatus", {hmiLevel = "NONE", audioStreamingState = "NOT_AUDIBLE", systemContext = "MAIN"}) + end + + -- Activate app1 + function Test:TC_SubscribeButton_06_Activate_App1() + --HMI send ActivateApp request + local RequestId = self.hmiConnection:SendRequest("SDL.ActivateApp", { appID = self.appId1}) + EXPECT_HMIRESPONSE(RequestId) + :Do(function(_,data) + + if data.result.isSDLAllowed ~= true then + local RequestId = self.hmiConnection:SendRequest("SDL.GetUserFriendlyMessage", {language = "EN-US", messageCodes = {"DataConsent"}}) + EXPECT_HMIRESPONSE(RequestId,{result = {code = 0, method = "SDL.GetUserFriendlyMessage"}}) + :Do(function(_,data) + --hmi side: send request SDL.OnAllowSDLFunctionality + self.hmiConnection:SendNotification("SDL.OnAllowSDLFunctionality", {allowed = true, source = "GUI", device = {id = config.deviceMAC, name = "127.0.0.1"}}) + + EXPECT_HMICALL("BasicCommunication.ActivateApp") + :Do(function(_,data) + self.hmiConnection:SendResponse(data.id,"BasicCommunication.ActivateApp", "SUCCESS", {}) + end) + :Times(2) + end) + + end + end) + + self.mobileSession1:ExpectNotification("OnHMIStatus", {hmiLevel = "FULL", systemContext = "MAIN"}) + :Timeout(12000) + + end + + -- Subscribe buttons on App1 + for i=1,#buttonNameNonMediaApp do + + strTestCaseName = "TC_SubscribeButton_06_SubscribeButton_for_App1_" .. tostring(buttonNameNonMediaApp[i]).."_SUCCESS" + Test[strTestCaseName] = function(self) + + --mobile side: sending SubscribeButton request + local cid = self.mobileSession1:SendRPC("SubscribeButton", + { + buttonName = buttonNameNonMediaApp[i] + } + ) + + --mobile side: expect SubscribeButton response + self.mobileSession1:ExpectResponse(cid, {success = true, resultCode = "SUCCESS", info = nil}) + :Timeout(iTimeout) + + self.mobileSession:ExpectResponse("SubscribeButton", {}) + :Times(0) + + self.mobileSession1:ExpectNotification("OnHashChange", {}) + + self.mobileSession:ExpectNotification("OnHashChange", {}) + :Times(0) + + DelayedExp(2000) + + end + end + + function Test:TC_SubscribeButton_06_Exit_App1_Change_To_NONE_HMI_LEVEL() + + local function sendUserExit() + --hmi side: sending BasicCommunication.OnExitApplication request + local cid = self.hmiConnection:SendNotification("BasicCommunication.OnExitApplication", + { + appID = self.appId1, + reason = "USER_EXIT" + }) + end + + local function SendOnSystemContext1() + --hmi side: sending UI.OnSystemContext request + SendOnSystemContextOnAppID(self,"MAIN", self.appId1) + end + + local function sendOnAppDeactivate() + --hmi side: sending BasicCommunication.OnAppDeactivated request + local cid = self.hmiConnection:SendNotification("BasicCommunication.OnAppDeactivated", + { + appID = self.appId1, + reason = "GENERAL" + }) + end + + --hmi side: sending BasicCommunication.OnSystemContext request + SendOnSystemContextOnAppID(self,"MENU", self.appId1) + + --hmi side: sending BasicCommunication.OnExitApplication request + RUN_AFTER(sendUserExit, 1000) + + --hmi side: sending UI.OnSystemContext request = MAIN + RUN_AFTER(SendOnSystemContext1, 2000) + + --hmi side: sending BasicCommunication.OnAppDeactivated request + RUN_AFTER(sendOnAppDeactivate, 3000) + + + --mobile side: OnHMIStatus notifications + self.mobileSession1:ExpectNotification("OnHMIStatus", + { systemContext = "MENU", hmiLevel = "FULL"}, + { systemContext = "MENU", hmiLevel = "NONE"}, + { systemContext = "MAIN", hmiLevel = "NONE"}) + :Times(3) + :Timeout(15000) + + end + + -- Opening new session 2 + function Test:TC_SubscribeButton_06_AddNewSession() + -- Connected expectation + self.mobileSession2 = mobile_session.MobileSession( + --self.expectations_list, + self, + self.mobileConnection) + + + self.mobileSession2:StartService(7) + end + + -- Register app2 + function Test:TC_SubscribeButton_06_RegisterAppInterface_App2() + + --mobile side: RegisterAppInterface request + local CorIdRAI = self.mobileSession2:SendRPC("RegisterAppInterface", + { + syncMsgVersion = + { + majorVersion = 2, + minorVersion = 2, + }, + appName ="SPT2", + isMediaApplication = true, + languageDesired ="EN-US", + hmiDisplayLanguageDesired ="EN-US", + appID ="2", + ttsName = + { + { + text ="SyncProxyTester2", + type ="TEXT", + }, + }, + vrSynonyms = + { + "vrSPT2", + } + }) + + --hmi side: expect BasicCommunication.OnAppRegistered request + EXPECT_HMINOTIFICATION("BasicCommunication.OnAppRegistered", + { + application = + { + appName = "SPT2" + } + }) + :Do(function(_,data) + appId2 = data.params.application.appID + end) + + --mobile side: RegisterAppInterface response + self.mobileSession2:ExpectResponse(CorIdRAI, { success = true, resultCode = "SUCCESS"}) + :Timeout(2000) + + self.mobileSession2:ExpectNotification("OnHMIStatus", {hmiLevel = "NONE", audioStreamingState = "NOT_AUDIBLE"}) + end + + -- Activate app2 + function Test:TC_SubscribeButton_06_Activate_App2() + + --HMI send ActivateApp request + local RequestId = self.hmiConnection:SendRequest("SDL.ActivateApp", { appID = appId2}) + EXPECT_HMIRESPONSE(RequestId) + :Do(function(_,data) + + if data.result.isSDLAllowed ~= true then + local RequestId = self.hmiConnection:SendRequest("SDL.GetUserFriendlyMessage", {language = "EN-US", messageCodes = {"DataConsent"}}) + EXPECT_HMIRESPONSE(RequestId,{result = {code = 0, method = "SDL.GetUserFriendlyMessage"}}) + :Do(function(_,data) + --hmi side: send request SDL.OnAllowSDLFunctionality + self.hmiConnection:SendNotification("SDL.OnAllowSDLFunctionality", {allowed = true, source = "GUI", device = {id = 1, name = "127.0.0.1"}}) + end) + + EXPECT_HMICALL("BasicCommunication.ActivateApp") + :Do(function(_,data) + self.hmiConnection:SendResponse(data.id,"BasicCommunication.ActivateApp", "SUCCESS", {}) + end) + :Times(2) + end + end) + + self.mobileSession2:ExpectNotification("OnHMIStatus", {hmiLevel = "FULL"}) + :Timeout(12000) + + end + + -- Subscribe buttons on App2 + for i=1,#buttonName do + + strTestCaseName = "TC_SubscribeButton_06_SubscribeButton_for_App2_" .. tostring(buttonName[i]).."_SUCCESS" + + Test[strTestCaseName] = function(self) + + --mobile side: sending SubscribeButton request + local cid = self.mobileSession2:SendRPC("SubscribeButton", + { + buttonName = buttonName[i] + } + ) + + --mobile side: expect SubscribeButton response + self.mobileSession2:ExpectResponse(cid, {success = true, resultCode = "SUCCESS", info = nil}) + :Timeout(iTimeout) + + self.mobileSession2:ExpectNotification("OnHashChange", {}) + end + + end + + -- Activate App0 + function Test:TC_SubscribeButton_06_Activate_App0() + --HMI send ActivateApp request + ActivateApplication(self, config.application1.registerAppInterfaceParams.appName) + end + + -- Subscribe buttons + for i=1,#buttonName do + --Precondition for this test case + Precondition_TC_UnsubscribeButton(self, buttonName[i]) + + strTestCaseName = "TC_SubscribeButton_06_SubscribeButton_for_App0_" .. tostring(buttonName[i]).."_SUCCESS" + TC_SubscribeButtonSUCCESS(self, buttonName[i], strTestCaseName) + end + + + local buttonName1 = buttonName + local mode = {"SHORT", "LONG"} + + --Click SubScribedButtons on HMI => SDL only send notifications to FULL application, does not send to NONE, BACKGROUND + for i=1,#buttonName1 do + for j=1,#mode do + --check OnButtonEvent and OnButtonPress when clicking on this button + strTestCaseName = "TC_SubscribeButton_06_ClickSubscribedButton_Incase_FULL_BACKGOUND_NONE_Applications_"..buttonName1[i] .."_".. mode[j] + Test[strTestCaseName] = function(self) + + --hmi side: send request Buttons.OnButtonEvent + self.hmiConnection:SendNotification("Buttons.OnButtonEvent", + { + name = buttonName1[i], + mode = "BUTTONDOWN" + }) + + local function OnButtonEventBUTTONUP() + --hmi side: send request Buttons.OnButtonEvent + self.hmiConnection:SendNotification("Buttons.OnButtonEvent", + { + name = buttonName1[i], + mode = "BUTTONUP" + }) + end + + --hmi side: send request Buttons.OnButtonPress + local function OnButtonPress() + self.hmiConnection:SendNotification("Buttons.OnButtonPress", + { + name = buttonName1[i], + mode = mode[j] + }) + end + + if strMode == "LONG" then + --hmi side: send request Buttons.OnButtonPress + RUN_AFTER(OnButtonPress, 50) + + --hmi side: send request Buttons.OnButtonEvent + RUN_AFTER(OnButtonEventBUTTONUP, 100) + + else + --hmi side: send request Buttons.OnButtonEvent + RUN_AFTER(OnButtonEventBUTTONUP, 50) + + --hmi side: send request Buttons.OnButtonPress + RUN_AFTER(OnButtonPress, 100) + end + --------------------------------------------- + + --Verify result on app0 + --Mobile expects OnButtonEvent + EXPECT_NOTIFICATION("OnButtonEvent", + {buttonName = buttonName1[i], buttonEventMode = "BUTTONDOWN"}, + {buttonName = buttonName1[i], buttonEventMode = "BUTTONUP"} + ) + :Times(2) + + --Mobile expects OnButtonEvent + EXPECT_NOTIFICATION("OnButtonPress", {buttonName = buttonName1[i], buttonPressMode = mode[j]})--------------------------------------------- + + --Verify result on app1 + --mobile side: expect notification + self.mobileSession1:ExpectNotification("OnButtonEvent", {}) + :Times(0) + + self.mobileSession1:ExpectNotification("OnButtonPress", {}) + :Times(0) + --------------------------------------------- + + --Verify result on app2 + --mobile side: expect notification + self.mobileSession2:ExpectNotification("OnButtonEvent", {}) + :Times(0) + + self.mobileSession2:ExpectNotification("OnButtonPress", {}) + :Times(0) + --------------------------------------------- + + end + end + end + + --Change application to LIMITED + function Test:TC_SubscribeButton_06_ChangeHMIToLimited() + --hmi side: sending BasicCommunication.OnAppDeactivated request + local cid = self.hmiConnection:SendNotification("BasicCommunication.OnAppDeactivated", + { + appID = self.applications["Test Application"], + reason = "GENERAL" + }) + + --mobile side: expect OnHMIStatus notification + EXPECT_NOTIFICATION("OnHMIStatus",{hmiLevel = "LIMITED"}) + + end + + --Click SubScribedButtons on HMI => SDL only send notifications to LIMITED application, does not send to NONE, BACKGROUND + for i=1,#buttonName1 do + for j=1,#mode do + + --check OnButtonEvent and OnButtonPress when clicking on this button + strTestCaseName = "TC_SubscribeButton_06_ClickSubscribedButton_Incase_LIMITED_BACKGOUND_NONE_Applications_"..buttonName1[i] .."_".. mode[j] + Test[strTestCaseName] = function(self) + + + --hmi side: send request Buttons.OnButtonEvent + self.hmiConnection:SendNotification("Buttons.OnButtonEvent", + { + name = buttonName1[i], + mode = "BUTTONDOWN", + appID = self.applications["Test Application"] + }) + + + local function OnButtonEventBUTTONUP() + --hmi side: send request Buttons.OnButtonEvent + self.hmiConnection:SendNotification("Buttons.OnButtonEvent", + { + name = buttonName1[i], + mode = "BUTTONUP", + appID = self.applications["Test Application"] + }) + end + + --hmi side: send request Buttons.OnButtonPress + local function OnButtonPress() + self.hmiConnection:SendNotification("Buttons.OnButtonPress", + { + name = buttonName1[i], + mode = mode[j], + appID = self.applications["Test Application"] + }) + end + + if strMode == "LONG" then + --hmi side: send request Buttons.OnButtonPress + RUN_AFTER(OnButtonPress, 50) + + --hmi side: send request Buttons.OnButtonEvent + RUN_AFTER(OnButtonEventBUTTONUP, 100) + + else + --hmi side: send request Buttons.OnButtonEvent + RUN_AFTER(OnButtonEventBUTTONUP, 50) + + --hmi side: send request Buttons.OnButtonPress + RUN_AFTER(OnButtonPress, 100) + end + --------------------------------------------- + + --Verify result on app0 + --Mobile expects OnButtonEvent + EXPECT_NOTIFICATION("OnButtonEvent", + {buttonName = buttonName1[i], buttonEventMode = "BUTTONDOWN"}, + {buttonName = buttonName1[i], buttonEventMode = "BUTTONUP"} + ) + :Times(2) + + --Mobile expects OnButtonEvent + EXPECT_NOTIFICATION("OnButtonPress", {buttonName = buttonName1[i], buttonPressMode = mode[j]}) + --------------------------------------------- + + --Verify result on app1 + --mobile side: expect notification + self.mobileSession1:ExpectNotification("OnButtonEvent", {}) + :Times(0) + + self.mobileSession1:ExpectNotification("OnButtonPress", {}) + :Times(0) + --------------------------------------------- + + --Verify result on app2 + --mobile side: expect notification + self.mobileSession2:ExpectNotification("OnButtonEvent", {}) + :Times(0) + + self.mobileSession2:ExpectNotification("OnButtonPress", {}) + :Times(0) + --------------------------------------------- + + end + end + end + + --Print TC_SubscribeButton_06_End in ATF log + function Test:TC_SubscribeButton_06_End() + --Just write to log of ATF a test case to mark as the end of this manual test case + end + + --End test case SequenceCheck.6 + ----------------------------------------------------------------------------------------- + + --Begin test case SequenceCheck.7 + --Description: check scenario in test case TC_SubscribeButton_07 + + --Requirement id in JAMA/or Jira ID: SDLAQ-CRS-2975, SDLAQ-CRS-61 + + --Verification criteria: SubscribeButton option check for CUSTOM_BUTTON and SEARCH + + -- Unregister application + function Test:TC_SubscribeButton_07_UnregisterAppInterface_Success() + local cid = self.mobileSession:SendRPC("UnregisterAppInterface",{}) + + EXPECT_RESPONSE(cid, { success = true, resultCode = "SUCCESS"}) + :Timeout(2000) + end + + -- Register application + function Test:TC_SubscribeButton_07_RegisterAppInterface_And_Check_OnButtonSubscription() + + --mobile side: sending request + local CorIdRegister, strAppName + + CorIdRegister = self.mobileSession:SendRPC("RegisterAppInterface", config.application1.registerAppInterfaceParams) + strAppName = config.application1.registerAppInterfaceParams.appName + + --hmi side: expect BasicCommunication.OnAppRegistered request + EXPECT_HMINOTIFICATION("BasicCommunication.OnAppRegistered", + { + application = + { + appName = strAppName + } + }) + :Do(function(_,data) + local appId = data.params.application.appID + self.appId = appId + appId0 = appId + self.appName = data.params.application.appName + self.applications[strAppName] = appId + + --hmi side: expect OnButtonSubscription request due to APPLINK-12241 + EXPECT_HMINOTIFICATION("Buttons.OnButtonSubscription", {appID = appId0, name = "CUSTOM_BUTTON", isSubscribed=true}) + :Timeout(12000) + end) + + --mobile side: expect response + self.mobileSession:ExpectResponse(CorIdRegister, + { + syncMsgVersion = + { + majorVersion = 3, + minorVersion = 0 + } + }) + :Timeout(12000) + + --mobile side: expect notification + self.mobileSession:ExpectNotification("OnHMIStatus", + { + systemContext = "MAIN", hmiLevel = "NONE", audioStreamingState = "NOT_AUDIBLE" + }) + :Timeout(12000) + + end + + --Activate application + function Test:TC_SubscribeButton_07_Activate_Application() + --HMI send ActivateApp request + local RequestId = self.hmiConnection:SendRequest("SDL.ActivateApp", { appID = appId0}) + EXPECT_HMIRESPONSE(RequestId) + :Do(function(_,data) + + if data.result.isSDLAllowed ~= true then + local RequestId = self.hmiConnection:SendRequest("SDL.GetUserFriendlyMessage", {language = "EN-US", messageCodes = {"DataConsent"}}) + EXPECT_HMIRESPONSE(RequestId,{result = {code = 0, method = "SDL.GetUserFriendlyMessage"}}) + :Do(function(_,data) + --hmi side: send request SDL.OnAllowSDLFunctionality + self.hmiConnection:SendNotification("SDL.OnAllowSDLFunctionality", {allowed = true, source = "GUI", device = {id = 1, name = "127.0.0.1"}}) + end) + + EXPECT_HMICALL("BasicCommunication.ActivateApp") + :Do(function(_,data) + self.hmiConnection:SendResponse(data.id,"BasicCommunication.ActivateApp", "SUCCESS", {}) + end) + :Times(2) + end + end) + + self.mobileSession:ExpectNotification("OnHMIStatus", {hmiLevel = "FULL"}) + :Timeout(12000) + + end + + + --Subscribe CUSTOM_BUTTON button => IGNORE + function Test:TC_SubscribeButton_07_SubscribeButton_CUSTOM_BUTTON_IGNORE_Without_OnButtonSubscription() + + --mobile side: sending SubscribeButton request + local cid = self.mobileSession:SendRPC("SubscribeButton", + { + buttonName = "CUSTOM_BUTTON" + } + ) + + --mobile side: expect SubscribeButton response + EXPECT_RESPONSE(cid, {success = false, resultCode = "IGNORED", info = nil}) + :Timeout(iTimeout) + + EXPECT_NOTIFICATION("OnHashChange") + :Times(0) + + end + + --Subscribe SEARCH button + function Test:TC_SubscribeButton_07_SubscribeButton_SEARCH_SUCCESS_With_OnButtonSubscription() + + --mobile side: sending SubscribeButton request + local cid = self.mobileSession:SendRPC("SubscribeButton", + { + buttonName = "SEARCH" + } + ) + + --mobile side: expect SubscribeButton response + EXPECT_RESPONSE(cid, {success = false, resultCode = "UNSUPPORTED_RESOURCE", info = nil}) + :Timeout(iTimeout) + + EXPECT_NOTIFICATION("OnHashChange") + :Times(0) + + end + + --End test case SequenceCheck.7 + ----------------------------------------------------------------------------------------- + + + --Begin test case SequenceCheck.8 + --Description: check scenario in test case TC_SubscribeButton_08 + + --Requirement id in JAMA/or Jira ID: SDLAQ-CRS-61, SDLAQ-CRS-2974, APPLINK-12241 + + --Verification criteria: Check that SDL doesn't send OnButtonSubscription(false) after app was unregistered or disconnected unexpectedly. + + -- Precondition: Unregister application + function Test:TC_SubscribeButton_08_UnregisterAppInterface_Success() + local cid = self.mobileSession:SendRPC("UnregisterAppInterface",{}) + + EXPECT_RESPONSE(cid, { success = true, resultCode = "SUCCESS"}) + :Timeout(2000) + end + + -- Precondition: Register media application 1 + function Test:TC_SubscribeButton_08_RegisterAppInterfaceAndCheckOnButtonSubscription() + RegisterAppInterface(self, 1) + end + + -- Precondition: Activate app + function Test:TC_SubscribeButton_08_Activate_Application() + --HMI send ActivateApp request + local RequestId = self.hmiConnection:SendRequest("SDL.ActivateApp", { appID = appId0}) + EXPECT_HMIRESPONSE(RequestId) + :Do(function(_,data) + + if data.result.isSDLAllowed ~= true then + local RequestId = self.hmiConnection:SendRequest("SDL.GetUserFriendlyMessage", {language = "EN-US", messageCodes = {"DataConsent"}}) + EXPECT_HMIRESPONSE(RequestId,{result = {code = 0, method = "SDL.GetUserFriendlyMessage"}}) + :Do(function(_,data) + --hmi side: send request SDL.OnAllowSDLFunctionality + self.hmiConnection:SendNotification("SDL.OnAllowSDLFunctionality", {allowed = true, source = "GUI", device = {id = 1, name = "127.0.0.1"}}) + end) + + EXPECT_HMICALL("BasicCommunication.ActivateApp") + :Do(function(_,data) + self.hmiConnection:SendResponse(data.id,"BasicCommunication.ActivateApp", "SUCCESS", {}) + end) + :Times(2) + end + end) + + self.mobileSession:ExpectNotification("OnHMIStatus", {hmiLevel = "FULL"}) + :Timeout(12000) + + end + + --Subscribe PRESET_1 button + strTestCaseName = "TC_SubscribeButton_08_SubscribeButton_PRESET_1_SUCCESS_With_OnButtonSubscription" + TC_SubscribeButtonSUCCESS(self, "PRESET_1", strTestCaseName) + + -- Unregister application: check that SDL doesn't send OnButtonSubscription(false) after app was unregistered or disconnected unexpectedly. + function Test:TC_SubscribeButton_08_UnregisterAppInterface_Without_OnButtonSubscription() + local cid = self.mobileSession:SendRPC("UnregisterAppInterface",{}) + + EXPECT_RESPONSE(cid, { success = true, resultCode = "SUCCESS"}) + :Timeout(2000) + + --hmi side: expect OnButtonSubscription request + EXPECT_HMICALL("OnButtonSubscription") + :Times(0) + end + + local function TC_SubscribeButton_08_Steps_From_4_To_9() + -- Register the same App again + function Test:TC_SubscribeButton_08_RegisterAppInterfaceAndCheckOnButtonSubscription() + RegisterAppInterface(self, 1) + end + + -- Precondition: Activate app + function Test:TC_SubscribeButton_08_Activate_Application() + --HMI send ActivateApp request + local RequestId = self.hmiConnection:SendRequest("SDL.ActivateApp", { appID = appId0}) + EXPECT_HMIRESPONSE(RequestId) + :Do(function(_,data) + + if data.result.isSDLAllowed ~= true then + local RequestId = self.hmiConnection:SendRequest("SDL.GetUserFriendlyMessage", {language = "EN-US", messageCodes = {"DataConsent"}}) + EXPECT_HMIRESPONSE(RequestId,{result = {code = 0, method = "SDL.GetUserFriendlyMessage"}}) + :Do(function(_,data) + --hmi side: send request SDL.OnAllowSDLFunctionality + self.hmiConnection:SendNotification("SDL.OnAllowSDLFunctionality", {allowed = true, source = "GUI", device = {id = 1, name = "127.0.0.1"}}) + end) + + EXPECT_HMICALL("BasicCommunication.ActivateApp") + :Do(function(_,data) + self.hmiConnection:SendResponse(data.id,"BasicCommunication.ActivateApp", "SUCCESS", {}) + end) + :Times(2) + end + end) + + self.mobileSession:ExpectNotification("OnHMIStatus", {hmiLevel = "FULL"}) + :Timeout(12000) + + end + + -- Verification that SDL doesn't resend appropriate OnButtonPress and OnButtonEvent notifications to App + local mode = {"SHORT", "LONG"} + for j=1,#mode do + --check OnButtonEvent and OnButtonPress when clicking on this button + strTestCaseName = "TC_SubscribeButton_08_Click_UnsubscribedButton_PRESET_1".. mode[j] + TC_OnButtonEvent_OnButtonPress_When_UnsubscribedButton(self, "PRESET_1", mode[j], strTestCaseName) + end + + --Subscribe PRESET_1 button + strTestCaseName = "TC_SubscribeButton_08_SubscribeButton_PRESET_1_SUCCESS_With_OnButtonSubscription" + TC_SubscribeButtonSUCCESS(self, "PRESET_1", strTestCaseName) + + --Turn off transport + function Test:TC_SubscribeButton_08_TurnOffTransport() + self.mobileSession:Stop() + + EXPECT_HMINOTIFICATION("BasicCommunication.OnAppUnregistered", {appID = self.appId, unexpectedDisconnect = true}) + :Timeout(2000) + + EXPECT_HMINOTIFICATION("Buttons.OnButtonSubscription") + :Times(0) + + end + + --Turn on transport: Opening new session + function Test:TC_SubscribeButton_08_TurnOnTransportAddNewSession() + -- Connected expectation + self.mobileSession = mobile_session.MobileSession( + self, + self.mobileConnection) + + self.mobileSession:StartService(7) + end + + --RegisterAppInterface + function Test:TC_SubscribeButton_08_RegisterAppInterfaceAndCheckOnButtonSubscription() + RegisterAppInterface(self, 1) + --ToDo: Register again to avoid error: app is unregistered + --RegisterAppInterface(self, 1) + end + + --Verification that SDL resend OnButtonEvent and OnButtionPress notifications to App + --local mode = {"SHORT", "LONG"} + for j=1,#mode do + --check OnButtonEvent and OnButtonPress when clicking on this button + strTestCaseName = "TC_SubscribeButton_08_Click_SubscribedButton_PRESET_1_".. mode[j] + TC_OnButtonEvent_OnButtonPress_When_SubscribedButton(self, "PRESET_1", mode[j], strTestCaseName) + end + end + --Steps_4_9() + TC_SubscribeButton_08_Steps_From_4_To_9() + + --End test case SequenceCheck.8 + ----------------------------------------------------------------------------------------- + + --Write TEST_BLOCK_VI_End to ATF log + function Test:TEST_BLOCK_VI_End() + print("********************************************************************") + end + + --End test suit SequenceCheck + +---------------------------------------------------------------------------------------------- +-----------------------------------------VII TEST BLOCK--------------------------------------- +--------------------------------------Different HMIStatus------------------------------------- +---------------------------------------------------------------------------------------------- + --Description: processing of request/response in different HMIlevels, SystemContext, AudioStreamingState + + --Begin test suit DifferentHMIlevel + --Description: processing API in different HMILevel + + --Write TEST_BLOCK_VII_Begin to ATF log + function Test:TEST_BLOCK_VII_Begin() + print("********************************************************************") + end + + -- Precondition: Register and activate application again + function Test:RegisterAppInterface() + RegisterAppInterface(self, 1) + end + + function Test:ActivateApplication_FULL() + --HMI send ActivateApp request + ActivateApplication(self, config.application1.registerAppInterfaceParams.appName) + end + + --Begin test case DifferentHMIlevel.1 + --Description: Check SubscribeButton request when application is in LIMITED HMI level + + --Requirement id in JAMA/or Jira ID: SDLAQ-CRS-790 + + --Verification criteria: SubscribeButton is allowed in LIMITED HMI level + + -- Precondtion: Change app to LIMITED + function Test:ChangeHMIToLimited() + + --hmi side: sending BasicCommunication.OnAppDeactivated request + local cid = self.hmiConnection:SendNotification("BasicCommunication.OnAppDeactivated", + { + --appID = self.applications["Test Application"], + appID = appId0, + reason = "GENERAL" + }) + + --mobile side: expect OnHMIStatus notification + EXPECT_NOTIFICATION("OnHMIStatus",{hmiLevel = "LIMITED"}) + + end + + -- Body + for i=1,#buttonName do + + --Precondition for this test case + Precondition_TC_UnsubscribeButton(self, buttonName[i]) + + strTestCaseName = "SubscribeButton_LIMITED_" .. tostring(buttonName[i]).."_SUCCESS" + TC_SubscribeButtonSUCCESS(self, buttonName[i], strTestCaseName) + end + + --End test case DifferentHMIlevel.1 + ----------------------------------------------------------------------------------------- + + + --Begin test case DifferentHMIlevel.4 + --Description: Check SubscribeButton request when application is in NONE HMI level + + --Requirement id in JAMA/or Jira ID: SDLAQ-CRS-790 + + --Verification criteria: SubscribeButton is NOT allowed in NONE HMI level + + -- Precondition 1: Activate app + function Test:Activate_Media_Application() + ActivateApplication(self, config.application1.registerAppInterfaceParams.appName) + end + + -- Precondition 2: Change app to NONE HMI level + function Test:ExitApplication_ChangeTo_NONE_HMILEVEL() + + local function sendUserExit() + --hmi side: sending BasicCommunication.OnExitApplication request + local cid = self.hmiConnection:SendNotification("BasicCommunication.OnExitApplication", + { + appID = self.applications["Test Application"], + reason = "USER_EXIT" + }) + end + + local function SendOnSystemContext1() + --hmi side: sending UI.OnSystemContext request + SendOnSystemContext(self,"MAIN") + end + + local function sendOnAppDeactivate() + --hmi side: sending BasicCommunication.OnAppDeactivated request + local cid = self.hmiConnection:SendNotification("BasicCommunication.OnAppDeactivated", + { + appID = self.applications["Test Application"], + reason = "GENERAL" + }) + end + + --hmi side: sending BasicCommunication.OnSystemContext request + SendOnSystemContext(self,"MENU") + + --hmi side: sending BasicCommunication.OnExitApplication request + RUN_AFTER(sendUserExit, 1000) + + --hmi side: sending UI.OnSystemContext request = MAIN + RUN_AFTER(SendOnSystemContext1, 2000) + + --hmi side: sending BasicCommunication.OnAppDeactivated request + RUN_AFTER(sendOnAppDeactivate, 3000) + + + --mobile side: OnHMIStatus notifications + EXPECT_NOTIFICATION("OnHMIStatus", + { systemContext = "MENU", hmiLevel = "FULL"}, + { systemContext = "MENU", hmiLevel = "NONE"}, + { systemContext = "MAIN", hmiLevel = "NONE"}) + :Times(3) + + end + + -- Body + for i=1,#buttonName do + Test["SubscribeButton_NONE_" ..tostring(buttonName[i]).."_DISALLOWED"] = function(self) + --mobile side: sending SubscribeButton request + local cid = self.mobileSession:SendRPC("SubscribeButton", + { + buttonName = buttonName[i] + }) + + --mobile side: expect SubscribeButton response + EXPECT_RESPONSE(cid, {success = false, resultCode = "DISALLOWED"}) + :Timeout(iTimeout) + + EXPECT_NOTIFICATION("OnHashChange") + :Times(0) + :Timeout(iTimeout) + end + end + + --End test case DifferentHMIlevel.2 + ----------------------------------------------------------------------------------------- + + + --Begin test case DifferentHMIlevel.3 + --Description: Check SubscribeButton request when application is in BACKGOUND HMI level + + --Requirement id in JAMA/or Jira ID: SDLAQ-CRS-790 + + --Verification criteria: SubscribeButton is allowed in BACKGOUND HMI level + + -- Precondition 1: Change all to FULL + function Test:ActivateApplication_ChangeTo_FULL_HMILEVEL() + ActivateApplication(self, config.application1.registerAppInterfaceParams.appName) + end + + -- Precondition 2: Change all to LIMITED + function Test:ChangeHMIToLimited() + --hmi side: sending BasicCommunication.OnAppDeactivated request + local cid = self.hmiConnection:SendNotification("BasicCommunication.OnAppDeactivated", + { + --appID = self.applications["Test Application"], + appID = appId0, + reason = "GENERAL" + }) + + --mobile side: expect OnHMIStatus notification + EXPECT_NOTIFICATION("OnHMIStatus",{hmiLevel = "LIMITED"}) + end + + -- Precondition 3: Activate an other media app to change app to BACKGROUND + function Test:Activate_Media_App2() + --HMI send ActivateApp request + local RequestId = self.hmiConnection:SendRequest("SDL.ActivateApp", { appID = appId2}) + EXPECT_HMIRESPONSE(RequestId) + :Do(function(_,data) + + if data.result.isSDLAllowed ~= true then + local RequestId = self.hmiConnection:SendRequest("SDL.GetUserFriendlyMessage", {language = "EN-US", messageCodes = {"DataConsent"}}) + EXPECT_HMIRESPONSE(RequestId,{result = {code = 0, method = "SDL.GetUserFriendlyMessage"}}) + :Do(function(_,data) + --hmi side: send request SDL.OnAllowSDLFunctionality + self.hmiConnection:SendNotification("SDL.OnAllowSDLFunctionality", {allowed = true, source = "GUI", device = {id = 1, name = "127.0.0.1"}}) + end) + + EXPECT_HMICALL("BasicCommunication.ActivateApp") + :Do(function(_,data) + self.hmiConnection:SendResponse(data.id,"BasicCommunication.ActivateApp", "SUCCESS", {}) + end) + :Times(2) + end + end) + + self.mobileSession2:ExpectNotification("OnHMIStatus", {hmiLevel = "FULL"}) + :Timeout(12000) + + self.mobileSession:ExpectNotification("OnHMIStatus", {hmiLevel = "BACKGROUND"}) + + end + + -- Body + for i=1,#buttonName do + + --Precondition for this test case + Precondition_TC_UnsubscribeButton(self, buttonName[i]) + + strTestCaseName = "SubscribeButton_BACKGOUND_" .. tostring(buttonName[i]).."_SUCCESS" + TC_SubscribeButtonSUCCESS(self, buttonName[i], strTestCaseName) + end + + --End test case DifferentHMIlevel.3 + ----------------------------------------------------------------------------------------- + + --Write TEST_BLOCK_VII_End to ATF log + function Test:TEST_BLOCK_VII_End() + print("********************************************************************") + end + + --End test suit DifferentHMIlevel + + + +return Test + From 152b124e664147b2e45ca692a2d6110a5073150d Mon Sep 17 00:00:00 2001 From: DongTaThanh Date: Mon, 25 Jul 2016 14:09:16 +0700 Subject: [PATCH 56/64] Update precondition: Add step update policy table Update PerformAudioPassThru_IncorrectJSON: self.mobileSession.correlationId = self.mobileSession.correlationId + 1 --- test_scripts/API/ATF_PerformAudioPassThru.lua | 8640 +++++++++++++++++ 1 file changed, 8640 insertions(+) create mode 100644 test_scripts/API/ATF_PerformAudioPassThru.lua diff --git a/test_scripts/API/ATF_PerformAudioPassThru.lua b/test_scripts/API/ATF_PerformAudioPassThru.lua new file mode 100644 index 0000000000..59b956b0a9 --- /dev/null +++ b/test_scripts/API/ATF_PerformAudioPassThru.lua @@ -0,0 +1,8640 @@ +Test = require('connecttest') +require('cardinalities') +local events = require('events') +local mobile_session = require('mobile_session') +local mobile = require('mobile_connection') +local tcp = require('tcp_connection') +local file_connection = require('file_connection') + +local module = require('testbase') + +--------------------------------------------------------------------------------------------- +-----------------------------Required Shared Libraries--------------------------------------- +--------------------------------------------------------------------------------------------- +local commonFunctions = require('user_modules/shared_testcases/commonFunctions') +local commonSteps = require('user_modules/shared_testcases/commonSteps') +local commonTestCases = require('user_modules/shared_testcases/commonTestCases') +local policyTable = require('user_modules/shared_testcases/testCasesForPolicyTable') +local integerParameter = require('user_modules/shared_testcases/testCasesForIntegerParameter') +local stringParameterInResponse = require('user_modules/shared_testcases/testCasesForStringParameterInResponse') +local integerParameterInResponse = require('user_modules/shared_testcases/testCasesForIntegerParameterInResponse') +local arrayStringParameterInResponse = require('user_modules/shared_testcases/testCasesForArrayStringParameterInResponse') +require('user_modules/AppTypes') + +--------------------------------------------------------------------------------------------- +------------------------------------ Common Variables --------------------------------------- +--------------------------------------------------------------------------------------------- +APIName = "PerformAudioPassThru" -- set request name + +local infoMessage = string.rep("a", 1000) +local SDLConfig = require('user_modules/shared_testcases/SmartDeviceLinkConfigurations') +local storagePath = config.pathToSDL .. SDLConfig:GetValue("AppStorageFolder") .. "/" .. tostring(config.application1.registerAppInterfaceParams.appID .. "_" .. tostring(config.deviceMAC) .. "/") +local function SendOnSystemContext(self, ctx) + self.hmiConnection:SendNotification("UI.OnSystemContext",{ appID = self.applications["Test Application"], systemContext = ctx }) +end +local function ExpectOnHMIStatusWithAudioStateChanged(self, level, isInitialPrompt,timeout) + if timeout == nil then timeout = 20000 end + if level == nil then level = "FULL" end + + if + level == "FULL" then + if + self.isMediaApplication == true or + Test.appHMITypes["NAVIGATION"] == true then + if isInitialPrompt == true then + EXPECT_NOTIFICATION("OnHMIStatus", + { hmiLevel = level, audioStreamingState = "ATTENUATED", systemContext = "MAIN"}, + { hmiLevel = level, audioStreamingState = "ATTENUATED", systemContext = "HMI_OBSCURED"}, + { hmiLevel = level, audioStreamingState = "AUDIBLE", systemContext = "HMI_OBSCURED"}, + { hmiLevel = level, audioStreamingState = "AUDIBLE", systemContext = "MAIN"}) + :Times(4) + :Timeout(timeout) + else + EXPECT_NOTIFICATION("OnHMIStatus", + { hmiLevel = level, audioStreamingState = "AUDIBLE", systemContext = "HMI_OBSCURED"}, + { hmiLevel = level, audioStreamingState = "AUDIBLE", systemContext = "MAIN"}) + :Times(2) + :Timeout(timeout) + end + elseif + self.isMediaApplication == false then + EXPECT_NOTIFICATION("OnHMIStatus", + { hmiLevel = level, audioStreamingState = "NOT_AUDIBLE", systemContext = "HMI_OBSCURED"}, + { hmiLevel = level, audioStreamingState = "NOT_AUDIBLE", systemContext = "MAIN"}) + :Times(2) + :Timeout(timeout) + end + elseif + level == "LIMITED" then + + if + self.isMediaApplication == true or + Test.appHMITypes["NAVIGATION"] == true then + if isInitialPrompt == true then + EXPECT_NOTIFICATION("OnHMIStatus", + { hmiLevel = level, audioStreamingState = "ATTENUATED", systemContext = "MAIN"}, + { hmiLevel = level, audioStreamingState = "AUDIBLE", systemContext = "MAIN"}) + :Times(2) + :Timeout(timeout) + else + EXPECT_NOTIFICATION("OnHMIStatus") + :Times(0) + :Timeout(timeout) + end + elseif + self.isMediaApplication == false then + + EXPECT_NOTIFICATION("OnHMIStatus") + :Times(0) + + EXPECT_NOTIFICATION("OnAudioPassThru") + :Times(0) + + DelayedExp(1000) + end + elseif + level == "BACKGROUND" then + + EXPECT_NOTIFICATION("OnHMIStatus") + :Times(0) + + EXPECT_NOTIFICATION("OnAudioPassThru") + :Times(0) + + DelayedExp(1000) + end +end +local function printError(errorMessage) + print(" \27[36m " .. errorMessage .. " \27[0m ") +end +function DelayedExp(timeout) + local event = events.Event() + event.matches = function(self, e) return self == e end + EXPECT_EVENT(event, "Delayed event") + RUN_AFTER(function() + RAISE_EVENT(event, event) + end, timeout) +end + +--------------------------------------------------------------------------------------------- +-------------------------- Overwrite These Functions For This Script------------------------- +--------------------------------------------------------------------------------------------- +--Specific functions for this script +--1. createRequest() +--2. createUIParameters(RequestParams) +--3. verify_SUCCESS_Case(RequestParams) +--4. verify_INVALID_DATA_Case(RequestParams) +--------------------------------------------------------------------------------------------- + +--Create default request parameters +function createRequest() + + return { + samplingRate ="8KHZ", + maxDuration = 2000, + bitsPerSample ="8_BIT", + audioType = "PCM" + } + +end +--------------------------------------------------------------------------------------------- + +--Create TTS.Speak expected result based on parameters from the request +function Test:createTTSSpeakParameters(RequestParams) + local param = {} + + param["speakType"] = "AUDIO_PASS_THRU" + + --initialPrompt + if RequestParams["initialPrompt"] ~= nil then + param["ttsChunks"] = { + { + text = RequestParams.initialPrompt[1].text, + type = RequestParams.initialPrompt[1].type, + }, + } + end + + return param +end + + +--Create UI expected result based on parameters from the request +function Test:createUIParameters(Request) + local param = {} + + param["muteAudio"] = Request["muteAudio"] + param["maxDuration"] = Request["maxDuration"] + + local j = 0 + --audioPassThruDisplayText1 + if Request["audioPassThruDisplayText1"] ~= nil then + j = j + 1 + if param["audioPassThruDisplayTexts"] == nil then + param["audioPassThruDisplayTexts"] = {} + end + param["audioPassThruDisplayTexts"][j] = { + fieldName = "audioPassThruDisplayText1", + fieldText = Request["audioPassThruDisplayText1"] + } + end + + --audioPassThruDisplayText2 + if Request["audioPassThruDisplayText2"] ~= nil then + j = j + 1 + if param["audioPassThruDisplayTexts"] == nil then + param["audioPassThruDisplayTexts"] = {} + end + param["audioPassThruDisplayTexts"][j] = { + fieldName = "audioPassThruDisplayText2", + fieldText = Request["audioPassThruDisplayText2"] + } + end + + return param +end +--------------------------------------------------------------------------------------------- + +--This function sends a request from mobile and verify result on HMI and mobile for SUCCESS resultCode cases. +function Test:verify_SUCCESS_Case(RequestParams, level) + if level == nil then level = "FULL" end + + --mobile side: sending PerformAudioPassThru request + local cid = self.mobileSession:SendRPC(APIName, RequestParams) + + --commonFunctions:printTable(RequestParams) + + UIParams = self:createUIParameters(RequestParams) + TTSSpeakParams = self:createTTSSpeakParameters(RequestParams) + + if RequestParams["initialPrompt"] ~= nil then + --hmi side: expect TTS.Speak request + EXPECT_HMICALL("TTS.Speak", TTSSpeakParams) + :Do(function(_,data) + --Send notification to start TTS + self.hmiConnection:SendNotification("TTS.Started") + + local function ttsSpeakResponse() + --hmi side: sending TTS.Speak response + self.hmiConnection:SendResponse(data.id, data.method, "SUCCESS", {}) + + --Send notification to stop TTS + self.hmiConnection:SendNotification("TTS.Stopped") + + --hmi side: expect UI.OnRecordStart + EXPECT_HMINOTIFICATION("UI.OnRecordStart", {appID = self.applications["Test Application"]}) + end + + RUN_AFTER(ttsSpeakResponse, 50) + end) + end + + --hmi side: expect UI.PerformAudioPassThru request + EXPECT_HMICALL("UI.PerformAudioPassThru", UIParams) + :Do(function(_,data) + SendOnSystemContext(self,"HMI_OBSCURED") + + + local function uiResponse() + --hmi side: sending UI.PerformAudioPassThru response + self.hmiConnection:SendResponse(data.id, data.method, "SUCCESS", {}) + + SendOnSystemContext(self,"MAIN") + end + + RUN_AFTER(uiResponse, 1500) + end) + + ExpectOnHMIStatusWithAudioStateChanged(self, level, RequestParams["initialPrompt"] ~= nil) + + --mobile side: expect OnAudioPassThru response + EXPECT_NOTIFICATION("OnAudioPassThru") + :Times(AtLeast(1)) + :Timeout(10000) + + --mobile side: expect PerformAudioPassThru response + EXPECT_RESPONSE(cid, { success = true, resultCode = "SUCCESS" }) + + --:ValidIf (function(_,data) + -- if file_check(storagePath.."audio.wav") ~= true then + -- print(" \27[36m Can not found file: audio.wav \27[0m ") + -- return false + -- else + -- return true + -- end +-- end) + + DelayedExp(1000) +end + +--This function sends a request from mobile with INVALID_DATA and verify result on mobile. +function Test:verify_INVALID_DATA_Case(RequestParams) + cid = self.mobileSession:SendRPC(APIName, RequestParams) + + --mobile side: expect PerformAudioPassThru response + EXPECT_RESPONSE(cid, { success = false, resultCode = "INVALID_DATA" }) + + DelayedExp(1000) +end + +--This function to create number of initialPrompt +function createInitialPrompt(n) + temp = {} + for i = 1, n do + temp[i] = { + text = tostring(i)..string.rep("a",500-string.len(tostring(i))), + type = "TEXT", + } + end + return temp +end + +--Description: Update policy from specific file + --policyFileName: Name of policy file + --bAllowed: true if want to allowed New group policy + -- false if want to disallowed New group policy +local groupID = 193465391 +local groupName = "New" +function Test:policyUpdate(policyFileName, consent, bAllowed) + --hmi side: sending SDL.GetURLS request + local RequestIdGetURLS = self.hmiConnection:SendRequest("SDL.GetURLS", { service = 7 }) + + --hmi side: expect SDL.GetURLS response from HMI + EXPECT_HMIRESPONSE(RequestIdGetURLS,{result = {code = 0, method = "SDL.GetURLS", urls = {{url = "http://policies.telematics.ford.com/api/policies"}}}}) + :Do(function(_,data) + --print("SDL.GetURLS response is received") + --hmi side: sending BasicCommunication.OnSystemRequest request to SDL + self.hmiConnection:SendNotification("BasicCommunication.OnSystemRequest", + { + requestType = "PROPRIETARY", + fileName = "filename" + } + ) + --mobile side: expect OnSystemRequest notification + EXPECT_NOTIFICATION("OnSystemRequest", { requestType = "PROPRIETARY" }) + :Do(function(_,data) + --print("OnSystemRequest notification is received") + --mobile side: sending SystemRequest request + local CorIdSystemRequest = self.mobileSession:SendRPC("SystemRequest", + { + fileName = "PolicyTableUpdate", + requestType = "PROPRIETARY" + }, + "files/"..policyFileName) + + local systemRequestId + --hmi side: expect SystemRequest request + EXPECT_HMICALL("BasicCommunication.SystemRequest") + :Do(function(_,data) + systemRequestId = data.id + --print("BasicCommunication.SystemRequest is received") + + --hmi side: sending BasicCommunication.OnSystemRequest request to SDL + self.hmiConnection:SendNotification("SDL.OnReceivedPolicyUpdate", + { + policyfile = "/tmp/fs/mp/images/ivsu_cache/PolicyTableUpdate" + } + ) + function to_run() + --hmi side: sending SystemRequest response + self.hmiConnection:SendResponse(systemRequestId,"BasicCommunication.SystemRequest", "SUCCESS", {}) + end + + RUN_AFTER(to_run, 500) + end) + + --hmi side: expect SDL.OnStatusUpdate + EXPECT_HMINOTIFICATION("SDL.OnStatusUpdate") + :ValidIf(function(exp,data) + if + exp.occurences == 1 and + data.params.status == "UP_TO_DATE" then + return true + elseif + exp.occurences == 1 and + data.params.status == "UPDATING" then + return true + elseif + exp.occurences == 2 and + data.params.status == "UP_TO_DATE" then + return true + else + if + exp.occurences == 1 then + print ("\27[31m SDL.OnStatusUpdate came with wrong values. Expected in first occurrences status 'UP_TO_DATE' or 'UPDATING', got '" .. tostring(data.params.status) .. "' \27[0m") + elseif exp.occurences == 2 then + print ("\27[31m SDL.OnStatusUpdate came with wrong values. Expected in second occurrences status 'UP_TO_DATE', got '" .. tostring(data.params.status) .. "' \27[0m") + end + return false + end + end) + :Times(Between(1,2)) + + --mobile side: expect SystemRequest response + EXPECT_RESPONSE(CorIdSystemRequest, { success = true, resultCode = "SUCCESS"}) + :Do(function(_,data) + --print("SystemRequest is received") + --hmi side: sending SDL.GetUserFriendlyMessage request to SDL + local RequestIdGetUserFriendlyMessage = self.hmiConnection:SendRequest("SDL.GetUserFriendlyMessage", {language = "EN-US", messageCodes = {"StatusUpToDate"}}) + + --hmi side: expect SDL.GetUserFriendlyMessage response + EXPECT_HMIRESPONSE(RequestIdGetUserFriendlyMessage,{result = {code = 0, method = "SDL.GetUserFriendlyMessage", messages = {{line1 = "Up-To-Date", messageCode = "StatusUpToDate", textBody = "Up-To-Date"}}}}) + :Do(function(_,data) + --print("SDL.GetUserFriendlyMessage is received") + if consent == true then + --hmi side: sending SDL.GetListOfPermissions request to SDL + local RequestIdGetListOfPermissions = self.hmiConnection:SendRequest("SDL.GetListOfPermissions", {appID = self.applications["Test Application"]}) + + -- hmi side: expect SDL.GetListOfPermissions response + -- TODO: update after resolving APPLINK-16094 EXPECT_HMIRESPONSE(RequestIdGetListOfPermissions,{result = {code = 0, method = "SDL.GetListOfPermissions", allowedFunctions = {{name = groupName}}}}) + EXPECT_HMIRESPONSE(RequestIdGetListOfPermissions) + :Do(function(_,data) + --hmi side: sending SDL.OnAppPermissionConsent + self.hmiConnection:SendNotification("SDL.OnAppPermissionConsent", { appID = self.applications["Test Application"], consentedFunctions = {{ allowed = bAllowed, id = groupID, name = groupName}}, source = "GUI"}) + end) + end + end) + end) + + end) + end) +end + +--Description: Function used to check file is existed on expected path + --file_name: file want to check +function file_check(file_name) + local file_found=io.open(file_name, "r") + + if file_found==nil then + return false + else + return true + end +end + +--------------------------------------------------------------------------------------------- +-------------------------------------------Preconditions------------------------------------- +--------------------------------------------------------------------------------------------- + + --Print new line to separate Preconditions + commonFunctions:newTestCasesGroup("Preconditions") + + --1. Delete Logs + commonSteps:DeleteLogsFileAndPolicyTable() + + --2. Activate application + commonSteps:ActivationApp() + + --3. Update policy to allow request + policyTable:precondition_updatePolicy_AllowFunctionInHmiLeves({"FULL", "LIMITED"}) + + --4. Restore preloaded_pt.json after updating it and SDL had loaded it when starting. + policyTable:Restore_preloaded_pt() + +--------------------------------------------------------------------------------------------- +-----------------------------------------I TEST BLOCK---------------------------------------- +--CommonRequestCheck: Check of mandatory/conditional request's parameters (mobile protocol)-- +--------------------------------------------------------------------------------------------- + --Begin Test suit PositiveRequestCheck + + --Print new line to separate test suite + commonFunctions:newTestCasesGroup("Test Suite For PositiveRequestCheck") + + --Description: TC's checks processing + -- request with all parameters + -- request with only mandatory parameters + -- request with all combinations of conditional-mandatory parameters (if exist) + -- request with one by one conditional parameters (each case - one conditional parameter) + -- request with missing mandatory parameters one by one (each case - missing one mandatory parameter) + -- request with all parameters are missing + -- request with fake parameters (fake - not from protocol, from another request) + -- request is sent with invalid JSON structure + -- different conditions of correlationID parameter (invalid, several the same etc.) + + --Begin Test case CommonRequestCheck.1 + --Description: This test is intended to check positive cases and when all parameters are in boundary conditions + + --Requirement id in JAMA: + --SDLAQ-CRS-81 + --SDLAQ-CRS-553 + --SDLAQ-CRS-2999 + + --Verification criteria: + -- PerformAudioPassThru takes audio from microphone connected to SDL platform. Audio data has been written into the directory on SDL (one level upper then app's directory). The audio stream starts transferring data from the stored file with OnAudioPassThru notification as soon as possible and playing it on the mobile device. + -- In case SDL receives PerformAudioPassThru request with valid "initialPrompt" param from mobile app, SDL must send TTS.Speak with "speakType"=AUDIO_PASS_THRU param (and other values from app's "initialPrompt" and send UI.PerformAudioPassThru as assigned by previously-confirmed requirements). + function Test:PerformAudioPassThru_Positive() + local params = { + initialPrompt = + { + { + text ="Makeyourchoice", + type ="TEXT", + }, + }, + audioPassThruDisplayText1 ="DisplayText1", + audioPassThruDisplayText2 ="DisplayText2", + samplingRate ="8KHZ", + maxDuration = 2000, + bitsPerSample ="8_BIT", + audioType ="PCM", + muteAudio = true, + } + self:verify_SUCCESS_Case(params) + end + --End Test case CommonRequestCheck.1 + + ----------------------------------------------------------------------------------------- + + --Begin Test case CommonRequestCheck.2 + --Description: This test is intended to check request with mandatory and with or without conditional parameters + + --Requirement id in JAMA/or Jira ID: SDLAQ-CRS-81 + + --Verification criteria: PerformAudioPassThru takes audio from microphone connected to SDL platform. Audio data has been written into the directory on SDL (one level upper then app's directory). The audio stream starts transferring data from the stored file with OnAudioPassThru notification as soon as possible and playing it on the mobile device. + + --Begin Test case CommonRequestCheck.2.1 + --Description: Request with only mandatory parameters + function Test:PerformAudioPassThru_MandatoryOnly() + local params = createRequest() + self:verify_SUCCESS_Case(params) + end + --End Test case CommonRequestCheck.2.1 + + ----------------------------------------------------------------------------------------- + + --Begin Test case CommonRequestCheck.2.2 + --Description: Request with conditional parameter: initialPrompt + function Test:PerformAudioPassThru_WithConditional_initialPrompt() + local params = createRequest() + params["initialPrompt"] = { + { + text ="Makeyourchoice", + type ="TEXT", + }, + } + + self:verify_SUCCESS_Case(params) + end + --End Test case CommonRequestCheck.2.2 + + ----------------------------------------------------------------------------------------- + + --Begin Test case CommonRequestCheck.2.3 + --Description: Request with conditional parameter: audioPassThruDisplayText1 + function Test:PerformAudioPassThru_WithConditional_audioPassThruDisplayText1() + local params = createRequest() + params["audioPassThruDisplayText1"] = "audioPassThruDisplayText1" + self:verify_SUCCESS_Case(params) + end + --End Test case CommonRequestCheck.2.3 + + ----------------------------------------------------------------------------------------- + + --Begin Test case CommonRequestCheck.2.4 + --Description: Request with conditional parameter: audioPassThruDisplayText2 + function Test:PerformAudioPassThru_WithConditional_audioPassThruDisplayText2() + local params = createRequest() + params["audioPassThruDisplayText2"] = "audioPassThruDisplayText2" + self:verify_SUCCESS_Case(params) + end + --End Test case CommonRequestCheck.2.4 + + ----------------------------------------------------------------------------------------- + + --Begin Test case CommonRequestCheck.2.5 + --Description: Request with conditional parameter: muteAudio + function Test:PerformAudioPassThru_WithConditional_muteAudio() + local params = createRequest() + params["muteAudio"] = true + self:verify_SUCCESS_Case(params) + end + --End Test case CommonRequestCheck.2.5 + --End Test case CommonRequestCheck.2 + + ----------------------------------------------------------------------------------------- + + --Begin Test case CommonRequestCheck.3 + --Description: This test is intended to check processing requests without mandatory parameters + + --Requirement id in JAMA: + --SDLAQ-CRS-554 + + --Verification criteria: + -- The request without "samplingRate" is sent, the response with INVALID_DATA result code is returned. + -- The request without "maxDuration" is sent, the response with INVALID_DATA result code is returned. + -- The request without "bitsPerSample" is sent, the response with INVALID_DATA result code is returned. + -- The request without "audioType" is sent, the response with INVALID_DATA result code is returned. + + --Begin Test case CommonRequestCheck.3.1 + --Description: Mandatory missing - samplingRate + function Test:PerformAudioPassThru_samplingRateMissing() + local params = createRequest() + params["samplingRate"] = nil + self:verify_INVALID_DATA_Case(params) + end + --End Test case CommonRequestCheck.3.1 + + ----------------------------------------------------------------------------------------- + + --Begin Test case CommonRequestCheck.3.2 + --Description: Mandatory missing - maxDuration + function Test:PerformAudioPassThru_maxDurationMissing() + local params = createRequest() + params["maxDuration"] = nil + self:verify_INVALID_DATA_Case(params) + end + --End Test case CommonRequestCheck.3.2 + + ----------------------------------------------------------------------------------------- + + --Begin Test case CommonRequestCheck.3.3 + --Description: Mandatory missing - bitsPerSample + function Test:PerformAudioPassThru_bitsPerSampleMissing() + local params = createRequest() + params["bitsPerSample"] = nil + self:verify_INVALID_DATA_Case(params) + end + --End Test case CommonRequestCheck.3.3 + + ----------------------------------------------------------------------------------------- + + --Begin Test case CommonRequestCheck.3.4 + --Description: Mandatory missing - audioType + function Test:PerformAudioPassThru_audioTypeMissing() + local params = createRequest() + params["audioType"] = nil + self:verify_INVALID_DATA_Case(params) + end + --End Test case CommonRequestCheck.3.4 + + ----------------------------------------------------------------------------------------- + + --Begin Test case CommonRequestCheck.3.5 + --Description: Mandatory missing - initialPrompt - text missing + function Test:PerformAudioPassThru_initialPromptTextMissing() + local params = createRequest() + params["initialPrompt"] = { + { + type ="TEXT", + }, + } + self:verify_INVALID_DATA_Case(params) + end + --End Test case CommonRequestCheck.3.5 + + ----------------------------------------------------------------------------------------- + + --Begin Test case CommonRequestCheck.3.6 + --Description: Mandatory missing - initialPrompt - type missing + function Test:PerformAudioPassThru_initialPromptTypeMissing() + local params = createRequest() + params["initialPrompt"] = { + { + text = "ABC" + }, + } + self:verify_INVALID_DATA_Case(params) + end + --End Test case CommonRequestCheck.3.6 + + ----------------------------------------------------------------------------------------- + + --Begin Test case CommonRequestCheck.3.7 + --Description: Missing all params + function Test:PerformAudioPassThru_AllParamsMissing() + local params = {} + self:verify_INVALID_DATA_Case(params) + end + --End Test case CommonRequestCheck.3.7 + --End Test case CommonRequestCheck.3 + + ----------------------------------------------------------------------------------------- + + --Begin Test case CommonRequestCheck.4 + --Description: Check processing request with different fake parameters + + --Requirement id in JAMA: + --APPLINK-14765 + + --Verification criteria: + --SDL must cut off the fake parameters from requests, responses and notifications received from HMI + + --Begin Test case CommonRequestCheck.4.1 + --Description: Parameter not from protocol + function Test:PerformAudioPassThru_FakeParam() + local params = { + initialPrompt = + { + { + text ="Makeyourchoice", + type ="TEXT", + fakeParam ="fakeParam", + }, + }, + fakeParam ="fakeParam", + audioPassThruDisplayText1 ="DisplayText1", + audioPassThruDisplayText2 ="DisplayText2", + samplingRate ="8KHZ", + maxDuration = 2000, + bitsPerSample ="8_BIT", + audioType ="PCM", + muteAudio = true, + } + + --mobile side: sending PerformAudioPassThru request + local cid = self.mobileSession:SendRPC(APIName, params) + + UIParams = self:createUIParameters(params) + TTSSpeakParams = self:createTTSSpeakParameters(params) + + --hmi side: expect TTS.Speak request + EXPECT_HMICALL("TTS.Speak", TTSSpeakParams) + :Do(function(_,data) + --Send notification to start TTS + self.hmiConnection:SendNotification("TTS.Started") + + local function ttsSpeakResponse() + --hmi side: sending TTS.Speak response + self.hmiConnection:SendResponse(data.id, data.method, "SUCCESS", {}) + + --Send notification to stop TTS + self.hmiConnection:SendNotification("TTS.Stopped") + + --hmi side: expect UI.OnRecordStart + EXPECT_HMINOTIFICATION("UI.OnRecordStart", {appID = self.applications["Test Application"]}) + end + + RUN_AFTER(ttsSpeakResponse, 50) + end) + :ValidIf(function(_,data) + if data.params.fakeParam or + data.params.ttsChunks[1].fakeParam then + printError(" SDL re-sends fakeParam parameters to HMI in TTS.Speak request") + return false + else + return true + end + end) + + --hmi side: expect UI.PerformAudioPassThru request + EXPECT_HMICALL("UI.PerformAudioPassThru", UIParams) + :Do(function(_,data) + SendOnSystemContext(self,"HMI_OBSCURED") + + local function uiResponse() + --hmi side: sending UI.PerformAudioPassThru response + self.hmiConnection:SendResponse(data.id, data.method, "SUCCESS", {}) + + SendOnSystemContext(self,"MAIN") + end + + RUN_AFTER(uiResponse, 1500) + end) + :ValidIf(function(_,data) + if data.params.fakeParam then + printError(" SDL re-sends fakeParam parameters to HMI in TTS.Speak request") + return false + else + return true + end + end) + + ExpectOnHMIStatusWithAudioStateChanged(self, level, true) + + --mobile side: expect PerformAudioPassThru response + EXPECT_RESPONSE(cid, { success = true, resultCode = "SUCCESS" }) + + DelayedExp(1000) + end + --Begin Test case CommonRequestCheck.4.1 + + ----------------------------------------------------------------------------------------- + + --Begin Test case CommonRequestCheck.4.2 + --Description: Parameters from another request + function Test:PerformAudioPassThru_ParamsAnotherRequest() + local params = { + initialPrompt = + { + { + text ="Makeyourchoice", + type ="TEXT", + gps = true + }, + }, + gps = true, + audioPassThruDisplayText1 ="DisplayText1", + audioPassThruDisplayText2 ="DisplayText2", + samplingRate ="8KHZ", + maxDuration = 2000, + bitsPerSample ="8_BIT", + audioType ="PCM", + muteAudio = true, + } + + --mobile side: sending PerformAudioPassThru request + local cid = self.mobileSession:SendRPC(APIName, params) + + UIParams = self:createUIParameters(params) + TTSSpeakParams = self:createTTSSpeakParameters(params) + + --hmi side: expect TTS.Speak request + EXPECT_HMICALL("TTS.Speak", TTSSpeakParams) + :Do(function(_,data) + --Send notification to start TTS + self.hmiConnection:SendNotification("TTS.Started") + + local function ttsSpeakResponse() + --hmi side: sending TTS.Speak response + self.hmiConnection:SendResponse(data.id, data.method, "SUCCESS", {}) + + --Send notification to stop TTS + self.hmiConnection:SendNotification("TTS.Stopped") + + --hmi side: expect UI.OnRecordStart + EXPECT_HMINOTIFICATION("UI.OnRecordStart", {appID = self.applications["Test Application"]}) + end + + RUN_AFTER(ttsSpeakResponse, 50) + end) + :ValidIf(function(_,data) + if data.params.gps or + data.params.ttsChunks[1].gps then + printError(" SDL re-sends fakeParam parameters to HMI in TTS.Speak request") + return false + else + return true + end + end) + + --hmi side: expect UI.PerformAudioPassThru request + EXPECT_HMICALL("UI.PerformAudioPassThru", UIParams) + :Do(function(_,data) + SendOnSystemContext(self,"HMI_OBSCURED") + + local function uiResponse() + --hmi side: sending UI.PerformAudioPassThru response + self.hmiConnection:SendResponse(data.id, data.method, "SUCCESS", {}) + + SendOnSystemContext(self,"MAIN") + end + + RUN_AFTER(uiResponse, 1500) + end) + :ValidIf(function(_,data) + if data.params.gps then + printError(" SDL re-sends fakeParam parameters to HMI in UI.PerformAudioPassThru request") + return false + else + return true + end + end) + + ExpectOnHMIStatusWithAudioStateChanged(self, level, true) + + --mobile side: expect PerformAudioPassThru response + EXPECT_RESPONSE(cid, { success = true, resultCode = "SUCCESS" }) + + DelayedExp(1000) + end + --End Test case CommonRequestCheck.4.2 + --End Test case CommonRequestCheck.4 + + ----------------------------------------------------------------------------------------- + + --Begin Test case CommonRequestCheck.5 + --Description: Invalid JSON + + --Requirement id in JAMA: + --SDLAQ-CRS-554 + + --Verification criteria: + --The request with wrong JSON syntax is sent, the response with INVALID_DATA result code is returned. + function Test:PerformAudioPassThru_IncorrectJSON() + + self.mobileSession.correlationId = self.mobileSession.correlationId + 1 + local msg = + { + serviceType = 7, + frameInfo = 0, + rpcType = 0, + rpcFunctionId = 16, + rpcCorrelationId = self.mobileSession.correlationId, + --<