Skip to content

Commit

Permalink
Merge branch 'develop' into feat/new-user-panel-pending
Browse files Browse the repository at this point in the history
  • Loading branch information
rique223 authored Jun 20, 2024
2 parents e6c128e + fade5a2 commit 7be9720
Show file tree
Hide file tree
Showing 3 changed files with 25 additions and 12 deletions.
5 changes: 5 additions & 0 deletions .changeset/red-cheetahs-heal.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'@rocket.chat/meteor': patch
---

Fixes a cosmetic issue where emoji picker object and symbols category icon are swapped
Original file line number Diff line number Diff line change
Expand Up @@ -30,10 +30,10 @@ const mapCategoryIcon = (category: string) => {
return 'airplane';

case 'objects':
return 'percentage';
return 'lamp-bulb';

case 'symbols':
return 'lamp-bulb';
return 'percentage';

case 'flags':
return 'flag';
Expand Down
28 changes: 18 additions & 10 deletions apps/meteor/reporters/rocketchat.ts
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ class RocketChatReporter implements Reporter {
this.run = options.run;
}

onTestEnd(test: TestCase, result: TestResult) {
async onTestEnd(test: TestCase, result: TestResult) {
if (process.env.REPORTER_ROCKETCHAT_REPORT !== 'true') {
console.log('REPORTER_ROCKETCHAT_REPORT is not true, skipping', {
draft: this.draft,
Expand All @@ -36,15 +36,23 @@ class RocketChatReporter implements Reporter {
draft: this.draft,
run: this.run,
};
console.log(`Sending test result to Rocket.Chat: ${JSON.stringify(payload)}`);
return fetch(this.url, {
method: 'POST',
body: JSON.stringify(payload),
headers: {
'Content-Type': 'application/json',
'X-Api-Key': this.apiKey,
},
});

try {
const res = await fetch(this.url, {
method: 'POST',
body: JSON.stringify(payload),
headers: {
'Content-Type': 'application/json',
'X-Api-Key': this.apiKey,
},
});

if (!res.ok) {
console.error('Error sending test result to Rocket.Chat', JSON.stringify(payload), res);
}
} catch (error) {
console.error('Unknown error while sending test result to Rocket.Chat', JSON.stringify(payload), error);
}
}
}

Expand Down

0 comments on commit 7be9720

Please sign in to comment.