diff options
Diffstat (limited to 'e2e/contents/tab.test.js')
-rw-r--r-- | e2e/contents/tab.test.js | 35 |
1 files changed, 35 insertions, 0 deletions
diff --git a/e2e/contents/tab.test.js b/e2e/contents/tab.test.js new file mode 100644 index 0000000..d33a35f --- /dev/null +++ b/e2e/contents/tab.test.js @@ -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; + }); +}); |