Skip to content

Commit

Permalink
test - 11
Browse files Browse the repository at this point in the history
  • Loading branch information
yasserfaraazkhan committed Dec 22, 2023
1 parent ded5269 commit 3ecabd0
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 16 deletions.
15 changes: 0 additions & 15 deletions e2e/save_report.js
Original file line number Diff line number Diff line change
Expand Up @@ -84,29 +84,14 @@ const saveReport = async () => {

// Create or use an existing test cycle
let testCycle = {};
console.log("******************* ZEPHYR_ENABLE =========" , ZEPHYR_ENABLE);
if (ZEPHYR_ENABLE === 'true') {
console.log("******************* ZEPHYR_ENABLE =========" , ZEPHYR_ENABLE);
const {start, end} = jsonReport.stats;
console.log("******************* {start, end} =========" , start, end);
testCycle = ZEPHYR_CYCLE_KEY ? {key: ZEPHYR_CYCLE_KEY} : await createTestCycle(start, end);
console.log("******************* test cycle =========" , testCycle);
}

console.log("******************* WEBHOOK_URL =========" , WEBHOOK_URL);
console.log("******************* TYPE =========" , TYPE);

// Send test report to "QA: UI Test Automation" channel via webhook
if (TYPE && TYPE !== 'NONE' && WEBHOOK_URL) {
console.log("******************* 1");
console.log("*******************", WEBHOOK_URL);
console.log("******************* 2");
console.log("*******************", testCycle);
console.log("******************* 3");
const data = generateTestReport(summary, result && result.success, result && result.reportLink, testCycle.key);
console.log("******************* 4");
console.log("*******************", data);
console.log("******************* 5");
await sendReport('summary report to Community channel', WEBHOOK_URL, data);
}

Expand Down
2 changes: 1 addition & 1 deletion e2e/utils/test_cases.js
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ function saveToEndpoint(url, data) {
},
data,
}).catch((error) => {
console.log('Something went wrong:', error.response.data.message);
console.log('Something went wrong:', error.response.data);
return error.response.data;
});
}
Expand Down

0 comments on commit 3ecabd0

Please sign in to comment.