Тестирование Angular Karma E2E на внешнюю ссылку

Я пытаюсь проверить ссылку для перехода на страницу Twitter. Это возможно?

index.html

<a class="navbar-brand" href="https://twitter.com/foo">@foo</a>

карма-e2e.conf.js

proxies : {
  '/': 'http://localhost:8000/',
  '/twitter/': 'https://twitter.com/'
},

сценарии.js

it('should redirect to twitter page when link is clicked', function() {
  element('.navbar a').click();
  expect(browser().location().url()).toBe('/twitter/foo');
});

Ошибка

Uncaught SecurityError: Blocked a frame with origin "http://localhost:9877" from accessing a cross-origin frame.
at /foobar/node_modules/karma-ng-scenario/lib/adapter.js:43

person collinglass    schedule 27.12.2013    source источник


Ответы (1)


Вот что я настроил для работы с тестером e2e:

 config.set({
            browsers: ['chrome_without_security'],
            customLaunchers: {
                chrome_without_security: {
                    base: 'Chrome',
                    flags: ['--disable-web-security']
                }
            }
        });
person zaysha    schedule 24.03.2014