mirror of
https://github.com/hensm/fx_cast.git
synced 2026-06-08 08:39:59 +00:00
Fix test extension location
This commit is contained in:
@@ -83,7 +83,12 @@ if (argv.watch) {
|
|||||||
// Prevent auto-exit
|
// Prevent auto-exit
|
||||||
shouldExitProgram: false
|
shouldExitProgram: false
|
||||||
|
|
||||||
}).then(() => {
|
}).then(result => {
|
||||||
|
const archiveName = path.basename(result.extensionPath);
|
||||||
|
|
||||||
|
fs.moveSync(path.join(DIST_PATH, archiveName)
|
||||||
|
, path.join(DIST_PATH, archiveName.replace("zip", "xpi")));
|
||||||
|
|
||||||
// Only need the built extension archive
|
// Only need the built extension archive
|
||||||
fs.remove(UNPACKED_PATH);
|
fs.remove(UNPACKED_PATH);
|
||||||
})
|
})
|
||||||
|
|||||||
@@ -1,17 +1,32 @@
|
|||||||
"use strict";
|
"use strict";
|
||||||
|
|
||||||
const path = require("path");
|
const path = require("path");
|
||||||
|
const glob = require("glob");
|
||||||
|
const fs = require("fs");
|
||||||
|
|
||||||
const webdriver = require("selenium-webdriver");
|
const webdriver = require("selenium-webdriver");
|
||||||
const firefox = require("selenium-webdriver/firefox");
|
const firefox = require("selenium-webdriver/firefox");
|
||||||
const chrome = require("selenium-webdriver/chrome");
|
const chrome = require("selenium-webdriver/chrome");
|
||||||
|
|
||||||
|
const { __extensionName
|
||||||
|
, __extensionVersion } = require("../ext/package.json");
|
||||||
|
|
||||||
|
|
||||||
|
const extensionArchivePath = path.join(
|
||||||
|
path.join(__dirname, "../dist/ext/")
|
||||||
|
, `${__extensionName}-${__extensionVersion}.xpi`);
|
||||||
|
|
||||||
|
if (!fs.existsSync(extensionArchivePath)) {
|
||||||
|
console.error("Extension archive not found.");
|
||||||
|
process.exit(1);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
const TEST_PAGE_URL = `file:///${__dirname}/test.html`;
|
const TEST_PAGE_URL = `file:///${__dirname}/test.html`;
|
||||||
|
|
||||||
const firefoxOptions = new firefox.Options()
|
const firefoxOptions = new firefox.Options()
|
||||||
.headless()
|
.headless()
|
||||||
.addExtensions(path.resolve(__dirname, "../dist/ext/ext.xpi"))
|
.addExtensions(extensionArchivePath)
|
||||||
.setPreference("xpinstall.signatures.required", false);
|
.setPreference("xpinstall.signatures.required", false);
|
||||||
|
|
||||||
const chromeOptions = new chrome.Options()
|
const chromeOptions = new chrome.Options()
|
||||||
|
|||||||
Reference in New Issue
Block a user