X Tutup
The Wayback Machine - https://web.archive.org/web/20200628001017/https://github.com/angular/angular/issues/37652
Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Tutorial suggests a change in code, that makes the default tests fail #37652

Open
Danon opened this issue Jun 20, 2020 · 0 comments
Open

Tutorial suggests a change in code, that makes the default tests fail #37652

Danon opened this issue Jun 20, 2020 · 0 comments

Comments

@Danon
Copy link

@Danon Danon commented Jun 20, 2020

📚 Docs or angular.io bug report

Description

When following "Tour of heroes" tutorial, I found out that tutorial suggests a change that immediately makes the tests fail. I found it, because i had ng test command running, which turned red immediately after I introduced the change. The tutorial says nothing about the failing tests, nor saying how to fix it.

🔬 Minimal Reproduction

What's the affected URL?**

https://angular.io/tutorial/toh-pt0

Reproduction Steps**

Follow the "Tour of heroes" tutorial

Expected vs Actual Behavior**

I would expect that if tutorial suggest to go with ng new example (which creates default tests), and also suggests to change the structure of the app template, then it should also mention this change in test.

How to fix the tests, so they follow the tutorial:

Change this:

expect(compiled.querySelector('.content span').textContent).toContain('example app is running');

to this:

expect(compiled.querySelector('h1').textContent).toContain('Tour of Heroes!');

📷Screenshot

image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
2 participants
You can’t perform that action at this time.
X Tutup