1

我想检查我app.component.htm的标签是否有chart渲染我的chartComponent.

// 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在浏览器中按预期呈现的元素。

4

0 回答 0