Skip to content

Commit 4a3eeca

Browse files
committed
Add number input test case for dashes and negative numbers
1 parent d7f9b4e commit 4a3eeca

File tree

1 file changed

+30
-1
lines changed
  • fixtures/dom/src/components/fixtures/number-inputs

1 file changed

+30
-1
lines changed

fixtures/dom/src/components/fixtures/number-inputs/index.js

+30-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
const React = window.React;
22

3-
import Fixture from '../../Fixture';
43
import FixtureSet from '../../FixtureSet';
54
import TestCase from '../../TestCase';
65
import NumberTestCase from './NumberTestCase';
@@ -129,6 +128,36 @@ const NumberInputs = React.createClass({
129128
</TestCase.ExpectedResult>
130129
<NumberTestCase />
131130
</TestCase>
131+
132+
<TestCase
133+
title="Appending -"
134+
description="Adding '-' to the end of '3' maintains the trailing dash"
135+
>
136+
<TestCase.Steps>
137+
<li>Type "3"</li>
138+
<li>Type '-'</li>
139+
</TestCase.Steps>
140+
141+
<TestCase.ExpectedResult>
142+
The field should read "3-", not "3"
143+
</TestCase.ExpectedResult>
144+
<NumberTestCase />
145+
</TestCase>
146+
147+
<TestCase
148+
title="Negative numbers"
149+
description="Typing minus when inserting a negative number should work"
150+
>
151+
<TestCase.Steps>
152+
<li>Type "-"</li>
153+
<li>Type '3'</li>
154+
</TestCase.Steps>
155+
156+
<TestCase.ExpectedResult>
157+
The field should read "-3".
158+
</TestCase.ExpectedResult>
159+
<NumberTestCase />
160+
</TestCase>
132161
</FixtureSet>
133162
);
134163
},

0 commit comments

Comments
 (0)