@@ -26,8 +26,9 @@ it('card detail actions', function() {
2626cy . getDataCy ( 'card' ) . click ( ) ;
2727
2828cy . step ( 'card properties' )
29- cy . getDataCy ( 'copy-properties' ) . click ( ) ;
30- cy . task ( 'getClipboard' ) . should ( 'eq' , JSON . stringify ( card , null , 2 ) ) ;
29+ cy . getDataCy ( 'copy-properties' ) . realClick ( ) ;
30+ cy . window ( ) . its ( 'navigator.clipboard' )
31+ . invoke ( 'readText' ) . should ( 'eq' , JSON . stringify ( card , null , 2 ) ) ;
3132cy . getDataCy ( 'notification-message' )
3233. should ( 'exist' )
3334. and ( 'contain.text' , 'Card info copied to clipboard' ) ;
@@ -68,12 +69,10 @@ it('card detail actions', function() {
6869cy . step ( 'image upload' )
6970cy . intercept ( {
7071method :'POST' ,
71- url :'/api/upload' ,
72- times :2
72+ url :'/api/upload?card=*' ,
7373} ) . as ( 'imageUpload' ) ;
7474cy . getDataCy ( 'upload-image' ) . selectFile ( 'cypress/fixtures/cypressLogo.png' , { action :'drag-drop' } ) ;
75- cy . wait ( '@imageUpload' ) . its ( 'response.body' ) . should ( 'have.property' , 'path' ) . and ( 'not.be.empty' ) ;
76- cy . wait ( '@updateCard' ) . its ( 'response.body.image' ) . should ( 'not.be.empty' ) ;
75+ cy . wait ( '@imageUpload' ) . its ( 'response.body' ) . should ( 'have.property' , 'image' ) . and ( 'not.be.empty' ) ;
7776cy . getDataCy ( 'image-attachment' ) . should ( 'exist' ) ;
7877cy . getDataCy ( 'notification-message' ) . should ( 'exist' ) . and ( 'contain.text' , 'File was sucessfully uploaded' ) ;
7978cy . getDataCy ( 'image-delete' ) . click ( ) ;
@@ -84,7 +83,7 @@ it('card detail actions', function() {
8483cy . step ( 'error when upload does not work' )
8584cy . intercept ( {
8685method :'POST' ,
87- url :'/api/upload'
86+ url :'/api/upload?card=* '
8887} , {
8988statusCode :400
9089} ) . as ( 'imageUpload' ) ;