From e88b816d47ce36ebc449b3ad78496916beda8ca4 Mon Sep 17 00:00:00 2001 From: Derick Montague Date: Wed, 6 Jan 2021 23:33:14 -0600 Subject: Fix broken info-tooltip spec and snapshot - Two of the test are not needed since they are testing the vue internal functionality of rendering a title attribute value correctly and importing the right carbon icon. For this test the only tests needed is the snapshot. It could be debated that this component does not require a spec at all. Signed-off-by: Derick Montague Change-Id: Icca107b185cd579d47877d50ec5763c5ffffc06a --- tests/unit/Global/InfoTooltip.spec.js | 8 ++---- .../Global/__snapshots__/InfoTooltip.spec.js.snap | 31 ++++++++++++++++------ 2 files changed, 25 insertions(+), 14 deletions(-) (limited to 'tests/unit') diff --git a/tests/unit/Global/InfoTooltip.spec.js b/tests/unit/Global/InfoTooltip.spec.js index 90cb301e..37290f67 100644 --- a/tests/unit/Global/InfoTooltip.spec.js +++ b/tests/unit/Global/InfoTooltip.spec.js @@ -1,7 +1,9 @@ import { mount, createLocalVue } from '@vue/test-utils'; import InfoTooltip from '@/components/Global/InfoTooltip'; +import { BootstrapVue } from 'bootstrap-vue'; const localVue = createLocalVue(); +localVue.use(BootstrapVue); describe('InfoTooltip.vue', () => { const wrapper = mount(InfoTooltip, { @@ -16,12 +18,6 @@ describe('InfoTooltip.vue', () => { it('should exist', () => { expect(wrapper.exists()).toBe(true); }); - it('should render title attribute for button', () => { - expect(wrapper.attributes('title')).toBe('title'); - }); - it('should render icon-tooltip element', () => { - expect(wrapper.find('icon-tooltip').exists()).toBe(true); - }); it('should render correctly', () => { expect(wrapper.element).toMatchSnapshot(); }); diff --git a/tests/unit/Global/__snapshots__/InfoTooltip.spec.js.snap b/tests/unit/Global/__snapshots__/InfoTooltip.spec.js.snap index a3fd9be1..9b660389 100644 --- a/tests/unit/Global/__snapshots__/InfoTooltip.spec.js.snap +++ b/tests/unit/Global/__snapshots__/InfoTooltip.spec.js.snap @@ -1,13 +1,28 @@ // Jest Snapshot v1, https://goo.gl/fbAQLP exports[`InfoTooltip.vue should render correctly 1`] = ` - + + + + `; -- cgit v1.2.3