[ Index ] |
PHP Cross Reference of Unnamed Project |
[Summary view] [Print] [Text view]
1 @mod @mod_book 2 Feature: Book activity chapter visibility management 3 In order to properly manage chapters in a book activity 4 As a teacher 5 I need to be able to show or hide chapters. 6 7 Background: 8 Given the following "courses" exist: 9 | fullname | shortname | category | groupmode | 10 | Course 1 | C1 | 0 | 1 | 11 And the following "users" exist: 12 | username | firstname | lastname | email | 13 | teacher1 | Teacher | 1 | teacher1@example.com | 14 And the following "course enrolments" exist: 15 | user | course | role | 16 | teacher1 | C1 | editingteacher | 17 And I log in as "teacher1" 18 And I follow "Course 1" 19 And I turn editing mode on 20 And I add a "Book" to section "1" and I fill the form with: 21 | Name | Test book | 22 | Description | A book about dreams! | 23 And I follow "Test book" 24 And I set the following fields to these values: 25 | Chapter title | First chapter | 26 | Content | First chapter | 27 And I press "Save changes" 28 And I click on "a[href*='pagenum=1']" "css_element" 29 And I set the following fields to these values: 30 | Chapter title | Second chapter | 31 | Content | Second chapter | 32 And I press "Save changes" 33 And I click on "a[href*='pagenum=2']" "css_element" 34 And I set the following fields to these values: 35 | Chapter title | Sub chapter | 36 | subchapter | 1 | 37 | Content | Sub chapter | 38 And I press "Save changes" 39 And I click on "a[href*='pagenum=3']" "css_element" 40 And I set the following fields to these values: 41 | Chapter title | Third chapter | 42 | subchapter | 0 | 43 | Content | Third chapter | 44 And I press "Save changes" 45 And I click on "a[href*='pagenum=4']" "css_element" 46 And I set the following fields to these values: 47 | Chapter title | Fourth chapter | 48 | Content | Fourth chapter | 49 And I press "Save changes" 50 51 @javascript 52 Scenario: Show/hide chapters and subchapters 53 When I follow "Hide chapter \"2 Second chapter\"" 54 And I follow "Hide chapter \"2 Third chapter\"" 55 And I follow "Turn editing off" 56 And I am on homepage 57 And I follow "Course 1" 58 And I follow "Test book" 59 Then I should not see "Second chapter" in the "Table of contents" "block" 60 And I should not see "Third chapter" in the "Table of contents" "block" 61 And I follow "Next" 62 And I should see "Fourth chapter" in the ".book_content" "css_element" 63 And I follow "Exit book" 64 And I follow "Test book" 65 And I should see "First chapter" in the ".book_content" "css_element" 66 And I follow "Turn editing on" 67 And I follow "Next" 68 And I should see "Second chapter" in the ".book_content" "css_element" 69 And I should not see "Exit book" 70 And I follow "Next" 71 And I should see "Sub chapter" in the ".book_content" "css_element" 72 And I follow "Next" 73 And I should see "Third chapter" in the ".book_content" "css_element" 74 And I follow "Next" 75 And I should see "Fourth chapter" in the ".book_content" "css_element" 76 And I follow "Exit book" 77
title
Description
Body
title
Description
Body
title
Description
Body
title
Body
Generated: Thu Aug 11 10:00:09 2016 | Cross-referenced by PHPXref 0.7.1 |