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

docs: testing guide for CLI #20697

Closed
wants to merge 1 commit into from
Closed

Conversation

wardbell
Copy link
Contributor

@wardbell wardbell commented Nov 29, 2017

Update testing guide to reflect CLI usage and current "best practices"
See #19510

updates tests

  • heavy prose revisions
  • uses HttpClient (with angular-in-memory-web-api)
  • test HeroService using HttpClientTestingModule
  • scrub away most By.css
  • fake async observable with asyncData()
  • extensive TwainComponent work
  • different take on retryWhen
  • remove app barrels (& systemjs.extras) which troubled plunker/systemjs
  • add dummy export const to hero.ts (plunkr/systemjs fails w/o it)
  • shrink and re-organize TOC
  • add marble testing package and tests
  • demonstrate the "no beforeEach()" test coding style
  • add section on HTTP service testing
  • prepare for stackblitz PR build(aio): migrate plunker to stackblitz #20165
  • make it work in plunker except excluded marble test

PR Checklist

Please check if your PR fulfills the following requirements:

PR Type

What kind of change does this PR introduce?

[ ] Bugfix
[ ] Feature
[ ] Code style update (formatting, local variables)
[ ] Refactoring (no functional changes, no api changes)
[ ] Build related changes
[ ] CI related changes
[x] Documentation content changes
[ ] angular.io application / infrastructure changes 
[ ] Other... Please describe:

@mary-poppins
Copy link

You can preview a14e2b6 at https://pr20697-a14e2b6.ngbuilds.io/.

@mary-poppins
Copy link

You can preview 1cb3b2f at https://pr20697-1cb3b2f.ngbuilds.io/.

@mary-poppins
Copy link

You can preview 7159fef at https://pr20697-7159fef.ngbuilds.io/.

@wardbell wardbell force-pushed the clify-testing branch 2 times, most recently from 613349e to 8f020a5 Compare December 2, 2017 22:45
@mary-poppins
Copy link

You can preview 8f020a5 at https://pr20697-8f020a5.ngbuilds.io/.

@mary-poppins
Copy link

You can preview b831b5a at https://pr20697-b831b5a.ngbuilds.io/.

@mary-poppins
Copy link

You can preview 822245d at https://pr20697-822245d.ngbuilds.io/.

@mary-poppins
Copy link

You can preview 2552d12 at https://pr20697-2552d12.ngbuilds.io/.

@mary-poppins
Copy link

You can preview 28edf58 at https://pr20697-28edf58.ngbuilds.io/.

@mary-poppins
Copy link

You can preview 7c3d378 at https://pr20697-7c3d378.ngbuilds.io/.

@mary-poppins
Copy link

You can preview 500f414 at https://pr20697-500f414.ngbuilds.io/.

@mary-poppins
Copy link

You can preview f3409ab at https://pr20697-f3409ab.ngbuilds.io/.

@mary-poppins
Copy link

You can preview eb07c9d at https://pr20697-eb07c9d.ngbuilds.io/.

@mary-poppins
Copy link

You can preview 7fa6a01 at https://pr20697-7fa6a01.ngbuilds.io/.

@petebacondarwin
Copy link
Member

Rebased and force pushed to see if I clear the Travis errors

@mary-poppins
Copy link

You can preview 0c61a6c at https://pr20697-0c61a6c.ngbuilds.io/.

@ngbot
Copy link

ngbot bot commented Feb 8, 2018

Hi @wardbell! This PR has merge conflicts due to recent upstream merges.
Please help to unblock it by resolving these conflicts. Thanks!

1 similar comment
@ngbot
Copy link

ngbot bot commented Feb 8, 2018

Hi @wardbell! This PR has merge conflicts due to recent upstream merges.
Please help to unblock it by resolving these conflicts. Thanks!

@mary-poppins
Copy link

You can preview 5f3dc46 at https://pr20697-5f3dc46.ngbuilds.io/.

Copy link
Member

@petebacondarwin petebacondarwin left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This review is only from the point of view of AIO infrastructure, not the docs or examples themselves.

@@ -36,7 +36,7 @@
"angular-in-memory-web-api": "~0.5.0",
"core-js": "^2.4.1",
"express": "^4.14.1",
"rxjs": "^5.5.0",
"rxjs": "^5.5.6",
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I believe that you need to fix up the yarn.lock file associated with this package.json.

Copy link
Contributor Author

@wardbell wardbell Feb 23, 2018

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It would be nice too if I could remember why I bumped it. After reviewing RxJS changelog no reason leaps out at me. I'll roll back and confirm.
Update: there was no point to this change and I reverted it.

@@ -48,7 +48,8 @@ export class CodeExampleComponent implements OnInit {
// Now remove the title attribute to prevent unwanted tooltip popups when hovering over the code.
element.removeAttribute('title');

this.isAvoid = this.path.indexOf('.avoid.') !== -1;
const avoid = getBoolFromAttribute(element, 'avoid');
this.isAvoid = avoid || this.path.indexOf('.avoid.') !== -1;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No unit tests for this feature.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fair enough. Will add.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Tests have been added.

jbogarthyde pushed a commit to jbogarthyde/angular that referenced this pull request Feb 23, 2018
…gular#20165)

- Update tooling to support revised testing guide (PR angular#20697).
- Require jasmine upgrade for examples that use marble testing.
- Copy `cli/package.json` to `testing/` and add `jasmine-marbles`.
- Resolve merge conflicts created by `NgModules` guides.

PR Close angular#20165
- updates tests
- heavy prose revisions
- uses HttpClient (with angular-in-memory-web-api)
- test HeroService using `HttpClientTestingModule`
- scrub away most By.CSS
- fake async observable with `asyncData()`
- extensive Twain work
- different take on retryWhen
- remove app barrels (& systemjs.extras) which troubled plunker/systemjs
- add dummy export const to hero.ts (plunkr/systemjs fails w/o it)
- shrink and re-organize TOC
- add marble testing package and tests
- demonstrate the "no beforeEach()" test coding style
- add section on Http service testing
- prepare for stackblitz
- confirm works in plunker except excluded marble test
- add tests for avoidFile class feature of CodeExampleComponent
@wardbell
Copy link
Contributor Author

@petebacondarwin This works for master and should work for patch. Do you feel comfortable setting those labels? I'm not personally up-to-speed on that.

@mary-poppins
Copy link

You can preview a324d1f at https://pr20697-a324d1f.ngbuilds.io/.

@petebacondarwin
Copy link
Member

I don't see any reason why this should not land on stable as well as master.

@petebacondarwin petebacondarwin added action: merge The PR is ready for merge by the caretaker target: patch This PR is targeted for the next patch release labels Feb 24, 2018
alexeagle pushed a commit that referenced this pull request Feb 26, 2018
- updates tests
- heavy prose revisions
- uses HttpClient (with angular-in-memory-web-api)
- test HeroService using `HttpClientTestingModule`
- scrub away most By.CSS
- fake async observable with `asyncData()`
- extensive Twain work
- different take on retryWhen
- remove app barrels (& systemjs.extras) which troubled plunker/systemjs
- add dummy export const to hero.ts (plunkr/systemjs fails w/o it)
- shrink and re-organize TOC
- add marble testing package and tests
- demonstrate the "no beforeEach()" test coding style
- add section on Http service testing
- prepare for stackblitz
- confirm works in plunker except excluded marble test
- add tests for avoidFile class feature of CodeExampleComponent

PR Close #20697
@alexeagle alexeagle closed this in a7e1f23 Feb 26, 2018
smdunn pushed a commit to smdunn/angular that referenced this pull request Feb 28, 2018
- updates tests
- heavy prose revisions
- uses HttpClient (with angular-in-memory-web-api)
- test HeroService using `HttpClientTestingModule`
- scrub away most By.CSS
- fake async observable with `asyncData()`
- extensive Twain work
- different take on retryWhen
- remove app barrels (& systemjs.extras) which troubled plunker/systemjs
- add dummy export const to hero.ts (plunkr/systemjs fails w/o it)
- shrink and re-organize TOC
- add marble testing package and tests
- demonstrate the "no beforeEach()" test coding style
- add section on Http service testing
- prepare for stackblitz
- confirm works in plunker except excluded marble test
- add tests for avoidFile class feature of CodeExampleComponent

PR Close angular#20697
@wardbell wardbell deleted the clify-testing branch March 6, 2018 03:01
leo6104 pushed a commit to leo6104/angular that referenced this pull request Mar 25, 2018
…gular#20165)

- Update tooling to support revised testing guide (PR angular#20697).
- Require jasmine upgrade for examples that use marble testing.
- Copy `cli/package.json` to `testing/` and add `jasmine-marbles`.
- Resolve merge conflicts created by `NgModules` guides.

PR Close angular#20165
leo6104 pushed a commit to leo6104/angular that referenced this pull request Mar 25, 2018
- updates tests
- heavy prose revisions
- uses HttpClient (with angular-in-memory-web-api)
- test HeroService using `HttpClientTestingModule`
- scrub away most By.CSS
- fake async observable with `asyncData()`
- extensive Twain work
- different take on retryWhen
- remove app barrels (& systemjs.extras) which troubled plunker/systemjs
- add dummy export const to hero.ts (plunkr/systemjs fails w/o it)
- shrink and re-organize TOC
- add marble testing package and tests
- demonstrate the "no beforeEach()" test coding style
- add section on Http service testing
- prepare for stackblitz
- confirm works in plunker except excluded marble test
- add tests for avoidFile class feature of CodeExampleComponent

PR Close angular#20697
@angular-automatic-lock-bot
Copy link

This issue has been automatically locked due to inactivity.
Please file a new issue if you are encountering a similar or related problem.

Read more about our automatic conversation locking policy.

This action has been performed automatically by a bot.

@angular-automatic-lock-bot angular-automatic-lock-bot bot locked and limited conversation to collaborators Sep 13, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
action: merge The PR is ready for merge by the caretaker cla: yes target: patch This PR is targeted for the next patch release
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants