diff options
author | Grigorii K. Shartsev <me@shgk.me> | 2024-01-24 17:58:16 +0100 |
---|---|---|
committer | julia.kirschenheuter <julia.kirschenheuter@nextcloud.com> | 2024-02-01 18:35:56 +0100 |
commit | 5620e057cf02105c061fa0811b4e60f794a6b406 (patch) | |
tree | cb9d56e36f38c361b252778dcdf7571d45fa0785 /apps/files/src/views/Navigation.cy.ts | |
parent | e49c331b7156e8a39052566f1da0f65b76f3c974 (diff) | |
download | nextcloud-server-5620e057cf02105c061fa0811b4e60f794a6b406.tar.gz nextcloud-server-5620e057cf02105c061fa0811b4e60f794a6b406.zip |
fix(files): combine navigation and files list into single Vue app
Signed-off-by: Grigorii K. Shartsev <me@shgk.me>
Signed-off-by: nextcloud-command <nextcloud-command@users.noreply.github.com>
Diffstat (limited to 'apps/files/src/views/Navigation.cy.ts')
-rw-r--r-- | apps/files/src/views/Navigation.cy.ts | 36 |
1 files changed, 12 insertions, 24 deletions
diff --git a/apps/files/src/views/Navigation.cy.ts b/apps/files/src/views/Navigation.cy.ts index cf3512bce0e..07d9eee80cb 100644 --- a/apps/files/src/views/Navigation.cy.ts +++ b/apps/files/src/views/Navigation.cy.ts @@ -7,11 +7,15 @@ import router from '../router/router' import { useViewConfigStore } from '../store/viewConfig' import { Folder, View, getNavigation } from '@nextcloud/files' +import Vue from 'vue' + describe('Navigation renders', () => { delete window._nc_navigation const Navigation = getNavigation() before(() => { + Vue.prototype.$navigation = Navigation + cy.mockInitialState('files', 'storageStats', { used: 1000 * 1000 * 1000, quota: -1, @@ -22,9 +26,6 @@ describe('Navigation renders', () => { it('renders', () => { cy.mount(NavigationView, { - propsData: { - Navigation, - }, global: { plugins: [createTestingPinia({ createSpy: cy.spy, @@ -42,6 +43,10 @@ describe('Navigation API', () => { delete window._nc_navigation const Navigation = getNavigation() + before(() => { + Vue.prototype.$navigation = Navigation + }) + it('Check API entries rendering', () => { Navigation.register(new View({ id: 'files', @@ -52,9 +57,6 @@ describe('Navigation API', () => { })) cy.mount(NavigationView, { - propsData: { - Navigation, - }, global: { plugins: [createTestingPinia({ createSpy: cy.spy, @@ -79,9 +81,6 @@ describe('Navigation API', () => { })) cy.mount(NavigationView, { - propsData: { - Navigation, - }, global: { plugins: [createTestingPinia({ createSpy: cy.spy, @@ -107,9 +106,6 @@ describe('Navigation API', () => { })) cy.mount(NavigationView, { - propsData: { - Navigation, - }, global: { plugins: [createTestingPinia({ createSpy: cy.spy, @@ -159,13 +155,14 @@ describe('Quota rendering', () => { delete window._nc_navigation const Navigation = getNavigation() + before(() => { + Vue.prototype.$navigation = Navigation + }) + afterEach(() => cy.unmockInitialState()) it('Unknown quota', () => { cy.mount(NavigationView, { - propsData: { - Navigation, - }, global: { plugins: [createTestingPinia({ createSpy: cy.spy, @@ -183,9 +180,6 @@ describe('Quota rendering', () => { }) cy.mount(NavigationView, { - propsData: { - Navigation, - }, global: { plugins: [createTestingPinia({ createSpy: cy.spy, @@ -206,9 +200,6 @@ describe('Quota rendering', () => { }) cy.mount(NavigationView, { - propsData: { - Navigation, - }, global: { plugins: [createTestingPinia({ createSpy: cy.spy, @@ -230,9 +221,6 @@ describe('Quota rendering', () => { }) cy.mount(NavigationView, { - propsData: { - Navigation, - }, global: { plugins: [createTestingPinia({ createSpy: cy.spy, |