From d8ca8be28c0c04e13c9e843fed6ed2e7dd743c89 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?David=20Mudr=C3=A1k?= Date: Wed, 31 Jan 2024 20:06:06 +0100 Subject: [PATCH] MDL-80725 lang: Use the fixed strings in tests, too --- cohort/tests/behat/reportbuilder.feature | 2 +- .../tests/behat/columnsortingeditor.feature | 16 ++++++++-------- reportbuilder/tests/behat/customreports.feature | 2 +- ...stom_report_columns_sorting_exporter_test.php | 4 ++-- 4 files changed, 12 insertions(+), 12 deletions(-) diff --git a/cohort/tests/behat/reportbuilder.feature b/cohort/tests/behat/reportbuilder.feature index 6d4bfb2a23c..fd97aab7c3e 100644 --- a/cohort/tests/behat/reportbuilder.feature +++ b/cohort/tests/behat/reportbuilder.feature @@ -88,7 +88,7 @@ Feature: Manage custom reports for cohorts And I click on "Show/hide 'Sorting'" "button" And I click on "Move sorting for column 'Last name'" "button" And I click on "To the top of the list" "link" in the "Move sorting for column 'Last name'" "dialogue" - And I click on "Enable initial sorting for column Last name" "checkbox" + And I click on "Enable initial sorting for column 'Last name'" "checkbox" # "New system cohort" has fewer members than "Another one" cohort. And "New system cohort" "table_row" should appear before "Another one" "table_row" When I click on "Sort column 'Last name' descending" "button" diff --git a/reportbuilder/tests/behat/columnsortingeditor.feature b/reportbuilder/tests/behat/columnsortingeditor.feature index a2b9644b276..1ab93f14fb5 100644 --- a/reportbuilder/tests/behat/columnsortingeditor.feature +++ b/reportbuilder/tests/behat/columnsortingeditor.feature @@ -24,18 +24,18 @@ Feature: Manage custom report columns sorting Given I change window size to "large" And I click on "Show/hide 'Sorting'" "button" # This will be the fallback sort after toggling lastname sorting. - And I click on "Enable initial sorting for column First name" "checkbox" - When I click on "Enable initial sorting for column Last name" "checkbox" + And I click on "Enable initial sorting for column 'First name'" "checkbox" + When I click on "Enable initial sorting for column 'Last name'" "checkbox" Then I should see "Updated sorting for column 'Last name'" And "user02" "table_row" should appear before "user01" "table_row" - And I click on "Disable initial sorting for column Last name" "checkbox" + And I click on "Disable initial sorting for column 'Last name'" "checkbox" And I should see "Updated sorting for column 'Last name'" And "user01" "table_row" should appear before "user02" "table_row" Scenario: Change column sort direction in report Given I change window size to "large" And I click on "Show/hide 'Sorting'" "button" - When I click on "Enable initial sorting for column Last name" "checkbox" + When I click on "Enable initial sorting for column 'Last name'" "checkbox" And I click on "Sort column 'Last name' descending" "button" Then I should see "Updated sorting for column 'Last name'" And "user01" "table_row" should appear before "user02" "table_row" @@ -46,8 +46,8 @@ Feature: Manage custom report columns sorting Scenario: Change column sort order in report Given I change window size to "large" And I click on "Show/hide 'Sorting'" "button" - When I click on "Enable initial sorting for column Last name" "checkbox" - And I click on "Enable initial sorting for column First name" "checkbox" + When I click on "Enable initial sorting for column 'Last name'" "checkbox" + And I click on "Enable initial sorting for column 'First name'" "checkbox" And I click on "Move sorting for column 'First name'" "button" And I click on "To the top of the list" "link" in the "Move sorting for column 'First name'" "dialogue" Then I should see "Updated sorting for column 'First name'" @@ -58,7 +58,7 @@ Feature: Manage custom report columns sorting Given I change window size to "large" And I click on "Add column 'Full name'" "link" And I click on "Show/hide 'Sorting'" "button" - When I click on "Enable initial sorting for column Full name" "checkbox" + When I click on "Enable initial sorting for column 'Full name'" "checkbox" Then I should see "Updated sorting for column 'Full name'" # User1 = Alice Zebra; User2=Zoe Aardvark; User3 = Alice Badger. And "user03" "table_row" should appear before "user01" "table_row" @@ -72,7 +72,7 @@ Feature: Manage custom report columns sorting Given I change window size to "large" And I click on "Show/hide 'Sorting'" "button" # Sort by last name descending. - When I click on "Enable initial sorting for column Last name" "checkbox" + When I click on "Enable initial sorting for column 'Last name'" "checkbox" Then "user02" "table_row" should appear before "user01" "table_row" # Switching to preview mode should observe report config. And I click on "Switch to preview mode" "button" diff --git a/reportbuilder/tests/behat/customreports.feature b/reportbuilder/tests/behat/customreports.feature index 76611fc62a8..4337448d2d7 100644 --- a/reportbuilder/tests/behat/customreports.feature +++ b/reportbuilder/tests/behat/customreports.feature @@ -26,7 +26,7 @@ Feature: Manage custom reports # Confirm we see the default sorting in the report And "Admin User" "table_row" should appear before "User 2" "table_row" And I click on "Show/hide 'Sorting'" "button" - And "Disable initial sorting for column Full name" "checkbox" should exist in the "#settingssorting" "css_element" + And "Disable initial sorting for column 'Full name'" "checkbox" should exist in the "#settingssorting" "css_element" And I click on "Show/hide 'Sorting'" "button" # Confirm we only see not suspended users in the report. And I should see "Admin User" in the "reportbuilder-table" "table" diff --git a/reportbuilder/tests/external/custom_report_columns_sorting_exporter_test.php b/reportbuilder/tests/external/custom_report_columns_sorting_exporter_test.php index afdb640ac21..925b00b3051 100644 --- a/reportbuilder/tests/external/custom_report_columns_sorting_exporter_test.php +++ b/reportbuilder/tests/external/custom_report_columns_sorting_exporter_test.php @@ -69,7 +69,7 @@ class custom_report_columns_sorting_exporter_test extends advanced_testcase { $this->assertTrue($sortcolumnemail['sortenabled']); $this->assertEquals(1, $sortcolumnemail['sortorder']); $this->assertEquals(SORT_DESC, $sortcolumnemail['sortdirection']); - $this->assertEquals('Disable initial sorting for column Email address', $sortcolumnemail['sortenabledtitle']); + $this->assertEquals('Disable initial sorting for column \'Email address\'', $sortcolumnemail['sortenabledtitle']); $this->assertEquals('Sort column \'Email address\' ascending', $sortcolumnemail['sorticon']['title']); // Fullname column. @@ -78,7 +78,7 @@ class custom_report_columns_sorting_exporter_test extends advanced_testcase { $this->assertFalse($sortcolumnfullname['sortenabled']); $this->assertEquals(2, $sortcolumnfullname['sortorder']); $this->assertEquals(SORT_ASC, $sortcolumnfullname['sortdirection']); - $this->assertEquals('Enable initial sorting for column Full name', $sortcolumnfullname['sortenabledtitle']); + $this->assertEquals('Enable initial sorting for column \'Full name\'', $sortcolumnfullname['sortenabledtitle']); $this->assertEquals('Sort column \'Full name\' descending', $sortcolumnfullname['sorticon']['title']); $this->assertNotEmpty($export->helpicon);