fix(aio): fix window title on Home page (#20440)

Using `display: none` on the `<h1>` causes `innerText` to not work as expected
and include the icon ligature (`link`) in the title. This caused the window
title on the angular.io Home page to appear as "Angular - link".
This commit fixes it by not generating anchors at all for headings with the
`no-anchor` class.

Fixes #20427

PR Close #20440
This commit is contained in:
George Kalpakas
2017-11-15 03:01:00 +02:00
committed by Miško Hevery
parent c28b52187a
commit 7e38f4fd1f
9 changed files with 98 additions and 35 deletions

View File

@ -15,6 +15,16 @@ describe('site App', function() {
expect(page.getDocViewerText()).toMatch(/Progressive web apps/i);
});
it('should set appropriate window titles', () => {
expect(browser.getTitle()).toBe('Angular');
page.getTopMenuLink('features').click();
expect(browser.getTitle()).toBe('Angular - FEATURES & BENEFITS');
page.homeLink.click();
expect(browser.getTitle()).toBe('Angular');
});
it('should show the tutorial index page at `/tutorial/` after jitterbugging through features', () => {
// check that we can navigate directly to the tutorial page
page.navigateTo('tutorial/');