Broken ag-grid input cell 'type'ing
See original GitHub issue#5358 # Current behavior:
type()
ing into an ag-grid cell that was either focused, get, or clicked on is broken: only the first character is typed in the cell.
(After hot reload, by saving the test file while Cypress is already running, it types the full word ‘in place’, each character overwriting the former one, eventually only leaving the last character in the cell)
Desired behavior:
The full word in typed into the cell just like any other conventional input field.
Steps to reproduce: (app code and test code)
Make a simple ag-grid and try to type something in a cell:
cy.get('.ag-center-cols-container [row-index="0"] div:nth(1)').type('something')
Versions
“cypress”: “^3.4.1” Windows 10 Chrome 77.0.3865.120
Additional comments
I think it might be due to the way ag-grid handles inputs but at the same time Cypress is supposed to act just like an human user and it does not: clicking or focusing cells works just fine for me as I am able to type anything without any issue.
It’s not about ag-grid responding too slowly as I have already trie to wait()
before typing, it’s not an input speed problem either as type('something', { delay: 1000 })
didn’t work, and I am able to manually input 3 keys at the same time and ag-grid has no problem writing all 3.
Any ideas?
Issue Analytics
- State:
- Created 4 years ago
- Comments:6 (2 by maintainers)
Also hitting this with ag-grid 26 and Cypress 7, and the workaround didn’t seem to work for me either. There are some interesting differences between Cypress and usage by a real user - I have
singleClickEdit
enabled, so in real life, after a user clicks on a cell once, the inline editor appears (which has an underlyinginput
element). However, when running in Cypress, when I click on the cell and then try toget
aninput
withing the cell, none exists. It seems as if clicking the cell in Cypress isn’t having the same effect as clicking the cell normally. Have to look in to all of this more, but didn’t find a quick solution yet.I’m still seeing this, with ag-grid 25.1.0 and Cypress 6.5.0, and @K41eb’s workaround doesn’t help.
Is anyone else seeing this?