Merge branch 'hotfix/assignment-html' into develop
This commit is contained in:
commit
bcca3b3e04
|
|
@ -0,0 +1,36 @@
|
|||
const operations = {
|
||||
ModulesQuery: {},
|
||||
AssignmentWithSubmissions: {
|
||||
assignment: {
|
||||
title: 'Ein Auftragstitel',
|
||||
solution: '<p>Eine Lösung</p>',
|
||||
assignment: 'Ein Auftrag',
|
||||
submissions: []
|
||||
}
|
||||
},
|
||||
MeQuery: {
|
||||
me: {
|
||||
onboardingVisited: true
|
||||
},
|
||||
},
|
||||
};
|
||||
|
||||
describe('Assignments', () => {
|
||||
before(() => {
|
||||
cy.task('getSchema').then(schema => {
|
||||
cy.mockGraphql({
|
||||
schema,
|
||||
mocks: {},
|
||||
operations,
|
||||
});
|
||||
});
|
||||
});
|
||||
|
||||
it('it does not display HTML tags', () => {
|
||||
cy.server();
|
||||
cy.viewport('macbook-15');
|
||||
cy.fakeLogin('nico.zickgraf', 'test');
|
||||
cy.visit('/module/lohn-und-budget/submissions/QXNzaWdubWVudE5vZGU6MQ==');
|
||||
cy.getByDataCy('assignment-solution').should('have.text', 'Eine Lösung');
|
||||
});
|
||||
});
|
||||
|
|
@ -12,7 +12,10 @@
|
|||
class="assignment-with-submissions__solution"
|
||||
v-if="assignment.solution">
|
||||
<h4 class="assignment-with-submissions__heading">Lösung</h4>
|
||||
<p class="assignment-with-submissions__solution-text">{{ assignment.solution }}</p>
|
||||
<p
|
||||
class="assignment-with-submissions__solution-text"
|
||||
data-cy="assignment-solution"
|
||||
v-html="assignment.solution" />
|
||||
</div>
|
||||
<p
|
||||
class="assignment-with-submissions__no-submissions"
|
||||
|
|
|
|||
Loading…
Reference in New Issue