aboutsummaryrefslogtreecommitdiff
path: root/e2e/tab.test.js
diff options
context:
space:
mode:
Diffstat (limited to 'e2e/tab.test.js')
-rw-r--r--e2e/tab.test.js20
1 files changed, 17 insertions, 3 deletions
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);