This repository has been archived by the owner on Sep 17, 2021. It is now read-only.
/
ts005_tc006_compare_with_head_revision.test
71 lines (64 loc) · 3.26 KB
/
ts005_tc006_compare_with_head_revision.test
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
--- Q7 testcase ---
Format-Version: 1.0
Q7-vendor: www.xored.com/q7
Contexts: _SapwEL4pEeOsAoUpt_cnqw,_LOMGYGrvEeK_JdLra2Bk5A,_YvO_QG9-EeKmUfxl9qSLpg,_pj0X4HBcEeKTzKjv1SXOgA
Element-Name: ts005_tc006_compare_with_head_revision
Element-Type: testcase
Element-Version: 3.0
External-Reference:
Id: _wuFy0HH0EeKUuY9Bwmpkkw
Q7-Runtime-Version: 1.3.10.201312200736
Save-Time: 4/11/14 10:06 AM
Testcase-Type: ecl
------=_.description-216f885c-d591-38ce-8ea2-e4f8cb4d6ffa
Content-Type: text/plain
Entry-Name: .description
This test must validate a comparison with egit > compare with > head revision.
TEST STEPS
1) Select the library project and then open the library.ecore file.
2) Add a new EClass named Writer.
3) Close editor.
4) Right-click Compare With > HEAD Revision.
5) The Compare editor must show one diff : Writer [eClassifiers delete] under library package.
//Asserts that the compare editor is open.
//Asserts that the structure merge viewer contains one diff that is Writer [eClassifiers delete].
------=_.description-216f885c-d591-38ce-8ea2-e4f8cb4d6ffa--
------=_.content-0a7243a0-75d3-3d5f-9791-539de0e5b7ac
Content-Type: text/ecl
Entry-Name: .content
get-view "Package Explorer" | get-tree | select "(> )?library.*/(> )?library.ecore"
| double-click
with [get-editor "library.ecore" | get-tree] {
get-item "platform:\\/resource\\/library\\/library.ecore" | click
get-item "platform:\\/resource\\/library\\/library.ecore" | expand
get-item "platform:\\/resource\\/library\\/library.ecore/library" | click
get-item "platform:\\/resource\\/library\\/library.ecore" | expand
select "platform:\\/resource\\/library\\/library.ecore/library"
get-item "platform:\\/resource\\/library\\/library.ecore/library" | click
select "platform:\\/resource\\/library\\/library.ecore/library" | get-menu "New Child/EClass" | click
key-type "M2+w"
get-item "platform:\\/resource\\/library\\/library.ecore/library" | expand
get-item "platform:\\/resource\\/library\\/library.ecore/library/" | click
select "platform:\\/resource\\/library\\/library.ecore/library/" | get-menu "Show Properties View" | click
}
with [get-view Properties | get-tree] {
select Name | activate-cell-edit -column 1
get-editbox | set-text Writer | key-type "Enter"
wait 500
}
get-view Properties | get-tree | get-item Name | get-property "values[\'Value\']" | equals "Writer" | verify-true
get-editor "library.ecore" | get-tree | key-type "M1+s"
get-editor "library.ecore" | get-tree
| get-property "getItems().TreeItem[0].getItems().TreeItem[0].getItems().TreeItem[1].getText()" | equals Writer
| verify-true
get-editor "library.ecore" | close
get-view "Package Explorer" | get-tree | select "(> )?library.*/(> )?library.ecore"
| get-menu "Compare With/HEAD Revision" | click
with [get-editor "Compare library.ecore Current and 9763e97..." | 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].getText()" | equals "Writer [eClassifiers add]"
| verify-true
get-property "getItems().TreeItem[0].getText()" | equals "> library" | verify-true
}
------=_.content-0a7243a0-75d3-3d5f-9791-539de0e5b7ac--