Skip to content

Commit b0ad69d

Browse files
Merge pull request #44425 from nextcloud/dependabot/npm_and_yarn/nextcloud/router-3.0.0
2 parents 58df22e + 15a85f0 commit b0ad69d

File tree

147 files changed

+334
-233
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

147 files changed

+334
-233
lines changed

apps/files/src/actions/downloadAction.spec.ts

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,12 @@ const view = {
2828
name: 'Files',
2929
} as View
3030

31+
// Mock webroot variable
32+
beforeAll(() => {
33+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
34+
(window as any)._oc_webroot = ''
35+
})
36+
3137
describe('Download action conditions tests', () => {
3238
test('Default values', () => {
3339
expect(action).toBeInstanceOf(FileAction)

apps/files/src/actions/editLocallyAction.spec.ts

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,12 @@ const view = {
3030
name: 'Files',
3131
} as View
3232

33+
// Mock webroot variable
34+
beforeAll(() => {
35+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
36+
(window as any)._oc_webroot = ''
37+
})
38+
3339
describe('Edit locally action conditions tests', () => {
3440
test('Default values', () => {
3541
expect(action).toBeInstanceOf(FileAction)

apps/files/src/actions/favoriteAction.spec.ts

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,12 @@ global.window.OC = {
4141
TAG_FAVORITE: '_$!<Favorite>!$_',
4242
}
4343

44+
// Mock webroot variable
45+
beforeAll(() => {
46+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
47+
(window as any)._oc_webroot = ''
48+
})
49+
4450
describe('Favorite action conditions tests', () => {
4551
test('Default values', () => {
4652
const file = new File({

apps/files_sharing/src/actions/acceptShareAction.spec.ts

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,12 @@ const pendingShareView = {
3636
name: 'Pending shares',
3737
} as View
3838

39+
// Mock webroot variable
40+
beforeAll(() => {
41+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
42+
(window as any)._oc_webroot = ''
43+
})
44+
3945
describe('Accept share action conditions tests', () => {
4046
test('Default values', () => {
4147
const file = new File({

apps/files_sharing/src/actions/rejectShareAction.spec.ts

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,12 @@ const pendingShareView = {
3636
name: 'Pending shares',
3737
} as View
3838

39+
// Mock webroot variable
40+
beforeAll(() => {
41+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
42+
(window as any)._oc_webroot = ''
43+
})
44+
3945
describe('Reject share action conditions tests', () => {
4046
test('Default values', () => {
4147
const file = new File({

apps/files_sharing/src/actions/restoreShareAction.spec.ts

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,12 @@ const deletedShareView = {
3636
name: 'Deleted shares',
3737
} as View
3838

39+
// Mock webroot variable
40+
beforeAll(() => {
41+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
42+
(window as any)._oc_webroot = ''
43+
})
44+
3945
describe('Restore share action conditions tests', () => {
4046
test('Default values', () => {
4147
const file = new File({

apps/files_sharing/src/services/SharingService.spec.ts

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,12 @@ global.window.OC = {
3333
TAG_FAVORITE: '_$!<Favorite>!$_',
3434
}
3535

36+
// Mock webroot variable
37+
beforeAll(() => {
38+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
39+
(window as any)._oc_webroot = ''
40+
})
41+
3642
describe('SharingService methods definitions', () => {
3743
beforeAll(() => {
3844
jest.spyOn(axios, 'get').mockImplementation(async (): Promise<any> => {

core/js/tests/specs/l10nSpec.js

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,10 +13,15 @@ describe('OC.L10N tests', function() {
1313

1414
beforeEach(function() {
1515
window._oc_appswebroots[TEST_APP] = OC.getRootPath() + '/apps3/jsunittestapp';
16+
17+
window.OC = window.OC ?? {}
18+
window.OC.appswebroots = window.OC.appswebroots || {}
19+
window.OC.appswebroots[TEST_APP] = OC.getRootPath() + '/apps3/jsunittestapp'
1620
});
1721
afterEach(function() {
1822
OC.L10N._unregister(TEST_APP);
1923
delete window._oc_appswebroots[TEST_APP];
24+
delete window.OC.appswebroots[TEST_APP];
2025
});
2126

2227
describe('text translation', function() {
@@ -121,6 +126,7 @@ describe('OC.L10N tests', function() {
121126
expect(callbackStub.notCalled).toEqual(true);
122127
var req = fakeServer.requests[0];
123128

129+
console.warn('fff-', window.OC.appswebroots)
124130
loading
125131
.then(promiseStub)
126132
.then(function() {

dist/1359-1359.js

Lines changed: 0 additions & 3 deletions
This file was deleted.

dist/1359-1359.js.map

Lines changed: 0 additions & 1 deletion
This file was deleted.

0 commit comments

Comments
 (0)