Fix frontend tests

This commit is contained in:
Ramon Wenger 2021-05-06 10:59:32 +02:00
parent e7690d3e49
commit da85d3dbc2
9 changed files with 16 additions and 37 deletions

View File

@ -1,6 +1,5 @@
import {mockUpdateOnboardingProgress} from '../../support/helpers'; import {mockUpdateOnboardingProgress} from '../../support/helpers';
const schema = require('../../fixtures/schema.json');
const me = require('../../fixtures/me.new-student.json'); const me = require('../../fixtures/me.new-student.json');
describe('New student', () => { describe('New student', () => {

View File

@ -9,19 +9,11 @@ fragment ChapterParts on ChapterNode {
} }
} }
titleHiddenFor { titleHiddenFor {
edges { id
node { name
id
name
}
}
} }
descriptionHiddenFor { descriptionHiddenFor {
edges { id
node { name
id
name
}
}
} }
} }

View File

@ -1,5 +1,4 @@
fragment ContentBlockInterfaceParts on ContentBlockInterface { fragment ContentBlockInterfaceParts on ContentBlockInterface {
id
title title
type type
contents contents

View File

@ -1,4 +1,5 @@
fragment ContentBlockParts on ContentBlockNode { fragment ContentBlockParts on ContentBlockNode {
id
slug slug
userCreated userCreated
mine mine

View File

@ -3,11 +3,7 @@ fragment ObjectiveGroupParts on ObjectiveGroupNode {
title title
displayTitle displayTitle
hiddenFor { hiddenFor {
edges { id
node { name
id
name
}
}
} }
} }

View File

@ -4,19 +4,11 @@ fragment ObjectiveParts on ObjectiveNode {
mine mine
userCreated userCreated
hiddenFor { hiddenFor {
edges { id
node { name
id
name
}
}
} }
visibleFor { visibleFor {
edges { id
node { name
id
name
}
}
} }
} }

View File

@ -6,7 +6,6 @@ mutation MutateContentBlock($input: MutateContentBlockInput!) {
contentBlock { contentBlock {
...ContentBlockParts ...ContentBlockParts
...ContentBlockInterfaceParts ...ContentBlockInterfaceParts
} }
} }
} }

View File

@ -14,6 +14,7 @@ query SnapshotDetail($id: ID!) {
titleHidden titleHidden
descriptionHidden descriptionHidden
contentBlocks { contentBlocks {
id
...ContentBlockInterfaceParts ...ContentBlockInterfaceParts
hidden hidden
} }

View File

@ -11,9 +11,9 @@ from users.models import User, SchoolClass
MODULE_QUERY = """ MODULE_QUERY = """
query ModulesQuery($slug: String!) { query ModulesQuery($slug: String!) {
module(slug: $slug) { module(slug: $slug) {
id id
title title
chapters { chapters {
edges { edges {
node { node {
id id
@ -29,7 +29,7 @@ query ModulesQuery($slug: String!) {
} }
} }
} }
} }
} }
} }
""" """