From 6703c4a2113518618c6506eb17f2e9fdfa094140 Mon Sep 17 00:00:00 2001 From: Lorenz Padberg Date: Wed, 1 May 2024 10:45:16 +0200 Subject: [PATCH] Remove Objectives From Cypress Tests --- .../cypress/e2e/frontend/modules/videos.cy.ts | 1 - .../objectives/objectives-visibility.spec.js | 87 ------------------- .../frontend/objectives/objectives.spec.js | 0 client/cypress/fixtures/module-geld.json | 4 - 4 files changed, 92 deletions(-) delete mode 100644 client/cypress/e2e/frontend/objectives/objectives-visibility.spec.js delete mode 100644 client/cypress/e2e/frontend/objectives/objectives.spec.js diff --git a/client/cypress/e2e/frontend/modules/videos.cy.ts b/client/cypress/e2e/frontend/modules/videos.cy.ts index 76dd6a2a..5a53a5f7 100644 --- a/client/cypress/e2e/frontend/modules/videos.cy.ts +++ b/client/cypress/e2e/frontend/modules/videos.cy.ts @@ -33,7 +33,6 @@ const videoModule = { }, bookmark: null, __typename: 'ModuleNode', - objectiveGroups: [], chapters: [ { id: 'Q2hhcHRlck5vZGU6Nzc2', diff --git a/client/cypress/e2e/frontend/objectives/objectives-visibility.spec.js b/client/cypress/e2e/frontend/objectives/objectives-visibility.spec.js deleted file mode 100644 index 49ef4546..00000000 --- a/client/cypress/e2e/frontend/objectives/objectives-visibility.spec.js +++ /dev/null @@ -1,87 +0,0 @@ -import { getMe } from '../../../support/helpers'; -import mocks from '../../../fixtures/mocks'; - -const modules = { - 'lohn-und-budget': { - objectiveGroups: { - edges: [ - { - node: { - title: 'LANGUAGE_COMMUNICATION', - objectives: { - edges: [ - { - node: { - text: 'i-am-an-objective', - hiddenFor: { - edges: [], - }, - }, - }, - ], - }, - }, - }, - ], - }, - }, -}; - -const operations = { - MeQuery() { - return getMe({ - schoolClasses: ['FLID2018a'], - teacher: false, - }); - }, - ModulesQuery: modules, - MySchoolClassQuery: { - me: {}, - }, - UpdateLastModule: { - updateLastModule: { - success: true, - }, - }, - SyncModuleVisibility: { - syncModuleVisibility: { - success: true, - }, - }, -}; - -// const mocks = { -// UUID: () => 'Whatever', -// GenericStreamFieldType: () => [], -// ObjectiveGroup: () => ({}), -// Module: () => ({ -// title: 'title', -// slug: 'slug', -// metaTitle: 'metaTitle', -// teaser: 'teaser', -// intro: 'intro', -// assignments: {edges: []}, -// objectiveGroups: {edges: []}, -// id: 'ID', -// }), -// }; - -describe('Objective Visibility', () => { - beforeEach(() => { - cy.task('getSchema').then((schema) => { - cy.mockGraphql({ - schema, - // endpoint: '/api/graphql' - mocks, - operations, - }); - }); - }); - - //todo: finish writing this test, this does nothing - it.skip('should display the correct objectives', () => { - cy.fakeLogin('rachel.green', 'test'); - - cy.visit('/module/lohn-und-budget'); - }); -}); diff --git a/client/cypress/e2e/frontend/objectives/objectives.spec.js b/client/cypress/e2e/frontend/objectives/objectives.spec.js deleted file mode 100644 index e69de29b..00000000 diff --git a/client/cypress/fixtures/module-geld.json b/client/cypress/fixtures/module-geld.json index 37f0e55e..78b45aa7 100644 --- a/client/cypress/fixtures/module-geld.json +++ b/client/cypress/fixtures/module-geld.json @@ -13,10 +13,6 @@ "edges": [], "__typename": "AssignmentNodeConnection" }, - "objectiveGroups": { - "edges": [], - "__typename": "ObjectiveGroupNodeConnection" - }, "chapters": { "edges": [ {