-
-
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/main Date: 2024-04-29T15:54:31+02:00 Author: Victor Fernandez de Alba (sneridagh) <sneridagh@gmail.com> Commit: plone/plone.volto@4f3f5d3 Fix for parent summary serializer when the parent has a but it's empty Files changed: M src/plone/volto/behaviors/preview_link.py Repository: plone.volto Branch: refs/heads/main Date: 2024-04-29T17:46:04+02:00 Author: Victor Fernandez de Alba (sneridagh) <sneridagh@gmail.com> Commit: plone/plone.volto@b11ddbe Swap condition in Image field indexer Files changed: M src/plone/volto/indexers.py Repository: plone.volto Branch: refs/heads/main Date: 2024-04-29T17:50:22+02:00 Author: Victor Fernandez de Alba (sneridagh) <sneridagh@gmail.com> Commit: plone/plone.volto@d0d7549 Changelog Files changed: A news/148.bugfix Repository: plone.volto Branch: refs/heads/main Date: 2024-04-29T19:08:57+02:00 Author: Victor Fernandez de Alba (sneridagh) <sneridagh@gmail.com> Commit: plone/plone.volto@d271c11 Return an empty list Files changed: M src/plone/volto/behaviors/preview_link.py Repository: plone.volto Branch: refs/heads/main Date: 2024-05-01T11:36:34-07:00 Author: David Glick (davisagli) <david@glicksoftware.com> Commit: plone/plone.volto@727d514 Update news/148.bugfix Files changed: M news/148.bugfix Repository: plone.volto Branch: refs/heads/main Date: 2024-05-01T11:37:24-07:00 Author: David Glick (davisagli) <david@glicksoftware.com> Commit: plone/plone.volto@dffae07 Merge pull request #148 from plone/fiximagescalesserializer Fix for parent summary serializer when the parent has a but it's empty Files changed: A news/148.bugfix M src/plone/volto/behaviors/preview_link.py M src/plone/volto/indexers.py
- Loading branch information
Showing
1 changed file
with
77 additions
and
20 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,37 +1,94 @@ | ||
Repository: plone.app.robotframework | ||
Repository: plone.volto | ||
|
||
|
||
Branch: refs/heads/master | ||
Date: 2024-04-30T18:41:21-03:00 | ||
Author: wesleybl (wesleybl) <wesleybl@gmail.com> | ||
Commit: https://github.com/plone/plone.app.robotframework/commit/2802561e88fc4adfde3f3949b34d183b9d256722 | ||
Branch: refs/heads/main | ||
Date: 2024-04-29T15:54:31+02:00 | ||
Author: Victor Fernandez de Alba (sneridagh) <sneridagh@gmail.com> | ||
Commit: https://github.com/plone/plone.volto/commit/4f3f5d39c41c346661e8919df6b4edd0d3e5c414 | ||
|
||
Makes ``Wait For Then Click Element`` keyword more robust | ||
Fix for parent summary serializer when the parent has a but it's empty | ||
|
||
Wait for the element to become visible and enabled before trying to | ||
focus on it | ||
Files changed: | ||
M src/plone/volto/behaviors/preview_link.py | ||
|
||
b'diff --git a/src/plone/volto/behaviors/preview_link.py b/src/plone/volto/behaviors/preview_link.py\nindex 838088fb..1433dbab 100644\n--- a/src/plone/volto/behaviors/preview_link.py\n+++ b/src/plone/volto/behaviors/preview_link.py\n@@ -56,16 +56,17 @@ def __init__(self, field, context, request):\n \n def __call__(self):\n value = self.field.get(self.context)\n- linked_image = value.to_object\n- primary_field = IPrimaryFieldInfo(linked_image).field\n- serializer = queryMultiAdapter(\n- (primary_field, linked_image, self.request), IImageScalesFieldAdapter\n- )\n- if serializer is not None:\n- values = serializer()\n- if values:\n- portal_url = api.portal.get().absolute_url()\n- base_path = linked_image.absolute_url().replace(portal_url, "")\n- for value in values:\n- value["base_path"] = base_path\n- return values\n+ if value:\n+ linked_image = value.to_object\n+ primary_field = IPrimaryFieldInfo(linked_image).field\n+ serializer = queryMultiAdapter(\n+ (primary_field, linked_image, self.request), IImageScalesFieldAdapter\n+ )\n+ if serializer is not None:\n+ values = serializer()\n+ if values:\n+ portal_url = api.portal.get().absolute_url()\n+ base_path = linked_image.absolute_url().replace(portal_url, "")\n+ for value in values:\n+ value["base_path"] = base_path\n+ return values\n' | ||
|
||
Repository: plone.volto | ||
|
||
|
||
Branch: refs/heads/main | ||
Date: 2024-04-29T17:46:04+02:00 | ||
Author: Victor Fernandez de Alba (sneridagh) <sneridagh@gmail.com> | ||
Commit: https://github.com/plone/plone.volto/commit/b11ddbe789cf7f7620fc92b51f4712630bc3409d | ||
|
||
Swap condition in Image field indexer | ||
|
||
Files changed: | ||
M src/plone/volto/indexers.py | ||
|
||
b'diff --git a/src/plone/volto/indexers.py b/src/plone/volto/indexers.py\nindex de29b52..3470a62 100644\n--- a/src/plone/volto/indexers.py\n+++ b/src/plone/volto/indexers.py\n@@ -24,13 +24,13 @@ def image_field_indexer(obj):\n base_obj = aq_base(obj)\n \n image_field = ""\n- if getattr(base_obj, "preview_image", False):\n- image_field = "preview_image"\n- elif (\n+ if (\n getattr(base_obj, "preview_image_link", False)\n and not base_obj.preview_image_link.isBroken()\n ):\n image_field = "preview_image_link"\n+ elif getattr(base_obj, "preview_image", False):\n+ image_field = "preview_image"\n elif getattr(base_obj, "image", False):\n image_field = "image"\n return image_field\n' | ||
|
||
Repository: plone.volto | ||
|
||
|
||
Branch: refs/heads/main | ||
Date: 2024-04-29T17:50:22+02:00 | ||
Author: Victor Fernandez de Alba (sneridagh) <sneridagh@gmail.com> | ||
Commit: https://github.com/plone/plone.volto/commit/d0d7549dfb0967dff524f0803fef13ed58b2c9d1 | ||
|
||
Changelog | ||
|
||
Files changed: | ||
A news/148.bugfix | ||
|
||
b"diff --git a/news/148.bugfix b/news/148.bugfix\nnew file mode 100644\nindex 00000000..63f1d415\n--- /dev/null\n+++ b/news/148.bugfix\n@@ -0,0 +1,3 @@\n+Fix for parent summary serializer when the parent has a but it's empty.\n+Swap condition for `image_field` indexer, `preview_image_link` first, then the default `preview_image`\n+[sneridagh]\n" | ||
|
||
Repository: plone.volto | ||
|
||
|
||
Branch: refs/heads/main | ||
Date: 2024-04-29T19:08:57+02:00 | ||
Author: Victor Fernandez de Alba (sneridagh) <sneridagh@gmail.com> | ||
Commit: https://github.com/plone/plone.volto/commit/d271c118e5b1b1c28071744e7137bfcff3a16cf3 | ||
|
||
Return an empty list | ||
|
||
Files changed: | ||
M src/plone/volto/behaviors/preview_link.py | ||
|
||
b'diff --git a/src/plone/volto/behaviors/preview_link.py b/src/plone/volto/behaviors/preview_link.py\nindex 1433dba..17f0501 100644\n--- a/src/plone/volto/behaviors/preview_link.py\n+++ b/src/plone/volto/behaviors/preview_link.py\n@@ -70,3 +70,5 @@ def __call__(self):\n for value in values:\n value["base_path"] = base_path\n return values\n+\n+ return []\n' | ||
|
||
Repository: plone.volto | ||
|
||
|
||
Branch: refs/heads/main | ||
Date: 2024-05-01T11:36:34-07:00 | ||
Author: David Glick (davisagli) <david@glicksoftware.com> | ||
Commit: https://github.com/plone/plone.volto/commit/727d5143b1f0bcad559582a2aee5357e2c64e8ee | ||
|
||
Update news/148.bugfix | ||
|
||
Files changed: | ||
A news/157.bugfix | ||
M src/plone/app/robotframework/selenium.robot | ||
M news/148.bugfix | ||
|
||
b'diff --git a/news/157.bugfix b/news/157.bugfix\nnew file mode 100644\nindex 0000000..02e2de7\n--- /dev/null\n+++ b/news/157.bugfix\n@@ -0,0 +1 @@\n+Makes ``Wait For Then Click Element`` keyword more robust. @wesleybl\ndiff --git a/src/plone/app/robotframework/selenium.robot b/src/plone/app/robotframework/selenium.robot\nindex 6c3d2b1..154b224 100644\n--- a/src/plone/app/robotframework/selenium.robot\n+++ b/src/plone/app/robotframework/selenium.robot\n@@ -101,8 +101,9 @@ Wait For Element\n ... Element must match exactly one time.\n [Arguments] ${element}\n Wait Until Page Contains Element ${element}\n- Set Focus To Element ${element}\n Wait Until Element Is Visible ${element}\n+ Wait Until Element Is Enabled ${element}\n+ Set Focus To Element ${element}\n Sleep 0.1\n ${count} = Get Element Count ${element}\n Should Be Equal as Numbers ${count} 1\n@@ -112,8 +113,9 @@ Wait For Elements\n ... Element may match more than once.\n [Arguments] ${element}\n Wait Until Page Contains Element ${element}\n- Set Focus To Element ${element}\n Wait Until Element Is Visible ${element}\n+ Wait Until Element Is Enabled ${element}\n+ Set Focus To Element ${element}\n \n Wait For Then Click Element\n [Documentation] Can contain css=, jquery=, or any other element selector.\n' | ||
b"diff --git a/news/148.bugfix b/news/148.bugfix\nindex 63f1d41..fbd79a3 100644\n--- a/news/148.bugfix\n+++ b/news/148.bugfix\n@@ -1,3 +1,3 @@\n-Fix for parent summary serializer when the parent has a but it's empty.\n+Fix for preview_image_link image_scales adapter when the field is empty.\n Swap condition for `image_field` indexer, `preview_image_link` first, then the default `preview_image`\n [sneridagh]\n" | ||
|
||
Repository: plone.app.robotframework | ||
Repository: plone.volto | ||
|
||
|
||
Branch: refs/heads/master | ||
Date: 2024-05-01T11:08:45-07:00 | ||
Branch: refs/heads/main | ||
Date: 2024-05-01T11:37:24-07:00 | ||
Author: David Glick (davisagli) <david@glicksoftware.com> | ||
Commit: https://github.com/plone/plone.app.robotframework/commit/15ac811ac4b94616806e196f03c0dcbeec14dba9 | ||
Commit: https://github.com/plone/plone.volto/commit/dffae0721c70cbc3389bbf7b960be9ab5f15016b | ||
|
||
Merge pull request #157 from plone/wait_for_element | ||
Merge pull request #148 from plone/fiximagescalesserializer | ||
|
||
Makes ``Wait For Then Click Element`` keyword more robust | ||
Fix for parent summary serializer when the parent has a but it's empty | ||
|
||
Files changed: | ||
A news/157.bugfix | ||
M src/plone/app/robotframework/selenium.robot | ||
A news/148.bugfix | ||
M src/plone/volto/behaviors/preview_link.py | ||
M src/plone/volto/indexers.py | ||
|
||
b'diff --git a/news/157.bugfix b/news/157.bugfix\nnew file mode 100644\nindex 0000000..02e2de7\n--- /dev/null\n+++ b/news/157.bugfix\n@@ -0,0 +1 @@\n+Makes ``Wait For Then Click Element`` keyword more robust. @wesleybl\ndiff --git a/src/plone/app/robotframework/selenium.robot b/src/plone/app/robotframework/selenium.robot\nindex 6c3d2b1..154b224 100644\n--- a/src/plone/app/robotframework/selenium.robot\n+++ b/src/plone/app/robotframework/selenium.robot\n@@ -101,8 +101,9 @@ Wait For Element\n ... Element must match exactly one time.\n [Arguments] ${element}\n Wait Until Page Contains Element ${element}\n- Set Focus To Element ${element}\n Wait Until Element Is Visible ${element}\n+ Wait Until Element Is Enabled ${element}\n+ Set Focus To Element ${element}\n Sleep 0.1\n ${count} = Get Element Count ${element}\n Should Be Equal as Numbers ${count} 1\n@@ -112,8 +113,9 @@ Wait For Elements\n ... Element may match more than once.\n [Arguments] ${element}\n Wait Until Page Contains Element ${element}\n- Set Focus To Element ${element}\n Wait Until Element Is Visible ${element}\n+ Wait Until Element Is Enabled ${element}\n+ Set Focus To Element ${element}\n \n Wait For Then Click Element\n [Documentation] Can contain css=, jquery=, or any other element selector.\n' | ||
b'diff --git a/news/148.bugfix b/news/148.bugfix\nnew file mode 100644\nindex 00000000..fbd79a35\n--- /dev/null\n+++ b/news/148.bugfix\n@@ -0,0 +1,3 @@\n+Fix for preview_image_link image_scales adapter when the field is empty.\n+Swap condition for `image_field` indexer, `preview_image_link` first, then the default `preview_image`\n+[sneridagh]\ndiff --git a/src/plone/volto/behaviors/preview_link.py b/src/plone/volto/behaviors/preview_link.py\nindex 838088fb..17f05010 100644\n--- a/src/plone/volto/behaviors/preview_link.py\n+++ b/src/plone/volto/behaviors/preview_link.py\n@@ -56,16 +56,19 @@ def __init__(self, field, context, request):\n \n def __call__(self):\n value = self.field.get(self.context)\n- linked_image = value.to_object\n- primary_field = IPrimaryFieldInfo(linked_image).field\n- serializer = queryMultiAdapter(\n- (primary_field, linked_image, self.request), IImageScalesFieldAdapter\n- )\n- if serializer is not None:\n- values = serializer()\n- if values:\n- portal_url = api.portal.get().absolute_url()\n- base_path = linked_image.absolute_url().replace(portal_url, "")\n- for value in values:\n- value["base_path"] = base_path\n- return values\n+ if value:\n+ linked_image = value.to_object\n+ primary_field = IPrimaryFieldInfo(linked_image).field\n+ serializer = queryMultiAdapter(\n+ (primary_field, linked_image, self.request), IImageScalesFieldAdapter\n+ )\n+ if serializer is not None:\n+ values = serializer()\n+ if values:\n+ portal_url = api.portal.get().absolute_url()\n+ base_path = linked_image.absolute_url().replace(portal_url, "")\n+ for value in values:\n+ value["base_path"] = base_path\n+ return values\n+\n+ return []\ndiff --git a/src/plone/volto/indexers.py b/src/plone/volto/indexers.py\nindex de29b524..3470a621 100644\n--- a/src/plone/volto/indexers.py\n+++ b/src/plone/volto/indexers.py\n@@ -24,13 +24,13 @@ def image_field_indexer(obj):\n base_obj = aq_base(obj)\n \n image_field = ""\n- if getattr(base_obj, "preview_image", False):\n- image_field = "preview_image"\n- elif (\n+ if (\n getattr(base_obj, "preview_image_link", False)\n and not base_obj.preview_image_link.isBroken()\n ):\n image_field = "preview_image_link"\n+ elif getattr(base_obj, "preview_image", False):\n+ image_field = "preview_image"\n elif getattr(base_obj, "image", False):\n image_field = "image"\n return image_field\n' | ||
|