task planner categories optimisation
All checks were successful
Deploy Sokko G / deploy (push) Successful in 7s
All checks were successful
Deploy Sokko G / deploy (push) Successful in 7s
This commit is contained in:
parent
3dc5ed8733
commit
1d3bdd60f1
7 changed files with 217 additions and 37 deletions
|
|
@ -33,7 +33,9 @@ test("task planner data normalizes invalid settings and relations", () => {
|
|||
sortMode: "unknown",
|
||||
weeklyResetDay: 9,
|
||||
resetTime: "27:80",
|
||||
hideCompleted: true,
|
||||
categoryOrder: ["Raid", "Missing", "Farm", "Raid"],
|
||||
collapsedCategories: ["Raid", "", "Raid"],
|
||||
tasks: [
|
||||
{ id: "task1", title: "Daily", type: "daily", checked: true, checkedAt: 1000, category: "Farm" },
|
||||
{ id: "task2", title: "Weekly", type: "weekly", weeklyResetDay: 4, category: "Raid" },
|
||||
|
|
@ -50,7 +52,9 @@ test("task planner data normalizes invalid settings and relations", () => {
|
|||
assert.equal(normalized.sortMode, "manual");
|
||||
assert.equal(normalized.weeklyResetDay, 1);
|
||||
assert.equal(normalized.resetTime, "00:00");
|
||||
assert.equal(normalized.hideCompleted, true);
|
||||
assert.deepEqual(normalized.categoryOrder, ["Raid"]);
|
||||
assert.deepEqual(normalized.collapsedCategories, ["Raid"]);
|
||||
assert.equal(normalized.tasks[0].category, undefined);
|
||||
assert.equal(normalized.tasks[1].weeklyResetDay, 4);
|
||||
assert.equal(normalized.tasks[1].category, "Raid");
|
||||
|
|
@ -65,6 +69,8 @@ test("task planner storage compacts defaults and export remaps task relations",
|
|||
sortMode: "type",
|
||||
weeklyResetDay: 1,
|
||||
resetTime: "00:00",
|
||||
hideCompleted: true,
|
||||
collapsedCategories: ["Raid"],
|
||||
tasks: [
|
||||
{ id: "task1", title: "Daily", description: "", type: "daily", checked: false },
|
||||
{ id: "task2", title: "Weekly", description: "Run", type: "weekly", checked: true, checkedAt: 2000, weeklyResetDay: 5, category: "Raid" }
|
||||
|
|
@ -78,6 +84,8 @@ test("task planner storage compacts defaults and export remaps task relations",
|
|||
assert.equal(compact.sortMode, "type");
|
||||
assert.equal(compact.weeklyResetDay, undefined);
|
||||
assert.equal(compact.resetTime, undefined);
|
||||
assert.equal(compact.hideCompleted, true);
|
||||
assert.deepEqual(compact.collapsedCategories, ["Raid"]);
|
||||
assert.deepEqual(compact.categoryOrder, ["Raid"]);
|
||||
assert.deepEqual(compact.tasks[0], { id: "task1", title: "Daily", type: "daily" });
|
||||
assert.equal(compact.tasks[1].category, "Raid");
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue