Add focus, blur test

This commit is contained in:
Daniel Imms
2019-05-11 00:00:57 -07:00
parent 7562948259
commit dfb5d8e663
+10
View File
@@ -101,6 +101,16 @@ describe('API Integration Tests', () => {
assert.equal(await page.evaluate(`window.term.getSelection()`), '');
});
it('focus, blur', async function(): Promise<any> {
this.timeout(10000);
await openTerminal();
assert.equal(await page.evaluate(`document.activeElement.className`), '');
await page.evaluate(`window.term.focus()`);
assert.equal(await page.evaluate(`document.activeElement.className`), 'xterm-helper-textarea');
await page.evaluate(`window.term.blur()`);
assert.equal(await page.evaluate(`document.activeElement.className`), '');
});
describe('Events', () => {
it('onCursorMove', async function(): Promise<any> {
this.timeout(10000);