diff --git a/main/course_info/infocours.php b/main/course_info/infocours.php index 1808e13462d..a3ff2723974 100755 --- a/main/course_info/infocours.php +++ b/main/course_info/infocours.php @@ -271,7 +271,7 @@ function is_settings_editable() $group2[] = $form->createElement('radio', 'subscribe', get_lang('Subscription'), get_lang('Allowed'), 1); $group2[] = $form->createElement('radio', 'subscribe', null, get_lang('Denied'), 0); -$myButton = $form->addButtonSave(get_lang('SaveSettings'), 'submit_save', true); +$myButton = $form->addButtonSave(get_lang('SaveSettings'), 'submit_save_access', true); $group3[] = $form->createElement( 'radio', diff --git a/tests/behat/features/bootstrap/FeatureContext.php b/tests/behat/features/bootstrap/FeatureContext.php index 31ddbb92ae0..8a6b75b355b 100644 --- a/tests/behat/features/bootstrap/FeatureContext.php +++ b/tests/behat/features/bootstrap/FeatureContext.php @@ -188,9 +188,11 @@ public function iHaveAPublicPasswordProtectedCourse($code, $password) ); $this->pressButton('submit'); $this->visit('/main/course_info/infocours.php?cidReq='.$code); + $this->clickLink('Course access'); + $this->waitForThePageToBeLoaded(); $this->assertPageContainsText('Course registration password'); $this->fillField('course_registration_password', $password); - $this->pressButton('submit_save'); + $this->pressButton('update_course_submit_save_access'); $this->assertFieldContains('course_registration_password', $password); } diff --git a/tests/behat/features/course.feature b/tests/behat/features/course.feature index 549fc790b2d..53352ef4485 100644 --- a/tests/behat/features/course.feature +++ b/tests/behat/features/course.feature @@ -158,13 +158,10 @@ Feature: Course tools basic testing And I am on "/main/course_info/maintenance.php" Then I should not see an ".alert-danger" element -# Scenario: Enter to public password-protected course -# Given I have a public password-protected course named "PASSWORDPROTECTED" with password "123456" -# And I am not logged -# And I am on "/courses/PASSWORDPROTECTED/index.php" -# When I fill in "course_password" with "123456" -# And I press "submit" -# Then I should not see "The course password is incorrect" - - - + Scenario: Enter to public password-protected course + Given I have a public password-protected course named "PASSWORDPROTECTED" with password "123456" + And I am not logged + And I am on "/courses/PASSWORDPROTECTED/index.php" + When I fill in "course_password" with "123456" + And I press "submit" + Then I should not see "The course password is incorrect" \ No newline at end of file