blob: bc2e6eda07fc2ac0292a2086f51d44de0b820314 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
|
<?php
$test_title = 'Index tests';
if (isset($_GET['run'])) {
global $lang;
require('../config.test.php');
require('../testBuilder.class.php');
/**
* 1/ Create the unique index
* 2/ Drop the index
**/
$t = new TestBuilder($test_title,
'Create/Drop an unique Index'
);
$t->login($admin_user, $admin_user_pass);
/** 1 **/
$t->addComment('1. Create the unique index');
$t->clickAndWait("link={$lang['strdatabases']}");
$t->clickAndWait("link={$testdb}");
$t->clickAndWait("link={$lang['strschemas']}");
$t->clickAndWait('link=public');
$t->clickAndWait("link={$lang['strtables']}");
$t->clickAndWait('link=student');
$t->clickAndWait("link={$lang['strindexes']}");
$t->clickAndWait("link={$lang['strcreateindex']}");
$t->type('formIndexName', 'name_unique');
$t->addSelection('TableColumnList', 'label=name');
$t->click('add');
$t->clickAndWait("//input[@value='{$lang['strcreate']}']");
$t->assertText("//p[@class='message']", $lang['strindexcreated']);
/** 2 **/
$t->addComment('2. Cluster on the index');
$t->clickAndWait("link={$lang['strindexes']}");
$t->clickAndWait("//tr/td[text()='name_unique']/../td/a[text()='Cluster']");
$t->clickAndWait('cluster');
$t->assertText("//p[@class='message']", $lang['strclusteredgood'] . ' ' . $lang['stranalyzegood']);
/** 3 **/
$t->addComment('3. Drop the index');
$t->clickAndWait("link={$lang['strindexes']}");
$t->clickAndWait("//tr/td[text()='name_unique']/../td/a[text()='Drop']");
$t->click('cascade');
$t->clickAndWait('drop');
$t->assertText("//p[@class='message']", $lang['strindexdropped']);
$t->logout();
unset($t);
}
?>
|