首页 > 解决方案 > 禁用酱连接预取

问题描述

npm install当我在聚合物项目上运行时,有没有办法可以禁用酱汁连接二进制文件的预取?

我在一个与外界没有联系的 CI 上运行我的测试。我不想使用酱汁连接二进制文件,所以我希望能够禁用二进制文件的获取。

wct.conf.js:

const seleniumGridAddress = 'http://selenium-hub:4444/wd/hub';
const os = require('os');

let json;

if (os.platform() !== 'darwin') {
    json = {
        activeBrowsers: [{
            browserName: 'chrome',
            url: seleniumGridAddress
        }
        ],
        expanded: true,
        suites: [
            'test/**/*_test.html'
        ],
        webserver: {
            hostname: os.hostname()
        },
    }
} else {
    json = {
        expanded: true,
        plugins: {
            local: {
                browsers: ["chrome"]
            },
        },
        suites: [
            'test/**/*_test.html'
        ]
    }
}

module.exports = json;

标签: javascriptpolymersaucelabsweb-component-tester

解决方案


在 wct 源代码中发现,您可以将其设置SKIP_WCT_SAUCE_POSTINSTALL_DOWNLOAD为环境变量以禁用2.0.0-pre.1https://github.com/Polymer/wct-sauce/blob/master/CHANGELOG.md上获取 Sauce Connect 二进制 CFR


推荐阅读