Skip to content

Commit

Permalink
Merge pull request #1914 from HSavynetska/Defect_1032
Browse files Browse the repository at this point in the history
Script for reproducing issue 1032
  • Loading branch information
HSavynetska authored Jun 15, 2018
2 parents e457fc3 + a8c559d commit e7c8c98
Showing 1 changed file with 51 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
---------------------------------------------------------------------------------------------------
-- User story: https://github.com/smartdevicelink/sdl_core/issues/1032
--
-- Precondition:
-- 1) Core, HMI started.
-- 2) Application is registered, HMI level = FULL.
-- Description:
-- Steps to reproduce:
-- 1) Send CreateInteractionChoiceSet with duplicate vrCommands, other parameters are valid.
-- Expected:
-- 1) Choice set isn't created and SDL response resultCode = DUPLICATE_NAME, success=false to mobile.
---------------------------------------------------------------------------------------------------
--[[ Required Shared libraries ]]
local runner = require('user_modules/script_runner')
local common = require('test_scripts/Defects/commonDefects')

--[[ Local Functions ]]
local function createInteractionChoiceSetDuplicateName(self)
local params = {
interactionChoiceSetID = 100,
choiceSet = {
{
choiceID = 111,
menuName = "Choice111",
vrCommands = { "Choice111" }
},
{
choiceID = 112,
menuName = "Choice112",
vrCommands = { "Choice111" }
}
}
}
local cid = self.mobileSession1:SendRPC("CreateInteractionChoiceSet", params)
EXPECT_HMICALL("VR.AddCommand")
:Times(0)
self.mobileSession1:ExpectResponse(cid, { success = false, resultCode = "DUPLICATE_NAME" })
end

--[[ Scenario ]]
runner.Title("Preconditions")
runner.Step("Clean environment", common.preconditions)
runner.Step("Start SDL, HMI, connect Mobile, start Session", common.start)
runner.Step("RAI, PTU", common.rai_n)
runner.Step("Activate App", common.activate_app)

runner.Title("Test")
runner.Step("CreateInteractionChoiceSet with vrCommands duplicate", createInteractionChoiceSetDuplicateName)

runner.Title("Postconditions")
runner.Step("Stop SDL", common.postconditions)

0 comments on commit e7c8c98

Please sign in to comment.