Skip to content

Commit

Permalink
MDL-42347 course: Added behat test for deleting a course
Browse files Browse the repository at this point in the history
  • Loading branch information
marinaglancy committed Oct 16, 2013
1 parent 5c74090 commit 0446e65
Showing 1 changed file with 27 additions and 0 deletions.
27 changes: 27 additions & 0 deletions course/tests/behat/delete_course.feature
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
@core @core_course
Feature: Deleting a course
In order to delete a course
As a moodle admin
I need to be able to delete a course in management interface

@javascript
Scenario: Deleting a course from course category management interface
Given the following "courses" exists:
| fullname | shortname | idnumber |
| Course 1 | Course1 | C1 |
| Course 2 | Course2 | C2 |
And I log in as "admin"
When I expand "Site administration" node
And I expand "Courses" node
And I follow "Add/edit courses"
And I follow "Miscellaneous"
Then I should see "Course 2" in the "#movecourses" "css_element"
And I should see "Course 1" in the "#movecourses" "css_element"
And I click on "Delete" "link" in the "Course 1" "table_row"
And I should see "Are you absolutely sure you want to completely delete this course and all the data it contains?"
And I should see "Course 1 (Course1)"
And I press "Continue"
And I should see "Course1 has been completely deleted"
And I press "Continue"
And I should see "Course 2" in the "#movecourses" "css_element"
And I should not see "Course 1" in the "#movecourses" "css_element"

0 comments on commit 0446e65

Please sign in to comment.