From 15f53fd36ce4561c5d82bb5b779ba9380ca3832a Mon Sep 17 00:00:00 2001 From: Olivier Tassinari Date: Sun, 1 Jul 2018 19:20:27 +0200 Subject: [PATCH] [Input] No focus state when read only --- docs/src/pages/demos/text-fields/TextFields.js | 10 ++++++++++ packages/material-ui/src/Input/Input.test.js | 8 ++++---- 2 files changed, 14 insertions(+), 4 deletions(-) diff --git a/docs/src/pages/demos/text-fields/TextFields.js b/docs/src/pages/demos/text-fields/TextFields.js index 3784189b748815..0fcdd7edd8611c 100644 --- a/docs/src/pages/demos/text-fields/TextFields.js +++ b/docs/src/pages/demos/text-fields/TextFields.js @@ -96,6 +96,16 @@ class TextFields extends React.Component { autoComplete="current-password" margin="normal" /> + ', () => { describe('prop: inputProps', () => { it('should apply the props on the input', () => { - const wrapper = shallow(); + const wrapper = shallow(); const input = wrapper.find('input'); - assert.strictEqual(input.hasClass('foo'), true, 'should have the foo class'); - assert.strictEqual(input.hasClass(classes.input), true, 'should still have the input class'); - assert.strictEqual(input.props().readOnly, true, 'should have the readOnly prop'); + assert.strictEqual(input.hasClass('foo'), true); + assert.strictEqual(input.hasClass(classes.input), true); + assert.strictEqual(input.props().maxLength, true); }); it('should be able to get a ref', () => {