-
Bug
-
Resolution: Fixed
-
Minor
-
3.1.3, 3.2
-
MOODLE_31_STABLE, MOODLE_32_STABLE
-
MOODLE_31_STABLE, MOODLE_32_STABLE
-
MDL-57452_behat_completion_fix_master -
Items that are toggled for completion manually use a form with <input type="img" to handle the tick icon - for example:
<input type="image" src="http://mymoodle.local/theme/image.php/clean/core/1482148425/i/completion-manual-y" alt="Completed: Test Code review. Select to mark as not complete." title="Mark as not complete: Test Code review" aria-live="polite">
|
However, the behat step to test for manual completion looks only for an image:
completion/tests/behat/behat_completion.php
/**
|
* Checks if the activity with specified name is maked as complete.
|
*
|
* @Given /^the "(?P<activityname_string>(?:[^"]|\\")*)" "(?P<activitytype_string>(?:[^"]|\\")*)" activity with "(manual|auto)" completion should be marked as complete$/
|
*/
|
public function activity_marked_as_complete($activityname, $activitytype, $completiontype) {
|
if ($completiontype == "manual") {
|
$imgalttext = get_string("completion-alt-manual-y", 'core_completion', $activityname);
|
} else {
|
$imgalttext = get_string("completion-alt-auto-y", 'core_completion', $activityname);
|
}
|
$csselementforactivitytype = "li.modtype_".strtolower($activitytype);
|
|
$xpathtocheck = "//img[contains(@alt, '$imgalttext')]";
|
$this->execute("behat_general::should_exist_in_the",
|
array($xpathtocheck, "xpath_element", $csselementforactivitytype, "css_element")
|
);
|
|
}
|
- has a non-specific relationship to
-
MDLSITE-3778 POLICY: Allow multiple Given-When-Then in acceptance tests
-
- Closed
-
- has to be done before
-
MDL-57461 Behat - course completion test for activity marked as complete broken with multiple activities of same type
-
- Closed
-