Skip to content

Commit

Permalink
Script update for 3205 issue (#2425)
Browse files Browse the repository at this point in the history
* Update script for 972 issue

* Rename script and move it to release 7.0
  • Loading branch information
dboltovskyi authored Aug 24, 2020
1 parent 8240c53 commit 5625057
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 11 deletions.
Original file line number Diff line number Diff line change
@@ -1,25 +1,29 @@
---------------------------------------------------------------------------------------------------
-- User story: https://github.com/smartdevicelink/sdl_core/issues/972
-- Issue: https://github.com/smartdevicelink/sdl_core/issues/3205
--
-- Precondition:
-- 1) Move IsReady_Template folder into sdl_atf\user_modules
-- 1) Make sure VehicleInfo interface is unavailable
-- 2) SubscribeVehicleData and UnSubscribeVehicleData are allowed in PT
-- Description:
-- Steps to reproduce:
-- 1) RegisterApp incase HMI does not respond.
-- 2) Activate app.
-- 3) Send SubscribeVehicleData with gps = true
-- 4) Send UnSubscribeVehicleData with gps = true
-- 1) Register and activate app
-- 2) Send SubscribeVehicleData with gps = true
-- 3) Send UnSubscribeVehicleData with gps = true
-- Expected:
-- 1) SDL send UNSUPPORTED_RESOURCE to mobile app
-- 2) SDL respond "{success = false, resultCode = "IGNORED", info = "Some provided VehicleData was not subscribed."}" code to mobile app.
-- 2) SDL respond with the following to mobile app:
-- - success = false
-- - resultCode = "IGNORED"
-- - info = "Some provided VehicleData was not subscribed
---------------------------------------------------------------------------------------------------
--[[ Required Shared libraries ]]
local runner = require('user_modules/script_runner')
local common = require('test_scripts/Defects/commonDefects')
local hmi_values = require('user_modules/hmi_values')
local commonFunctions = require("user_modules/shared_testcases/commonFunctions")

--[[ Test Configuration ]]
runner.testSettings.restrictions.sdlBuildOptions = { { extendedPolicy = { "PROPRIETARY", "EXTERNAL_PROPRIETARY" } } }

--[[ Local Functions ]]
local function getHMIValues()
local params = hmi_values.getDefaultHMITable()
Expand Down Expand Up @@ -50,6 +54,7 @@ local function start(getHMIParams, self)
end

local function pTUpdateFunc(tbl)
tbl.policy_table.functional_groupings["Location-1"].user_consent_prompt = nil
table.insert(tbl.policy_table.app_policies[config.application1.registerAppInterfaceParams.fullAppID].groups, "Location-1")
end

Expand All @@ -58,15 +63,16 @@ local function setSubscribeVehicleDataUnsupportedResource(self)
local cid = self.mobileSession1:SendRPC("SubscribeVehicleData", params)
EXPECT_HMICALL("VehicleInfo.SubscribeVehicleData")
:Times(0)
self.mobileSession1:ExpectResponse(cid, {success = false, resultCode = "UNSUPPORTED_RESOURCE"})
self.mobileSession1:ExpectResponse(cid, { success = false, resultCode = "UNSUPPORTED_RESOURCE" })
end

local function setUnsubscribeVehicleDataIgnored(self)
local pParams = { gps = true }
local cid = self.mobileSession1:SendRPC("UnsubscribeVehicleData", pParams)
EXPECT_HMICALL("VehicleInfo.UnsubscribeVehicleData")
:Times(0)
self.mobileSession1:ExpectResponse(cid, {success = false, resultCode = "IGNORED", info = "Some provided VehicleData was not subscribed."})
self.mobileSession1:ExpectResponse(cid,
{ success = false, resultCode = "IGNORED", info = "Some provided VehicleData was not subscribed." })
end

--[[ Scenario ]]
Expand Down
1 change: 1 addition & 0 deletions test_sets/Defects/Defects_release_7_0.txt
Original file line number Diff line number Diff line change
Expand Up @@ -7,3 +7,4 @@
./test_scripts/Defects/7_0/2461_UnsubscribeWaypoints_OnDisconnect.lua
./test_scripts/Defects/7_0/3119_ChangeRegistration_with_unsupported_language.lua
./test_scripts/Defects/7_0/3372_StaySubscribedWaypoints_OnOtherAppDisconnect.lua
./test_scripts/Defects/7_0/3205_IGNORED_for_UnSubscribeVehicleData_in_case_VI_interface_is_not_available.lua
1 change: 0 additions & 1 deletion test_sets/Defects/Defects_releases_4_x_and_5_x.txt
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,6 @@
./test_scripts/Defects/4_5/1211_ATF_Check_count_of_removals_for_bad_behavior_REQUEST_WHILE_IN_NONE_HMI_LEVEL.lua
./test_scripts/Defects/4_5/1880_DefaultAndRPCTimeoutGENERIC_ERROR.lua
./test_scripts/Defects/4_5/1881_OnDriverDistraction_After_changing_HMIlevel_from_NONE.lua
;./test_scripts/Defects/5_0/972_SDL_should_respond_IGNORED_with_correct_result_code_for_UnSubscribeVehicleData_in_case_vi_interface_is_not_available.lua https://github.com/smartdevicelink/sdl_core/issues/3205
;./test_scripts/Defects/5_0/2457_Needed_fixes_sending_of_UpdateDeviceList_notification_on_device_connect.lua https://github.com/smartdevicelink/sdl_atf_test_scripts/issues/2365
./test_scripts/Defects/5_0/1031_SDL_transfer_OnKeyboardInput_notification_to_not_active_App_when_there_is_no_active_PerformInteraction_KEYBOARD.lua
./test_scripts/Defects/5_0/2480_Vefiry_that_SDL_sends_OnDD_notification_once_upon_registration.lua
Expand Down

0 comments on commit 5625057

Please sign in to comment.