mirror of
https://github.com/moodle/moodle.git
synced 2025-01-18 22:08:20 +01:00
Merge branch 'MDL-38957_master' of git://github.com/dmonllao/moodle
This commit is contained in:
commit
c51e1fa37e
53
question/tests/behat/sort_questions.feature
Normal file
53
question/tests/behat/sort_questions.feature
Normal file
@ -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"
|
Loading…
x
Reference in New Issue
Block a user