Skip to content

Commit 9a0454a

Browse files
committed
noticket/greenify_behat2
1 parent 2af4d1e commit 9a0454a

File tree

2 files changed

+11
-8
lines changed

2 files changed

+11
-8
lines changed

tests/behat/adminsetting_studycodefield.feature

+6-5
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,8 @@ Feature: Within a moodle instance, an administrator should be able to set the va
44
As an admin
55
I need to default values for offline quiz settings.
66

7-
@javascript
8-
Scenario: Switch as an admin to the adminsettings of the module offlinequiz and change
9-
the value of "Print study code field on question sheet". Then login as a teacher and add a new offline quiz to
10-
a course and check whether the default value has changed.
7+
8+
Background:
119
Given the following "users" exist:
1210
| username | firstname | lastname | email |
1311
| teacher1 | Teacher | 1 | teacher1@example.com |
@@ -17,7 +15,10 @@ Feature: Within a moodle instance, an administrator should be able to set the va
1715
And the following "course enrolments" exist:
1816
| user | course | role |
1917
| teacher1 | C1 | editingteacher |
20-
And I log in as "admin"
18+
19+
@javascript
20+
Scenario: Switch as an admin to the adminsettings of the module offlinequiz and change the value of "Print study code field on question sheet". Then login as a teacher and add a new offline quiz to a course and check whether the default value has changed.
21+
Given I log in as "admin"
2122
And I navigate to "Plugins > Activity modules > Offline Quiz" in site administration
2223
And I set the field "Print study code field on question sheet" to "1"
2324
And I press "Save changes"

tests/behat/instance_setting_tutorial.feature

+5-3
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,10 @@
1-
@mod @mod_offlinequiz @settings_tutorial
1+
@mod @mod_offlinequiz @settings_tutorial @amc
22
Feature: Within a moodle instance, a teacher should be able to show an offline quiz tutorial for students.
33
In order to show an offline quiz tutorial at an offline quiz
44
As a teacher
55
I need to be able to set this value via the settings.
66

7-
@javascript
8-
Scenario: Login as a teacher, add a new offline quiz to a course and set the value to show an offline quiz tutorial. Then log in as a student and check if the tutorial is shown.
7+
Background:
98
Given the following "users" exist:
109
| username | firstname | lastname | email |
1110
| teacher1 | Teacher | 1 | teacher1@example.com |
@@ -17,6 +16,9 @@ Feature: Within a moodle instance, a teacher should be able to show an offline q
1716
| user | course | role |
1817
| teacher1 | C1 | editingteacher |
1918
| student1 | C1 | student |
19+
20+
@javascript
21+
Scenario: Login as a teacher, add a new offline quiz to a course and set the value to show an offline quiz tutorial. Then log in as a student and check if the tutorial is shown.
2022
When I log in as "teacher1"
2123
And I am on "Course 1" course homepage
2224
And I turn editing mode on

0 commit comments

Comments
 (0)