mirror of
https://github.com/IT4Change/Ocelot-Social.git
synced 2025-12-13 07:45:56 +00:00
Scaffold page component test for password reset
This commit is contained in:
parent
7228d68149
commit
c4eb2178f2
41
webapp/pages/password-reset.spec.js
Normal file
41
webapp/pages/password-reset.spec.js
Normal file
@ -0,0 +1,41 @@
|
||||
import { shallowMount, createLocalVue } from '@vue/test-utils'
|
||||
import PasswordResetPage from './password-reset.vue'
|
||||
import Styleguide from '@human-connection/styleguide'
|
||||
|
||||
const localVue = createLocalVue()
|
||||
|
||||
localVue.use(Styleguide)
|
||||
|
||||
describe('ProfileSlug', () => {
|
||||
let wrapper
|
||||
let Wrapper
|
||||
let mocks
|
||||
|
||||
beforeEach(() => {
|
||||
mocks = {
|
||||
$toast: {
|
||||
success: jest.fn(),
|
||||
error: jest.fn(),
|
||||
},
|
||||
$t: jest.fn(),
|
||||
$apollo: {
|
||||
loading: false,
|
||||
mutate: jest.fn().mockResolvedValue(),
|
||||
},
|
||||
}
|
||||
})
|
||||
|
||||
describe('shallowMount', () => {
|
||||
Wrapper = () => {
|
||||
return shallowMount(PasswordResetPage, {
|
||||
mocks,
|
||||
localVue,
|
||||
})
|
||||
}
|
||||
|
||||
it('renders a password reset form', () => {
|
||||
wrapper = Wrapper()
|
||||
expect(wrapper.find('.password-reset-card').exists()).toBe(true)
|
||||
})
|
||||
})
|
||||
})
|
||||
Loading…
x
Reference in New Issue
Block a user