Skip to content

Commit

Permalink
MDL-46929 mod_forum: Improve behat tests
Browse files Browse the repository at this point in the history
  • Loading branch information
andrewhancox committed Apr 11, 2017
1 parent e9c4676 commit 32a9691
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 6 deletions.
3 changes: 2 additions & 1 deletion mod/forum/tests/behat/advanced_search.feature
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ Feature: The forum search allows users to perform advanced searches for forum po
And I am on "Course 1" course homepage with editing mode on
And I add the "Latest announcements" block
And I navigate to "Edit settings" node in "Course administration"
And I expand all fieldsets
And I set the field "id_newsitems" to "1"
And I press "Save and display"
And I add a new topic to "Announcements" forum with:
Expand Down Expand Up @@ -116,7 +117,7 @@ Feature: The forum search allows users to perform advanced searches for forum po
@javascript
Scenario: Perform an advanced search using tags
Given I log in as "student1"
And I follow "Course 1"
And I am on "Course 1" course homepage
And I follow "Announcements"
And I press "Search forums"
And I should see "Advanced search"
Expand Down
10 changes: 5 additions & 5 deletions mod/forum/tests/behat/edit_tags.feature
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
@mod @mod_forum @core_tag @javascript
@mod @mod_forum @core_tag
Feature: Edited forum posts handle tags correctly
In order to get forum posts properly labelled
As a user
Expand All @@ -17,8 +17,7 @@ Feature: Edited forum posts handle tags correctly
| teacher1 | C1 | editingteacher |
| student1 | C1 | student |
And I log in as "teacher1"
And I follow "Course 1"
And I turn editing mode on
And I am on "Course 1" course homepage with editing mode on
And I add a "Forum" to section "1" and I fill the form with:
| Forum name | Test forum name |
| Description | Test forum description |
Expand All @@ -27,9 +26,10 @@ Feature: Edited forum posts handle tags correctly
| Message | Teacher post message |
And I log out

@javascript
Scenario: Forum post edition of custom tags works as expected
Given I log in as "student1"
And I follow "Course 1"
And I am on "Course 1" course homepage
And I reply "Teacher post subject" post from "Test forum name" forum with:
| Subject | Student post subject |
| Message | Student post message |
Expand All @@ -48,7 +48,7 @@ Feature: Edited forum posts handle tags correctly
And I press "Continue"
And I log out
And I log in as "teacher1"
And I follow "Course 1"
And I am on "Course 1" course homepage
And I follow "Test forum"
And I click on "Add a new discussion topic" "button"
And I expand all fieldsets
Expand Down

0 comments on commit 32a9691

Please sign in to comment.