diff --git a/client/cypress/integration/bookmarks.spec.js b/client/cypress/integration/bookmarks.spec.js new file mode 100644 index 00000000..4ea14296 --- /dev/null +++ b/client/cypress/integration/bookmarks.spec.js @@ -0,0 +1,39 @@ +describe('Survey', () => { + beforeEach(() => { + cy.exec("python ../server/manage.py prepare_bookmarks_for_cypress"); + + cy.viewport('macbook-15'); + cy.startGraphQLCapture(); + cy.login('rahel.cueni', 'test', true); + cy.get('body').contains('Neues Wissen erwerben'); + }); + + it('should bookmark content block', () => { + cy.visit('/module/lohn-und-budget/'); + + cy.get('.content-component').contains('Das folgende Interview').parent().parent().as('interviewContent'); + + cy.get('@interviewContent').within(() => { + cy.get('.bookmark-actions__bookmark').click(); + cy.get('.bookmark-actions__add-note').click(); + }); + + cy.get('[data-cy=bookmark-note]').within(() => { + cy.get('.skillbox-input').type('Hallo Velo'); + }); + + cy.get('[data-cy=modal-save-button]').click(); + + cy.get('@interviewContent').within(() => { + cy.get('.bookmark-actions__edit-note').click(); + + }); + + cy.get('[data-cy=bookmark-note]').within(() => { + cy.get('.skillbox-input').clear().type('Hello Bike'); + }); + + cy.get('[data-cy=modal-save-button]').click(); + }); + +}); diff --git a/client/src/components/notes/BookmarkActions.vue b/client/src/components/notes/BookmarkActions.vue index 39d04bf7..4c5b74d4 100644 --- a/client/src/components/notes/BookmarkActions.vue +++ b/client/src/components/notes/BookmarkActions.vue @@ -1,13 +1,13 @@