test(docs-infra): ufix e2e test for {@example} dgeni tags (#45551)

Previously, the `guide/compoent-style` page was used in e2e tests to
verify the behavior of `{@example}` dgeni tags. However, this guide has
been updated and no longer contains an `{@example}` tag.

This commit switches to using a different page (`api/common/NgIf`) that
does currently contain an `{@example}` tag.

(NOTE: This will also fix the [CI failures][1] in #45501.)

[1]: https://circleci.com/gh/angular/angular/1145424

PR Close #45551
This commit is contained in:
George Kalpakas 2022-04-06 19:10:05 +03:00 committed by Jessica Janiuk
parent 24649b9930
commit b57f8bea61
2 changed files with 9 additions and 9 deletions

View file

@ -93,9 +93,9 @@ describe('site App', () => {
});
it('should render `{@example}` dgeni tags as `<code-example>` elements with HTML escaped content', async () => {
await page.navigateTo('guide/component-styles');
const codeExample = element.all(by.css('code-example')).first();
expect(await page.getInnerHtml(codeExample)).toContain('&lt;h1&gt;Tour of Heroes&lt;/h1&gt;');
await page.navigateTo('api/common/NgIf');
const codeExample = element.all(by.css('code-example[region="NgIfSimple"]')).first();
expect(await page.getInnerHtml(codeExample)).toContain('&lt;br&gt;');
});
describe('scrolling to the top', () => {

View file

@ -5,9 +5,9 @@
"runtime": 4343,
"main": 450884,
"polyfills": 33869,
"styles": 70515,
"light-theme": 77708,
"dark-theme": 77813
"styles": 71137,
"light-theme": 78213,
"dark-theme": 78318
}
}
},
@ -17,9 +17,9 @@
"runtime": 4343,
"main": 451472,
"polyfills": 33980,
"styles": 70515,
"light-theme": 77708,
"dark-theme": 77813
"styles": 71137,
"light-theme": 78213,
"dark-theme": 78318
}
}
}