--- RCPTT testcase ---
Format-Version: 1.0
Contexts: _DysjgCPgEeWMU9qdIQ2Zdw
Element-Name: CreateASimpleBendpoint
Element-Type: testcase
Element-Version: 3.0
External-Reference: 
Id: _7WgGIGaBEeWE-JfpwaFXMg
Runtime-Version: 2.0.0.201506120617
Save-Time: 11/3/15 7:39 PM
Testcase-Type: ecl

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

get-button "Create workflow (M1+M2+N)" | click
with [get-window "New Workflow"] {
    get-editbox -after [get-label "Workflow name:"] | type-text wf
    get-button Finish | click
}
with [get-editor "wf.wf"] {
    with [get-palette | get-palette-entry Joiner] {
        mouse-move 49 16 button1 -height 23 -width 125
        mouse-press 49 16 button1 -height 23 -width 125
        get-figure 0 | drag-start 49 16
    }
    with [get-diagram -index 1 | get-edit-part -className WorkflowPart] {
        drag-enter 1185 313 -detail move
        drag-over 200 282 -detail copy
        drag-exit
        drag-accept 200 282 -detail copy
    }
    get-palette | drag-set-data
    get-diagram -index 1 | get-edit-part -className WorkflowPart | drop 200 282 -detail copy
    with [get-palette] {
        drag-end -detail move
        with [get-palette-entry Joiner] {
            mouse-move 67 9 button1 -height 23 -width 125
            mouse-press 67 9 button1 -height 23 -width 125
            get-figure 0 | drag-start 67 9
        }
    }
    with [get-diagram -index 1 | get-edit-part -className WorkflowPart] {
        drag-enter 1192 318 -detail move
        drag-over 797 304 -detail copy
        drag-over 100 50 -detail copy
        drag-exit
        drag-accept 100 50 -detail copy
    }
    get-palette | drag-set-data
    get-diagram -index 1 | get-edit-part -className WorkflowPart | drop 100 50 -detail copy
    get-palette | drag-end -detail move
    with [get-diagram -index 1] {
        key-type "Alt+d"
        with [get-edit-part -className WorkflowPart] {
            with [get-edit-part -text "Joiner (1)"] {
                mouse-move 15 17 button1 -height 38 -width 38
                mouse-press 15 17 button1 -height 38 -width 38
                mouse-release 15 17 button1 524288 -height 38 -width 38
            }
            with [get-edit-part -text Joiner] {
                mouse-move 13 15 button1 -height 38 -width 38
                mouse-press 13 15 button1 -height 38 -width 38
                mouse-release 13 15 button1 524288 -height 38 -width 38
            }
        }
    }
}
with [get-window "Connection Editor"] {
    with [get-group Source | get-tree] {
        select "Joiner \\(1\\)/Joined"
        get-item "Joiner \\(1\\)/Joined" | drag-start 16 2
    }
    with [get-group Target | get-tree] {
        get-item "Joiner/Input 001" | drag-enter "-57" 15 -detail move
        get-item "Joiner/Input 001" | drag-over "-11" 16 -detail move
        get-item "Joiner/Input 002" | drag-over 32 1 -detail move
        get-item "Joiner/Input 001" | drag-exit
        get-item "Joiner/Input 002" | drag-accept 32 1 -detail move
    }
    get-group Source | get-tree | drag-set-data
    get-group Target | get-tree | get-item "Joiner/Input 002" | drop 32 1 -detail move
    get-group Source | get-tree | drag-end -detail move
    get-button OK | click
}
with [get-editor "wf.wf" | get-diagram -index 1] {
    key-type ESC
    with [get-edit-part -className WorkflowPart | get-edit-part -text Joiner | get-target-connection 0] {
        mouse-move 180 1 button1 -height 18 -width 331
        mouse-press 180 1 button1 -height 18 -width 331
        mouse-release 180 1 button1 524288 -height 18 -width 331
        with [get-handle BendpointCreationHandle] {
            mouse-move 4 2 button1 -height 5 -width 5
            mouse-press 4 2 button1 -height 5 -width 5
        }
        get-figure 1 | mouse-move 2 3 -mask 524288 -height 13 -width 6
    }
    mouse-drag 559 311 -mask 524288 -height 627 -width 1202
    with [get-edit-part -className WorkflowPart | get-edit-part -text Joiner | get-target-connection 0] {
        with [get-handle BendpointMoveHandle] {
            mouse-drag 4 3 button1 524288 -height 7 -width 7
            mouse-release 4 3 button1 524288 -height 7 -width 7
        }
        with [get-handle BendpointCreationHandle -index 1] {
            mouse-move 2 2 button1 -height 5 -width 5
            mouse-press 2 2 button1 -height 5 -width 5
        }
    }
    mouse-move 400 200 -mask 524288 -height 627 -width 1202
    with [get-edit-part -className WorkflowPart] {
        mouse-drag 562 475 button1 524288 -height 627 -width 1202
        mouse-release 562 475 button1 524288 -height 627 -width 1202
    }
    mouse-hover 649 394 -height 627 -width 1202
    with [get-edit-part -className WorkflowPart | get-edit-part -text Joiner | get-target-connection 0 
        | get-handle BendpointCreationHandle -index 2] {
        mouse-move 3 2 button1 -height 5 -width 5
        mouse-press 3 2 button1 -height 5 -width 5
    }
    mouse-move 150 220 -mask 524288 -height 627 -width 1202
    with [get-edit-part -className WorkflowPart] {
        mouse-drag 750 510 button1 524288 -height 627 -width 1202
        mouse-release 750 510 button1 524288 -height 627 -width 1202
        with [get-edit-part -text Joiner | get-target-connection 0 | get-handle BendpointCreationHandle -index 3] {
            mouse-move 3 3 button1 -height 5 -width 5
            mouse-press 3 3 button1 -height 5 -width 5
        }
    }
}
get-button "Save All (M1+M2+S)" | click
with [get-editor "wf.wf" | get-diagram -index 1 | get-edit-part -className WorkflowPart] {
    get-property "getConnections().size()" | equals 1 | verify-true
    get-property "getModel().getConnections().Connection[0].getBendpoints().size()" | equals 3 | verify-true
    get-property "getModel().getConnections().size()" | equals 1 | verify-true
}
------=_.content-0a7243a0-75d3-3d5f-9791-539de0e5b7ac--
