import { shallowMount, createLocalVue } from '@vue/test-utils'
import vuescroll from 'vue-scroll'
import Vuex from 'vuex'
import i18n from '../../../src/lib/i18n'
import Breakdown from '../../../src/components/pages/Breakdown'

const localVue = createLocalVue()
localVue.use(Vuex)
localVue.use(vuescroll)

describe('Breakdown', () => {
  let store, assetStore, userStore, shotStore, castingStore, productionStore
  let wrapper
  let getters

  beforeEach(() => {
    userStore = {
      getters: {
        isCurrentUserManager: () => true
      },
      actions: {
        setLastProductionScreen: () => true
      }
    }
    productionStore = {
      getters: {
        currentProduction: () => ({ id: 'production-1', name: 'Prod 1' }),
        isTVShow: () => (true)
      },
      actions: {
      }
    }
    assetStore = {
      getters: {
        assetsByType: () => ([]),
        castingAssetTypesOptions: () => ([]),
        currentEpisode: () => ([]),
        isAssetsLoading: () => ([])
      },
      actions: {
      }
    }
    shotStore = {
      getters: {
        sequences: () => ([]),
        curentEpisode: () => ({})
      },
      actions: {
      }
    }
    castingStore = {
      getters: {
        castingSequenceOptions: () => ([]),
        castingSequenceOptions: () => ([]),
        castingSequenceShots: () => ([])
      },
      actions: {
      }
    }
    store = new Vuex.Store({
      strict: true,
      modules: {
        assets: assetStore,
        breakdown: castingStore,
        productions: productionStore,
        shots: shotStore,
        user: userStore
      }
    })

    getters = {
      castingSequenceOptions: []
    }

    wrapper = shallowMount(Breakdown, {
      store,
      getters,
      localVue,
      i18n
    })
  })

  describe('Mount', () => {
    test('mounted', () => {
    })
  })

  describe('Getters', () => {
    test.skip('availableAssetsByType', () => {
    })
    test.skip('exportUrlPath', () => {
    })
    test.skip('isAssetCasting', () => {
    })
    test.skip('isShotCasting', () => {
    })
    test.skip('castingEntities', () => {
    })
  })

  describe('Methods', () => {
    test('loadFollowingNews', () => {
    })
  })
})

@@ -527,25 +527,68 @@
 : () =%3E true
+,%0A        isShowInfosBreakdown: () =%3E false
 %0A
-
       %7D,%0A   
@@ -954,32 +954,77 @@
 ns: () =%3E (%5B%5D),%0A
+        castingSequencesOptions: () =%3E (%5B%5D),%0A
         currentE
@@ -1218,16 +1218,61 @@
  =%3E (%7B%7D)
+,%0A        shotMetadataDescriptors: () =%3E (%5B%5D)
 %0A      %7D
@@ -1317,32 +1317,32 @@
 astingStore = %7B%0A
+
       getters: %7B
@@ -1390,52 +1390,8 @@
 %5D),%0A
-        castingSequenceOptions: () =%3E (%5B%5D),%0A
     

fix tests/unit/pages/breakdown.spec.js