Skip to content

Commit

Permalink
Remove unit test releated to clear prop
Browse files Browse the repository at this point in the history
  • Loading branch information
DannyFeliz committed Jan 26, 2020
1 parent bb142c5 commit 3e994dd
Showing 1 changed file with 1 addition and 34 deletions.
35 changes: 1 addition & 34 deletions tests/unit/email-dropdown.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,7 @@ describe("EmailDropdown.vue", () => {
domains: ["google.com"],
defaultDomains: ["hotmail.com", "outlook.com"],
maxSuggestions: 4,
closeOnClickOutside: true,
clearable: false
closeOnClickOutside: true
};
});

Expand Down Expand Up @@ -96,38 +95,6 @@ describe("EmailDropdown.vue", () => {
expect(wrapper.find(".email-dropdown-list").exists()).to.be.false;
});

it("clears the email field when the x is clicked", async () => {
propsData.initialValue = "hello";
propsData.clearable = true;
const wrapper = shallowMount(EmailDropdown, {
propsData
});

wrapper.find("button").trigger("click");
await Vue.nextTick();
expect(wrapper.vm.$data.email).to.be.empty;
});

it("hides the x if the email field is clearable but empty", async () => {
propsData.initialValue = "";
propsData.clearable = true;
const wrapper = shallowMount(EmailDropdown, {
propsData
});

expect(wrapper.find("button").exists()).to.be.false;
});

it("hides the x if the input not clearable", async () => {
propsData.initialValue = "hello";
propsData.clearable = false;
const wrapper = shallowMount(EmailDropdown, {
propsData
});

expect(wrapper.find("button").exists()).to.be.false;
});

describe("events", () => {
it("emits 'input' on email change", async () => {
propsData.domains = ["gmail.com", "google.com"];
Expand Down

0 comments on commit 3e994dd

Please sign in to comment.