From 8d23a8044ed644b6e3f7172bfa83d8a64a7e5458 Mon Sep 17 00:00:00 2001 From: wesleybl Date: Mon, 15 Apr 2024 16:23:49 -0300 Subject: [PATCH] Fix robot test `Add a Comment to a Document and bulk delete it` The screenshot shows that the "Select all" checkbox is checked, but the other checkboxes are not. It may be that the test clicked on "Select all" before the event that selects all was attached to the checkbox. Then we wait for the event to be attached before clicking. --- news/238.internal | 1 + plone/app/discussion/tests/robot/test_moderation.robot | 1 + 2 files changed, 2 insertions(+) create mode 100644 news/238.internal diff --git a/news/238.internal b/news/238.internal new file mode 100644 index 00000000..290918c3 --- /dev/null +++ b/news/238.internal @@ -0,0 +1 @@ +Fix robot test `Add a Comment to a Document and bulk delete it` 2. @wesleybl diff --git a/plone/app/discussion/tests/robot/test_moderation.robot b/plone/app/discussion/tests/robot/test_moderation.robot index b37447f2..c44add7f 100644 --- a/plone/app/discussion/tests/robot/test_moderation.robot +++ b/plone/app/discussion/tests/robot/test_moderation.robot @@ -73,6 +73,7 @@ I add a comment and delete it Wait Until Element Is Enabled css=[name=check_all] Wait Until Element Is Visible css=[name="paths:list"] Wait Until Element Is Enabled css=[name="paths:list"] + Wait for Condition return jQuery._data( jQuery('[name=check_all]')[0], "events" ).click.length == 2 Select Checkbox name=check_all Wait Until Element Is Visible css=[name="paths:list"]:checked Wait For Then Click Element css=button[name="form.button.BulkAction"]