From 45871ec48ebf6fc5d094d06787a6f4c9a3d0f54b Mon Sep 17 00:00:00 2001 From: Andrew Nicols Date: Tue, 16 Jun 2020 12:34:52 +0800 Subject: [PATCH] MDL-69068 behat: Allow singular, pivotted data generators --- .../behat/glossary_random_global.feature | 11 ++++-- .../tests/behat/clearanswers.feature | 34 ++++++++++++------- 2 files changed, 30 insertions(+), 15 deletions(-) diff --git a/blocks/glossary_random/tests/behat/glossary_random_global.feature b/blocks/glossary_random/tests/behat/glossary_random_global.feature index 3329702989366..e422d3816dd84 100644 --- a/blocks/glossary_random/tests/behat/glossary_random_global.feature +++ b/blocks/glossary_random/tests/behat/glossary_random_global.feature @@ -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 | diff --git a/question/type/multichoice/tests/behat/clearanswers.feature b/question/type/multichoice/tests/behat/clearanswers.feature index 3f782770d41e7..83effee95823f 100644 --- a/question/type/multichoice/tests/behat/clearanswers.feature +++ b/question/type/multichoice/tests/behat/clearanswers.feature @@ -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 |