blob: cbef05347e77937b3def9686a50fa316deab6397 [file] [log] [blame]
--- RCPTT testcase ---
Format-Version: 1.0
Contexts: _SapwEL4pEeOsAoUpt_cnqw,_LOMGYGrvEeK_JdLra2Bk5A,_SfCaoLdMEeSzKYAU0FYwkQ
Element-Name: ts012_tc001_case0
Element-Type: testcase
Element-Version: 3.0
External-Reference:
Id: _tTqJILdLEeSzKYAU0FYwkQ
Runtime-Version: 2.0.0.201506120617
Save-Time: 8/31/15 4:27 PM
Testcase-Type: ecl
------=_.description-216f885c-d591-38ce-8ea2-e4f8cb4d6ffa
Content-Type: text/plain
Entry-Name: .description
This test case tests the content of the SMV and the CMVs, and the synchronization between elements.
TEST STEPS
1) Select the 3 ecore models and run a 3-way comparison (select origin/R1.ecore as ancestor) //asserts that the 3 models are selected
2) Check the content of the SMV and its default selected element
3) Check the content of the three CMVs (left, right, ancestor) and their default selected element
4) Check synchronization between SMV and CMVs
5) Switch to Default Group : Check the content of the SMV
6) Switch to By Kind Group : Check the content of the SMV
7) Switch to By Resource Group : Check the content of the SMV
------=_.description-216f885c-d591-38ce-8ea2-e4f8cb4d6ffa--
------=_.content-0a7243a0-75d3-3d5f-9791-539de0e5b7ac
Content-Type: text/ecl
Entry-Name: .content
with [get-view "Package Explorer" | get-tree] {
select "case0/left/R1.ecore" "case0/origin/R1.ecore" "case0/right/R1.ecore"
get-menu "Compare With/Each Other" | click
get-item "case0/left/R1.ecore" | get-property selected | equals true | verify-true
get-item "case0/origin/R1.ecore" | get-property selected | equals true | verify-true
get-item "case0/right/R1.ecore" | get-property selected | equals true | verify-true
}
with [get-window "Select Common Ancestor"] {
get-button "\'/case0/origin/R1.ecore\'" | click
get-button OK | click
}
// 3-way Group Provider
with [get-editor "Compare.*"] {
// Check content of SMV
with [get-tree] {
get-property "getItems().length" | equals 1 | verify-true
get-property "getItems().TreeItem[0].getText()" | equals "> case0/right/R1.ecore" | verify-true
get-property "getItems().TreeItem[0].getItems().length" | equals 1 | verify-true
get-property "getItems().TreeItem[0].getItems().TreeItem[0].getText()" | equals "> [ ... ]" | verify-true
get-property "getItems().TreeItem[0].getItems().TreeItem[0].getItems().length" | equals 1 | verify-true
get-property "getItems().TreeItem[0].getItems().TreeItem[0].getItems().TreeItem[0].getText()" | equals "> B"
| verify-true
get-property "getItems().TreeItem[0].getItems().TreeItem[0].getItems().TreeItem[0].getItems().length"
| equals 1 | verify-true
get-property "getItems().TreeItem[0].getItems().TreeItem[0].getItems().TreeItem[0].getItems().TreeItem[0].getText()"
| equals "E [eSubpackages delete]" | verify-true
get-property "getItems().TreeItem[0].getItems().TreeItem[0].getItems().TreeItem[0].getItems().TreeItem[0].getItems().length"
| equals 0 | verify-true
get-property "selection[0].path[0]" | equals "> case0/right/R1.ecore" | verify-true
get-property "selection[0].path[1]" | equals "> \\[ ... \\]" | verify-true
get-property "selection[0].path[2]" | equals "> B" | verify-true
get-property "selection[0].path[3]" | equals "E \\[eSubpackages delete\\]" | verify-true
}
// Check content of left CMV
with [get-tree -after [get-label "(Local: /)?case0/right/R[12].ecore"]] {
get-property "selection[0].path[0]" | equals "\\[ ... \\]" | verify-true
get-property "selection[0].path[1]" | equals B | verify-true
get-property "selection[0].path[2]" | equals E | verify-true
get-property "getItems().length" | equals 1 | verify-true
get-property "getItems().TreeItem[0].getText()" | equals "[ ... ]" | verify-true
get-property "getItems().TreeItem[0].getItems().length" | equals 1 | verify-true
get-property "getItems().TreeItem[0].getItems().TreeItem[0].getText()" | equals B | verify-true
get-property "getItems().TreeItem[0].getItems().TreeItem[0].getItems().length" | equals 2 | verify-true
get-property "getItems().TreeItem[0].getItems().TreeItem[0].getItems().TreeItem[0].getText()" | equals D
| verify-true
get-property "getItems().TreeItem[0].getItems().TreeItem[0].getItems().TreeItem[0].getItems().length"
| equals 0 | verify-true
get-property "getItems().TreeItem[0].getItems().TreeItem[0].getItems().TreeItem[1].getText()" | equals E
| verify-true
get-property "getItems().TreeItem[0].getItems().TreeItem[0].getItems().TreeItem[1].getItems().length"
| equals 0 | verify-true
}
// Check content of right CMV
with [get-tree -after [get-label "(Local: /)?case0/right/R[12].ecore"] -index 1] {
get-property "selection[0].path[0]" | equals "\\[ ... \\]" | verify-true
get-property "selection[0].path[1]" | equals B | verify-true
get-property "selection[0].path[2]" | equals " " | verify-true
get-property "getItems().length" | equals 1 | verify-true
get-property "getItems().TreeItem[0].getText()" | equals "[ ... ]" | verify-true
get-property "getItems().TreeItem[0].getItems().length" | equals 1 | verify-true
get-property "getItems().TreeItem[0].getItems().TreeItem[0].getText()" | equals B | verify-true
get-property "getItems().TreeItem[0].getItems().TreeItem[0].getItems().length" | equals 2 | verify-true
get-property "getItems().TreeItem[0].getItems().TreeItem[0].getItems().TreeItem[0].getText()" | equals D
| verify-true
get-property "getItems().TreeItem[0].getItems().TreeItem[0].getItems().TreeItem[0].getItems().length"
| equals 0 | verify-true
get-property "getItems().TreeItem[0].getItems().TreeItem[0].getItems().TreeItem[1].getText()" | equals ""
| verify-true
get-property "getItems().TreeItem[0].getItems().TreeItem[0].getItems().TreeItem[1].getItems().length"
| equals 0 | verify-true
}
// Check content of ancestor CMV
get-button "Show Ancestor Pane" | click
with [get-tree -after [get-label "(Local: /)?case0/right/R[12].ecore"]] {
get-property "getItems().length" | equals 1 | verify-true
get-property "getItems().TreeItem[0].getText()" | equals "[ ... ]" | verify-true
get-property "getItems().TreeItem[0].getItems().length" | equals 1 | verify-true
get-property "getItems().TreeItem[0].getItems().TreeItem[0].getText()" | equals B | verify-true
get-property "getItems().TreeItem[0].getItems().TreeItem[0].getItems().length" | equals 2 | verify-true
get-property "getItems().TreeItem[0].getItems().TreeItem[0].getItems().TreeItem[0].getText()" | equals D
| verify-true
get-property "getItems().TreeItem[0].getItems().TreeItem[0].getItems().TreeItem[1].getText()" | equals E
| verify-true
}
}
// Check synchronization
get-editor "Compare (\'case0/right/R1.ecore\' - \'case0/left/R1.ecore\' - \'case0/right/R1.ecore\')" | get-tree
| select "> case0\\/right\\/R1.ecore/> \\[ ... \\]" | double-click
with [get-editor "Compare (\'case0/right/R1.ecore\' - \'case0/left/R1.ecore\' - \'case0/right/R1.ecore\')"] {
with [get-tree] {
get-property "selection[0].path[0]" | equals "> case0/right/R1.ecore" | verify-true
get-property "selection[0].path[1]" | equals "> \\[ ... \\]" | verify-true
}
get-tree -after [get-label "case0/right/R1.ecore"] | get-property "selection[0].path[0]" | equals "\\[ ... \\]"
| verify-true
get-tree -after [get-label "case0/right/R1.ecore"] -index 1 | get-property "selection[0].path[0]"
| equals "\\[ ... \\]" | verify-true
get-tree -after [get-label "case0/right/R1.ecore"] -index 2 | get-property "selection[0].path[0]"
| equals "\\[ ... \\]" | verify-true
}
// Default Group Provider
get-editor "Compare (\'case0/right/R1.ecore\' - \'case0/left/R1.ecore\' - \'case0/right/R1.ecore\')"
| get-button Groups | click -arrow
get-menu Default | click
get-window "Group preference" | get-button No | click
get-editor "Compare (\'case0/right/R1.ecore\' - \'case0/left/R1.ecore\' - \'case0/right/R1.ecore\')"
| get-button "Expand All" | click
with [get-editor "Compare (\'case0/right/R1.ecore\' - \'case0/left/R1.ecore\' - \'case0/right/R1.ecore\')" | get-tree] {
get-property "getItems().length" | equals 1 | verify-true
get-property "getItems().TreeItem[0].getText()" | equals "> [ ... ]" | verify-true
get-property "getItems().TreeItem[0].getItems().length" | equals 1 | verify-true
get-property "getItems().TreeItem[0].getItems().TreeItem[0].getText()" | equals "> B" | verify-true
get-property "getItems().TreeItem[0].getItems().TreeItem[0].getItems().length" | equals 1 | verify-true
get-property "getItems().TreeItem[0].getItems().TreeItem[0].getItems().TreeItem[0].getText()"
| equals "E [eSubpackages delete]" | verify-true
get-property "getItems().TreeItem[0].getItems().TreeItem[0].getItems().TreeItem[0].getItems().length" | equals 0
| verify-true
}
// By Kind Group Provider
get-editor "Compare (\'case0/right/R1.ecore\' - \'case0/left/R1.ecore\' - \'case0/right/R1.ecore\')"
| get-button Groups | click -arrow
get-menu "By Kind" | click
get-window "Group preference" | get-button No | click
get-editor "Compare (\'case0/right/R1.ecore\' - \'case0/left/R1.ecore\' - \'case0/right/R1.ecore\')"
| get-button "Expand All" | click
with [get-editor "Compare (\'case0/right/R1.ecore\' - \'case0/left/R1.ecore\' - \'case0/right/R1.ecore\')" | get-tree] {
get-property "getItems().length" | equals 1 | verify-true
get-property "getItems().TreeItem[0].getText()" | equals "> Deletions" | verify-true
get-property "getItems().TreeItem[0].getItems().length" | equals 1 | verify-true
get-property "getItems().TreeItem[0].getItems().TreeItem[0].getText()" | equals "> [ ... ]" | verify-true
get-property "getItems().TreeItem[0].getItems().TreeItem[0].getItems().length" | equals 1 | verify-true
get-property "getItems().TreeItem[0].getItems().TreeItem[0].getItems().TreeItem[0].getText()" | equals "> B"
| verify-true
get-property "getItems().TreeItem[0].getItems().TreeItem[0].getItems().TreeItem[0].getItems().length" | equals 1
| verify-true
get-property "getItems().TreeItem[0].getItems().TreeItem[0].getItems().TreeItem[0].getItems().TreeItem[0].getText()"
| equals "E [eSubpackages delete]" | verify-true
get-property "getItems().TreeItem[0].getItems().TreeItem[0].getItems().TreeItem[0].getItems().TreeItem[0].getItems().length"
| equals 0 | verify-true
}
// By Resource Group Provider
get-editor "Compare (\'case0/right/R1.ecore\' - \'case0/left/R1.ecore\' - \'case0/right/R1.ecore\')"
| get-button Groups | click -arrow
get-menu "By Resource" | click
get-window "Group preference" | get-button No | click
get-editor "Compare (\'case0/right/R1.ecore\' - \'case0/left/R1.ecore\' - \'case0/right/R1.ecore\')"
| get-button "Expand All" | click
with [get-editor "Compare (\'case0/right/R1.ecore\' - \'case0/left/R1.ecore\' - \'case0/right/R1.ecore\')" | get-tree] {
get-property "getItems().length" | equals 1 | verify-true
get-property "getItems().TreeItem[0].getItems().length" | equals 1 | verify-true
get-property "getItems().TreeItem[0].getItems().TreeItem[0].getItems().length" | equals 1 | verify-true
get-property "getItems().TreeItem[0].getItems().TreeItem[0].getItems().TreeItem[0].getItems().length" | equals 0
| verify-true
get-property "getItems().TreeItem[0].getItems().TreeItem[0].getItems().TreeItem[0].getText()"
| equals "E [eSubpackages delete]" | verify-true
get-property "getItems().TreeItem[0].getItems().TreeItem[0].getText()" | equals "> B" | verify-true
get-property "getItems().TreeItem[0].getText()" | equals "left/R2.ecore <-> right/R2.ecore (origin/R2.ecore)"
| verify-true
}
------=_.content-0a7243a0-75d3-3d5f-9791-539de0e5b7ac--