Skip to content

Commit

Permalink
test(form-fields): fix generate random seed test
Browse files Browse the repository at this point in the history
  • Loading branch information
amoncaldas committed Jan 12, 2022
1 parent 5dd55fa commit 6256c8e
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -40,14 +40,15 @@
<v-text-field v-else-if="parameter.type === constants.filterTypes.random" :ref="'field'+ index"
class="field-input random-input no-input-details"
readonly
append-icon="autorenew"
:type="parameter.inputType"
:step="parameter.inputTypeStep"
@click:append="setNewRandomValue(index)"
:step="parameter.inputTypeStep"
:label="buildLabel(parameter)"
:title="buildLabel(parameter)"
v-model="formParameters[index].value"
:required="parameter.required">
<template slot="append">
<v-icon style="cursor:pointer" class="generate-random" @click="setNewRandomValue(index)">autorenew</v-icon>
</template>
</v-text-field>

<template v-else-if="parameter.type === constants.filterTypes.steps" :ref="'field'+ index">
Expand Down
4 changes: 2 additions & 2 deletions tests/integration/specs/form-fields.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -109,8 +109,8 @@ describe('Form-fields', () => {
const wrapper = mount(FormFields, {propsData: props, i18n: i18n, store: store })
expect(wrapper.contains('.form-fields')).toBe(true)
expect(wrapper.findComponent(FormFields).exists()).toBe(true)
await new Promise(resolve => setTimeout(resolve, 5000))
await wrapper.vm.$el.querySelectorAll('.random')[0].querySelectorAll('.v-input__append-inner')[0].querySelectorAll('.v-icon')[0].click()
await new Promise(resolve => setTimeout(resolve, 5000))
await wrapper.vm.$el.querySelectorAll('.generate-random')[0].click()
await wrapper.vm.$nextTick()
expect(wrapper.emitted().fieldUpdated).toBeTruthy()
done()
Expand Down

0 comments on commit 6256c8e

Please sign in to comment.