indentation refactored
This commit is contained in:
parent
d5c3f91daa
commit
6ff5e7fe7f
@ -26,13 +26,13 @@ class AllSeleniumTests
|
||||
|
||||
public static function suite()
|
||||
{
|
||||
$suite = new PHPUnit_Extensions_SeleniumTestSuite('phpMyAdmin');
|
||||
$suite = new PHPUnit_Extensions_SeleniumTestSuite('phpMyAdmin');
|
||||
|
||||
$suite->addTestSuite('PmaSeleniumLoginTest');
|
||||
$suite->addTestSuite('PmaSeleniumXssTest');
|
||||
$suite->addTestSuite('PmaSeleniumPrivilegesTest');
|
||||
$suite->addTestSuite('PmaSeleniumCreateDropDatabaseTest');
|
||||
return $suite;
|
||||
$suite->addTestSuite('PmaSeleniumLoginTest');
|
||||
$suite->addTestSuite('PmaSeleniumXssTest');
|
||||
$suite->addTestSuite('PmaSeleniumPrivilegesTest');
|
||||
$suite->addTestSuite('PmaSeleniumCreateDropDatabaseTest');
|
||||
return $suite;
|
||||
}
|
||||
}
|
||||
?>
|
||||
@ -21,19 +21,19 @@ class PmaSeleniumCreateDropDatabaseTest extends PHPUnit_Extensions_SeleniumTestC
|
||||
|
||||
public function testCreateDropDatabase()
|
||||
{
|
||||
$log = new PmaSeleniumTestCase($this);
|
||||
$dbname = "pma_testdb".time();
|
||||
$log->login(TESTSUITE_USER, TESTSUITE_PASSWORD);
|
||||
$this->click("link=Databases");
|
||||
$this->waitForElementPresent("id=text_create_db");
|
||||
$this->type("id=text_create_db", $dbname);
|
||||
$this->click("id=buttonGo");
|
||||
$this->waitForElementPresent("css=span.ajax_notification");
|
||||
$this->assertElementPresent("css=span.ajax_notification div.success");
|
||||
$this->click("xpath=(//input[@name='selected_dbs[]'])[@value='".$dbname."']");
|
||||
$this->click("css=button.mult_submit.ajax");
|
||||
$this->click("css=button:contains('OK')");
|
||||
$this->waitForElementPresent("css=span.ajax_notification");
|
||||
$this->assertElementPresent("css=span.ajax_notification div.success");
|
||||
$log = new PmaSeleniumTestCase($this);
|
||||
$dbname = "pma_testdb".time();
|
||||
$log->login(TESTSUITE_USER, TESTSUITE_PASSWORD);
|
||||
$this->click("link=Databases");
|
||||
$this->waitForElementPresent("id=text_create_db");
|
||||
$this->type("id=text_create_db", $dbname);
|
||||
$this->click("id=buttonGo");
|
||||
$this->waitForElementPresent("css=span.ajax_notification");
|
||||
$this->assertElementPresent("css=span.ajax_notification div.success");
|
||||
$this->click("xpath=(//input[@name='selected_dbs[]'])[@value='".$dbname."']");
|
||||
$this->click("css=button.mult_submit.ajax");
|
||||
$this->click("css=button:contains('OK')");
|
||||
$this->waitForElementPresent("css=span.ajax_notification");
|
||||
$this->assertElementPresent("css=span.ajax_notification div.success");
|
||||
}
|
||||
}
|
||||
|
||||
@ -23,21 +23,21 @@ class PmaSeleniumPrivilegesTest extends PHPUnit_Extensions_SeleniumTestCase
|
||||
$log = new PmaSeleniumTestCase($this);
|
||||
$log->login(TESTSUITE_USER, TESTSUITE_PASSWORD);
|
||||
$this->click("link=Change password");
|
||||
$this->waitForElementPresent("id=change_password_anchor");
|
||||
$this->waitForElementPresent("id=change_password_anchor");
|
||||
try {
|
||||
$this->waitForElementPresent("id=text_pma_pw");
|
||||
$this->waitForElementPresent("id=text_pma_pw");
|
||||
$this->assertEquals("", $this->getValue("text_pma_pw"));
|
||||
} catch (PHPUnit_Framework_AssertionFailedError $e) {
|
||||
array_push($this->verificationErrors, $e->toString());
|
||||
}
|
||||
try {
|
||||
$this->waitForElementPresent("id=text_pma_pw2");
|
||||
$this->waitForElementPresent("id=text_pma_pw2");
|
||||
$this->assertEquals("", $this->getValue("text_pma_pw2"));
|
||||
} catch (PHPUnit_Framework_AssertionFailedError $e) {
|
||||
array_push($this->verificationErrors, $e->toString());
|
||||
}
|
||||
try {
|
||||
$this->waitForElementPresent("id=generated_pw");
|
||||
$this->waitForElementPresent("id=generated_pw");
|
||||
$this->assertEquals("", $this->getValue("generated_pw"));
|
||||
} catch (PHPUnit_Framework_AssertionFailedError $e) {
|
||||
array_push($this->verificationErrors, $e->toString());
|
||||
@ -47,17 +47,17 @@ class PmaSeleniumPrivilegesTest extends PHPUnit_Extensions_SeleniumTestCase
|
||||
$this->assertNotEquals("", $this->getValue("text_pma_pw2"));
|
||||
$this->assertNotEquals("", $this->getValue("generated_pw"));
|
||||
|
||||
if(TESTSUITE_PASSWORD!=""){
|
||||
$this->type("text_pma_pw",TESTSUITE_PASSWORD);
|
||||
if(TESTSUITE_PASSWORD!=""){
|
||||
$this->type("text_pma_pw",TESTSUITE_PASSWORD);
|
||||
$this->type("text_pma_pw2",TESTSUITE_PASSWORD);
|
||||
$this->click("css=button:contains('Go')");
|
||||
}else{
|
||||
$this->click("id=nopass_1");
|
||||
$this->click("css=button:contains('Go')");
|
||||
}
|
||||
$this->click("css=button:contains('Go')");
|
||||
}else{
|
||||
$this->click("id=nopass_1");
|
||||
$this->click("css=button:contains('Go')");
|
||||
}
|
||||
|
||||
$this->waitForElementPresent("id=result_query");
|
||||
$this->assertTrue($this->isTextPresent("The profile has been updated."));
|
||||
$this->waitForElementPresent("id=result_query");
|
||||
$this->assertTrue($this->isTextPresent("The profile has been updated."));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user