robertfausk / behat-panther-extension

Run your behat tests in a headless chrome/firefox - Symfony Panther extension for Behat
https://packagist.org/packages/robertfausk/behat-panther-extension
Other
30 stars 5 forks source link

allow to pass kernel options and manager options to panther driver #6

Closed phcorp closed 3 years ago

phcorp commented 3 years ago

This fixes #5

PR on robertfausk/mink-panther-driver: https://github.com/robertfausk/mink-panther-driver/pull/20

Testing the pull-request

update your composer.json with following values :

{
    "repositories": [
        {
            "type": "vcs",
            "url": "https://github.com/phcorp/behat-panther-extension"
        },
        {
            "type": "vcs",
            "url": "https://github.com/phcorp/mink-panther-driver"
        }
    ],
    "require-dev": {
        "robertfausk/behat-panther-extension": "dev-feat/all-panther-options"
    }
}

and run $ composer update robertfausk/behat-panther-extension

update your behat.yaml, for instance:

default:
    extensions:
        Robertfausk\Behat\PantherExtension: ~
        Behat\MinkExtension:
            sessions:
                my_session:
                    panther:
                        options:
                            browser: 'chrome'
                        manager_options:
                            connection_timeout_in_ms: 5000
                            request_timeout_in_ms: 120000

then lanch your tests suites (e.g. APP_ENV=test bin/behat)

additional options should be taken into account

Merging

A new version of mink-panther-driver sould be released first (see https://github.com/robertfausk/mink-panther-driver/pull/20).

Commit https://github.com/robertfausk/behat-panther-extension/pull/6/commits/c717075fef6098e9fbc9230322d9b5551e75c5cd should be omitted before merging.

robertfausk commented 3 years ago

Merged in c163b73e85c93f4463a93d80ff21115fd68dfe64 as suggested without the composer repository workaround. Thank you @phcorp!

phcorp commented 3 years ago

Thank you! :)