This commit is contained in:
Jun Pataleta 2024-01-23 09:26:30 +08:00
commit 10744550e6
No known key found for this signature in database
GPG key ID: F83510526D99E2C7
38 changed files with 224 additions and 172 deletions

View file

@ -120,8 +120,7 @@ Feature: Add customised file types
| Custom description | Froggy file | | Custom description | Froggy file |
And I press "Save changes" And I press "Save changes"
# Create a resource activity and add it to a course # Create a resource activity and add it to a course
And I am on "Course 1" course homepage with editing mode on When I add a resource activity to course "Course 1" section "1"
When I add a "File" to section "1"
And I set the following fields to these values: And I set the following fields to these values:
| Name | An example of customised file type | | Name | An example of customised file type |
| Description | File description | | Description | File description |

View file

@ -6,8 +6,8 @@ Feature: Confirm that conditions on completion no longer cause a bug
Background: Background:
Given the following "courses" exist: Given the following "courses" exist:
| fullname | shortname | format | | fullname | shortname | format | enablecompletion |
| Course 1 | C1 | topics | | Course 1 | C1 | topics | 1 |
And the following "users" exist: And the following "users" exist:
| username | | username |
| teacher1 | | teacher1 |
@ -17,21 +17,14 @@ Feature: Confirm that conditions on completion no longer cause a bug
@javascript @javascript
Scenario: Multiple completion conditions on glossary Scenario: Multiple completion conditions on glossary
# Set up course.
Given I am on the "Course 1" "course" page logged in as "teacher1"
And I navigate to "Settings" in current page administration
And I expand all fieldsets
And I set the field "Enable completion tracking" to "Yes"
And I press "Save and display"
And I turn editing mode on
# Add a couple of Pages with manual completion. # Add a couple of Pages with manual completion.
And the following "activities" exist: And the following "activities" exist:
| activity | course | name | completion | | activity | course | name | completion |
| page | C1 | Page1 | 1 | | page | C1 | Page1 | 1 |
| page | C1 | Page2 | 1 | | page | C1 | Page2 | 1 |
And I log in as "teacher1"
# Add a Glossary. # Add a Glossary.
When I add a "Glossary" to section "1" When I add a glossary activity to course "Course 1" section "1"
And I set the following fields to these values: And I set the following fields to these values:
| Name | TestGlossary | | Name | TestGlossary |
And I expand all fieldsets And I expand all fieldsets

View file

@ -21,8 +21,7 @@ Feature: Private rule sets
| Group A | C1 | GA | 0 | | Group A | C1 | GA | 0 |
| Group B | C1 | GB | 1 | | Group B | C1 | GB | 1 |
And I log in as "teacher1" And I log in as "teacher1"
And I am on "Course 1" course homepage with editing mode on And I add a page activity to course "Course 1" section "1"
And I add a "Page" to section "1"
And I expand all fieldsets And I expand all fieldsets
Scenario: Add restriction with visible condition (must match), display option should be active Scenario: Add restriction with visible condition (must match), display option should be active

View file

@ -17,8 +17,7 @@ Feature: Allow admins to edit the default activity completion rules at site leve
| course | C1 | | course | C1 |
| name | Test assignment one | | name | Test assignment one |
| completion | 1 | | completion | 1 |
And I am on "Course 1" course homepage with editing mode on When I add a assign activity to course "Course 1" section "0"
When I add a "Assignment" to section "0"
And I expand all fieldsets And I expand all fieldsets
# Completion tracking 0 = Do not indicate activity completion. # Completion tracking 0 = Do not indicate activity completion.
Then the field "None" matches value "1" Then the field "None" matches value "1"
@ -39,8 +38,7 @@ Feature: Allow admins to edit the default activity completion rules at site leve
And the following "core_completion > Course default" exist: And the following "core_completion > Course default" exist:
| course | module | completion | completionview | completionusegrade | completionsubmit | | course | module | completion | completionview | completionusegrade | completionsubmit |
| Acceptance test site | assign | 2 | 0 | 1 | 1 | | Acceptance test site | assign | 2 | 0 | 1 | 1 |
And I am on "Course 1" course homepage with editing mode on When I add a assign activity to course "Course 1" section "0"
When I add a "Assignment" to section "0"
And I expand all fieldsets And I expand all fieldsets
Then the field "Add requirements" matches value "1" Then the field "Add requirements" matches value "1"
And the field "completionview" matches value "0" And the field "completionview" matches value "0"
@ -64,8 +62,7 @@ Feature: Allow admins to edit the default activity completion rules at site leve
| course | module | completion | completionview | completionusegrade | completionsubmit | | course | module | completion | completionview | completionusegrade | completionsubmit |
| Acceptance test site | assign | 2 | 0 | 1 | 1 | | Acceptance test site | assign | 2 | 0 | 1 | 1 |
| C1 | assign | 2 | 1 | 0 | 1 | | C1 | assign | 2 | 1 | 0 | 1 |
And I am on "Course 1" course homepage with editing mode on When I add a assign activity to course "Course 1" section "0"
When I add a "Assignment" to section "0"
And I expand all fieldsets And I expand all fieldsets
Then the field "Add requirements" matches value "1" Then the field "Add requirements" matches value "1"
And the field "completionview" matches value "1" And the field "completionview" matches value "1"

View file

@ -93,7 +93,7 @@ Feature: Sections can be edited and deleted in custom sections format
@javascript @javascript
Scenario: Add a topic and then add an activity in it Scenario: Add a topic and then add an activity in it
When I click on "Add section" "link" in the "Topic 5" "section" When I click on "Add section" "link" in the "Topic 5" "section"
And I add a "Assignment" to section "6" and I fill the form with: And I add an assign activity to course "Course 1" section "6" and I fill the form with:
| Assignment name | Very new activity | | Assignment name | Very new activity |
| Description | Test | | Description | Test |
Then I should see "Very new activity" in the "Topic 6" "section" Then I should see "Very new activity" in the "Topic 6" "section"

View file

@ -9,56 +9,44 @@ Feature: Add activities to courses
| fullname | shortname | format | | fullname | shortname | format |
| Course 1 | Course 1 | topics | | Course 1 | Course 1 | topics |
@javascript
Scenario: Add an activity to a course Scenario: Add an activity to a course
Given I am on the "Course 1" Course page logged in as admin Given I log in as "admin"
And I am on "Course 1" course homepage with editing mode on When I add a data activity to course "Course 1" section "3" and I fill the form with:
When I add a "Database" to section "3" and I fill the form with:
| Name | Test name | | Name | Test name |
| Description | Test database description | | Description | Test database description |
| ID number | TESTNAME | | ID number | TESTNAME |
| Allow comments on entries | Yes | | Allow comments on entries | Yes |
| Force language | English | | Force language | English |
And I turn editing mode off Then I should not see "Adding a new"
Then I should not see "New" And I am on the "Test name" "data activity editing" page
And I turn editing mode on
And I open "Test name" actions menu
And I click on "Edit settings" "link" in the "Test name" activity
And the following fields match these values: And the following fields match these values:
| Name | Test name | | Name | Test name |
| ID number | TESTNAME | | ID number | TESTNAME |
| Allow comments on entries | Yes | | Allow comments on entries | Yes |
| Force language | English (en) | | Force language | English (en) |
@javascript
Scenario: Add an activity supplying only the name Scenario: Add an activity supplying only the name
Given I am on the "Course 1" Course page logged in as admin Given I log in as "admin"
And I am on "Course 1" course homepage with editing mode on When I add a data activity to course "Course 1" section "3" and I fill the form with:
When I add a "Database" to section "3" and I fill the form with:
| Name | Test name | | Name | Test name |
Then I should see "Test name" Then I should see "Test name"
@javascript
Scenario: Set activity description to required then add an activity supplying only the name Scenario: Set activity description to required then add an activity supplying only the name
Given the following config values are set as admin: Given the following config values are set as admin:
| requiremodintro | 1 | | requiremodintro | 1 |
And I am on the "Course 1" Course page logged in as admin And I log in as "admin"
And I am on "Course 1" course homepage with editing mode on And I add a data activity to course "Course 1" section "3" and I fill the form with:
And I add a "Database" to section "3" and I fill the form with:
| Name | Test name | | Name | Test name |
Then I should see "Required" Then I should see "Required"
@javascript
Scenario: The activity description should use the user's preferred editor on creation Scenario: The activity description should use the user's preferred editor on creation
Given the following "user preferences" exist: Given the following "user preferences" exist:
| user | preference | value | | user | preference | value |
| admin | htmleditor | textarea | | admin | htmleditor | textarea |
And I am logged in as admin And I am logged in as admin
And I am on "Course 1" course homepage with editing mode on When I add a data activity to course "Course 1" section "3"
When I add a "Database" to section "3"
Then the field "Description format" matches value "0" Then the field "Description format" matches value "0"
@javascript
Scenario: The activity description should preserve the format used once edited (markdown version) Scenario: The activity description should preserve the format used once edited (markdown version)
Given the following "activities" exist: Given the following "activities" exist:
| activity | name | intro | introformat | course | | activity | name | intro | introformat | course |
@ -67,12 +55,9 @@ Feature: Add activities to courses
| user | preference | value | | user | preference | value |
| admin | htmleditor | textarea | | admin | htmleditor | textarea |
And I am logged in as admin And I am logged in as admin
And I am on "Course 1" course homepage with editing mode on When I am on the "A4" "assign activity editing" page
And I open "A4" actions menu
When I click on "Edit settings" "link" in the "A4" activity
Then the field "Description format" matches value "4" Then the field "Description format" matches value "4"
@javascript
Scenario: The activity description should preserve the format used once edited (plain text version) Scenario: The activity description should preserve the format used once edited (plain text version)
Given the following "activities" exist: Given the following "activities" exist:
| activity | name | intro | introformat | course | | activity | name | intro | introformat | course |
@ -81,7 +66,5 @@ Feature: Add activities to courses
| user | preference | value | | user | preference | value |
| admin | htmleditor | textarea | | admin | htmleditor | textarea |
And I am logged in as admin And I am logged in as admin
And I am on "Course 1" course homepage with editing mode on When I am on the "A2" "assign activity editing" page
And I open "A2" actions menu
When I click on "Edit settings" "link" in the "A2" activity
Then the field "Description format" matches value "2" Then the field "Description format" matches value "2"

View file

@ -162,18 +162,23 @@ class behat_course extends behat_base {
} }
/** /**
* Adds the selected activity/resource filling the form data with the specified field/value pairs. Sections 0 and 1 are also allowed on frontpage. * Adds the selected activity/resource filling the form data with the specified field/value pairs.
* *
* @When /^I add a "(?P<activity_or_resource_name_string>(?:[^"]|\\")*)" to section "(?P<section_number>\d+)" and I fill the form with:$/ * Sections 0 and 1 are also allowed on frontpage.
*
* @Given I add a :activity activity to course :coursefullname section :sectionnum and I fill the form with:
* @Given I add an :activity activity to course :coursefullname section :sectionnum and I fill the form with:
* @param string $activity The activity name * @param string $activity The activity name
* @param string $coursefullname The course full name of the course.
* @param int $section The section number * @param int $section The section number
* @param TableNode $data The activity field/value data * @param TableNode $data The activity field/value data
*/ */
public function i_add_to_section_and_i_fill_the_form_with($activity, $section, TableNode $data) { public function i_add_to_course_section_and_i_fill_the_form_with($activity, $coursefullname, $section, TableNode $data) {
// Add activity to section. // Add activity to section.
$this->execute("behat_course::i_add_to_section", $this->execute(
array($this->escape($activity), $this->escape($section)) "behat_course::i_add_to_course_section",
[$this->escape($activity), $this->escape($coursefullname), $this->escape($section)]
); );
// Wait to be redirected. // Wait to be redirected.
@ -187,29 +192,54 @@ class behat_course extends behat_base {
} }
/** /**
* Opens the activity chooser and opens the activity/resource form page. Sections 0 and 1 are also allowed on frontpage. * Open a add activity form page.
* *
* @Given /^I add a "(?P<activity_or_resource_name_string>(?:[^"]|\\")*)" to section "(?P<section_number>\d+)"$/ * @Given I add a :activity activity to course :coursefullname section :sectionnum
* @throws ElementNotFoundException Thrown by behat_base::find * @Given I add an :activity activity to course :coursefullname section :sectionnum
* @param string $activity * @throws coding_exception
* @param int $section * @param string $activity The activity name.
* @param string $coursefullname The course full name of the course.
* @param string $sectionnum The section number.
*/ */
public function i_add_to_section($activity, $section) { public function i_add_to_course_section(string $activity, string $coursefullname, string $sectionnum): void {
$addurl = new moodle_url('/course/modedit.php', [
'add' => $activity,
'course' => $this->get_course_id($coursefullname),
'section' => intval($sectionnum),
]);
$this->execute('behat_general::i_visit', [$addurl]);
}
/**
* Opens the activity chooser and opens the activity/resource link form page. Sections 0 and 1 are also allowed on frontpage.
*
* This step require javascript enabled and it is used mainly to click activities or resources by name,
* not by plugin name. Use the standard behat_course::i_add_to_course_section step instead unless the
* plugin create extra entries into the activity chooser (like LTI).
*
* @Given I add a :activityname to section :sectionnum using the activity chooser
* @Given I add an :activityname to section :sectionnum using the activity chooser
* @throws ElementNotFoundException Thrown by behat_base::find
* @param string $activityname
* @param int $sectionnum
*/
public function i_add_to_section_using_the_activity_chooser($activityname, $sectionnum) {
$this->require_javascript('Please use the \'the following "activity" exists:\' data generator instead.'); $this->require_javascript('Please use the \'the following "activity" exists:\' data generator instead.');
if ($this->getSession()->getPage()->find('css', 'body#page-site-index') && (int) $section <= 1) { if ($this->getSession()->getPage()->find('css', 'body#page-site-index') && (int) $sectionnum <= 1) {
// We are on the frontpage. // We are on the frontpage.
if ($section) { if ($sectionnum) {
// Section 1 represents the contents on the frontpage. // Section 1 represents the contents on the frontpage.
$sectionxpath = "//body[@id='page-site-index']" . $sectionxpath = "//body[@id='page-site-index']" .
"/descendant::div[contains(concat(' ',normalize-space(@class),' '),' sitetopic ')]"; "/descendant::div[contains(concat(' ',normalize-space(@class),' '),' sitetopic ')]";
} else { } else {
// Section 0 represents "Site main menu" block. // Section 0 represents "Site main menu" block.
$sectionxpath = "//*[contains(concat(' ',normalize-space(@class),' '),' block_site_main_menu ')]"; $sectionxpath = "//*[contains(concat(' ',normalize-space(@class),' '),' block_site_main_menu ')]";
} }
} else { } else {
// We are inside the course. // We are inside the course.
$sectionxpath = "//li[@id='section-" . $section . "']"; $sectionxpath = "//li[@id='section-" . $sectionnum . "']";
} }
// Clicks add activity or resource section link. // Clicks add activity or resource section link.
@ -222,12 +252,12 @@ class behat_course extends behat_base {
]); ]);
// Clicks the selected activity if it exists. // Clicks the selected activity if it exists.
$activityliteral = behat_context_helper::escape(ucfirst($activity)); $activityliteral = behat_context_helper::escape(ucfirst($activityname));
$activityxpath = "//div[contains(concat(' ', normalize-space(@class), ' '), ' modchooser ')]" . $activityxpath = "//div[contains(concat(' ', normalize-space(@class), ' '), ' modchooser ')]" .
"/descendant::div[contains(concat(' ', normalize-space(@class), ' '), ' optioninfo ')]" . "/descendant::div[contains(concat(' ', normalize-space(@class), ' '), ' optioninfo ')]" .
"/descendant::div[contains(concat(' ', normalize-space(@class), ' '), ' optionname ')]" . "/descendant::div[contains(concat(' ', normalize-space(@class), ' '), ' optionname ')]" .
"[normalize-space(.)=$activityliteral]" . "[normalize-space(.)=$activityliteral]" .
"/parent::a"; "/parent::a";
$this->execute('behat_general::i_click_on', [$activityxpath, 'xpath']); $this->execute('behat_general::i_click_on', [$activityxpath, 'xpath']);
} }

View file

@ -18,11 +18,9 @@ Feature: Restrict activities availability
| activity | course | name | | activity | course | name |
| chat | C1 | Test chat name | | chat | C1 | Test chat name |
@javascript
Scenario: Activities can be added with the default permissions Scenario: Activities can be added with the default permissions
Given I log in as "teacher1" Given I log in as "teacher1"
And I am on "Course 1" course homepage with editing mode on When I add a glossary activity to course "Course 1" section "1" and I fill the form with:
When I add a "Glossary" to section "1" and I fill the form with:
| Name | Test glossary name | | Name | Test glossary name |
| Description | Test glossary description | | Description | Test glossary description |
Then I should see "Test glossary name" Then I should see "Test glossary name"

View file

@ -2,6 +2,13 @@ This files describes API changes in /course/*,
information provided here is intended especially for developers. information provided here is intended especially for developers.
=== 4.4 === === 4.4 ===
* The following behat steps are now deprecated and replaced by new ones with no Javascript dependencies:
- I add a ":activityname" to section ":sectionnum"
- I add a ":activityname" to section ":sectionnum and I fill the form with:"
The new steps are:
- I add a :activityname to section :sectionnum using the activity chooser
- I add a :activitypluginname activity to course :coursefullname section :sectionnum
- I add a :activitypluginname activity to course :coursefullname section :sectionnum and I fill the form with:
* set_coursemodule_visible() has a new $rebuildcache parameter. If this is being called multiple times in the same request, * set_coursemodule_visible() has a new $rebuildcache parameter. If this is being called multiple times in the same request,
consider passing `false` for this parameter and rebuilding the cache once after all the course modules have been updated. consider passing `false` for this parameter and rebuilding the cache once after all the course modules have been updated.
See course_update_section() for an example. See course_update_section() for an example.

View file

@ -8,32 +8,31 @@ Feature: Add a new custom file type
Scenario: Add custom file type Scenario: Add custom file type
Given the following "courses" exist: Given the following "courses" exist:
| fullname | shortname | category | legacyfiles | | fullname | shortname | category | legacyfiles |
| Course 1 | C1 | 0 | 2 | | Course 1 | C1 | 0 | 2 |
And the following "users" exist: And the following "users" exist:
| username | firstname | lastname | email | | username | firstname | lastname | email |
| teacher1 | Teacher | 1 | teacher1@example.com | | teacher1 | Teacher | 1 | teacher1@example.com |
And the following "course enrolments" exist: And the following "course enrolments" exist:
| user | course | role | | user | course | role |
| teacher1 | C1 | editingteacher | | teacher1 | C1 | editingteacher |
And I log in as "admin" And I log in as "admin"
And I navigate to "Server > File types" in site administration And I navigate to "Server > File types" in site administration
And I press "Add a new file type" And I press "Add a new file type"
And I set the following fields to these values: And I set the following fields to these values:
| Extension | mdlr | | Extension | mdlr |
| MIME type | application/x-moodle-rules | | MIME type | application/x-moodle-rules |
| File icon | document | | File icon | document |
| Description type | Custom description specified in this form | | Description type | Custom description specified in this form |
| Custom description | Moodle rules | | Custom description | Moodle rules |
And I press "Save changes" And I press "Save changes"
And I should see "application/x-moodle-rules" And I should see "application/x-moodle-rules"
And I am on the "Course 1" course page logged in as teacher1 And I log in as "teacher1"
And I turn editing mode on When I add a resource activity to course "Course 1" section "1" and I fill the form with:
When I add a "File" to section "1" and I fill the form with: | Name | Test file |
| Name | Test file | | Select files | files/tests/fixtures/custom_filetype.mdlr |
| Select files | files/tests/fixtures/custom_filetype.mdlr | | Show size | 1 |
| Show size | 1 | | Show type | 1 |
| Show type | 1 | | Display resource description | 1 |
| Display resource description | 1 |
And I am on "Course 1" course homepage And I am on "Course 1" course homepage
Then I should see "Test file" Then I should see "Test file"
And I should see "MDLR" in the "span.activitybadge" "css_element" And I should see "MDLR" in the "span.activitybadge" "css_element"

View file

@ -9,11 +9,9 @@ Feature: hideIf functionality in forms
| fullname | shortname | | fullname | shortname |
| Course 1 | C1 | | Course 1 | C1 |
And I log in as "admin" And I log in as "admin"
And I am on "Course 1" course homepage
And I turn editing mode on
Scenario: When 'eq' hideIf conditions are not met, the relevant elements are shown Scenario: When 'eq' hideIf conditions are not met, the relevant elements are shown
When I add a "Assignment" to section "1" When I add an assign activity to course "Course 1" section "1"
And I expand all fieldsets And I expand all fieldsets
And I set the field "Students submit in groups" to "Yes" And I set the field "Students submit in groups" to "Yes"
Then I should see "Require group to make submission" Then I should see "Require group to make submission"
@ -21,7 +19,7 @@ Feature: hideIf functionality in forms
And I should see "Grouping for student groups" And I should see "Grouping for student groups"
Scenario: When 'eq' hideIf conditions are met, the relevant elements are hidden Scenario: When 'eq' hideIf conditions are met, the relevant elements are hidden
When I add a "Assignment" to section "1" When I add a assign activity to course "Course 1" section "1"
And I expand all fieldsets And I expand all fieldsets
And I set the field "Students submit in groups" to "No" And I set the field "Students submit in groups" to "No"
Then I should not see "Require group to make submission" Then I should not see "Require group to make submission"

View file

@ -17,6 +17,7 @@
// NOTE: no MOODLE_INTERNAL test here, this file may be required by behat before including /config.php. // NOTE: no MOODLE_INTERNAL test here, this file may be required by behat before including /config.php.
require_once(__DIR__ . '/../../../lib/behat/behat_deprecated_base.php'); require_once(__DIR__ . '/../../../lib/behat/behat_deprecated_base.php');
use Behat\Gherkin\Node\TableNode as TableNode;
/** /**
* Steps definitions that are now deprecated and will be removed in the next releases. * Steps definitions that are now deprecated and will be removed in the next releases.
@ -31,5 +32,85 @@ require_once(__DIR__ . '/../../../lib/behat/behat_deprecated_base.php');
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/ */
class behat_deprecated extends behat_deprecated_base { class behat_deprecated extends behat_deprecated_base {
/**
* Opens the activity chooser and opens the activity/resource form page. Sections 0 and 1 are also allowed on frontpage.
*
* @Given /^I add a "(?P<activity_or_resource_name_string>(?:[^"]|\\")*)" to section "(?P<section_number>\d+)"$/
* @throws \Behat\Mink\Exception\ElementNotFoundException Thrown by behat_base::find
* @param string $activity
* @param int $section
* @deprecated Since Moodle 4.4
*/
public function i_add_to_section($activity, $section) {
$this->deprecated_message([
'behat_course::i_add_to_course_section',
'behat_course::i_add_to_section_using_the_activity_chooser',
]);
$this->require_javascript('Please use the \'the following "activity" exists:\' data generator instead.');
if ($this->getSession()->getPage()->find('css', 'body#page-site-index') && (int) $section <= 1) {
// We are on the frontpage.
if ($section) {
// Section 1 represents the contents on the frontpage.
$sectionxpath = "//body[@id='page-site-index']" .
"/descendant::div[contains(concat(' ',normalize-space(@class),' '),' sitetopic ')]";
} else {
// Section 0 represents "Site main menu" block.
$sectionxpath = "//*[contains(concat(' ',normalize-space(@class),' '),' block_site_main_menu ')]";
}
} else {
// We are inside the course.
$sectionxpath = "//li[@id='section-" . $section . "']";
}
// Clicks add activity or resource section link.
$sectionnode = $this->find('xpath', $sectionxpath);
$this->execute('behat_general::i_click_on_in_the', [
"//button[@data-action='open-chooser' and not(@data-beforemod)]",
'xpath',
$sectionnode,
'NodeElement',
]);
// Clicks the selected activity if it exists.
$activityliteral = behat_context_helper::escape(ucfirst($activity));
$activityxpath = "//div[contains(concat(' ', normalize-space(@class), ' '), ' modchooser ')]" .
"/descendant::div[contains(concat(' ', normalize-space(@class), ' '), ' optioninfo ')]" .
"/descendant::div[contains(concat(' ', normalize-space(@class), ' '), ' optionname ')]" .
"[normalize-space(.)=$activityliteral]" .
"/parent::a";
$this->execute('behat_general::i_click_on', [$activityxpath, 'xpath']);
}
/**
* Adds the selected activity/resource filling the form data with the specified field/value pairs.
*
* Sections 0 and 1 are also allowed on frontpage.
*
* @When /^I add a "(?P<activity_or_resource_name_string>(?:[^"]|\\")*)" to section "(?P<section_number>\d+)" and I fill the form with:$/
* @param string $activity The activity name
* @param int $section The section number
* @param TableNode $data The activity field/value data
* @deprecated Since Moodle 4.4
*/
public function i_add_to_section_and_i_fill_the_form_with($activity, $section, TableNode $data) {
$this->deprecated_message(['behat_course::i_add_to_course_section_and_i_fill_the_form_with']);
// Add activity to section.
$this->execute(
"behat_course::i_add_to_section",
[$this->escape($activity), $this->escape($section)]
);
// Wait to be redirected.
$this->execute('behat_general::wait_until_the_page_is_ready');
// Set form fields.
$this->execute("behat_forms::i_set_the_following_fields_to_these_values", $data);
// Save course settings.
$this->execute("behat_forms::press_button", get_string('savechangesandreturntocourse'));
}
} }

View file

@ -24,7 +24,7 @@ Feature: Embed videos without the media filter
@javascript @javascript
Scenario: Add a video as a File resource. Make sure media filters work Scenario: Add a video as a File resource. Make sure media filters work
When I add a "File" to section "1" When I add a "File" to section "1" using the activity chooser
And I set the following fields to these values: And I set the following fields to these values:
| Name | Video File | | Name | Video File |
| Description | Example of a video file | | Description | Example of a video file |

View file

@ -1,4 +1,4 @@
@mod @mod_assign @core_outcome @javascript @mod @mod_assign @core_outcome
Feature: Outcome grading Feature: Outcome grading
In order to give an outcome to my student In order to give an outcome to my student
As a teacher As a teacher
@ -31,10 +31,10 @@ Feature: Outcome grading
And I click on "#add" "css_element" And I click on "#add" "css_element"
And I log out And I log out
@javascript
Scenario: Giving an outcome to a student Scenario: Giving an outcome to a student
Given I log in as "teacher1" Given I log in as "teacher1"
And I am on "Course 1" course homepage with editing mode on And I add a assign activity to course "Course 1" section "1" and I fill the form with:
And I add a "Assignment" to section "1" and I fill the form with:
| Assignment name | Test assignment name | | Assignment name | Test assignment name |
| ID number | Test assignment name | | ID number | Test assignment name |
| Description | Test assignment description | | Description | Test assignment description |
@ -57,6 +57,7 @@ Feature: Outcome grading
Then I should see "Outcome Test: Excellent" in the "Student 0" "table_row" Then I should see "Outcome Test: Excellent" in the "Student 0" "table_row"
And I should not see "Outcome Test: Excellent" in the "Student 1" "table_row" And I should not see "Outcome Test: Excellent" in the "Student 1" "table_row"
@javascript
Scenario: Giving an outcome to a group submission Scenario: Giving an outcome to a group submission
Given the following "users" exist: Given the following "users" exist:
| username | firstname | lastname | email | | username | firstname | lastname | email |
@ -72,8 +73,7 @@ Feature: Outcome grading
| student0 | G1 | | student0 | G1 |
| student1 | G1 | | student1 | G1 |
And I log in as "teacher1" And I log in as "teacher1"
And I am on "Course 1" course homepage with editing mode on And I add a assign activity to course "Course 1" section "1" and I fill the form with:
And I add a "Assignment" to section "1" and I fill the form with:
| Assignment name | Test assignment name | | Assignment name | Test assignment name |
| Description | Test assignment description | | Description | Test assignment description |
| ID number | Test assignment name | | ID number | Test assignment name |

View file

@ -68,8 +68,7 @@ Feature: In an assignment, teachers grade multiple students on one page
| Short name | skillZ! | | Short name | skillZ! |
| Scale | 1337dom scale | | Scale | 1337dom scale |
And I press "Save changes" And I press "Save changes"
And I am on "Course 1" course homepage with editing mode on And I add a assign activity to course "Course 1" section "1" and I fill the form with:
And I add a "Assignment" to section "1" and I fill the form with:
| Assignment name | Test assignment name | | Assignment name | Test assignment name |
| Description | Submit your online text | | Description | Submit your online text |
| assignsubmission_onlinetext_enabled | 1 | | assignsubmission_onlinetext_enabled | 1 |

View file

@ -36,16 +36,14 @@ Feature: bigbluebuttonbn instance
And I should see "Recordings" And I should see "Recordings"
Scenario: Add a Recording Only activity and check that no live session settings are available for this instance type Scenario: Add a Recording Only activity and check that no live session settings are available for this instance type
When I turn editing mode on When I change window size to "large"
And I change window size to "large" And I add a bigbluebuttonbn activity to course "Test course" section "1"
And I add a "BigBlueButton" to section "1"
And I select "Recordings only" from the "Instance type" singleselect And I select "Recordings only" from the "Instance type" singleselect
Then I should not see "Lock settings" Then I should not see "Lock settings"
Scenario Outline: Add an activity and check that required settings are available for the three types of instance types Scenario Outline: Add an activity and check that required settings are available for the three types of instance types
When I turn editing mode on When I change window size to "large"
And I change window size to "large" And I add a bigbluebuttonbn activity to course "Test course" section "1"
And I add a "BigBlueButton" to section "1"
And I select "<type>" from the "Instance type" singleselect And I select "<type>" from the "Instance type" singleselect
Then I should see "Restrict access" Then I should see "Restrict access"

View file

@ -34,12 +34,10 @@ Feature: Show users who have not responded to the feedback survey
| grouping | group | | grouping | group |
| GXI1 | GI1 | | GXI1 | GI1 |
@javascript
Scenario: See users who have not responded Scenario: See users who have not responded
# Set up a feedback. # Set up a feedback.
When I log in as "teacher1" When I log in as "teacher1"
And I am on "Course 1" course homepage with editing mode on And I add a feedback activity to course "Course 1" section "1" and I fill the form with:
And I add a "Feedback" to section "1" and I fill the form with:
| Name | Frogs | | Name | Frogs |
| Description | x | | Description | x |
| Record user names | User's name will be logged and shown with answers | | Record user names | User's name will be logged and shown with answers |

View file

@ -18,8 +18,7 @@ Feature: Add forum activities and discussions
| teacher1 | C1 | editingteacher | | teacher1 | C1 | editingteacher |
| student1 | C1 | student | | student1 | C1 | student |
And I log in as "teacher1" And I log in as "teacher1"
And I am on "Course 1" course homepage with editing mode on And I add a forum activity to course "Course 1" section "1" and I fill the form with:
And I add a "Forum" to section "1" and I fill the form with:
| Forum name | Test forum name | | Forum name | Test forum name |
| Forum type | Standard forum for general use | | Forum type | Standard forum for general use |
| Description | Test forum description | | Description | Test forum description |
@ -43,14 +42,12 @@ Feature: Add forum activities and discussions
And I follow "Edit" And I follow "Edit"
And the field "Attachment" matches value "empty.txt" And the field "Attachment" matches value "empty.txt"
@javascript
Scenario: Test forum settings validation Scenario: Test forum settings validation
Given the following "courses" exist: Given the following "courses" exist:
| fullname | shortname | category | | fullname | shortname | category |
| Course 1 | C1 | 0 | | Course 1 | C1 | 0 |
And I log in as "admin" And I log in as "admin"
And I am on "Course 1" course homepage with editing mode on And I add a forum activity to course "Course 1" section "0" and I fill the form with:
And I add a "Forum" to section "0" and I fill the form with:
| Forum name | Test forum | | Forum name | Test forum |
| Forum type | single | | Forum type | single |
| Group mode | 1 | | Group mode | 1 |

View file

@ -24,8 +24,7 @@ Feature: Content bank link in the activity settings form
@javascript @javascript
Scenario: The content bank link should go to the course Content bank Scenario: The content bank link should go to the course Content bank
When I log in as "teacher1" When I log in as "teacher1"
And I am on "Course 1" course homepage with editing mode on And I add an h5pactivity activity to course "Course 1" section "1"
And I add a "H5P" to section "1"
Then I should see "Use the content bank (opens in new window) to manage your H5P files" Then I should see "Use the content bank (opens in new window) to manage your H5P files"
And I click on "content bank (opens in new window)" "link" in the "General" "fieldset" And I click on "content bank (opens in new window)" "link" in the "General" "fieldset"
And I switch to a second window And I switch to a second window
@ -39,15 +38,13 @@ Feature: Content bank link in the activity settings form
| capability | permission | role | contextlevel | reference | | capability | permission | role | contextlevel | reference |
| moodle/contentbank:access | Prevent | editingteacher | Course | C1 | | moodle/contentbank:access | Prevent | editingteacher | Course | C1 |
When I log in as "teacher1" When I log in as "teacher1"
And I am on "Course 1" course homepage with editing mode on And I add an h5pactivity activity to course "Course 1" section "1"
And I add a "H5P" to section "1"
Then I should not see "Use the content Bank (opens in new window) to manage your H5P files" Then I should not see "Use the content Bank (opens in new window) to manage your H5P files"
@javascript @javascript
Scenario: A different message should be displayed if the package file is a link to the content bank file Scenario: A different message should be displayed if the package file is a link to the content bank file
Given I log in as "admin" Given I log in as "admin"
And I am on "Course 1" course homepage with editing mode on And I add an h5pactivity activity to course "Course 1" section "1"
And I add a "H5P" to section "1"
And I set the following fields to these values: And I set the following fields to these values:
| Name | H5P package added with link to content bank | | Name | H5P package added with link to content bank |
| Description | Description | | Description | Description |
@ -69,8 +66,7 @@ Feature: Content bank link in the activity settings form
@javascript @javascript
Scenario: The content bank link should go to the course Content bank if the file is a copy to a content bank file Scenario: The content bank link should go to the course Content bank if the file is a copy to a content bank file
Given I log in as "admin" Given I log in as "admin"
And I am on "Course 1" course homepage with editing mode on And I add an h5pactivity activity to course "Course 1" section "1"
And I add a "H5P" to section "1"
And I set the following fields to these values: And I set the following fields to these values:
| Name | H5P package added with link to content bank | | Name | H5P package added with link to content bank |
| Description | Description | | Description | Description |
@ -93,8 +89,7 @@ Feature: Content bank link in the activity settings form
And I follow "Manage private files..." And I follow "Manage private files..."
And I upload "h5p/tests/fixtures/guess-the-answer.h5p" file to "Files" filemanager And I upload "h5p/tests/fixtures/guess-the-answer.h5p" file to "Files" filemanager
And I click on "Save changes" "button" And I click on "Save changes" "button"
And I am on "Course 1" course homepage with editing mode on And I add an h5pactivity activity to course "Course 1" section "1"
And I add a "H5P" to section "1"
And I set the following fields to these values: And I set the following fields to these values:
| Name | H5P package added with link to content bank | | Name | H5P package added with link to content bank |
| Description | Description | | Description | Description |

View file

@ -19,7 +19,7 @@ Feature: Set up attempt grading options into H5P activity
| moodle/h5p:updatelibraries | Allow | editingteacher | System | | | moodle/h5p:updatelibraries | Allow | editingteacher | System | |
And I log in as "teacher1" And I log in as "teacher1"
And I am on "Course 1" course homepage with editing mode on And I am on "Course 1" course homepage with editing mode on
And I add a "H5P" to section "1" And I add an h5pactivity activity to course "Course 1" section "1"
Scenario: Default values should have tracking and grading Scenario: Default values should have tracking and grading
When the field "Type" matches value "Point" When the field "Type" matches value "Point"

View file

@ -37,7 +37,7 @@ Feature: Inline editing H5P content
| unaddableblocks | | theme_boost| | unaddableblocks | | theme_boost|
And I add the "Navigation" block if not present And I add the "Navigation" block if not present
# Create an H5P activity with a link to the content-bank file. # Create an H5P activity with a link to the content-bank file.
And I add a "H5P" to section "1" And I add an h5pactivity activity to course "Course 1" section "1"
And I set the following fields to these values: And I set the following fields to these values:
| Name | H5P package added as link to content bank | | Name | H5P package added as link to content bank |
| Description | Description | | Description | Description |
@ -99,7 +99,7 @@ Feature: Inline editing H5P content
| unaddableblocks | | theme_boost| | unaddableblocks | | theme_boost|
And I add the "Navigation" block if not present And I add the "Navigation" block if not present
# Create an H5P activity with a copy to the content-bank file. # Create an H5P activity with a copy to the content-bank file.
And I add a "H5P" to section "1" And I add an h5pactivity activity to course "Course 1" section "1"
And I set the following fields to these values: And I set the following fields to these values:
| Name | H5P package added as copy to content bank | | Name | H5P package added as copy to content bank |
| Description | Description | | Description | Description |
@ -157,8 +157,7 @@ Feature: Inline editing H5P content
And I upload "h5p/tests/fixtures/greeting-card.h5p" file to "Files" filemanager And I upload "h5p/tests/fixtures/greeting-card.h5p" file to "Files" filemanager
And I click on "Save changes" "button" And I click on "Save changes" "button"
# Create an H5P activity with a private user file. # Create an H5P activity with a private user file.
And I am on "Course 1" course homepage with editing mode on And I add an h5pactivity activity to course "Course 1" section "1"
And I add a "H5P" to section "1"
And I set the following fields to these values: And I set the following fields to these values:
| Name | H5P package added as private user file | | Name | H5P package added as private user file |
| Description | Description | | Description | Description |

View file

@ -8,9 +8,8 @@ Feature: Create an IMSCP activity through UI
| Course 1 | C1 | topics | | Course 1 | C1 | topics |
Scenario: IMS activity is created using UI Scenario: IMS activity is created using UI
Given I am on the "Course 1" course page logged in as admin Given I log in as "admin"
And I turn editing mode on And I add a imscp activity to course "Course 1" section "1"
And I add a "IMS content package" to section "1"
And I set the following fields to these values: And I set the following fields to these values:
| Name | Test IMS content package 2 | | Name | Test IMS content package 2 |
| Description | Test IMS content package description | | Description | Test IMS content package description |

View file

@ -27,7 +27,7 @@ Feature: Add tools
Scenario: Add a site tool via the activity picker Scenario: Add a site tool via the activity picker
Given I log in as "teacher1" Given I log in as "teacher1"
And I am on "Course 1" course homepage with editing mode on And I am on "Course 1" course homepage with editing mode on
When I add a "Teaching Tool 1" to section "1" When I add a "Teaching Tool 1" to section "1" using the activity chooser
And I set the field "Activity name" to "Test tool activity 1" And I set the field "Activity name" to "Test tool activity 1"
And "Launch container" "field" should not be visible And "Launch container" "field" should not be visible
# For tool that does not support Content-Item message type, the Select content button must be disabled. # For tool that does not support Content-Item message type, the Select content button must be disabled.
@ -44,7 +44,7 @@ Feature: Add tools
Scenario: Add a course tool via the activity picker Scenario: Add a course tool via the activity picker
Given I log in as "teacher1" Given I log in as "teacher1"
And I am on "Course 1" course homepage with editing mode on And I am on "Course 1" course homepage with editing mode on
When I add a "Course tool 1" to section "1" When I add a "Course tool 1" to section "1" using the activity chooser
And I set the field "Activity name" to "Test tool activity 2" And I set the field "Activity name" to "Test tool activity 2"
And "Launch container" "field" should not be visible And "Launch container" "field" should not be visible
# For tool that does not support Content-Item message type, the Select content button must be disabled. # For tool that does not support Content-Item message type, the Select content button must be disabled.

View file

@ -22,7 +22,7 @@ Feature: Content-Item support
Scenario: Tool that supports Deep Linking should be able to configure a tool via the Select content button Scenario: Tool that supports Deep Linking should be able to configure a tool via the Select content button
Given I log in as "teacher1" Given I log in as "teacher1"
And I am on "Course 1" course homepage with editing mode on And I am on "Course 1" course homepage with editing mode on
When I add a "Teaching Tool 1" to section "1" When I add a "Teaching Tool 1" to section "1" using the activity chooser
Then "Select content" "button" should be visible Then "Select content" "button" should be visible
And the "Select content" "button" should be enabled And the "Select content" "button" should be enabled

View file

@ -255,10 +255,10 @@ Feature: Manage course tools
| Course Tool 1 | Example description | https://example.com/tool | C1 | | Course Tool 1 | Example description | https://example.com/tool | C1 |
And I log in as "admin" And I log in as "admin"
And I am on "Course 1" course homepage with editing mode on And I am on "Course 1" course homepage with editing mode on
And I add a "Teaching Tool 1" to section "1" And I add a "Teaching Tool 1" to section "1" using the activity chooser
And I set the field "Activity name" to "Test tool activity 1" And I set the field "Activity name" to "Test tool activity 1"
And I press "Save and return to course" And I press "Save and return to course"
And I add a "Course Tool 1" to section "1" And I add a "Course Tool 1" to section "1" using the activity chooser
And I set the field "Activity name" to "Course tool activity 1" And I set the field "Activity name" to "Course tool activity 1"
And I press "Save and return to course" And I press "Save and return to course"
And I navigate to "LTI External tools" in current page administration And I navigate to "LTI External tools" in current page administration
@ -266,7 +266,7 @@ Feature: Manage course tools
And I click on "Show in activity chooser" "field" in the "Teaching Tool 2" "table_row" And I click on "Show in activity chooser" "field" in the "Teaching Tool 2" "table_row"
And I click on "Don't show in activity chooser" "field" in the "Course Tool 1" "table_row" And I click on "Don't show in activity chooser" "field" in the "Course Tool 1" "table_row"
And I am on "Course 1" course homepage And I am on "Course 1" course homepage
And I add a "Teaching Tool 2" to section "1" And I add a "Teaching Tool 2" to section "1" using the activity chooser
And I set the field "Activity name" to "Test tool activity 2" And I set the field "Activity name" to "Test tool activity 2"
And I press "Save and return to course" And I press "Save and return to course"
When I backup "Course 1" course using this options: When I backup "Course 1" course using this options:

View file

@ -46,14 +46,12 @@ Feature: Safe Exam Browser settings in quiz edit form
| course | C1 | | course | C1 |
| role | editingteacher | | role | editingteacher |
And I log in as "teacher" And I log in as "teacher"
And I am on "Course 1" course homepage with editing mode on
# Create the quiz. # Create the quiz.
When I add a "Quiz" to section "0" and I fill the form with: When I add a quiz activity to course "Course 1" section "0" and I fill the form with:
| Name | My quiz | | Name | My quiz |
Then I should not see "New Quiz" Then I should not see "New Quiz"
# Edit the quiz. # Edit the quiz.
And I open "My quiz" actions menu And I am on the "My quiz" "quiz activity editing" page
And I click on "Edit settings" "link" in the "My quiz" activity
And I set the field "Name" to "My quiz edited" And I set the field "Name" to "My quiz edited"
And I press "Save and return to course" And I press "Save and return to course"
And I should not see "Edit settings" And I should not see "Edit settings"

View file

@ -96,8 +96,7 @@ Feature: Settings form fields disabled if not required
@javascript @javascript
Scenario: Depending on whether there is a close date, some review options are disabled. Scenario: Depending on whether there is a close date, some review options are disabled.
When I log in as "teacher" When I log in as "teacher"
And I am on "Course 1" course homepage with editing mode on And I add a quiz activity to course "Course 1" section "1"
And I add a "Quiz" to section "1"
And I expand all fieldsets And I expand all fieldsets
And I set the field "Name" to "Test quiz" And I set the field "Name" to "Test quiz"
Then the "id_attemptclosed" "checkbox" should be disabled Then the "id_attemptclosed" "checkbox" should be disabled

View file

@ -18,8 +18,7 @@ Feature: Add scorm activity
| teacher1 | C1 | editingteacher | | teacher1 | C1 | editingteacher |
| student1 | C1 | student | | student1 | C1 | student |
When I log in as "teacher1" When I log in as "teacher1"
And I am on "Course 1" course homepage with editing mode on And I add a scorm activity to course "Course 1" section "1"
And I add a "SCORM package" to section "1"
And I set the following fields to these values: And I set the following fields to these values:
| Name | Awesome SCORM package | | Name | Awesome SCORM package |
| Description | Description | | Description | Description |

View file

@ -15,8 +15,7 @@ Feature: Check a SCORM package with missing Organisational structure.
| teacher1 | C1 | editingteacher | | teacher1 | C1 | editingteacher |
| student1 | C1 | student | | student1 | C1 | student |
When I log in as "teacher1" When I log in as "teacher1"
And I am on "Course 1" course homepage with editing mode on And I add a scorm activity to course "Course 1" section "1"
And I add a "SCORM package" to section "1"
And I set the following fields to these values: And I set the following fields to these values:
| Name | MissingOrg SCORM package | | Name | MissingOrg SCORM package |
| Description | Description | | Description | Description |

View file

@ -37,11 +37,8 @@ Feature: A teacher can set three types of survey activity
And I should see "In this online unit..." And I should see "In this online unit..."
And I should see "my learning focuses on issues that interest me." And I should see "my learning focuses on issues that interest me."
@javascript
Scenario: Survey activity is created via UI Scenario: Survey activity is created via UI
Given I am on the "Course 1" course page Given I add a survey activity to course "Course 1" section "1"
And I turn editing mode on
And I add a "Survey" to section "1"
And I set the following fields to these values: And I set the following fields to these values:
| Name | Test survey name | | Name | Test survey name |
| Description | Test survey description | | Description | Test survey description |

View file

@ -12,8 +12,7 @@ Feature: Submission types
@javascript @javascript
Scenario: Test workshop settings validation Scenario: Test workshop settings validation
Given I am on "Test" course homepage with editing mode on Given I add a workshop activity to course "Test" section "0"
And I add a "Workshop" to section "0"
When I set the following fields to these values: When I set the following fields to these values:
| Workshop name | Test workshop | | Workshop name | Test workshop |
| submissiontypetextavailable | 0 | | submissiontypetextavailable | 0 |

View file

@ -17,12 +17,9 @@ Feature: Workshop assessment with grade to pass
| student1 | c1 | student | | student1 | c1 | student |
| teacher1 | c1 | editingteacher | | teacher1 | c1 | editingteacher |
@javascript
Scenario: Setup workshop with assessment grade and pass grade set Scenario: Setup workshop with assessment grade and pass grade set
And I log in as "teacher1" And I log in as "teacher1"
And I am on "Course1" course homepage with editing mode on And I add a workshop activity to course "Course1" section "0"
And I add a "Workshop" to section "0"
And I expand all fieldsets
When I set the following fields to these values: When I set the following fields to these values:
| Workshop name | Test workshop | | Workshop name | Test workshop |
| Add requirements | 1 | | Add requirements | 1 |

View file

@ -18,8 +18,7 @@ Feature: In a report, admin can see loglive data
| fullnamedisplay | firstname | | fullnamedisplay | firstname |
| alternativefullnameformat | middlename, alternatename, firstname, lastname | | alternativefullnameformat | middlename, alternatename, firstname, lastname |
And I log in as "admin" And I log in as "admin"
And I am on "Course 1" course homepage with editing mode on And I add a data activity to course "Course 1" section "3" and I fill the form with:
And I add a "Database" to section "3" and I fill the form with:
| Name | Test name | | Name | Test name |
| Description | Test database description | | Description | Test database description |
@ -40,7 +39,7 @@ Feature: In a report, admin can see loglive data
And I am on "Course 1" course homepage And I am on "Course 1" course homepage
And I change window size to "large" And I change window size to "large"
And I reload the page And I reload the page
And I add a "Database" to section "3" and I fill the form with: And I add a data activity to course "Course 1" section "3" and I fill the form with:
| Name | Test name2 | | Name | Test name2 |
| Description | Test database description | | Description | Test database description |
And I switch to the main window And I switch to the main window

View file

@ -17,8 +17,7 @@ Feature: Updating a file in the content bank after using in a course
Scenario: Referenced files is the default option and updates alias as well Scenario: Referenced files is the default option and updates alias as well
When I log in as "admin" When I log in as "admin"
And I am on "Course1" course homepage with editing mode on And I add an h5pactivity activity to course "Course1" section "1"
And I add a "H5P" to section "1"
And I set the following fields to these values: And I set the following fields to these values:
| Name | guessFile | | Name | guessFile |
And I click on "Add..." "link" in the ".fp-toolbar" "css_element" And I click on "Add..." "link" in the ".fp-toolbar" "css_element"
@ -59,8 +58,7 @@ Feature: Updating a file in the content bank after using in a course
Scenario: Copied files should not be updated if the original is edited Scenario: Copied files should not be updated if the original is edited
When I log in as "admin" When I log in as "admin"
And I am on "Course1" course homepage with editing mode on And I add an h5pactivity activity to course "Course1" section "1"
And I add a "H5P" to section "1"
And I set the following fields to these values: And I set the following fields to these values:
| Name | guessFile | | Name | guessFile |
And I click on "Add..." "link" in the ".fp-toolbar" "css_element" And I click on "Add..." "link" in the ".fp-toolbar" "css_element"

View file

@ -10,8 +10,7 @@ Feature: Create folders in the file manager
| fullname | shortname | category | | fullname | shortname | category |
| Course 1 | C1 | 0 | | Course 1 | C1 | 0 |
And I log in as "admin" And I log in as "admin"
And I am on "Course 1" course homepage with editing mode on And I add a folder activity to course "Course 1" section "0"
And I add a "Folder" to section "0"
And I set the following fields to these values: And I set the following fields to these values:
| Name | Folder resource | | Name | Folder resource |
| Description | The description | | Description | The description |

View file

@ -23,8 +23,7 @@ Feature: Create shortcuts
And I upload "lib/tests/fixtures/empty.txt" file to "Files" filemanager And I upload "lib/tests/fixtures/empty.txt" file to "Files" filemanager
Then I should see "empty.txt" in the "div.fp-content" "css_element" Then I should see "empty.txt" in the "div.fp-content" "css_element"
And I press "Save changes" And I press "Save changes"
And I am on "Course 1" course homepage with editing mode on And I add a folder activity to course "Course 1" section "1"
And I add a "Folder" to section "1"
And I set the following fields to these values: And I set the following fields to these values:
| Name | Test folder | | Name | Test folder |
| Description | Test folder description | | Description | Test folder description |

View file

@ -32,7 +32,7 @@ Feature: Overwrite file feature
And I should see "2" elements in "Files" filemanager And I should see "2" elements in "Files" filemanager
And I press "Save changes" And I press "Save changes"
And I am on "Course 1" course homepage with editing mode on And I am on "Course 1" course homepage with editing mode on
And I add a "Folder" to section "1" And I add a folder activity to course "Course 1" section "1"
And I set the following fields to these values: And I set the following fields to these values:
| Name | Test folder | | Name | Test folder |
| Description | Test folder description | | Description | Test folder description |

View file

@ -11,7 +11,7 @@ Feature: Zip folders and unzip compressed files
| Course 1 | C1 | 0 | | Course 1 | C1 | 0 |
And I log in as "admin" And I log in as "admin"
And I am on "Course 1" course homepage with editing mode on And I am on "Course 1" course homepage with editing mode on
And I add a "Folder" to section "0" And I add a folder activity to course "Course 1" section "0"
And I set the following fields to these values: And I set the following fields to these values:
| Name | Folder resource | | Name | Folder resource |
| Description | The description | | Description | The description |