2019-12-08 20:01:40 +01:00
|
|
|
*** Settings ***
|
|
|
|
|
|
|
|
Resource plone/app/robotframework/saucelabs.robot
|
|
|
|
Resource plone/app/robotframework/selenium.robot
|
|
|
|
|
|
|
|
Library Remote ${PLONE_URL}/RobotRemote
|
|
|
|
|
|
|
|
Test Setup Run Keywords Plone test setup
|
|
|
|
Test Teardown Run keywords Plone test teardown
|
|
|
|
|
|
|
|
|
|
|
|
*** Test Cases ***
|
|
|
|
|
|
|
|
Add a Comment to a Document and bulk delete it
|
|
|
|
Given a logged-in Site Administrator
|
|
|
|
and workflow multiple enabled
|
|
|
|
and a document with discussion enabled
|
|
|
|
When I add a comment and delete it
|
|
|
|
Then I can not see the comment below the document
|
|
|
|
|
|
|
|
|
|
|
|
*** Keywords ***
|
|
|
|
|
|
|
|
# Given
|
|
|
|
|
|
|
|
a logged-in Site Administrator
|
|
|
|
Enable autologin as Site Administrator
|
|
|
|
|
|
|
|
a document
|
|
|
|
Create content type=Document id=my-document title=My Document
|
|
|
|
|
|
|
|
a document with discussion enabled
|
|
|
|
a document
|
|
|
|
I enable discussion on the document
|
|
|
|
|
|
|
|
|
|
|
|
# When
|
|
|
|
|
|
|
|
I enable discussion on the document
|
|
|
|
Go To ${PLONE_URL}/my-document/edit
|
|
|
|
Wait until page contains Settings
|
|
|
|
Click Link Settings
|
|
|
|
Wait until element is visible name=form.widgets.IAllowDiscussion.allow_discussion:list
|
|
|
|
Select From List name=form.widgets.IAllowDiscussion.allow_discussion:list True
|
|
|
|
Click Button Save
|
|
|
|
|
|
|
|
I add a comment and delete it
|
|
|
|
Wait until page contains element id=form-widgets-comment-text
|
|
|
|
Input Text id=form-widgets-comment-text This is a comment
|
|
|
|
Click Button Comment
|
|
|
|
Go To ${PLONE_URL}/@@moderate-comments?review_state=all
|
2019-12-10 16:15:43 +01:00
|
|
|
Wait until page contains element name=form.select.BulkAction
|
2019-12-08 20:01:40 +01:00
|
|
|
Select from list by value xpath://select[@name='form.select.BulkAction'] delete
|
|
|
|
Select Checkbox name=check_all
|
|
|
|
Click Button Apply
|
2019-12-10 16:15:43 +01:00
|
|
|
Wait Until Page Does Not Contain This is a comment
|
2019-12-08 20:01:40 +01:00
|
|
|
|
|
|
|
workflow multiple enabled
|
|
|
|
Go To ${PLONE_URL}/@@content-controlpanel?type_id=Discussion%20Item&new_workflow=comment_multiple_state_review_workflow
|
|
|
|
Click Button Save
|
|
|
|
|
|
|
|
# Then
|
|
|
|
|
|
|
|
I can not see the comment below the document
|
|
|
|
Go To ${PLONE_URL}/my-document/view
|
2019-12-10 16:15:43 +01:00
|
|
|
Wait until page contains My Document
|
2019-12-08 20:01:40 +01:00
|
|
|
Page should not contain This is a comment
|