Skip to content

Commit

Permalink
Skip tests
Browse files Browse the repository at this point in the history
  • Loading branch information
uuf6429 committed Dec 9, 2023
1 parent 90959b2 commit defcdc3
Showing 1 changed file with 9 additions and 3 deletions.
12 changes: 9 additions & 3 deletions tests/WebdriverClassicConfig.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
namespace Mink\WebdriverClassDriver\Tests;

use Behat\Mink\Driver\DriverInterface;
use Behat\Mink\Exception\DriverException;
use Behat\Mink\Tests\Driver\AbstractConfig;
use Behat\Mink\Tests\Driver\Basic\BasicAuthTest;
use Behat\Mink\Tests\Driver\Basic\HeaderTest;
Expand Down Expand Up @@ -41,7 +40,7 @@ public function mapRemoteFilePath($file): string
public function skipMessage($testCase, $test): ?string
{
switch (true) {
case $testCase === WindowTest::class && $test === 'testWindowMaximize' && $this->isXvfb():
case [$testCase, $test] === [WindowTest::class, 'testWindowMaximize'] && $this->isXvfb():
return 'Maximizing the window does not work when running the browser in Xvfb.';

case $testCase === BasicAuthTest::class:
Expand All @@ -53,9 +52,16 @@ public function skipMessage($testCase, $test): ?string
case $testCase === StatusCodeTest::class:
return 'Checking status code is not supported.';

case $testCase === EventsTest::class && $test === 'testKeyboardEvents' && $this->isOldChrome():
case [$testCase, $test] === [EventsTest::class, 'testKeyboardEvents'] && $this->isOldChrome():
return 'Old Chrome does not allow triggering events.';

case [$testCase, $test] === [EventsTest::class, 'testBlur']:
case [$testCase, $test] === [EventsTest::class, 'testFocus']:
return 'Focus/blur are not supported anymore.';

case [$testCase, $test] === [EventsTest::class, 'testKeyboardEvents']:
return 'Keyboard events are currently not supported.';

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

0 comments on commit defcdc3

Please sign in to comment.