From 413bb0352ab5b104b5e1de3b1311555764028473 Mon Sep 17 00:00:00 2001 From: bmauger Date: Wed, 23 Feb 2022 08:19:08 -0500 Subject: [PATCH] Update unit tests. --- .../dropdown-question.spec.js | 24 ++++--------------- .../textbox-question/textbox-question.spec.js | 14 ----------- 2 files changed, 5 insertions(+), 33 deletions(-) diff --git a/src/common-components/dropdown-question/dropdown-question.spec.js b/src/common-components/dropdown-question/dropdown-question.spec.js index c38a445ef..0d1095c94 100644 --- a/src/common-components/dropdown-question/dropdown-question.spec.js +++ b/src/common-components/dropdown-question/dropdown-question.spec.js @@ -1,5 +1,5 @@ import { shallowMount } from "@vue/test-utils"; -import textboxQuestion from "./textbox-question"; +import dropdownQuestion from "./dropdown-question"; import { nextTick } from "vue"; describe("dropdownQuestion.vue", () => { @@ -13,7 +13,7 @@ describe("dropdownQuestion.vue", () => { }); // Assert - const input = wrapper.find("input"); + const input = wrapper.find("select"); // Expect expect(input.attributes()["aria-disabled"]).toEqual("true"); @@ -29,7 +29,7 @@ describe("dropdownQuestion.vue", () => { }); // Assert - const input = wrapper.find("input"); + const input = wrapper.find("select"); expect(input.exists()).toBe(true); }); @@ -43,7 +43,7 @@ describe("dropdownQuestion.vue", () => { }); // Assert - const input = wrapper.find("input"); + const input = wrapper.find("select"); // Expect expect(input.attributes().id).toEqual("input ID"); @@ -72,24 +72,10 @@ describe("dropdownQuestion.vue", () => { }); // Assert - const input = wrapper.find("input"); + const input = wrapper.find("select"); // Expect expect(input.attributes().id).toEqual("input ID"); }); - it("Should return placeholder text", async () => { - // Act - const wrapper = shallowMount(dropdownQuestion, { - propsData: { - placeholderText: "placeholder text", - }, - }); - - // Assert - const placeholder = wrapper.find("input"); - - expect(placeholder.text()).toEqual("placeholder text"); - }); - }); diff --git a/src/common-components/textbox-question/textbox-question.spec.js b/src/common-components/textbox-question/textbox-question.spec.js index 954df5fa4..721fba9d5 100644 --- a/src/common-components/textbox-question/textbox-question.spec.js +++ b/src/common-components/textbox-question/textbox-question.spec.js @@ -78,18 +78,4 @@ describe("textboxQuestion.vue", () => { expect(input.attributes().id).toEqual("input ID"); }); - it("Should return placeholder text", async () => { - // Act - const wrapper = shallowMount(textboxQuestion, { - propsData: { - placeholderText: "placeholder text", - }, - }); - - // Assert - const placeholder = wrapper.find("input"); - - expect(placeholder.text()).toEqual("placeholder text"); - }); - });