summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChad Kieffer <chad@2tbsp.com>2008-12-18 07:00:47 +0000
committerChad Kieffer <chad@2tbsp.com>2008-12-18 07:00:47 +0000
commitaed68bfa9f68bfbc5df09135bec371b98a579671 (patch)
treed08d59223211a4a9e4e5f05ca11dfe8846c07835
parentc2598fe4d85f9c3b737ea40959f44bf04172eafa (diff)
I'm tired of clicking. Here are a few Selenium IDE tests.
-rw-r--r--core/tests/selenium/AddAlbum52
-rw-r--r--core/tests/selenium/AddComment52
-rw-r--r--core/tests/selenium/AddItem62
-rw-r--r--core/tests/selenium/Login47
4 files changed, 213 insertions, 0 deletions
diff --git a/core/tests/selenium/AddAlbum b/core/tests/selenium/AddAlbum
new file mode 100644
index 00000000..ccd4d0b7
--- /dev/null
+++ b/core/tests/selenium/AddAlbum
@@ -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="" />
+<title>AddAlbum</title>
+</head>
+<body>
+<table cellpadding="1" cellspacing="1" border="1">
+<thead>
+<tr><td rowspan="1" colspan="3">AddAlbum</td></tr>
+</thead><tbody>
+<tr>
+ <td>open</td>
+ <td>/index.php/albums/1</td>
+ <td></td>
+</tr>
+<tr>
+ <td>click</td>
+ <td>link=Add album</td>
+ <td></td>
+</tr>
+<tr>
+ <td>type</td>
+ <td>name</td>
+ <td>seleniumtest</td>
+</tr>
+<tr>
+ <td>type</td>
+ <td>title</td>
+ <td>Selenium Test Album</td>
+</tr>
+<tr>
+ <td>type</td>
+ <td>description</td>
+ <td>Test</td>
+</tr>
+<tr>
+ <td>click</td>
+ <td>//button[@type='button']</td>
+ <td></td>
+</tr>
+<tr>
+ <td>assertTextPresent</td>
+ <td>Selenium Test Album</td>
+ <td></td>
+</tr>
+
+</tbody></table>
+</body>
+</html>
diff --git a/core/tests/selenium/AddComment b/core/tests/selenium/AddComment
new file mode 100644
index 00000000..ca25b244
--- /dev/null
+++ b/core/tests/selenium/AddComment
@@ -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="" />
+<title>Add comment</title>
+</head>
+<body>
+<table cellpadding="1" cellspacing="1" border="1">
+<thead>
+<tr><td rowspan="1" colspan="3">Add comment</td></tr>
+</thead><tbody>
+<tr>
+ <td>open</td>
+ <td>/index.php/albums/1</td>
+ <td></td>
+</tr>
+<tr>
+ <td>clickAndWait</td>
+ <td>gPhotoID-2</td>
+ <td></td>
+</tr>
+<tr>
+ <td>type</td>
+ <td>gAuthor</td>
+ <td>Test</td>
+</tr>
+<tr>
+ <td>type</td>
+ <td>gEmail</td>
+ <td>test@gmail.com</td>
+</tr>
+<tr>
+ <td>type</td>
+ <td>gText</td>
+ <td>This is a selenium test comment.</td>
+</tr>
+<tr>
+ <td>click</td>
+ <td>//button[@type='submit']</td>
+ <td></td>
+</tr>
+<tr>
+ <td>assertTextPresent</td>
+ <td>This is a selenium test comment.</td>
+ <td></td>
+</tr>
+
+</tbody></table>
+</body>
+</html>
diff --git a/core/tests/selenium/AddItem b/core/tests/selenium/AddItem
new file mode 100644
index 00000000..741dff65
--- /dev/null
+++ b/core/tests/selenium/AddItem
@@ -0,0 +1,62 @@
+<?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="" />
+<title>AddItem</title>
+</head>
+<body>
+<table cellpadding="1" cellspacing="1" border="1">
+<thead>
+<tr><td rowspan="1" colspan="3">AddItem</td></tr>
+</thead><tbody>
+<tr>
+ <td>open</td>
+ <td>/index.php/albums/1</td>
+ <td></td>
+</tr>
+<tr>
+ <td>click</td>
+ <td>link=Add an item</td>
+ <td></td>
+</tr>
+<tr>
+ <td>type</td>
+ <td>name</td>
+ <td>seleniumitem.jpg</td>
+</tr>
+<tr>
+ <td>type</td>
+ <td>title</td>
+ <td>Selenium Item</td>
+</tr>
+<tr>
+ <td>type</td>
+ <td>description</td>
+ <td>Test item</td>
+</tr>
+<tr>
+ <td>type</td>
+ <td>file</td>
+ <td>/Users/ckieffer/Sites/gallery3.0/core/tests/images/DSC_0003.jpg</td>
+</tr>
+<tr>
+ <td>click</td>
+ <td>//button[@type='button']</td>
+ <td></td>
+</tr>
+<tr>
+ <td>click</td>
+ <td>link=X</td>
+ <td></td>
+</tr>
+<tr>
+ <td>assertTextPresent</td>
+ <td>Selenium Item</td>
+ <td></td>
+</tr>
+
+</tbody></table>
+</body>
+</html>
diff --git a/core/tests/selenium/Login b/core/tests/selenium/Login
new file mode 100644
index 00000000..20f161fb
--- /dev/null
+++ b/core/tests/selenium/Login
@@ -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="http://g3.local/" />
+<title>Login</title>
+</head>
+<body>
+<table cellpadding="1" cellspacing="1" border="1">
+<thead>
+<tr><td rowspan="1" colspan="3">Login</td></tr>
+</thead><tbody>
+<tr>
+ <td>open</td>
+ <td>/index.php/albums/1</td>
+ <td></td>
+</tr>
+<tr>
+ <td>click</td>
+ <td>gLoginLink</td>
+ <td></td>
+</tr>
+<tr>
+ <td>type</td>
+ <td>gName</td>
+ <td>admin</td>
+</tr>
+<tr>
+ <td>type</td>
+ <td>gPassword</td>
+ <td>admin</td>
+</tr>
+<tr>
+ <td>clickAndWait</td>
+ <td>//button[@type='button']</td>
+ <td></td>
+</tr>
+<tr>
+ <td>clickAndWait</td>
+ <td>gUserProfileLink</td>
+ <td></td>
+</tr>
+
+</tbody></table>
+</body>
+</html>