Rev 1 | AutorÃa | Comparar con el anterior | Ultima modificación | Ver Log |
@tool @tool_usertoursFeature: Apply content type to a tourIn order to give more content to a tourAs an administratorI need to change the content type of the user tourBackground:Given I log in as "admin"And I add a new user tour with:| Name | First tour || Description | My first tour || Apply to URL match | /my/% || Tour is enabled | 1 |And I add a new user tour with:| Name | tour_activityinfo_activity_student_title,tool_usertours || Description | tour_activityinfo_activity_student_content,tool_usertours || Apply to URL match | /my/% || Tour is enabled | 0 |@javascriptScenario: User can choose the the content type of the tour stepGiven I open the User tour settings pageAnd I click on "View" "link" in the "My first tour" "table_row"When I click on "New step" "link"Then "Content type" "select" should existAnd the "Content type" select box should contain "Language string ID"And the "Content type" select box should contain "Manual"And I select "Language string ID" from the "Content type" singleselectAnd I should see " Language string ID"And I should not see "Content" in the "#fitem_id_content" "css_element"And I select "Manual" from the "Content type" singleselectAnd I should see "Content" in the "#fitem_id_content" "css_element"And I should not see "Language string ID" in the "#fitem_id_contentlangstring" "css_element"@javascriptScenario: Create a new step with Moodle Language content typeGiven I open the User tour settings pageAnd I click on "View" "link" in the "My first tour" "table_row"And I click on "New step" "link"And I set the field "Title" to "tour_activityinfo_course_teacher_title,tool_usertours"And I select "Language string ID" from the "Content type" singleselectAnd I set the field "Language string ID" to "tour_activityinfo_course_teacher_content_abc,tool_usertours"When I press "Save changes"Then I should see "Invalid language string ID"And I set the field "Language string ID" to "tour_activityinfo_course_teacher_content,tool_usertours"And I press "Save changes"And I should see "New: Activity information"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."And I click on "Edit" "link" in the "New: Activity information" "table_row"And I should see "Editing \"New: Activity information\""And the field "Title" matches value "tour_activityinfo_course_teacher_title,tool_usertours"And the field "Language string ID" matches value "tour_activityinfo_course_teacher_content,tool_usertours"@javascriptScenario: Create a new step with manual content typeGiven I open the User tour settings pageAnd I click on "View" "link" in the "My first tour" "table_row"And I click on "New step" "link"And I set the field "Title" to "tour_activityinfo_course_teacher_title,tool_usertours"And I select "Manual" from the "Content type" singleselectAnd I set the field "id_content" to "<p><strong>Test content</strong></p>"And I press "Save changes"And I should see "New: Activity information"And I should see "Test content"And I click on "Edit" "link" in the "New: Activity information" "table_row"And I should see "Editing \"New: Activity information\""And I should not see "Language string ID" in the "#fitem_id_contentlangstring" "css_element"And the field "Title" matches value "tour_activityinfo_course_teacher_title,tool_usertours"And the field "id_content" matches value "<p><strong>Test content</strong></p>"@javascriptScenario: Tour name and description can be translatableGiven I open the User tour settings pageAnd I should see "New: Activity information"And I should see "Activity dates plus what to do to complete the activity are shown on the activity page."When I click on "View" "link" in the "New: Activity information" "table_row"Then I should see "New: Activity information"And I should see "This is the 'New: Activity information' tour. It applies to the path '/my/%'."And I click on "edit the tour defaults" "link"And I should see "New: Activity information"And the field "Name" matches value "tour_activityinfo_activity_student_title,tool_usertours"And the field "Description" matches value "tour_activityinfo_activity_student_content,tool_usertours"