blob: 55b04de0384a76bf749e7cf4d1130d8d93f1da8e [file] [log] [blame]
--- RCPTT testcase ---
Format-Version: 1.0
Element-Name: CompareEditorComment
Element-Type: testcase
Element-Version: 3.0
External-Reference:
Id: _Hr_sEFq6EeaEZtYu-O9HmA
Runtime-Version: 2.1.0.201605312320
Save-Time: 8/18/16 5:23 PM
Testcase-Type: ecl
------=_.description-216f885c-d591-38ce-8ea2-e4f8cb4d6ffa
Content-Type: text/plain
Entry-Name: .description
Make sure that comments are getting colored
------=_.description-216f885c-d591-38ce-8ea2-e4f8cb4d6ffa--
------=_.content-0a7243a0-75d3-3d5f-9791-539de0e5b7ac
Content-Type: text/ecl
Entry-Name: .content
let [val review [create-review -server $serverURL]] {
openCompareEditor $review
}
// Type a comment and make sure it is colored in yellow
with [get-editor "Compare.*"] {
insertComment -on right -text comment -atLine 1
with [get-right-editor] {
set-caret-pos -line 2
get-property "styleAtCaret.text" | equals comment | verify-true
get-property "styleAtCaret.foregroundColor" | equals "#000000" | verify-true
get-property "styleAtCaret.backgroundColor" | equals "#FFFF00" | verify-true
}
}
// Save the comment and confirm that it is a draft and is colored in yellow
with [get-editor "Compare.*"] {
key-type "M1+s"
with [get-right-editor] {
set-caret-pos -line 2
get-property "styleAtCaret.text" | equals "Draft.*comment.*" | verify-true
get-property "styleAtCaret.foregroundColor" | equals "#000000" | verify-true
get-property "styleAtCaret.backgroundColor" | equals "#FFFF00" | verify-true
}
}
//Publish the comment by doing a reply
get-editor "Compare.*" | get-button "Reply to the review.*" | click
get-window "Reply to comment" | get-button OK | click
wait 500
// Now check that the color is not yellow
with [get-editor "Compare.*"] {
with [get-right-editor] {
set-caret-pos -line 2
get-property "styleAtCaret.text" | equals "admin.*comment.*" | verify-true
get-property "styleAtCaret.foregroundColor" | equals "#000000" | verify-true
get-property "styleAtCaret.backgroundColor" | equals "#FFFF00" | verify-false
}
}
------=_.content-0a7243a0-75d3-3d5f-9791-539de0e5b7ac--