feat(frontend): add branded not-found page
This commit is contained in:
21
frontend/app/error.test.ts
Normal file
21
frontend/app/error.test.ts
Normal 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('زرینپال')
|
||||
})
|
||||
})
|
||||
Reference in New Issue
Block a user