diff --git a/tests/WebdriverClassicConfig.php b/tests/WebdriverClassicConfig.php index 51841ba..8059e2e 100644 --- a/tests/WebdriverClassicConfig.php +++ b/tests/WebdriverClassicConfig.php @@ -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); @@ -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']); + } }