This commit is contained in:
Eloy Lafuente (stronk7) 2014-07-16 09:18:03 +02:00
commit 743960d3ab
2 changed files with 9 additions and 8 deletions

View file

@ -633,6 +633,7 @@ class page_wiki_comments extends page_wiki {
$by->date = userdate($comment->timecreated); $by->date = userdate($comment->timecreated);
$t = new html_table(); $t = new html_table();
$t->id = 'wiki-comments';
$cell1 = new html_table_cell($OUTPUT->user_picture($user, array('popup' => true))); $cell1 = new html_table_cell($OUTPUT->user_picture($user, array('popup' => true)));
$cell2 = new html_table_cell(get_string('bynameondate', 'forum', $by)); $cell2 = new html_table_cell(get_string('bynameondate', 'forum', $by));
$cell3 = new html_table_cell(); $cell3 = new html_table_cell();

View file

@ -43,14 +43,14 @@ Feature: Users can comment on wiki pages
@javascript @javascript
Scenario: Student can edit and delete their own comment Scenario: Student can edit and delete their own comment
When I click on ".r0 img[title='Edit']" "css_element" When I click on "Edit" "link" in the "wiki-comments" "table"
And I set the following fields to these values: And I set the following fields to these values:
| Comment | student 1 updated comment | | Comment | student 1 updated comment |
And I press "Save" And I press "Save"
Then I should see "student 1 updated comment" Then I should see "student 1 updated comment"
And ".r0 img[title='Edit']" "css_element" should exist And "Edit" "link" should exist in the "wiki-comments" "table"
And ".r0 img[title='Delete']" "css_element" should exist And "Delete" "link" should exist in the "wiki-comments" "table"
And I click on ".r0 img[title='Delete']" "css_element" And I click on "Delete" "link" in the "wiki-comments" "table"
And I press "Yes" And I press "Yes"
And I should not see "student 1 updated comment" And I should not see "student 1 updated comment"
@ -61,8 +61,8 @@ Feature: Users can comment on wiki pages
And I follow "Course 1" And I follow "Course 1"
And I follow "Test wiki name" And I follow "Test wiki name"
And I follow "Comments" And I follow "Comments"
Then ".r0 img[title='Edit']" "css_element" should not exist Then "Edit" "link" should not exist in the "wiki-comments" "table"
Then ".r0 img[title='Delete']" "css_element" should not exist And "Delete" "link" should not exist in the "wiki-comments" "table"
@javascript @javascript
Scenario: Teacher can delete a student comment Scenario: Teacher can delete a student comment
@ -71,5 +71,5 @@ Feature: Users can comment on wiki pages
And I follow "Course 1" And I follow "Course 1"
And I follow "Test wiki name" And I follow "Test wiki name"
And I follow "Comments" And I follow "Comments"
Then ".r0 img[title='Edit']" "css_element" should not exist Then "Edit" "link" should not exist in the "wiki-comments" "table"
Then ".r0 img[title='Delete']" "css_element" should exist And "Delete" "link" should exist in the "wiki-comments" "table"