Merge remote branch 'origin/master'
[phpmyadmin/dkf.git] / test / PmaSeleniumPrivilegesTest.php
blob64ff25d10d0681a5198979ce01d94cc8d6c3f7e0
1 <?php
2 /* vim: set expandtab sw=4 ts=4 sts=4: */
3 /**
4 * Selenium TestCase for privilege related tests
6 * @package phpMyAdmin-test
7 */
9 require_once('PmaSeleniumTestCase.php');
12 class PmaSeleniumPrivilegesTest extends PmaSeleniumTestCase
14 public function testChangePassword()
16 $this->doLogin();
17 $this->selectFrame("frame_content");
18 $this->click("link=Change password");
19 $this->waitForPageToLoad("30000");
20 try {
21 $this->assertEquals("", $this->getValue("text_pma_pw"));
22 } catch (PHPUnit_Framework_AssertionFailedError $e) {
23 array_push($this->verificationErrors, $e->toString());
25 try {
26 $this->assertEquals("", $this->getValue("text_pma_pw2"));
27 } catch (PHPUnit_Framework_AssertionFailedError $e) {
28 array_push($this->verificationErrors, $e->toString());
30 try {
31 $this->assertEquals("", $this->getValue("generated_pw"));
32 } catch (PHPUnit_Framework_AssertionFailedError $e) {
33 array_push($this->verificationErrors, $e->toString());
35 $this->click("button_generate_password");
36 $this->assertNotEquals("", $this->getValue("text_pma_pw"));
37 $this->assertNotEquals("", $this->getValue("text_pma_pw2"));
38 $this->assertNotEquals("", $this->getValue("generated_pw"));
39 $this->type("text_pma_pw", $this->cfg['Test']['testuser']['password']);
40 $this->type("text_pma_pw2", $this->cfg['Test']['testuser']['password']);
41 $this->click("change_pw");
42 $this->waitForPageToLoad("30000");
43 $this->assertTrue($this->isTextPresent(""));
44 $this->assertTrue($this->isTextPresent(""));