From 1299639b30df8132075de062e6e3c2cd8e22e19a Mon Sep 17 00:00:00 2001 From: Philip Bauer Date: Thu, 8 Jun 2023 06:32:01 +0200 Subject: [PATCH] revert fd6d640 and 341a7b8 --- src/plone/volto/browser/migrate_to_volto.py | 6 ++-- .../volto/tests/test_migrate_to_volto.py | 30 ------------------- 2 files changed, 3 insertions(+), 33 deletions(-) diff --git a/src/plone/volto/browser/migrate_to_volto.py b/src/plone/volto/browser/migrate_to_volto.py index 4a7c1107..8eba43b2 100644 --- a/src/plone/volto/browser/migrate_to_volto.py +++ b/src/plone/volto/browser/migrate_to_volto.py @@ -37,9 +37,9 @@ class MigrateToVolto(BrowserView): def __call__(self): request = self.request self.service_url = request.get("service_url", "http://localhost:5000/html") - self.migrate_folders = request.get("migrate_folders", False) - self.migrate_default_pages = request.get("migrate_default_pages", False) - self.purge_richtext = request.get("purge_richtext", False) + self.migrate_folders = request.get("migrate_folders", True) + self.migrate_default_pages = request.get("migrate_default_pages", True) + self.purge_richtext = request.get("purge_richtext", True) # We can still use outdated draftjs by setting slate to False on the request self.slate = request.get("slate", True) diff --git a/src/plone/volto/tests/test_migrate_to_volto.py b/src/plone/volto/tests/test_migrate_to_volto.py index 3739a03f..0fe7fe5a 100644 --- a/src/plone/volto/tests/test_migrate_to_volto.py +++ b/src/plone/volto/tests/test_migrate_to_volto.py @@ -40,10 +40,6 @@ def test_plonevolto_is_installed(self): self.assertFalse(installer.is_product_installed("plone.volto")) view = self.portal.restrictedTraverse("@@migrate_to_volto") - # check checkboxes - self.request.form["migrate_folders"] = True - self.request.form["migrate_default_pages"] = True - self.request.form["purge_richtext"] = True self.request.form["form.submitted"] = True view() @@ -70,10 +66,6 @@ def test_items_are_migrated_to_folderish(self): ) view = self.portal.restrictedTraverse("@@migrate_to_volto") - # check checkboxes - self.request.form["migrate_folders"] = True - self.request.form["migrate_default_pages"] = True - self.request.form["purge_richtext"] = True self.request.form["form.submitted"] = True view() @@ -113,9 +105,6 @@ def test_folders_are_migrated(self): self.assertEqual(self.portal["folder1"].portal_type, "Folder") view = self.portal.restrictedTraverse("@@migrate_to_volto") - self.request.form["migrate_folders"] = True - self.request.form["migrate_default_pages"] = True - self.request.form["purge_richtext"] = True self.request.form["form.submitted"] = True view() @@ -145,10 +134,6 @@ def test_collections_are_migrated(self): self.assertEqual(self.portal["collection"].portal_type, "Collection") view = self.portal.restrictedTraverse("@@migrate_to_volto") - # check checkboxes - self.request.form["migrate_folders"] = True - self.request.form["migrate_default_pages"] = True - self.request.form["purge_richtext"] = True self.request.form["form.submitted"] = True view() @@ -195,10 +180,6 @@ def test_default_pages_are_migrated(self): folder.setDefaultPage("doc") view = self.portal.restrictedTraverse("@@migrate_to_volto") - # check checkboxes - self.request.form["migrate_folders"] = True - self.request.form["migrate_default_pages"] = True - self.request.form["purge_richtext"] = True self.request.form["form.submitted"] = True view() @@ -257,10 +238,6 @@ def test_default_page_collections_are_migrated(self): self.assertEqual(len(collection.results()), 2) view = self.portal.restrictedTraverse("@@migrate_to_volto") - # check checkboxes - self.request.form["migrate_folders"] = True - self.request.form["migrate_default_pages"] = True - self.request.form["purge_richtext"] = True self.request.form["form.submitted"] = True view() @@ -314,10 +291,6 @@ def test_default_page_news_are_not_migrated(self): self.assertIn("news", folder.keys()) view = self.portal.restrictedTraverse("@@migrate_to_volto") - # check checkboxes - self.request.form["migrate_folders"] = True - self.request.form["migrate_default_pages"] = True - self.request.form["purge_richtext"] = True self.request.form["form.submitted"] = True view() @@ -356,9 +329,6 @@ def test_richtext_is_migrated(self): self.assertTrue(isinstance(doc.text, RichTextValue)) view = self.portal.restrictedTraverse("@@migrate_to_volto") - self.request.form["migrate_folders"] = True - self.request.form["migrate_default_pages"] = True - self.request.form["purge_richtext"] = True self.request.form["form.submitted"] = True view()