[ Index ]

PHP Cross Reference of Unnamed Project

title

Body

[close]

/calendar/tests/behat/ -> calendar.feature (source)

   1  @core @core_calendar
   2  Feature: Perform basic calendar functionality
   3    In order to ensure the calendar works as expected
   4    As an admin
   5    I need to create calendar data
   6  
   7    Background:
   8      Given the following "users" exist:
   9        | username | firstname | lastname | email |
  10        | student1 | Student | 1 | student1@example.com |
  11        | student2 | Student | 2 | student2@example.com |
  12        | student3 | Student | 3 | student3@example.com |
  13      And the following "courses" exist:
  14        | fullname | shortname | format |
  15        | Course 1 | C1 | topics |
  16      And the following "course enrolments" exist:
  17        | user | course | role |
  18        | student1 | C1 | student |
  19        | student3 | C1 | student |
  20      And the following "groups" exist:
  21        | name | course | idnumber |
  22        | Group 1 | C1 | G1 |
  23      And the following "group members" exist:
  24        | user | group |
  25        | student1 | G1 |
  26      When I log in as "admin"
  27      And I am on site homepage
  28      And I follow "Course 1"
  29      And I turn editing mode on
  30      And I add the "Calendar" block
  31  
  32    Scenario: Create a site event
  33      And I create a calendar event with form data:
  34        | Type of event | site |
  35        | Event title | Really awesome event! |
  36        | Description | Come join this awesome event, sucka! |
  37      And I log out
  38      And I log in as "student1"
  39      And I am on site homepage
  40      And I follow "Course 1"
  41      And I follow "This month"
  42      And I should see "Really awesome event!"
  43      And I log out
  44      And I log in as "student2"
  45      And I follow "This month"
  46      And I should see "Really awesome event!"
  47  
  48    Scenario: Create a course event
  49      And I create a calendar event with form data:
  50        | Type of event | course |
  51        | Event title | Really awesome event! |
  52        | Description | Come join this awesome event, sucka! |
  53      And I log out
  54      And I log in as "student1"
  55      And I am on site homepage
  56      And I follow "Course 1"
  57      And I follow "This month"
  58      And I should see "Really awesome event!"
  59      And I log out
  60      And I log in as "student2"
  61      And I follow "This month"
  62      And I should not see "Really awesome event!"
  63  
  64    Scenario: Create a group event
  65      And I create a calendar event with form data:
  66        | Type of event | group |
  67        | Group | Group 1 |
  68        | Event title | Really awesome event! |
  69        | Description | Come join this awesome event |
  70      And I log out
  71      And I log in as "student1"
  72      And I am on site homepage
  73      And I follow "Course 1"
  74      And I follow "This month"
  75      And I follow "Really awesome event!"
  76      And "Group 1" "text" should exist in the ".eventlist" "css_element"
  77      And I log out
  78      And I log in as "student3"
  79      And I follow "This month"
  80      And I should not see "Really awesome event!"
  81  
  82    Scenario: Create a user event
  83      And I create a calendar event with form data:
  84        | Type of event | user |
  85        | Event title | Really awesome event! |
  86        | Description | Come join this awesome event, sucka! |
  87      And I log out
  88      And I log in as "student1"
  89      And I am on site homepage
  90      And I follow "Course 1"
  91      And I follow "This month"
  92      And I should not see "Really awesome event!"
  93  
  94    Scenario: Delete an event
  95      And I create a calendar event with form data:
  96        | Type of event | user |
  97        | Event title | Really awesome event! |
  98        | Description | Come join this awesome event, sucka! |
  99      And I click on "//div[@class='commands']//a[contains(@href, 'delete')]" "xpath_element"
 100      And I click on "Delete" "button"
 101      And I should not see "Really awesome event!"
 102  
 103    Scenario: Edit an event
 104      And I create a calendar event with form data:
 105        | Type of event | user |
 106        | Event title | Really awesome event! |
 107        | Description | Come join this awesome event, sucka! |
 108      And I click on "//div[@class='commands']//a[contains(@href, 'edit')]" "xpath_element"
 109      And I set the following fields to these values:
 110        | Event title | Mediocre event :( |
 111        | Description | Wait, this event isn't that great. |
 112      And I press "Save changes"
 113      And I should see "Mediocre event"
 114  


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