|
| 1 | +@app @javascript @mod @mod_book |
| 2 | +Feature: Test single activity of book type in app |
| 3 | + In order to view a book while using the mobile app |
| 4 | + As a student |
| 5 | + I need single activity of book type functionality to work |
| 6 | + |
| 7 | + Background: |
| 8 | + Given the following "users" exist: |
| 9 | + | username | firstname | lastname | |
| 10 | + | student1 | First | Student | |
| 11 | + And the following "courses" exist: |
| 12 | + | fullname | shortname | category | format | activitytype | |
| 13 | + | Course 1 | C1 | 0 | singleactivity | book | |
| 14 | + And the following "course enrolments" exist: |
| 15 | + | user | course | role | |
| 16 | + | student1 | C1 | student | |
| 17 | + And the following "activity" exist: |
| 18 | + | activity | name | intro | course | idnumber | numbering | section | |
| 19 | + | book | Single activity book | Test book description | C1 | 1 | 1 | 0 | |
| 20 | + And the following "mod_book > chapter" exist: |
| 21 | + | book | title | content | subchapter | hidden | pagenum | |
| 22 | + | Single activity book | Chapt 1 | This is the first chapter | 0 | 0 | 1 | |
| 23 | + | Single activity book | Chapt 2 | This is the second chapter | 0 | 0 | 1 | |
| 24 | + | Single activity book | Chapt 3 | This is the third chapter | 0 | 0 | 1 | |
| 25 | + |
| 26 | + Scenario: Single activity book |
| 27 | + Given I entered the course "Course 1" as "student1" in the app |
| 28 | + Then I should find "Chapt 1" in the app |
| 29 | + And I should find "Chapt 2" in the app |
| 30 | + And I press "Chapt 1" in the app |
| 31 | + Then I should find "Chapt 1" in the app |
| 32 | + And I should find "This is the first chapter" in the app |
| 33 | + But I should not find "This is the second chapter" in the app |
0 commit comments