From 03e94b56d7cf0fb89c908c6a825505d099f37aad Mon Sep 17 00:00:00 2001 From: Alex Date: Tue, 12 Nov 2024 23:20:55 +0200 Subject: [PATCH] Skip "testDragDropOntoHiddenItself" test on Selenium 2 + Firefox --- tests/WebdriverClassicConfig.php | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/tests/WebdriverClassicConfig.php b/tests/WebdriverClassicConfig.php index d293071..1cbf671 100644 --- a/tests/WebdriverClassicConfig.php +++ b/tests/WebdriverClassicConfig.php @@ -7,6 +7,7 @@ use Behat\Mink\Tests\Driver\Basic\HeaderTest; use Behat\Mink\Tests\Driver\Basic\StatusCodeTest; use Behat\Mink\Tests\Driver\Js\EventsTest; +use Behat\Mink\Tests\Driver\Js\JavascriptTest; use Behat\Mink\Tests\Driver\Js\WindowTest; use Mink\WebdriverClassicDriver\WebdriverClassicDriver; @@ -58,6 +59,21 @@ public function skipMessage($testCase, $test): ?string case $testCase === EventsTest::class && $test === 'testKeyboardEvents' && $this->isOldChrome(): return 'Old Chrome does not allow triggering events.'; + case $testCase === TimeoutTest::class && $this->getBrowserName() !== 'firefox': + if ($test === 'testDeprecatedShortPageLoadTimeoutThrowsException' && $this->isXvfb()) { + return 'Attempt to set page load timeout several times causes a freeze in this browser.'; + } + // no break + + case [JavascriptTest::class, 'testDragDropOntoHiddenItself'] === [$testCase, $test]: + $seleniumVersion = $_SERVER['SELENIUM_VERSION'] ?? null; + $browser = $_SERVER['WEB_FIXTURES_BROWSER'] ?? null; + + if ($seleniumVersion && version_compare($seleniumVersion, '3.0.0', '<') && $browser === 'firefox') { + return 'The Firefox browser compatible with Selenium Server 2.x doesn\'t fully implement drag-n-drop support.'; + } + // no break + default: return parent::skipMessage($testCase, $test); }