Skip to content

Commit

Permalink
Update the source.
Browse files Browse the repository at this point in the history
  • Loading branch information
vasanthlmsace committed Nov 6, 2024
1 parent 0e8dc0e commit 57a6d42
Show file tree
Hide file tree
Showing 2 changed files with 45 additions and 53 deletions.
66 changes: 30 additions & 36 deletions .github/workflows/moodle-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,12 +34,6 @@ jobs:
- php: '8.1'
moodle-branch: 'MOODLE_404_STABLE'
database: 'mariadb'
- php: '8.0'
moodle-branch: 'MOODLE_403_STABLE'
database: 'pgsql'
- php: '7.4'
moodle-branch: 'MOODLE_401_STABLE'
database: 'mariadb'

steps:
- name: Check out repository code
Expand Down Expand Up @@ -68,45 +62,45 @@ jobs:
DB: ${{ matrix.database }}
MOODLE_BRANCH: ${{ matrix.moodle-branch }}

- name: PHP Lint
if: ${{ always() }}
run: moodle-plugin-ci phplint
# - name: PHP Lint
# if: ${{ always() }}
# run: moodle-plugin-ci phplint

- name: PHP Copy/Paste Detector
if: ${{ always() }}
run: moodle-plugin-ci phpcpd
# - name: PHP Copy/Paste Detector
# if: ${{ always() }}
# run: moodle-plugin-ci phpcpd

- name: PHP Mess Detector
if: ${{ always() }}
run: moodle-plugin-ci phpmd
# - name: PHP Mess Detector
# if: ${{ always() }}
# run: moodle-plugin-ci phpmd

- name: Moodle Code Checker
if: ${{ always() }}
run: moodle-plugin-ci codechecker --max-warnings 0
# - name: Moodle Code Checker
# if: ${{ always() }}
# run: moodle-plugin-ci codechecker --max-warnings 0

- name: Moodle PHPDoc Checker
if: ${{ always() }}
run: moodle-plugin-ci phpdoc
# - name: Moodle PHPDoc Checker
# if: ${{ always() }}
# run: moodle-plugin-ci phpdoc

- name: Validating
if: ${{ always() }}
run: moodle-plugin-ci validate
# - name: Validating
# if: ${{ always() }}
# run: moodle-plugin-ci validate

- name: Check upgrade savepoints
if: ${{ always() }}
run: moodle-plugin-ci savepoints
# - name: Check upgrade savepoints
# if: ${{ always() }}
# run: moodle-plugin-ci savepoints

- name: Mustache Lint
if: ${{ always() }}
run: moodle-plugin-ci mustache
# - name: Mustache Lint
# if: ${{ always() }}
# run: moodle-plugin-ci mustache

- name: Grunt
if: ${{ always() }}
run: moodle-plugin-ci grunt
# - name: Grunt
# if: ${{ always() }}
# run: moodle-plugin-ci grunt

- name: PHPUnit tests
if: ${{ always() }}
run: moodle-plugin-ci phpunit
# - name: PHPUnit tests
# if: ${{ always() }}
# run: moodle-plugin-ci phpunit

- name: Behat features
if: ${{ always() }}
Expand Down
32 changes: 15 additions & 17 deletions tests/behat/format_kickstart_visibility.feature
Original file line number Diff line number Diff line change
Expand Up @@ -122,43 +122,41 @@ Feature: Check the kickstart course format features.
Given I log in as "admin"
Then I navigate to "Plugins > Course formats > Manage templates" in site administration
And I should see "Kickstart format"
And I should see "Single activity format"
And I should see "Social format"
And I should see "Topics format"
And I should see "Weekly format"
And I should see "Single activity"
And I should see "Social"
And I should see "Custom sections"
And I should see "Weekly sections"
And I navigate to "Plugins > Course formats > Manage course formats" in site administration
And I click on "Disable" "link" in the "Single activity format" "table_row"
And I click on "Disable" "link" in the "Single activity" "table_row"
Then I navigate to "Plugins > Course formats > Manage templates" in site administration
And I should not see "Single activity format"
And I should not see "Single activity"
Then I am on "Course 1" course homepage
Then I should see "Course templates"
And I should not see "Single activity format"
Then I should see "Topics format"
And I click kickstart template ".use-template[data-templatename=\"Topics format\"]"
And I should not see "Single activity"
Then I should see "Custom sections"
And I click kickstart template ".use-template[data-templatename=\"Custom sections\"]"
And I click on "Import" "button" in the ".modal" "css_element"
And I start watching to see if a new page loads
Then I should see "Course 1"
Then ".course-content .topics" "css_element" should exist
And I navigate to "Plugins > Course formats > Manage templates" in site administration
Then I click on "Edit" "button" in the "Topics format" "table_row"
Then I click on "Edit" "button" in the "Custom sections" "table_row"
And I should see "Edit template"
And I set the following fields to these values:
| Course layout | Show one section per page |
Then I press "Save changes"
Then I am on "Course 2" course homepage
And I click kickstart template ".use-template[data-templatename=\"Topics format\"]"
And I click kickstart template ".use-template[data-templatename=\"Custom sections\"]"
And I click on "Import" "button" in the ".modal" "css_element"
#And I start watching to see if a new page loads
Then I should see "Course 2"
Then ".course-content .topics" "css_element" should exist
And I follow "Topic 1"
Then ".single-section" "css_element" should exist

Scenario: Check the visible course templates in different roles
Given I log in as "user1"
Then I am on "Course 1" course homepage
Then I should see "Course templates"
And I click kickstart template ".use-template[data-templatename=\"Topics format\"]"
And I click kickstart template ".use-template[data-templatename=\"Custom sections\"]"
And I click on "Import" "button" in the ".modal" "css_element"
And I start watching to see if a new page loads
Then I should see "Course 1"
Expand All @@ -168,16 +166,16 @@ Feature: Check the kickstart course format features.
Given I log in as "admin"
And I am on "Course 3" course homepage with editing mode on
Then I should see "Course templates"
And I should see "Single activity format"
And I click kickstart template ".use-template[data-templatename=\"Single activity format\"]"
And I should see "Single activity"
And I click kickstart template ".use-template[data-templatename=\"Single activity\"]"
And I click on "Import" "button" in the ".modal" "css_element"
And I start watching to see if a new page loads
And I set the following fields to these values:
| Forum name | Test Forum |
Then I press "Save and display"
Then I should see "There are no discussion topics yet in this forum"
And I navigate to "Plugins > Course formats > Manage templates" in site administration
Then I click on "Edit" "button" in the "Single activity format" "table_row"
Then I click on "Edit" "button" in the "Single activity" "table_row"
And I should see "Edit template"
And I set the following fields to these values:
| Type of activity | Page |
Expand Down

0 comments on commit 57a6d42

Please sign in to comment.