diff options
author | Marcel Klehr <mklehr@gmx.net> | 2013-03-15 21:43:58 +0100 |
---|---|---|
committer | Marcel Klehr <mklehr@gmx.net> | 2013-03-15 21:43:58 +0100 |
commit | a31605216fe72b8ae213394385aecee0bfb24ff2 (patch) | |
tree | 9c7946c3ea5f8ec75cf7929f122dac6d74f5a28b /tests/frontend/specs/alphabet.js | |
parent | 844012864ff4a7ecb5b236983578d3e36b915304 (diff) | |
parent | 54433db47f5083faa921da6050b4e4e4b55dfb20 (diff) | |
download | etherpad-lite-a31605216fe72b8ae213394385aecee0bfb24ff2.zip |
Merge branch 'release/1.2.9'
Diffstat (limited to 'tests/frontend/specs/alphabet.js')
-rw-r--r-- | tests/frontend/specs/alphabet.js | 27 |
1 files changed, 27 insertions, 0 deletions
diff --git a/tests/frontend/specs/alphabet.js b/tests/frontend/specs/alphabet.js new file mode 100644 index 00000000..131a81c0 --- /dev/null +++ b/tests/frontend/specs/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); + }); + +}); |