Skip to content

Commit

Permalink
[Matching] Add 'search' for forceUnknown (#692)
Browse files Browse the repository at this point in the history
* fix: add search to forceUnknown

* fix: remove inputtype
  • Loading branch information
dbajpeyi authored Oct 29, 2024
1 parent b1882f7 commit 3d6cd01
Show file tree
Hide file tree
Showing 8 changed files with 40 additions and 7 deletions.
2 changes: 1 addition & 1 deletion dist/autofill-debug.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion dist/autofill.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion src/Form/matching-config/matching-config-source.js
Original file line number Diff line number Diff line change
Expand Up @@ -265,7 +265,7 @@ const matchingConfiguration = {
// Swedish
'|lösenord',
skip: 'email|one-time|error|hint|^username$',
forceUnknown: 'captcha|mfa|2fa|two factor|otp|pin'
forceUnknown: 'search|captcha|mfa|2fa|two factor|otp|pin'
},
newPassword: {
match: 'new|re.?(enter|type)|repeat|update\\b'
Expand Down
2 changes: 1 addition & 1 deletion swift-package/Resources/assets/autofill-debug.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion swift-package/Resources/assets/autofill.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

31 changes: 31 additions & 0 deletions test-forms/google_password_manager_search.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
<div class="QJfW3">
<div class="rFrNMe L9di L3JtQc zKHdkd u3bW4e" jscontroller="pxq3x" jsaction="clickonly:KjsqPd; focus:Jt1EX; blur:fpfTEe; input:Lg5SV" jsshadow="" jsname="btrqz">
<div class="aCsJod oJeWuf">
<div class="aXBtI I0VJ4d Wic03c">
<span jsslot="" class="A37UZe qgcB3c iHd5yb">
<div class="VfPpkd-Bz112c-LgbsSe yHy1rc eT1oJ QDwDD mN1ivc BeY8ie" jscontroller="nKuFpb" jsaction="click:cOuCgd; mousedown:UX7yZ; mouseup:lbsD7e; mouseenter:tfO1Yc; mouseleave:JywGue; touchstart:p6p2H; touchmove:FwuNnf; touchend:yfqBxc; touchcancel:JMtRjd; focus:AHmuwe; blur:O22p3e; contextmenu:mg9Pef;mlnRJb:fLiPzd;" data-idom-class="yHy1rc eT1oJ QDwDD mN1ivc BeY8ie" style="--mdc-ripple-fg-size: 28px; --mdc-ripple-fg-scale: 1.7142857142857142; --mdc-ripple-left: 10px; --mdc-ripple-top: 10px;">
<div jsname="s3Eaab" class="VfPpkd-Bz112c-Jh9lGc"></div>
<i class="google-material-icons" aria-hidden="true">arrow_back</i><a class="WpHeLc VfPpkd-mRLv6" href="?ep=1&amp;f.sid=5221294659451512461" aria-label="Back" jsname="hSRGPd" data-focusid="6"></a>
<div class="VfPpkd-Bz112c-J1Ukfc-LhBDec"></div>
</div>
</span>
<div class="Xb9hP">
<input type="text" class="whsOnd zHQkBf" jsname="YPqjbf" autocomplete="off" tabindex="0" aria-label="Search passwords" aria-disabled="false" autofocus="" data-initial-value="" data-manual-scoring="unknown">
<div jsname="LwH6nd" class="ndJi5d snByac" aria-hidden="true">Search passwords</div>
</div>
<span jsslot="" class="A37UZe sxyYjd MQL3Ob">
<button class="VfPpkd-Bz112c-LgbsSe yHy1rc eT1oJ mN1ivc T7G6Pe FwqFJb" jscontroller="soHxf" jsaction="click:cOuCgd; mousedown:UX7yZ; mouseup:lbsD7e; mouseenter:tfO1Yc; mouseleave:JywGue; touchstart:p6p2H; touchmove:FwuNnf; touchend:yfqBxc; touchcancel:JMtRjd; focus:AHmuwe; blur:O22p3e; contextmenu:mg9Pef;mlnRJb:fLiPzd;" data-idom-class="yHy1rc eT1oJ mN1ivc T7G6Pe FwqFJb" jsname="pZn8Oc" aria-label="Clear search keyword.">
<div jsname="s3Eaab" class="VfPpkd-Bz112c-Jh9lGc"></div>
<div class="VfPpkd-Bz112c-J1Ukfc-LhBDec"></div>
<i class="google-material-icons" aria-hidden="true">close</i>
</button>
</span>
<div class="i9lrp mIZh1c"></div>
<div jsname="XmnwAc" class="OabDMe cXrdqd Y2Zypf" style="transform-origin: 146px center;"></div>
</div>
</div>
<div class="LXRPh">
<div jsname="ty6ygf" class="ovnfwe Is7Fhb"></div>
</div>
</div>
</div>
4 changes: 3 additions & 1 deletion test-forms/index.json
Original file line number Diff line number Diff line change
Expand Up @@ -545,5 +545,7 @@
{ "html": "malta-taxes-payment-form.html", "expectedFailures": ["expirationMonth", "expirationYear", "cardSecurityCode"] },
{ "html": "single-select-form.html" },
{ "html": "camelcamelcamel_login.html" },
{ "html": "accounts_oneplus_login.html"}
{ "html": "accounts_oneplus_login.html"},
{ "html": "google_password_manager_search.html"}

]

0 comments on commit 3d6cd01

Please sign in to comment.