build(aio): output {@example} tags as <code-example> elements (#15382)

This commit is contained in:
Pete Bacon Darwin
2017-03-22 20:24:40 +00:00
committed by Igor Minar
parent c58499786c
commit 8b4edcc7ad
6 changed files with 118 additions and 39 deletions

View File

@ -31,7 +31,12 @@ describe('site App', function() {
expect(page.getDocViewerText()).toMatch(/Tutorial: Tour of Heroes/i);
});
it('should convert a doc with a code-example');
it('should render `{@example}` dgeni tags as `<code-example>` elements with HTML escaped content', () => {
page.navigateTo('guide/component-styles');
const codeExample = element.all(by.css('code-example')).first();
expect(page.getInnerHtml(codeExample))
.toContain('@Component({\n selector: \'hero-app\',\n template: `\n &lt;h1&gt;Tour of Heroes&lt;/h1&gt;');
});
describe('api-docs', () => {
it('should show a link to github', () => {