send press key to tabs
This commit is contained in:
parent
cf03d278eb
commit
3f8bbe11d9
11 changed files with 153 additions and 30 deletions
35
e2e/contents/tab.test.js
Normal file
35
e2e/contents/tab.test.js
Normal file
|
@ -0,0 +1,35 @@
|
|||
import { expect } from "chai";
|
||||
import * as windows from "../ambassador/src/client/windows";
|
||||
import * as tabs from "../ambassador/src/client/tabs";
|
||||
import * as keys from "../ambassador/src/client/keys";
|
||||
|
||||
const SERVER_URL = "localhost:11111";
|
||||
|
||||
describe("tab test", function() {
|
||||
let targetWindow;
|
||||
let targetTab;
|
||||
|
||||
before(() => {
|
||||
return windows.create().then((win) => {
|
||||
targetWindow = win;
|
||||
return tabs.create(win.id, SERVER_URL).then((tab) => {
|
||||
targetTab = tab;
|
||||
});
|
||||
});
|
||||
});
|
||||
|
||||
after(() => {
|
||||
return windows.remove(targetWindow.id);
|
||||
});
|
||||
|
||||
it('delete tab', (done) => {
|
||||
let before = window.document.documentElement.scrollTop;
|
||||
keys.press(targetTab.id, 'j').then((r) => {
|
||||
});
|
||||
keys.press(targetTab.id, 'j').then((r) => {
|
||||
});
|
||||
keys.press(targetTab.id, 'G').then((r) => {
|
||||
});
|
||||
let after = window.document.documentElement.scrollTop;
|
||||
});
|
||||
});
|
Reference in a new issue