mirror of https://github.com/sveltejs/svelte
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
20 lines
519 B
20 lines
519 B
8 years ago
|
// TODO gah, JSDOM appears to behave differently to real browsers here... probably need to raise an issue
|
||
|
|
||
|
export default {
|
||
8 years ago
|
html: '<input><!---->',
|
||
8 years ago
|
test ( assert, component ) {
|
||
8 years ago
|
component.refs.input.focus();
|
||
|
|
||
|
// this should NOT trigger blur event
|
||
|
component.set({ visible: false });
|
||
|
assert.ok( !component.get( 'blurred' ) );
|
||
|
|
||
|
component.set({ visible: true });
|
||
|
component.refs.input.focus();
|
||
|
|
||
|
// this SHOULD trigger blur event
|
||
|
component.refs.input.blur();
|
||
|
assert.ok( component.get( 'blurred' ) );
|
||
|
}
|
||
|
};
|