diff --git a/client/cypress/e2e/frontend/read-only/rooms.spec.js b/client/cypress/e2e/frontend/read-only/rooms.spec.js index f56e7123..f0df6f3a 100644 --- a/client/cypress/e2e/frontend/read-only/rooms.spec.js +++ b/client/cypress/e2e/frontend/read-only/rooms.spec.js @@ -1,7 +1,7 @@ describe('Room Team Management - Read only', () => { const SELECTED_CLASS_ID = 'selectedClassId'; - const getOperations = ({ readOnly, classReadOnly }) => ({ + const getOperations = ({readOnly, classReadOnly}) => ({ MeQuery: { me: { readOnly, @@ -13,25 +13,23 @@ describe('Room Team Management - Read only', () => { }, }, RoomsQuery: { - rooms: [ - { - id: '', - slug: '', - title: 'some room', - entryCount: 3, - appearance: 'red', - description: 'some description', - schoolClass: { - id: SELECTED_CLASS_ID, - name: 'bla', - }, + rooms: [{ + id: '', + slug: 'some-room', + title: 'some room', + entryCount: 3, + appearance: 'red', + description: 'some description', + schoolClass: { + id: SELECTED_CLASS_ID, + name: 'bla', }, - ], + }], }, }); - const checkRoomsReadOnly = ({ editable, readOnly, classReadOnly = false }) => { - const operations = getOperations({ readOnly, classReadOnly }); + const checkRoomsReadOnly = ({editable, readOnly, classReadOnly = false}) => { + const operations = getOperations({readOnly, classReadOnly}); cy.mockGraphqlOps({ operations, @@ -50,14 +48,14 @@ describe('Room Team Management - Read only', () => { }); it('can edit room', () => { - checkRoomsReadOnly({ editable: true, readOnly: false }); + checkRoomsReadOnly({editable: true, readOnly: false}); }); it('can not edit room', () => { - checkRoomsReadOnly({ editable: false, readOnly: true }); + checkRoomsReadOnly({editable: false, readOnly: true}); }); it('can not edit room of inactive class', () => { - checkRoomsReadOnly({ editable: false, readOnly: false, classReadOnly: true }); + checkRoomsReadOnly({editable: false, readOnly: false, classReadOnly: true}); }); });