Try another fix

This commit is contained in:
Jakub Okoński 2019-10-18 14:39:47 +02:00
parent 0ebc44741b
commit 9b4d52dbd2
3 changed files with 6 additions and 9 deletions

View file

@ -894,7 +894,7 @@ export async function curJumps() {
}
const page = getJumpPageId()
ensure(jumps, page, {})
ensure(jumps[page], "list", [{ x: 0, y: 0 }])
ensure(jumps[page], "list", [{ x: window.scrollX, y: window.scrollY }])
ensure(jumps[page], "cur", 0)
saveJumps(jumps)
return jumps

View file

@ -3,8 +3,9 @@ import "geckodriver"
import * as fs from "fs"
import * as os from "os"
import * as path from "path"
import * as webdriver from "./selenium-webdriver-tridactyl"
const {until, By} = webdriver
import * as webdriver from "selenium-webdriver"
import * as Until from "selenium-webdriver/lib/until"
const {By} = webdriver
import {Options} from "selenium-webdriver/firefox"
jest.setTimeout(100000)
@ -91,7 +92,7 @@ function sendKeys (driver, keys) {
describe("webdriver", () => {
function iframeLoaded(driver) {
return driver.wait(until.elementLocated(By.id("cmdline_iframe")))
return driver.wait(Until.elementLocated(By.id("cmdline_iframe")))
}
async function getDriver() {
@ -199,7 +200,7 @@ describe("webdriver", () => {
// Then, make sure rsscmd is executed and has the right arguments
await sendKeys(driver, "<Tab><CR>")
await (driver.switchTo() as any).parentFrame()
const elem = await driver.wait(until.elementLocated(By.id("rsscmdExecuted")))
const elem = await driver.wait(Until.elementLocated(By.id("rsscmdExecuted")))
expect(url).toMatch(await elem.getAttribute("innerText"))
} catch (e) {
fail(e)

View file

@ -1,4 +0,0 @@
export * from "selenium-webdriver"
// typings only have capitalized export, but the JS library exports lowercase
import * as until from "selenium-webdriver/lib/until"
export { until }