Fix component test, comment out form submission from cypress

- Added $t function to test now that it is being localised
- We are submitting the form by clicking on the button as a normal user would
- Cypress test still broken due to peculiarities of tiptap editor
This commit is contained in:
Matt Rider 2019-04-24 12:28:53 -03:00
parent 546e2c99ad
commit 8ae632be7b
2 changed files with 8 additions and 3 deletions

View File

@ -1,10 +1,10 @@
import { When, Then } from 'cypress-cucumber-preprocessor/steps'
When('I should be able to post a comment', () => {
cy.get('.ProseMirror')
cy.get('[contenteditable]')
.type('This is a comment')
.get('.ds-form')
.submit()
// .get('.ds-form')
// .submit()
.get('button')
.contains('Submit Comment')
.click()

View File

@ -9,14 +9,19 @@ localVue.use(Styleguide)
describe('Editor.vue', () => {
let wrapper
let propsData
let mocks
beforeEach(() => {
propsData = {}
mocks = {
$t: () => {}
}
})
describe('mount', () => {
let Wrapper = () => {
return (wrapper = mount(Editor, {
mocks,
propsData,
localVue,
sync: false,