Skip to content

Commit f28f09d

Browse files
testId
1 parent d99b266 commit f28f09d

File tree

1 file changed

+10
-6
lines changed

1 file changed

+10
-6
lines changed

accessibility/scanner/index.js

Lines changed: 10 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -121,20 +121,24 @@ async function processAccessibilityReport(url) {
121121

122122
try {
123123

124-
let testId = Cypress.env("TEST_ID") || ""
124+
let testId = Cypress.env("TEST_ID") || "dummy1234"
125125
let reportAPI = Cypress.env("GENERATE_REPORT_API") || "http://localhost:43000/api/v1.0/cypress/generateAccessibilityReport"
126-
const filePath = Cypress.env("ACCESSIBILITY_REPORT_PATH") || 'cypress/results/accessibilityReport_' + testId + '.json';
126+
const filePath = (Cypress.env("ACCESSIBILITY_REPORT_PATH") || 'cypress/results/accessibilityReport_' ) + testId + '.json';
127127
console.log("TestID is",testId);
128128
const payloadToSend = {
129129
message: 'SEND_ACESSIBILITY_DATA',
130130
testId : testId,
131131
scanData: scanData,
132132
accessibilityReportPath:filePath,
133-
api: reportAPI
133+
apiUrl: reportAPI
134134
};
135-
136-
let response = await sendScanData(payloadToSend);
137-
console.log("Accessibility Report Response:", response);
135+
try{
136+
let response = await sendScanData(currentWindow,payloadToSend);
137+
console.log("Accessibility Report Response:", response);
138+
}catch(e){
139+
console.error("Error in Accessibility Report Response:",e);
140+
}
141+
138142
}catch(err) {
139143
console.error("Error while making api", err);
140144
}

0 commit comments

Comments
 (0)