Skip to content

Commit

Permalink
MDL-69068 behat: Allow singular, pivotted data generators
Browse files Browse the repository at this point in the history
  • Loading branch information
andrewnicols committed Jul 15, 2020
1 parent b49cb92 commit 45871ec
Show file tree
Hide file tree
Showing 2 changed files with 30 additions and 15 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,14 @@ Feature: Random glossary entry block linking to global glossary
| fullname | shortname |
| Course 1 | C1 |
| Course 2 | C2 |
And the following "activities" exist:
| activity | name | intro | course | idnumber | globalglossary | defaultapproval |
| glossary | Tips and Tricks | Frontpage glossary description | C2 | glossary0 | 1 | 1 |
And the following "activity" exists:
| activity | glossary |
| name | Tips and Tricks |
| intro | Frontpage glossary description |
| course | C2 |
| idnumber | glossary0 |
| globalglossary | 1 |
| defaultapproval | 1 |
And the following "users" exist:
| username | firstname | lastname | email |
| student1 | Sam1 | Student1 | student1@example.com |
Expand Down
34 changes: 22 additions & 12 deletions question/type/multichoice/tests/behat/clearanswers.feature
Original file line number Diff line number Diff line change
Expand Up @@ -8,21 +8,31 @@ Feature: Clear my answers
Given the following "users" exist:
| username | firstname | lastname | email |
| student1 | S1 | Student1 | student1@moodle.com |
And the following "courses" exist:
| fullname | shortname | category |
| Course 1 | C1 | 0 |
And the following "course" exists:
| fullname | Course 1 |
| shortname | C1 |
| category | 0 |
And the following "course enrolments" exist:
| user | course | role |
| student1 | C1 | student |
And the following "question categories" exist:
| contextlevel | reference | name |
| Course | C1 | Test questions |
And the following "questions" exist:
| questioncategory | qtype | name | template | questiontext |
| Test questions | multichoice | Multi-choice-001 | one_of_four | Question One |
And the following "activities" exist:
| activity | name | intro | course | idnumber | preferredbehaviour | canredoquestions |
| quiz | Quiz 1 | Quiz 1 description | C1 | quiz1 | immediatefeedback | 1 |
And the following "question category" exists:
| contextlevel | Course |
| reference | C1 |
| name | Test questions |
And the following "question" exists:
| questioncategory | Test questions |
| qtype | multichoice |
| name | Multi-choice-001 |
| template | one_of_four |
| questiontext | Question One |
And the following "activity" exists:
| activity | quiz |
| name | Quiz 1 |
| intro | Quiz 1 description |
| course | C1 |
| idnumber | quiz1 |
| preferredbehaviour | immediatefeedback |
| canredoquestions | 1 |
And quiz "Quiz 1" contains the following questions:
| question | page |
| Multi-choice-001 | 1 |
Expand Down

0 comments on commit 45871ec

Please sign in to comment.