Merge pull request #179 from Safelite/BRM-update-unit-test-add-required

Update unit test. Add isRequired to make model pages.
This commit is contained in:
bmauger 2022-02-01 14:47:21 -05:00 committed by GitHub
commit 680a2237d9
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 34 additions and 1 deletions

View file

@ -25,6 +25,36 @@ describe("funnel-footer.vue", () => {
} catch(error) {
console.log(error);
}
});
it("Should return link text", async () => {
// Act
const wrapper = mount(funnelFooter, {
propsData: {
text: "Terms of use",
},
});
// Assert
const link = wrapper.find("a");
expect(link.text()).toEqual("Terms of use");
});
it("Should return class btn-primary", async () => {
// Act
const wrapper = mount(funnelFooter, {
propsData: {
isPrimary: true,
},
});
// Assert
const input = wrapper.find("button");
// Expect
expect(input.attributes("class")).toContain("btn-primary");
});
});

View file

@ -8,6 +8,7 @@
textPosition="text-start"
:loaderEnabled="true"
v-model="modelValue"
isRequired=true
/>
</template>

View file

@ -8,6 +8,7 @@
textPosition="text-start"
:loaderEnabled="true"
v-model="modelValue"
isRequired=true
/>
</template>

View file

@ -8,6 +8,7 @@
textPosition="text-start"
:loaderEnabled="true"
v-model="modelValue"
isRequired=true
/>
</template>