From d5e561e777cbfe53a0fddf469b3986a78731de82 Mon Sep 17 00:00:00 2001 From: Shin'ya Ueoka Date: Mon, 4 Feb 2019 14:23:31 +0900 Subject: [PATCH] Add e2e test case for --- e2e/contents/tab.test.js | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/e2e/contents/tab.test.js b/e2e/contents/tab.test.js index bfc22ea..3c98dc9 100644 --- a/e2e/contents/tab.test.js +++ b/e2e/contents/tab.test.js @@ -23,6 +23,19 @@ describe("tab test", () => { expect(actual.tabs).to.have.lengthOf(before.tabs.length - 1); }); + it('deletes tabs to the right by D', async () => { + let tab1 = await tabs.create(targetWindow.id, CLIENT_URL + '#1'); + await tabs.create(targetWindow.id, CLIENT_URL + '#2'); + await tabs.create(targetWindow.id, CLIENT_URL + '#3'); + + let before = await windows.get(targetWindow.id) + let tab = await tabs.selectAt(targetWindow.id, tab1.index) + await keys.press(tab.id, 'D', { shiftKey: true }); + + let actual = await windows.get(targetWindow.id); + expect(actual.tabs).to.have.lengthOf(before.tabs.length - 2); + }); + it('duplicates tab by zd', async () => { let tab = await tabs.create(targetWindow.id, CLIENT_URL); let before = await windows.get(targetWindow.id)