-
Notifications
You must be signed in to change notification settings - Fork 3.2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fixes #816 properly fire change events for react email + number inputs (
#846)
- Loading branch information
1 parent
ad50516
commit bbaedcc
Showing
5 changed files
with
69 additions
and
13 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
23 changes: 18 additions & 5 deletions
23
packages/driver/test/cypress/integration/e2e/react-15_spec.coffee
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,19 @@ | ||
describe "react v15.6.0", -> | ||
it "correctly fires onChange events", -> | ||
cy | ||
.visit("/fixtures/react-15.html") | ||
.get("#react-container input").type("foo").blur() | ||
.window().its("onChangeEvents").should("eq", 3) | ||
context "fires onChange events", -> | ||
beforeEach -> | ||
cy.visit("/fixtures/react-15.html") | ||
|
||
it "input", -> | ||
cy | ||
.get("#react-container input[type=text]").type("foo").blur() | ||
.window().its("onChangeEvents").should("eq", 3) | ||
|
||
it "email", -> | ||
cy | ||
.get("#react-container input[type=email]").type("foo").blur() | ||
.window().its("onChangeEvents").should("eq", 3) | ||
|
||
it "number", -> | ||
cy | ||
.get("#react-container input[type=number]").type("123").blur() | ||
.window().its("onChangeEvents").should("eq", 3) |
23 changes: 18 additions & 5 deletions
23
packages/driver/test/cypress/integration/e2e/react-16_spec.coffee
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,19 @@ | ||
describe "react v16.0.0", -> | ||
it "correctly fires onChange events", -> | ||
cy | ||
.visit("/fixtures/react-16.html") | ||
.get("#react-container input").type("foo").blur() | ||
.window().its("onChangeEvents").should("eq", 3) | ||
context "fires onChange events", -> | ||
beforeEach -> | ||
cy.visit("/fixtures/react-16.html") | ||
|
||
it "input", -> | ||
cy | ||
.get("#react-container input[type=text]").type("foo").blur() | ||
.window().its("onChangeEvents").should("eq", 3) | ||
|
||
it "email", -> | ||
cy | ||
.get("#react-container input[type=email]").type("foo").blur() | ||
.window().its("onChangeEvents").should("eq", 3) | ||
|
||
it "number", -> | ||
cy | ||
.get("#react-container input[type=number]").type("123").blur() | ||
.window().its("onChangeEvents").should("eq", 3) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters