# ============================================================================
# STREAM
# ============================================================================
#
# Run this robot test stand-alone:
#
#  $ bin/test -s vncportal.policy -t content.robot --all
#
# Run this robot test with robot server (which is faster):
#
# 1) Start robot server:
#
# $ bin/robot-server --reload-path src vncportal.policy.testing.VNCPORTAL_POLICY_ACCEPTANCE_TESTING
#
# 2) Run robot tests:
#
# $ bin/robot src/vncportal/policy/tests/robot/stream.robot
#
# See the http://docs.plone.org for further details (search for robot
# framework).
#
# ============================================================================

****** Stream Filters *******

Scenario: User filter stream by cast in stream view
  Given a logged in user
    and I add cast messages in stream view
   When I click cast button
   Then I should see cast messages in stream view

Scenario: User filter stream by files in stream view
  Given a logged in user
    and I add a few files in stream view
   When I click files button
   Then I should see files in stream view

Scenario: User filter stream by event in stream view
  Given a logged in user button
    and I add a few events in stream view
   When I click event
   Then I should see events in stream view

Scenario: User filter stream by forms in stream view
  Given a logged in user
    and I add a few forms in stream view
   When I click forms button
   Then I should see forms in stream view

Scenario: User filter stream by images in stream view
  Given a logged in user
    and I add a few images in stream view
   When I click images button
   Then I should see images in stream view

Scenario: User filter stream by links in stream view
  Given a logged in user
    and I add a few links in stream view
   When I click links button
   Then I should see links in stream view

Scenario: User filter stream by news in stream view
  Given a logged in user
    and I add news in stream view
   When I click news button
   Then I should see news in stream view

Scenario: User filter stream by pages in stream view
  Given a logged in user
    and I add pages in stream view
   When I click pages button
   Then I should see pages in stream view

Scenario: User filter stream by comments in stream view
  Given a logged in user
    and I add cast and comment on it in stream view
   When I click comments button
   Then I should see comments in stream view

****** Stream Buttons ********

Scenario: User like a stream item in stream view
  Given a logged in user
    and I add a stream item in stream view
   When I click like
   Then I should see likes increase in stream view

Scenario: User dislike a stream item in stream view
  Given a logged in user
    and I add a stream item in stream view
   When I click dislike
   Then I should see dislikes increase in stream view

Scenario: User comment on stream item in stream view
  Given a logged in user
    and I add a stream item in stream view
   When I comment on stream item
   Then I should see comment on stream item in stream view

Scenario: User comment on stream with file attached in stream view
  Given a logged in user
    and I add a stream item in stream view
   When I comment on stream item with file attached
   Then I should see comment with file attached in stream view

Scenario: User comment on stream with object cloud in stream view
  Given a logged in user
    and I add a stream item in stream view
   When I comment on stream item with object cloud
   Then I should see comment with object cloud in stream view

Scenario: User comment on stream with addressing people (specific values) in stream view
  Given a logged in user
    and I add a stream item in stream view
   When I comment on stream item with addressing people (specific values)
   Then I should see comment with addressing people (specific values) in stream view

Scenario: User comment on stream and add a person in stream view
  Given a logged in user
    and I add a stream item in stream view
   When I comment on stream item with person added
   Then I should see comment with person added in stream view

Scenario: User comment on stream with time frame in stream view
  Given a logged in user
    and I add a stream item in stream view
   When I comment on stream item with time frame
   Then I should see comment with time frame in stream view

Scenario: User comment on stream with tag in stream view
  Given a logged in user
    and I add a stream item in stream view
   When I comment on stream item with tag
   Then I should see comment with tag in stream view

Scenario: User comment on stream with link in stream view
  Given a logged in user
    and I add a stream item in stream view
   When I comment on stream item with link
   Then I should see comment with link in stream view

Scenario: User comment on stream with Bell in stream view
  Given a logged in user
    and I add a stream item in stream view
   When I comment on stream item with Bell
   Then I should see comment with Bell in stream view

Scenario: User comment on stream and click cancel in stream view
  Given a logged in user
    and I add a stream item in stream view
   When I click on comment
    And I click cancel
   Then I should not see any comment on stream item in stream view

Scenario: User click post without text in comment field in stream view
  Given a logged in user
    and I add a stream item in stream view
   When I click comment and leave the text field empty
   Then I should seee error message in stream view


Scenario: User comment on comment,on stream item in stream view
  Given a logged in user
    and I add a stream item in stream view
   When I comment on comment,on stream item
   Then I should see comment on comment, on stream item in stream view

Scenario: User comment on comment, on stream with file attached in stream view
  Given a logged in user
    and I add a stream item in stream view
   When I comment on comment,on stream item with file attached
   Then I should see comment on comment with file attached in stream view

Scenario: User comment on comment, on stream with object cloud in stream view
  Given a logged in user
    and I add a stream item in stream view
   When I comment on comment,on stream item with object cloud
   Then I should see comment on comment with object cloud in stream view

Scenario: User comment on comment,on stream with addressing people (specific values) in stream view
  Given a logged in user
    and I add a stream item in stream view
   When I comment on commenton stream item with addressing people (specific values)
   Then I should see comment on comment with addressing people (specific values) in stream view

Scenario: User comment on comment,on stream and add a person in stream view
  Given a logged in user
    and I add a stream item in stream view
   When I comment on comment,on stream item with person added
   Then I should see comment on comment with person added in stream view

Scenario: User comment on comment,on stream with time frame in stream view
  Given a logged in user
    and I add a stream item in stream view
   When I comment on comment,on stream item with time frame
   Then I should see comment on comment with time frame in stream view

Scenario: User comment on comment,on stream with tag in stream view
  Given a logged in user
    and I add a stream item in stream view
   When I comment on comment,on stream item with tag
   Then I should see comment on comment with tag in stream view

Scenario: User comment on comment,on stream with link in stream view
  Given a logged in user
    and I add a stream item in stream view
   When I comment on comment,on stream item with link
   Then I should see comment on comment with link in stream view

Scenario: User comment on comment, on stream with Bell in stream view
  Given a logged in user
    and I add a stream item in stream view
   When I commenton comment, on stream item with Bell
   Then I should see comment on comment with Bell in stream view

Scenario: User comment on comment, on stream and click cancel in stream view
  Given a logged in user
    and I add a stream item in stream view
   When I click comment on comment
    And I click cancel
   Then I should not see any comment on comment,on stream item in stream view

Scenario: User click post without text in comment on comment field in stream view
  Given a logged in user
    and I add a stream item in stream view
   When I click comment on comment and leave the text field empty
   Then I should seee error message in stream view

***** Stream View *******

Scenario: User check all elements are displyed properly in stream view
  Given a logged in user
   When I check for all elements in stream view
   Then I should see all elements properly displayed in stream view

Scenario: User toggle different protlets in stream view
  Given a logged  in user
   When I click on toggle for different portlets in stream view
   Then I should see menus toggled in stream view

***** Stream Right Menu *******

Scenario: User access folder on the rightmenu
  Given a logged in user
   When I click on folders like cast, events , news and user
   Then folders should be accessable

Scenario: User can popout cast updates in stream view
  Given a logged in user
   When I click on cast updates popout button in stream view
   Then I shee cast updates popout in stream view

Scenario: User can add a cast message in stream view
  Given a logged in user
   When I add a cast message in stream view
   Then I should see the cast message in the stream view

Scenario: User can add cast message with refrence cloud object in stream view
  Given a logged in user
   When I add cast message with refrence cloud object in stream view
   Then I should see the cast message with refrence cloud object in the stream view

Scenario: User can add cast message with attached file in stream view
  Given a logged in user
   When I add cast message with file attached
   Then I should see the cast message with file attached in the stream view

Scenario: User can add cast message with addressing spcific people with values in stream view
  Given a logged in user
   When I add cast message with specific people addressed
   Then I should see the cast message with specific people addressed in the stream view

Scenario: User can add cast message with different topics in stream view
  Given a logged in user
   When I add cast message with different topics in stream view
   Then I should see a cast messages with the selected topic in the stream view


Scenario: User can add cast message with refrence cloud object  in stream view
  Given a logged in user
   When I add cast message with refrence cloud object
   Then I should see a cast message with refrence cloud object in the stream view

Scenario: User can add cast message with attached file in stream view
  Given a logged in user
   When I add cast message with file attached
   Then I should see a cast message with file attached in the stream view

Scenario: User can add cast message and add a person to it in stream view
  Given a logged in user
   When I add cast message and add a person
   Then I should see a cast message with person added in the stream view

Scenario: User can add cast message with time frame in stream view
  Given a logged in user
   When I add a cast message with time frame
   Then I should see a cast message should with time frame in the stream view

Scenario: User can add cast message with tag in stream view
  Given a logged in user
   When I add a cast message with tag in stream view
   Then I should see a cast message with a tag in the stream view

Scenario: Address cast message to a specific person with bell in stream view
  Given a logged in user
   When I add cast message for a specific person with bell in stream view
   Then I should see a cast message with a bell in the stream view

Scenario: Add link to a cast message in stream view
  Given a logged in user
   When I add link to a cast message in stream view
   Then I should see a cast message with a link in the stream view

Scenario: Error message when no cast topic is selected in stream view
  Given a logged in user
   When I add a cast message in stream view
    and do not select a cast topic
   Then I should see an error message in the stream view

Scenario: Cancelling cast message without performing any action in cast view
  Given a logged in user
    and I click add in stream view
   When I click cross without performing any action
   Then I should see cast message popup hide in stream view

Scenario: Attaching file and tagging person at the same time in in stream view
  Given a logged in user
   When I add cast message with attachment and tagging at the same time
   Then I should see a cast message with file attached and a person tagged  in stream view

Scenario: Adding two topics at the same time in stream view
  Given a logged in user
   When I add cast message with two topics selected
   Then I should see a cast message with the selected topics in stream view

Scenario: User can comment on cast in stream view
  Given a logged in user
    and I add a cast message in stream view
   When I click comment button in stream view
    and I comment on cast message in stream view
   Then I should see comment in stream view

Scenario: User can like a cast message in stream view
  Given a logged in user
    and I add a cast message in stream view
   When I click on like button in stream view
   Then I should see a cast message liked in stream view

Scenario: User can dislike a cast message in stream view
  Given a logged in user
    and I add a cast message in stream view
   When I click on dislike button in stream view
   Then I should see cast message dislikes increase in stream view

Scenario: User can comment on cast with attached file in stream view
  Given a logged in user
    and I add a cast message in stream view
   When I click comment button
    and I comment on cast message with attached file in stream view
   Then I should see comment with attached file in stream view

Scenario: Cast view should contain every element in stream view
  Given a logged in user
   When I check for every element in the cast page in stream view
   Then I should see every element in stream view

Scenario: User can toggle portlets for different items in stream view
  Given a logged in user
   When I toggle portlets for tags filters events users and more in stream view
   Then I should see portlets toggle in stream view

Scenario: User can comment on cast in stream view
  Given a logged in user
    and I add a cast message in stream view
   When I click comment button in stream view
    and I comment on cast message in stream view
   Then I should see comment in the stream view right menu

Scenario: User can like a cast message in stream view
  Given a logged in user
    and I add a cast message in stream view
   When I click on like button in stream view
   Then I should see a cast message liked in stream view

Scenario: User can dislike a cast message in stream view
  Given a logged in user
    and I add a cast message in stream view
   When I click on dislike button
   Then I should see a cast message disliked in stream view

Scenario: User can send a cast message in stream view
  Given a logged in user
    and I add a cast message
   When I click on send cast message
   Then cast message should be send

Scenario: User can follow cast message in stream view
  Given a logged in user
    and add a cast message
   When I click follow cast message
   Then cast message should be followed

Scenario: User can unfollow a cast message in stream view
  Given a logged in user
    and I add a cast message in stream view
   When I click unfollow cast message
   Then I should see cast message unfollowed in stream view

Scenario: User can copy link of any cast message in stream view
  Given a logged in user
    and I add a cast message in stream view
   When I click on copy cast URl
   Then I should see URL copied in stream view

Scenario: User can mark cast messge as read in stream view
  Given a logged in user
    and I add a cast message in stream view
   When I click mark as read
   Then I should see cast message being read in stream view

Scenario: User can mark cast message as unread in stream view
  Given  a logged in user
    and  I add a cast message in stream view
   When  I click mark as unread
   Then  I should see cast message being unread

Scenario: User can comment on the comment in stream view
  Given a logged in user
    and I add a cast message and comment in stream view
   When I write comment on comment
   Then I should see a cast comment on comment in stream view

Scenario: Mark comment on comment of cast message as read in stream view
  Given a logged in user
    and I add a cast message and comment in stream view
   When I mark comment on comment as read
   Then I should see comment on comment marked as read in stream view

Scenario: Mark comment on comment of cast message as unread in stream view
  Given a logged in user
    and I add a cast message and comment in stream view
   When I mark comment on comment as unread
   Then I should see comment on comment marked as unread in stream view

Scenario: User can copy link of any cast comment in stream view
  Given a logged in user
    and I add a cast message and comment in stream view
   When I click on copy cast comment URl
   Then I should see URL being copied

Scenario: User click comment, don't write anything and click post in stream view
 Given a logged in user
   and I add a cast message in stream view
  When I click comment
   and click post
  Then I should see an error message popup in stream view

Scenario: User click comment, write dummy text and click cancel in stream view
  Given a logged in user
    and I add a cast message in stream view
   When I click comment and write comment
    and click cancel
   Then I should not see a comment being posted in stream view

Scenario: User can add cast comment with refrence cloud object in stream view
  Given a logged in user
    and I add a cast message in stream view
   When I add cast comment with refrence cloud object
   Then I should see a cast comment with refrence cloud object being posted in stream view

Scenario: User can add cast comment with attached file in stream view
  Given a logged in user
    and I add a cast message in stream view
   When I add cast comment with file attached
   Then I should see a cast comment being posted with file attached in stream view

Scenario: User can add cast comment with addressing spcific people with values in stream view
  Given a logged in user
    and I add a cast message in stream view
   When I add cast comment with specific people addressed
   Then I should see a cast comment with specific people being addressed in stream view

Scenario: User can add cast comment and add a person to it in stream view
  Given a logged in user
    and I add a cast messagein stream view
   When I add cast comment and add a person
   Then I should see a comment being posted with the person added in stream view

Scenario: User can add cast comment with time frame in stream view
  Given a logged in user
    and I add a cast message in stream view
   When I add a cast comment with time frame
   Then I should see a comment with time frame in stream view

Scenario: A user can add cast comment with tag in stream view
  Given a logged in user
    and I add a cast message in stream view
   When I add a cast comment with tag
   Then I should see a comment with tag in stream view

Scenario: Address cast comment to a specific person with bell in stream view
  Given a logged in user
    and I add a cast message in stream view
   When I add cast comment for a specific person with bell
   Then I should see a comment for a specific person with bell in stream view

Scenario: Add link to a cast comment in in stream view
  Given a logged in user
    and I add a cast message in the in stream view
   When I add link to a cast comment
   Then I should see a comment with a link in in stream view

Scenario: User can like a cast comment in stream view
  Given a logged in user
    and I add a cast message in stream view
    and I comment on the cast message in stream view
   When I click like on a cast comment
   Then I should see likes of cast comment being increased in stream view

Scenario: User can dislike a cast comment in stream view
  Given a logged in user
    and I add a cast message in stream view
    and I comment on the cast message
   When I clik unlike on a cast comment
   Then I should see unlikes of a cast comment being increased in stream view

***** Stream Cast Filters Right Menu ******

Scenario: User sort cast message with General in stream view

  Given a logged in user
   and  I add a cast message with general topic in stream view
   When I navigate to cast topic general
   Then I sould see casts with general topic in stream view

Scenario: User sort cast message with welcomecast in stream view
  Given a logged in user
    and I add a cast message with welcomecast topic in stream view
   When I navigate to the cast topic welcomecast
   Then I should see casts with welcomecast topic in stream view

Scenario: User sort cast message with Democast in stream view
  Given a logged in user
    and I add a cast message with Democast topic in stream view
   When I navigate to the cast topic Democast
   Then I should see casts with Democast topic in stream view

Scenario: User sort cast message with Business cloud in stream view
  Given a logged in user
   and  I add a cast message with Business cloud topic in stream view
   When I navigate to the cast topic Business cloud
   Then I should see casts with Business cloud topic in stream view

Scenario: User sort cast message with zimlet topic in stream view
  Given a logged in user
   and  I add a cast message with zimlet in stream view
   When I navigate to the cast topic Zimlet
   Then I should see casts with zimlet topic in stream view

Scenario: User sort cast message with Portal dev in stream view
  Given a logged in user
   and  I add a cast message with general topic in stream view
   When I navigate to the cast topic Portal Dev
   Then I should see casts with Portal Dev topic in stream view

Scenario: User filter cast message by keywords in stream view
  Given a logged in user
   When I click filter
    and write a keyword
   Then I should see a cast messages with the specified keyword in stream view

Scenario: User filter cast messages with tags in stream view
  Given a logged in user
   When I click filter
    and write a tag
   Then I should see cast messages with written tags in stream view

Scenario: User filter cast messages with date range in stream view
  Given a logged in user
    and I add a cast message in stream view
   When I click filter and specify a date range in stream view
   Then I should see cast messages in the specified dates in stream view


Scenario: User filter cast message by author in stream view
  Given a logged in user
    and I add a cast message in stream view
   When I click filter and enter aurthor name
   Then I should see cast messges by the specific aurthor in stream view

Scenario: User can filter cast messages by the logged in user in stream view
  Given a logged in user
    and I add a cast message in stream view
   When I click filter and enter the logged in user
   Then I should see cast messages by logged in user, in stream view

Scenario: User can filter cast messages by read in stream view
  Given a logged in user
    and I add a cast message in stream view
    and I click filter icon in stream view
   When I click read
   Then I should see cast messages that are read in stream view

Scenario: User can filter cast messages by unread in stream view
  Given a logged in user
    and I add a cast message in stream view
    and I click filter icon in stream view
   When I click unread
   Then I should see cast unread messages in stream view

Scenario: User can filter cast messages clear button in stream view
  Given a logged in user
   When I fill in the form in stream view
    and I click clear
   Then I should see popup fadeout in stream view

Scenario: User can comment on cast update in righmenu
 Given a logged in user
  When I add a cast message in stream view
   and I click on comment button
  Then I should see a comment text box in stream view

Scenario: User can like cast update in righmenu in stream view
  Given a logged in user
   When I add a cast message in stream view
    and I click on like button
   Then I should see likes increase in stream view

Scenario: User can unlike cast update in righmenu in stream view
 Given a logged in user
  When I add a cast message in stream view
   and I click on unlike button
  Then I should see unlikes increase in stream view

