Replies: 2 comments
-
This seems unrelated to Gatsby? |
Beta Was this translation helpful? Give feedback.
-
I am not sure. It could definitely be a Cypress issue, but after careful consideration I feel that the preponderance of the evidence points toward Gatsby since the latter is ultimately handling the page rendering and therefore keeping the elements attributes in order. It is worth noting that, crucially, I have seen the mis-assigned element attributes at least once totally outside of Cypress, just in a normal Chrome window. It is the same elements mentioned in the issue. This strongly points toward Gatsby instead of Cypress. I'd also like to point out that the elements with mis-assigned attributes are the ones with (at least initially) the same field names as the corresponding fields in the sign in page. That is, |
Beta Was this translation helpful? Give feedback.
-
Description
I am deploying a Gatsby app with AWS Amplify and using AWS Cognito for user authentication. My login form works as expected when manually using the site. However, when I run a Cypress e2e test, the console displays the following on page load:
And then form submission action results in
NoUserPoolError: Authentication Error
.To make things stranger, when I manually enter the very same credentials into the test runner Chrome browser, login succeeds!
Steps to reproduce
I built this with https://github.com/dabit3/gatsby-auth-starter-aws-amplify as boilerplate. The Login page and functionality are mostly unchanged. My
package.json
is below:In my Cypress for the login page, the following code leads to the error:
Expected result
AWS Cognito authentication should succeed.
Actual result
AWS Cognito authentication fails.
Environment
Beta Was this translation helpful? Give feedback.
All reactions