-
Notifications
You must be signed in to change notification settings - Fork 60
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Improvement: Allow the admin to change the look of the course overvie…
…w block, solves #204
- Loading branch information
1 parent
5226604
commit 551ec36
Showing
8 changed files
with
201 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
71 changes: 71 additions & 0 deletions
71
tests/behat/theme_boost_union_looksettings_dashboardmycourses.feature
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,71 @@ | ||
@theme @theme_boost_union @theme_boost_union_looksettings @theme_boost_union_looksettings_dashboardmycourses | ||
Feature: Configuring the theme_boost_union plugin for the "Dashboard/My courses" tab on the "Look" page | ||
In order to use the features | ||
As admin | ||
I need to be able to configure the theme Boost Union plugin | ||
|
||
Background: | ||
Given the following "users" exist: | ||
| username | | ||
| student1 | | ||
And the following "courses" exist: | ||
| fullname | shortname | enablecompletion | showcompletionconditions | | ||
| Course 1 | C1 | 1 | 1 | | ||
| Course 2 | C2 | 1 | 1 | | ||
And the following "activities" exist: | ||
| activity | name | course | completion | | ||
| assign | Activity sample 1 | C1 | 1 | | ||
And the following "course enrolments" exist: | ||
| user | course | role | | ||
| student1 | C1 | student | | ||
| student1 | C2 | student | | ||
|
||
@javascript | ||
Scenario Outline: Setting: Show course images - Display the course completion progress in the myoverview block or not | ||
Given the following config values are set as admin: | ||
| config | value | plugin | | ||
| courseoverviewshowcourseprogress | <settingvalue> | theme_boost_union | | ||
When I log in as "admin" | ||
And I navigate to "Development > Purge caches" in site administration | ||
And I press "Purge all caches" | ||
And I log out | ||
And I log in as "student1" | ||
And I follow "My courses" | ||
Then I <shouldornot> see "0% complete" in the ".block_myoverview.block div[data-region=courses-view]" "css_element" | ||
Examples: | ||
| settingvalue | shouldornot | | ||
| yes | should | | ||
| no | should not | | ||
|
||
@javascript | ||
Scenario Outline: Setting: Show course images - Display the course image in the myoverview block or not | ||
Given the following config values are set as admin: | ||
| config | value | plugin | | ||
| courseoverviewshowcourseimages | <settingvalue> | theme_boost_union | | ||
When I log in as "admin" | ||
And I navigate to "Development > Purge caches" in site administration | ||
And I press "Purge all caches" | ||
And I log out | ||
And I log in as "student1" | ||
And I follow "My courses" | ||
Then I should see "Course overview" in the "#region-main" "css_element" | ||
And I click on "#displaydropdown" "css_element" in the "section.block_myoverview" "css_element" | ||
And I click on "[data-value=card]" "css_element" in the ".dropdown-menu.show" "css_element" | ||
And ".block_myoverview.block div[data-region=courses-view] .dashboard-card-img" "css_element" <shouldornotcard> be visible | ||
And I click on "#displaydropdown" "css_element" in the "section.block_myoverview" "css_element" | ||
And I click on "[data-value=list]" "css_element" in the ".dropdown-menu.show" "css_element" | ||
And ".block_myoverview.block div[data-region=courses-view] .course-listitem:not(.course-summaryitem) > .row > .col-md-2" "css_element" <shouldornotlist> be visible | ||
And I click on "#displaydropdown" "css_element" in the "section.block_myoverview" "css_element" | ||
And I click on "[data-value=summary]" "css_element" in the ".dropdown-menu.show" "css_element" | ||
And ".block_myoverview.block div[data-region=courses-view] .course-summaryitem > .row > .col-md-2" "css_element" <shouldornotsummary> be visible | ||
|
||
Examples: | ||
| settingvalue | shouldornotcard | shouldornotlist | shouldornotsummary | | ||
| card,list,summary | should | should | should | | ||
| card,list | should | should | should not | | ||
| card,summary | should | should not | should | | ||
| list,summary | should not | should | should | | ||
| card | should | should not | should not | | ||
| list | should not | should | should not | | ||
| summary | should not | should not | should | | ||
| | should not | should not | should not | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters