|
|
|
@ -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); |
|
|
|
|
}); |
|
|
|
|
}); |
|
|
|
|
}); |
|
|
|
|