diff --git a/test_scripts/API/OpenMenuRPC/001_Open_Menu_RPC_with_Sub_MenuID_SUCCESS.lua b/test_scripts/API/OpenMenuRPC/001_Open_Menu_RPC_with_Sub_MenuID_SUCCESS.lua index aac71b9efc..54e30d2a65 100644 --- a/test_scripts/API/OpenMenuRPC/001_Open_Menu_RPC_with_Sub_MenuID_SUCCESS.lua +++ b/test_scripts/API/OpenMenuRPC/001_Open_Menu_RPC_with_Sub_MenuID_SUCCESS.lua @@ -15,11 +15,11 @@ local runner = require('user_modules/script_runner') local common = require('test_scripts/API/OpenMenuRPC/commonOpenMenuRPC') - -- [[ Test Configuration ]] +-- [[ Test Configuration ]] runner.testSettings.isSelfIncluded = false config.application1.registerAppInterfaceParams.appHMIType = { "PROJECTION" } - --[[ Scenario ]] +--[[ Scenario ]] runner.Title("Preconditions") runner.Step("Clean environment", common.preconditions) runner.Step("Start SDL, HMI, connect Mobile, start Session", common.start) diff --git a/test_scripts/API/OpenMenuRPC/003_Open_Menu_RPC_with_invalid_MenuID_INVALID_ID.lua b/test_scripts/API/OpenMenuRPC/003_Open_Menu_RPC_with_invalid_MenuID_INVALID_ID.lua index 6da4f275e3..d95fa8d39d 100644 --- a/test_scripts/API/OpenMenuRPC/003_Open_Menu_RPC_with_invalid_MenuID_INVALID_ID.lua +++ b/test_scripts/API/OpenMenuRPC/003_Open_Menu_RPC_with_invalid_MenuID_INVALID_ID.lua @@ -20,7 +20,7 @@ runner.testSettings.isSelfIncluded = false config.application1.registerAppInterfaceParams.appHMIType = { "PROJECTION" } --[[ Local Variables ]] -local resulCode = "INVALID_ID" +local resultCode = "INVALID_ID" --[[ Scenario ]] runner.Title("Preconditions") @@ -30,9 +30,9 @@ runner.Step("App registration", common.registerApp) runner.Step("App activate", common.activateApp) runner.Title("Test") -runner.Step("Send show app menu", common.showAppMenuUnsuccess, { 5, resulCode }) +runner.Step("Send show app menu", common.showAppMenuUnsuccess, { 5, resultCode }) runner.Step("Set HMI SystemContext to MENU", common.changeHMISystemContext, { "MENU" }) -runner.Step("Send show app menu", common.showAppMenuUnsuccess, { 5, resulCode }) +runner.Step("Send show app menu", common.showAppMenuUnsuccess, { 5, resultCode }) runner.Title("Postconditions") runner.Step("Stop SDL", common.postconditions) diff --git a/test_scripts/API/OpenMenuRPC/004_Open_Menu_RPC_without_policy_SystemContext_MAIN_DISALLOWED.lua b/test_scripts/API/OpenMenuRPC/004_Open_Menu_RPC_without_policy_SystemContext_MAIN_DISALLOWED.lua index 2bb163c688..38823382b6 100644 --- a/test_scripts/API/OpenMenuRPC/004_Open_Menu_RPC_without_policy_SystemContext_MAIN_DISALLOWED.lua +++ b/test_scripts/API/OpenMenuRPC/004_Open_Menu_RPC_without_policy_SystemContext_MAIN_DISALLOWED.lua @@ -19,7 +19,7 @@ runner.testSettings.isSelfIncluded = false config.application1.registerAppInterfaceParams.appHMIType = { "PROJECTION" } --[[ Local Variables ]] -local resulCode = "DISALLOWED" +local resultCode = "DISALLOWED" --[[ Scenario ]] runner.Title("Preconditions") @@ -29,13 +29,13 @@ runner.Step("App registration", common.registerApp) runner.Step("PTU", common.policyTableUpdate, { common.pTUpdateFunc }) runner.Title("Test") -runner.Step("Send show App menu, NONE level", common.showAppMenuUnsuccess, { nil, resulCode }) +runner.Step("Send show App menu, NONE level", common.showAppMenuUnsuccess, { nil, resultCode }) runner.Step("App activate", common.activateApp) -runner.Step("Send show App menu, FULL level", common.showAppMenuUnsuccess, { nil, resulCode }) +runner.Step("Send show App menu, FULL level", common.showAppMenuUnsuccess, { nil, resultCode }) runner.Step("Set HMI Level to Limited", common.hmiLeveltoLimited, { 1, "MAIN" }) -runner.Step("Send show App menu, LIMITED level", common.showAppMenuUnsuccess, { nil, resulCode }) +runner.Step("Send show App menu, LIMITED level", common.showAppMenuUnsuccess, { nil, resultCode }) runner.Step("Set HMI Level to BACKGROUND", common.deactivateAppToBackground) -runner.Step("Send show app menu, BACKGROUND level", common.showAppMenuUnsuccess, { nil, resulCode }) +runner.Step("Send show app menu, BACKGROUND level", common.showAppMenuUnsuccess, { nil, resultCode }) runner.Title("Postconditions") runner.Step("Stop SDL", common.postconditions) diff --git a/test_scripts/API/OpenMenuRPC/005_Open_Menu_RPC_without_policy_SystemContext_VRSESSION_DISALLOWED.lua b/test_scripts/API/OpenMenuRPC/005_Open_Menu_RPC_without_policy_SystemContext_VRSESSION_DISALLOWED.lua index b269b037b6..4b6b5a9a41 100644 --- a/test_scripts/API/OpenMenuRPC/005_Open_Menu_RPC_without_policy_SystemContext_VRSESSION_DISALLOWED.lua +++ b/test_scripts/API/OpenMenuRPC/005_Open_Menu_RPC_without_policy_SystemContext_VRSESSION_DISALLOWED.lua @@ -19,7 +19,7 @@ runner.testSettings.isSelfIncluded = false config.application1.registerAppInterfaceParams.appHMIType = { "PROJECTION" } --[[ Local Variables ]] -local resulCode = "DISALLOWED" +local resultCode = "DISALLOWED" --[[ Scenario ]] runner.Title("Preconditions") @@ -32,9 +32,9 @@ runner.Title("Test") runner.Step("App activate", common.activateApp) runner.Step("Set HMI SystemContext to VRSESSION" , common.changeHMISystemContext, { "VRSESSION" }) runner.Step("Set HMI Level to Limited", common.hmiLeveltoLimited, { 1, "VRSESSION" }) -runner.Step("Send show App menu, Limited level", common.showAppMenuUnsuccess, { nil, resulCode }) +runner.Step("Send show App menu, Limited level", common.showAppMenuUnsuccess, { nil, resultCode }) runner.Step("Set HMI Level to BACKGROUND", common.deactivateAppToBackground, { "VRSESSION" }) -runner.Step("Send show app menu, BACKGROUND level", common.showAppMenuUnsuccess, { nil, resulCode }) +runner.Step("Send show app menu, BACKGROUND level", common.showAppMenuUnsuccess, { nil, resultCode }) runner.Title("Postconditions") runner.Step("Stop SDL", common.postconditions) diff --git a/test_scripts/API/OpenMenuRPC/006_Open_Menu_RPC_without_policy_SystemContext_MENU_DISALLOWED.lua b/test_scripts/API/OpenMenuRPC/006_Open_Menu_RPC_without_policy_SystemContext_MENU_DISALLOWED.lua index ae026aaa77..31767029e6 100644 --- a/test_scripts/API/OpenMenuRPC/006_Open_Menu_RPC_without_policy_SystemContext_MENU_DISALLOWED.lua +++ b/test_scripts/API/OpenMenuRPC/006_Open_Menu_RPC_without_policy_SystemContext_MENU_DISALLOWED.lua @@ -19,7 +19,7 @@ runner.testSettings.isSelfIncluded = false config.application1.registerAppInterfaceParams.appHMIType = { "PROJECTION" } --[[ Local Variables ]] -local resulCode = "DISALLOWED" +local resultCode = "DISALLOWED" --[[ Scenario ]] runner.Title("Preconditions") @@ -32,9 +32,9 @@ runner.Title("Test") runner.Step("App activate", common.activateApp) runner.Step("Set HMI SystemContext to MENU" , common.changeHMISystemContext, { "MENU" }) runner.Step("Set HMI Level to Limited", common.hmiLeveltoLimited, { 1, "MENU" }) -runner.Step("Send show App menu, Limited level", common.showAppMenuUnsuccess, { nil, resulCode }) +runner.Step("Send show App menu, Limited level", common.showAppMenuUnsuccess, { nil, resultCode }) runner.Step("Set HMI Level to BACKGROUND", common.deactivateAppToBackground, { "MENU" }) -runner.Step("Send show app menu, BACKGROUND level", common.showAppMenuUnsuccess, { nil, resulCode }) +runner.Step("Send show app menu, BACKGROUND level", common.showAppMenuUnsuccess, { nil, resultCode }) runner.Title("Postconditions") runner.Step("Stop SDL", common.postconditions) diff --git a/test_scripts/API/OpenMenuRPC/007_Open_Menu_RPC_without_policy_SystemContext_HMI_OBSCURED_DISALLOWED.lua b/test_scripts/API/OpenMenuRPC/007_Open_Menu_RPC_without_policy_SystemContext_HMI_OBSCURED_DISALLOWED.lua index 13fcc54c49..eaa3882931 100644 --- a/test_scripts/API/OpenMenuRPC/007_Open_Menu_RPC_without_policy_SystemContext_HMI_OBSCURED_DISALLOWED.lua +++ b/test_scripts/API/OpenMenuRPC/007_Open_Menu_RPC_without_policy_SystemContext_HMI_OBSCURED_DISALLOWED.lua @@ -19,7 +19,7 @@ runner.testSettings.isSelfIncluded = false config.application1.registerAppInterfaceParams.appHMIType = { "PROJECTION" } --[[ Local Variables ]] -local resulCode = "DISALLOWED" +local resultCode = "DISALLOWED" --[[ Scenario ]] runner.Title("Preconditions") @@ -32,9 +32,9 @@ runner.Title("Test") runner.Step("App activate", common.activateApp) runner.Step("Set HMI SystemContext to HMI_OBSCURED" , common.changeHMISystemContext, { "HMI_OBSCURED" }) runner.Step("Set HMI Level to Limited", common.hmiLeveltoLimited, { 1, "HMI_OBSCURED" }) -runner.Step("Send show App menu, Limited level", common.showAppMenuUnsuccess, { nil, resulCode }) +runner.Step("Send show App menu, Limited level", common.showAppMenuUnsuccess, { nil, resultCode }) runner.Step("Set HMI Level to BACKGROUND", common.deactivateAppToBackground, { "HMI_OBSCURED" }) -runner.Step("Send show app menu, BACKGROUND level", common.showAppMenuUnsuccess, { nil, resulCode }) +runner.Step("Send show app menu, BACKGROUND level", common.showAppMenuUnsuccess, { nil, resultCode }) runner.Title("Postconditions") runner.Step("Stop SDL", common.postconditions) diff --git a/test_scripts/API/OpenMenuRPC/008_Open_Menu_RPC_without_policy_SystemContext_ALERT_DISALLOWED.lua b/test_scripts/API/OpenMenuRPC/008_Open_Menu_RPC_without_policy_SystemContext_ALERT_DISALLOWED.lua index c733cfd7aa..fb4e50ee45 100644 --- a/test_scripts/API/OpenMenuRPC/008_Open_Menu_RPC_without_policy_SystemContext_ALERT_DISALLOWED.lua +++ b/test_scripts/API/OpenMenuRPC/008_Open_Menu_RPC_without_policy_SystemContext_ALERT_DISALLOWED.lua @@ -19,8 +19,7 @@ runner.testSettings.isSelfIncluded = false config.application1.registerAppInterfaceParams.appHMIType = { "PROJECTION" } --[[ Local Variables ]] -local resulCode = "DISALLOWED" - +local resultCode = "DISALLOWED" --[[ Local Function ]] local function pTUpdateFunc(pTbl) @@ -46,16 +45,15 @@ local function sendAlertSuccess() duration = 6000 }) local AlertId - EXPECT_HMICALL("UI.Alert", { - alertStrings = - { - {fieldName = "alertText1", fieldText = "a"}, - {fieldName = "alertText2", fieldText = "1"}, - {fieldName = "alertText3", fieldText = "_"} - }, + common.getHMIConnection():ExpectRequest("UI.Alert", { + alertStrings = { + {fieldName = "alertText1", fieldText = "a"}, + {fieldName = "alertText2", fieldText = "1"}, + {fieldName = "alertText3", fieldText = "_"} + } }) :Do(function(_,data) - common.showAppMenuUnsuccess(nil, resulCode) + common.showAppMenuUnsuccess(nil, resultCode) AlertId = data.id end) common.getHMIConnection():SendResponse(AlertId, "UI.Alert", "SUCCESS", { }) diff --git a/test_scripts/API/OpenMenuRPC/009_Open_Menu_RPC_without_HIM_response_GENERIC_ERROR.lua b/test_scripts/API/OpenMenuRPC/009_Open_Menu_RPC_without_HIM_response_GENERIC_ERROR.lua index 638809f8d6..8f87986505 100644 --- a/test_scripts/API/OpenMenuRPC/009_Open_Menu_RPC_without_HIM_response_GENERIC_ERROR.lua +++ b/test_scripts/API/OpenMenuRPC/009_Open_Menu_RPC_without_HIM_response_GENERIC_ERROR.lua @@ -29,4 +29,4 @@ runner.Title("Test") runner.Step("Send show app menu", common.showAppMenuHMIwithoutResponse, { nil }) runner.Title("Postconditions") -runner.Step("Stop SDL", common.postconditions) \ No newline at end of file +runner.Step("Stop SDL", common.postconditions) diff --git a/test_scripts/API/OpenMenuRPC/010_Open_Menu_RPC_different_MenuID_with_Sub_Menu_ID_INVALID_ID.lua b/test_scripts/API/OpenMenuRPC/010_Open_Menu_RPC_different_MenuID_with_Sub_Menu_ID_INVALID_ID.lua index 8d65084391..7863382f14 100644 --- a/test_scripts/API/OpenMenuRPC/010_Open_Menu_RPC_different_MenuID_with_Sub_Menu_ID_INVALID_ID.lua +++ b/test_scripts/API/OpenMenuRPC/010_Open_Menu_RPC_different_MenuID_with_Sub_Menu_ID_INVALID_ID.lua @@ -19,7 +19,7 @@ runner.testSettings.isSelfIncluded = false config.application1.registerAppInterfaceParams.appHMIType = { "PROJECTION" } --[[ Local Variables ]] -local resulCode = "INVALID_ID" +local resultCode = "INVALID_ID" --[[ Scenario ]] runner.Title("Preconditions") @@ -30,7 +30,7 @@ runner.Step("App activate", common.activateApp) runner.Title("Test") runner.Step("Add menu", common.addSubMenu, { 5 }) -runner.Step("Send show app menu", common.showAppMenuUnsuccess, { 10, resulCode }) +runner.Step("Send show app menu", common.showAppMenuUnsuccess, { 10, resultCode }) runner.Title("Postconditions") runner.Step("Stop SDL", common.postconditions) diff --git a/test_scripts/API/OpenMenuRPC/011_Open_Menu_RPC_with_invalid_data_type_MenuID_INVALID_DATA.lua b/test_scripts/API/OpenMenuRPC/011_Open_Menu_RPC_with_invalid_data_type_MenuID_INVALID_DATA.lua index 875cc62c19..6494b809f3 100644 --- a/test_scripts/API/OpenMenuRPC/011_Open_Menu_RPC_with_invalid_data_type_MenuID_INVALID_DATA.lua +++ b/test_scripts/API/OpenMenuRPC/011_Open_Menu_RPC_with_invalid_data_type_MenuID_INVALID_DATA.lua @@ -20,7 +20,7 @@ runner.testSettings.isSelfIncluded = false config.application1.registerAppInterfaceParams.appHMIType = { "PROJECTION" } --[[ Local Variables ]] -local resulCode = "INVALID_DATA" +local resultCode = "INVALID_DATA" local invalidData = { "5", "", @@ -37,7 +37,7 @@ runner.Step("App activate", common.activateApp) runner.Title("Test") runner.Step("Add menu", common.addSubMenu, { 5 }) for _, v in pairs(invalidData) do - runner.Step("Send show app menu " .. v .. " menuID", common.showAppMenuUnsuccess, { v, resulCode }) + runner.Step("Send show app menu " .. v .. " menuID", common.showAppMenuUnsuccess, { v, resultCode }) end runner.Title("Postconditions") diff --git a/test_scripts/API/OpenMenuRPC/012_Open_Menu_RPC_hmi_Level_FULL_SC_VRSESSION_HMI_OBSCURED_ALERT_REJECTED.lua b/test_scripts/API/OpenMenuRPC/012_Open_Menu_RPC_hmi_Level_FULL_SC_VRSESSION_HMI_OBSCURED_ALERT_REJECTED.lua index 6a7818f3c1..7b73441eb2 100644 --- a/test_scripts/API/OpenMenuRPC/012_Open_Menu_RPC_hmi_Level_FULL_SC_VRSESSION_HMI_OBSCURED_ALERT_REJECTED.lua +++ b/test_scripts/API/OpenMenuRPC/012_Open_Menu_RPC_hmi_Level_FULL_SC_VRSESSION_HMI_OBSCURED_ALERT_REJECTED.lua @@ -18,7 +18,7 @@ runner.testSettings.isSelfIncluded = false config.application1.registerAppInterfaceParams.appHMIType = { "PROJECTION" } --[[ Local Variables ]] -local resulCode = "REJECTED" +local resultCode = "REJECTED" --[[ Local Function ]] local function sendAlertSuccess() @@ -35,16 +35,15 @@ local function sendAlertSuccess() duration = 6000 }) local AlertId - EXPECT_HMICALL("UI.Alert", { - alertStrings = - { - {fieldName = "alertText1", fieldText = "a"}, - {fieldName = "alertText2", fieldText = "1"}, - {fieldName = "alertText3", fieldText = "_"} - }, + common.getHMIConnection():ExpectRequest("UI.Alert", { + alertStrings = { + {fieldName = "alertText1", fieldText = "a"}, + {fieldName = "alertText2", fieldText = "1"}, + {fieldName = "alertText3", fieldText = "_"} + } }) :Do(function(_,data) - common.showAppMenuUnsuccess(nil, resulCode) + common.showAppMenuUnsuccess(nil, resultCode) AlertId = data.id end) common.getHMIConnection():SendResponse(AlertId, "UI.Alert", "SUCCESS", { }) @@ -59,10 +58,10 @@ runner.Step("App activate", common.activateApp) runner.Title("Test") runner.Step("Set HMI SystemContext to VRSESSION" , common.changeHMISystemContext, { "VRSESSION" }) -runner.Step("Send show app menu", common.showAppMenuUnsuccess, { nil, resulCode }) +runner.Step("Send show app menu", common.showAppMenuUnsuccess, { nil, resultCode }) runner.Step("Set HMI SystemContext to HMI_OBSCURED" , common.changeHMISystemContext, { "HMI_OBSCURED" }) -runner.Step("Send show app menu", common.showAppMenuUnsuccess, { nil, resulCode }) +runner.Step("Send show app menu", common.showAppMenuUnsuccess, { nil, resultCode }) runner.Step("Send show App menu, SystemContext ALERT", sendAlertSuccess) diff --git a/test_scripts/API/OpenMenuRPC/commonOpenMenuRPC.lua b/test_scripts/API/OpenMenuRPC/commonOpenMenuRPC.lua index 08d1afbab0..6ddc531401 100644 --- a/test_scripts/API/OpenMenuRPC/commonOpenMenuRPC.lua +++ b/test_scripts/API/OpenMenuRPC/commonOpenMenuRPC.lua @@ -4,14 +4,14 @@ --[[ General configuration parameters ]] config.defaultProtocolVersion = 2 - --[[ Required Shared libraries ]] +--[[ Required Shared libraries ]] local actions = require("user_modules/sequences/actions") - --[[ Variables ]] +--[[ Variables ]] local m = actions m.type = "FILE" - --[[ Functions]] +--[[ Functions]] function m.pTUpdateFunc(pTbl) pTbl.policy_table.functional_groupings["Base-4"].rpcs.ShowAppMenu = nil end @@ -23,7 +23,7 @@ function m.addSubMenu(pMenuID) position = 500, menuName ="SubMenupositive" }) - EXPECT_HMICALL("UI.AddSubMenu", + m.getHMIConnection():ExpectRequest("UI.AddSubMenu", { menuID = pMenuID, menuParams = {