-
-
Notifications
You must be signed in to change notification settings - Fork 2.4k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
e715aa9
commit f7c2a98
Showing
4 changed files
with
67 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
32 changes: 32 additions & 0 deletions
32
demos/src/GuideMarkViews/ReactComponent/React/index.spec.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
/// <reference types="cypress" /> | ||
|
||
context('/src/GuideMarkViews/ReactComponent/React/', () => { | ||
before(() => { | ||
cy.visit('/src/GuideMarkViews/ReactComponent/React/') | ||
}) | ||
|
||
beforeEach(() => { | ||
cy.get('.tiptap').then(([{ editor }]) => { | ||
editor.commands.setContent('<p>Example Text</p><react-component>Mark View Text</react-component>') | ||
}) | ||
cy.get('.tiptap').type('{selectall}') | ||
}) | ||
|
||
it('should show the markview', () => { | ||
cy.get('.tiptap').find('[data-test-id="mark-view"]').should('exist') | ||
}) | ||
|
||
it('should allow clicking the button', () => { | ||
cy.get('.tiptap') | ||
.find('[data-test-id="mark-view"] button') | ||
.should('contain', 'This button has been clicked 0 times.') | ||
cy.get('.tiptap') | ||
.find('[data-test-id="mark-view"] button') | ||
.click() | ||
.then(() => { | ||
cy.get('.tiptap') | ||
.find('[data-test-id="mark-view"] button') | ||
.should('contain', 'This button has been clicked 1 times.') | ||
}) | ||
}) | ||
}) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
/// <reference types="cypress" /> | ||
|
||
context('/src/GuideMarkViews/VueComponent/Vue/', () => { | ||
before(() => { | ||
cy.visit('/src/GuideMarkViews/VueComponent/Vue/') | ||
}) | ||
|
||
beforeEach(() => { | ||
cy.get('.tiptap').then(([{ editor }]) => { | ||
editor.commands.setContent('<p>Example Text</p><vue-component>Mark View Text</vue-component>') | ||
}) | ||
cy.get('.tiptap').type('{selectall}') | ||
}) | ||
|
||
it('should show the markview', () => { | ||
cy.get('.tiptap').find('[data-test-id="mark-view"]').should('exist') | ||
}) | ||
|
||
it('should allow clicking the button', () => { | ||
cy.get('.tiptap') | ||
.find('[data-test-id="mark-view"] button') | ||
.should('contain', 'This button has been clicked 0 times.') | ||
cy.get('.tiptap') | ||
.find('[data-test-id="mark-view"] button') | ||
.click() | ||
.then(() => { | ||
cy.get('.tiptap') | ||
.find('[data-test-id="mark-view"] button') | ||
.should('contain', 'This button has been clicked 1 times.') | ||
}) | ||
}) | ||
}) |