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:
authorMaurício Meneghini Fauth <mauricio@fauth.dev>2022-11-09 22:42:41 +0300
committerMaurício Meneghini Fauth <mauricio@fauth.dev>2022-11-09 22:42:41 +0300
commit10a998bc8f73429a2cc72880291c692b55c32c8d (patch)
tree301fef963b6a895c1fbdfe9a128f4d107db015cf
parent77f9ebb61a9a7f03ddb184d6b5d3b51cc152c001 (diff)
Wait for plugins_options to be visible in Selenium\ExportTest
Signed-off-by: Maurício Meneghini Fauth <mauricio@fauth.dev>
-rw-r--r--test/selenium/ExportTest.php8
-rw-r--r--test/selenium/TestBase.php2
2 files changed, 9 insertions, 1 deletions
diff --git a/test/selenium/ExportTest.php b/test/selenium/ExportTest.php
index 5493feea7e..12a7d5c241 100644
--- a/test/selenium/ExportTest.php
+++ b/test/selenium/ExportTest.php
@@ -5,6 +5,7 @@ declare(strict_types=1);
namespace PhpMyAdmin\Tests\Selenium;
use function sleep;
+use function strtolower;
/**
* @coversNothing
@@ -153,12 +154,19 @@ class ExportTest extends TestBase
$this->scrollIntoView('radio_view_as_text');
$this->byCssSelector('label[for=radio_view_as_text]')->click();
+ $this->waitUntilElementIsVisible('id', 'format_specific_opts');
+ $this->scrollIntoView('format_specific_opts');
+ $this->waitUntilElementIsVisible('id', strtolower($plugin) . '_options');
+ $this->scrollIntoView(strtolower($plugin) . '_options');
+
if ($plugin === 'SQL') {
if ($type !== 'db') {
+ $this->waitUntilElementIsVisible('id', 'radio_sql_structure_or_data_structure_and_data');
$this->scrollIntoView('radio_sql_structure_or_data_structure_and_data');
$this->byCssSelector('label[for=radio_sql_structure_or_data_structure_and_data]')->click();
}
+ $this->waitUntilElementIsVisible('id', 'checkbox_sql_if_not_exists');
$this->scrollIntoView('checkbox_sql_if_not_exists');
$ele = $this->byId('checkbox_sql_if_not_exists');
if (! $ele->isSelected()) {
diff --git a/test/selenium/TestBase.php b/test/selenium/TestBase.php
index 076f21cbab..e683d540e3 100644
--- a/test/selenium/TestBase.php
+++ b/test/selenium/TestBase.php
@@ -765,7 +765,7 @@ abstract class TestBase extends TestCase
* @param string $arg Selector
* @param int $timeout Timeout in seconds
*/
- public function waitUntilElementIsVisible(string $func, string $arg, int $timeout): WebDriverElement
+ public function waitUntilElementIsVisible(string $func, string $arg, int $timeout = 10): WebDriverElement
{
$element = $this->webDriver->wait($timeout, 500)->until(
WebDriverExpectedCondition::visibilityOfElementLocated(WebDriverBy::$func($arg))