mirror of
https://github.com/HabitRPG/habitica.git
synced 2025-12-17 22:57:21 +01:00
Challenge Won Notification improvements (#12762)
* challenge won notification: add more info * update tests * use new notification on web, fixes #7716 * wip design * finalize design * fix markdown rendering
This commit is contained in:
@@ -103,7 +103,15 @@ describe('POST /challenges/:challengeId/winner/:winnerId', () => {
|
||||
await expect(winningUser.sync()).to.eventually.have.nested.property('achievements.challenges').to.include(challenge.name);
|
||||
// 2 because winningUser just joined the challenge, which now awards an achievement
|
||||
expect(winningUser.notifications.length).to.equal(2);
|
||||
expect(winningUser.notifications[1].type).to.equal('WON_CHALLENGE');
|
||||
|
||||
const notif = winningUser.notifications[1];
|
||||
expect(notif.type).to.equal('WON_CHALLENGE');
|
||||
expect(notif.data).to.eql({
|
||||
id: challenge._id,
|
||||
name: challenge.name,
|
||||
prize: challenge.prize,
|
||||
leader: challenge.leader,
|
||||
});
|
||||
});
|
||||
|
||||
it('gives winner gems as reward', async () => {
|
||||
|
||||
Reference in New Issue
Block a user