1 |
efrain |
1 |
@core_comment @javascript
|
|
|
2 |
Feature: Manage comments made by users
|
|
|
3 |
As an admin
|
|
|
4 |
I want to view, filter and delete comments
|
|
|
5 |
|
|
|
6 |
Background:
|
|
|
7 |
Given I log in as "admin"
|
|
|
8 |
And the following "course" exists:
|
|
|
9 |
| fullname | Course 1 |
|
|
|
10 |
| shortname | CS101 |
|
|
|
11 |
And the following "core_comment > Comments" exist:
|
|
|
12 |
| contextlevel | reference | component | area | content |
|
|
|
13 |
| Course | CS101 | block_comments | page_comments | Uno |
|
|
|
14 |
| Course | CS101 | block_comments | page_comments | Dos |
|
|
|
15 |
| Course | CS101 | block_comments | page_comments | Tres |
|
|
|
16 |
|
|
|
17 |
Scenario: View and filter site comments
|
|
|
18 |
When I navigate to "Reports > Comments" in site administration
|
|
|
19 |
And the following should exist in the "reportbuilder-table" table:
|
11 |
efrain |
20 |
| First name | Content | Context URL |
|
1 |
efrain |
21 |
| Admin User | Uno | Course: Course 1 |
|
|
|
22 |
| Admin User | Dos | Course: Course 1 |
|
|
|
23 |
| Admin User | Tres | Course: Course 1 |
|
|
|
24 |
And I click on "Filters" "button"
|
|
|
25 |
And I set the following fields in the "Content" "core_reportbuilder > Filter" to these values:
|
|
|
26 |
| Content operator | Contains |
|
|
|
27 |
| Content value | Uno |
|
|
|
28 |
And I click on "Apply" "button" in the "[data-region='report-filters']" "css_element"
|
|
|
29 |
Then I should see "Uno" in the "reportbuilder-table" "table"
|
|
|
30 |
And I should not see "Dos" in the "reportbuilder-table" "table"
|
|
|
31 |
And I should not see "Tres" in the "reportbuilder-table" "table"
|
|
|
32 |
|
|
|
33 |
Scenario: Delete single comment
|
|
|
34 |
When I navigate to "Reports > Comments" in site administration
|
|
|
35 |
And I press "Delete" action in the "Uno" report row
|
|
|
36 |
And I click on "Delete" "button" in the "Delete" "dialogue"
|
|
|
37 |
Then I should not see "Uno" in the "reportbuilder-table" "table"
|
|
|
38 |
And I should see "Dos" in the "reportbuilder-table" "table"
|
|
|
39 |
And I should see "Tres" in the "reportbuilder-table" "table"
|
|
|
40 |
|
|
|
41 |
Scenario: Delete multiple comments
|
|
|
42 |
When I navigate to "Reports > Comments" in site administration
|
|
|
43 |
And I click on "Select" "checkbox" in the "Uno" "table_row"
|
|
|
44 |
And I click on "Select" "checkbox" in the "Dos" "table_row"
|
|
|
45 |
And I press "Delete selected"
|
|
|
46 |
And I click on "Delete" "button" in the "Delete selected" "dialogue"
|
|
|
47 |
Then I should not see "Uno" in the "reportbuilder-table" "table"
|
|
|
48 |
And I should not see "Dos" in the "reportbuilder-table" "table"
|
|
|
49 |
And I should see "Tres" in the "reportbuilder-table" "table"
|