Fix cypress test, rename some files

This commit is contained in:
Ramon Wenger 2021-08-04 17:07:17 +02:00
parent 692eb13a9b
commit 7a5d0b90db
10 changed files with 4 additions and 5 deletions

View File

@ -1,12 +1,11 @@
import getMe from '../../fixtures/me.minimal'; import getMe from '../../fixtures/me.minimal';
import module from '../../fixtures/module.minimal'; import module from '../../fixtures/module.minimal';
import mocks from '../../fixtures/mocks'; import mocks from '../../fixtures/mocks';
import {getMinimalMe} from '../../support/helpers';
const operations = isTeacher => ({ const operations = isTeacher => ({
operations: { operations: {
MeQuery: { MeQuery: getMinimalMe({isTeacher}),
me: getMe(isTeacher),
},
ModuleDetailsQuery: { ModuleDetailsQuery: {
module, module,
}, },

View File

@ -1,10 +1,10 @@
// todo: clean up this file // todo: clean up this file
export const getMinimalMe = ({readOnly, classReadOnly = false}) => ({ export const getMinimalMe = ({readOnly = false, classReadOnly = false, isTeacher = true}) => ({
me: { me: {
onboardingVisited: true, onboardingVisited: true,
readOnly, readOnly,
isTeacher: true, isTeacher,
selectedClass: { selectedClass: {
id: 'selectedClassId', id: 'selectedClassId',
readOnly: classReadOnly, readOnly: classReadOnly,