diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 8df0e81..850da8e 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -2,9 +2,6 @@ name: Tests on: [push, pull_request] -env: - BEHATDUMP: downloads - jobs: ci: name: ci @@ -60,7 +57,6 @@ jobs: echo $(cd ci/bin; pwd) >> $GITHUB_PATH echo $(cd ci/vendor/bin; pwd) >> $GITHUB_PATH sudo locale-gen en_AU.UTF-8 - mkdir downloads - name: install Moodle run: moodle-plugin-ci install --db-host=127.0.0.1 --plugin this-plugin @@ -68,15 +64,6 @@ jobs: DB: ${{ matrix.database }} MOODLE_BRANCH: ${{ matrix.moodle-branch }} - - name: config - if: ${{ always() }} - run: cat config.php - working-directory: moodle - - - name: ls - if: ${{ always() }} - run: ls -aR > downloads/ls.txt - - name: phplint if: ${{ always() }} run: moodle-plugin-ci --ansi phplint @@ -134,7 +121,7 @@ jobs: - name: chrome if: ${{ always() }} - run: moodle-plugin-ci --ansi behat --profile chrome + run: moodle-plugin-ci --ansi behat --profile chrome -f moodle_screenshot - name: firefox classic if: ${{ always() }} @@ -154,8 +141,13 @@ jobs: run: moodle-plugin-ci --ansi behat --auto-rerun=0 --profile chrome admin/tool/xmldb working-directory: moodle + - name: ls + if: ${{ always() }} + run: ls -aR + working-directory: moodledata/behat_dump + - name: artifacts - uses: actions/upload-artifact@v2 - with: + uses: actions/upload-artifact@v4 + with: name: assets-for-download - path: downloads \ No newline at end of file + path: moodledata/behat_dump diff --git a/tests/behat/availability_relativedate.feature b/tests/behat/availability_relativedate.feature index 8a029c3..65512f1 100644 --- a/tests/behat/availability_relativedate.feature +++ b/tests/behat/availability_relativedate.feature @@ -125,31 +125,27 @@ Feature: availability_relativedate # Log back in as student 1. When I am on the "C1" "Course" page logged in as "student1" Then I should see "PageA" in the "region-main" "region" - # And I should see "2 hours after course start date" in the "region-main" "region" + And I should not see "2 hours after course start date" in the "region-main" "region" And I should see "PageB" in the "region-main" "region" And I should see relativedate "##+2 weeks -4 days 17:00##" But I should see "PageC" in the "region-main" "region" And I should see relativedate "##+6 weeks -1 days 17:00##" And I should see "PageD" in the "region-main" "region" - And I should see "Topic 2" in the "region-main" "region" - And I should see "Topic 3" in the "region-main" "region" And I log out # Log back in as student 2. When I am on the "C1" "Course" page logged in as "student2" And I press "Enrol me" Then I should see "PageA" in the "region-main" "region" - # And I should see "2 hours after course start date" in the "region-main" "region" + And I should not see "2 hours after course start date" in the "region-main" "region" And I should see "PageB" in the "region-main" "region" But I should see "PageC" in the "region-main" "region" And I should see "PageD" in the "region-main" "region" - And I should see "Topic 2" in the "region-main" "region" - And I should see "Topic 3" in the "region-main" "region" And I log out # Log back in as admin. When I am on the "C1" "Course" page logged in as "admin" - # Then I should see "2 hours after course start date" in the "region-main" "region" + Then I should see "2 hours after course start date" in the "region-main" "region" And I should see "4 days before course end date" in the "region-main" "region" And I should see "6 weeks after user enrolment date" in the "region-main" "region" And I should see "7 months after enrolment method end date" in the "region-main" "region"