Jesse Palmer (28) [Avatar] Offline
#1
Now that the finalization of Angular version 2.0 is complete, I am in the process of updating Chapters 4, 5, 6 to reflect the changes in the final release that have been in pending status. I will only be delivering MEAP content based on the final version going forward. You can expect to see new content in the next couple of weeks and receive regular updates going forward.
If you have any feedback feel free to utilize this forum, I will be monitoring it closely. You can also visit the GitHub repo at https://github.com/testing-angular-2-applications, the Testing Angular 2 Applications Facebook page at https://www.facebook.com/testingangular2applications/ or contact me at @jesselpalmer on Twitter for questions or comments. Thank you for your patience!
Joey (14) [Avatar] Offline
#2
Awesome! smilie
434328 (1) [Avatar] Offline
#3
Chapter 3 also need to be updated and would like to see integration with angular-cli
Hope Chapters 4,5,6 come quick;
434910 (3) [Avatar] Offline
#4
my head is kind of spinning with all the dependencies, i kind of like how you start from the very base of requirements, not assuming that we have any of the dependencies already installed, but nonetheless, i've still had to do additional digging, and I cannot remember all of the things I had to do but I will try to list as many as I can. btw - I'm still in chapter 2 setting up my test environment and have run into a problem I cannot surpass.

But some of the things I had to overcome, after moving from the initial canary test:

1.) (around page 20-21) I had to add '<script src="node_modules/systemjs/dist/system.src.js"></script>' into my 'test-runner.html' because 'System is not defined' error System.config({...
2.) (going back around page 17) i had an issue with the dependencies. i didn't follow your instructions to just copy your dependencies, i tried to grab the latest updated dependencies, and it appeared to have a problem 'System.import('app/contact.spec')' - it was not finding it. I think it was not using the defaultExtension for some reason. When I added the '.js' after contact.spec, it was able to find the file.
2a.) It seemed to test fine at that point, because I saw the single test green dot under the Jasmine logo. I even went in to change the spec to expect null, which then the test came back with a red X. So it looked like it was testing. - The problem I was seeing, rather Not seeing, was the stuff under the green dot. "1 spec, 0 failures.. .. Contact class tests, etc.. the rest of the page. i've attached a screenshot
2b.) I thought maybe because I was using the latest dependencies may had been causing the issue, so i went back and typed up the dependencies exactly as yours were, and re-ran the 'npm i' command. same deal. just that single green dot.

anyways, i know the importance of TDD or BDD, and I've always been very unsuccessful in setting up the testing environments for some reason, i was hoping this book would help me finally get through it, and it started out with a lot of promise, but kinda stuck at the moment.

i will go through again with a clean project from ground zero maybe and re run the same steps again.

Jesse Palmer (28) [Avatar] Offline
#5
434328 wrote:Chapter 3 also need to be updated and would like to see integration with angular-cli
Hope Chapters 4,5,6 come quick;


Hi there! Yes, there will be integration with the Angular-CLI! I have updated drafts for 4 and 5 have been. The MEAP for Chapter 4 should be going out in the next couple of weeks, and Chapter 5 a couple of weeks after that. I am currently writing the draft for Chapter 6, and that should be done in a couple of weeks as well.

The current plan is to finish the rest of the book and then circle back to the first three chapters. Thank you for your patience!
Jesse Palmer (28) [Avatar] Offline
#6
434910 wrote:my head is kind of spinning with all the dependencies, i kind of like how you start from the very base of requirements, not assuming that we have any of the dependencies already installed, but nonetheless, i've still had to do additional digging, and I cannot remember all of the things I had to do but I will try to list as many as I can. btw - I'm still in chapter 2 setting up my test environment and have run into a problem I cannot surpass.

But some of the things I had to overcome, after moving from the initial canary test:

1.) (around page 20-21) I had to add '<script src="node_modules/systemjs/dist/system.src.js"></script>' into my 'test-runner.html' because 'System is not defined' error System.config({...
2.) (going back around page 17) i had an issue with the dependencies. i didn't follow your instructions to just copy your dependencies, i tried to grab the latest updated dependencies, and it appeared to have a problem 'System.import('app/contact.spec')' - it was not finding it. I think it was not using the defaultExtension for some reason. When I added the '.js' after contact.spec, it was able to find the file.
2a.) It seemed to test fine at that point, because I saw the single test green dot under the Jasmine logo. I even went in to change the spec to expect null, which then the test came back with a red X. So it looked like it was testing. - The problem I was seeing, rather Not seeing, was the stuff under the green dot. "1 spec, 0 failures.. .. Contact class tests, etc.. the rest of the page. i've attached a screenshot
2b.) I thought maybe because I was using the latest dependencies may had been causing the issue, so i went back and typed up the dependencies exactly as yours were, and re-ran the 'npm i' command. same deal. just that single green dot.

anyways, i know the importance of TDD or BDD, and I've always been very unsuccessful in setting up the testing environments for some reason, i was hoping this book would help me finally get through it, and it started out with a lot of promise, but kinda stuck at the moment.

i will go through again with a clean project from ground zero maybe and re run the same steps again.




Hello! I apologize for the complexity. Setting up the testing environment is tricky. Relief is on the way, though! Chapters 4, 5, and 6 are the next chapters to go out, and they use the Angular-cli. The Angular-cli simplifies the setup process.

When I first started writing the book, the Angular-cli was in its infancy, but now it is ready to use. You can expect to see a Chapter 4 sent out in the next couple of weeks. In the meantime, let me know if you run into any future issues. Thank you!
434910 (3) [Avatar] Offline
#7
Okay! Thanks for the update.

I just got the V4 hot off the presses, it seems that perhaps that you did not revise or get the earlier issues worked out.
I went through it fresh in your version 4, and came up with the same error. I noted exactly the stuff that I needed to do to at least get it semi working. here are my notes:

Pg 12 references css and js with folder structure beginning with "../", it should only
Start with "./" to comply with the preceding instruction.

Pg 19 "ambient" is deprecated => use "global"
- Also spaces in the terminal command leaves ambiguity.
- Used "typings install jasmine --global --save --source dt"

Pg 22 expected screen not reached => still same problem with missing "System.config…"
- Ran "npm install" to get angular files installed
- Inserted "<script src="node_modules/systemjs/dist/system.src.js"></script>" to fix the missing "System.config" error
- Sample test page appears to run, but missing all of the other essential page elements.
Same problem as with V3 of this book thus far.

---

Moving Forward, I will see if I can check out chapter 4 and see if using the angular-cli will help standardize and simplify the testing process. Thanks so much!

---
ahh yes, i see your response now, "The current plan is to finish the rest of the book and then circle back to the first three chapters. Thank you for your patience!"

thanks dude! so far real excited in getting a whole book on testing angular apps!
Jesse Palmer (28) [Avatar] Offline
#8
434910 wrote:Okay! Thanks for the update.

I just got the V4 hot off the presses, it seems that perhaps that you did not revise or get the earlier issues worked out.
I went through it fresh in your version 4, and came up with the same error. I noted exactly the stuff that I needed to do to at least get it semi working. here are my notes:

Pg 12 references css and js with folder structure beginning with "../", it should only
Start with "./" to comply with the preceding instruction.

Pg 19 "ambient" is deprecated => use "global"
- Also spaces in the terminal command leaves ambiguity.
- Used "typings install jasmine --global --save --source dt"

Pg 22 expected screen not reached => still same problem with missing "System.config…"
- Ran "npm install" to get angular files installed
- Inserted "<script src="node_modules/systemjs/dist/system.src.js"></script>" to fix the missing "System.config" error
- Sample test page appears to run, but missing all of the other essential page elements.
Same problem as with V3 of this book thus far.

---

Moving Forward, I will see if I can check out chapter 4 and see if using the angular-cli will help standardize and simplify the testing process. Thanks so much!

---
ahh yes, i see your response now, "The current plan is to finish the rest of the book and then circle back to the first three chapters. Thank you for your patience!"

thanks dude! so far real excited in getting a whole book on testing angular apps!


Cool, thank you for the detailed notes. There are going to be substantial revisions to Chapters 1 - 3. The draft for Chapter 5 has been submitted, so be on the lookout for that. I'm working on Chapter 6 as we speak. If you find anything else, please let me know. Your feedback is much appreciated! Thank you!