fix tests
This commit is contained in:
@@ -41,7 +41,7 @@ context('/demos/Marks/Bold', () => {
|
||||
})
|
||||
|
||||
it('the button should make the selected text bold', () => {
|
||||
cy.get('.demo__preview button:first')
|
||||
cy.get('button:first')
|
||||
.click()
|
||||
|
||||
cy.get('.ProseMirror')
|
||||
@@ -50,9 +50,9 @@ context('/demos/Marks/Bold', () => {
|
||||
})
|
||||
|
||||
it('the button should toggle the selected text bold', () => {
|
||||
cy.get('.demo__preview button:first').click()
|
||||
cy.get('button:first').click()
|
||||
cy.get('.ProseMirror').type('{selectall}')
|
||||
cy.get('.demo__preview button:first').click()
|
||||
cy.get('button:first').click()
|
||||
cy.get('.ProseMirror strong').should('not.exist')
|
||||
})
|
||||
|
||||
|
||||
@@ -21,7 +21,7 @@ context('/demos/Marks/Code', () => {
|
||||
})
|
||||
|
||||
it('should mark the selected text as inline code', () => {
|
||||
cy.get('.demo__preview button:first')
|
||||
cy.get('button:first')
|
||||
.click()
|
||||
|
||||
cy.get('.ProseMirror')
|
||||
@@ -30,13 +30,13 @@ context('/demos/Marks/Code', () => {
|
||||
})
|
||||
|
||||
it('should toggle the selected text as inline code', () => {
|
||||
cy.get('.demo__preview button:first')
|
||||
cy.get('button:first')
|
||||
.click()
|
||||
|
||||
cy.get('.ProseMirror')
|
||||
.type('{selectall}')
|
||||
|
||||
cy.get('.demo__preview button:first')
|
||||
cy.get('button:first')
|
||||
.click()
|
||||
|
||||
cy.get('.ProseMirror code')
|
||||
|
||||
@@ -14,7 +14,7 @@ context('/demos/Marks/Highlight', () => {
|
||||
})
|
||||
|
||||
it('the button should highlight the selected text', () => {
|
||||
cy.get('.demo__preview button:first')
|
||||
cy.get('button:first')
|
||||
.click()
|
||||
|
||||
cy.get('.ProseMirror')
|
||||
@@ -108,13 +108,13 @@ context('/demos/Marks/Highlight', () => {
|
||||
})
|
||||
|
||||
it('the button should toggle the selected text highlighted', () => {
|
||||
cy.get('.demo__preview button:first')
|
||||
cy.get('button:first')
|
||||
.click()
|
||||
|
||||
cy.get('.ProseMirror')
|
||||
.type('{selectall}')
|
||||
|
||||
cy.get('.demo__preview button:first')
|
||||
cy.get('button:first')
|
||||
.click()
|
||||
|
||||
cy.get('.ProseMirror')
|
||||
|
||||
@@ -32,7 +32,7 @@ context('/demos/Marks/Italic', () => {
|
||||
})
|
||||
|
||||
it('the button should make the selected text italic', () => {
|
||||
cy.get('.demo__preview button:first')
|
||||
cy.get('button:first')
|
||||
.click()
|
||||
|
||||
cy.get('.ProseMirror')
|
||||
@@ -41,13 +41,13 @@ context('/demos/Marks/Italic', () => {
|
||||
})
|
||||
|
||||
it('the button should toggle the selected text italic', () => {
|
||||
cy.get('.demo__preview button:first')
|
||||
cy.get('button:first')
|
||||
.click()
|
||||
|
||||
cy.get('.ProseMirror')
|
||||
.type('{selectall}')
|
||||
|
||||
cy.get('.demo__preview button:first')
|
||||
cy.get('button:first')
|
||||
.click()
|
||||
|
||||
cy.get('.ProseMirror em')
|
||||
|
||||
@@ -35,7 +35,7 @@ context('/demos/Marks/Link', () => {
|
||||
cy.window().then(win => {
|
||||
cy.stub(win, 'prompt').returns('https://tiptap.dev')
|
||||
|
||||
cy.get('.demo__preview button:first')
|
||||
cy.get('button:first')
|
||||
.click()
|
||||
|
||||
cy.window().its('prompt').should('be.called')
|
||||
|
||||
@@ -39,7 +39,7 @@ context('/demos/Marks/Strike', () => {
|
||||
})
|
||||
|
||||
it('the button should strike the selected text', () => {
|
||||
cy.get('.demo__preview button:first')
|
||||
cy.get('button:first')
|
||||
.click()
|
||||
|
||||
cy.get('.ProseMirror')
|
||||
@@ -48,13 +48,13 @@ context('/demos/Marks/Strike', () => {
|
||||
})
|
||||
|
||||
it('the button should toggle the selected text striked', () => {
|
||||
cy.get('.demo__preview button:first')
|
||||
cy.get('button:first')
|
||||
.click()
|
||||
|
||||
cy.get('.ProseMirror')
|
||||
.type('{selectall}')
|
||||
|
||||
cy.get('.demo__preview button:first')
|
||||
cy.get('button:first')
|
||||
.click()
|
||||
|
||||
cy.get('.ProseMirror')
|
||||
|
||||
@@ -25,7 +25,7 @@ context('/demos/Marks/Underline', () => {
|
||||
})
|
||||
|
||||
it('the button should underline the selected text', () => {
|
||||
cy.get('.demo__preview button:first')
|
||||
cy.get('button:first')
|
||||
.click()
|
||||
|
||||
cy.get('.ProseMirror')
|
||||
@@ -34,13 +34,13 @@ context('/demos/Marks/Underline', () => {
|
||||
})
|
||||
|
||||
it('the button should toggle the selected text underline', () => {
|
||||
cy.get('.demo__preview button:first')
|
||||
cy.get('button:first')
|
||||
.click()
|
||||
|
||||
cy.get('.ProseMirror')
|
||||
.type('{selectall}')
|
||||
|
||||
cy.get('.demo__preview button:first')
|
||||
cy.get('button:first')
|
||||
.click()
|
||||
|
||||
cy.get('.ProseMirror')
|
||||
|
||||
Reference in New Issue
Block a user