@@ -141,37 +141,41 @@ describe('HTTP cache tests', () => {
141141 } )
142142 } )
143143
144- it ( 'invalidates /camp/{campId}/categories for new category' , ( ) => {
145- const uri = '/api/camps/3c79b99ab424/categories'
146-
147- Cypress . session . clearAllSavedSessions ( )
148- 149-
150- // warm up cache
151- cy . expectCacheMiss ( uri )
152- cy . expectCacheHit ( uri )
144+ it (
145+ 'invalidates /camp/{campId}/categories for new category' ,
146+ { retries : { runMode : 3 } } ,
147+ ( ) => {
148+ const uri = '/api/camps/3c79b99ab424/categories'
153149
154- // add new category to camp
155- cy . apiPost ( '/api/categories' , {
156- camp : '/api/camps/3c79b99ab424' ,
157- short : 'new' ,
158- name : 'new Category' ,
159- color : '#000000' ,
160- numberingStyle : '1' ,
161- } ) . then ( ( response ) => {
162- const newContentNodeUri = response . body . _links . self . href
150+ Cypress . session . clearAllSavedSessions ( )
151+ 163152
164- // ensure cache was invalidated
153+ // warm up cache
165154 cy . expectCacheMiss ( uri )
166155 cy . expectCacheHit ( uri )
167156
168- // delete newly created contentNode
169- cy . apiDelete ( newContentNodeUri )
170-
171- // ensure cache was invalidated
172- cy . expectCacheMiss ( uri )
173- } )
174- } )
157+ // add new category to camp
158+ cy . apiPost ( '/api/categories' , {
159+ camp : '/api/camps/3c79b99ab424' ,
160+ short : 'new' ,
161+ name : 'new Category' ,
162+ color : '#000000' ,
163+ numberingStyle : '1' ,
164+ } ) . then ( ( response ) => {
165+ const newContentNodeUri = response . body . _links . self . href
166+
167+ // ensure cache was invalidated
168+ cy . expectCacheMiss ( uri )
169+ cy . expectCacheHit ( uri )
170+
171+ // delete newly created contentNode
172+ cy . apiDelete ( newContentNodeUri )
173+
174+ // ensure cache was invalidated
175+ cy . expectCacheMiss ( uri )
176+ } )
177+ }
178+ )
175179
176180 it ( 'invalidates cached data when user leaves a camp' , ( ) => {
177181 Cypress . session . clearAllSavedSessions ( )
0 commit comments