blob: 24f56495ccccd4bab3c673ea01d4a726648bc4ef [file] [log] [blame]
--- RCPTT testcase ---
Format-Version: 1.0
Element-Name: AutoRebaseIdealCase
Element-Type: testcase
Element-Version: 3.0
External-Reference:
Id: _C4Oe0A_XEeeBuMHyGXWtrw
Runtime-Version: 2.1.0.201605312320
Save-Time: 3/23/17 3:19 PM
Testcase-Type: ecl
------=_.content-0a7243a0-75d3-3d5f-9791-539de0e5b7ac
Content-Type: text/ecl
Entry-Name: .content
/* Remove all repos */
delete-git-repos
try {
/* Create a first review with a unique content (timestamp) */
let [val review1 [create-review -server $serverURL -filename "Project/src/file.txt" -fileContent [get-time
| format-time -format "hh:mm:ss:SS"]]] {
/* Create a conflicting review by creating a new review, and then submitting the first review */
let [val review2 [create-review -server $serverURL -filename "Project/src/file.txt" -fileContent [get-time
| format-time -format "hh:mm:ss:SS"]]] {
// Submit the first review and close the editor
runQueryAndOpenEditor $review1
/* First do a +2 */
get-editor | get-button "Reply..." | click
get-menu "Code-Review +2" | click
wait -ms $defaultWaitTime
with [get-editor] {
get-button Submit | click
wait -ms $defaultWaitTime
close
}
runQueryAndOpenEditor $review2
/* Import the repository and try again */
import-project $review2 -projectName Project
}
}
with [get-editor] {
initiate-local-rebase
}
with [get-window "Automatic local rebase was started"] {
get-button OK | click
}
/* Verify that the git repo is in a rebase state */
get-view "Git Staging" | get-section Rebase | get-label Rebase | get-property caption | equals Rebase | verify-true
/* Verify that there are now two branches */
get-view "Git Repositories" | get-tree | get-item "egerrit.*\.git/Branches/Local" | get-property childCount | equals
"2" | verify-true
/* Verify that the automatic rebase branch was created */
get-view "Git Repositories" | get-tree | get-item "egerrit.*\.git/Branches/Local" | get-property "getItems().Tree" +
"Item[0].getText()" | equals "automatic-rebase-.*Test commit message" | verify-true
/* Verify that the automatic branch doesn't have the checked out icon (means it's not checked out) */
get-view "Git Repositories" | get-tree | get-item "egerrit.*\.git/Branches/Local/automatic-rebase-.*" | get-property
"image.path" | equals "org.eclipse.egit.ui/icons/obj16/branch_obj.gif" | verify-true
} -finally {
delete-git-repos
}
------=_.content-0a7243a0-75d3-3d5f-9791-539de0e5b7ac--