Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
moodle
moodle
Commits
b5bce42c
Commit
b5bce42c
authored
Feb 05, 2019
by
Mihail Geshoski
Browse files
MDL-50793 mod_book: Update behat tests
parent
0e1e1e55
Changes
1
Hide whitespace changes
Inline
Side-by-side
mod/book/tests/behat/show_hide_chapters.feature
View file @
b5bce42c
...
...
@@ -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"
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment