-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #17 from PhilippImhof/info-noattempts
Display notification if there are no attempts to show
- Loading branch information
Showing
2 changed files
with
55 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
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,51 @@ | ||
@mod @mod_quiz @quiz @quiz_archive @javascript | ||
Feature: Showing a message if there are no attempts to show | ||
If there are no attempts to show | ||
As a teacher | ||
I need to see a notification | ||
|
||
Background: | ||
Given the following "users" exist: | ||
| username | firstname | lastname | email | idnumber | | ||
| teacher1 | T1 | Teacher1 | teacher1@example.com | T1000 | | ||
| student1 | S1 | Student1 | student1@example.com | S1000 | | ||
And the following "courses" exist: | ||
| fullname | shortname | category | | ||
| Course 1 | C1 | 0 | | ||
And the following "course enrolments" exist: | ||
| user | course | role | | ||
| teacher1 | C1 | editingteacher | | ||
| student1 | C1 | student | | ||
And the following "question categories" exist: | ||
| contextlevel | reference | name | | ||
| Course | C1 | Test questions | | ||
And the following "activities" exist: | ||
| activity | name | intro | course | idnumber | | ||
| quiz | Quiz 1 | Quiz 1 description | C1 | quiz1 | | ||
And the following "questions" exist: | ||
| questioncategory | qtype | name | questiontext | | ||
| Test questions | truefalse | TF1 | First question | | ||
And quiz "Quiz 1" contains the following questions: | ||
| question | page | maxmark | | ||
| TF1 | 1 | | | ||
|
||
And I am on the "Quiz 1" "quiz_archive > Archive" page logged in as "teacher1" | ||
|
||
Scenario: Check handling of no attempts situation | ||
# Check if no attempt | ||
Then I should see "There are no attempts to show" | ||
|
||
# Add an attempt | ||
And I log in as "student1" | ||
And I am on "Course 1" course homepage | ||
And I follow "Quiz 1" | ||
And I press "Attempt quiz" | ||
And I click on "True" "radio" in the "First question" "question" | ||
And I press "Finish attempt ..." | ||
And I press "Submit all and finish" | ||
And I confirm the quiz submission in the modal dialog | ||
And I log out | ||
And I am on the "Quiz 1" "quiz_archive > Archive" page logged in as "teacher1" | ||
|
||
# Check that the message is gone | ||
Then I should not see "There are no attempts to show" |