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