File tree Expand file tree Collapse file tree 1 file changed +4
-8
lines changed
packages/web-app-files/tests/unit/components Expand file tree Collapse file tree 1 file changed +4
-8
lines changed Original file line number Diff line number Diff line change @@ -31,14 +31,10 @@ describe('ActionMenuItem component', () => {
3131 } )
3232 it ( 'renders an image if there is one defined in the action' , ( ) => {
3333 const action = { ...fileActions . download , img : 'https://owncloud.tld/img.png' }
34- const wrapper1 = getShallowWrapper ( action )
35- expect ( wrapper1 . find ( selectors . icon ) . exists ( ) ) . toBeTruthy ( )
36- expect ( wrapper1 . find ( selectors . icon ) . attributes ( ) . name ) . toBe ( action . icon )
37- delete action . icon
38- const wrapper2 = getShallowWrapper ( action )
39- expect ( wrapper2 . find ( selectors . icon ) . exists ( ) ) . toBeFalsy ( )
40- expect ( wrapper2 . find ( selectors . img ) . exists ( ) ) . toBeTruthy ( )
41- expect ( wrapper2 . find ( selectors . img ) . attributes ( ) . src ) . toBe ( action . img )
34+ const wrapper = getShallowWrapper ( action )
35+ expect ( wrapper . find ( selectors . icon ) . exists ( ) ) . toBeFalsy ( )
36+ expect ( wrapper . find ( selectors . img ) . exists ( ) ) . toBeTruthy ( )
37+ expect ( wrapper . find ( selectors . img ) . attributes ( ) . src ) . toBe ( action . img )
4238 } )
4339 it ( 'renders the action label' , ( ) => {
4440 const action = fileActions . download
You can’t perform that action at this time.
0 commit comments