Skip to content

Commit cedfd38

Browse files
Added the file question to behat test that creates all question types
1 parent ac76c8f commit cedfd38

File tree

2 files changed

+6
-1
lines changed

2 files changed

+6
-1
lines changed

tests/behat/add_questions.feature

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -99,4 +99,8 @@ Feature: Add questions to a questionnaire activity
9999
And I should see "Choose yes or no"
100100
And I set the field "id_type_id" to "----- Page Break -----"
101101
And I press "Add selected question type"
102+
And I add a "File" question and I fill the form with:
103+
| Question Name | Q10 |
104+
| Yes | Yes |
105+
| Question Text | Add a file as an answer |
102106
Then I should see "[----- Page Break -----]"

tests/behat/behat_mod_questionnaire.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,8 @@ public function i_add_a_question_and_i_fill_the_form_with($questiontype, TableNo
6363
'Radio Buttons',
6464
'Rate (scale 1..5)',
6565
'Text Box',
66-
'Yes/No');
66+
'Yes/No',
67+
'File');
6768

6869
if (!in_array($questiontype, $validtypes)) {
6970
throw new ExpectationException('Invalid question type specified.', $this->getSession());

0 commit comments

Comments
 (0)