diff options
author | John McLear <john@mclear.co.uk> | 2013-03-19 12:52:14 +0000 |
---|---|---|
committer | John McLear <john@mclear.co.uk> | 2013-03-19 12:52:14 +0000 |
commit | 11341eb0954d319e127b80ead980d035ecbc637a (patch) | |
tree | 9b5050ea94ac67f908f70f4ed860ce44280cc733 /tests | |
parent | 13ee96dce0adc1a479d1237e7b5aeee406937200 (diff) | |
download | etherpad-lite-11341eb0954d319e127b80ead980d035ecbc637a.zip |
add a test to show weird behavior
Diffstat (limited to 'tests')
-rw-r--r-- | tests/frontend/specs/caret.js | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/tests/frontend/specs/caret.js b/tests/frontend/specs/caret.js index 9d9da460..b33f5168 100644 --- a/tests/frontend/specs/caret.js +++ b/tests/frontend/specs/caret.js @@ -24,10 +24,14 @@ describe("As the caret is moved is the UI properly updated?", function(){ // THIS DOESNT WORK AS IT DOESNT MOVE THE CURSOR! it("down arrow", function(done){ var inner$ = helper.padInner$; - keyEvent(inner$, 40, false, false); // arrow up + var $newFirstTextElement = inner$("div").first(); + $newFirstTextElement.focus(); + keyEvent(inner$, 37, false, false); // arrow down + keyEvent(inner$, 37, false, false); // arrow down + done(); }); - +/* it("Creates N lines", function(done){ var inner$ = helper.padInner$; var chrome$ = helper.padChrome$; @@ -289,6 +293,7 @@ function keyEvent(target, charCode, ctrl, shift){ // sends a charCode to the win var evtType = "keydown"; } var e = target.Event(evtType); + console.log(e); if(ctrl){ e.ctrlKey = true; // Control key } @@ -296,6 +301,7 @@ function keyEvent(target, charCode, ctrl, shift){ // sends a charCode to the win e.shiftKey = true; // Shift Key } e.which = charCode; + e.keyCode = charCode; target("#innerdocbody").trigger(e); } |