Skip to content

Commit

Permalink
MDL-76105 lang: Use fixed strings in tests, too.
Browse files Browse the repository at this point in the history
  • Loading branch information
mudrd8mz authored and vmdef committed Nov 17, 2022
1 parent ae2f8cf commit 5e2e756
Show file tree
Hide file tree
Showing 8 changed files with 18 additions and 18 deletions.
6 changes: 3 additions & 3 deletions admin/tests/behat/outgoing_mail.feature
Expand Up @@ -7,13 +7,13 @@ Feature: Outgoing mail configuration
Background:
Given I log in as "admin"

Scenario: SMTP Auth Type without OAuth 2 Service setup yet
Scenario: SMTP Auth Type without OAuth 2 service setup yet
Given I navigate to "Server > Email > Outgoing mail configuration" in site administration
And I should not see "XOAUTH2" in the "SMTP Auth Type" "select"
And I should see "LOGIN" in the "SMTP Auth Type" "select"
And I should see "PLAIN" in the "SMTP Auth Type" "select"

Scenario: SMTP Auth Type with OAuth 2 Service setup
Scenario: SMTP Auth Type with OAuth 2 service setup
Given I navigate to "Server > OAuth 2 services" in site administration
And I press "Google"
And I should see "Create new service: Google"
Expand All @@ -26,4 +26,4 @@ Feature: Outgoing mail configuration
Then I should see "XOAUTH2" in the "SMTP Auth Type" "select"
And I should see "LOGIN" in the "SMTP Auth Type" "select"
And I should see "PLAIN" in the "SMTP Auth Type" "select"
And I should see "Testing service" in the "OAuth 2 Service" "select"
And I should see "Testing service" in the "OAuth 2 service" "select"
10 changes: 5 additions & 5 deletions admin/tool/messageinbound/tests/behat/incoming_mail.feature
Expand Up @@ -7,11 +7,11 @@ Feature: Incoming mail configuration
Background:
Given I log in as "admin"

Scenario: Incoming mail server settings without OAuth 2 Service setup yet
Scenario: Incoming mail server settings without OAuth 2 service setup yet
Given I navigate to "Server > Email > Incoming mail configuration" in site administration
And "OAuth 2 Service" "select" should not exist
And "OAuth 2 service" "select" should not exist

Scenario: Incoming mail server settings with OAuth 2 Service setup
Scenario: Incoming mail server settings with OAuth 2 service setup
Given I navigate to "Server > OAuth 2 services" in site administration
And I press "Google"
And I should see "Create new service: Google"
Expand All @@ -21,5 +21,5 @@ Feature: Incoming mail configuration
| Client secret | supersecret |
And I press "Save changes"
When I navigate to "Server > Email > Incoming mail configuration" in site administration
Then "OAuth 2 Service" "select" should exist
And I should see "Testing service" in the "OAuth 2 Service" "select"
Then "OAuth 2 service" "select" should exist
And I should see "Testing service" in the "OAuth 2 service" "select"
2 changes: 1 addition & 1 deletion lib/tests/modinfolib_test.php
Expand Up @@ -1125,7 +1125,7 @@ public function test_invalid_course_module_id(): void {

// Assert exception text.
$this->expectException(\moodle_exception::class);
$this->expectExceptionMessage('Invalid course module id: ' . $forum1->cmid);
$this->expectExceptionMessage('Invalid course module ID: ' . $forum1->cmid);
delete_course($course, false);
}

Expand Down
10 changes: 5 additions & 5 deletions mod/data/tests/behat/edit_templates.feature
Expand Up @@ -86,23 +86,23 @@ Feature: Users can edit the database templates
And I set the following fields to these values:
| Repeated entry | <span class="hideme">Nope</span>Yep! |
And I click on "Save" "button" in the "sticky-footer" "region"
And I set the field "Templates tertiary navigation" to "CSS template"
And I set the field "Templates tertiary navigation" to "Custom CSS"
And I set the following fields to these values:
| CSS template | .hideme {display: none;} |
| Custom CSS | .hideme {display: none;} |
And I click on "Save" "button" in the "sticky-footer" "region"
When I navigate to "Database" in current page administration
Then I should not see "Nope"
And I should see "Yep!"

@javascript
Scenario: Edit Javascript template
Scenario: Edit Custom JavaScript
Given I click on "Enable code editor" "checkbox"
And I set the following fields to these values:
| Repeated entry | <span id="hideme">Nope</span>Yep! |
And I click on "Save" "button" in the "sticky-footer" "region"
And I set the field "Templates tertiary navigation" to "Javascript template"
And I set the field "Templates tertiary navigation" to "Custom JavaScript"
And I set the following fields to these values:
| Javascript template | window.onload = () => document.querySelector('#hideme').style.display = 'none'; |
| Custom JavaScript | window.onload = () => document.querySelector('#hideme').style.display = 'none'; |
And I click on "Save" "button" in the "sticky-footer" "region"
When I navigate to "Database" in current page administration
Then I should not see "Nope"
Expand Down
Expand Up @@ -147,7 +147,7 @@ public function test_quiz_does_not_exist() {
$this->setAdminUser();
$forum = $this->getDataGenerator()->create_module('forum', ['course' => $this->course->id]);
$this->expectException(\invalid_parameter_exception::class);
$this->expectExceptionMessage('Quiz not found matching course module id: ' . $forum->cmid);
$this->expectExceptionMessage('Quiz not found matching course module ID: ' . $forum->cmid);
validate_quiz_keys::execute($forum->cmid, 'https://www.example.com/moodle', 'configkey');
}

Expand Down
2 changes: 1 addition & 1 deletion mod/quiz/tests/behat/editing_set_marks_no_attempts.feature
Expand Up @@ -68,7 +68,7 @@ Feature: Edit quiz marks with no attempts
And I am on the "Quiz 1" "quiz activity editing" page
When I set the following fields to these values:
| Decimal places in grades | 3 |
| Decimal places in question grades | 5 |
| Decimal places in marks for questions | 5 |
And I press "Save and display"
When I am on the "Quiz 1" "mod_quiz > Edit" page
# Then the field "maxgrade" matches value "20.000" -- with exact match on decimal places.
Expand Down
Expand Up @@ -72,7 +72,7 @@ Feature: Edit quiz marks with attempts
When I am on the "Quiz 1" "quiz activity editing" page
And I set the following fields to these values:
| Decimal places in grades | 3 |
| Decimal places in question grades | 5 |
| Decimal places in marks for questions | 5 |
And I press "Save and display"
And I am on the "Quiz 1" "mod_quiz > Edit" page
# Then the field "maxgrade" matches value "20.000" -- with exact match on decimal places.
Expand Down
2 changes: 1 addition & 1 deletion mod/quiz/tests/behat/preview.feature
Expand Up @@ -69,7 +69,7 @@ Feature: Preview a quiz as a teacher
| TF1 | 1 | |
| TF2 | 1 | 3.0 |
When I am on the "Quiz 2" "mod_quiz > View" page logged in as "admin"
And I should see "This quiz is not currently available"
And I should see "This quiz is currently not available."
And I press "Preview quiz"
Then I should see "if this were a real attempt, you would be blocked" in the ".alert-warning" "css_element"

Expand Down

0 comments on commit 5e2e756

Please sign in to comment.