diff options
Diffstat (limited to 'apps/files/src/actions')
-rw-r--r-- | apps/files/src/actions/favoriteAction.spec.ts | 4 | ||||
-rw-r--r-- | apps/files/src/actions/openFolderAction.spec.ts | 2 | ||||
-rw-r--r-- | apps/files/src/actions/openFolderAction.ts | 2 | ||||
-rw-r--r-- | apps/files/src/actions/openInFilesAction.spec.ts | 4 | ||||
-rw-r--r-- | apps/files/src/actions/openInFilesAction.ts | 2 | ||||
-rw-r--r-- | apps/files/src/actions/sidebarAction.spec.ts | 2 | ||||
-rw-r--r-- | apps/files/src/actions/sidebarAction.ts | 2 | ||||
-rw-r--r-- | apps/files/src/actions/viewInFolderAction.spec.ts | 4 | ||||
-rw-r--r-- | apps/files/src/actions/viewInFolderAction.ts | 2 |
9 files changed, 12 insertions, 12 deletions
diff --git a/apps/files/src/actions/favoriteAction.spec.ts b/apps/files/src/actions/favoriteAction.spec.ts index 71ca0263d33..cbf0038961a 100644 --- a/apps/files/src/actions/favoriteAction.spec.ts +++ b/apps/files/src/actions/favoriteAction.spec.ts @@ -20,8 +20,8 @@ const favoriteView = { name: 'Favorites', } as View -global.window.OC = { - // @ts-expect-error This constant is currently missing in @nextcloud/typings +window.OC = { + ...window.OC, TAG_FAVORITE: '_$!<Favorite>!$_', } diff --git a/apps/files/src/actions/openFolderAction.spec.ts b/apps/files/src/actions/openFolderAction.spec.ts index 7ce79e0ad17..cbbbe38f15e 100644 --- a/apps/files/src/actions/openFolderAction.spec.ts +++ b/apps/files/src/actions/openFolderAction.spec.ts @@ -115,7 +115,7 @@ describe('Open folder action execute tests', () => { // Silent action expect(exec).toBe(null) expect(goToRouteMock).toBeCalledTimes(1) - expect(goToRouteMock).toBeCalledWith(null, { fileid: 1, view: 'files' }, { dir: '/FooBar' }) + expect(goToRouteMock).toBeCalledWith(null, { fileid: '1', view: 'files' }, { dir: '/FooBar' }) }) test('Open folder fails without node', async () => { diff --git a/apps/files/src/actions/openFolderAction.ts b/apps/files/src/actions/openFolderAction.ts index 8c40ac6ede8..ab2d280eb73 100644 --- a/apps/files/src/actions/openFolderAction.ts +++ b/apps/files/src/actions/openFolderAction.ts @@ -38,7 +38,7 @@ export const action = new FileAction({ window.OCP.Files.Router.goToRoute( null, - { view: view.id, fileid: node.fileid }, + { view: view.id, fileid: String(node.fileid) }, { dir: node.path }, ) return null diff --git a/apps/files/src/actions/openInFilesAction.spec.ts b/apps/files/src/actions/openInFilesAction.spec.ts index c1a80ad4425..88a9716914b 100644 --- a/apps/files/src/actions/openInFilesAction.spec.ts +++ b/apps/files/src/actions/openInFilesAction.spec.ts @@ -60,7 +60,7 @@ describe('Open in files action execute tests', () => { // Silent action expect(exec).toBe(null) expect(goToRouteMock).toBeCalledTimes(1) - expect(goToRouteMock).toBeCalledWith(null, { fileid: 1, view: 'files' }, { dir: '/Foo', openfile: 'true' }) + expect(goToRouteMock).toBeCalledWith(null, { fileid: '1', view: 'files' }, { dir: '/Foo', openfile: 'true' }) }) test('Open in files with folder', async () => { @@ -81,6 +81,6 @@ describe('Open in files action execute tests', () => { // Silent action expect(exec).toBe(null) expect(goToRouteMock).toBeCalledTimes(1) - expect(goToRouteMock).toBeCalledWith(null, { fileid: 1, view: 'files' }, { dir: '/Foo/Bar', openfile: 'true' }) + expect(goToRouteMock).toBeCalledWith(null, { fileid: '1', view: 'files' }, { dir: '/Foo/Bar', openfile: 'true' }) }) }) diff --git a/apps/files/src/actions/openInFilesAction.ts b/apps/files/src/actions/openInFilesAction.ts index 0022d8c5e76..10e19e7eace 100644 --- a/apps/files/src/actions/openInFilesAction.ts +++ b/apps/files/src/actions/openInFilesAction.ts @@ -24,7 +24,7 @@ export const action = new FileAction({ window.OCP.Files.Router.goToRoute( null, // use default route - { view: 'files', fileid: node.fileid }, + { view: 'files', fileid: String(node.fileid) }, { dir, openfile: 'true' }, ) return null diff --git a/apps/files/src/actions/sidebarAction.spec.ts b/apps/files/src/actions/sidebarAction.spec.ts index 2c23755a84d..21b48eba105 100644 --- a/apps/files/src/actions/sidebarAction.spec.ts +++ b/apps/files/src/actions/sidebarAction.spec.ts @@ -126,7 +126,7 @@ describe('Open sidebar action exec tests', () => { expect(openMock).toBeCalledWith('/foobar.txt') expect(goToRouteMock).toBeCalledWith( null, - { view: view.id, fileid: 1 }, + { view: view.id, fileid: '1' }, { dir: '/' }, true, ) diff --git a/apps/files/src/actions/sidebarAction.ts b/apps/files/src/actions/sidebarAction.ts index 9ac52159761..21b5dfc2878 100644 --- a/apps/files/src/actions/sidebarAction.ts +++ b/apps/files/src/actions/sidebarAction.ts @@ -42,7 +42,7 @@ export const action = new FileAction({ // Silently update current fileid window.OCP.Files.Router.goToRoute( null, - { view: view.id, fileid: node.fileid }, + { view: view.id, fileid: String(node.fileid) }, { ...window.OCP.Files.Router.query, dir }, true, ) diff --git a/apps/files/src/actions/viewInFolderAction.spec.ts b/apps/files/src/actions/viewInFolderAction.spec.ts index 89519f1b64d..c75151a4c38 100644 --- a/apps/files/src/actions/viewInFolderAction.spec.ts +++ b/apps/files/src/actions/viewInFolderAction.spec.ts @@ -129,7 +129,7 @@ describe('View in folder action execute tests', () => { // Silent action expect(exec).toBe(null) expect(goToRouteMock).toBeCalledTimes(1) - expect(goToRouteMock).toBeCalledWith(null, { fileid: 1, view: 'files' }, { dir: '/' }) + expect(goToRouteMock).toBeCalledWith(null, { fileid: '1', view: 'files' }, { dir: '/' }) }) test('View in (sub) folder', async () => { @@ -150,7 +150,7 @@ describe('View in folder action execute tests', () => { // Silent action expect(exec).toBe(null) expect(goToRouteMock).toBeCalledTimes(1) - expect(goToRouteMock).toBeCalledWith(null, { fileid: 1, view: 'files' }, { dir: '/Foo/Bar' }) + expect(goToRouteMock).toBeCalledWith(null, { fileid: '1', view: 'files' }, { dir: '/Foo/Bar' }) }) test('View in folder fails without node', async () => { diff --git a/apps/files/src/actions/viewInFolderAction.ts b/apps/files/src/actions/viewInFolderAction.ts index 6cf6266fb64..cc6873f4fa3 100644 --- a/apps/files/src/actions/viewInFolderAction.ts +++ b/apps/files/src/actions/viewInFolderAction.ts @@ -44,7 +44,7 @@ export const action = new FileAction({ window.OCP.Files.Router.goToRoute( null, - { view: 'files', fileid: node.fileid }, + { view: 'files', fileid: String(node.fileid) }, { dir: node.dirname }, ) return null |