diff --git a/client/cypress/fixtures/mocks.js b/client/cypress/fixtures/mocks.js index 33f39295..8e36001f 100644 --- a/client/cypress/fixtures/mocks.js +++ b/client/cypress/fixtures/mocks.js @@ -92,9 +92,7 @@ export default { id: getModuleId(), }), TopicNode: () => ({ - modules: { - edges: [], - }, + modules: [], }), RoomNode: () => ({ title: 'A Room', diff --git a/client/cypress/integration/frontend/modules/create-content-block.page.spec.js b/client/cypress/integration/frontend/modules/create-content-block.page.spec.js index 8d5ce70f..aac14a9a 100644 --- a/client/cypress/integration/frontend/modules/create-content-block.page.spec.js +++ b/client/cypress/integration/frontend/modules/create-content-block.page.spec.js @@ -1,5 +1,23 @@ describe('Create Content Block', () => { it('visits the page', () => { - cy.visit(); + // todo: + // add mocks + // cy.visit('/module/some-module/add/bliblablub'); + // add title + // add text element + // add list item + // add text element to list item + // add second list item + // add text element to second list item + // add another text element to second list item + // save + + // another test + // go to pase + // click cancel, go back }); }); + + +// todo: another test +// edit existing content block diff --git a/client/src/components/school-class/EditClassNameWizard.vue b/client/src/components/school-class/EditClassNameWizard.vue index ad6a0d0c..e9049407 100644 --- a/client/src/components/school-class/EditClassNameWizard.vue +++ b/client/src/components/school-class/EditClassNameWizard.vue @@ -63,8 +63,8 @@ apollo: { schoolClass: { query: MY_SCHOOL_CLASS_QUERY, - update(data) { - return this.$getRidOfEdges(data).me.selectedClass; + update({me: {selectedClass}}) { + return selectedClass; } } }, diff --git a/client/src/graphql/gql/queries/assignmentsQuery.gql b/client/src/graphql/gql/queries/assignmentsQuery.gql index 279a3dd6..cd05fdba 100644 --- a/client/src/graphql/gql/queries/assignmentsQuery.gql +++ b/client/src/graphql/gql/queries/assignmentsQuery.gql @@ -1,10 +1,6 @@ #import "../fragments/assignmentParts.gql" query AssignmentsQuery { assignments { - edges { - node { - ...AssignmentParts - } - } + ...AssignmentParts } } diff --git a/client/src/graphql/gql/queries/modules/moduleDetailsQuery.gql b/client/src/graphql/gql/queries/modules/moduleDetailsQuery.gql index ae684dbf..eb09e9e2 100644 --- a/client/src/graphql/gql/queries/modules/moduleDetailsQuery.gql +++ b/client/src/graphql/gql/queries/modules/moduleDetailsQuery.gql @@ -9,11 +9,7 @@ query ModuleDetailsQuery($slug: String, $id: ID) { module(slug: $slug, id: $id) { ...ModuleParts assignments { - edges { - node { - ...AssignmentParts - } - } + ...AssignmentParts } objectiveGroups { ...ObjectiveGroupParts diff --git a/client/src/graphql/gql/queries/newsTeasersQuery.gql b/client/src/graphql/gql/queries/newsTeasersQuery.gql index b6036c34..6b139a7d 100644 --- a/client/src/graphql/gql/queries/newsTeasersQuery.gql +++ b/client/src/graphql/gql/queries/newsTeasersQuery.gql @@ -1,15 +1,11 @@ query NewsTeasers { - newsTeasers { - edges { - node { - id - description - title - imageUrl - newsArticleUrl - displayDate - imageSource - } - } - } + newsTeasers { + id + description + title + imageUrl + newsArticleUrl + displayDate + imageSource + } } diff --git a/client/src/graphql/queries.js b/client/src/graphql/queries.js index d475cfd1..4d503289 100644 --- a/client/src/graphql/queries.js +++ b/client/src/graphql/queries.js @@ -7,9 +7,6 @@ export function moduleQuery() { variables: { slug: this.$route.params.slug }, - update({module}) { - return this.$getRidOfEdges(module) || {}; - } }; } diff --git a/client/src/mixins/news.js b/client/src/mixins/news.js index 30660b2e..578eeb60 100644 --- a/client/src/mixins/news.js +++ b/client/src/mixins/news.js @@ -9,9 +9,6 @@ export default { apollo: { newsTeasers: { query: NEWS_TEASER_QUERY, - update(data) { - return this.$getRidOfEdges(data).newsTeasers; - }, } } }; diff --git a/client/src/pages/module/module.vue b/client/src/pages/module/module.vue index 8cd0908f..01515a1b 100644 --- a/client/src/pages/module/module.vue +++ b/client/src/pages/module/module.vue @@ -42,9 +42,6 @@ variables: { slug: this.$route.params.slug, }, - update(data) { - return this.$getRidOfEdges(data).module || {}; - }, result({data: {module: {id}}}) { if (!this.updateSent) { this.$log.debug(`=== updating result for module ${id} ===`); diff --git a/client/src/pages/module/moduleRoom.vue b/client/src/pages/module/moduleRoom.vue index e7e0d911..463a54fb 100644 --- a/client/src/pages/module/moduleRoom.vue +++ b/client/src/pages/module/moduleRoom.vue @@ -80,5 +80,5 @@