diff options
author | fmallet <freddy.mallet@gmail.com> | 2010-09-21 09:25:49 +0000 |
---|---|---|
committer | fmallet <freddy.mallet@gmail.com> | 2010-09-21 09:25:49 +0000 |
commit | 2f41ded2cee6bcb6438eeaeee3d3178e45e8e8b9 (patch) | |
tree | 2fdecaee7767951b29a122cefd9735d5c7d02626 | |
parent | 1fd085a34d31801603eecb10f82e7e53660d8b81 (diff) | |
download | sonarqube-2f41ded2cee6bcb6438eeaeee3d3178e45e8e8b9.tar.gz sonarqube-2f41ded2cee6bcb6438eeaeee3d3178e45e8e8b9.zip |
Improve the maintainability level of the backup-profile IT test by removing hardcoded number of expected rules
-rw-r--r-- | tests/integration/tests/src/it/selenium/profiles/backup-profile.html | 41 |
1 files changed, 18 insertions, 23 deletions
diff --git a/tests/integration/tests/src/it/selenium/profiles/backup-profile.html b/tests/integration/tests/src/it/selenium/profiles/backup-profile.html index 1426557023a..88b7fca66ca 100644 --- a/tests/integration/tests/src/it/selenium/profiles/backup-profile.html +++ b/tests/integration/tests/src/it/selenium/profiles/backup-profile.html @@ -4,47 +4,42 @@ <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>bakup-profile</title> +<title>backup-profile</title> </head> <body> <table cellpadding="1" cellspacing="1" border="1"> <thead> -<tr><td rowspan="1" colspan="3">bakup-profile</td></tr> +<tr><td rowspan="1" colspan="3">backup-profile</td></tr> </thead><tbody> <tr> - <td>open</td> - <td>/sessions/logout</td> - <td></td> + <td>store</td> + <td>java</td> + <td>LANGUAGE</td> </tr> <tr> - <td>open</td> - <td>/sessions/login</td> - <td></td> + <td>store</td> + <td>Integration%20tests</td> + <td>PROFILE</td> </tr> <tr> - <td>type</td> - <td>login</td> - <td>admin</td> -</tr> -<tr> - <td>type</td> - <td>password</td> - <td>admin</td> + <td>open</td> + <td>/profiles</td> + <td></td> </tr> <tr> - <td>clickAndWait</td> - <td>commit</td> - <td></td> + <td>storeText</td> + <td>activated_rules_${LANGUAGE}_${PROFILE}</td> + <td>NUMBER_OF_RULES</td> </tr> <tr> <td>open</td> - <td>/api/rules.xml?categories=&language=java&plugins=&priorities=&profile=Integration+tests&status=ACTIVE</td> + <td>/api/rules.xml?categories=&language=${LANGUAGE}&plugins=&priorities=&profile=${PROFILE}&status=ACTIVE</td> <td></td> </tr> <tr> - <td>assertElementPresent</td> - <td>//rules[count(rule) = 124]</td> - <td>Number of rules</td> + <td>assertXpathCount</td> + <td>//rule</td> + <td>${NUMBER_OF_RULES}</td> </tr> </tbody></table> |