Wrote the correct info in about page
This commit is contained in:
parent
c5abac2029
commit
e42cc2a97e
2 changed files with 63 additions and 5 deletions
|
|
@ -5,7 +5,25 @@ import AboutView from "../../src/views/AboutView.vue";
|
|||
|
||||
describe("AboutView", () => {
|
||||
const wrapper = mount(AboutView);
|
||||
it("renders properly", () => {
|
||||
expect(wrapper.text()).toContain("This is an about page");
|
||||
|
||||
it("renders h1", () => {
|
||||
expect(wrapper.find("h1").text()).toContain("About YDIOY");
|
||||
});
|
||||
|
||||
it("has the correct number of paragraphs", () => {
|
||||
const paragraphs = wrapper.findAll("p");
|
||||
expect(paragraphs).toHaveLength(4);
|
||||
});
|
||||
|
||||
it("has link to dexie.js", () => {
|
||||
const dexieLink = wrapper.find("a");
|
||||
const dexieLinkAttributes = dexieLink.attributes();
|
||||
|
||||
expect(dexieLink).toBeDefined();
|
||||
expect(Object.keys(dexieLinkAttributes)).toHaveLength(4);
|
||||
expect(dexieLinkAttributes["href"]).toBe("https://dexie.org/");
|
||||
expect(dexieLinkAttributes["target"]).toBe("_blank");
|
||||
expect(dexieLinkAttributes["rel"]).toBe("noopener")
|
||||
expect(dexieLinkAttributes["class"]).toContain("text-decoration-none");
|
||||
});
|
||||
});
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue