Provide partial named selector that selects also the hidden fields#711
Provide partial named selector that selects also the hidden fields#711claudiu-cristea wants to merge 1 commit intominkphp:masterfrom claudiu-cristea:master
Conversation
| { | ||
| public function __construct() | ||
| { | ||
| $this->registerReplacement('%notFieldTypeFilter%', "not(%buttonTypeFilter%)"); |
There was a problem hiding this comment.
Name doesn't really say that hidden fields are allowed.
There was a problem hiding this comment.
PartialNamedIncludingHiddenFieldsSelector would be better?
There was a problem hiding this comment.
No, I've meant notFieldTypeFilter and buttonTypeFilter doesn't mention hidden fields in any way.
There was a problem hiding this comment.
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.