From 789f23bb6802c7f3a18757e0f2b9a83afe1f300d Mon Sep 17 00:00:00 2001 From: gthomas2 Date: Fri, 23 Aug 2024 16:41:09 +0200 Subject: [PATCH] ALLY-12: Fix behat tests for Moodle 4.3.6 --- .github/workflows/moodle-ci.yml | 11 ++++++++++- tests/behat/behat_filter_ally.php | 14 ++++++++++++-- version.php | 4 ++-- 3 files changed, 24 insertions(+), 5 deletions(-) diff --git a/.github/workflows/moodle-ci.yml b/.github/workflows/moodle-ci.yml index 89822d0..d899a98 100644 --- a/.github/workflows/moodle-ci.yml +++ b/.github/workflows/moodle-ci.yml @@ -77,7 +77,14 @@ jobs: echo $(cd ci/bin; pwd) >> $GITHUB_PATH echo $(cd ci/vendor/bin; pwd) >> $GITHUB_PATH sudo locale-gen en_AU.UTF-8 - echo "NVM_DIR=$HOME/.nvm" >> $GITHUB_ENV + + - name: Install NVM and Node + run: | + curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.40.0/install.sh | bash + export NVM_DIR="$HOME/.nvm" + [ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh" + nvm install 20 + nvm use 20 - name: Extract branch name shell: bash @@ -87,7 +94,9 @@ jobs: # See https://moodlehq.github.io/moodle-plugin-ci/AddExtraConfig.html # for adding extra config.php values via moodle-plugin-ci. - name: Install moodle-plugin-ci + continue-on-error: false run: | + echo "NOTE: Using branch ${{ steps.extract_branch.outputs.branch }}" moodle-plugin-ci add-plugin --branch ${{ steps.extract_branch.outputs.branch }} $GITHUB_REPOSITORY_OWNER/moodle-tool_ally moodle-plugin-ci add-plugin --branch ${{ steps.extract_branch.outputs.branch }} $GITHUB_REPOSITORY_OWNER/moodle-report_allylti moodle-plugin-ci add-plugin --branch ${{ steps.extract_branch.outputs.branch }} $GITHUB_REPOSITORY_OWNER/moodle-mod_hsuforum diff --git a/tests/behat/behat_filter_ally.php b/tests/behat/behat_filter_ally.php index 5d9365b..0ae00d9 100644 --- a/tests/behat/behat_filter_ally.php +++ b/tests/behat/behat_filter_ally.php @@ -1085,12 +1085,21 @@ public function module_with_html_is_annotated($modname, $html) { /** * @param string $title - * @Given html block with title ":title" is annotated + * @Then html block with title ":title" is annotated */ public function html_block_with_title_is_annotated($title) { $this->wait_for_pending_js(); $selectors = []; - // Boost theme selector. + // Boost theme selector < Moodle 4.3 + $selectors[] = <<= Moodle 4.3 $selectors[] = <<component = 'filter_ally'; -$plugin->release = '4.3.0'; -$plugin->version = 2024062700; +$plugin->release = '4.3.6'; +$plugin->version = 2024082300; $plugin->requires = 2022041900; $plugin->maturity = MATURITY_STABLE; $plugin->dependencies = [