Skip to content

Commit

Permalink
MDL-66666 mod_forum: Add behat tests to Forum Grader
Browse files Browse the repository at this point in the history
  • Loading branch information
Chocolate-lightning committed Jun 26, 2024
1 parent 91811a4 commit 302410f
Show file tree
Hide file tree
Showing 29 changed files with 549 additions and 88 deletions.
1 change: 1 addition & 0 deletions grade/grading/form/rubric/lang/en/gradingform_rubric.php
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,7 @@
$string['regradeoption0'] = 'Do not mark for regrade';
$string['regradeoption1'] = 'Mark for regrade';
$string['restoredfromdraft'] = 'NOTE: The last attempt to grade this person was not saved properly so draft grades have been restored. If you want to cancel these changes use the \'Cancel\' button below.';
$string['remark'] = '{$a} remark';
$string['rubric'] = 'Rubric';
$string['rubricmapping'] = 'Score to grade mapping rules';
$string['rubricmappingexplained'] = 'The minimum possible score for this rubric is <b>{$a->minscore} points</b>. It will be converted to the minimum grade available for the activity (which is 0 unless a scale is used). The maximum score of <b>{$a->maxscore} points</b> will be converted to the maximum grade. Intermediate scores will be converted respectively.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -85,12 +85,10 @@
id="advancedgrading-criteria-{{criterionid}}-levels-{{id}}-definition"
value="{{id}}"
{{#checked}}
aria-checked="true"
tabindex="0"
checked
{{/checked}}
{{^checked}}
aria-checked="false"
tabindex="-1"
{{/checked}}
>
Expand All @@ -107,6 +105,7 @@
<div class="form-group">
<label class="text-muted" for="advancedgrading-criteria-{{id}}-remark">{{#str}} additionalfeedback, core_grades {{/str}}</label>
<textarea class="form-control"
aria-label="{{#str}}remark, gradingform_rubric, {{description}}{{/str}}"
name="advancedgrading[criteria][{{id}}][remark]"
id="advancedgrading-criteria-{{id}}-remark"
cols="10"
Expand Down
6 changes: 6 additions & 0 deletions lib/behat/classes/partial_named_selector.php
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,8 @@ public function __construct() {
'group_message' => 'group_message',
'autocomplete' => 'autocomplete',
'iframe' => 'iframe',
'option_role' => 'option_role',
'Fullscreen interface' => 'fullscreen_interface',
);

/**
Expand Down Expand Up @@ -132,6 +134,7 @@ public function __construct() {
'autocomplete_suggestions' => 'autocomplete_suggestions',
'autocomplete' => 'autocomplete',
'iframe' => 'iframe',
'Fullscreen interface' => 'fullscreen_interface',
);

/**
Expand Down Expand Up @@ -292,6 +295,9 @@ public function __construct() {
XPATH
, 'iframe' => <<<XPATH
.//iframe[(%idOrNameMatch% or (contains(concat(' ', normalize-space(@class), ' '), %locator% )))]
XPATH
, 'fullscreen_interface' => <<<XPATH
.//div[contains(concat(' ', normalize-space(@class), ' '), ' fullscreen ')][%ariaLabelMatch%]
XPATH
);

Expand Down
10 changes: 10 additions & 0 deletions mod/forum/amd/build/grader.min.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions mod/forum/amd/build/grader.min.js.map

Large diffs are not rendered by default.

11 changes: 11 additions & 0 deletions mod/forum/amd/build/local/grader/selectors.min.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit 302410f

Please sign in to comment.