diff --git a/client/cypress/integration/frontend/modules/snapshots.spec.js b/client/cypress/integration/frontend/modules/snapshots.spec.js index 2cf28352..09622877 100644 --- a/client/cypress/integration/frontend/modules/snapshots.spec.js +++ b/client/cypress/integration/frontend/modules/snapshots.spec.js @@ -89,6 +89,14 @@ describe('Snapshot', () => { shared: false, creator: 'me', }, + { + id: 'U25hcHNob3ROb2RlOjU=', + title: 'Shared snapshot', + created: '2020-01-02', + mine: false, + shared: true, + creator: 'someone else', + }, ], }, }, @@ -167,4 +175,18 @@ describe('Snapshot', () => { cy.getByDataCy('modal-save-button').click(); cy.getByDataCy('snapshot-entry').should('have.length', 0); }); + + it('Displays the Snapshot list correcly', () => { + cy.mockGraphqlOps(operations(true)); + cy.visit('module/miteinander-reden/snapshots'); + cy.getByDataCy('snapshot-entry').should('have.length', 1); + cy.getByDataCy('delete-snapshot-button').should('exist'); + cy.getByDataCy('rename-snapshot-button').should('exist'); + cy.getByDataCy('snapshot-link').should('have.text', 'Old Title'); + cy.getByDataCy('team-snapshots-link').click(); + cy.getByDataCy('snapshot-entry').should('have.length', 1); + cy.getByDataCy('snapshot-link').should('have.text', 'Shared snapshot'); + cy.getByDataCy('delete-snapshot-button').should('not.exist'); + cy.getByDataCy('rename-snapshot-button').should('not.exist'); + }); }); diff --git a/client/src/components/modules/SnapshotListItem.vue b/client/src/components/modules/SnapshotListItem.vue index c59bbeac..3fce3153 100644 --- a/client/src/components/modules/SnapshotListItem.vue +++ b/client/src/components/modules/SnapshotListItem.vue @@ -18,6 +18,7 @@