Skip to content
This repository has been archived by the owner on Oct 7, 2021. It is now read-only.

Commit

Permalink
#249: updated test scripts for new actor icons
Browse files Browse the repository at this point in the history
Signed-off-by: Erwin De Ley <erwindl0@gmail.com>
  • Loading branch information
erwindl0 committed Nov 22, 2017
1 parent 4354f6b commit 6ce5bb8
Show file tree
Hide file tree
Showing 9 changed files with 197 additions and 291 deletions.
21 changes: 10 additions & 11 deletions tests/org.eclipse.triquetrum.rcptt.test/BasicTests.suite
Original file line number Diff line number Diff line change
Expand Up @@ -5,21 +5,20 @@ Element-Type: testsuite
Element-Version: 2.0
Id: _-9JLUFj-EeelRaB1ByN9rA
Runtime-Version: 2.3.0.201706232317
Save-Time: 6/25/17 6:53 PM
Save-Time: 11/22/17 8:00 PM

------=_testcase-items-62c497da-4241-31f4-811a-6b453a3ecff8
Content-Type: text/testcase
Entry-Name: testcase-items

_fjq48Fj8EeelRaB1ByN9rA // kind: 'test' name: 'createHelloModel' path: 'tests/createHelloModel.test'
_7k-AUFjXEeelRaB1ByN9rA // kind: 'test' name: 'createEmptyModel' path: 'tests/createEmptyModel.test'
_7SXGMFj_EeelRaB1ByN9rA // kind: 'test' name: 'runHelloModel' path: 'tests/runHelloModel.test'
_-f48oFnEEeelRaB1ByN9rA // kind: 'test' name: 'addInputPortToActor' path: 'tests/addInputPortToActor.test'
_PqtUwFnDEeelRaB1ByN9rA // kind: 'test' name: 'addParameterToModel' path: 'tests/addParameterToModel.test'
_RWGDEFnEEeelRaB1ByN9rA // kind: 'test' name: 'renameActor' path: 'tests/renameActor.test'
_hC2hwFnCEeelRaB1ByN9rA // kind: 'test' name: 'renameActorWithDirectEdit' path: 'tests/renameActorWithDirectEdit.test'
_d7JfEFnEEeelRaB1ByN9rA // kind: 'test' name: 'renameDirector' path: 'tests/renameDirector.test'
_wDNikFnCEeelRaB1ByN9rA // kind: 'test' name: 'renameDirectorWithDirectEdit' path: 'tests/renameDirectorWithDirectEdit.test'
_yX1bIFnDEeelRaB1ByN9rA // kind: 'test' name: 'renameParameter' path: 'tests/renameParameter.test'
_fjq48Fj8EeelRaB1ByN9rA //
_7k-AUFjXEeelRaB1ByN9rA //
_7SXGMFj_EeelRaB1ByN9rA //
_-f48oFnEEeelRaB1ByN9rA //
_PqtUwFnDEeelRaB1ByN9rA //
_RWGDEFnEEeelRaB1ByN9rA //
_d7JfEFnEEeelRaB1ByN9rA //
_wDNikFnCEeelRaB1ByN9rA //
_yX1bIFnDEeelRaB1ByN9rA //

------=_testcase-items-62c497da-4241-31f4-811a-6b453a3ecff8--
117 changes: 43 additions & 74 deletions tests/org.eclipse.triquetrum.rcptt.test/testModels/hello.tdml

Large diffs are not rendered by default.

126 changes: 46 additions & 80 deletions tests/org.eclipse.triquetrum.rcptt.test/testModels/helloWithParam.tdml

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ Element-Version: 3.0
External-Reference:
Id: _-f48oFnEEeelRaB1ByN9rA
Runtime-Version: 2.3.0.201706232317
Save-Time: 6/25/17 7:00 PM
Save-Time: 11/22/17 8:27 PM
Testcase-Type: ecl

------=_.content-0a7243a0-75d3-3d5f-9791-539de0e5b7ac
Expand All @@ -17,27 +17,27 @@ Entry-Name: .content
get-view "Project Explorer" | get-tree | select "test/workflows/hello.tdml" | double-click

with [get-editor hello | get-diagram -index 1] {
get-edit-part -name hello | get-edit-part -text Constant | mouse-move 109 25 -height 80 -width 120
get-edit-part -name hello | get-edit-part -className ContainerShapeEditPart -index 1 | mouse-move 109 25 -height 80 -width 120
with [get-figure -path "3/0/2"] {
mouse-move 12 8 button1 -height 20 -width 20
mouse-press 12 8 button1 -height 20 -width 20
mouse-release 12 8 button1 524288 -height 20 -width 20
}
}

with [get-window "Edit Attributes of 'Constant'"] {
with [get-window "Edit Attributes of 'Const'"] {
get-tree | select Ports
get-button "Add an instance of Port" | click
}
with [get-window "Edit Attributes of 'Constant'"] {
with [get-window "Edit Attributes of 'Const'"] {
get-button | click
with [get-window "Port new"] {
get-button | check
get-button OK | click
}
get-button OK | click
}
with [get-editor hello | get-diagram -index 1 | get-edit-part -name hello | get-edit-part -text Constant
with [get-editor hello | get-diagram -index 1 | get-edit-part -name hello | get-edit-part -className ContainerShapeEditPart -index 1
| get-edit-part -className AdvancedAnchorEditPart -index 2] {
get-property "link.businessObjects.Port[0].name" | equals new | verify-true
get-property "link.businessObjects.Port[0].input" | equals true | verify-true
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ Element-Version: 3.0
External-Reference:
Id: _PqtUwFnDEeelRaB1ByN9rA
Runtime-Version: 2.3.0.201706232317
Save-Time: 6/25/17 7:01 PM
Save-Time: 11/22/17 7:59 PM
Testcase-Type: ecl

------=_.content-0a7243a0-75d3-3d5f-9791-539de0e5b7ac
Expand All @@ -24,10 +24,7 @@ with [get-editor hello] {
with [get-diagram -index 1 | get-edit-part -name hello] {
drag-enter 433 117 -detail move
drag-over 227 186 -detail copy
with [get-edit-part -text Constant] {
get-figure -path 3 | drag-over 12 18
get-figure -path 2 | drag-over 29 1
}

drag-over 72 295 -detail copy
drag-exit
drag-accept 72 295 -detail copy
Expand Down
126 changes: 64 additions & 62 deletions tests/org.eclipse.triquetrum.rcptt.test/tests/createHelloModel.test
Original file line number Diff line number Diff line change
Expand Up @@ -6,118 +6,120 @@ Element-Version: 3.0
External-Reference:
Id: _fjq48Fj8EeelRaB1ByN9rA
Runtime-Version: 2.3.0.201706232317
Save-Time: 6/25/17 6:19 PM
Save-Time: 11/22/17 8:39 PM
Testcase-Type: ecl

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

get-eclipse-window | get-object | invoke setLocation 100 100
get-eclipse-window | get-object | invoke setSize 800 800

get-view "Project Explorer" | get-tree | get-menu -path "New/Project..." | click
with [get-window "New Project"] {
get-tree | select "General/Project"
get-button "Next >" | click
get-editbox -after [get-label "Project name:"] | set-text test
get-button Finish | click
}
get-view "Project Explorer" | get-tree | select test | get-menu -path "New/Other..." | click
with [get-window New] {
get-tree | select "Workflows/Triquetrum workflow model"
get-button "Next >" | click
}
get-window New | get-button "Next >" | click
with [get-window "New Diagram"] {
get-combo -after [get-label "Diagram Type"] | select "Triquetrum workflow"
get-button "Next >" | click
get-editbox -after [get-label "Diagram Name"] | set-text hello
get-button Finish | click
}



with [get-editor hello] {
with [get-tree] {
select "Directors/SDF director"
get-item -path "Directors/SDF director" | drag-start 16 5
get-item -path "Directors/SDF director" | drag-start 5 11
}
with [get-diagram -index 1 | get-edit-part -name hello] {
drag-enter 394 108 -detail move
drag-over 102 40 -detail copy
drag-enter 588 107 -detail move
drag-over 305 67 -detail copy
drag-exit
drag-accept 102 40 -detail copy
drag-accept 305 67 -detail copy
}
get-tree | drag-set-data
get-diagram -index 1 | get-edit-part -name hello | drop 102 40 -detail copy
get-diagram -index 1 | get-edit-part -name hello | drop 305 67 -detail copy
get-tree | drag-end -detail move
get-diagram -index 1 | get-edit-part -name hello | get-edit-part -text "SDF director" | mouse-move 28 25 -height 60
get-diagram -index 1 | get-edit-part -name hello | get-edit-part -text "SDF director" | mouse-move 92 8 -height 60
-width 100
with [get-tree] {
select "Sources/Constant"
get-item -path "Sources/Constant" | drag-start 17 8
select "Ptolemy Actors/Sources/Generic Sources/Const"
get-item -path "Ptolemy Actors/Sources/Generic Sources/Const" | drag-start 11 9
}
with [get-diagram -index 1 | get-edit-part -name hello] {
drag-enter 426 162 -detail move
drag-over 75 178 -detail copy
drag-enter 669 185 -detail move
drag-over 222 192 -detail copy
drag-exit
drag-accept 75 178 -detail copy
drag-accept 222 192 -detail copy
}
get-tree | drag-set-data
get-diagram -index 1 | get-edit-part -name hello | drop 75 178 -detail copy
get-editbox -index 1 | set-focus
get-diagram -index 1 | get-edit-part -name hello | get-edit-part -text Constant | activate-direct-edit
get-diagram -index 1 | get-edit-part -name hello | drop 222 192 -detail copy
get-tree | drag-end -detail move
get-diagram -index 1 | commit-direct-edit
}
with [get-editor hello] {
get-diagram -index 1 | get-edit-part -name hello | get-edit-part -className ContainerShapeEditPart -index 1
| mouse-move 61 14 -height 41 -width 81
with [get-tree] {
select "Sinks/Visualization/Display"
get-item -path "Sinks/Visualization/Display" | drag-start 23 11
select "Ptolemy Actors/Sinks/Generic Sinks/Display"
get-item -path "Ptolemy Actors/Sinks/Generic Sinks/Display" | drag-start 13 7
}
with [get-diagram -index 1 | get-edit-part -name hello] {
drag-enter 434 256 -detail move
drag-over 330 285 -detail copy
drag-enter 682 303 -detail move
drag-over 537 265 -detail copy
drag-exit
drag-accept 330 285 -detail copy
drag-accept 537 265 -detail copy
}
get-tree | drag-set-data
get-diagram -index 1 | get-edit-part -name hello | drop 330 285 -detail copy
get-editbox -index 1 | set-focus
get-diagram -index 1 | get-edit-part -name hello | get-edit-part -text Display | activate-direct-edit
get-diagram -index 1 | get-edit-part -name hello | drop 537 265 -detail copy
get-tree | drag-end -detail move
with [get-diagram -index 1] {
mouse-move 196 337 button1 -height 386 -width 455
mouse-press 196 337 button1 -height 386 -width 455
commit-direct-edit
mouse-release 196 337 button1 524288 -height 386 -width 455
mouse-hover 168 222 -height 386 -width 455
with [get-edit-part -name hello | get-edit-part -text Constant | get-edit-part -className AdvancedAnchorEditPart] {
mouse-hover 10 6 -height 13 -width 13
mouse-move 10 6 button1 -height 13 -width 13
mouse-press 10 6 button1 -height 13 -width 13
mouse-move 12 6 -mask 524288 -height 13 -width 13
with [get-edit-part -name hello | get-edit-part -className ContainerShapeEditPart -index 1 | get-edit-part
-className AdvancedAnchorEditPart -index 1] {
mouse-move 6 5 button1 -height 13 -width 13
mouse-press 6 5 button1 -height 13 -width 13
mouse-move 8 5 -mask 524288 -height 13 -width 13
}
mouse-drag 176 226 -mask 524288 -height 386 -width 455
with [get-edit-part -name hello | get-edit-part -text Display | get-edit-part -className AdvancedAnchorEditPart] {
mouse-drag 7 6 button1 524288 -height 13 -width 13
mouse-release 7 6 button1 524288 -height 13 -width 13
mouse-hover 7 6 -height 13 -width 13
mouse-drag 301 215 -mask 524288 -height 417 -width 689
with [get-edit-part -name hello | get-edit-part -className ContainerShapeEditPart -index 2 | get-edit-part
-className AdvancedAnchorEditPart] {
mouse-drag 3 6 button1 524288 -height 13 -width 13
mouse-release 3 6 button1 524288 -height 13 -width 13
with [get-target-connection -path 0] {
mouse-hover 250 75 -height 75 -width 249
mouse-press 250 75 button1 -height 75 -width 249
mouse-release 250 75 button1 524288 -height 75 -width 249
mouse-hover 250 75 -height 75 -width 249
}
}
mouse-move 275 328 button1 -height 386 -width 455
mouse-press 275 328 button1 -height 386 -width 455
mouse-release 275 328 button1 524288 -height 386 -width 455
mouse-hover 272 328 -height 386 -width 455
key-type "M1+s"
mouse-hover 367 322 -height 417 -width 689
mouse-move 367 322 button1 -height 417 -width 689
mouse-press 367 322 button1 -height 417 -width 689
mouse-release 367 322 button1 524288 -height 417 -width 689
mouse-hover 367 322 -height 417 -width 689
get-edit-part -name hello | get-edit-part -className ContainerShapeEditPart -index 2 | mouse-move 18 13 -height 51
-width 61
}
}
with [get-editor hello | get-diagram -index 1 | get-edit-part -name hello] {
with [get-edit-part -text Display | get-edit-part -className AdvancedAnchorEditPart | get-target-connection -path 0] {
with [get-edit-part -className ContainerShapeEditPart -index 2 | get-edit-part -className AdvancedAnchorEditPart
| get-target-connection -path 0] {
get-property "start.link.businessObjects.Port[0].name" | equals output | verify-true
get-property "start.link.businessObjects.Port[0].wrappedObject"
| equals "ptolemy.actor.TypedIOPort {..Const.output}" | verify-true
get-property "end.link.businessObjects.Port[0].name" | equals input | verify-true
get-property "end.link.businessObjects.Port[0].wrappedObject"
| equals "ptolemy.actor.TypedIOPort {..Display.input}" | verify-true
}
with [get-edit-part -className ContainerShapeEditPart -index 1 | get-edit-part -className AdvancedAnchorEditPart
-index 1] {
get-property "link.businessObjects.Port[0].linkedRelations.Relation[0].linkedPorts.Port[0].wrappedObject"
| equals "ptolemy.actor.TypedIOPort {..Const.output}" | verify-true
get-property "link.businessObjects.Port[0].linkedRelations.Relation[0].linkedPorts.Port[1].wrappedObject"
| equals "ptolemy.actor.TypedIOPort {..Display.input}" | verify-true
}
with [get-edit-part -className ContainerShapeEditPart -index 2 | get-edit-part -className AdvancedAnchorEditPart] {
get-property "link.businessObjects.Port[0].linkedRelations.Relation[0].linkedPorts.Port[0].wrappedObject"
| equals "ptolemy.actor.TypedIOPort {..Const.output}" | verify-true
get-property "link.businessObjects.Port[0].linkedRelations.Relation[0].linkedPorts.Port[1].wrappedObject"
| equals "ptolemy.actor.TypedIOPort {..Display.input}" | verify-true
}
get-edit-part -text Constant | get-figure -path 3 | get-property text | equals Constant | verify-true
get-edit-part -text Display | get-figure -path 3 | get-property text | equals Display | verify-true
get-edit-part -text "SDF director" | get-figure -path 3 | get-property text | equals "SDF director" | verify-true
}
------=_.content-0a7243a0-75d3-3d5f-9791-539de0e5b7ac--
39 changes: 25 additions & 14 deletions tests/org.eclipse.triquetrum.rcptt.test/tests/renameActor.test
Original file line number Diff line number Diff line change
Expand Up @@ -7,31 +7,42 @@ Element-Version: 3.0
External-Reference:
Id: _RWGDEFnEEeelRaB1ByN9rA
Runtime-Version: 2.3.0.201706232317
Save-Time: 6/25/17 7:01 PM
Save-Time: 11/22/17 8:19 PM
Testcase-Type: ecl

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

get-view "Project Explorer" | get-tree | select "test/workflows/hello.tdml" | double-click

with [get-editor hello | get-diagram -index 1] {
get-edit-part -name hello | get-edit-part -text Constant | mouse-move 106 25 -height 80 -width 120
with [get-edit-part -name hello | get-edit-part -className ContainerShapeEditPart -index 1] {
mouse-move 33 21 button1 -height 41 -width 81
mouse-press 33 21 button1 -height 41 -width 81
mouse-release 33 21 button1 524288 -height 41 -width 81
mouse-hover 33 21 -height 41 -width 81
mouse-move 41 30 -height 41 -width 81
}
with [get-figure -path "3/0/2"] {
mouse-move 9 6 button1 -height 20 -width 20
mouse-press 9 6 button1 -height 20 -width 20
mouse-release 9 6 button1 524288 -height 20 -width 20
mouse-move 5 5 button1 -height 20 -width 20
mouse-press 5 5 button1 -height 20 -width 20
mouse-move 6 5 -mask 524288 -height 20 -width 20
mouse-release 6 5 button1 524288 -height 20 -width 20
}
}
with [get-window "Edit Attributes of 'Constant'"] {
with [get-editbox -after [get-label "Name*"]] {
click-text 1
key-type "M1+v" -times 2
set-text ChangedConstant
}
with [get-window "Edit Attributes of 'Const'"] {
get-editbox -after [get-label "Name*"] | set-text MyConst
get-button OK | click
}
get-editor hello | get-diagram -index 1 | get-edit-part -name hello | get-edit-part -text ChangedConstant | get-figure
-path 3 | get-property text | equals ChangedConstant | verify-true

with [get-editor hello | get-diagram -index 1 | get-edit-part -name hello | get-edit-part
-className ContainerShapeEditPart -index 1] {
mouse-move 37 23 button1 -height 41 -width 81
mouse-press 37 23 button1 -height 41 -width 81
mouse-release 37 23 button1 524288 -height 41 -width 81
mouse-press 37 23 button1 -height 41 -width 81
mouse-double-click 37 23 button1 -height 41 -width 81
}
get-window "Edit Attributes of 'MyConst'" | get-editbox -after [get-label "Name*"] | get-property text | equals MyConst
| verify-true
------=_.content-0a7243a0-75d3-3d5f-9791-539de0e5b7ac--

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ Element-Version: 3.0
External-Reference:
Id: _7SXGMFj_EeelRaB1ByN9rA
Runtime-Version: 2.3.0.201706232317
Save-Time: 6/25/17 7:02 PM
Save-Time: 11/22/17 7:55 PM
Testcase-Type: ecl

------=_.content-0a7243a0-75d3-3d5f-9791-539de0e5b7ac
Expand All @@ -22,5 +22,5 @@ with [get-view Console | get-text-viewer] {
get-property text | contains "Execution finished of model" | verify-true
}

get-window ".*.Display" | get-editbox | get-property text | equals 1 | verify-true
get-window "Display" | get-editbox | get-property text | equals 1 | verify-true
------=_.content-0a7243a0-75d3-3d5f-9791-539de0e5b7ac--

0 comments on commit 6ce5bb8

Please sign in to comment.