Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 5790a75

Browse files
committed
Fix submit-button value test in IE10
Test Plan: Ran test in jest, phantomjs, IE10, Chrome, and Firefox.
1 parent eebcf9f commit 5790a75

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

src/browser/ui/dom/components/__tests__/ReactDOMInput-test.js

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -136,8 +136,12 @@ describe('ReactDOMInput', function() {
136136
var node = stub.getDOMNode();
137137

138138
// The value shouldn't be '', or else the button will have no text; it
139-
// should have the default "Submit" or "Submit Query" label
140-
expect(node.hasAttribute('value')).toBe(false);
139+
// should have the default "Submit" or "Submit Query" label. Most browsers
140+
// report this as not having a `value` attribute at all; IE reports it as
141+
// the actual label that the user sees.
142+
expect(
143+
!node.hasAttribute('value') || node.getAttribute('value').length > 0
144+
).toBe(true);
141145
});
142146

143147
it('should control radio buttons', function() {

0 commit comments

Comments
 (0)