-
Notifications
You must be signed in to change notification settings - Fork 3.1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
driver: fix for react 16 no firing change events on inputs
- handle textarea’s too - TODO: check if <select> needs this as well
- Loading branch information
1 parent
d9b1432
commit 4a56ca8
Showing
7 changed files
with
49 additions
and
20 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
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 |
---|---|---|
@@ -0,0 +1,17 @@ | ||
<!DOCTYPE html> | ||
<html> | ||
<head> | ||
<title>React</title> | ||
</head> | ||
<body> | ||
<div id="react-container"></div> | ||
<script src="/node_modules/react@16.0.0/umd/react.development.js"></script> | ||
<script src="/node_modules/react-dom@16.0.0/umd/react-dom.development.js"></script> | ||
<script> | ||
window.onChangeEvents = 0 | ||
|
||
ReactDOM.render(React.createElement('div', {}, | ||
React.createElement('input', { onChange (e) { window.onChangeEvents++ } }) | ||
), document.getElementById('react-container')) | ||
</script> | ||
</body> |
6 changes: 6 additions & 0 deletions
6
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 |
---|---|---|
@@ -0,0 +1,6 @@ | ||
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) |
6 changes: 6 additions & 0 deletions
6
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 |
---|---|---|
@@ -0,0 +1,6 @@ | ||
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) |
This file was deleted.
Oops, something went wrong.
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