diff options
Diffstat (limited to 'e2e/contents')
-rw-r--r-- | e2e/contents/follow.test.js | 83 | ||||
-rw-r--r-- | e2e/contents/mark.test.js | 71 | ||||
-rw-r--r-- | e2e/contents/navigate.test.js | 102 | ||||
-rw-r--r-- | e2e/contents/scroll.test.js | 106 | ||||
-rw-r--r-- | e2e/contents/tab.test.js | 192 | ||||
-rw-r--r-- | e2e/contents/zoom.test.js | 53 |
6 files changed, 0 insertions, 607 deletions
diff --git a/e2e/contents/follow.test.js b/e2e/contents/follow.test.js deleted file mode 100644 index f78780b..0000000 --- a/e2e/contents/follow.test.js +++ /dev/null @@ -1,83 +0,0 @@ -import * as windows from "../ambassador/src/client/windows"; -import * as tabs from "../ambassador/src/client/tabs"; -import * as keys from "../ambassador/src/client/keys"; -import { CLIENT_URL } from '../web-server/url'; - -describe("tab test", () => { - let targetWindow; - - beforeEach(async () => { - targetWindow = await windows.create(CLIENT_URL); - }); - - afterEach(async () => { - await windows.remove(targetWindow.id); - });return - - it('follows link by `f`', async() => { - let tab = await tabs.create(targetWindow.id, CLIENT_URL + '/follow'); - await keys.press(tab.id, 'f'); - await new Promise(resolve => { setTimeout(() => resolve(), 10) }); - await keys.press(tab.id, 'a'); - await new Promise(resolve => { setTimeout(() => resolve(), 10) }); - - tab = tabs.get(tab.id); - expect(tab.url).to.be.equal(CLIENT_URL + '/follow#a'); - }); - - it('follows link into new tab by `F`', async () => { - let tab = await tabs.create(targetWindow.id, CLIENT_URL + '/follow'); - await keys.press(tab.id, 'F', { shiftKey: true }); - await new Promise(resolve => { setTimeout(() => resolve(), 10) }); - await keys.press(tab.id, 'a'); - await new Promise(resolve => { setTimeout(() => resolve(), 500) }); - - let win = await windows.get(targetWindow.id); - let urls = win.tabs.map(t => t.url); - expect(urls).to.have.lengthOf(3); - expect(urls).to.include(CLIENT_URL + '/'); - expect(urls).to.include(CLIENT_URL + '/follow'); - expect(urls).to.include(CLIENT_URL + '/follow#a'); - }); - - it('follows link with target=_blank into new tab by `f`', async () => { - let tab = await tabs.create(targetWindow.id, CLIENT_URL + '/follow'); - await keys.press(tab.id, 'f'); - await new Promise(resolve => { setTimeout(() => resolve(), 10) }); - await keys.press(tab.id, 'b'); - await new Promise(resolve => { setTimeout(() => resolve(), 500) }); - - let win = await windows.get(targetWindow.id); - let urls = win.tabs.map(t => t.url); - expect(urls).to.have.lengthOf(3); - expect(urls).to.include(CLIENT_URL + '/'); - expect(urls).to.include(CLIENT_URL + '/follow'); - expect(urls).to.include(CLIENT_URL + '/follow#external'); - }); - - it('follows link with target=_blank into new tab by `F`', async () => { - let tab = await tabs.create(targetWindow.id, CLIENT_URL + '/follow'); - await keys.press(tab.id, 'F', { shiftKey: true }); - await new Promise(resolve => { setTimeout(() => resolve(), 10) }); - await keys.press(tab.id, 'b'); - await new Promise(resolve => { setTimeout(() => resolve(), 500) }); - - let win = await windows.get(targetWindow.id); - let urls = win.tabs.map(t => t.url); - expect(urls).to.have.lengthOf(3); - expect(urls).to.include(CLIENT_URL + '/'); - expect(urls).to.include(CLIENT_URL + '/follow'); - expect(urls).to.include(CLIENT_URL + '/follow#external'); - }); - - it('follows area by `F`', async () => { - let tab = await tabs.create(targetWindow.id, CLIENT_URL + '/follow'); - await keys.press(tab.id, 'f'); - await new Promise(resolve => { setTimeout(() => resolve(), 10) }); - await keys.press(tab.id, 'c'); - await new Promise(resolve => { setTimeout(() => resolve(), 10) }); - - tab = await tabs.get(tab.id); - expect(tab.url).to.be.equal(CLIENT_URL + '/follow#area'); - }); -}); diff --git a/e2e/contents/mark.test.js b/e2e/contents/mark.test.js deleted file mode 100644 index 85566bd..0000000 --- a/e2e/contents/mark.test.js +++ /dev/null @@ -1,71 +0,0 @@ -import * as windows from "../ambassador/src/client/windows"; -import * as tabs from "../ambassador/src/client/tabs"; -import * as keys from "../ambassador/src/client/keys"; -import * as scrolls from "../ambassador/src/client/scrolls"; -import { CLIENT_URL } from '../web-server/url'; - -describe("mark test", () => { - let targetWindow; - - before(async () => { - targetWindow = await windows.create(); - }); - - after(async () => { - await windows.remove(targetWindow.id); - }); - - it('set a local mark and jump to it', async () => { - let tab = await tabs.create(targetWindow.id, CLIENT_URL + '/mark#local'); - await scrolls.set(tab.id, 100, 100); - await keys.press(tab.id, 'm'); - await keys.press(tab.id, 'a'); - - await scrolls.set(tab.id, 200, 200); - await keys.press(tab.id, "'"); - await keys.press(tab.id, 'a'); - - let scroll = await scrolls.get(tab.id); - expect(scroll.x).to.be.equals(100); - expect(scroll.y).to.be.equals(100); - }); - - it('set a global mark and jump to it', async () => { - let tab1 = await tabs.create(targetWindow.id, CLIENT_URL + '/mark#global1'); - await scrolls.set(tab1.id, 100, 100); - await keys.press(tab1.id, 'm'); - await keys.press(tab1.id, 'A'); - await new Promise(resolve => { setTimeout(() => resolve(), 100) }); - await scrolls.set(tab1.id, 200, 200); - - let tab2 = await tabs.create(targetWindow.id, CLIENT_URL + '/mark#global2'); - await keys.press(tab2.id, "'"); - await keys.press(tab2.id, 'A'); - await new Promise(resolve => { setTimeout(() => resolve(), 100) }); - - tab1 = await tabs.get(tab1.id); - expect(tab1.active).to.be.true; - let scroll = await scrolls.get(tab1.id); - expect(scroll.x).to.be.equals(100); - expect(scroll.y).to.be.equals(100); - }); - - it('set a global mark and creates new tab from gone', async () => { - let tab1 = await tabs.create(targetWindow.id, CLIENT_URL + '/mark#gone'); - await scrolls.set(tab1.id, 100, 100); - await keys.press(tab1.id, 'm'); - await keys.press(tab1.id, 'A'); - await tabs.remove(tab1.id); - await new Promise(resolve => { setTimeout(() => resolve(), 100) }); - - let tab2 = await tabs.create(targetWindow.id, CLIENT_URL + '/mark#newtab'); - await keys.press(tab2.id, "'"); - await keys.press(tab2.id, 'A'); - await new Promise(resolve => { setTimeout(() => resolve(), 100) }); - - let win = await windows.get(targetWindow.id); - let found = win.tabs.find(tab => tab.url === CLIENT_URL + '/mark#gone') - expect(found).to.be.an('object'); - expect(found.id).to.not.equal(tab1.id); - }); -}); diff --git a/e2e/contents/navigate.test.js b/e2e/contents/navigate.test.js deleted file mode 100644 index 32ed423..0000000 --- a/e2e/contents/navigate.test.js +++ /dev/null @@ -1,102 +0,0 @@ -import * as windows from "../ambassador/src/client/windows"; -import * as tabs from "../ambassador/src/client/tabs"; -import * as keys from "../ambassador/src/client/keys"; -import * as scrolls from "../ambassador/src/client/scrolls"; -import { CLIENT_URL } from '../web-server/url'; - -describe("navigate test", () => { - let targetWindow; - - before(async () => { - targetWindow = await windows.create(); - await tabs.create(targetWindow.id, CLIENT_URL); - }); - - after(async () => { - await windows.remove(targetWindow.id); - }); - - it('goes to parent', async () => { - let tab = await tabs.create(targetWindow.id, CLIENT_URL + '/a/b/c'); - await keys.press(tab.id, 'g'); - await keys.press(tab.id, 'u'); - await new Promise((resolve) => setTimeout(resolve, 10)); - - tab = await tabs.get(tab.id); - expect(tab.url).to.be.equal(CLIENT_URL + '/a/b/'); - }); - - it('removes hash', async () => { - let tab = await tabs.create(targetWindow.id, CLIENT_URL + '/a/b/c#navigate'); - await keys.press(tab.id, 'g'); - await keys.press(tab.id, 'u'); - tab = await tabs.get(tab.id); - expect(tab.url).to.be.equal(CLIENT_URL + '/a/b/c#'); - }); - - it('goes to root', async () => { - let tab = await tabs.create(targetWindow.id, CLIENT_URL + '/a/b/c'); - await keys.press(tab.id, 'g'); - await keys.press(tab.id, 'U', { shiftKey: true }); - await new Promise((resolve) => setTimeout(resolve, 10)); - - tab = await tabs.get(tab.id); - expect(tab.url).to.be.equal(CLIENT_URL + '/'); - }); - - it('goes back and forward in history', async () => { - let tab = await tabs.create(targetWindow.id, CLIENT_URL + '/#navigate'); - await keys.press(tab.id, 'g'); - await keys.press(tab.id, 'u'); - await keys.press(tab.id, 'H', { shiftKey: true }); - await new Promise((resolve) => setTimeout(resolve, 10)); - - tab = await tabs.get(tab.id); - expect(tab.url, 'go back in history').to.be.equal(CLIENT_URL + '/#navigate'); - await new Promise((resolve) => setTimeout(resolve, 10)); - await keys.press(tab.id, 'L', { shiftKey: true }); - - tab = await tabs.get(tab.id); - expect(tab.url, 'go next in history').to.be.equal(CLIENT_URL + '/#'); - }); - - it('goes previous page by <a>', async () => { - let tab = await tabs.create(targetWindow.id, CLIENT_URL + '/a-pagenation?page=10'); - await keys.press(tab.id, '['); - await keys.press(tab.id, '['); - await new Promise((resolve) => setTimeout(resolve, 10)); - - tab = await tabs.get(tab.id); - expect(tab.url).to.be.equal(CLIENT_URL + '/a-pagenation?page=9'); - }) - - it('goes next page by <a>', async () => { - let tab = await tabs.create(targetWindow.id, CLIENT_URL + '/a-pagenation?page=10'); - await keys.press(tab.id, ']'); - await keys.press(tab.id, ']'); - await new Promise((resolve) => setTimeout(resolve, 100)); - - tab = await tabs.get(tab.id); - expect(tab.url).to.be.equal(CLIENT_URL + '/a-pagenation?page=11'); - }) - - it('goes previous page by <link>', async () => { - let tab = await tabs.create(targetWindow.id, CLIENT_URL + '/link-pagenation?page=10'); - await keys.press(tab.id, '['); - await keys.press(tab.id, '['); - await new Promise((resolve) => setTimeout(resolve, 10)); - - tab = await tabs.get(tab.id); - expect(tab.url).to.be.equal(CLIENT_URL + '/link-pagenation?page=9'); - }) - - it('goes next page by <link>', async () => { - let tab = await tabs.create(targetWindow.id, CLIENT_URL + '/link-pagenation?page=10'); - await keys.press(tab.id, ']'); - await keys.press(tab.id, ']'); - await new Promise((resolve) => setTimeout(resolve, 10)); - - tab = await tabs.get(tab.id); - expect(tab.url).to.be.equal(CLIENT_URL + '/link-pagenation?page=11'); - }) -}); diff --git a/e2e/contents/scroll.test.js b/e2e/contents/scroll.test.js deleted file mode 100644 index f364890..0000000 --- a/e2e/contents/scroll.test.js +++ /dev/null @@ -1,106 +0,0 @@ -import * as windows from "../ambassador/src/client/windows"; -import * as tabs from "../ambassador/src/client/tabs"; -import * as keys from "../ambassador/src/client/keys"; -import * as scrolls from "../ambassador/src/client/scrolls"; -import { CLIENT_URL } from '../web-server/url'; - -describe("scroll test", () => { - let targetWindow; - let targetTab; - - before(async () => { - targetWindow = await windows.create(); - targetTab = await tabs.create(targetWindow.id, CLIENT_URL + '/scroll'); - }); - - after(async () => { - await windows.remove(targetWindow.id); - }); - - it('scrolls up by k', async () => { - let before = await scrolls.set(targetTab.id, 100, 100); - await keys.press(targetTab.id, 'k'); - - let actual = await scrolls.get(targetTab.id); - expect(actual.y).to.be.lessThan(before.y); - }); - - it('scrolls down by j', async () => { - let before = await scrolls.set(targetTab.id, 100, 100); - await keys.press(targetTab.id, 'j'); - - let actual = await scrolls.get(targetTab.id); - expect(actual.y).to.be.greaterThan(before.y); - }); - - it('scrolls left by h', async () => { - let before = await scrolls.set(targetTab.id, 100, 100) - await keys.press(targetTab.id, 'h'); - - let actual = await scrolls.get(targetTab.id); - expect(actual.x).to.be.lessThan(before.x); - }); - - it('scrolls top by gg', async () => { - await scrolls.set(targetTab.id, 100, 100); - await keys.press(targetTab.id, 'g'); - await keys.press(targetTab.id, 'g'); - let actual = await scrolls.get(targetTab.id); - expect(actual.y).to.be.equals(0); - }); - - it('scrolls bottom by G', async () => { - await scrolls.set(targetTab.id, 100, 100); - await keys.press(targetTab.id, 'G', { shiftKey: true }); - - let actual = await scrolls.get(targetTab.id); - expect(actual.y).to.be.equals(actual.yMax); - }); - - it('scrolls bottom by 0', async () => { - await scrolls.set(targetTab.id, 100, 100); - await keys.press(targetTab.id, '0'); - - let actual = await scrolls.get(targetTab.id); - expect(actual.x).to.be.equals(0); - }); - - it('scrolls bottom by $', async () => { - await scrolls.set(targetTab.id, 100, 100); - await keys.press(targetTab.id, '$'); - - let actual = await scrolls.get(targetTab.id); - expect(actual.x).to.be.equals(actual.xMax); - }); - - it('scrolls bottom by <C-U>', async () => { - let before = await scrolls.set(targetTab.id, 5000, 5000); - await keys.press(targetTab.id, 'u', { ctrlKey: true }); - - let actual = await scrolls.get(targetTab.id); - expect(actual.y).to.closeTo(before.y - before.frameHeight / 2, 1); - }); - - it('scrolls bottom by <C-D>', async () => { - let before = await scrolls.set(targetTab.id, 5000, 5000); - await keys.press(targetTab.id, 'd', { ctrlKey: true }); - - let actual = await scrolls.get(targetTab.id); - expect(actual.y).to.closeTo(before.y + before.frameHeight / 2, 1); - }); - - it('scrolls bottom by <C-B>', async () => { - let before = await scrolls.set(targetTab.id, 5000, 5000); - await keys.press(targetTab.id, 'b', { ctrlKey: true }); - - let actual = await await scrolls.get(targetTab.id); - expect(actual.y).to.equals(before.y - before.frameHeight); - }); - - it('scrolls bottom by <C-F>', async () => { - let before = await scrolls.set(targetTab.id, 5000, 5000); - await keys.press(targetTab.id, 'f', { ctrlKey: true }); - let actual = await scrolls.get(targetTab.id); - expect(actual.y).to.equals(before.y + before.frameHeight); - }); -}); diff --git a/e2e/contents/tab.test.js b/e2e/contents/tab.test.js deleted file mode 100644 index 3c98dc9..0000000 --- a/e2e/contents/tab.test.js +++ /dev/null @@ -1,192 +0,0 @@ -import * as windows from "../ambassador/src/client/windows"; -import * as tabs from "../ambassador/src/client/tabs"; -import * as keys from "../ambassador/src/client/keys"; -import { CLIENT_URL } from '../web-server/url'; - -describe("tab test", () => { - let targetWindow; - - beforeEach(async () => { - targetWindow = await windows.create(CLIENT_URL); - }); - - afterEach(async () => { - await windows.remove(targetWindow.id); - }); - - it('deletes tab by d', async () => { - let tab = await tabs.create(targetWindow.id, CLIENT_URL); - let before = await windows.get(targetWindow.id); - await keys.press(tab.id, 'd'); - - let actual = await windows.get(targetWindow.id); - expect(actual.tabs).to.have.lengthOf(before.tabs.length - 1); - }); - - it('deletes tabs to the right by D', async () => { - let tab1 = await tabs.create(targetWindow.id, CLIENT_URL + '#1'); - await tabs.create(targetWindow.id, CLIENT_URL + '#2'); - await tabs.create(targetWindow.id, CLIENT_URL + '#3'); - - let before = await windows.get(targetWindow.id) - let tab = await tabs.selectAt(targetWindow.id, tab1.index) - await keys.press(tab.id, 'D', { shiftKey: true }); - - let actual = await windows.get(targetWindow.id); - expect(actual.tabs).to.have.lengthOf(before.tabs.length - 2); - }); - - it('duplicates tab by zd', async () => { - let tab = await tabs.create(targetWindow.id, CLIENT_URL); - let before = await windows.get(targetWindow.id) - await keys.press(tab.id, 'z'); - await keys.press(tab.id, 'd'); - - let actual = await windows.get(targetWindow.id); - expect(actual.tabs).to.have.lengthOf(before.tabs.length + 1); - }); - - it('makes pinned by zp', async () => { - let tab = await tabs.create(targetWindow.id, CLIENT_URL); - let before = await windows.get(targetWindow.id); - await keys.press(tab.id, 'z'); - await keys.press(tab.id, 'p'); - - let actual = await windows.get(targetWindow.id); - expect(actual.tabs[0].pinned).to.be.true; - }); - - it('selects previous tab by K', async () => { - await tabs.create(targetWindow.id, CLIENT_URL + '#1'); - await tabs.create(targetWindow.id, CLIENT_URL + '#2'); - await tabs.create(targetWindow.id, CLIENT_URL + '#3'); - let tab = await tabs.selectAt(targetWindow.id, 2); - await keys.press(tab.id, 'K', { shiftKey: true }); - - let win = await windows.get(targetWindow.id); - expect(win.tabs[1].active).to.be.true; - }); - - it('selects previous tab by K rotatory', async () => { - await tabs.create(targetWindow.id, CLIENT_URL + '#1'); - await tabs.create(targetWindow.id, CLIENT_URL + '#2'); - await tabs.create(targetWindow.id, CLIENT_URL + '#3'); - let tab = await tabs.selectAt(targetWindow.id, 0); - await keys.press(tab.id, 'K', { shiftKey: true }); - - let win = await windows.get(targetWindow.id); - expect(win.tabs[3].active).to.be.true; - }); - - it('selects next tab by J', async () => { - await tabs.create(targetWindow.id, CLIENT_URL + '#1'); - await tabs.create(targetWindow.id, CLIENT_URL + '#2'); - await tabs.create(targetWindow.id, CLIENT_URL + '#3'); - let tab = await tabs.selectAt(targetWindow.id, 2); - await keys.press(tab.id, 'J', { shiftKey: true }); - - let win = await windows.get(targetWindow.id); - expect(win.tabs[3].active).to.be.true; - }); - - it('selects previous tab by J rotatory', async () => { - await tabs.create(targetWindow.id, CLIENT_URL + '#1'); - await tabs.create(targetWindow.id, CLIENT_URL + '#2'); - await tabs.create(targetWindow.id, CLIENT_URL + '#3'); - let tab = await tabs.selectAt(targetWindow.id, 3); - await keys.press(tab.id, 'J', { shiftKey: true }); - - let win = await windows.get(targetWindow.id); - expect(win.tabs[0].active).to.be.true; - }); - - it('selects first tab by g0', async () => { - await tabs.create(targetWindow.id, CLIENT_URL + '#1'); - await tabs.create(targetWindow.id, CLIENT_URL + '#2'); - await tabs.create(targetWindow.id, CLIENT_URL + '#3'); - let tab = await tabs.selectAt(targetWindow.id, 2); - await keys.press(tab.id, 'g'); - await keys.press(tab.id, '0'); - - let win = await windows.get(targetWindow.id); - expect(win.tabs[0].active).to.be.true; - }); - - it('selects last tab by g$', async () => { - await tabs.create(targetWindow.id, CLIENT_URL + '#1'); - await tabs.create(targetWindow.id, CLIENT_URL + '#2'); - await tabs.create(targetWindow.id, CLIENT_URL + '#3'); - let tab = await tabs.selectAt(targetWindow.id, 2); - await keys.press(tab.id, 'g'); - await keys.press(tab.id, '$'); - - let win = await windows.get(targetWindow.id); - expect(win.tabs[3].active).to.be.true; - }); - - it('selects last selected tab by <C-6>', async () => { - await tabs.create(targetWindow.id, CLIENT_URL + '#1'); - await tabs.create(targetWindow.id, CLIENT_URL + '#2'); - await tabs.create(targetWindow.id, CLIENT_URL + '#3'); - await tabs.selectAt(targetWindow.id, 1); - let tab = await tabs.selectAt(targetWindow.id, 3); - await keys.press(tab.id, '6', { ctrlKey: true }); - - let win = await windows.get(targetWindow.id); - expect(win.tabs[1].active).to.be.true; - }); - - it('deletes tab by d', async () => { - let tab = await tabs.create(targetWindow.id, CLIENT_URL + '#1'); - await keys.press(tab.id, 'd'); - - let win = await windows.get(targetWindow.id); - expect(win.tabs).to.have.lengthOf(1); - }); - - it('reopen tab by u', async () => { - let tab = await tabs.create(targetWindow.id, CLIENT_URL + '#1'); - await keys.press(tab.id, 'd'); - - let win = await windows.get(targetWindow.id); - expect(win.tabs).to.have.lengthOf(1); - - await keys.press(win.tabs[0].id, 'u'); - await new Promise(resolve => setTimeout(resolve, 100)); - - win = await windows.get(targetWindow.id); - expect(win.tabs).to.have.lengthOf(2); - }); - - it('does not delete pinned tab by d', async () => { - let tab = await tabs.create(targetWindow.id, CLIENT_URL + '#1'); - tab = await tabs.update(tab.id, { pinned: true }); - await keys.press(tab.id, 'd'); - - let win = await windows.get(targetWindow.id); - expect(win.tabs).to.have.lengthOf(2); - }); - - it('deletes pinned tab by !d', async () => { - let tab = await tabs.create(targetWindow.id, CLIENT_URL + '#1'); - tab = await tabs.update(tab.id, { pinned: true }); - await keys.press(tab.id, '!'); - await keys.press(tab.id, 'd'); - - let win = await windows.get(targetWindow.id); - expect(win.tabs).to.have.lengthOf(1); - }); - - it('opens view-source by gf', async () => { - await new Promise(resolve => setTimeout(resolve, 100)); - let win = await windows.get(targetWindow.id); - let tab = win.tabs[0]; - await keys.press(tab.id, 'g'); - await keys.press(tab.id, 'f'); - await new Promise(resolve => setTimeout(resolve, 500)); - - win = await windows.get(targetWindow.id); - let urls = win.tabs.map((t) => t.url) - expect(urls).to.include.members([CLIENT_URL + '/', 'view-source:' + CLIENT_URL + '/']); - }); -}); diff --git a/e2e/contents/zoom.test.js b/e2e/contents/zoom.test.js deleted file mode 100644 index 74d4f56..0000000 --- a/e2e/contents/zoom.test.js +++ /dev/null @@ -1,53 +0,0 @@ -import * as windows from "../ambassador/src/client/windows"; -import * as tabs from "../ambassador/src/client/tabs"; -import * as keys from "../ambassador/src/client/keys"; -import { CLIENT_URL } from '../web-server/url'; - -describe("zoom test", () => { - let targetWindow; - let targetTab; - - before(async () => { - targetWindow = await windows.create(CLIENT_URL); - }); - - after(async () => { - await windows.remove(targetWindow.id); - }); - - beforeEach(async () => { - targetTab = await tabs.create(targetWindow.id, CLIENT_URL); - }); - - it('zooms-in by zi', async () => { - let before = await tabs.getZoom(targetTab.id); - await keys.press(targetTab.id, 'z'); - await keys.press(targetTab.id, 'i'); - await new Promise(resolve => setTimeout(resolve, 100)); - - let actual = await tabs.getZoom(targetTab.id); - expect(actual).to.be.greaterThan(before); - }); - - it('zooms-in by zo', async () => { - let before = await tabs.getZoom(targetTab.id); - await keys.press(targetTab.id, 'z'); - await keys.press(targetTab.id, 'o'); - await new Promise(resolve => setTimeout(resolve, 100)); - - let actual = await tabs.getZoom(targetTab.id); - expect(actual).to.be.lessThan(before); - }); - - it('zooms-in by zz', async () => { - await tabs.setZoom(targetTab.id, 1.5); - let before = await tabs.getZoom(targetTab.id); - await keys.press(targetTab.id, 'z'); - await keys.press(targetTab.id, 'z'); - await new Promise(resolve => setTimeout(resolve, 100)); - - let actual = await tabs.getZoom(targetTab.id); - expect(actual).to.be.lessThan(before); - expect(actual).to.equal(1); - }); -}); |