mirror of
https://github.com/vale981/tridactyl
synced 2025-03-04 17:11:40 -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:
|
||||
TESTING: 1
|
||||
HEADLESS: 1
|
||||
|
||||
jobs:
|
||||
test:
|
||||
|
|
|
@ -1,5 +1,7 @@
|
|||
import "geckodriver"
|
||||
|
||||
import * as process from "process"
|
||||
const env = process.env
|
||||
import * as fs from "fs"
|
||||
import * as os from "os"
|
||||
import * as path from "path"
|
||||
|
@ -99,11 +101,15 @@ describe("webdriver", () => {
|
|||
const dir = "web-ext-artifacts"
|
||||
const extensionName = "tridactyl.xpi"
|
||||
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()
|
||||
.forBrowser("firefox")
|
||||
.setFirefoxOptions((new Options())
|
||||
.setPreference("xpinstall.signatures.required", false)
|
||||
.addExtensions(extensionPath))
|
||||
.setFirefoxOptions(options)
|
||||
.build()
|
||||
// Wait until addon is loaded and :tutor is displayed
|
||||
await iframeLoaded(driver)
|
||||
|
|
Loading…
Add table
Reference in a new issue