diff --git a/cypress/e2e/widgets.cy.js b/cypress/e2e/widgets.cy.js index a39ea85e1d..88e19030c1 100644 --- a/cypress/e2e/widgets.cy.js +++ b/cypress/e2e/widgets.cy.js @@ -19,26 +19,26 @@ describe('After user signed in', () => { }); it('widget edit toggle is visible', () => { - cy.get('.mk-widget-edit').should('be.visible'); + cy.get('[data-cy-widget-edit]').should('be.visible'); }); it('widget select should be visible in edit mode', () => { - cy.get('.mk-widget-edit').click(); - cy.get('.mk-widget-select').should('be.visible'); + cy.get('[data-cy-widget-edit]').click(); + cy.get('[data-cy-widget-select]').should('be.visible'); }); it('first widget should be removed', () => { - cy.get('.mk-widget-edit').click(); + cy.get('[data-cy-widget-edit]').click(); cy.get('[data-cy-customize-container]:first-child [data-cy-customize-container-remove]._button').click(); cy.get('[data-cy-customize-container]').should('have.length', 2); }); function buildWidgetTest(widgetName) { it(`${widgetName} widget should get added`, () => { - cy.get('.mk-widget-edit').click(); - cy.get('.mk-widget-select select').select(widgetName, { force: true }); + cy.get('[data-cy-widget-edit]').click(); + cy.get('[data-cy-widget-select] select').select(widgetName, { force: true }); cy.get('[data-cy-bg]._modalBg[data-cy-transparent]').click({ multiple: true, force: true }); - cy.get('.mk-widget-add').click({ force: true }); + cy.get('[data-cy-widget-add]').click({ force: true }); cy.get(`[data-cy-mkw-${widgetName}]`).should('exist'); }); } diff --git a/packages/frontend/src/components/MkWidgets.vue b/packages/frontend/src/components/MkWidgets.vue index d074fdd150..33e594acd8 100644 --- a/packages/frontend/src/components/MkWidgets.vue +++ b/packages/frontend/src/components/MkWidgets.vue @@ -2,11 +2,11 @@