diff --git a/client/cypress/e2e/frontend/modules/duplicate-content-block.cy.ts b/client/cypress/e2e/frontend/modules/duplicate-content-block.cy.ts index c2bc692c..c8f23eaa 100644 --- a/client/cypress/e2e/frontend/modules/duplicate-content-block.cy.ts +++ b/client/cypress/e2e/frontend/modules/duplicate-content-block.cy.ts @@ -4,7 +4,7 @@ describe('Duplicate Content Block', () => { beforeEach(() => { cy.setup(); }); - it.skip('works', () => { + it('works', () => { cy.visit('/fron'); const operations = { diff --git a/server/books/tests/test_duplicate_content_blocks.py b/server/books/tests/test_duplicate_content_blocks.py index 3b7b96ce..4d372507 100644 --- a/server/books/tests/test_duplicate_content_blocks.py +++ b/server/books/tests/test_duplicate_content_blocks.py @@ -79,107 +79,107 @@ class DuplicateContentBlockTestCase(SkillboxTestCase): self.assertTrue('Kopie' in content_blocks[0].get('title')) self.assertTrue('Kopie' not in content_blocks[1].get('title')) - # def test_duplicate_non_editable_contents(self): - # # contents__0__text_block__text - # nested_form_data({ - # 'content': streamfield([ - # nested_form_data({ - # 'text_block': [ - # ('text', rich_text('Asdf')) - # ] - # }) - # ]) - # }) - # - # contents = [ - # nested_form_data({ - # 'text_block': streamfield([ - # ('text', 'Asdf') - # ]) - # }), - # # { - # # "type": "text_block", - # # "value": { - # # "text": "Asdf" - # # }, - # # }, - # # { - # # "type": "assignment", - # # "value": { - # # "title": "Ein Auftragstitel", - # # "assignment": "Ein Auftrag", - # # }, - # # }, - # # { - # # "type": "image_block", - # # "value": { - # # "path": "/media/original_images/dummy_pZUH02q.jpg" - # # }, - # # }, - # # { - # # "type": "image_url_block", - # # "value": { - # # "title": "Asdf", - # # "url": "http://localhost:8000/media/images/dummy_pZUH02q.max-165x165.jpg" - # # }, - # # }, - # # { - # # "type": "link_block", - # # "value": { - # # "text": "Asdf", - # # "url": "https://iterativ.ch" - # # }, - # # }, - # # { - # # "type": "solution", - # # "value": { - # # "text": "Asdf", - # # }, - # # }, - # # { - # # "type": "video_block", - # # "value": { - # # "url": "https://www.youtube.com/watch?v=QxQBWR7sntI" - # # }, - # # }, - # # { - # # "type": "document_block", - # # "value": { - # # "url": "http://localhost:8000/media/images/dummy_pZUH02q.max-165x165.jpg" - # # }, - # # }, - # # { - # # "type": "infogram_block", - # # "value": { - # # "id": "4405271e-dbfb-407e-ac19-0a238cde393f", - # # "title": "Gerät Internetnutzung Jungen" - # # }, - # # }, - # # { - # # "type": "thinglink_block", - # # "value": { - # # "id": "1314204266449076227" - # # }, - # # }, - # # { - # # "type": "subtitle", - # # "value": { - # # "text": "Subtitle" - # # }, - # # }, - # # { - # # "type": "instruction", - # # "value": { - # # "url": "http://localhost:8000/media/images/dummy_pZUH02q.max-165x165.jpg", - # # "text": "Instruction", - # # }, - # # }, - # # { - # # "type": "module_room_slug", - # # "value": { - # # "title": "Raum", - # # }, - # # }, - # ] - # self.content_block.contents = contents - # self.assertTrue(False) + def test_duplicate_non_editable_contents(self): + # contents__0__text_block__text + nested_form_data({ + 'content': streamfield([ + nested_form_data({ + 'text_block': [ + ('text', rich_text('Asdf')) + ] + }) + ]) + }) + + contents = [ + nested_form_data({ + 'text_block': streamfield([ + ('text', 'Asdf') + ]) + }), + # { + # "type": "text_block", + # "value": { + # "text": "Asdf" + # }, + # }, + # { + # "type": "assignment", + # "value": { + # "title": "Ein Auftragstitel", + # "assignment": "Ein Auftrag", + # }, + # }, + # { + # "type": "image_block", + # "value": { + # "path": "/media/original_images/dummy_pZUH02q.jpg" + # }, + # }, + # { + # "type": "image_url_block", + # "value": { + # "title": "Asdf", + # "url": "http://localhost:8000/media/images/dummy_pZUH02q.max-165x165.jpg" + # }, + # }, + # { + # "type": "link_block", + # "value": { + # "text": "Asdf", + # "url": "https://iterativ.ch" + # }, + # }, + # { + # "type": "solution", + # "value": { + # "text": "Asdf", + # }, + # }, + # { + # "type": "video_block", + # "value": { + # "url": "https://www.youtube.com/watch?v=QxQBWR7sntI" + # }, + # }, + # { + # "type": "document_block", + # "value": { + # "url": "http://localhost:8000/media/images/dummy_pZUH02q.max-165x165.jpg" + # }, + # }, + # { + # "type": "infogram_block", + # "value": { + # "id": "4405271e-dbfb-407e-ac19-0a238cde393f", + # "title": "Gerät Internetnutzung Jungen" + # }, + # }, + # { + # "type": "thinglink_block", + # "value": { + # "id": "1314204266449076227" + # }, + # }, + # { + # "type": "subtitle", + # "value": { + # "text": "Subtitle" + # }, + # }, + # { + # "type": "instruction", + # "value": { + # "url": "http://localhost:8000/media/images/dummy_pZUH02q.max-165x165.jpg", + # "text": "Instruction", + # }, + # }, + # { + # "type": "module_room_slug", + # "value": { + # "title": "Raum", + # }, + # }, + ] + self.content_block.contents = contents + self.assertTrue(False)