diff options
author | William Desportes <williamdes@wdes.fr> | 2020-06-10 01:49:13 +0300 |
---|---|---|
committer | William Desportes <williamdes@wdes.fr> | 2020-06-10 02:27:22 +0300 |
commit | 43ea81bcc62038b216a1cd54c210b15e806fdabb (patch) | |
tree | 69bf7eec6366a57a9dbd709e01a25a00fdef0f6d /test/selenium | |
parent | 0052557b2b05fd39fa78a6aa8e5068f194fadca8 (diff) |
Some improvements on selenium tests for testDropColumns and import
Signed-off-by: William Desportes <williamdes@wdes.fr>
Diffstat (limited to 'test/selenium')
-rw-r--r-- | test/selenium/Database/ProceduresTest.php | 4 | ||||
-rw-r--r-- | test/selenium/ImportTest.php | 3 | ||||
-rw-r--r-- | test/selenium/Table/StructureTest.php | 6 |
3 files changed, 8 insertions, 5 deletions
diff --git a/test/selenium/Database/ProceduresTest.php b/test/selenium/Database/ProceduresTest.php index c893e0047f..2f9fa38264 100644 --- a/test/selenium/Database/ProceduresTest.php +++ b/test/selenium/Database/ProceduresTest.php @@ -250,10 +250,8 @@ class ProceduresTest extends TestBase * * @param string $text String to pass as inp param * @param int $length Expected output length - * - * @return void */ - private function executeProcedure($text, $length) + private function executeProcedure(string $text, int $length): void { $this->waitAjax(); $this->waitUntilElementIsVisible('partialLinkText', 'Execute', 30)->click(); diff --git a/test/selenium/ImportTest.php b/test/selenium/ImportTest.php index 0a46514cb7..c381f4d8de 100644 --- a/test/selenium/ImportTest.php +++ b/test/selenium/ImportTest.php @@ -7,6 +7,8 @@ declare(strict_types=1); namespace PhpMyAdmin\Tests\Selenium; +use function sleep; + /** * ImportTest class * @@ -134,6 +136,7 @@ class ImportTest extends TestBase $this->waitUntilElementIsVisible('id', 'buttonGo', 30); $this->byId('buttonGo')->click(); + sleep(2); $this->waitUntilElementIsVisible( 'xpath', "//div[@class='alert alert-success' and contains(., 'Import has been successfully')]", diff --git a/test/selenium/Table/StructureTest.php b/test/selenium/Table/StructureTest.php index 7d18d50bdd..c925bdc37a 100644 --- a/test/selenium/Table/StructureTest.php +++ b/test/selenium/Table/StructureTest.php @@ -124,8 +124,10 @@ class StructureTest extends TestBase { $this->waitForElement('cssSelector', 'label[for=checkbox_row_2]')->click(); $this->waitForElement('cssSelector', 'label[for=checkbox_row_3]')->click(); - $this->byXPath( - "//button[@name='submit_mult' and contains(., 'Drop')]" + $this->waitUntilElementIsPresent( + 'xpath', + '//button[contains(., "Drop")]', + 30 )->click(); $this->waitForElement( |