Skip to content

Commit

Permalink
Fix test "Add a Comment to a Document and bulk delete it"
Browse files Browse the repository at this point in the history
Fix test robot. Waiting for the select option to be enabled does not
guarantee that the selection will occur. Maybe because it is a modal
loaded by ajax. Then we try to select the value 5x.
  • Loading branch information
wesleybl committed Mar 15, 2024
1 parent 9335a7d commit 9ead499
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 1 deletion.
1 change: 1 addition & 0 deletions news/228.internal
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Fix test "Add a Comment to a Document and bulk delete it". @wesleybl
8 changes: 7 additions & 1 deletion plone/app/discussion/tests/robot/test_moderation.robot
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,12 @@ Last history entry is shown

*** Keywords ***

Select And Check
[Arguments] ${seletor} ${value}
Select From List by Value ${seletor} ${value}
${selected_value} = Get Selected List Value ${seletor}
Should Be Equal As Strings ${selected_value} ${value}

# Given

a logged-in Site Administrator
Expand Down Expand Up @@ -62,7 +68,7 @@ I add a comment and delete it
Click Button Comment
Go To ${PLONE_URL}/@@moderate-comments?review_state=all
Wait Until Element Is Enabled css=option[value=delete]
Select from list by value xpath://select[@name='form.select.BulkAction'] delete
Wait Until Keyword Succeeds 5x 1s Select And Check xpath://select[@name='form.select.BulkAction'] delete
Select Checkbox name=check_all
Sleep 1s
Wait For Then Click Element css=button[name="form.button.BulkAction"]
Expand Down

0 comments on commit 9ead499

Please sign in to comment.