Add test case for star feature
Change-Id: Idd1f3e859ddb4b92b676b558ca72a281fa65f11a
Signed-off-by: gperron <guy.perron@ericsson.com>
diff --git a/org.eclipse.egerrit.ui.rcptt.tests/HelperScripts.ctx b/org.eclipse.egerrit.ui.rcptt.tests/HelperScripts.ctx
index b6eb657..90e6802 100644
--- a/org.eclipse.egerrit.ui.rcptt.tests/HelperScripts.ctx
+++ b/org.eclipse.egerrit.ui.rcptt.tests/HelperScripts.ctx
@@ -6,7 +6,7 @@
Element-Version: 2.0
Id: _jPStUFRJEeaXLqlXvYQIgg
Runtime-Version: 2.1.0.201605312320
-Save-Time: 8/18/16 3:21 PM
+Save-Time: 8/18/16 9:26 PM
------=_.ecl.context-718f04b4-ed39-33e3-af62-0995e4561998
Content-Type: text/ecl
@@ -253,4 +253,15 @@
get-text-viewer -index 1
}
+proc "assert-that-star-in-dashboard-is-off" [val is] {
+ assert-that-star-in-dashboard -is "org.eclipse.egerrit.dashboard.ui/icons/view16/starOpen.gif"
+}
+
+proc "assert-that-star-in-dashboard-is-on" [val is] [val in -input] {
+ assert-that-star-in-dashboard -is "org.eclipse.egerrit.dashboard.ui/icons/view16/starFilled.gif"
+}
+
+proc "assert-that-star-in-dashboard" [val is] [val in -input] {
+ getDashboard | get-table | get-cell -row 0 -column 0 | get-property "cells[0].image.path" | equals $is | verify-true
+}
------=_.ecl.context-718f04b4-ed39-33e3-af62-0995e4561998--
diff --git a/org.eclipse.egerrit.ui.rcptt.tests/dashboard/ValidateStar.test b/org.eclipse.egerrit.ui.rcptt.tests/dashboard/ValidateStar.test
new file mode 100644
index 0000000..a992516
--- /dev/null
+++ b/org.eclipse.egerrit.ui.rcptt.tests/dashboard/ValidateStar.test
@@ -0,0 +1,35 @@
+--- RCPTT testcase ---
+Format-Version: 1.0
+Element-Name: ValidateStar
+Element-Type: testcase
+Element-Version: 3.0
+External-Reference:
+Id: _wnmC0GVuEea5G8_7LPqyQA
+Runtime-Version: 2.1.0.201605312320
+Save-Time: 8/18/16 9:24 PM
+Testcase-Type: ecl
+
+------=_.description-216f885c-d591-38ce-8ea2-e4f8cb4d6ffa
+Content-Type: text/plain
+Entry-Name: .description
+
+Validate the star review feature of the dashboard
+------=_.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]] {
+ runQuery [$review | get lastChangeId] -serverName $serverName
+}
+
+// Check that the star is off (default)
+assert-that-star-in-dashboard-is-off
+
+//Click on the star
+with [getDashboard | get-table | get-cell -row 0 -column 0] {
+ click
+}
+
+assert-that-star-in-dashboard-is-on
+------=_.content-0a7243a0-75d3-3d5f-9791-539de0e5b7ac--