2020-11-23 18:21:51 +00:00
|
|
|
describe('All the alphabet works n stuff', function () {
|
|
|
|
const expectedString = 'abcdefghijklmnopqrstuvwxyz';
|
2012-11-30 23:33:22 +00:00
|
|
|
|
2020-11-23 18:21:51 +00:00
|
|
|
// create a new pad before each test run
|
|
|
|
beforeEach(function (cb) {
|
2012-11-30 23:33:22 +00:00
|
|
|
helper.newPad(cb);
|
|
|
|
this.timeout(60000);
|
|
|
|
});
|
|
|
|
|
2020-11-23 18:21:51 +00:00
|
|
|
it('when you enter any char it appears right', function (done) {
|
|
|
|
const inner$ = helper.padInner$;
|
|
|
|
const chrome$ = helper.padChrome$;
|
2020-03-24 00:04:24 +00:00
|
|
|
|
2020-11-23 18:21:51 +00:00
|
|
|
// get the first text element out of the inner iframe
|
|
|
|
const firstTextElement = inner$('div').first();
|
2020-03-24 00:04:24 +00:00
|
|
|
|
2012-11-30 23:33:22 +00: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 07:41:29 +00:00
|
|
|
|
2020-11-23 18:21:51 +00:00
|
|
|
helper.waitFor(() => inner$('div').first().text() === expectedString, 2000).done(done);
|
2012-11-30 23:33:22 +00:00
|
|
|
});
|
|
|
|
});
|