Advertisement
Guest User

Untitled

a guest
May 25th, 2015
220
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. `import { test, moduleForComponent } from 'ember-qunit'`
  2.  
  3. moduleForComponent 'providers/bv-wizard-step1'
  4.  
  5. test 'select category', (assert) ->
  6.   assert.expect 4                  
  7.   component = @subject()
  8.   component.set('serviceCategory.name','Business, Translation & Legal Services')
  9.   assert.equal component.serviceCategory.name, 'Business, Translation & Lega Services'
  10.   component.selectSubcategory('Crafts')
  11.   assert.equal component.service-sub-category, 'Crafts'
  12.   assert.equal component.services.length, 0
  13.   component.addService('stuff')
  14.   assert.equal component.servies.length, 1
  15.  
  16. moduleForComponent 'providers/bv-wizard-step4'
  17.  
  18. test 'continue button', (assert) ->
  19.   assert.expect 1
  20.   component = @subject()
  21.   targetObject = {
  22.     externalAction: ->
  23.       ok(true, 'continue')
  24.   }
  25.   component.set('internalAction', 'externalAction');
  26.   component.set('targetObject', targetObject);
  27.   click('button')
  28.  
  29. moduleForComponent 'providers/bv-wizard'
  30.  
  31. test 'change steps', (assert) ->
  32.   assert.expect 4
  33.   component = @subject()
  34.   assert.equal component.activeStepIndex, 0
  35.   component.set('activeStepIndex', 1)
  36.   assert.equal component.activeStepIndex, 1
  37.   component.stepTransitionForward()
  38.   assert.equal component.activeStepIndex, 2
  39.   component.stepTransitionBackward()
  40.   assert.equal component.activeStepIndex, 1
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement