feat: expose trash in gui
This commit is contained in:
@@ -139,6 +139,10 @@ async function runReadyScenario(cdp, url) {
|
||||
await clickText(cdp, '.inbox-item-actions .btn', 'Открыть')
|
||||
await assertText(cdp, 'Inbox Smoke Item', 'inbox: item opens from list')
|
||||
|
||||
await clickText(cdp, '.nav-item', 'Корзина')
|
||||
await assertText(cdp, 'Trash Smoke Folder', 'trash: deleted node visible')
|
||||
await assertText(cdp, 'node-trash_Trash-Smoke-Folder', 'trash: physical entry visible')
|
||||
|
||||
await clickText(cdp, '.tree-label', 'Smoke Project')
|
||||
await waitForSelector(cdp, '.tabs')
|
||||
await assertText(cdp, 'Smoke Project', 'node: selected project visible')
|
||||
@@ -673,12 +677,19 @@ function wailsMockSource() {
|
||||
ListSystemViews: async () => [
|
||||
{ id: 'today', label: 'Сегодня' },
|
||||
{ id: 'inbox', label: 'Неразобранное' },
|
||||
{ id: 'trash', label: 'Корзина' },
|
||||
{ id: 'activity', label: 'Активность' },
|
||||
{ id: 'journal', label: 'Журнал' },
|
||||
],
|
||||
ListWorkspaceTree: async () => clone(state.nodes),
|
||||
ListWorkspaceChildren: async (id) => clone(childrenOf(id)),
|
||||
ListInboxNodes: async () => clone(state.nodes.filter((node) => !node.parent_id && (!node.section || node.section === 'inbox'))),
|
||||
ListTrash: async () => clone({
|
||||
trashPath: '/tmp/verstak-smoke-vault/.verstak/trash',
|
||||
nodes: [{ id: 'node-trash', title: 'Trash Smoke Folder', type: 'folder', fsPath: 'Trash Smoke Folder', deletedAt: now }],
|
||||
entries: [{ name: 'node-trash_Trash-Smoke-Folder', path: '/tmp/verstak-smoke-vault/.verstak/trash/node-trash_Trash-Smoke-Folder', isDir: true, size: 0, modifiedAt: now }],
|
||||
}),
|
||||
OpenTrashFolder: async () => true,
|
||||
ListEnabledTemplates: async () => clone(templates),
|
||||
AllTemplates: async () => clone(templates),
|
||||
SetTemplateEnabled: async () => true,
|
||||
|
||||
Reference in New Issue
Block a user