refactor: extract visual part of the toolbar-button component and use it in all buttons components

Signed-off-by: Tilman Vatteroth <git@tilmanvatteroth.de>
This commit is contained in:
Tilman Vatteroth 2023-05-31 20:14:37 +02:00
parent 3a5ae8df3a
commit 14ba7ea9ce
26 changed files with 127 additions and 109 deletions

View file

@ -29,8 +29,8 @@ describe('File upload', () => {
})
it('via button', () => {
cy.getByCypressId('editor-pane').should('have.attr', 'data-cypress-editor-ready', 'true')
cy.getByCypressId('editor-toolbar-upload-image-button').should('be.visible')
cy.getByCypressId('editor-toolbar-upload-image-input').selectFile(
cy.getByCypressId('toolbar.uploadImage').should('be.visible')
cy.getByCypressId('toolbar.uploadImage.input').selectFile(
{
contents: '@demoImage',
fileName: 'demo.png',
@ -80,8 +80,8 @@ describe('File upload', () => {
statusCode: 400
}
)
cy.getByCypressId('editor-toolbar-upload-image-button').should('be.visible')
cy.getByCypressId('editor-toolbar-upload-image-input').selectFile(
cy.getByCypressId('toolbar.uploadImage').should('be.visible')
cy.getByCypressId('toolbar.uploadImage.input').selectFile(
{
contents: '@demoImage',
fileName: 'demo.png',