- Keep old scenarios being non-javascript.
- Move the tags stuff to recently added scenario.
- Change some "my" by "your" to avoid problems detecting results
while keeping previous tests (based on "subject") working.
And I add a new topic to "Announcements" forum with:
| Subject | My subject |
| Message | My message |
And I add a new topic to "Announcements" forum with:
| Subject | My subject |
| Message | My message |
And I am on "Course 1" course homepage
And I add a new topic to "Announcements" forum with:
And I am on "Course 1" course homepage
And I add a new topic to "Announcements" forum with:
- | Subject | My subjective|
- | Message | My long message |
+ | Subject | Your subjective|
+ | Message | Your long message |
And I log out
Scenario: Perform an advanced search using any term
And I log out
Scenario: Perform an advanced search using any term
And I set the field "words" to "subject"
When I press "Search forums"
Then I should see "My subject"
And I set the field "words" to "subject"
When I press "Search forums"
Then I should see "My subject"
- And I should see "My subjective"
+ And I should see "Your subjective"
Scenario: Perform an advanced search avoiding words
Given I log in as "student1"
Scenario: Perform an advanced search avoiding words
Given I log in as "student1"
And I set the field "notwords" to "subjective"
When I press "Search forums"
Then I should see "My subject"
And I set the field "notwords" to "subjective"
When I press "Search forums"
Then I should see "My subject"
- And I should not see "My subjective"
+ And I should not see "Your subjective"
Scenario: Perform an advanced search using whole words
Given database family used is one of the following:
Scenario: Perform an advanced search using whole words
Given database family used is one of the following:
And I set the field "fullwords" to "subject"
When I press "Search forums"
Then I should see "My subject"
And I set the field "fullwords" to "subject"
When I press "Search forums"
Then I should see "My subject"
- And I should not see "My subjective"
+ And I should not see "Your subjective"
Scenario: Perform an advanced search matching the subject
Given I log in as "student1"
Scenario: Perform an advanced search matching the subject
Given I log in as "student1"
And I set the field "subject" to "subjective"
When I press "Search forums"
Then I should not see "My message"
And I set the field "subject" to "subjective"
When I press "Search forums"
Then I should not see "My message"
- And I should see "My subjective"
+ And I should see "Your subjective"
Scenario: Perform an advanced search matching the author
Given I log in as "teacher2"
Scenario: Perform an advanced search matching the author
Given I log in as "teacher2"
And I follow "Announcements"
And I press "Search forums"
And I should see "Advanced search"
And I follow "Announcements"
And I press "Search forums"
And I should see "Advanced search"
- And I set the field "subject" to "my subjective"
+ And I set the field "subject" to "your subjective"
When I press "Search forums"
Then I should not see "My message"
When I press "Search forums"
Then I should not see "My message"
- And I should see "My subjective"
+ And I should see "Your subjective"
@javascript
Scenario: Perform an advanced search using tags
@javascript
Scenario: Perform an advanced search using tags
- Given I log in as "student1"
+ Given I log in as "teacher1"
+ And I am on "Course 1" course homepage
+ And I follow "Announcements"
+ And I follow "My subject"
+ And I follow "Edit"
+ And I set the following fields to these values:
+ | Tags | SearchedTag |
+ And I press "Save changes"
+ And I log out
+ And I log in as "student1"
And I am on "Course 1" course homepage
And I follow "Announcements"
And I press "Search forums"
And I am on "Course 1" course homepage
And I follow "Announcements"
And I press "Search forums"
And I click on "[data-value='SearchedTag']" "css_element"
When I press "Search forums"
Then I should see "My subject"
And I click on "[data-value='SearchedTag']" "css_element"
When I press "Search forums"
Then I should see "My subject"
- And I should not see "My subjective"
+ And I should not see "Your subjective"