From 6b83d02b0398a81805f679026d2edd981e61913d Mon Sep 17 00:00:00 2001 From: Abhishek urs C J Date: Tue, 16 Jul 2024 13:40:18 +0530 Subject: [PATCH] Addressed the comments --- .../Accessibility.feature | 2 +- .../Manage/ClosedCaptionsManage.feature | 29 ++++++++++--------- cypress/support/cypress-commands/commands.js | 15 ++++++---- cypress/support/cypress-support/src/utils.js | 3 -- 4 files changed, 25 insertions(+), 24 deletions(-) diff --git a/cypress/TestCases/FireboltCertification/Accessibility.feature b/cypress/TestCases/FireboltCertification/Accessibility.feature index 37eb67f60..2992ca189 100644 --- a/cypress/TestCases/FireboltCertification/Accessibility.feature +++ b/cypress/TestCases/FireboltCertification/Accessibility.feature @@ -128,7 +128,7 @@ Feature: Accessibility | Set fontSize-1 | fontSize | 1 | | Set fontColor-#ffffff | fontColor | #ffffff | | Set fontEdge-raised | fontEdge | raised | - | Set fontEdgeColor-#7f7f7f | fontEdge | #7F7F7F | + | Set fontEdgeColor-#7f7f7f | fontEdgeColor | #7F7F7F | | Set backgroundColor-#000000 | backgroundColor | #000000 | | Set fontOpacity-100 | fontOpacity | 100 | | Set backgroundOpacity-100 | backgroundOpacity | 100 | diff --git a/cypress/TestCases/FireboltCertification/Manage/ClosedCaptionsManage.feature b/cypress/TestCases/FireboltCertification/Manage/ClosedCaptionsManage.feature index ea004d252..d3d20edc4 100644 --- a/cypress/TestCases/FireboltCertification/Manage/ClosedCaptionsManage.feature +++ b/cypress/TestCases/FireboltCertification/Manage/ClosedCaptionsManage.feature @@ -42,13 +42,14 @@ Feature: ClosedCaptions_Manage | Set textAlign-center | textAlign | center | | Set textAlign-right | textAlign | right | | Set textAlignVertical-top | textAlignVertical | top | + | Set textAlignVertical-middle | textAlignVertical | middle | | Set textAlignVertical-bottom | textAlignVertical | bottom | | Set preferredLanguages | preferredLanguages | spa,eng | | Set windowColor-white | windowColor | white | | Set windowOpacity-50 | windowOpacity | 50 | @ClosedCaptions @manageSDK - Scenario Outline: ClosedCaptions. - Positive Scenario: + Scenario Outline: ClosedCaptions. - Positive Scenario: with 'null' params Given we test the 'CLOSED_CAPTIONS_SETTINGS' getters and setters '' to 'null' When '1st party app' registers for the 'Firebolt' event And 1st party app invokes the 'Firebolt' API to set '' to 'null' @@ -58,19 +59,19 @@ Feature: ClosedCaptions_Manage And 'Firebolt' platform triggers '1st party app' event Examples: - | Method | - | fontFamily | - | fontSize | - | fontColor | - | fontEdge | - | fontEdgeColor | - | fontOpacity | - | backgroundColor | - | backgroundOpacity | - | textAlign | - | textAlignVerticalontColor | - | windowColor | - | windowOpacity | + | Method | + | fontFamily | + | fontSize | + | fontColor | + | fontEdge | + | fontEdgeColor | + | fontOpacity | + | backgroundColor | + | backgroundOpacity | + | textAlign | + | textAlignVertical | + | windowColor | + | windowOpacity | @ClosedCaptions @manageSDK Scenario Outline: ClosedCaptions. - Negative Scenario: expecting error diff --git a/cypress/support/cypress-commands/commands.js b/cypress/support/cypress-commands/commands.js index 77482c921..8140b039a 100644 --- a/cypress/support/cypress-commands/commands.js +++ b/cypress/support/cypress-commands/commands.js @@ -1070,12 +1070,15 @@ Cypress.Commands.add('methodOrEventResponseValidation', (validationType, request return path; } }); - validationPath - ? (validationJsonPath = validationPath) - : fireLog.assert( - false, - `Could not find the valid validation path from the validationJsonPath list - ${validationJsonPath}` - ); + if (validationPath) { + validationJsonPath = validationPath; + } else { + fireLog.info('Response: ', methodOrEventResponse); + fireLog.assert( + false, + `Could not find the valid validation path from the validationJsonPath list - ${validationJsonPath}` + ); + } } switch (scenario) { case CONSTANTS.REGEX: diff --git a/cypress/support/cypress-support/src/utils.js b/cypress/support/cypress-support/src/utils.js index 4ab6266da..78e87a776 100644 --- a/cypress/support/cypress-support/src/utils.js +++ b/cypress/support/cypress-support/src/utils.js @@ -809,9 +809,6 @@ function parseValue(str) { if (str.includes(',')) { return str.split(','); } - if (/^#([A-Fa-f0-9]{6}|[A-Fa-f0-9]{3})$/.test(str)) { - return str; - } } return str;