Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- `import { test, moduleForComponent } from 'ember-qunit'`
- moduleForComponent 'providers/bv-wizard-step1'
- test 'select category', (assert) ->
- assert.expect 4
- component = @subject()
- component.set('serviceCategory.name','Business, Translation & Legal Services')
- assert.equal component.serviceCategory.name, 'Business, Translation & Lega Services'
- component.selectSubcategory('Crafts')
- assert.equal component.service-sub-category, 'Crafts'
- assert.equal component.services.length, 0
- component.addService('stuff')
- assert.equal component.servies.length, 1
- moduleForComponent 'providers/bv-wizard-step4'
- test 'continue button', (assert) ->
- assert.expect 1
- component = @subject()
- targetObject = {
- externalAction: ->
- ok(true, 'continue')
- }
- component.set('internalAction', 'externalAction');
- component.set('targetObject', targetObject);
- click('button')
- moduleForComponent 'providers/bv-wizard'
- test 'change steps', (assert) ->
- assert.expect 4
- component = @subject()
- assert.equal component.activeStepIndex, 0
- component.set('activeStepIndex', 1)
- assert.equal component.activeStepIndex, 1
- component.stepTransitionForward()
- assert.equal component.activeStepIndex, 2
- component.stepTransitionBackward()
- assert.equal component.activeStepIndex, 1
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement