Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/phpmyadmin/phpmyadmin.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorWilliam Desportes <williamdes@wdes.fr>2020-06-10 00:47:00 +0300
committerWilliam Desportes <williamdes@wdes.fr>2020-06-10 02:27:22 +0300
commitba5d6492c2bc9dcedcd5f06b778feda751bba26a (patch)
tree572f3fcb359d3192953ad887604bdf2f5935fd2a /test/selenium
parent03dddcc2cc157c57c649d9fd89300a698f25a14d (diff)
Improve navigateTable and navigateDatabase selenium testbase methods
And fix navigateDatabase that did stop using the database parameter. Signed-off-by: William Desportes <williamdes@wdes.fr>
Diffstat (limited to 'test/selenium')
-rw-r--r--test/selenium/TestBase.php15
1 files changed, 6 insertions, 9 deletions
diff --git a/test/selenium/TestBase.php b/test/selenium/TestBase.php
index c751c21498..bc9ff4f0cc 100644
--- a/test/selenium/TestBase.php
+++ b/test/selenium/TestBase.php
@@ -935,13 +935,12 @@ abstract class TestBase extends TestCase
/**
* Navigates browser to a table page.
*
- * @param string $table Name of table
- *
- * @return void
+ * @param string $table Name of table
+ * @param bool $gotoHomepageRequired Go to homepage required
*/
- public function navigateTable($table)
+ public function navigateTable(string $table, bool $gotoHomepageRequired = false): void
{
- $this->navigateDatabase($this->database_name);
+ $this->navigateDatabase($this->database_name, $gotoHomepageRequired);
// go to table page
$this->waitForElement(
@@ -961,10 +960,8 @@ abstract class TestBase extends TestCase
*
* @param string $database Name of database
* @param bool $gotoHomepageRequired Go to homepage required
- *
- * @return void
*/
- public function navigateDatabase($database, $gotoHomepageRequired = false)
+ public function navigateDatabase(string $database, bool $gotoHomepageRequired = false): void
{
if ($gotoHomepageRequired) {
$this->gotoHomepage();
@@ -977,7 +974,7 @@ abstract class TestBase extends TestCase
// go to specific database page
$this->waitForElement(
'xpath',
- '//tr[(contains(@class, "db-row"))]//a[contains(., "' . $this->database_name . '")]'
+ '//tr[(contains(@class, "db-row"))]//a[contains(., "' . $database . '")]'
)->click();
$this->waitAjax();