diff options
author | John McLear <john@mclear.co.uk> | 2012-11-30 23:33:22 +0000 |
---|---|---|
committer | John McLear <john@mclear.co.uk> | 2012-11-30 23:33:22 +0000 |
commit | eb93ce2aa66a04b345a7ce640e9877b3c3090bcf (patch) | |
tree | 92cc65e398ba304b2cf3d1f1365b7f6c76871ea4 | |
parent | 3dcbd8dd4ed66bd20291ca00f156c3258bc3b3a9 (diff) | |
download | etherpad-lite-eb93ce2aa66a04b345a7ce640e9877b3c3090bcf.zip |
a test for adding any letter from alphabet can be extended to include foreign cahrs infact please DO THIS
-rw-r--r-- | tests/frontend/specs/keystroke_alphabet.js | 27 |
1 files changed, 27 insertions, 0 deletions
diff --git a/tests/frontend/specs/keystroke_alphabet.js b/tests/frontend/specs/keystroke_alphabet.js new file mode 100644 index 00000000..131a81c0 --- /dev/null +++ b/tests/frontend/specs/keystroke_alphabet.js @@ -0,0 +1,27 @@ +describe("All the alphabet works n stuff", function(){ + var expectedString = "abcdefghijklmnopqrstuvwxyz"; + + //create a new pad before each test run + beforeEach(function(cb){ + helper.newPad(cb); + this.timeout(60000); + }); + + it("when you enter any char it appears right", function(done) { + var inner$ = helper.padInner$; + var chrome$ = helper.padChrome$; + + //get the first text element out of the inner iframe + var firstTextElement = inner$("div").first(); + + // simulate key presses to delete content + firstTextElement.sendkeys('{selectall}'); // select all + firstTextElement.sendkeys('{del}'); // clear the first line + firstTextElement.sendkeys(expectedString); // insert the string + + helper.waitFor(function(){ + return inner$("div").first().text() === expectedString; + }, 2000).done(done); + }); + +}); |