aboutsummaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorfmallet <freddy.mallet@gmail.com>2010-09-21 12:00:48 +0000
committerfmallet <freddy.mallet@gmail.com>2010-09-21 12:00:48 +0000
commit6f121d1d2b50ed3bfb0ea8688d3005b20619fd21 (patch)
treebe1712a3424522a33341a1b005e7ef1a4206780c /tests
parent0730967fae4ab26226a4229c8afa171360c9ad53 (diff)
downloadsonarqube-6f121d1d2b50ed3bfb0ea8688d3005b20619fd21.tar.gz
sonarqube-6f121d1d2b50ed3bfb0ea8688d3005b20619fd21.zip
Add new IT test for rule template edition mode
Diffstat (limited to 'tests')
-rw-r--r--tests/integration/tests/src/it/selenium/all-tests.html2
-rw-r--r--tests/integration/tests/src/it/selenium/rules/copy_and_edit_rule_template.html (renamed from tests/integration/tests/src/it/selenium/rules/copy_rule_template.html)51
2 files changed, 49 insertions, 4 deletions
diff --git a/tests/integration/tests/src/it/selenium/all-tests.html b/tests/integration/tests/src/it/selenium/all-tests.html
index 1b74a84d7dc..b83d4f25c6e 100644
--- a/tests/integration/tests/src/it/selenium/all-tests.html
+++ b/tests/integration/tests/src/it/selenium/all-tests.html
@@ -473,7 +473,7 @@
<td><a href="rules/search_any_rules.html">rules/search_any_rules</a></td>
</tr>
<tr>
- <td><a href="rules/copy_rule_template.html">rules/copy_rule_template</a></td>
+ <td><a href="rules/copy_and_edit_rule_template.html">rules/copy_and_edit_rule_template</a></td>
</tr>
<tr>
<td><a href="rules/SONAR-1000_quality_profile_with_space_or_dot.html">rules/SONAR-1000_quality_profile_with_space_or_dot</a>
diff --git a/tests/integration/tests/src/it/selenium/rules/copy_rule_template.html b/tests/integration/tests/src/it/selenium/rules/copy_and_edit_rule_template.html
index 91b0b7dbcaa..9c78eb1351f 100644
--- a/tests/integration/tests/src/it/selenium/rules/copy_rule_template.html
+++ b/tests/integration/tests/src/it/selenium/rules/copy_and_edit_rule_template.html
@@ -4,12 +4,12 @@
<head profile="http://selenium-ide.openqa.org/profiles/test-case">
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<link rel="selenium.base" href="" />
-<title>copy_rule_template</title>
+<title>copy_and_edit_rule_template</title>
</head>
<body>
<table cellpadding="1" cellspacing="1" border="1">
<thead>
-<tr><td rowspan="1" colspan="3">copy_rule_template</td></tr>
+<tr><td rowspan="1" colspan="3">copy_and_edit_rule_template</td></tr>
</thead><tbody>
<tr>
<td>store</td>
@@ -28,6 +28,11 @@
</tr>
<tr>
<td>store</td>
+ <td>//ClassDeclaration</td>
+ <td>RULE_XPATH_EDIT</td>
+</tr>
+<tr>
+ <td>store</td>
<td>That's too bad</td>
<td>RULE_MESSAGE</td>
</tr>
@@ -118,7 +123,7 @@
</tr>
<tr>
<td>assertTextPresent</td>
- <td>My new rule</td>
+ <td>${RULE_NAME}</td>
<td></td>
</tr>
<tr>
@@ -131,6 +136,46 @@
<td>value</td>
<td>${RULE_XPATH}</td>
</tr>
+<tr>
+ <td>clickAndWait</td>
+ <td>link=Edit rule</td>
+ <td></td>
+</tr>
+<tr>
+ <td>type</td>
+ <td>rule[name]</td>
+ <td>Updated ${RULE_NAME}</td>
+</tr>
+<tr>
+ <td>type</td>
+ <td>rule_param[xpath]</td>
+ <td>${RULE_XPATH_EDIT}</td>
+</tr>
+<tr>
+ <td>type</td>
+ <td>rule_param[message]</td>
+ <td>Another message</td>
+</tr>
+<tr>
+ <td>clickAndWait</td>
+ <td>//input[@value='Update']</td>
+ <td></td>
+</tr>
+<tr>
+ <td>assertTextPresent</td>
+ <td>${RULE_NAME}</td>
+ <td></td>
+</tr>
+<tr>
+ <td>click</td>
+ <td>link=Updated ${RULE_NAME}</td>
+ <td></td>
+</tr>
+<tr>
+ <td>assertValue</td>
+ <td>value</td>
+ <td>${RULE_XPATH_EDIT}</td>
+</tr>
</tbody></table>
</body>