diff options
Diffstat (limited to 'spec/frontend/terraform/components/states_table_spec.js')
-rw-r--r-- | spec/frontend/terraform/components/states_table_spec.js | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/spec/frontend/terraform/components/states_table_spec.js b/spec/frontend/terraform/components/states_table_spec.js index 100e577f514..fa9c8320b4f 100644 --- a/spec/frontend/terraform/components/states_table_spec.js +++ b/spec/frontend/terraform/components/states_table_spec.js @@ -1,5 +1,6 @@ -import { GlIcon, GlLoadingIcon, GlTooltip } from '@gitlab/ui'; +import { GlBadge, GlLoadingIcon, GlTooltip } from '@gitlab/ui'; import { mount } from '@vue/test-utils'; +import { nextTick } from 'vue'; import { useFakeDate } from 'helpers/fake_date'; import StatesTable from '~/terraform/components/states_table.vue'; import StateActions from '~/terraform/components/states_table_actions.vue'; @@ -106,9 +107,9 @@ describe('StatesTable', () => { ], }; - const createComponent = (propsData = defaultProps) => { + const createComponent = async (propsData = defaultProps) => { wrapper = mount(StatesTable, { propsData }); - return wrapper.vm.$nextTick(); + await nextTick(); }; const findActions = () => wrapper.findAll(StateActions); @@ -138,7 +139,7 @@ describe('StatesTable', () => { const toolTip = state.find(GlTooltip); expect(state.text()).toContain(name); - expect(state.find(GlIcon).exists()).toBe(locked); + expect(state.find(GlBadge).exists()).toBe(locked); expect(state.find(GlLoadingIcon).exists()).toBe(loading); expect(toolTip.exists()).toBe(locked); |