From 258f6f5a178a832a20d5dfde7f67f8ef8d74fb7f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Joakim=20M=C3=B6rling?= Date: Fri, 22 May 2026 13:51:20 +0200 Subject: [PATCH] Add integritetspolicy page with Phase 0 privacy copy. - Create PrivacyPolicyPage with sections on data, rights, and letter recipients - Use plain Swedish without technical jargon or operational detail - Link to kontakt page and mailto for privacy questions - Add PrivacyPolicyPage unit tests Co-authored-by: Cursor --- .../src/__tests__/PrivacyPolicyPage.spec.ts | 54 ++++ frontend/src/pages/PrivacyPolicyPage.vue | 239 ++++++++++++++++++ 2 files changed, 293 insertions(+) create mode 100644 frontend/src/__tests__/PrivacyPolicyPage.spec.ts create mode 100644 frontend/src/pages/PrivacyPolicyPage.vue diff --git a/frontend/src/__tests__/PrivacyPolicyPage.spec.ts b/frontend/src/__tests__/PrivacyPolicyPage.spec.ts new file mode 100644 index 0000000..f7f0d2c --- /dev/null +++ b/frontend/src/__tests__/PrivacyPolicyPage.spec.ts @@ -0,0 +1,54 @@ +import { describe, it, expect } from 'vitest' +import { mount } from '@vue/test-utils' +import { createRouter, createMemoryHistory } from 'vue-router' +import PrivacyPolicyPage from '@/pages/PrivacyPolicyPage.vue' + +function createTestRouter() { + return createRouter({ + history: createMemoryHistory(), + routes: [ + { + path: '/integritetspolicy', + name: 'privacy', + component: PrivacyPolicyPage, + }, + { + path: '/kontakt', + name: 'contact', + component: { template: '
Kontakt
' }, + }, + ], + }) +} + +describe('PrivacyPolicyPage', () => { + it('renders title and lead', () => { + const router = createTestRouter() + const wrapper = mount(PrivacyPolicyPage, { + global: { plugins: [router] }, + }) + expect(wrapper.text()).toContain('Integritetspolicy') + expect(wrapper.text()).toContain('personuppgifter') + }) + + it('describes sender and recipient data handling', () => { + const router = createTestRouter() + const wrapper = mount(PrivacyPolicyPage, { + global: { plugins: [router] }, + }) + expect(wrapper.text()).toContain('Mottagarens postadress') + expect(wrapper.text()).toContain('sparas inte efter utskick') + expect(wrapper.text()).toContain('varken vi eller obehöriga') + }) + + it('links to contact email and contact page', () => { + const router = createTestRouter() + const wrapper = mount(PrivacyPolicyPage, { + global: { plugins: [router] }, + }) + expect(wrapper.find('a[href="mailto:kontakt@bilhej.se"]').exists()).toBe( + true, + ) + expect(wrapper.find('a.policy__link').attributes('href')).toBe('/kontakt') + }) +}) diff --git a/frontend/src/pages/PrivacyPolicyPage.vue b/frontend/src/pages/PrivacyPolicyPage.vue new file mode 100644 index 0000000..07228b4 --- /dev/null +++ b/frontend/src/pages/PrivacyPolicyPage.vue @@ -0,0 +1,239 @@ + + + + +