使用--element-explorer无法运行ng e2e

时间:2018-12-31 11:12:07

标签: angular protractor e2e-testing angular-e2e

我试图弄清楚如何调试端到端测试。我是一个有角度的项目中的量角器,并使用error C3203: 'Event': unspecialized class template can't be used as a template argument for template parameter 'MostDerived', expected a real type error C2460: 'Event<EventOne>::m_event': uses 'Event<Startup>', which is being defined error C3203: 'Event': unspecialized class template can't be used as a template argument for template parameter 'MostDerived', expected a real type 自定义框架。

protractor-cucumber-framework

我正在为此功能设置一个断点。

然后我运行命令Given('[...]', async () => { await page.goToMeetupsListPage(); const profile: Profile = getMichel(); await page.setProfile(JSON.stringify(profile)); await page.refreshPage(); }); ,该命令应该查找断点。

然后我在启动时收到此错误:

ng e2e --element-explorer

我不知道发生了什么。我尝试删除每个/Users/.../node_modules/protractor/built/debugger.js:212 doneDeferred.fulfill(true); ^ TypeError: doneDeferred.fulfill is not a function at Socket.tester.once (/Users/b.../node_modules/protractor/built/debugger.js:212:34) at Object.onceWrapper (events.js:273:13) at Socket.emit (events.js:182:13) at Socket.EventEmitter.emit (domain.js:441:20) at TCP._handle.close (net.js:611:12) 关键字,但仍显示相同的消息。有想法吗?

1 个答案:

答案 0 :(得分:1)

显然--element-explorer参数似乎不适用于调试e2e测试。相反,您需要使用--inspect-brk

手动运行量角器
node --inspect-brk ./node_modules/protractor/bin/protractor ./e2e/protractor.conf.js

然后只需遵循official guide