import { shallowMount } from "@vue/test-utils";
import customerQuestions from "@/layouts/address-lookup/customer-questions/customer-questions";

const customerModel = {
    addressQuestions: {
        streetAddress: "",
        city: "",
        state: "",
        zipCode: "",
    },
    firstName: "",
    lastName: "",
    emailAddress: "",
};

describe("customerQuestions.vue", () => {
    it("Should render customerQuestions sub-components (addressQuestions, first name, last name, and email textbox-questions)", async () => {
        // Arrange
        const wrapper = shallowMount(customerQuestions);

        // Act
        const addressQuestions = wrapper.findComponent({ ref: "addressQuestions" });
        const firstName = wrapper.findComponent({ ref: "firstName" });
        const lastName = wrapper.findComponent({ ref: "lastName" });
        const emailAddress = wrapper.findComponent({ ref: "emailAddress" });

        // Assert
        expect(addressQuestions.exists()).toBe(true);
        expect(firstName.exists()).toBe(true);
        expect(lastName.exists()).toBe(true);
        expect(emailAddress.exists()).toBe(true);
    });
});
