question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

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:closed
  • Created 4 years ago
  • Comments:6 (2 by maintainers)

github_iconTop GitHub Comments

2reactions
jkilliancommented, Sep 13, 2021

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 underlying input element). However, when running in Cypress, when I click on the cell and then try to get an input 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.

0reactions
LMFinneycommented, Mar 25, 2021

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?

Read more comments on GitHub >

github_iconTop Results From Across the Web

JavaScript Data Grid: Cell Editing - AG Grid
Value has changed after editing (this event will not fire if editing was cancelled, eg ESC was pressed) or if cell value has...
Read more >
Synchronous and asynchronous input validation with ag-Grid
In this post we will implement asynchronous and synchronous user input validation in ag-Grid. We've illustrated both of these cases with ...
Read more >
Learn to customize JavaScript grid in less than 10 minutes
Use JavaSript with AG Grid to create a table of data with editors, filters and sorting in 10 minutes.
Read more >
27.0.0 - AG Grid
Cell values are now copied in the order they appear in the grid (previously cell values were copied in the order of selection)....
Read more >
Enhance your Angular Grid with Formatted values and Links
Value Based cell formatting in ag-Grid · What is Content Convention Based Dynamic Formatting? · Example Code. Pipe Setup; Dates; ColumnDefs and ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found