aboutsummaryrefslogtreecommitdiff
path: root/e2e
diff options
context:
space:
mode:
Diffstat (limited to 'e2e')
-rw-r--r--e2e/settings.js3
-rw-r--r--e2e/tab.test.js20
2 files changed, 19 insertions, 4 deletions
diff --git a/e2e/settings.js b/e2e/settings.js
index e09747f..e78add0 100644
--- a/e2e/settings.js
+++ b/e2e/settings.js
@@ -24,7 +24,8 @@ module.exports = {
"G": { "type": "scroll.bottom" },
"$": { "type": "scroll.end" },
"d": { "type": "tabs.close" },
- "D": { "type": "tabs.close.right" },
+ "D": { "type": "tabs.close", "select": "left" },
+ "x$": { "type": "tabs.close.right" },
"!d": { "type": "tabs.close.force" },
"u": { "type": "tabs.reopen" },
"K": { "type": "tabs.prev", "count": 1 },
diff --git a/e2e/tab.test.js b/e2e/tab.test.js
index 16d61ae..c82890e 100644
--- a/e2e/tab.test.js
+++ b/e2e/tab.test.js
@@ -55,18 +55,32 @@ describe("tab test", () => {
await browser.windows.remove(win.id);
});
- it('deletes tab by d', async () => {
+ it('deletes tab and selects right by d', async () => {
+ await browser.tabs.update(tabs[3].id, { active: true });
let body = await session.findElementByCSS('body');
await body.sendKeys('d');
let current = await browser.tabs.query({ windowId: win.id });
assert(current.length === tabs.length - 1);
+ assert(current[3].active);
+ assert(current[3].url === tabs[4].url);
+ });
+
+ it('deletes tab and selects left by D', async () => {
+ await browser.tabs.update(tabs[3].id, { active: true });
+ let body = await session.findElementByCSS('body');
+ await body.sendKeys(Key.Shift, 'D');
+
+ let current = await browser.tabs.query({ windowId: win.id });
+ assert(current.length === tabs.length - 1);
+ assert(current[2].active);
+ assert(current[2].url === tabs[2].url);
});
- it('deletes tabs to the right by D', async () => {
+ it('deletes all tabs to the right by x$', async () => {
await browser.tabs.update(tabs[1].id, { active: true });
let body = await session.findElementByCSS('body');
- await body.sendKeys(Key.Shift, 'd');
+ await body.sendKeys('x', '$');
let current = await browser.tabs.query({ windowId: win.id });
assert(current.length === 2);