[ Index ]

PHP Cross Reference of Unnamed Project

title

Body

[close]

/blocks/comments/tests/behat/ -> add_comment.feature (source)

   1  @block @block_comments
   2  Feature: 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@example.com |
  14        | student1 | Student | First | student1@example.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"
  36  
  37    @javascript
  38    Scenario: Test comment block pagination
  39      When I add "Super test comment 01" comment to comments block
  40      And I add "Super test comment 02" comment to comments block
  41      And I add "Super test comment 03" comment to comments block
  42      And I add "Super test comment 04" comment to comments block
  43      And I add "Super test comment 05" comment to comments block
  44      And I add "Super test comment 06" comment to comments block
  45      And I add "Super test comment 07" comment to comments block
  46      And I add "Super test comment 08" comment to comments block
  47      And I add "Super test comment 09" comment to comments block
  48      And I add "Super test comment 10" comment to comments block
  49      And I add "Super test comment 11" comment to comments block
  50      And I add "Super test comment 12" comment to comments block
  51      And I add "Super test comment 13" comment to comments block
  52      And I add "Super test comment 14" comment to comments block
  53      And I add "Super test comment 15" comment to comments block
  54      And I add "Super test comment 16" comment to comments block
  55      And I add "Super test comment 17" comment to comments block
  56      And I add "Super test comment 18" comment to comments block
  57      And I add "Super test comment 19" comment to comments block
  58      And I add "Super test comment 20" comment to comments block
  59      And I add "Super test comment 21" comment to comments block
  60      And I add "Super test comment 22" comment to comments block
  61      And I add "Super test comment 23" comment to comments block
  62      And I add "Super test comment 24" comment to comments block
  63      And I add "Super test comment 25" comment to comments block
  64      And I add "Super test comment 26" comment to comments block
  65      And I add "Super test comment 27" comment to comments block
  66      And I add "Super test comment 28" comment to comments block
  67      And I add "Super test comment 29" comment to comments block
  68      And I add "Super test comment 30" comment to comments block
  69      And I add "Super test comment 31" comment to comments block
  70      Then I should see "Super test comment 01"
  71      And I should see "Super test comment 31"
  72      And I follow "Course 1"
  73      And I should not see "Super test comment 01"
  74      And I should not see "Super test comment 02"
  75      And I should not see "Super test comment 16"
  76      And I should see "Super test comment 17"
  77      And I should see "Super test comment 31"
  78      And I should see "1" in the ".block_comments .comment-paging" "css_element"
  79      And I should see "2" in the ".block_comments .comment-paging" "css_element"
  80      And I should see "3" in the ".block_comments .comment-paging" "css_element"
  81      And I should not see "4" in the ".block_comments .comment-paging" "css_element"
  82      And I click on "2" "link" in the ".block_comments .comment-paging" "css_element"
  83      And I should not see "Super test comment 01"
  84      And I should see "Super test comment 02"
  85      And I should see "Super test comment 16"
  86      And I should not see "Super test comment 17"
  87      And I should not see "Super test comment 31"
  88      And I click on "3" "link" in the ".block_comments .comment-paging" "css_element"
  89      And I should see "Super test comment 01"
  90      And I should not see "Super test comment 02"
  91      And I should not see "Super test comment 16"
  92      And I should not see "Super test comment 17"
  93      And I should not see "Super test comment 31"
  94      And I click on "1" "link" in the ".block_comments .comment-paging" "css_element"
  95      And I should not see "Super test comment 01"
  96      And I should not see "Super test comment 02"
  97      And I should not see "Super test comment 16"
  98      And I should see "Super test comment 17"
  99      And I should see "Super test comment 31"


Generated: Thu Aug 11 10:00:09 2016 Cross-referenced by PHPXref 0.7.1