@@ -7,11 +7,15 @@ import router from '../router/router'
77import { useViewConfigStore } from '../store/viewConfig'
88import { Folder , View , getNavigation } from '@nextcloud/files'
99
10+ import Vue from 'vue'
11+
1012describe ( 'Navigation renders' , ( ) => {
1113 delete window . _nc_navigation
1214 const Navigation = getNavigation ( )
1315
1416 before ( ( ) => {
17+ Vue . prototype . $navigation = Navigation
18+
1519 cy . mockInitialState ( 'files' , 'storageStats' , {
1620 used : 1000 * 1000 * 1000 ,
1721 quota : - 1 ,
@@ -22,9 +26,6 @@ describe('Navigation renders', () => {
2226
2327 it ( 'renders' , ( ) => {
2428 cy . mount ( NavigationView , {
25- propsData : {
26- Navigation,
27- } ,
2829 global : {
2930 plugins : [ createTestingPinia ( {
3031 createSpy : cy . spy ,
@@ -42,6 +43,10 @@ describe('Navigation API', () => {
4243 delete window . _nc_navigation
4344 const Navigation = getNavigation ( )
4445
46+ before ( ( ) => {
47+ Vue . prototype . $navigation = Navigation
48+ } )
49+
4550 it ( 'Check API entries rendering' , ( ) => {
4651 Navigation . register ( new View ( {
4752 id : 'files' ,
@@ -52,9 +57,6 @@ describe('Navigation API', () => {
5257 } ) )
5358
5459 cy . mount ( NavigationView , {
55- propsData : {
56- Navigation,
57- } ,
5860 global : {
5961 plugins : [ createTestingPinia ( {
6062 createSpy : cy . spy ,
@@ -79,9 +81,6 @@ describe('Navigation API', () => {
7981 } ) )
8082
8183 cy . mount ( NavigationView , {
82- propsData : {
83- Navigation,
84- } ,
8584 global : {
8685 plugins : [ createTestingPinia ( {
8786 createSpy : cy . spy ,
@@ -107,9 +106,6 @@ describe('Navigation API', () => {
107106 } ) )
108107
109108 cy . mount ( NavigationView , {
110- propsData : {
111- Navigation,
112- } ,
113109 global : {
114110 plugins : [ createTestingPinia ( {
115111 createSpy : cy . spy ,
@@ -159,13 +155,14 @@ describe('Quota rendering', () => {
159155 delete window . _nc_navigation
160156 const Navigation = getNavigation ( )
161157
158+ before ( ( ) => {
159+ Vue . prototype . $navigation = Navigation
160+ } )
161+
162162 afterEach ( ( ) => cy . unmockInitialState ( ) )
163163
164164 it ( 'Unknown quota' , ( ) => {
165165 cy . mount ( NavigationView , {
166- propsData : {
167- Navigation,
168- } ,
169166 global : {
170167 plugins : [ createTestingPinia ( {
171168 createSpy : cy . spy ,
@@ -183,9 +180,6 @@ describe('Quota rendering', () => {
183180 } )
184181
185182 cy . mount ( NavigationView , {
186- propsData : {
187- Navigation,
188- } ,
189183 global : {
190184 plugins : [ createTestingPinia ( {
191185 createSpy : cy . spy ,
@@ -206,9 +200,6 @@ describe('Quota rendering', () => {
206200 } )
207201
208202 cy . mount ( NavigationView , {
209- propsData : {
210- Navigation,
211- } ,
212203 global : {
213204 plugins : [ createTestingPinia ( {
214205 createSpy : cy . spy ,
@@ -230,9 +221,6 @@ describe('Quota rendering', () => {
230221 } )
231222
232223 cy . mount ( NavigationView , {
233- propsData : {
234- Navigation,
235- } ,
236224 global : {
237225 plugins : [ createTestingPinia ( {
238226 createSpy : cy . spy ,
0 commit comments