Skip to content

Commit

Permalink
Disable test on old firefox
Browse files Browse the repository at this point in the history
  • Loading branch information
uuf6429 committed Nov 12, 2024
1 parent e384d12 commit d2165ab
Showing 1 changed file with 13 additions and 2 deletions.
15 changes: 13 additions & 2 deletions tests/WebdriverClassicConfig.php
Original file line number Diff line number Diff line change
Expand Up @@ -62,9 +62,9 @@ public function skipMessage($testCase, $test): ?string
return 'Old Chrome does not allow triggering events.';

case [$testCase, $test] === [TimeoutTest::class, 'testDeprecatedShortPageLoadTimeoutThrowsException']
&& in_array($this->getBrowserName(), ['chrome', 'chromium', 'edge'])
&& ($this->isChromiumBased() || $this->isOldFirefox())
&& $this->isXvfb():
return 'Attempt to set page load timeout several times causes a freeze in this browser.';
return 'Setting page load timeout several times causes a freeze in this browser.';

default:
return parent::skipMessage($testCase, $test);
Expand All @@ -86,4 +86,15 @@ private function isOldChrome(): bool
return getenv('WEB_FIXTURES_BROWSER') === 'chrome'
&& version_compare(getenv('SELENIUM_VERSION') ?: '', '3', '<');
}

private function isOldFirefox(): bool
{
return getenv('WEB_FIXTURES_BROWSER') === 'firefox'
&& version_compare(getenv('SELENIUM_VERSION') ?: '', '3', '<');
}

private function isChromiumBased(): bool
{
return in_array($this->getBrowserName(), ['chrome', 'chromium', 'edge']);
}
}

0 comments on commit d2165ab

Please sign in to comment.