mirror of
https://github.com/ether/etherpad-lite.git
synced 2025-01-31 19:02:59 +01:00
a test for adding any letter from alphabet can be extended to include foreign cahrs infact please DO THIS
This commit is contained in:
parent
3dcbd8dd4e
commit
eb93ce2aa6
1 changed files with 27 additions and 0 deletions
27
tests/frontend/specs/keystroke_alphabet.js
Normal file
27
tests/frontend/specs/keystroke_alphabet.js
Normal file
|
@ -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);
|
||||||
|
});
|
||||||
|
|
||||||
|
});
|
Loading…
Reference in a new issue