Skip to content

Commit

Permalink
Skip "testDragDropOntoHiddenItself" test on Selenium 2 + Firefox
Browse files Browse the repository at this point in the history
  • Loading branch information
aik099 committed Nov 11, 2024
1 parent db44be5 commit 5b6a608
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 0 deletions.
3 changes: 3 additions & 0 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,9 @@ jobs:
- name: Run tests
env:
SELENIUM_VERSION: ${{ matrix.selenium_version }}
DRIVER_URL: http://localhost:4444/wd/hub
WEB_FIXTURES_BROWSER: firefox
DRIVER_MACHINE_BASE_PATH: /fixtures/
run: |
vendor/bin/phpunit -v --coverage-clover=coverage.xml
Expand Down
12 changes: 12 additions & 0 deletions tests/Selenium2Config.php
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,18 @@ public function skipMessage($testCase, $test): ?string
return 'Checking status code is not supported.';
}

if (
'Behat\Mink\Tests\Driver\Js\JavascriptTest' === $testCase
&& 'testDragDropOntoHiddenItself' === $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.';
}
}

return parent::skipMessage($testCase, $test);
}

Expand Down

0 comments on commit 5b6a608

Please sign in to comment.