Mobile traffic was breaking on narrow viewports because the header nav overflowed and several pages used desktop-only spacing. This adds a shared phone breakpoint, a hamburger menu, and scroll-to-top on route changes so footer and menu navigation always land at the top of the page. - Add --page-gutter and max-width 639px rules in base.css - AppHeader: hamburger panel on small screens; flat account links on mobile - AppFooter: stack footer links vertically on phones - Home, compose, edit order, orders, auth, and legal pages: tighter gutters and responsive layout (orders card actions stack; home grids single-column) - Router scrollBehavior: scroll to top on navigation; restore on browser back - Tests: AppHeader menu toggle, Router scrollBehavior, mobile Playwright checks Admin page is intentionally unchanged. Co-authored-by: Cursor <cursoragent@cursor.com>
36 lines
1.1 KiB
TypeScript
36 lines
1.1 KiB
TypeScript
import { describe, it, expect } from 'vitest'
|
|
import { mount } from '@vue/test-utils'
|
|
import ContactPage from '@/pages/ContactPage.vue'
|
|
|
|
describe('ContactPage', () => {
|
|
it('renders heading and lead', () => {
|
|
const wrapper = mount(ContactPage)
|
|
expect(wrapper.text()).toContain('Kontakta oss')
|
|
expect(wrapper.text()).toContain('klagomål')
|
|
})
|
|
|
|
it('renders support email', () => {
|
|
const wrapper = mount(ContactPage)
|
|
expect(wrapper.text()).toContain('support@bilhej.se')
|
|
})
|
|
|
|
it('renders general contact email', () => {
|
|
const wrapper = mount(ContactPage)
|
|
expect(wrapper.text()).toContain('kontakt@bilhej.se')
|
|
})
|
|
|
|
it('renders complaints email', () => {
|
|
const wrapper = mount(ContactPage)
|
|
expect(wrapper.text()).toContain('klagomal@bilhej.se')
|
|
})
|
|
|
|
it('links support to mailto', () => {
|
|
const wrapper = mount(ContactPage)
|
|
const link = wrapper.find('a[href="mailto:support@bilhej.se"]')
|
|
expect(link.exists()).toBe(true)
|
|
expect(link.text()).toBe('support@bilhej.se')
|
|
expect(link.attributes('aria-label')).toBe(
|
|
'Skicka till support: support@bilhej.se',
|
|
)
|
|
})
|
|
})
|