initial commit (work in progress)
This commit is contained in:
parent
13fdb60f66
commit
559369016d
83 changed files with 10461 additions and 0 deletions
26
render/tests/test-input.js
Normal file
26
render/tests/test-input.js
Normal file
|
|
@ -0,0 +1,26 @@
|
|||
"use strict"
|
||||
|
||||
var o = require("../../ospec/ospec")
|
||||
var domMock = require("../../test-utils/domMock")
|
||||
var vdom = require("../../render/render")
|
||||
|
||||
o.spec("input", function() {
|
||||
var $window, root, render
|
||||
o.beforeEach(function() {
|
||||
$window = domMock()
|
||||
root = $window.document.body
|
||||
render = vdom($window).render
|
||||
})
|
||||
|
||||
o("maintains focus after move", function() {
|
||||
var input = {tag: "input", key: 1}
|
||||
var a = {tag: "a", key: 2}
|
||||
var b = {tag: "b", key: 3}
|
||||
|
||||
render(root, [input, a, b])
|
||||
input.dom.focus()
|
||||
render(root, [a, input, b])
|
||||
|
||||
o($window.document.activeElement).equals(input.dom)
|
||||
})
|
||||
})
|
||||
Loading…
Add table
Add a link
Reference in a new issue