From 21493211034ee28ab904f506940455dbddab7b1d Mon Sep 17 00:00:00 2001 From: bmauger Date: Thu, 3 Mar 2022 10:52:30 -0500 Subject: [PATCH] Add unit test and fix link issue for Bindu. --- .../vin-information/vin-information.spec.js | 19 ++++++++++++++++++- src/ux-components/text-link/text-link.vue | 2 +- 2 files changed, 19 insertions(+), 2 deletions(-) diff --git a/src/common-components/vin-information/vin-information.spec.js b/src/common-components/vin-information/vin-information.spec.js index 3d0843e10..4938d54fe 100644 --- a/src/common-components/vin-information/vin-information.spec.js +++ b/src/common-components/vin-information/vin-information.spec.js @@ -1 +1,18 @@ -test.todo("some test to be written in the future"); +import { shallowMount } from "@vue/test-utils"; +import vinInformation from "@/common-components/vin-information/vin-information"; + +describe("vinInformation.vue", () => { + it("Should return input class active if isActive is true", async () => { + // Act + const wrapper = shallowMount(vinInformation); + + await wrapper.setData({ + isActive: true, + }); + + // Assert + wrapper.vm.toggleClass() + + expect(wrapper.vm.isActive).toEqual(false); + }); +}); diff --git a/src/ux-components/text-link/text-link.vue b/src/ux-components/text-link/text-link.vue index a03fc52a6..0efcdcc09 100644 --- a/src/ux-components/text-link/text-link.vue +++ b/src/ux-components/text-link/text-link.vue @@ -25,6 +25,7 @@ export default {