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
978fa462
Commit
978fa462
authored
Nov 28, 2014
by
Ankit Agarwal
Browse files
MDL-45430 mod_book: Automate MDLQA-2428
This test verifies that an admin can generate and view all the book log entries
parent
d87bcfb3
Changes
1
Hide whitespace changes
Inline
Side-by-side
mod/book/tests/behat/log_entries.feature
0 → 100644
View file @
978fa462
@mod
@mod_book
Feature
:
In a book, verify log entries
In order to create log entries
As an admin
I need to perform various actions in a book.
@javascript
Scenario
:
perform various book actions and verify log entries.
Given the following "courses" exist
:
|
fullname
|
shortname
|
category
|
groupmode
|
|
Course
1
|
C1
|
0
|
1
|
And
I log in as
"admin"
And
I follow
"Course 1"
And
I turn editing mode on
When I add a "Book" to section "1" and I fill the form with
:
|
Name
|
Test
book
|
|
Description
|
A
book
about
dreams!
|
And
I follow
"Test book"
And I set the following fields to these values
:
|
Chapter
title
|
First
chapter
|
|
Content
|
First
chapter
|
And
I press
"Save changes"
And
I click on
"Add new chapter"
"link"
in the
"Table of contents"
"block"
And I set the following fields to these values
:
|
Chapter
title
|
Second
chapter
|
|
Content
|
Second
chapter
|
And
I press
"Save changes"
And
I click on
"Edit"
"link"
in the
"Table of contents"
"block"
And I set the following fields to these values
:
|
Chapter
title
|
First
chapter
edited
|
|
Content
|
First
chapter
edited
|
And
I press
"Save changes"
And
I click on
"Next"
"link"
And
I click on
"Previous"
"link"
And
I click on
"Print book"
"link"
in the
"Administration"
"block"
And
I click on
"Generate IMS CP"
"link"
in the
"Administration"
"block"
And
I click on
"Logs"
"link"
in the
"Administration"
"block"
Then
I should see
"Book exported"
And
I should see
"Book printed"
And
I should see
"Chapter viewed"
in the
"#report_log_r2_c5"
"css_element"
And
I should see
"Chapter viewed"
in the
"#report_log_r3_c5"
"css_element"
And
I should see
"Chapter viewed"
in the
"#report_log_r4_c5"
"css_element"
And
I should see
"Chapter updated"
in the
"#report_log_r5_c5"
"css_element"
And
I should see
"Chapter viewed"
in the
"#report_log_r6_c5"
"css_element"
And
I should see
"Chapter created"
in the
"#report_log_r7_c5"
"css_element"
And
I should see
"Chapter created"
in the
"#report_log_r9_c5"
"css_element"
And
I click on
"Chapter viewed"
"link"
in the
"#report_log_r2_c5"
"css_element"
And
I switch to
"action"
window
And
I should see
"1 First chapter edited"
in the
".book_content"
"css_element"
And
I switch to the main window
And
I click on
"Chapter viewed"
"link"
in the
"#report_log_r3_c5"
"css_element"
And
I switch to
"action"
window
And
I should see
"2 Second chapter"
in the
".book_content"
"css_element"
And
I switch to the main window
And
I click on
"Chapter updated"
"link"
in the
"#report_log_r5_c5"
"css_element"
And
I switch to
"action"
window
And
I should see
"1 First chapter edited"
in the
".book_content"
"css_element"
And
I switch to the main window
And
I click on
"Chapter created"
"link"
in the
"#report_log_r7_c5"
"css_element"
And
I switch to
"action"
window
And
I should see
"2 Second chapter"
in the
".book_content"
"css_element"
And
I switch to the main window
And
I click on
"Chapter created"
"link"
in the
"#report_log_r9_c5"
"css_element"
And
I switch to
"action"
window
And
I should see
"1 First chapter edited"
in the
".book_content"
"css_element"
And
I switch to the main window
\ No newline at end of file
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