Skip to content
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

Trigger "change" event correctly #651

Closed
bahmutov opened this issue Sep 14, 2017 · 0 comments · Fixed by #2016
Closed

Trigger "change" event correctly #651

bahmutov opened this issue Sep 14, 2017 · 0 comments · Fixed by #2016
Assignees
Milestone

Comments

@bahmutov
Copy link
Contributor

bahmutov commented Sep 14, 2017

Cypress 0.19.4 / 0.20.0 does not generate "change" event same way as the browser. For example in vanilla JS TodoMVC this leads to different results

// fires change event
cy.find('input').type('foo{enter}')
// does not fire change event
cy.find('input').type('foo').type('{enter}')

which shows up in this example repo bahmutov/add-todo-test#1

Good url to test http://todomvc.com/examples/vanillajs/

test

const getItems = () =>
  cy.get('.todo-list li')

it('adds 1 todo', () => {
  const url = 'http://todomvc.com/examples/vanillajs/'
  cy.visit(url)
  getItems()
    .should('have.length', 0)
  cy.get('.new-todo').type('pass this test').type('{enter}')
  getItems()
    .should('have.length', 1)
})
@kuceb kuceb self-assigned this Jul 17, 2018
@kuceb kuceb added this to the 3.0.3 milestone Jul 17, 2018
brian-mann pushed a commit that referenced this issue Jul 23, 2018
this grew to a large PR fixing many cy.type issues.

fix #365
fix #420
fix #586 
fix #593 
fix #596 
fix #610 
fix #651
fix #940
fix #1002 
fix #1108
fix #1171
fix #1209 
fix #1234 
fix #1366
fix #1381 
fix #1684 
fix #1686
fix #1926 
fix #2056
fix #2096 
fix #2110 
fix #2173
fix #2187
@jennifer-shehane jennifer-shehane added stage: pending release and removed stage: needs review The PR code is done & tested, needs review stage: needs investigating Someone from Cypress needs to look at this stage: in progress labels Jul 23, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants