Commit b5bce42c authored by Mihail Geshoski's avatar Mihail Geshoski
Browse files

MDL-50793 mod_book: Update behat tests

parent 0e1e1e55
......@@ -11,9 +11,11 @@ Feature: Book activity chapter visibility management
And the following "users" exist:
| username | firstname | lastname | email |
| teacher1 | Teacher | 1 | teacher1@example.com |
| student1 | Student | 2 | student1@example.com |
And the following "course enrolments" exist:
| user | course | role |
| teacher1 | C1 | editingteacher |
| student1 | C1 | student |
And I log in as "teacher1"
And I am on "Course 1" course homepage with editing mode on
And I add a "Book" to section "1" and I fill the form with:
......@@ -54,8 +56,8 @@ Feature: Book activity chapter visibility management
And I turn editing mode off
And I am on "Course 1" course homepage
And I follow "Test book"
Then I should not see "Second chapter" in the "Table of contents" "block"
And I should not see "Third chapter" in the "Table of contents" "block"
Then the "class" attribute of "a[title='Second chapter']" "css_element" should contain "dimmed_text"
And the "class" attribute of "a[title='Third chapter']" "css_element" should contain "dimmed_text"
And I follow "Next"
And I should see "Fourth chapter" in the ".book_content" "css_element"
And I follow "Exit book"
......@@ -72,3 +74,9 @@ Feature: Book activity chapter visibility management
And I follow "Next"
And I should see "Fourth chapter" in the ".book_content" "css_element"
And I follow "Exit book"
And I log out
And I log in as "student1"
And I am on "Course 1" course homepage
And I follow "Test book"
And I should not see "Second chapter" in the "Table of contents" "block"
And I should not see "Third chapter" in the "Table of contents" "block"
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment