Skip to content

Commit

Permalink
Set workflows to test against Moodle 4.4 to see if behat will work
Browse files Browse the repository at this point in the history
  • Loading branch information
marcusgreen committed Jan 5, 2025
1 parent 82bc99d commit 1c56c6d
Show file tree
Hide file tree
Showing 2 changed files with 32 additions and 12 deletions.
6 changes: 3 additions & 3 deletions .github/workflows/moodle-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,8 +33,8 @@ jobs:
# - php: '8.2'
# moodle-branch: 'MOODLE_402_STABLE'
# database: 'mariadb'
- php: '8.3'
moodle-branch: 'MOODLE_405_STABLE'
- php: '8.2'
moodle-branch: 'MOODLE_404_STABLE'
database: 'pgsql'
steps:
- name: Checkout
Expand Down Expand Up @@ -110,4 +110,4 @@ jobs:

- name: Behat features
if: ${{ always() }}
run: moodle-plugin-ci behat --profile chrome
run: moodle-plugin-ci behat --profile chrome
38 changes: 29 additions & 9 deletions tests/behat/add.feature
Original file line number Diff line number Diff line change
Expand Up @@ -17,18 +17,38 @@ Feature: Test creating an AIText question
| teacher | C1 | editingteacher |
And the following config values are set as admin:
| model | gpt-4,gpt-4o | tool_aiconnect |
@javascript
Scenario: Create an AI text question with Response format set to HTML editor
@javascript
Scenario: Create an AI text question
When I am on the "Course 1" "core_question > course question bank" page logged in as teacher
# id_sampleanswer because it is collapsed when the form is opened for editing.
And I add a "AI Text" question filling the form with:
| Question name | aitext-001 |
| Question text | Write an aitext with 500 words. |
| General feedback | This is general feedback |

Scenario: Create an AI Text question with Response format set to 'HTML editor with the file picker'
When I am on the "Course 1" "core_question > course question bank" page logged in as teacher
And I press "Create a new question ..."
And I set the field "AI Text" to "1"
And I press "Add"
And I set the following fields to these values:
| Question name | aitext-001 |
And I add a "AI Text" question filling the form with:
| Question name | aitext-002 |
| Question text | Write an aitext with 500 words. |
| General feedback | This is general feedback |
| Response format | HTML editor |
| AI Prompt | Evaluate this |
| Mark scheme | Give one mark if correct |
| id_sampleanswer | sample answer |
Scenario: Create an AI Text question for testing some default options
When I am on the "Course 1" "core_question > course question bank" page logged in as teacher
And I add a "AI Text" question filling the form with:
| Question name | aitext-003 |
| Question text | Write an aitext with 500 words. |
| General feedback | This is general feedback |
| id_responsefieldlines | 15 |
| id_sampleanswer | sample answer |
| Model | gpt-4o |

Then I should see "aitext-001"
Then I should see "aitext-003"
# Checking that the next new question form displays user preferences settings.
And I press "Create a new question ..."
And I set the field "item_qtype_aitext" to "1"
And I click on "Add" "button" in the "Choose a question type to add" "dialogue"
And the following fields match these values:
| id_responsefieldlines | 15 |

0 comments on commit 1c56c6d

Please sign in to comment.