1 |
efrain |
1 |
@tool @tool_usertours
|
|
|
2 |
Feature: Apply content type to a tour
|
|
|
3 |
In order to give more content to a tour
|
|
|
4 |
As an administrator
|
|
|
5 |
I need to change the content type of the user tour
|
|
|
6 |
|
|
|
7 |
Background:
|
|
|
8 |
Given I log in as "admin"
|
|
|
9 |
And I add a new user tour with:
|
|
|
10 |
| Name | First tour |
|
|
|
11 |
| Description | My first tour |
|
|
|
12 |
| Apply to URL match | /my/% |
|
|
|
13 |
| Tour is enabled | 1 |
|
|
|
14 |
And I add a new user tour with:
|
|
|
15 |
| Name | tour_activityinfo_activity_student_title,tool_usertours |
|
|
|
16 |
| Description | tour_activityinfo_activity_student_content,tool_usertours |
|
|
|
17 |
| Apply to URL match | /my/% |
|
|
|
18 |
| Tour is enabled | 0 |
|
|
|
19 |
|
|
|
20 |
@javascript
|
|
|
21 |
Scenario: User can choose the the content type of the tour step
|
|
|
22 |
Given I open the User tour settings page
|
|
|
23 |
And I click on "View" "link" in the "My first tour" "table_row"
|
|
|
24 |
When I click on "New step" "link"
|
|
|
25 |
Then "Content type" "select" should exist
|
|
|
26 |
And the "Content type" select box should contain "Language string ID"
|
|
|
27 |
And the "Content type" select box should contain "Manual"
|
|
|
28 |
And I select "Language string ID" from the "Content type" singleselect
|
|
|
29 |
And I should see " Language string ID"
|
11 |
efrain |
30 |
And I should not see "Content" in the "#fitem_id_content" "css_element"
|
1 |
efrain |
31 |
And I select "Manual" from the "Content type" singleselect
|
11 |
efrain |
32 |
And I should see "Content" in the "#fitem_id_content" "css_element"
|
1 |
efrain |
33 |
And I should not see "Language string ID" in the "#fitem_id_contentlangstring" "css_element"
|
|
|
34 |
|
|
|
35 |
@javascript
|
|
|
36 |
Scenario: Create a new step with Moodle Language content type
|
|
|
37 |
Given I open the User tour settings page
|
|
|
38 |
And I click on "View" "link" in the "My first tour" "table_row"
|
|
|
39 |
And I click on "New step" "link"
|
|
|
40 |
And I set the field "Title" to "tour_activityinfo_course_teacher_title,tool_usertours"
|
|
|
41 |
And I select "Language string ID" from the "Content type" singleselect
|
|
|
42 |
And I set the field "Language string ID" to "tour_activityinfo_course_teacher_content_abc,tool_usertours"
|
|
|
43 |
When I press "Save changes"
|
|
|
44 |
Then I should see "Invalid language string ID"
|
|
|
45 |
And I set the field "Language string ID" to "tour_activityinfo_course_teacher_content,tool_usertours"
|
|
|
46 |
And I press "Save changes"
|
|
|
47 |
And I should see "New: Activity information"
|
|
|
48 |
And I should see "New course settings 'Show completion conditions' and 'Show activity dates' enable you to choose whether activity completion conditions (if set) and/or dates are displayed for students on the course page."
|
|
|
49 |
And I click on "Edit" "link" in the "New: Activity information" "table_row"
|
|
|
50 |
And I should see "Editing \"New: Activity information\""
|
|
|
51 |
And the field "Title" matches value "tour_activityinfo_course_teacher_title,tool_usertours"
|
|
|
52 |
And the field "Language string ID" matches value "tour_activityinfo_course_teacher_content,tool_usertours"
|
|
|
53 |
|
|
|
54 |
@javascript
|
|
|
55 |
Scenario: Create a new step with manual content type
|
|
|
56 |
Given I open the User tour settings page
|
|
|
57 |
And I click on "View" "link" in the "My first tour" "table_row"
|
|
|
58 |
And I click on "New step" "link"
|
|
|
59 |
And I set the field "Title" to "tour_activityinfo_course_teacher_title,tool_usertours"
|
|
|
60 |
And I select "Manual" from the "Content type" singleselect
|
|
|
61 |
And I set the field "id_content" to "<p><strong>Test content</strong></p>"
|
|
|
62 |
And I press "Save changes"
|
|
|
63 |
And I should see "New: Activity information"
|
|
|
64 |
And I should see "Test content"
|
|
|
65 |
And I click on "Edit" "link" in the "New: Activity information" "table_row"
|
|
|
66 |
And I should see "Editing \"New: Activity information\""
|
|
|
67 |
And I should not see "Language string ID" in the "#fitem_id_contentlangstring" "css_element"
|
|
|
68 |
And the field "Title" matches value "tour_activityinfo_course_teacher_title,tool_usertours"
|
|
|
69 |
And the field "id_content" matches value "<p><strong>Test content</strong></p>"
|
|
|
70 |
|
|
|
71 |
@javascript
|
|
|
72 |
Scenario: Tour name and description can be translatable
|
|
|
73 |
Given I open the User tour settings page
|
|
|
74 |
And I should see "New: Activity information"
|
|
|
75 |
And I should see "Activity dates plus what to do to complete the activity are shown on the activity page."
|
|
|
76 |
When I click on "View" "link" in the "New: Activity information" "table_row"
|
|
|
77 |
Then I should see "New: Activity information"
|
|
|
78 |
And I should see "This is the 'New: Activity information' tour. It applies to the path '/my/%'."
|
|
|
79 |
And I click on "edit the tour defaults" "link"
|
|
|
80 |
And I should see "New: Activity information"
|
|
|
81 |
And the field "Name" matches value "tour_activityinfo_activity_student_title,tool_usertours"
|
|
|
82 |
And the field "Description" matches value "tour_activityinfo_activity_student_content,tool_usertours"
|