From eecbf7b18ba4bd0249320be9fe870dbbe3cbe62c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?David=20Mudr=C3=A1k?= Date: Tue, 26 Mar 2024 23:11:23 +0100 Subject: [PATCH] MDL-81351 lang: Use the fixed strings in the tests, too --- admin/tool/uploadcourse/tests/behat/update.feature | 2 +- admin/tool/uploaduser/tests/upload_users_test.php | 4 ++-- enrol/self/tests/self_test.php | 2 +- .../tests/behat/add_instance_in_empty_state.feature | 6 +++--- mod/scorm/tests/behat/scorm_activity_completion.feature | 6 +++--- 5 files changed, 10 insertions(+), 10 deletions(-) diff --git a/admin/tool/uploadcourse/tests/behat/update.feature b/admin/tool/uploadcourse/tests/behat/update.feature index 71773e03d7a..93915221b60 100644 --- a/admin/tool/uploadcourse/tests/behat/update.feature +++ b/admin/tool/uploadcourse/tests/behat/update.feature @@ -118,7 +118,7 @@ Feature: An admin can update courses using a CSV file # Course C01 is in "our" category but can not be moved to Cat 2 because current user can not manage it. Then I should see "No permission to upload courses in category: Cat 2" in the "C01" "table_row" # Course C02 can not be updated (no capability in "Cat 2" context). - And I should see "Course with this shortname exists and you don't have permission to use upload course tool to update it" in the "C02" "table_row" + And I should see "A course with this short name exists but you don't have permission to use the upload courses functionality to update it." in the "C02" "table_row" # Course with short name "C05" does not exist. And I should see "The course does not exist and creating course is not allowed" in the "C05" "table_row" And I click on "Upload courses" "button" diff --git a/admin/tool/uploaduser/tests/upload_users_test.php b/admin/tool/uploaduser/tests/upload_users_test.php index 559f19ca4c6..565b1d6ed42 100644 --- a/admin/tool/uploaduser/tests/upload_users_test.php +++ b/admin/tool/uploaduser/tests/upload_users_test.php @@ -202,8 +202,8 @@ EOF; // We should get the debugging from the user class itself, as well as warning in the output regarding the same. $this->assertDebuggingCalled('The property \'country\' has invalid data and has been cleaned.'); - $this->assertStringContainsString('Invalid data detected for user \'student1\' (country), ' . - 'which has been automatically cleaned.', $output); + $this->assertStringContainsString('Incorrect data (country) found for user student1. ' . + 'This data has been corrected or deleted.', $output); } /** diff --git a/enrol/self/tests/self_test.php b/enrol/self/tests/self_test.php index 66e37d5e7d4..49730c2d293 100644 --- a/enrol/self/tests/self_test.php +++ b/enrol/self/tests/self_test.php @@ -293,7 +293,7 @@ class self_test extends \advanced_testcase { $this->assertCount($numnotifications, $messages); if ($numnotifications && ($customint2 > 0)) { $this->assertEquals($user3->id, $messages[0]->useridto); - $this->assertStringContainsString('you have not visited', $messages[0]->fullmessagehtml); + $this->assertStringContainsString('you have not accessed', $messages[0]->fullmessagehtml); } // Make sure that notifications are not repeated. diff --git a/mod/bigbluebuttonbn/tests/behat/add_instance_in_empty_state.feature b/mod/bigbluebuttonbn/tests/behat/add_instance_in_empty_state.feature index 04b69feab1e..081c551eaab 100644 --- a/mod/bigbluebuttonbn/tests/behat/add_instance_in_empty_state.feature +++ b/mod/bigbluebuttonbn/tests/behat/add_instance_in_empty_state.feature @@ -43,6 +43,6 @@ Feature: I can create a bigbluebuttonbn instance with default server Examples: | user | shouldseemessage | messageexist | - | user1 | The use of default server credentials will soon expire.| should not see | - | teacher1 | The use of default server credentials will soon expire.| should see | - | admin | Default BigBlueButton plugin credentials will soon expire.| should see | + | user1 | The BigBlueButton server credentials will soon expire. | should not see | + | teacher1 | The BigBlueButton server credentials will soon expire. | should see | + | admin | The BigBlueButton server credentials will soon expire. | should see | diff --git a/mod/scorm/tests/behat/scorm_activity_completion.feature b/mod/scorm/tests/behat/scorm_activity_completion.feature index eea6fe9f012..60577a9145e 100644 --- a/mod/scorm/tests/behat/scorm_activity_completion.feature +++ b/mod/scorm/tests/behat/scorm_activity_completion.feature @@ -139,13 +139,13 @@ Feature: View activity completion in the SCORM activity And I expand all fieldsets When I set the field "completionscorerequired" to "0" And I click on "Save and display" "button" - Then I should see "Minimum score must be greater than 0" + Then I should see "Minimum score must be greater than 0." And "Enter" "button" should not exist And I set the field "completionscorerequired" to "-1" And I click on "Save and display" "button" - And I should see "Minimum score must be greater than 0" + And I should see "Minimum score must be greater than 0." And "Enter" "button" should not exist And I set the field "completionscorerequired" to "5" And I click on "Save and display" "button" - And I should not see "Minimum score must be greater than 0" + And I should not see "Minimum score must be greater than 0." And "Enter" "button" should exist