Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add support for specification of a preferred profile #1334

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

andrewnicols
Copy link
Contributor

In many situations it is desirable to have a specific profile that is
used when none is specified, however because of the way in which all
profiles inherit from the default profile, this is not currently
possible.

For example, if you have different MinkExtension configurations for a
range of different browsers, then each browser may only be specified in
its own profile. This works well, but often you will want to specify a
default browser configuration.

To achieve this you may think that you can set the Extension
configuration for your preferred browser into the default profile, but
this means that all other profiles will include this configuration, and
may not work as expected.

This change introduces the concept of a preferred profile, which is the
profile which will be used unless the --profile CLI argument is
provided to override it.

This means that if you have profiles for chrome, headlesschrome,
firefox, headlessfirefox, edge, and headlessedge, you can choose to
specify a preferred profile of headlesschrome, which will be used
unless you explicitly set the --profile argument when running behat.

@andrewnicols
Copy link
Contributor Author

The failures above seem to be reproducible against master, before my patch is applied.

@andrewnicols
Copy link
Contributor Author

Most of the tests are now passing with the exception of Scrutinizer. Not sure how best to solve that one.

Any chance of a review on this change?

@andrewnicols
Copy link
Contributor Author

Is there anything that I can do to help get this over the line?

It's a real cause of frustration for developers on our project.

@andrewnicols andrewnicols changed the title Add support for specification of a prefered profile Add support for specification of a preferred profile Jun 1, 2021
In many situations it is desirable to have a specific profile that is
used when none is specified, however because of the way in which all
profiles inherit from the `default` profile, this is not currently
possible.

For example, if you have different MinkExtension configurations for a
range of different browsers, then each browser may only be specified in
its own profile. This works well, but often you will want to specify a
default browser configuration.

To achieve this you may think that you can set the Extension
configuration for your preferred browser into the `default` profile, but
this means that all other profiles will include this configuration, and
may not work as expected.

This change introduces the concept of a preferred profile, which is the
profile which will be used unless the `--profile` CLI argument is
provided to override it.

This means that if you have profiles for chrome, headlesschrome,
firefox, headlessfirefox, edge, and headlessedge, you can choose to
specify a preferred profile of `headlesschrome`, which will be used
unless you explicitly set the `--profile` argument when running behat.
@andrewnicols
Copy link
Contributor Author

Hi @stof, @everzet, @ciaranmcnulty ,

I'm just wondering if there's any chance that we might see this merged at some point, or if there's anything that I can do to help things along.

All tests are passing, and there's a real and valid use-case for it.

Thanks

@andrewnicols
Copy link
Contributor Author

Pinging @stof, @ciaranmcnulty, @everzet again.

This issue has been sat waiting for attention for 5 months now. What can we do to help?

@ciaranmcnulty
Copy link
Contributor

Can you take the changelog entry out please? (I need to change the guidance on that)

I'm not sure about the use case - this is to avoid having to type --profile each time?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants