Skip to content

Feature/icon resumed#4

Open
HSavynetska wants to merge 30 commits intodevelopfrom
feature/icon_Resumed
Open

Feature/icon resumed#4
HSavynetska wants to merge 30 commits intodevelopfrom
feature/icon_Resumed

Conversation

@HSavynetska
Copy link
Copy Markdown
Owner

No description provided.

@HSavynetska HSavynetska force-pushed the feature/icon_Resumed branch 3 times, most recently from 6082697 to 437ff56 Compare April 2, 2018 12:09
@HSavynetska HSavynetska force-pushed the feature/icon_Resumed branch from 437ff56 to a1e8c20 Compare April 2, 2018 12:20
-- Use case:TBD
--
-- Requirement summary:
-- TBD
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

add new line, also in scripts below

-- In case:
-- 1) SDL, HMI are started.
-- 2) Mobile app registers first time.
-- SDL does: Successfully registers application and responds with result code "SUCCESS" and "iconResumed" = false" to mobile application.
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Add new line after "SDL does:"

---------------------------------------------------------------------------------------------------
--[[ Required Shared libraries ]]
local runner = require('user_modules/script_runner')
local common = require('test_scripts/API/SetAppIcon/comSetApp')
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

please rename common From comSetApp to 'commonIconResumed'

runner.Step("Start SDL, HMI, connect Mobile, start Session", common.start)

runner.Title("Test")
runner.Step("App registration with iconresumed = false", common.registerApp, { 1, false })
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

iconresumed -> iconResumed

-- In case:
-- 1) SDL, HMI are started.
-- 2) Mobile application is registered and sets custom icon via sending PutFile and valid SetAppIcon request.
-- 3) 3) Mobile app is re-registered.
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

3)3) -> 3)

runner.Step("SetAppIcon", common.setAppIcon, { allParams } )
runner.Step("Gets_INVALID_DATA", setAppIcon_INVALID_DATA, { false, 1 } )
runner.Step("App unregistration", common.unregisterAppInterface, { 1 })
runner.Step("App registration with iconresumed = false", common.registerApp, { 1, false, false })
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

update 'false, false' to 'false'

@@ -0,0 +1,67 @@
---------------------------------------------------------------------------------------------------
-- Proposal: https://github.com/smartdevicelink/sdl_evolution/blob/master/proposals/0041-appicon-resumption.md
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Is script duplicated with script above?

end

local function updatePTU(tbl)
tbl.policy_table.app_policies[config.application.registerAppInterfaceParams.appID]. ImageFieldName = { "appIcon" }
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

function is not complete and is not valid. Please update function to valid and correct. Update must remove permissions from SetAppIcon RPC .

@@ -0,0 +1,68 @@
---------------------------------------------------------------------------------------------------
-- Proposal: https://github.com/smartdevicelink/sdl_evolution/blob/master/proposals/0041-appicon-resumption.md
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

as script below

runner.testSettings.isSelfIncluded = false

--[[ Test Configuration ]]
runner.testSettings.isSelfIncluded = false
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

duplicated

@@ -0,0 +1,110 @@
---------------------------------------------------------------------------------------------------
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

@HSavynetska Why do we need 3 common modules? Or these are duplicates and need to be removed?

Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

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

Duplicates

local mobSession = common.getMobileSession(pAppId)
local cid = mobSession:SendRPC("SetAppIcon", params.requestParams)
params.requestUiParams.appID = common.getHMIAppId()
EXPECT_HMICALL("UI.SetAppIcon", params.requestUiParams)
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Here you expect tat message UI.SetAppIcon will be not received and create Do step for receiving. So ,what step is redundant?

runner.Title("Test")
runner.Step("App registration with iconresumed = true", common.registerApp, { 1, true })
runner.Step("Upload icon file", common.putFile)
runner.Step("SetAppIcon", common.setAppIcon, { allParams } )
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

remove success SetAppIcon

--[[ @registerApp: register mobile application
--! @parameters:
--! pAppId - application number (1, 2, etc.)
--! pIconResumed - Existence of apps icon at system
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

not existence, value for iconResumed parameter

--! @parameters:
--! pAppId - application number (1, 2, etc.)
--! pIconResumed - Existence of apps icon at system
--! @return: none
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

What about 3rd parameter?

end
end

function m.registerApp1(pAppId, pIconResumed, pReconnection)
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Function duplicates registerApp

end

--Description: setAppIcon successfully
--paramsSend: Parameters will be sent to SDL
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

parameter has different name, please update.

mobSession:ExpectResponse(cid, { success = true, resultCode = "SUCCESS" })
end

function m.connectMobile()
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

remove useless function.

function m.connectMobile()
test:connectMobile()
end

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

add description for function as above

{ syncFileName = pIcon })
EXPECT_HMINOTIFICATION("BasicCommunication.OnFileRemoved",
{
fileName = pIcon,
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

please update alignment

{
fileName = pIcon,
fileType = "GRAPHIC_PNG",
appID = 1 })
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Do not understand - what is value for appID?

-- SDL does:
-- 1) Successfully registers application.
-- SDL does:
-- 1) Successfully register application.
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

comment is also related to item 2,3,4

params.requestUiParams.appID = common.getHMIAppId()

local cid = mobSession:SendRPC("SetAppIcon", params)
EXPECT_HMICALL("UI.SetAppIcon", params.requestUiParams)
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Times(0) is required here

-- 3) Mobile app is re-registered.
-- SDL does:
-- 1) Successfully register application.
-- 2) Successful processes PutFile and SetAppIcon requests.
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

  1. Successful process PutFile and SetAppIcon requests.
  2. Respond with result code "SUCCESS" and "iconResumed" = true for RAI request.
  3. Send to HMI OnAppRegistered notification "icon" and notify that apps icon exists.

-- 3) Mobile application is unregistered.
-- 4) Mobile app is re-registered.
-- SDL does:
-- 1) SDL respon with result code "SUCCESS" and "iconResumed" = true for RAI request.
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Respond with result code "SUCCESS" and "iconResumed" = true for RAI request.

runner.Step("Start SDL, HMI, connect Mobile, start Session", common.start)

runner.Title("Test")
runner.Step("App registration with iconResumed = true", common.registerAppWOPTU, { 1, false })
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

App registration with iconResumed = false

-- 3) HMI is not respond to SetAppIcon request. Mobile App received response SetAppIcon(GENERIC_ERROR).
-- 4) App is re-registered.
-- SDL does:
-- 1) Registers an app successfully, responds to RAI with result code "SUCCESS", "iconResumed" = false.
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

register, respond

-- 3) Mobile App received response SetAppIcon(INVALID_DATA). Custom Icon is not set.
-- 4) App is re-registered.
-- SDL does:
-- 1) Successfully registers application.
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

register, respond

-- 4) Mobile app received response SetAppIcon(DISALLOWED)
-- 5) Mobile app is re-registered.
-- SDL does:
-- 1) Registers an app successfully, responds to RAI with result code "SUCCESS", "iconResumed" = false.
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

register, respond

-- 3) HMI responds with REJECTED resultCode to SetAppIcon request. Mobile App received response SetAppIcon(REJECTED).
-- 4) App is re-registered.
-- SDL does:
-- 1) Registers an app successfully, responds to RAI with result code "SUCCESS", "iconResumed" = false.
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

update 'SDL does' according to script

runner.Step("Upload icon file1", common.putFile)
runner.Step("SetAppIcon1", common.setAppIcon, { allParams } )

runner.Step("Upload icon file2", common.putFile)
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

uploads the same icon and sets also the same icon

@HSavynetska HSavynetska force-pushed the feature/icon_Resumed branch from 5f4391f to 3092077 Compare April 4, 2018 11:41
@HSavynetska HSavynetska force-pushed the feature/icon_Resumed branch from 3092077 to 6664e45 Compare April 4, 2018 11:50
HSavynetska pushed a commit that referenced this pull request Jun 2, 2020
* Fix disconnect instability

* Fix Ignition Off instability

* Fix instability in Policy scripts
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.

3 participants