From aa1fadf8e0fc614b1b5bc0a3a7f652acf5849ffc Mon Sep 17 00:00:00 2001 From: Angel Fernando Quiroz Campos Date: Tue, 3 May 2016 18:37:34 -0500 Subject: [PATCH] Add Behat feature to test forum tool as a platform admin --- tests/features/forum.feature | 31 +++++++++++++++++++++++++++++++ 1 file changed, 31 insertions(+) create mode 100644 tests/features/forum.feature diff --git a/tests/features/forum.feature b/tests/features/forum.feature new file mode 100644 index 0000000000..13a8fcfbe6 --- /dev/null +++ b/tests/features/forum.feature @@ -0,0 +1,31 @@ +Feature: Forum tool + In order to use the Forum tool + The teachers should be able to create forum categories, forums, forum threads + + Background: + Given I am a platform administrator + And I am on course "TEMP" homepage + + Scenario: Create a forum category + Given I am on "/main/forum/index.php?action=add&content=forumcategory" + When I fill in the following: + | forum_category_title | Forum Category Test | + | forum_category_comment | This is the first forum category for test | + And I press "SubmitForumCategory" + Then I should see "The forum category has been added" + + Scenario: Create a forum + Given I am on "/main/forum/index.php?action=add&content=forum" + When I fill in the following: + | forum_title | Forum Test | + | forum_comment | This is the first forum for test | + And I press "SubmitForum" + Then I should see "The forum has been added" + + Scenario: Create a forum thread + Given I am on "/main/forum/newthread.php?forum=5" + When I fill in the following: + | post_title | Thread One | + | post_text | This is a the first thread in a forum for test | + And I press "SubmitPost" + Then I should see "The new thread has been added" \ No newline at end of file