Skip to content

Commit 208e95a

Browse files
committed
test: add axios-dependent tests for filesplugin icon loading and file actions
Signed-off-by: Oleksander Piskun <oleksandr2088@icloud.com>
1 parent e59032a commit 208e95a

File tree

7 files changed

+418
-15
lines changed

7 files changed

+418
-15
lines changed

.github/workflows/node-build.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ jobs:
4545
fallbackNpm: "^10"
4646

4747
- name: Set up node ${{ steps.versions.outputs.nodeVersion }}
48-
uses: actions/setup-node@6044e13b5dc448c55e2357c09f80417699197238 # v3
48+
uses: actions/setup-node@6044e13b5dc448c55e2357c09f80417699197238 # v6.2.0
4949
with:
5050
persist-credentials: false
5151
node-version: ${{ steps.versions.outputs.nodeVersion }}

js/app_api-adminSettings.js.license

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@ SPDX-License-Identifier: GPL-3.0-or-later
44
SPDX-License-Identifier: BSD-3-Clause
55
SPDX-License-Identifier: AGPL-3.0-or-later
66
SPDX-License-Identifier: (MPL-2.0 OR Apache-2.0)
7-
SPDX-License-Identifier: ( AGPL-3.0-or-later)
87
SPDX-FileCopyrightText: escape-html developers
98
SPDX-FileCopyrightText: debounce developers
109
SPDX-FileCopyrightText: atomiks
@@ -24,7 +23,6 @@ SPDX-FileCopyrightText: Dr.-Ing. Mario Heiderich, Cure53 <mario@cure53.de> (http
2423
SPDX-FileCopyrightText: David Clark
2524
SPDX-FileCopyrightText: Christoph Wurst
2625
SPDX-FileCopyrightText: Anthony Fu <https://github.com/antfu>
27-
SPDX-FileCopyrightText: Alexander Piskun <bigcat88@icloud.com>
2826
SPDX-FileCopyrightText: @nextcloud/dialogs developers
2927

3028

@@ -146,6 +144,6 @@ This file is generated from multiple sources. Included packages:
146144
- webpack
147145
- version: 5.102.1
148146
- license: MIT
149-
- app_api
150-
- version: 34.0.0-dev.1
151-
- license: ( AGPL-3.0-or-later)
147+
- nextcloud
148+
- version: 1.0.0
149+
- license: AGPL-3.0-or-later

js/app_api-filesplugin.js.license

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ SPDX-License-Identifier: ISC
33
SPDX-License-Identifier: GPL-3.0-or-later
44
SPDX-License-Identifier: BlueOak-1.0.0
55
SPDX-License-Identifier: BSD-3-Clause
6-
SPDX-License-Identifier: ( AGPL-3.0-or-later)
6+
SPDX-License-Identifier: AGPL-3.0-or-later
77
SPDX-FileCopyrightText: string_decoder developers
88
SPDX-FileCopyrightText: readable-stream developers
99
SPDX-FileCopyrightText: inherits developers
@@ -20,7 +20,6 @@ SPDX-FileCopyrightText: Irakli Gozalishvili <rfobic@gmail.com> (http://jeditoolk
2020
SPDX-FileCopyrightText: GitHub Inc.
2121
SPDX-FileCopyrightText: Feross Aboukhadijeh
2222
SPDX-FileCopyrightText: Borewit
23-
SPDX-FileCopyrightText: Alexander Piskun <bigcat88@icloud.com>
2423

2524

2625
This file is generated from multiple sources. Included packages:
@@ -81,6 +80,6 @@ This file is generated from multiple sources. Included packages:
8180
- webpack
8281
- version: 5.102.1
8382
- license: MIT
84-
- app_api
85-
- version: 34.0.0-dev.1
86-
- license: ( AGPL-3.0-or-later)
83+
- nextcloud
84+
- version: 1.0.0
85+
- license: AGPL-3.0-or-later

js/app_api-filesplugin.js.map

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/filesplugin.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ export function isSvgContentType(ct) {
2020
return (ct || '').toLowerCase().startsWith('image/svg+xml')
2121
}
2222

23-
function loadExAppInlineSvgIcon(appId, route) {
23+
export function loadExAppInlineSvgIcon(appId, route) {
2424
const url = generateAppAPIProxyUrl(appId, route)
2525
return axios.get(url, {
2626
responseType: 'text',
@@ -86,7 +86,7 @@ export function generateExAppUIPageUrl(appId, route) {
8686
return generateUrl(`/apps/app_api/embedded/${appId}/${route}`)
8787
}
8888

89-
function registerFileAction33(fileAction, iconProvider) {
89+
export function registerFileAction33(fileAction, iconProvider) {
9090
const handlerUrl = generateAppAPIProxyUrl(fileAction.appid, fileAction.action_handler)
9191
const isV2 = ('version' in fileAction && fileAction.version === '2.0')
9292

0 commit comments

Comments
 (0)