mirror of
https://github.com/HabitRPG/habitica.git
synced 2025-12-17 06:37:23 +01:00
Tasks score notes (#8507)
* Added setting and modal for score notes * Added persistent score notes * Fixed linting issues and documented new field * Added max length to task score notes * Added check for score notes existence * Combined tasks perferences
This commit is contained in:
@@ -212,6 +212,15 @@ describe('shared.ops.scoreTask', () => {
|
||||
expect(ref.afterUser.stats.gp).to.be.greaterThan(ref.beforeUser.stats.gp);
|
||||
});
|
||||
|
||||
it('adds score notes', () => {
|
||||
let scoreNotesString = 'scoreNotes';
|
||||
habit.scoreNotes = scoreNotesString;
|
||||
options = { user: ref.afterUser, task: habit, direction: 'up', times: 5, cron: false };
|
||||
scoreTask(options);
|
||||
|
||||
expect(habit.history[0].scoreNotes).to.eql(scoreNotesString);
|
||||
});
|
||||
|
||||
it('down', () => {
|
||||
scoreTask({user: ref.afterUser, task: habit, direction: 'down', times: 5, cron: false}, {});
|
||||
|
||||
|
||||
Reference in New Issue
Block a user