Skip to content

Commit

Permalink
Update test skipping
Browse files Browse the repository at this point in the history
  • Loading branch information
uuf6429 committed Jun 14, 2023
1 parent cc7683f commit 6196f75
Showing 1 changed file with 16 additions and 5 deletions.
21 changes: 16 additions & 5 deletions tests/WebdriverClassicConfig.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,8 @@

use Behat\Mink\Driver\DriverInterface;
use Behat\Mink\Tests\Driver\AbstractConfig;
use Behat\Mink\Tests\Driver\Basic\BasicAuthTest;
use Behat\Mink\Tests\Driver\Basic\HeaderTest;
use Behat\Mink\Tests\Driver\Basic\StatusCodeTest;
use Behat\Mink\Tests\Driver\Js\WindowTest;
use Mink\WebdriverClassDriver\WebdriverClassicDriver;

Expand Down Expand Up @@ -39,14 +40,24 @@ public function mapRemoteFilePath($file): string

public function skipMessage($testCase, $test): ?string
{
if ($testCase === BasicAuthTest::class && $test === 'testBasicAuthInUrl') {
return 'This driver has mixed support for basic auth modals, depending on browser type and selenium version.';
if (
$testCase === WindowTest::class
&& $test === 'testWindowMaximize'
&& getenv('GITHUB_ACTIONS') === 'true'
) {
return 'Maximizing the window does not work when running the browser in Xvfb.';
}

if ($testCase === WindowTest::class && $test === 'testWindowMaximize') {
return 'There is no sane way to find if a window is indeed maximized; this test is quite broken.';
if ($testCase === HeaderTest::class) {
return 'Headers are not supported.';
}

if ($testCase === StatusCodeTest::class) {
return 'Checking status code is not supported.';
}

// TODO skip event tests for old chrome

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

Expand Down

0 comments on commit 6196f75

Please sign in to comment.