aboutsummaryrefslogtreecommitdiff
path: root/e2e/contents
diff options
context:
space:
mode:
authorShin'ya Ueoka <ueokande@i-beam.org>2018-02-13 20:13:27 +0900
committerShin'ya Ueoka <ueokande@i-beam.org>2018-02-13 20:43:15 +0900
commit0904f8e1ebd61d425c3536a7dd02afbffaad0550 (patch)
treeb95c476cabe2e519ab906ee9d3ec220b3551db86 /e2e/contents
parent3f8bbe11d96b751affa9e2bf0a1995008f9e3220 (diff)
add tab delete test
Diffstat (limited to 'e2e/contents')
-rw-r--r--e2e/contents/tab.test.js17
1 files changed, 8 insertions, 9 deletions
diff --git a/e2e/contents/tab.test.js b/e2e/contents/tab.test.js
index d33a35f..dda572f 100644
--- a/e2e/contents/tab.test.js
+++ b/e2e/contents/tab.test.js
@@ -5,7 +5,7 @@ import * as keys from "../ambassador/src/client/keys";
const SERVER_URL = "localhost:11111";
-describe("tab test", function() {
+describe("tab test", () => {
let targetWindow;
let targetTab;
@@ -22,14 +22,13 @@ describe("tab test", function() {
return windows.remove(targetWindow.id);
});
- it('delete tab', (done) => {
- let before = window.document.documentElement.scrollTop;
- keys.press(targetTab.id, 'j').then((r) => {
+ it('delete tab', () => {
+ return Promise.resolve().then(() => {
+ return keys.press(targetTab.id, 'd');
+ }).then(() => {
+ return windows.get(targetWindow.id);
+ }).then((after) => {
+ expect(after.tabs).to.have.lengthOf(1);
});
- keys.press(targetTab.id, 'j').then((r) => {
- });
- keys.press(targetTab.id, 'G').then((r) => {
- });
- let after = window.document.documentElement.scrollTop;
});
});