Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[WIP] Initial scripts for Open Menu RPC #2157

Merged

Conversation

TMyza
Copy link
Contributor

@TMyza TMyza commented Dec 4, 2018

ATF Test Scripts to check #1937

This PR is not ready for review.

CLA

@dboltovskyi dboltovskyi changed the title Initial scripts for Open Menu RPC [WIP] Initial scripts for Open Menu RPC Dec 4, 2018
duration = 6000
})
local AlertId
EXPECT_HMICALL("UI.Alert", {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@TMyza, use common.getHMIConnection():ExpectRequest(...) instead of EXPECT_HMICALL(...)

position = 500,
menuName ="SubMenupositive"
})
EXPECT_HMICALL("UI.AddSubMenu",
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@TMyza, use common.getHMIConnection():ExpectRequest(...) instead of EXPECT_HMICALL(...)

config.application1.registerAppInterfaceParams.appHMIType = { "PROJECTION" }

--[[ Local Variables ]]
local resulCode = "DISALLOWED"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@TMyza, please, rename resulCode to resultCode in all scripts.

runner.Step("Clean environment", common.preconditions)
runner.Step("Start SDL, HMI, connect Mobile, start Session", common.start)
runner.Step("App registration", common.registerApp)
runner.Step("App activate", common.activateApp)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@TMyza Please add info in description of the step that current context is MAIN.
Also for better visibility move this step to Test section.
The same is applicable for 002 and 003 scripts


function m.showAppMenuSuccess(pMenuID)
local cid = m.getMobileSession():SendRPC("ShowAppMenu", { menuID = pMenuID })
m.getHMIConnection():ExpectRequest("UI.ShowAppMenu", {})
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@TMyza Please add check on request's parameters
The same is applicable for showAppMenuHMIwithoutResponse()

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, resultCode })
runner.Step("Set HMI Level to BACKGROUND", common.deactivateAppToBackground, { "MENU" })
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@TMyza According to checklist BACKGROUND HMI level and MENU system context is impossible case

runner.Step("App activate", common.activateApp)

runner.Title("Test")
runner.Step("Send show App menu, SystemContext ALERT", sendAlertSuccess)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@TMyza According to checklist ALERT system context has to be verified with FULL, LIMITED and BACKGROUND HMI levels

@@ -0,0 +1,32 @@
---------------------------------------------------------------------------------------------------
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@TMyza There is a typo in script name HIM

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, resultCode })
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@TMyza It would be better to see in step description what kind of invalid data is set. E.g.: string, empty string, float etc.

common.showAppMenuUnsuccess(nil, resultCode)
AlertId = data.id
end)
common.getHMIConnection():SendResponse(AlertId, "UI.Alert", "SUCCESS", { })
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@TMyza

  1. This response to HMI will be sent before the request to HMI due to asynchronous ATF processing. I suggest to use RUN_AFTER
  2. Response to mobile is missing

The same is applicable for 012 script

-- https://github.com/smartdevicelink/sdl_evolution/blob/master/proposals/0116-open-menu.md
-- Description:
-- In case:
-- 1) Mobile application is set to appropriate HMI level and System Context (see table)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@TMyza Since table is not described please provide the list of HMI levels and values for System Context
The same is applicable for 010, 011

Copy link
Contributor

@dboltovskyi dboltovskyi left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@TMyza Thank you for updates

@dboltovskyi dboltovskyi merged commit a65f24d into smartdevicelink:feature/open_menu_rpc Dec 11, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants