2 /* vim: set expandtab sw=4 ts=4 sts=4: */
4 * Selenium TestCase for privilege related tests
6 * @package phpMyAdmin-test
9 require_once('PmaSeleniumTestCase.php');
12 class PmaSeleniumPrivilegesTest
extends PmaSeleniumTestCase
14 public function testChangePassword()
17 $this->selectFrame("frame_content");
18 $this->click("link=Change password");
19 $this->waitForPageToLoad("30000");
21 $this->assertEquals("", $this->getValue("text_pma_pw"));
22 } catch (PHPUnit_Framework_AssertionFailedError
$e) {
23 array_push($this->verificationErrors
, $e->toString());
26 $this->assertEquals("", $this->getValue("text_pma_pw2"));
27 } catch (PHPUnit_Framework_AssertionFailedError
$e) {
28 array_push($this->verificationErrors
, $e->toString());
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(""));