Skip to content

change event should not trigger between chained actions on same target input #47

@jennifer-shehane

Description

@jennifer-shehane

If there are multiple chained actions associated to the same input, a change event should not be triggered until the input loses focus.

Example Code

it "patches on change of input", ->
  cy
    .route("PATCH", /^\/answers\/\d+/, @answer).as("patchAnswer")
    .get("@valueInput").clear().type("56").blur()
    .wait("@patchAnswer").then (xhr) ->
      expect(xhr.requestJSON).to.have.property("value", "56")

The .clear() and the .type("56").blur() are both triggering change events. My test ends up patching value: "" so that my test falsely fails. There should only be 1 change event triggered when the input loses focus on .blur().

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions