feat(frontend): add branded not-found page

This commit is contained in:
2026-09-21 19:12:08 +03:30
parent be97d94ef6
commit 9328556c28
5 changed files with 115 additions and 35 deletions

View File

@@ -0,0 +1,21 @@
import { mount } from '@vue/test-utils'
import { describe, expect, it } from 'vitest'
import ErrorPage from './error.vue'
describe('ErrorPage', () => {
it('renders a branded not-found page with a way home', () => {
const wrapper = mount(ErrorPage, {
props: {
error: {
statusCode: 404,
statusMessage: 'Page not found',
},
},
})
expect(wrapper.get('h1').text()).toBe('صفحه پیدا نشد')
expect(wrapper.get('a').attributes('href')).toBe('/')
expect(wrapper.get('[role="img"]').attributes('aria-label')).toBe('زرین‌پال')
})
})