refactor(docs-infra): fix docs examples for tslint rules related to variable names (#38143)
This commit updates the docs examples to be compatible with the `no-shadowed-variable` and `variable-name` tslint rules. This is in preparation of updating the docs examples `tslint.json` to match the one generated for new Angular CLI apps in a future commit. PR Close #38143
This commit is contained in:

committed by
Alex Rickabaugh

parent
6334749d2c
commit
1db4f508e6
@ -172,11 +172,11 @@ describe('Tutorial part 6', () => {
|
||||
});
|
||||
|
||||
it(`adds back ${targetHero.name}`, async () => {
|
||||
const newHeroName = 'Alice';
|
||||
const addedHeroName = 'Alice';
|
||||
const heroesBefore = await toHeroArray(getPageElts().allHeroes);
|
||||
const numHeroes = heroesBefore.length;
|
||||
|
||||
element(by.css('input')).sendKeys(newHeroName);
|
||||
element(by.css('input')).sendKeys(addedHeroName);
|
||||
element(by.buttonText('add')).click();
|
||||
|
||||
let page = getPageElts();
|
||||
@ -186,7 +186,7 @@ describe('Tutorial part 6', () => {
|
||||
expect(heroesAfter.slice(0, numHeroes)).toEqual(heroesBefore, 'Old heroes are still there');
|
||||
|
||||
const maxId = heroesBefore[heroesBefore.length - 1].id;
|
||||
expect(heroesAfter[numHeroes]).toEqual({id: maxId + 1, name: newHeroName});
|
||||
expect(heroesAfter[numHeroes]).toEqual({id: maxId + 1, name: addedHeroName});
|
||||
});
|
||||
|
||||
it('displays correctly styled buttons', async () => {
|
||||
|
Reference in New Issue
Block a user