Test Editor

git-svn-id: https://adminer.svn.sourceforge.net/svnroot/adminer/trunk@904 7c3ca157-0c34-0410-bff1-cbf682f78f5c
This commit is contained in:
jakubvrana 2009-07-24 12:10:09 +00:00
parent e933baa29b
commit d1325f8673
7 changed files with 120 additions and 5 deletions

View file

@ -1,4 +1,6 @@
<?php
//! measure Editor
function xhtml_open_tags($s) {
// returns array of opened tags in $s
$return = array();

View file

@ -1,5 +1,5 @@
CREATE DATABASE cds COLLATE utf8_czech_ci;
USE cds;
CREATE DATABASE selenium COLLATE utf8_czech_ci;
USE selenium;
CREATE TABLE interprets (
id int NOT NULL auto_increment,

View file

@ -19,7 +19,7 @@ class Adminer {
function database() {
// will be escaped by Adminer
return 'cds';
return 'selenium';
}
function login($login, $password) {

View file

@ -61,9 +61,24 @@
<td>fields[1.1][length]</td>
<td>50</td>
</tr>
<tr>
<td>click</td>
<td>//input[@type='checkbox' and @onclick='column_comments_click(this.checked);']</td>
<td></td>
</tr>
<tr>
<td>type</td>
<td>fields[1.1][comment]</td>
<td>Interpret</td>
</tr>
<tr>
<td>type</td>
<td>Comment</td>
<td>Interprets</td>
</tr>
<tr>
<td>clickAndWait</td>
<td>//form[@id='form']/p[3]/input[2]</td>
<td>//input[@value='Save']</td>
<td></td>
</tr>
<tr>

77
tests/23-editor.html Normal file
View file

@ -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="" />
<title>Editor</title>
</head>
<body>
<table cellpadding="1" cellspacing="1" border="1">
<thead>
<tr><td rowspan="1" colspan="3">Editor</td></tr>
</thead><tbody>
<tr>
<td>open</td>
<td>/adminer/examples/editor-cds/?lang=en&amp;username=admin</td>
<td></td>
</tr>
<tr>
<td>click</td>
<td>link=Interprets</td>
<td></td>
</tr>
<tr>
<td>clickAndWait</td>
<td>link=New item</td>
<td></td>
</tr>
<tr>
<td>type</td>
<td>fields[interpret]</td>
<td>Michael Jackson</td>
</tr>
<tr>
<td>clickAndWait</td>
<td>//input[@value='Save']</td>
<td></td>
</tr>
<tr>
<td>clickAndWait</td>
<td>//div[@id='content']/form[2]/table/tbody/tr[1]/td[3]/a</td>
<td></td>
</tr>
<tr>
<td>clickAndWait</td>
<td>link=New item</td>
<td></td>
</tr>
<tr>
<td>select</td>
<td>fields[interpret]</td>
<td>label=Michael Jackson</td>
</tr>
<tr>
<td>type</td>
<td>fields[album]</td>
<td>Dangerous</td>
</tr>
<tr>
<td>click</td>
<td>//input[@value='Save']</td>
<td></td>
</tr>
<tr>
<td>verifyTextPresent</td>
<td>Item has been inserted.</td>
<td></td>
</tr>
<tr>
<td>clickAndWait</td>
<td>logout</td>
<td></td>
</tr>
</tbody></table>
</body>
</html>

View file

@ -66,9 +66,29 @@
<td>fields[1.11][length]</td>
<td>50</td>
</tr>
<tr>
<td>click</td>
<td>//input[@type='checkbox' and @onclick='column_comments_click(this.checked);']</td>
<td></td>
</tr>
<tr>
<td>type</td>
<td>fields[1.1][comment]</td>
<td>Interpret</td>
</tr>
<tr>
<td>type</td>
<td>fields[1.11][comment]</td>
<td>Album</td>
</tr>
<tr>
<td>type</td>
<td>Comment</td>
<td>Albums</td>
</tr>
<tr>
<td>clickAndWait</td>
<td>//form[@id='form']/p[3]/input[2]</td>
<td>//input[@value='Save']</td>
<td></td>
</tr>
<tr>

View file

@ -32,6 +32,7 @@
<tr><td><a href="21-variables.html">Variables</a></td></tr>
<tr><td><a href="22-history.html">History</a></td></tr>
<tr><td><a href="logout.html">Logout</a></td></tr>
<tr><td><a href="23-editor.html">Editor</a></td></tr>
</tbody></table>
</body>
</html>