Add second robot test to test adding comments.

This commit is contained in:
tisto 2014-05-02 13:42:19 +02:00
parent f894d47d62
commit 22ed06b66d

View File

@ -1,5 +1,11 @@
# bin/robot-server plone.app.discussion.testing.PLONE_APP_DISCUSSION_ROBOT_TESTING # ============================================================================
# Test basic discussion features (adding, replying, deleting)
# ============================================================================
#
# $ bin/robot-server plone.app.discussion.testing.PLONE_APP_DISCUSSION_ROBOT_TESTING
# $ bin/robot src/plone.app.discussion/src/plone/app/discussion/tests/robot/test_discussion.robot # $ bin/robot src/plone.app.discussion/src/plone/app/discussion/tests/robot/test_discussion.robot
#
# ============================================================================
*** Settings *** *** Settings ***
@ -10,25 +16,26 @@ Library Remote ${PLONE_URL}/RobotRemote
Test Setup Open test browser Test Setup Open test browser
Test Teardown Close all browsers Test Teardown Close all browsers
*** Test Cases *** *** Test Cases ***
Enable Discussion on Document Enable Discussion on a Document
Given a logged-in Site Administrator Given a logged-in Site Administrator
and a document and a document
When I enable discussion on the document When I enable discussion on the document
Then I can see a comment form on the document Then I can see a comment form on the document
#Post Comment on Document Add Comment to a Document
# Given a logged-in Site Administrator Given a logged-in Site Administrator
# and a document with discussion enabled and a document with discussion enabled
# When I post a comment When I add a comment
# Then I can see the comment below the document Then I can see the comment below the document
#Reply to comment on Document #Reply to a comment on a Document
# Given a logged-in Site Administrator # Given a logged-in Site Administrator
# and a document with discussion enabled # and a document with discussion enabled
#Delete Comment #Delete Comment from a Document
# Given a logged-in Site Administrator # Given a logged-in Site Administrator
# and a document with discussion enabled # and a document with discussion enabled
@ -43,6 +50,11 @@ a logged-in Site Administrator
a document a document
Create content type=Document id=my-document title=My 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 # When
I enable discussion on the document I enable discussion on the document
@ -53,6 +65,12 @@ I enable discussion on the document
Select From List name=form.widgets.IAllowDiscussion.allow_discussion:list True Select From List name=form.widgets.IAllowDiscussion.allow_discussion:list True
Click Button Save Click Button Save
I add a comment
Wait until page contains element id=form-widgets-comment-text
Input Text id=form-widgets-comment-text This is a comment
Click Button Comment
# Then # Then
I can see a comment form on the document I can see a comment form on the document
@ -60,3 +78,7 @@ I can see a comment form on the document
Wait until page contains My Document Wait until page contains My Document
Page should contain Add comment Page should contain Add comment
Page should contain element id=form-widgets-comment-text Page should contain element id=form-widgets-comment-text
I can see the comment below the document
Go To ${PLONE_URL}/my-document/view
Page should contain This is a comment