<th>Test suite for PPA</th>
</tr>
<tr>
- <td><a href="intro.php">Create admin role</a></td>
+ <td><a href="intro.php">Create test's roles</a></td>
</tr>
<tr>
<td><a href="create_database.php">Create database</a></td>
<tr>
<td><a href="create_schema.php">Create schema</a></td>
</tr>
-<tr>
- <td><a href="drop_schema.php">Drop schema</a></td>
-</tr>
<tr>
<td><a href="create_domain.php">Create domain</a></td>
</tr>
<tr>
- <td><a href="table.php">Create / Drop tables</a></td>
+ <td><a href="table.php">Create/Drop tables</a></td>
</tr>
<tr>
<td><a href="sequence.php">Create/Alter/Drop sequence</a></td>
<td><a href="drop_column.php">Drop column</a></td>
</tr>
<tr>
- <td><a href="create_view.php">Create View</a></td>
+ <td><a href="create_view.php">Create/Alter View</a></td>
</tr>
<tr>
<td><a href="create_index.php">Create index</a></td>
<td><a href="drop_index.php">Drop index</a></td>
</tr>
<tr>
- <td><a href="drop_schema_bad.php">Drop schema fail</a></td>
+ <td><a href="drop_schema.php">Drop schema</a></td>
</tr>
+<!--tr>
+ <td><a href="drop_schema_bad.php">Drop schema fail</a></td>
+</tr-->
<!--tr>
<td><a href="drop_table.php">Drop table</a></td>
</tr-->
<td><a href="drop_database.php">Drop database</a></td>
</tr>
<tr>
- <td><a href="outro.php">Drop admin role</a></td>
+ <td><a href="outro.php">Drop test's roles</a></td>
</tr>
</table>
<?php
require('../../lang/recoded/english.php');
-$webUrl = 'http://boox/~ioguix/ppa/ppa.dev';
-$serverName = '8.3'; // one of your $conf['servers'][*]['desc'] in conf/config.inc/php
+$webUrl = 'http://guillaume/~guillaume/projects/ppa/ppa.sel';
+$serverName = 'pg8.1'; // one of your $conf['servers'][*]['desc'] in conf/config.inc/php
#deprecated $superuser = 'ppatests_super'; // according to your selenium/tests/data/config.sql
#deprecated $superpass = 'super'; // according to your selenium/tests/data/config.sql
$superuser = 'postgres'; //only use to create and drop the following admin role
$superpass = 'pgpass';
$admin_user = 'admin_user';
$admin_user_pass = 'super';
+$user = 'ppa_tests_user';
+$user_pass = 'ppa_tests_user_pass';
$testdb = 'ppatests_db';
?>
<body>
<table cellpadding="1" cellspacing="1" border="1">
<thead>
-<tr><td rowspan="1" colspan="3">Create a view</td></tr>
+<tr><td rowspan="1" colspan="3">Create/Alter a view</td></tr>
</thead><tbody>
<?php include('login.php') ?>
+<!-- CREATE -->
<tr>
<td>clickAndWait</td>
<td>link=<?php echo $lang['strdatabases'] ?></td>
<td>//p[@class='message']</td>
<td><?php echo $lang['strviewcreated'] ?></td>
</tr>
+<!-- ALTER -->
+<tr>
+ <td>clickAndWait</td>
+ <td>link=<?php echo $lang['strviews'] ?></td>
+ <td></td>
+</tr>
+<tr>
+ <td>clickAndWait</td>
+ <td>link=student_promo</td>
+ <td></td>
+</tr>
+<!--alter name-->
+<tr>
+ <td>clickAndWait</td>
+ <td>//ul[@class='navlink']/li/a[text()='<?php echo $lang['stralter'] ?>']</td>
+ <td></td>
+</tr>
+<tr>
+ <td>type</td>
+ <td>name</td>
+ <td>student_promo_renamed</td>
+</tr>
+<tr>
+ <td>clickAndWait</td>
+ <td>alter</td>
+ <td></td>
+</tr>
+<tr>
+ <td>assertText</td>
+ <td>//p[@class='message']</td>
+ <td><?php echo $lang['strviewaltered'] ?></td>
+</tr>
+<tr>
+ <td>assertText</td>
+ <td>//div[@class='trail']/descendant::a[@title='<?php echo $lang['strview'] ?>']/span[@class='label']</td>
+ <td>student_promo_renamed</td>
+</tr>
+<!--alter comment-->
+<tr>
+ <td>clickAndWait</td>
+ <td>//ul[@class='navlink']/li/a[text()='<?php echo $lang['stralter'] ?>']</td>
+ <td></td>
+</tr>
+<tr>
+ <td>type</td>
+ <td>comment</td>
+ <td>students and their promotion (altered)</td>
+</tr>
+<tr>
+ <td>clickAndWait</td>
+ <td>alter</td>
+ <td></td>
+</tr>
+<tr>
+ <td>assertText</td>
+ <td>//p[@class='message']</td>
+ <td><?php echo $lang['strviewaltered'] ?></td>
+</tr>
+<tr>
+ <td>assertText</td>
+ <td>//p[@class='comment']</td>
+ <td>students and their promotion (altered)</td>
+</tr>
+<!--alter schema-->
+<tr>
+ <td>clickAndWait</td>
+ <td>//ul[@class='navlink']/li/a[text()='<?php echo $lang['stralter'] ?>']</td>
+ <td></td>
+</tr>
+<tr>
+ <td>select</td>
+ <td>newschema</td>
+ <td>label=test_schema</td>
+</tr>
+<tr>
+ <td>clickAndWait</td>
+ <td>alter</td>
+ <td></td>
+</tr>
+<tr>
+ <td>assertText</td>
+ <td>//p[@class='message']</td>
+ <td><?php echo $lang['strviewaltered'] ?></td>
+</tr>
+<tr>
+ <td>assertText</td>
+ <td>//div[@class='trail']/descendant::a[@title='<?php echo $lang['strschema'] ?>']/span[@class='label']</td>
+ <td>test_schema</td>
+</tr>
+<!--alter owner-->
+<tr>
+ <td>clickAndWait</td>
+ <td>//ul[@class='navlink']/li/a[text()='<?php echo $lang['stralter'] ?>']</td>
+ <td></td>
+</tr>
+<tr>
+ <td>select</td>
+ <td>owner</td>
+ <td>label=<?php echo $user ?></td>
+</tr>
+<tr>
+ <td>clickAndWait</td>
+ <td>alter</td>
+ <td></td>
+</tr>
+<tr>
+ <td>assertText</td>
+ <td>//p[@class='message']</td>
+ <td><?php echo $lang['strviewaltered'] ?></td>
+</tr>
+<tr>
+ <td>clickAndWait</td>
+ <td>//div[@class='trail']/descendant::a[@title='<?php echo $lang['strschema'] ?>']/span[@class='label' and text()='test_schema']</td>
+ <td></td>
+</tr>
+<tr>
+ <td>clickAndWait</td>
+ <td>link=<?php echo $lang['strviews'] ?></td>
+ <td></td>
+</tr>
+<tr>
+ <td>assertText</td>
+ <td>//tr/td[1]/a[text()='student_promo_renamed']/../../td[2]</td>
+ <td><?php echo $user ?></td>
+</tr>
+<!--alter back to original: name, comment, schema & owner in the same time-->
+<tr>
+ <td>clickAndWait</td>
+ <td>link=student_promo_renamed</td>
+ <td></td>
+</tr>
+<tr>
+ <td>clickAndWait</td>
+ <td>//ul[@class='navlink']/li/a[text()='<?php echo $lang['stralter'] ?>']</td>
+ <td></td>
+</tr>
+<tr>
+ <td>select</td>
+ <td>owner</td>
+ <td>label=<?php echo $admin_user ?></td>
+</tr>
+<tr>
+ <td>type</td>
+ <td>name</td>
+ <td>student_promo</td>
+</tr>
+<tr>
+ <td>select</td>
+ <td>newschema</td>
+ <td>label=public</td>
+</tr>
+<tr>
+ <td>type</td>
+ <td>comment</td>
+ <td>students and their promotion</td>
+</tr>
+<tr>
+ <td>clickAndWait</td>
+ <td>alter</td>
+ <td></td>
+</tr>
+<tr>
+ <td>assertText</td>
+ <td>//p[@class='message']</td>
+ <td><?php echo $lang['strviewaltered'] ?></td>
+</tr>
+<tr>
+ <td>assertText</td>
+ <td>//p[@class='comment']</td>
+ <td>students and their promotion</td>
+</tr>
+<tr>
+ <td>assertText</td>
+ <td>//div[@class='trail']/descendant::a[@title='<?php echo $lang['strview'] ?>']/span[@class='label']</td>
+ <td>student_promo</td>
+</tr>
+<tr>
+ <td>clickAndWait</td>
+ <td>//div[@class='trail']/descendant::a[@title='<?php echo $lang['strschema'] ?>']/span[@class='label' and text()='public']</td>
+ <td></td>
+</tr>
+<tr>
+ <td>clickAndWait</td>
+ <td>link=<?php echo $lang['strviews'] ?></td>
+ <td></td>
+</tr>
+<tr>
+ <td>assertText</td>
+ <td>//tr/td[1]/a[text()='student_promo']/../../td[2]</td>
+ <td><?php echo $admin_user ?></td>
+</tr>
+
<?php include('logout.php'); ?>
</tbody></table>
</body>
<body>
<table cellpadding="1" cellspacing="1" border="1">
<thead>
-<tr><td rowspan="1" colspan="3">Drop a schema</td></tr>
+<tr><td rowspan="1" colspan="3">Fail to drop a schema, then actualy drop the test_schema</td></tr>
</thead><tbody>
<?php include('login.php') ?>
<tr>
<td>link=<?php echo $lang['strschemas'] ?></td>
<td></td>
</tr>
+<tr>
+ <td>clickAndWait</td>
+ <td>//tr/td/a[text()='public']/../../td/a[text()='<?php echo $lang['strdrop'] ?>']</td>
+ <td></td>
+</tr>
+<tr>
+ <td>clickAndWait</td>
+ <td>drop</td>
+ <td></td>
+</tr>
+<tr>
+ <td>assertText</td>
+ <td>//p[@class='message']</td>
+ <td><?php echo $lang['strschemadroppedbad'] ?></td>
+</tr>
+<tr>
+ <td>clickAndWait</td>
+ <td>link=<?php echo $lang['strschemas'] ?></td>
+ <td></td>
+</tr>
<tr>
<td>clickAndWait</td>
<td>//tr/td/a[text()='test_schema']/../../td/a[text()='<?php echo $lang['strdrop'] ?>']</td>
<td>//div[@class='topbar']/descendant::span[@class='username']</td>
<td><?php echo $admin_user ?></td>
</tr>
+<!-- create user role -->
+<tr>
+ <td>clickAndWait</td>
+ <td>link=<?php echo $lang['strroles'] ?></td>
+ <td></td>
+</tr>
+<tr>
+ <td>clickAndWait</td>
+ <td>link=<?php echo $lang['strcreaterole'] ?></td>
+ <td></td>
+</tr>
+<tr>
+ <td>type</td>
+ <td>formRolename</td>
+ <td><?php echo $user ?></td>
+</tr>
+<tr>
+ <td>type</td>
+ <td>formPassword</td>
+ <td><?php echo $user_pass ?></td>
+</tr>
+<tr>
+ <td>type</td>
+ <td>formConfirm</td>
+ <td><?php echo $user_pass ?></td>
+</tr>
+<tr>
+ <td>click</td>
+ <td>formCanLogin</td>
+ <td></td>
+</tr>
+<tr>
+ <td>clickAndWait</td>
+ <td>create</td>
+ <td></td>
+</tr>
+<tr>
+ <td>assertText</td>
+ <td>//p[@class='message']</td>
+ <td><?php echo $lang['strrolecreated'] ?></td>
+</tr>
<?php include('logout.php'); ?>
</tbody></table>
</body>
<body>
<table cellpadding="1" cellspacing="1" border="1">
<thead>
-<tr><td rowspan="1" colspan="3">Admin role try to drop himself, logout, then superuser actually drop him.</td></tr>
+<tr><td rowspan="1" colspan="3">Admin role try to drop himself, logout, then superuser actually drop him & normal user.</td></tr>
</thead><tbody>
<?php include('login.php') ?>
<tr>
<td>//p[@class='message']</td>
<td><?php echo $lang['strroledropped'] ?></td>
</tr>
+<tr>
+ <td>clickAndWait</td>
+ <td>//tr/td/a[text()='<?php echo $user ?>']/../../td/a[text()='<?php echo $lang['strdrop'] ?>']</td>
+ <td></td>
+</tr>
+<tr>
+ <td>clickAndWait</td>
+ <td>drop</td>
+ <td></td>
+</tr>
+<tr>
+ <td>assertText</td>
+ <td>//p[@class='message']</td>
+ <td><?php echo $lang['strroledropped'] ?></td>
+</tr>
<?php include('logout.php'); ?>
</tbody></table>
</body>