-
Notifications
You must be signed in to change notification settings - Fork 280
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
Provide partial named selector that selects also the hidden fields #711
base: master
Are you sure you want to change the base?
Conversation
{ | ||
public function __construct() | ||
{ | ||
$this->registerReplacement('%notFieldTypeFilter%', "not(%buttonTypeFilter%)"); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Name doesn't really say that hidden fields are allowed.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
PartialNamedIncludingHiddenFieldsSelector
would be better?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No, I've meant notFieldTypeFilter
and buttonTypeFilter
doesn't mention hidden fields in any way.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Well, I cannot rename that because, in fact, I'm overriding there the existing %notFieldTypeFilter%
replacement.
@stof , what do you think about this PR? Searching for hidden fields doesn't look like something, that will fit into Mink purpose. |
I think we should even consider this as the default behaviour for "named_partial". I can provide a PR if you agree. |
A hidden field makes sense when you use a JS based driver, for example with https://github.com/jcalderonzumba/MinkPhantomJSDriver but I agree, per default, a browser user doesn't have the capability directly to do that. On the other hand, making it possible to test security related stuff, by also changing the hidden fields, could be made as a point. |
Sometime we have to search for hidden fields (
<input type="hidden" .../>
). Add this selector to be used for such cases.