diff --git a/test/AllSeleniumTests.php b/test/AllSeleniumTests.php index 0823882a7a..c9a27c3772 100644 --- a/test/AllSeleniumTests.php +++ b/test/AllSeleniumTests.php @@ -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; } } ?> \ No newline at end of file diff --git a/test/selenium/PmaSeleniumCreateDropDatabaseTest.php b/test/selenium/PmaSeleniumCreateDropDatabaseTest.php index 106734c8bf..fc4c847504 100644 --- a/test/selenium/PmaSeleniumCreateDropDatabaseTest.php +++ b/test/selenium/PmaSeleniumCreateDropDatabaseTest.php @@ -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"); } } diff --git a/test/selenium/PmaSeleniumPrivilegesTest.php b/test/selenium/PmaSeleniumPrivilegesTest.php index 55dd2c2ed4..8b0f56b1dd 100644 --- a/test/selenium/PmaSeleniumPrivilegesTest.php +++ b/test/selenium/PmaSeleniumPrivilegesTest.php @@ -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.")); } }