diff --git a/.github/PULL_REQUEST_TEMPLATE.md b/.github/PULL_REQUEST_TEMPLATE.md index 81ba436..cabc576 100644 --- a/.github/PULL_REQUEST_TEMPLATE.md +++ b/.github/PULL_REQUEST_TEMPLATE.md @@ -1,4 +1,4 @@ -> **Note:** Please fill out all required sections and remove irrelevant ones. +> **Note:** Please fill out all relevant sections and remove irrelevant ones. ### 🔀 Purpose of this PR: - [ ] Fixes a bug diff --git a/tests/behat/download_qrcode.feature b/tests/behat/download_qrcode.feature index 602d016..14b9d3f 100644 --- a/tests/behat/download_qrcode.feature +++ b/tests/behat/download_qrcode.feature @@ -13,10 +13,9 @@ Feature: Download QR code as .png file And the following "course enrolments" exist: | user | course | role | | teacher1 | Crs1 | editingteacher | - And I log in as "teacher1" - And I am on "Course 1" course homepage with editing mode on - And I add the "QR code" block - And I log out + And the following "blocks" exist: + | blockname | contextlevel | reference | pagetypepattern | defaultregion | + | qrcode | Course | Crs1 | course-view-* | site-post | @javascript Scenario: Teacher sees the QR code and clicks on the Download button diff --git a/tests/behat/show_qrcode.feature b/tests/behat/show_qrcode.feature index 1bb6c94..ed51541 100644 --- a/tests/behat/show_qrcode.feature +++ b/tests/behat/show_qrcode.feature @@ -16,10 +16,9 @@ Feature: Display the QR code block | user | course | role | | teacher1 | Crs1 | editingteacher | | student1 | Crs1 | student | - And I log in as "teacher1" - And I am on "Course 1" course homepage with editing mode on - And I add the "QR code" block - And I log out + And the following "blocks" exist: + | blockname | contextlevel | reference | pagetypepattern | defaultregion | + | qrcode | Course | Crs1 | course-view-* | site-post | @javascript Scenario: Only enrolled students are able to see the QR code and they don't see the download button diff --git a/tests/phpunit.xml b/tests/phpunit.xml new file mode 100644 index 0000000..94c2472 --- /dev/null +++ b/tests/phpunit.xml @@ -0,0 +1,47 @@ + + + + + + + + + + + + + + + blocks/qrcode/tests + + + + + + blocks/qrcode/thirdparty + thirdparty + + + diff --git a/version.php b/version.php index f5a0007..396578b 100644 --- a/version.php +++ b/version.php @@ -26,5 +26,5 @@ $plugin->component = 'block_qrcode'; // Full name of the plugin. $plugin->maturity = MATURITY_STABLE; $plugin->release = 'v4.5-r1'; -$plugin->version = 2025022400; // The current plugin version (Date: YYYMMDDXX). +$plugin->version = 2025062400; // The current plugin version (Date: YYYMMDDXX). $plugin->requires = 2022112800; // Requires Moodle 4.1+.