Skip to content

Commit

Permalink
MDL-80725 lang: Use the fixed strings in tests, too
Browse files Browse the repository at this point in the history
  • Loading branch information
mudrd8mz committed Jan 31, 2024
1 parent ddbfeec commit d8ca8be
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 12 deletions.
2 changes: 1 addition & 1 deletion cohort/tests/behat/reportbuilder.feature
Expand Up @@ -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"
Expand Down
16 changes: 8 additions & 8 deletions reportbuilder/tests/behat/columnsortingeditor.feature
Expand Up @@ -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"
Expand All @@ -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'"
Expand All @@ -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"
Expand All @@ -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"
Expand Down
2 changes: 1 addition & 1 deletion reportbuilder/tests/behat/customreports.feature
Expand Up @@ -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"
Expand Down
Expand Up @@ -69,7 +69,7 @@ public function test_export(): void {
$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.
Expand All @@ -78,7 +78,7 @@ public function test_export(): void {
$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);
Expand Down

0 comments on commit d8ca8be

Please sign in to comment.