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