diff options
Diffstat (limited to 'e2e/zoom.test.ts')
-rw-r--r-- | e2e/zoom.test.ts | 44 |
1 files changed, 21 insertions, 23 deletions
diff --git a/e2e/zoom.test.ts b/e2e/zoom.test.ts index d089097..5e21774 100644 --- a/e2e/zoom.test.ts +++ b/e2e/zoom.test.ts @@ -1,10 +1,10 @@ -import * as path from 'path'; -import * as assert from 'assert'; +import * as path from "path"; +import * as assert from "assert"; -import eventually from './eventually'; -import { Builder, Lanthan } from 'lanthan'; -import { WebDriver } from 'selenium-webdriver'; -import Page from './lib/Page'; +import eventually from "./eventually"; +import { Builder, Lanthan } from "lanthan"; +import { WebDriver } from "selenium-webdriver"; +import Page from "./lib/Page"; describe("zoom test", () => { let lanthan: Lanthan; @@ -13,10 +13,9 @@ describe("zoom test", () => { let tab: any; let page: Page; - before(async() => { - lanthan = await Builder - .forBrowser('firefox') - .spyAddon(path.join(__dirname, '..')) + before(async () => { + lanthan = await Builder.forBrowser("firefox") + .spyAddon(path.join(__dirname, "..")) .build(); webdriver = lanthan.getWebDriver(); browser = lanthan.getWebExtBrowser(); @@ -24,42 +23,41 @@ describe("zoom test", () => { page = await Page.currentContext(webdriver); }); - after(async() => { + after(async () => { await lanthan.quit(); }); - beforeEach(async() => { - await webdriver.navigate().to('about:blank'); + beforeEach(async () => { + await webdriver.navigate().to("about:blank"); }); - it('should zoom in by zi', async () => { + it("should zoom in by zi", async () => { const before = await browser.tabs.getZoom(tab.id); - await page.sendKeys('zi'); + await page.sendKeys("zi"); - await eventually(async() => { + await eventually(async () => { const actual = await browser.tabs.getZoom(tab.id); assert.ok(before < actual); }); }); - it('should zoom out by zo', async () => { + it("should zoom out by zo", async () => { const before = await browser.tabs.getZoom(tab.id); - await page.sendKeys('zo'); + await page.sendKeys("zo"); - await eventually(async() => { + await eventually(async () => { const actual = await browser.tabs.getZoom(tab.id); assert.ok(before > actual); }); }); - it('should reset zoom by zz', async () => { + it("should reset zoom by zz", async () => { await browser.tabs.setZoom(tab.id, 2); - await page.sendKeys('zz'); + await page.sendKeys("zz"); - await eventually(async() => { + await eventually(async () => { const actual = await browser.tabs.getZoom(tab.id); assert.strictEqual(actual, 1); }); }); }); - |