diff options
Diffstat (limited to 'e2e/contents')
-rw-r--r-- | e2e/contents/tab.test.js | 32 |
1 files changed, 32 insertions, 0 deletions
diff --git a/e2e/contents/tab.test.js b/e2e/contents/tab.test.js index 880deb8..f0b7449 100644 --- a/e2e/contents/tab.test.js +++ b/e2e/contents/tab.test.js @@ -212,4 +212,36 @@ describe("tab test", () => { expect(win.tabs).to.have.lengthOf(1); }); }); + + it('does not delete pinned tab by d', () => { + return Promise.resolve().then(() => { + return tabs.create(targetWindow.id, SERVER_URL + '#1'); + }).then((tab) => { + return tabs.update(tab.id, { pinned: true }); + }).then((tab) => { + return keys.press(tab.id, 'd'); + }).then(() => { + return windows.get(targetWindow.id); + }).then((win) => { + expect(win.tabs).to.have.lengthOf(2); + }); + }); + + it('deletes pinned tab by !d', () => { + let target; + return Promise.resolve().then(() => { + return tabs.create(targetWindow.id, SERVER_URL + '#1'); + }).then((tab) => { + return tabs.update(tab.id, { pinned: true }); + }).then((tab) => { + target = tab; + return keys.press(target.id, '!'); + }).then(() => { + return keys.press(target.id, 'd'); + }).then(() => { + return windows.get(targetWindow.id); + }).then((win) => { + expect(win.tabs).to.have.lengthOf(1); + }); + }); }); |