Skip to content

Commit

Permalink
Moodle CI fix
Browse files Browse the repository at this point in the history
  • Loading branch information
prasanna-lmsace committed Sep 27, 2023
1 parent c9fbcd4 commit 60d9f83
Show file tree
Hide file tree
Showing 5 changed files with 13 additions and 9 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -169,5 +169,3 @@ Feature: Configuring the pulseaction_notification plugin on the "Automation temp
| recipient | studentshouldorshouldnot | teachershouldorshouldnot |
| Student | should | should not |
| Teacher | should not | should |


4 changes: 3 additions & 1 deletion classes/table/auto_instances.php
Original file line number Diff line number Diff line change
Expand Up @@ -213,7 +213,9 @@ public function col_actions($row) {
'custom-control custom-switch'
);
$statusurl = new \moodle_url($listurl, array('action' => ($row->status) ? 'disable' : 'enable'));
$actions[] = html_writer::link($statusurl->out(false), $checkbox, ['class' => 'pulse-instance-status-switch action-hide']);
$statusclass = 'pulse-instance-status-switch ';
$statusclass .= $row->status ? 'action-hide' : 'action-show';
$actions[] = html_writer::link($statusurl->out(false), $checkbox, ['class' => $statusclass]);

// Delete.
$actions[] = array(
Expand Down
6 changes: 6 additions & 0 deletions styles.css
Original file line number Diff line number Diff line change
Expand Up @@ -347,3 +347,9 @@
#page-mod-pulse-automation-instances-edit .pulse-warnings li span {
color: initial;
}

/* Behat issue fix for auto instance */
body.behat-site .pulse-instance-status-switch input.custom-control-input {
position: relative;
z-index: -1;
}
8 changes: 3 additions & 5 deletions tests/behat/pulse_automation_template.feature
Original file line number Diff line number Diff line change
Expand Up @@ -118,16 +118,14 @@ Feature: Pulse automation templates
Then I should see "WELCOME MESSAGE" in the ".template-add-form .custom-select" "css_element"
And I navigate to "Plugins > Activity modules > Pulse > Automation templates" in site administration
Then I click on ".action-edit" "css_element" in the "WELCOME MESSAGE" "table_row"
And I set the field "Status" to "Disable"
And I set the field "Visibility" to "Hidden"
Then I press "Save changes"
And I am on "Course 1" course homepage
And I follow "Automation"
And ".template-add-form .custom-select#id_templateid" "css_element" should not exist
Then I should not see "WELCOME MESSAGE" in the ".template-add-form" "css_element"
And I navigate to "Plugins > Activity modules > Pulse > Automation templates" in site administration
Then I click on "input[name='status']" "css_element" in the "WELCOME MESSAGE" "table_row"
And I should see "Update Template" in the ".modal" "css_element"
And I click on "Update Template" "button" in the ".modal-footer" "css_element"
Then I click on ".action-show" "css_element" in the "WELCOME MESSAGE" "table_row"
And I am on "Course 1" course homepage
And I follow "Automation"
And ".template-add-form .custom-select#id_templateid" "css_element" should exist
Expand Down Expand Up @@ -266,7 +264,7 @@ Feature: Pulse automation templates
And I should see "1(0)" in the "notification" "table_row"
And I am on "Course 1" course homepage
And I follow "Automation"
Then I click on ".action-hide" "css_element" in the "Welcomemessageinstance" "table_row"
Then I click on ".pulse-instance-status-switch" "css_element" in the "Welcomemessageinstance" "table_row"
And I navigate to "Plugins > Activity modules > Pulse > Automation templates" in site administration
And I should see "3(1)" in the "WELCOME MESSAGE" "table_row"
And I should see "1(0)" in the "notification" "table_row"
Expand Down
2 changes: 1 addition & 1 deletion version.php
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
defined('MOODLE_INTERNAL') || die();

$plugin->component = 'mod_pulse';
$plugin->version = 2023051835;
$plugin->version = 2023051836;
$plugin->requires = 2020061500; // Requires Moodle 3.90.
$plugin->release = 'v2.0';
$plugin->maturity = MATURITY_STABLE;
Expand Down

0 comments on commit 60d9f83

Please sign in to comment.