mirrored from git://git.moodle.org/moodle.git
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'wip-MDL-50874-master' of https://github.com/marinaglanc…
- Loading branch information
Showing
5 changed files
with
189 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,51 @@ | ||
@block @block_blog_tag @core_blog @core_tag | ||
Feature: Adding blog tag block | ||
In order to search blog post by tag | ||
As a user | ||
I need to be able to use block blog tag | ||
|
||
Scenario: Adding block blog tag to the course | ||
Given the following "users" exist: | ||
| username | firstname | lastname | email | | ||
| teacher1 | Teacher | 1 | teacher1@example.com | | ||
| student1 | Student | 1 | student1@example.com | | ||
And the following "courses" exist: | ||
| fullname | shortname | | ||
| Course 1 | c1 | | ||
And the following "tags" exist: | ||
| name | tagtype | | ||
| Neverusedtag | official | | ||
And the following "course enrolments" exist: | ||
| user | course | role | | ||
| teacher1 | c1 | editingteacher | | ||
| student1 | c1 | student | | ||
When I log in as "teacher1" | ||
And I follow "Course 1" | ||
And I turn editing mode on | ||
And I add the "Blog tags" block | ||
|
||
And I navigate to "Course blogs" node in "Current course > c1 > Participants" | ||
And I follow "Blog about this Course" | ||
And I set the following fields to these values: | ||
| Entry title | Blog post from teacher | | ||
| Blog entry body | Teacher blog post content | | ||
| Other tags (enter tags separated by commas) | Cats, dogs | | ||
And I press "Save changes" | ||
And I log out | ||
And I log in as "student1" | ||
And I follow "Course 1" | ||
And I navigate to "Course blogs" node in "Current course > c1 > Participants" | ||
And I follow "Blog about this Course" | ||
And I set the following fields to these values: | ||
| Entry title | Blog post from student | | ||
| Blog entry body | Student blog post content | | ||
| Other tags (enter tags separated by commas) | DOGS, mice | | ||
And I press "Save changes" | ||
And I follow "c1" | ||
Then I should see "Cats" in the "Blog tags" "block" | ||
And I should see "dogs" in the "Blog tags" "block" | ||
And I should see "mice" in the "Blog tags" "block" | ||
And I click on "Cats" "link" in the "Blog tags" "block" | ||
And I should see "Blog post from teacher" | ||
And I should see "Teacher blog post content" | ||
And I log out |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,64 @@ | ||
@block @block_tags @core_tag | ||
Feature: Block tags displaying course tags | ||
In order to tag courses | ||
As a user | ||
I need to be able to use the block tags | ||
|
||
Background: | ||
Given the following "users" exist: | ||
| username | firstname | lastname | email | | ||
| teacher1 | Teacher | 1 | teacher1@example.com | | ||
| student1 | Student | 1 | student1@example.com | | ||
| student2 | Student | 2 | student2@example.com | | ||
And the following "courses" exist: | ||
| fullname | shortname | | ||
| Course 1 | c1 | | ||
And the following "tags" exist: | ||
| name | tagtype | | ||
| Neverusedtag | official | | ||
And the following "course enrolments" exist: | ||
| user | course | role | | ||
| teacher1 | c1 | editingteacher | | ||
| student1 | c1 | student | | ||
| student2 | c1 | student | | ||
And I log in as "admin" | ||
And I set the following administration settings values: | ||
| Show course tags | 1 | | ||
And I log out | ||
|
||
Scenario: Add Tags block to tag courses in a course | ||
When I log in as "teacher1" | ||
And I follow "Course 1" | ||
And I turn editing mode on | ||
And I add the "Tags" block | ||
And I log out | ||
And I log in as "student1" | ||
And I follow "Course 1" | ||
And I should not see "Neverusedtag" in the "Tags" "block" | ||
And I click on "more..." "link" in the "Tags" "block" | ||
And I should not see "Neverusedtag" | ||
And I follow "c1" | ||
And I set the field "coursetag_new_tag" to "Dogs, Mice" | ||
And I press "Add" | ||
And I should see "Dogs" in the "Tags" "block" | ||
And I should see "Mice" in the "Tags" "block" | ||
And I log out | ||
And I log in as "student2" | ||
And I follow "Course 1" | ||
And I should see "Dogs" in the "Tags" "block" | ||
And I set the field "coursetag_new_tag" to "Cats, Dogs" | ||
And I press "Add" | ||
And I should see "Dogs" in the "Tags" "block" | ||
And I should see "Cats" in the "Tags" "block" | ||
And I click on "more..." "link" in the "Tags" "block" | ||
And "Cats" "link" should appear before "Dogs" "link" | ||
And "Dogs" "link" should appear before "Mice" "link" | ||
And I follow "My tags" | ||
And I should see "Dogs" | ||
And I should see "Cats" | ||
And I should not see "Mice" | ||
And I follow "All tags" | ||
And I follow "Popularity" | ||
And "Mice" "link" should appear before "Dogs" "link" | ||
And I should not see "Neverusedtag" | ||
And I log out |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,59 @@ | ||
@block @block_tags @core_tag | ||
Feature: Block tags displaying tag cloud | ||
In order to view system tags | ||
As a user | ||
I need to be able to use the block tags | ||
|
||
Background: | ||
Given the following "users" exist: | ||
| username | firstname | lastname | email | | ||
| teacher1 | Teacher | 1 | teacher1@example.com | | ||
| student1 | Student | 1 | student1@example.com | | ||
And the following "courses" exist: | ||
| fullname | shortname | | ||
| Course 1 | c1 | | ||
And the following "tags" exist: | ||
| name | tagtype | | ||
| Neverusedtag | official | | ||
And the following "course enrolments" exist: | ||
| user | course | role | | ||
| teacher1 | c1 | editingteacher | | ||
| student1 | c1 | student | | ||
And I log in as "teacher1" | ||
And I follow "Preferences" in the user menu | ||
And I follow "Edit profile" | ||
And I expand all fieldsets | ||
And I set the field "Enter tags separated by commas" to "Dogs, Cats" | ||
And I press "Update profile" | ||
And I log out | ||
|
||
@javascript | ||
Scenario: Add Tags block on a front page | ||
When I log in as "admin" | ||
And I am on site homepage | ||
And I follow "Turn editing on" | ||
And I add the "Tags" block | ||
And I log out | ||
And I am on site homepage | ||
Then I should see "Dogs" in the "Tags" "block" | ||
And I should see "Cats" in the "Tags" "block" | ||
And I should not see "Neverusedtag" in the "Tags" "block" | ||
And I click on "Dogs" "link" in the "Tags" "block" | ||
And I should see "Log in to the site" in the ".breadcrumb" "css_element" | ||
|
||
@javascript | ||
Scenario: Add Tags block in a course | ||
When I log in as "teacher1" | ||
And I follow "Course 1" | ||
And I turn editing mode on | ||
And I add the "Tags" block | ||
And I log out | ||
And I log in as "student1" | ||
And I follow "Course 1" | ||
Then I should see "Dogs" in the "Tags" "block" | ||
And I should see "Cats" in the "Tags" "block" | ||
And I should not see "Neverusedtag" in the "Tags" "block" | ||
And I click on "Dogs" "link" in the "Tags" "block" | ||
And I should see "Users tagged with \"Dogs\": 1" | ||
And I should see "Teacher 1" | ||
And I log out |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters