<commit_before>import { shallowMount, createLocalVue } from '@vue/test-utils'
import Vuex from 'vuex'
import ApplicationAdd from '@/registry/components/people/ApplicationAdd'
import fakeOptions from '../fakeDrillerOptions'

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

describe('ApplicationAdd.vue', () => {
  let getters
  let actions
  let store

  beforeEach(() => {
    getters = {
      drillerOptions: jest.fn().mockReturnValue(fakeOptions),
      loading: () => false
    }
    actions = {
      fetchDrillerOptions: jest.fn()
    }
    store = new Vuex.Store({ getters, actions })
  })

  it('Has the correct title', () => {
    const activity = 'DRILL'
    const wrapper = shallowMount(ApplicationAdd, {
      store,
      propsData: { activity },
      localVue
    })
    expect(wrapper.find('.card-title').text()).toContain('Classification, Qualifications & Adjudication')
  })
  it('Loads driller options correctly', () => {
    const activity = 'DRILL'
    const wrapper = shallowMount(ApplicationAdd, {
      store,
      propsData: { activity },
      localVue
    })
    expect(wrapper.vm.formOptions.issuer.length).toBeGreaterThan(1)
    expect(wrapper.vm.formOptions.classifications.length).toBeGreaterThan(0)
    expect(wrapper.vm.formOptions.qualifications.length).toBeGreaterThan(0)
  })
  it('Changing classification, results in qualifications changing', () => {
    const activity = 'DRILL'
    const wrapper = shallowMount(ApplicationAdd, {
      store,
      propsData: { activity },
      localVue
    })
    const option = wrapper.find('input[type="radio"][value="GEOTECH"]')
    option.trigger('click')
    expect(wrapper.vm.qualificationForm.qualifications).toEqual(['MON', 'REM', 'GEO'])
  })
})
<commit_msg>Fixed unit test<commit_after>import { shallowMount, createLocalVue } from '@vue/test-utils'
import Vuex from 'vuex'
import ApplicationAdd from '@/registry/components/people/ApplicationAdd'
import fakeOptions from '../fakeDrillerOptions'

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

describe('ApplicationAdd.vue', () => {
  let getters
  let actions
  let store

  beforeEach(() => {
    getters = {
      drillerOptions: jest.fn().mockReturnValue(fakeOptions),
      loading: () => false
    }
    actions = {
      fetchDrillerOptions: jest.fn()
    }
    store = new Vuex.Store({ getters, actions })
  })

  it('Has the correct title', () => {
    const activity = 'DRILL'
    const wrapper = shallowMount(ApplicationAdd, {
      store,
      propsData: { activity },
      localVue
    })
    expect(wrapper.find('.card-title').text()).toContain('Classification & Qualifications')
  })
  it('Loads driller options correctly', () => {
    const activity = 'DRILL'
    const wrapper = shallowMount(ApplicationAdd, {
      store,
      propsData: { activity },
      localVue
    })
    expect(wrapper.vm.formOptions.issuer.length).toBeGreaterThan(1)
    expect(wrapper.vm.formOptions.classifications.length).toBeGreaterThan(0)
    expect(wrapper.vm.formOptions.qualifications.length).toBeGreaterThan(0)
  })
  it('Changing classification, results in qualifications changing', () => {
    const activity = 'DRILL'
    const wrapper = shallowMount(ApplicationAdd, {
      store,
      propsData: { activity },
      localVue
    })
    const option = wrapper.find('input[type="radio"][value="GEOTECH"]')
    option.trigger('click')
    expect(wrapper.vm.qualificationForm.qualifications).toEqual(['MON', 'REM', 'GEO'])
  })
})

{'fraction_non_alphanumeric': 0.1386337543053961, 'fraction_numerical': 0.001722158438576349, 'mean_word_length': 3.6466666666666665, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 15, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '5448821', 'n_tokens_mistral': 1051, 'n_tokens_neox': 1046, 'n_words': 199}