blob: 9fae51351cde7a7b087f60745e526e6ea9a8d997 [file] [log] [blame]
--- Q7 testcase ---
Format-Version: 1.0
Q7-vendor: www.xored.com/q7
Contexts: _SapwEL4pEeOsAoUpt_cnqw,_LOMGYGrvEeK_JdLra2Bk5A,_kZWZEWNjEeS6ovqwxdtU-w
Element-Name: ts009_tc006_logicalmodel_view_tree_presentation
Element-Type: testcase
Element-Version: 3.0
External-Reference:
Id: _ofJJwGNjEeS6ovqwxdtU-w
Q7-Runtime-Version: 1.3.14.201410230950
Save-Time: 2/9/15 5:54 PM
Testcase-Type: ecl
------=_.description-216f885c-d591-38ce-8ea2-e4f8cb4d6ffa
Content-Type: text/plain
Entry-Name: .description
This test just checks the existence of the Logical Model View, and the initial state of its toolbar buttons.
1. Select Window/Show View/Other...
2. Click on EMF Compare/Logical Model View item
3. Select Tree Presentation
4. Activate synchronization
5. Click on a model
// Assert that the view is populated as a Tree presentation
------=_.description-216f885c-d591-38ce-8ea2-e4f8cb4d6ffa--
------=_.content-0a7243a0-75d3-3d5f-9791-539de0e5b7ac
Content-Type: text/ecl
Entry-Name: .content
get-preferences-menu | click
with [get-window Preferences] {
get-tree | select "EMF Compare/Resolution strategy"
get-combo -after [get-label "Resolution scope:"] | select "Workspace"
get-button Apply | click
get-button OK | click
}
//1. Select Window/Show View/Other...
get-menu "Window/Show View/Other..." | click
//2. Click on EMF Compare/Logical Model View item
with [get-window "Show View"] {
get-tree | select "EMF Compare/Logical Model View"
get-button OK | click
}
//3. Select Tree Presentation
get-button "View Menu" -index 1 | click
try -command {//From Mars release
get-view "Logical Model View" | get-menu Tree | click
} -catch {//Before Mars release
get-menu Tree | click
}
//4. Activate synchronization
try -command {//From Mars release
get-view "Logical Model View" | get-button "Synchronize with Editor and Selection" | click
} -catch {//Before Mars release
get-button "Synchronize with Editor and Selection" | click
}
//5. Click on a model
// Assert that the view is populated as a Tree presentation
get-view "Package Explorer" | get-tree | select "Project1/left.uml"
//Create variable to store the logical model view tree
//From mars release, get-view Logical Model View return null, so we have to find another way to retrive the tree.
//It's ugly but I didn't found a proper way.
let [val lmvTree [try -command {get-view "Logical Model View" | get-tree} -catch {get-tree -index 1}]] {
$lmvTree | select "Project1/left.uml"
$lmvTree | select "Project2/folder1/folder11/leftFragment.uml"
with [$lmvTree] {
get-property "getItems().length" | equals 2 | verify-true
get-property "getItems().TreeItem[0].getItems().length" | equals 1 | verify-true
get-property "getItems().TreeItem[0].getItems().TreeItem[0].getItems().length" | equals 0 | verify-true
get-property "getItems().TreeItem[0].getItems().TreeItem[0].getText()" | equals "left.uml" | verify-true
get-property "getItems().TreeItem[0].getText()" | equals Project1 | verify-true
get-property "getItems().TreeItem[1].getItems().length" | equals 1 | verify-true
get-property "getItems().TreeItem[1].getItems().TreeItem[0].getItems().length" | equals 1 | verify-true
get-property "getItems().TreeItem[1].getItems().TreeItem[0].getItems().TreeItem[0].getItems().length" | equals 1
| verify-true
get-property "getItems().TreeItem[1].getItems().TreeItem[0].getItems().TreeItem[0].getItems().TreeItem[0].getItems().length"
| equals 0 | verify-true
get-property "getItems().TreeItem[1].getItems().TreeItem[0].getItems().TreeItem[0].getItems().TreeItem[0].getText()"
| equals "leftFragment.uml" | verify-true
get-property "getItems().TreeItem[1].getItems().TreeItem[0].getItems().TreeItem[0].getText()" | equals folder11
| verify-true
get-property "getItems().TreeItem[1].getItems().TreeItem[0].getText()" | equals folder1 | verify-true
get-property "getItems().TreeItem[1].getText()" | equals Project2 | verify-true
}
}
get-preferences-menu | click
with [get-window Preferences] {
get-tree | select "EMF Compare/Resolution strategy"
get-combo -after [get-label "Resolution scope:"] | select "Container"
get-button Apply | click
get-button OK | click
}
------=_.content-0a7243a0-75d3-3d5f-9791-539de0e5b7ac--