[ Index ]

PHP Cross Reference of Unnamed Project

title

Body

[close]

/blocks/course_overview/tests/behat/ -> quiz_overview.feature (source)

   1  @block @block_course_overview @mod_quiz
   2  Feature: View the quiz being due
   3    In order to know what quizzes are due
   4    As a student
   5    I can visit my dashboard
   6  
   7    Background:
   8      Given the following "users" exist:
   9        | username | firstname | lastname | email |
  10        | student1 | Student | 1 | student1@example.com |
  11        | student2 | Student | 2 | student2@example.com |
  12        | teacher1 | Teacher | 1 | teacher1@example.com |
  13      And the following "courses" exist:
  14        | fullname | shortname |
  15        | Course 1 | C1        |
  16        | Course 2 | C2        |
  17      And the following "course enrolments" exist:
  18        | user     | course | role           |
  19        | student1 | C1     | student        |
  20        | student2 | C2     | student        |
  21        | teacher1 | C1     | editingteacher |
  22        | teacher1 | C2     | editingteacher |
  23      And the following "activities" exist:
  24        | activity | course | idnumber | name                    | timeclose  |
  25        | quiz     | C1     | Q1A      | Quiz 1A No deadline     | 0          |
  26        | quiz     | C1     | Q1B      | Quiz 1B Past deadline   | 1337       |
  27        | quiz     | C1     | Q1C      | Quiz 1C Future deadline | 9000000000 |
  28        | quiz     | C1     | Q1D      | Quiz 1D Future deadline | 9000000000 |
  29        | quiz     | C1     | Q1E      | Quiz 1E Future deadline | 9000000000 |
  30        | quiz     | C2     | Q2A      | Quiz 2A Future deadline | 9000000000 |
  31      And the following "question categories" exist:
  32        | contextlevel | reference | name           |
  33        | Course       | C1        | Test questions |
  34      And the following "questions" exist:
  35        | qtype     | name           | questiontext              | questioncategory |
  36        | truefalse | First question | Answer the first question | Test questions   |
  37      And quiz "Quiz 1A No deadline" contains the following questions:
  38        | question       | page |
  39        | First question | 1    |
  40      And quiz "Quiz 1B Past deadline" contains the following questions:
  41        | question       | page |
  42        | First question | 1    |
  43      And quiz "Quiz 1C Future deadline" contains the following questions:
  44        | question       | page |
  45        | First question | 1    |
  46      And quiz "Quiz 1D Future deadline" contains the following questions:
  47        | question       | page |
  48        | First question | 1    |
  49      And quiz "Quiz 1E Future deadline" contains the following questions:
  50        | question       | page |
  51        | First question | 1    |
  52      And quiz "Quiz 2A Future deadline" contains the following questions:
  53        | question       | page |
  54        | First question | 1    |
  55  
  56    Scenario: View my quizzes that are due
  57      Given I log in as "student1"
  58      When I am on homepage
  59      Then I should see "You have quizzes that are due" in the "Course overview" "block"
  60      And I should see "Quiz 1C Future deadline" in the "Course overview" "block"
  61      And I should see "Quiz 1D Future deadline" in the "Course overview" "block"
  62      And I should see "Quiz 1E Future deadline" in the "Course overview" "block"
  63      And I should not see "Quiz 1A No deadline" in the "Course overview" "block"
  64      And I should not see "Quiz 1B Past deadline" in the "Course overview" "block"
  65      And I should not see "Quiz 2A Future deadline" in the "Course overview" "block"
  66      And I log out
  67      And I log in as "student2"
  68      And I should see "You have quizzes that are due" in the "Course overview" "block"
  69      And I should not see "Quiz 1C Future deadline" in the "Course overview" "block"
  70      And I should not see "Quiz 1D Future deadline" in the "Course overview" "block"
  71      And I should not see "Quiz 1E Future deadline" in the "Course overview" "block"
  72      And I should not see "Quiz 1A No deadline" in the "Course overview" "block"
  73      And I should not see "Quiz 1B Past deadline" in the "Course overview" "block"
  74      And I should see "Quiz 2A Future deadline" in the "Course overview" "block"
  75  
  76    Scenario: View my quizzes that are due and never finished
  77      Given I log in as "student1"
  78      And I follow "Course 1"
  79      And I follow "Quiz 1D Future deadline"
  80      And I press "Attempt quiz now"
  81      And I follow "Finish attempt ..."
  82      And I press "Submit all and finish"
  83      And I follow "Course 1"
  84      And I follow "Quiz 1E Future deadline"
  85      And I press "Attempt quiz now"
  86      When I am on homepage
  87      Then I should see "You have quizzes that are due" in the "Course overview" "block"
  88      And I should see "Quiz 1C Future deadline" in the "Course overview" "block"
  89      And I should see "Quiz 1E Future deadline" in the "Course overview" "block"
  90      And I should not see "Quiz 1A No deadline" in the "Course overview" "block"
  91      And I should not see "Quiz 1B Past deadline" in the "Course overview" "block"
  92      And I should not see "Quiz 1D Future deadline" in the "Course overview" "block"
  93      And I should not see "Quiz 2A Future deadline" in the "Course overview" "block"
  94  


Generated: Thu Aug 11 10:00:09 2016 Cross-referenced by PHPXref 0.7.1