Skip to content
This repository has been archived by the owner on Jan 31, 2024. It is now read-only.

Commit

Permalink
Fix tests
Browse files Browse the repository at this point in the history
  • Loading branch information
jducro committed Oct 5, 2017
1 parent 3e68b59 commit 2681398
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 1 deletion.
2 changes: 1 addition & 1 deletion src/Components/Input/SelectInput.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ export default class SelectInput extends React.Component {

static getIcon(option) {
if (typeof option.icon === 'string') {
return [<Icon name={option.icon} />, ' '];
return [<Icon key="icon" name={option.icon} />, <span key="space"> </span>];
}
return null;
}
Expand Down
3 changes: 3 additions & 0 deletions tests/jest/components/__snapshots__/testSelectInput.jsx.snap
Original file line number Diff line number Diff line change
Expand Up @@ -126,6 +126,9 @@ exports[`+++capturing Snapshot of SelectInput with icon 1`] = `
<i
className="fa fa-thermometer-three-quarters dp-icon dp-icon--s"
/>
<span>
</span>
Warm
</span>
</span>
Expand Down
10 changes: 10 additions & 0 deletions tests/storybook/components/TokenField.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -124,6 +124,16 @@ class TokenFieldStory extends React.Component {
value={value}
onChange={this.handleChange}
/>
<h4 className={styles.title}>Available types</h4>
<ul className={styles.title}>
<li>attach-size (<i>NumericRangeInput</i>)</li>
<li>country (<i>SelectInput</i>)</li>
<li>date (<i>DateTimeInput</i>)</li>
<li>date-ticket-created (<i>DateTimeInput</i>)</li>
<li>date-ticket-resolved (<i>DateTimeInput</i>)</li>
<li>user-message (<i>TextInput</i>)</li>
<li>user-waiting (<i>DurationInput</i>)</li>
</ul>
<h3 className={styles.title}>Value</h3>
<pre className={styles.code}>
{JSON.stringify(value, null, 2)}
Expand Down

0 comments on commit 2681398

Please sign in to comment.