mirror of
https://github.com/vale981/tridactyl
synced 2025-03-06 01:51:40 -05:00
Try another fix
This commit is contained in:
parent
0ebc44741b
commit
9b4d52dbd2
3 changed files with 6 additions and 9 deletions
|
@ -894,7 +894,7 @@ export async function curJumps() {
|
||||||
}
|
}
|
||||||
const page = getJumpPageId()
|
const page = getJumpPageId()
|
||||||
ensure(jumps, page, {})
|
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)
|
ensure(jumps[page], "cur", 0)
|
||||||
saveJumps(jumps)
|
saveJumps(jumps)
|
||||||
return jumps
|
return jumps
|
||||||
|
|
|
@ -3,8 +3,9 @@ import "geckodriver"
|
||||||
import * as fs from "fs"
|
import * as fs from "fs"
|
||||||
import * as os from "os"
|
import * as os from "os"
|
||||||
import * as path from "path"
|
import * as path from "path"
|
||||||
import * as webdriver from "./selenium-webdriver-tridactyl"
|
import * as webdriver from "selenium-webdriver"
|
||||||
const {until, By} = webdriver
|
import * as Until from "selenium-webdriver/lib/until"
|
||||||
|
const {By} = webdriver
|
||||||
import {Options} from "selenium-webdriver/firefox"
|
import {Options} from "selenium-webdriver/firefox"
|
||||||
|
|
||||||
jest.setTimeout(100000)
|
jest.setTimeout(100000)
|
||||||
|
@ -91,7 +92,7 @@ function sendKeys (driver, keys) {
|
||||||
describe("webdriver", () => {
|
describe("webdriver", () => {
|
||||||
|
|
||||||
function iframeLoaded(driver) {
|
function iframeLoaded(driver) {
|
||||||
return driver.wait(until.elementLocated(By.id("cmdline_iframe")))
|
return driver.wait(Until.elementLocated(By.id("cmdline_iframe")))
|
||||||
}
|
}
|
||||||
|
|
||||||
async function getDriver() {
|
async function getDriver() {
|
||||||
|
@ -199,7 +200,7 @@ describe("webdriver", () => {
|
||||||
// Then, make sure rsscmd is executed and has the right arguments
|
// Then, make sure rsscmd is executed and has the right arguments
|
||||||
await sendKeys(driver, "<Tab><CR>")
|
await sendKeys(driver, "<Tab><CR>")
|
||||||
await (driver.switchTo() as any).parentFrame()
|
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"))
|
expect(url).toMatch(await elem.getAttribute("innerText"))
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
fail(e)
|
fail(e)
|
||||||
|
|
|
@ -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 }
|
|
Loading…
Add table
Reference in a new issue