Skip to content

Commit

Permalink
Reformat code in theme_boost_union_functionalitysettings_courses.feature
Browse files Browse the repository at this point in the history
  • Loading branch information
abias committed Apr 21, 2024
1 parent d1a5080 commit 6042250
Showing 1 changed file with 80 additions and 80 deletions.
160 changes: 80 additions & 80 deletions tests/behat/theme_boost_union_functionalitysettings_courses.feature
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ Feature: Configuring the theme_boost_union plugin for the "Courses" tab on the "

Scenario: Setting: Show hint for switched role - Enable the setting
Given the following config values are set as admin:
| config | value | plugin |
| config | value | plugin |
| showswitchedroleincourse | yes | theme_boost_union |
When I log in as "teacher1"
And I am on "Course 1" course homepage
Expand All @@ -32,7 +32,7 @@ Feature: Configuring the theme_boost_union plugin for the "Courses" tab on the "

Scenario: Setting: Show hint in hidden courses - Enable the setting
Given the following config values are set as admin:
| config | value | plugin |
| config | value | plugin |
| showhintcoursehidden | yes | theme_boost_union |
When I log in as "teacher1"
And I am on "Course 1" course homepage
Expand All @@ -51,7 +51,7 @@ Feature: Configuring the theme_boost_union plugin for the "Courses" tab on the "

Scenario: Setting: Show hint guest for access - Enable the setting
Given the following config values are set as admin:
| config | value | plugin |
| config | value | plugin |
| showhintcourseguestaccess | yes | theme_boost_union |
And the following "users" exist:
| username |
Expand Down Expand Up @@ -93,7 +93,7 @@ Feature: Configuring the theme_boost_union plugin for the "Courses" tab on the "

Scenario: Setting: Show hint for self enrolment without enrolment key - Enable the setting
Given the following config values are set as admin:
| config | value | plugin |
| config | value | plugin |
| showhintcourseselfenrol | yes | theme_boost_union |
When I log in as "teacher1"
And I am on "Course 1" course homepage
Expand All @@ -112,7 +112,7 @@ Feature: Configuring the theme_boost_union plugin for the "Courses" tab on the "

Scenario: Setting: Show hint for self enrolment without enrolment key - Enable the setting and check that the call for action is shown
Given the following config values are set as admin:
| config | value | plugin |
| config | value | plugin |
| showhintcourseselfenrol | yes | theme_boost_union |
And the following "users" exist:
| username |
Expand Down Expand Up @@ -146,7 +146,7 @@ Feature: Configuring the theme_boost_union plugin for the "Courses" tab on the "

Scenario: Setting: Show hint for self enrolment without an enrolment key - Enable the setting and check that it is hidden when new enrolments are disabled
Given the following config values are set as admin:
| config | value | plugin |
| config | value | plugin |
| showhintcourseselfenrol | yes | theme_boost_union |
When I log in as "teacher1"
And I am on "Course 1" course homepage
Expand All @@ -167,7 +167,7 @@ Feature: Configuring the theme_boost_union plugin for the "Courses" tab on the "

Scenario: Setting: Show hint for self enrolment without an enrolment key - Enable the setting and check that it is hidden when a password is set
Given the following config values are set as admin:
| config | value | plugin |
| config | value | plugin |
| showhintcourseselfenrol | yes | theme_boost_union |
When I log in as "teacher1"
And I am on "Course 1" course homepage
Expand All @@ -188,7 +188,7 @@ Feature: Configuring the theme_boost_union plugin for the "Courses" tab on the "

Scenario: Setting: Show hint for self enrolment without an enrolment key - Enable the setting and check the hints depending on the configured start and / or end dates
Given the following config values are set as admin:
| config | value | plugin |
| config | value | plugin |
| showhintcourseselfenrol | yes | theme_boost_union |
When I log in as "teacher1"
And I am on "Course 1" course homepage
Expand All @@ -202,29 +202,29 @@ Feature: Configuring the theme_boost_union plugin for the "Courses" tab on the "
And ".course-hint-selfenrol" "css_element" should exist
When I click on "Self enrolment (Student)" "link" in the ".course-hint-selfenrol" "css_element"
And I set the following fields to these values:
| id_enrolstartdate_enabled | 0 |
| id_enrolenddate_enabled | 1 |
| id_enrolstartdate_enabled | 0 |
| id_enrolenddate_enabled | 1 |
# We can't use the ##yesterday## notation here.
| id_enrolenddate_day | 1 |
| id_enrolenddate_month | January |
| id_enrolenddate_year | 2019 |
| id_enrolenddate_hour | 00 |
| id_enrolenddate_minute | 00 |
| id_enrolenddate_day | 1 |
| id_enrolenddate_month | January |
| id_enrolenddate_year | 2019 |
| id_enrolenddate_hour | 00 |
| id_enrolenddate_minute | 00 |
And I press "Save changes"
And I am on "Course 1" course homepage
Then I should not see "This course is currently visible to everyone and self enrolment without an enrolment key is"
And ".course-hint-selfenrol" "css_element" should not exist
When I am on the "Course 1" "enrolment methods" page
And I click on "Edit" "link" in the "Self enrolment (Student)" "table_row"
And I set the following fields to these values:
| id_enrolstartdate_enabled | 0 |
| id_enrolenddate_enabled | 1 |
| id_enrolstartdate_enabled | 0 |
| id_enrolenddate_enabled | 1 |
# We can't use the ##tomorrow## notation here. This test will break in the year 2050.
| id_enrolenddate_day | 1 |
| id_enrolenddate_month | January |
| id_enrolenddate_year | 2050 |
| id_enrolenddate_hour | 00 |
| id_enrolenddate_minute | 00 |
| id_enrolenddate_day | 1 |
| id_enrolenddate_month | January |
| id_enrolenddate_year | 2050 |
| id_enrolenddate_hour | 00 |
| id_enrolenddate_minute | 00 |
And I press "Save changes"
And I am on "Course 1" course homepage
Then I should see "This course is currently visible to everyone and self enrolment without an enrolment key is possible."
Expand All @@ -233,14 +233,14 @@ Feature: Configuring the theme_boost_union plugin for the "Courses" tab on the "
When I am on the "Course 1" "enrolment methods" page
And I click on "Edit" "link" in the "Self enrolment (Student)" "table_row"
And I set the following fields to these values:
| id_enrolstartdate_enabled | 1 |
| id_enrolstartdate_enabled | 1 |
# We can't use the ##yesterday## notation here.
| id_enrolstartdate_day | 1 |
| id_enrolstartdate_month | January |
| id_enrolstartdate_year | 2019 |
| id_enrolstartdate_hour | 00 |
| id_enrolstartdate_minute | 00 |
| id_enrolenddate_enabled | 0 |
| id_enrolstartdate_day | 1 |
| id_enrolstartdate_month | January |
| id_enrolstartdate_year | 2019 |
| id_enrolstartdate_hour | 00 |
| id_enrolstartdate_minute | 00 |
| id_enrolenddate_enabled | 0 |
And I press "Save changes"
And I am on "Course 1" course homepage
Then I should see "This course is currently visible to everyone and self enrolment without an enrolment key is possible."
Expand All @@ -249,14 +249,14 @@ Feature: Configuring the theme_boost_union plugin for the "Courses" tab on the "
When I am on the "Course 1" "enrolment methods" page
And I click on "Edit" "link" in the "Self enrolment (Student)" "table_row"
And I set the following fields to these values:
| id_enrolstartdate_enabled | 1 |
| id_enrolstartdate_enabled | 1 |
# We can't use the ##tomorrow## notation here. This test will break in the year 2050.
| id_enrolstartdate_day | 1 |
| id_enrolstartdate_month | January |
| id_enrolstartdate_year | 2050 |
| id_enrolstartdate_hour | 00 |
| id_enrolstartdate_minute | 00 |
| id_enrolenddate_enabled | 0 |
| id_enrolstartdate_day | 1 |
| id_enrolstartdate_month | January |
| id_enrolstartdate_year | 2050 |
| id_enrolstartdate_hour | 00 |
| id_enrolstartdate_minute | 00 |
| id_enrolenddate_enabled | 0 |
And I press "Save changes"
And I am on "Course 1" course homepage
Then I should see "This course is currently visible to everyone and self enrolment without an enrolment key is planned to become possible."
Expand All @@ -265,20 +265,20 @@ Feature: Configuring the theme_boost_union plugin for the "Courses" tab on the "
When I am on the "Course 1" "enrolment methods" page
And I click on "Edit" "link" in the "Self enrolment (Student)" "table_row"
And I set the following fields to these values:
| id_enrolstartdate_enabled | 1 |
| id_enrolstartdate_enabled | 1 |
# We can't use the ##Monday next week## notation here. This test will break in the year 2050.
| id_enrolstartdate_day | 1 |
| id_enrolstartdate_month | January |
| id_enrolstartdate_year | 2050 |
| id_enrolstartdate_hour | 00 |
| id_enrolstartdate_minute | 00 |
| id_enrolenddate_enabled | 1 |
| id_enrolstartdate_day | 1 |
| id_enrolstartdate_month | January |
| id_enrolstartdate_year | 2050 |
| id_enrolstartdate_hour | 00 |
| id_enrolstartdate_minute | 00 |
| id_enrolenddate_enabled | 1 |
# We can't use the ##Tuesday next week## notation here. This test will break in the year 2050.
| id_enrolenddate_day | 2 |
| id_enrolenddate_month | January |
| id_enrolenddate_year | 2050 |
| id_enrolenddate_hour | 00 |
| id_enrolenddate_minute | 00 |
| id_enrolenddate_day | 2 |
| id_enrolenddate_month | January |
| id_enrolenddate_year | 2050 |
| id_enrolenddate_hour | 00 |
| id_enrolenddate_minute | 00 |
And I press "Save changes"
And I am on "Course 1" course homepage
Then I should see "This course is currently visible to everyone and self enrolment without an enrolment key is planned to become possible."
Expand All @@ -287,20 +287,20 @@ Feature: Configuring the theme_boost_union plugin for the "Courses" tab on the "
When I am on the "Course 1" "enrolment methods" page
And I click on "Edit" "link" in the "Self enrolment (Student)" "table_row"
And I set the following fields to these values:
| id_enrolstartdate_enabled | 1 |
| id_enrolstartdate_enabled | 1 |
# We can't use the ##yesterday## notation here.
| id_enrolstartdate_day | 1 |
| id_enrolstartdate_month | January |
| id_enrolstartdate_year | 2019 |
| id_enrolstartdate_hour | 00 |
| id_enrolstartdate_minute | 00 |
| id_enrolenddate_enabled | 1 |
| id_enrolstartdate_day | 1 |
| id_enrolstartdate_month | January |
| id_enrolstartdate_year | 2019 |
| id_enrolstartdate_hour | 00 |
| id_enrolstartdate_minute | 00 |
| id_enrolenddate_enabled | 1 |
# We can't use the ##tomorrow## notation here. This test will break in the year 2050.
| id_enrolenddate_day | 1 |
| id_enrolenddate_month | January |
| id_enrolenddate_year | 2050 |
| id_enrolenddate_hour | 00 |
| id_enrolenddate_minute | 00 |
| id_enrolenddate_day | 1 |
| id_enrolenddate_month | January |
| id_enrolenddate_year | 2050 |
| id_enrolenddate_hour | 00 |
| id_enrolenddate_minute | 00 |
And I press "Save changes"
And I am on "Course 1" course homepage
Then I should see "This course is currently visible to everyone and self enrolment without an enrolment key is possible."
Expand All @@ -309,28 +309,28 @@ Feature: Configuring the theme_boost_union plugin for the "Courses" tab on the "
When I am on the "Course 1" "enrolment methods" page
And I click on "Edit" "link" in the "Self enrolment (Student)" "table_row"
And I set the following fields to these values:
| id_enrolstartdate_enabled | 1 |
| id_enrolstartdate_enabled | 1 |
# We can't use the ##3 days ago## notation here.
| id_enrolstartdate_day | 1 |
| id_enrolstartdate_month | January |
| id_enrolstartdate_year | 2018 |
| id_enrolstartdate_hour | 00 |
| id_enrolstartdate_minute | 00 |
| id_enrolenddate_enabled | 1 |
| id_enrolstartdate_day | 1 |
| id_enrolstartdate_month | January |
| id_enrolstartdate_year | 2018 |
| id_enrolstartdate_hour | 00 |
| id_enrolstartdate_minute | 00 |
| id_enrolenddate_enabled | 1 |
# We can't use the ##2 days ago## notation here.
| id_enrolenddate_day | 1 |
| id_enrolenddate_month | January |
| id_enrolenddate_year | 2019 |
| id_enrolenddate_hour | 00 |
| id_enrolenddate_minute | 00 |
| id_enrolenddate_day | 1 |
| id_enrolenddate_month | January |
| id_enrolenddate_year | 2019 |
| id_enrolenddate_hour | 00 |
| id_enrolenddate_minute | 00 |
And I press "Save changes"
And I am on "Course 1" course homepage
Then I should not see "This course is currently visible to everyone and self enrolment without an enrolment key is"
And ".course-hint-selfenrol" "css_element" should not exist

Scenario: Setting: Show hint for self enrolment without an enrolment key - Enable the setting and add more than one self enrolment instance
Given the following config values are set as admin:
| config | value | plugin |
| config | value | plugin |
| showhintcourseselfenrol | yes | theme_boost_union |
When I log in as "teacher1"
And I am on "Course 1" course homepage
Expand All @@ -347,14 +347,14 @@ Feature: Configuring the theme_boost_union plugin for the "Courses" tab on the "
And I am on the "Course 1" "enrolment methods" page
And I click on "Edit" "link" in the "Custom self enrolment" "table_row"
And I set the following fields to these values:
| id_enrolstartdate_enabled | 0 |
| id_enrolenddate_enabled | 1 |
| id_enrolstartdate_enabled | 0 |
| id_enrolenddate_enabled | 1 |
# We can't use the ##tomorrow## notation here. This test will break in the year 2050.
| id_enrolenddate_day | 1 |
| id_enrolenddate_month | January |
| id_enrolenddate_year | 2050 |
| id_enrolenddate_hour | 00 |
| id_enrolenddate_minute | 00 |
| id_enrolenddate_day | 1 |
| id_enrolenddate_month | January |
| id_enrolenddate_year | 2050 |
| id_enrolenddate_hour | 00 |
| id_enrolenddate_minute | 00 |
And I press "Save changes"
And I am on "Course 1" course homepage
Then I should see "This course is currently visible to everyone and self enrolment without an enrolment key is possible."
Expand Down

0 comments on commit 6042250

Please sign in to comment.