mirror of
https://github.com/HabitRPG/habitica.git
synced 2025-12-15 13:47:33 +01:00
Repeatables (#8444)
* Added initial should do weekly tests * Added support back in for days of the week and every x day * Added better week day mapper * Added initial monthly * Added every x months * Added yearlies * Fixed every nth weekdy of month * Fixed tests to check every x week on weekday * Began combining x month with nth weekday * Added every x month combined with date and weekday * Fixed lint issues * Saved moment-recurr to package.json * Added new repeat fields * Added UI for repeatables * Ensured only dalies are affected by summary * Added local strings * Updated npm shrinkwrap * Shared day map constant * Updated shrinkwrap * Added ui back * Updated copy of test cases * Added new translation strings * Updated shrinkwrap * Fixed broken test * Made should do tests static for better consitency * Fixed issue with no repeat * Fixed line endings * Added frequency enum values * Fixed spacing
This commit is contained in:
@@ -496,6 +496,8 @@ describe('POST /tasks/user', () => {
|
||||
frequency: 'daily',
|
||||
everyX: 5,
|
||||
startDate: now,
|
||||
daysOfMonth: [15],
|
||||
weeksOfMonth: [3],
|
||||
});
|
||||
|
||||
expect(task.userId).to.equal(user._id);
|
||||
@@ -504,6 +506,8 @@ describe('POST /tasks/user', () => {
|
||||
expect(task.type).to.eql('daily');
|
||||
expect(task.frequency).to.eql('daily');
|
||||
expect(task.everyX).to.eql(5);
|
||||
expect(task.daysOfMonth).to.eql([15]);
|
||||
expect(task.weeksOfMonth).to.eql([3]);
|
||||
expect(new Date(task.startDate)).to.eql(now);
|
||||
});
|
||||
|
||||
|
||||
Reference in New Issue
Block a user