diff options
author | William Desportes <williamdes@wdes.fr> | 2020-06-10 00:47:00 +0300 |
---|---|---|
committer | William Desportes <williamdes@wdes.fr> | 2020-06-10 02:27:22 +0300 |
commit | ba5d6492c2bc9dcedcd5f06b778feda751bba26a (patch) | |
tree | 572f3fcb359d3192953ad887604bdf2f5935fd2a /test/selenium | |
parent | 03dddcc2cc157c57c649d9fd89300a698f25a14d (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.php | 15 |
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(); |