start tests on components
This commit is contained in:
44
cypress/e2e/ui/seComponents.cy.js
Normal file
44
cypress/e2e/ui/seComponents.cy.js
Normal file
@@ -0,0 +1,44 @@
|
|||||||
|
describe('Editor Web Components', () => {
|
||||||
|
context('seButton', () => {
|
||||||
|
it('renders and reacts to click', () => {
|
||||||
|
const onClick = cy.stub().as('seButtonClick')
|
||||||
|
|
||||||
|
cy.document().then(doc => {
|
||||||
|
const el = doc.createElement('se-button')
|
||||||
|
el.addEventListener('click', onClick)
|
||||||
|
doc.body.appendChild(el)
|
||||||
|
})
|
||||||
|
|
||||||
|
cy.get('se-button').should('exist').click({ force: true })
|
||||||
|
cy.get('@seButtonClick').should('have.been.called')
|
||||||
|
})
|
||||||
|
})
|
||||||
|
|
||||||
|
context('seFlyingButton', () => {
|
||||||
|
it('renders and reacts to click', () => {
|
||||||
|
const onClick = cy.stub().as('seFlyingClick')
|
||||||
|
cy.document().then(doc => {
|
||||||
|
const el = doc.createElement('se-flying-button')
|
||||||
|
el.addEventListener('click', onClick)
|
||||||
|
doc.body.appendChild(el)
|
||||||
|
})
|
||||||
|
|
||||||
|
cy.get('se-flying-button').should('exist').click({ force: true })
|
||||||
|
cy.get('@seFlyingClick').should('have.been.called')
|
||||||
|
})
|
||||||
|
})
|
||||||
|
|
||||||
|
context('seExplorerButton', () => {
|
||||||
|
it('renders and reacts to click', () => {
|
||||||
|
const onClick = cy.stub().as('seExplorerClick')
|
||||||
|
cy.document().then(doc => {
|
||||||
|
const el = doc.createElement('se-explorer-button')
|
||||||
|
el.addEventListener('click', onClick)
|
||||||
|
doc.body.appendChild(el)
|
||||||
|
})
|
||||||
|
|
||||||
|
cy.get('se-explorer-button').should('exist').click({ force: true })
|
||||||
|
cy.get('@seExplorerClick').should('have.been.called')
|
||||||
|
})
|
||||||
|
})
|
||||||
|
})
|
||||||
Reference in New Issue
Block a user