toolForum.feature 2.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960
  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&cidReq=TEMP"
  9. When I fill in the following:
  10. | forum_category_title | Forum Category Test |
  11. And I fill in ckeditor field "forum_category_comment" with "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&cidReq=TEMP"
  16. When I fill in the following:
  17. | forum_title | Forum Test |
  18. And I fill in ckeditor field "forum_comment" with "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/index.php?cidReq=TEMP"
  23. And I follow "Forum Test"
  24. And I follow "Create thread"
  25. And wait for the page to be loaded
  26. When I fill in the following:
  27. | post_title | Thread One |
  28. And I fill in ckeditor field "post_text" with "This is a the first thread in a forum for test"
  29. And I press "SubmitPost"
  30. Then I should see "The new thread has been added"
  31. Scenario: Reply to forum message
  32. Given I am on "/main/forum/index.php?cidReq=TEMP"
  33. And I follow "Forum Test"
  34. When I follow "Thread One"
  35. When I follow "Reply to this thread"
  36. And I fill in the following:
  37. | post_title | Reply |
  38. And I fill in ckeditor field "post_text" with "This is a reply to the first message for test"
  39. And I press "SubmitPost"
  40. Then I should see "The reply has been added"
  41. Scenario: Delete a forum message
  42. Given I am on "/main/forum/index.php?cidReq=TEMP"
  43. And I follow "Forum Test"
  44. When I follow "Delete"
  45. And I confirm the popup
  46. Then I should see "Thread deleted"
  47. # This test is commented because to quote a message is necessary load HTML code inside of textarea.
  48. # And this breaks the page for Behat
  49. # Scenario: Quote a forum message
  50. # Given I am on "/main/forum/viewthread.php?forum=1&thread=1"
  51. # When I follow "quote-1"
  52. # And I press "SubmitPost"
  53. # Then I should see "The reply has been added"