forked from moodle/moodle
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
According to MDLQA-943, users can add comments via a comments block
- Loading branch information
David Monllao
committed
Apr 2, 2013
1 parent
a5efbe6
commit 1fb1ccd
Showing
2 changed files
with
70 additions
and
0 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,35 @@ | ||
@core_comment | ||
Feature: Add a comment to the comments block | ||
In order to comment on a conversation or a topic | ||
As a moodle user | ||
In need to add comments to courses | ||
|
||
Background: | ||
Given the following "courses" exists: | ||
| fullname | shortname | category | | ||
| Course 1 | C1 | 0 | | ||
And the following "users" exists: | ||
| username | firstname | lastname | email | | ||
| teacher1 | Teacher | Frist | teacher1@asd.com | | ||
| student1 | Student | First | student1@asd.com | | ||
And the following "course enrolments" exists: | ||
| user | course | role | | ||
| 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 add the "Comments" block | ||
And I log out | ||
And I log in as "student1" | ||
And I follow "Course 1" | ||
|
||
@javascript | ||
Scenario: Add a comment with Javascript enabled | ||
When I add "I'm a comment from student1" comment to comments block | ||
Then I should see "I'm a comment from student1" | ||
|
||
Scenario: Add a comment with Javascript disabled | ||
When I follow "Show comments" | ||
And I add "I'm a comment from student1" comment to comments block | ||
Then I should see "I'm a comment from student1" |
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,35 @@ | ||
@core_comment | ||
Feature: Delete comment block messages | ||
In order to refine comment block's contents | ||
As a moodle teacher | ||
In need to delete comments from courses | ||
|
||
@javascript | ||
Scenario: Delete comments with Javascript enabled | ||
Given the following "courses" exists: | ||
| fullname | shortname | category | | ||
| Course 1 | C1 | 0 | | ||
And the following "users" exists: | ||
| username | firstname | lastname | email | | ||
| teacher1 | Teacher | First | teacher1@asd.com | | ||
| student1 | Student | First | student1@asd.com | | ||
And the following "course enrolments" exists: | ||
| user | course | role | | ||
| 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 add the "Comments" block | ||
And I log out | ||
And I log in as "student1" | ||
And I follow "Course 1" | ||
And I add "Comment from student1" comment to comments block | ||
And I log out | ||
And I log in as "teacher1" | ||
And I follow "Course 1" | ||
And I add "Comment from teacher1" comment to comments block | ||
When I delete "Comment from student1" comment from comments block | ||
Then I should not see "Comment from student1" | ||
And I delete "Comment from teacher1" comment from comments block | ||
And I should not see "Comment from teacher1" |