Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions .github/workflows/behat.yml
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,8 @@ jobs:
php: '7.4'
- moodle-branch: 'main'
php: '8.0'
- moodle-branch: 'main'
php: '8.1'
include:
- php: '8.2'
moodle-branch: 'MOODLE_402_STABLE'
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/checks.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ jobs:
strategy:
fail-fast: false
matrix:
php: ['8.1', '8.2']
php: ['8.1', '8.2', '8.3']

steps:
- name: Check out repository code
Expand Down Expand Up @@ -52,7 +52,7 @@ jobs:
moodle-plugin-ci install --plugin ./plugin --db-host=127.0.0.1
env:
DB: mariadb
MOODLE_BRANCH: 'main'
MOODLE_BRANCH: ${{ matrix.php == '8.1' && 'MOODLE_404_STABLE' || 'main'}}

- name: PHP Lint
if: ${{ always() }}
Expand Down
4 changes: 3 additions & 1 deletion .github/workflows/testing.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ jobs:

services:
postgres:
image: postgres:13
image: postgres:14
env:
POSTGRES_USER: 'postgres'
POSTGRES_HOST_AUTH_METHOD: 'trust'
Expand Down Expand Up @@ -55,6 +55,8 @@ jobs:
php: '7.4'
- moodle-branch: 'main'
php: '8.0'
- moodle-branch: 'main'
php: '8.1'
include:
- php: '7.4'
moodle-branch: 'MOODLE_39_STABLE'
Expand Down
22 changes: 10 additions & 12 deletions tests/behat/add.feature
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
@qtype @qtype_formulas
Feature: Test creating a Formulas question
As a teacher
In order to test my students
I need to be able to create a Formulas question
As a teacher
In order to test my students
I need to be able to create a Formulas question

Background:
Given the following "users" exist:
Expand All @@ -14,15 +14,13 @@ Feature: Test creating a Formulas question
And the following "course enrolments" exist:
| user | course | role |
| teacher1 | C1 | editingteacher |
And I log in as "teacher1"
And I am on "Course 1" course homepage
And I navigate to "Question bank" in current page administration

Scenario: Create a Formulas question
When I add a "Formulas" question filling the form with:
| Question name | formulas-001 |
| Question text | Minimal formula question |
| General feedback | The correct answer is 1 |
| id_answer_0 | 1 |
| id_answermark_0 | 1 |
When I am on the "Course 1" "core_question > course question bank" page logged in as teacher1
And I add a "Formulas" question filling the form with:
| Question name | formulas-001 |
| Question text | Minimal formula question |
| General feedback | The correct answer is 1 |
| id_answer_0 | 1 |
| id_answermark_0 | 1 |
Then I should see "formulas-001"
6 changes: 3 additions & 3 deletions tests/behat/backup_and_restore.feature
Original file line number Diff line number Diff line change
Expand Up @@ -22,15 +22,15 @@ Feature: Test duplicating a quiz containing a Formulas question
And the following config values are set as admin:
| enableasyncbackup | 0 |
And I log in as "admin"
And I am on "Course 1" course homepage

Scenario: Backup and restore a course containing an formulas question
When I backup "Course 1" course using this options:
| Confirmation | Filename | test_backup.mbz |
# Remove the question before restoring to make sure that there is only one instance.
And question "formulas-001" no longer exists in the database
And I restore "test_backup.mbz" backup into a new course using this options:
| Schema | Course name | Course 2 |
And I navigate to "Question bank" in current page administration
And I choose "Edit question" action for "formulas-001" in the question bank
And I am on the "formulas-001" "core_question > edit" page logged in as admin
Then the following fields match these values:
| Question name | formulas-001 |
| Question text | This question shows different display methods of the answer and unit box. |
Expand Down
3 changes: 0 additions & 3 deletions tests/behat/edit.feature
Original file line number Diff line number Diff line change
Expand Up @@ -20,9 +20,6 @@ Feature: Test editing a Formulas question
And the following "questions" exist:
| questioncategory | qtype | name | template |
| Test questions | formulas | formulas-001 for editing | testthreeparts |
And I log in as "teacher1"
And I am on "Course 1" course homepage
And I navigate to "Question bank" in current page administration

Scenario: Edit a Formulas question
When I am on the "formulas-001 for editing" "core_question > edit" page logged in as teacher1
Expand Down
Loading