-
-
Notifications
You must be signed in to change notification settings - Fork 75
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Branch: refs/heads/master Date: 2024-11-07T14:49:09+01:00 Author: Peter Mathis (petschki) <[email protected]> Commit: plone/Products.CMFPlone@db27409 More modal click fixes Files changed: M Products/CMFPlone/tests/robot/test_controlpanel_actions.robot Repository: Products.CMFPlone Branch: refs/heads/master Date: 2024-11-07T14:50:03+01:00 Author: Peter Mathis (petschki) <[email protected]> Commit: plone/Products.CMFPlone@e4f7b41 changenote Files changed: M news/4045.bugfixes Repository: Products.CMFPlone Branch: refs/heads/master Date: 2024-11-07T15:24:47+01:00 Author: Peter Mathis (petschki) <[email protected]> Commit: plone/Products.CMFPlone@887db00 Merge pull request #4047 from plone/petschki-robottest-modal-fix Robottest modal click fixes in actioncontrolpanel Files changed: M Products/CMFPlone/tests/robot/test_controlpanel_actions.robot M news/4045.bugfixes
- Loading branch information
Showing
1 changed file
with
22 additions
and
71 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,97 +1,48 @@ | ||
Repository: plone.app.multilingual | ||
Repository: Products.CMFPlone | ||
|
||
|
||
Branch: refs/heads/master | ||
Date: 2024-11-07T12:23:59+01:00 | ||
Author: 1letter (1letter) <[email protected]> | ||
Commit: https://github.com/plone/plone.app.multilingual/commit/9227f3d37a43d0735ff408130b6b574f19e76588 | ||
Date: 2024-11-07T14:49:09+01:00 | ||
Author: Peter Mathis (petschki) <[email protected]> | ||
Commit: https://github.com/plone/Products.CMFPlone/commit/db27409f5423652f00f0325928e137fab43cadcd | ||
|
||
switch to pat-contentbrowser widget in IConnectTranslation | ||
More modal click fixes | ||
|
||
Files changed: | ||
M src/plone/app/multilingual/browser/interfaces.py | ||
M Products/CMFPlone/tests/robot/test_controlpanel_actions.robot | ||
|
||
b'diff --git a/src/plone/app/multilingual/browser/interfaces.py b/src/plone/app/multilingual/browser/interfaces.py\nindex 8977a0e3..7190d911 100644\n--- a/src/plone/app/multilingual/browser/interfaces.py\n+++ b/src/plone/app/multilingual/browser/interfaces.py\n@@ -2,7 +2,7 @@\n from plone.app.multilingual import _\n from plone.app.multilingual.browser.vocabularies import untranslated_languages\n from plone.app.multilingual.interfaces import ITranslationManager\n-from plone.app.z3cform.widget import RelatedItemsFieldWidget\n+from plone.app.z3cform.widgets.contentbrowser import ContentBrowserFieldWidget\n from plone.autoform import directives\n from plone.autoform.interfaces import IFormFieldProvider\n from plone.base.interfaces import IPloneSiteRoot\n@@ -98,7 +98,7 @@ class IConnectTranslation(model.Schema):\n )\n directives.widget(\n "content",\n- RelatedItemsFieldWidget,\n+ ContentBrowserFieldWidget,\n pattern_options={\n "basePath": make_relation_root_path,\n },\n' | ||
b'diff --git a/Products/CMFPlone/tests/robot/test_controlpanel_actions.robot b/Products/CMFPlone/tests/robot/test_controlpanel_actions.robot\nindex 1574010f60..231bc246b6 100644\n--- a/Products/CMFPlone/tests/robot/test_controlpanel_actions.robot\n+++ b/Products/CMFPlone/tests/robot/test_controlpanel_actions.robot\n@@ -65,27 +65,27 @@ the actions control panel\n \n I modify an action title\n Click //*[@id="content-core"]/section[2]/section/ol/li[1]/form/a\n- Get Text //body contains Action Settings\n+ Wait For Condition Text //body contains Action Settings\n Type Text //input[@name="form.widgets.title"] A new site map\n Click //div[contains(@class,\'pattern-modal-buttons\')]/button\n \n \n I change the actions order\n Click //*[@id="content-core"]/section[2]/section/ol/li[1]/form/a\n- Get Text //body contains Action Settings\n+ Wait For Condition Text //body contains Action Settings\n Type Text //input[@name="form.widgets.position"] 3\n Click //div[contains(@class,\'pattern-modal-buttons\')]/button\n \n \n I add a new action\n Click //*[@id="content-core"]/p[@class="addAction"]/a\n- Get Text //body contains New action\n+ Wait For Condition Text //body contains New action\n Select Options By //select[@name="form.widgets.category:list"] label User actions\n Type Text //input[@name="form.widgets.id"] favorites\n Click //div[contains(@class,\'pattern-modal-buttons\')]/button\n- Get Text //body contains favorites\n+ Wait For Condition Text //body contains favorites\n Click //*[@id="content-core"]/section[6]/section/ol/li[8]/form/a\n- Get Text //body contains Action Settings\n+ Wait For Condition Text //body contains Action Settings\n Type Text //input[@name="form.widgets.title"] My favorites\n Type Text //input[@name="form.widgets.url_expr"] string:\\${globals_view/navigationRootUrl}/favorites\n Click //div[contains(@class,\'pattern-modal-buttons\')]/button\n@@ -136,4 +136,4 @@ anonymous users cannot see the action anymore\n anonymous users can see the action again\n Disable autologin\n Go to ${PLONE_URL}\n- Get Text //body contains Site Map\n\\ No newline at end of file\n+ Get Text //body contains Site Map\n' | ||
|
||
Repository: plone.app.multilingual | ||
Repository: Products.CMFPlone | ||
|
||
|
||
Branch: refs/heads/master | ||
Date: 2024-11-07T12:23:59+01:00 | ||
Author: 1letter (1letter) <[email protected]> | ||
Commit: https://github.com/plone/plone.app.multilingual/commit/5a56ab2d7849095d230226528a9967b95ae29220 | ||
Date: 2024-11-07T14:50:03+01:00 | ||
Author: Peter Mathis (petschki) <[email protected]> | ||
Commit: https://github.com/plone/Products.CMFPlone/commit/e4f7b419782b79addc8db880473f9414d2a5904e | ||
|
||
Update robottest to check the pat-contentbrowser | ||
changenote | ||
|
||
Files changed: | ||
M src/plone/app/multilingual/tests/robot/test_add_translation.robot | ||
M news/4045.bugfixes | ||
|
||
b'diff --git a/src/plone/app/multilingual/tests/robot/test_add_translation.robot b/src/plone/app/multilingual/tests/robot/test_add_translation.robot\nindex 236a49dd..f75ade04 100644\n--- a/src/plone/app/multilingual/tests/robot/test_add_translation.robot\n+++ b/src/plone/app/multilingual/tests/robot/test_add_translation.robot\n@@ -46,10 +46,10 @@ I link the document in English as a translation\n Get Element States //a[@id="_modify_translations"] contains visible\n Click //a[@id="_modify_translations"]\n Click //table[@id="translations-overview"]/tbody/tr[1]/td[3]/a[contains(@class,"connectTranslationAction")]\n- Click //div[@id="formfield-form-widgets-content"]//div[contains(@class,"pat-relateditems-container")]//button[contains(@class,"mode") and contains(@class,"search")]\n- Type Text //div[@id="formfield-form-widgets-content"]//input[contains(@class,"select2-input")] en\n- Click //span[contains(., \'An English Document\')]\n- Click //*[contains(@class, \'modal-footer\')]//button[@id=\'form-buttons-connect_translation\']\n+ Click //div[@id="formfield-form-widgets-content"]//div[@class="content-browser-wrapper"]//button[contains(text(),"Select")]\n+ Click item in column 2 2\n+ Click //div[contains(@class, "content-browser-wrapper")]//div[contains(@class, "levelColumns")]/div[contains(@class, "preview")]/div[contains(@class, "levelToolbar")]/button\n+ Click //*[contains(@class, \'modal-footer\')]//button[@name=\'form.buttons.connect_translation\']\n Get Text //table[@id="translations-overview"]/tbody/tr[1]/td[2]/h3[@class="translationTitle"] should be An English Document\n Click //table[@id="translations-overview"]//a[contains(text(),\'/plone/ca/a-catalan-document\')]\n Get Text //*[@id="content"]/header/h1 should be A Catalan Document\n@@ -63,3 +63,14 @@ I switch to English\n I can view the document in English\n Get Element //h1[1][contains(text(),\'English Document\')]\n Get Element //ul[@id=\'portal-languageselector\']/li[contains(@class, \'currentLanguage\')]/a[@title=\'English\']\n+\n+\n+# DRY\n+\n+Click item in column\n+ [arguments] ${colnumber} ${itemposition}\n+ Click //div[contains(@class, "content-browser-wrapper")]//div[contains(@class, "levelColumns")]/div[${colnumber}]/div[contains(@class, "levelItems")]/div[${itemposition}]\n+\n+Pause\n+ Import library Dialogs\n+ Pause execution\n\\ No newline at end of file\n' | ||
b'diff --git a/news/4045.bugfixes b/news/4045.bugfixes\nindex 0744c9a37b..336fba81af 100644\n--- a/news/4045.bugfixes\n+++ b/news/4045.bugfixes\n@@ -1,2 +1,2 @@\n-Fix more unstable robottests with "Wait For Condition".\n+Fix more unstable robottests with "Wait For Condition" when clicking modal links.\n [petschki]\n' | ||
|
||
Repository: plone.app.multilingual | ||
Repository: Products.CMFPlone | ||
|
||
|
||
Branch: refs/heads/master | ||
Date: 2024-11-07T12:23:59+01:00 | ||
Author: 1letter (1letter) <[email protected]> | ||
Commit: https://github.com/plone/plone.app.multilingual/commit/240e2bf014f3d79ff7b8a2286f302618b8787ac2 | ||
|
||
add news | ||
|
||
Files changed: | ||
A news/461.feature | ||
|
||
b'diff --git a/news/461.feature b/news/461.feature\nnew file mode 100644\nindex 00000000..6e24cb94\n--- /dev/null\n+++ b/news/461.feature\n@@ -0,0 +1 @@\n+use pat-contentbrowser as default widget for add translation form [@1letter]\n' | ||
|
||
Repository: plone.app.multilingual | ||
|
||
|
||
Branch: refs/heads/master | ||
Date: 2024-11-07T12:24:52+01:00 | ||
Author: 1letter (1letter) <[email protected]> | ||
Commit: https://github.com/plone/plone.app.multilingual/commit/b85dac4de570e7a94b4a4f9ae0531c9270c19098 | ||
|
||
Update config | ||
|
||
Files changed: | ||
M pyproject.toml | ||
M setup.py | ||
|
||
b'diff --git a/pyproject.toml b/pyproject.toml\nindex 762cf44b..e8239a22 100644\n--- a/pyproject.toml\n+++ b/pyproject.toml\n@@ -120,7 +120,7 @@ Zope = [\n ]\n python-dateutil = [\'dateutil\']\n pytest-plone = [\'pytest\', \'zope.pytestlayer\', \'plone.testing\', \'plone.app.testing\']\n-ignore-packages = [\'Products.LinguaPlone\']\n+ignore-packages = [\'Products.LinguaPlone\', \'Products.CMFPlacefulWorkflow\']\n \n ##\n # Add extra configuration options in .meta.toml:\ndiff --git a/setup.py b/setup.py\nindex fa6db140..179e0022 100644\n--- a/setup.py\n+++ b/setup.py\n@@ -62,6 +62,7 @@\n "plone.rfc822",\n "plone.testing",\n "robotsuite",\n+ "Products.CMFPlacefulWorkflow",\n ],\n },\n entry_points="""\n' | ||
|
||
Repository: plone.app.multilingual | ||
|
||
|
||
Branch: refs/heads/master | ||
Date: 2024-11-07T12:43:37+01:00 | ||
Author: 1letter (1letter) <[email protected]> | ||
Commit: https://github.com/plone/plone.app.multilingual/commit/348aaeae4b9ba1a8d110ad4d86dba18b4b3ffbd1 | ||
|
||
fix robot test | ||
|
||
Files changed: | ||
M src/plone/app/multilingual/tests/robot/test_add_translation.robot | ||
|
||
b'diff --git a/src/plone/app/multilingual/tests/robot/test_add_translation.robot b/src/plone/app/multilingual/tests/robot/test_add_translation.robot\nindex f75ade04..66d592b2 100644\n--- a/src/plone/app/multilingual/tests/robot/test_add_translation.robot\n+++ b/src/plone/app/multilingual/tests/robot/test_add_translation.robot\n@@ -46,7 +46,7 @@ I link the document in English as a translation\n Get Element States //a[@id="_modify_translations"] contains visible\n Click //a[@id="_modify_translations"]\n Click //table[@id="translations-overview"]/tbody/tr[1]/td[3]/a[contains(@class,"connectTranslationAction")]\n- Click //div[@id="formfield-form-widgets-content"]//div[@class="content-browser-wrapper"]//button[contains(text(),"Select")]\n+ Click //div[@id="formfield-form-widgets-content"]//div[@class="content-browser-wrapper"]//a[contains(text(),"Select")]\n Click item in column 2 2\n Click //div[contains(@class, "content-browser-wrapper")]//div[contains(@class, "levelColumns")]/div[contains(@class, "preview")]/div[contains(@class, "levelToolbar")]/button\n Click //*[contains(@class, \'modal-footer\')]//button[@name=\'form.buttons.connect_translation\']\n' | ||
|
||
Repository: plone.app.multilingual | ||
|
||
|
||
Branch: refs/heads/master | ||
Date: 2024-11-07T15:22:01+01:00 | ||
Date: 2024-11-07T15:24:47+01:00 | ||
Author: Peter Mathis (petschki) <[email protected]> | ||
Commit: https://github.com/plone/plone.app.multilingual/commit/a173ada395b25b07fc4a40ff8681d1041c063058 | ||
Commit: https://github.com/plone/Products.CMFPlone/commit/887db0053943f4f8092d3e559acda83999402277 | ||
|
||
Merge pull request #470 from plone/implement-pat-contentbrowser | ||
Merge pull request #4047 from plone/petschki-robottest-modal-fix | ||
|
||
Implement pat contentbrowser | ||
Robottest modal click fixes in actioncontrolpanel | ||
|
||
Files changed: | ||
A news/461.feature | ||
M pyproject.toml | ||
M setup.py | ||
M src/plone/app/multilingual/browser/interfaces.py | ||
M src/plone/app/multilingual/tests/robot/test_add_translation.robot | ||
M Products/CMFPlone/tests/robot/test_controlpanel_actions.robot | ||
M news/4045.bugfixes | ||
|
||
b'diff --git a/news/461.feature b/news/461.feature\nnew file mode 100644\nindex 00000000..6e24cb94\n--- /dev/null\n+++ b/news/461.feature\n@@ -0,0 +1 @@\n+use pat-contentbrowser as default widget for add translation form [@1letter]\ndiff --git a/pyproject.toml b/pyproject.toml\nindex 762cf44b..e8239a22 100644\n--- a/pyproject.toml\n+++ b/pyproject.toml\n@@ -120,7 +120,7 @@ Zope = [\n ]\n python-dateutil = [\'dateutil\']\n pytest-plone = [\'pytest\', \'zope.pytestlayer\', \'plone.testing\', \'plone.app.testing\']\n-ignore-packages = [\'Products.LinguaPlone\']\n+ignore-packages = [\'Products.LinguaPlone\', \'Products.CMFPlacefulWorkflow\']\n \n ##\n # Add extra configuration options in .meta.toml:\ndiff --git a/setup.py b/setup.py\nindex fa6db140..179e0022 100644\n--- a/setup.py\n+++ b/setup.py\n@@ -62,6 +62,7 @@\n "plone.rfc822",\n "plone.testing",\n "robotsuite",\n+ "Products.CMFPlacefulWorkflow",\n ],\n },\n entry_points="""\ndiff --git a/src/plone/app/multilingual/browser/interfaces.py b/src/plone/app/multilingual/browser/interfaces.py\nindex 8977a0e3..7190d911 100644\n--- a/src/plone/app/multilingual/browser/interfaces.py\n+++ b/src/plone/app/multilingual/browser/interfaces.py\n@@ -2,7 +2,7 @@\n from plone.app.multilingual import _\n from plone.app.multilingual.browser.vocabularies import untranslated_languages\n from plone.app.multilingual.interfaces import ITranslationManager\n-from plone.app.z3cform.widget import RelatedItemsFieldWidget\n+from plone.app.z3cform.widgets.contentbrowser import ContentBrowserFieldWidget\n from plone.autoform import directives\n from plone.autoform.interfaces import IFormFieldProvider\n from plone.base.interfaces import IPloneSiteRoot\n@@ -98,7 +98,7 @@ class IConnectTranslation(model.Schema):\n )\n directives.widget(\n "content",\n- RelatedItemsFieldWidget,\n+ ContentBrowserFieldWidget,\n pattern_options={\n "basePath": make_relation_root_path,\n },\ndiff --git a/src/plone/app/multilingual/tests/robot/test_add_translation.robot b/src/plone/app/multilingual/tests/robot/test_add_translation.robot\nindex 236a49dd..66d592b2 100644\n--- a/src/plone/app/multilingual/tests/robot/test_add_translation.robot\n+++ b/src/plone/app/multilingual/tests/robot/test_add_translation.robot\n@@ -46,10 +46,10 @@ I link the document in English as a translation\n Get Element States //a[@id="_modify_translations"] contains visible\n Click //a[@id="_modify_translations"]\n Click //table[@id="translations-overview"]/tbody/tr[1]/td[3]/a[contains(@class,"connectTranslationAction")]\n- Click //div[@id="formfield-form-widgets-content"]//div[contains(@class,"pat-relateditems-container")]//button[contains(@class,"mode") and contains(@class,"search")]\n- Type Text //div[@id="formfield-form-widgets-content"]//input[contains(@class,"select2-input")] en\n- Click //span[contains(., \'An English Document\')]\n- Click //*[contains(@class, \'modal-footer\')]//button[@id=\'form-buttons-connect_translation\']\n+ Click //div[@id="formfield-form-widgets-content"]//div[@class="content-browser-wrapper"]//a[contains(text(),"Select")]\n+ Click item in column 2 2\n+ Click //div[contains(@class, "content-browser-wrapper")]//div[contains(@class, "levelColumns")]/div[contains(@class, "preview")]/div[contains(@class, "levelToolbar")]/button\n+ Click //*[contains(@class, \'modal-footer\')]//button[@name=\'form.buttons.connect_translation\']\n Get Text //table[@id="translations-overview"]/tbody/tr[1]/td[2]/h3[@class="translationTitle"] should be An English Document\n Click //table[@id="translations-overview"]//a[contains(text(),\'/plone/ca/a-catalan-document\')]\n Get Text //*[@id="content"]/header/h1 should be A Catalan Document\n@@ -63,3 +63,14 @@ I switch to English\n I can view the document in English\n Get Element //h1[1][contains(text(),\'English Document\')]\n Get Element //ul[@id=\'portal-languageselector\']/li[contains(@class, \'currentLanguage\')]/a[@title=\'English\']\n+\n+\n+# DRY\n+\n+Click item in column\n+ [arguments] ${colnumber} ${itemposition}\n+ Click //div[contains(@class, "content-browser-wrapper")]//div[contains(@class, "levelColumns")]/div[${colnumber}]/div[contains(@class, "levelItems")]/div[${itemposition}]\n+\n+Pause\n+ Import library Dialogs\n+ Pause execution\n\\ No newline at end of file\n' | ||
b'diff --git a/Products/CMFPlone/tests/robot/test_controlpanel_actions.robot b/Products/CMFPlone/tests/robot/test_controlpanel_actions.robot\nindex 1574010f60..231bc246b6 100644\n--- a/Products/CMFPlone/tests/robot/test_controlpanel_actions.robot\n+++ b/Products/CMFPlone/tests/robot/test_controlpanel_actions.robot\n@@ -65,27 +65,27 @@ the actions control panel\n \n I modify an action title\n Click //*[@id="content-core"]/section[2]/section/ol/li[1]/form/a\n- Get Text //body contains Action Settings\n+ Wait For Condition Text //body contains Action Settings\n Type Text //input[@name="form.widgets.title"] A new site map\n Click //div[contains(@class,\'pattern-modal-buttons\')]/button\n \n \n I change the actions order\n Click //*[@id="content-core"]/section[2]/section/ol/li[1]/form/a\n- Get Text //body contains Action Settings\n+ Wait For Condition Text //body contains Action Settings\n Type Text //input[@name="form.widgets.position"] 3\n Click //div[contains(@class,\'pattern-modal-buttons\')]/button\n \n \n I add a new action\n Click //*[@id="content-core"]/p[@class="addAction"]/a\n- Get Text //body contains New action\n+ Wait For Condition Text //body contains New action\n Select Options By //select[@name="form.widgets.category:list"] label User actions\n Type Text //input[@name="form.widgets.id"] favorites\n Click //div[contains(@class,\'pattern-modal-buttons\')]/button\n- Get Text //body contains favorites\n+ Wait For Condition Text //body contains favorites\n Click //*[@id="content-core"]/section[6]/section/ol/li[8]/form/a\n- Get Text //body contains Action Settings\n+ Wait For Condition Text //body contains Action Settings\n Type Text //input[@name="form.widgets.title"] My favorites\n Type Text //input[@name="form.widgets.url_expr"] string:\\${globals_view/navigationRootUrl}/favorites\n Click //div[contains(@class,\'pattern-modal-buttons\')]/button\n@@ -136,4 +136,4 @@ anonymous users cannot see the action anymore\n anonymous users can see the action again\n Disable autologin\n Go to ${PLONE_URL}\n- Get Text //body contains Site Map\n\\ No newline at end of file\n+ Get Text //body contains Site Map\ndiff --git a/news/4045.bugfixes b/news/4045.bugfixes\nindex 0744c9a37b..336fba81af 100644\n--- a/news/4045.bugfixes\n+++ b/news/4045.bugfixes\n@@ -1,2 +1,2 @@\n-Fix more unstable robottests with "Wait For Condition".\n+Fix more unstable robottests with "Wait For Condition" when clicking modal links.\n [petschki]\n' | ||
|