Clean up code

This commit is contained in:
Ramon Wenger 2021-02-22 11:26:11 +01:00
parent b551dd240e
commit 623a6c3837
3 changed files with 7 additions and 8 deletions

View File

@ -5,7 +5,7 @@
"targets": { "targets": {
"browsers": ["> 1%", "last 2 versions", "not ie <= 8"] "browsers": ["> 1%", "last 2 versions", "not ie <= 8"]
} }
}], }]
], ],
"plugins": [ "plugins": [
"transform-vue-jsx", "transform-vue-jsx",

View File

@ -17,12 +17,12 @@ const topic = {
return { return {
node: module, node: module,
__typename: 'ModuleNodeEdge' __typename: 'ModuleNodeEdge'
} };
}) })
] ]
} }
} }
} };
Cypress.Commands.add('checkHome', (n, skipHome) => { Cypress.Commands.add('checkHome', (n, skipHome) => {
if (!skipHome) { if (!skipHome) {
@ -71,7 +71,7 @@ describe('Current Module', () => {
'__typename': 'UserNode', '__typename': 'UserNode',
'permissions': [] 'permissions': []
} }
} };
}, },
AssignmentsQuery: { AssignmentsQuery: {
assignments assignments
@ -79,7 +79,7 @@ describe('Current Module', () => {
ModulesQuery: variables => { ModulesQuery: variables => {
return { return {
module: fullModules[variables.slug] module: fullModules[variables.slug]
} };
}, },
TopicsQuery: topics, TopicsQuery: topics,
Topic: topic, Topic: topic,
@ -95,7 +95,7 @@ describe('Current Module', () => {
lastModule: moduleTeasers[variables.input.id], lastModule: moduleTeasers[variables.input.id],
__typename: 'UpdateLastModulePayload' __typename: 'UpdateLastModulePayload'
} }
} };
} }
} }
}); });
@ -150,5 +150,5 @@ describe('Current Module', () => {
cy.get('[data-cy=start-module-teaser]').first().should('contain', 'Lerntipps'); cy.get('[data-cy=start-module-teaser]').first().should('contain', 'Lerntipps');
cy.get('[data-cy=start-module-teaser]').eq(1).should('contain', 'Random'); cy.get('[data-cy=start-module-teaser]').eq(1).should('contain', 'Random');
cy.get('[data-cy=start-module-teaser]').eq(2).should('contain', 'Geld'); cy.get('[data-cy=start-module-teaser]').eq(2).should('contain', 'Geld');
}) });
}); });

View File

@ -68,7 +68,6 @@ export const hidden = ({
// otherwise, is it explicitly hidden for this school class? // otherwise, is it explicitly hidden for this school class?
: containsClass(hiddenFor, schoolClass); : containsClass(hiddenFor, schoolClass);
case CHAPTER_TITLE_TYPE: case CHAPTER_TITLE_TYPE:
console.log(containsClass(titleHiddenFor, schoolClass));
return containsClass(titleHiddenFor, schoolClass); return containsClass(titleHiddenFor, schoolClass);
case CHAPTER_DESCRIPTION_TYPE: case CHAPTER_DESCRIPTION_TYPE:
return containsClass(descriptionHiddenFor, schoolClass); return containsClass(descriptionHiddenFor, schoolClass);