【发布时间】:2013-04-11 13:36:41
【问题描述】:
我抓住了 Angular Seed 项目并修改了它的场景测试。我正在尝试一个非常简单的测试,所以我相信这是我所缺少的。这是 DSL 和场景规范:
angular.scenario.dsl('customDsl', function() {
return function(selector) {
return this.addFutureAction('customDsl', function ($window, $document, done) {
done(null, selector + ' is ok!');
});
};
});
describe('my app', function() {
it('should pass', function() {
expect(customDsl('test')).toBe('test is ok!');
});
});
运行测试失败并显示以下消息:
Frame window is not accessible.
我正在使用 Windows 7 并在 Chrome 中运行场景。为了运行测试,我启动了服务器 node scripts\web-server.js,然后是 scripts\e2e-test.bat。
【问题讨论】:
标签: angularjs angular-scenario