Update frontend test
This commit is contained in:
parent
51cfef5e40
commit
e98831577f
|
|
@ -5,14 +5,56 @@ describe('Duplicate Content Block', () => {
|
||||||
cy.setup();
|
cy.setup();
|
||||||
});
|
});
|
||||||
it('works', () => {
|
it('works', () => {
|
||||||
cy.visit('/fron');
|
|
||||||
|
|
||||||
const operations = {
|
const operations = {
|
||||||
MeQuery: getMinimalMe({isTeacher: true}),
|
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({
|
cy.mockGraphqlOps({
|
||||||
operations
|
operations
|
||||||
});
|
});
|
||||||
cy.getByDataCy('whatever');
|
cy.visit('/module/some-module');
|
||||||
|
|
||||||
|
cy.getByDataCy('toggle-editing').click();
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue