1

我有一个刚刚开始失败的 e2e 测试。它看起来像这样:

myPageInstance.myDirectiveWithIsolateScope.evaluate("myIsolateScopeProperty")
.then(function(myIsolateScopeProperty) {
    expect(myIsolateScopeProperty.someKey).toEqual('');
})

如果我在那里扔一个ptor.debugger(),我可以使用开发工具来查看:

angular.element(myElementWithIsolateScopeDirective)
    .scope().myIsolateScopeProperty === 'undefined'

然而:

angular.element(myElementWithIsolateScopeDirective)
    .isolateScope().myIsolateScopeProperty == {someKey:''}

我认为这可能是由于Angular 发生了重大变化,但如果我说我完全理解他们的描述,那我又是在撒谎。

4

0 回答 0