Skip to content

Commit

Permalink
Add focus, blur test
Browse files Browse the repository at this point in the history
  • Loading branch information
Tyriar committed May 11, 2019
1 parent 7562948 commit 0d1fe1d
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions src/public/Terminal.api.ts
Original file line number Diff line number Diff line change
Expand Up @@ -101,6 +101,16 @@ describe('API Integration Tests', () => {
assert.equal(await page.evaluate(`window.term.getSelection()`), '');
});

it.only('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);
Expand Down

0 comments on commit 0d1fe1d

Please sign in to comment.