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

Feature/widget support #2218

Merged
merged 13 commits into from
Aug 26, 2019
Merged

Feature/widget support #2218

merged 13 commits into from
Aug 26, 2019

Conversation

mked-luxoft
Copy link
Contributor

@mked-luxoft mked-luxoft commented Jul 31, 2019

ATF Test Scripts to check #2918

This PR is [ready] for review.

Summary

Scripts for [SDL 0216] - Widget support feature

ATF version

develop

Manual checklist with screenshots

TBA

Changelog

Enhancements
  • Added expectation return into existing utils.wait() function
Bug Fixes
  • Added additional timeout into existing actions.allowSDL() function which is required to fix SDL issue for policies in EXTERNAL_PROPRIETARY flow

CLA

@AStasiuk
Copy link
Contributor

AStasiuk commented Aug 5, 2019

@theresalech, this PR is already reviewed and approved by Ford (by @kshala-ford) and ready for Livio review.

common.Step("SDL transfers OnSCU notification", sendOnSCU, { 1 })
common.Step("App sends GetSC RPC for DISPLAYS, no subscribe", sendGetSC, { "DISPLAYS", nil })
common.Step("SDL transfers OnSCU notification", sendOnSCU, { 2 })
common.Step("App sends GetSC RPC for DISPLAYS, subscribe=true", sendGetSC, { "DISPLAYS", true })
Copy link
Collaborator

Choose a reason for hiding this comment

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

I think this test should at least check for the info string

"Subscribe parameter is ignored. Auto Subscription/Unsubscription is used for DISPLAY capability type."

Copy link
Contributor

Choose a reason for hiding this comment

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

@JackLivio Please find update in 89f5721

--[[ Local Variables ]]
local params = {
windowID = 1,
windowName = "Name of the primary widget",
Copy link
Collaborator

Choose a reason for hiding this comment

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

Shouldn't this case be a failure? Proposal hints at the primary widget and needing the same name.

From the proposal:

The primary widget is a special widget, that can be associated with a service type, which is used by the HMI whenever a single widget needs to represent the whole app. The primary widget should be named as the app and can be pre-created by the HMI.

Copy link
Contributor

@dboltovskyi dboltovskyi Aug 12, 2019

Choose a reason for hiding this comment

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

@JackLivio It was agreed with proposal author that SDL should not validate WindowName for all WIndowIDs = 1 (thus for all PRIMARY WIDGETS).
Mostly by the reason that the name of the main window matches the app name.

@dboltovskyi
Copy link
Contributor

@JackLivio Please note one script was updated in 626def3 to verify case described in smartdevicelink/sdl_core#2980 (comment)

@dboltovskyi
Copy link
Contributor

@JackLivio Please note same script was extended to check cases with deleted windows

@Jack-Byrne
Copy link
Collaborator

I had an issue with this test.

==============================
Start './test_scripts/WidgetSupport/Capabilities/006_GetSC_subscription_ignored.lua'
==============================
=====================================================================================================
Description: ATF test script
Severity: Major
=====================================================================================================
--- Precondition ------------------------------------------------------------------------------------
kill: (52705): No such process
[14:34:13,244] Clean_environment_and_Back_up_update_PPT                                              [SUCCESS] (3 ms)
SDL pid 52718
tcp        0      0 127.0.0.1:8087          0.0.0.0:*               LISTEN     
HMI initialized
HMI is ready
Mobile connected
[14:34:14,919] Start_SDL__HMI__connect_Mobile__start_Session                                         [SUCCESS] (999 ms)
[14:34:15,965] App_registration                                                                      [SUCCESS] (286 ms)
[14:34:16,253] HMI_sends_capabilities_for_main_window                                                [SUCCESS] (30 ms)
[14:34:16,284] App_activation                                                                        [SUCCESS] (2006 ms)
--- Test --------------------------------------------------------------------------------------------
[14:34:18,291] Create_widget_1                                                                       [SUCCESS] (79 ms)
[14:34:18,374] App_sends_GetSC_RPC_for_DISPLAYS__subscribe_nil                                       [FAIL] (60 ms)
 Response to 4: ValidIf: 
number of array elements payload.systemCapability.displayCapabilities.1.windowCapabilities: expected 2, actual: 1
[14:34:18,435] Create_widget_2                                                                       [SUCCESS] (116 ms)
[14:34:18,552] App_sends_GetSC_RPC_for_DISPLAYS__subscribe_true                                      [FAIL] (61 ms)
 Response to 6: ValidIf: 
number of array elements payload.systemCapability.displayCapabilities.1.windowCapabilities: expected 3, actual: 1
[14:34:18,614] Create_widget_3                                                                       [SUCCESS] (117 ms)
[14:34:18,732] App_sends_GetSC_RPC_for_DISPLAYS__subscribe_false                                     [FAIL] (71 ms)
 Response to 8: ValidIf: 
number of array elements payload.systemCapability.displayCapabilities.1.windowCapabilities: expected 4, actual: 1
[14:34:18,805] Create_widget_4                                                                       [SUCCESS] (126 ms)
[14:34:18,931] App_sends_GetSC_RPC_for_DISPLAYS__subscribe_nil                                       [FAIL] (63 ms)
 Response to 10: ValidIf: 
number of array elements payload.systemCapability.displayCapabilities.1.windowCapabilities: expected 5, actual: 1
[14:34:18,995] Delete_widget_1                                                                       [SUCCESS] (2009 ms)
[14:34:21,006] App_sends_GetSC_RPC_for_DISPLAYS__subscribe_nil                                       [FAIL] (48 ms)
 Response to 12: ValidIf: 
number of array elements payload.systemCapability.displayCapabilities.1.windowCapabilities: expected 4, actual: 1
[14:34:21,055] Delete_widget_2                                                                       [SUCCESS] (2008 ms)
[14:34:23,063] App_sends_GetSC_RPC_for_DISPLAYS__subscribe_true                                      [FAIL] (49 ms)
 Response to 14: ValidIf: 
number of array elements payload.systemCapability.displayCapabilities.1.windowCapabilities: expected 3, actual: 1
[14:34:23,114] Delete_widget_3                                                                       [SUCCESS] (2008 ms)
[14:34:25,122] App_sends_GetSC_RPC_for_DISPLAYS__subscribe_false                                     [FAIL] (50 ms)
 Response to 16: ValidIf: 
number of array elements payload.systemCapability.displayCapabilities.1.windowCapabilities: expected 2, actual: 1
[14:34:25,174] Delete_widget_4                                                                       [SUCCESS] (2009 ms)
[14:34:27,186] App_sends_GetSC_RPC_for_DISPLAYS__subscribe_nil                                       [FAIL] (50 ms)
 Response to 18: ValidIf: 
payload.systemCapability.displayCapabilities.1.windowCapabilities.1.templatesAvailable.1: expected: Template_0, actual value: Template_4
--- Postconditions ----------------------------------------------------------------------------------
Mobile session 1 deleted
malloc_consolidate(): invalid chunk size
[14:34:27,237] Stop_SDL__restore_SDL_settings_and_PPT                                                [SUCCESS] (4034 ms)

@dboltovskyi
Copy link
Contributor

@JackLivio That's right since fix in sdl_core has not committed yet.

@dboltovskyi
Copy link
Contributor

@JackLivio Please notice 2 additional scripts were introduced in 1c3147a to cover specific cases described in comments below:

1) https://github.com/smartdevicelink/sdl_core/pull/2980#issuecomment-520884024
2) https://github.com/smartdevicelink/sdl_core/pull/2980#issuecomment-520889265
3) https://github.com/smartdevicelink/sdl_core/pull/2980#issuecomment-520967303

All scripts related to feature can be run on a latest SDL commit: smartdevicelink/sdl_core@ee4e1c7

@dboltovskyi
Copy link
Contributor

Please notice PR is re-based onto HEAD of develop

@dboltovskyi
Copy link
Contributor

Please notice additional script was added in (85d700f) in order to cover cases discussed in

@dboltovskyi
Copy link
Contributor

Expected HMI level is corrected due to SDL requirement:

SDL must resume HMILevel of the application that satisfies the conditions of HMILevel Resumption independently on whether this applications registers with valid or invalid or omitted hashID

@Jack-Byrne Jack-Byrne merged commit d74a0f4 into develop Aug 26, 2019
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.

5 participants