diff options
author | William Desportes <williamdes@wdes.fr> | 2020-06-09 23:46:04 +0300 |
---|---|---|
committer | William Desportes <williamdes@wdes.fr> | 2020-06-10 02:27:22 +0300 |
commit | 03dddcc2cc157c57c649d9fd89300a698f25a14d (patch) | |
tree | bc7d55a303b95fc7a54ffd642dda8c2210cfe160 /test/selenium | |
parent | f8fde23f78ce3c333cad4c29c284a36be4fb5660 (diff) |
Fix selenium QueryByExample test by waiting more and using the right scrolls
Signed-off-by: William Desportes <williamdes@wdes.fr>
Diffstat (limited to 'test/selenium')
-rw-r--r-- | test/selenium/Database/QueryByExampleTest.php | 17 |
1 files changed, 9 insertions, 8 deletions
diff --git a/test/selenium/Database/QueryByExampleTest.php b/test/selenium/Database/QueryByExampleTest.php index e798a0043f..0e186a0da3 100644 --- a/test/selenium/Database/QueryByExampleTest.php +++ b/test/selenium/Database/QueryByExampleTest.php @@ -8,6 +8,7 @@ declare(strict_types=1); namespace PhpMyAdmin\Tests\Selenium\Database; use PhpMyAdmin\Tests\Selenium\TestBase; +use function sleep; use function trim; /** @@ -104,14 +105,12 @@ class QueryByExampleTest extends TestBase } */ - $this->scrollToBottom(); - /* Update Query in the editor */ - $this->byCssSelector('input[name=modify]')->click(); + $updateQueryButton = $this->byCssSelector('.tblFooters > input[name=modify]'); + $this->scrollToElement($updateQueryButton); + $updateQueryButton->click(); $this->waitAjax(); - $this->scrollToBottom(); - $expected = 'SELECT `test_table`.`id` AS `ID`, `test_table`.`val` AS `VAL`' . "\nFROM `test_table`" . "\nWHERE ((`test_table`.`id` > 1) AND (`test_table`.`val` < 6))" @@ -124,10 +123,12 @@ class QueryByExampleTest extends TestBase $actual ); - $this->scrollToBottom(); - /* Submit the query */ - $this->waitForElement('cssSelector', 'input[value="Submit query"]')->click(); + $submitButton = $this->waitForElement('cssSelector', '#tblQbeFooters > input[type=submit]'); + sleep(1); + $this->scrollToElement($submitButton); + sleep(1); + $submitButton->click(); $this->waitAjax(); $this->waitForElement('cssSelector', 'table.table_results'); |