From 1ff39876006b96992f6fcd0e30edc1303c165aab Mon Sep 17 00:00:00 2001 From: Simey Lameze Date: Thu, 4 Apr 2019 10:45:18 +0800 Subject: [PATCH] MDL-5311 qtype_multichoice: add behat scenario to question preview --- .../type/multichoice/tests/behat/preview.feature | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/question/type/multichoice/tests/behat/preview.feature b/question/type/multichoice/tests/behat/preview.feature index ed50c9f05e5..19e3e797c18 100644 --- a/question/type/multichoice/tests/behat/preview.feature +++ b/question/type/multichoice/tests/behat/preview.feature @@ -70,3 +70,15 @@ Feature: Preview a Multiple choice question And I should see "Well done!" And I should see "The correct answer is: One" And I switch to the main window + + @javascript @_switch_window + Scenario: Preview a multiple choice question (single response) and clear a previous selected option. + When I click on "Preview" "link" in the "Multi-choice-002" "table_row" + And I switch to "questionpreview" window + And I set the field "How questions behave" to "Immediate feedback" + And I press "Start again with these options" + And I click on "One" "radio" + Then I should see "Clear my choice" + And I click on "Clear my choice" "text" + And I should not see "Clear my choice" + And I switch to the main window