From ec6a7c8871a2fec6c0d8c29a01b655778daad2fa Mon Sep 17 00:00:00 2001 From: Shin'ya Ueoka Date: Sun, 18 Feb 2018 21:38:18 +0900 Subject: [PATCH] add test --- e2e/contents/tab.test.js | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/e2e/contents/tab.test.js b/e2e/contents/tab.test.js index 56d1f21..be4288f 100644 --- a/e2e/contents/tab.test.js +++ b/e2e/contents/tab.test.js @@ -182,6 +182,26 @@ describe("tab test", () => { }); }); + it('selects last selected tab by ', () => { + return Promise.resolve().then(() => { + return tabs.create(targetWindow.id, SERVER_URL + '#1') + }).then(() => { + return tabs.create(targetWindow.id, SERVER_URL + '#2') + }).then(() => { + return tabs.create(targetWindow.id, SERVER_URL + '#3'); + }).then(() => { + return tabs.selectAt(targetWindow.id, 1); + }).then(() => { + return tabs.selectAt(targetWindow.id, 3); + }).then((tab) => { + return keys.press(tab.id, '6', { ctrlKey: true }); + }).then(() => { + return windows.get(targetWindow.id); + }).then((win) => { + expect(win.tabs[1].active).to.be.true; + }); + }); + it('deletes tab by d', () => { return Promise.resolve().then(() => { return tabs.create(targetWindow.id, SERVER_URL + '#1');