summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEndi S. Dewata <edewata@redhat.com>2011-03-16 23:08:31 -0400
committerEndi S. Dewata <edewata@redhat.com>2011-03-21 15:57:11 -0400
commit9e139ae42d7f3f82a68446765835b48096c30746 (patch)
tree3b03a39e1a44a9f4dfb2b65a2ad5f2af98118507
parent1fccdfccddf1c785b43102690b827b51bd827fb7 (diff)
downloadfreeipa-9e139ae42d7f3f82a68446765835b48096c30746.tar.gz
freeipa-9e139ae42d7f3f82a68446765835b48096c30746.tar.xz
freeipa-9e139ae42d7f3f82a68446765835b48096c30746.zip
Added sudo command test cases.
-rw-r--r--install/ui/test/functional/sudocmd-add.html52
-rw-r--r--install/ui/test/functional/sudocmd-del.html47
-rw-r--r--install/ui/test/functional/sudocmd-find.html72
-rw-r--r--install/ui/test/functional/sudocmd-mod.html77
-rw-r--r--install/ui/test/functional/sudocmd-suite.html17
5 files changed, 265 insertions, 0 deletions
diff --git a/install/ui/test/functional/sudocmd-add.html b/install/ui/test/functional/sudocmd-add.html
new file mode 100644
index 00000000..11e865c2
--- /dev/null
+++ b/install/ui/test/functional/sudocmd-add.html
@@ -0,0 +1,52 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
+<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="https://localhost/" />
+<title>Add Sudo Command</title>
+</head>
+<body>
+<table cellpadding="1" cellspacing="1" border="1">
+<thead>
+<tr><td rowspan="1" colspan="3">Add Sudo Command</td></tr>
+</thead><tbody>
+<tr>
+ <td>open</td>
+ <td>/ipa/ui/#navigation=1&amp;policy=2&amp;sudorule-entity=sudocmd</td>
+ <td></td>
+</tr>
+<tr>
+ <td>waitForTextPresent</td>
+ <td>0 sudo command matched</td>
+ <td></td>
+</tr>
+<tr>
+ <td>click</td>
+ <td>//div[@id='sudorule']//div[@class='action-panel']//a[@title='Add']</td>
+ <td></td>
+</tr>
+<tr>
+ <td>type</td>
+ <td>sudocmd</td>
+ <td>testsudocmd</td>
+</tr>
+<tr>
+ <td>type</td>
+ <td>description</td>
+ <td>Test Sudo Command</td>
+</tr>
+<tr>
+ <td>click</td>
+ <td>//button[@type='button']</td>
+ <td></td>
+</tr>
+<tr>
+ <td>waitForElementPresent</td>
+ <td>//div[@id='sudorule']//span[@name='search']//input[@value='testsudocmd']</td>
+ <td></td>
+</tr>
+
+</tbody></table>
+</body>
+</html>
diff --git a/install/ui/test/functional/sudocmd-del.html b/install/ui/test/functional/sudocmd-del.html
new file mode 100644
index 00000000..5e2fdd65
--- /dev/null
+++ b/install/ui/test/functional/sudocmd-del.html
@@ -0,0 +1,47 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
+<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="https://localhost/" />
+<title>Delete Sudo Command</title>
+</head>
+<body>
+<table cellpadding="1" cellspacing="1" border="1">
+<thead>
+<tr><td rowspan="1" colspan="3">Delete Sudo Command</td></tr>
+</thead><tbody>
+<tr>
+ <td>open</td>
+ <td>/ipa/ui/#navigation=1&amp;policy=2&amp;sudorule-entity=sudocmd</td>
+ <td></td>
+</tr>
+<tr>
+ <td>waitForElementPresent</td>
+ <td>//div[@id='sudorule']//span[@name='search']//input[@value='testsudocmd']</td>
+ <td></td>
+</tr>
+<tr>
+ <td>click</td>
+ <td>//div[@id='sudorule']//span[@name='search']//input[@value='testsudocmd']</td>
+ <td></td>
+</tr>
+<tr>
+ <td>click</td>
+ <td>//div[@id='sudorule']//div[@class='action-panel']//a[@title='Delete']</td>
+ <td></td>
+</tr>
+<tr>
+ <td>click</td>
+ <td>//button[@type='button']</td>
+ <td></td>
+</tr>
+<tr>
+ <td>waitForElementNotPresent</td>
+ <td>//div[@id='sudorule']//span[@name='search']//input[@value='testsudocmd']</td>
+ <td></td>
+</tr>
+
+</tbody></table>
+</body>
+</html>
diff --git a/install/ui/test/functional/sudocmd-find.html b/install/ui/test/functional/sudocmd-find.html
new file mode 100644
index 00000000..358e34bd
--- /dev/null
+++ b/install/ui/test/functional/sudocmd-find.html
@@ -0,0 +1,72 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
+<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="https://localhost/" />
+<title>Search Sudo Command</title>
+</head>
+<body>
+<table cellpadding="1" cellspacing="1" border="1">
+<thead>
+<tr><td rowspan="1" colspan="3">Search Sudo Command</td></tr>
+</thead><tbody>
+<tr>
+ <td>open</td>
+ <td>/ipa/ui/#navigation=1&amp;policy=2&amp;sudorule-entity=sudocmd</td>
+ <td></td>
+</tr>
+<tr>
+ <td>waitForElementPresent</td>
+ <td>//div[@id='sudorule']//span[@name='search']//input[@value='testsudocmd']</td>
+ <td></td>
+</tr>
+<tr>
+ <td>type</td>
+ <td>search-sudocmd-filter</td>
+ <td>test</td>
+</tr>
+<tr>
+ <td>click</td>
+ <td>link=Find</td>
+ <td></td>
+</tr>
+<tr>
+ <td>waitForElementPresent</td>
+ <td>//div[@id='sudorule']//span[@name='search']//input[@value='testsudocmd']</td>
+ <td></td>
+</tr>
+<tr>
+ <td>type</td>
+ <td>search-sudocmd-filter</td>
+ <td>xxx</td>
+</tr>
+<tr>
+ <td>click</td>
+ <td>link=Find</td>
+ <td></td>
+</tr>
+<tr>
+ <td>waitForElementNotPresent</td>
+ <td>//div[@id='sudorule']//span[@name='search']//input[@value='testsudocmd']</td>
+ <td></td>
+</tr>
+<tr>
+ <td>type</td>
+ <td>search-sudocmd-filter</td>
+ <td></td>
+</tr>
+<tr>
+ <td>click</td>
+ <td>//div[@id='sudorule']/span/div[1]/span[1]/a/span</td>
+ <td></td>
+</tr>
+<tr>
+ <td>waitForElementPresent</td>
+ <td>//div[@id='sudorule']//span[@name='search']//input[@value='testsudocmd']</td>
+ <td></td>
+</tr>
+
+</tbody></table>
+</body>
+</html>
diff --git a/install/ui/test/functional/sudocmd-mod.html b/install/ui/test/functional/sudocmd-mod.html
new file mode 100644
index 00000000..69d4a953
--- /dev/null
+++ b/install/ui/test/functional/sudocmd-mod.html
@@ -0,0 +1,77 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
+<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="https://localhost/" />
+<title>Edit Sudo Command</title>
+</head>
+<body>
+<table cellpadding="1" cellspacing="1" border="1">
+<thead>
+<tr><td rowspan="1" colspan="3">Edit Sudo Command</td></tr>
+</thead><tbody>
+<tr>
+ <td>open</td>
+ <td>/ipa/ui/#navigation=1&amp;policy=2&amp;sudorule-entity=sudocmd</td>
+ <td></td>
+</tr>
+<tr>
+ <td>waitForElementPresent</td>
+ <td>//div[@id='sudorule']//span[@name='search']//input[@value='testsudocmd']</td>
+ <td></td>
+</tr>
+<tr>
+ <td>click</td>
+ <td>link=testsudocmd</td>
+ <td></td>
+</tr>
+<tr>
+ <td>waitForTextPresent</td>
+ <td>testsudocmd:</td>
+ <td></td>
+</tr>
+<tr>
+ <td>type</td>
+ <td>description</td>
+ <td></td>
+</tr>
+<tr>
+ <td>typeKeys</td>
+ <td>description</td>
+ <td>xxx</td>
+</tr>
+<tr>
+ <td>click</td>
+ <td>link=Update</td>
+ <td></td>
+</tr>
+<tr>
+ <td>waitForTextNotPresent</td>
+ <td>undo</td>
+ <td></td>
+</tr>
+<tr>
+ <td>type</td>
+ <td>description</td>
+ <td></td>
+</tr>
+<tr>
+ <td>typeKeys</td>
+ <td>description</td>
+ <td>Test Sudo Command</td>
+</tr>
+<tr>
+ <td>click</td>
+ <td>link=Update</td>
+ <td></td>
+</tr>
+<tr>
+ <td>waitForTextNotPresent</td>
+ <td>undo</td>
+ <td></td>
+</tr>
+
+</tbody></table>
+</body>
+</html>
diff --git a/install/ui/test/functional/sudocmd-suite.html b/install/ui/test/functional/sudocmd-suite.html
new file mode 100644
index 00000000..2b42c7e4
--- /dev/null
+++ b/install/ui/test/functional/sudocmd-suite.html
@@ -0,0 +1,17 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
+<head>
+ <meta content="text/html; charset=UTF-8" http-equiv="content-type" />
+ <title>Test Suite</title>
+</head>
+<body>
+<table id="suiteTable" cellpadding="1" cellspacing="1" border="1" class="selenium"><tbody>
+<tr><td><b>Test Suite</b></td></tr>
+<tr><td><a href="sudocmd-add.html">Add Sudo Command</a></td></tr>
+<tr><td><a href="sudocmd-find.html">Search Sudo Command</a></td></tr>
+<tr><td><a href="sudocmd-mod.html">Edit Sudo Command</a></td></tr>
+<tr><td><a href="sudocmd-del.html">Delete Sudo Command</a></td></tr>
+</tbody></table>
+</body>
+</html>