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

[FormAnalyzer] Don't flip scores on buttons with specific text #725

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

dbajpeyi
Copy link
Collaborator

@dbajpeyi dbajpeyi commented Dec 20, 2024

Reviewer: @GioSensation
Asana: https://app.asana.com/0/1200930669568058/1209022781094891/f

Description

Seems like we end up flipping the score on buttons with "Forgot password", causing to add signup score. This PR adds that check, and also includes test for "Stay signed in" because those are part of login forms too.

Steps to test

https://auth.wetransfer.com/login, https://freshdirect.com and revolut business break because of this (login becomes signup/generate password offered).

Score before:
image

Score after:
Screenshot 2024-12-20 at 13 27 31

@dbajpeyi dbajpeyi force-pushed the dbajpeyi/fix/wetransfer.com branch from e4e73dc to 6ef0308 Compare December 20, 2024 12:06
@dbajpeyi dbajpeyi marked this pull request as ready for review December 20, 2024 12:09
* @param {string} text
* @returns {boolean}
*/
shouldFlipScoreForButtonText(text) {
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I wanted to re-use this also for external link part, but that's a little bit different in terms of score strength. keeping it

@dbajpeyi dbajpeyi changed the title fix: don't flip scores on buttons with specific text [FormAnalyzer] Don't flip scores on buttons with specific text Dec 20, 2024
@dbajpeyi dbajpeyi force-pushed the dbajpeyi/fix/wetransfer.com branch from c66b884 to 5d2c6ca Compare December 20, 2024 16:11
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.

1 participant