forum.feature 2.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152
  1. Feature: Forum tool
  2. In order to use the Forum tool
  3. The teachers should be able to create forum categories, forums, forum threads
  4. Background:
  5. Given I am a platform administrator
  6. And I am on course "TEMP" homepage
  7. Scenario: Create a forum category
  8. Given I am on "/main/forum/index.php?action=add&content=forumcategory"
  9. When I fill in the following:
  10. | forum_category_title | Forum Category Test |
  11. | forum_category_comment | This is the first forum category for test |
  12. And I press "SubmitForumCategory"
  13. Then I should see "The forum category has been added"
  14. Scenario: Create a forum
  15. Given I am on "/main/forum/index.php?action=add&content=forum"
  16. When I fill in the following:
  17. | forum_title | Forum Test |
  18. | forum_comment | This is the first forum for test |
  19. And I press "SubmitForum"
  20. Then I should see "The forum has been added"
  21. Scenario: Create a forum thread
  22. Given I am on "/main/forum/newthread.php?forum=1"
  23. When I fill in the following:
  24. | post_title | Thread One |
  25. | post_text | This is a the first thread in a forum for test |
  26. And I press "SubmitPost"
  27. Then I should see "The new thread has been added"
  28. Scenario: Reply to forum message
  29. Given I am on "/main/forum/viewthread.php?forum=1&thread=1"
  30. When I follow "reply-to-1"
  31. And I fill in the following:
  32. | post_text | This is a reply to the first message for test |
  33. And I press "SubmitPost"
  34. Then I should see "The reply has been added"
  35. Scenario: Delete a forum message
  36. Given I am on "/main/forum/viewthread.php?forum=1&thread=1"
  37. When I follow "delete-post-2"
  38. Then I should see "Post has been deleted"
  39. # This test is commented because to quote a message is necessary load HTML code inside of textarea.
  40. # And this breaks the page for Behat
  41. # Scenario: Quote a forum message
  42. # Given I am on "/main/forum/viewthread.php?forum=1&thread=1"
  43. # When I follow "quote-1"
  44. # And I press "SubmitPost"
  45. # Then I should see "The reply has been added"