Unify organizer navigation and add personal widget dashboard
This commit is contained in:
1 parent
a9249009f0
commit
6ba30bc9f4
44 files changed
+843
-54
No files matched your search
@@ -86,6 +86,30 @@ func TestTaskProductivityMigrationBackfillsOnce(t *testing.T) {
|
||||
}
|
||||
}
|
||||
|
||||
func TestDashboardUpgradePreservesTaskPreferences(t *testing.T) {
|
||||
st := newSchemaTestStore(t)
|
||||
if err := db.ApplySQLiteMigrations(context.Background(), st.DB, "task-productivity", taskProductivityMigrations[:1]); err != nil {
|
||||
t.Fatal(err)
|
||||
}
|
||||
if _, err := st.DB.Exec(`INSERT INTO organizer_task_preferences VALUES('domain','owner',7,'{"estimate_minutes":90}',123)`); err != nil {
|
||||
t.Fatal(err)
|
||||
}
|
||||
for range 2 {
|
||||
if err := st.ensureSchemaComponent("task-productivity"); err != nil {
|
||||
t.Fatal(err)
|
||||
}
|
||||
}
|
||||
var version, next int64
|
||||
var raw string
|
||||
if err := st.DB.QueryRow(`SELECT version,data,next_digest_ms FROM organizer_task_preferences`).Scan(&version, &raw, &next); err != nil || version != 7 || next != 123 || raw != `{"estimate_minutes":90}` {
|
||||
t.Fatal(version, raw, next, err)
|
||||
}
|
||||
var count int
|
||||
if err := st.DB.QueryRow(`SELECT count(*) FROM organizer_dashboard_layouts`).Scan(&count); err != nil || count != 0 {
|
||||
t.Fatal(count, err)
|
||||
}
|
||||
}
|
||||
|
||||
func TestManagedSchemasFreshRepeatAndReadOnly(t *testing.T) {
|
||||
for component := range managedStoreSchemas {
|
||||
t.Run(component, func(t *testing.T) {
|
||||
|
||||
Reference in new issue
Block a user