mirror of
https://github.com/Ocelot-Social-Community/Ocelot-Social.git
synced 2025-12-13 07:46:06 +00:00
fix: frontend tests
This commit is contained in:
parent
9ac1e333d6
commit
a2c9ed520d
@ -8,6 +8,7 @@ const localVue = createLocalVue()
|
|||||||
localVue.use(Styleguide)
|
localVue.use(Styleguide)
|
||||||
config.stubs['sweetalert-icon'] = '<span><slot /></span>'
|
config.stubs['sweetalert-icon'] = '<span><slot /></span>'
|
||||||
config.stubs['client-only'] = '<span><slot /></span>'
|
config.stubs['client-only'] = '<span><slot /></span>'
|
||||||
|
config.stubs['nuxt-link'] = '<span><slot /></span>'
|
||||||
|
|
||||||
describe('CreateUserAccount', () => {
|
describe('CreateUserAccount', () => {
|
||||||
let wrapper, Wrapper, mocks, propsData, stubs
|
let wrapper, Wrapper, mocks, propsData, stubs
|
||||||
@ -102,7 +103,7 @@ describe('CreateUserAccount', () => {
|
|||||||
|
|
||||||
it('displays success', async () => {
|
it('displays success', async () => {
|
||||||
await action()
|
await action()
|
||||||
expect(mocks.$t).toHaveBeenCalledWith('registration.create-user-account.success')
|
expect(mocks.$t).toHaveBeenCalledWith('components.registration.create-user-account.success')
|
||||||
})
|
})
|
||||||
|
|
||||||
describe('after timeout', () => {
|
describe('after timeout', () => {
|
||||||
@ -130,7 +131,7 @@ describe('CreateUserAccount', () => {
|
|||||||
|
|
||||||
it('displays form errors', async () => {
|
it('displays form errors', async () => {
|
||||||
await action()
|
await action()
|
||||||
expect(wrapper.find('.backendErrors').text()).toContain('Invalid nonce')
|
expect(mocks.$t).toHaveBeenCalledWith('components.registration.create-user-account.error')
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user