Skip to content

Commit

Permalink
Add chrome testing
Browse files Browse the repository at this point in the history
  • Loading branch information
alexpott committed Jul 23, 2024
1 parent 208739d commit 4c871fe
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 2 deletions.
9 changes: 7 additions & 2 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,12 @@ jobs:
matrix:
php: [ '8.1', '8.2', '8.3' ]
# 4.1.2-20220227 - last known working version of 4 where the modifications to this package weren't needed
selenium: ['4.1.2', 'latest']
selenium:
- image: 'selenium/standalone-firefox:4.1.2'
- image: 'selenium/standalone-firefox:latest'
- image: 'selenium/standalone-chrome:latest'
env: WEB_FIXTURES_BROWSER=chrome

fail-fast: false

steps:
Expand Down Expand Up @@ -80,7 +85,7 @@ jobs:
- name: Start Selenium
run: |
docker run --net host --name selenium --volume /dev/shm:/dev/shm --volume $GITHUB_WORKSPACE:$GITHUB_WORKSPACE -e SE_NODE_OVERRIDE_MAX_SESSIONS=true -e SE_NODE_MAX_SESSIONS=5 --shm-size 2g selenium/standalone-firefox:${{ matrix.selenium }} &> ./logs/selenium.log &
docker run --net host --name selenium --volume /dev/shm:/dev/shm --volume $GITHUB_WORKSPACE:$GITHUB_WORKSPACE -e SE_NODE_OVERRIDE_MAX_SESSIONS=true -e SE_NODE_MAX_SESSIONS=5 --shm-size 2g ${{ matrix.selenium.image }} &> ./logs/selenium.log &
- name: Wait for browser & PHP to start
run: |
Expand Down
8 changes: 8 additions & 0 deletions tests/Custom/DesiredCapabilitiesTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,14 @@

class DesiredCapabilitiesTest extends TestCase
{
protected function setUp(): void
{
$browser = getenv('WEB_FIXTURES_BROWSER') ?: 'firefox';
if ($browser !== 'firefox') {
$this->markTestSkipped('This test only works with Firefox');
}
}

public function testGetDesiredCapabilities()
{
$caps = array(
Expand Down

0 comments on commit 4c871fe

Please sign in to comment.