-
Notifications
You must be signed in to change notification settings - Fork 163
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge remote-tracking branch 'origin/master' into bugfix/fix-dnd-on-s…
…elenium3
- Loading branch information
Showing
6 changed files
with
185 additions
and
19 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
services: | ||
selenium: | ||
image: ${SELENIUM_IMAGE:-selenium/standalone-chrome:4} | ||
hostname: selenium | ||
shm_size: 2g | ||
environment: | ||
VNC_NO_PASSWORD: 1 | ||
SCREEN_WIDTH: 1024 | ||
SCREEN_HEIGHT: 768 | ||
volumes: | ||
- /dev/shm:/dev/shm | ||
- ./vendor/mink/driver-testsuite/web-fixtures:/fixtures | ||
ports: | ||
- "4444:4444" | ||
# VNC Web Viewer port (new images) | ||
- "7900:7900" | ||
# VNC Server port (old "-debug" images) | ||
- "5900:5900" | ||
extra_hosts: | ||
- host.docker.internal:host-gateway |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
<?php | ||
|
||
namespace Behat\Mink\Tests\Driver\Custom; | ||
|
||
use Behat\Mink\Exception\DriverException; | ||
use Behat\Mink\Tests\Driver\Selenium2Config; | ||
use Behat\Mink\Tests\Driver\TestCase; | ||
|
||
final class SeleniumSupportTest extends TestCase | ||
{ | ||
public function testDriverCannotBeUsedInUnsupportedSelenium(): void | ||
{ | ||
if (Selenium2Config::getInstance()->isSeleniumVersionSupported()) { | ||
$this->markTestSkipped('This test applies to unsupported Selenium versions only.'); | ||
} | ||
|
||
$this->expectException(DriverException::class); | ||
$this->expectExceptionMessage('This driver requires Selenium version 3 or lower'); | ||
|
||
$this->createDriver()->start(); | ||
} | ||
|
||
public function testThatRightClickingCannotBeUsedInUnsupportedSelenium(): void | ||
{ | ||
if (Selenium2Config::getInstance()->isRightClickingInSeleniumSupported()) { | ||
$this->markTestSkipped('This test applies to Selenium 3 only.'); | ||
} | ||
|
||
$this->expectException(DriverException::class); | ||
$this->expectExceptionMessage(<<<TEXT | ||
Right-clicking via JsonWireProtocol is not possible on Selenium Server 3.x. | ||
Please use the "mink/webdriver-classic-driver" Mink driver or switch to Selenium Server 2.x. | ||
TEXT | ||
); | ||
|
||
$driver = $this->createDriver(); | ||
$driver->start(); | ||
$driver->rightClick('//'); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters