From 5790a756224b64ed07ff72fcc305ddc697e16b27 Mon Sep 17 00:00:00 2001 From: Ben Alpert Date: Sat, 7 Jun 2014 18:50:29 -0700 Subject: [PATCH] Fix submit-button value test in IE10 Test Plan: Ran test in jest, phantomjs, IE10, Chrome, and Firefox. --- .../ui/dom/components/__tests__/ReactDOMInput-test.js | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/src/browser/ui/dom/components/__tests__/ReactDOMInput-test.js b/src/browser/ui/dom/components/__tests__/ReactDOMInput-test.js index 45b2df4115..379567a599 100644 --- a/src/browser/ui/dom/components/__tests__/ReactDOMInput-test.js +++ b/src/browser/ui/dom/components/__tests__/ReactDOMInput-test.js @@ -136,8 +136,12 @@ describe('ReactDOMInput', function() { var node = stub.getDOMNode(); // The value shouldn't be '', or else the button will have no text; it - // should have the default "Submit" or "Submit Query" label - expect(node.hasAttribute('value')).toBe(false); + // should have the default "Submit" or "Submit Query" label. Most browsers + // report this as not having a `value` attribute at all; IE reports it as + // the actual label that the user sees. + expect( + !node.hasAttribute('value') || node.getAttribute('value').length > 0 + ).toBe(true); }); it('should control radio buttons', function() {