我想在没有浏览器弹出窗口的情况下运行测试。如图所示安装wct-headless并配置wct.config.json
{
"plugins": {
"local": {
"disabled": true
},
"headless": {
"browsers": [
"chrome",
"firefox"
],
"browsersOptions": {
"chrome": [
"headless",
"disable-gpu",
"no-sandbox"
],
"firefox": [
"--headless"
]
}
},
"sauce": false,
"xunit-reporter": {
"output": "testfile.xml"
}
}
}
执行polymer test
时出现以下错误
找不到名为“headless”的 WCT 插件
包.json
"dependencies": {
"@polymer/polymer": "^3.0.0"
},
"devDependencies": {
"@polymer/iron-demo-helpers": "^3.0.0-pre.19",
"@webcomponents/webcomponentsjs": "^2.0.0",
"wct-browser-legacy": "^1.0.0",
"wct-headless": "^2.2.2",
"web-component-tester": "^6.8.0",
"wct-xunit-reporter": "1.0.2"
}
我应该如何配置 wct.conf.json ?