Skip to content

Commit

Permalink
Some improvements on selenium tests for testDropColumns and import
Browse files Browse the repository at this point in the history
Signed-off-by: William Desportes <williamdes@wdes.fr>
  • Loading branch information
williamdes committed Jun 9, 2020
1 parent 0052557 commit 43ea81b
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 5 deletions.
4 changes: 1 addition & 3 deletions test/selenium/Database/ProceduresTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -250,10 +250,8 @@ function () {
*
* @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();
Expand Down
3 changes: 3 additions & 0 deletions test/selenium/ImportTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@

namespace PhpMyAdmin\Tests\Selenium;

use function sleep;

/**
* ImportTest class
*
Expand Down Expand Up @@ -134,6 +136,7 @@ private function doImport($type)
$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')]",
Expand Down
6 changes: 4 additions & 2 deletions test/selenium/Table/StructureTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -124,8 +124,10 @@ public function testDropColumns()
{
$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(
Expand Down

0 comments on commit 43ea81b

Please sign in to comment.