From 3c86ca286518bd4d6bff6fb149c5ab4af8afcbb7 Mon Sep 17 00:00:00 2001 From: Huong Nguyen Date: Wed, 7 Aug 2024 09:22:08 +0700 Subject: [PATCH] MDL-81718 core_grades: Fix Behat failures --- .../behat/toggle_grade_categories.feature | 30 +++++++++---------- 1 file changed, 15 insertions(+), 15 deletions(-) diff --git a/grade/tests/behat/toggle_grade_categories.feature b/grade/tests/behat/toggle_grade_categories.feature index 0e2e47445f0..381f8217663 100644 --- a/grade/tests/behat/toggle_grade_categories.feature +++ b/grade/tests/behat/toggle_grade_categories.feature @@ -219,22 +219,9 @@ Feature: Teachers can toggle the visibility of the grade categories in the Grade Scenario: Grade categories are shown as collapsed only to the teacher that collapsed them # Collapse the grade category 'Category 1'. Given I click on "Collapse" "link" in the "Category 1" "table_row" - # Log in as teacher2 and confirm that the category 'Category 1' is not collapsed. - When I am on the "Course" "grades > gradebook setup" page logged in as "teacher2" + When I reload the page + # Reload the page and confirm that the category 'Category 1' is still collapsed. Then the following should exist in the "setup-grades" table: - | Name | - | Course | - | Test assignment one | - | 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" - # Log in as teacher1 and confirm that the category 'Category 1' is still collapsed. - And I am on the "Course" "grades > gradebook setup" page logged in as "teacher1" - And the following should exist in the "setup-grades" table: | Name | | Course | | Test assignment one | @@ -245,3 +232,16 @@ Feature: Teachers can toggle the visibility of the grade categories in the Grade And I should not see "Test assignment two" in the "setup-grades" "table" And I should not see "Manual grade" in the "setup-grades" "table" And I should not see "Category 1 total" in the "setup-grades" "table" + # Log in as teacher2 and confirm that the category 'Category 1' is not collapsed. + And I am on the "Course" "grades > gradebook setup" page logged in as "teacher2" + And the following should exist in the "setup-grades" table: + | Name | + | Course | + | Test assignment one | + | 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"