From 8163dc1c0b7b0d54d2aa3ecd02c63d3bd45a0340 Mon Sep 17 00:00:00 2001 From: Supun Nakandala Date: Sun, 10 Feb 2013 15:57:41 +0530 Subject: [PATCH 1/5] Existing selenium tests refactored s that they work with the latest revision.5 --- test/AllSeleniumTests.php | 9 +++-- test/selenium/Helper.php | 3 +- .../PmaSeleniumCreateDropDatabaseTest.php | 25 +++++++------- test/selenium/PmaSeleniumPrivilegesTest.php | 33 +++++++++++-------- test/selenium/PmaSeleniumTestCase.php | 2 +- test/selenium/PmaSeleniumXssTest.php | 5 ++- 6 files changed, 40 insertions(+), 37 deletions(-) diff --git a/test/AllSeleniumTests.php b/test/AllSeleniumTests.php index e1b6982a89..1aaa36b5a5 100644 --- a/test/AllSeleniumTests.php +++ b/test/AllSeleniumTests.php @@ -10,13 +10,12 @@ /** * */ -require_once 'PHPUnit/Framework.php'; require_once 'PHPUnit/TextUI/TestRunner.php'; require_once dirname(__FILE__).'/selenium/PmaSeleniumTestCase.php'; require_once dirname(__FILE__).'/selenium/PmaSeleniumLoginTest.php'; require_once dirname(__FILE__).'/selenium/PmaSeleniumXssTest.php'; require_once dirname(__FILE__).'/selenium/PmaSeleniumPrivilegesTest.php'; - +require_once dirname(__FILE__).'/selenium/PmaSeleniumCreateDropDatabaseTest.php'; class AllSeleniumTests { public static function main() @@ -27,13 +26,13 @@ class AllSeleniumTests public static function suite() { - $suite = new PHPUnit_Framework_TestSuite('phpMyAdmin'); + $suite = new PHPUnit_Extensions_SeleniumTestSuite('phpMyAdmin'); $suite->addTestSuite('PmaSeleniumLoginTest'); $suite->addTestSuite('PmaSeleniumXssTest'); $suite->addTestSuite('PmaSeleniumPrivilegesTest'); - $suite->addTestSuite('PmaSeleniumCreateDropDatabaseTest'); + $suite->addTestSuite('PmaSeleniumCreateDropDatabaseTest'); return $suite; } } -?> +?> \ No newline at end of file diff --git a/test/selenium/Helper.php b/test/selenium/Helper.php index 4146690f41..5d7058e897 100644 --- a/test/selenium/Helper.php +++ b/test/selenium/Helper.php @@ -26,8 +26,7 @@ class Helper public static function logOutIfLoggedIn($selenium) { if (self::isLoggedIn($selenium)) { - $selenium->selectFrame("frame_navigation"); - $selenium->clickAndWait("css=img.icon.ic_b_home"); + $selenium->clickAndWait("css=img.icon.ic_s_loggoff"); } } diff --git a/test/selenium/PmaSeleniumCreateDropDatabaseTest.php b/test/selenium/PmaSeleniumCreateDropDatabaseTest.php index d408158c39..cef59a4c7a 100644 --- a/test/selenium/PmaSeleniumCreateDropDatabaseTest.php +++ b/test/selenium/PmaSeleniumCreateDropDatabaseTest.php @@ -23,19 +23,18 @@ class PmaSeleniumCreateDropDatabaseTest extends PHPUnit_Extensions_SeleniumTestC { $log = new PmaSeleniumTestCase($this); $log->login(TESTSUITE_USER, TESTSUITE_PASSWORD); - $this->selectFrame("frame_content"); $this->click("link=Databases"); - $this->waitForPageToLoad("30000"); - $this->type("id=text_create_db", "pma"); - $this->click("id=buttonGo"); - $this->assertTrue($this->isTextPresent("pma")); - - $this->click("link=pma"); - $this->waitForPageToLoad("30000"); - $this->click("link=Operations"); - $this->waitForPageToLoad("30000"); - $this->click("id=drop_db_anchor"); - $this->click("//button[@type='button']"); - + sleep(10); + $this->type("id=text_create_db", "pma_testdb"); + $this->click("id=buttonGo"); + sleep(10); + $this->assertTrue($this->isTextPresent("pma_testdb")); + + $this->click("xpath=(//input[@name='selected_dbs[]'])[@value='pma_testdb']"); + $this->click("css=button.mult_submit.ajax"); + $this->click("//button[@type='button']"); + $this->click("css=img.icon.ic_b_home"); + sleep(10); + $this->assertFalse($this->isTextPresent("pma_testdb")); } } diff --git a/test/selenium/PmaSeleniumPrivilegesTest.php b/test/selenium/PmaSeleniumPrivilegesTest.php index 331b329c7e..251efc2133 100644 --- a/test/selenium/PmaSeleniumPrivilegesTest.php +++ b/test/selenium/PmaSeleniumPrivilegesTest.php @@ -22,9 +22,9 @@ class PmaSeleniumPrivilegesTest extends PHPUnit_Extensions_SeleniumTestCase { $log = new PmaSeleniumTestCase($this); $log->login(TESTSUITE_USER, TESTSUITE_PASSWORD); - $this->selectFrame("frame_content"); $this->click("link=Change password"); - $this->waitForPageToLoad("20000"); + $this->waitForCondition($this->isElementPresent("id=change_password_anchor")==TRUE,30000); + sleep(5); try { $this->assertEquals("", $this->getValue("text_pma_pw")); } catch (PHPUnit_Framework_AssertionFailedError $e) { @@ -40,16 +40,23 @@ class PmaSeleniumPrivilegesTest extends PHPUnit_Extensions_SeleniumTestCase } catch (PHPUnit_Framework_AssertionFailedError $e) { array_push($this->verificationErrors, $e->toString()); } - $this->click("button_generate_password"); - $this->assertNotEquals("", $this->getValue("text_pma_pw")); - $this->assertNotEquals("", $this->getValue("text_pma_pw2")); - $this->assertNotEquals("", $this->getValue("generated_pw")); - $this->type("text_pma_pw", TESTSUITE_PASSWORD); - $this->type("text_pma_pw2", TESTSUITE_PASSWORD); - $this->click("//button[@type='button']"); - $this->waitForPageToLoad("20000"); - $this->assertTrue($this->isTextPresent("")); - $this->assertTrue($this->isTextPresent("")); - } + $this->click("button_generate_password"); + $this->assertNotEquals("", $this->getValue("text_pma_pw")); + $this->assertNotEquals("", $this->getValue("text_pma_pw2")); + $this->assertNotEquals("", $this->getValue("generated_pw")); + + if(TESTSUITE_PASSWORD!=""){ + $this->type("text_pma_pw",TESTSUITE_PASSWORD); + $this->type("text_pma_pw2",TESTSUITE_PASSWORD); + $this->click("xpath=(//button[@type='button'])[1]"); + }else{ + $this->click("id=nopass_1"); + $this->click("xpath=(//button[@type='button'])[1]"); + } + + sleep(5); + $this->assertTrue($this->isTextPresent("The profile has been updated.")); + } } + ?> diff --git a/test/selenium/PmaSeleniumTestCase.php b/test/selenium/PmaSeleniumTestCase.php index 8f6ccbee23..9b224076c3 100644 --- a/test/selenium/PmaSeleniumTestCase.php +++ b/test/selenium/PmaSeleniumTestCase.php @@ -61,7 +61,7 @@ class PmaSeleniumTestCase public function isUnsuccessLogin() { $val = $this->_selenium->getValue('input_go'); - if ($this->_selenium->isElementPresent("//html/body/div/div[@class='error']")) { + if ($this->_selenium->isElementPresent("//html/body/div/div/div[@class='error']")) { return true; } else { return false; diff --git a/test/selenium/PmaSeleniumXssTest.php b/test/selenium/PmaSeleniumXssTest.php index 899700b1c2..fdf758a092 100644 --- a/test/selenium/PmaSeleniumXssTest.php +++ b/test/selenium/PmaSeleniumXssTest.php @@ -22,11 +22,10 @@ class PmaSeleniumXSSTest extends PHPUnit_Extensions_SeleniumTestCase { $log = new PmaSeleniumTestCase($this); $log->login(TESTSUITE_USER, TESTSUITE_PASSWORD); - $this->selectFrame("frame_content"); $this->click("link=SQL"); - $this->waitForPageToLoad("30000"); + sleep(10); $this->click("button_submit_query"); $this->assertAlert("Missing value in the form!"); } } -?> +?> \ No newline at end of file From fcefcc85172face2ffea5c1d2430440f8ea2ba3a Mon Sep 17 00:00:00 2001 From: Supun Nakandala Date: Sun, 10 Feb 2013 23:48:28 +0530 Subject: [PATCH 2/5] Further modified and removed php sleep calls --- .../PmaSeleniumCreateDropDatabaseTest.php | 19 +++++++++---------- test/selenium/PmaSeleniumPrivilegesTest.php | 12 +++++++----- test/selenium/PmaSeleniumTestCase.php | 3 +-- test/selenium/PmaSeleniumXssTest.php | 2 +- 4 files changed, 18 insertions(+), 18 deletions(-) diff --git a/test/selenium/PmaSeleniumCreateDropDatabaseTest.php b/test/selenium/PmaSeleniumCreateDropDatabaseTest.php index cef59a4c7a..264bd17195 100644 --- a/test/selenium/PmaSeleniumCreateDropDatabaseTest.php +++ b/test/selenium/PmaSeleniumCreateDropDatabaseTest.php @@ -22,19 +22,18 @@ 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"); - sleep(10); - $this->type("id=text_create_db", "pma_testdb"); + $this->waitForElementPresent("id=text_create_db"); + $this->type("id=text_create_db", $dbname); $this->click("id=buttonGo"); - sleep(10); - $this->assertTrue($this->isTextPresent("pma_testdb")); - - $this->click("xpath=(//input[@name='selected_dbs[]'])[@value='pma_testdb']"); + $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("//button[@type='button']"); - $this->click("css=img.icon.ic_b_home"); - sleep(10); - $this->assertFalse($this->isTextPresent("pma_testdb")); + $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 251efc2133..55dd2c2ed4 100644 --- a/test/selenium/PmaSeleniumPrivilegesTest.php +++ b/test/selenium/PmaSeleniumPrivilegesTest.php @@ -23,19 +23,21 @@ class PmaSeleniumPrivilegesTest extends PHPUnit_Extensions_SeleniumTestCase $log = new PmaSeleniumTestCase($this); $log->login(TESTSUITE_USER, TESTSUITE_PASSWORD); $this->click("link=Change password"); - $this->waitForCondition($this->isElementPresent("id=change_password_anchor")==TRUE,30000); - sleep(5); + $this->waitForElementPresent("id=change_password_anchor"); try { + $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->assertEquals("", $this->getValue("text_pma_pw2")); } catch (PHPUnit_Framework_AssertionFailedError $e) { array_push($this->verificationErrors, $e->toString()); } try { + $this->waitForElementPresent("id=generated_pw"); $this->assertEquals("", $this->getValue("generated_pw")); } catch (PHPUnit_Framework_AssertionFailedError $e) { array_push($this->verificationErrors, $e->toString()); @@ -48,13 +50,13 @@ class PmaSeleniumPrivilegesTest extends PHPUnit_Extensions_SeleniumTestCase if(TESTSUITE_PASSWORD!=""){ $this->type("text_pma_pw",TESTSUITE_PASSWORD); $this->type("text_pma_pw2",TESTSUITE_PASSWORD); - $this->click("xpath=(//button[@type='button'])[1]"); + $this->click("css=button:contains('Go')"); }else{ $this->click("id=nopass_1"); - $this->click("xpath=(//button[@type='button'])[1]"); + $this->click("css=button:contains('Go')"); } - sleep(5); + $this->waitForElementPresent("id=result_query"); $this->assertTrue($this->isTextPresent("The profile has been updated.")); } } diff --git a/test/selenium/PmaSeleniumTestCase.php b/test/selenium/PmaSeleniumTestCase.php index 9b224076c3..1a822b732f 100644 --- a/test/selenium/PmaSeleniumTestCase.php +++ b/test/selenium/PmaSeleniumTestCase.php @@ -60,8 +60,7 @@ class PmaSeleniumTestCase */ public function isUnsuccessLogin() { - $val = $this->_selenium->getValue('input_go'); - if ($this->_selenium->isElementPresent("//html/body/div/div/div[@class='error']")) { + if ($this->_selenium->isElementPresent("css=div.error")) { return true; } else { return false; diff --git a/test/selenium/PmaSeleniumXssTest.php b/test/selenium/PmaSeleniumXssTest.php index fdf758a092..f27aaca45d 100644 --- a/test/selenium/PmaSeleniumXssTest.php +++ b/test/selenium/PmaSeleniumXssTest.php @@ -23,7 +23,7 @@ class PmaSeleniumXSSTest extends PHPUnit_Extensions_SeleniumTestCase $log = new PmaSeleniumTestCase($this); $log->login(TESTSUITE_USER, TESTSUITE_PASSWORD); $this->click("link=SQL"); - sleep(10); + $this->waitForElementPresent("id=queryboxf"); $this->click("button_submit_query"); $this->assertAlert("Missing value in the form!"); } From d5c3f91daa576864077267447bad48d6fae243ba Mon Sep 17 00:00:00 2001 From: Supun Nakandala Date: Mon, 11 Feb 2013 22:35:43 +0530 Subject: [PATCH 3/5] indentation refactored --- test/AllSeleniumTests.php | 10 ++++---- .../PmaSeleniumCreateDropDatabaseTest.php | 24 +++++++++---------- 2 files changed, 17 insertions(+), 17 deletions(-) diff --git a/test/AllSeleniumTests.php b/test/AllSeleniumTests.php index 1aaa36b5a5..0823882a7a 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('PmaSeleniumLoginTest'); + $suite->addTestSuite('PmaSeleniumXssTest'); + $suite->addTestSuite('PmaSeleniumPrivilegesTest'); $suite->addTestSuite('PmaSeleniumCreateDropDatabaseTest'); - return $suite; + return $suite; } } ?> \ No newline at end of file diff --git a/test/selenium/PmaSeleniumCreateDropDatabaseTest.php b/test/selenium/PmaSeleniumCreateDropDatabaseTest.php index 264bd17195..106734c8bf 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"); + $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->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"); + $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"); } } From 6ff5e7fe7f18c4df220a58407d59744d25cb3683 Mon Sep 17 00:00:00 2001 From: Supun Nakandala Date: Mon, 11 Feb 2013 22:50:18 +0530 Subject: [PATCH 4/5] indentation refactored --- test/AllSeleniumTests.php | 12 ++++---- .../PmaSeleniumCreateDropDatabaseTest.php | 28 +++++++++---------- test/selenium/PmaSeleniumPrivilegesTest.php | 26 ++++++++--------- 3 files changed, 33 insertions(+), 33 deletions(-) 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.")); } } From baaefbe40edea8ab27e0f448be6f63f6b96a5a82 Mon Sep 17 00:00:00 2001 From: Supun Nakandala Date: Sat, 16 Feb 2013 10:16:44 +0530 Subject: [PATCH 5/5] Indentation corrected --- test/selenium/PmaSeleniumPrivilegesTest.php | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/test/selenium/PmaSeleniumPrivilegesTest.php b/test/selenium/PmaSeleniumPrivilegesTest.php index 8b0f56b1dd..40f45e3435 100644 --- a/test/selenium/PmaSeleniumPrivilegesTest.php +++ b/test/selenium/PmaSeleniumPrivilegesTest.php @@ -46,16 +46,16 @@ class PmaSeleniumPrivilegesTest extends PHPUnit_Extensions_SeleniumTestCase $this->assertNotEquals("", $this->getValue("text_pma_pw")); $this->assertNotEquals("", $this->getValue("text_pma_pw2")); $this->assertNotEquals("", $this->getValue("generated_pw")); - - if(TESTSUITE_PASSWORD!=""){ - $this->type("text_pma_pw",TESTSUITE_PASSWORD); - $this->type("text_pma_pw2",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{ + } 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.")); }