Added 'Terms of Service' and 'Privacy policy' pages
This commit is contained in:
parent
0add58254d
commit
176665d7d4
14 changed files with 98 additions and 24 deletions
|
|
@ -63,7 +63,7 @@ describe("Default.vue", () => {
|
|||
});
|
||||
await flushPromises();
|
||||
const footer = wrapper.find("[data-testid='footer']");
|
||||
expect(footer.text()).toBe("Glowing Fiesta 2025 (1.0.1)");
|
||||
expect(footer.text()).toBe("Glowing Fiesta 2025");
|
||||
});
|
||||
|
||||
it("footer shows range when current year is not 2025", async () => {
|
||||
|
|
@ -75,7 +75,7 @@ describe("Default.vue", () => {
|
|||
});
|
||||
await flushPromises();
|
||||
const footer = wrapper.find("[data-testid='footer']");
|
||||
expect(footer.text()).toBe("Glowing Fiesta 2025 - 2069 (1.0.1)");
|
||||
expect(footer.text()).toBe("Glowing Fiesta 2025 - 2069");
|
||||
});
|
||||
});
|
||||
});
|
||||
|
|
|
|||
|
|
@ -3,6 +3,7 @@ import { describe, expect, it, vi, beforeAll, afterAll } from "vitest";
|
|||
import SidebarLayout from "~/layouts/default/Sidebar.vue";
|
||||
import { ref } from "vue";
|
||||
import type * as SidebarUI from "~/components/ui/sidebar";
|
||||
import { useRuntimeConfig } from "#app";
|
||||
|
||||
const { useSidebarMock } = vi.hoisted(() => ({
|
||||
useSidebarMock: vi.fn(),
|
||||
|
|
@ -112,6 +113,7 @@ vi.mock("lucide-vue-next", () => {
|
|||
ChevronsUpDown: MockIcon,
|
||||
CreditCard: MockIcon,
|
||||
BookOpen: MockIcon,
|
||||
BookOpenText: MockIcon,
|
||||
HandCoins: MockIcon,
|
||||
LogIn: MockIcon,
|
||||
LogOut: MockIcon,
|
||||
|
|
@ -162,7 +164,7 @@ describe("SidebarLayout", () => {
|
|||
});
|
||||
await flushPromises();
|
||||
expect(wrapper.text()).toContain("Glowing Fiesta");
|
||||
expect(wrapper.text()).toContain("v1.0.0");
|
||||
expect(wrapper.text()).toContain(`v${useRuntimeConfig().public.appVersion as string}`);
|
||||
});
|
||||
|
||||
it("renders sidebar content correctly", async () => {
|
||||
|
|
|
|||
11
tests/pages/legal/privacy-policy.test.ts
Normal file
11
tests/pages/legal/privacy-policy.test.ts
Normal file
|
|
@ -0,0 +1,11 @@
|
|||
import { describe, expect, it } from "vitest";
|
||||
import { mount, type VueWrapper } from "@vue/test-utils";
|
||||
import PrivacyPolicyPage from "~/pages/legal/privacy-policy.vue";
|
||||
|
||||
describe("pages/legal/privacy-policy.vue", () => {
|
||||
it("loads without crashing", () => {
|
||||
const wrapper: VueWrapper = mount(PrivacyPolicyPage);
|
||||
expect(wrapper.exists()).toBe(true);
|
||||
expect(wrapper.text()).toContain("Privacy Policy");
|
||||
});
|
||||
});
|
||||
11
tests/pages/legal/terms-of-service.test.ts
Normal file
11
tests/pages/legal/terms-of-service.test.ts
Normal file
|
|
@ -0,0 +1,11 @@
|
|||
import { describe, expect, it } from "vitest";
|
||||
import { mount, type VueWrapper } from "@vue/test-utils";
|
||||
import TermsOfServicePage from "~/pages/legal/terms-of-service.vue";
|
||||
|
||||
describe("pages/legal/terms-of-service.vue", () => {
|
||||
it("loads without crashing", () => {
|
||||
const wrapper: VueWrapper = mount(TermsOfServicePage);
|
||||
expect(wrapper.exists()).toBe(true);
|
||||
expect(wrapper.text()).toContain("Terms of Service");
|
||||
});
|
||||
});
|
||||
Loading…
Add table
Add a link
Reference in a new issue