Quantcast
Channel: Ember.JS - Latest topics
Viewing all articles
Browse latest Browse all 4827

How to do integration test with router service?

$
0
0

@Jeffrey_Cheung wrote:

My component has a button that will navigate to different page when clicked. When i do integration test, I want to make sure the page it navigates, however I get

Cannot read property 'transitionTo' of undefined.

Here is a snippet of my component:

  actions:{
    go(){
      this.get('router').transitionTo(this.get("route"), this.get('inputValue');
    }
  }

Probably because I don’t have the router service in my integration test. Should I stub it or what? I heard people say integration test should not mess with route but acceptance test can. Should I do this in acceptance test?

Posts: 1

Participants: 1

Read full topic


Viewing all articles
Browse latest Browse all 4827

Trending Articles