diff --git a/src/views/AboutView.vue b/src/views/AboutView.vue index 26d6aea..6ea9720 100644 --- a/src/views/AboutView.vue +++ b/src/views/AboutView.vue @@ -1,5 +1,45 @@ diff --git a/tests/views/AboutView.spec.ts b/tests/views/AboutView.spec.ts index 1031c3a..c6d8ce3 100644 --- a/tests/views/AboutView.spec.ts +++ b/tests/views/AboutView.spec.ts @@ -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"); }); });