docs: Update router guide to use Angular CLI (#20023)

PR Close #20023
This commit is contained in:
Brandon Roberts
2017-10-23 08:11:51 -05:00
committed by Kara Erickson
parent 3c8aa0b301
commit 1fb3c4ffee
137 changed files with 1819 additions and 1366 deletions

View File

@ -4,7 +4,7 @@ import { browser, element, by, ExpectedConditions } from 'protractor';
const numDashboardTabs = 5;
const numCrises = 4;
const numHeroes = 6;
const numHeroes = 10;
const EC = ExpectedConditions;
describe('Router', () => {
@ -13,34 +13,34 @@ describe('Router', () => {
function getPageStruct() {
const hrefEles = element.all(by.css('app-root > nav a'));
const crisisDetail = element.all(by.css('app-root > div > ng-component > ng-component > ng-component > div')).first();
const heroDetail = element(by.css('app-root > div > ng-component'));
const crisisDetail = element.all(by.css('app-root > div > app-crisis-center > app-crisis-list > app-crisis-detail > div')).first();
const heroDetail = element(by.css('app-root > div > app-hero-detail'));
return {
hrefs: hrefEles,
activeHref: element(by.css('app-root > nav a.active')),
crisisHref: hrefEles.get(0),
crisisList: element.all(by.css('app-root > div > ng-component > ng-component li')),
crisisList: element.all(by.css('app-root > div > app-crisis-center > app-crisis-list li')),
crisisDetail: crisisDetail,
crisisDetailTitle: crisisDetail.element(by.xpath('*[1]')),
heroesHref: hrefEles.get(1),
heroesList: element.all(by.css('app-root > div > ng-component li')),
heroesList: element.all(by.css('app-root > div > app-hero-list li')),
heroDetail: heroDetail,
heroDetailTitle: heroDetail.element(by.xpath('*[2]')),
adminHref: hrefEles.get(2),
adminPreloadList: element.all(by.css('app-root > div > ng-component > ng-component > ul > li')),
adminPreloadList: element.all(by.css('app-root > div > app-admin > app-admin-dashboard > ul > li')),
loginHref: hrefEles.get(3),
loginButton: element.all(by.css('app-root > div > ng-component > p > button')),
loginButton: element.all(by.css('app-root > div > app-login > p > button')),
contactHref: hrefEles.get(4),
contactCancelButton: element.all(by.buttonText('Cancel')),
primaryOutlet: element.all(by.css('app-root > div > ng-component')),
secondaryOutlet: element.all(by.css('app-root > ng-component'))
primaryOutlet: element.all(by.css('app-root > div > app-hero-list')),
secondaryOutlet: element.all(by.css('app-root > app-compose-message'))
};
}