source: moodle/trunk/fuentes/blocks/comments/tests/behat/add_comment.feature @ 136

Last change on this file since 136 was 136, checked in by mabarracus, 3 years ago

Ported code to xenial

File size: 1.2 KB
Line 
1@block @block_comments
2Feature: Add a comment to the comments block
3  In order to comment on a conversation or a topic
4  As a user
5  In need to add comments to courses
6
7  Background:
8    Given the following "courses" exist:
9      | fullname | shortname | category |
10      | Course 1 | C1 | 0 |
11    And the following "users" exist:
12      | username | firstname | lastname | email |
13      | teacher1 | Teacher | Frist | teacher1@asd.com |
14      | student1 | Student | First | student1@asd.com |
15    And the following "course enrolments" exist:
16      | user | course | role |
17      | teacher1 | C1 | editingteacher |
18      | student1 | C1 | student |
19    And I log in as "teacher1"
20    And I follow "Course 1"
21    And I turn editing mode on
22    And I add the "Comments" block
23    And I log out
24    And I log in as "student1"
25    And I follow "Course 1"
26
27  @javascript
28  Scenario: Add a comment with Javascript enabled
29    When I add "I'm a comment from student1" comment to comments block
30    Then I should see "I'm a comment from student1"
31
32  Scenario: Add a comment with Javascript disabled
33    When I follow "Show comments"
34    And I add "I'm a comment from student1" comment to comments block
35    Then I should see "I'm a comment from student1"
Note: See TracBrowser for help on using the repository browser.