-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Added back add.feature to behat tests
- Loading branch information
1 parent
ac0fb47
commit dc536c8
Showing
1 changed file
with
66 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,66 @@ | ||
@qtype @qtype_aitext @qtype_aitext_add | ||
Feature: Test creating an AIText question | ||
As a teacher | ||
In order to test my students | ||
I need to be able to create an aitext question | ||
|
||
Background: | ||
|
||
Given the following "users" exist: | ||
| username | | ||
| teacher | | ||
And the following "courses" exist: | ||
| fullname | shortname | category | | ||
| Course 1 | C1 | 0 | | ||
And the following "course enrolments" exist: | ||
| user | course | role | | ||
| 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' | ||
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 | | ||
| Response format | HTML editor | | ||
| AI Prompt | Evaluate this | | ||
| Mark scheme | Give one mark if correct | | ||
|
||
Then I should see "aitext-001" | ||
|
||
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 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 | | ||
| AI Prompt | Evaluate this | | ||
| Mark scheme | Give one mark if correct | | ||
| id_sampleanswer | sample answer | | ||
| Model | gpt-4 | | ||
|
||
|
||
|
||
Then I should see "aitext-002" | ||
@javascript | ||
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-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 | |