mirror of
https://github.com/HabitRPG/habitica.git
synced 2025-12-17 14:47:53 +01:00
Group plans reorder tasks (#8358)
* Added move route for group tasks * Added group task reorder to front end * Added syncing with group task order * Fixed linting issues * Added missing exec and abstracted move code * Added unit test for moveTask
This commit is contained in:
committed by
Matteo Pagliazzi
parent
2690caed35
commit
1590d955cd
@@ -2,6 +2,7 @@ import {
|
||||
createTasks,
|
||||
getTasks,
|
||||
syncableAttrs,
|
||||
moveTask,
|
||||
} from '../../../../../website/server/libs/taskManager';
|
||||
import i18n from '../../../../../website/common/script/i18n';
|
||||
import {
|
||||
@@ -169,4 +170,12 @@ describe('taskManager', () => {
|
||||
expect(syncableTask.notes).to.not.exist;
|
||||
expect(syncableTask.updatedAt).to.not.exist;
|
||||
});
|
||||
|
||||
it('moves tasks to a specified position', async() => {
|
||||
let order = ['task-id-1', 'task-id-2'];
|
||||
|
||||
moveTask(order, 'task-id-2', 0);
|
||||
|
||||
expect(order).to.eql(['task-id-2', 'task-id-1']);
|
||||
});
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user