78
78
ATTRIBUTE_CURRENT_PLAYBACK_STATE = '0x0000_0000' # Application Cluster Spec 6.10.6 Attribute ID: Current State of Playback
79
79
80
80
test_sequences = [
81
- Sequence (
82
- name = 'commissionee_generated_passcode_test' ,
83
- steps = [
84
- # Signal to start the tv-app.
85
- Step (app = App .TV_APP , input_cmd = START_APP ),
81
+ Sequence (
82
+ name = 'commissionee_generated_passcode_test' ,
83
+ steps = [
84
+ # Signal to start the tv-app.
85
+ Step (app = App .TV_APP , input_cmd = START_APP ),
86
86
87
- # Validate that the tv-app is up and running.
88
- Step (app = App .TV_APP , timeout_sec = APP_MAX_START_WAIT_SEC , output_msg = ['Started commissioner' ]),
87
+ # Validate that the tv-app is up and running.
88
+ Step (app = App .TV_APP , timeout_sec = APP_MAX_START_WAIT_SEC , output_msg = ['Started commissioner' ]),
89
89
90
- # Signal to start the tv-casting-app.
91
- Step (app = App .TV_CASTING_APP , input_cmd = START_APP ),
90
+ # Signal to start the tv-casting-app.
91
+ Step (app = App .TV_CASTING_APP , input_cmd = START_APP ),
92
92
93
- # Validate that the server is properly initialized in the tv-casting-app output.
94
- Step (app = App .TV_CASTING_APP , timeout_sec = APP_MAX_START_WAIT_SEC , output_msg = ['Server initialization complete' ]),
93
+ # Validate that the server is properly initialized in the tv-casting-app output.
94
+ Step (app = App .TV_CASTING_APP , timeout_sec = APP_MAX_START_WAIT_SEC , output_msg = ['Server initialization complete' ]),
95
95
96
- # Validate that there is a valid discovered commissioner with {VENDOR_ID}, {PRODUCT_ID}, and {DEVICE_TYPE_CASTING_VIDEO_PLAYER} in the tv-casting-app output.
97
- Step (app = App .TV_CASTING_APP , output_msg = ['Discovered Commissioner #0' , f'Vendor ID: { VENDOR_ID } ' , f'Product ID: { PRODUCT_ID } ' ,
98
- f'Device Type: { DEVICE_TYPE_CASTING_VIDEO_PLAYER } ' , 'Supports Commissioner Generated Passcode: true' ]),
96
+ # Validate that there is a valid discovered commissioner with {VENDOR_ID}, {PRODUCT_ID}, and {DEVICE_TYPE_CASTING_VIDEO_PLAYER} in the tv-casting-app output.
97
+ Step (app = App .TV_CASTING_APP , output_msg = ['Discovered Commissioner #0' , f'Vendor ID: { VENDOR_ID } ' , f'Product ID: { PRODUCT_ID } ' ,
98
+ f'Device Type: { DEVICE_TYPE_CASTING_VIDEO_PLAYER } ' , 'Supports Commissioner Generated Passcode: true' ]),
99
99
100
- # Validate that we are ready to send `cast request` command to the tv-casting-app subprocess.
101
- Step (app = App .TV_CASTING_APP , output_msg = ['Example: cast request 0' ]),
100
+ # Validate that we are ready to send `cast request` command to the tv-casting-app subprocess.
101
+ Step (app = App .TV_CASTING_APP , output_msg = ['Example: cast request 0' ]),
102
102
103
- # Send `cast request {valid_discovered_commissioner_number}\n` command to the tv-casting-app subprocess.
104
- Step (app = App .TV_CASTING_APP , input_cmd = 'cast request 0\n ' ),
103
+ # Send `cast request {valid_discovered_commissioner_number}\n` command to the tv-casting-app subprocess.
104
+ Step (app = App .TV_CASTING_APP , input_cmd = 'cast request 0\n ' ),
105
105
106
- # Validate that the `Identification Declaration` message block in the tv-casting-app output has the expected values for `device Name`, `vendor id`, and `product id`.
107
- Step (app = App .TV_CASTING_APP , output_msg = ['Identification Declaration Start' , f'device Name: { TEST_TV_CASTING_APP_DEVICE_NAME } ' ,
108
- f'vendor id: { VENDOR_ID } ' , f'product id: { PRODUCT_ID } ' , 'Identification Declaration End' ]),
106
+ # Validate that the `Identification Declaration` message block in the tv-casting-app output has the expected values for `device Name`, `vendor id`, and `product id`.
107
+ Step (app = App .TV_CASTING_APP , output_msg = ['Identification Declaration Start' , f'device Name: { TEST_TV_CASTING_APP_DEVICE_NAME } ' ,
108
+ f'vendor id: { VENDOR_ID } ' , f'product id: { PRODUCT_ID } ' , 'Identification Declaration End' ]),
109
109
110
- # Validate that the `Identification Declaration` message block in the tv-app output has the expected values for `device Name`, `vendor id`, and `product id`.
111
- Step (app = App .TV_APP , output_msg = ['Identification Declaration Start' , f'device Name: { TEST_TV_CASTING_APP_DEVICE_NAME } ' ,
110
+ # Validate that the `Identification Declaration` message block in the tv-app output has the expected values for `device Name`, `vendor id`, and `product id`.
111
+ Step (app = App .TV_APP , output_msg = ['Identification Declaration Start' , f'device Name: { TEST_TV_CASTING_APP_DEVICE_NAME } ' ,
112
112
f'vendor id: { VENDOR_ID } ' , f'product id: { PRODUCT_ID } ' , 'Identification Declaration End' ]),
113
113
114
- # Validate that we received the cast request from the tv-casting-app on the tv-app output.
115
- Step (app = App .TV_APP ,
116
- output_msg = ['PROMPT USER: Test TV casting app is requesting permission to cast to this TV, approve?' ]),
114
+ # Validate that we received the cast request from the tv-casting-app on the tv-app output.
115
+ Step (app = App .TV_APP ,
116
+ output_msg = ['PROMPT USER: Test TV casting app is requesting permission to cast to this TV, approve?' ]),
117
117
118
- # Validate that we received the instructions on the tv-app output for sending the `controller ux ok` command.
119
- Step (app = App .TV_APP , output_msg = ['Via Shell Enter: controller ux ok|cancel' ]),
118
+ # Validate that we received the instructions on the tv-app output for sending the `controller ux ok` command.
119
+ Step (app = App .TV_APP , output_msg = ['Via Shell Enter: controller ux ok|cancel' ]),
120
120
121
- # Send `controller ux ok` command to the tv-app subprocess.
122
- Step (app = App .TV_APP , input_cmd = 'controller ux ok\n ' ),
121
+ # Send `controller ux ok` command to the tv-app subprocess.
122
+ Step (app = App .TV_APP , input_cmd = 'controller ux ok\n ' ),
123
123
124
- # Validate that pairing succeeded between the tv-casting-app and the tv-app.
125
- Step (app = App .TV_APP , output_msg = ['Secure Pairing Success' ]),
124
+ # Validate that pairing succeeded between the tv-casting-app and the tv-app.
125
+ Step (app = App .TV_APP , output_msg = ['Secure Pairing Success' ]),
126
126
127
- # Validate that commissioning succeeded in the tv-casting-app output.
128
- Step (app = App .TV_CASTING_APP , output_msg = ['Commissioning completed successfully' ]),
127
+ # Validate that commissioning succeeded in the tv-casting-app output.
128
+ Step (app = App .TV_CASTING_APP , output_msg = ['Commissioning completed successfully' ]),
129
129
130
- # Validate that commissioning succeeded in the tv-app output.
131
- Step (app = App .TV_APP , output_msg = ['------PROMPT USER: commissioning success' ]),
130
+ # Validate that commissioning succeeded in the tv-app output.
131
+ Step (app = App .TV_APP , output_msg = ['------PROMPT USER: commissioning success' ]),
132
132
133
- # Validate the subscription state by looking at the `Cluster` and `Attribute` values in the `ReportDataMessage` block in the tv-casting-app output.
134
- Step (app = App .TV_CASTING_APP , output_msg = [
135
- 'ReportDataMessage =' , f'Cluster = { CLUSTER_MEDIA_PLAYBACK } ' , f'Attribute = { ATTRIBUTE_CURRENT_PLAYBACK_STATE } ' , 'InteractionModelRevision =' , '}' ]),
133
+ # Validate the subscription state by looking at the `Cluster` and `Attribute` values in the `ReportDataMessage` block in the tv-casting-app output.
134
+ Step (app = App .TV_CASTING_APP , output_msg = [
135
+ 'ReportDataMessage =' , f'Cluster = { CLUSTER_MEDIA_PLAYBACK } ' , f'Attribute = { ATTRIBUTE_CURRENT_PLAYBACK_STATE } ' , 'InteractionModelRevision =' , '}' ]),
136
136
137
- # Validate the LaunchURL in the tv-app output.
138
- Step (app = App .TV_APP ,
139
- output_msg = ['ContentLauncherManager::HandleLaunchUrl TEST CASE ContentURL=https://www.test.com/videoid DisplayString=Test video' ]),
137
+ # Validate the LaunchURL in the tv-app output.
138
+ Step (app = App .TV_APP ,
139
+ output_msg = ['ContentLauncherManager::HandleLaunchUrl TEST CASE ContentURL=https://www.test.com/videoid DisplayString=Test video' ]),
140
140
141
- # Validate the LaunchURL in the tv-casting-app output.
142
- Step (app = App .TV_CASTING_APP , output_msg = ['InvokeResponseMessage =' ,
143
- 'exampleData' , 'InteractionModelRevision =' , '},' ]),
141
+ # Validate the LaunchURL in the tv-casting-app output.
142
+ Step (app = App .TV_CASTING_APP , output_msg = ['InvokeResponseMessage =' ,
143
+ 'exampleData' , 'InteractionModelRevision =' , '},' ]),
144
144
145
- # Signal to stop the tv-casting-app as we finished validation.
146
- Step (app = App .TV_CASTING_APP , input_cmd = STOP_APP ),
145
+ # Signal to stop the tv-casting-app as we finished validation.
146
+ Step (app = App .TV_CASTING_APP , input_cmd = STOP_APP ),
147
147
148
- # Signal to stop the tv-app as we finished validation.
149
- Step (app = App .TV_APP , input_cmd = STOP_APP )
150
- ]
151
- )
152
- ]
148
+ # Signal to stop the tv-app as we finished validation.
149
+ Step (app = App .TV_APP , input_cmd = STOP_APP )
150
+ ]
151
+ )
152
+ ]
0 commit comments