diff options
author | Shin'ya Ueoka <ueokande@i-beam.org> | 2020-04-13 20:37:36 +0900 |
---|---|---|
committer | Shin'ya Ueoka <ueokande@i-beam.org> | 2020-04-13 20:37:36 +0900 |
commit | e1dac618a8b8929f601c7ec8aca3842c5ebf9d03 (patch) | |
tree | 6a914a8243c8c02e7752a83667a54d3fa832955c /e2e/repeat_n_times.test.ts | |
parent | 685f2b7b69218b06b5bb676069e35f79c5048c9b (diff) |
Use plugin:prettier/recommended
Diffstat (limited to 'e2e/repeat_n_times.test.ts')
-rw-r--r-- | e2e/repeat_n_times.test.ts | 47 |
1 files changed, 25 insertions, 22 deletions
diff --git a/e2e/repeat_n_times.test.ts b/e2e/repeat_n_times.test.ts index a646112..303aa34 100644 --- a/e2e/repeat_n_times.test.ts +++ b/e2e/repeat_n_times.test.ts @@ -1,24 +1,24 @@ -import * as path from 'path'; -import * as assert from 'assert'; +import * as path from "path"; +import * as assert from "assert"; -import TestServer from './lib/TestServer'; -import eventually from './eventually'; -import { Builder, Lanthan } from 'lanthan'; -import { WebDriver } from 'selenium-webdriver'; -import Page from './lib/Page'; +import TestServer from "./lib/TestServer"; +import eventually from "./eventually"; +import { Builder, Lanthan } from "lanthan"; +import { WebDriver } from "selenium-webdriver"; +import Page from "./lib/Page"; describe("tab test", () => { - const server = new TestServer().receiveContent('/', - `<!DOCTYPE html><html lang="en"><body style="width:10000px; height:10000px"></body></html>`, + const server = new TestServer().receiveContent( + "/", + `<!DOCTYPE html><html lang="en"><body style="width:10000px; height:10000px"></body></html>` ); let lanthan: Lanthan; let webdriver: WebDriver; let browser: any; - 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(); @@ -27,32 +27,35 @@ describe("tab test", () => { browser = browser; }); - after(async() => { + after(async () => { await server.stop(); if (lanthan) { await lanthan.quit(); } }); - it('repeats scroll 3-times', async () => { + it("repeats scroll 3-times", async () => { const page = await Page.navigateTo(webdriver, server.url()); - await page.sendKeys('3', 'j'); + await page.sendKeys("3", "j"); const scrollY = await page.getScrollY(); assert.strictEqual(scrollY, 64 * 3); }); - it('repeats tab deletion 3-times', async () => { - const win = await browser.windows.create({ url: server.url('/#0') }); + it("repeats tab deletion 3-times", async () => { + const win = await browser.windows.create({ url: server.url("/#0") }); for (let i = 1; i < 5; ++i) { - await browser.tabs.create({ url: server.url('/#' + i), windowId: win.id }); - await webdriver.navigate().to(server.url('/#' + i)); + await browser.tabs.create({ + url: server.url("/#" + i), + windowId: win.id, + }); + await webdriver.navigate().to(server.url("/#" + i)); } const page = await Page.navigateTo(webdriver, server.url()); - await page.sendKeys('3', 'd'); + await page.sendKeys("3", "d"); - await eventually(async() => { + await eventually(async () => { const current = await browser.tabs.query({ windowId: win.id }); assert.strictEqual(current.length, 2); }); |