[ Index ]

PHP Cross Reference of Unnamed Project

title

Body

[close]

/mod/glossary/tests/behat/ -> print_friendly_version.feature (source)

   1  @mod @mod_glossary
   2  Feature: A teacher can choose whether to provide a printer-friendly glossary entries list
   3    In order to print glossaries easily
   4    As a user
   5    I need to provide users a different view to print the glossary contents
   6  
   7    Background:
   8      Given the following "users" exist:
   9        | username | firstname | lastname | email |
  10        | teacher1 | Teacher | 1 | teacher1@example.com |
  11        | student1 | Student | 1 | student1@example.com |
  12      And the following "courses" exist:
  13        | fullname | shortname | category |
  14        | Course 1 | C1 | 0 |
  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  
  23    @javascript
  24    Scenario: Printer-friendly glossary view enabled
  25      Given I add a "Glossary" to section "1" and I fill the form with:
  26        | Name | Test glossary name |
  27        | Description | Test glossary description |
  28        | Allow print view | Yes |
  29      And I log out
  30      And I log in as "student1"
  31      And I follow "Course 1"
  32      And I follow "Test glossary name"
  33      When I add a glossary entry with the following data:
  34        | Concept | Just a test concept |
  35        | Definition | Concept definition |
  36      Then "Printer-friendly version" "link" should exist
  37      And "//*[contains(concat(' ', normalize-space(@class), ' '), ' printicon ')][contains(@href, 'print.php')]" "xpath_element" should exist
  38      And I follow "Printer-friendly version"
  39      And I should see "Just a test concept"
  40  
  41    @javascript
  42    Scenario: Printer-friendly glossary view disabled
  43      Given I add a "Glossary" to section "1" and I fill the form with:
  44        | Name | Test glossary name |
  45        | Description | Test glossary description |
  46        | Allow print view | No |
  47      And I log out
  48      And I log in as "student1"
  49      And I follow "Course 1"
  50      And I follow "Test glossary name"
  51      When I add a glossary entry with the following data:
  52        | Concept | Just a test concept |
  53        | Definition | Concept definition |
  54      Then "Printer-friendly version" "link" should not exist
  55      And "//*[contains(concat(' ', normalize-space(@class), ' '), ' printicon ')][contains(@href, 'print.php')]" "xpath_element" should not exist


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