2012-12-01 00:33:22 +01:00
|
|
|
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) {
|
2020-03-24 01:04:24 +01:00
|
|
|
var inner$ = helper.padInner$;
|
|
|
|
var chrome$ = helper.padChrome$;
|
|
|
|
|
2012-12-01 00:33:22 +01:00
|
|
|
//get the first text element out of the inner iframe
|
|
|
|
var firstTextElement = inner$("div").first();
|
2020-03-24 01:04:24 +01:00
|
|
|
|
2012-12-01 00:33:22 +01:00
|
|
|
// simulate key presses to delete content
|
|
|
|
firstTextElement.sendkeys('{selectall}'); // select all
|
|
|
|
firstTextElement.sendkeys('{del}'); // clear the first line
|
|
|
|
firstTextElement.sendkeys(expectedString); // insert the string
|
2013-12-05 08:41:29 +01:00
|
|
|
|
2012-12-01 00:33:22 +01:00
|
|
|
helper.waitFor(function(){
|
|
|
|
return inner$("div").first().text() === expectedString;
|
|
|
|
}, 2000).done(done);
|
|
|
|
});
|
|
|
|
|
|
|
|
});
|