Revert initial commit
[phpmyadmin/blinky.git] / test / PmaSeleniumPrivilegesTest.php
blob149f3ed7d5a1af0be59535df254b8c3796fa48e4
1 <?php
2 /* vim: set expandtab sw=4 ts=4 sts=4: */
3 /**
4 * Selenium TestCase for privilege related tests
6 * @version $Id$
7 * @package phpMyAdmin-test
8 */
10 require_once('PmaSeleniumTestCase.php');
13 class PmaSeleniumPrivilegesTest extends PmaSeleniumTestCase
15 public function testChangePassword()
17 $this->doLogin();
18 $this->selectFrame("frame_content");
19 $this->click("link=Change password");
20 $this->waitForPageToLoad("30000");
21 try {
22 $this->assertEquals("", $this->getValue("text_pma_pw"));
23 } catch (PHPUnit_Framework_AssertionFailedError $e) {
24 array_push($this->verificationErrors, $e->toString());
26 try {
27 $this->assertEquals("", $this->getValue("text_pma_pw2"));
28 } catch (PHPUnit_Framework_AssertionFailedError $e) {
29 array_push($this->verificationErrors, $e->toString());
31 try {
32 $this->assertEquals("", $this->getValue("generated_pw"));
33 } catch (PHPUnit_Framework_AssertionFailedError $e) {
34 array_push($this->verificationErrors, $e->toString());
36 $this->click("button_generate_password");
37 $this->assertNotEquals("", $this->getValue("text_pma_pw"));
38 $this->assertNotEquals("", $this->getValue("text_pma_pw2"));
39 $this->assertNotEquals("", $this->getValue("generated_pw"));
40 $this->type("text_pma_pw", $this->cfg['Test']['testuser']['password']);
41 $this->type("text_pma_pw2", $this->cfg['Test']['testuser']['password']);
42 $this->click("change_pw");
43 $this->waitForPageToLoad("30000");
44 $this->assertTrue($this->isTextPresent(""));
45 $this->assertTrue($this->isTextPresent(""));