Feature: Display and choose from the available activities in course
Inordertoaddactivitiestoacourse
Asateacher
I shouldbeenabledtochoosefromalistofavailableactivitiesandalsobeingabletoreadtheirsummaries.
Background:
Given thefollowing"users"exist:
|username |firstname |lastname |email |
|teacher |Teacher |1 |teacher@example.com |
And thefollowing"courses"exist:
|fullname |shortname |format |
|Course |C |topics |
And thefollowing"courseenrolments"exist:
|user |course |role |
|teacher |C |editingteacher |
And Iloginas"teacher"
And Iamon"Course"coursehomepagewitheditingmodeon
Scenario: The available activities are displayed to the teacher in the activity chooser
Given Iclickon"Addanactivityorresource""button"inthe"Topic1""section"
Then Ishouldsee"Addanactivityorresource"inthe".modal-title""css_element"
And Ishouldsee"Assignment"inthe".modal-body""css_element"
Scenario: The teacher can choose to add an activity from the activity items in the activity chooser
Given Iclickon"Addanactivityorresource""button"inthe"Topic3""section"
When Iclickon"AddanewAssignment""link"inthe"Addanactivityorresource""dialogue"
Then Ishouldsee"AddinganewAssignment"
And Isetthefollowingfieldstothesevalues:
|Assignmentname |TestAssignmentTopic3 |
And Ipress"Saveandreturntocourse"
Then Ishouldsee"TestAssignmentTopic3"inthe"Topic3""section"
Scenario: The teacher can choose to add an activity from the activity summary in the activity chooser
Given Iclickon"Addanactivityorresource""button"inthe"Topic1""section"
When Iclickon"InformationabouttheAssignmentactivity""button"inthe"Addanactivityorresource""dialogue"
When Iclickon"AddanewAssignment""link"inthe"help""core_course>Activitychooserscreen"
Then Ishouldsee"AddinganewAssignment"
Scenario: Show summary
Given Iclickon"Addanactivityorresource""button"inthe"Topic1""section"
When Iclickon"InformationabouttheAssignmentactivity""button"inthe"Addanactivityorresource""dialogue"
Then Ishouldsee"Assignment"inthe"help""core_course>Activitychooserscreen"
And Ishouldsee"Theassignmentactivitymoduleenablesateachertocommunicatetasks,collectworkandprovidegradesandfeedback."
Scenario: Hide summary
Given Iclickon"Addanactivityorresource""button"inthe"Topic1""section"
When Iclickon"InformationabouttheAssignmentactivity""button"inthe"modules""core_course>Activitychooserscreen"
And Ishouldsee"Theassignmentactivitymoduleenablesateachertocommunicatetasks,collectworkandprovidegradesandfeedback."inthe"help""core_course>Activitychooserscreen"
And Ishouldsee"Back"inthe"help""core_course>Activitychooserscreen"
When Iclickon"Back""button"inthe"help""core_course>Activitychooserscreen"
Then "modules""core_course>Activitychooserscreen"shouldexist
And "help""core_course>Activitychooserscreen"shouldnotexist
And "Back""button"shouldnotexistinthe"modules""core_course>Activitychooserscreen"
And Ishouldnotsee"Theassignmentactivitymoduleenablesateachertocommunicatetasks,collectworkandprovidegradesandfeedback."inthe"Addanactivityorresource""dialogue"