Skip to content

Commit

Permalink
Merge branch 'wip-mdl-57669-m31' of https://github.com/rajeshtaneja/m…
Browse files Browse the repository at this point in the history
…oodle into MOODLE_31_STABLE
  • Loading branch information
danpoltawski committed Jan 17, 2017
2 parents 1e25d93 + ab1c203 commit 8d270f5
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
5 changes: 5 additions & 0 deletions lib/tests/behat/behat_hooks.php
Expand Up @@ -386,6 +386,11 @@ public function before_step_javascript(BeforeStepScope $scope) {
public function after_step_javascript(AfterStepScope $scope) {
global $CFG, $DB;

// If step is undefined then throw exception, to get failed exit code.
if ($scope->getTestResult()->getResultCode() === Behat\Behat\Tester\Result\StepResult::UNDEFINED) {
throw new coding_exception("Step '" . $scope->getStep()->getText() . "'' is undefined.");
}

// Save the page content if the step failed.
if (!empty($CFG->behat_faildump_path) &&
$scope->getTestResult()->getResultCode() === Behat\Testwork\Tester\Result\TestResult::FAILED) {
Expand Down
2 changes: 1 addition & 1 deletion mod/quiz/tests/behat/editing_section_headings.feature
Expand Up @@ -423,5 +423,5 @@ Feature: Edit quiz page - section headings
And I click on "Edit quiz" "link" in the "Administration" "block"
And I click on the "Remove" page break icon after question "TF10"
And I open the "Page 10" add to quiz menu
And I choose "a new section heading" in the open action menu
And I follow "a new section heading" in the open menu
Then "TF10" "list_item" should exist in the "Section heading ..." "list_item"

0 comments on commit 8d270f5

Please sign in to comment.