Skip to content

Commit 03671bc

Browse files
authored
Merge pull request #429 from saksharoralambdatest/AT-344
2 parents ef45488 + edf9e09 commit 03671bc

File tree

3 files changed

+11
-9
lines changed

3 files changed

+11
-9
lines changed

accessibility/scanner/index.js

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ const LambdatestLog = (message) => {
55
}
66

77
let globalScreenshots = null;
8-
const captureScreenshotEnabled = Cypress.env("CAPTURE_SCREENSHOT_ENABLED") === "true";
8+
const captureScreenshot = Cypress.env("CAPTURE_SCREENSHOT") === "true";
99

1010
const commandsToOverride = [
1111
'visit', 'click', 'type', 'request', 'dblclick', 'rightclick', 'clear', 'check',
@@ -43,8 +43,8 @@ const performNewLambdaScan = (originalFn, Subject, stateType, ...args) => {
4343
if (subjectChainFn !== null && subjectChainFn !== void 0) {
4444
cypressCommandChain = subjectChainFn.call(cy);
4545
}
46-
47-
if (captureScreenshotEnabled) {
46+
47+
if (captureScreenshot) {
4848
cy.log('Starting performScanSubjectQuery');
4949
cycustomChaining
5050
.performScanSubjectQuery(cypressCommandChain, setTimeout)
@@ -163,14 +163,16 @@ const processAccessibilityReport = async (windowNew) => {
163163
let wcagCriteriaValue = Cypress.env("WCAG_CRITERIA") || "wcag21a";
164164
let bestPracticeValue = Cypress.env("BEST_PRACTICE") === "true";
165165
let needsReviewValue = Cypress.env("NEEDS_REVIEW") !== "false"; // Default to true
166-
let captureScreenshotEnabled = Cypress.env("CAPTURE_SCREENSHOT_ENABLED") === "true";
166+
let captureScreenshot = Cypress.env("CAPTURE_SCREENSHOT") === "true";
167+
let passedTestCases = Cypress.env("PASSED_TEST_CASES") === "true";
167168

168169
const payloadToSend = {
169170
message: 'SET_CONFIG',
170171
wcagCriteria: wcagCriteriaValue,
171172
bestPractice: bestPracticeValue,
172173
needsReview: needsReviewValue,
173-
captureScreenshotEnabled: captureScreenshotEnabled
174+
captureScreenshot: captureScreenshot,
175+
passedTestCases: passedTestCases
174176
};
175177

176178
console.log('log', "SET SCAN: Payload to send: ", payloadToSend);
@@ -187,7 +189,7 @@ const processAccessibilityReport = async (windowNew) => {
187189
const payload = {message: 'GET_LATEST_SCAN_DATA'};
188190
scanData = await getScanData(windowNew, payload);
189191
LambdatestLog("GET SCAN:LambdaTest Accessibility: Scanning URL");
190-
if(captureScreenshotEnabled){
192+
if (captureScreenshot) {
191193
if (scanData && scanData.data && scanData.data.length > 0 && globalScreenshots) {
192194
const firstDataItem = scanData.data[0];
193195
if (firstDataItem.events && firstDataItem.events.length > 0) {
@@ -220,7 +222,7 @@ const processAccessibilityReport = async (windowNew) => {
220222
const filePath = Cypress.env("ACCESSIBILITY_REPORT_PATH") || ('cypress/results/accessibilityReport_' + testId + '.json');
221223
console.log("TestID is",testId);
222224
const payloadToSend = {
223-
message: 'SEND_ACESSIBILITY_DATA',
225+
message: 'SEND_ACCESSIBILITY_DATA',
224226
testId : testId,
225227
scanData: scanData,
226228
accessibilityReportPath:filePath,

package-lock.json

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "lambdatest-cypress-cli",
3-
"version": "3.0.40",
3+
"version": "3.0.41",
44
"description": "The lambdatest-cypress-cli is LambdaTest's command-line interface (CLI) aimed to help you run your Cypress tests on LambdaTest platform.",
55
"homepage": "https://github.com/LambdaTest/lambdatest-cypress-cli",
66
"author": "LambdaTest <[email protected]>",

0 commit comments

Comments
 (0)