角度量角器未检测到渲染的组件标签

时间:2018-10-03 15:39:48

标签: angular jasmine protractor e2e-testing angular-e2e

我想检查我的app.component.htm是否具有呈现chart所必需的标记chartComponent html标记。

// app.e2e-spec.ts

import { AppPage } from './app.po';
import { by, element } from 'protractor';

describe('App', () => {
  let page: AppPage;

  beforeEach(() => {
    page = new AppPage();
  });

  it('should have a chart element', () => {
    page.navigateTo();
    const elem =  element(by.css('chart'));
    expect(elem.isPresent()).toBeTruthy();
  });
});

然后是组件:

// app.component.html
<chart></chart>

总是以- Failed: script timeout: result was not received in 11 seconds

失败

这有什么问题? chart元素在浏览器中按预期呈现。

0 个答案:

没有答案