-
Notifications
You must be signed in to change notification settings - Fork 3.2k
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
Autofocused form field not typed into consistently #2973
Comments
Nevermind, the |
I'm going to guess that we're going to need a reproducible example in this case, as this likely has to do with things your application is doing under the hood. I'm thinking that perhaps during the Can you please provide a simple reproducible example of this happening? Try running in Electron locally. |
I've confirmed that this works both in Chrome and Electron for standard input (no React) with We use |
Off-topic: I tried to prepare a reproduction, but I ran into a huge mess trying to edit the React Todo MVC and quit. It'd be helpful to have better starting repos for reproduction and just playing around. Like:
It's always a bit painful to set things up when you just want to copy paste a few lines of JS from your source code to prepare a reproduction. I'll try again later. |
@Floriferous I am not sure what you are suggesting here. For us to make React + Cypress starter scaffolding? And Vue app + Cypress scaffolding? I would not want to maintain these, instead I would love every scaffolding author to add Cypress as an option. Like Vue CLI v3 did or Nx https://docs.cypress.io/plugins/index.html#framework-tooling |
Yes that scaffolding is exactly what I mean :) Sure it requires some work, and obviously it is in Cypress interest to be the "default" option when people start playing with JS frameworks, but that might be much more difficult to do, than to build a few cookie-cutter repos. I mention this, because material-ui is a good example of this, their issue template contains 2 links to codesandboxes where you can immediately get going with your reproduction (make it raw to see the commented links): I understand cypress doesn't fit inside a code-sandbox, but still it's very welcome :) From what I see on this repo and on other E2E frameworks' repos, you're getting a huge amount of tickets because the problem-space is so big. Making it easier for the people who come here to give you a reproduction isn't too bad of an objective imho! It'd be interesting to track the % of new issues that contain a reproduction and see how it evolves over time. As far as this issue is concerned, I fixed it by waiting for 2 seconds.. What happens in the test is as follows:
I'll close this! |
@Floriferous I would love to make providing a reproducible example easier for people opening issues. Looking at the material-ui issue templates, they are great - but also looking at their last 10 opened issues, only 4/10 of those used the provided issue template, which is similar to what we experience at Cypress.
I would be more enthusiastic about creating our own code sandboxes if this were not the case, but I do feel like the effort required to make it and maintain it may not be worth the gain at this stage. |
@jennifer-shehane I agree with you. Maybe our issue template could point at
As starting points? |
@jennifer-shehane That's very insightful data, cool! I do wonder if both repos have the same audience though, I wonder if material-ui has more beginner-type issues because it's one of the first packages you play with as you come to React. Whereas I would expect cypress to have a bit more experienced devs raising issues? I can tell from my experience that the more experienced I become, the more reproductions I provide, because it is much easier to do than when you're a junior as it's really hard to tell whether a bug is your fault or the library's. |
The first field of some of our forms has an autofocus attribute on it, to help users type immediately instead of having to focus the field manually.
We've seen some inconsistencies when typing into this field, depending on how we
get
it:When this form appears, the focus is therefore set on the
input1
field.When writing tests:
Current behavior:
The text typed into the autofocused field is not written entirely when running on circle CI, works locally.
Desired behavior:
Both variants of getting and typing into the field should work reliably both locally and on the CI.
The text was updated successfully, but these errors were encountered: