Authentication 在AngularJS基本路径之外导航时,TestCular冻结

Authentication 在AngularJS基本路径之外导航时,TestCular冻结,authentication,angularjs,karma-runner,Authentication,Angularjs,Karma Runner,我有一个需要身份验证的AngularJS应用程序。它是由Express提供服务的一个更大项目的一部分,位于自己的基本路径:,而不是。现有应用程序已具有往返登录。用户需要先登录才能访问Angular应用程序。除了使用TestCular进行e2e测试外,该方法工作正常 在服务器上禁用身份验证的情况下,e2e测试可以正常运行。例如: describe 'protected app', -> it 'should display the index', -> browser()

我有一个需要身份验证的AngularJS应用程序。它是由Express提供服务的一个更大项目的一部分,位于自己的基本路径:
,而不是
。现有应用程序已具有往返登录。用户需要先登录才能访问Angular应用程序。除了使用TestCular进行e2e测试外,该方法工作正常

在服务器上禁用身份验证的情况下,e2e测试可以正常运行。例如:

describe 'protected app', ->

  it 'should display the index', ->
    browser().navigateTo '/path/to/app'
    expect(browser().location().url()).toBe '/'

  it 'etc...'
显然,使用服务器端身份验证,这将失败。我们需要先登录。我们得到以下错误:

Sandbox Error: Application document not accessible.
当我们尝试在场景中登录时,问题就出现了

describe 'protected app', ->

  it 'should authenticate', ->
    browser().navigateTo '../login'
    #input('#email').enter('admin@example.com')
    #input('#password').enter('secret')
    #element('button').click()    

  it 'should display the index', ->
    browser().navigateTo '/path/to/app'
    expect(browser().location().url()).toBe '/'

  it 'etc...'
运行此操作(无论是否填写表单并单击)都会导致登录页面加载和冻结。TestCular从未完成运行,它只是挂在登录页面上


我对角度/测试性/e2e测试的理解是否存在缺陷,或者可能存在缺陷?

Vojta说这不是测试性问题。问题是Angular scenario runner不支持整页重新加载