--- RCPTT testcase ---
Format-Version: 1.0
Contexts: _wTZJsDblEeaeH4-rLFMbKA,_CkEGoDx2EeaeH4-rLFMbKA,_sSEj4Dx4EeaeH4-rLFMbKA
Element-Name: CopyPasteUndoRedo
Element-Type: testcase
Element-Version: 3.0
External-Reference: 
Id: _yiMFoJuEEeadSNrqTD40Fg
Runtime-Version: 2.0.0.201506120617
Save-Time: 11/25/16 3:44 PM
Testcase-Type: ecl

------=_.content-0a7243a0-75d3-3d5f-9791-539de0e5b7ac
Content-Type: text/ecl
Entry-Name: .content

// procedure that selects, copies and pastes a component
proc selectcopypastecomponent {
	with [get-editor "MyWorkflow.wf" | get-diagram -index 1 | get-edit-part -className WorkflowPart | get-edit-part -className WorkflowNodePart -index 0] {
	    mouse-move 48 32 button1 -height 81 -width 81
	    mouse-press 48 32 button1 -height 81 -width 81
	    mouse-release 48 32 button1 524288 -height 81 -width 81
	    mouse-hover 48 32 -height 81 -width 81
	    wait 200
	    try -times 10 -delay 100 -command{
		    activate-direct-edit
	    }
	    wait 200
		key-type "M1+c"
	    wait 200
		key-type "M1+v" -times 4 
	}
}

// -----------------------------------------------------------------------------

with [get-editor "MyWorkflow.wf"] {
    with [get-palette] {
        with [get-palette-entry Converger] {
            mouse-move 68 14 button1 -height 23 -width 109
            mouse-press 68 14 button1 -height 23 -width 109
            get-figure 0 | drag-start 68 14
        }
    }
    with [get-diagram -index 1 | get-edit-part -className WorkflowPart] {
        drag-enter 664 277 -detail move
        drag-over 76 34 -detail copy
        drag-exit
        drag-accept 76 34 -detail copy
    }
    get-palette | drag-set-data
    get-diagram -index 1 | get-edit-part -className WorkflowPart | drop 76 34 -detail copy
    get-palette | drag-end -detail move
}
get-editor "MyWorkflow.wf" | get-diagram -index 1 | get-edit-part -className WorkflowPart 
    | get-property "getModel().getWorkflowNodes().size()" | equals 1 | verify-true
    
    
selectcopypastecomponent

try -times 100 -delay 200 -command {
get-editor "MyWorkflow.wf" | get-diagram -index 1 | get-edit-part -className WorkflowPart 
    | get-property "getModel().getWorkflowNodes().size()" | equals 5 | verify-true
    
} -catch {
	selectcopypastecomponent
}
    
get-eclipse-window | key-type "M1+z" -times 4
get-editor "MyWorkflow.wf" | get-diagram -index 1 | get-edit-part -className WorkflowPart 
    | get-property "getModel().getWorkflowNodes().size()" | equals 1 | verify-true
with [get-editor "MyWorkflow.wf"] {
    with [get-diagram -index 1] {
        with [get-edit-part -className WorkflowPart | get-edit-part -className WorkflowNodePart] {
    		mouse-press 50 27 button1 -height 81 -width 81
    		mouse-release 50 27 button1 524288 -height 81 -width 81
		}
        key-type "M1+c"
        key-type "M1+v"
    }
    with [get-diagram -index 1] {
        with [get-edit-part -className WorkflowPart | get-edit-part -className WorkflowNodePart] {
    		mouse-press 50 27 button1 -height 81 -width 81
    		mouse-release 50 27 button1 524288 -height 81 -width 81
		}
        key-type "M1+c"
        key-type "M1+v"
    }
    with [get-diagram -index 1] {
        with [get-edit-part -className WorkflowPart | get-edit-part -className WorkflowNodePart] {
    		mouse-press 50 27 button1 -height 81 -width 81
    		mouse-release 50 27 button1 524288 -height 81 -width 81
		}
        key-type "M1+c"
        key-type "M1+v"
    }
}

get-editor "MyWorkflow.wf" | get-diagram -index 1 | get-edit-part -className WorkflowPart 
    | get-property "getModel().getWorkflowNodes().size()" | equals 4 | verify-true

with [get-editor "MyWorkflow.wf" | get-diagram -index 1] {
    mouse-move 253 30 button1 -height 427 -width 679
    mouse-press 253 30 button1 -height 427 -width 679
    mouse-release 253 30 button1 524288 -height 427 -width 679
    key-type "M1+z" -times 3
}
get-editor "MyWorkflow.wf" | get-diagram -index 1 | get-edit-part -className WorkflowPart 
    | get-property "getModel().getWorkflowNodes().size()" | equals 1 | verify-true
------=_.content-0a7243a0-75d3-3d5f-9791-539de0e5b7ac--
