(test) assert input's checked status after a DOM 'change' event

pull/403/head
Cristian Necula 9 years ago
parent 9aab5d9858
commit 2eef227c0d

@ -16,15 +16,15 @@ export default {
<label>
<input type="radio"> Alpha
</label>
<label>
<input type="radio"> Beta
</label>
<label>
<input type="radio"> Gamma
</label>
<p>Beta</p>`,
test ( assert, component, target, window ) {
@ -42,18 +42,22 @@ export default {
<label>
<input type="radio"> Alpha
</label>
<label>
<input type="radio"> Beta
</label>
<label>
<input type="radio"> Gamma
</label>
<p>Alpha</p>
` );
assert.equal( inputs[0].checked, true );
assert.equal( inputs[1].checked, false );
assert.equal( inputs[2].checked, false );
component.set({ selected: values[2] });
assert.equal( inputs[0].checked, false );
assert.equal( inputs[1].checked, false );
@ -63,15 +67,15 @@ export default {
<label>
<input type="radio"> Alpha
</label>
<label>
<input type="radio"> Beta
</label>
<label>
<input type="radio"> Gamma
</label>
<p>Gamma</p>
` );
}

Loading…
Cancel
Save