Integration Testing in Action

let's take an example of a components name sign-in-form.hbs which shows the email when user clicks the Sign In button.

 <h4 id='sign-in-greeting'>
  Click the Button Below to Login as {{}}
 <button id='sign-in-cta' class='button' {{action 'signIn'}}>
    Sign In

And this is our sign-in-form.js file which triggers action signIn

export default Ember.Component.extend({
  actions: {
   signIn() {
   this.sendAction(‘signIn', this.get('user'));

Then our test case components/sign-in-formtest.js would be somewhat like this.

it('shows the user\'s email address', function() {
 this.set('user', Ember.Object.create({
 email: ''
 this.render(hbs`{{sign-in-form user=user}}`);
 it('has a button to login', function() {

results matching ""

    No results matching ""