--- RCPTT testcase ---
Format-Version: 1.0
Contexts: _7RlJ4GaBEeWE-JfpwaFXMg
Element-Name: F1HelpAvailable_SQL
Element-Type: testcase
Element-Version: 3.0
External-Reference: 
Id: _7X9esGaBEeWE-JfpwaFXMg
Runtime-Version: 2.0.0.201506120617
Save-Time: 9/29/15 10:39 AM
Testcase-Type: ecl

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

// setup some workflow
get-button "Create workflow (Ctrl+Shift+N)" | click
with [get-window "New Workflow"] {
	get-editbox -after [get-label "Workflow name:"] | type-text someWorkflow
	get-button Finish | click
}

// iterate over these component names
list "SQL Command" "SQL Writer" "SQL Reader" | each [val component] {
	// Add component
	with [get-editor "someWorkflow.wf"] {
		with [get-palette | get-palette-entry $component] {
			mouse-move 74 12 button1 -height 23 -width 125
			mouse-press 74 12 button1 -height 23 -width 125
			get-figure 0 | drag-start 74 12
		}
		with [get-diagram -index 1 | get-edit-part -className WorkflowPart] {
			drag-enter 1168 277 -detail move
			drag-over 331 199 -detail copy
			drag-exit
			drag-accept 331 199 -detail copy
		}
		get-palette | drag-set-data
		get-diagram -index 1 | get-edit-part -className WorkflowPart | drop 331 199 -detail copy
		get-palette | drag-end -detail move

		// Get Help
		with [get-diagram -index 1] {
			key-type F1
			with [get-edit-part -className WorkflowPart | get-edit-part -className WorkflowNodePart] {
				mouse-move 14 14 button1 -height 38 -width 38
				mouse-press 14 14 button1 -height 38 -width 38
				mouse-release 14 14 button1 524288 -height 38 -width 38
			}
		}
		get-diagram -index 1 | get-edit-part -className WorkflowPart | get-edit-part -className WorkflowNodePart
			| activate-direct-edit
	}
	get-view Help | get-section [concat $component " Component Help"] | get-link "SQL Component Usage" | click

	// Verify help is there
	get-view Help | get-control Browser | get-property text | contains "SQL Component Usage" | verify-true

	// Delete component
	with [get-editor "someWorkflow.wf" | get-diagram -index 1] {
		with [get-edit-part -className WorkflowPart | get-edit-part -className WorkflowNodePart] {
			mouse-move 22 17 button1 -height 38 -width 38
			mouse-press 22 17 button1 -height 38 -width 38
			mouse-release 22 17 button1 524288 -height 38 -width 38
			activate-direct-edit
		}
		key-type Del
	}

	// Close Help View
	get-view Help | close
}

------=_.content-0a7243a0-75d3-3d5f-9791-539de0e5b7ac--
