MDL-69068 behat: Allow singular, pivotted data generators
authorAndrew Nicols <andrew@nicols.co.uk>
Tue, 16 Jun 2020 04:34:52 +0000 (12:34 +0800)
committerAndrew Nicols <andrew@nicols.co.uk>
Wed, 15 Jul 2020 07:27:31 +0000 (15:27 +0800)
blocks/glossary_random/tests/behat/glossary_random_global.feature
question/type/multichoice/tests/behat/clearanswers.feature

index 3329702..e422d38 100644 (file)
@@ -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 |
index 3f78277..83effee 100644 (file)
@@ -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    |