mirror of
https://github.com/ueberdosis/tiptap.git
synced 2024-11-27 14:59:27 +08:00
fix(tests): add assertion for each valid/invalid link (#3815)
* fix(tests): add assertion for each valid/invalid link * chore(tests): disable video generation
This commit is contained in:
parent
b2ec51374d
commit
f5895c63c4
@ -24,15 +24,15 @@ context('/src/Examples/AutolinkValidation/React/', () => {
|
||||
'https://tiptap.dev',
|
||||
]
|
||||
|
||||
it('valid links should get autolinked', () => {
|
||||
validLinks.forEach(([rawTextInput, textThatShouldBeLinked]) => {
|
||||
cy.get('.ProseMirror').type(`{selectall}{backspace}${rawTextInput}`)
|
||||
validLinks.forEach(([rawTextInput, textThatShouldBeLinked]) => {
|
||||
it(`should autolink ${rawTextInput}`, () => {
|
||||
cy.get('.ProseMirror').type(rawTextInput)
|
||||
cy.get('.ProseMirror a').contains(textThatShouldBeLinked)
|
||||
})
|
||||
})
|
||||
|
||||
it('invalid links should not get autolinked', () => {
|
||||
invalidLinks.forEach(rawTextInput => {
|
||||
invalidLinks.forEach(rawTextInput => {
|
||||
it(`should not autolink ${rawTextInput}`, () => {
|
||||
cy.get('.ProseMirror').type(`{selectall}{backspace}${rawTextInput}`)
|
||||
cy.get('.ProseMirror a').should('not.exist')
|
||||
})
|
||||
|
@ -24,15 +24,15 @@ context('/src/Examples/AutolinkValidation/Vue/', () => {
|
||||
'https://tiptap.dev',
|
||||
]
|
||||
|
||||
it('valid links should get autolinked', () => {
|
||||
validLinks.forEach(([rawTextInput, textThatShouldBeLinked]) => {
|
||||
cy.get('.ProseMirror').type(`{selectall}{backspace}${rawTextInput}`)
|
||||
validLinks.forEach(([rawTextInput, textThatShouldBeLinked]) => {
|
||||
it(`should autolink ${rawTextInput}`, () => {
|
||||
cy.get('.ProseMirror').type(rawTextInput)
|
||||
cy.get('.ProseMirror a').contains(textThatShouldBeLinked)
|
||||
})
|
||||
})
|
||||
|
||||
it('invalid links should not get autolinked', () => {
|
||||
invalidLinks.forEach(rawTextInput => {
|
||||
invalidLinks.forEach(rawTextInput => {
|
||||
it(`should not autolink ${rawTextInput}`, () => {
|
||||
cy.get('.ProseMirror').type(`{selectall}{backspace}${rawTextInput}`)
|
||||
cy.get('.ProseMirror a').should('not.exist')
|
||||
})
|
||||
|
@ -2,6 +2,7 @@ const { defineConfig } = require('cypress')
|
||||
|
||||
module.exports = defineConfig({
|
||||
defaultCommandTimeout: 12000,
|
||||
video: false,
|
||||
e2e: {
|
||||
setupNodeEvents(on, config) {
|
||||
return require('./cypress/plugins/index.js')(on, config)
|
||||
|
Loading…
Reference in New Issue
Block a user