blob: 496e21f115aeafd1d4f5619a7a03edf860f8940b [file] [log] [blame]
--- RCPTT testcase ---
Format-Version: 1.0
Element-Name: CompareEditorChangeInput
Element-Type: testcase
Element-Version: 3.0
External-Reference:
Id: _FM6WUFrBEeaEZtYu-O9HmA
Runtime-Version: 2.1.0.201605312320
Save-Time: 1/12/17 11:40 PM
Testcase-Type: ecl
------=_.content-0a7243a0-75d3-3d5f-9791-539de0e5b7ac
Content-Type: text/ecl
Entry-Name: .content
let [val review [amend-review -review [create-review -server $serverURL]]] {
openCompareEditor $review
}
// Switch to patchset 1
with [get-editor "Compare.*"] {
switchRightInput -to "1.*"
assert-that-left-selected-patch -is "Patch Set 2"
assert-that-right-selected-patch -is "Patch Set 1"
assert-that-left-editor-content -is "Hello reviewers {community} !"
assert-that-right-editor-content -is "Hello reviewers {community} !"
}
// Switch to workspace
with [get-editor "Compare.*"] {
switchRightInput -to WORKSPACE
assert-that-left-selected-patch -is "Patch Set 2"
assert-that-right-selected-patch -is WORKSPACE
assert-that-right-editor-content -is ""
assert-that-left-editor-content -is "Hello reviewers {community} !"
}
// Switch to patchset 2. This will cause nothing to be shown.
with [get-editor "Compare.*"] {
switchRightInput -to "2.*"
assert-that-left-selected-patch -is "Patch Set 2"
assert-that-right-selected-patch -is "Patch Set 2"
}
// Switch to patchset 1. We check that the file that was last opened is re-opened
with [get-editor "Compare.*"] {
switchRightInput -to "1.*"
assert-that-right-selected-patch -is "Patch Set 1"
assert-that-left-selected-patch -is "Patch Set 2"
assert-that-right-editor-content -is "Hello reviewers {community} !"
assert-that-left-editor-content -is "Hello reviewers {community} !"
}
// Test shortcut to switch right patchset
with [get-editor "Compare.*"] {
switchRightInput -to BASE
key-type "M1+3"
assert-that-right-selected-patch -is "Patch Set 2"
key-type "M1+3"
assert-that-right-selected-patch -is "Patch Set 1"
key-type "M1+3"
assert-that-right-selected-patch -is WORKSPACE
key-type "M1+3"
assert-that-right-selected-patch -is BASE
}
// Test shortcut to switch left patchset
with [get-editor "Compare.*"] {
switchLeftInput -to WORKSPACE
key-type "M1+1"
assert-that-left-selected-patch -is BASE
key-type "M1+1"
assert-that-left-selected-patch -is "Patch Set 2"
key-type "M1+1"
assert-that-left-selected-patch -is "Patch Set 1"
key-type "M1+1"
assert-that-left-selected-patch -is WORKSPACE
}
------=_.content-0a7243a0-75d3-3d5f-9791-539de0e5b7ac--