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.

Wrong behaviour of draft editor when quick typing (using cypress)

See original GitHub issue

bug When typing text in a div with role=‘textbox’, it’s not going to be handled correctly. First letter goes to newly created block but rest of the text is going directly to the div.

current behavior video recording screenshot

steps to reproduce run in cypress (tool to run GUI tests)

describe('Draft tests', function(){

    it('Should type in one line', function(){
        cy.visit('https://draftjs.org')
            .get('.public-DraftEditor-content')
            .wait(1000)
            .type('Text in one line ')
            .wait(3000)
    })
})

expected behavior Text should be in one line and whole in one div.

version of Draft.js 0.10.3

browser / OS Chrome 62, macOS 10.12.6

Issue Analytics

  • State:open
  • Created 6 years ago
  • Reactions:4
  • Comments:5 (2 by maintainers)

github_iconTop GitHub Comments

4reactions
vicusbasscommented, Dec 20, 2017

Here’s a recording: https://youtu.be/hdEglh3qdsY And a demo test:

describe('Smoke tests', function() {

  it.only('type stuff in draftJs control', function() {
    cy.visit('https://draftjs.org/')
    cy.get('[contenteditable="true"]').click().type('My first card is awesome')
  })
})
4reactions
mitermayercommented, Nov 18, 2017

This is something I would love to get fixed, was hoping to explore the possibility of using cypress to run some end-to-end tests in draft itself

Read more comments on GitHub >

github_iconTop Results From Across the Web

Solve Flake In Cypress Typing Into An Input Element
Using the cypress-recurse plugin in this case only works around the application's behavior. The real user would see the same broken application.
Read more >
Changelog - Cypress Documentation
Before this change, a spec was scaffolded with either the wrong spec name or the incorrect component import which led to invalid JS...
Read more >
Incrementing and decrementing the value of an <input type ...
Cypress works within the browser which means your test code is evaluated inside the browser. This means that anything that is not accessible ......
Read more >
rouch/Cypress: Fast, easy and reliable testing for anything that runs ...
Fast, easy and reliable testing for anything that runs in a browser. 11773 Commits · 1890 Branches · 535 Releases. Branch: issue-3200-scroll-behavior-smooth.
Read more >
A Complete Guide To Accessibility Tooling
Tooling can help us ensure that we are using ARIA correctly and not introducing more ... On design systems, UX, web performance 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