Remove Objectives From Cypress Tests
This commit is contained in:
parent
a832598054
commit
6703c4a211
|
|
@ -33,7 +33,6 @@ const videoModule = {
|
|||
},
|
||||
bookmark: null,
|
||||
__typename: 'ModuleNode',
|
||||
objectiveGroups: [],
|
||||
chapters: [
|
||||
{
|
||||
id: 'Q2hhcHRlck5vZGU6Nzc2',
|
||||
|
|
|
|||
|
|
@ -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');
|
||||
});
|
||||
});
|
||||
|
|
@ -13,10 +13,6 @@
|
|||
"edges": [],
|
||||
"__typename": "AssignmentNodeConnection"
|
||||
},
|
||||
"objectiveGroups": {
|
||||
"edges": [],
|
||||
"__typename": "ObjectiveGroupNodeConnection"
|
||||
},
|
||||
"chapters": {
|
||||
"edges": [
|
||||
{
|
||||
|
|
|
|||
Loading…
Reference in New Issue