MDL-66109 behat: Require newline at EOF
authorAndrew Nicols <andrew@nicols.co.uk>
Mon, 11 May 2020 02:57:28 +0000 (10:57 +0800)
committerAndrew Nicols <andrew@nicols.co.uk>
Mon, 11 May 2020 03:07:49 +0000 (11:07 +0800)
This change enables the gherkinlint rule to require a new line at the
end of the file. This change is in keeping with existing Moodle coding
style guidelines.

37 files changed:
.gherkin-lintrc
admin/tests/behat/filter_users.feature
admin/tool/uploadcourse/tests/behat/create.feature
admin/tool/uploadcourse/tests/behat/update.feature
admin/tool/uploaduser/tests/behat/upload_users.feature
backup/util/ui/tests/behat/restore_moodle2_courses_settings.feature
badges/tests/behat/award_badge_groups.feature
blocks/recentlyaccesseditems/tests/behat/block_recentlyaccesseditems_dashboard.feature
contentbank/contenttype/h5p/tests/behat/admin_upload_content.feature
contentbank/tests/behat/access_permissions.feature
contentbank/tests/behat/events.feature
course/format/singleactivity/tests/behat/edit_format_course.feature
course/tests/behat/create_delete_course.feature
course/tests/behat/edit_settings.feature
customfield/field/date/tests/behat/field.feature
customfield/tests/behat/unique_field.feature
enrol/guest/tests/behat/guest_access.feature
group/tests/behat/create_groups.feature
group/tests/behat/group_description.feature
message/tests/behat/message_manage_notification_preferences.feature
message/tests/behat/message_preferences.feature
mod/assign/tests/behat/hide_grader.feature
mod/data/tests/behat/add_entries.feature
mod/forum/tests/behat/add_forum_inline.feature
mod/forum/tests/behat/favourite_discussion.feature
mod/forum/tests/behat/inpage_reply.feature
mod/lesson/tests/behat/import_fillintheblank_question.feature
mod/lesson/tests/behat/lesson_student_dashboard.feature
mod/lesson/tests/behat/teacher_grade_essays.feature
mod/scorm/tests/behat/completion_condition_require_status.feature
mod/scorm/tests/behat/multisco_review_mode.feature
mod/wiki/tests/behat/reset_wiki_comments_tags_files.feature
report/configlog/tests/behat/view_report.feature
theme/boost/tests/behat/settingstabs.feature
theme/boost/tests/behat/tour_filter.feature
user/tests/behat/course_preference.feature
user/tests/behat/custom_profile_fields.feature

index 55aef1f..a835723 100644 (file)
@@ -18,5 +18,6 @@
   "no-trailing-spaces": "on",
   "no-unnamed-features": "on",
   "no-unnamed-scenarios": "on",
-  "no-scenario-outlines-without-examples": "on"
+  "no-scenario-outlines-without-examples": "on",
+  "new-line-at-eof": ["on", "yes"]
 }
index 51e7960..c11b613 100644 (file)
@@ -115,4 +115,4 @@ Feature: An administrator can filter user accounts by role, cohort and other pro
     And I set the field "id_department" to "red"
     And I press "Add filter"
     And I should see "User One"
-    And I should not see "User Two"
\ No newline at end of file
+    And I should not see "User Two"
index a17fc2f..75ae6cd 100644 (file)
@@ -104,4 +104,4 @@ Feature: An admin can create courses using a CSV file
     And I should see "Field 2: 1 June 2020"
     And I should see "Field 3: b"
     And I should see "Field 4: Hello"
-    And I should see "Field 5: Some text"
\ No newline at end of file
+    And I should see "Field 5: Some text"
index dbca1f4..3d86dc6 100644 (file)
@@ -56,4 +56,4 @@ Feature: An admin can update courses using a CSV file
     And I should see "Field 2: Tuesday, 1 October 2019, 2:00"
     And I should see "Field 3: b"
     And I should see "Field 4: Hello"
-    And I should see "Field 5: Goodbye"
\ No newline at end of file
+    And I should see "Field 5: Goodbye"
index fc55002..d21da4e 100644 (file)
@@ -187,4 +187,4 @@ Feature: Upload users
     Then I should see "2 January 2020" in the "Enrolment starts" "table_row"
     And I should see "12 January 2020" in the "Enrolment ends" "table_row"
     And I click on "Close" "button"
-    And I log out
\ No newline at end of file
+    And I log out
index d4cf469..41ad459 100644 (file)
@@ -122,4 +122,4 @@ Feature: Restore Moodle 2 course backups with different user data settings
       | Settings |  Include enrolled users | 0 |
     Then I should see "Test database name"
     When I follow "Test database name"
-    Then I should not see "Student entry"
\ No newline at end of file
+    Then I should not see "Student entry"
index 67c5b6e..76b29b6 100644 (file)
@@ -126,4 +126,4 @@ Feature: Award badges with separate groups
     And I follow "Course Badge"
     And I press "Award badge"
     # Teacher 2 shouldn't be able to go further
-    Then I should see "Sorry, but you need to be part of a group to see this page."
\ No newline at end of file
+    Then I should see "Sorry, but you need to be part of a group to see this page."
index 4c2de4f..ae73b42 100644 (file)
@@ -36,4 +36,4 @@ Feature: The recently accessed items block allows users to easily access their m
     When  I follow "Test forum name"
     And I follow "Dashboard" in the user menu
     And I change window size to "large"
-    Then I should see "Test forum name" in the "Recently accessed items" "block"
\ No newline at end of file
+    Then I should see "Test forum name" in the "Recently accessed items" "block"
index 61f28ea..ad9c5c5 100644 (file)
@@ -70,4 +70,4 @@ Feature: H5P file upload to content bank for admins
     And I add the "Navigation" block if not present
     And I expand "Site pages" node
     And I click on "Content bank" "link"
-    And I should not see "filltheblanks.h5p"
\ No newline at end of file
+    And I should not see "filltheblanks.h5p"
index de1fde0..1b7ad49 100644 (file)
@@ -26,4 +26,4 @@ Feature: Access permission to content Bank
 
   Scenario: Editing teachers can't access content bank at system level
     Given I log in as "teacher1"
-    Then "Content bank" "link" should not exist
\ No newline at end of file
+    Then "Content bank" "link" should not exist
index c520199..708a9a8 100644 (file)
@@ -70,4 +70,4 @@ Feature: Confirm content bank events are triggered
     And I set the field "Content name" to "New name"
     And I click on "Rename" "button"
     And I navigate to "Reports > Live logs" in site administration
-    Then I should see "Content updated"
\ No newline at end of file
+    Then I should see "Content updated"
index 3372196..15e206f 100644 (file)
@@ -24,4 +24,4 @@ Feature: Edit format course to Single Activity format
     And I press "Update format"
     Then I should see "Forum" in the "Type of activity" "field"
     And I press "Save and display"
-    And I should see "Adding a new Forum"
\ No newline at end of file
+    And I should see "Adding a new Forum"
index fba44dd..fde8963 100644 (file)
@@ -101,4 +101,4 @@ Feature: Test we can both create and delete a course.
     # Redirect
     And I should see the "Course categories and courses" management page
     And I should see "Cat 1" in the "#category-listing" "css_element"
-    And I should see "Test course 2: create another course" in the "#course-listing" "css_element"
\ No newline at end of file
+    And I should see "Test course 2: create another course" in the "#course-listing" "css_element"
index e2ffa84..4d46d50 100644 (file)
@@ -53,4 +53,4 @@ Feature: Edit course settings
       | Course short name | Edited course shortname |
       | Course summary | Edited course summary |
     And I press "Save and return"
-    Then I should see the "Course categories and courses" management page
\ No newline at end of file
+    Then I should see the "Course categories and courses" management page
index a897294..f0bcbf3 100644 (file)
@@ -102,4 +102,4 @@ Feature: Managers can manage course custom fields date
     And I expand all fieldsets
     Then "#id_customfield_testfield_hour" "css_element" should not be visible
     Then "#id_customfield_testfield_minute" "css_element" should not be visible
-    And I log out
\ No newline at end of file
+    And I log out
index e834eaa..c48acae 100644 (file)
@@ -71,4 +71,4 @@ Feature: Uniqueness The course custom fields can be mandatory or not
     And I set the following fields to these values:
       | Test field |  |
     And I press "Save and display"
-    Then I should not see "This value is already used"
\ No newline at end of file
+    Then I should not see "This value is already used"
index af6c0f7..93742ba 100644 (file)
@@ -47,4 +47,4 @@ Feature: Guest users can auto-enrol themself in courses where guest access is al
     And I set the following fields to these values:
       | Password | moodle_rules |
     And I press "Submit"
-    And I should see "Test forum name"
\ No newline at end of file
+    And I should see "Test forum name"
index ebf2832..4786637 100644 (file)
@@ -156,4 +156,4 @@ Feature: Organize students into groups
     And I set the following fields to these values:
       | Group name | Group A |
       | Enrolment key | Abcdef-1 |
-    And I should not see "This enrolment key is already used for another group."
\ No newline at end of file
+    And I should not see "This enrolment key is already used for another group."
index 015cb26..5f4b82e 100644 (file)
@@ -101,4 +101,4 @@ Feature: The description of a group can be viewed by students and teachers
     And I log in as "student2"
     And I am on "Course 1" course homepage
     And I navigate to course participants
-    And ".groupinfobox" "css_element" should not exist
\ No newline at end of file
+    And ".groupinfobox" "css_element" should not exist
index 0978a6e..3e0bc77 100644 (file)
@@ -90,4 +90,4 @@ Feature: Manage notification preferences - Email
     And I open messaging
     And I open messaging settings preferences
     And I should see "Notification preferences"
-    And I should see "Jabber"
\ No newline at end of file
+    And I should see "Jabber"
index 4aeac16..e12ee11 100644 (file)
@@ -27,4 +27,4 @@ Feature: To be able to see and save user message preferences as admin
     And I log in as "student1"
     And I follow "Preferences" in the user menu
     And I click on "Message preferences" "link"
-    And the field "Email" matches value "0"
\ No newline at end of file
+    And the field "Email" matches value "0"
index f6afd87..9411b15 100644 (file)
@@ -93,4 +93,4 @@ Feature: Hide grader identities identity from students
     And I should see "Graded" in the "Grading status" "table_row"
     And I should see "Catch for us the foxes."
     And I should see "Teacher" in the "Graded by" "table_row"
-    And I log out
\ No newline at end of file
+    And I log out
index b8ceeec..1316920 100644 (file)
@@ -75,4 +75,4 @@ Feature: Users can add entries to database activities
     And I press "Select all"
     And I press "Delete selected"
     And I press "Delete"
-    And I should see "No entries in database"
\ No newline at end of file
+    And I should see "No entries in database"
index b7f5d18..74eeaef 100644 (file)
@@ -29,4 +29,4 @@ Feature: Add forum activities and discussions utilizing the inline add discussio
     And I am on "Course 1" course homepage
     Then I add a new discussion to "Test forum name" forum inline with:
       | Subject | Post with attachment |
-      | Message | This is the body     |
\ No newline at end of file
+      | Message | This is the body     |
index 4b85a74..fa6f640 100644 (file)
@@ -45,4 +45,4 @@ Feature: A student can favourite a discussion via the forum settings menu
     And I click on "Discussion 1" action menu
     And I click on "[title='Star this discussion']" "css_element"
     And I click on "Discussion 1" action menu
-    And I click on "[title='Unstar this discussion']" "css_element"
\ No newline at end of file
+    And I click on "[title='Unstar this discussion']" "css_element"
index 9db0b64..20be8ae 100644 (file)
@@ -44,4 +44,4 @@ Feature: Students can reply to a discussion in page.
     Then I should see "Discussion contents 1, third message"
     Then I should see "This is a private reply. It is not visible to other participants."
     When I reload the page
-    Then I should see "Discussion contents 1, third message"
\ No newline at end of file
+    Then I should see "Discussion contents 1, third message"
index 80d26e1..70323b4 100644 (file)
@@ -36,4 +36,4 @@ Feature: In a lesson activity, teacher can import blackboard fill in the blank q
     And I should see "Your answer : frog"
     And I should see "A frog is an amphibian"
     And I press "Continue"
-    And I should see "Congratulations - end of lesson reached"
\ No newline at end of file
+    And I should see "Congratulations - end of lesson reached"
index 66ff74a..3c19a49 100644 (file)
@@ -359,4 +359,4 @@ Feature: In Dashboard, a student can see their current status on all lessons wit
     And I set the following fields to these values:
       | True | 1 |
     And I press "Submit"
-    And I log out
\ No newline at end of file
+    And I log out
index 8c66023..a2effe1 100644 (file)
@@ -91,4 +91,4 @@ Feature: In a lesson activity, a non editing teacher can grade essay questions
     Then I should see "Grade essays"
     And I follow "Grade essays"
     And I should not see "Student 1"
-    And I should see "Student 2"
\ No newline at end of file
+    And I should see "Student 2"
index 42d49f4..cfadd0d 100644 (file)
@@ -183,4 +183,4 @@ Feature: Scorm multi-sco completion
     And I log out
     And I log in as "teacher1"
     And I am on "Course 1" course homepage
-    And "Student 1" user has completed "ADV Multi-sco SCORM package" activity
\ No newline at end of file
+    And "Student 1" user has completed "ADV Multi-sco SCORM package" activity
index 2c922dd..7daa5dc 100644 (file)
@@ -383,4 +383,4 @@ Feature: Scorm multi-sco review mode.
     And I follow "Basic Multi-sco SCORM package"
     Then I should not see "Review mode"
     And I switch to "scorm_object" iframe
-    And I should see "Play of the game"
\ No newline at end of file
+    And I should see "Play of the game"
index 05b906c..5d83c9d 100644 (file)
@@ -92,4 +92,4 @@ Feature: Teachers can reset wiki pages, tags and files
     And I follow "Comments"
     And I should not see "Test comment"
     And I follow "Files"
-    And I should see "empty.txt"
\ No newline at end of file
+    And I should see "empty.txt"
index 99efc12..1767301 100644 (file)
@@ -37,4 +37,4 @@ Feature: In a report, admin can see configuration changes
       | Setting | initialnumfeedbacks | quiz   | initialnumfeedbacks | 5      | maxsizetodownload   |
       | Setting | maxsizetodownload   | folder | maxsizetodownload   | 2048   | initialnumfeedbacks |
       | Value   | Perth               | core   | defaultcity         | Perth  | maxsizetodownload   |
-      | User    | Admin               | core   | defaultcity         | Perth  | zzzzzzzzz           |
\ No newline at end of file
+      | User    | Admin               | core   | defaultcity         | Perth  | zzzzzzzzz           |
index 33cdacd..39b29ee 100644 (file)
@@ -10,4 +10,4 @@ Feature: Administration nav tabs back
     And I click on "Browse list of users" "link"
     And I should see "New filter"
     When I press the "back" button in the browser
-    Then I should see "Cohorts"
\ No newline at end of file
+    Then I should see "Cohorts"
index 167dfa4..c359bf5 100644 (file)
@@ -32,4 +32,4 @@ Feature: Apply tour filters to a tour for Classic
       | targettype                  | Title             | Content |
       | Display in middle of page   | Welcome           | Welcome to your personal learning space. We'd like to give you a quick tour to show you some of the areas you may find helpful |
     When I am on homepage
-    Then I should see "Welcome to your personal learning space. We'd like to give you a quick tour to show you some of the areas you may find helpful"
\ No newline at end of file
+    Then I should see "Welcome to your personal learning space. We'd like to give you a quick tour to show you some of the areas you may find helpful"
index b86dee7..d9cc8f6 100644 (file)
@@ -30,4 +30,4 @@ Feature: As a user, "Course preferences" allows me to set my course preference(s
     When I am on "Course 1" course homepage
     And I should not see "Add a resource..." in the "Topic 1" "section"
     And I turn editing mode on
-    Then I should see "Add a resource..." in the "Topic 1" "section"
\ No newline at end of file
+    Then I should see "Add a resource..." in the "Topic 1" "section"
index 2c61182..25d9ffb 100644 (file)
@@ -212,4 +212,4 @@ Feature: Custom profile fields should be visible and editable by those with the
     And I should not see "notvisible_field"
     And I should not see "notvisible_field_information"
 
-    And I should not see "Edit profile"
\ No newline at end of file
+    And I should not see "Edit profile"