mirror of
https://github.com/vale981/tridactyl
synced 2025-03-05 09:31:41 -05:00
e2e tests: decapitate firefox
This commit is contained in:
parent
42f3d287ea
commit
53b2746108
2 changed files with 10 additions and 4 deletions
2
.github/workflows/e2e.yml
vendored
2
.github/workflows/e2e.yml
vendored
|
@ -9,7 +9,7 @@ on:
|
||||||
- '*'
|
- '*'
|
||||||
|
|
||||||
env:
|
env:
|
||||||
TESTING: 1
|
HEADLESS: 1
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
test:
|
test:
|
||||||
|
|
|
@ -1,5 +1,7 @@
|
||||||
import "geckodriver"
|
import "geckodriver"
|
||||||
|
|
||||||
|
import * as process from "process"
|
||||||
|
const env = process.env
|
||||||
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"
|
||||||
|
@ -99,11 +101,15 @@ describe("webdriver", () => {
|
||||||
const dir = "web-ext-artifacts"
|
const dir = "web-ext-artifacts"
|
||||||
const extensionName = "tridactyl.xpi"
|
const extensionName = "tridactyl.xpi"
|
||||||
const extensionPath = dir + "/" + extensionName
|
const extensionPath = dir + "/" + extensionName
|
||||||
|
const options = (new Options())
|
||||||
|
.setPreference("xpinstall.signatures.required", false)
|
||||||
|
.addExtensions(extensionPath)
|
||||||
|
if (env["HEADLESS"]) {
|
||||||
|
options.headless();
|
||||||
|
}
|
||||||
const driver = new webdriver.Builder()
|
const driver = new webdriver.Builder()
|
||||||
.forBrowser("firefox")
|
.forBrowser("firefox")
|
||||||
.setFirefoxOptions((new Options())
|
.setFirefoxOptions(options)
|
||||||
.setPreference("xpinstall.signatures.required", false)
|
|
||||||
.addExtensions(extensionPath))
|
|
||||||
.build()
|
.build()
|
||||||
// Wait until addon is loaded and :tutor is displayed
|
// Wait until addon is loaded and :tutor is displayed
|
||||||
await iframeLoaded(driver)
|
await iframeLoaded(driver)
|
||||||
|
|
Loading…
Add table
Reference in a new issue