import $ from 'jquery'
import init from '../../init'
import Util from '../../TestUtil'

describe('Main测试', () => {
  let vm = null
  before (() => {
    init()
    vm = Util.createTest('Main', {functions: '[{name:\'系统管理1\', children:[{name:\'管理1\'},{name:\'管理2\'}]}]', userid: '2488888'})
  })

  after (function () {
    Util.destroyVM(vm)
  })
  it('Main内含组件能够正确显示', () => {
    expect($(vm.$el.querySelector('h3')).html()).to.equals('Aote')
  })
  it('Main组件参数能够正确传递', done => {
    expect(vm.userid).to.equals('2488888')
    done()
  })
  /* vm.$nextTick(() => {
      expect($(vm.$el).html()).to.contain('测试标题')
      done()
    })
  }) */
})
