Skip to content

Commit

Permalink
changelog
Browse files Browse the repository at this point in the history
  • Loading branch information
AndrewMusgrave committed Nov 21, 2018
1 parent 3aa3b91 commit f407b28
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 2 deletions.
3 changes: 2 additions & 1 deletion UNRELEASED.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,8 @@ Use [the changelog guidelines](https://git.io/polaris-changelog-guidelines) to f

### Enhancements

- `EventListener` no longer uses `componentWillUpdate` ([#628](https://github.com/Shopify/polaris-react/pull/628))
- `TextField` no longer uses `componentWillReceiveProps`([#628](https://github.com/Shopify/polaris-react/pull/628))
- EventListener`no longer uses`componentWillUpdate` ([#628](https://github.com/Shopify/polaris-react/pull/628))
- Allowed `Icon` to accept a React Node as a source ([#635](https://github.com/Shopify/polaris-react/pull/635)) (thanks to [@mbriggs](https://github.com/mbriggs) for the [original issue](https://github.com/Shopify/polaris-react/issues/449))

### Bug fixes
Expand Down
11 changes: 10 additions & 1 deletion src/components/TextField/tests/TextField.test.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -124,14 +124,23 @@ describe('<TextField />', () => {
expect(id).toBeTruthy();
});

it('updates with new id from props', () => {
it('updates with the new id from props', () => {
const id = 'input field';
const textField = mountWithAppProvider(
<TextField label="TextField" onChange={noop} />,
);
textField.setProps({id});
expect(textField.find('input').prop('id')).toBe(id);
});

it('updates with the previous id after the id prop has been removed', () => {
const id = 'input field';
const textField = mountWithAppProvider(
<TextField label="TextField" id={id} onChange={noop} />,
);
textField.setProps({});
expect(textField.find('input').prop('id')).toBe(id);
});
});

describe('autoComplete', () => {
Expand Down

0 comments on commit f407b28

Please sign in to comment.