分度器とキュウリを使って私の角型アプリケーションをテストしようとしていますが、期待値が偽であればモカを使って作成します仕様はコンソールに表示されません。分度器とCucumber.js:期待は期待通りに機能しません。
ルートhttp://localhost:9000/#/form29/form29に関連するHTML "
...
<h4 class="title">
The title
</h4>
...
そして、私のステップは、それをファイルには、次のとおりです。
//form29_steps.js
var chai = require('chai'),
chaiAsPromised = require('chai-as-promised'),
assert;
chai.use(chaiAsPromised);
expect = chai.expect;
module.exports = function() {
this.Given(/^I am in the form 29 page$/, function (done) {
browser.get('http://localhost:9000/#/form29/form29');
done();
});
this.Then(/^should be the title "(.*)"/,function(title, done){
var el = element(by.css('.title'));
el.getText().then(function(text){
//a false expect
expect(title).to.eq('Aaaaa');
done();
});
});
};
その有効なのOKを期待する場合、予想が失敗したときにエラーが発生するとは期待できず、次のように表示されます。
[16:14:08] E/launcher - "process.on('uncaughtException'" error, see launcher
[16:14:08] E/launcher - Process exited with error code 199
私は同じことをしようとしたが、これは、私は私が望むエラーが出るだけでなく
this.Then(/^should be the title "(.*)"/,function(title, done){
var el = element(by.css('.title'));
expect(title).to.eq('A');
done();
});
働くと約束を使用していない:
Message:
AssertionError: expected 'Formulario 29' to equal 'A'
at World.<anonymous> (/protractor/test/e2e/features/step_definitions/form29_steps.js:18:20)
at _combinedTickCallback (internal/process/next_tick.js:67:7)
at process._tickCallback (internal/process/next_tick.js:98:9)
なぜこれが起こるのか?
キャッチされない例外は、さまざまなことを意味する可能性がありますが、[私は最近それを持っていました](http://stackoverflow.com/questions/38397965/uncaughtexception-after-a-protractor-run)。 – alecxe