From 1358594dfa48298e46d55e04c9754fab91e234c2 Mon Sep 17 00:00:00 2001 From: Ramon Wenger Date: Wed, 26 Oct 2022 16:17:41 +0200 Subject: [PATCH] Fix another cypress test --- .../e2e/frontend/read-only/rooms.spec.js | 36 +++++++++---------- 1 file changed, 17 insertions(+), 19 deletions(-) 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}); }); });