forked from phpmyadmin/phpmyadmin
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathPmaSeleniumPrivilegesTest.php
More file actions
47 lines (44 loc) · 1.69 KB
/
Copy pathPmaSeleniumPrivilegesTest.php
File metadata and controls
47 lines (44 loc) · 1.69 KB
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
<?php
/* vim: set expandtab sw=4 ts=4 sts=4: */
/**
* Selenium TestCase for privilege related tests
*
* @package phpMyAdmin-test
*/
require_once('PmaSeleniumTestCase.php');
class PmaSeleniumPrivilegesTest extends PmaSeleniumTestCase
{
public function testChangePassword()
{
$this->doLogin();
$this->selectFrame("frame_content");
$this->click("link=Change password");
$this->waitForPageToLoad("30000");
try {
$this->assertEquals("", $this->getValue("text_pma_pw"));
} catch (PHPUnit_Framework_AssertionFailedError $e) {
array_push($this->verificationErrors, $e->toString());
}
try {
$this->assertEquals("", $this->getValue("text_pma_pw2"));
} catch (PHPUnit_Framework_AssertionFailedError $e) {
array_push($this->verificationErrors, $e->toString());
}
try {
$this->assertEquals("", $this->getValue("generated_pw"));
} catch (PHPUnit_Framework_AssertionFailedError $e) {
array_push($this->verificationErrors, $e->toString());
}
$this->click("button_generate_password");
$this->assertNotEquals("", $this->getValue("text_pma_pw"));
$this->assertNotEquals("", $this->getValue("text_pma_pw2"));
$this->assertNotEquals("", $this->getValue("generated_pw"));
$this->type("text_pma_pw", $this->cfg['Test']['testuser']['password']);
$this->type("text_pma_pw2", $this->cfg['Test']['testuser']['password']);
$this->click("change_pw");
$this->waitForPageToLoad("30000");
$this->assertTrue($this->isTextPresent(""));
$this->assertTrue($this->isTextPresent(""));
}
}
?>