Update frontend test

This commit is contained in:
Ramon Wenger 2022-10-05 20:32:37 +02:00
parent 51cfef5e40
commit e98831577f
1 changed files with 45 additions and 3 deletions

View File

@ -5,14 +5,56 @@ describe('Duplicate Content Block', () => {
cy.setup();
});
it('works', () => {
cy.visit('/fron');
const operations = {
MeQuery: getMinimalMe({isTeacher: true}),
UpdateLastModule: {},
ModuleEditModeQuery: {
module: {
}
},
AssignmentQuery: {
assignment: {
title: 'Ein Assignment',
assignment: 'Eine Beschreibung'
}
},
ModuleDetailsQuery: {
module: {
chapters: [
{
contentBlocks: [
{
type: 'normal',
title: 'Hello there',
contents: [
{
type: 'text_block',
value: {
text: '<p>Asdf</p>'
}
},
{
type: 'assignment',
value: {
title: 'Ein Auftrag',
assignment: 'Eine Beschreibung',
id: 'abcd'
}
}
]
}
]
}
]
}
}
};
cy.mockGraphqlOps({
operations
});
cy.getByDataCy('whatever');
cy.visit('/module/some-module');
cy.getByDataCy('toggle-editing').click();
});
});