File tree Expand file tree Collapse file tree 1 file changed +10
-6
lines changed Expand file tree Collapse file tree 1 file changed +10
-6
lines changed Original file line number Diff line number Diff line change @@ -121,20 +121,24 @@ async function processAccessibilityReport(url) {
121
121
122
122
try {
123
123
124
- let testId = Cypress . env ( "TEST_ID" ) || ""
124
+ let testId = Cypress . env ( "TEST_ID" ) || "dummy1234 "
125
125
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' ;
127
127
console . log ( "TestID is" , testId ) ;
128
128
const payloadToSend = {
129
129
message : 'SEND_ACESSIBILITY_DATA' ,
130
130
testId : testId ,
131
131
scanData : scanData ,
132
132
accessibilityReportPath :filePath ,
133
- api : reportAPI
133
+ apiUrl : reportAPI
134
134
} ;
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
+
138
142
} catch ( err ) {
139
143
console . error ( "Error while making api" , err ) ;
140
144
}
You can’t perform that action at this time.
0 commit comments