Skip to content

Commit

Permalink
code review
Browse files Browse the repository at this point in the history
  • Loading branch information
rdebleu committed Mar 9, 2024
1 parent d73f52c commit 49e174e
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 24 deletions.
26 changes: 9 additions & 17 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,6 @@ name: Tests

on: [push, pull_request]

env:
BEHATDUMP: downloads

jobs:
ci:
name: ci
Expand Down Expand Up @@ -60,23 +57,13 @@ 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
env:
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
Expand Down Expand Up @@ -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() }}
Expand All @@ -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
path: moodledata/behat_dump
10 changes: 3 additions & 7 deletions tests/behat/availability_relativedate.feature
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down

0 comments on commit 49e174e

Please sign in to comment.