fix: stabilize trash navigation and action icons
This commit is contained in:
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@@ -19,8 +19,8 @@
|
||||
background: #13131f;
|
||||
}
|
||||
</style>
|
||||
<script type="module" crossorigin src="/assets/main-mEr4zvhI.js"></script>
|
||||
<link rel="stylesheet" crossorigin href="/assets/main-SjC7TazH.css">
|
||||
<script type="module" crossorigin src="/assets/main-DzZpCe3r.js"></script>
|
||||
<link rel="stylesheet" crossorigin href="/assets/main-BoZGEeiu.css">
|
||||
</head>
|
||||
<body>
|
||||
<div id="app"></div>
|
||||
|
||||
@@ -82,6 +82,46 @@ func TestRestoreTrashNodeRestoresAncestorPathOnlyForSelectedChild(t *testing.T)
|
||||
}
|
||||
}
|
||||
|
||||
func TestRestoreTrashNodeFromNestedDeletedFolderRestoresFullPath(t *testing.T) {
|
||||
app, vault := setupTestApp(t)
|
||||
|
||||
parent, err := app.CreateNodeFromTemplate("", "Verstak", "folder.default")
|
||||
if err != nil {
|
||||
t.Fatalf("create parent: %v", err)
|
||||
}
|
||||
templates, err := app.CreateNodeFromTemplate(parent.ID, "templates", "folder.default")
|
||||
if err != nil {
|
||||
t.Fatalf("create templates: %v", err)
|
||||
}
|
||||
registry, err := app.CreateNodeFromTemplate(templates.ID, "registry.go", "folder.default")
|
||||
if err != nil {
|
||||
t.Fatalf("create registry: %v", err)
|
||||
}
|
||||
other, err := app.CreateNodeFromTemplate(templates.ID, "other.go", "folder.default")
|
||||
if err != nil {
|
||||
t.Fatalf("create other: %v", err)
|
||||
}
|
||||
|
||||
if err := app.DeleteNode(parent.ID); err != nil {
|
||||
t.Fatalf("DeleteNode: %v", err)
|
||||
}
|
||||
if err := app.RestoreTrashNode(registry.ID); err != nil {
|
||||
t.Fatalf("RestoreTrashNode(registry): %v", err)
|
||||
}
|
||||
|
||||
for _, id := range []string{parent.ID, templates.ID, registry.ID} {
|
||||
if _, err := app.nodes.GetActive(id); err != nil {
|
||||
t.Fatalf("node %s should be active after restore: %v", id, err)
|
||||
}
|
||||
}
|
||||
if _, err := app.nodes.GetActive(other.ID); err == nil {
|
||||
t.Fatalf("unselected nested sibling should remain deleted")
|
||||
}
|
||||
if _, err := os.Stat(filepath.Join(vault, "Verstak", "templates", "registry.go")); err != nil {
|
||||
t.Fatalf("restored nested path missing: %v", err)
|
||||
}
|
||||
}
|
||||
|
||||
func TestTrashCountPurgeAndEmpty(t *testing.T) {
|
||||
app, _ := setupTestApp(t)
|
||||
a, _ := app.CreateNodeFromTemplate("", "Trash A", "folder.default")
|
||||
|
||||
Reference in New Issue
Block a user