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

[Internal review] Scripts for 3309 issue #190

Open
wants to merge 6 commits into
base: develop
Choose a base branch
from

Conversation

GetmanetsIrina
Copy link

ATF Test Scripts to check #FORDTCN-12021

This PR is ready for internal review.

Summary

Scripts to check cutting off parameters from HMI response/notification if app has less version then parameter version

ATF version

develop

Changelog

  • added new scripts
  • added created scripts to 6_1 test set

CLA

@GetmanetsIrina GetmanetsIrina changed the title [Internal review] Script for 3309 issue [Internal review] Scripts for 3309 issue Jun 7, 2022
runner.Step("Clean environment", common.preconditions)
runner.Step("Start SDL, HMI, connect Mobile, start Session", common.start)
runner.Step("Register App", common.registerApp)
runner.Step("PTU", common.policyTableUpdate, { common.pTUpdateFunc })

Choose a reason for hiding this comment

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

I propose to remove the redundant step common.policyTableUpdate, common.pTUpdateFunc = nil
Seems policy is updated in preconditions

---------------------------------------------------------------------------------------------------
--Issue: https://github.com/smartdevicelink/sdl_core/issues/3309
---------------------------------------------------------------------------------------------------
-- Description: SDL resends the parameter from HMI to mobile app in case app version is greather then parameter version,

Choose a reason for hiding this comment

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

Suggested change
-- Description: SDL resends the parameter from HMI to mobile app in case app version is greather then parameter version,
-- Description: SDL resends the parameter from HMI to mobile app in case app version is greater then parameter version,

for subKey, subValue in pairs (value.params) do
if subValue.name == "shifted" then
-- shifted has since="6.0" in API
pTbl.policy_table.vehicle_data.schema_items[key].params[subKey].since = "7.0.0"

Choose a reason for hiding this comment

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

Should we use since = "7.0" instead of 7.0.0 according to common style in preloaded.pt

Comment on lines 41 to 47
elseif key == #value.params then
common.cprint(35, "'shifted' was not found in preloaded file")
end
end
elseif key == #pTbl.policy_table.vehicle_data.schema_items then
common.cprint(35, parameter .. " was not found in preloaded file")
end

Choose a reason for hiding this comment

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

Seems it not working in case the parameter is absent in sdl_preloaded_pt.json
I propose to add a parameter in case not found

mandatory = false,
minvalue = 0,
maxvalue = 100,
since = "5.0.0"

Choose a reason for hiding this comment

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

Suggested change
since = "5.0.0"
since = "5.0"

---------------------------------------------------------------------------------------------------
--Issue: https://github.com/smartdevicelink/sdl_core/issues/3309
---------------------------------------------------------------------------------------------------
-- Description: SDL resends the parameter from HMI to mobile app in case app version is less then parameter version,

Choose a reason for hiding this comment

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

Please update the description according to the step

end
return true
end)
m.getMobileSession():ExpectResponse(cid, { success = true, resultCode = "SUCCESS", unpack(vehicleDataRes) })

Choose a reason for hiding this comment

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

Seems 'unpack' function is wrong for vehicleDataRes and return ""

./test_scripts/Defects/4_5/1921_Invalid_PT_after_cutting_unknow_values.lua
./test_scripts/Defects/4_5/1921_Invalid_PT_after_cutting_unknow_values.lua
./test_scripts/Defects/4_5/1921_Invalid_PT_after_cutting_unknow_values.lua
./test_scripts/Defects/4_5/1921_Invalid_PT_after_cutting_unknow_values.lua

Choose a reason for hiding this comment

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

Please remove 1921.txt

---------------------------------------------------------------------------------------------------
--Issue: https://github.com/smartdevicelink/sdl_core/issues/3309
---------------------------------------------------------------------------------------------------
-- Description: SDL cuts off parameter from HMI response,notification if app has less version then parameter version

Choose a reason for hiding this comment

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

Suggested change
-- Description: SDL cuts off parameter from HMI response,notification if app has less version then parameter version
-- Description: SDL cuts off parameter from HMI response/notification if app has less version then parameter version

@GetmanetsIrina
Copy link
Author

@VjKlepikov, please find updates in 57ddca8

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