Wrote the correct info in about page

This commit is contained in:
Liviu Burcusel 2025-09-15 11:59:25 +02:00
parent c5abac2029
commit e42cc2a97e
Signed by: liviu
GPG key ID: 6CDB37A4AD2C610C
2 changed files with 63 additions and 5 deletions

View file

@ -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");
});
});