Skip to content

Commit ba660f1

Browse files
committed
Behat improvements: use menu, check more
1 parent 43d3c85 commit ba660f1

File tree

1 file changed

+8
-2
lines changed

1 file changed

+8
-2
lines changed

tests/behat/embedquestion.feature

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,10 +30,16 @@ Feature: Embed question in the Tiny editor
3030
And I set the field "Name" to "Test page 01"
3131
And I set the field "Description" to "Test page description"
3232
And I set the field "content" to "Test page content"
33-
And I click on "Embed question" "button"
33+
When I click on the "Insert > Embedded question" menu item for the "Description" TinyMCE editor
3434
And I set the field "Question category" to "Test questions [embed] (1)"
3535
And I set the field "id_questionidnumber" to "First question [test1]"
36-
And I click on "Embed question" "button" in the "Embed question" "dialogue"
36+
And I click on "Embed question" "button" in the "Embedded question" "dialogue"
3737
And I switch to the "Description" TinyMCE editor iframe
3838
Then I should see "{Q{embed/test1|"
3939
And I should see "}Q}Test page description"
40+
And I switch to the main frame
41+
# Check that reopening the form sets the fields to the current question.
42+
And I select the "Q" "text" in the "Description" TinyMCE editor
43+
And I click on the "Insert > Embedded question" menu item for the "Description" TinyMCE editor
44+
And the field "Question category" matches value "Test questions [embed] (1)"
45+
And the field "id_questionidnumber" matches value "First question [test1]"

0 commit comments

Comments
 (0)