-
Notifications
You must be signed in to change notification settings - Fork 8
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
#2697 captcha to feedback from submission #2792
Conversation
…emoved captcha from feedback
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.
Sending emails and recaptcha works well 👍 I left some comments regarding code. It would be good to add some feedback for the user whether the feedback was sent successfully or not. You can use SnackbarAlert
component for this purpose. Also while testing I noticed that when there are some formik errors displayed in the feedback form after clicking "cancel" and opening the modal again the errors are still present. They should be reseted.
verification/curator-service/ui/src/components/FeedbackEmailDialog/index.tsx
Outdated
Show resolved
Hide resolved
verification/curator-service/ui/src/components/FeedbackEmailDialog/index.tsx
Outdated
Show resolved
Hide resolved
verification/curator-service/ui/src/components/Footer/index.tsx
Outdated
Show resolved
Hide resolved
verification/curator-service/ui/src/components/Footer/index.tsx
Outdated
Show resolved
Hide resolved
verification/curator-service/ui/src/components/Footer/styled.ts
Outdated
Show resolved
Hide resolved
verification/curator-service/ui/src/components/landing-page/SignInForm.tsx
Outdated
Show resolved
Hide resolved
verification/curator-service/ui/src/components/landing-page/SignUpForm.tsx
Show resolved
Hide resolved
Codecov Report
@@ Coverage Diff @@
## main #2792 +/- ##
==========================================
- Coverage 63.01% 58.64% -4.38%
==========================================
Files 18 116 +98
Lines 1214 4606 +3392
Branches 187 1243 +1056
==========================================
+ Hits 765 2701 +1936
- Misses 449 1905 +1456
Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here. |
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.
LGTM ✅
useState<boolean>(false); | ||
const [alertInformationMessage, setAlertInformationMessage] = | ||
useState<string>(''); | ||
const [alertInformationType, setAlertInformationType] = useState< |
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.
In cases like this you can also add all those state variables under one state object. This way you later have to only call setState
once providing all the values instead of three times
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.
Couple of possible secrets, otherwise looks good
@@ -218,7 +218,9 @@ describe('LandingPage', function () { | |||
cy.get('#password').type('tT$5aaaaak'); | |||
cy.get('#passwordConfirmation').type('tT$5aaaaak'); | |||
cy.get('#isAgreementChecked').check(); | |||
for (let i = 0; i < 5; i++) { | |||
for (let i = 0; i < 7; i++) { |
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.
why is the Sign-in button being clicked so many times?
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.
It is clicked so many times to trigger the login/register limiter that will be used after 4 unsuccessful attempts. I will change the number of clicks to the previous commit which is 5 times.
@@ -71,7 +71,9 @@ interface SignInFormProps { | |||
setRegistrationScreenOn: (active: boolean) => void; | |||
} | |||
|
|||
const RECAPTCHA_SITE_KEY = process.env.RECAPTCHA_SITE_KEY as string; | |||
const RECAPTCHA_SITE_KEY = window.Cypress | |||
? '6LeIxAcTAAAAAJcZVRqyHh71UMIEGNQ_MXjiZKhI' |
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.
is this supposed to be secret? not sure
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.
Thank you for your feedback! That's a great question. It is a ReCaptchas site-key for testing purposes which is available for all developers: https://developers.google.com/recaptcha/docs/faq#id-like-to-run-automated-tests-with-recaptcha.-what-should-i-do Since every developer have access to it and it is the same for everyone I didn't set it as a secret.
@@ -93,7 +92,9 @@ interface SignUpFormProps { | |||
setRegistrationScreenOn: (active: boolean) => void; | |||
} | |||
|
|||
const RECAPTCHA_SITE_KEY = process.env.RECAPTCHA_SITE_KEY as string; | |||
const RECAPTCHA_SITE_KEY = window.Cypress | |||
? '6LeIxAcTAAAAAJcZVRqyHh71UMIEGNQ_MXjiZKhI' |
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.
same here
Changes: