diff --git a/.gherkin-lintrc b/.gherkin-lintrc index 9f2beb31297a9..55aef1fa57c56 100644 --- a/.gherkin-lintrc +++ b/.gherkin-lintrc @@ -3,6 +3,8 @@ "Feature": 0, "Background": 2, "Scenario": 2, + "Examples": 4, + "example": 6, "Step": 4, "given": 4, "and": 4 diff --git a/course/tests/behat/category_resort.feature b/course/tests/behat/category_resort.feature index 615928e04d15b..27c6dfb9a42ea 100644 --- a/course/tests/behat/category_resort.feature +++ b/course/tests/behat/category_resort.feature @@ -23,12 +23,12 @@ Feature: Test we can resort categories in the management interface. And I should see category listing before And I should see category listing before - Examples: - | sortby | cat1 | cat2 | cat3 | - | "Sort by Category name ascending" | "Applied sciences" | "Extended social studies" | "Social studies" | - | "Sort by Category name descending" | "Social studies" | "Extended social studies" | "Applied sciences" | - | "Sort by Category ID number ascending" | "Extended social studies" | "Social studies" | "Applied sciences" | - | "Sort by Category ID number descending" | "Applied sciences" | "Social studies" | "Extended social studies" | + Examples: + | sortby | cat1 | cat2 | cat3 | + | "Sort by Category name ascending" | "Applied sciences" | "Extended social studies" | "Social studies" | + | "Sort by Category name descending" | "Social studies" | "Extended social studies" | "Applied sciences" | + | "Sort by Category ID number ascending" | "Extended social studies" | "Social studies" | "Applied sciences" | + | "Sort by Category ID number descending" | "Applied sciences" | "Social studies" | "Extended social studies" | Scenario Outline: Test bulk sorting current category. Given the following "categories" exist: @@ -52,12 +52,12 @@ Feature: Test we can resort categories in the management interface. And I should see category listing before And I should see category listing before - Examples: - | sortby | cat1 | cat2 | cat3 | - | "Sort by Category name ascending" | "Applied sciences" | "Extended social studies" | "Social studies" | - | "Sort by Category name descending" | "Social studies" | "Extended social studies" | "Applied sciences" | - | "Sort by Category ID number ascending" | "Extended social studies" | "Social studies" | "Applied sciences" | - | "Sort by Category ID number descending" | "Applied sciences" | "Social studies" | "Extended social studies" | + Examples: + | sortby | cat1 | cat2 | cat3 | + | "Sort by Category name ascending" | "Applied sciences" | "Extended social studies" | "Social studies" | + | "Sort by Category name descending" | "Social studies" | "Extended social studies" | "Applied sciences" | + | "Sort by Category ID number ascending" | "Extended social studies" | "Social studies" | "Applied sciences" | + | "Sort by Category ID number descending" | "Applied sciences" | "Social studies" | "Extended social studies" | Scenario Outline: Test resorting subcategories. Given the following "categories" exist: @@ -79,12 +79,12 @@ Feature: Test we can resort categories in the management interface. And I should see category listing before And I should see category listing before - Examples: - | sortby | cat1 | cat2 | cat3 | - | "resortbyname" | "Applied sciences" | "Extended social studies" | "Social studies" | - | "resortbynamedesc" | "Social studies" | "Extended social studies" | "Applied sciences" | - | "resortbyidnumber" | "Extended social studies" | "Social studies" | "Applied sciences" | - | "resortbyidnumberdesc" | "Applied sciences" | "Social studies" | "Extended social studies" | + Examples: + | sortby | cat1 | cat2 | cat3 | + | "resortbyname" | "Applied sciences" | "Extended social studies" | "Social studies" | + | "resortbynamedesc" | "Social studies" | "Extended social studies" | "Applied sciences" | + | "resortbyidnumber" | "Extended social studies" | "Social studies" | "Applied sciences" | + | "resortbyidnumberdesc" | "Applied sciences" | "Social studies" | "Extended social studies" | @javascript Scenario Outline: Test resorting subcategories with JS enabled. @@ -109,12 +109,12 @@ Feature: Test we can resort categories in the management interface. And I should see category listing before And I should see category listing before - Examples: - | sortby | cat1 | cat2 | cat3 | - | "resortbyname" | "Applied sciences" | "Extended social studies" | "Social studies" | - | "resortbynamedesc" | "Social studies" | "Extended social studies" | "Applied sciences" | - | "resortbyidnumber" | "Extended social studies" | "Social studies" | "Applied sciences" | - | "resortbyidnumberdesc" | "Applied sciences" | "Social studies" | "Extended social studies" | + Examples: + | sortby | cat1 | cat2 | cat3 | + | "resortbyname" | "Applied sciences" | "Extended social studies" | "Social studies" | + | "resortbynamedesc" | "Social studies" | "Extended social studies" | "Applied sciences" | + | "resortbyidnumber" | "Extended social studies" | "Social studies" | "Applied sciences" | + | "resortbyidnumberdesc" | "Applied sciences" | "Social studies" | "Extended social studies" | # The scenario below this is the same but with JS enabled. Scenario: Test moving categories up and down by one. diff --git a/course/tests/behat/course_category_management_listing.feature b/course/tests/behat/course_category_management_listing.feature index eb3995d78bdd8..18319fb0d9428 100644 --- a/course/tests/behat/course_category_management_listing.feature +++ b/course/tests/behat/course_category_management_listing.feature @@ -259,12 +259,12 @@ Feature: Course category management interface performs as expected And I should see category listing before And I should see category listing before - Examples: - | sortby | cat1 | cat2 | cat3 | - | "Sort by Category name ascending" | "Applied sciences" | "Extended social studies" | "Social studies" | - | "Sort by Category name descending" | "Social studies" | "Extended social studies" | "Applied sciences" | - | "Sort by Category ID number ascending" | "Extended social studies" | "Social studies" | "Applied sciences" | - | "Sort by Category ID number descending" | "Applied sciences" | "Social studies" | "Extended social studies" | + Examples: + | sortby | cat1 | cat2 | cat3 | + | "Sort by Category name ascending" | "Applied sciences" | "Extended social studies" | "Social studies" | + | "Sort by Category name descending" | "Social studies" | "Extended social studies" | "Applied sciences" | + | "Sort by Category ID number ascending" | "Extended social studies" | "Social studies" | "Applied sciences" | + | "Sort by Category ID number descending" | "Applied sciences" | "Social studies" | "Extended social studies" | @javascript Scenario Outline: Sub categories are displayed correctly when resorted @@ -289,12 +289,12 @@ Feature: Course category management interface performs as expected And I should see category listing before And I should see category listing before - Examples: - | sortby | cat1 | cat2 | cat3 | - | "resortbyname" | "Applied sciences" | "Extended social studies" | "Social studies" | - | "resortbynamedesc" | "Social studies" | "Extended social studies" | "Applied sciences" | - | "resortbyidnumber" | "Extended social studies" | "Social studies" | "Applied sciences" | - | "resortbyidnumberdesc" | "Applied sciences" | "Social studies" | "Extended social studies" | + Examples: + | sortby | cat1 | cat2 | cat3 | + | "resortbyname" | "Applied sciences" | "Extended social studies" | "Social studies" | + | "resortbynamedesc" | "Social studies" | "Extended social studies" | "Applied sciences" | + | "resortbyidnumber" | "Extended social studies" | "Social studies" | "Applied sciences" | + | "resortbyidnumberdesc" | "Applied sciences" | "Social studies" | "Extended social studies" | @javascript Scenario Outline: Test courses are displayed correctly after being resorted. @@ -330,16 +330,16 @@ Feature: Course category management interface performs as expected And I should see course listing before And I should see course listing before - Examples: - | sortby | course1 | course2 | course3 | - | "Sort by Course full name ascending" | "Applied sciences" | "Extended social studies" | "Social studies" | - | "Sort by Course full name descending" | "Social studies" | "Extended social studies" | "Applied sciences" | - | "Sort by Course short name ascending" | "Extended social studies" | "Applied sciences" | "Social studies" | - | "Sort by Course short name descending" | "Social studies" | "Applied sciences" | "Extended social studies" | - | "Sort by Course ID number ascending" | "Extended social studies" | "Social studies" | "Applied sciences" | - | "Sort by Course ID number descending" | "Applied sciences" | "Social studies" | "Extended social studies" | - | "Sort by Course time created ascending" | "Social studies" | "Applied sciences" | "Extended social studies" | - | "Sort by Course time created descending" | "Extended social studies" | "Applied sciences" | "Social studies" | + Examples: + | sortby | course1 | course2 | course3 | + | "Sort by Course full name ascending" | "Applied sciences" | "Extended social studies" | "Social studies" | + | "Sort by Course full name descending" | "Social studies" | "Extended social studies" | "Applied sciences" | + | "Sort by Course short name ascending" | "Extended social studies" | "Applied sciences" | "Social studies" | + | "Sort by Course short name descending" | "Social studies" | "Applied sciences" | "Extended social studies" | + | "Sort by Course ID number ascending" | "Extended social studies" | "Social studies" | "Applied sciences" | + | "Sort by Course ID number descending" | "Applied sciences" | "Social studies" | "Extended social studies" | + | "Sort by Course time created ascending" | "Social studies" | "Applied sciences" | "Extended social studies" | + | "Sort by Course time created descending" | "Extended social studies" | "Applied sciences" | "Social studies" | @javascript Scenario: Test course pagination diff --git a/course/tests/behat/course_resort.feature b/course/tests/behat/course_resort.feature index 54a52ecbc594b..a49f9f5eb3ccd 100644 --- a/course/tests/behat/course_resort.feature +++ b/course/tests/behat/course_resort.feature @@ -36,16 +36,16 @@ Feature: Test we can resort course in the management interface. And I should see course listing before And I should see course listing before - Examples: - | sortby | course1 | course2 | course3 | - | "Sort by Course full name ascending" | "Applied sciences" | "Extended social studies" | "Social studies" | - | "Sort by Course full name descending" | "Social studies" | "Extended social studies" | "Applied sciences" | - | "Sort by Course short name ascending" | "Extended social studies" | "Applied sciences" | "Social studies" | - | "Sort by Course short name descending" | "Social studies" | "Applied sciences" | "Extended social studies" | - | "Sort by Course ID number ascending" | "Extended social studies" | "Social studies" | "Applied sciences" | - | "Sort by Course ID number descending" | "Applied sciences" | "Social studies" | "Extended social studies" | - | "Sort by Course time created ascending" | "Social studies" | "Applied sciences" | "Extended social studies" | - | "Sort by Course time created descending" | "Extended social studies" | "Applied sciences" | "Social studies" | + Examples: + | sortby | course1 | course2 | course3 | + | "Sort by Course full name ascending" | "Applied sciences" | "Extended social studies" | "Social studies" | + | "Sort by Course full name descending" | "Social studies" | "Extended social studies" | "Applied sciences" | + | "Sort by Course short name ascending" | "Extended social studies" | "Applied sciences" | "Social studies" | + | "Sort by Course short name descending" | "Social studies" | "Applied sciences" | "Extended social studies" | + | "Sort by Course ID number ascending" | "Extended social studies" | "Social studies" | "Applied sciences" | + | "Sort by Course ID number descending" | "Applied sciences" | "Social studies" | "Extended social studies" | + | "Sort by Course time created ascending" | "Social studies" | "Applied sciences" | "Extended social studies" | + | "Sort by Course time created descending" | "Extended social studies" | "Applied sciences" | "Social studies" | @javascript Scenario Outline: Resort courses with JavaScript enabled. @@ -90,16 +90,16 @@ Feature: Test we can resort course in the management interface. And I should see course listing before And I should see course listing before - Examples: - | sortby | course1 | course2 | course3 | - | "Sort by Course full name ascending" | "Applied sciences" | "Extended social studies" | "Social studies" | - | "Sort by Course full name descending" | "Social studies" | "Extended social studies" | "Applied sciences" | - | "Sort by Course short name ascending" | "Extended social studies" | "Applied sciences" | "Social studies" | - | "Sort by Course short name descending" | "Social studies" | "Applied sciences" | "Extended social studies" | - | "Sort by Course ID number ascending" | "Extended social studies" | "Social studies" | "Applied sciences" | - | "Sort by Course ID number descending" | "Applied sciences" | "Social studies" | "Extended social studies" | - | "Sort by Course time created ascending" | "Social studies" | "Applied sciences" | "Extended social studies" | - | "Sort by Course time created descending" | "Extended social studies" | "Applied sciences" | "Social studies" | + Examples: + | sortby | course1 | course2 | course3 | + | "Sort by Course full name ascending" | "Applied sciences" | "Extended social studies" | "Social studies" | + | "Sort by Course full name descending" | "Social studies" | "Extended social studies" | "Applied sciences" | + | "Sort by Course short name ascending" | "Extended social studies" | "Applied sciences" | "Social studies" | + | "Sort by Course short name descending" | "Social studies" | "Applied sciences" | "Extended social studies" | + | "Sort by Course ID number ascending" | "Extended social studies" | "Social studies" | "Applied sciences" | + | "Sort by Course ID number descending" | "Applied sciences" | "Social studies" | "Extended social studies" | + | "Sort by Course time created ascending" | "Social studies" | "Applied sciences" | "Extended social studies" | + | "Sort by Course time created descending" | "Extended social studies" | "Applied sciences" | "Social studies" | Scenario: Test moving courses up and down by one. Given the following "categories" exist: diff --git a/grade/grading/form/rubric/tests/behat/grade_calculation.feature b/grade/grading/form/rubric/tests/behat/grade_calculation.feature index 0e264b67ee248..7eb1613301468 100644 --- a/grade/grading/form/rubric/tests/behat/grade_calculation.feature +++ b/grade/grading/form/rubric/tests/behat/grade_calculation.feature @@ -4,7 +4,7 @@ Feature: Converting rubric score to grades As a teacher I need to be able to use different grade settings - Scenario Outline: + Scenario Outline: Convert rubric scores to grades. Given the following "users" exist: | username | firstname | lastname | email | | teacher1 | Teacher | 1 | teacher1@example.com | diff --git a/grade/tests/behat/grade_override_letter.feature b/grade/tests/behat/grade_override_letter.feature index da25498442b56..69a7ec60676a3 100644 --- a/grade/tests/behat/grade_override_letter.feature +++ b/grade/tests/behat/grade_override_letter.feature @@ -61,12 +61,12 @@ Feature: Grade letters can be overridden | | | | Examples: - | l1 | b1 | l2 | b2 | l3 | b3 | l4 | b4 | l5 | b5 | l6 | b6 | l7 | b7 | l8 | b8 | l9 | b9 | high1 | low1 | letter1 | high2 | low2 | letter2 | high3 | low3 | letter3 | high4 | low4 | letter4 | high5 | low5 | letter5 | high6 | low6 | letter6 | - | Z | 95 | Y | 85 | X | 75 | W | 65 | V | 55 | U | 45 | | | | | | | 100.00 % | 95.00 % | Z | 94.99 % | 85.00 % | Y | 84.99 % | 75.00 % | X | 74.99 % | 65.00 % | W | 64.99 % | 55.00 % | V | 54.99 % | 45.00 % | U | - | 5 | 100 | 4 | 80 | 3 | 60 | 2 | 40 | 1 | 20 | 0 | 0 | | | | | | | 100.00 % | 100.00 % | 5 | 99.99 % | 80.00 % | 4 | 79.99 % | 60.00 % | 3 | 59.99 % | 40.00 % | 2 | 39.99 % | 20.00 % | 1 | 19.99 % | 0.00 % | 0 | - | A | 95.25 | B | 76.75 | C | 50.01 | D | 40 | F | 0.01 | F- | 0 | | | | | | | 100.00 % | 95.25 % | A | 95.24 % | 76.75 % | B | 76.74 % | 50.01 % | C | 50.00 % | 40.00 % | D | 39.99 % | 0.01 % | F | 0.00 % | 0.00 % | F- | - | | | | | | | A | 95.25 | B | 76.75 | C | 50.01 | D | 40 | F | 0.01 | F- | 0 | 100.00 % | 95.25 % | A | 95.24 % | 76.75 % | B | 76.74 % | 50.01 % | C | 50.00 % | 40.00 % | D | 39.99 % | 0.01 % | F | 0.00 % | 0.00 % | F- | - | | | A | 95.25 | B | 76.75 | C | 50.01 | | | | | D | 40 | F | 0.01 | F- | 0 | 100.00 % | 95.25 % | A | 95.24 % | 76.75 % | B | 76.74 % | 50.01 % | C | 50.00 % | 40.00 % | D | 39.99 % | 0.01 % | F | 0.00 % | 0.00 % | F- | + | l1 | b1 | l2 | b2 | l3 | b3 | l4 | b4 | l5 | b5 | l6 | b6 | l7 | b7 | l8 | b8 | l9 | b9 | high1 | low1 | letter1 | high2 | low2 | letter2 | high3 | low3 | letter3 | high4 | low4 | letter4 | high5 | low5 | letter5 | high6 | low6 | letter6 | + | Z | 95 | Y | 85 | X | 75 | W | 65 | V | 55 | U | 45 | | | | | | | 100.00 % | 95.00 % | Z | 94.99 % | 85.00 % | Y | 84.99 % | 75.00 % | X | 74.99 % | 65.00 % | W | 64.99 % | 55.00 % | V | 54.99 % | 45.00 % | U | + | 5 | 100 | 4 | 80 | 3 | 60 | 2 | 40 | 1 | 20 | 0 | 0 | | | | | | | 100.00 % | 100.00 % | 5 | 99.99 % | 80.00 % | 4 | 79.99 % | 60.00 % | 3 | 59.99 % | 40.00 % | 2 | 39.99 % | 20.00 % | 1 | 19.99 % | 0.00 % | 0 | + | A | 95.25 | B | 76.75 | C | 50.01 | D | 40 | F | 0.01 | F- | 0 | | | | | | | 100.00 % | 95.25 % | A | 95.24 % | 76.75 % | B | 76.74 % | 50.01 % | C | 50.00 % | 40.00 % | D | 39.99 % | 0.01 % | F | 0.00 % | 0.00 % | F- | + | | | | | | | A | 95.25 | B | 76.75 | C | 50.01 | D | 40 | F | 0.01 | F- | 0 | 100.00 % | 95.25 % | A | 95.24 % | 76.75 % | B | 76.74 % | 50.01 % | C | 50.00 % | 40.00 % | D | 39.99 % | 0.01 % | F | 0.00 % | 0.00 % | F- | + | | | A | 95.25 | B | 76.75 | C | 50.01 | | | | | D | 40 | F | 0.01 | F- | 0 | 100.00 % | 95.25 % | A | 95.24 % | 76.75 % | B | 76.74 % | 50.01 % | C | 50.00 % | 40.00 % | D | 39.99 % | 0.01 % | F | 0.00 % | 0.00 % | F- | Scenario: I delete a grade letter Given I set the following fields to these values: diff --git a/mod/lesson/tests/behat/duplicate_lesson_page.feature b/mod/lesson/tests/behat/duplicate_lesson_page.feature index 103a37119fbb9..c822eb3c48ef4 100644 --- a/mod/lesson/tests/behat/duplicate_lesson_page.feature +++ b/mod/lesson/tests/behat/duplicate_lesson_page.feature @@ -92,7 +92,7 @@ Feature: In a lesson activity, a teacher can duplicate a lesson page And I should see "Select the picture" Then "//*[contains(@id, 'id_answer_editor_0')]//img[contains(@src, 'moodle_logo.jpg')]" "xpath_element" should exist -@javascript @_file_upload + @javascript @_file_upload Scenario: Duplicate question page with image in feedback. Given I follow "Test lesson name" And I follow "Add a question page" diff --git a/mod/resource/tests/behat/display_resource.feature b/mod/resource/tests/behat/display_resource.feature index 39ad86e10ba6b..bbd895dd62547 100644 --- a/mod/resource/tests/behat/display_resource.feature +++ b/mod/resource/tests/behat/display_resource.feature @@ -54,12 +54,12 @@ Feature: Teacher can specify different display options for the resource And I see "Uploaded" in the ".activity.resource .resourcelinkdetails" "css_element" And I log out - Examples: - | showsize | showtype | showdate | seesize | seetype | seedate | - | 1 | 0 | 0 | should | should not | should not | - | 0 | 1 | 0 | should not | should | should not | - | 0 | 0 | 1 | should not | should not | should | - | 1 | 1 | 0 | should | should | should not | - | 1 | 0 | 1 | should | should not | should | - | 0 | 1 | 1 | should not | should | should | - | 1 | 1 | 1 | should | should | should | + Examples: + | showsize | showtype | showdate | seesize | seetype | seedate | + | 1 | 0 | 0 | should | should not | should not | + | 0 | 1 | 0 | should not | should | should not | + | 0 | 0 | 1 | should not | should not | should | + | 1 | 1 | 0 | should | should | should not | + | 1 | 0 | 1 | should | should not | should | + | 0 | 1 | 1 | should not | should | should | + | 1 | 1 | 1 | should | should | should | diff --git a/question/format/aiken/tests/behat/aiken_import.feature b/question/format/aiken/tests/behat/aiken_import.feature index e3f9cc03b1f5a..520b2ef2259cb 100644 --- a/question/format/aiken/tests/behat/aiken_import.feature +++ b/question/format/aiken/tests/behat/aiken_import.feature @@ -17,7 +17,7 @@ Feature: Test importing questions from Aiken format. And I log in as "teacher" And I am on "Course 1" course homepage -@javascript @_file_upload + @javascript @_file_upload Scenario: import some Aiken questions When I navigate to "Question bank > Import" in current page administration And I set the field "id_format_aiken" to "1" diff --git a/user/tests/behat/filter_idnumber.feature b/user/tests/behat/filter_idnumber.feature index 2acdc2e8ab2f9..078ef9b192474 100644 --- a/user/tests/behat/filter_idnumber.feature +++ b/user/tests/behat/filter_idnumber.feature @@ -50,10 +50,10 @@ Feature: Filter users by idnumber And I should "Student2" in the "users" "table" And I should "Student3" in the "users" "table" -Examples: - | Category | Argument | Admin's Visibility | Teacher's Vis | S1's Vis | S2's Vis | S3's Vis | - | contains | 0 | not see | see | see | see | see | - | doesn't contain | 2 | see | not see | see | not see | see | - | is equal to | 2000000 | not see | not see | not see | see | not see | - | starts with | 0 | not see | see | see | not see | not see | - | ends with | 0 | not see | not see | not see | see | see | + Examples: + | Category | Argument | Admin's Visibility | Teacher's Vis | S1's Vis | S2's Vis | S3's Vis | + | contains | 0 | not see | see | see | see | see | + | doesn't contain | 2 | see | not see | see | not see | see | + | is equal to | 2000000 | not see | not see | not see | see | not see | + | starts with | 0 | not see | see | see | not see | not see | + | ends with | 0 | not see | not see | not see | see | see | diff --git a/user/tests/behat/filter_participants.feature b/user/tests/behat/filter_participants.feature index 13d815c82075b..c716a18a47c40 100644 --- a/user/tests/behat/filter_participants.feature +++ b/user/tests/behat/filter_participants.feature @@ -70,6 +70,7 @@ Feature: Course participants can be filtered And I should not see "" in the "participants" "table" And I should not see "" in the "participants" "table" # Note the 'XX-IGNORE-XX' elements are for when there is less than 2 'not expected' items. + Examples: | filter1 | expected1 | expected2 | expected3 | notexpected1 | notexpected2 | | Group: No group | Student 1 | Student 4 | Teacher 1 | Student 2 | Student 3 | @@ -92,6 +93,7 @@ Feature: Course participants can be filtered And I should not see "" in the "participants" "table" And I should not see "" in the "participants" "table" # Note the 'XX-IGNORE-XX' elements are for when there is less than 2 'not expected' items. + Examples: | filter1 | expected1 | expected2 | expected3 | notexpected1 | notexpected2 | | Group: No group | Student 3 | | | Student 1 | Student 2 | diff --git a/user/tests/behat/set_default_homepage.feature b/user/tests/behat/set_default_homepage.feature index bb3fc59c921a0..e2e6df503c4ae 100644 --- a/user/tests/behat/set_default_homepage.feature +++ b/user/tests/behat/set_default_homepage.feature @@ -54,6 +54,7 @@ Feature: Set the site home page and dashboard as the default home page And I set the field "Home page" to "" And I press "Save changes" Then "" "text" should exist in the ".breadcrumb" "css_element" + Examples: | preference | breadcrumb | | Site | Home |