From 5f51b688b9c2dd3f1f5e6e47c8308059cabbb509 Mon Sep 17 00:00:00 2001 From: Paul Holden Date: Wed, 22 Nov 2023 14:28:37 +0000 Subject: [PATCH 1/3] MDL-75081 behat: correct tests of table contents asserting one column. Prior to this change, assertions of "should exist" and "should not exist" in table content, where the step provided only a single column, could give false positives and pass (when they shouldn't). --- lib/tests/behat/behat_general.php | 48 ++++++++++++++++++++----------- 1 file changed, 31 insertions(+), 17 deletions(-) diff --git a/lib/tests/behat/behat_general.php b/lib/tests/behat/behat_general.php index fe9b2ea0c96..a2468e1ca12 100644 --- a/lib/tests/behat/behat_general.php +++ b/lib/tests/behat/behat_general.php @@ -1511,12 +1511,19 @@ EOF; $datahash = $data->getHash(); foreach ($datahash as $row) { - $firstcell = null; - foreach ($row as $column => $value) { - if ($firstcell === null) { - $firstcell = $value; - } else { - $this->row_column_of_table_should_contain($firstcell, $column, $table, $value); + + // Row contains only a single column, just assert it's present in the table. + if (count($row) === 1) { + $this->execute('behat_general::assert_element_contains_text', [reset($row), $table, 'table']); + } else { + // Iterate over all columns. + $firstcell = null; + foreach ($row as $column => $value) { + if ($firstcell === null) { + $firstcell = $value; + } else { + $this->row_column_of_table_should_contain($firstcell, $column, $table, $value); + } } } } @@ -1536,18 +1543,25 @@ EOF; $datahash = $data->getHash(); foreach ($datahash as $value) { - $row = array_shift($value); - foreach ($value as $column => $value) { - try { - $this->row_column_of_table_should_contain($row, $column, $table, $value); - // Throw exception if found. - } catch (ElementNotFoundException $e) { - // Table row/column doesn't contain this value. Nothing to do. - continue; + + // Row contains only a single column, just assert it's not present in the table. + if (count($value) === 1) { + $this->execute('behat_general::assert_element_not_contains_text', [reset($value), $table, 'table']); + } else { + // Iterate over all columns. + $row = array_shift($value); + foreach ($value as $column => $value) { + try { + $this->row_column_of_table_should_contain($row, $column, $table, $value); + // Throw exception if found. + } catch (ElementNotFoundException $e) { + // Table row/column doesn't contain this value. Nothing to do. + continue; + } + throw new ExpectationException('"' . $column . '" with value "' . $value . '" is present in "' . + $row . '" row for table "' . $table . '"', $this->getSession() + ); } - throw new ExpectationException('"' . $column . '" with value "' . $value . '" is present in "' . - $row . '" row for table "' . $table . '"', $this->getSession() - ); } } } From 662c5e1d31713e38c4fb977301fc585cf0afced1 Mon Sep 17 00:00:00 2001 From: Paul Holden Date: Tue, 6 Feb 2024 16:56:25 +0000 Subject: [PATCH 2/3] MDL-75081 behat: define new `heading` named selector. Co-authored-by: Jun Pataleta --- admin/tool/behat/tests/behat/tabs.feature | 6 +++--- lib/behat/classes/partial_named_selector.php | 4 ++++ lib/upgrade.txt | 1 + 3 files changed, 8 insertions(+), 3 deletions(-) diff --git a/admin/tool/behat/tests/behat/tabs.feature b/admin/tool/behat/tests/behat/tabs.feature index 0fe38b3a784..308af83cb22 100644 --- a/admin/tool/behat/tests/behat/tabs.feature +++ b/admin/tool/behat/tests/behat/tabs.feature @@ -27,8 +27,8 @@ Feature: Confirm that we can open multiple browser tabs # Switch between all the tabs and confirm their different contents. Then I should see "You're not enrolled in any course" And I switch to "CourseViewer2" tab - And I should see "Course 3" in the "h1" "css_element" + And "Course 3" "heading" should exist And I switch to "CourseViewer1" tab - And I should see "Course 2" in the "h1" "css_element" + And "Course 2" "heading" should exist And I switch to the main tab - And I should see "Course 1" in the "h1" "css_element" + And "Course 1" "heading" should exist diff --git a/lib/behat/classes/partial_named_selector.php b/lib/behat/classes/partial_named_selector.php index 039293f293a..98ab02f6e82 100644 --- a/lib/behat/classes/partial_named_selector.php +++ b/lib/behat/classes/partial_named_selector.php @@ -108,6 +108,7 @@ class behat_partial_named_selector extends \Behat\Mink\Selector\PartialNamedSele 'group_message_tab' => 'group_message_tab', 'group_message_list_area' => 'group_message_list_area', 'group_message_message_content' => 'group_message_message_content', + 'heading' => 'heading', 'icon_container' => 'icon_container', 'icon' => 'icon', 'link' => 'link', @@ -232,6 +233,9 @@ XPATH XPATH , 'group_message_message_content' => << << <<alternateloginurl. * \action_menu_link::$instance has been deprecated as it is no longer used. From 8ea7f738987e18ba11247a8aefd0904bd16c6bcf Mon Sep 17 00:00:00 2001 From: Paul Holden Date: Wed, 22 Nov 2023 22:39:36 +0000 Subject: [PATCH 3/3] MDL-75081 grade: fix rogue gradebook scenarios containing invalid steps. Various re-factors over recent releases appear to have led to quite a drift between actual functionality and what these scenarios assert for imagined functionality. Page elements and content are referenced that don't exist in multiple places. --- .../tertiary_navigation_searching.feature | 17 ++- .../singleview/tests/behat/usersearch.feature | 97 +++++------- .../behat/user_report_navigation.feature | 12 +- .../user/tests/behat/usersearch.feature | 140 +++++++----------- .../grade_regrade_do_not_override.feature | 1 + .../behat/toggle_grade_categories.feature | 10 +- 6 files changed, 102 insertions(+), 175 deletions(-) diff --git a/grade/report/grader/tests/behat/tertiary_navigation_searching.feature b/grade/report/grader/tests/behat/tertiary_navigation_searching.feature index c2df286e295..b467b139208 100644 --- a/grade/report/grader/tests/behat/tertiary_navigation_searching.feature +++ b/grade/report/grader/tests/behat/tertiary_navigation_searching.feature @@ -79,14 +79,14 @@ Feature: Within the grader report, test that we can search for users Given I click on "Dummy" in the "user" search widget And the following should exist in the "user-grades" table: | -1- | - | Turtle Manatee | + | Dummy User | And the following should not exist in the "user-grades" table: | -1- | | Teacher 1 | | Student 1 | | User Example | | User Test | - | Dummy User | + | Turtle Manatee | # Case: No users found. When I set the field "Search users" to "Plagiarism" @@ -94,14 +94,14 @@ Feature: Within the grader report, test that we can search for users # Table remains unchanged as the user had no results to select from the dropdown. And the following should exist in the "user-grades" table: | -1- | - | Turtle Manatee | + | Dummy User | And the following should not exist in the "user-grades" table: | -1- | | Teacher 1 | | Student 1 | | User Example | | User Test | - | Dummy User | + | Turtle Manatee | # Case: Multiple users found and select only one result. Then I set the field "Search users" to "User" @@ -220,17 +220,18 @@ Feature: Within the grader report, test that we can search for users And I confirm "User Example" in "user" search within the gradebook widget exists And I confirm "User Test" in "user" search within the gradebook widget exists And I confirm "Student 1" in "user" search within the gradebook widget exists + And I press the down key And I press the enter key - And I wait until the page is ready + And I wait "1" seconds And the following should exist in the "user-grades" table: | -1- | | Student 1 | + And the following should not exist in the "user-grades" table: + | -1- | | User Example | | User Test | | Dummy User | | Turtle Manatee | - And the following should not exist in the "user-grades" table: - | -1- | | Teacher 1 | @accessibility @@ -396,7 +397,7 @@ Feature: Within the grader report, test that we can search for users And the following should exist in the "user-grades" table: | -1- | | Student test31 | - And the following should exist in the "user-grades" table: + And the following should not exist in the "user-grades" table: | -1- | | Student test32 | And I click on "Clear" "link" in the ".user-search" "css_element" diff --git a/grade/report/singleview/tests/behat/usersearch.feature b/grade/report/singleview/tests/behat/usersearch.feature index 8664d0d93e3..76edbc2d663 100644 --- a/grade/report/singleview/tests/behat/usersearch.feature +++ b/grade/report/singleview/tests/behat/usersearch.feature @@ -33,35 +33,21 @@ Feature: Within the singleview report, a teacher can search for users. And I click on "Users" "link" in the ".page-toggler" "css_element" Scenario: A teacher can view and trigger the user search - # Check the placeholder text + # Check the placeholder text (no users are initially shown). Given I should see "Search users" - # Confirm the search is currently inactive and results are unfiltered. - And the following should exist in the "user-grades" table: - | -1- | - | Turtle Manatee | - | Student 1 | - | User Example | - | User Test | - | Dummy User | - And the following should not exist in the "user-grades" table: - | -1- | - | Teacher 1 | + And I should see "Search for a user to view all their grades" When I set the field "Search users" to "Turtle" And I confirm "Turtle Manatee" in "user" search within the gradebook widget exists And I confirm "User Example" in "user" search within the gradebook widget does not exist And I click on "Turtle Manatee" "list_item" # Business case: This will trigger a page reload and can not dynamically update the table. And I wait until the page is ready - Then the following should exist in the "user-grades" table: - | -1- | - | Turtle Manatee | - And the following should not exist in the "user-grades" table: - | -1- | - | Teacher 1 | - | Student 1 | - | User Example | - | User Test | - | Dummy User | + And "Turtle Manatee" "heading" should exist + And "Teacher 1" "heading" should not exist + And "Student 1" "heading" should not exist + And "User Example" "heading" should not exist + And "User Test" "heading" should not exist + And "Dummy User" "heading" should not exist And I set the field "Search users" to "Turt" And I wait until "Turtle Manatee" "option_role" exists And I click on "Clear search input" "button" in the ".user-search" "css_element" @@ -70,31 +56,23 @@ Feature: Within the singleview report, a teacher can search for users. Scenario: A teacher can search the single view report to find specified users # Case: Standard search. Given I click on "Dummy" in the "user" search widget - And the following should exist in the "user-grades" table: - | -1- | - | Turtle Manatee | - And the following should not exist in the "user-grades" table: - | -1- | - | Teacher 1 | - | Student 1 | - | User Example | - | User Test | - | Dummy User | + And "Dummy User" "heading" should exist + And "Teacher 1" "heading" should not exist + And "Student 1" "heading" should not exist + And "User Example" "heading" should not exist + And "User Test" "heading" should not exist + And "Turtle Manatee" "heading" should not exist # Case: No users found. When I set the field "Search users" to "Plagiarism" And I should see "No results for \"Plagiarism\"" # Table remains unchanged as the user had no results to select from the dropdown. - And the following should exist in the "user-grades" table: - | -1- | - | Turtle Manatee | - And the following should not exist in the "user-grades" table: - | -1- | - | Teacher 1 | - | Student 1 | - | User Example | - | User Test | - | Dummy User | + And "Dummy User" "heading" should exist + And "Teacher 1" "heading" should not exist + And "Student 1" "heading" should not exist + And "User Example" "heading" should not exist + And "User Test" "heading" should not exist + And "Turtle Manatee" "heading" should not exist # Case: Multiple users found and select only one result. Then I set the field "Search users" to "User" @@ -109,16 +87,12 @@ Feature: Within the singleview report, a teacher can search for users. And I confirm "User (student4@example.com)" in "user" search within the gradebook widget exists And I click on "Dummy User" "list_item" And I wait until the page is ready - And the following should exist in the "user-grades" table: - | -1- | - | Dummy User | - And the following should not exist in the "user-grades" table: - | -1- | - | Teacher 1 | - | Student 1 | - | User Example | - | User Test | - | Turtle Manatee | + And "Dummy User" "heading" should exist + And "Teacher 1" "heading" should not exist + And "Student 1" "heading" should not exist + And "User Example" "heading" should not exist + And "User Test" "heading" should not exist + And "Turtle Manatee" "heading" should not exist # Case: No users enrolled. And I am on the "Course 2" "grades > Single view > View" page @@ -187,23 +161,20 @@ Feature: Within the singleview report, a teacher can search for users. # Search on the institution field then press enter to show the record set. And I set the field "Search users" to "ABC" - And I wait until "Turtle Manatee" "list_item" exists + And "Turtle Manatee" "list_item" should exist And I confirm "Dummy User" in "user" search within the gradebook widget exists And I confirm "User Example" in "user" search within the gradebook widget exists And I confirm "User Test" in "user" search within the gradebook widget exists And I confirm "Student 1" in "user" search within the gradebook widget exists + And I press the down key And I press the enter key And I wait until the page is ready - And the following should exist in the "user-grades" table: - | -1- | - | Student 1 | - | User Example | - | User Test | - | Dummy User | - | Turtle Manatee | - And the following should not exist in the "user-grades" table: - | -1- | - | Teacher 1 | + And "Student 1" "heading" should exist + And "User Example" "heading" should not exist + And "User Test" "heading" should not exist + And "Dummy User" "heading" should not exist + And "Turtle Manatee" "heading" should not exist + And "Teacher 1" "heading" should not exist @accessibility Scenario: A teacher can set focus and search using the input are with a keyboard diff --git a/grade/report/user/tests/behat/user_report_navigation.feature b/grade/report/user/tests/behat/user_report_navigation.feature index 7de6c819b21..00dd1212eb9 100644 --- a/grade/report/user/tests/behat/user_report_navigation.feature +++ b/grade/report/user/tests/behat/user_report_navigation.feature @@ -27,36 +27,36 @@ Feature: Teacher can navigate to the previous or next user report. Scenario: A teacher can navigate to the next user report Given I click on "Student 1" in the "user" search widget - And I should see "Student 1" in the ".user-heading" "css_element" + And "Student 1" "heading" should exist And ".previous" "css_element" should not exist in the ".user-navigation" "css_element" And ".next" "css_element" should exist in the ".user-navigation" "css_element" And I should see "Student 2" in the ".next" "css_element" When I click on "Student 2" "link" in the ".next" "css_element" - Then I should see "Student 2" in the ".user-heading" "css_element" + And "Student 2" "heading" should exist And ".previous" "css_element" should exist in the ".user-navigation" "css_element" And I should see "Student 1" in the ".previous" "css_element" And ".next" "css_element" should exist in the ".user-navigation" "css_element" And I should see "Student 3" in the ".next" "css_element" And I click on "Student 3" "link" in the ".next" "css_element" - And I should see "Student 3" in the ".user-heading" "css_element" + And "Student 3" "heading" should exist And ".previous" "css_element" should exist in the ".user-navigation" "css_element" And I should see "Student 2" in the ".previous" "css_element" And ".next" "css_element" should not exist in the ".user-navigation" "css_element" Scenario: A teacher can navigate to the previous user report Given I click on "Student 3" in the "user" search widget - And I should see "Student 3" in the ".user-heading" "css_element" + And "Student 3" "heading" should exist And ".previous" "css_element" should exist in the ".user-navigation" "css_element" And I should see "Student 2" in the ".previous" "css_element" And ".next" "css_element" should not exist in the ".user-navigation" "css_element" When I click on "Student 2" "link" in the ".previous" "css_element" - Then I should see "Student 2" in the ".user-heading" "css_element" + And "Student 2" "heading" should exist And ".previous" "css_element" should exist in the ".user-navigation" "css_element" And I should see "Student 1" in the ".previous" "css_element" And ".next" "css_element" should exist in the ".user-navigation" "css_element" And I should see "Student 3" in the ".next" "css_element" And I click on "Student 1" "link" in the ".previous" "css_element" - And I should see "Student 1" in the ".user-heading" "css_element" + And "Student 1" "heading" should exist And ".previous" "css_element" should not exist in the ".user-navigation" "css_element" And ".next" "css_element" should exist in the ".user-navigation" "css_element" And I should see "Student 2" in the ".next" "css_element" diff --git a/grade/report/user/tests/behat/usersearch.feature b/grade/report/user/tests/behat/usersearch.feature index 9dc3e78de74..8229e107a12 100644 --- a/grade/report/user/tests/behat/usersearch.feature +++ b/grade/report/user/tests/behat/usersearch.feature @@ -32,19 +32,10 @@ Feature: Within the User report, a teacher can search for users. And I am on the "Course 1" "grades > User report > View" page logged in as "teacher1" Scenario: A teacher can view and trigger the user search - # Check the placeholder text + # Check the placeholder text (no users are initially shown). Given I should see "Search users" # Confirm the search is currently inactive and results are unfiltered. - And the following should exist in the "user-grades" table: - | -1- | - | Turtle Manatee | - | Student 1 | - | User Example | - | User Test | - | Dummy User | - And the following should not exist in the "user-grades" table: - | -1- | - | Teacher 1 | + And I should see "Search for a user to view their report" When I set the field "Search users" to "Turtle" And "View all results (5)" "option_role" should exist And I confirm "Turtle Manatee" in "user" search within the gradebook widget exists @@ -52,16 +43,12 @@ Feature: Within the User report, a teacher can search for users. And I click on "Turtle Manatee" "list_item" # Business case: This will trigger a page reload and can not dynamically update the table. And I wait until the page is ready - Then the following should exist in the "user-grades" table: - | -1- | - | Turtle Manatee | - And the following should not exist in the "user-grades" table: - | -1- | - | Teacher 1 | - | Student 1 | - | User Example | - | User Test | - | Dummy User | + And "Turtle Manatee" "heading" should exist + And "Teacher 1" "heading" should not exist + And "Student 1" "heading" should not exist + And "User Example" "heading" should not exist + And "User Test" "heading" should not exist + And "Dummy User" "heading" should not exist And I set the field "Search users" to "Turt" And "View all results (5)" "option_role" should exist And I click on "Clear search input" "button" in the ".user-search" "css_element" @@ -70,32 +57,23 @@ Feature: Within the User report, a teacher can search for users. Scenario: A teacher can search the user report to find specified users # Case: Standard search. Given I click on "Dummy" in the "user" search widget - And the following should exist in the "user-grades" table: - | -1- | - | Turtle Manatee | - And the following should not exist in the "user-grades" table: - | -1- | - | Teacher 1 | - | Student 1 | - | User Example | - | User Test | - | Dummy User | + And "Dummy User" "heading" should exist + And "Teacher 1" "heading" should not exist + And "Student 1" "heading" should not exist + And "User Example" "heading" should not exist + And "User Test" "heading" should not exist + And "Turtle Manatee" "heading" should not exist # Case: No users found. When I set the field "Search users" to "Plagiarism" And I should see "No results for \"Plagiarism\"" # Table remains unchanged as the user had no results to select from the dropdown. - And the following should exist in the "user-grades" table: - | -1- | - | Turtle Manatee | - And the following should not exist in the "user-grades" table: - | -1- | - | Teacher 1 | - | Student 1 | - | User Example | - | User Test | - | Dummy User | - + And "Dummy User" "heading" should exist + And "Teacher 1" "heading" should not exist + And "Student 1" "heading" should not exist + And "User Example" "heading" should not exist + And "User Test" "heading" should not exist + And "Turtle Manatee" "heading" should not exist # Case: Multiple users found and select only one result. Then I set the field "Search users" to "User" And "View all results (5)" "option_role" should exist @@ -109,16 +87,12 @@ Feature: Within the User report, a teacher can search for users. And I confirm "User (student4@example.com)" in "user" search within the gradebook widget exists And I click on "Dummy User" "list_item" And I wait until the page is ready - And the following should exist in the "user-grades" table: - | -1- | - | Dummy User | - And the following should not exist in the "user-grades" table: - | -1- | - | Teacher 1 | - | Student 1 | - | User Example | - | User Test | - | Turtle Manatee | + And "Dummy User" "heading" should exist + And "Teacher 1" "heading" should not exist + And "Student 1" "heading" should not exist + And "User Example" "heading" should not exist + And "User Test" "heading" should not exist + And "Turtle Manatee" "heading" should not exist # Business case: When searching with multiple partial matches, show the matches in the dropdown + a "View all results for (Bob)" # Business case cont. When pressing enter with multiple partial matches, behave like when you select the "View all results for (Bob)" @@ -127,25 +101,20 @@ Feature: Within the User report, a teacher can search for users. And "View all results (5)" "option_role" should exist And I click on "View all results (5)" "option_role" And I wait until the page is ready - And the following should exist in the "user-grades" table: - | -1- | - | Dummy User | - | User Example | - | User Test | - And the following should not exist in the "user-grades" table: - | -1- | - | Teacher 1 | - | Student 1 | - | Turtle Manatee | + And "Dummy User" "heading" should exist + And "User Example" "heading" should exist + And "User Test" "heading" should exist + And "Student 1" "heading" should exist + And "Turtle Manatee" "heading" should exist + And "Teacher 1" "heading" should not exist And I click on "Clear" "link" in the ".user-search" "css_element" And I wait until the page is ready - And the following should exist in the "user-grades" table: - | -1- | - | Turtle Manatee | - | Student 1 | - | User Example | - | User Test | - | Dummy User | + And "Dummy User" "heading" should exist + And "User Example" "heading" should exist + And "User Test" "heading" should exist + And "Student 1" "heading" should exist + And "Turtle Manatee" "heading" should exist + And "Teacher 1" "heading" should not exist # Case: No users enrolled. And I am on the "Course 2" "grades > User report > View" page @@ -220,16 +189,12 @@ Feature: Within the User report, a teacher can search for users. And I confirm "Student 1" in "user" search within the gradebook widget exists And I press the enter key And I wait until the page is ready - And the following should exist in the "user-grades" table: - | -1- | - | Student 1 | - | User Example | - | User Test | - | Dummy User | - | Turtle Manatee | - And the following should not exist in the "user-grades" table: - | -1- | - | Teacher 1 | + And "Student 1" "heading" should exist + And "User Example" "heading" should exist + And "User Test" "heading" should exist + And "Dummy User" "heading" should exist + And "Turtle Manatee" "heading" should exist + And "Teacher 1" "heading" should not exist @accessibility Scenario: A teacher can set focus and search using the input are with a keyboard @@ -274,18 +239,15 @@ Feature: Within the User report, a teacher can search for users. # Ensure we can interact with the input & clear search options with the keyboard. # Space & Enter have the same handling for triggering the two functionalities. And I set the field "Search users" to "User" + And I press the down key And I press the enter key And I wait to be redirected - And the following should exist in the "user-grades" table: - | -1- | - | Dummy User | - | User Example | - | User Test | - And the following should not exist in the "user-grades" table: - | -1- | - | Teacher 1 | - | Student 1 | - | Turtle Manatee | + And "User Example" "heading" should exist + And "Dummy User" "heading" should not exist + And "Student 1" "heading" should not exist + And "User Test" "heading" should not exist + And "Teacher 1" "heading" should not exist + And "Turtle Manatee" "heading" should not exist # Sometimes with behat we get unattached nodes causing spurious failures. And I wait "1" seconds And I set the field "Search users" to "ABC" diff --git a/grade/tests/behat/grade_regrade_do_not_override.feature b/grade/tests/behat/grade_regrade_do_not_override.feature index 3f52e80c1a6..d20e68ed24c 100644 --- a/grade/tests/behat/grade_regrade_do_not_override.feature +++ b/grade/tests/behat/grade_regrade_do_not_override.feature @@ -62,6 +62,7 @@ Feature: Regrading grades does not unnecessarily mark some as overriden And I set the field "Grade out of 100" to "70" And I press "Save changes" When I am on the "Course 1" "grades > Grader report > View" page + And I turn editing mode off Then the following should exist in the "gradereport-grader-table" table: | | | | | First name / Last name | Assignment 1 | Course total | diff --git a/grade/tests/behat/toggle_grade_categories.feature b/grade/tests/behat/toggle_grade_categories.feature index f410dc89cc2..3eed4f6f0f3 100644 --- a/grade/tests/behat/toggle_grade_categories.feature +++ b/grade/tests/behat/toggle_grade_categories.feature @@ -52,7 +52,7 @@ Feature: Teachers can toggle the visibility of the grade categories in the Grade | Course total | And "Collapse" "link" should exist in the "Course" "table_row" And "Expand" "link" should exist in the "Category 1" "table_row" - And the following should not exist in the "user-grades" table: + And the following should not exist in the "setup-grades" table: | Test assignment two | | Manual grade | | Category 1 total | @@ -139,8 +139,6 @@ Feature: Teachers can toggle the visibility of the grade categories in the Grade | Category 1 | | Test assignment two | | Manual grade | - | Category 1 total | - | Course total | And "Collapse" "link" should exist in the "Course" "table_row" And "Collapse" "link" should exist in the "Category 1" "table_row" # Collapse the grade category 'Category 1'. @@ -166,8 +164,6 @@ Feature: Teachers can toggle the visibility of the grade categories in the Grade | Category 1 | | Test assignment two | | Manual grade | - | Category 1 total | - | Course total | And "Collapse" "link" should exist in the "Course" "table_row" And "Collapse" "link" should exist in the "Category 1" "table_row" # Collapse again the grade category 'Category 1'. @@ -182,8 +178,6 @@ Feature: Teachers can toggle the visibility of the grade categories in the Grade | Category 1 | | Test assignment two | | Manual grade | - | Category 1 total | - | Course total | # Expand the grade category 'Course'. 'Category 1' should be still collapsed. And I click on "Expand" "link" in the "Course" "table_row" And the following should exist in the "setup-grades" table: @@ -191,7 +185,6 @@ Feature: Teachers can toggle the visibility of the grade categories in the Grade | Course | | Test assignment one | | Category 1 | - | Course total | And "Collapse" "link" should exist in the "Course" "table_row" And "Expand" "link" should exist in the "Category 1" "table_row" And the following should not exist in the "setup-grades" table: @@ -229,7 +222,6 @@ Feature: Teachers can toggle the visibility of the grade categories in the Grade | Course | | Test assignment one | | Category 1 | - | Course total | And "Collapse" "link" should exist in the "Course" "table_row" And "Expand" "link" should exist in the "Category 1" "table_row" And the following should not exist in the "setup-grades" table: