mirrored from git://git.moodle.org/moodle.git
-
Notifications
You must be signed in to change notification settings - Fork 6.6k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'MDL-38957_master' of git://github.com/dmonllao/moodle
- Loading branch information
Showing
1 changed file
with
53 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,53 @@ | ||
@core_question | ||
Feature: A teacher can sort questions in the question bank | ||
In order to order the question bank's questions | ||
As a teacher | ||
I need to sort the questions list using different sort orders | ||
|
||
@javascript | ||
Scenario: Sort using question name, question type and created by sort order links | ||
Given the following "users" exists: | ||
| username | firstname | lastname | email | | ||
| teacher1 | Teacher | 1 | teacher1@asd.com | | ||
And the following "courses" exists: | ||
| fullname | shortname | format | | ||
| Course 1 | C1 | weeks | | ||
And the following "course enrolments" exists: | ||
| user | course | role | | ||
| teacher1 | C1 | editingteacher | | ||
And I log in as "admin" | ||
And I follow "Course 1" | ||
And I add a "Essay" question filling the form with: | ||
| Question name | A question 1 name | | ||
| Question text | A question 1 text | | ||
And I log out | ||
And I log in as "teacher1" | ||
And I follow "Course 1" | ||
And I add a "Essay" question filling the form with: | ||
| Question name | B question 2 name | | ||
| Question text | B question 2 text | | ||
And I add a "Numerical" question filling the form with: | ||
| Question name | C question 3 name | | ||
| Question text | C question 3 text | | ||
| answer[0] | 2 | | ||
| fraction[0] | 100% | | ||
| answer[1] | 1 | | ||
| fraction[1] | None | | ||
When I follow "Sort by Question ascending" | ||
Then "A question 1 name" "checkbox" should appear before "B question 2 name" "checkbox" | ||
And "B question 2 name" "checkbox" should appear before "C question 3 name" "checkbox" | ||
And I follow "Sort by Question descending" | ||
And "C question 3 name" "checkbox" should appear before "B question 2 name" "checkbox" | ||
And "B question 2 name" "checkbox" should appear before "A question 1 name" "checkbox" | ||
And I follow "Sort by Question type ascending" | ||
And "A question 1 name" "checkbox" should appear before "C question 3 name" "checkbox" | ||
And I follow "Sort by Question type descending" | ||
And "C question 3 name" "checkbox" should appear before "A question 1 name" "checkbox" | ||
And I follow "Sort by First name ascending" | ||
And "A question 1 name" "checkbox" should appear before "B question 2 name" "checkbox" | ||
And I follow "Sort by First name descending" | ||
And "B question 2 name" "checkbox" should appear before "A question 1 name" "checkbox" | ||
And I click on "Show question text in the question list" "checkbox" | ||
And I should see "A question 1 text" | ||
And I should see "B question 2 text" | ||
And I should see "C question 3 text" |