From 234acc72924774b7ee28852ded4b13705fc3c916 Mon Sep 17 00:00:00 2001 From: Nandana-NNR Date: Wed, 10 Jul 2024 12:48:07 +0530 Subject: [PATCH 01/11] FIRECERT-2128-trigger event changes --- cypress/support/constants/constants.js | 4 ++++ .../support/step_definitions/fireboltCalls.js | 20 +++++++++++++------ .../support/step_definitions/fireboltCalls.md | 14 ++++++++++++- defaultModule/requestModules/fcs.js | 14 +++++++++++++ 4 files changed, 45 insertions(+), 7 deletions(-) diff --git a/cypress/support/constants/constants.js b/cypress/support/constants/constants.js index 7572448af..d101c535d 100644 --- a/cypress/support/constants/constants.js +++ b/cypress/support/constants/constants.js @@ -325,6 +325,7 @@ module.exports = { RECORD_LIFECYCLE_HISTORY: 'fcs.recordLifecycleHistory', SETPERFORMANCETESTHANDLER: 'performance.setPerformanceTestHandler', SETLIFECYCLESTATE: 'fcs.setLifecycleState', + TRIGGEREVENT: 'fcs.triggerEvent', FETCH_EVENT_RESPONSE: 'fcs.fetchEventResponse', PERFORMANCE_THRESHOLD_VALIDATOR: 'performance.fetchPerformanceThreshold', CREATE_MARKER: 'performance.createMarker', @@ -457,6 +458,9 @@ module.exports = { SECONDARY_THIRD_PARTY_APP_ID: 'secondary3rdPartyAppId', SECONDARY_APPID_MISSING_ERROR: '`Unable to find the ${envAppIdKey} value in the env, please add the value in configModule/constants/config.json`', + TRIGGER_EVENT_MISSING: 'triggerEvent request override function to set event values not implemented by underlying platform', + TRIGGER_EVENT_REQUEST: 'Request sent to platform to trigger event: ', + TRIGGER_EVENT_SUCCESS: 'Event triggered successfully' }; function getSanityReportPath() { // Check if Cypress is defined, for cypress test context diff --git a/cypress/support/step_definitions/fireboltCalls.js b/cypress/support/step_definitions/fireboltCalls.js index aaafe7a93..0c5b7f3c8 100644 --- a/cypress/support/step_definitions/fireboltCalls.js +++ b/cypress/support/step_definitions/fireboltCalls.js @@ -527,15 +527,23 @@ Given( ); /** - * @function User triggers event with value '{}}' - * @description sending message to platform to make post call to set values. - * @param {String} key - Name of event to be called. + * @function User triggers event with value as '(.+)' + * @description sending message to platform to make post call to set event values. + * @param {String} key - key name of the event data * @example - * And User triggers event with value as ' DEVICE_ONHDCPCHANGED_EVENTS' + * And User triggers event with value as 'onColorimetryChanged event with colorimetry as BT2020cYCC' */ Given(/User triggers event with value as '(.+)'/, (key) => { - fireLog.info(CONSTANTS.STEP_DEFINITION_NEEDS_TO_IMPLEMENT).then(() => { - throw new Error(CONSTANTS.STEP_IMPLEMENTATION_MISSING); + const requestMap = { + method: CONSTANTS.REQUEST_OVERRIDE_CALLS.TRIGGEREVENT, + params: { key: key}, + }; + cy.log(CONSTANTS.TRIGGER_EVENT_REQUEST + JSON.stringify(requestMap)).then(() => { + cy.sendMessagetoPlatforms(requestMap).then((result) => { + if (result) { + logger.info(CONSTANTS.TRIGGER_EVENT_SUCCESS); + } + }); }); }); diff --git a/cypress/support/step_definitions/fireboltCalls.md b/cypress/support/step_definitions/fireboltCalls.md index a4fbb3ae1..14be583a3 100644 --- a/cypress/support/step_definitions/fireboltCalls.md +++ b/cypress/support/step_definitions/fireboltCalls.md @@ -127,4 +127,16 @@ Note: Key name value is an object and it can contains data as below * `And '1st party app' invokes the 'Firebolt' get API 'CLOSEDCAPTION_SETTINGS'` * `And '3rd party app' invokes the 'Firebolt' get API 'CLOSEDCAPTION_SETTINGS'` * `And '3rd party app' invokes the 'Firebolt' get API` -* `And 'test_app' invokes the 'Firebolt' get API 'CLOSEDCAPTION_SETTINGS'` \ No newline at end of file +* `And 'test_app' invokes the 'Firebolt' get API 'CLOSEDCAPTION_SETTINGS'` + +## User triggers event with value as '(.+)' + +### Purpose: sending message to platform to make post call to set event values. + +### Params: +| Param | Definition | +| --- | --- | +| key | key name of the event data | + +### Examples: +* `And User triggers event with value as 'onColorimetryChanged event with colorimetry as BT2020cYCC'` diff --git a/defaultModule/requestModules/fcs.js b/defaultModule/requestModules/fcs.js index fc1336e83..08f958f42 100644 --- a/defaultModule/requestModules/fcs.js +++ b/defaultModule/requestModules/fcs.js @@ -109,4 +109,18 @@ function fetchEventResponse(parsedParam) { } } +/** + * @module fcs + * @function triggerEvent + * @description sending message to platform to make post call to set event values. + * @param {String} key - key name of the event data + * @example + * triggerEvent('onColorimetryChanged event with colorimetry as BT2020cYCC') + */ +function triggerEvent(key) { + fireLog.info(CONSTANTS.TRIGGER_EVENT_MISSING).then(() => { + throw new Error(CONSTANTS.TRIGGER_EVENT_MISSING); + }); +} + module.exports = { setResponse, setTestProvider, setLifecycleState, fetchEventResponse }; From 8e4a4e11e0248f3538179558a21ac41b1de340ac Mon Sep 17 00:00:00 2001 From: Nandana-NNR Date: Wed, 10 Jul 2024 13:08:26 +0530 Subject: [PATCH 02/11] FIRECERT-2128-lint fix --- cypress/support/constants/constants.js | 5 +++-- cypress/support/step_definitions/fireboltCalls.js | 2 +- defaultModule/requestModules/fcs.js | 2 +- 3 files changed, 5 insertions(+), 4 deletions(-) diff --git a/cypress/support/constants/constants.js b/cypress/support/constants/constants.js index d101c535d..fefda93b1 100644 --- a/cypress/support/constants/constants.js +++ b/cypress/support/constants/constants.js @@ -458,9 +458,10 @@ module.exports = { SECONDARY_THIRD_PARTY_APP_ID: 'secondary3rdPartyAppId', SECONDARY_APPID_MISSING_ERROR: '`Unable to find the ${envAppIdKey} value in the env, please add the value in configModule/constants/config.json`', - TRIGGER_EVENT_MISSING: 'triggerEvent request override function to set event values not implemented by underlying platform', + TRIGGER_EVENT_MISSING: + 'triggerEvent request override function to set event values not implemented by underlying platform', TRIGGER_EVENT_REQUEST: 'Request sent to platform to trigger event: ', - TRIGGER_EVENT_SUCCESS: 'Event triggered successfully' + TRIGGER_EVENT_SUCCESS: 'Event triggered successfully', }; function getSanityReportPath() { // Check if Cypress is defined, for cypress test context diff --git a/cypress/support/step_definitions/fireboltCalls.js b/cypress/support/step_definitions/fireboltCalls.js index 0c5b7f3c8..8c3fc0aa9 100644 --- a/cypress/support/step_definitions/fireboltCalls.js +++ b/cypress/support/step_definitions/fireboltCalls.js @@ -536,7 +536,7 @@ Given( Given(/User triggers event with value as '(.+)'/, (key) => { const requestMap = { method: CONSTANTS.REQUEST_OVERRIDE_CALLS.TRIGGEREVENT, - params: { key: key}, + params: { key: key }, }; cy.log(CONSTANTS.TRIGGER_EVENT_REQUEST + JSON.stringify(requestMap)).then(() => { cy.sendMessagetoPlatforms(requestMap).then((result) => { diff --git a/defaultModule/requestModules/fcs.js b/defaultModule/requestModules/fcs.js index 08f958f42..d01a3df09 100644 --- a/defaultModule/requestModules/fcs.js +++ b/defaultModule/requestModules/fcs.js @@ -123,4 +123,4 @@ function triggerEvent(key) { }); } -module.exports = { setResponse, setTestProvider, setLifecycleState, fetchEventResponse }; +module.exports = { setResponse, setTestProvider, setLifecycleState, fetchEventResponse, triggerEvent }; From 6f76f7305adcec1228f653b32caa8814bca1f364 Mon Sep 17 00:00:00 2001 From: Nandana-NNR Date: Wed, 10 Jul 2024 13:11:14 +0530 Subject: [PATCH 03/11] FIRECERT-2128-lint fix --- defaultModule/requestModules/fcs.js | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/defaultModule/requestModules/fcs.js b/defaultModule/requestModules/fcs.js index d01a3df09..c549420b7 100644 --- a/defaultModule/requestModules/fcs.js +++ b/defaultModule/requestModules/fcs.js @@ -123,4 +123,10 @@ function triggerEvent(key) { }); } -module.exports = { setResponse, setTestProvider, setLifecycleState, fetchEventResponse, triggerEvent }; +module.exports = { + setResponse, + setTestProvider, + setLifecycleState, + fetchEventResponse, + triggerEvent, +}; From 46d27cdd03bed93257dab1536fa82db905b6bead Mon Sep 17 00:00:00 2001 From: Nandana-NNR Date: Wed, 10 Jul 2024 16:54:54 +0530 Subject: [PATCH 04/11] FIRECERT-2128 addressed comment --- .../support/step_definitions/fireboltCalls.js | 21 +++++++++++-------- 1 file changed, 12 insertions(+), 9 deletions(-) diff --git a/cypress/support/step_definitions/fireboltCalls.js b/cypress/support/step_definitions/fireboltCalls.js index 8c3fc0aa9..c2576ae14 100644 --- a/cypress/support/step_definitions/fireboltCalls.js +++ b/cypress/support/step_definitions/fireboltCalls.js @@ -534,15 +534,18 @@ Given( * And User triggers event with value as 'onColorimetryChanged event with colorimetry as BT2020cYCC' */ Given(/User triggers event with value as '(.+)'/, (key) => { - const requestMap = { - method: CONSTANTS.REQUEST_OVERRIDE_CALLS.TRIGGEREVENT, - params: { key: key }, - }; - cy.log(CONSTANTS.TRIGGER_EVENT_REQUEST + JSON.stringify(requestMap)).then(() => { - cy.sendMessagetoPlatforms(requestMap).then((result) => { - if (result) { - logger.info(CONSTANTS.TRIGGER_EVENT_SUCCESS); - } + cy.fireboltDataParser(key).then((parsedData) => { + let value = parsedData[0].params; + const requestMap = { + method: CONSTANTS.REQUEST_OVERRIDE_CALLS.TRIGGEREVENT, + params: { value: value }, + }; + cy.log(CONSTANTS.TRIGGER_EVENT_REQUEST + JSON.stringify(requestMap)).then(() => { + cy.sendMessagetoPlatforms(requestMap).then((result) => { + if (result) { + logger.info(CONSTANTS.TRIGGER_EVENT_SUCCESS); + } + }); }); }); }); From 6569f4b00a21885ce4ff3b4c2738cf37e84f9807 Mon Sep 17 00:00:00 2001 From: Nandana-NNR Date: Wed, 10 Jul 2024 16:58:53 +0530 Subject: [PATCH 05/11] FIRECERT-2128 addressed comment --- cypress/support/step_definitions/fireboltCalls.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cypress/support/step_definitions/fireboltCalls.js b/cypress/support/step_definitions/fireboltCalls.js index c2576ae14..5f971164f 100644 --- a/cypress/support/step_definitions/fireboltCalls.js +++ b/cypress/support/step_definitions/fireboltCalls.js @@ -535,7 +535,7 @@ Given( */ Given(/User triggers event with value as '(.+)'/, (key) => { cy.fireboltDataParser(key).then((parsedData) => { - let value = parsedData[0].params; + const value = parsedData[0].params; const requestMap = { method: CONSTANTS.REQUEST_OVERRIDE_CALLS.TRIGGEREVENT, params: { value: value }, From 921d4078a16d2750ff62f65b500a920ce72f6b81 Mon Sep 17 00:00:00 2001 From: Nandana-NNR Date: Wed, 10 Jul 2024 17:03:27 +0530 Subject: [PATCH 06/11] FIRECERT-2128 addressed comment --- cypress/support/step_definitions/fireboltCalls.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cypress/support/step_definitions/fireboltCalls.js b/cypress/support/step_definitions/fireboltCalls.js index 5f971164f..3d975e71c 100644 --- a/cypress/support/step_definitions/fireboltCalls.js +++ b/cypress/support/step_definitions/fireboltCalls.js @@ -543,7 +543,7 @@ Given(/User triggers event with value as '(.+)'/, (key) => { cy.log(CONSTANTS.TRIGGER_EVENT_REQUEST + JSON.stringify(requestMap)).then(() => { cy.sendMessagetoPlatforms(requestMap).then((result) => { if (result) { - logger.info(CONSTANTS.TRIGGER_EVENT_SUCCESS); + console.log(CONSTANTS.TRIGGER_EVENT_SUCCESS); } }); }); From 640ce022abd6f87ed8d4feca3faa9d948efa2914 Mon Sep 17 00:00:00 2001 From: Nandana-NNR Date: Thu, 11 Jul 2024 11:37:26 +0530 Subject: [PATCH 07/11] FIRECERT-2128-addressed comment --- cypress/support/constants/constants.js | 7 +++---- cypress/support/step_definitions/fireboltCalls.js | 6 +++--- cypress/support/step_definitions/fireboltCalls.md | 2 +- defaultModule/requestModules/fcs.js | 4 ++-- 4 files changed, 9 insertions(+), 10 deletions(-) diff --git a/cypress/support/constants/constants.js b/cypress/support/constants/constants.js index fefda93b1..cb364790e 100644 --- a/cypress/support/constants/constants.js +++ b/cypress/support/constants/constants.js @@ -55,6 +55,7 @@ module.exports = { COMBINEVALIDATIONOBJECTSJSON: 'combineValidationObjectsJson', COMMUNICATION_MODE: 'communicationMode', CONFIG: 'CONFIG', + CONFIG_IMPLEMENTATION_MISSING: 'Config module implementation missing', CONFIG_MODULE_SETRESPONSE_PATH: 'cypress/fixtures/external/setResponseData.json', CONTENT: 'Content', CONTEXT: 'Context', @@ -458,10 +459,8 @@ module.exports = { SECONDARY_THIRD_PARTY_APP_ID: 'secondary3rdPartyAppId', SECONDARY_APPID_MISSING_ERROR: '`Unable to find the ${envAppIdKey} value in the env, please add the value in configModule/constants/config.json`', - TRIGGER_EVENT_MISSING: - 'triggerEvent request override function to set event values not implemented by underlying platform', - TRIGGER_EVENT_REQUEST: 'Request sent to platform to trigger event: ', - TRIGGER_EVENT_SUCCESS: 'Event triggered successfully', + SET_EVENT_REQUEST: 'Request sent to set event values in platform: ', + SET_EVENT_SUCCESS: 'Event value set successfully in platform', }; function getSanityReportPath() { // Check if Cypress is defined, for cypress test context diff --git a/cypress/support/step_definitions/fireboltCalls.js b/cypress/support/step_definitions/fireboltCalls.js index 3d975e71c..080920023 100644 --- a/cypress/support/step_definitions/fireboltCalls.js +++ b/cypress/support/step_definitions/fireboltCalls.js @@ -531,7 +531,7 @@ Given( * @description sending message to platform to make post call to set event values. * @param {String} key - key name of the event data * @example - * And User triggers event with value as 'onColorimetryChanged event with colorimetry as BT2020cYCC' + * And User triggers event with value as 'onNetworkChanged events with wifi connected' */ Given(/User triggers event with value as '(.+)'/, (key) => { cy.fireboltDataParser(key).then((parsedData) => { @@ -540,10 +540,10 @@ Given(/User triggers event with value as '(.+)'/, (key) => { method: CONSTANTS.REQUEST_OVERRIDE_CALLS.TRIGGEREVENT, params: { value: value }, }; - cy.log(CONSTANTS.TRIGGER_EVENT_REQUEST + JSON.stringify(requestMap)).then(() => { + cy.log(CONSTANTS.SET_EVENT_REQUEST + JSON.stringify(requestMap)).then(() => { cy.sendMessagetoPlatforms(requestMap).then((result) => { if (result) { - console.log(CONSTANTS.TRIGGER_EVENT_SUCCESS); + console.log(CONSTANTS.SET_EVENT_SUCCESS); } }); }); diff --git a/cypress/support/step_definitions/fireboltCalls.md b/cypress/support/step_definitions/fireboltCalls.md index 14be583a3..e3a7e8284 100644 --- a/cypress/support/step_definitions/fireboltCalls.md +++ b/cypress/support/step_definitions/fireboltCalls.md @@ -139,4 +139,4 @@ Note: Key name value is an object and it can contains data as below | key | key name of the event data | ### Examples: -* `And User triggers event with value as 'onColorimetryChanged event with colorimetry as BT2020cYCC'` +* `And User triggers event with value as 'onNetworkChanged events with wifi connected'` diff --git a/defaultModule/requestModules/fcs.js b/defaultModule/requestModules/fcs.js index c549420b7..c43825cdb 100644 --- a/defaultModule/requestModules/fcs.js +++ b/defaultModule/requestModules/fcs.js @@ -118,8 +118,8 @@ function fetchEventResponse(parsedParam) { * triggerEvent('onColorimetryChanged event with colorimetry as BT2020cYCC') */ function triggerEvent(key) { - fireLog.info(CONSTANTS.TRIGGER_EVENT_MISSING).then(() => { - throw new Error(CONSTANTS.TRIGGER_EVENT_MISSING); + fireLog.info(CONSTANTS.CONFIG_IMPLEMENTATION_MISSING).then(() => { + throw new Error(CONSTANTS.CONFIG_IMPLEMENTATION_MISSING); }); } From 5c2b670c2ea35fbf2e69163f8c990c37cd10791d Mon Sep 17 00:00:00 2001 From: Nandana-NNR Date: Thu, 11 Jul 2024 14:11:42 +0530 Subject: [PATCH 08/11] FIRECERT-2128-addressed comment --- defaultModule/requestModules/fcs.js | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/defaultModule/requestModules/fcs.js b/defaultModule/requestModules/fcs.js index c43825cdb..12f5e09bb 100644 --- a/defaultModule/requestModules/fcs.js +++ b/defaultModule/requestModules/fcs.js @@ -115,7 +115,13 @@ function fetchEventResponse(parsedParam) { * @description sending message to platform to make post call to set event values. * @param {String} key - key name of the event data * @example - * triggerEvent('onColorimetryChanged event with colorimetry as BT2020cYCC') + * triggerEvent({method: 'fcs.triggerevent', params: {'value': { + "method": "device.onNetworkChanged", + "result": { + "state": "disconnected", + "type": "ethernet" + } + }}}) */ function triggerEvent(key) { fireLog.info(CONSTANTS.CONFIG_IMPLEMENTATION_MISSING).then(() => { From 5bc8e1099d6add2771c30b70cc5cfde1e6153ecf Mon Sep 17 00:00:00 2001 From: Nandana-NNR Date: Thu, 11 Jul 2024 16:19:31 +0530 Subject: [PATCH 09/11] FIRECERT-2128-json fix --- cypress/fixtures/modules/device.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/cypress/fixtures/modules/device.json b/cypress/fixtures/modules/device.json index 06585a8b3..0bc7ec774 100644 --- a/cypress/fixtures/modules/device.json +++ b/cypress/fixtures/modules/device.json @@ -88,14 +88,14 @@ "method": "device.onNetworkChanged", "result": { "state": "connected", - "type": "ethernet" + "type": "hybrid" } }, "ONNETWORKCHANGED_HYBRIDDISCONNECT_EVENTS": { "method": "device.onNetworkChanged", "result": { "state": "disconnected", - "type": "ethernet" + "type": "hybrid" } } } \ No newline at end of file From a081ffa8fcb707f3f713ab44eb18b86642c4e04e Mon Sep 17 00:00:00 2001 From: Nandana-NNR Date: Fri, 12 Jul 2024 18:18:09 +0530 Subject: [PATCH 10/11] FIRECERT-2128-latest commit --- .../FireboltCertification/Device.feature | 3 ++- .../SecondScreen.feature | 16 ++++++++-------- .../fixtures/fireboltCalls/secondscreen.json | 6 +++--- cypress/fixtures/modules/secondscreen.json | 5 +++++ .../validationObjects/secondscreen.json | 19 +++++++++++++++++-- 5 files changed, 35 insertions(+), 14 deletions(-) diff --git a/cypress/TestCases/FireboltCertification/Device.feature b/cypress/TestCases/FireboltCertification/Device.feature index e6f19c5bd..0c1ac4b66 100644 --- a/cypress/TestCases/FireboltCertification/Device.feature +++ b/cypress/TestCases/FireboltCertification/Device.feature @@ -51,7 +51,7 @@ Feature: Device Then 'Firebolt' platform responds to '1st party app' for 'set device name to kitchen' And 'Firebolt' platform does not trigger event for 'onDeviceNameChanged' - @Device @coreSDK @sdk @transport @notSupported + @Device @coreSDK @sdk @transport @requiresPlatformImplementation Scenario Outline: Device.network - Positive Scenario: When '3rd party app' registers for the 'device onNetworkChanged' event using the 'Firebolt' API And '3rd party app' invokes the 'Firebolt' API to 'fetch device network' @@ -67,3 +67,4 @@ Feature: Device | Validate network_Ethernet_disconnected | device network as ethernet disconnected | onNetworkChanged with ethernet disconnected | onNetworkChanged events with ethernet disconnected | | Validate network_Hybrid_connected | device network as hybrid connected | onNetworkChanged with hybrid connected | onNetworkChanged events with hybrid connected | | Validate network_Hybrid_disconnected | device network as hybrid disconnected | onNetworkChanged with hybrid disconnected | onNetworkChanged events with hybrid disconnected | + \ No newline at end of file diff --git a/cypress/TestCases/FireboltCertification/SecondScreen.feature b/cypress/TestCases/FireboltCertification/SecondScreen.feature index 4ea142734..e050da8bb 100644 --- a/cypress/TestCases/FireboltCertification/SecondScreen.feature +++ b/cypress/TestCases/FireboltCertification/SecondScreen.feature @@ -42,20 +42,20 @@ Feature: Secondscreen Then 'Firebolt' platform responds to '1st party app' for 'set friendlyName to guest room' And 'Firebolt' platform does not trigger event for 'onFriendlyNameChanged' - @Secondscreen @coreSDK @regression @sdk @notSupported + @Secondscreen @coreSDK @regression @sdk @requiresPlatformImplementation Scenario Outline: Secondscreen. - Positive Scenario: Validating event name in response When '3rd party app' registers for the '' event using the 'Firebolt' API And User triggers event with value as '' - Then 'Firebolt' platform responds with '' + Then 'Firebolt' platform triggers event '' Examples: - | EventName | RegisteredEvent | Event_Validation_Key | EventParams | - | onLaunchRequest | secondscreen onLaunchRequest | expected secondscreen onLaunchRequest event | onLaunchRequest event | - | onLaunchRequest | secondscreen onLaunchRequest | expected secondscreen onLaunchRequest event | onLaunchRequest event | - | onCloseRequest | secondscreen onCloseRequest | expected secondscreen onCloseRequest event | onCloseRequest event | - | onCloseRequest | secondscreen onCloseRequest | expected secondscreen onCloseRequest event | onCloseRequest event | + | EventName | RegisteredEvent | Event_Validation_Key | EventParams | + | onLaunchRequest | secondscreen onLaunchRequest | secondscreen onLaunchRequest event | onLaunchRequest event | + | onLaunchRequest | secondscreen onLaunchRequest | secondscreen onLaunchRequest event | onLaunchRequest event | + | onCloseRequest | secondscreen onCloseRequest | secondscreen onCloseRequest event | onCloseRequest event | + | onCloseRequest | secondscreen onCloseRequest | secondscreen onCloseRequest event | onCloseRequest event | - @Secondscreen @coreSDK @regression @sdk @notSupported @requiresPlatformImplementation + @Secondscreen @coreSDK @regression @sdk @requiresPlatformImplementation Scenario Outline: Secondscreen. - Positive Scenario: Validating event Clearing listeners When '3rd party app' registers for the '' event using the 'Firebolt' API And I clear '' listeners diff --git a/cypress/fixtures/fireboltCalls/secondscreen.json b/cypress/fixtures/fireboltCalls/secondscreen.json index 5259055a3..69d1ac26f 100644 --- a/cypress/fixtures/fireboltCalls/secondscreen.json +++ b/cypress/fixtures/fireboltCalls/secondscreen.json @@ -92,12 +92,12 @@ "content": "INVALID_REQUEST", "expectingError": true }, - "EXPECTED_SECONDSCREEN_ONLAUNCHREQUEST_EVENT": { + "SECONDSCREEN_ONLAUNCHREQUEST_EVENT": { "event": "secondscreen.onLaunchRequest", "validationJsonPath": "eventResponse", - "content": "SECONDSCREEN_ONLAUNCHREQUEST" + "content": "SECONDSCREEN_ONLAUNCHREQUEST_TYPE_DIAL_WITH_TEST_DATA" }, - "EXPECTED_SECONDSCREEN_ONCLOSEREQUEST_EVENT": { + "SECONDSCREEN_ONCLOSEREQUEST_EVENT": { "event": "secondscreen.onCloseRequest", "validationJsonPath": "eventResponse", "content": "SECONDSCREEN_ONCLOSEREQUEST" diff --git a/cypress/fixtures/modules/secondscreen.json b/cypress/fixtures/modules/secondscreen.json index 3f9359e4d..066c51247 100644 --- a/cypress/fixtures/modules/secondscreen.json +++ b/cypress/fixtures/modules/secondscreen.json @@ -15,6 +15,11 @@ "version": "1.7", "data": "{\"code\":\"AQDPQZiQcb3KQ7gY7yy5tHTMbbkGHR9Zjp-KL53H3eKBZIeAt7O9UKYPu6B21l2UZVmIqkFXDXBmXvK4g2e3EgZtjMNmKPsTltgnRl95DImtOXjSpWtTjSaOkW4w1kZKUTwLKdwVWTzBVH8ERHorvLU6vCGOVHxXt65LNwdl5HKRweShVC1V9QsyvRnQS61ov0UclmrH_xZML2Bt-Q-rZFjey5MjwupIb4x4f53XUJMhjHpDHoIUKrjpdPDQvK2a\",\"friendlyName\":\"Operator_TX061AEI\",\"UDN\":\"608fef11-2800-482a-962b-23a6690c93c1\"}" }, + "ONLAUNCHREQUEST_TYPE_DIAL_WITH_TEST_DATA": { + "type": "dial", + "version": "1.7", + "data": "test" + }, "ONCLOSEREQUEST_TYPE_DIAL": { "type": "dial", "version": "1.7" diff --git a/cypress/fixtures/objects/validationObjects/secondscreen.json b/cypress/fixtures/objects/validationObjects/secondscreen.json index 9feb4eeee..991255876 100644 --- a/cypress/fixtures/objects/validationObjects/secondscreen.json +++ b/cypress/fixtures/objects/validationObjects/secondscreen.json @@ -59,7 +59,7 @@ } ] }, - "ONCLOSEREQUEST": { + "SECONDSCREEN_ONCLOSEREQUEST": { "method": "secondscreen.onCloseRequest", "data": [ { @@ -73,6 +73,21 @@ ] } ] + }, + + "SECONDSCREEN_ONLAUNCHREQUEST_TYPE_DIAL_WITH_TEST_DATA": { + "method": "secondscreen.onCloseRequest", + "data": [ + { + "type": "fixture", + "validations": [ + { + "mode": "staticContentValidation", + "type": "SECONDSCREEN_ONLAUNCHREQUEST_TYPE_DIAL_WITH_TEST_DATA", + "description": "Validation of the Secondscreen onLaunchRequest event" + } + ] + } + ] } - } From 8edb46bda6cc4b3fba982e12dc3dd9a5d16fc4ab Mon Sep 17 00:00:00 2001 From: Nandana-NNR Date: Mon, 15 Jul 2024 11:04:47 +0530 Subject: [PATCH 11/11] FIRECERT-2128-tag comment addressed --- cypress/TestCases/FireboltCertification/Device.feature | 2 +- cypress/TestCases/FireboltCertification/SecondScreen.feature | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/cypress/TestCases/FireboltCertification/Device.feature b/cypress/TestCases/FireboltCertification/Device.feature index 0c1ac4b66..7d2e40ae7 100644 --- a/cypress/TestCases/FireboltCertification/Device.feature +++ b/cypress/TestCases/FireboltCertification/Device.feature @@ -51,7 +51,7 @@ Feature: Device Then 'Firebolt' platform responds to '1st party app' for 'set device name to kitchen' And 'Firebolt' platform does not trigger event for 'onDeviceNameChanged' - @Device @coreSDK @sdk @transport @requiresPlatformImplementation + @Device @coreSDK @sdk @transport @requiresPlatformImplementation @notSupported Scenario Outline: Device.network - Positive Scenario: When '3rd party app' registers for the 'device onNetworkChanged' event using the 'Firebolt' API And '3rd party app' invokes the 'Firebolt' API to 'fetch device network' diff --git a/cypress/TestCases/FireboltCertification/SecondScreen.feature b/cypress/TestCases/FireboltCertification/SecondScreen.feature index e050da8bb..308741205 100644 --- a/cypress/TestCases/FireboltCertification/SecondScreen.feature +++ b/cypress/TestCases/FireboltCertification/SecondScreen.feature @@ -42,7 +42,7 @@ Feature: Secondscreen Then 'Firebolt' platform responds to '1st party app' for 'set friendlyName to guest room' And 'Firebolt' platform does not trigger event for 'onFriendlyNameChanged' - @Secondscreen @coreSDK @regression @sdk @requiresPlatformImplementation + @Secondscreen @coreSDK @regression @sdk @requiresPlatformImplementation @notSupported Scenario Outline: Secondscreen. - Positive Scenario: Validating event name in response When '3rd party app' registers for the '' event using the 'Firebolt' API And User triggers event with value as '' @@ -55,7 +55,7 @@ Feature: Secondscreen | onCloseRequest | secondscreen onCloseRequest | secondscreen onCloseRequest event | onCloseRequest event | | onCloseRequest | secondscreen onCloseRequest | secondscreen onCloseRequest event | onCloseRequest event | - @Secondscreen @coreSDK @regression @sdk @requiresPlatformImplementation + @Secondscreen @coreSDK @regression @sdk @requiresPlatformImplementation @notSupported Scenario Outline: Secondscreen. - Positive Scenario: Validating event Clearing listeners When '3rd party app' registers for the '' event using the 'Firebolt' API And I clear '' listeners