default:
  autoload:
    '': %paths.base%/../features/bootstrap
  suites:
    default:
      paths:
        - %paths.base%/../features
      contexts:
        # Base contexts
        - ActorContext
        - NextcloudTestServerContext:
            nextcloudTestServerHelper: NextcloudTestServerLocalApacheHelper

        - FeatureContext
        - FileListContext
        - FilesAppContext
        - LoginPageContext

        # Talk app contexts
        - ChatContext
        - ConversationInfoContext
        - ConversationListContext
        - ParticipantListContext
        - TalkAppContext

  extensions:
    Behat\MinkExtension:
      sessions:
        default:
          selenium2: ~
        John:
          selenium2: ~
        Jane:
          selenium2: ~

default:
  autoload:
    '': %paths.base%/../features/bootstrap
  suites:
    default:
      paths:
        - %paths.base%/../features
      contexts:
        # Base contexts
        - ActorContext
        - NextcloudTestServerContext:
            nextcloudTestServerHelper: NextcloudTestServerLocalApacheHelper

        - FeatureContext
        - FileListContext
        - FilesAppContext
        - LoginPageContext

        # Talk app contexts
        - ChatContext
        - ConversationInfoContext
        - ConversationListContext
        - ParticipantListContext
        - TalkAppContext

  extensions:
    Behat\MinkExtension:
      sessions:
        default:
          selenium2:
            wd_host: %selenium.server%
        John:
          selenium2:
            wd_host: %selenium.server%
        Jane:
          selenium2:
            wd_host: %selenium.server%

Set "wd_host" using the simulated "selenium.server" variable
Set "wd_host" using the simulated "selenium.server" variable

The "wd_host" parameter of Selenium2 sessions specify the URL used by
the Selenium driver to connect with the Selenium server. Thus, when the
Selenium server is at a different host or port than the default one (for
example, when run on Drone) the "wd_host" parameter must be set for each
of the Selenium2 sessions defined in "behat.yml".

Before, this was done by the "run-local.sh" script in the acceptance
tests of the server by extending the parameters from the "behat.yml"
file, but this prevented adding custom Selenium2 sessions in the
acceptance tests of apps (as "run-local.sh" had to know about those
sessions). To address that limitation now "run-local.sh" replaces the
simulated %selenium.server% variable by the appropriate value in the
"behat.yml" file used by the acceptance tests before Behat is run, and
thus the "wd_host" parameter must be explicitly included in all
Selenium2 sessions.

Note that the file that is modified is the one inside the Docker
container used to run the acceptance tests, so the original file is not
touched.

Signed-off-by: Daniel Calviño Sánchez <bd7629e975cc0e00ea7cda4ab6a120f2ee42ac1b@gmail.com>
