diff --git a/.gherkin-lintrc b/.gherkin-lintrc new file mode 100644 index 00000000000..9439956f027 --- /dev/null +++ b/.gherkin-lintrc @@ -0,0 +1,20 @@ +{ + "indentation": ["on",{ + "Feature": 0, + "Background": 2, + "Scenario": 2, + "Step": 4, + "given": 4, + "and": 4 + }], + "no-dupe-feature-names": "on", + "no-dupe-scenario-names": "off", + "no-empty-file": "on", + "no-files-without-scenarios": "on", + "no-multiple-empty-lines": "on", + "no-partially-commented-tag-lines": "on", + "no-trailing-spaces": "on", + "no-unamed-features": "on", + "no-unamed-scenarios": "on", + "no-scenario-outlines-without-examples": "on" +} diff --git a/Gruntfile.js b/Gruntfile.js index 5852cc46b74..4cb9e9ebbd9 100644 --- a/Gruntfile.js +++ b/Gruntfile.js @@ -106,7 +106,6 @@ module.exports = function(grunt) { return libs; }; - // Project configuration. grunt.initConfig({ eslint: { @@ -171,6 +170,10 @@ module.exports = function(grunt) { files: ['**/yui/src/**/*.js'], tasks: ['yui'] }, + gherkinlint: { + files: ['**/tests/behat/*.feature'], + tasks: ['gherkinlint'] + } }, shifter: { options: { @@ -178,6 +181,11 @@ module.exports = function(grunt) { paths: [cwd] } }, + gherkinlint: { + options: { + files: ['**/tests/behat/*.feature'], + } + }, stylelint: { less: { options: { @@ -318,6 +326,22 @@ module.exports = function(grunt) { }, done); }; + tasks.gherkinlint = function() { + var done = this.async(), + options = grunt.config('gherkinlint.options'); + + var args = grunt.file.expand(options.files); + args.unshift(path.normalize(__dirname + '/node_modules/.bin/gherkin-lint')); + grunt.util.spawn({ + cmd: 'node', + args: args, + opts: {stdio: 'inherit', env: process.env} + }, function(error, result, code) { + // Propagate the exit code. + done(code); + }); + }; + tasks.startup = function() { // Are we in a YUI directory? if (path.basename(path.resolve(cwd, '../../')) == 'yui') { @@ -329,6 +353,7 @@ module.exports = function(grunt) { // Run them all!. grunt.task.run('css'); grunt.task.run('js'); + grunt.task.run('gherkinlint'); } }; @@ -343,6 +368,7 @@ module.exports = function(grunt) { grunt.config('uglify.amd.files', [{expand: true, src: files, rename: uglifyRename}]); grunt.config('shifter.options.paths', files); grunt.config('stylelint.less.src', files); + grunt.config('gherkinlint.options.files', files); changedFiles = Object.create(null); }, 200); @@ -360,6 +386,7 @@ module.exports = function(grunt) { // Register JS tasks. grunt.registerTask('shifter', 'Run Shifter against the current directory', tasks.shifter); + grunt.registerTask('gherkinlint', 'Run gherkinlint against the current directory', tasks.gherkinlint); grunt.registerTask('ignorefiles', 'Generate ignore files for linters', tasks.ignorefiles); grunt.registerTask('yui', ['eslint:yui', 'shifter']); grunt.registerTask('amd', ['eslint:amd', 'uglify']); diff --git a/admin/tool/behat/tests/behat/get_and_set_fields.feature b/admin/tool/behat/tests/behat/get_and_set_fields.feature index f9ac3a15070..4b467bc1529 100644 --- a/admin/tool/behat/tests/behat/get_and_set_fields.feature +++ b/admin/tool/behat/tests/behat/get_and_set_fields.feature @@ -125,7 +125,6 @@ Feature: Verify that all form fields values can be get and set And I navigate to "Edit settings" node in "Course administration" And the field "Course ID number" matches value "Course id number" - Scenario: with JS disabled all form fields getters and setters works as expected @javascript diff --git a/admin/tool/behat/tests/behat/list_steps.feature b/admin/tool/behat/tests/behat/list_steps.feature index 3e4d31e2434..708a0e71cee 100644 --- a/admin/tool/behat/tests/behat/list_steps.feature +++ b/admin/tool/behat/tests/behat/list_steps.feature @@ -26,4 +26,3 @@ Feature: List the system steps definitions Given I set the field "Contains" to "homepage" When I press "Filter" Then I should see "Opens Moodle homepage." - diff --git a/admin/tool/langimport/tests/behat/manage_langpacks.feature b/admin/tool/langimport/tests/behat/manage_langpacks.feature index 6d6f0f0e394..e1b91707f08 100644 --- a/admin/tool/langimport/tests/behat/manage_langpacks.feature +++ b/admin/tool/langimport/tests/behat/manage_langpacks.feature @@ -4,7 +4,6 @@ Feature: Manage language packs As an administrator I need to be able to add, update and remove language packs - Background: Given remote langimport tests are enabled diff --git a/admin/tool/lp/tests/behat/framework_crud.feature b/admin/tool/lp/tests/behat/framework_crud.feature index bccf5f76722..998a950fc02 100644 --- a/admin/tool/lp/tests/behat/framework_crud.feature +++ b/admin/tool/lp/tests/behat/framework_crud.feature @@ -68,7 +68,7 @@ Feature: Manage competency frameworks Then I should not see "Science Year-4" And I should not see "sc-y-4" -Scenario: Edit a framework with competencies in user competency + Scenario: Edit a framework with competencies in user competency Given the following lp "frameworks" exist: | shortname | idnumber | | Science Year-5 | sc-y-5 | @@ -98,7 +98,7 @@ Scenario: Edit a framework with competencies in user competency And I should see "Science Year-5 Edited" And I should see "sc-y-5" -Scenario: Edit a framework with competencies in user competency plan + Scenario: Edit a framework with competencies in user competency plan Given the following lp "frameworks" exist: | shortname | idnumber | | Science Year-6 | sc-y-6 | diff --git a/admin/tool/lp/tests/behat/plan_workflow.feature b/admin/tool/lp/tests/behat/plan_workflow.feature index bfaf1e0307a..c98314e0566 100644 --- a/admin/tool/lp/tests/behat/plan_workflow.feature +++ b/admin/tool/lp/tests/behat/plan_workflow.feature @@ -179,7 +179,7 @@ Feature: Manage plan workflow And I should not see "Active" And I log out -Scenario: Manager reopen a complete learning plan + Scenario: Manager reopen a complete learning plan Given the following lp "plans" exist: | name | user | description | status | reviewer | | Test-Plan3 | user1 | Description of plan 3 for user 1 | complete | manager1 | diff --git a/admin/tool/lp/tests/behat/user_evidence_crud.feature b/admin/tool/lp/tests/behat/user_evidence_crud.feature index 6a46e199afa..35dbd2bfae6 100644 --- a/admin/tool/lp/tests/behat/user_evidence_crud.feature +++ b/admin/tool/lp/tests/behat/user_evidence_crud.feature @@ -78,4 +78,3 @@ Feature: Manage evidence of prior learning Then I should see "List of evidence" And I should see "Evidence-6" And I should not see "Evidence-5" - diff --git a/badges/tests/behat/award_badge.feature b/badges/tests/behat/award_badge.feature index 92cc5ad6b8e..e2f504e2cee 100644 --- a/badges/tests/behat/award_badge.feature +++ b/badges/tests/behat/award_badge.feature @@ -357,4 +357,3 @@ Feature: Award badges When I press "Revoke badge" And I follow "Course Badge" Then I should see "Recipients (0)" - diff --git a/blocks/activity_results/tests/behat/addblockinactivity.feature b/blocks/activity_results/tests/behat/addblockinactivity.feature index 7af21b1a1c1..de4a14926fd 100644 --- a/blocks/activity_results/tests/behat/addblockinactivity.feature +++ b/blocks/activity_results/tests/behat/addblockinactivity.feature @@ -60,7 +60,7 @@ Feature: The activity results block displays student scores And I press "Save changes" And I follow "Course 1" -Scenario: Configure the block on a non-graded activity to show 3 high scores + Scenario: Configure the block on a non-graded activity to show 3 high scores Given I follow "Test page name" And I add the "Activity results" block When I configure the "Activity results" block @@ -78,7 +78,7 @@ Scenario: Configure the block on a non-graded activity to show 3 high scores And I should see "Student 3" in the "Activity results" "block" And I should see "70.00" in the "Activity results" "block" -Scenario: Block should select current activity by default + Scenario: Block should select current activity by default Given I follow "Test assignment 1" When I add the "Activity results" block And I configure the "Activity results" block diff --git a/blocks/activity_results/tests/behat/addunconfiguredblock.feature b/blocks/activity_results/tests/behat/addunconfiguredblock.feature index def045bc50b..f53d8eae84e 100644 --- a/blocks/activity_results/tests/behat/addunconfiguredblock.feature +++ b/blocks/activity_results/tests/behat/addunconfiguredblock.feature @@ -1,5 +1,5 @@ @block @block_activity_results -Feature: The activity results block displays student scores +Feature: The activity results block doesn't displays student scores for unconfigured block In order to be display student scores As a user I need to see the activity results block diff --git a/blocks/activity_results/tests/behat/addunsupportedactivity.feature b/blocks/activity_results/tests/behat/addunsupportedactivity.feature index 3aa10b9f65d..d3f5c991ef8 100644 --- a/blocks/activity_results/tests/behat/addunsupportedactivity.feature +++ b/blocks/activity_results/tests/behat/addunsupportedactivity.feature @@ -1,5 +1,5 @@ @block @block_activity_results -Feature: The activity results block displays student scores +Feature: The activity results block doesn't display student scores for unsupported activity In order to be display student scores As a user I need to properly configure the activity results block diff --git a/blocks/activity_results/tests/behat/highscoreswithoutgroups.feature b/blocks/activity_results/tests/behat/highscoreswithoutgroups.feature index 4a2a8bc5826..620aac1cead 100644 --- a/blocks/activity_results/tests/behat/highscoreswithoutgroups.feature +++ b/blocks/activity_results/tests/behat/highscoreswithoutgroups.feature @@ -1,5 +1,5 @@ @block @block_activity_results -Feature: The activity results block displays student scores +Feature: The activity results block displays student high scores In order to be display student scores As a user I need to see the activity results block diff --git a/blocks/activity_results/tests/behat/highscoreswithscales.feature b/blocks/activity_results/tests/behat/highscoreswithscales.feature index 86dee32ce06..d121c97b9da 100644 --- a/blocks/activity_results/tests/behat/highscoreswithscales.feature +++ b/blocks/activity_results/tests/behat/highscoreswithscales.feature @@ -1,5 +1,5 @@ @block @block_activity_results -Feature: The activity results block displays student scores as scales +Feature: The activity results block displays students high scores in group as scales In order to be display student scores as scales As a user I need to see the activity results block diff --git a/blocks/activity_results/tests/behat/highscoreswithscalesandgroups.feature b/blocks/activity_results/tests/behat/highscoreswithscalesandgroups.feature index 536a00ecec7..6b9c9727594 100644 --- a/blocks/activity_results/tests/behat/highscoreswithscalesandgroups.feature +++ b/blocks/activity_results/tests/behat/highscoreswithscalesandgroups.feature @@ -1,5 +1,5 @@ @block @block_activity_results -Feature: The activity results block displays student scores as scales +Feature: The activity results block displays student in group high scores as scales In order to be display student scores as scales As a user I need to see the activity results block diff --git a/blocks/activity_results/tests/behat/highscoreswithseperategroups.feature b/blocks/activity_results/tests/behat/highscoreswithseperategroups.feature index c764e806222..0c1ccdd077d 100644 --- a/blocks/activity_results/tests/behat/highscoreswithseperategroups.feature +++ b/blocks/activity_results/tests/behat/highscoreswithseperategroups.feature @@ -1,5 +1,5 @@ @block @block_activity_results -Feature: The activity results block displays student scores +Feature: The activity results block displays student in separate groups scores In order to be display student scores As a user I need to see the activity results block diff --git a/blocks/activity_results/tests/behat/highscoreswithvisiblegroups.feature b/blocks/activity_results/tests/behat/highscoreswithvisiblegroups.feature index bf10d7943b0..0e64d0544fe 100644 --- a/blocks/activity_results/tests/behat/highscoreswithvisiblegroups.feature +++ b/blocks/activity_results/tests/behat/highscoreswithvisiblegroups.feature @@ -1,5 +1,5 @@ @block @block_activity_results -Feature: The activity results block displays student scores +Feature: The activity results block displays student in visible groups scores In order to be display student scores As a user I need to see the activity results block diff --git a/blocks/activity_results/tests/behat/lowscoreswithoutgroups.feature b/blocks/activity_results/tests/behat/lowscoreswithoutgroups.feature index a1496c6e29e..e2c8729b985 100644 --- a/blocks/activity_results/tests/behat/lowscoreswithoutgroups.feature +++ b/blocks/activity_results/tests/behat/lowscoreswithoutgroups.feature @@ -1,5 +1,5 @@ @block @block_activity_results -Feature: The activity results block displays student scores +Feature: The activity results block displays student low scores In order to be display student scores As a user I need to see the activity results block diff --git a/blocks/activity_results/tests/behat/lowscoreswithscales.feature b/blocks/activity_results/tests/behat/lowscoreswithscales.feature index 587f863a53d..5068a7b3642 100644 --- a/blocks/activity_results/tests/behat/lowscoreswithscales.feature +++ b/blocks/activity_results/tests/behat/lowscoreswithscales.feature @@ -1,5 +1,5 @@ @block @block_activity_results -Feature: The activity results block displays student scores as scales +Feature: The activity results block displays student low scores as scales In order to be display student scores as scales As a user I need to see the activity results block diff --git a/blocks/activity_results/tests/behat/lowscoreswithscalesandgroups.feature b/blocks/activity_results/tests/behat/lowscoreswithscalesandgroups.feature index f43348e814a..30602ff0746 100644 --- a/blocks/activity_results/tests/behat/lowscoreswithscalesandgroups.feature +++ b/blocks/activity_results/tests/behat/lowscoreswithscalesandgroups.feature @@ -1,5 +1,5 @@ @block @block_activity_results -Feature: The activity results block displays student scores as scales +Feature: The activity results block displays students in groups low scores as scales In order to be display student scores as scales As a user I need to see the activity results block @@ -146,4 +146,3 @@ Feature: The activity results block displays student scores as scales And I should see "User" in the "Activity results" "block" And I should see "Good" in the "Activity results" "block" And I should see "Average" in the "Activity results" "block" - diff --git a/blocks/activity_results/tests/behat/lowscoreswithseperategroups.feature b/blocks/activity_results/tests/behat/lowscoreswithseperategroups.feature index 640517edb93..5d73692b9da 100644 --- a/blocks/activity_results/tests/behat/lowscoreswithseperategroups.feature +++ b/blocks/activity_results/tests/behat/lowscoreswithseperategroups.feature @@ -1,5 +1,5 @@ @block @block_activity_results -Feature: The activity results block displays student scores +Feature: The activity results block displays students in separate groups scores In order to be display student scores As a user I need to see the activity results block diff --git a/blocks/activity_results/tests/behat/lowscoreswithvisiblegroups.feature b/blocks/activity_results/tests/behat/lowscoreswithvisiblegroups.feature index 2010dcddcf9..e137f929104 100644 --- a/blocks/activity_results/tests/behat/lowscoreswithvisiblegroups.feature +++ b/blocks/activity_results/tests/behat/lowscoreswithvisiblegroups.feature @@ -1,5 +1,5 @@ @block @block_activity_results -Feature: The activity results block displays student scores +Feature: The activity results block displays student in visible groups low scores In order to be display student scores As a user I need to see the activity results block diff --git a/blocks/blog_menu/tests/behat/block_blog_menu_course.feature b/blocks/blog_menu/tests/behat/block_blog_menu_course.feature index f45f62f9b3e..76ceb37c78c 100644 --- a/blocks/blog_menu/tests/behat/block_blog_menu_course.feature +++ b/blocks/blog_menu/tests/behat/block_blog_menu_course.feature @@ -1,8 +1,8 @@ @block @block_blog_menu -Feature: Enable Block blog menu in a course - In order to enable the blog menu in a course - As a teacher - I can add blog menu block to a course +Feature: Students can use block blog menu in a course + In order students to use the blog menu in a course + As a student + I view blog menu block in a course Background: Given the following "users" exist: diff --git a/blocks/calendar_upcoming/tests/behat/block_calendar_upcoming_dashboard.feature b/blocks/calendar_upcoming/tests/behat/block_calendar_upcoming_dashboard.feature index ea2bcd1f94d..ceb1898850e 100644 --- a/blocks/calendar_upcoming/tests/behat/block_calendar_upcoming_dashboard.feature +++ b/blocks/calendar_upcoming/tests/behat/block_calendar_upcoming_dashboard.feature @@ -1,5 +1,5 @@ @block @block_calendar_upcoming -Feature: View a site event on the dashboard +Feature: View a upcoming site event on the dashboard In order to view a site event As a student I can view the event in the upcoming events block diff --git a/blocks/completionstatus/tests/behat/block_completionstatus_manual_other.feature b/blocks/completionstatus/tests/behat/block_completionstatus_manual_other.feature index 532950d6b14..7d4c3f6c0f0 100644 --- a/blocks/completionstatus/tests/behat/block_completionstatus_manual_other.feature +++ b/blocks/completionstatus/tests/behat/block_completionstatus_manual_other.feature @@ -52,7 +52,6 @@ Feature: Enable Block Completion in a course using manual completion by others And I follow "More details" And I should see "Yes" in the "Marked complete by Teacher" "table_row" - Scenario: Add the block to a the course and require multiple roles to mark a student complete. Given I log in as "teacher1" And I follow "Course 1" diff --git a/blocks/course_overview/tests/behat/quiz_overview.feature b/blocks/course_overview/tests/behat/quiz_overview.feature index 238591fdf35..c91c551fcf1 100644 --- a/blocks/course_overview/tests/behat/quiz_overview.feature +++ b/blocks/course_overview/tests/behat/quiz_overview.feature @@ -91,4 +91,3 @@ Feature: View the quiz being due And I should not see "Quiz 1B Past deadline" in the "Course overview" "block" And I should not see "Quiz 1D Future deadline" in the "Course overview" "block" And I should not see "Quiz 2A Future deadline" in the "Course overview" "block" - diff --git a/blocks/glossary_random/tests/behat/glossary_random_frontpage.feature b/blocks/glossary_random/tests/behat/glossary_random_frontpage.feature index fc6f19caa9d..db31b919ea9 100644 --- a/blocks/glossary_random/tests/behat/glossary_random_frontpage.feature +++ b/blocks/glossary_random/tests/behat/glossary_random_frontpage.feature @@ -4,24 +4,24 @@ Feature: Random glossary entry block can be added to the frontpage As a teacher I can add the random glossary entry to the frontpage -Scenario: Admin can add random glossary block to the frontpage - Given the following "activities" exist: - | activity | name | intro | course | idnumber | - | glossary | Tips and Tricks | Frontpage glossary description | Acceptance test site | glossary0 | - And I log in as "admin" - And I am on site homepage - And I turn editing mode on - And I add the "Random glossary entry" block - And I configure the "block_glossary_random" block - And I set the following fields to these values: - | Title | Tip of the day | - | Take entries from this glossary | Tips and Tricks | - And I press "Save changes" - And I click on "Add a new entry" "link" in the "Tip of the day" "block" - And I set the following fields to these values: - | Concept | Never come late | - | Definition | Come in time for your classes | - And I press "Save changes" - When I log out - Then I should see "Never come late" in the "Tip of the day" "block" - And I should see "Come in time for your classes" in the "Tip of the day" "block" + Scenario: Admin can add random glossary block to the frontpage + Given the following "activities" exist: + | activity | name | intro | course | idnumber | + | glossary | Tips and Tricks | Frontpage glossary description | Acceptance test site | glossary0 | + And I log in as "admin" + And I am on site homepage + And I turn editing mode on + And I add the "Random glossary entry" block + And I configure the "block_glossary_random" block + And I set the following fields to these values: + | Title | Tip of the day | + | Take entries from this glossary | Tips and Tricks | + And I press "Save changes" + And I click on "Add a new entry" "link" in the "Tip of the day" "block" + And I set the following fields to these values: + | Concept | Never come late | + | Definition | Come in time for your classes | + And I press "Save changes" + When I log out + Then I should see "Never come late" in the "Tip of the day" "block" + And I should see "Come in time for your classes" in the "Tip of the day" "block" diff --git a/blocks/html/tests/behat/multiple_instances.feature b/blocks/html/tests/behat/multiple_instances.feature index 93b58de8fd9..a6cad0b34ca 100644 --- a/blocks/html/tests/behat/multiple_instances.feature +++ b/blocks/html/tests/behat/multiple_instances.feature @@ -1,5 +1,5 @@ @block @block_html -Feature: Adding and configuring HTML blocks +Feature: Adding and configuring multiple HTML blocks In order to have one or multiple HTML blocks on a page As admin I need to be able to create, configure and change HTML blocks diff --git a/blocks/online_users/tests/behat/block_online_users_dashboard.feature b/blocks/online_users/tests/behat/block_online_users_dashboard.feature index ecde2a0ad4b..7f88d76bf6a 100644 --- a/blocks/online_users/tests/behat/block_online_users_dashboard.feature +++ b/blocks/online_users/tests/behat/block_online_users_dashboard.feature @@ -1,5 +1,5 @@ @block @block_online_users -Feature: The online users block allow you to see who is currently online +Feature: The online users block allow you to see who is currently online on dashboard In order to use the online users block on the dashboard As a user I can view the online users block on my dashboard diff --git a/blocks/online_users/tests/behat/block_online_users_frontpage.feature b/blocks/online_users/tests/behat/block_online_users_frontpage.feature index 3e4b56d6c24..5909b1c0478 100644 --- a/blocks/online_users/tests/behat/block_online_users_frontpage.feature +++ b/blocks/online_users/tests/behat/block_online_users_frontpage.feature @@ -1,5 +1,5 @@ @block @block_online_users -Feature: The online users block allow you to see who is currently online +Feature: The online users block allow you to see who is currently online on frontpage In order to enable the online users block on the front page page As an admin I can add the online users block to the front page page diff --git a/blocks/private_files/tests/behat/block_private_files_activity.feature b/blocks/private_files/tests/behat/block_private_files_activity.feature index aaf59ff18f2..d8578719882 100644 --- a/blocks/private_files/tests/behat/block_private_files_activity.feature +++ b/blocks/private_files/tests/behat/block_private_files_activity.feature @@ -1,5 +1,5 @@ @block @block_private_files @_file_upload @javascript -Feature: The private files block allows users to store files privately in moodle +Feature: The private files block allows users to store files privately in moodle on activity page In order to store a private file in moodle As a teacher I can upload the file to my private files area using the private files block in an activity diff --git a/blocks/private_files/tests/behat/block_private_files_course.feature b/blocks/private_files/tests/behat/block_private_files_course.feature index 43e7b8cf682..b56c15b522b 100644 --- a/blocks/private_files/tests/behat/block_private_files_course.feature +++ b/blocks/private_files/tests/behat/block_private_files_course.feature @@ -1,5 +1,5 @@ @block @block_private_files @_file_upload @javascript -Feature: The private files block allows users to store files privately in moodle +Feature: The private files block allows users to store files privately in moodle on course page In order to store a private file in moodle As a teacher I can upload the file to my private files area using the private files block in a course diff --git a/blocks/private_files/tests/behat/block_private_files_dashboard.feature b/blocks/private_files/tests/behat/block_private_files_dashboard.feature index 990cd9641b1..3b6eb5c2d40 100644 --- a/blocks/private_files/tests/behat/block_private_files_dashboard.feature +++ b/blocks/private_files/tests/behat/block_private_files_dashboard.feature @@ -1,5 +1,5 @@ @block @block_private_files @_file_upload @javascript -Feature: The private files block allows users to store files privately in moodle +Feature: The private files block allows users to store files privately in moodle on dashboard In order to store a private file in moodle As a user I can upload the file to my private files area using the private files block on the dashboard diff --git a/blocks/private_files/tests/behat/block_private_files_frontpage.feature b/blocks/private_files/tests/behat/block_private_files_frontpage.feature index ec611bbd8ce..7816060b0cb 100644 --- a/blocks/private_files/tests/behat/block_private_files_frontpage.feature +++ b/blocks/private_files/tests/behat/block_private_files_frontpage.feature @@ -1,5 +1,5 @@ @block @block_private_files @_file_upload -Feature: The private files block allows users to store files privately in moodle +Feature: The private files block allows users to store files privately in moodle on front page. In order to store a private file in moodle As a teacher I can upload the file to my private files area using the private files block from the front page diff --git a/blocks/search_forums/tests/behat/block_search_forums_course.feature b/blocks/search_forums/tests/behat/block_search_forums_course.feature index a52b9ad5690..dedc8bcd1b4 100644 --- a/blocks/search_forums/tests/behat/block_search_forums_course.feature +++ b/blocks/search_forums/tests/behat/block_search_forums_course.feature @@ -1,5 +1,5 @@ @block @block_search_forums @mod_forum -Feature: The search forums block allows users to search for forum posts +Feature: The search forums block allows users to search for forum posts on course page In order to search for a forum post As a user I can use the search forums block diff --git a/blocks/search_forums/tests/behat/block_search_forums_frontpage.feature b/blocks/search_forums/tests/behat/block_search_forums_frontpage.feature index 4d2aa52e6b6..1f76d15c458 100644 --- a/blocks/search_forums/tests/behat/block_search_forums_frontpage.feature +++ b/blocks/search_forums/tests/behat/block_search_forums_frontpage.feature @@ -1,5 +1,5 @@ @block @block_search_forums @mod_forum -Feature: The search forums block allows users to search for forum posts +Feature: The search forums block allows users to search for forum posts on frontpage In order to search for a forum post As an administrator I can add the search forums block diff --git a/blocks/section_links/tests/behat/block_section_links_course.feature b/blocks/section_links/tests/behat/block_section_links_course.feature index 038a966d245..f43f6fd9287 100644 --- a/blocks/section_links/tests/behat/block_section_links_course.feature +++ b/blocks/section_links/tests/behat/block_section_links_course.feature @@ -27,7 +27,6 @@ Feature: The section links block allows users to quickly navigate around a moodl | id_coursedisplay | Show one section per page | And I press "Save and display" - Scenario: Add the section links block to a course. Given I add the "Section links" block And I turn editing mode off diff --git a/blog/tests/behat/delete.feature b/blog/tests/behat/delete.feature index d41e9decb0a..950577ba8a9 100644 --- a/blog/tests/behat/delete.feature +++ b/blog/tests/behat/delete.feature @@ -48,4 +48,3 @@ Feature: Delete a blog entry And I press "Cancel" And I should see "Blog post one" And I should see "Blog post two" - diff --git a/calendar/tests/behat/calendar.feature b/calendar/tests/behat/calendar.feature index d18eae3ef8a..c026cfe4360 100644 --- a/calendar/tests/behat/calendar.feature +++ b/calendar/tests/behat/calendar.feature @@ -111,4 +111,3 @@ Feature: Perform basic calendar functionality | Description | Wait, this event isn't that great. | And I press "Save changes" And I should see "Mediocre event" - diff --git a/cohort/tests/behat/access_visible_cohorts.feature b/cohort/tests/behat/access_visible_cohorts.feature index 899ec2c4f4d..e9131933857 100644 --- a/cohort/tests/behat/access_visible_cohorts.feature +++ b/cohort/tests/behat/access_visible_cohorts.feature @@ -125,4 +125,3 @@ Feature: Access visible and hidden cohorts And the "Select members from cohort" select box should not contain "Cohort in category 2" And the "Select members from cohort" select box should not contain "Cohort empty in category 1" And the "Select members from cohort" select box should not contain "System empty cohort" - diff --git a/course/format/social/tests/behat/social_adjust_discussion_count.feature b/course/format/social/tests/behat/social_adjust_discussion_count.feature index 2f474b2f6a1..4c83c5a320c 100644 --- a/course/format/social/tests/behat/social_adjust_discussion_count.feature +++ b/course/format/social/tests/behat/social_adjust_discussion_count.feature @@ -4,7 +4,7 @@ Feature: Change number of discussions displayed As a teacher I need to edit the course and change the number of sections displayed. -Background: + Background: Given the following "users" exist: | username | firstname | lastname | email | | teacher1 | Teacher | 1 | teacher1@example.com | @@ -96,28 +96,28 @@ Background: And I wait to be redirected And I follow "Course 1" -Scenario: When number of discussions is decreased fewer discussions appear + Scenario: When number of discussions is decreased fewer discussions appear Given I navigate to "Edit settings" in current page administration And I set the following fields to these values: - | numdiscussions | 5 | + | numdiscussions | 5 | When I press "Save and display" Then I should see "This is forum post one" And I should see "This is forum post five" And I should not see "This is forum post six" -Scenario: When number of discussions is decreased to less than 1 only 1 discussion should appear + Scenario: When number of discussions is decreased to less than 1 only 1 discussion should appear Given I navigate to "Edit settings" in current page administration And I set the following fields to these values: - | numdiscussions | -1 | + | numdiscussions | -1 | When I press "Save and display" Then I should see "This is forum post one" And I should not see "This is forum post two" And I should not see "This is forum post ten" -Scenario: When number of discussions is increased more discussions appear + Scenario: When number of discussions is increased more discussions appear Given I navigate to "Edit settings" in current page administration And I set the following fields to these values: - | numdiscussions | 9 | + | numdiscussions | 9 | When I press "Save and display" Then I should see "This is forum post one" And I should see "This is forum post five" diff --git a/course/tests/behat/category_change_visibility.feature b/course/tests/behat/category_change_visibility.feature index 1bb7129b396..042094cf609 100644 --- a/course/tests/behat/category_change_visibility.feature +++ b/course/tests/behat/category_change_visibility.feature @@ -255,64 +255,64 @@ Feature: We can change the visibility of categories in the management interface. And course in management listing should be dimmed "C2" And course in management listing should be visible "C3" - @javascript @_cross_browser - Scenario: Test courses are hidden when selected category parent is hidden. - Given the following "categories" exist: - | name | category | idnumber | - | Cat 1 | 0 | CAT1 | - | Cat 2 | CAT1 | CAT2 | - | Cat 3 | CAT2 | CAT3 | - And the following "courses" exist: - | category | fullname | shortname | idnumber | - | CAT3 | Course 1 | Course 1 | C1 | + @javascript @_cross_browser + Scenario: Test courses are hidden when selected category parent is hidden. + Given the following "categories" exist: + | name | category | idnumber | + | Cat 1 | 0 | CAT1 | + | Cat 2 | CAT1 | CAT2 | + | Cat 3 | CAT2 | CAT3 | + And the following "courses" exist: + | category | fullname | shortname | idnumber | + | CAT3 | Course 1 | Course 1 | C1 | - And I log in as "admin" - And I go to the courses management page - And I start watching to see if a new page loads - And I should see the "Course categories and courses" management page - And I click on category "Cat 1" in the management interface - And a new page should have loaded since I started watching - And I start watching to see if a new page loads - And I should see the "Course categories and courses" management page - And I click on category "Cat 2" in the management interface - And a new page should have loaded since I started watching - And I start watching to see if a new page loads - And I should see the "Course categories and courses" management page - And I click on category "Cat 3" in the management interface - And a new page should have loaded since I started watching - And I start watching to see if a new page loads - And I should see the "Course categories and courses" management page - And category in management listing should be visible "CAT1" - And category in management listing should be visible "CAT2" - And category in management listing should be visible "CAT3" - And course in management listing should be visible "C1" - And I toggle visibility of category "CAT1" in management listing - And a new page should not have loaded since I started watching - And category in management listing should be dimmed "CAT1" - And category in management listing should be dimmed "CAT2" - And category in management listing should be dimmed "CAT3" - And course in management listing should be dimmed "C1" - And I toggle visibility of category "CAT1" in management listing - And a new page should not have loaded since I started watching - And category in management listing should be visible "CAT1" - And category in management listing should be visible "CAT2" - And category in management listing should be visible "CAT3" - And course in management listing should be visible "C1" - And I toggle visibility of course "C1" in management listing - And a new page should not have loaded since I started watching - And category in management listing should be visible "CAT1" - And category in management listing should be visible "CAT2" - And category in management listing should be visible "CAT3" - And course in management listing should be dimmed "C1" - And I toggle visibility of category "CAT1" in management listing - And a new page should not have loaded since I started watching - And category in management listing should be dimmed "CAT1" - And category in management listing should be dimmed "CAT2" - And category in management listing should be dimmed "CAT3" - And course in management listing should be dimmed "C1" - And I toggle visibility of category "CAT1" in management listing - And a new page should not have loaded since I started watching - And category in management listing should be visible "CAT1" - And category in management listing should be visible "CAT2" - And category in management listing should be visible "CAT3" - And course in management listing should be dimmed "C1" + And I log in as "admin" + And I go to the courses management page + And I start watching to see if a new page loads + And I should see the "Course categories and courses" management page + And I click on category "Cat 1" in the management interface + And a new page should have loaded since I started watching + And I start watching to see if a new page loads + And I should see the "Course categories and courses" management page + And I click on category "Cat 2" in the management interface + And a new page should have loaded since I started watching + And I start watching to see if a new page loads + And I should see the "Course categories and courses" management page + And I click on category "Cat 3" in the management interface + And a new page should have loaded since I started watching + And I start watching to see if a new page loads + And I should see the "Course categories and courses" management page + And category in management listing should be visible "CAT1" + And category in management listing should be visible "CAT2" + And category in management listing should be visible "CAT3" + And course in management listing should be visible "C1" + And I toggle visibility of category "CAT1" in management listing + And a new page should not have loaded since I started watching + And category in management listing should be dimmed "CAT1" + And category in management listing should be dimmed "CAT2" + And category in management listing should be dimmed "CAT3" + And course in management listing should be dimmed "C1" + And I toggle visibility of category "CAT1" in management listing + And a new page should not have loaded since I started watching + And category in management listing should be visible "CAT1" + And category in management listing should be visible "CAT2" + And category in management listing should be visible "CAT3" + And course in management listing should be visible "C1" + And I toggle visibility of course "C1" in management listing + And a new page should not have loaded since I started watching + And category in management listing should be visible "CAT1" + And category in management listing should be visible "CAT2" + And category in management listing should be visible "CAT3" + And course in management listing should be dimmed "C1" + And I toggle visibility of category "CAT1" in management listing + And a new page should not have loaded since I started watching + And category in management listing should be dimmed "CAT1" + And category in management listing should be dimmed "CAT2" + And category in management listing should be dimmed "CAT3" + And course in management listing should be dimmed "C1" + And I toggle visibility of category "CAT1" in management listing + And a new page should not have loaded since I started watching + And category in management listing should be visible "CAT1" + And category in management listing should be visible "CAT2" + And category in management listing should be visible "CAT3" + And course in management listing should be dimmed "C1" diff --git a/course/tests/behat/course_search.feature b/course/tests/behat/course_search.feature index 24bfaaddef5..5dfda56372c 100644 --- a/course/tests/behat/course_search.feature +++ b/course/tests/behat/course_search.feature @@ -5,12 +5,11 @@ Feature: Courses can be searched for and moved in bulk. I need to be able to search courses in bulk and move them around Background: - Given the following "categories" exist: + Given the following "categories" exist: | name | category | idnumber | | Science | 0 | SCI | | English | 0 | ENG | | Miscellaneous | 0 | MISC | - And the following "courses" exist: | fullname | shortname | category | | Biology Y1 | BIO1 | MISC | diff --git a/course/tests/behat/force_group_mode.feature b/course/tests/behat/force_group_mode.feature index 07333d132f2..284a59dd171 100644 --- a/course/tests/behat/force_group_mode.feature +++ b/course/tests/behat/force_group_mode.feature @@ -48,4 +48,3 @@ Feature: Force group mode in a course And I press "Save and display" Then "//a/child::img[contains(@alt, 'No groups (forced mode)')]" "xpath_element" should not exist And "//img[contains(@alt, 'No groups (forced mode)')]" "xpath_element" should not exist - diff --git a/course/tests/behat/view_subfolders_inline.feature b/course/tests/behat/view_subfolders_inline.feature index 9730e539c18..14194c068b3 100644 --- a/course/tests/behat/view_subfolders_inline.feature +++ b/course/tests/behat/view_subfolders_inline.feature @@ -28,40 +28,40 @@ Feature: View subfolders in a course in-line And I click on "button.fp-dlg-butcreate" "css_element" in the "div.fp-mkdir-dlg" "css_element" And I press "Save changes" - @javascript - Scenario: Add a folder with two subfolders - view on separate page - Given I follow "Course 1" - And I should not see "Test subfolder 1" - And I follow "Test folder" - And I should see "Test subfolder 1" - And I press "Edit" - And I press "Create folder" - And I set the field "New folder name" to "Test subfolder 2" - And I click on "button.fp-dlg-butcreate" "css_element" in the "div.fp-mkdir-dlg" "css_element" - And I press "Save changes" - When I follow "Course 1" - Then I should not see "Test subfolder 2" - And I follow "Test folder" - And I should see "Test subfolder 2" + @javascript + Scenario: Add a folder with two subfolders - view on separate page + Given I follow "Course 1" + And I should not see "Test subfolder 1" + And I follow "Test folder" + And I should see "Test subfolder 1" + And I press "Edit" + And I press "Create folder" + And I set the field "New folder name" to "Test subfolder 2" + And I click on "button.fp-dlg-butcreate" "css_element" in the "div.fp-mkdir-dlg" "css_element" + And I press "Save changes" + When I follow "Course 1" + Then I should not see "Test subfolder 2" + And I follow "Test folder" + And I should see "Test subfolder 2" - @javascript - Scenario: Make the subfolders viewable inline on the course page - Given I press "Edit" - And I click on "div.fp-filename" "css_element" in the "div.fp-filename-field" "css_element" - And I press "Create folder" - And I set the field "New folder name" to "Test sub subfolder" - And I click on "button.fp-dlg-butcreate" "css_element" in the "div.fp-mkdir-dlg" "css_element" - And I press "Save changes" - And I should see "Test sub subfolder" - And I navigate to "Edit settings" in current page administration - And I set the field "Display folder contents" to "Inline on a course page" - And I set the field "Show subfolders expanded" to "" - And I press "Save and return to course" - And I should see "Test subfolder 1" - And I should not see "Test sub subfolder" - And I open "Test folder" actions menu - When I click on "Edit settings" "link" in the "Test folder" activity - And I set the field "Show subfolders expanded" to "1" - And I press "Save and return to course" - Then I should see "Test subfolder 1" - And I should see "Test sub subfolder" + @javascript + Scenario: Make the subfolders viewable inline on the course page + Given I press "Edit" + And I click on "div.fp-filename" "css_element" in the "div.fp-filename-field" "css_element" + And I press "Create folder" + And I set the field "New folder name" to "Test sub subfolder" + And I click on "button.fp-dlg-butcreate" "css_element" in the "div.fp-mkdir-dlg" "css_element" + And I press "Save changes" + And I should see "Test sub subfolder" + And I navigate to "Edit settings" in current page administration + And I set the field "Display folder contents" to "Inline on a course page" + And I set the field "Show subfolders expanded" to "" + And I press "Save and return to course" + And I should see "Test subfolder 1" + And I should not see "Test sub subfolder" + And I open "Test folder" actions menu + When I click on "Edit settings" "link" in the "Test folder" activity + And I set the field "Show subfolders expanded" to "1" + And I press "Save and return to course" + Then I should see "Test subfolder 1" + And I should see "Test sub subfolder" diff --git a/files/tests/behat/add_custom_file_type.feature b/files/tests/behat/add_custom_file_type.feature index 03e2e381122..0ed9a61ced7 100644 --- a/files/tests/behat/add_custom_file_type.feature +++ b/files/tests/behat/add_custom_file_type.feature @@ -4,7 +4,6 @@ Feature: Add a new custom file type As an admin I need to add a new custom file type - @javascript Scenario: Add custom file type Given the following "courses" exist: diff --git a/grade/report/grader/tests/behat/ajax_grader.feature b/grade/report/grader/tests/behat/ajax_grader.feature index e274a36ef94..dddab82eb22 100644 --- a/grade/report/grader/tests/behat/ajax_grader.feature +++ b/grade/report/grader/tests/behat/ajax_grader.feature @@ -4,7 +4,6 @@ Feature: Using the AJAX grading feature of Grader report to update grades and fe As a teacher I need to be able to update and verify grades - Background: Given the following "courses" exist: | fullname | shortname | category | groupmode | diff --git a/grade/report/user/tests/behat/view_usereport.feature b/grade/report/user/tests/behat/view_usereport.feature index c0bebe61d35..3fc9563afe5 100644 --- a/grade/report/user/tests/behat/view_usereport.feature +++ b/grade/report/user/tests/behat/view_usereport.feature @@ -8,10 +8,10 @@ Feature: We can use the user report | fullname | shortname | category | | Course 1 | C1 | 0 | - Scenario: Verify we can view a user grade report with no users enrolled. - Given I log in as "admin" - And I am on site homepage - And I follow "Course 1" - And I navigate to "View > User report" in the course gradebook - And I select "All users (0)" from the "Select all or one user" singleselect - Then I should see "No students enrolled in this course yet" + Scenario: Verify we can view a user grade report with no users enrolled. + Given I log in as "admin" + And I am on site homepage + And I follow "Course 1" + And I navigate to "View > User report" in the course gradebook + And I select "All users (0)" from the "Select all or one user" singleselect + Then I should see "No students enrolled in this course yet" diff --git a/grade/tests/behat/grade_calculated_grade_items.feature b/grade/tests/behat/grade_calculated_grade_items.feature index a8ecfae18cc..57046899f7b 100644 --- a/grade/tests/behat/grade_calculated_grade_items.feature +++ b/grade/tests/behat/grade_calculated_grade_items.feature @@ -52,7 +52,7 @@ Feature: Calculated grade items can be used in the gradebook @javascript Scenario: Changing max grade for a category item with a calculation that has existing grades will display the same points with the new max grade values immediately. - Given I press "Add category" + Given I press "Add category" And I set the following fields to these values: | Category name | Calc cat | And I press "Save changes" diff --git a/grade/tests/behat/grade_item_validation.feature b/grade/tests/behat/grade_item_validation.feature index fa38d4a30aa..ef381aad6ae 100644 --- a/grade/tests/behat/grade_item_validation.feature +++ b/grade/tests/behat/grade_item_validation.feature @@ -1,5 +1,5 @@ @core_grades -Feature: Editing a grade item +Feature: Grade item validation In order to ensure validation is provided to the teacher As a teacher I need to know why I can not add/edit values on the grade item form diff --git a/grade/tests/behat/grade_letter_boundary_20160518.feature b/grade/tests/behat/grade_letter_boundary_20160518.feature index 072c32df802..8ec6dafd571 100644 --- a/grade/tests/behat/grade_letter_boundary_20160518.feature +++ b/grade/tests/behat/grade_letter_boundary_20160518.feature @@ -1,5 +1,5 @@ @core @core_grades -Feature: We can customise the letter boundary of a course. +Feature: We can customise the letter boundary of a course in gradebook version 20160518. In order to change the letter boundary of a course As a teacher I need to add assessments to the gradebook. diff --git a/grade/tests/behat/grade_natural_normalisation.feature b/grade/tests/behat/grade_natural_normalisation.feature index 1f10b75dff2..82dbd8d05b7 100644 --- a/grade/tests/behat/grade_natural_normalisation.feature +++ b/grade/tests/behat/grade_natural_normalisation.feature @@ -229,39 +229,37 @@ Feature: We can use natural aggregation and weights will be normalised to a tota @javascript Scenario: With one grade item set as extra credit, when I reset the weights for a category they return to the natural weights. - - When I set the following settings for grade item "Test assignment five": - | Extra credit | 1 | - And I set the field "Override weight of Test assignment six" to "1" - And I set the field "Override weight of Test assignment seven" to "1" - And I set the field "Weight of Test assignment six" to "55" - And I set the field "Weight of Test assignment seven" to "40" - And I press "Save changes" - And I reset weights for grade category "Sub category 1" - Then the field "Weight of Test assignment five" matches value "80.0" - And the field "Weight of Test assignment six" matches value "40.0" - And the field "Weight of Test assignment seven" matches value "60.0" + When I set the following settings for grade item "Test assignment five": + | Extra credit | 1 | + And I set the field "Override weight of Test assignment six" to "1" + And I set the field "Override weight of Test assignment seven" to "1" + And I set the field "Weight of Test assignment six" to "55" + And I set the field "Weight of Test assignment seven" to "40" + And I press "Save changes" + And I reset weights for grade category "Sub category 1" + Then the field "Weight of Test assignment five" matches value "80.0" + And the field "Weight of Test assignment six" matches value "40.0" + And the field "Weight of Test assignment seven" matches value "60.0" @javascript Scenario: Overriding a grade item with a negative value results in the value being changed to zero. - - When I set the field "Override weight of Test assignment five" to "1" - And I set the field "Weight of Test assignment five" to "-15" - And I press "Save changes" - Then the field "Weight of Test assignment five" matches value "0.0" - And the field "Weight of Test assignment six" matches value "40.0" - And the field "Weight of Test assignment seven" matches value "60.0" - And I set the field "Override weight of Test assignment six" to "1" - And I set the field "Weight of Test assignment six" to "-25" - And I press "Save changes" - And the field "Weight of Test assignment six" matches value "0.0" - And the field "Weight of Test assignment seven" matches value "100.0" - And I reset weights for grade category "Sub category 1" - And I set the field "Override weight of Test assignment five" to "1" - And I set the field "Override weight of Test assignment six" to "1" - And I set the field "Weight of Test assignment five" to "-10" - And I set the field "Weight of Test assignment six" to "120" - And I press "Save changes" - And the field "Weight of Test assignment five" matches value "0.0" - And the field "Weight of Test assignment six" matches value "100.0" - And the field "Weight of Test assignment seven" matches value "0.0" + When I set the field "Override weight of Test assignment five" to "1" + And I set the field "Weight of Test assignment five" to "-15" + And I press "Save changes" + Then the field "Weight of Test assignment five" matches value "0.0" + And the field "Weight of Test assignment six" matches value "40.0" + And the field "Weight of Test assignment seven" matches value "60.0" + And I set the field "Override weight of Test assignment six" to "1" + And I set the field "Weight of Test assignment six" to "-25" + And I press "Save changes" + And the field "Weight of Test assignment six" matches value "0.0" + And the field "Weight of Test assignment seven" matches value "100.0" + And I reset weights for grade category "Sub category 1" + And I set the field "Override weight of Test assignment five" to "1" + And I set the field "Override weight of Test assignment six" to "1" + And I set the field "Weight of Test assignment five" to "-10" + And I set the field "Weight of Test assignment six" to "120" + And I press "Save changes" + And the field "Weight of Test assignment five" matches value "0.0" + And the field "Weight of Test assignment six" matches value "100.0" + And the field "Weight of Test assignment seven" matches value "0.0" diff --git a/lib/editor/atto/plugins/accessibilityhelper/tests/behat/accessibilityhelper.feature b/lib/editor/atto/plugins/accessibilityhelper/tests/behat/accessibilityhelper.feature index 810f999b75f..8d256d378c0 100644 --- a/lib/editor/atto/plugins/accessibilityhelper/tests/behat/accessibilityhelper.feature +++ b/lib/editor/atto/plugins/accessibilityhelper/tests/behat/accessibilityhelper.feature @@ -32,4 +32,3 @@ Feature: Atto accessibility helper # This shows the current HTML tags applied to the selected text. # This is required because they are not always read by a screen reader. Then I should see "UL, LI" - diff --git a/lib/editor/atto/plugins/align/tests/behat/align.feature b/lib/editor/atto/plugins/align/tests/behat/align.feature index 130389088a8..e6af81b5e89 100644 --- a/lib/editor/atto/plugins/align/tests/behat/align.feature +++ b/lib/editor/atto/plugins/align/tests/behat/align.feature @@ -53,4 +53,3 @@ Feature: Atto align text And I press "Save changes" And I click on "Edit profile" "link" in the "region-main" "region" Then I should see "style=\"text-align:center;\"" - diff --git a/lib/editor/atto/plugins/clear/tests/behat/clear.feature b/lib/editor/atto/plugins/clear/tests/behat/clear.feature index c458ee6f2d3..0e63a89fe6a 100644 --- a/lib/editor/atto/plugins/clear/tests/behat/clear.feature +++ b/lib/editor/atto/plugins/clear/tests/behat/clear.feature @@ -20,4 +20,3 @@ Feature: Atto clear button And I press "Save changes" And I click on "Edit profile" "link" in the "region-main" "region" Then I should not see "Pisa" - diff --git a/lib/editor/atto/plugins/collapse/tests/behat/collapse.feature b/lib/editor/atto/plugins/collapse/tests/behat/collapse.feature index 88f1aab15b6..f6ff8925ca5 100644 --- a/lib/editor/atto/plugins/collapse/tests/behat/collapse.feature +++ b/lib/editor/atto/plugins/collapse/tests/behat/collapse.feature @@ -11,4 +11,3 @@ Feature: Atto collapse button Then "Equation editor" "button" should be visible And I click on "Show fewer buttons" "button" Then "Equation editor" "button" should not be visible - diff --git a/lib/editor/atto/plugins/html/tests/behat/html.feature b/lib/editor/atto/plugins/html/tests/behat/html.feature index 1357cfcb0df..f4a747203e1 100644 --- a/lib/editor/atto/plugins/html/tests/behat/html.feature +++ b/lib/editor/atto/plugins/html/tests/behat/html.feature @@ -11,4 +11,3 @@ Feature: Atto edit HTML And I click on "Show more buttons" "button" And I click on "HTML" "button" Then the field "Description" matches value "
Smurf
" - diff --git a/lib/editor/atto/plugins/link/tests/behat/link.feature b/lib/editor/atto/plugins/link/tests/behat/link.feature index 4d02eb6d73a..f9487330ee2 100644 --- a/lib/editor/atto/plugins/link/tests/behat/link.feature +++ b/lib/editor/atto/plugins/link/tests/behat/link.feature @@ -24,4 +24,3 @@ Feature: Add links to Atto And I press "Save changes" And I click on "Edit profile" "link" in the "region-main" "region" Then I should see "Super cool" - diff --git a/lib/editor/atto/plugins/media/tests/behat/media.feature b/lib/editor/atto/plugins/media/tests/behat/media.feature index 60ec2c7351f..03cc0de6997 100644 --- a/lib/editor/atto/plugins/media/tests/behat/media.feature +++ b/lib/editor/atto/plugins/media/tests/behat/media.feature @@ -3,164 +3,164 @@ Feature: Add media to Atto To write rich text - I need to add media. Background: - Given I log in as "admin" - And I follow "Manage private files..." - And I upload "lib/editor/atto/tests/fixtures/moodle-logo.webm" file to "Files" filemanager - And I upload "lib/editor/atto/tests/fixtures/moodle-logo.mp4" file to "Files" filemanager - And I upload "lib/editor/atto/tests/fixtures/moodle-logo.png" file to "Files" filemanager - And I upload "lib/editor/atto/tests/fixtures/pretty-good-en.vtt" file to "Files" filemanager - And I upload "lib/editor/atto/tests/fixtures/pretty-good-sv.vtt" file to "Files" filemanager - And I click on "Save changes" "button" - And I follow "Profile" in the user menu - And I follow "Blog entries" - And I follow "Add a new entry" - And I set the field "Blog entry body" to "Media test
" - And I select the text in the "Blog entry body" Atto editor - And I set the field "Entry title" to "The best video in the entire world (not really)" - And I click on "Media" "button" + Given I log in as "admin" + And I follow "Manage private files..." + And I upload "lib/editor/atto/tests/fixtures/moodle-logo.webm" file to "Files" filemanager + And I upload "lib/editor/atto/tests/fixtures/moodle-logo.mp4" file to "Files" filemanager + And I upload "lib/editor/atto/tests/fixtures/moodle-logo.png" file to "Files" filemanager + And I upload "lib/editor/atto/tests/fixtures/pretty-good-en.vtt" file to "Files" filemanager + And I upload "lib/editor/atto/tests/fixtures/pretty-good-sv.vtt" file to "Files" filemanager + And I click on "Save changes" "button" + And I follow "Profile" in the user menu + And I follow "Blog entries" + And I follow "Add a new entry" + And I set the field "Blog entry body" to "Media test
" + And I select the text in the "Blog entry body" Atto editor + And I set the field "Entry title" to "The best video in the entire world (not really)" + And I click on "Media" "button" @javascript Scenario: Insert some media as a link - Given I click on "Browse repositories..." "button" in the "#id_summary_editor_link .atto_media_source.atto_media_link_source" "css_element" - And I click on "Private files" "link" in the ".fp-repo-area" "css_element" - And I click on "moodle-logo.webm" "link" - And I click on "Select this file" "button" - And the field "Enter name" matches value "moodle-logo.webm" - And I wait until the page is ready - And I click on "Insert media" "button" - When I click on "Save changes" "button" - Then "//a[. = 'moodle-logo.webm']" "xpath_element" should exist + Given I click on "Browse repositories..." "button" in the "#id_summary_editor_link .atto_media_source.atto_media_link_source" "css_element" + And I click on "Private files" "link" in the ".fp-repo-area" "css_element" + And I click on "moodle-logo.webm" "link" + And I click on "Select this file" "button" + And the field "Enter name" matches value "moodle-logo.webm" + And I wait until the page is ready + And I click on "Insert media" "button" + When I click on "Save changes" "button" + Then "//a[. = 'moodle-logo.webm']" "xpath_element" should exist @javascript Scenario: Insert some media as a plain video - Given I click on "Video" "link" - And I click on "Browse repositories..." "button" in the "#id_summary_editor_video .atto_media_source.atto_media_media_source" "css_element" - And I click on "Private files" "link" in the ".fp-repo-area" "css_element" - And I click on "moodle-logo.webm" "link" - And I click on "Select this file" "button" - And I click on "Add alternative source" "link" - And I click on "Browse repositories..." "button" in the "#id_summary_editor_video .atto_media_source.atto_media_media_source:nth-of-type(2)" "css_element" - And I click on "Private files" "link" in the ".fp-repo-area" "css_element" - And I click on "moodle-logo.mp4" "link" - And I click on "Select this file" "button" - When I click on "Insert media" "button" - Then "//video[descendant::source[contains(@src, 'moodle-logo.webm')]][descendant::source[contains(@src, 'moodle-logo.mp4')]]" "xpath_element" should exist + Given I click on "Video" "link" + And I click on "Browse repositories..." "button" in the "#id_summary_editor_video .atto_media_source.atto_media_media_source" "css_element" + And I click on "Private files" "link" in the ".fp-repo-area" "css_element" + And I click on "moodle-logo.webm" "link" + And I click on "Select this file" "button" + And I click on "Add alternative source" "link" + And I click on "Browse repositories..." "button" in the "#id_summary_editor_video .atto_media_source.atto_media_media_source:nth-of-type(2)" "css_element" + And I click on "Private files" "link" in the ".fp-repo-area" "css_element" + And I click on "moodle-logo.mp4" "link" + And I click on "Select this file" "button" + When I click on "Insert media" "button" + Then "//video[descendant::source[contains(@src, 'moodle-logo.webm')]][descendant::source[contains(@src, 'moodle-logo.mp4')]]" "xpath_element" should exist @javascript Scenario: Insert some media as a video with display settings - Given I click on "Video" "link" - And I click on "Browse repositories..." "button" in the "#id_summary_editor_video .atto_media_source.atto_media_media_source" "css_element" - And I click on "Private files" "link" in the ".fp-repo-area" "css_element" - And I click on "moodle-logo.webm" "link" - And I click on "Select this file" "button" - And I click on "Display options" "link" - And I click on "Browse repositories..." "button" in the "#id_summary_editor_video .atto_media_source.atto_media_poster_source" "css_element" - And I click on "Private files" "link" in the ".moodle-dialogue-base[aria-hidden='false'] .fp-repo-area" "css_element" - And I click on "moodle-logo.png" "link" - And I click on "Select this file" "button" in the ".moodle-dialogue-base[aria-hidden='false']" "css_element" - And I change window size to "large" - And I set the field with xpath "//*[contains(concat(' ', normalize-space(@class), ' '), ' atto_media_width_entry ')]" to "420" - And I set the field with xpath "//*[contains(concat(' ', normalize-space(@class), ' '), ' atto_media_height_entry ')]" to "69" - And I click on "Display options" "link" - When I click on "Insert media" "button" - Then "//video[descendant::source[contains(@src, 'moodle-logo.webm')]][contains(@poster, 'moodle-logo.png')][@width=420][@height=69]" "xpath_element" should exist + Given I click on "Video" "link" + And I click on "Browse repositories..." "button" in the "#id_summary_editor_video .atto_media_source.atto_media_media_source" "css_element" + And I click on "Private files" "link" in the ".fp-repo-area" "css_element" + And I click on "moodle-logo.webm" "link" + And I click on "Select this file" "button" + And I click on "Display options" "link" + And I click on "Browse repositories..." "button" in the "#id_summary_editor_video .atto_media_source.atto_media_poster_source" "css_element" + And I click on "Private files" "link" in the ".moodle-dialogue-base[aria-hidden='false'] .fp-repo-area" "css_element" + And I click on "moodle-logo.png" "link" + And I click on "Select this file" "button" in the ".moodle-dialogue-base[aria-hidden='false']" "css_element" + And I change window size to "large" + And I set the field with xpath "//*[contains(concat(' ', normalize-space(@class), ' '), ' atto_media_width_entry ')]" to "420" + And I set the field with xpath "//*[contains(concat(' ', normalize-space(@class), ' '), ' atto_media_height_entry ')]" to "69" + And I click on "Display options" "link" + When I click on "Insert media" "button" + Then "//video[descendant::source[contains(@src, 'moodle-logo.webm')]][contains(@poster, 'moodle-logo.png')][@width=420][@height=69]" "xpath_element" should exist @javascript Scenario: Insert some media as a video with advanced settings - Given I click on "Video" "link" - And I click on "Browse repositories..." "button" in the "#id_summary_editor_video .atto_media_source.atto_media_media_source" "css_element" - And I click on "Private files" "link" in the ".fp-repo-area" "css_element" - And I click on "moodle-logo.webm" "link" - And I click on "Select this file" "button" - And I click on "Advanced settings" "link" - And the field "Show controls" matches value "1" - And I set the field "Play automatically" to "1" - And I set the field "Muted" to "1" - And I set the field "Loop" to "1" - When I click on "Insert media" "button" - Then "//video[descendant::source[contains(@src, 'moodle-logo.webm')]][@controls='true'][@loop='true'][@autoplay='true'][@autoplay='true']" "xpath_element" should exist + Given I click on "Video" "link" + And I click on "Browse repositories..." "button" in the "#id_summary_editor_video .atto_media_source.atto_media_media_source" "css_element" + And I click on "Private files" "link" in the ".fp-repo-area" "css_element" + And I click on "moodle-logo.webm" "link" + And I click on "Select this file" "button" + And I click on "Advanced settings" "link" + And the field "Show controls" matches value "1" + And I set the field "Play automatically" to "1" + And I set the field "Muted" to "1" + And I set the field "Loop" to "1" + When I click on "Insert media" "button" + Then "//video[descendant::source[contains(@src, 'moodle-logo.webm')]][@controls='true'][@loop='true'][@autoplay='true'][@autoplay='true']" "xpath_element" should exist @javascript Scenario: Insert some media as a video with tracks - Given I click on "Video" "link" - And I change window size to "large" - And I click on "Browse repositories..." "button" in the "#id_summary_editor_video .atto_media_source.atto_media_media_source" "css_element" - And I click on "Private files" "link" in the ".fp-repo-area" "css_element" - And I click on "moodle-logo.webm" "link" - And I click on "Select this file" "button" - And I click on "Subtitles and captions" "link" - And I click on "Browse repositories..." "button" in the "#id_summary_editor_video_subtitles .atto_media_track_source" "css_element" - And I click on "Private files" "link" in the ".moodle-dialogue-base[aria-hidden='false'] .fp-repo-area" "css_element" - And I click on "pretty-good-sv.vtt" "link" - And I click on "Select this file" "button" in the ".moodle-dialogue-base[aria-hidden='false']" "css_element" - And the field "Label" matches value "Swedish" - And the field "Language" matches value "sv" - And I click on "Add subtitle track" "link" - And I click on "Browse repositories..." "button" in the "#id_summary_editor_video_subtitles .atto_media_track~.atto_media_track .atto_media_source.atto_media_track_source" "css_element" - And I click on "Private files" "link" in the ".moodle-dialogue-base[aria-hidden='false'] .fp-repo-area" "css_element" - And I click on "pretty-good-en.vtt" "link" - And I click on "Select this file" "button" in the ".moodle-dialogue-base[aria-hidden='false']" "css_element" - And the field with xpath "(//*[contains(concat(' ', normalize-space(@class), ' '), ' atto_media_track_label_entry ')])[2]" matches value "English" - And I set the field with xpath "(//*[contains(concat(' ', normalize-space(@class), ' '), ' atto_media_track_default ')])[1]" to "1" - And I click on "Captions" "link" in the ".nav-item[data-track-kind='captions']" "css_element" - And I click on "Browse repositories..." "button" in the "#id_summary_editor_video_captions .atto_media_track_source" "css_element" - And I click on "Private files" "link" in the ".moodle-dialogue-base[aria-hidden='false'] .fp-repo-area" "css_element" - And I click on "pretty-good-sv.vtt" "link" - And I click on "Select this file" "button" in the ".moodle-dialogue-base[aria-hidden='false']" "css_element" - And I click on "Overwrite" "button" - And the field with xpath "(//*[contains(concat(' ', normalize-space(@class), ' '), ' atto_media_track_label_entry ')])[3]" matches value "Swedish" - And I click on "Add caption track" "link" - And I click on "Browse repositories..." "button" in the "#id_summary_editor_video_captions .atto_media_track~.atto_media_track .atto_media_source.atto_media_track_source" "css_element" - And I click on "Private files" "link" in the ".moodle-dialogue-base[aria-hidden='false'] .fp-repo-area" "css_element" - And I click on "pretty-good-en.vtt" "link" - And I click on "Select this file" "button" in the ".moodle-dialogue-base[aria-hidden='false']" "css_element" - And I click on "Overwrite" "button" - And the field with xpath "(//*[contains(concat(' ', normalize-space(@class), ' '), ' atto_media_track_label_entry ')])[4]" matches value "English" - And I set the field with xpath "(//*[contains(concat(' ', normalize-space(@class), ' '), ' atto_media_track_default ')])[4]" to "1" - And I click on "Descriptions" "link" - And I click on "Browse repositories..." "button" in the "#id_summary_editor_video_descriptions .atto_media_track_source" "css_element" - And I click on "Private files" "link" in the ".moodle-dialogue-base[aria-hidden='false'] .fp-repo-area" "css_element" - And I click on "pretty-good-sv.vtt" "link" - And I click on "Select this file" "button" in the ".moodle-dialogue-base[aria-hidden='false']" "css_element" - And I click on "Overwrite" "button" - And the field with xpath "(//*[contains(concat(' ', normalize-space(@class), ' '), ' atto_media_track_label_entry ')])[5]" matches value "Swedish" - And I click on "Add description track" "link" - And I click on "Browse repositories..." "button" in the "#id_summary_editor_video_descriptions .atto_media_track~.atto_media_track .atto_media_source.atto_media_track_source" "css_element" - And I click on "Private files" "link" in the ".moodle-dialogue-base[aria-hidden='false'] .fp-repo-area" "css_element" - And I click on "pretty-good-en.vtt" "link" - And I click on "Select this file" "button" in the ".moodle-dialogue-base[aria-hidden='false']" "css_element" - And I click on "Overwrite" "button" - And the field with xpath "(//*[contains(concat(' ', normalize-space(@class), ' '), ' atto_media_track_label_entry ')])[6]" matches value "English" - And I set the field with xpath "(//*[contains(concat(' ', normalize-space(@class), ' '), ' atto_media_track_default ')])[5]" to "1" - And I click on "Chapters" "link" - And I click on "Browse repositories..." "button" in the "#id_summary_editor_video_chapters .atto_media_track_source" "css_element" - And I click on "Private files" "link" in the ".moodle-dialogue-base[aria-hidden='false'] .fp-repo-area" "css_element" - And I click on "pretty-good-sv.vtt" "link" - And I click on "Select this file" "button" in the ".moodle-dialogue-base[aria-hidden='false']" "css_element" - And I click on "Overwrite" "button" - And the field with xpath "(//*[contains(concat(' ', normalize-space(@class), ' '), ' atto_media_track_label_entry ')])[7]" matches value "Swedish" - And I click on "Add chapter track" "link" - And I click on "Browse repositories..." "button" in the "#id_summary_editor_video_chapters .atto_media_track~.atto_media_track .atto_media_source.atto_media_track_source" "css_element" - And I click on "Private files" "link" in the ".moodle-dialogue-base[aria-hidden='false'] .fp-repo-area" "css_element" - And I click on "pretty-good-en.vtt" "link" - And I click on "Select this file" "button" in the ".moodle-dialogue-base[aria-hidden='false']" "css_element" - And I click on "Overwrite" "button" - And the field with xpath "(//*[contains(concat(' ', normalize-space(@class), ' '), ' atto_media_track_label_entry ')])[8]" matches value "English" - And I set the field with xpath "(//*[contains(concat(' ', normalize-space(@class), ' '), ' atto_media_track_default ')])[8]" to "1" - And I click on "Metadata" "link" - And I click on "Browse repositories..." "button" in the "#id_summary_editor_video_metadata .atto_media_track_source" "css_element" - And I click on "Private files" "link" in the ".moodle-dialogue-base[aria-hidden='false'] .fp-repo-area" "css_element" - And I click on "pretty-good-sv.vtt" "link" - And I click on "Select this file" "button" in the ".moodle-dialogue-base[aria-hidden='false']" "css_element" - And I click on "Overwrite" "button" - And the field with xpath "(//*[contains(concat(' ', normalize-space(@class), ' '), ' atto_media_track_label_entry ')])[9]" matches value "Swedish" - And I click on "Add metadata track" "link" - And I click on "Browse repositories..." "button" in the "#id_summary_editor_video_metadata .atto_media_track~.atto_media_track .atto_media_source.atto_media_track_source" "css_element" - And I click on "Private files" "link" in the ".moodle-dialogue-base[aria-hidden='false'] .fp-repo-area" "css_element" - And I click on "pretty-good-en.vtt" "link" - And I click on "Select this file" "button" in the ".moodle-dialogue-base[aria-hidden='false']" "css_element" - And I click on "Overwrite" "button" - And the field with xpath "(//*[contains(concat(' ', normalize-space(@class), ' '), ' atto_media_track_label_entry ')])[10]" matches value "English" - And I set the field with xpath "(//*[contains(concat(' ', normalize-space(@class), ' '), ' atto_media_track_default ')])[9]" to "1" - When I click on "Insert media" "button" - Then "//video[descendant::source[contains(@src, 'moodle-logo.webm')]][descendant::track[contains(@src, 'pretty-good-sv.vtt')][@kind='subtitles'][@label='Swedish'][@srclang='sv'][@default='true']][descendant::track[contains(@src, 'pretty-good-en.vtt')][@kind='subtitles'][@label='English'][@srclang='en'][not(@default)]][descendant::track[contains(@src, 'pretty-good-sv.vtt')][@kind='captions'][@label='Swedish'][@srclang='sv'][not(@default)]][descendant::track[contains(@src, 'pretty-good-en.vtt')][@kind='captions'][@label='English'][@srclang='en'][@default='true']][descendant::track[contains(@src, 'pretty-good-sv.vtt')][@kind='descriptions'][@label='Swedish'][@srclang='sv'][@default='true']][descendant::track[contains(@src, 'pretty-good-en.vtt')][@kind='descriptions'][@label='English'][@srclang='en'][not(@default)]][descendant::track[contains(@src, 'pretty-good-sv.vtt')][@kind='chapters'][@label='Swedish'][@srclang='sv'][not(@default)]][descendant::track[contains(@src, 'pretty-good-en.vtt')][@kind='chapters'][@label='English'][@srclang='en'][@default='true']][descendant::track[contains(@src, 'pretty-good-sv.vtt')][@kind='metadata'][@label='Swedish'][@srclang='sv'][@default='true']][descendant::track[contains(@src, 'pretty-good-en.vtt')][@kind='metadata'][@label='English'][@srclang='en'][not(@default)]]" "xpath_element" should exist + Given I click on "Video" "link" + And I change window size to "large" + And I click on "Browse repositories..." "button" in the "#id_summary_editor_video .atto_media_source.atto_media_media_source" "css_element" + And I click on "Private files" "link" in the ".fp-repo-area" "css_element" + And I click on "moodle-logo.webm" "link" + And I click on "Select this file" "button" + And I click on "Subtitles and captions" "link" + And I click on "Browse repositories..." "button" in the "#id_summary_editor_video_subtitles .atto_media_track_source" "css_element" + And I click on "Private files" "link" in the ".moodle-dialogue-base[aria-hidden='false'] .fp-repo-area" "css_element" + And I click on "pretty-good-sv.vtt" "link" + And I click on "Select this file" "button" in the ".moodle-dialogue-base[aria-hidden='false']" "css_element" + And the field "Label" matches value "Swedish" + And the field "Language" matches value "sv" + And I click on "Add subtitle track" "link" + And I click on "Browse repositories..." "button" in the "#id_summary_editor_video_subtitles .atto_media_track~.atto_media_track .atto_media_source.atto_media_track_source" "css_element" + And I click on "Private files" "link" in the ".moodle-dialogue-base[aria-hidden='false'] .fp-repo-area" "css_element" + And I click on "pretty-good-en.vtt" "link" + And I click on "Select this file" "button" in the ".moodle-dialogue-base[aria-hidden='false']" "css_element" + And the field with xpath "(//*[contains(concat(' ', normalize-space(@class), ' '), ' atto_media_track_label_entry ')])[2]" matches value "English" + And I set the field with xpath "(//*[contains(concat(' ', normalize-space(@class), ' '), ' atto_media_track_default ')])[1]" to "1" + And I click on "Captions" "link" in the ".nav-item[data-track-kind='captions']" "css_element" + And I click on "Browse repositories..." "button" in the "#id_summary_editor_video_captions .atto_media_track_source" "css_element" + And I click on "Private files" "link" in the ".moodle-dialogue-base[aria-hidden='false'] .fp-repo-area" "css_element" + And I click on "pretty-good-sv.vtt" "link" + And I click on "Select this file" "button" in the ".moodle-dialogue-base[aria-hidden='false']" "css_element" + And I click on "Overwrite" "button" + And the field with xpath "(//*[contains(concat(' ', normalize-space(@class), ' '), ' atto_media_track_label_entry ')])[3]" matches value "Swedish" + And I click on "Add caption track" "link" + And I click on "Browse repositories..." "button" in the "#id_summary_editor_video_captions .atto_media_track~.atto_media_track .atto_media_source.atto_media_track_source" "css_element" + And I click on "Private files" "link" in the ".moodle-dialogue-base[aria-hidden='false'] .fp-repo-area" "css_element" + And I click on "pretty-good-en.vtt" "link" + And I click on "Select this file" "button" in the ".moodle-dialogue-base[aria-hidden='false']" "css_element" + And I click on "Overwrite" "button" + And the field with xpath "(//*[contains(concat(' ', normalize-space(@class), ' '), ' atto_media_track_label_entry ')])[4]" matches value "English" + And I set the field with xpath "(//*[contains(concat(' ', normalize-space(@class), ' '), ' atto_media_track_default ')])[4]" to "1" + And I click on "Descriptions" "link" + And I click on "Browse repositories..." "button" in the "#id_summary_editor_video_descriptions .atto_media_track_source" "css_element" + And I click on "Private files" "link" in the ".moodle-dialogue-base[aria-hidden='false'] .fp-repo-area" "css_element" + And I click on "pretty-good-sv.vtt" "link" + And I click on "Select this file" "button" in the ".moodle-dialogue-base[aria-hidden='false']" "css_element" + And I click on "Overwrite" "button" + And the field with xpath "(//*[contains(concat(' ', normalize-space(@class), ' '), ' atto_media_track_label_entry ')])[5]" matches value "Swedish" + And I click on "Add description track" "link" + And I click on "Browse repositories..." "button" in the "#id_summary_editor_video_descriptions .atto_media_track~.atto_media_track .atto_media_source.atto_media_track_source" "css_element" + And I click on "Private files" "link" in the ".moodle-dialogue-base[aria-hidden='false'] .fp-repo-area" "css_element" + And I click on "pretty-good-en.vtt" "link" + And I click on "Select this file" "button" in the ".moodle-dialogue-base[aria-hidden='false']" "css_element" + And I click on "Overwrite" "button" + And the field with xpath "(//*[contains(concat(' ', normalize-space(@class), ' '), ' atto_media_track_label_entry ')])[6]" matches value "English" + And I set the field with xpath "(//*[contains(concat(' ', normalize-space(@class), ' '), ' atto_media_track_default ')])[5]" to "1" + And I click on "Chapters" "link" + And I click on "Browse repositories..." "button" in the "#id_summary_editor_video_chapters .atto_media_track_source" "css_element" + And I click on "Private files" "link" in the ".moodle-dialogue-base[aria-hidden='false'] .fp-repo-area" "css_element" + And I click on "pretty-good-sv.vtt" "link" + And I click on "Select this file" "button" in the ".moodle-dialogue-base[aria-hidden='false']" "css_element" + And I click on "Overwrite" "button" + And the field with xpath "(//*[contains(concat(' ', normalize-space(@class), ' '), ' atto_media_track_label_entry ')])[7]" matches value "Swedish" + And I click on "Add chapter track" "link" + And I click on "Browse repositories..." "button" in the "#id_summary_editor_video_chapters .atto_media_track~.atto_media_track .atto_media_source.atto_media_track_source" "css_element" + And I click on "Private files" "link" in the ".moodle-dialogue-base[aria-hidden='false'] .fp-repo-area" "css_element" + And I click on "pretty-good-en.vtt" "link" + And I click on "Select this file" "button" in the ".moodle-dialogue-base[aria-hidden='false']" "css_element" + And I click on "Overwrite" "button" + And the field with xpath "(//*[contains(concat(' ', normalize-space(@class), ' '), ' atto_media_track_label_entry ')])[8]" matches value "English" + And I set the field with xpath "(//*[contains(concat(' ', normalize-space(@class), ' '), ' atto_media_track_default ')])[8]" to "1" + And I click on "Metadata" "link" + And I click on "Browse repositories..." "button" in the "#id_summary_editor_video_metadata .atto_media_track_source" "css_element" + And I click on "Private files" "link" in the ".moodle-dialogue-base[aria-hidden='false'] .fp-repo-area" "css_element" + And I click on "pretty-good-sv.vtt" "link" + And I click on "Select this file" "button" in the ".moodle-dialogue-base[aria-hidden='false']" "css_element" + And I click on "Overwrite" "button" + And the field with xpath "(//*[contains(concat(' ', normalize-space(@class), ' '), ' atto_media_track_label_entry ')])[9]" matches value "Swedish" + And I click on "Add metadata track" "link" + And I click on "Browse repositories..." "button" in the "#id_summary_editor_video_metadata .atto_media_track~.atto_media_track .atto_media_source.atto_media_track_source" "css_element" + And I click on "Private files" "link" in the ".moodle-dialogue-base[aria-hidden='false'] .fp-repo-area" "css_element" + And I click on "pretty-good-en.vtt" "link" + And I click on "Select this file" "button" in the ".moodle-dialogue-base[aria-hidden='false']" "css_element" + And I click on "Overwrite" "button" + And the field with xpath "(//*[contains(concat(' ', normalize-space(@class), ' '), ' atto_media_track_label_entry ')])[10]" matches value "English" + And I set the field with xpath "(//*[contains(concat(' ', normalize-space(@class), ' '), ' atto_media_track_default ')])[9]" to "1" + When I click on "Insert media" "button" + Then "//video[descendant::source[contains(@src, 'moodle-logo.webm')]][descendant::track[contains(@src, 'pretty-good-sv.vtt')][@kind='subtitles'][@label='Swedish'][@srclang='sv'][@default='true']][descendant::track[contains(@src, 'pretty-good-en.vtt')][@kind='subtitles'][@label='English'][@srclang='en'][not(@default)]][descendant::track[contains(@src, 'pretty-good-sv.vtt')][@kind='captions'][@label='Swedish'][@srclang='sv'][not(@default)]][descendant::track[contains(@src, 'pretty-good-en.vtt')][@kind='captions'][@label='English'][@srclang='en'][@default='true']][descendant::track[contains(@src, 'pretty-good-sv.vtt')][@kind='descriptions'][@label='Swedish'][@srclang='sv'][@default='true']][descendant::track[contains(@src, 'pretty-good-en.vtt')][@kind='descriptions'][@label='English'][@srclang='en'][not(@default)]][descendant::track[contains(@src, 'pretty-good-sv.vtt')][@kind='chapters'][@label='Swedish'][@srclang='sv'][not(@default)]][descendant::track[contains(@src, 'pretty-good-en.vtt')][@kind='chapters'][@label='English'][@srclang='en'][@default='true']][descendant::track[contains(@src, 'pretty-good-sv.vtt')][@kind='metadata'][@label='Swedish'][@srclang='sv'][@default='true']][descendant::track[contains(@src, 'pretty-good-en.vtt')][@kind='metadata'][@label='English'][@srclang='en'][not(@default)]]" "xpath_element" should exist diff --git a/lib/editor/atto/plugins/strike/tests/behat/strike.feature b/lib/editor/atto/plugins/strike/tests/behat/strike.feature index 5c38924b921..26ad2bf221d 100644 --- a/lib/editor/atto/plugins/strike/tests/behat/strike.feature +++ b/lib/editor/atto/plugins/strike/tests/behat/strike.feature @@ -18,4 +18,3 @@ Feature: Atto strike button And I press "Save changes" And I click on "Edit profile" "link" in the "region-main" "region" Then I should see "