From 8599eb5ebb0d367d956af0d9f96571c7ddc0be95 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?David=20Mudr=C3=A1k?= Date: Tue, 28 Apr 2020 14:20:51 +0200 Subject: [PATCH] MDL-68434 lang: Use the updated terminology in the tests --- .../tests/behat/add_url.feature | 2 +- .../tests/behat/admin_upload_content.feature | 2 +- .../tests/behat/delete_content.feature | 2 +- course/tests/behat/activity_chooser.feature | 84 +++++++++---------- .../tests/behat/add_h5pactivity.feature | 12 +-- .../tests/behat/sending_attempt.feature | 2 +- mod/h5pactivity/tests/privacy_test.php | 2 +- mod/quiz/tests/behat/attempt_begin.feature | 6 +- .../tests/behat/file_type_restriction.feature | 4 +- user/tests/behat/course_preference.feature | 7 +- 10 files changed, 61 insertions(+), 62 deletions(-) diff --git a/blocks/site_main_menu/tests/behat/add_url.feature b/blocks/site_main_menu/tests/behat/add_url.feature index 1b2a7df7682..ac42715f70e 100644 --- a/blocks/site_main_menu/tests/behat/add_url.feature +++ b/blocks/site_main_menu/tests/behat/add_url.feature @@ -16,4 +16,4 @@ Feature: Add URL to main menu block | External URL | http://www.google.com | | id_display | In pop-up | Then "google" "link" should exist in the "Main menu" "block" - And "Add an activity or resource" "button" should exist in the "Main menu" "block" + And "Add an activity" "button" should exist in the "Main menu" "block" diff --git a/contentbank/contenttype/h5p/tests/behat/admin_upload_content.feature b/contentbank/contenttype/h5p/tests/behat/admin_upload_content.feature index 8d03118b5e8..61f28ea6c62 100644 --- a/contentbank/contenttype/h5p/tests/behat/admin_upload_content.feature +++ b/contentbank/contenttype/h5p/tests/behat/admin_upload_content.feature @@ -48,7 +48,7 @@ Feature: H5P file upload to content bank for admins And I click on "Save changes" "button" And I wait until the page is ready And I should see "filltheblanks.h5p" - And I navigate to "Plugins > Content bank > Manage content bank content types" in site administration + And I navigate to "Plugins > Content bank > Manage content types" in site administration And I click on "Disable" "icon" in the "H5P" "table_row" And I wait until the page is ready When I click on "Content bank" "link" diff --git a/contentbank/tests/behat/delete_content.feature b/contentbank/tests/behat/delete_content.feature index 7280b1b3bf0..b49a79c76a1 100644 --- a/contentbank/tests/behat/delete_content.feature +++ b/contentbank/tests/behat/delete_content.feature @@ -31,7 +31,7 @@ Feature: Delete H5P file from the content bank When I open the action menu in "region-main-settings-menu" "region" Then I should see "Delete" And I choose "Delete" in the open action menu - And I should see "Are you sure you want to delete content 'filltheblanks.h5p'?" + And I should see "Are you sure you want to delete the content 'filltheblanks.h5p'" And I click on "Cancel" "button" in the "Delete content" "dialogue" And I should see "filltheblanks.h5p" And I open the action menu in "region-main-settings-menu" "region" diff --git a/course/tests/behat/activity_chooser.feature b/course/tests/behat/activity_chooser.feature index 14f20e156c1..98ef06a6432 100644 --- a/course/tests/behat/activity_chooser.feature +++ b/course/tests/behat/activity_chooser.feature @@ -18,13 +18,13 @@ Feature: Display and choose from the available activities in course And I am on "Course" course homepage with editing mode on Scenario: The available activities are displayed to the teacher in the activity chooser - Given I click on "Add an activity or resource" "button" in the "Topic 1" "section" - Then I should see "Add an activity or resource" in the ".modal-title" "css_element" + Given I click on "Add an activity" "button" in the "Topic 1" "section" + Then I should see "Add an activity" in the ".modal-title" "css_element" And I should see "Assignment" in the ".modal-body" "css_element" Scenario: The teacher can choose to add an activity from the activity items in the activity chooser - Given I click on "Add an activity or resource" "button" in the "Topic 3" "section" - When I click on "Add a new Assignment" "link" in the "Add an activity or resource" "dialogue" + Given I click on "Add an activity" "button" in the "Topic 3" "section" + When I click on "Add a new Assignment" "link" in the "Add an activity" "dialogue" Then I should see "Adding a new Assignment" And I set the following fields to these values: | Assignment name | Test Assignment Topic 3 | @@ -32,19 +32,19 @@ Feature: Display and choose from the available activities in course Then I should see "Test Assignment Topic 3" in the "Topic 3" "section" Scenario: The teacher can choose to add an activity from the activity summary in the activity chooser - Given I click on "Add an activity or resource" "button" in the "Topic 1" "section" - When I click on "Information about the Assignment activity" "button" in the "Add an activity or resource" "dialogue" + Given I click on "Add an activity" "button" in the "Topic 1" "section" + When I click on "Information about the Assignment activity" "button" in the "Add an activity" "dialogue" When I click on "Add a new Assignment" "link" in the "help" "core_course > Activity chooser screen" Then I should see "Adding a new Assignment" Scenario: Show summary - Given I click on "Add an activity or resource" "button" in the "Topic 1" "section" - When I click on "Information about the Assignment activity" "button" in the "Add an activity or resource" "dialogue" + Given I click on "Add an activity" "button" in the "Topic 1" "section" + When I click on "Information about the Assignment activity" "button" in the "Add an activity" "dialogue" Then I should see "Assignment" in the "help" "core_course > Activity chooser screen" And I should see "The assignment activity module enables a teacher to communicate tasks, collect work and provide grades and feedback." Scenario: Hide summary - Given I click on "Add an activity or resource" "button" in the "Topic 1" "section" + Given I click on "Add an activity" "button" in the "Topic 1" "section" When I click on "Information about the Assignment activity" "button" in the "modules" "core_course > Activity chooser screen" And I should see "The assignment activity module enables a teacher to communicate tasks, collect work and provide grades and feedback." in the "help" "core_course > Activity chooser screen" And I should see "Back" in the "help" "core_course > Activity chooser screen" @@ -52,7 +52,7 @@ Feature: Display and choose from the available activities in course Then "modules" "core_course > Activity chooser screen" should exist And "help" "core_course > Activity chooser screen" should not exist And "Back" "button" should not exist in the "modules" "core_course > Activity chooser screen" - And I should not see "The assignment activity module enables a teacher to communicate tasks, collect work and provide grades and feedback." in the "Add an activity or resource" "dialogue" + And I should not see "The assignment activity module enables a teacher to communicate tasks, collect work and provide grades and feedback." in the "Add an activity" "dialogue" Scenario: View recommended activities When I log out @@ -65,85 +65,85 @@ Feature: Display and choose from the available activities in course And I log in as "teacher" And I am on "Course" course homepage with editing mode on And I open the activity chooser - Then I should see "Recommended" in the "Add an activity or resource" "dialogue" - And I click on "Recommended" "link" in the "Add an activity or resource" "dialogue" + Then I should see "Recommended" in the "Add an activity" "dialogue" + And I click on "Recommended" "link" in the "Add an activity" "dialogue" And I should see "Book" in the "recommended" "core_course > Activity chooser tab" Scenario: Favourite a module in the activity chooser Given I open the activity chooser - And I should not see "Starred" in the "Add an activity or resource" "dialogue" - And I click on "Star Assignment module" "button" in the "Add an activity or resource" "dialogue" - And I should see "Starred" in the "Add an activity or resource" "dialogue" - When I click on "Starred" "link" in the "Add an activity or resource" "dialogue" + And I should not see "Starred" in the "Add an activity" "dialogue" + And I click on "Star Assignment activity" "button" in the "Add an activity" "dialogue" + And I should see "Starred" in the "Add an activity" "dialogue" + When I click on "Starred" "link" in the "Add an activity" "dialogue" Then I should see "Assignment" in the "favourites" "core_course > Activity chooser tab" And I click on "Information about the Assignment activity" "button" in the "favourites" "core_course > Activity chooser tab" And I should see "The assignment activity module enables a teacher to communicate tasks, collect work and provide grades and feedback." Scenario: Add a favourite module and check it exists when reopening the chooser Given I open the activity chooser - And I click on "Star Assignment module" "button" in the "Add an activity or resource" "dialogue" - And I click on "Star Forum module" "button" in the "Add an activity or resource" "dialogue" - And I should see "Starred" in the "Add an activity or resource" "dialogue" - And I click on "Close" "button" in the "Add an activity or resource" "dialogue" - When I click on "Add an activity or resource" "button" in the "Topic 3" "section" - And I click on "Starred" "link" in the "Add an activity or resource" "dialogue" + And I click on "Star Assignment activity" "button" in the "Add an activity" "dialogue" + And I click on "Star Forum activity" "button" in the "Add an activity" "dialogue" + And I should see "Starred" in the "Add an activity" "dialogue" + And I click on "Close" "button" in the "Add an activity" "dialogue" + When I click on "Add an activity" "button" in the "Topic 3" "section" + And I click on "Starred" "link" in the "Add an activity" "dialogue" Then I should see "Forum" in the "favourites" "core_course > Activity chooser tab" Scenario: Add a favourite and then remove it whilst checking the tabs work as expected Given I open the activity chooser - And I click on "Star Assignment module" "button" in the "Add an activity or resource" "dialogue" - And I click on "Starred" "link" in the "Add an activity or resource" "dialogue" - And I click on "Star Assignment module" "button" in the "Add an activity or resource" "dialogue" - Then I should not see "Starred" in the "Add an activity or resource" "dialogue" + And I click on "Star Assignment activity" "button" in the "Add an activity" "dialogue" + And I click on "Starred" "link" in the "Add an activity" "dialogue" + And I click on "Star Assignment activity" "button" in the "Add an activity" "dialogue" + Then I should not see "Starred" in the "Add an activity" "dialogue" Scenario: The teacher can search for an activity by it's name - Given I click on "Add an activity or resource" "button" in the "Topic 1" "section" + Given I click on "Add an activity" "button" in the "Topic 1" "section" When I set the field "search" to "Lesson" - Then I should see "1 results found" in the "Add an activity or resource" "dialogue" - And I should see "Lesson" in the "Add an activity or resource" "dialogue" + Then I should see "1 results found" in the "Add an activity" "dialogue" + And I should see "Lesson" in the "Add an activity" "dialogue" Scenario: The teacher can search for an activity by it's description Given I open the activity chooser When I set the field "search" to "The lesson activity module enables a teacher to deliver content" - Then I should see "1 results found" in the "Add an activity or resource" "dialogue" - And I should see "Lesson" in the "Add an activity or resource" "dialogue" + Then I should see "1 results found" in the "Add an activity" "dialogue" + And I should see "Lesson" in the "Add an activity" "dialogue" Scenario: Search results are not returned if the search query does not match any activity name or description - Given I click on "Add an activity or resource" "button" in the "Topic 1" "section" + Given I click on "Add an activity" "button" in the "Topic 1" "section" When I set the field "search" to "Random search query" - Then I should see "0 results found" in the "Add an activity or resource" "dialogue" + Then I should see "0 results found" in the "Add an activity" "dialogue" And ".option" "css_element" should not exist in the ".searchresultitemscontainer" "css_element" Scenario: Teacher can return to the default activity chooser state by manually removing the search query - Given I click on "Add an activity or resource" "button" in the "Topic 1" "section" + Given I click on "Add an activity" "button" in the "Topic 1" "section" And I set the field "search" to "Lesson" - And I should see "1 results found" in the "Add an activity or resource" "dialogue" - And I should see "Lesson" in the "Add an activity or resource" "dialogue" + And I should see "1 results found" in the "Add an activity" "dialogue" + And I should see "Lesson" in the "Add an activity" "dialogue" When I set the field "search" to "" - And I should not see "1 results found" in the "Add an activity or resource" "dialogue" + And I should not see "1 results found" in the "Add an activity" "dialogue" Then ".searchresultscontainer" "css_element" should not exist And ".optionscontainer" "css_element" should exist Scenario: Teacher can not see a "clear" button if a search query is not entered in the activity chooser search bar - When I click on "Add an activity or resource" "button" in the "Topic 1" "section" + When I click on "Add an activity" "button" in the "Topic 1" "section" Then "Clear search input" "button" should not exist Scenario: Teacher can see a "clear" button after entering a search query in the activity chooser search bar - Given I click on "Add an activity or resource" "button" in the "Topic 1" "section" + Given I click on "Add an activity" "button" in the "Topic 1" "section" When I set the field "search" to "Search query" Then "Clear search input" "button" should not exist Scenario: Teacher can not see a "clear" button if the search query is removed in the activity chooser search bar - Given I click on "Add an activity or resource" "button" in the "Topic 1" "section" + Given I click on "Add an activity" "button" in the "Topic 1" "section" And I set the field "search" to "Search query" And "Clear search input" "button" should exist When I set the field "search" to "" Then "Clear search input" "button" should not exist Scenario: Teacher can instantly remove the search query from the activity search bar by clicking on the "clear" button - Given I click on "Add an activity or resource" "button" in the "Topic 1" "section" + Given I click on "Add an activity" "button" in the "Topic 1" "section" And I set the field "search" to "Search query" - And I should see "results found" in the "Add an activity or resource" "dialogue" + And I should see "results found" in the "Add an activity" "dialogue" When I click on "Clear search input" "button" Then I should not see "Search query" And ".searchresultscontainer" "css_element" should not exist diff --git a/mod/h5pactivity/tests/behat/add_h5pactivity.feature b/mod/h5pactivity/tests/behat/add_h5pactivity.feature index ab92d1e3fa8..b5d05e06601 100644 --- a/mod/h5pactivity/tests/behat/add_h5pactivity.feature +++ b/mod/h5pactivity/tests/behat/add_h5pactivity.feature @@ -22,7 +22,7 @@ Feature: Add H5P activity @javascript Scenario: Add a h5pactivity activity to a course - When I add a "H5P activity" to section "1" + When I add a "H5P" to section "1" And I set the following fields to these values: | Name | Awesome H5P package | | Description | Description | @@ -39,7 +39,7 @@ Feature: Add H5P activity @javascript Scenario: Add a h5pactivity activity with download - When I add a "H5P activity" to section "1" + When I add a "H5P" to section "1" And I set the following fields to these values: | Name | Awesome H5P package | | Description | Description | @@ -56,7 +56,7 @@ Feature: Add H5P activity @javascript Scenario: Add a h5pactivity activity with embed - When I add a "H5P activity" to section "1" + When I add a "H5P" to section "1" And I set the following fields to these values: | Name | Awesome H5P package | | Description | Description | @@ -73,7 +73,7 @@ Feature: Add H5P activity @javascript Scenario: Add a h5pactivity activity with copyright - When I add a "H5P activity" to section "1" + When I add a "H5P" to section "1" And I set the following fields to these values: | Name | Awesome H5P package | | Description | Description | @@ -90,7 +90,7 @@ Feature: Add H5P activity @javascript Scenario: Add a h5pactivity activity with copyright in a content without copyright - When I add a "H5P activity" to section "1" + When I add a "H5P" to section "1" And I set the following fields to these values: | Name | Awesome H5P package | | Description | Description | @@ -107,7 +107,7 @@ Feature: Add H5P activity @javascript Scenario: Add a h5pactivity activity to a course with all display options enabled - When I add a "H5P activity" to section "1" + When I add a "H5P" to section "1" And I set the following fields to these values: | Name | Awesome H5P package | | Description | Description | diff --git a/mod/h5pactivity/tests/behat/sending_attempt.feature b/mod/h5pactivity/tests/behat/sending_attempt.feature index d6e35f12660..929c77b9b4f 100644 --- a/mod/h5pactivity/tests/behat/sending_attempt.feature +++ b/mod/h5pactivity/tests/behat/sending_attempt.feature @@ -21,7 +21,7 @@ Feature: Do a H5P attempt | moodle/h5p:updatelibraries | Allow | editingteacher | System | | And I log in as "teacher1" And I am on "Course 1" course homepage with editing mode on - And I add a "H5P activity" to section "1" + And I add a "H5P" to section "1" And I set the following fields to these values: | Name | Awesome H5P package | | Description | Description | diff --git a/mod/h5pactivity/tests/privacy_test.php b/mod/h5pactivity/tests/privacy_test.php index 3359618741d..bc3b77a0733 100644 --- a/mod/h5pactivity/tests/privacy_test.php +++ b/mod/h5pactivity/tests/privacy_test.php @@ -123,7 +123,7 @@ class mod_h5pactivity_privacy_testcase extends provider_testcase { $this->export_context_data_for_user($this->student1->id, $this->context, $component); $data = $writer->get_data([]); - $this->assertEquals('H5P activity 1', $data->name); + $this->assertEquals('H5P 1', $data->name); $data = $writer->get_data($subcontextattempt1); $this->assertCount(1, (array) $data); diff --git a/mod/quiz/tests/behat/attempt_begin.feature b/mod/quiz/tests/behat/attempt_begin.feature index 5ce5fb2d632..2f72ced854e 100644 --- a/mod/quiz/tests/behat/attempt_begin.feature +++ b/mod/quiz/tests/behat/attempt_begin.feature @@ -44,7 +44,7 @@ Feature: The various checks that may happen when an attept is started When I am on the "Quiz 1" "mod_quiz > View" page logged in as "student" And I press "Attempt quiz now" Then I should see "To attempt this quiz you need to know the quiz password" in the "Start attempt" "dialogue" - And I should see "The quiz has a time limit of 1 hour. Time will " in the "Start attempt" "dialogue" + And I should see "Your attempt will have a time limit of 1 hour. When you " in the "Start attempt" "dialogue" And I set the field "Quiz password" to "Frog" And I click on "Start attempt" "button" in the "Start attempt" "dialogue" And I should see "Text of the first question" @@ -77,7 +77,7 @@ Feature: The various checks that may happen when an attept is started And I click on "Start attempt" "button" in the "Start attempt" "dialogue" Then I should see "Quiz 1 description" And I should see "To attempt this quiz you need to know the quiz password" - And I should see "The quiz has a time limit of 1 hour. Time will " + And I should see "Your attempt will have a time limit of 1 hour. When you " And I should see "The password entered was incorrect" And I set the field "Quiz password" to "Frog" # On Mac/FF tab key is needed as text field in dialogue and page have same id. @@ -99,7 +99,7 @@ Feature: The various checks that may happen when an attept is started And I click on "Start attempt" "button" in the "Start attempt" "dialogue" And I should see "Quiz 1 description" And I should see "To attempt this quiz you need to know the quiz password" - And I should see "The quiz has a time limit of 1 hour. Time will " + And I should see "Your attempt will have a time limit of 1 hour. When you " And I should see "The password entered was incorrect" And I set the field "Quiz password" to "Frog" # On Mac/FF tab key is needed as text field in dialogue and page have same id. diff --git a/mod/workshop/tests/behat/file_type_restriction.feature b/mod/workshop/tests/behat/file_type_restriction.feature index c5e04d8b8de..0992e783f3f 100644 --- a/mod/workshop/tests/behat/file_type_restriction.feature +++ b/mod/workshop/tests/behat/file_type_restriction.feature @@ -49,7 +49,7 @@ Feature: File types of the submission and feedback attachments can be limitted And I follow "moodlelogo.png" And I set the field "Name" to "testable.php" And I press "Update" - And I should see "The original file extension has been modified as a part of the file name change. Changing the extension from \".png\" to \".php\" could potentially cause some side effects." + And I should see "The original file extension has been modified as a part of the file name change. Changing the extension from \".png\" to \".php\" may result in a file which cannot be opened." And I click on "OK" "button" in the ".moodle-dialogue-base[aria-hidden='false']" "css_element" When I press "Save changes" Then I should see "Some files (testable.php) cannot be uploaded. Only file types image are allowed." @@ -112,7 +112,7 @@ Feature: File types of the submission and feedback attachments can be limitted And I follow "testable.php" And I set the field "Name" to "renamed.png" And I press "Update" - And I should see "The original file extension has been modified as a part of the file name change. Changing the extension from \".php\" to \".png\" could potentially cause some side effects." + And I should see "The original file extension has been modified as a part of the file name change. Changing the extension from \".php\" to \".png\" may result in a file which cannot be opened." And I click on "OK" "button" in the ".moodle-dialogue-base[aria-hidden='false']" "css_element" When I press "Save and close" Then I should see "Some files (renamed.png) cannot be uploaded. Only file types .php are allowed." diff --git a/user/tests/behat/course_preference.feature b/user/tests/behat/course_preference.feature index 6d0ed76c735..b86dee7556c 100644 --- a/user/tests/behat/course_preference.feature +++ b/user/tests/behat/course_preference.feature @@ -18,9 +18,9 @@ Feature: As a user, "Course preferences" allows me to set my course preference(s Given the field "enableactivitychooser" matches value "1" # See that the "activity chooser" is actually shown by default in course page. When I am on "Course 1" course homepage - And I should not see "Add an activity or resource" in the "Topic 1" "section" + And I should not see "Add an activity" in the "Topic 1" "section" And I turn editing mode on - Then I should see "Add an activity or resource" in the "Topic 1" "section" + Then I should see "Add an activity" in the "Topic 1" "section" And I should not see "Add a resource..." in the "Topic 1" "section" @javascript @@ -30,5 +30,4 @@ Feature: As a user, "Course preferences" allows me to set my course preference(s When I am on "Course 1" course homepage And I should not see "Add a resource..." in the "Topic 1" "section" And I turn editing mode on - Then I should see "Add a resource..." in the "Topic 1" "section" - And I should not see "Add an activity or resource" in the "Topic 1" "section" \ No newline at end of file + Then I should see "Add a resource..." in the "Topic 1" "section" \ No newline at end of file