Update unit tests.

This commit is contained in:
bmauger 2022-02-23 08:19:08 -05:00
parent c114e4b004
commit 413bb0352a
2 changed files with 5 additions and 33 deletions

View file

@ -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");
});
});

View file

@ -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");
});
});