diff options
author | Shin'ya Ueoka <ueokande@i-beam.org> | 2019-12-22 10:28:14 +0900 |
---|---|---|
committer | Shin'ya Ueoka <ueokande@i-beam.org> | 2019-12-22 10:48:39 +0900 |
commit | 029d5365e7d74e87375fccb8db097b7c2df3f7f4 (patch) | |
tree | 6a24c719da9c60461c7e2fe120b0d42af9e580f2 /e2e/lib/Page.ts | |
parent | d72012529bcd820598fa64e1aa20dab1c16acaa5 (diff) |
npm run lint:fix
Diffstat (limited to 'e2e/lib/Page.ts')
-rw-r--r-- | e2e/lib/Page.ts | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/e2e/lib/Page.ts b/e2e/lib/Page.ts index 7a5dd7a..ad3f454 100644 --- a/e2e/lib/Page.ts +++ b/e2e/lib/Page.ts @@ -22,7 +22,7 @@ export default class Page { } async sendKeys(...keys: Array<string|number|Promise<string|number>>): Promise<void> { - let body = await this.webdriver.findElement(By.css('body')); + const body = await this.webdriver.findElement(By.css('body')); await body.sendKeys(...keys); } @@ -33,7 +33,7 @@ export default class Page { } async showConsole(): Promise<Console> { - let iframe = this.webdriver.findElement(By.css('#vimvixen-console-frame')); + const iframe = this.webdriver.findElement(By.css('#vimvixen-console-frame')); await this.sendKeys(':'); await this.webdriver.wait(until.elementIsVisible(iframe)); @@ -43,7 +43,7 @@ export default class Page { } async getConsole(): Promise<Console> { - let iframe = this.webdriver.findElement(By.css('#vimvixen-console-frame')); + const iframe = this.webdriver.findElement(By.css('#vimvixen-console-frame')); await this.webdriver.wait(until.elementIsVisible(iframe)); await this.webdriver.switchTo().frame(0); @@ -69,11 +69,11 @@ export default class Page { async waitAndGetHints(): Promise<Hint[]> { await this.webdriver.wait(until.elementsLocated(By.css('.vimvixen-hint'))); - let elements = await this.webdriver.findElements(By.css(`.vimvixen-hint`)); - let hints = []; - for (let e of elements) { - let display = await e.getCssValue('display'); - let text = await e.getText(); + const elements = await this.webdriver.findElements(By.css(`.vimvixen-hint`)); + const hints = []; + for (const e of elements) { + const display = await e.getCssValue('display'); + const text = await e.getText(); hints.push({ displayed: display !== 'none', text: text, @@ -83,7 +83,7 @@ export default class Page { } private static async waitForConsoleLoaded(webdriver: WebDriver) { - let topFrame = await webdriver.executeScript(() => window.top === window); + const topFrame = await webdriver.executeScript(() => window.top === window); if (!topFrame) { return; } |